preCICE v3.1.2
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
precice::mapping::AxialGeoMultiscaleMapping Class Reference

Geometric multiscale mapping in axial direction. More...

#include <AxialGeoMultiscaleMapping.hpp>

Inheritance diagram for precice::mapping::AxialGeoMultiscaleMapping:
[legend]
Collaboration diagram for precice::mapping::AxialGeoMultiscaleMapping:
[legend]

Public Types

enum struct  MultiscaleType { SPREAD , COLLECT }
 Geometric multiscale nature of the mapping (spread or collect). More...
 
enum struct  MultiscaleAxis { X = 0 , Y = 1 , Z = 2 }
 
- 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...
 

Public Member Functions

 AxialGeoMultiscaleMapping (Constraint constraint, int dimensions, MultiscaleType type, MultiscaleAxis axis, double radius)
 Constructor.
 
void computeMapping () override
 Takes care of compute-heavy operations needed only once to set up the mapping.
 
void clear () override
 Removes a computed mapping.
 
void tagMeshFirstRound () override
 Method used by partition. Tags vertices that could be owned by this rank.
 
void tagMeshSecondRound () override
 Method used by partition. Tags vertices that can be filtered out.
 
std::string getName () const final override
 Returns name of the mapping.
 
- 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.
 

Protected Member Functions

void mapConservative (const time::Sample &inData, Eigen::VectorXd &outData) override
 Maps data using a conservative constraint.
 
void mapConsistent (const time::Sample &inData, Eigen::VectorXd &outData) override
 Maps data using a consistent constraint.
 
- 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
 

Private Attributes

logging::Logger _log {"mapping::AxialGeoMultiscaleMapping"}
 
MultiscaleType _type
 type of mapping, namely spread or collect
 
MultiscaleAxis _axis
 main axis along which axial geometric multiscale coupling happens
 
double _radius
 radius of the "tube" from or to which the data is mapped, i.e., radius of the circular interface between the two participants
 
std::vector< double > _vertexDistances
 computed vertex distances to map data from input vertex to output vertices
 

Additional Inherited Members

- 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.
 

Detailed Description

Geometric multiscale mapping in axial direction.

Definition at line 11 of file AxialGeoMultiscaleMapping.hpp.

Member Enumeration Documentation

◆ MultiscaleAxis

Enumerator

Definition at line 23 of file AxialGeoMultiscaleMapping.hpp.

◆ MultiscaleType

Geometric multiscale nature of the mapping (spread or collect).

A geometric multiscale mapping can either go from the 1D to the 2D/3D solver. Then, we call it "spread". Or from the 2D/3D to the 1D solver, which we call "collect".

Enumerator
SPREAD 
COLLECT 

Definition at line 19 of file AxialGeoMultiscaleMapping.hpp.

Constructor & Destructor Documentation

◆ AxialGeoMultiscaleMapping()

precice::mapping::AxialGeoMultiscaleMapping::AxialGeoMultiscaleMapping ( Constraint constraint,
int dimensions,
MultiscaleType type,
MultiscaleAxis axis,
double radius )

Constructor.

Parameters
[in]constraintSpecifies mapping to be consistent or conservative.
[in]dimensionsDimensionality of the meshes
[in]typeGeometric multiscale type of the mapping
[in]axisMain axis along which axial geometric multiscale coupling happens
[in]radiusRadius of the 1D solver "tube"

Definition at line 7 of file AxialGeoMultiscaleMapping.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void precice::mapping::AxialGeoMultiscaleMapping::clear ( )
overridevirtual

Removes a computed mapping.

Implements precice::mapping::Mapping.

Definition at line 80 of file AxialGeoMultiscaleMapping.cpp.

Here is the call graph for this function:

◆ computeMapping()

void precice::mapping::AxialGeoMultiscaleMapping::computeMapping ( )
overridevirtual

Takes care of compute-heavy operations needed only once to set up the mapping.

Implements precice::mapping::Mapping.

Definition at line 22 of file AxialGeoMultiscaleMapping.cpp.

Here is the call graph for this function:

◆ getName()

std::string precice::mapping::AxialGeoMultiscaleMapping::getName ( ) const
finaloverridevirtual

Returns name of the mapping.

Implements precice::mapping::Mapping.

Definition at line 176 of file AxialGeoMultiscaleMapping.cpp.

◆ mapConservative()

void precice::mapping::AxialGeoMultiscaleMapping::mapConservative ( const time::Sample & inData,
Eigen::VectorXd & outData )
overrideprotectedvirtual

Maps data using a conservative constraint.

Parameters
[in]inputSample to map data from
[in]outputValues to map to

If requiresInitialGuess(), then the initial guess is available via initialGuess(). Provide a new initial guess by overwriting it. The mapping has full control over its size.

See also
For mappings requiring an initialGuess: initialGuess() hasInitialGuess()

Implements precice::mapping::Mapping.

Definition at line 87 of file AxialGeoMultiscaleMapping.cpp.

Here is the call graph for this function:

◆ mapConsistent()

void precice::mapping::AxialGeoMultiscaleMapping::mapConsistent ( const time::Sample & inData,
Eigen::VectorXd & outData )
overrideprotectedvirtual

Maps data using a consistent constraint.

Parameters
[in]inputSample to map data from
[in]outputValues to map to

If requiresInitialGuess(), then the initial guess is available via initialGuess(). Provide a new initial guess by overwriting it. The mapping has full control over its size.

See also
For mappings requiring an initialGuess: initialGuess() hasInitialGuess()

Implements precice::mapping::Mapping.

Definition at line 94 of file AxialGeoMultiscaleMapping.cpp.

Here is the call graph for this function:

◆ tagMeshFirstRound()

void precice::mapping::AxialGeoMultiscaleMapping::tagMeshFirstRound ( )
overridevirtual

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

Implements precice::mapping::Mapping.

Definition at line 150 of file AxialGeoMultiscaleMapping.cpp.

Here is the call graph for this function:

◆ tagMeshSecondRound()

void precice::mapping::AxialGeoMultiscaleMapping::tagMeshSecondRound ( )
overridevirtual

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

Implements precice::mapping::Mapping.

Definition at line 170 of file AxialGeoMultiscaleMapping.cpp.

Member Data Documentation

◆ _axis

MultiscaleAxis precice::mapping::AxialGeoMultiscaleMapping::_axis
private

main axis along which axial geometric multiscale coupling happens

Definition at line 66 of file AxialGeoMultiscaleMapping.hpp.

◆ _log

logging::Logger precice::mapping::AxialGeoMultiscaleMapping::_log {"mapping::AxialGeoMultiscaleMapping"}
mutableprivate

Definition at line 60 of file AxialGeoMultiscaleMapping.hpp.

◆ _radius

double precice::mapping::AxialGeoMultiscaleMapping::_radius
private

radius of the "tube" from or to which the data is mapped, i.e., radius of the circular interface between the two participants

Definition at line 69 of file AxialGeoMultiscaleMapping.hpp.

◆ _type

MultiscaleType precice::mapping::AxialGeoMultiscaleMapping::_type
private

type of mapping, namely spread or collect

Definition at line 63 of file AxialGeoMultiscaleMapping.hpp.

◆ _vertexDistances

std::vector<double> precice::mapping::AxialGeoMultiscaleMapping::_vertexDistances
private

computed vertex distances to map data from input vertex to output vertices

Definition at line 72 of file AxialGeoMultiscaleMapping.hpp.


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