preCICE v3.2.0
Loading...
Searching...
No Matches
precice::impl::MeshContext Struct Reference

Stores a mesh and related objects and data. More...

#include <MeshContext.hpp>

Collaboration diagram for precice::impl::MeshContext:
[legend]

Public Member Functions

void require (mapping::Mapping::MeshRequirement requirement)
void checkVerticesInsideAccessRegion (precice::span< const double > coordinates, const int meshDim, std::string_view functionName) const
std::vector< std::reference_wrapper< const mesh::Vertex > > filterVerticesToLocalAccessRegion (bool requiresBB) const
void clearMappings ()

Public Attributes

mesh::PtrMesh mesh
 Mesh holding the geometry data structure.
mapping::Mapping::MeshRequirement meshRequirement = mapping::Mapping::MeshRequirement::UNDEFINED
 Determines which mesh type has to be provided by the accessor.
std::string receiveMeshFrom
 Name of participant that creates the mesh.
double safetyFactor = -1
 bounding box to speed up decomposition of received mesh is increased by this safety factor
bool allowDirectAccess = false
std::shared_ptr< mesh::BoundingBoxuserDefinedAccessRegion
bool provideMesh = false
 True, if accessor does create the mesh.
partition::ReceivedPartition::GeometricFilter geoFilter = partition::ReceivedPartition::GeometricFilter::UNDEFINED
 type of geometric filter
partition::PtrPartition partition
 Partition creating the parallel decomposition of the mesh.
std::vector< MappingContextfromMappingContexts
 Mappings used when mapping data from the mesh. Can be empty.
std::vector< MappingContexttoMappingContexts
 Mappings used when mapping data to the mesh. Can be empty.

Private Attributes

logging::Logger _log {"impl::MeshContext"}

Detailed Description

Stores a mesh and related objects and data.

Definition at line 15 of file MeshContext.hpp.

Member Function Documentation

◆ checkVerticesInsideAccessRegion()

void precice::impl::MeshContext::checkVerticesInsideAccessRegion ( precice::span< const double > coordinates,
const int meshDim,
std::string_view functionName ) const
inline

Checks, that all vertices are within the user-defined access region and throws an error if vertices are not. The function does not return the result to be able to log the actual outliers

Definition at line 85 of file MeshContext.hpp.

Here is the call graph for this function:

◆ clearMappings()

void precice::impl::MeshContext::clearMappings ( )
inline

Definition at line 66 of file MeshContext.hpp.

◆ filterVerticesToLocalAccessRegion()

std::vector< std::reference_wrapper< const mesh::Vertex > > precice::impl::MeshContext::filterVerticesToLocalAccessRegion ( bool requiresBB) const
inline

Definition at line 103 of file MeshContext.hpp.

Here is the call graph for this function:

◆ require()

void precice::impl::MeshContext::require ( mapping::Mapping::MeshRequirement requirement)
inline

Upgrades the mesh requirement to a more specific level.

Parameters
[in]requirementThe requirement to upgrade to.

Definition at line 80 of file MeshContext.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ _log

logging::Logger precice::impl::MeshContext::_log {"impl::MeshContext"}
mutableprivate

Definition at line 77 of file MeshContext.hpp.

◆ allowDirectAccess

bool precice::impl::MeshContext::allowDirectAccess = false

In case a mapping done by the solver is favored over a preCICE mapping, apply user-defined bounding-boxes.

Definition at line 35 of file MeshContext.hpp.

◆ fromMappingContexts

std::vector<MappingContext> precice::impl::MeshContext::fromMappingContexts

Mappings used when mapping data from the mesh. Can be empty.

Definition at line 54 of file MeshContext.hpp.

◆ geoFilter

type of geometric filter

Definition at line 48 of file MeshContext.hpp.

◆ mesh

mesh::PtrMesh precice::impl::MeshContext::mesh

Mesh holding the geometry data structure.

Definition at line 22 of file MeshContext.hpp.

◆ meshRequirement

Determines which mesh type has to be provided by the accessor.

Definition at line 25 of file MeshContext.hpp.

◆ partition

partition::PtrPartition precice::impl::MeshContext::partition

Partition creating the parallel decomposition of the mesh.

Definition at line 51 of file MeshContext.hpp.

◆ provideMesh

bool precice::impl::MeshContext::provideMesh = false

True, if accessor does create the mesh.

Definition at line 45 of file MeshContext.hpp.

◆ receiveMeshFrom

std::string precice::impl::MeshContext::receiveMeshFrom

Name of participant that creates the mesh.

Definition at line 28 of file MeshContext.hpp.

◆ safetyFactor

double precice::impl::MeshContext::safetyFactor = -1

bounding box to speed up decomposition of received mesh is increased by this safety factor

Definition at line 31 of file MeshContext.hpp.

◆ toMappingContexts

std::vector<MappingContext> precice::impl::MeshContext::toMappingContexts

Mappings used when mapping data to the mesh. Can be empty.

Definition at line 57 of file MeshContext.hpp.

◆ userDefinedAccessRegion

std::shared_ptr<mesh::BoundingBox> precice::impl::MeshContext::userDefinedAccessRegion

setMeshAccessRegion may only be called once per mesh(context). putting this into the mesh context means that we can only call this once, regardless of combinations with just-in-time mappings or multiple such mappings. If multiples are desired, we would need to shift this into the MappingContext

Definition at line 42 of file MeshContext.hpp.


The documentation for this struct was generated from the following file: