preCICE v3.1.1
Loading...
Searching...
No Matches
NearestNeighborGradientMapping.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5#include "logging/Logger.hpp"
7
8namespace precice {
9namespace mapping {
10
13public:
20 NearestNeighborGradientMapping(Constraint constraint, int dimensions);
21
23 void onMappingComputed(mesh::PtrMesh origins, mesh::PtrMesh searchSpace) final override;
24
26 std::string getName() const final override;
27
28protected:
30 void mapConservative(const time::Sample &inData, Eigen::VectorXd &outData) final override;
31
33 void mapConsistent(const time::Sample &inData, Eigen::VectorXd &outData) final override;
34};
35
36} // namespace mapping
37} // namespace precice
Constraint
Specifies additional constraints for a mapping.
Definition Mapping.hpp:29
Mapping using nearest neighboring vertices and their local gradient values.
NearestNeighborGradientMapping(Constraint constraint, int dimensions)
Constructor.
void mapConservative(const time::Sample &inData, Eigen::VectorXd &outData) final override
Maps data using a conservative constraint.
void onMappingComputed(mesh::PtrMesh origins, mesh::PtrMesh searchSpace) final override
Calculates the offsets needed for the gradient mappings after calculating the matched vertices.
void mapConsistent(const time::Sample &inData, Eigen::VectorXd &outData) final override
Maps data using a consistent constraint.
std::string getName() const final override
name of the nng mapping
Main namespace of the precice library.