16class DataContextFixture;
107 template <
typename Container>
Stores one Data object with related mesh.
std::map< FromToDataIDs, Eigen::VectorXd > _initialGuesses
int getMeshVertexCount() const
Get the number of vertices of mesh.
bool hasWriteMapping() const
Informs the user whether this DataContext has any write mapping.
DataContext(mesh::PtrData data, mesh::PtrMesh mesh)
Construct a new DataContext without a mapping. Protected, because only ReadDataContext and WriteDataC...
MeshID getMeshID() const
Get the ID of _mesh.
void appendMapping(MappingContext mappingContext)
Helper to append a mappingContext, fromData and toData to the corresponding data containers.
virtual void appendMappingConfiguration(MappingContext &mappingContext, const MeshContext &meshContext)=0
Adds a MappingContext and the MeshContext required by the mapping to the corresponding DataContext da...
std::string getDataName() const
Get the Name of _providedData.
bool hasGradient() const
Returns whether _providedData has gradient.
int getDataDimensions() const
Get the dimensions of _providedData.
int mapData(std::optional< double > after=std::nullopt, bool skipZero=false)
Perform the mapping for mapping contexts and the corresponding data context (from and to data)
bool hasMapping() const
Informs the user whether this DataContext has any _mappingContext.
int getSpatialDimensions() const
Get the spatial dimensions of _providedData.
bool hasReadMapping() const
Informs the user whether this DataContext has any read mapping.
bool isValidVertexID(const VertexID id) const
Returns true if the given vertexID is valid.
std::optional< std::size_t > locateInvalidVertexID(const Container &c)
mesh::PtrData _providedData
Unique data this context is associated with.
void resetInitialGuesses()
Resets initial guesses of transient mappings to zero.
static logging::Logger _log
std::vector< MappingContext > _mappingContexts
Defines all mappings associated to this DataContext. A DataContext may also exist without a mapping.
mesh::PtrMesh _mesh
Unique mesh associated with _providedData.
std::string getMeshName() const
Get the name of _mesh.
This class provides a lightweight logger.
std::optional< std::size_t > locateInvalidVertexID(const Mesh &mesh, const Container &container)
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.