LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Describes a trilateral cell for a 2D hybrid mesh. More...
#include <lf/mesh/hybrid2d/triangle.h>
Public Member Functions | |
Triangle ()=default | |
default constructors, needed by std::vector | |
Triangle (size_type index, std::unique_ptr< geometry::Geometry > &&geometry, const Point *corner0, const Point *corner1, const Point *corner2, const Segment *edge0, const Segment *edge1, const Segment *edge2) | |
constructor, is called from MeshFactory | |
unsigned | Codim () const override |
an edge is an entity of co-dimension 1 | |
size_type | index () const |
access to index of an entity | |
std::span< const Entity *const > | SubEntities (unsigned rel_codim) const override |
Access to all subentities selected by relative co-dimension. | |
std::span< const lf::mesh::Orientation > | RelativeOrientations () const override |
Access to relative orientations of edges. | |
~Triangle () override=default | |
Default and disabled constructors | |
Triangle (const Triangle &)=delete | |
Triangle (Triangle &&) noexcept=default | |
Triangle & | operator= (const Triangle &)=delete |
Triangle & | operator= (Triangle &&) noexcept=default |
Standard methods of an Entity object | |
| |
const geometry::Geometry * | Geometry () const override |
Describes the geometry of this entity. | |
base::RefEl | RefEl () const override |
Describes the reference element type of this entity. | |
bool | operator== (const mesh::Entity &rhs) const override |
Check if two entities are the same. | |
![]() | |
bool | operator!= (const Entity &rhs) const |
Check if two entities are different. | |
virtual | ~Entity ()=default |
Virtual Destructor. | |
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 *, 3 > | nodes_ {} |
std::array< const Segment *, 3 > | edges_ {} |
std::array< lf::mesh::Orientation, 3 > | edge_ori_ {} |
Entity * | this_ = nullptr |
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. | |
Describes a trilateral cell for a 2D hybrid mesh.
A trilateral cell is defined by ordered lists of references to its nodes and its edges; internal consistency is required
Segment
object owns a smart pointer to an associated geometry object. Definition at line 28 of file triangle.h.
|
private |
Definition at line 29 of file triangle.h.
|
default |
default constructors, needed by std::vector
|
delete |
|
defaultnoexcept |
|
explicit |
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 cell |
corner0 | pointer to first node |
corner1 | pointer to second node |
corner2 | pointer to third node |
edge0 | pointer to first edge |
edge1 | pointer to second edge |
edge2 | pointer to third edge |
The sub-entities have to be consistent according to the conventions fixed for a reference element of type kTria
.
Definition at line 16 of file triangle.cc.
|
overridedefault |
|
inlineoverridevirtual |
an edge is an entity of co-dimension 1
Implements lf::mesh::Entity.
Definition at line 68 of file triangle.h.
|
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 95 of file triangle.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.
Definition at line 101 of file triangle.h.
|
inlineoverridevirtual |
Describes the reference element type of this entity.
Implements lf::mesh::Entity.
Definition at line 98 of file triangle.h.
References lf::base::RefEl::kTria().
|
inlineoverridevirtual |
Access to relative orientations of edges.
Implements lf::mesh::Entity.
Definition at line 86 of file triangle.h.
References edge_ori_.
|
overridevirtual |
Access to all subentities selected by relative co-dimension.
rel_codim | if 1 select edges, if 2 select nodes, if 0 select cell itself |
Implements lf::mesh::Entity.
Definition at line 81 of file triangle.cc.
|
private |
Definition at line 114 of file triangle.h.
Referenced by RelativeOrientations().
|
private |
Definition at line 112 of file triangle.h.
Referenced by SubEntities().
|
private |
Definition at line 110 of file triangle.h.
Referenced by Geometry().
|
private |
Definition at line 109 of file triangle.h.
Referenced by index().
|
private |
Definition at line 111 of file triangle.h.
Referenced by SubEntities().
|
private |
Definition at line 115 of file triangle.h.
Referenced by SubEntities().