LifeV
EvaluationMeasBDCurrentFE.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 This file contains the definition of the evaluation for the measure
30 
31  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
32  @date 03 Jan 2012
33  */
34 
35 #ifndef EVALUATION_MEASUREBDCURRENTFE_HPP
36 #define EVALUATION_MEASUREBDCURRENTFE_HPP
37 
38 #include <lifev/core/LifeV.hpp>
39 
40 #include <lifev/eta/fem/ETCurrentFE.hpp>
41 #include <lifev/eta/fem/ETCurrentBDFE.hpp>
42 #include <lifev/eta/fem/ETCurrentFlag.hpp>
43 #include <lifev/core/fem/QuadratureRule.hpp>
44 
45 #include <lifev/eta/expression/ExpressionMeasBDCurrentFE.hpp>
46 
47 namespace LifeV
48 {
49 
50 namespace ExpressionAssembly
51 {
52 
53 //! EvaluationMeasBDCurrentFE - Evaluation of the measure of the cell
54 /*!
55  @author Samuel Quinodoz
56  */
57 template< UInt spaceDim>
58 class EvaluationMeasBDCurrentFE
59 {
60 public:
61 
62  //! @name Public Types
63  //@{
64 
65  //! Type of the values returned by this class
66  typedef Real return_Type;
67 
68  //@}
69 
70  //! @name Static constants
71  //@{
72 
73  //! Flag for the global current FE
74  const static flag_Type S_globalUpdateFlag;
75 
76  //! Flag for the test current FE
77  const static flag_Type S_testUpdateFlag;
78 
79  //! Flag for the solution current FE
80  const static flag_Type S_solutionUpdateFlag;
81 
82  //@}
83 
84 
85  //! @name Constructors, destructor
86  //@{
87 
88  //! Empty constructor
89  EvaluationMeasBDCurrentFE() {}
90 
91  //! Copy constructor
92  EvaluationMeasBDCurrentFE (const EvaluationMeasBDCurrentFE<spaceDim>& evaluation)
93  : M_valuePtr (evaluation.M_valuePtr)
94  {}
95 
96  //! Expression-based constructor
97  explicit EvaluationMeasBDCurrentFE (const ExpressionMeasBDCurrentFE& expression) {}
98 
99  //! Destructor
100  ~EvaluationMeasBDCurrentFE() {}
101 
102  //@}
103 
104 
105  //! @name Methods
106  //@{
107 
108  //! Do nothing update
109  void update (const UInt& /*iElement*/) {}
110 
111  //! Display method
112  static void display (std::ostream& out = std::cout)
113  {
114  out << "meas_KBd";
115  }
116 
117  //@}
118 
119 
120  //! @name Set Methods
121  //@{
122 
123  //! Do nothing setter for the global current FE
124  template< typename CFEType >
125  void setGlobalCFE (const CFEType* globalCFE)
126  {
127  ASSERT (globalCFE != 0, "Nul pointer to the globalCFE cannot be set");
128  M_valuePtr = (globalCFE->M_measure)[0];
129  }
130 
131  //! Setter for the test current FE
132  template< typename CFEType >
133  void setTestCFE (const CFEType* /*testCFE*/) {}
134 
135  //! Do nothing setter for the solution current FE
136  template< typename CFEType >
137  void setSolutionCFE (const CFEType* /*solutionCFE*/) {}
138 
139  //! Do nothing setter for the quadrature rule
140  void setQuadrature (const QuadratureRule&) {}
141 
142  //@}
143 
144 
145  //! @name Get Methods
146  //@{
147 
148  //! Getter for the value for a value
149  return_Type value_q (const UInt& q) const
150  {
151  return M_valuePtr;
152  }
153 
154  //! Getter for the value for a vector
155  return_Type value_qi (const UInt& q, const UInt& /*i*/) const
156  {
157  return M_valuePtr;
158  }
159 
160  //! Getter for the value for a matrix
161  return_Type value_qij (const UInt& q, const UInt& /*i*/, const UInt& /*j*/) const
162  {
163  return M_valuePtr;
164  }
165 
166  //@}
167 
168 private:
169 
170  //! Storage for the pointer to the data
171  Real M_valuePtr;
172 
173 };
174 
175 template<UInt spaceDim>
176 const flag_Type EvaluationMeasBDCurrentFE<spaceDim>::S_globalUpdateFlag = ET_UPDATE_MEASURE;
177 
178 template<UInt spaceDim>
179 const flag_Type EvaluationMeasBDCurrentFE<spaceDim>::S_testUpdateFlag = ET_UPDATE_NONE;
180 
181 template<UInt spaceDim>
182 const flag_Type EvaluationMeasBDCurrentFE<spaceDim>::S_solutionUpdateFlag = ET_UPDATE_NONE;
183 
184 
185 } // Namespace ExpressionAssembly
186 
187 } // Namespace LifeV
188 
189 #endif /* EVALUATION_HK_HPP */
uint32_type flag_Type
bit-flag with up to 32 different flags
Definition: LifeV.hpp:197
void updateInverseJacobian(const UInt &iQuadPt)
#define ASSERT(X, A)
Definition: LifeAssert.hpp:90
double Real
Generic real data.
Definition: LifeV.hpp:175
QuadratureRule - The basis class for storing and accessing quadrature rules.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191