108 template <
typename Container>
std::map< FromToDataIDs, Eigen::VectorXd > _initialGuesses
int getMeshVertexCount() const
Get the number of vertices of mesh.
std::pair< int, int > FromToDataIDs
bool hasWriteMapping() const
Informs the user whether this DataContext has any write mapping.
void addJustInTimeMapping(MappingContext &mappingContext, MeshContext &meshContext)
Attach a just-in-time mapping to this data context and setup a corresponding MappingDataCache.
DataContext(mesh::PtrData data, mesh::PtrMesh mesh)
Construct a new DataContext without a mapping. Protected, because only ReadDataContext and WriteDataC...
void initializeMappingDataCache()
Initializes the MappingDataCache.
mapping::PtrMapping justInTimeMapping
The just-in-time mapping for this data context.
MeshID getMeshID() const
Get the ID of _mesh.
void invalidateMappingCache()
Resets the time stamp of the MappingDataCache.
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)
std::unique_ptr< mapping::impl::MappingDataCache > mappingCache
Cache for just-in-time mapping.
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
void invalidateMappingCacheAndResetData()
Resets the time stamp of the MappingDataCache and resets the data it holds.
void resetInitialGuesses()
Resets initial guesses of transient mappings to zero.
static logging::Logger _log
Unique mesh associated with _providedData.
std::vector< MappingContext > _mappingContexts
Defines all mappings associated to this DataContext. A DataContext may also exist without a mapping.
std::string getMeshName() const
Get the name of _mesh.
This class provides a lightweight logger.
std::shared_ptr< Mapping > PtrMapping
provides Mesh, Data and primitives.
std::shared_ptr< Data > PtrData
std::shared_ptr< Mesh > PtrMesh
std::optional< std::size_t > locateInvalidVertexID(const Mesh &mesh, const Container &container)
contains the testing framework.
Main namespace of the precice library.
Holds a data mapping and related information.
Stores a mesh and related objects and data.