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
isTimestepCompletetoisTimeWindowComplete(#619)
Clarified fulfilledAction
fulfilledActionwas renamed tomarkActionFulfilled(#631)
Language bindings
C
- Moved to
extras/bindings/c. - Separated into
include(header) andsrc(implementation). - Renamed
precicec_isCouplingTimestepCompletetoprecicec_isTimeWindowComplete.
Fortran
- Moved the intrinsic Fortran bindings to
extras/bindings/fortran. - Renamed the “Fortran 2003 bindings” to “Fortran module” and
Precice_solver_if_moduletoprecice. Moved them to precice/fortran-module.
Python
preCICE configuration file
- Renamed
mapping:petrbftomapping:rbf(see #572). - Remove
master:mpi-singletags. preCICE defaults tomaster:mpi-singlefor parallel participants (see #572). - Remove
distribution-type="..."fromm2ntags. It now defaults topoint-to-point, use the attributeenforce-gather-scatter=1if this is not desired (see #572). - Renamed
coupling-schemeconfiguration optiontimestep-lengthtotime-window-size - Renamed
coupling-schemeconfiguration optionmax-timestepstomax-time-windows - Renamed
post-processingtoacceleration - Renamed
accelerationconfiguration optiontimesteps-reusedtotime-windows-reused - Renamed
accelerationconfiguration optionreused-timesteps-at-restarttoreused-time-windows-at-restart - Renamed
exportconfiguration optiontimestep-intervaltoevery-n-time-windows - Renamed
actionconfiguration optionon-timestep-complete-posttoon-time-window-complete-post
Building
- Renamed CMake variables (#609)
MPItoPRECICE_MPICommunicationPETSCtoPRECICE_PETScMappingPYTHONtoPRECICE_PythonActions
- CMake
CMAKE_BUILD_TYPEis 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.