3#include <boost/range/adaptor/map.hpp>
38struct TestConfigurationPeano;
39struct TestConfigurationComsol;
56 template <
typename Other>
140 const bool allowDirectAccess);
326 template <
typename T>
329 template <
typename T>
352 template <
typename ELEMENT_T>
355 const ELEMENT_T & newElement)
const;
368template <
typename ELEMENT_T>
371 const ELEMENT_T & newElement)
const
373 for (
size_t i = 0; i < data.size(); i++) {
374 if (data[i].
name == newElement.name) {
Holds coupling state of one participating solver in coupled simulation.
bool isMeshReceived(std::string_view mesh) const
Is a mesh with this name received by this participant?
std::string hintForMeshData(std::string_view mesh, std::string_view data) const
const std::vector< MeshContext * > & usedMeshContexts() const
bool isDataUsed(std::string_view mesh, std::string_view data) const
Is the data used by this participant?
bool isMeshUsed(std::string_view mesh) const
Is a mesh with this name used by this participant?
std::vector< io::ExportContext > _exportContexts
Export contexts to export meshes, data, and more.
void receiveMesh(const mesh::PtrMesh &mesh, const std::string &fromParticipant, double safetyFactor, partition::ReceivedPartition::GeometricFilter geoFilter, const bool allowDirectAccess)
Adds a mesh to be received by the participant.
virtual ~ParticipantState()
MeshMap< MeshContext * > _meshContexts
All mesh contexts involved in a simulation.
bool isDataWrite(std::string_view mesh, std::string_view data) const
Is the participant allowed to write the data?
const ReadDataContext & readDataContext(std::string_view mesh, std::string_view data) const
DataMap< ReadDataContext > _readDataContexts
void addAction(action::PtrAction &&action)
Adds a configured Action to the participant.
std::unique_ptr< utils::ManageUniqueIDs > _meshIdManager
bool isDataRead(std::string_view mesh, std::string_view data) const
Is the participant allowed to read the data?
std::string hintForMesh(std::string_view mesh) const
std::vector< PtrWatchPoint > & watchPoints()
Provided access to all WatchPoints.
std::vector< MeshContext * > _usedMeshContexts
Mesh contexts used by the participant.
const MeshContext & meshContext(std::string_view mesh) const
Mesh queries.
void checkDuplicatedData(std::string_view mesh, std::string_view data)
void addWatchPoint(const PtrWatchPoint &watchPoint)
Adds a configured WatchPoint to the ParticipantState.
std::vector< MappingContext > _readMappingContexts
Read mapping contexts used by the participant.
void addWriteMappingContext(const MappingContext &mappingContext)
Adds a configured write Mapping to the ParticipantState.
ParticipantState(std::string name, mesh::PtrMeshConfiguration &meshConfig)
Constructor.
std::vector< action::PtrAction > _actions
bool isDataValid(const std::vector< ELEMENT_T > &data, const ELEMENT_T &newElement) const
std::vector< action::PtrAction > & actions()
Provided access to all Action.
friend struct Integration::Serial::Whitebox::TestConfigurationPeano
To allow white box tests.
std::vector< PtrWatchIntegral > _watchIntegrals
void setUsePrimaryRank(bool useIntraComm)
Sets weather the participant was configured with a primary tag.
void exportIntermediate(IntermediateExport exp)
Exports timewindows and iterations of meshes and watchpoints.
@ MAPPING_LINEAR_CONSERVATIVE
@ MAPPING_LINEAR_CONSISTENT
mesh::PtrMesh findMesh(std::string_view data) const
Returns the mesh associated with ReadDataContext with given data name in _readDataContexts of this Pa...
void addReadMappingContext(const MappingContext &mappingContext)
Adds a configured read Mapping to the ParticipantState.
bool hasMesh(std::string_view mesh) const
Does preCICE know a mesh with this name?
DataMap< WriteDataContext > _writeDataContexts
friend struct Integration::Serial::Whitebox::TestConfigurationComsol
void addWatchIntegral(const PtrWatchIntegral &watchIntegral)
Adds a configured WatchIntegral to the ParticipantState.
std::vector< MappingContext > _writeMappingContexts
Write mapping contexts used by the participant.
bool hasData(std::string_view mesh, std::string_view data) const
Is the dataID know to preCICE?
void addWriteData(const mesh::PtrData &data, const mesh::PtrMesh &mesh)
void addReadData(const mesh::PtrData &data, const mesh::PtrMesh &mesh)
Adds a configured read Data to the ParticipantState.
const std::string & getName() const
std::vector< PtrWatchPoint > _watchPoints
void setMeshIdManager(std::unique_ptr< utils::ManageUniqueIDs > &&idm)
Sets the manager responsible for providing unique IDs to meshes.
bool isDirectAccessAllowed(std::string_view mesh) const
void addExportContext(const io::ExportContext &context)
Adds a configured ExportContext to export meshes and data.
bool useIntraComm() const
Returns true, if the participant uses a primary tag.
bool isMeshProvided(std::string_view mesh) const
Is a mesh with this name provided by this participant?
std::vector< MappingContext > & writeMappingContexts()
Provided access to all write MappingContext.
const std::vector< io::ExportContext > & exportContexts() const
Returns all ExportContext for exporting meshes and data.
std::vector< MappingContext > & readMappingContexts()
Provided access to all read MappingContext.
void provideMesh(const mesh::PtrMesh &mesh)
Adds a mesh to be provided by the participant.
const WriteDataContext & writeDataContext(std::string_view mesh, std::string_view data) const
MeshContext & usedMeshContext(std::string_view name)
void checkDuplicatedUse(std::string_view mesh)
std::vector< PtrWatchIntegral > & watchIntegrals()
Provided access to all WatchIntegrals.
Stores one Data object with related mesh. Context stores data to be read from and potentially provide...
Stores one Data object with related mesh. Context stores data to be written to and potentially provid...
This class provides a lightweight logger.
GeometricFilter
Defines the type of geometric filter used.
MeshDataKey(T, T) -> MeshDataKey< T >
Deduction guide for two identical parameter types.
Main namespace of the precice library.
static std::unique_ptr< precice::Participant > impl
Holds a data mapping and related information.
Stores a mesh and related objects and data.
Type that represent a compound key of two values.
bool operator<(const MeshDataKey< Other > &other) const