Search found 177 matches

by spacedout
19 Aug 2020, 20:49
Forum: General
Topic: what is the proper Fortran C interface ?
Replies: 3
Views: 2791

Re: what is the proper Fortran C interface ?

It may be better to execute g++ -c -fPIC f2.c -o f2.o for a C++ file instead of gcc -c -fPIC f2.c -o f2.o since g++ can link to C++ libraries And,according to people familiar with linux and gfortran, when building .so files, it is safer to also execute gfortran -c -fPIC f.F90 instead of just gfortra...
by spacedout
14 Aug 2020, 18:59
Forum: General
Topic: what is the proper Fortran C interface ?
Replies: 3
Views: 2791

Re: what is the proper Fortran C interface ?

the following might be a clue. This is how you create a shared file (.so) from object files (.o) elmerf90 f1.o f2.o -o f1.so when a fortran file f.F90 is compiled with: elmerf90 -c f.F90 (yielding f.o) ElmerSolver.exe dows not complain about the above recipe. unfortunately if instead we compile a C ...
by spacedout
12 Aug 2020, 06:12
Forum: General
Topic: what is the proper Fortran C interface ?
Replies: 3
Views: 2791

what is the proper Fortran C interface ?

Hi assuming my fortran and C source files are correctly written where the fortran file calls a function inside the C file, are the following two Linux commands also correct ? gcc -shared -o myCfile.so -fPIC myCfile.C elmerf90 -shared -o myFortfile.so -fPIC myFortfile.F90 myCfile.so ( I intend to the...
by spacedout
10 Aug 2020, 06:45
Forum: Software development
Topic: a note on code efficiency
Replies: 2
Views: 5408

Re: a note on code efficiency

Very well.
I should have known better - that the entire structure was copied from the .sif file to ram memory. And of course the amount of time spent scanning strings from memory pales by comparison with the time spent doing number crunching (floating point arithmetic).
Have a great day
Marc
by spacedout
08 Aug 2020, 05:13
Forum: Software development
Topic: a note on code efficiency
Replies: 2
Views: 5408

a note on code efficiency

I am looking at Fig 18.5 in ElmerSolverManual.pdf It strikes me that ElmerSolver will call the solver subroutine every time step for a transient simulation and therefore the same .sif file will be inspected every timestep before the nonlinear iteration loop. Wouldn't it be faster to scan that config...
by spacedout
06 Aug 2020, 05:05
Forum: Bug reports
Topic: MeshChanged undefined in solver_t [SOLVED]
Replies: 3
Views: 3792

Re: MeshChanged undefined in solver_t

It is kind of incredible but the file FlowSolver.F90 I downloaded onto my Win7 laptop was corrupted ! IF ( .NOT.AllocationsDone .OR. Solver % MeshChanged ) THEN was actually supposed to be IF ( .NOT.AllocationsDone .OR. Solver % Mesh % Changed ) THEN as I found out from another file FlowSolver.F90 i...
by spacedout
05 Aug 2020, 21:30
Forum: Bug reports
Topic: MeshChanged undefined in solver_t [SOLVED]
Replies: 3
Views: 3792

Re: MeshChanged undefined in solver_t

No, I am not sure. Under Windows 7, the .dll library files have a date modified of April 8 2020 whereas the .F90 source files have a date modified of April 17 2020 . The only reason I want to compile FlowSolve.F90 is that I need to change the continuity equation to drho/dt +div(V*rho) = S where S is...
by spacedout
05 Aug 2020, 04:44
Forum: Bug reports
Topic: MeshChanged undefined in solver_t [SOLVED]
Replies: 3
Views: 3792

MeshChanged undefined in solver_t [SOLVED]

Hi everybody When I try to compile FlowSolve.F90 with elmerf90 under either Linux or Windows 7, I get an error about a variable MeshChanged undefined in structure solver_t. A look at http://www.elmerfem.org/doxygen/structtypes_1_1solver__t.html indeed confirms that it is not part of this structure. ...
by spacedout
04 Aug 2020, 20:31
Forum: General
Topic: How to learn about basic FEM concepts
Replies: 2
Views: 2115

Re: How to learn about basic FEM concepts

Thank you ever so much. I am glad to hear that permutations are used for code optimization. I was afraid at first that it had something to do with some deep theoretical knowledge of FEM. Speaking of the latter, I downloaded THE H, P AND H-P VERSION OF THE FINITE ELEMENT METHOD BASIC THEORY AND APPLI...
by spacedout
02 Aug 2020, 21:36
Forum: General
Topic: How to learn about basic FEM concepts
Replies: 2
Views: 2115

How to learn about basic FEM concepts

Hi Q1. What is the mathematical or physical meaning of permutations in the Elmer code - the following crops up everywhere: Solver % Variable % Perm Q2. Because of the pandemic, my library is closed and I dont have access to the references [3] Szabo & Babuska , [4] Solin et al listed at the end o...