LifeV
|
This is the base class to store basic properties of any mesh entity. More...
#include <MeshEntity.hpp>
Public Types | |
enum | SwitchId { LOCALID = 0, GLOBALID = 1 } |
Indicator for local or global id. More... | |
Private Attributes | |
ID | M_id |
ID | M_localId |
flag_Type | M_flag |
Constructors & Destructor | |
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... | |
Methods | |
void | showMe (std::ostream &output=std::cout) const |
Displays the informations stored by this class. More... | |
Set Methods | |
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... | |
Get Methods | |
const ID & | id () const |
Method to get the global identifier. More... | |
const ID & | localId () 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_Type & | flag () const |
returns the entity flag More... | |
This is the base class to store basic properties of any mesh entity.
The basic properties of a mesh entity is to have identifiers and flags. Identifiers give information about the numbering of the entity (typically in a mesh) flags are attributes af the entity, like being on the boundary.
In this class, there are two identifiers stored:
When running the code in serial (1 processor), the identifiers are then the same (but this is not necessary)
This class provides the method and operators to handle local and global identifiers easily.
Note: Documentation by Samuel Quinodoz, implementation anterior to the documentation: Luca Formaggia
The additional fag that is stored is used to specify geometrical properties of the entity such as the ones specified above in the EntityFlags namespace.
Definition at line 97 of file MeshEntity.hpp.
enum SwitchId |
Indicator for local or global id.
This enum helps to develop methods to operate on local or globalID
Enumerator | |
---|---|
LOCALID | |
GLOBALID |
Definition at line 105 of file MeshEntity.hpp.
|
inline |
Empty Constructor.
Using this constructor, both identifiers are set to NotAnId.
Definition at line 113 of file MeshEntity.hpp.
|
inline |
Constructor with a single value for both identifiers.
id | The value for both identifers. |
flag | The value of the flag to assign (optional) |
Definition at line 124 of file MeshEntity.hpp.
|
inline |
Full constructor, where both identifiers are specified.
id | The value for the global ID. |
lid | The value for the local ID. |
flag | The value of the flag to assign (optional) |
Definition at line 136 of file MeshEntity.hpp.
|
inline |
backward-compatible constructor
id | The identifier to be set for both (global and local) identifiers. Use a set method if you want different identifiers. |
boundary | The value of the boundary indicator. |
Definition at line 148 of file MeshEntity.hpp.
|
inlinevirtual |
Destructor.
Definition at line 159 of file MeshEntity.hpp.
void showMe | ( | std::ostream & | output = std::cout | ) | const |
Displays the informations stored by this class.
Definition at line 39 of file MeshEntity.cpp.
|
inline |
Method to set the global identifier.
id | The new global identifier. |
Definition at line 178 of file MeshEntity.hpp.
|
inline |
Method to set the local identifier.
id | The new local identifier. |
Definition at line 187 of file MeshEntity.hpp.
|
inline |
Set method for the boundary indicator.
boundary | The value to be set for the boundary indicator. |
Definition at line 196 of file MeshEntity.hpp.
|
inline |
Replace method for the entity flag.
flag | The value to be set for the entity flag. |
Definition at line 213 of file MeshEntity.hpp.
|
inline |
|
inline |
|
inline |
Method to get the global identifier.
Definition at line 245 of file MeshEntity.hpp.
|
inline |
Method to get the local identifier.
Definition at line 254 of file MeshEntity.hpp.
|
inline |
Tells if it is on the boundary.
Definition at line 260 of file MeshEntity.hpp.
|
inline |
Tells if the entity is owned by current process.
Definition at line 266 of file MeshEntity.hpp.
|
inline |
returns the entity flag
Definition at line 272 of file MeshEntity.hpp.
|
private |
Definition at line 280 of file MeshEntity.hpp.
|
private |
Definition at line 281 of file MeshEntity.hpp.
|
private |
Definition at line 282 of file MeshEntity.hpp.