LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
An edge object for a 2D hybrid mesh. More...
#include <lf/mesh/hybrid2d/segment.h>
Public Member Functions | |
Segment ()=default | |
default constructors, needed by std::vector More... | |
Segment (size_type index, std::unique_ptr< geometry::Geometry > &&geometry, const Point *endpoint0, const Point *endpoint1) | |
constructor, is called from MeshFactory More... | |
unsigned | Codim () const override |
an edge is an entity of co-dimension 1 More... | |
nonstd::span< const Entity *const > | SubEntities (unsigned rel_codim) const override |
Access to all subentities selected by relative co-dimension. More... | |
nonstd::span< const lf::mesh::Orientation > | RelativeOrientations () const override |
Access to relative orientations of endpoints. More... | |
size_type | index () const |
access to index of an entity More... | |
~Segment () override=default | |
Default and disabled constructors | |
Segment (const Segment &)=delete | |
Segment (Segment &&) noexcept=default | |
Segment & | operator= (const Segment &)=delete |
Segment & | operator= (Segment &&) noexcept=default |
Standard methods of an Entity object | |
| |
const geometry::Geometry * | Geometry () const override |
Describes the geometry of this entity. More... | |
base::RefEl | RefEl () const override |
Describes the reference element type of this entity. More... | |
bool | operator== (const mesh::Entity &rhs) const override |
Check if two entities are the same. More... | |
![]() | |
virtual unsigned | Codim () const =0 |
The codimension of this entity w.r.t. the Mesh.dimMesh() of the owning mesh manager. More... | |
virtual nonstd::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!) More... | |
virtual nonstd::span< const Orientation > | RelativeOrientations () const =0 |
return span of relative orientations of sub-entities of the next higher co-dimension. More... | |
virtual const geometry::Geometry * | Geometry () const =0 |
Describes the geometry of this entity. More... | |
virtual base::RefEl | RefEl () const =0 |
Describes the reference element type of this entity. More... | |
virtual bool | operator== (const Entity &rhs) const =0 |
Check if two entities are the same. More... | |
bool | operator!= (const Entity &rhs) const |
Check if two entities are different. More... | |
virtual | ~Entity ()=default |
Virtual Destructor. More... | |
Private Types | |
using | size_type = mesh::Mesh::size_type |
Private Attributes | |
size_type | index_ = -1 |
std::unique_ptr< geometry::Geometry > | geometry_ |
std::array< const Point *, 2 > | nodes_ {} |
Entity * | this_ = nullptr |
Static Private Attributes | |
static constexpr std::array< lf::mesh::Orientation, 2 > | endpoint_ori_ |
Additional Inherited Members | |
![]() | |
Entity ()=default | |
Entity (const Entity &)=default | |
Entity (Entity &&)=default | |
Entity & | operator= (const Entity &)=default |
Entity & | operator= (Entity &&)=default |
![]() | |
void | PrintInfo (std::ostream &stream, const lf::mesh::Entity &e, int output_ctrl=0) |
Prints info about an entity. More... | |
An edge object for a 2D hybrid mesh.
An topological edge object is define through two distinct references to node objects of the mesh. Their ordering reflects the intrinsic orientation of the mesh
Segment
object owns a smart pointer to an associated geometry object.
|
private |
|
default |
default constructors, needed by std::vector
|
delete |
|
defaultnoexcept |
|
inlineexplicit |
constructor, is called from MeshFactory
index | index of the entity to be created; will usually be retrieved via the Index() method of Mesh |
geometry | pointer to a geometry object providing the shape of the edge |
endpoint0 | pointer to the first node |
endpoint1 | pointer to the second node |
|
overridedefault |
|
inlineoverridevirtual |
an edge is an entity of co-dimension 1
Implements lf::mesh::Entity.
|
inlineoverridevirtual |
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.
Implements lf::mesh::Entity.
Definition at line 102 of file segment.h.
References geometry_.
|
inline |
|
inlineoverridevirtual |
Check if two entities are the same.
rhs | Check if this entity is the same as the rhs entity. |
Implements lf::mesh::Entity.
|
inlineoverridevirtual |
Describes the reference element type of this entity.
Implements lf::mesh::Entity.
Definition at line 105 of file segment.h.
References lf::base::RefEl::kSegment().
|
inlineoverridevirtual |
Access to relative orientations of endpoints.
This method just returns {+,-}, because points always have the intrinsic orientation + and the orientation of an edge is defined through the ordering of its vertices.
Implements lf::mesh::Entity.
Definition at line 90 of file segment.h.
References endpoint_ori_.
|
overridevirtual |
Access to all subentities selected by relative co-dimension.
rel_codim | if 1 select endnodes, if 0 select edge itself |
Implements lf::mesh::Entity.
Definition at line 14 of file segment.cc.
|
staticconstexprprivate |
Definition at line 120 of file segment.h.
Referenced by RelativeOrientations().
|
private |
Definition at line 117 of file segment.h.
Referenced by Geometry().
|
private |
|
private |
Definition at line 118 of file segment.h.
Referenced by SubEntities().
|
private |
Definition at line 119 of file segment.h.
Referenced by SubEntities().