130 void map(
int inputDataID,
int outputDataID);
132 void map(
int inputDataID,
int outputDataID, Eigen::VectorXd &
initialGuess);
Abstract base class for mapping of data from one mesh to another.
bool requiresInitialGuess() const
Return true if the mapping requires an initial guess.
mesh::PtrMesh output() const
Returns pointer to output mesh.
Eigen::VectorXd & initialGuess()
virtual void tagMeshSecondRound()=0
Method used by partition. Tags vertices that can be filtered out.
Mapping & operator=(Mapping &&)=delete
Constraint _constraint
Determines whether mapping is consistent or conservative.
mesh::PtrMesh _input
Pointer to input mesh.
virtual void mapConsistent(const time::Sample &input, Eigen::VectorXd &output)=0
Maps data using a consistent constraint.
MeshRequirement
Specifies requirements for the input and output meshes of a mapping.
Constraint
Specifies additional constraints for a mapping.
@ SCALED_CONSISTENT_VOLUME
@ SCALED_CONSISTENT_SURFACE
Eigen::VectorXd * _initialGuess
Pointer to the initialGuess set and unset by map.
int getDimensions() const
InitialGuessRequirement _initialGuessRequirement
The InitialGuessRequirement of the Mapping.
virtual void clear()=0
Removes a computed mapping.
void setMeshes(const mesh::PtrMesh &input, const mesh::PtrMesh &output)
Sets input and output meshes carrying data to be mapped.
Mapping(Constraint constraint, int dimensions, bool requiresGradientData, InitialGuessRequirement initialGuessRequirement)
Constructor, takes mapping constraint.
mesh::PtrMesh input() const
Returns pointer to input mesh.
bool _hasComputedMapping
Flag to indicate whether computeMapping() has been called.
Constraint getConstraint() const
Returns the constraint (consistent/conservative) of the mapping.
bool isScaledConsistent() const
Returns true if mapping is a form of scaled consistent mapping.
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...
void setInputRequirement(MeshRequirement requirement)
Sets the mesh requirement for the input mesh.
bool hasInitialGuess() const
True if initialGuess().size() == 0.
mesh::PtrMesh _output
Pointer to output mesh.
bool requiresGradientData() const
Returns whether the mapping requires gradient data.
virtual void tagMeshFirstRound()=0
Method used by partition. Tags vertices that could be owned by this rank.
MeshRequirement _inputRequirement
Requirement on input mesh.
virtual std::string getName() const =0
Returns the name of the mapping method for logging purpose.
virtual void mapConservative(const time::Sample &input, Eigen::VectorXd &output)=0
Maps data using a conservative constraint.
virtual void computeMapping()=0
Computes the mapping coefficients from the in- and output mesh.
MeshRequirement _outputRequirement
Requirement on output mesh.
const mesh::PtrMesh & getOutputMesh() const
void setOutputRequirement(MeshRequirement requirement)
Sets the mesh requirement for the output mesh.
bool hasComputedMapping() const
Returns true, if the mapping has been computed.
void map(int inputDataID, int outputDataID)
MeshRequirement getInputRequirement() const
Returns the requirement on the input mesh.
virtual ~Mapping()=default
Destructor, empty.
const mesh::PtrMesh & getInputMesh() const
MeshRequirement getOutputRequirement() const
Returns the requirement on the output mesh.
virtual bool hasConstraint(const Constraint &constraint) const
Checks whether the mapping has the given constraint or not.
InitialGuessRequirement
Specifies whether the mapping requires an initial guess.
bool _requiresGradientData
Flag if gradient data is required for the mapping.
bool operator<(Mapping::MeshRequirement lhs, Mapping::MeshRequirement rhs)
std::ostream & operator<<(std::ostream &out, Mapping::MeshRequirement val)
Main namespace of the precice library.