preCICE v3.1.2
Loading...
Searching...
No Matches
AxialGeoMultiscaleMapping.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include "logging/Logger.hpp"
5#include "mapping/Mapping.hpp"
6
7namespace precice {
8namespace mapping {
9
12public:
19 enum struct MultiscaleType {
20 SPREAD,
22 };
23 enum struct MultiscaleAxis {
24 X = 0,
25 Y = 1,
26 Z = 2
27 };
28
38 AxialGeoMultiscaleMapping(Constraint constraint, int dimensions, MultiscaleType type, MultiscaleAxis axis, double radius);
39
41 void computeMapping() override;
42
44 void clear() override;
45
46 void tagMeshFirstRound() override;
47 void tagMeshSecondRound() override;
48
50 std::string getName() const final override;
51
52protected:
54 void mapConservative(const time::Sample &inData, Eigen::VectorXd &outData) override;
55
57 void mapConsistent(const time::Sample &inData, Eigen::VectorXd &outData) override;
58
59private:
60 mutable logging::Logger _log{"mapping::AxialGeoMultiscaleMapping"};
61
64
67
69 double _radius;
70
73};
74
75} // namespace mapping
76} // namespace precice
Geometric multiscale mapping in axial direction.
void mapConservative(const time::Sample &inData, Eigen::VectorXd &outData) override
Maps data using a conservative constraint.
double _radius
radius of the "tube" from or to which the data is mapped, i.e., radius of the circular interface betw...
MultiscaleType
Geometric multiscale nature of the mapping (spread or collect).
std::string getName() const final override
Returns name of the mapping.
AxialGeoMultiscaleMapping(Constraint constraint, int dimensions, MultiscaleType type, MultiscaleAxis axis, double radius)
Constructor.
MultiscaleAxis _axis
main axis along which axial geometric multiscale coupling happens
void tagMeshSecondRound() override
Method used by partition. Tags vertices that can be filtered out.
void tagMeshFirstRound() override
Method used by partition. Tags vertices that could be owned by this rank.
void computeMapping() override
Takes care of compute-heavy operations needed only once to set up the mapping.
void clear() override
Removes a computed mapping.
MultiscaleType _type
type of mapping, namely spread or collect
std::vector< double > _vertexDistances
computed vertex distances to map data from input vertex to output vertices
void mapConsistent(const time::Sample &inData, Eigen::VectorXd &outData) override
Maps data using a consistent constraint.
Abstract base class for mapping of data from one mesh to another.
Definition Mapping.hpp:15
Constraint
Specifies additional constraints for a mapping.
Definition Mapping.hpp:29
Main namespace of the precice library.