preCICE v3.3.0
Loading...
Searching...
No Matches
precice::mesh::MeshConfiguration Class Reference

#include <MeshConfiguration.hpp>

Inheritance diagram for precice::mesh::MeshConfiguration:
[legend]
Collaboration diagram for precice::mesh::MeshConfiguration:
[legend]

Public Member Functions

 MeshConfiguration (xml::XMLTag &parent, PtrDataConfiguration config)
 Constructor, takes a valid data configuration as argument.
const std::vector< PtrMesh > & meshes () const
 Returns all configured meshes.
std::vector< PtrMesh > & meshes ()
 Returns all configured meshes.
bool hasMeshName (const std::string &meshName) const
 Returns whether Mesh has Data with the dataName.
mesh::PtrMesh getMesh (const std::string &meshName) const
 Returns the configured mesh with given name, or NULL.
void xmlTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
 Callback at begin of XML tag.
void xmlEndTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
 Callback at end of XML tag and at end of subtag.
const PtrDataConfigurationgetDataConfiguration () const
void addMesh (const mesh::PtrMesh &mesh)
std::map< std::string, std::vector< std::string > > & getNeededMeshes ()
void addNeededMesh (const std::string &participant, const std::string &mesh)
void insertMeshToMeshDimensionsMap (const std::string &mesh, int dimensions)
 Initialize the map between meshes and dimensions, for unit tests that directly create mesh objects without going through the config reading.
Public Member Functions inherited from precice::xml::XMLTag::Listener
Listeneroperator= (Listener &&)=delete
virtual ~Listener ()=default

Static Public Member Functions

static mesh::PtrMesh getJustInTimeMappingMesh (int dimension)

Private Member Functions

int getDataDimensions (const std::string &meshName, const Data::typeName typeName) const
 Get the number of dimensions that data values of this type (scalar/vector) have on this mesh.

Private Attributes

logging::Logger _log {"mesh::MeshConfiguration"}
const std::string TAG
const std::string ATTR_NAME
const std::string ATTR_DIMENSIONS
const std::string TAG_DATA
const std::string ATTR_SIDE_INDEX
std::map< std::string, int > _meshDimensionsMap
PtrDataConfiguration _dataConfig
 Data configuration.
std::vector< PtrMesh_meshes
 Configured meshes.
std::map< std::string, std::vector< std::string > > _neededMeshes
 to check later if all meshes that any coupling scheme needs are actually used by the participants
utils::ManageUniqueIDs _meshIdManager
utils::ManageUniqueIDs _dataIDManager

Detailed Description

Definition at line 23 of file MeshConfiguration.hpp.

Constructor & Destructor Documentation

◆ MeshConfiguration()

precice::mesh::MeshConfiguration::MeshConfiguration ( xml::XMLTag & parent,
PtrDataConfiguration config )

Constructor, takes a valid data configuration as argument.

Definition at line 19 of file MeshConfiguration.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addMesh()

void precice::mesh::MeshConfiguration::addMesh ( const mesh::PtrMesh & mesh)

Definition at line 105 of file MeshConfiguration.cpp.

Here is the call graph for this function:

◆ addNeededMesh()

void precice::mesh::MeshConfiguration::addNeededMesh ( const std::string & participant,
const std::string & mesh )

Definition at line 150 of file MeshConfiguration.cpp.

Here is the call graph for this function:

◆ getDataConfiguration()

const PtrDataConfiguration & precice::mesh::MeshConfiguration::getDataConfiguration ( ) const

Definition at line 95 of file MeshConfiguration.cpp.

◆ getDataDimensions()

int precice::mesh::MeshConfiguration::getDataDimensions ( const std::string & meshName,
const Data::typeName typeName ) const
private

Get the number of dimensions that data values of this type (scalar/vector) have on this mesh.

Definition at line 172 of file MeshConfiguration.cpp.

◆ getJustInTimeMappingMesh()

mesh::PtrMesh precice::mesh::MeshConfiguration::getJustInTimeMappingMesh ( int dimension)
static

Definition at line 100 of file MeshConfiguration.cpp.

Here is the call graph for this function:

◆ getMesh()

mesh::PtrMesh precice::mesh::MeshConfiguration::getMesh ( const std::string & meshName) const

Returns the configured mesh with given name, or NULL.

Definition at line 139 of file MeshConfiguration.cpp.

◆ getNeededMeshes()

std::map< std::string, std::vector< std::string > > & precice::mesh::MeshConfiguration::getNeededMeshes ( )
inline

Definition at line 54 of file MeshConfiguration.hpp.

◆ hasMeshName()

bool precice::mesh::MeshConfiguration::hasMeshName ( const std::string & meshName) const

Returns whether Mesh has Data with the dataName.

Definition at line 131 of file MeshConfiguration.cpp.

Here is the call graph for this function:

◆ insertMeshToMeshDimensionsMap()

void precice::mesh::MeshConfiguration::insertMeshToMeshDimensionsMap ( const std::string & mesh,
int dimensions )

Initialize the map between meshes and dimensions, for unit tests that directly create mesh objects without going through the config reading.

Definition at line 164 of file MeshConfiguration.cpp.

◆ meshes() [1/2]

std::vector< PtrMesh > & precice::mesh::MeshConfiguration::meshes ( )

Returns all configured meshes.

Definition at line 126 of file MeshConfiguration.cpp.

◆ meshes() [2/2]

const std::vector< PtrMesh > & precice::mesh::MeshConfiguration::meshes ( ) const

Returns all configured meshes.

Definition at line 121 of file MeshConfiguration.cpp.

◆ xmlEndTagCallback()

void precice::mesh::MeshConfiguration::xmlEndTagCallback ( const xml::ConfigurationContext & context,
xml::XMLTag & callingTag )
overridevirtual

Callback at end of XML tag and at end of subtag.

At this callback, the attributes and all subtags of callingTag are parsed. This callback is first done for the listener, and then for the parent tag listener (if existing).

Implements precice::xml::XMLTag::Listener.

Definition at line 89 of file MeshConfiguration.cpp.

◆ xmlTagCallback()

void precice::mesh::MeshConfiguration::xmlTagCallback ( const xml::ConfigurationContext & context,
xml::XMLTag & callingTag )
overridevirtual

Callback at begin of XML tag.

At this callback, the attributes of the callingTag are already parsed and available, while the subtags are not yet parsed.

Implements precice::xml::XMLTag::Listener.

Definition at line 60 of file MeshConfiguration.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _dataConfig

PtrDataConfiguration precice::mesh::MeshConfiguration::_dataConfig
private

Data configuration.

Definition at line 79 of file MeshConfiguration.hpp.

◆ _dataIDManager

utils::ManageUniqueIDs precice::mesh::MeshConfiguration::_dataIDManager
private

Definition at line 92 of file MeshConfiguration.hpp.

◆ _log

logging::Logger precice::mesh::MeshConfiguration::_log {"mesh::MeshConfiguration"}
private

Definition at line 68 of file MeshConfiguration.hpp.

◆ _meshDimensionsMap

std::map<std::string, int> precice::mesh::MeshConfiguration::_meshDimensionsMap
private

Definition at line 76 of file MeshConfiguration.hpp.

◆ _meshes

std::vector<PtrMesh> precice::mesh::MeshConfiguration::_meshes
private

Configured meshes.

Definition at line 85 of file MeshConfiguration.hpp.

◆ _meshIdManager

utils::ManageUniqueIDs precice::mesh::MeshConfiguration::_meshIdManager
private

Definition at line 90 of file MeshConfiguration.hpp.

◆ _neededMeshes

std::map<std::string, std::vector<std::string> > precice::mesh::MeshConfiguration::_neededMeshes
private

to check later if all meshes that any coupling scheme needs are actually used by the participants

Definition at line 88 of file MeshConfiguration.hpp.

◆ ATTR_DIMENSIONS

const std::string precice::mesh::MeshConfiguration::ATTR_DIMENSIONS
private

Definition at line 72 of file MeshConfiguration.hpp.

◆ ATTR_NAME

const std::string precice::mesh::MeshConfiguration::ATTR_NAME
private

Definition at line 71 of file MeshConfiguration.hpp.

◆ ATTR_SIDE_INDEX

const std::string precice::mesh::MeshConfiguration::ATTR_SIDE_INDEX
private

Definition at line 74 of file MeshConfiguration.hpp.

◆ TAG

const std::string precice::mesh::MeshConfiguration::TAG
private

Definition at line 70 of file MeshConfiguration.hpp.

◆ TAG_DATA

const std::string precice::mesh::MeshConfiguration::TAG_DATA
private

Definition at line 73 of file MeshConfiguration.hpp.


The documentation for this class was generated from the following files: