compile source files in fsi_coupling

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
lzhang
Posts: 44
Joined: Mon Nov 06, 2017 2:54 pm

compile source files in fsi_coupling

Post by lzhang »

Hello,

I would like to modify some source files located in code_sature-5.0.4/salome/fsi_coupling in order to perform fluid-structure interaction using Yacs.

I know that for source files of code_saturne, we can place it in the SRC directory of a test case, then use "code_saturne compile" to compile the files. So is there a similar way to compile modified fsi_coupling files, or I need to reinstall code_saturne using the modified files?

Thanks in advance for your response!

Best regards,
Lei
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: compile source files in fsi_coupling

Post by Yvan Fournier »

Hello,

With most files, copying in SRC should work (though this is recommended only for minor changes and testing).

If you modify the messages exchanged between Code_Saturne, the "milieu" module, and code_aster, then you need to rebuild the code and even update the YACS schema (and possibly adapt code_aster). Otherwise, SRC should work.

Regards,

Yvan
lzhang
Posts: 44
Joined: Mon Nov 06, 2017 2:54 pm

Re: compile source files in fsi_coupling

Post by lzhang »

Hello,

For example, with the file salome/fsi_coupling/libmilieu/runmilieu.c, I have the compilation error like "runmilieu.c:(.text+0x16) : référence indéfinie vers « inicom »" when trying to compile it.

If I understand well, the files located in salome/fsi_coupling/libmilieu are compiled and stored in the library libmilieu in the installation stage of code_saturne. Maybe I could just modify the library libmilieu to avoid the complete re-installation of code_saturne. Do you have any ideas on how this could be done? Or perhaps there are easier ways to solve my problem.

Thanks a lot!

Best regards,
Lei
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: compile source files in fsi_coupling

Post by Yvan Fournier »

Hello,

Yes, libmilieu is a separate library, leading to a separate executable (a bad idea in my opinion, as it adds more complexisty than it helps, but would take more people using this coupling to change it).

To avoid reinstalling everything, you can simply modify the sources in the source tree, and in the build tree, "cd" to the salome/fsi_coupling directory before running "make && make install". This will limit the build to this directory, so should be much faster.

Best regards,

Yvan
Post Reply