Make a change in ElmerSolver.f90

Discussion about building and installing Elmer
Post Reply
julien givernaud
Posts: 86
Joined: 18 Nov 2014, 18:18
Antispam: Yes

Make a change in ElmerSolver.f90

Post by julien givernaud »

Hi,

I want to make a change in ElmerSolver.f90 copied from github but how and where can I comile it now.
I am on Linux, my files are located in user/share/include (.mod)
user/share/lib (.so)

But I can't found the file ElmerSolver.mod, only in bin directory with elmerf90, ElmerFront and few others.

I am supposed to replace ElmerSolver in the bin directory, right?
Do I have to execute fortran compilation in this bin directory and remplace it with the command line:

Code: Select all

$ elmerf90 -o ElmerSolver.so ElmerSolver.f90
Sorry I have few experience with compilation....

Regards

Julien
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Make a change in ElmerSolver.f90

Post by annier »

Hi Julien,
Compilation of ElmerSolver.f90 is done in linux when you build and install Elmer. So, in general, for example in Ubuntu, you compile ElmerSolver only once as described below:
viewtopic.php?f=2&t=3742
In other operating systems of linux, you can see the corresponding installation guidelines:
For example:
viewtopic.php?f=2&t=3818&sid=cf093347219966c48cb3465781
So, you can change the ElmerSolver.f90 within the same location of the downloaded directory, and build and install elmer.

Later when you develop your own solver, for example pdesolver.f90, you keep it in your test directory and do the compilation as :

Code: Select all

$elmerf90 -o pdesolver.so pdesolver.f90

Yours
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Make a change in ElmerSolver.f90

Post by mzenker »

hi,

I would advise not to make changes to files which are part of the Elmer core distribution, but rather use user defined functions or solvers.
Otherwise, you need to redo your changes each time you update your Elmer.
If the change is a bugfix or otherwise of general interest, chances are that the Elmer team includes it into the official sources.

Matthias
Post Reply