LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
lf::refinement::Hybrid2DRefinementPattern Class Reference

Class containing information about the refinement of a cell. More...

#include <lf/refinement/hybrid2d_refinement_pattern.h>

Inheritance diagram for lf::refinement::Hybrid2DRefinementPattern:
lf::geometry::RefinementPattern

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
 
Hybrid2DRefinementPatternsetAnchor (lf::base::sub_idx_t anchor)
 set local number of anchor edge
 
Hybrid2DRefinementPatternsetRefPattern (RefPat ref_pat)
 set refinement pattern
 
 ~Hybrid2DRefinementPattern () override=default
 
Access methods
lf::base::sub_idx_t anchor () const
 
RefPat refpat () const
 
- Public Member Functions inherited from lf::geometry::RefinementPattern
 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
 
Hybrid2DRefinementPatternoperator= (const Hybrid2DRefinementPattern &)=default
 
Hybrid2DRefinementPatternoperator= (Hybrid2DRefinementPattern &&)=default
 

Private Attributes

lf::base::sub_idx_t anchor_
 
RefPat ref_pat_
 
bool anchor_set_
 

Additional Inherited Members

- Protected Member Functions inherited from lf::geometry::RefinementPattern
 RefinementPattern (const RefinementPattern &)=default
 
 RefinementPattern (RefinementPattern &&)=default
 
RefinementPatternoperator= (const RefinementPattern &)=default
 
RefinementPatternoperator= (RefinementPattern &&)=default
 
- Protected Attributes inherited from lf::geometry::RefinementPattern
lf::base::RefEl ref_el_
 
lf::base::size_type lattice_const_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Hybrid2DRefinementPattern() [1/5]

lf::refinement::Hybrid2DRefinementPattern::Hybrid2DRefinementPattern ( const Hybrid2DRefinementPattern & )
privatedefault

Constructors

◆ Hybrid2DRefinementPattern() [2/5]

lf::refinement::Hybrid2DRefinementPattern::Hybrid2DRefinementPattern ( Hybrid2DRefinementPattern && )
privatedefault

◆ Hybrid2DRefinementPattern() [3/5]

lf::refinement::Hybrid2DRefinementPattern::Hybrid2DRefinementPattern ( lf::base::RefEl ref_el)
inlineexplicit

constructor

Definition at line 71 of file hybrid2d_refinement_pattern.h.

◆ Hybrid2DRefinementPattern() [4/5]

lf::refinement::Hybrid2DRefinementPattern::Hybrid2DRefinementPattern ( lf::base::RefEl ref_el,
RefPat ref_pat )
inline

constructor

Definition at line 78 of file hybrid2d_refinement_pattern.h.

◆ Hybrid2DRefinementPattern() [5/5]

lf::refinement::Hybrid2DRefinementPattern::Hybrid2DRefinementPattern ( lf::base::RefEl ref_el,
RefPat ref_pat,
lf::base::sub_idx_t anchor )
inline

◆ ~Hybrid2DRefinementPattern()

lf::refinement::Hybrid2DRefinementPattern::~Hybrid2DRefinementPattern ( )
overridedefault

Member Function Documentation

◆ anchor()

lf::base::sub_idx_t lf::refinement::Hybrid2DRefinementPattern::anchor ( ) const
inline

Definition at line 237 of file hybrid2d_refinement_pattern.h.

References anchor_.

Referenced by Hybrid2DRefinementPattern(), and setAnchor().

◆ ChildPolygons()

std::vector< Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic > > lf::refinement::Hybrid2DRefinementPattern::ChildPolygons ( lf::base::dim_t codim) const
overridevirtual

provide lattice reference coordinates of vertices of child polygons

Parameters
codimrelative codimension of the children whose lattice polygons are requested.

for a cell entity

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.

For a segment entity

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.

Returns
vector of integer matrices containing the lattice coordinates of the verticess of the child polygons in their columns. The size of the matrices is dxP, where d is the intrinsic dimension of the entity, and P stands for the number of vertices of a particular child entity. The length of the returned vector must agree with the value returned by NumChildren() The integer entries of the matrices must be non-negative and the column sums must be <= the lattice constant.

Case of a point entity (dimension 0)

The method always returns an single "matrix" of size 0xP, where P=1 for rp_copy, and P=0 for rp_nil.

Case of a segment entity (dimension 1)

  • codim = 0, request information about child segments. The method returns a Q-vector of 1xP integer matrices:
    • Q=0 for rp_nil
    • Q=1 for rp_copy, P=2, returns ‘[0 N]’
    • Q=2 for rp_split, P=2, returns '{[0 N/2],[N/2 N]}`
  • codim = 1: provide information about new interior points created during refinement. The method returns an empty vector unless 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

Case of triangular cell entity (dimension 2)

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.

    • Q=0 for rp_nil (no refinement at all)
    • Q=1 for rp_copy, returns {[0 N 0;0 0 N]}
    • Q=2 for rp_bisect, anchor=0
    • Q=2 for rp_bisect, anchor=1
    • Q=2 for rp_bisect, anchor=2
    • Q=3 for rp_trisect, anchor=0
    • Q=3 for rp_trisect, anchor=1
    • Q=3 for rp_trisect, anchor=2
    • Q=3 for rp_trisect_left, anchor=0
    • Q=3 for rp_trisect_left, anchor=1
    • Q=3 for rp_trisect_left, anchor=2
    • Q=4 for rp_quadsect, anchor=0
    • Q=4 for rp_quadsect, anchor=1
    • Q=4 for rp_quadsect, anchor=2
    • Q=4 for rp_regular:
    • Q=6 for rp_barycentric
  • codim=1: return information about (new) interior child edges
  • codim=0: tell about new interior child nodes Only for the refinement pattern rp_barycentric a new interior node is created (Q=1), Q=0 in all other cases.

Case of quadrilateral cell (dimension 2)

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.

    • Q=0 for rp_nil (no refinement)
    • Q=1 for rp_copy (quadrilateral is duplicated)
    • Q=2 for ‘rp_split’/rp_bisect, only visualized for anchor=0, the other numberings arise from cyclic permutations.
    • Q=3 for rp_trisect, image for anchor=0
    • Q=4 for rp_quadsect, image for anchor=0
    • Q=4 for rp_threeedge, image for anchor=0 (child local indices in pink, edge local indices in green)
    • Q=4 for rp_regular/rp_barycentric
  • codim=1: obtain information about interior child edges
  • codim=2: information about interior child nodes

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().

◆ NumChildren()

lf::base::size_type lf::refinement::Hybrid2DRefinementPattern::NumChildren ( lf::base::dim_t codim) const
overridevirtual

◆ operator=() [1/2]

Hybrid2DRefinementPattern & lf::refinement::Hybrid2DRefinementPattern::operator= ( const Hybrid2DRefinementPattern & )
privatedefault

◆ operator=() [2/2]

Hybrid2DRefinementPattern & lf::refinement::Hybrid2DRefinementPattern::operator= ( Hybrid2DRefinementPattern && )
privatedefault

◆ refpat()

RefPat lf::refinement::Hybrid2DRefinementPattern::refpat ( ) const
inline

◆ setAnchor()

Hybrid2DRefinementPattern & lf::refinement::Hybrid2DRefinementPattern::setAnchor ( lf::base::sub_idx_t anchor)
inline

◆ setRefPattern()

Hybrid2DRefinementPattern & lf::refinement::Hybrid2DRefinementPattern::setRefPattern ( RefPat ref_pat)
inline

set refinement pattern

Note
invalidates the local number of the anchor edge

the calling sequence should be setRefPattern(..).setAnchor(..)

Definition at line 228 of file hybrid2d_refinement_pattern.h.

References anchor_set_, and ref_pat_.

Member Data Documentation

◆ anchor_

lf::base::sub_idx_t lf::refinement::Hybrid2DRefinementPattern::anchor_
private

local number of anchor edge

Definition at line 252 of file hybrid2d_refinement_pattern.h.

Referenced by anchor(), ChildPolygons(), and setAnchor().

◆ anchor_set_

bool lf::refinement::Hybrid2DRefinementPattern::anchor_set_
private

flag indicating valid anchor

Definition at line 254 of file hybrid2d_refinement_pattern.h.

Referenced by ChildPolygons(), Hybrid2DRefinementPattern(), refpat(), setAnchor(), and setRefPattern().

◆ ref_pat_

RefPat lf::refinement::Hybrid2DRefinementPattern::ref_pat_
private

refinement pattern

Definition at line 253 of file hybrid2d_refinement_pattern.h.

Referenced by ChildPolygons(), NumChildren(), refpat(), and setRefPattern().


The documentation for this class was generated from the following files: