-
-
Notifications
You must be signed in to change notification settings - Fork 85
Building
To build the adapter, you need to install a few dependencies and then execute the Allwmake
script. See and adjust the configuration in the beginning of the script, if needed (particularly the location of yaml-cpp). System paths such as LD_LIBRARY_PATH
, LIBRARY_PATH
or CPLUS_INCLUDE_PATH
are currently not searched.
-
Download the adapter or (better) install git and clone this repository:
git clone https://github.com/precice/openfoam-adapter.git
. - Install the yaml-cpp headers and shared library, preferably from your Linux distribution's repository.
- If you are using Ubuntu, you are looking for the package
libyaml-cpp-dev
. - If you want to build yaml-cpp from source, you need to build it as a shared library.
- In both cases, you need to set its paths in
Allwmake
.
- If you are using Ubuntu, you are looking for the package
- Install the preCICE headers and library, following its building instructions.
- If you want to use preCICE as a static library, remember to setup its dependencies and their paths in
Allwmake
. You need to set the path to Boost and PETSc (if needed) and uncomment theADAPTER_PRECICE_DEP="..."
line.
- If you want to use preCICE as a static library, remember to setup its dependencies and their paths in
- Install an OpenFOAM distribution. OpenFOAM 5 is known to be compatible (TODO: read below for more).
- Adjust and then execute the build script:
./Allwmake
.- If everything goes well, you will receive a success message.
- If you receive a message that there were undefined symbols, this probably means that you used preCICE as a static library, but you didn't specify its dependencies correctly.
The -DADAPTER_DEBUG_MODE
flag inside ADAPTER_PREP_FLAGS
activates additional debug messages. You may also change the target directory or specify the number of threads to use for the compilation. See the comments in Allwmake
for more.
In order to upgrade the adapter, or before you build for another OpenFOAM version, run ./Allclean
first. Get the latest version using git pull
.
More information on precice.org. Subscribe to the preCICE mailing list.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Please use "precice.org" for the attribution.