Defines various shapes and domain discretization procedures. More...
Classes | |
class | mm::BallShape< vec_t > |
Class for working with ball shaped domains. More... | |
class | mm::BasicRelax |
Redistributes nodes towards more uniform distribution by minimizing potential between nodes. More... | |
class | mm::BoxShape< vec_t > |
Class for working with box shaped domains. More... | |
struct | mm::discretization_helpers::SphereDiscretization< scalar_t, dim > |
Discretizes a sphere with given radius uniformly with num_points points on the great circle. More... | |
class | mm::DomainDiscretization< vec_t > |
Class representing domain discretization along with an associated shape. More... | |
class | mm::DomainShape< vec_t > |
Base class for geometric shapes of domains. More... | |
class | mm::FindBalancedSupport |
Class representing the engine for finding directionally balanced supports. More... | |
class | mm::FindClosest |
Class representing the engine for finding supports consisting of closest nodes. More... | |
class | mm::GeneralFill< vec_t > |
Implements general n -d node placing algorithm, as described in https://arxiv.org/abs/1812.03160 If you specifically use this algorithm, we would appreciate if you cite the above publication. More... | |
class | mm::GeneralSurfaceFill< vec_t, param_vec_t > |
Implements general n -d node placing algorithm for parametrically given d -d surfaces, as described in https://arxiv.org/abs/2005.08767. More... | |
class | mm::GrainDropFill< vec_t > |
Implements general n -d node placing algorithm, as described in https://arxiv.org/abs/1906.00636 This node generation algorithm simulates dropping grains with variable radius in a box. More... | |
class | mm::GridFill< vec_t > |
Discretizes the domain using n -dimensional grid with given endpoints and spacing h . More... | |
class | mm::HalfLinksRefine |
Refine a region of nodes region by connecting every node in region to its support domain and generating new nodes at half distances. More... | |
class | mm::NURBSPatch< vec_t, param_vec_t > |
Class representing a single NURBS patch in an arbitrary dimensional space, defined on an arbitrary dimensional domain and generated by a tensor product of NURBS curves. More... | |
class | mm::NURBSShape< vec_t, param_vec_t > |
Class representing a shape made out of NURBS patches in an arbitrary dimensional space. More... | |
class | mm::PolygonShape< vec_t > |
Shape representing a simple (i.e. non self intersecting) nonempty polygon in 2D, which is given as a sequence of points. More... | |
class | mm::PolyhedronShape< vec_t > |
A polyhedron represented by a closed triangular mesh. More... | |
class | mm::PolytopeShape< vec_t > |
Shape representing a simple nonempty polytope (i.e., non-self intersecting polygon in 2D and polyhedron in 3D.). More... | |
class | mm::RotatedShape< vec_t > |
Class for working with rotated (or mirrored) domain shapes. More... | |
class | mm::ShapeDifference< vec_t > |
A class representing a set-difference of two shapes. More... | |
class | mm::ShapeUnion< vec_t > |
Class representing a union of two shapes. More... | |
class | mm::STLShape< vec_t > |
Class representing an object given by the STL file. More... | |
class | mm::TranslatedShape< vec_t > |
Class for working with translated domain shapes. More... | |
class | mm::UnknownShape< vec_t > |
This class represents an unknown domain shape. More... | |
Functions | |
template<typename scalar_t , int dim_from, int dim_to> | |
Vec< scalar_t, dim_to > | mm::surface_fill_internal::compute_normal (Eigen::Matrix< scalar_t, dim_to, dim_from > J) |
Compute normal from given Jacobian. More... | |
template<typename vec_t , typename func_t > | |
Range< vec_t > | mm::discretization_helpers::discretizeLineWithDensity (const vec_t &p, const vec_t &q, const func_t &delta_r) |
Returns nodes lying on the line segment pq with approximate distances delta_r . More... | |
template<typename vec_t , typename func_t > | |
Range< vec_t > | mm::discretization_helpers::discretizeTriangleWithDensity (const vec_t &p1, const vec_t &p2, const vec_t &p3, const vec_t &normal, const func_t &h, bool only_interior=true) |
Discretize a triangle in 3D space with given density. More... | |
Defines various shapes and domain discretization procedures.
We separated the computation domain into two parts, its analytical description, which is called DomainShape and its discretization, called DomainDiscretization.
Some basic domain shapes are added, as well as support for set-theoretic operations between them. They are usually dimension independent and can be assembled into decently complex structures for demonstration purposes.
Support for 3D polytopes and proper CAD designs is intended. Additionally, we can import discretizations from HDF5 files.
Once domain shape has been constructed, it can be discretized. Domain discretization contains nodes, their types and normals for boundary nodes. Types are positive for internal nodes and negative for boundary nodes.
Domain discretizations can also be constructed using fill engines, improved via iterative methods and refined. Some stencil selection algorithms are supported as well.
Vec<scalar_t, dim_to> mm::surface_fill_internal::compute_normal | ( | Eigen::Matrix< scalar_t, dim_to, dim_from > | J | ) |
Compute normal from given Jacobian.
scalar_t | Numeric scalar type, e.g. double or float . |
dim_from | Parametric domain dimension. |
dim_to | Target domain dimension. |
J | dim_to x dim_from Jacobi matrix, which must have full rank. |
n
, such that it is orthogonal to all columns of J
and that the determinant of [J n]
is negative. This corresponds to the right-hand side 90 deg rotation in 2d and the negative cross product in 3d. If dim_to == dim_from+1
this uniquely defines the normal.Range<vec_t> mm::discretization_helpers::discretizeLineWithDensity | ( | const vec_t & | p, |
const vec_t & | q, | ||
const func_t & | delta_r | ||
) |
Returns nodes lying on the line segment pq
with approximate distances delta_r
.
Boundary point are not included in return set, but are included in the spacing. The last discretization point almost never falls on point q, but before it, and we decide on whether to include it or not, based on whether spacing at q
is more violated with including the point or without.
delta_r
with last and first point (i.e. p
and q
) excluded.Definition at line 35 of file discretization_helpers.hpp.
Range<vec_t> mm::discretization_helpers::discretizeTriangleWithDensity | ( | const vec_t & | p1, |
const vec_t & | p2, | ||
const vec_t & | p3, | ||
const vec_t & | normal, | ||
const func_t & | h, | ||
bool | only_interior = true |
||
) |
Discretize a triangle in 3D space with given density.
The orientation of the triangle is not important. The triangle is discretized by first discretizing the boundary and filling the interior with a GeneralFill.
vec_t | Must be a three-dimensional vector type. |
p1 | First point. |
p2 | Second point. |
p3 | Third point. |
normal | Unit normal vector of the plane defined by the triangle. |
h | Spacing function. |
only_interior | If true, only the points in the interior are returned, otherwise, boundary discretization points are returned as well. |
Definition at line 45 of file discretization_helpers_advanced.hpp.