www.mooseframework.org
SlopeLimitingBase.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef SLOPELIMITINGBASE_H
9 #define SLOPELIMITINGBASE_H
10 
11 #include "ElementLoopUserObject.h"
13 
14 // Forward Declarations
15 class SlopeLimitingBase;
16 
17 template <>
18 InputParameters validParams<SlopeLimitingBase>();
19 
25 {
26 public:
27  SlopeLimitingBase(const InputParameters & parameters);
28 
29  virtual void initialize();
30  virtual void finalize();
31 
32  virtual void computeElement();
33 
35  virtual const std::vector<RealGradient> & getElementSlope(dof_id_type elementid) const;
36 
38  virtual std::vector<RealGradient> limitElementSlope() const = 0;
39 
40 protected:
41  virtual void serialize(std::string & serialized_buffer);
42  virtual void deserialize(std::vector<std::string> & serialized_buffers);
43 
45  std::map<dof_id_type, std::vector<RealGradient>> _lslope;
46 
49 
52 
54  const MooseArray<Point> & _q_point_face;
55  QBase *& _qrule_face;
56  const MooseArray<Real> & _JxW_face;
57  const MooseArray<Point> & _normals_face;
58 
60  unsigned int & _side;
61 
62  const Elem *& _side_elem;
63  const Real & _side_volume;
64 
66  const Elem *& _neighbor_elem;
67 
68 private:
69  static Threads::spin_mutex _mutex;
70 };
71 
72 #endif
const Elem *& _side_elem
virtual void serialize(std::string &serialized_buffer)
A base class that loops over elements and do things.
const SlopeReconstructionBase & _rslope
slope reconstruction user object
const MooseArray< Point > & _q_point_face
required data for face assembly
const MooseArray< Real > & _JxW_face
const MooseArray< Point > & _normals_face
virtual void finalize()
virtual void computeElement()
virtual const std::vector< RealGradient > & getElementSlope(dof_id_type elementid) const
accessor function call
static Threads::spin_mutex _mutex
SlopeLimitingBase(const InputParameters &parameters)
Base class for piecewise linear slope reconstruction to get the slopes of element average variables...
virtual void deserialize(std::vector< std::string > &serialized_buffers)
const Elem *& _neighbor_elem
the neighboring element
const Real & _side_volume
Base class for slope limiting to limit the slopes of cell average variables.
InputParameters validParams< SlopeLimitingBase >()
virtual void initialize()
bool _include_bc
option whether to include BCs
virtual std::vector< RealGradient > limitElementSlope() const =0
compute the slope of the cell
unsigned int & _side
current side of the current element
std::map< dof_id_type, std::vector< RealGradient > > _lslope
store the updated slopes into this map indexed by element ID