preCICE v3.1.2
|
Main Application Programming Interface of preCICE. Include using #include <precice/precice.hpp>
.
More...
#include <Participant.hpp>
Public Member Functions | |
Participant (const Participant ©)=delete | |
Disable copy construction. | |
Participant & | operator= (const Participant &assign)=delete |
Disable assignment construction. | |
Construction and Configuration | |
The API of preCICE is accessible via the Participant class. A constructed Participant directly corresponds to a participant in the configuration file. Constructors require defining the parallel context of the Participant by providing index and size of the current process, which are equivalent to rank and size in the MPI terminology. If preCICE is compiled with MPI, then there are multiple ways for it to be used:
The MPI initialization is independent of which kind IntraCommunicator is configured. | |
Participant (::precice::string_view participantName, ::precice::string_view configurationFileName, int solverProcessIndex, int solverProcessSize) | |
Constructs a Participant for the given participant. | |
Participant (::precice::string_view participantName, ::precice::string_view configurationFileName, int solverProcessIndex, int solverProcessSize, void *communicator) | |
Constructs a Participant for the given participant and a custom MPI communicator. | |
~Participant () | |
Steering Methods | |
The steering methods are responsible for the coupling logic in preCICE.
| |
void | initialize () |
Fully initializes preCICE and coupling data. | |
void | advance (double computedTimeStepSize) |
Advances preCICE after the solver has computed one time step. | |
void | finalize () |
Finalizes preCICE. | |
Implicit Coupling | |
These functions are only required when you configure implicit coupling schemes. Implicitly-coupled solvers may iterate each time step until convergence is achieved. This generally results in an outer loop handling time steps and an inner loop handling iterations. The preCICE abstracts the inner loop away by managing the iteration logic in advance. If implicit coupling is configured, the adapter is required to either read or write checkpoints using the API requiresWritingCheckpoint() and requiresReadingCheckpoint(). The general flow looks as follows: | |
bool | requiresWritingCheckpoint () |
bool | requiresReadingCheckpoint () |
Status Queries | |
In addition to the steering methods, the participant still needs some information regarding the coupling state. Use isCouplingOngoing() to check if the simulation has reached its end. Control your time stepping using getMaxTimeStepSize(). To correctly size input and output buffers, you can access the dimensionality of meshes using getMeshDimensions() and data using getDataDimensions(). | |
int | getMeshDimensions (::precice::string_view meshName) const |
Returns the spatial dimensionality of the given mesh. | |
int | getDataDimensions (::precice::string_view meshName, ::precice::string_view dataName) const |
Returns the spatial dimensionality of the given data on the given mesh. | |
bool | isCouplingOngoing () const |
Checks if the coupled simulation is still ongoing. | |
bool | isTimeWindowComplete () const |
Checks if the current coupling window is completed. | |
double | getMaxTimeStepSize () const |
Get the maximum allowed time step size of the current window. | |
Mesh Access | |
Connectivity is optional. Use requiresMeshConnectivityFor() to check if the current participant can make use of the connectivity. Only set the mesh connectivity that you require for your use-case and use the face/cell elements that your solver provides. preCICE removes all connectivity duplicates in initialize(). We recommend you to do the following depending on your case:
As an alternative to triangles, preCICE supports planar quads using setMeshQuad() and setMeshQuads(). These quads will be triangulated by preCICE, hence specifying triangles is generally preferred. Before using quads, we recommended to check if your solver provides a way to traverse triangulated faces. | |
bool | requiresMeshConnectivityFor (::precice::string_view meshName) const |
Checks if the given mesh requires connectivity. | |
VertexID | setMeshVertex (::precice::string_view meshName, ::precice::span< const double > position) |
Creates a mesh vertex. | |
int | getMeshVertexSize (::precice::string_view meshName) const |
Returns the number of vertices of a mesh. | |
void | setMeshVertices (::precice::string_view meshName, ::precice::span< const double > coordinates, ::precice::span< VertexID > ids) |
Creates multiple mesh vertices. | |
void | setMeshEdge (::precice::string_view meshName, VertexID first, VertexID second) |
Sets a mesh edge from vertex IDs. | |
void | setMeshEdges (::precice::string_view meshName, ::precice::span< const VertexID > ids) |
Sets multiple mesh edges from vertex IDs. | |
void | setMeshTriangle (::precice::string_view meshName, VertexID first, VertexID second, VertexID third) |
Sets mesh triangle from vertex IDs. | |
void | setMeshTriangles (::precice::string_view meshName, ::precice::span< const VertexID > ids) |
Sets multiple mesh triangles from vertex IDs. | |
void | setMeshQuad (::precice::string_view meshName, VertexID first, VertexID second, VertexID third, VertexID fourth) |
Sets a planar surface mesh quadrangle from vertex IDs. | |
void | setMeshQuads (::precice::string_view meshName, ::precice::span< const VertexID > ids) |
Sets multiple mesh quads from vertex IDs. | |
void | setMeshTetrahedron (::precice::string_view meshName, VertexID first, VertexID second, VertexID third, VertexID fourth) |
Set tetrahedron in 3D mesh from vertex ID. | |
void | setMeshTetrahedra (::precice::string_view meshName, ::precice::span< const VertexID > ids) |
Sets multiple mesh tetrahedra from vertex IDs. | |
Data Access | |
Data in preCICE is always associated to vertices on a defined mesh. Use getDataDimensions() to get the dimensionality of a data on a mesh. In each time step, you can access data on a mesh using writeData() and readData(). Calling advance() may use written data to create a new sample in time, maps data between meshes, and communicates between participants. If you perform multiple time steps per time window, then preCICE may decide to keep samples of written data to enable configured higher-order time interpolation in coupled participants. The time interpolation is implemented by the relative time in readData(). Written data is reset to 0 after each call to advance(). All data is initialized to 0 by default. If you configure preCICE to provide custom initial data, then participants need to provide this data before calling initialize(). After you defined the meshes, use requiresInitialData() to check if initial data is required. Then use writeData() to specify your initial data and continue to initialize(). | |
bool | requiresInitialData () |
void | writeData (::precice::string_view meshName, ::precice::string_view dataName, ::precice::span< const VertexID > ids, ::precice::span< const double > values) |
Writes data to a mesh. | |
void | readData (::precice::string_view meshName, ::precice::string_view dataName, ::precice::span< const VertexID > ids, double relativeReadTime, ::precice::span< double > values) const |
Reads data values from a mesh. Values correspond to a given point in time relative to the beginning of the current timestep. | |
Direct Access | |
If you want or need to provide your own data mapping scheme, then you can use direct mesh access to directly modify data on a received mesh. This requires to specify a region of interest using setMeshAccessRegion() before calling initialize(). After initialize(), you can use getMeshVertexIDsAndCoordinates() to receive information on the received mesh. Use the coordinates to compute your own data mapping scheme, and use the vertex IDs to read data form and write data to the mesh. | |
void | setMeshAccessRegion (::precice::string_view meshName, ::precice::span< const double > boundingBox) const |
setMeshAccessRegion Define a region of interest on a received mesh (<receive-mesh ... from="otherParticipant />") in order to receive only a certain mesh region. Have a look at the website under https://precice.org/couple-your-code-direct-access.html or navigate manually to the page Docs->Couple your code -> Advanced topics -> Accessing received meshes directly for a comprehensive documentation | |
void | getMeshVertexIDsAndCoordinates (::precice::string_view meshName, ::precice::span< VertexID > ids, ::precice::span< double > coordinates) const |
getMeshVertexIDsAndCoordinates Iterates over the region of interest defined by bounding boxes and reads the corresponding coordinates omitting the mapping. | |
Experimental: Gradient Data | |
These API functions are experimental and may change in future versions. | |
bool | requiresGradientDataFor (::precice::string_view meshName, ::precice::string_view dataName) const |
Checks if the given data set requires gradient data. We check if the data object has been initialized with the gradient flag. | |
void | writeGradientData (::precice::string_view meshName, ::precice::string_view dataName, ::precice::span< const VertexID > ids, ::precice::span< const double > gradients) |
Writes vector gradient data to a mesh. | |
Private Attributes | |
std::unique_ptr< impl::ParticipantImpl > | _impl |
Pointer to implementation of Participant. | |
Friends | |
struct | testing::WhiteboxAccessor |
Main Application Programming Interface of preCICE. Include using #include <precice/precice.hpp>
.
The flow of the API looks as follows:
Definition at line 168 of file Participant.hpp.
precice::Participant::Participant | ( | ::precice::string_view | participantName, |
::precice::string_view | configurationFileName, | ||
int | solverProcessIndex, | ||
int | solverProcessSize ) |
Constructs a Participant for the given participant.
[in] | participantName | Name of the participant using the interface. Has to match the name given for a participant in the xml configuration file. |
[in] | configurationFileName | Name (with path) of the xml configuration file. |
[in] | solverProcessIndex | If the solver code runs with several processes, each process using preCICE has to specify its index, which has to start from 0 and end with solverProcessSize - 1. |
[in] | solverProcessSize | The number of solver processes using preCICE. |
Definition at line 25 of file Participant.cpp.
precice::Participant::Participant | ( | ::precice::string_view | participantName, |
::precice::string_view | configurationFileName, | ||
int | solverProcessIndex, | ||
int | solverProcessSize, | ||
void * | communicator ) |
Constructs a Participant for the given participant and a custom MPI communicator.
[in] | participantName | Name of the participant using the interface. Has to match the name given for a participant in the xml configuration file. |
[in] | configurationFileName | Name (with path) of the xml configuration file. |
[in] | solverProcessIndex | If the solver code runs with several processes, each process using preCICE has to specify its index, which has to start from 0 and end with solverProcessSize - 1. |
[in] | solverProcessSize | The number of solver processes using preCICE. |
[in] | communicator | A pointer to an MPI_Comm to use as communicator. |
Definition at line 34 of file Participant.cpp.
|
default |
|
delete |
Disable copy construction.
void precice::Participant::advance | ( | double | computedTimeStepSize | ) |
Advances preCICE after the solver has computed one time step.
There are two cases to distinguish at this point. If computedTimeStepSize
== getMaxTimeStepSize(), then the solver has reached the end of a time window and proceeds the coupling. This call is a computationally expensive process as it involves among other tasks:
If computedTimeStepSize
< getMaxTimeStepSize(), then the solver hasn't reached the end of a time window and it is subcycling. Depending on the configuration, written data can be used by preCICE to generate additional samples allowing for time interpolation using readData(). This call is computationally inexpensive.
[in] | computedTimeStepSize | Size of time step used by the solver. |
computedTimeStep
to advance().computedTimeStepSize
.Definition at line 51 of file Participant.cpp.
void precice::Participant::finalize | ( | ) |
Finalizes preCICE.
If initialize() has been called:
Always:
Definition at line 57 of file Participant.cpp.
int precice::Participant::getDataDimensions | ( | ::precice::string_view | meshName, |
::precice::string_view | dataName ) const |
Returns the spatial dimensionality of the given data on the given mesh.
Note that vectorial data dimensionality directly depends on the spacial dimensionality of the mesh.
[in] | meshName | the name of the associated mesh |
[in] | dataName | the name of the data to get the dimensions for |
Definition at line 67 of file Participant.cpp.
double precice::Participant::getMaxTimeStepSize | ( | ) | const |
Get the maximum allowed time step size of the current window.
Allows the user to query the maximum allowed time step size in the current window. This should be used to compute the actual time step that the solver uses.
Definition at line 82 of file Participant.cpp.
int precice::Participant::getMeshDimensions | ( | ::precice::string_view | meshName | ) | const |
Returns the spatial dimensionality of the given mesh.
[in] | meshName | the name of the associated mesh |
Definition at line 62 of file Participant.cpp.
void precice::Participant::getMeshVertexIDsAndCoordinates | ( | ::precice::string_view | meshName, |
::precice::span< VertexID > | ids, | ||
::precice::span< double > | coordinates ) const |
getMeshVertexIDsAndCoordinates Iterates over the region of interest defined by bounding boxes and reads the corresponding coordinates omitting the mapping.
[in] | meshName | corresponding mesh name |
[out] | ids | ids corresponding to the coordinates |
[out] | coordinates | the coordinates associated to the ids and corresponding data values |
initialize()
, if the meshName
corresponds to a received mesh, since the relevant mesh data is exchanged during the initialize()
call.Definition at line 224 of file Participant.cpp.
int precice::Participant::getMeshVertexSize | ( | ::precice::string_view | meshName | ) | const |
Returns the number of vertices of a mesh.
[in] | meshName | the name of the mesh |
initialize()
, if the meshName
corresponds to a received mesh, since the relevant mesh data is exchanged during the initialize()
call. Definition at line 120 of file Participant.cpp.
void precice::Participant::initialize | ( | ) |
Fully initializes preCICE and coupling data.
Definition at line 46 of file Participant.cpp.
bool precice::Participant::isCouplingOngoing | ( | ) | const |
Checks if the coupled simulation is still ongoing.
A coupling is ongoing as long as
Definition at line 72 of file Participant.cpp.
bool precice::Participant::isTimeWindowComplete | ( | ) | const |
Checks if the current coupling window is completed.
The following reasons require several solver time steps per time window:
Hence, a time window is complete if we reach the end of the time window and the implicit coupling has converged.
For implicit coupling this condition is equivalent with the requirement to write an iteration checkpoint. This is, however, not the case for explicit coupling.
Definition at line 77 of file Participant.cpp.
|
delete |
Disable assignment construction.
void precice::Participant::readData | ( | ::precice::string_view | meshName, |
::precice::string_view | dataName, | ||
::precice::span< const VertexID > | ids, | ||
double | relativeReadTime, | ||
::precice::span< double > | values ) const |
Reads data values from a mesh. Values correspond to a given point in time relative to the beginning of the current timestep.
This function reads values of specified vertices from data of a mesh. Values are read into a block of continuous memory defined by values in the order specified by vertices.
The 1D/Scalar-format of values is (d0, d1, ..., dn) The 2D-format of values is (d0x, d0y, d1x, d1y, ..., dnx, dny) The 3D-format of values is (d0x, d0y, d0z, d1x, d1y, d1z, ..., dnx, dny, dnz)
The data is read at relativeReadTime, which indicates the point in time measured from the beginning of the current time step. relativeReadTime = 0 corresponds to data at the beginning of the time step. Assuming that the user will call advance(dt) at the end of the time step, dt indicates the size of the current time step. Then relativeReadTime = dt corresponds to the data at the end of the time step.
[in] | meshName | the name of mesh that hold the data. |
[in] | dataName | the name of the data to read from. |
[in] | ids | the vertex ids of the vertices to read data from. |
[in] | relativeReadTime | Point in time where data is read relative to the beginning of the current time step. |
[out] | values | the destination memory to read the data from. |
Definition at line 208 of file Participant.cpp.
bool precice::Participant::requiresGradientDataFor | ( | ::precice::string_view | meshName, |
::precice::string_view | dataName ) const |
Checks if the given data set requires gradient data. We check if the data object has been initialized with the gradient flag.
preCICE may require gradient data information from the solver and ignores any API calls regarding gradient data if it is not required. (When applying a nearest-neighbor-gradient mapping)
[in] | meshName | the name of mesh that hold the data. |
[in] | dataName | the name of the data. |
Definition at line 107 of file Participant.cpp.
bool precice::Participant::requiresInitialData | ( | ) |
Checks if the participant is required to provide initial data.
If true, then the participant needs to write initial data to defined vertices prior to calling initialize().
Definition at line 87 of file Participant.cpp.
bool precice::Participant::requiresMeshConnectivityFor | ( | ::precice::string_view | meshName | ) | const |
Checks if the given mesh requires connectivity.
preCICE may require connectivity information from the solver and ignores any API calls regarding connectivity if it is not required. Use this function to conditionally generate this connectivity.
[in] | meshName | the name of the mesh |
Definition at line 102 of file Participant.cpp.
bool precice::Participant::requiresReadingCheckpoint | ( | ) |
Checks if the participant is required to read an iteration checkpoint.
If true, the participant is required to read an iteration checkpoint before calling advance().
Definition at line 92 of file Participant.cpp.
bool precice::Participant::requiresWritingCheckpoint | ( | ) |
Checks if the participant is required to write an iteration checkpoint.
If true, the participant is required to write an iteration checkpoint before calling advance().
Definition at line 97 of file Participant.cpp.
void precice::Participant::setMeshAccessRegion | ( | ::precice::string_view | meshName, |
::precice::span< const double > | boundingBox ) const |
setMeshAccessRegion Define a region of interest on a received mesh (<receive-mesh ... from="otherParticipant />") in order to receive only a certain mesh region. Have a look at the website under https://precice.org/couple-your-code-direct-access.html or navigate manually to the page Docs->Couple your code -> Advanced topics -> Accessing received meshes directly for a comprehensive documentation
This function is required if you don't want to use the mapping schemes in preCICE, but rather want to use your own solver for data mapping. As opposed to the usual preCICE mapping, only a single mesh (from the other participant) is now involved in this situation since an 'own' mesh defined by the participant itself is not required any more. In order to re-partition the received mesh, the participant needs to define the mesh region it wants read data from and write data to. The mesh region is specified through an axis-aligned bounding box given by the lower and upper [min and max] bounding-box limits in each space dimension [x, y, z].
[in] | meshName | name of the mesh you want to access through the bounding box |
[in] | boundingBox | Axis aligned bounding boxes which has in 3D the format [x_min, x_max, y_min, y_max, z_min, z_max] |
initialize()
has not yet been called. Definition at line 218 of file Participant.cpp.
void precice::Participant::setMeshEdge | ( | ::precice::string_view | meshName, |
VertexID | first, | ||
VertexID | second ) |
Sets a mesh edge from vertex IDs.
Ignored if preCICE doesn't require connectivity for the mesh.
[in] | meshName | name of the mesh to add the edge to |
[in] | first | ID of the first vertex of the edge |
[in] | second | ID of the second vertex of the edge |
Definition at line 134 of file Participant.cpp.
void precice::Participant::setMeshEdges | ( | ::precice::string_view | meshName, |
::precice::span< const VertexID > | ids ) |
Sets multiple mesh edges from vertex IDs.
vertices contain pairs of vertex indices for each edge to define. The format follows: e1a, e1b, e2a, e2b, ... Ignored if preCICE doesn't require connectivity for the mesh.
[in] | meshName | the name of the mesh to add the n edges to |
[in] | ids | an array containing 2n vertex IDs for n edges |
ids
were added to the mesh with the name meshName ids.size()
is multiple of 2Definition at line 142 of file Participant.cpp.
void precice::Participant::setMeshQuad | ( | ::precice::string_view | meshName, |
VertexID | first, | ||
VertexID | second, | ||
VertexID | third, | ||
VertexID | fourth ) |
Sets a planar surface mesh quadrangle from vertex IDs.
The planar quad will be triangulated, maximizing area-to-circumference. Ignored if preCICE doesn't require connectivity for the mesh.
[in] | meshName | name of the mesh to add the Quad to |
[in] | first | ID of the first vertex of the Quad |
[in] | second | ID of the second vertex of the Quad |
[in] | third | ID of the third vertex of the Quad |
[in] | fourth | ID of the fourth vertex of the Quad |
Definition at line 165 of file Participant.cpp.
void precice::Participant::setMeshQuads | ( | ::precice::string_view | meshName, |
::precice::span< const VertexID > | ids ) |
Sets multiple mesh quads from vertex IDs.
vertices contain quadruples of vertex indices for each quad to define. The format follows: q1a, q1b, q1c, q1d, q2a, q2b, q2c, q2d, ...
Each planar quad will be triangulated, maximizing area-to-circumference. Ignored if preCICE doesn't require connectivity for the mesh.
[in] | meshName | name of the mesh to add the n quads to |
[in] | ids | an array containing 4n vertex IDs for n quads |
ids
were added to the mesh with the name meshName ids.size()
is multiple of 4Definition at line 175 of file Participant.cpp.
void precice::Participant::setMeshTetrahedra | ( | ::precice::string_view | meshName, |
::precice::span< const VertexID > | ids ) |
Sets multiple mesh tetrahedra from vertex IDs.
vertices contain quadruples of vertex indices for each tetrahedron to define. The format follows: t1a, t1b, t1c, t1d, t2a, t2b, t2c, t2d, ... Ignored if preCICE doesn't require connectivity for the mesh.
[in] | meshName | name of the mesh to add the n tetrahedra to |
[in] | ids | an array containing 4n vertex IDs for n tetrahedra |
ids
were added to the mesh with the name meshName Definition at line 192 of file Participant.cpp.
void precice::Participant::setMeshTetrahedron | ( | ::precice::string_view | meshName, |
VertexID | first, | ||
VertexID | second, | ||
VertexID | third, | ||
VertexID | fourth ) |
Set tetrahedron in 3D mesh from vertex ID.
[in] | meshName | name of the mesh to add the Tetrahedron to |
[in] | first | ID of the first vertex of the Tetrahedron |
[in] | second | ID of the second vertex of the Tetrahedron |
[in] | third | ID of the third vertex of the Tetrahedron |
[in] | fourth | ID of the fourth vertex of the Tetrahedron |
Definition at line 182 of file Participant.cpp.
void precice::Participant::setMeshTriangle | ( | ::precice::string_view | meshName, |
VertexID | first, | ||
VertexID | second, | ||
VertexID | third ) |
Sets mesh triangle from vertex IDs.
[in] | meshName | name of the mesh to add the triangle to |
[in] | first | ID of the first vertex of the triangle |
[in] | second | ID of the second vertex of the triangle |
[in] | third | ID of the third vertex of the triangle |
Definition at line 149 of file Participant.cpp.
void precice::Participant::setMeshTriangles | ( | ::precice::string_view | meshName, |
::precice::span< const VertexID > | ids ) |
Sets multiple mesh triangles from vertex IDs.
vertices contain triples of vertex indices for each triangle to define. The format follows: t1a, t1b, t1c, t2a, t2b, t2c, ... Ignored if preCICE doesn't require connectivity for the mesh.
[in] | meshName | name of the mesh to add the n triangles to |
[in] | ids | an array containing 3n vertex IDs for n triangles |
ids
were added to the mesh with the name meshName ids.size()
is multiple of 3Definition at line 158 of file Participant.cpp.
VertexID precice::Participant::setMeshVertex | ( | ::precice::string_view | meshName, |
::precice::span< const double > | position ) |
Creates a mesh vertex.
[in] | meshName | the name of the mesh to add the vertex to. |
[in] | position | the coordinates of the vertex. |
Definition at line 113 of file Participant.cpp.
void precice::Participant::setMeshVertices | ( | ::precice::string_view | meshName, |
::precice::span< const double > | coordinates, | ||
::precice::span< VertexID > | ids ) |
Creates multiple mesh vertices.
[in] | meshName | the name of the mesh to add the vertices to. |
[in] | coordinates | a span to the coordinates of the vertices The 2D-format is (d0x, d0y, d1x, d1y, ..., dnx, dny) The 3D-format is (d0x, d0y, d0z, d1x, d1y, d1z, ..., dnx, dny, dnz) |
[out] | ids | The ids of the created vertices |
coordinates.size()
== getMeshDimensions(meshName) * ids.size()Definition at line 126 of file Participant.cpp.
void precice::Participant::writeData | ( | ::precice::string_view | meshName, |
::precice::string_view | dataName, | ||
::precice::span< const VertexID > | ids, | ||
::precice::span< const double > | values ) |
Writes data to a mesh.
This function writes values of specified vertices to data of a mesh. Values are provided as a block of continuous memory defined by values. The order of the provided data follows the order specified by vertices.
The 1D/Scalar-format of values is (d0, d1, ..., dn) The 2D-format of values is (d0x, d0y, d1x, d1y, ..., dnx, dny) The 3D-format of values is (d0x, d0y, d0z, d1x, d1y, d1z, ..., dnx, dny, dnz)
[in] | meshName | the name of mesh that hold the data. |
[in] | dataName | the name of the data to write to. |
[in] | ids | the vertex ids of the vertices to write data to. |
[in] | values | the values to write to preCICE. |
ids
is a return value of setMeshVertex or setMeshVertices Definition at line 199 of file Participant.cpp.
void precice::Participant::writeGradientData | ( | ::precice::string_view | meshName, |
::precice::string_view | dataName, | ||
::precice::span< const VertexID > | ids, | ||
::precice::span< const double > | gradients ) |
Writes vector gradient data to a mesh.
This function writes gradient values of specified vertices to data of a mesh. Values are provided as a block of continuous memory defined by gradients. The order of the provided gradient data follows the order specified by vertices.
Each gradient or Jacobian depends on the dimensionality of the mesh and data. Each gradient has a total of getMeshDimensions(meshName) * getDataDimensions(meshName, dataName) components and is stored in a linearised format as follows:
Spatial Dimensions | Scalar Data | Vectorial Data |
---|---|---|
2D | s dx, s dy | x dx, y dx, x dy, y dy |
3D | s dy, s dy, s dz | x dx, y dx, z dx, x dy, y dy, z dy, x dz, y dz, z dz |
The gradients/Jacobian for all vertices are then contiguously saved in memory.
Example for 2D Vectorial:
Index | 0 | 1 | 2 | 3 | ... | 4n | 4n+1 | 4n+2 | 4n+3 |
---|---|---|---|---|---|---|---|---|---|
Component | x0 dx | y0 dx | x0 dy | y0 dy | ... | xn dx | yn dx | xn dy | yn dy |
[in] | meshName | the name of mesh that hold the data. |
[in] | dataName | the name of the data to write to. |
[in] | ids | the vertex ids of the vertices to write gradient data to. |
[in] | gradients | the linearised gradient data to write to preCICE. |
Definition at line 231 of file Participant.cpp.
|
friend |
Definition at line 1036 of file Participant.hpp.
|
private |
Pointer to implementation of Participant.
Definition at line 1033 of file Participant.hpp.