10#include "precice/impl/versions.hpp"
15#pragma GCC diagnostic push
16#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
19#pragma clang diagnostic push
20#pragma clang diagnostic ignored "-Wdeprecated-declarations"
29static std::string errormsg =
"preCICE has not been created properly. Be sure to call \"precicef_create\" before any other call to preCICE.";
112 if (
impl->isCouplingOngoing()) {
125 if (
impl->isTimeWindowComplete()) {
171 const char *meshName,
186 const char *meshName,
196 const char *meshName,
197 const double *position,
210 const char *meshName,
221 const char *meshName,
230 impl->setMeshVertices(
sv, {coordinates,
positionSize}, {ids,
static_cast<unsigned long>(*size)});
236 const char *meshName,
248 const char *meshName,
254 auto idsSize =
static_cast<unsigned long>(*size) * 2;
261 const char *meshName,
274 const char *meshName,
280 auto idsSize =
static_cast<unsigned long>(*size) * 3;
287 const char *meshName,
301 const char *meshName,
307 auto idsSize =
static_cast<unsigned long>(*size) * 4;
314 const char *meshName,
328 const char *meshName,
334 auto idsSize =
static_cast<unsigned long>(*size) * 4;
341 const char *meshName,
355 {ids,
static_cast<unsigned long>(*size)},
356 {values,
static_cast<unsigned long>(
dataSize)});
362 const char *meshName,
378 {ids,
static_cast<unsigned long>(*size)},
380 {values,
static_cast<unsigned long>(
dataSize)});
390 while (((
string[i] ==
' ') || (
string[i] == 0)) && (i >= 0)) {
409 const char *meshName,
425 const char *meshName,
429 const double *gradients,
441 {ids,
static_cast<unsigned long>(*size)},
448 const char *meshName,
464 {values,
static_cast<unsigned long>(
dataSize)});
470 const char *meshName,
484 impl->mapAndReadData(
489 {values,
static_cast<unsigned long>(
dataSize)});
495 const char *meshName,
501 auto bbSize =
static_cast<unsigned long>(
impl->getMeshDimensions(
sv) * 2);
508 const char *meshName,
528 impl->startProfilingSection(
sv);
536 impl->stopLastProfilingSection();
542#pragma GCC diagnostic pop
545#pragma clang diagnostic pop
#define PRECICE_CHECK(check,...)
This class provides a lightweight logger.
int strippedLength(const char *string, int length)
Returns length of string without trailing whitespace.
std::string_view strippedStringView(const char *string, int length)
void precicef_get_mesh_vertex_ids_and_coordinates_(const char *meshName, const int size, int *ids, double *coordinates, int meshNameLength)
void precicef_advance_(const double *timeStepSize)
void precicef_requires_initial_data_(int *isRequired)
void precicef_get_version_information_(char *versionInfo, int lengthVersionInfo)
void precicef_start_profiling_section_(const char *sectionName, int sectionNameLength)
static precice::logging::Logger _log("preciceFortran")
void precicef_requires_gradient_data_for_(const char *meshName, const char *dataName, int *required, int meshNameLength, int dataNameLength)
void precicef_read_data_(const char *meshName, const char *dataName, const int *size, int *ids, const double *relativeReadTime, double *values, int meshNameLength, int dataNameLength)
void precicef_get_mesh_vertex_size_(const char *meshName, int *meshSize, int meshNameLength)
void precicef_get_mesh_dimensions_(const char *meshName, int *dimensions, int meshNameLength)
void precicef_create_(const char *participantName, const char *configFileName, const int *solverProcessIndex, const int *solverProcessSize, int participantNameLength, int configFileNameLength)
void precicef_set_vertex_(const char *meshName, const double *position, int *vertexID, int meshNameLength)
void precicef_reset_mesh_(const char *meshName, int meshNameLength)
void precicef_set_edge_(const char *meshName, const int *firstVertexID, const int *secondVertexID, int meshNameLength)
void precicef_is_time_window_complete_(int *isComplete)
void precicef_requires_mesh_connectivity_for_(const char *meshName, int *required, int meshNameLength)
static std::unique_ptr< precice::Participant > impl
void precicef_map_and_read_data_(const char *meshName, const char *dataName, const int *size, double *coordinates, const double *relativeReadTime, double *values, int meshNameLength, int dataNameLength)
Reads data using just-in-time data mapping. See.
void precicef_set_tetrahedron(const char *meshName, const int *firstVertexID, const int *secondVertexID, const int *thirdVertexID, const int *fourthVertexID, int meshNameLength)
void precicef_set_mesh_quads_(const char *meshName, const int *size, const int *ids, int meshNameLength)
void precicef_get_data_dimensions_(const char *meshName, const char *dataName, int *dimensions, int meshNameLength, int dataNameLength)
static std::string errormsg
void precicef_write_gradient_data_(const char *meshName, const char *dataName, const int *size, const int *ids, const double *gradients, int meshNameLength, int dataNameLength)
void precicef_set_quad_(const char *meshName, const int *firstVertexID, const int *secondVertexID, const int *thirdVertexID, const int *fourthVertexID, int meshNameLength)
void precicef_write_and_map_data_(const char *meshName, const char *dataName, const int *size, double *coordinates, double *values, int meshNameLength, int dataNameLength)
Writes data using just-in-time data mapping See.
void precicef_requires_reading_checkpoint_(int *isRequired)
void precicef_initialize_()
void precicef_requires_writing_checkpoint_(int *isRequired)
void precicef_finalize_()
void precicef_set_mesh_tetrahedra_(const char *meshName, const int *size, const int *ids, int meshNameLength)
void precicef_set_vertices_(const char *meshName, const int *size, double *coordinates, int *ids, int meshNameLength)
void precicef_set_triangle_(const char *meshName, const int *firstVertexID, const int *secondVertexID, const int *thirdVertexID, int meshNameLength)
void precicef_stop_last_profiling_section_()
void precicef_write_data_(const char *meshName, const char *dataName, const int *size, int *ids, double *values, int meshNameLength, int dataNameLength)
void precicef_set_mesh_edges_(const char *meshName, const int *size, const int *ids, int meshNameLength)
void precicef_set_mesh_access_region_(const char *meshName, const double *boundingBox, int meshNameLength)
void precicef_get_max_time_step_size_(double *maxTimeStepSize)
void precicef_set_mesh_triangles_(const char *meshName, const int *size, const int *ids, int meshNameLength)
void precicef_is_coupling_ongoing_(int *isOngoing)