LifeV
QRAdapterNeverAdapt.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 Fake quadrature rule adapter for a constant quadrature rule.
30 
31  This class has a unique functionality: is returns the quadrature rule
32  that it owns.
33 
34  This class has been designed in order to facilitate the implementation
35  of the ETA framework (avoid duplicating the Integrate** classes). Remark
36  that we define all the methods "inline" to allow the compiler to better
37  optimize out the effect of this class.
38 
39  @author Samuel Quinodoz <samuel.quinodoz@epfl.ch>
40  @date 07 Aug 2012
41 
42  */
43 
44 #ifndef QR_ADAPTER_NEVER_ADAPT_H
45 #define QR_ADAPTER_NEVER_ADAPT_H 1
46 
47 #include <lifev/core/LifeV.hpp>
48 
49 #include <lifev/eta/fem/QRAdapterBase.hpp>
50 #include <lifev/core/fem/QuadratureRule.hpp>
51 
52 
53 namespace LifeV
54 {
55 
56 
58 {
59 public:
60 
62 
63  //! @name Constructor & Destructor
64  //@{
65 
66  //! Constructor with a quadrature rule.
68 
69  //! Copy constructor
71 
72  //! Simple destructor
74 
75  //@}
76 
77 
78  //! @name Methods
79  //@{
80 
81  //! Update this structure with the current element
82  /*!
83  Usually, it does some computations, but here, nothing!
84  This method is static, even if in general, this is not
85  the case... We just give more information to the compiler
86  so that it can better optimize the code.
87  */
88  static void update (UInt /*elementID*/) {}
89 
90  //@}
91 
92 
93  //! @name Set Methods
94  //@{
95 
96  //@}
97 
98 
99  //! @name Get Methods
100  //@{
101 
102  //! Do we need the adapted quadrature rule?
103  /*!
104  We never need it! Remark that we put here this method
105  as static, while this is not what one want in general.
106  In this way, we simply give stronger hints to the
107  compiler.
108  */
109  static bool isAdaptedElement()
110  {
111  return false;
112  }
113 
114  //! Getter for the non-adapted quadrature
115  const QuadratureRule& standardQR() const
116  {
117  return M_qr;
118  }
119 
120  //! Getter for the adapted quadrature
121  /*!
122  In this case, it should never happen!
123  */
124  const QuadratureRule& adaptedQR() const
125  {
126  ERROR_MSG ("No adapted quadrature! Internal error...")
127  return M_qr;
128  }
129 
130  //@}
131 
132 private:
133 
134  //! @name Private Methods
135  //@{
136 
137  //! No default constructor
139 
140  //@}
141 
142  // Quadrature rule
144 };
145 
146 } // Namespace LifeV
147 
148 #endif /* QR_ADAPTER_NEVER_ADAPT_H */
QRAdapterNeverAdapt(const QRAdapterNeverAdapt &qrAdapter)
Copy constructor.
QRAdapterBase< QRAdapterNeverAdapt > base_Type
QRAdapterNeverAdapt(const QuadratureRule &qr)
Constructor with a quadrature rule.
void updateInverseJacobian(const UInt &iQuadPt)
static void update(UInt)
Update this structure with the current element.
#define ERROR_MSG(A)
Definition: LifeAssert.hpp:69
QRAdapterNeverAdapt()
No default constructor.
const QuadratureRule & adaptedQR() const
Getter for the adapted quadrature.
const QuadratureRule & standardQR() const
Getter for the non-adapted quadrature.
static bool isAdaptedElement()
Do we need the adapted quadrature rule?
QuadratureRule - The basis class for storing and accessing quadrature rules.
~QRAdapterNeverAdapt()
Simple destructor.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191