preCICE API
Single-step setup
This is described in detail in #614 and was done to simplify the setup. Change:
- SolverInterface interface(solverName, commRank, commSize);
- interface.configure(configFileName);
+ SolverInterface interface(solverName, configFileName, commRank, commSize);
Typical error message that should lead you here:
error: no matching function for call to ‘precice::SolverInterface::SolverInterface(std::__cxx11::string&, int, Foam::label)’
precice_ = new precice::SolverInterface(participantName_, Pstream::myProcNo(), Pstream::nProcs());
and
note: candidate: precice::SolverInterface::SolverInterface(const string&, const string&, int, int)
SolverInterface(
^
.../SolverInterface.hpp:52:3: note: candidate expects 4 arguments, 3 provided
Sorted out duplicate meaning of time step
- Renamed API function
isTimestepComplete
toisTimeWindowComplete
(#619)
Clarified fulfilledAction
fulfilledAction
was renamed tomarkActionFulfilled
(#631)
Language bindings
C
- Moved to
extras/bindings/c
. - Separated into
include
(header) andsrc
(implementation). - Renamed
precicec_isCouplingTimestepComplete
toprecicec_isTimeWindowComplete
.
Fortran
- Moved the intrinsic Fortran bindings to
extras/bindings/fortran
. - Renamed the “Fortran 2003 bindings” to “Fortran module” and
Precice_solver_if_module
toprecice
. Moved them to precice/fortran-module.
Python
preCICE configuration file
- Renamed
mapping:petrbf
tomapping:rbf
(see #572). - Remove
master:mpi-single
tags. preCICE defaults tomaster:mpi-single
for parallel participants (see #572). - Remove
distribution-type="..."
fromm2n
tags. It now defaults topoint-to-point
, use the attributeenforce-gather-scatter=1
if this is not desired (see #572). - Renamed
coupling-scheme
configuration optiontimestep-length
totime-window-size
- Renamed
coupling-scheme
configuration optionmax-timesteps
tomax-time-windows
- Renamed
post-processing
toacceleration
- Renamed
acceleration
configuration optiontimesteps-reused
totime-windows-reused
- Renamed
acceleration
configuration optionreused-timesteps-at-restart
toreused-time-windows-at-restart
- Renamed
export
configuration optiontimestep-interval
toevery-n-time-windows
- Renamed
action
configuration optionon-timestep-complete-post
toon-time-window-complete-post
Building
- Renamed CMake variables (#609)
MPI
toPRECICE_MPICommunication
PETSC
toPRECICE_PETScMapping
PYTHON
toPRECICE_PythonActions
- CMake
CMAKE_BUILD_TYPE
is automatically set toDebug
, if empty - CMake variables for enabling C and Fortran
- Removed SCons completely. You can do everything and much more with CMake.
Side-changes
All the tutorials are adapted for preCICE v2. You can still find a version compatible with preCICE v1.6.1 here.
Most of the adapters (all apart from the “under initial development” ones) are only supporting the latest version of preCICE. Make sure also that you are using the correct branch: an adapter’s develop
is supposed to work with preCICE develop
, and similar for master
.
At the same time as preCICE v2, we also changed the configuration format of the OpenFOAM adapter: Instead of a yaml file, it is now an OpenFOAM dictionary, making installation even easier. Please refer to the Configuration page for more details.