LifeV
MeshElementBare.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief Special routines to read meshes and special structures for
30  sides and faces handling
31 
32  Classes BareFace and BareEdge have been created to give an UNIQUE
33  Representation for mesh faces and edges and thus allow the construction
34  of global tables or fields.
35 
36  @author Luca Formaggia <luca.formaggia@polimi.it>
37  @contributor Luca Bertagna <lbertag@emory.edu>
38  @contributor Lucia Mirabella <lucia.mirabell@gmail.com>
39  @maintainer Lucia Mirabella <lucia.mirabell@gmail.com>
40 
41  @date 19-08-1999
42 
43  Classes BareFace and BareEdge have been created to give an UNIQUE internal
44  representation for mesh faces and edges, allowing thus the construction of
45  DOF objects (which are naturally linked to mesh entities).
46 
47  \par Introduction
48 
49  One of the paradigms chosen for the development of this library is the fact
50  that degrees of freedom (DOF) are linked to geometrical entities. Now if
51  we have degrees of freedom associated, for instance, to an Edge (like in
52  a P2 Tetra) in order to build the global numbering of the DOF and the
53  association between local (element-wise) and global numbering, we need to
54  identify edges and give them a unique ID. Yet, we may not want to
55  build a full Edge (MeshElementMarked2D) object: we only need
56  the ID of the edge and a way of computing the ID's of the degrees of
57  freedom on the edge, all the remaining data of a full Edge object is not
58  necessarily needed.
59 
60  Another related problem is how to uniquely identify a face or an edge in the mesh.
61 
62  The dilemma has been resolved by creating the concept of a BareEdge and
63  BareFace (bare geometry items). A bare geometry item is formed by the
64  minimal information required to uniquely identify it, namely 2
65  <tt>Point</tt>'s ID 's for an edge and 3 <tt>Point</tt>'s ID 's for the
66  Faces (it is enough also for Quad faces!). We build the bare items by
67  looping through the elements and obviously we make sure that the BareItem
68  ID is consistent with that of the corresponding ``full item'' if the latter
69  has been instantiated.
70 
71  Another <em>very important</em> issue is that of orientation. There are
72  different ways of considering orientation of a Face or an Edge. The first is
73  the <em>local</em> orientation of a Face or Edge of the reference finite
74  element. This is conventionally chosen when designing the finite
75  elements. For the faces, we have adopted the convention that the local
76  positive orientation is such that the face normal calculated with the right
77  hand rule is <em>outwardly</em> oriented. As for the edges, the local
78  orientation for a 3D element is more arbitrary.
79 
80  However, for a 2D element, the positive orientation of an Edge is the one
81  which is in accordance with the right hand rule applied to that element.
82 
83  When a Face or an edge is <em>active</em>, i.e. is effectively stored in
84  the mesh, then there is another obvious orientation, of global rather than
85  local nature: that induced by the way the edge or face is stored. For
86  boundary elements (faced in 3D or edges in 2D) it is compulsory that the
87  orientation of the stored item be consistent with the convention chosen for
88  the orientation of the domain boundary. More precisely, boundary elements
89  are stored so that the normal (always calculated following the right hand
90  rule) is outward with respect to the domain.
91 
92  However, there is the need of defining a <em>global</em> orientation also
93  for <em>non active</em> entities. This because we do not always store all
94  faces and all edges. We need then to choose a unique way to identify the
95  orientation of an Edge or of a Face <em>independently </em> from the fact
96  that they are active or not. We will call this orientation the <em>natural </em>
97  orientation. We have chosen the following convention for natural orientation
98  of faces and edges
99 
100  <ul>
101  <li>The positive natural orientation of an <em>Edge</em> is given by \f$V_{min} \rightarrow V_{max} \f$,
102  \f$V_{min}\f$ being the Edge Vertex with smallest ID</li>
103 
104  <li>The positive natural orientation of a <em>Face</em> is given by the cicle
105  \f$V_{min} \rightarrow V_2\rightarrow V_3 \f$,
106  \f$V_{min}\f$ being the Face Vertex with smallest ID, \f$V_2\f$ the second smallest
107  and \f$V_2\f$ the thirsd smallest.</li>
108  </ul>
109 
110  Note that the latter definition applies both to triangular and to quad faces.
111 
112  \warning If I want to associate boundary conditions I need the active
113  entity, since BareEdges do not store Marker data. (This is why the
114  RegionMesh classes treat boundary items in a rather special way).
115 
116 
117  */
118 
119 #ifndef MESHELEMENTBARE_H
120 #define MESHELEMENTBARE_H 1
121 
122 #include <utility>
123 #include <algorithm>
124 
125 #include <lifev/core/LifeV.hpp>
126 #include <lifev/core/mesh/ElementShapes.hpp>
127 
128 namespace LifeV
129 {
130 #ifndef _LIFEV_HH_
131 /*! \typedef typedef unsigned int ID
132 \brief type used for Identifiers (Integral type in the range [0, MAX_INT]).
133 All principal items handled by the library have an identified, which is an
134 unsigned integer <em>greater or equal to one</em>
135  */
136 // more correct version
137 typedef size_t ID;
138 // original version
139 //typedef unsigned int ID;
140 //! I define UInt=unsigned int. This allow to use this stuff also outside lifeV
141 // more correct version
142 //typedef size_t UInt;
143 // original version
144 typedef unsigned int UInt;
145 #endif
146 
147 
148 //! The Vertex basis class
149 /*! It contains only the ID of the vertex. It is used in 1D geometries for compatibility with more complex entities in 2D and 3D geometries.
150  */
152 {
153  //! @name Constructor & Destructor
154  //@{
155  //! Empty Constructor
157  {}
158  ;
159  //! Constructor that takes the ID's as parameter
160  /*!
161  @param i ID of the point
162  */
163  BareVertex ( ID i ) : first ( i )
164  {}
165  ;
166  //@}
167  ID first; //!< ID which defines the Point
168 };
169 
170 //! The Edge basis class
171 /*! It contains the attributes common to all Edges. In particular, it
172 contains the two ID's (first and second) of the points at the two ends
173 of the edge.
174 \invariant first < second
175  */
176 struct BareEdge
177 {
178  //! @name Constructor & Destructor
179  //@{
180  //! Empty Constructor
182  {}
183  ;
184  //! Constructor that takes the ID's as parameter
185  /*!
186  @param i ID of the first node of the edge
187  @param j ID of the second node of the edge
188  */
189  BareEdge ( ID i, ID j ) : first ( i ), second ( j )
190  {}
191  ;
192  //@}
193  ID first; //!< First ID which defines the Edge
194  ID second; //!< Second ID which defines the Edge
195 };
196 
197 //! The base Face class
198 /*! It contains the attributes common to all Faces. In particular, a it contains three
199  ID's (first, second and third) of points at face vertex, chosen so
200  to uniquely identify the face.
201 \invariant first<second<third.
202  */
203 struct BareFace
204 {
205  //! @name Constructor & Destructor
206  //@{
207  //! Empty Constructor
209  {}
210  ;
211  //! Constructor that takes the ID's as parameter
212  /*!
213  @param i ID of the first node of the face
214  @param j ID of the second node of the face
215  @param k ID of the third node of the face
216  */
217  /// LF TO BE CHANGED. THIS CONSTRUCTOR MAY MAKE COMPARISON OPERATOR USELESS
218  //!
219  BareFace ( ID i, ID j, ID k ) : first ( i ), second ( j ), third ( k )
220  {}
221  ;
222  //! Constructor that takes a BareEdge object and an ID. The face is then identified by the ID
223  // of the Points on the BareEdge + the point identified by id
224  /*!
225  @param id of the third point defining the face
226  @param id of the edgedefining the face
227 
228  */
229  BareFace ( ID id, const BareEdge& edge ) : first ( id ), second ( edge.first ), third ( edge.second )
230  {}
231  ;
232  ID first; //!< First ID which defines the BareFace
233  ID second; //!< Second ID which defines the BareFace
234  ID third; //!< Third ID which defines the BareFace
235 };
236 
237 
238 //! \defgroup MeshElementBareBuilder Global functions to build Bare Items.
239 
240 /*! \ingroup MeshElementBareBuilder
241  \brief It creates a BareEdge end returns the orientation of the created edge with respect
242  to the given data.
243  @param i is a Point ID
244  @param j is a Point ID
245  @return a pair composed of the created BareEdge and a boolean value which is False if orientation has been changed, True otherwise
246 
247  The BareEdge that will be built is the one passing by <tt>i</tt> and
248  <tt>j</tt>. The orientation is i->j if the returned parameter is a
249  true.
250 
251  \pre i and j >=0, i!=j */
252 inline
253 std::pair<BareEdge, bool>
254 makeBareEdge ( ID const i, ID const j )
255 {
256  if ( i < j )
257  {
258  return std::make_pair ( BareEdge ( i, j ), true );
259  }
260  else
261  {
262  return std::make_pair ( BareEdge ( j, i ), false );
263  ;
264  }
265 }
266 
267 /*! \ingroup MeshElementBareBuilder
268  \brief It creates a BareEdge, ignoring orientation.
269  @param i is a Point ID
270  @param j is a Point ID
271  @return the BareEdge created
272 
273  The BareEdge that will be built is the one passing by <tt>i</tt> and <tt>j</tt>
274  A lighter version of MakeBareEdge, to be used
275  if orientation flag is not needed;
276  \pre i and j >0, i!=j
277  */
278 inline
279 BareEdge
280 setBareEdge ( ID const i, ID const j )
281 {
282  BareEdge bareEdge;
283  bareEdge.first = i < j ? i : j;
284  bareEdge.second = ( i - bareEdge.first ) + j;
285  return bareEdge;
286 }
287 
288 /*! \ingroup MeshElementBareBuilder
289  \brief It creates a non-standard BareEdge.
290  @param i is a Point ID
291  @param j is a Point ID
292  @return the BareEdge created
293 
294  \pre i and j >0
295 
296  Yet another lighter version of MakeBareEdge, without orientation, To be used for
297  non-oriented graphs.
298 
299  \warning It produces a BareEdge which does not comply with the invariant of the
300  class (first < second). It must be used only if the BareEdge class is NOT used to uniquely identify edges.
301  */
302 inline
303 BareEdge
304 setBareEdgeNo ( ID const i, ID const j )
305 {
306  return BareEdge ( i, j );
307 }
308 
309 
310 /*! \ingroup MeshElementBareBuilder
311  \brief It creates Bare Face objects from three Point ID's
312  \param i is a Point ID
313  \param j is a Point ID
314  \param k is a Point ID
315  @return a pair composed of the created BareFace and a boolean value which is False if orientation has been changed, True otherwise
316 
317  To be used for triangular faces.
318  \pre i, j and k >0. i!=j!=k
319 
320  */
321 std::pair<BareFace, bool> makeBareFace ( ID const i, ID const j, ID const k );
322 
323 /*! \ingroup MeshElementBareBuilder
324  \brief It creates Bare Face objects from four Point ID's. To be used with Quad faces.
325  \param i is a Point ID
326  \param j is a Point ID
327  \param k is a Point ID
328  \param l is a Point ID
329  @return a pair composed of the created BareFace and a boolean value which is False if orientation has been changed, True otherwise
330 
331  \remarks For quad faces the construction process is more complex. We start from
332  the smallest vertex and we take the first three vertices in the
333  sequence. We then proceede as for the triangles.
334 
335  */
336 std::pair<BareFace, bool> makeBareFace ( ID const i, ID const j, ID const k, ID const l );
337 
338 /*! \defgroup comparison Comparison Operators
339  Operators for comparing MeshElementBare
340  */
341 
342 /*! \ingroup comparison
343  \brief inequality
344  */
345 inline
346 bool
347 operator!= ( const BareEdge& edge1 , const BareEdge& edge2 )
348 {
349  return edge1.first != edge2.first || edge1.second != edge2.second;
350 }
351 
352 /*! \ingroup comparison
353  \brief equality
354  */
355 inline
356 bool
357 operator== ( const BareEdge& edge1 , const BareEdge& edge2 )
358 {
359  return edge1.first == edge2.first && edge1.second == edge2.second;
360 }
361 
362 /*! \ingroup comparison
363  \brief greater than
364  */
365 inline
366 bool
367 operator> ( const BareEdge& edge1 , const BareEdge& edge2 )
368 {
369  return edge2.first > edge1.first || ( edge2.first == edge1.first && edge2.second > edge1.second );
370 }
371 
372 /*! \ingroup comparison
373  \brief greater-equal than
374  */
375 inline
376 bool
377 operator>= ( const BareEdge& edge1 , const BareEdge& edge2 )
378 {
379  return edge1 == edge2 || edge1 > edge2;
380 }
381 
382 /*! \ingroup comparison
383  \brief less than
384  */
385 inline
386 bool
387 operator< ( const BareEdge& edge1 , const BareEdge& edge2 )
388 {
389  return edge2.first < edge1.first || ( edge2.first == edge1.first && edge2.second < edge1.second );
390 }
391 
392 /*! \ingroup comparison
393  \brief less-equal than
394  */
395 inline
396 bool
397 operator<= ( const BareEdge& edge1 , const BareEdge& edge2 )
398 {
399  return edge1 == edge2 || edge1 < edge2;
400  ;
401 }
402 
403 /*! \ingroup comparison
404  \brief inequality
405  */
406 inline
407 bool
408 operator!= ( const BareFace& face1 , const BareFace& face2 )
409 {
410  return face1.first != face2.first || face1.second != face2.second || face1.third != face2.third;
411 }
412 
413 
414 /*! \ingroup comparison
415  \brief equality
416  */
417 inline
418 bool
419 operator== ( const BareFace& face1 , const BareFace& face2 )
420 {
421  return face1.first == face2.first && face1.second == face2.second && face1.third == face2.third;
422 }
423 
424 /*! \ingroup comparison
425  \brief General functor for lexicographic comparison
426  */
427 template <typename T>
428 struct cmpBareItem;
429 
430 /*! \ingroup comparison
431  \brief Specialized functor for Vertices
432  */
433 template <>
434 struct cmpBareItem<BareVertex> //!< The actual comparison operator
435 {
436  bool operator() ( const BareVertex& vertex1, const BareVertex& vertex2 ) const
437  {
438  return vertex2.first > vertex1.first;
439  }
440 };
441 
442 /*! \ingroup comparison
443  \brief Specialized functor for Edges
444  */
445 template <>
446 struct cmpBareItem<BareEdge> //!< The actual comparison operator
447 {
448  bool operator() ( const BareEdge& edge1, const BareEdge& edge2 ) const
449  {
450  return edge2.first > edge1.first || ( edge2.first == edge1.first && edge2.second > edge1.second );
451  }
452 };
453 
454 /*! \ingroup comparison
455  \brief Specialized functor for Faces
456  */
457 template <>
458 struct cmpBareItem<BareFace>
459 {
460  bool operator() ( const BareFace& face1, const BareFace& face2 ) const
461  {
462  if ( face2.first > face1.first )
463  {
464  return true;
465  }
466  if ( face2.first == face1.first )
467  {
468  if ( face2.second > face1.second )
469  {
470  return true;
471  }
472  if ( face2.second == face1.second )
473  {
474  return face2.third > face1.third;
475  }
476  }
477  return false;
478  }
479 };
480 
481 inline
482 bool
483 operator< ( const BareFace& f1 , const BareFace& f2 )
484 {
485  return cmpBareItem<BareFace>() (f1, f2);
486 }
487 
488 
489 
490 //! BareEntitySelector class - Select the proper bare entity type (bareEdge or bareFace) based on the number of the entity points.
491 /*!
492  * @author Mauro Perego
493  @see
494 
495  The proper bare entity type (BareEdge or BareFace) and
496  the proper function to construct bare entities (makeBareEdge / makeBareFace)
497  are selected based on the template int numPoints, which is the number of points of the bare entity.
498  */
499 
500 template<typename Shape>
502 
503 template<>
505 {
506  static std::pair<BareVertex, bool> makeBareEntity (const ID points[])
507  {
508  return std::make_pair (BareVertex (points[0]), true);
509  }
511 };
512 
513 template<>
515 {
516  static std::pair<BareEdge, bool> makeBareEntity (const ID points[])
517  {
518  return makeBareEdge (points[0], points[1]);
519  }
521 };
522 
523 template<>
525 {
527  static std::pair<BareFace, bool> makeBareEntity (const ID points[])
528  {
529  return makeBareFace (points[0], points[1], points[2]);
530  }
531 };
532 
533 template<>
535 {
537  static std::pair<BareFace, bool> makeBareEntity (const ID points[])
538  {
539  return makeBareFace (points[0], points[1], points[2], points[3]);
540  }
541 };
542 
543 
544 
545 
546 //! MeshElementBareHandler class - Class to handle bare edges and faces construction
547 /*!
548  @author Luca Formaggia
549  @see
550 
551  This class handles mesh bare edges and faces construction. Used only in mesh builders
552  A MeshElementBareHandler is a specialisation of a STL map which holds the pair
553  formed by a bareitem and its ID.
554  The ID is automatically generated if one uses the method addIfNotThere
555  */
556 template <typename BareItemType>
558 {
559 public:
560  //! @name Public Types
561  //@{
562  typedef BareItemType bareItem_Type;
564  typedef typename container_Type::iterator containerIterator_Type;
565  typedef typename container_Type::const_iterator containerConstIterator_Type;
566  typedef std::pair<const bareItem_Type, UInt> value_Type;
567  //@}
568 
569  //! @name Constructors & Destructor
570  //@{
571  //! Empty Constructor
573  //@}
574 
575  //! @name Methods
576  //@{
577 
578  //! Method to ask if an item already exists
579  /*!
580  @param item Item we are looking for
581  @return True if the item has been found, False otherwise
582  */
583  bool isThere ( bareItem_Type const& item) const;
584 
585  //! Method that adds a BareItem if it is not already there and automatically generates the ID
586  /*!
587  @param item Item to be added
588  @return 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
589  */
590  std::pair<ID, bool> addIfNotThere ( bareItem_Type const& item );
591 
592  //! Method that adds a bareItem_Type if it is not already there and assigns the ID
593  /*!
594  @param item Item to be added
595  @param id ID to be assigned to the item
596  @return 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
597  */
598  std::pair<ID, bool> addIfNotThere ( bareItem_Type const& item, const ID id );
599 
600  //! Method that removes a bareItem_Type if it is there (the ID is then lost)
601  /*!
602  @param item Item to be removed
603  @return True if the item has been erased and False otherwise
604  */
605  bool deleteIfThere ( bareItem_Type const& item);
606 
607  //! Method that removes a bareItem_Type if it is there (the ID is then lost)
608  /*!
609  @deprecated
610  @param item Item to be removed
611  @return True if the item has been erased and False otherwise
612  */
613  bool isThereDel ( bareItem_Type const& item);
614 
615  //! Method that counts how many items are stored
616  /*!
617  @return the number of entities actually stored
618  */
619  UInt howMany() const;
620 
621  //! Method that returns the maximum id currently in use
622  /*!
623  @return the maximum id currently in use
624  */
625  UInt maxId() const
626  {
627  return M_idCount;
628  }
629 
630  //! Method that writes info in output
631  /*!
632  */
633  void showMe() const;
634 
635  //! Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist
636  /*!
637  @param item Item we are looking for
638  @return ID of the item. 0 if the item doesn't exist
639  */
640  ID id ( bareItem_Type const& item ) const;
641 
642  //@}
643 
644  //! @name Set Methods
645  //@{
646  //! Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist
647  /*!
648  @param item Item to modify
649  @param id new ID to assign to item
650  @return True if the item has been found and modified, False otherwise
651  */
652  bool setId ( bareItem_Type const& item, const ID& id );
653 
654  //! Method that returns the ID of a BareItem. It returns 0 if the item doesn't exist
655  /*!
656  @deprecated
657  @param item Item to modify
658  @param id new ID to assign to item
659  @return True if the item has been found and modified, False otherwise
660  */
661  bool setId ( bareItem_Type const& item, ID const id );
662  //@}
663 
664  //! @name Get Methods
665  //@{
666 
667 
668  //@}
669 private:
671 };
672 
673 /*********************************************************************************
674  IMPLEMENTATIONS
675  *********************************************************************************/
676 
677 // ===================================================
678 // Constructors & Destructor
679 // ===================================================
680 template <class BareItemType>
682  M_idCount ( 0 )
683 { }
684 
685 // ===================================================
686 // Methods
687 // ===================================================
688 template <class BareItemType>
689 inline
690 bool
691 MeshElementBareHandler<BareItemType>::isThere ( const bareItem_Type& item ) const
692 {
693  return find ( item ) != container_Type::end();
694 }
695 
696 template <class BareItemType>
697 inline
698 std::pair<ID, bool>
699 MeshElementBareHandler<BareItemType>::addIfNotThere ( const bareItem_Type& item )
700 {
701  std::pair<typename MeshElementBareHandler<BareItemType>::containerIterator_Type, bool> i ( this->insert ( std::make_pair ( item, M_idCount ) ) );
702 
703  if ( i.second )
704  {
705  ++M_idCount;
706  }
707  return std::make_pair ( ( i.first )->second, i.second );
708 }
709 
710 template <class BareItemType>
711 inline
712 std::pair<ID, bool>
713 MeshElementBareHandler<BareItemType>::addIfNotThere ( const bareItem_Type& item, const ID id )
714 {
715  std::pair<typename MeshElementBareHandler<BareItemType>::containerIterator_Type, bool> i ( this->insert ( std::make_pair ( item, id ) ) );
716 
717  ( i.first ) ->second = id; // Set new id in any case.
718  return std::make_pair ( id, i.second ); // for consistency with other version.
719 }
720 template <class BareItemType>
721 bool
722 MeshElementBareHandler<BareItemType>::deleteIfThere ( bareItem_Type const& item )
723 {
724  return this->erase ( item ) != 0;
725 }
726 
727 template <class BareItemType>
728 inline
729 UInt
730 MeshElementBareHandler<BareItemType>::howMany() const
731 {
732  return container_Type::size();
733 }
734 
735 template <typename BareItemType>
736 inline
737 void MeshElementBareHandler<BareItemType>::showMe() const
738 {
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";
743 }
744 
745 template <class BareItemType>
746 inline
747 ID
748 MeshElementBareHandler<BareItemType>::id ( const bareItem_Type& item ) const
749 {
750  containerConstIterator_Type i = this->find ( item );
751  if ( i != container_Type::end() )
752  {
753  return i->second;
754  }
755  else
756  {
757  return 0;
758  }
759 }
760 
761 // ===================================================
762 // Set Methods
763 // ===================================================
764 
765 template <class BareItemType>
766 inline
767 bool
768 MeshElementBareHandler<BareItemType>::setId ( const bareItem_Type& item, ID const id )
769 {
770  containerConstIterator_Type i = find ( item );
771  if ( i != container_Type::end() )
772  {
773  i->second = id;
774  return true;
775  }
776  else
777  {
778  return false;
779  }
780 
781 }
782 
783 // ===================================================
784 // Get Methods
785 // ===================================================
786 
787 
788 }
789 #endif /* MESHELEMENTBARE_H */
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&#39;t exist. ...
The base Face class.
The Vertex basis class.
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&#39;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&#39;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.
The Edge basis class.
uint32_type ID
IDs.
Definition: LifeV.hpp:194
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&#39;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&#39;t exist. ...
BareEdge()
Empty Constructor.
BareEdge setBareEdgeNo(ID const i, ID const j)
It creates a non-standard BareEdge.
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
#define _LIFEV_HH_
Definition: LifeV.hpp:88
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[])
const ID NotAnId
Definition: LifeV.hpp:264
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&#39;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&#39;s as parameter.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
bool setId(bareItem_Type const &item, ID const id)
Method that returns the ID of a BareItem. It returns 0 if the item doesn&#39;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