LifeV
MeshElement< GeoShape, PointType > Class Template Reference

MeshVertex - Zero dimensional entity. More...

#include <MeshElement.hpp>

+ Inheritance diagram for MeshElement< GeoShape, PointType >:
+ Collaboration diagram for MeshElement< GeoShape, PointType >:

Private Attributes

point_Type const * M_points [GeoShape::S_numPoints]
 

Public Types

typedef GeoShape geoShape_Type
 
typedef PointType point_Type
 
static const UInt S_numLocalPoints = GeoShape::S_numPoints
 Number of points associated to the entity. More...
 
static const UInt S_numLocalVertices = GeoShape::S_numVertices
 Number of Vertices associated to the entity. More...
 

Constructor & Destructor

 MeshElement ()
 Empty Constructor. More...
 
 MeshElement (ID identity)
 Declares item identity. More...
 
 MeshElement (const MeshElement< GeoShape, PointType > &element)
 Copy constructor. More...
 
 ~MeshElement ()
 Destructor. More...
 

Operators

MeshElementoperator= (MeshElement const &element)
 The equivalence operator. More...
 

Methods

std::ostream & showMe (bool verbose=false, std::ostream &c=std::cout) const
 Display general information about the content of the class. More...
 
void swapPoints (const ID &firstIdentity, const ID &secondIdentity)
 Swap Points. More...
 
void reversePoints ()
 Reverses the points of the element. More...
 
void exchangePoints (const ID oldToNew[GeoShape::S_numPoints])
 Exchange points. More...
 
point_Type const & point (ID const identity) const
 Returns the point of identity indicated in the argument. More...
 
point_Type const & reversepoint (ID const identity) const
 Returns the point of identity indicated in the argument. More...
 

Set Methods

void setPoint (ID const identity, point_Type const &point)
 Inserts a point using point references. More...
 
bool setPointWithBoundaryCheck (ID const identity, point_Type const &point)
 Inserts a point using point references with forced boundary check. More...
 
void setPoint (ID const identity, point_Type const *point)
 Inserts a point using pointers. More...
 
bool setPointWithBoundaryCheck (ID const identity, point_Type const *point)
 Inserts a point using pointers with forced boundary check. More...
 
markerID_Type setStrongerMarkerIDAtPoint (const ID &identity, markerID_Type const &flag) const
 Sets the Marker ID of a point. More...
 

Get Methods

point_Type const * points () const
 Returns the points vector. More...
 

Additional Inherited Members

- Public Types inherited from MeshEntity
enum  SwitchId { LOCALID = 0, GLOBALID = 1 }
 Indicator for local or global id. More...
 
- Public Member Functions inherited from MeshEntity
 MeshEntity ()
 Empty Constructor. More...
 
 MeshEntity (const ID &id, const flag_Type &flag=EntityFlags::DEFAULT)
 Constructor with a single value for both identifiers. More...
 
 MeshEntity (const ID &id, const ID &lid, const flag_Type &flag=EntityFlags::DEFAULT)
 Full constructor, where both identifiers are specified. More...
 
 MeshEntity (const ID &id, const bool &boundary)
 backward-compatible constructor More...
 
virtual ~MeshEntity ()
 Destructor. More...
 
void showMe (std::ostream &output=std::cout) const
 Displays the informations stored by this class. More...
 
void setId (const ID &id)
 Method to set the global identifier. More...
 
void setLocalId (const ID &id)
 Method to set the local identifier. More...
 
void setBoundary (const bool &boundary)
 Set method for the boundary indicator. More...
 
void replaceFlag (const flag_Type &flag)
 Replace method for the entity flag. More...
 
void setFlag (const flag_Type &flag)
 Sets a flag. More...
 
void unSetFlag (const flag_Type &flag)
 Remove a flag. More...
 
const IDid () const
 Method to get the global identifier. More...
 
const IDlocalId () const
 Method to get the local identifier. More...
 
bool boundary () const
 Tells if it is on the boundary. More...
 
bool isOwned () const
 Tells if the entity is owned by current process. More...
 
const flag_Typeflag () const
 returns the entity flag More...
 

Detailed Description

template<typename GeoShape, typename PointType = MeshVertex>
class LifeV::MeshElement< GeoShape, PointType >

MeshVertex - Zero dimensional entity.

Author
Luca Formaggia

Base class for Multidimensional basis Geometric Entities.

Warning
It has no boundary information, in fact GeoXD boundary items are stored in the corresponding RegionMesh List.

Definition at line 59 of file MeshElement.hpp.

Member Typedef Documentation

◆ geoShape_Type

typedef GeoShape geoShape_Type

Definition at line 73 of file MeshElement.hpp.

◆ point_Type

typedef PointType point_Type

Definition at line 74 of file MeshElement.hpp.

Constructor & Destructor Documentation

◆ MeshElement() [1/3]

Empty Constructor.

Definition at line 240 of file MeshElement.hpp.

◆ MeshElement() [2/3]

MeshElement ( ID  identity)
explicit

Declares item identity.

Parameters
IdentityElement identity

Definition at line 247 of file MeshElement.hpp.

◆ MeshElement() [3/3]

MeshElement ( const MeshElement< GeoShape, PointType > &  element)

Copy constructor.

Parameters
ElementMeshElement to be copied

Definition at line 254 of file MeshElement.hpp.

◆ ~MeshElement()

Destructor.

Definition at line 265 of file MeshElement.hpp.

Member Function Documentation

◆ operator=()

MeshElement< GeoShape, PointType > & operator= ( MeshElement< GeoShape, PointType > const &  element)

The equivalence operator.

Parameters
ElementEquivalent MeshElementMarked0D
Returns
Reference to a new MeshElementMarked0D with the same content of MeshElementMarked0D Element

Definition at line 272 of file MeshElement.hpp.

◆ showMe()

std::ostream & showMe ( bool  verbose = false,
std::ostream &  c = std::cout 
) const

Display general information about the content of the class.

List of things displayed in the class

Parameters
verboseIf true more information is displayed
cOutput

Definition at line 287 of file MeshElement.hpp.

◆ swapPoints()

void swapPoints ( const ID firstIdentity,
const ID secondIdentity 
)

Swap Points.

Parameters
firstIdentityIdentity of the first point to be swapped
secondIdentityIdentity of the second point to be swapped
Warning
Function to be used only by routines for checking or amending meshes

Definition at line 308 of file MeshElement.hpp.

◆ reversePoints()

void reversePoints ( )

Reverses the points of the element.

Useful in the phase of building a mesh if you want to change the orientation of the element. First point becomes last etc.etc

Note
Beware that the some adjacency list may be invalidated. If you revert the point of a 3D element, for instance, the local faces change and a elementToFace list may be now incorrect. So this method must be used with care and only when building the basic entities of a mesh.

Definition at line 314 of file MeshElement.hpp.

◆ exchangePoints()

void exchangePoints ( const ID  oldToNew[GeoShape::S_numPoints])

Exchange points.

Exchanges points according to a list of old-to-new local identity numbering

Parameters
oldToNewNew local identity of a point
Warning
Function to be used only by routines for checking or amending meshes

Definition at line 331 of file MeshElement.hpp.

◆ point()

PointType const & point ( ID const  identity) const
inline

Returns the point of identity indicated in the argument.

Parameters
identityIdentity of the point
Returns
reference to a point object, possibly derived from point_Type

Definition at line 346 of file MeshElement.hpp.

+ Here is the caller graph for this function:

◆ reversepoint()

PointType const & reversepoint ( ID const  identity) const
inline

Returns the point of identity indicated in the argument.

It starts from the last point and it follows the rule: vertices first. It may be used to access the points of a Geometry Element in a reverse way (i.e. with the opposite MeshElementMarked orientation)

Parameters
identityIdentity of the point
Returns
reference to a point object, possibly derived from point_Type

Definition at line 354 of file MeshElement.hpp.

◆ setPoint() [1/2]

void setPoint ( ID const  identity,
point_Type const &  point 
)
inline

Inserts a point using point references.

Parameters
identityIdentity of the point to be inserted
pointPoint to be inserted

Definition at line 362 of file MeshElement.hpp.

◆ setPointWithBoundaryCheck() [1/2]

bool setPointWithBoundaryCheck ( ID const  identity,
point_Type const &  point 
)

Inserts a point using point references with forced boundary check.

Parameters
identityIdentity of the point to be inserted
pointPoint to be inserted
Returns
TRUE if the point is set

Definition at line 369 of file MeshElement.hpp.

◆ setPoint() [2/2]

void setPoint ( ID const  identity,
point_Type const *  point 
)
inline

Inserts a point using pointers.

Parameters
identityIdentity of the point to be inserted
pointPoint to be inserted

Definition at line 382 of file MeshElement.hpp.

◆ setPointWithBoundaryCheck() [2/2]

bool setPointWithBoundaryCheck ( ID const  identity,
point_Type const *  point 
)

Inserts a point using pointers with forced boundary check.

Parameters
identityIdentity of the point to be inserted
pointPoint to be inserted
Returns
%%%%

Definition at line 389 of file MeshElement.hpp.

◆ setStrongerMarkerIDAtPoint()

markerID_Type setStrongerMarkerIDAtPoint ( const ID identity,
markerID_Type const &  flag 
) const

Sets the Marker ID of a point.

Sets the Marker ID the stronger between the stored one and the one provided by the argument

Parameters
identityElemental numbering of the point to be inserted
pointPoint to be inserted
Returns
TRUE if the point is set
Warning
A const_cast to M_points is done

Definition at line 401 of file MeshElement.hpp.

◆ points()

point_Type const* points ( ) const
inline

Returns the points vector.

The method allows to access coordinates but not modify them

Returns
Points vector

Definition at line 218 of file MeshElement.hpp.

Field Documentation

◆ S_numLocalPoints

const UInt S_numLocalPoints = GeoShape::S_numPoints
static

Number of points associated to the entity.

Definition at line 69 of file MeshElement.hpp.

◆ S_numLocalVertices

const UInt S_numLocalVertices = GeoShape::S_numVertices
static

Number of Vertices associated to the entity.

Definition at line 71 of file MeshElement.hpp.

◆ M_points

point_Type const* M_points[GeoShape::S_numPoints]
private

Definition at line 226 of file MeshElement.hpp.


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