119 #ifndef MESHELEMENTBARE_H 120 #define MESHELEMENTBARE_H 1
125 #include <lifev/core/LifeV.hpp> 126 #include <lifev/core/mesh/ElementShapes.hpp> 144 typedef unsigned int UInt;
258 return std::make_pair ( BareEdge ( i, j ),
true );
262 return std::make_pair ( BareEdge ( j, i ),
false );
283 bareEdge
.first = i < j ? i : j;
379 return edge1
== edge2 || edge1
> edge2;
399 return edge1
== edge2 || edge1
< edge2;
427 template <
typename T>
500 template<
typename Shape>
508 return std::make_pair (BareVertex (points[0]),
true);
518 return makeBareEdge (points[0], points[1]);
529 return makeBareFace (points[0], points[1], points[2]);
539 return makeBareFace (points[0], points[1], points[2], points[3]);
556 template <
typename BareItemType>
680 template <
class BareItemType>
688 template <
class BareItemType>
693 return find ( item ) != container_Type::end();
696 template <
class BareItemType>
701 std::pair<
typename MeshElementBareHandler<BareItemType>::containerIterator_Type,
bool> i (
this->insert ( std::make_pair ( item, M_idCount ) ) );
707 return std::make_pair ( ( i.first )->second, i.second );
710 template <
class BareItemType>
715 std::pair<
typename MeshElementBareHandler<BareItemType>::containerIterator_Type,
bool> i (
this->insert ( std::make_pair ( item, id ) ) );
717 ( i.first ) ->second = id;
718 return std::make_pair ( id, i.second );
720 template <
class BareItemType>
724 return this->erase ( item ) != 0;
727 template <
class BareItemType>
732 return container_Type::size();
735 template <
typename BareItemType>
739 std::cout <<
"MeshElementBareHandler: " << std::endl;
740 std::cout <<
"Number of Items stored: " <<
this->size() << std::endl;
741 std::cout <<
"Max Id stored : " <<
this->maxId() << std::endl;
742 std::cout <<
"End of Information";
745 template <
class BareItemType>
750 containerConstIterator_Type i =
this->find ( item );
751 if ( i != container_Type::end() )
765 template <
class BareItemType>
770 containerConstIterator_Type i = find ( item );
771 if ( i != container_Type::end() )
std::pair< BareEdge, bool > makeBareEdge(ID const i, ID const j)
It creates a BareEdge end returns the orientation of the created edge with respect to the given data...
ID second
Second ID which defines the BareFace.
ID id(bareItem_Type const &item) const
Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist. ...
BareItemType bareItem_Type
BareEdge setBareEdge(ID const i, ID const j)
It creates a BareEdge, ignoring orientation.
bool operator<(const BareFace &f1, const BareFace &f2)
BareVertex()
Empty Constructor.
MeshElementBareHandler()
Empty Constructor.
bool deleteIfThere(bareItem_Type const &item)
Method that removes a bareItem_Type if it is there (the ID is then lost)
BareFace(ID id, const BareEdge &edge)
Constructor that takes a BareEdge object and an ID. The face is then identified by the ID...
UInt maxId() const
Method that returns the maximum id currently in use.
bool operator!=(const BareEdge &edge1, const BareEdge &edge2)
inequality
static std::pair< BareEdge, bool > makeBareEntity(const ID points[])
BareFace(ID i, ID j, ID k)
Constructor that takes the ID's as parameter.
bool operator==(const BareFace &face1, const BareFace &face2)
equality
bool operator()(const BareEdge &edge1, const BareEdge &edge2) const
bool operator()(const BareVertex &vertex1, const BareVertex &vertex2) const
BareVertex(ID i)
Constructor that takes the ID's as parameter.
void updateInverseJacobian(const UInt &iQuadPt)
UInt howMany() const
Method that counts how many items are stored.
std::pair< const bareItem_Type, UInt > value_Type
ID first
ID which defines the Point.
bool isThere(bareItem_Type const &item) const
Method to ask if an item already exists.
std::pair< BareFace, bool > makeBareFace(ID const i, ID const j, ID const k, ID const l)
It creates Bare Face objects from four Point ID's. To be used with Quad faces.
bool operator<(const BareEdge &edge1, const BareEdge &edge2)
less than
ID first
First ID which defines the Edge.
bool operator()(const BareFace &face1, const BareFace &face2) const
void showMe() const
Method that writes info in output.
bool operator>=(const BareEdge &edge1, const BareEdge &edge2)
greater-equal than
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. ...
BareEdge()
Empty Constructor.
BareEdge setBareEdgeNo(ID const i, ID const j)
It creates a non-standard BareEdge.
BareVertex bareEntity_Type
static std::pair< BareFace, bool > makeBareEntity(const ID points[])
static std::pair< BareVertex, bool > makeBareEntity(const ID points[])
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...
container_Type::const_iterator containerConstIterator_Type
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.
bool operator>(const BareEdge &edge1, const BareEdge &edge2)
greater than
ID third
Third ID which defines the BareFace.
static std::pair< BareFace, bool > makeBareEntity(const ID points[])
bool operator==(const BareEdge &edge1, const BareEdge &edge2)
equality
ID first
First ID which defines the BareFace.
bool operator!=(const BareFace &face1, const BareFace &face2)
inequality
std::map< bareItem_Type, UInt, cmpBareItem< bareItem_Type > > container_Type
std::pair< BareFace, bool > makeBareFace(ID const i, ID const j, ID const k)
It creates Bare Face objects from three Point ID's.
BareFace()
Empty Constructor.
ID second
Second ID which defines the Edge.
bool isThereDel(bareItem_Type const &item)
Method that removes a bareItem_Type if it is there (the ID is then lost)
BareEdge(ID i, ID j)
Constructor that takes the ID's as parameter.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
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. ...
BareEntitySelector class - Select the proper bare entity type (bareEdge or bareFace) based on the num...
bool operator<=(const BareEdge &edge1, const BareEdge &edge2)
less-equal than