LifeV
Marker.cpp
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 Implementations for Marker.hpp
30 
31  @contributor Luca Bertagna <lbertag@emory.edu>
32  @date 00-00-0000
33 
34  */
35 
36 #include <limits>
37 #include <lifev/core/mesh/Marker.hpp>
38 
39 namespace LifeV
40 {
41 
42 // ***********************************************************************************************************
43 // IMPLEMENTATION
44 // ***********************************************************************************************************
45 
46 ///////////////////////
47 // MarkerIDStandardPolicy //
48 ///////////////////////
49 
51  std::numeric_limits<Int>::max();
52 
53 //MM: if you modify these changes here recheck function readNetgenMesh
54 // because it uses this changes
55 
57 {
58  if ( markerID1 == S_NULLMARKERID )
59  {
60  return markerID2;
61  }
62  if ( markerID2 == S_NULLMARKERID )
63  {
64  return markerID1;
65  }
66  return markerID1 > markerID2 ? markerID1 : markerID2 ;
67 }
68 
70 {
71  if ( markerID1 == S_NULLMARKERID )
72  {
73  return markerID2;
74  }
75  if ( markerID2 == S_NULLMARKERID )
76  {
77  return markerID1;
78  }
79  return markerID1 < markerID2 ? markerID1 : markerID2 ;
80 }
81 
82 bool MarkerIDStandardPolicy::equalMarkerID (const markerID_Type& markerID1, const markerID_Type& markerID2)
83 {
84  return markerID1 == markerID2;
85 }
86 
87 } // Namespace LifeV
static bool equalMarkerID(const markerID_Type &a, const markerID_Type &b)
Equality operator.
Definition: Marker.cpp:82
MarkerIDStandardPolicy - Class that defines the standard policies on Marker Ids.
Definition: Marker.hpp:89
static const markerID_Type S_NULLMARKERID
Definition: Marker.hpp:96
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
ID markerID_Type
markerID_Type is the type used to store the geometric entity marker IDs
Definition: Marker.hpp:81
void updateInverseJacobian(const UInt &iQuadPt)
static markerID_Type weakerMarkerID(markerID_Type const &a, markerID_Type const &b)
Selects the weaker Marker ID between marker IDs.
Definition: Marker.cpp:69
static markerID_Type strongerMarkerID(markerID_Type const &a, markerID_Type const &b)
Selects the stronger Marker ID.
Definition: Marker.cpp:56