LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Class containing information about the refinement of a cell. More...
#include <lf/refinement/hybrid2d_refinement_pattern.h>
Public Member Functions | |
Hybrid2DRefinementPattern (lf::base::RefEl ref_el) | |
constructor | |
Hybrid2DRefinementPattern (lf::base::RefEl ref_el, RefPat ref_pat) | |
constructor | |
Hybrid2DRefinementPattern (lf::base::RefEl ref_el, RefPat ref_pat, lf::base::sub_idx_t anchor) | |
constructor | |
lf::base::size_type | NumChildren (lf::base::dim_t codim) const override |
provide number of child entities of a given co-dimension to be created by refinement | |
std::vector< Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic > > | ChildPolygons (lf::base::dim_t codim) const override |
provide lattice reference coordinates of vertices of child polygons | |
Hybrid2DRefinementPattern & | setAnchor (lf::base::sub_idx_t anchor) |
set local number of anchor edge | |
Hybrid2DRefinementPattern & | setRefPattern (RefPat ref_pat) |
set refinement pattern | |
~Hybrid2DRefinementPattern () override=default | |
Access methods | |
lf::base::sub_idx_t | anchor () const |
RefPat | refpat () const |
![]() | |
RefinementPattern (lf::base::RefEl ref_el) | |
Constructor setting reference element = topological type of entity. | |
RefinementPattern (lf::base::RefEl ref_el, lf::base::size_type lattice_const) | |
Constructor fixing reference element and refinement resolution. | |
lf::base::RefEl | RefEl () const |
Returns topological type of entity for which the current object is set up. | |
lf::base::size_type | LatticeConst () const |
Provides information about lattice constant used. | |
virtual | ~RefinementPattern ()=default |
Private Member Functions | |
Hybrid2DRefinementPattern (const Hybrid2DRefinementPattern &)=default | |
Hybrid2DRefinementPattern (Hybrid2DRefinementPattern &&)=default | |
Hybrid2DRefinementPattern & | operator= (const Hybrid2DRefinementPattern &)=default |
Hybrid2DRefinementPattern & | operator= (Hybrid2DRefinementPattern &&)=default |
Private Attributes | |
lf::base::sub_idx_t | anchor_ |
RefPat | ref_pat_ |
bool | anchor_set_ |
Additional Inherited Members | |
![]() | |
RefinementPattern (const RefinementPattern &)=default | |
RefinementPattern (RefinementPattern &&)=default | |
RefinementPattern & | operator= (const RefinementPattern &)=default |
RefinementPattern & | operator= (RefinementPattern &&)=default |
![]() | |
lf::base::RefEl | ref_el_ |
lf::base::size_type | lattice_const_ |
Class containing information about the refinement of a cell.
For explanations see xournal notes in Refinement.xoj
Definition at line 55 of file hybrid2d_refinement_pattern.h.
|
privatedefault |
Constructors
|
privatedefault |
|
inlineexplicit |
constructor
Definition at line 71 of file hybrid2d_refinement_pattern.h.
|
inline |
constructor
Definition at line 78 of file hybrid2d_refinement_pattern.h.
|
inline |
constructor
Definition at line 85 of file hybrid2d_refinement_pattern.h.
References anchor(), anchor_set_, lf::base::RefEl::NumSubEntities(), lf::geometry::RefinementPattern::ref_el_, and lf::base::RefEl::ToString().
|
overridedefault |
|
inline |
Definition at line 237 of file hybrid2d_refinement_pattern.h.
References anchor_.
Referenced by Hybrid2DRefinementPattern(), and setAnchor().
|
overridevirtual |
provide lattice reference coordinates of vertices of child polygons
codim | relative codimension of the children whose lattice polygons are requested. |
The shaoe of the children of relative co-dimension 0 of a cell is defined through a convex lattice polygon in the reference element. The children of co-dimension 1 are interior edges. Their shape is described by lattice segments. Children of relative co-dimension 2 are interior points. Their position is given by a single lattice point.
The shape of children with relative co-dimension 0 is given by lattice intervals. Children with relative co-dimension 1 are interior points and their location is given by single lattice points.
NumChildren()
The integer entries of the matrices must be non-negative and the column sums must be <= the lattice constant. The method always returns an single "matrix" of size 0xP, where P=1 for rp_copy
, and P=0 for rp_nil
.
rp_nil
rp_copy
, P=2, returns ‘[0 N]’rp_split
, P=2, returns '{[0 N/2],[N/2 N]}`rp_split
is the refinement pattern, In this case a 1x1 matrix [N/2]
is returned.Here, N
denotes the lattice constant, corresponding to the float value 1.0 in reference coordinates
The method returns a Q-vector of 2xP integer matrices.
codim=0: request information about child cells
Below the output is largely visualized by pictures. The big pink numbers give the local index of the child cells, which is also the index in the return vector. The small orange number indicate the local vertex indices in the child cell.
rp_nil
(no refinement at all)rp_copy
, returns {[0 N 0;0 0 N]}
rp_bisect
, anchor=0 rp_bisect
, anchor=1 rp_bisect
, anchor=2 rp_trisect
, anchor=0 rp_trisect
, anchor=1 rp_trisect
, anchor=2 rp_trisect_left
, anchor=0 rp_trisect_left
, anchor=1 rp_trisect_left
, anchor=2 rp_quadsect
, anchor=0 rp_quadsect
, anchor=1 rp_quadsect
, anchor=2 rp_regular
: rp_barycentric
rp_barycentric
a new interior node is created (Q=1), Q=0 in all other cases.A Q-vector of 2xP integer matrices with lattice coordinates in their columns is returned.
codim=0: tell about all child cells
Below we visualize the output with large pink numbers indicating the the index of a child cell in the return vector.
rp_nil
(no refinement)rp_copy
(quadrilateral is duplicated)rp_bisect
, only visualized for anchor=0, the other numberings arise from cyclic permutations. rp_trisect
, image for anchor=0 rp_quadsect
, image for anchor=0 rp_threeedge
, image for anchor=0 (child local indices in pink, edge local indices in green) rp_regular
/rp_barycentric
Implements lf::geometry::RefinementPattern.
Definition at line 274 of file hybrid2d_refinement_pattern.cc.
References anchor_, anchor_set_, lf::base::RefEl::Dimension(), lf::base::RefEl::kPoint(), lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), lf::base::RefEl::kTria(), lf::geometry::RefinementPattern::lattice_const_, lf::geometry::RefinementPattern::ref_el_, ref_pat_, lf::refinement::rp_barycentric, lf::refinement::rp_bisect, lf::refinement::rp_copy, lf::refinement::rp_nil, lf::refinement::rp_quadsect, lf::refinement::rp_regular, lf::refinement::rp_split, lf::refinement::rp_threeedge, lf::refinement::rp_trisect, lf::refinement::rp_trisect_left, and lf::base::RefEl::ToString().
|
overridevirtual |
provide number of child entities of a given co-dimension to be created by refinement
For a point: 0 (rp_nil
), 1(rp_copy
)
Implements lf::geometry::RefinementPattern.
Definition at line 49 of file hybrid2d_refinement_pattern.cc.
References lf::base::RefEl::Dimension(), lf::base::RefEl::kPoint(), lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), lf::base::RefEl::kTria(), lf::geometry::RefinementPattern::ref_el_, ref_pat_, lf::refinement::rp_barycentric, lf::refinement::rp_bisect, lf::refinement::rp_copy, lf::refinement::rp_nil, lf::refinement::rp_quadsect, lf::refinement::rp_regular, lf::refinement::rp_split, lf::refinement::rp_threeedge, lf::refinement::rp_trisect, lf::refinement::rp_trisect_left, and lf::base::RefEl::ToString().
|
privatedefault |
|
privatedefault |
|
inline |
Definition at line 238 of file hybrid2d_refinement_pattern.h.
References anchor_set_, ref_pat_, lf::refinement::rp_bisect, lf::refinement::rp_quadsect, lf::refinement::rp_threeedge, lf::refinement::rp_trisect, and lf::refinement::rp_trisect_left.
|
inline |
set local number of anchor edge
Definition at line 210 of file hybrid2d_refinement_pattern.h.
References anchor(), anchor_, anchor_set_, lf::refinement::idx_nil, lf::base::RefEl::NumSubEntities(), lf::geometry::RefinementPattern::ref_el_, and lf::base::RefEl::ToString().
|
inline |
set refinement pattern
the calling sequence should be setRefPattern(..).setAnchor(..)
Definition at line 228 of file hybrid2d_refinement_pattern.h.
References anchor_set_, and ref_pat_.
|
private |
local number of anchor edge
Definition at line 252 of file hybrid2d_refinement_pattern.h.
Referenced by anchor(), ChildPolygons(), and setAnchor().
|
private |
flag indicating valid anchor
Definition at line 254 of file hybrid2d_refinement_pattern.h.
Referenced by ChildPolygons(), Hybrid2DRefinementPattern(), refpat(), setAnchor(), and setRefPattern().
|
private |
refinement pattern
Definition at line 253 of file hybrid2d_refinement_pattern.h.
Referenced by ChildPolygons(), NumChildren(), refpat(), and setRefPattern().