libMesh
fe_compute_data.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2024 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 #ifndef LIBMESH_FE_COMPUTE_DATA_H
20 #define LIBMESH_FE_COMPUTE_DATA_H
21 
22 // Local includes
23 #include "libmesh/libmesh.h"
24 #include "libmesh/fe_base.h" // required for the type OutputGradient.
25 
26 // C++ includes
27 #include <vector>
28 
29 namespace libMesh
30 {
31 
32 // Forward declarations
33 class EquationSystems;
34 class Point;
35 
52 {
53 public:
59  const Point & pin) :
60  equation_systems(es),
61  p(pin),
62  _need_dshape(false)
63  {
64  this->clear();
65  }
66 
72 
76  const Point & p;
77 
81  std::vector<Number> shape;
82 
86  std::vector<Gradient> dshape;
87 
96  std::vector<std::vector<Real>> local_transform;
97 
98 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
99 
103 
108 
115 #endif
116 
120  void clear ();
121 
126  void init ();
127 
131  void enable_derivative ();
132 
138  {_need_dshape=false; }
139 
144  {return _need_dshape; }
145 
146 private:
153 
154 };
155 
156 
157 } // namespace libMesh
158 
159 #endif // LIBMESH_FE_COMPUTE_DATA_H
bool need_derivative()
Check whether derivatives should be computed or not.
FEComputeData(const EquationSystems &es, const Point &pin)
Constructor.
void disable_derivative()
Disable the computation of shape gradients (dshape).
This is the EquationSystems class.
const EquationSystems & equation_systems
Const reference to the EquationSystems object that contains simulation-specific data.
class FEComputeData hides arbitrary data to be passed to and from children of FEBase through the FEIn...
const Point & p
Holds the point where the data are to be computed.
Real phase
Storage for the computed phase lag.
std::vector< Gradient > dshape
Storage for the computed shape derivative values.
std::vector< std::vector< Real > > local_transform
Storage for local to global mapping at p.
The libMesh namespace provides an interface to certain functionality in the library.
Real speed
The wave speed.
void clear()
Clears the output data completely.
void init()
Inits the output data to default values, provided the fields are correctly resized.
Number frequency
The frequency to evaluate shape functions including the wave number depending terms.
std::vector< Number > shape
Storage for the computed shape function values.
bool _need_dshape
variable indicating whether the shape-derivative should be computed or not.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void enable_derivative()
Enable the computation of shape gradients (dshape).
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39