preCICE v3.1.2
Loading...
Searching...
No Matches
Polation.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <iosfwd>
4#include <vector>
5#include "Eigen/Core"
6#include "mesh/Edge.hpp"
8#include "mesh/Triangle.hpp"
9#include "mesh/Vertex.hpp"
10
11namespace precice {
12namespace mapping {
13
17 double weight;
18};
19
24class Polation {
25public:
27 Polation(const Eigen::VectorXd &location, const mesh::Vertex &element);
28
30 Polation(const Eigen::VectorXd &location, const mesh::Edge &element);
31
33 Polation(const Eigen::VectorXd &location, const mesh::Triangle &element);
34
36 Polation(const Eigen::VectorXd &location, const mesh::Tetrahedron &element);
37
40
42 bool isInterpolation() const;
43
45 double distance() const;
46
47private:
49 double _distance;
50};
51
54
57
58} // namespace mapping
59} // namespace precice
Calculates the barycentric coordinates of a coordinate on the given vertex/edge/triangle and stores t...
Definition Polation.hpp:24
std::vector< WeightedElement > _weightedElements
Definition Polation.hpp:48
bool isInterpolation() const
Check whether all the weights are positive, which means it is interpolation.
Definition Polation.cpp:86
Polation(const Eigen::VectorXd &location, const mesh::Vertex &element)
Calculate projection to a vertex. Weight is always 1.0.
Definition Polation.cpp:8
double distance() const
Returns the projection distance.
Definition Polation.cpp:91
const std::vector< WeightedElement > & getWeightedElements() const
Get the weights and indices of the calculated interpolation.
Definition Polation.cpp:81
Linear edge of a mesh, defined by two Vertex objects.
Definition Edge.hpp:16
Tetrahedron of a mesh, defined by 4 vertices.
Triangle of a mesh, defined by three vertices.
Definition Triangle.hpp:27
Vertex of a mesh.
Definition Vertex.hpp:16
std::ostream & operator<<(std::ostream &out, Mapping::MeshRequirement val)
Definition Mapping.cpp:275
Main namespace of the precice library.
Struct that contains weight and index of a vertex.
Definition Polation.hpp:15