LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
tools for regular or local refinement of 2D hybrid meshes More...
Classes | |
struct | CellChildInfo |
Information about the refinement status of a cell. More... | |
struct | EdgeChildInfo |
Information about the refinement status of an edge. More... | |
class | EntityCenterPositionSelector |
Utility class: selection of entities according to the position of their midpoint. More... | |
class | Hybrid2DRefinementPattern |
Class containing information about the refinement of a cell. More... | |
class | MeshFunctionTransfer |
A MeshFunction representing interpolation on a lf::refinement::MeshHierarchy. More... | |
class | MeshHierarchy |
A hierarchy of nested 2D hybrid meshes created by refinement. More... | |
struct | ParentInfo |
Information about possible parent entities. More... | |
struct | PointChildInfo |
Information about the refinement status of a point. More... | |
Enumerations | |
enum | RefPat : int { rp_nil , rp_copy , rp_split , rp_bisect , rp_trisect , rp_trisect_left , rp_quadsect , rp_threeedge , rp_regular , rp_barycentric } |
(possibly incomplete) list of refinement patterns for triangles/quadrilaterals More... | |
Functions | |
std::ostream & | operator<< (std::ostream &o, const RefPat &refpat) |
template<typename MF > | |
MeshFunctionTransfer (const lf::refinement::MeshHierarchy &, const MF &, lf::base::size_type, lf::base::size_type) -> MeshFunctionTransfer< MF > | |
bool | checkValidIndex (const std::vector< glb_idx_t > &idx_vec) |
std::shared_ptr< MeshHierarchy > | GenerateMeshHierarchyByUniformRefinemnt (const std::shared_ptr< lf::mesh::Mesh > &mesh_p, lf::base::size_type ref_lev, RefPat ref_pat=RefPat::rp_regular) |
Generated a sequence of nested 2D hybrid mehes by regular or barycentric refinement. | |
int | normalize_idx (glb_idx_t idx) |
void | WriteMatlabLevel (const MeshHierarchy &hier_mesh, size_type level, std::string filename) |
Generate MATLAB function providing parent/child information. | |
void | WriteMatlab (const MeshHierarchy &hier_mesh, const std::string &basename) |
Generate MATLAB code describing a multilevel hierarchy of meshes. | |
Variables | |
const unsigned int | idx_nil = lf::base::kIdxNil |
tools for regular or local refinement of 2D hybrid meshes
LehrFEM++ supports the local refinement of hybrid meshes ensuring mesh conformity in the process. Edge marking is used to single out cells that must be refined. Other cells may also undergo refinement in order to avoid hanging nodes.
enum lf::refinement::RefPat : int |
(possibly incomplete) list of refinement patterns for triangles/quadrilaterals
Non-symmetric refinement patterns have to be complemented by a subentity index of an edge, here called the anchor of the refinement.
The only symmetric refinement patterns are regular refinement and barycentric refinement.
A refinement pattern has to be passed as first argument to the member function geometry::Geometry::ChildGeometry() of a lf::geometry::Geometry object.
Definition at line 35 of file hybrid2d_refinement_pattern.h.
bool lf::refinement::checkValidIndex | ( | const std::vector< glb_idx_t > & | idx_vec | ) |
Definition at line 17 of file mesh_hierarchy.cc.
References idx_nil.
std::shared_ptr< MeshHierarchy > lf::refinement::GenerateMeshHierarchyByUniformRefinemnt | ( | const std::shared_ptr< lf::mesh::Mesh > & | mesh_p, |
lf::base::size_type | ref_lev, | ||
RefPat | ref_pat = RefPat::rp_regular ) |
Generated a sequence of nested 2D hybrid mehes by regular or barycentric refinement.
mesh_p | pointer to the coarsest mesh, from which refinment will start |
ref_lev | desired number of refinement steps |
ref_pat | at selector for type of uniform refinement: default is rp_regular, rp_barycentric choses barycentric refinement. |
Relies on lf::mesh::hybrid2d::MeshFactory as builder class for mesh entities. Invokes the method MeshHierarhy::RefineRegular() for refinement.
Definition at line 1917 of file mesh_hierarchy.cc.
lf::refinement::MeshFunctionTransfer | ( | const lf::refinement::MeshHierarchy & | , |
const MF & | , | ||
lf::base::size_type | , | ||
lf::base::size_type | ) -> MeshFunctionTransfer< MF > |
|
inline |
std::ostream & lf::refinement::operator<< | ( | std::ostream & | o, |
const RefPat & | refpat ) |
Definition at line 11 of file hybrid2d_refinement_pattern.cc.
References rp_barycentric, rp_bisect, rp_copy, rp_nil, rp_quadsect, rp_regular, rp_split, rp_threeedge, rp_trisect, and rp_trisect_left.
void lf::refinement::WriteMatlab | ( | const MeshHierarchy & | hier_mesh, |
const std::string & | basename ) |
Generate MATLAB code describing a multilevel hierarchy of meshes.
hier_mesh | reference to a valid MeshHierarchy object |
basename | basename of the filename for output file, of which there will be several |
Definition at line 82 of file refutils.cc.
References lf::refinement::MeshHierarchy::getMesh(), lf::refinement::MeshHierarchy::NumLevels(), lf::io::writeMatlab(), and WriteMatlabLevel().
void lf::refinement::WriteMatlabLevel | ( | const MeshHierarchy & | hier_mesh, |
size_type | level, | ||
std::string | filename ) |
Generate MATLAB function providing parent/child information.
hier_mesh | reference to a valid MeshHierarchy object |
level | refinement level to be output |
filename | output file in which to store the MATLAB code |
Definition at line 20 of file refutils.cc.
References lf::refinement::MeshHierarchy::getMesh(), normalize_idx(), lf::refinement::MeshHierarchy::ParentInfos(), and lf::refinement::MeshHierarchy::RefinementEdges().
Referenced by WriteMatlab().
const unsigned int lf::refinement::idx_nil = lf::base::kIdxNil |
Definition at line 18 of file hybrid2d_refinement_pattern.h.
Referenced by checkValidIndex(), lf::refinement::MeshHierarchy::MeshHierarchy(), normalize_idx(), and lf::refinement::Hybrid2DRefinementPattern::setAnchor().