#include <DomainDiscretization_fwd.hpp>
Class representing domain discretization along with an associated shape.
Domain discretization consists of points in the interior and on the boundary. Each point has an associated type, with types of internal points being positive and types of boundary points being negative. Boundary points also have an outer unit normal normal associated with them.
Domains can be added and subtracted, nodes can be added and removed (removal currently at O(N) cost). Support / stencil indices can be stored and accessed.
Additionally, domain interiors can be filled, regularized and used when computing shapes.
Usage example:
Definition at line 46 of file DomainDiscretization_fwd.hpp.
Public Member Functions | |
DomainDiscretization (const DomainShape< vec_t > &shape) | |
Construct an empty discretization for a given shape. More... | |
const Range< vec_t > & | positions () const |
Returns positions of all nodes. More... | |
const vec_t & | pos (int i) const |
Returns the position of i -th node. More... | |
vec_t & | pos (int i) |
Returns writeable position of i -th node. More... | |
scalar_t | pos (int i, int j) const |
Returns j -th coordinate of the position of i -th node. More... | |
const Range< Range< int > > & | supports () const |
Returns support indices for all nodes. More... | |
const Range< int > & | support (int i) const |
Returns support indices for i -th node. More... | |
Range< int > & | support (int i) |
Returns writeable array of support indices for i -th node. More... | |
int | support (int i, int j) const |
Returns j -th support node of i -th node. More... | |
Range< vec_t > | supportNodes (int i) const |
Returns positions of support nodes of i -th node. More... | |
vec_t | supportNode (int i, int j) const |
Returns position of j -th support node of i -th node. More... | |
scalar_t | dr (int i) const |
Returns Euclidean distance to the second support node. More... | |
int | supportSize (int i) const |
Returns size of i -th node support. More... | |
Range< int > | supportSizes () const |
Returns a vector of support sizes for each node. More... | |
const Range< int > & | types () const |
Returns types of all nodes. More... | |
Range< int > & | types () |
Returns mutable types of all nodes. More... | |
int | type (int i) const |
Returns type of i -th node. More... | |
int & | type (int i) |
Returns writeable type of i -th node. More... | |
const DomainShape< vec_t > & | shape () const |
Returns geometric shape of the underlying domain. More... | |
const Range< int > & | bmap () const |
Returns boundary map. More... | |
int | bmap (int node) const |
Returns index of node node among only boundary nodes. More... | |
const Range< vec_t > & | normals () const |
Returns normals of all boundary nodes. More... | |
const vec_t & | normal (int i) const |
Returns outside unit normal of i -th node. More... | |
vec_t & | normal (int i) |
Returns writable outside unit normal of i -th node. More... | |
indexes_t | boundary () const |
Returns indexes of all boundary nodes. More... | |
indexes_t | interior () const |
Returns indexes of all internal nodes. More... | |
indexes_t | all () const |
Returns indexes of all nodes, i.e. {0, 1, ..., N-1} . More... | |
int | size () const |
Returns N , the number of nodes in this discretization. More... | |
int | addInternalNode (const vec_t &point, int type) |
Adds a single interior node with specified type to this discretization. More... | |
int | addBoundaryNode (const vec_t &point, int type, const vec_t &normal) |
Adds a boundary node with given type and normal to the domain. More... | |
indexes_t | addNodes (const DomainDiscretization< vec_t > &d) |
Add nodes from another discretization to this discretization. More... | |
void | changeToBoundary (int i, const vec_t &point, int type, const vec_t &normal) |
Changes node i to boundary point with given type and normal . More... | |
void | changeToInterior (int i, const vec_t &point, int type) |
Changes node i to interior point with given type . More... | |
Range< int > | addGhostNodes (scalar_t h, int type=0) |
Overload of addGhostNodes with constant h and adds ghost nodes to all boundary nodes. More... | |
template<typename func_t > | |
Range< int > | addGhostNodes (func_t h, int type=0) |
Overload of addGhostNodes which adds ghost nodes to all boundary nodes. More... | |
Range< int > | addGhostNodes (scalar_t h, int type, const indexes_t &indexes) |
Overload of addGhostNodes with constant h . More... | |
template<typename func_t > | |
Range< int > | addGhostNodes (func_t h, int type, const indexes_t &indexes) |
Add ghost or fictitious nodes to some boundary nodes. More... | |
void | shuffleNodes (const indexes_t &permutation) |
Shuffles node order according to given permutation. More... | |
template<typename compare_t = std::less<std::pair<vec_t, int>>> | |
Range< int > | reorderNodes (const compare_t &cmp=compare_t()) |
Reorders nodes according to the compare function. More... | |
DomainDiscretization & | add (const DomainDiscretization &d) |
Merges given discretization to the current discretization. More... | |
DomainDiscretization & | operator+= (const DomainDiscretization &d) |
Operator version of DomainDiscretization::add. More... | |
DomainDiscretization & | subtract (const DomainDiscretization &d) |
Subtracts given discretized domain from *this . More... | |
DomainDiscretization & | operator-= (const DomainDiscretization &d) |
Operator version of DomainDiscretization::subtract. More... | |
DomainDiscretization & | translate (const vec_t &a) |
Translate the domain by a given vector a . More... | |
DomainDiscretization & | rotate (const Eigen::Matrix< scalar_t, dim, dim > &Q) |
Transform the domain by given orthogonal matrix Q . More... | |
DomainDiscretization & | rotate (scalar_t angle) |
2D version of rotate accepting an angle. More... | |
void | assert_is_valid () const |
Checks if domain is in valid state. More... | |
void | clear () |
Clears all data about this discretization. More... | |
void | removeNodes (const Range< int > &to_remove) |
Remove nodes with given indices. This removes their types and potential normals as well. More... | |
void | removeInternalNodes () |
Removes all internal nodes. More... | |
void | removeBoundaryNodes () |
Removes all boundary nodes. More... | |
bool | contains (const vec_t &point) const |
Returns true if point is inside the domain. More... | |
template<typename search_structure_t > | |
bool | discreteContains (const vec_t &point, const search_structure_t &search) const |
A discrete version of contains using given boundary discretization. More... | |
template<typename search_structure_t > | |
bool | contains (const vec_t &point, const search_structure_t &search) const |
Returns true if point is inside the domain. More... | |
template<typename search_structure_t > | |
void | makeDiscreteContainsStructure (search_structure_t &search) const |
Fills the search structure search with boundary points for use with contains() or discreteContains() . More... | |
template<typename callable_t , typename... Args> | |
void | findSupport (callable_t &callable, Args &&... args) |
Enables more readable calls to support engines. More... | |
template<typename callable_t , typename... Args> | |
void | findSupport (const callable_t &callable, Args &&... args) |
Const version of DomainDiscretization::findSupport. More... | |
template<typename callable_t , typename... Args> | |
void | fill (callable_t &callable, Args &&... args) |
Enables more readable calls to fill engines. More... | |
template<typename callable_t , typename... Args> | |
void | fill (const callable_t &callable, Args &&... args) |
Const version of DomainDiscretization::fill. More... | |
template<typename callable_t , typename... Args> | |
void | relax (callable_t &callable, Args &&... args) |
Enables more readable calls to relax engines. More... | |
template<typename callable_t , typename... Args> | |
void | relax (const callable_t &callable, Args &&... args) |
Const version of DomainDiscretization::relax. More... | |
template<sh::shape_flags mask = sh::all, typename approx_t > | |
RaggedShapeStorage< vec_t, typename sh::operator_tuple< mask, vec_t::dim >::type > | computeShapes (approx_t approx, const indexes_t &indexes={}) const |
Compute shapes, specified with shape flags, for this domain with given approximation for given indexes. More... | |
template<typename OperatorTuple , typename approx_t > | |
RaggedShapeStorage< vec_t, OperatorTuple > | computeShapes (approx_t approx, const indexes_t &indexes={}) const |
Compute shapes for default constructable families. More... | |
template<typename OperatorTuple , typename approx_t > | |
RaggedShapeStorage< vec_t, OperatorTuple > | computeShapes (OperatorTuple operators, approx_t approx, const indexes_t &indexes={}) const |
Compute shapes for non-default constructable families. More... | |
Static Public Member Functions | |
template<typename hdf5_file > | |
static DomainDiscretization< vec_t > | load (hdf5_file &file, const std::string &name) |
Load discretization from a HD5 file. More... | |
Public Types | |
enum | { dim = vec_t::dim } |
Store dimension of the domain. More... | |
typedef vec_t | vector_t |
Vector data type used in computations. More... | |
typedef vec_t::Scalar | scalar_t |
Scalar data type used in computation. More... | |
Friends | |
template<class V > | |
std::ostream & | operator<< (std::ostream &os, const DomainDiscretization< V > &d) |
Output basic info about given domain. More... | |
Protected Attributes | |
Range< vec_t > | positions_ |
Positions of internal discretization points. More... | |
Range< Range< int > > | support_ |
Attribute used to store support points of each node. More... | |
Range< int > | types_ |
Storing types of nodes aligned with positions. More... | |
Range< int > | boundary_map_ |
Mapping index of a boundary node among all nodes, to its index among boundary nodes. More... | |
Range< vec_t > | normals_ |
List of normals of boundary nodes. More... | |
deep_copy_unique_ptr< DomainShape< vec_t > > | shape_ |
Geometric shape of the domain. More... | |
Private Member Functions | |
int | addNode (const vec_t &point, int type) |
Helper for adding points to the domain, which keeps the object consistent. More... | |
void | chopOff (const DomainDiscretization< vec_t > &d, const Range< int > &relevant) |
Remove a portion of this domain which is contained in d or is only dx away. More... | |
std::ostream & | output_report (std::ostream &os=std::cout) const |
Outputs a simple report about out domain, like number of nodes, support size. More... | |
anonymous enum |
Store dimension of the domain.
Enumerator | |
---|---|
dim | Dimensionality of the domain. |
Definition at line 51 of file DomainDiscretization_fwd.hpp.
|
explicit |
Construct an empty discretization for a given shape.
Definition at line 239 of file DomainDiscretization.hpp.
DomainDiscretization< vec_t > & mm::DomainDiscretization< vec_t >::add | ( | const DomainDiscretization< vec_t > & | d | ) |
Merges given discretization to the current discretization.
The shape of current domain changes to become the union of shape()
and d.shape()
. The discretization d
is added to *this
. Types of nodes are preserved. This makes it possible to set custom types before the +=
operation and refer to those types in the union as well.
Example:
More specifically, when performing d1 += d2
, first, boundary nodes in d2
that are contained in d1
are removed. Then, all nodes from d1
that are included in d2
are removed. Additionally, nodes from d1
are removed if they are too close to any of the nodes in d2
. The threshold dx
for point p
in d1
is computed by finding the closest neighbour to p
among the remaining nodes of d1
and then finding its closest neighbour among those same nodes. A factor of the distance between these last two nodes is taken as dx
. The remaining nodes in d2 are then added to d1.
See the images below for visualization of the add operation.
Definition at line 274 of file DomainDiscretization.hpp.
int mm::DomainDiscretization< vec_t >::addBoundaryNode | ( | const vec_t & | point, |
int | type, | ||
const vec_t & | normal | ||
) |
Adds a boundary node with given type and normal to the domain.
point | Coordinates of the node to add. |
type | Type of the point, must be negative. |
normal | Outside unit normal to the boundary at point point . |
Definition at line 56 of file DomainDiscretization.hpp.
Range< int > mm::DomainDiscretization< vec_t >::addGhostNodes | ( | func_t | h, |
int | type, | ||
const indexes_t & | indexes | ||
) |
Add ghost or fictitious nodes to some boundary nodes.
h | Nodal spacing function. The ghost node associated with some boundary node p and with normal n is added at position p + h(p)*n . |
type | Type of the added ghost node. The usual choice is type 0 , making them neither internal nor boundary. This means that shapes in these nodes will not be computed, nor will their supports be found, however, they can appear as support nodes of other domain nodes. Note that this means that their support size is 0, which has to be taken into account when preallocating matrix sizes for implicit solving. If a positive number is chosen for type , the nodes are added as internal nodes and appear in the interior index list. Similarly, if type is negative, they are added as boundary nodes with normal n and appear in the boundary index list. |
indexes | A list of indexes for which to add boundary nodes. If not given, all boundary indices as given by boundary are assumed. |
indexes
have an entry not equal to -1
.This method can be useful when solving PDEs implicitly with Neumann boundary conditions, see the Ghost nodes example and the snippet below:
Definition at line 155 of file DomainDiscretization.hpp.
Range< int > mm::DomainDiscretization< vec_t >::addGhostNodes | ( | func_t | h, |
int | type = 0 |
||
) |
Overload of addGhostNodes which adds ghost nodes to all boundary nodes.
Definition at line 149 of file DomainDiscretization.hpp.
Range< int > mm::DomainDiscretization< vec_t >::addGhostNodes | ( | scalar_t | h, |
int | type, | ||
const indexes_t & | indexes | ||
) |
Overload of addGhostNodes with constant h
.
Definition at line 142 of file DomainDiscretization.hpp.
Range< int > mm::DomainDiscretization< vec_t >::addGhostNodes | ( | scalar_t | h, |
int | type = 0 |
||
) |
Overload of addGhostNodes with constant h
and adds ghost nodes to all boundary nodes.
Definition at line 137 of file DomainDiscretization.hpp.
int mm::DomainDiscretization< vec_t >::addInternalNode | ( | const vec_t & | point, |
int | type | ||
) |
Adds a single interior node with specified type to this discretization.
point | Coordinates of the node to add. |
type | Type of the node to add. Must be positive. |
Definition at line 49 of file DomainDiscretization.hpp.
|
private |
Helper for adding points to the domain, which keeps the object consistent.
Definition at line 66 of file DomainDiscretization.hpp.
indexes_t mm::DomainDiscretization< vec_t >::addNodes | ( | const DomainDiscretization< vec_t > & | d | ) |
Add nodes from another discretization to this discretization.
The shape of the domain is not changed. Returns indices of newly added nodes.
Definition at line 104 of file DomainDiscretization.hpp.
|
inline |
Returns indexes of all nodes, i.e. {0, 1, ..., N-1}
.
Definition at line 186 of file DomainDiscretization_fwd.hpp.
void mm::DomainDiscretization< vec_t >::assert_is_valid |
Checks if domain is in valid state.
This includes that all points are contained in the domain, that all boundary nodes have a normal, etc...
Definition at line 179 of file DomainDiscretization.hpp.
|
inline |
Returns boundary map.
Definition at line 165 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns index of node node
among only boundary nodes.
The returned index is in range [0, boundary().size())
if node
is a boundary node, and -1
otherwise.
Definition at line 170 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns indexes of all boundary nodes.
Definition at line 182 of file DomainDiscretization_fwd.hpp.
void mm::DomainDiscretization< vec_t >::changeToBoundary | ( | int | i, |
const vec_t & | point, | ||
int | type, | ||
const vec_t & | normal | ||
) |
Changes node i
to boundary point with given type
and normal
.
Definition at line 75 of file DomainDiscretization.hpp.
void mm::DomainDiscretization< vec_t >::changeToInterior | ( | int | i, |
const vec_t & | point, | ||
int | type | ||
) |
Changes node i
to interior point with given type
.
Definition at line 88 of file DomainDiscretization.hpp.
|
private |
Remove a portion of this domain which is contained in d
or is only dx
away.
The dx
is computed locally from the discretization of d
. No nodes are added.
Helper for add and subtract methods.
d | The discretization of the domain which specifies which part to chop off. |
relevant | Only the nodes with indices in relevant are used for computing the local dx . This is mostly a performance improvement which allows to construct a smaller k-d tree. |
Definition at line 243 of file DomainDiscretization.hpp.
void mm::DomainDiscretization< vec_t >::clear |
Clears all data about this discretization.
The state of the object is as if it were newly constructed using shape()
.
Definition at line 170 of file DomainDiscretization.hpp.
RaggedShapeStorage<vec_t, typename sh::operator_tuple<mask, vec_t::dim>::type> mm::DomainDiscretization< vec_t >::computeShapes | ( | approx_t | approx, |
const indexes_t & | indexes = {} |
||
) | const |
Compute shapes, specified with shape flags, for this domain with given approximation for given indexes.
For complete documentation, se mm::computeShapes function.
RaggedShapeStorage<vec_t, OperatorTuple> mm::DomainDiscretization< vec_t >::computeShapes | ( | approx_t | approx, |
const indexes_t & | indexes = {} |
||
) | const |
Compute shapes for default constructable families.
RaggedShapeStorage<vec_t, OperatorTuple> mm::DomainDiscretization< vec_t >::computeShapes | ( | OperatorTuple | operators, |
approx_t | approx, | ||
const indexes_t & | indexes = {} |
||
) | const |
Compute shapes for non-default constructable families.
bool mm::DomainDiscretization< vec_t >::contains | ( | const vec_t & | point | ) | const |
Returns true
if point
is inside the domain.
Assertion | fails if domain shape does not have a contains method. In that case, discreteContains might be more appropriate. |
Definition at line 315 of file DomainDiscretization.hpp.
bool mm::DomainDiscretization< vec_t >::contains | ( | const vec_t & | point, |
const search_structure_t & | search | ||
) | const |
Returns true
if point
is inside the domain.
If possible, this function uses analytical DomainShape::contains, otherwise, it falls back to discreteContains. For parameter explanations see discreteContains.
Definition at line 335 of file DomainDiscretization.hpp.
bool mm::DomainDiscretization< vec_t >::discreteContains | ( | const vec_t & | point, |
const search_structure_t & | search | ||
) | const |
A discrete version of contains using given boundary discretization.
A point p
is defined to be contained in the domain, iff the dot product (p-q).n
is negative, where q
is the nearest boundary point and n
is its outer normal. This works sufficiently well, but can fail if boundary discretization is too sparse.
point | The point being tested. |
search | Nearest neighbour search structure containing boundary points in the same order as defined by boundary_map_ . Such suitable structure is returned by makeDiscreteContainsStructure. |
Usage example:
Definition at line 323 of file DomainDiscretization.hpp.
|
inline |
Returns Euclidean distance to the second support node.
Definition at line 148 of file DomainDiscretization_fwd.hpp.
|
inline |
Enables more readable calls to fill engines.
Definition at line 459 of file DomainDiscretization_fwd.hpp.
|
inline |
Const version of DomainDiscretization::fill.
Definition at line 461 of file DomainDiscretization_fwd.hpp.
|
inline |
Enables more readable calls to support engines.
Definition at line 455 of file DomainDiscretization_fwd.hpp.
|
inline |
Const version of DomainDiscretization::findSupport.
Definition at line 457 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns indexes of all internal nodes.
Definition at line 184 of file DomainDiscretization_fwd.hpp.
|
static |
Load discretization from a HD5 file.
This function looks for datasets named pos
, types
, normals
and bmap
. pos
should be a dim x N
dataset of doubles types
and bmap
should be a N
datasets of ints normals
should be a dim x B
dataset of doubles, where B
is the number of boundary nodes. This format is produced by the HDF::writeDomain function.
Usage example:
file | HDF object containing the discretization. |
name | Name of the folder where discretization is stored. |
Definition at line 354 of file DomainDiscretization.hpp.
void mm::DomainDiscretization< vec_t >::makeDiscreteContainsStructure | ( | search_structure_t & | search | ) | const |
Fills the search structure search
with boundary points for use with contains()
or discreteContains()
.
search | A search structure to be used. Its contents are overwritten. |
Definition at line 342 of file DomainDiscretization.hpp.
vec_t & mm::DomainDiscretization< vec_t >::normal | ( | int | i | ) |
Returns writable outside unit normal of i
-th node.
Definition at line 31 of file DomainDiscretization.hpp.
const vec_t & mm::DomainDiscretization< vec_t >::normal | ( | int | i | ) | const |
Returns outside unit normal of i
-th node.
The node must be a boundary node.
Assertion | fails if the noe is not a boundary node, i.e. type(i) < 0 must hold. |
Definition at line 40 of file DomainDiscretization.hpp.
|
inline |
Returns normals of all boundary nodes.
Definition at line 172 of file DomainDiscretization_fwd.hpp.
|
inline |
Operator version of DomainDiscretization::add.
Definition at line 331 of file DomainDiscretization_fwd.hpp.
|
inline |
Operator version of DomainDiscretization::subtract.
Definition at line 361 of file DomainDiscretization_fwd.hpp.
|
private |
Outputs a simple report about out domain, like number of nodes, support size.
Definition at line 209 of file DomainDiscretization.hpp.
|
inline |
Returns writeable position of i
-th node.
Definition at line 131 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns the position of i
-th node.
Definition at line 129 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns j
-th coordinate of the position of i
-th node.
Definition at line 133 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns positions of all nodes.
Definition at line 127 of file DomainDiscretization_fwd.hpp.
|
inline |
Enables more readable calls to relax engines.
Definition at line 463 of file DomainDiscretization_fwd.hpp.
|
inline |
Const version of DomainDiscretization::relax.
Definition at line 465 of file DomainDiscretization_fwd.hpp.
|
inline |
Removes all boundary nodes.
Definition at line 391 of file DomainDiscretization_fwd.hpp.
|
inline |
Removes all internal nodes.
Definition at line 388 of file DomainDiscretization_fwd.hpp.
void mm::DomainDiscretization< vec_t >::removeNodes | ( | const Range< int > & | to_remove | ) |
Remove nodes with given indices. This removes their types and potential normals as well.
Definition at line 117 of file DomainDiscretization.hpp.
template mm::Range< int > mm::DomainDiscretization< vec_t >::reorderNodes | ( | const compare_t & | cmp = compare_t() | ) |
Reorders nodes according to the compare function.
This can be useful to make the matrix of the implicit system have a nicer structure. Sorts lexicographically (i.e. by x-coordinate first) by default.
cmp | A compare function for elements of type std::pair<vec_t, int> as passed to std::sort . The first value in the pair is the coordinate of the point and the second is its index. |
Definition at line 441 of file DomainDiscretization.hpp.
DomainDiscretization< vec_t > & mm::DomainDiscretization< vec_t >::rotate | ( | const Eigen::Matrix< scalar_t, dim, dim > & | Q | ) |
Transform the domain by given orthogonal matrix Q
.
Definition at line 420 of file DomainDiscretization.hpp.
DomainDiscretization< vec_t > & mm::DomainDiscretization< vec_t >::rotate | ( | scalar_t | angle | ) |
2D version of rotate accepting an angle.
Definition at line 431 of file DomainDiscretization.hpp.
|
inline |
Returns geometric shape of the underlying domain.
Definition at line 162 of file DomainDiscretization_fwd.hpp.
void mm::DomainDiscretization< vec_t >::shuffleNodes | ( | const indexes_t & | permutation | ) |
Shuffles node order according to given permutation.
This also modifies the support indices and all other necessary data. For given list I = {4, 3, 2, 0, 1}
and original positions P = {a, b, c, d, e}
, the new list of positions would be {e, d, c, a, b}
, i.e. P = P(I)
. This means that old_domain.pos(p[i]) == new_domain.pos(i)
holds for all nodes.
permutation | A list of n integers containing each number from 0 to n-1 exactly once. |
Assertion | fails if permutation is not a permutation. |
Definition at line 453 of file DomainDiscretization.hpp.
|
inline |
Returns N
, the number of nodes in this discretization.
Definition at line 189 of file DomainDiscretization_fwd.hpp.
DomainDiscretization< vec_t > & mm::DomainDiscretization< vec_t >::subtract | ( | const DomainDiscretization< vec_t > & | d | ) |
Subtracts given discretized domain from *this
.
The shape of current domain changes to become the difference of shape()
and d.shape()
. The discretization nodes that are now outside of domain are removed and the appropriate boundary nodes from d
are added. Types of nodes are preserved. This makes it possible to set custom types before the -=
operation and refer to those types in the difference as well.
Example:
More specifically, when performing d1 -= d2
, nodes in d1 that are contained in d2
or less than dx
away from d2
are removed. The local spacing dx
for a point p
in d1
is computed by first finding the nearest boundary node in d2
and then taking a fraction of the distance to its nearest boundary node. Boundary nodes from d2
that are contained in d1
are also added, with inverted normals.
See the images below for visualization of the subtract operation.
Definition at line 298 of file DomainDiscretization.hpp.
|
inline |
Returns writeable array of support indices for i
-th node.
Definition at line 140 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns support indices for i
-th node.
Indices are ordered by distance to support nodes, with the first being the closest, usually the node itself.
Definition at line 138 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns j
-th support node of i
-th node.
Definition at line 142 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns position of j
-th support node of i
-th node.
Definition at line 146 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns positions of support nodes of i
-th node.
Definition at line 144 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns support indices for all nodes.
Definition at line 135 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns size of i
-th node support.
Definition at line 150 of file DomainDiscretization_fwd.hpp.
Range< int > mm::DomainDiscretization< vec_t >::supportSizes |
Returns a vector of support sizes for each node.
Definition at line 21 of file DomainDiscretization.hpp.
DomainDiscretization< vec_t > & mm::DomainDiscretization< vec_t >::translate | ( | const vec_t & | a | ) |
Translate the domain by a given vector a
.
Definition at line 411 of file DomainDiscretization.hpp.
|
inline |
Returns writeable type of i
-th node.
Definition at line 160 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns type of i
-th node.
Definition at line 158 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns mutable types of all nodes.
Definition at line 156 of file DomainDiscretization_fwd.hpp.
|
inline |
Returns types of all nodes.
Definition at line 154 of file DomainDiscretization_fwd.hpp.
|
friend |
Output basic info about given domain.
|
protected |
Mapping index of a boundary node among all nodes, to its index among boundary nodes.
Indices of internal nodes are set to -1
.
Nodes p2
and p5
are the first and the second boundary nodes. There are no guarantees on the order of nodes.
Definition at line 85 of file DomainDiscretization_fwd.hpp.
|
protected |
List of normals of boundary nodes.
Normal n1
is the normal of node p2
and normal n2
is the normal of p5
.
Definition at line 97 of file DomainDiscretization_fwd.hpp.
|
protected |
Positions of internal discretization points.
Definition at line 54 of file DomainDiscretization_fwd.hpp.
|
protected |
Geometric shape of the domain.
Definition at line 100 of file DomainDiscretization_fwd.hpp.
|
protected |
Attribute used to store support points of each node.
For each node i
, support[i]
is list of indices of i
's support ordered by distance from i
. The first element in the i
-th list is usually i
followed by one or more others.
Definition at line 60 of file DomainDiscretization_fwd.hpp.
|
protected |
Storing types of nodes aligned with positions.
Negative types are reserved for boundary nodes, positive for interior. Zero type is not used. Example:
Nodes p2
and p5
are of type -1
, p1
and p3
of type 2
and so on.
Definition at line 72 of file DomainDiscretization_fwd.hpp.