preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T > Class Template Reference

#include <SphericalVertexCluster.hpp>

Collaboration diagram for precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >:
[legend]

Public Member Functions

 SphericalVertexCluster (mesh::Vertex center, double radius, RADIAL_BASIS_FUNCTION_T function, Polynomial polynomial, mesh::PtrMesh inputMesh, mesh::PtrMesh outputMesh)
 
void mapConservative (const time::Sample &inData, Eigen::VectorXd &outData) const
 Evaluates a conservative mapping and agglomerates the result in the given output data.
 
void mapConsistent (const time::Sample &inData, Eigen::VectorXd &outData) const
 Evaluates a consistent mapping and agglomerates the result in the given output data.
 
void setNormalizedWeight (double normalizedWeight, VertexID vertexID)
 Set the normalized weight for the given vertexID in the outputMesh.
 
double computeWeight (const mesh::Vertex &v) const
 Compute the weight for a given vertex.
 
unsigned int getNumberOfInputVertices () const
 Number of input vertices this partition operates on.
 
std::array< double, 3 > getCenterCoords () const
 The center coordinate of this cluster.
 
void clear ()
 Invalidates and erases data structures the cluster holds.
 
bool empty () const
 

Private Attributes

precice::logging::Logger _log {"mapping::SphericalVertexCluster"}
 logger, as usual
 
mesh::Vertex _center
 center vertex of the cluster
 
const double _radius
 radius of the vertex cluster
 
RadialBasisFctSolver< RADIAL_BASIS_FUNCTION_T > _rbfSolver
 The RBF solver.
 
boost::container::flat_set< VertexID_inputIDs
 Global VertexIDs associated to the input mesh (see constructor)
 
boost::container::flat_set< VertexID_outputIDs
 Global VertexIDs associated to the output mesh (see constructor)
 
Eigen::VectorXd _normalizedWeights
 
Polynomial _polynomial
 Polynomial treatment in the RBF solver.
 
CompactPolynomialC2 _weightingFunction
 The weighting function.
 
bool _hasComputedMapping = false
 Boolean switch in order to indicate that a mapping was computed.
 

Detailed Description

template<typename RADIAL_BASIS_FUNCTION_T>
class precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >

The SphericalVertexCluster represents a single partition in the partition of unity mapping. Hence, the PartitionOfUnity mapping class owns a vector of SphericalVertexClusters in order to compute the mapping. In its core, the class consists of a geometric center vertex and a radius representing the spherical shape of the partition. In order to compute an RBF interpolant, the class stores VertexIDs of the input mesh and the output mesh lying within the sphere and a RadialBasisFctSolver to assemble and solve mapping matrices. The solver class here is exactly the same class used in the plain RBF mapping. Since each cluster maps data within its domain, the class is required to have similar functions as the mapping classes in preCICE, i.e., mapConsistent and mapConservative for the mapping execution as well as clear for the reset. These functions are always called from the corresponding PartitionOfUnity mapping class, i.e., PartitionOfUnityMapping::mapConsistent calls the mapConsistent function of the (all elements in the cluster vector) cluster here.

Definition at line 35 of file SphericalVertexCluster.hpp.

Constructor & Destructor Documentation

◆ SphericalVertexCluster()

template<typename RADIAL_BASIS_FUNCTION_T >
precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::SphericalVertexCluster ( mesh::Vertex center,
double radius,
RADIAL_BASIS_FUNCTION_T function,
Polynomial polynomial,
mesh::PtrMesh inputMesh,
mesh::PtrMesh outputMesh )

The constructor uses the index RTree of the input mesh and output mesh in order to collect the vertexIDs of the input mesh and the output mesh lying within the spherical domain of the cluster. Note that the index trees of the meshes are constructed in case they are empty. If there are no input vertices or output verices in the given domain ( center and radius ), the cluster is considered empty ( see also empty() ) and the constructor returns immediately. If the cluster is non-empty, an RBF solver is constructed. The RBF solver assembles the mapping matrices and computes the matrix decomposition directly.

Parameters
[in]centerSpatial center of the vertex cluster
[in]radiusSpatial radius of the cluster associated to the center
[in]functionRadial basis function type used in interpolation
[in]polynomialThe polynomial treatment in the RBF system.
[in]inputMeshmesh where the interpolants are build on, i.e., the input mesh for consistent mappings and the output mesh for conservative mappings
[in]outputMeshmesh where we evaluate the interpolants, i.e., the output mesh consistent mappings and the input mesh for conservative mappings

Definition at line 128 of file SphericalVertexCluster.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ clear()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::clear ( )

Invalidates and erases data structures the cluster holds.

Definition at line 297 of file SphericalVertexCluster.hpp.

◆ computeWeight()

template<typename RADIAL_BASIS_FUNCTION_T >
double precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::computeWeight ( const mesh::Vertex & v) const

Compute the weight for a given vertex.

Definition at line 270 of file SphericalVertexCluster.hpp.

Here is the call graph for this function:

◆ empty()

template<typename RADIAL_BASIS_FUNCTION_T >
bool precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::empty ( ) const

Returns, whether the current cluster is empty or not, where empty means that there are either no input vertices or output vertices.

Definition at line 291 of file SphericalVertexCluster.hpp.

◆ getCenterCoords()

template<typename RADIAL_BASIS_FUNCTION_T >
std::array< double, 3 > precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::getCenterCoords ( ) const

The center coordinate of this cluster.

Definition at line 285 of file SphericalVertexCluster.hpp.

◆ getNumberOfInputVertices()

template<typename RADIAL_BASIS_FUNCTION_T >
unsigned int precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::getNumberOfInputVertices ( ) const

Number of input vertices this partition operates on.

Definition at line 279 of file SphericalVertexCluster.hpp.

◆ mapConservative()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::mapConservative ( const time::Sample & inData,
Eigen::VectorXd & outData ) const

Evaluates a conservative mapping and agglomerates the result in the given output data.

Definition at line 191 of file SphericalVertexCluster.hpp.

◆ mapConsistent()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::mapConsistent ( const time::Sample & inData,
Eigen::VectorXd & outData ) const

Evaluates a consistent mapping and agglomerates the result in the given output data.

Definition at line 231 of file SphericalVertexCluster.hpp.

◆ setNormalizedWeight()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::setNormalizedWeight ( double normalizedWeight,
VertexID vertexID )

Set the normalized weight for the given vertexID in the outputMesh.

Definition at line 174 of file SphericalVertexCluster.hpp.

Member Data Documentation

◆ _center

template<typename RADIAL_BASIS_FUNCTION_T >
mesh::Vertex precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_center
private

center vertex of the cluster

Definition at line 92 of file SphericalVertexCluster.hpp.

◆ _hasComputedMapping

template<typename RADIAL_BASIS_FUNCTION_T >
bool precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_hasComputedMapping = false
private

Boolean switch in order to indicate that a mapping was computed.

Definition at line 122 of file SphericalVertexCluster.hpp.

◆ _inputIDs

template<typename RADIAL_BASIS_FUNCTION_T >
boost::container::flat_set<VertexID> precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_inputIDs
private

Global VertexIDs associated to the input mesh (see constructor)

Definition at line 106 of file SphericalVertexCluster.hpp.

◆ _log

template<typename RADIAL_BASIS_FUNCTION_T >
precice::logging::Logger precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_log {"mapping::SphericalVertexCluster"}
private

logger, as usual

Definition at line 89 of file SphericalVertexCluster.hpp.

◆ _normalizedWeights

template<typename RADIAL_BASIS_FUNCTION_T >
Eigen::VectorXd precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_normalizedWeights
private

Vector containing the normalized weights used for the output mesh data (consistent mapping) or input mesh data (conservative data)

Definition at line 113 of file SphericalVertexCluster.hpp.

◆ _outputIDs

template<typename RADIAL_BASIS_FUNCTION_T >
boost::container::flat_set<VertexID> precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_outputIDs
private

Global VertexIDs associated to the output mesh (see constructor)

Definition at line 109 of file SphericalVertexCluster.hpp.

◆ _polynomial

template<typename RADIAL_BASIS_FUNCTION_T >
Polynomial precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_polynomial
private

Polynomial treatment in the RBF solver.

Definition at line 116 of file SphericalVertexCluster.hpp.

◆ _radius

template<typename RADIAL_BASIS_FUNCTION_T >
const double precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_radius
private

radius of the vertex cluster

Definition at line 95 of file SphericalVertexCluster.hpp.

◆ _rbfSolver

template<typename RADIAL_BASIS_FUNCTION_T >
RadialBasisFctSolver<RADIAL_BASIS_FUNCTION_T> precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_rbfSolver
private

The RBF solver.

Definition at line 98 of file SphericalVertexCluster.hpp.

◆ _weightingFunction

template<typename RADIAL_BASIS_FUNCTION_T >
CompactPolynomialC2 precice::mapping::SphericalVertexCluster< RADIAL_BASIS_FUNCTION_T >::_weightingFunction
private

The weighting function.

Definition at line 119 of file SphericalVertexCluster.hpp.


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