-
-
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.
-
Download the adapter or (better) install git and clone this repository:
git clone https://github.com/precice/openfoam-adapter.git
. - Install the latest yaml-cpp headers and shared library, preferably from your Linux distribution's repository. (at least yaml-cpp 0.5.x)
- If you use Boost >= 1.67, you also need yaml-cpp >= 0.6 (read more here).
- If you are using Ubuntu (and Boost < 1.67), 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.
- Install the preCICE headers and library, following its building instructions.
- If you want to use preCICE as a static library, check and adjust its dependencies in
Allwmake
(ADAPTER_PRECICE_DEP
).
- If you want to use preCICE as a static library, check and adjust its dependencies in
- Install an OpenFOAM distribution. Read more in Notes on OpenFOAM.
- Execute the build script:
./Allwmake
.- See and adjust the configuration in the beginning of the script first, if needed.
- 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.
Note: If any dependencies are not installed in the standard system paths, the locations of their headers need to be specified in the CPLUS_INCLUDE_PATH
and of their libraries in the LIBRARY_PATH
or LD_LIBRARY_PATH
.
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
.
Next: configure and load the adapter or run a tutorial.
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.