|
preCICE v3.1.2
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
18#define PRECICE_VALIDATE_MESH_NAME_IMPL(name) \
19 PRECICE_CHECK(_accessor->hasMesh(name), \
20 "The mesh named \"{}\" is unknown to preCICE.{}", \
21 name, _accessor->hintForMesh(name));
27#define PRECICE_REQUIRE_MESH_USE_IMPL(name) \
28 PRECICE_VALIDATE_MESH_NAME_IMPL(name) \
29 PRECICE_CHECK(_accessor->isMeshUsed(name), \
30 "This participant does not use the mesh \"{0}\", but attempted to access it. " \
31 "Please define a <provide-mesh name=\"{0}\" /> or <receive-mesh name=\"{0}\" from=\"...\" /> " \
32 "tag in the configuration of participant \" {1}.", \
39#define PRECICE_REQUIRE_MESH_PROVIDE_IMPL(name) \
40 PRECICE_REQUIRE_MESH_USE_IMPL(name) \
41 PRECICE_CHECK(_accessor->isMeshProvided(name), \
42 "This participant does not provide Mesh \"{0}\", but attempted to modify it. " \
43 "Please add a provide-mesh tag as follows <provide-mesh name=\"{0}\" />.", \
50#define PRECICE_REQUIRE_MESH_MODIFY_IMPL(name) \
51 PRECICE_REQUIRE_MESH_PROVIDE_IMPL(name) \
52 PRECICE_CHECK(!_meshLock.check(name), \
53 "This participant attempted to modify the Mesh \"{}\" while locked. " \
54 "Mesh modification is only allowed before calling initialize().", \
60#define PRECICE_VALIDATE_MESH_NAME(name) \
62 PRECICE_VALIDATE_MESH_NAME_IMPL(name) \
68#define PRECICE_REQUIRE_MESH_USE(name) \
70 PRECICE_REQUIRE_MESH_USE_IMPL(name) \
76#define PRECICE_REQUIRE_MESH_PROVIDE(name) \
78 PRECICE_REQUIRE_MESH_PROVIDE_IMPL(name) \
84#define PRECICE_REQUIRE_MESH_MODIFY(name) \
86 PRECICE_REQUIRE_MESH_MODIFY_IMPL(name) \
97#define PRECICE_VALIDATE_DATA_NAME_IMPL(mesh, data) \
98 PRECICE_CHECK(_accessor->hasData(mesh, data), \
99 "The given data \"{}\" is unknown to preCICE mesh \"{}\".{}", data, mesh, _accessor->hintForMeshData(mesh, data));
105#define PRECICE_REQUIRE_DATA_READ_IMPL(mesh, data) \
106 PRECICE_VALIDATE_DATA_NAME_IMPL(mesh, data) \
107 PRECICE_CHECK((_accessor->isDataRead(mesh, data)), \
108 "This participant does not use Data \"{0}\", but attempted to read it. " \
109 "Please extend the configuration of participant \"{1}\" by defining <read-data mesh=\"{2}\" name=\"{0}\" />.", \
110 data, _accessorName, mesh);
116#define PRECICE_REQUIRE_DATA_WRITE_IMPL(mesh, data) \
117 PRECICE_VALIDATE_DATA_NAME_IMPL(mesh, data) \
118 PRECICE_CHECK((_accessor->isDataWrite(mesh, data)), \
119 "This participant does not use Data \"{0}\", but attempted to write it. " \
120 "Please extend the configuration of participant \"{1}\" by defining <write-data mesh=\"{2}\" name=\"{0}\" />.", \
121 data, _accessorName, mesh);
126#define PRECICE_VALIDATE_DATA_NAME(mesh, data) \
128 PRECICE_VALIDATE_DATA_NAME_IMPL(mesh, data) \
134#define PRECICE_REQUIRE_DATA_READ(mesh, data) \
136 PRECICE_REQUIRE_DATA_READ_IMPL(mesh, data) \
142#define PRECICE_REQUIRE_DATA_WRITE(mesh, data) \
144 PRECICE_REQUIRE_DATA_WRITE_IMPL(mesh, data) \
152#define PRECICE_VALIDATE_DATA(data, size) \
157#define PRECICE_VALIDATE_DATA(data, size) \
158 PRECICE_CHECK(std::all_of(data, data + size, [](double val) { return std::isfinite(val); }), "One of the given data values is either plus or minus infinity or NaN.");
162#define PRECICE_EXPERIMENTAL_API() \
163 PRECICE_CHECK(_allowsExperimental, "You called the API function \"{}\", which is part of the experimental API. " \
164 "You may unlock the full API by specifying <precice-configuration experimental=\"true\" ... > in the configuration. " \
165 "Please be aware that experimental features may change in any future version (even minor or bugfix).", \