preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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.
 
virtual void xmlTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
 Callback at begin of XML tag.
 
virtual void xmlEndTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
 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)
 
std::unique_ptr< utils::ManageUniqueIDsextractMeshIdManager ()
 
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 ()
 

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
 
std::unique_ptr< utils::ManageUniqueIDs_meshIdManager
 
utils::ManageUniqueIDs _dataIDManager
 

Detailed Description

Definition at line 26 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 102 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 147 of file MeshConfiguration.cpp.

Here is the call graph for this function:

◆ extractMeshIdManager()

std::unique_ptr< utils::ManageUniqueIDs > precice::mesh::MeshConfiguration::extractMeshIdManager ( )
inline

Definition at line 64 of file MeshConfiguration.hpp.

◆ getDataConfiguration()

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

Definition at line 97 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 169 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 136 of file MeshConfiguration.cpp.

◆ getNeededMeshes()

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

Definition at line 55 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 128 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 161 of file MeshConfiguration.cpp.

Here is the call graph for this function:

◆ meshes() [1/2]

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

Returns all configured meshes.

Definition at line 123 of file MeshConfiguration.cpp.

◆ meshes() [2/2]

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

Returns all configured meshes.

Definition at line 118 of file MeshConfiguration.cpp.

◆ xmlEndTagCallback()

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

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 91 of file MeshConfiguration.cpp.

◆ xmlTagCallback()

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

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 61 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 85 of file MeshConfiguration.hpp.

◆ _dataIDManager

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

Definition at line 98 of file MeshConfiguration.hpp.

◆ _log

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

Definition at line 74 of file MeshConfiguration.hpp.

◆ _meshDimensionsMap

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

Definition at line 82 of file MeshConfiguration.hpp.

◆ _meshes

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

Configured meshes.

Definition at line 91 of file MeshConfiguration.hpp.

◆ _meshIdManager

std::unique_ptr<utils::ManageUniqueIDs> precice::mesh::MeshConfiguration::_meshIdManager
private

Definition at line 96 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 94 of file MeshConfiguration.hpp.

◆ ATTR_DIMENSIONS

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

Definition at line 78 of file MeshConfiguration.hpp.

◆ ATTR_NAME

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

Definition at line 77 of file MeshConfiguration.hpp.

◆ ATTR_SIDE_INDEX

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

Definition at line 80 of file MeshConfiguration.hpp.

◆ TAG

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

Definition at line 76 of file MeshConfiguration.hpp.

◆ TAG_DATA

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

Definition at line 79 of file MeshConfiguration.hpp.


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