11 #ifndef BEMBEL_SRC_CLUSTERTREE_CLUSTERTREE_HPP_
12 #define BEMBEL_SRC_CLUSTERTREE_CLUSTERTREE_HPP_
107 const Eigen::MatrixXd&
get_points()
const {
return points_; }
139 std::vector<Eigen::Vector2d> edge_midpoints = {
140 Eigen::Vector2d(Constants::edgemps[0][0], Constants::edgemps[1][0]),
141 Eigen::Vector2d(Constants::edgemps[0][1], Constants::edgemps[1][1]),
142 Eigen::Vector2d(Constants::edgemps[0][2], Constants::edgemps[1][2]),
143 Eigen::Vector2d(Constants::edgemps[0][3], Constants::edgemps[1][3])
146 for (
auto edge : edges) {
147 if (edge[2] > 0 && edge[3] > 0) {
148 Eigen::Vector3d a = geo[edge[0]].eval(edge_midpoints[edge[2]]);
149 Eigen::Vector3d b = geo[edge[1]].eval(edge_midpoints[edge[3]]);
150 Eigen::Vector3d na = geo[edge[0]].evalNormal(edge_midpoints[edge[2]]);
151 Eigen::Vector3d nb = geo[edge[1]].evalNormal(edge_midpoints[edge[3]]);
152 assert((a - b).norm() < Constants::pt_comp_tolerance &&
153 "These points should coincide according to the element tree");
154 assert(a.dot(b) > 0 &&
155 "Normals across patches are oriented the same way");
165 Eigen::MatrixXd points_;
The ClusterTree class introduces an element structure on a Geometry object. Note that we do not intro...
const Eigen::MatrixXd & get_points() const
Return point list with coordinates.
ClusterTree(ClusterTree &&other)=delete
Move constructor (deleted).
ClusterTree(const Geometry &geom, int M)
Constructs a ClusterTree object for a given refinement level.
ClusterTree(const ClusterTree &other)=delete
Copy constructor (deleted).
void init_ClusterTree(const Geometry &geom, int M)
init
ClusterTree & operator=(ClusterTree &&other)=delete
Move assignment operator (deleted).
const ElementTree & get_element_tree() const
Return const reference to the ElementTree.
const PatchVector & get_geometry() const
Return const reference to the Geometry.
ElementTree & get_element_tree()
getter
int get_max_level() const
Return maximum level of refinement.
void checkOrientation()
member functions
int get_number_of_elements() const
Return number of elements in the ElementTree.
ClusterTree()
constructors
ClusterTree & operator=(const ClusterTree &other)=delete
Copy assignment operator (deleted).
This class organizes an element structure on a Geometry object and handles refinement.
Eigen::MatrixXd computeElementEnclosings()
Computes enclosing balls surrounding all elements.
std::vector< std::array< int, 4 > > patchTopologyInfo() const
Resolves neighborhood relations of the patches.
void init_ElementTree(const Geometry &g, unsigned int max_level)
init
int get_number_of_elements() const
Return number of elements in the ElementTree.
const PatchVector & get_geometry() const
Return const reference to the Geometry.
int get_max_level() const
Return maximum level of refinement.
this class wraps a GeometryVector and provides some basic functionality, like reading Geometry files
std::vector< Bembel::Patch > PatchVector
typedef for PatchVector
Routines for the evalutation of pointwise errors.