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

Mapping with radial basis functions. More...

#include <RadialBasisFctBaseMapping.hpp>

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

Public Member Functions

 RadialBasisFctBaseMapping (Constraint constraint, int dimensions, const RADIAL_BASIS_FUNCTION_T &function, std::array< bool, 3 > deadAxis, InitialGuessRequirement mappingType)
 Constructor.
 
virtual ~RadialBasisFctBaseMapping ()=default
 
virtual void computeMapping ()=0
 Computes the mapping coefficients from the in- and output mesh.
 
virtual void clear ()=0
 Removes a computed mapping.
 
virtual void tagMeshFirstRound () final
 Method used by partition. Tags vertices that could be owned by this rank.
 
virtual void tagMeshSecondRound () final
 Method used by partition. Tags vertices that can be filtered out.
 
- Public Member Functions inherited from precice::mapping::Mapping
 Mapping (Constraint constraint, int dimensions, bool requiresGradientData, InitialGuessRequirement initialGuessRequirement)
 Constructor, takes mapping constraint.
 
Mappingoperator= (Mapping &&)=delete
 
virtual ~Mapping ()=default
 Destructor, empty.
 
void setMeshes (const mesh::PtrMesh &input, const mesh::PtrMesh &output)
 Sets input and output meshes carrying data to be mapped.
 
const mesh::PtrMeshgetInputMesh () const
 
const mesh::PtrMeshgetOutputMesh () const
 
Constraint getConstraint () const
 Returns the constraint (consistent/conservative) of the mapping.
 
MeshRequirement getInputRequirement () const
 Returns the requirement on the input mesh.
 
MeshRequirement getOutputRequirement () const
 Returns the requirement on the output mesh.
 
bool hasComputedMapping () const
 Returns true, if the mapping has been computed.
 
virtual bool hasConstraint (const Constraint &constraint) const
 Checks whether the mapping has the given constraint or not.
 
bool isScaledConsistent () const
 Returns true if mapping is a form of scaled consistent mapping.
 
bool requiresInitialGuess () const
 Return true if the mapping requires an initial guess.
 
const Eigen::VectorXd & initialGuess () const
 Return the provided initial guess of a mapping using an initialGuess.
 
Eigen::VectorXd & initialGuess ()
 
bool hasInitialGuess () const
 True if initialGuess().size() == 0.
 
void map (int inputDataID, int outputDataID)
 
void map (int inputDataID, int outputDataID, Eigen::VectorXd &initialGuess)
 
void map (const time::Sample &input, Eigen::VectorXd &output)
 Maps an input Sample to output data from input mesh to output mesh.
 
void map (const time::Sample &input, Eigen::VectorXd &output, Eigen::VectorXd &initialGuess)
 Maps an input Sample to output data from input mesh to output mesh, given an initialGuess.
 
virtual void scaleConsistentMapping (const Eigen::VectorXd &input, Eigen::VectorXd &output, Constraint type) const
 Scales the consistently mapped output data such that the surface integral of the values on input mesh and output mesh are equal.
 
bool requiresGradientData () const
 Returns whether the mapping requires gradient data.
 
virtual std::string getName () const =0
 Returns the name of the mapping method for logging purpose.
 

Protected Member Functions

int getPolynomialParameters () const
 Computes the number of polynomial degrees of freedom based on the problem dimension and the dead axis.
 
- Protected Member Functions inherited from precice::mapping::Mapping
mesh::PtrMesh input () const
 Returns pointer to input mesh.
 
mesh::PtrMesh output () const
 Returns pointer to output mesh.
 
void setInputRequirement (MeshRequirement requirement)
 Sets the mesh requirement for the input mesh.
 
void setOutputRequirement (MeshRequirement requirement)
 Sets the mesh requirement for the output mesh.
 
int getDimensions () const
 
virtual void mapConservative (const time::Sample &input, Eigen::VectorXd &output)=0
 Maps data using a conservative constraint.
 
virtual void mapConsistent (const time::Sample &input, Eigen::VectorXd &output)=0
 Maps data using a consistent constraint.
 

Protected Attributes

RADIAL_BASIS_FUNCTION_T _basisFunction
 Radial basis function type used in interpolation.
 
std::vector< bool > _deadAxis
 true if the mapping along some axis should be ignored
 
- Protected Attributes inherited from precice::mapping::Mapping
bool _hasComputedMapping = false
 Flag to indicate whether computeMapping() has been called.
 
bool _requiresGradientData
 Flag if gradient data is required for the mapping.
 

Private Member Functions

void setDeadAxis (std::array< bool, 3 > deadAxis)
 converts the boolean switches to a boolean vector
 

Private Attributes

precice::logging::Logger _log {"mapping::RadialBasisFctBaseMapping"}
 

Additional Inherited Members

- Public Types inherited from precice::mapping::Mapping
enum  Constraint { CONSISTENT , CONSERVATIVE , SCALED_CONSISTENT_SURFACE , SCALED_CONSISTENT_VOLUME }
 Specifies additional constraints for a mapping. More...
 
enum class  MeshRequirement { UNDEFINED = 0 , VERTEX = 1 , FULL = 2 }
 Specifies requirements for the input and output meshes of a mapping. More...
 
enum class  InitialGuessRequirement : bool { Required = true , None = false }
 Specifies whether the mapping requires an initial guess. More...
 

Detailed Description

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

Mapping with radial basis functions.

With help of the input data points and values an interpolant is constructed. The interpolant is formed by a weighted sum of conditionally positive radial basis functions and a (low order) polynomial, and evaluated at the output data points.

The radial basis function type has to be given as template parameter, and has to be one of the defined types in this file.

Definition at line 23 of file RadialBasisFctBaseMapping.hpp.

Constructor & Destructor Documentation

◆ RadialBasisFctBaseMapping()

template<typename RADIAL_BASIS_FUNCTION_T >
precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::RadialBasisFctBaseMapping ( Constraint constraint,
int dimensions,
const RADIAL_BASIS_FUNCTION_T & function,
std::array< bool, 3 > deadAxis,
InitialGuessRequirement mappingType )

Constructor.

Parameters
[in]constraintSpecifies mapping to be consistent or conservative.
[in]dimensionsDimensionality of the meshes
[in]functionRadial basis function used for mapping.
[in]xDead,yDead,zDeadDeactivates mapping along an axis

Definition at line 80 of file RadialBasisFctBaseMapping.hpp.

Here is the call graph for this function:

◆ ~RadialBasisFctBaseMapping()

template<typename RADIAL_BASIS_FUNCTION_T >
virtual precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::~RadialBasisFctBaseMapping ( )
virtualdefault

Member Function Documentation

◆ clear()

template<typename RADIAL_BASIS_FUNCTION_T >
virtual void precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::clear ( )
pure virtual

◆ computeMapping()

template<typename RADIAL_BASIS_FUNCTION_T >
virtual void precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::computeMapping ( )
pure virtual

Computes the mapping coefficients from the in- and output mesh.

Implements precice::mapping::Mapping.

Implemented in precice::mapping::PetRadialBasisFctMapping< RADIAL_BASIS_FUNCTION_T >, and precice::mapping::RadialBasisFctMapping< SOLVER_T, Args >.

◆ getPolynomialParameters()

template<typename RADIAL_BASIS_FUNCTION_T >
int precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::getPolynomialParameters ( ) const
protected

Computes the number of polynomial degrees of freedom based on the problem dimension and the dead axis.

Note
This function does not take the handling of the polynomial (ON, OFF, SEPARATE) into account.
Returns
int the polynomial degrees of freedom of the RBF system

Definition at line 111 of file RadialBasisFctBaseMapping.hpp.

Here is the call graph for this function:

◆ setDeadAxis()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::setDeadAxis ( std::array< bool, 3 > deadAxis)
private

converts the boolean switches to a boolean vector

Definition at line 100 of file RadialBasisFctBaseMapping.hpp.

Here is the call graph for this function:

◆ tagMeshFirstRound()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::tagMeshFirstRound ( )
finalvirtual

Method used by partition. Tags vertices that could be owned by this rank.

Implements precice::mapping::Mapping.

Definition at line 125 of file RadialBasisFctBaseMapping.hpp.

Here is the call graph for this function:

◆ tagMeshSecondRound()

template<typename RADIAL_BASIS_FUNCTION_T >
void precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::tagMeshSecondRound ( )
finalvirtual

Method used by partition. Tags vertices that can be filtered out.

Implements precice::mapping::Mapping.

Definition at line 158 of file RadialBasisFctBaseMapping.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ _basisFunction

template<typename RADIAL_BASIS_FUNCTION_T >
RADIAL_BASIS_FUNCTION_T precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::_basisFunction
protected

Radial basis function type used in interpolation.

Definition at line 56 of file RadialBasisFctBaseMapping.hpp.

◆ _deadAxis

template<typename RADIAL_BASIS_FUNCTION_T >
std::vector<bool> precice::mapping::RadialBasisFctBaseMapping< RADIAL_BASIS_FUNCTION_T >::_deadAxis
protected

true if the mapping along some axis should be ignored

Definition at line 59 of file RadialBasisFctBaseMapping.hpp.

◆ _log

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

Definition at line 71 of file RadialBasisFctBaseMapping.hpp.


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