LifeV
MeshElementBareHandler< BareItemType > Class Template Reference

MeshElementBareHandler class - Class to handle bare edges and faces construction. More...

#include <MeshElementBare.hpp>

+ Inheritance diagram for MeshElementBareHandler< BareItemType >:
+ Collaboration diagram for MeshElementBareHandler< BareItemType >:

Private Attributes

UInt M_idCount
 

Public Types

typedef BareItemType bareItem_Type
 
typedef std::map< bareItem_Type, UInt, cmpBareItem< bareItem_Type > > container_Type
 
typedef container_Type::iterator containerIterator_Type
 
typedef container_Type::const_iterator containerConstIterator_Type
 
typedef std::pair< const bareItem_Type, UIntvalue_Type
 

Constructors & Destructor

 MeshElementBareHandler ()
 Empty Constructor. More...
 

Methods

bool isThere (bareItem_Type const &item) const
 Method to ask if an item already exists. More...
 
std::pair< ID, bool > addIfNotThere (bareItem_Type const &item)
 Method that adds a BareItem if it is not already there and automatically generates the ID. More...
 
std::pair< ID, bool > addIfNotThere (bareItem_Type const &item, const ID id)
 Method that adds a bareItem_Type if it is not already there and assigns the ID. More...
 
bool deleteIfThere (bareItem_Type const &item)
 Method that removes a bareItem_Type if it is there (the ID is then lost) More...
 
bool isThereDel (bareItem_Type const &item)
 Method that removes a bareItem_Type if it is there (the ID is then lost) More...
 
UInt howMany () const
 Method that counts how many items are stored. More...
 
UInt maxId () const
 Method that returns the maximum id currently in use. More...
 
void showMe () const
 Method that writes info in output. More...
 
ID id (bareItem_Type const &item) const
 Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist. More...
 

Set Methods

bool setId (bareItem_Type const &item, const ID &id)
 Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist. More...
 
bool setId (bareItem_Type const &item, ID const id)
 Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist. More...
 

Detailed Description

template<typename BareItemType>
class LifeV::MeshElementBareHandler< BareItemType >

MeshElementBareHandler class - Class to handle bare edges and faces construction.

Author
Luca Formaggia
See also

This class handles mesh bare edges and faces construction. Used only in mesh builders A MeshElementBareHandler is a specialisation of a STL map which holds the pair formed by a bareitem and its ID. The ID is automatically generated if one uses the method addIfNotThere

Definition at line 557 of file MeshElementBare.hpp.

Member Typedef Documentation

◆ bareItem_Type

typedef BareItemType bareItem_Type

Definition at line 562 of file MeshElementBare.hpp.

◆ container_Type

Definition at line 563 of file MeshElementBare.hpp.

◆ containerIterator_Type

typedef container_Type::iterator containerIterator_Type

Definition at line 564 of file MeshElementBare.hpp.

◆ containerConstIterator_Type

typedef container_Type::const_iterator containerConstIterator_Type

Definition at line 565 of file MeshElementBare.hpp.

◆ value_Type

typedef std::pair<const bareItem_Type, UInt> value_Type

Definition at line 566 of file MeshElementBare.hpp.

Constructor & Destructor Documentation

◆ MeshElementBareHandler()

Empty Constructor.

Definition at line 681 of file MeshElementBare.hpp.

Member Function Documentation

◆ isThere()

bool isThere ( bareItem_Type const &  item) const
inline

Method to ask if an item already exists.

Parameters
itemItem we are looking for
Returns
True if the item has been found, False otherwise

Definition at line 691 of file MeshElementBare.hpp.

◆ addIfNotThere() [1/2]

std::pair< ID, bool > addIfNotThere ( bareItem_Type const &  item)
inline

Method that adds a BareItem if it is not already there and automatically generates the ID.

Parameters
itemItem to be added
Returns
a pair composed of the ID of the added item and a boolean value which is True if the item has been successfully added and False otherwise

Definition at line 699 of file MeshElementBare.hpp.

◆ addIfNotThere() [2/2]

std::pair< ID, bool > addIfNotThere ( bareItem_Type const &  item,
const ID  id 
)
inline

Method that adds a bareItem_Type if it is not already there and assigns the ID.

Parameters
itemItem to be added
idID to be assigned to the item
Returns
a pair composed of the ID of the added item and a boolean value which is True if the item has been successfully added and False otherwise

Definition at line 713 of file MeshElementBare.hpp.

◆ deleteIfThere()

bool deleteIfThere ( bareItem_Type const &  item)

Method that removes a bareItem_Type if it is there (the ID is then lost)

Parameters
itemItem to be removed
Returns
True if the item has been erased and False otherwise

Definition at line 722 of file MeshElementBare.hpp.

◆ isThereDel()

bool isThereDel ( bareItem_Type const &  item)

Method that removes a bareItem_Type if it is there (the ID is then lost)

Deprecated:
Parameters
itemItem to be removed
Returns
True if the item has been erased and False otherwise

◆ howMany()

UInt howMany ( ) const
inline

Method that counts how many items are stored.

Returns
the number of entities actually stored

Definition at line 730 of file MeshElementBare.hpp.

◆ maxId()

UInt maxId ( ) const
inline

Method that returns the maximum id currently in use.

Returns
the maximum id currently in use

Definition at line 625 of file MeshElementBare.hpp.

◆ showMe()

void showMe ( ) const
inline

Method that writes info in output.

Definition at line 737 of file MeshElementBare.hpp.

◆ id()

ID id ( bareItem_Type const &  item) const
inline

Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist.

Parameters
itemItem we are looking for
Returns
ID of the item. 0 if the item doesn't exist

Definition at line 748 of file MeshElementBare.hpp.

◆ setId() [1/2]

bool setId ( bareItem_Type const &  item,
const ID id 
)

Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist.

Parameters
itemItem to modify
idnew ID to assign to item
Returns
True if the item has been found and modified, False otherwise

◆ setId() [2/2]

bool setId ( bareItem_Type const &  item,
ID const  id 
)
inline

Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist.

Deprecated:
Parameters
itemItem to modify
idnew ID to assign to item
Returns
True if the item has been found and modified, False otherwise

Definition at line 768 of file MeshElementBare.hpp.

Field Documentation

◆ M_idCount

UInt M_idCount
private

Definition at line 670 of file MeshElementBare.hpp.


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