LifeV
MeshUtility.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 Base utilities operating on meshes
30 
31  @contributor Tiziano Passerini <tiziano@mathcs.emory.edu>
32  @maintainer Tiziano Passerini <tiziano@mathcs.emory.edu>
33 
34  @sa MeshUtility.hpp
35  */
36 
37 #include <lifev/core/mesh/MeshUtility.hpp>
38 
39 namespace LifeV
40 {
41 namespace MeshUtility
42 {
43 // ===================================================
44 // Constructors & Destructor
45 // ===================================================
47 {}
48 
50 {}
51 
52 // ===================================================
53 // Operators
54 // ===================================================
55 void GetCoordComponent::operator() ( Real const& x, Real const& y, Real const& z, Real ret[ 3 ] ) const
56 {
57  switch ( componentIndex )
58  {
59  case ( 0 ) :
60  ret[ 0 ] = x;
61  ret[ 1 ] = 0.0;
62  ret[ 2 ] = 0.0;
63  break;
64  case ( 1 ) :
65  ret[ 0 ] = 0.0;
66  ret[ 1 ] = y;
67  ret[ 2 ] = 0.0;
68  break;
69  case ( 2 ) :
70  ret[ 0 ] = 0.0;
71  ret[ 1 ] = 0.0;
72  ret[ 2 ] = z;
73  break;
74  default:
75  ret[ 0 ] = x;
76  ret[ 1 ] = y;
77  ret[ 2 ] = z;
78  }
79 }
80 
81 void GetOnes::operator() ( Real const& /*x*/, Real const& /*y*/, Real const& /*z*/, Real ret[ 3 ] )
82 const
83 {
84  ret[ 0 ] = 1.0;
85  ret[ 1 ] = 1.0;
86  ret[ 2 ] = 1.0;
87 }
88 
89 } // namespace MeshUtility
90 
91 } // namespace LifeV
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
GetCoordComponent(Int i)
Constructor taking the component.
Definition: MeshUtility.cpp:49
void updateInverseJacobian(const UInt &iQuadPt)
This functor is used to do some geometry checks.
void operator()(Real const &x, Real const &y, Real const &z, Real ret[3]) const
The function call operator.
Definition: MeshUtility.cpp:55
double Real
Generic real data.
Definition: LifeV.hpp:175
GetCoordComponent()
Empty Constructor.
Definition: MeshUtility.cpp:46
void operator()(Real const &x, Real const &y, Real const &z, Real ret[3]) const
The function call operator.
Definition: MeshUtility.cpp:81