LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Interface class representing a topological entity in a cellular complex More...
#include <lf/mesh/entity.h>
Public Member Functions | |
virtual unsigned | Codim () const =0 |
The codimension of this entity w.r.t. the Mesh.dimMesh() of the owning mesh manager. | |
virtual std::span< const Entity *const > | SubEntities (unsigned rel_codim) const =0 |
Return all sub entities of this entity that have the given codimension (w.r.t. this entity!) | |
virtual std::span< const Orientation > | RelativeOrientations () const =0 |
return span of relative orientations of sub-entities of the next higher co-dimension. | |
virtual const geometry::Geometry * | Geometry () const =0 |
Describes the geometry of this entity. | |
virtual base::RefEl | RefEl () const =0 |
Describes the reference element type of this entity. | |
virtual bool | operator== (const Entity &rhs) const =0 |
Check if two entities are the same. | |
bool | operator!= (const Entity &rhs) const |
Check if two entities are different. | |
virtual | ~Entity ()=default |
Virtual Destructor. | |
Protected Member Functions | |
Entity ()=default | |
Entity (const Entity &)=default | |
Entity (Entity &&)=default | |
Entity & | operator= (const Entity &)=default |
Entity & | operator= (Entity &&)=default |
Related Symbols | |
(Note that these are not member symbols.) | |
void | PrintInfo (std::ostream &stream, const lf::mesh::Entity &e, int output_ctrl=0) |
Prints info about an entity. | |
Interface class representing a topological entity in a cellular complex
Example: a 2D hybrid mesh consists of cells (entities of co-dimension 0), edges (entities of co-dimension 1), and nodes (entities of co-dimension 2). The set of these entities endowed with incidence relations defines the topology of the mesh.
The core purpose of this class is to provide interface definitions for accessing incidence relations and geometry information. This interface applies to all (topological) types of entities.
Further information can be found in Subsection 2.7.2.2 of the Lecture Document
|
protecteddefault |
|
protecteddefault |
|
protecteddefault |
|
virtualdefault |
Virtual Destructor.
|
pure virtual |
The codimension of this entity w.r.t. the Mesh.dimMesh() of the owning mesh manager.
Implemented in lf::mesh::hybrid2d::Point, lf::mesh::hybrid2d::Quadrilateral, lf::mesh::hybrid2d::Segment, and lf::mesh::hybrid2d::Triangle.
Referenced by lf::mesh::utils::CodimMeshDataSet< T >::DefinedOn(), and lf::mesh::utils::AllCodimMeshDataSet< T >::operator()().
|
pure virtual |
Describes the geometry of this entity.
Why does this member function return a pointer instead of a reference? One reason is that entities without a geometric shape are conceivable as building block of a "mesh graph", where only topological information matters. Another reason is that during the construction of a mesh, it turns out to be convenient to build entities "without geometry" first and then endow them with geometric information. A nullptr
is a good way to indicate missing geometric information.
Implemented in lf::mesh::hybrid2d::Point, lf::mesh::hybrid2d::Quadrilateral, lf::mesh::hybrid2d::Segment, and lf::mesh::hybrid2d::Triangle.
Referenced by lf::mesh::test_utils::checkGeometryOrientation(), lf::uscalfe::ReactionDiffusionElementMatrixProvider< SCALAR, DIFF_COEFF, REACTION_COEFF >::Eval(), lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::Eval(), lf::fe::DiffusionElementMatrixProvider< SCALAR, DIFF_COEFF >::Eval(), lf::fe::MassElementMatrixProvider< SCALAR, REACTION_COEFF >::Eval(), lf::fe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::Eval(), lf::uscalfe::LinearFELaplaceElementMatrix::Eval(), lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >::Eval(), lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::Eval(), lf::uscalfe::ScalarLoadEdgeVectorProvider< SCALAR, FUNCTOR, EDGESELECTOR >::Eval(), lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::Eval(), lf::fe::ScalarLoadEdgeVectorProvider< SCALAR, FUNCTOR, EDGESELECTOR >::Eval(), lf::fe::MeshFunctionGradFE< SCALAR_FE, SCALAR_COEFF >::operator()(), lf::refinement::EntityCenterPositionSelector< POSPRED >::operator()(), lf::mesh::utils::MeshFunctionGlobal< F >::operator()(), and PrintInfo().
|
inline |
Check if two entities are different.
Definition at line 141 of file entity.h.
References operator==().
|
pure virtual |
Check if two entities are the same.
rhs | Check if this entity is the same as the rhs entity. |
Implemented in lf::mesh::hybrid2d::Point, lf::mesh::hybrid2d::Quadrilateral, lf::mesh::hybrid2d::Segment, and lf::mesh::hybrid2d::Triangle.
Referenced by operator!=().
|
pure virtual |
Describes the reference element type of this entity.
Implemented in lf::mesh::hybrid2d::Point, lf::mesh::hybrid2d::Quadrilateral, lf::mesh::hybrid2d::Segment, and lf::mesh::hybrid2d::Triangle.
Referenced by lf::mesh::test_utils::checkGeometryOrientation(), lf::mesh::test_utils::checkLocalTopology(), lf::mesh::test_utils::checkRelCodim(), lf::uscalfe::ReactionDiffusionElementMatrixProvider< SCALAR, DIFF_COEFF, REACTION_COEFF >::Eval(), lf::uscalfe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::Eval(), lf::fe::DiffusionElementMatrixProvider< SCALAR, DIFF_COEFF >::Eval(), lf::fe::MassElementMatrixProvider< SCALAR, REACTION_COEFF >::Eval(), lf::fe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::Eval(), lf::uscalfe::LinearFELaplaceElementMatrix::Eval(), lf::uscalfe::LinearFELocalLoadVector< SCALAR, FUNCTOR >::Eval(), lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::Eval(), lf::uscalfe::ScalarLoadEdgeVectorProvider< SCALAR, FUNCTOR, EDGESELECTOR >::Eval(), lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::Eval(), lf::fe::ScalarLoadEdgeVectorProvider< SCALAR, FUNCTOR, EDGESELECTOR >::Eval(), lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::isActive(), lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::isActive(), lf::uscalfe::UniformScalarFESpace< SCALAR >::NumRefShapeFunctions(), lf::fe::MeshFunctionGradFE< SCALAR_FE, SCALAR_COEFF >::operator()(), lf::refinement::EntityCenterPositionSelector< POSPRED >::operator()(), lf::mesh::utils::MeshFunctionGlobal< F >::operator()(), lf::mesh::operator<<(), PrintInfo(), and lf::uscalfe::UniformScalarFESpace< SCALAR >::ShapeFunctionLayout().
|
pure virtual |
return span of relative orientations of sub-entities of the next higher co-dimension.
The corners of every entity are numbered and, thus, define a local orientation of the sub-entitites of co-dimension+1 as explained in Lecture Document Remark 2.7.2.15. This local orientation need not agree with the intrinsic orientation of that sub-entity as given by its own numbering of corners. Such a possible mismatch is detected by this function.
Implemented in lf::mesh::hybrid2d::Point, lf::mesh::hybrid2d::Quadrilateral, lf::mesh::hybrid2d::Segment, and lf::mesh::hybrid2d::Triangle.
|
pure virtual |
Return all sub entities of this entity that have the given codimension (w.r.t. this entity!)
rel_codim | The relative co-dimension w.r.t. this entity |
Implicitly this function defines the numbering of sub-entities, see lf::base::RefEl and Lecture Document Paragraph 2.7.2.14.
Use of this method is also shown in Lecture Document Example 2.7.2.12.
Implemented in lf::mesh::hybrid2d::Point, lf::mesh::hybrid2d::Quadrilateral, lf::mesh::hybrid2d::Segment, and lf::mesh::hybrid2d::Triangle.
Referenced by lf::mesh::test_utils::checkGeometryOrientation(), lf::mesh::test_utils::checkLocalTopology(), lf::mesh::test_utils::checkRelCodim(), and PrintInfo().
|
related |
Prints info about an entity.
e | The entity to print info about |
output_ctrl | controls the level of output (see below) |
stream | The stream to which this function should output |
Definition at line 74 of file print_info.cc.
References lf::base::RefEl::Dimension(), Geometry(), lf::geometry::Geometry::Global(), lf::base::RefEl::kPoint(), lf::base::RefEl::NodeCoords(), lf::base::RefEl::NumSubEntities(), RefEl(), lf::base::RefEl::RefEl(), and SubEntities().