www.mooseframework.org
SlopeReconstructionBase.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 SLOPERECONSTRUCTIONBASE_H
9 #define SLOPERECONSTRUCTIONBASE_H
10 
11 #include "BCUserObject.h"
12 #include "ElementLoopUserObject.h"
13 
14 // Forward Declarations
16 
17 template <>
18 InputParameters validParams<SlopeReconstructionBase>();
19 
25 {
26 public:
27  SlopeReconstructionBase(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 const std::vector<Real> & getElementAverageValue(dof_id_type elementid) const;
39 
41  virtual const std::vector<Real> & getBoundaryAverageValue(dof_id_type elementid,
42  unsigned int side) const;
43 
45  virtual const Point & getSideCentroid(dof_id_type elementid, dof_id_type neighborid) const;
46 
48  virtual const Point & getBoundarySideCentroid(dof_id_type elementid, unsigned int side) const;
49 
51  virtual const Point & getSideNormal(dof_id_type elementid, dof_id_type neighborid) const;
52 
54  virtual const Point & getBoundarySideNormal(dof_id_type elementid, unsigned int side) const;
55 
57  virtual const Real & getSideArea(dof_id_type elementid, dof_id_type neighborid) const;
58 
60  virtual const Real & getBoundarySideArea(dof_id_type elementid, unsigned int side) const;
61 
63  virtual void reconstructElementSlope() = 0;
64 
65  virtual void meshChanged();
66 
67 protected:
68  virtual void serialize(std::string & serialized_buffer);
69  virtual void deserialize(std::vector<std::string> & serialized_buffers);
70 
72  std::map<dof_id_type, std::vector<RealGradient>> _rslope;
73 
75  std::map<dof_id_type, std::vector<Real>> _avars;
76 
78  std::map<std::pair<dof_id_type, unsigned int>, std::vector<Real>> _bnd_avars;
79 
81  std::map<std::pair<dof_id_type, dof_id_type>, Point> _side_centroid;
82 
84  std::map<std::pair<dof_id_type, unsigned int>, Point> _bnd_side_centroid;
85 
87  std::map<std::pair<dof_id_type, dof_id_type>, Real> _side_area;
88 
90  std::map<std::pair<dof_id_type, unsigned int>, Real> _bnd_side_area;
91 
93  std::map<std::pair<dof_id_type, dof_id_type>, Point> _side_normal;
94 
96  std::map<std::pair<dof_id_type, unsigned int>, Point> _bnd_side_normal;
97 
99  const MooseArray<Point> & _q_point_face;
100  QBase *& _qrule_face;
101  const MooseArray<Real> & _JxW_face;
102  const MooseArray<Point> & _normals_face;
103 
105  unsigned int & _side;
106 
107  const Elem *& _side_elem;
108  const Real & _side_volume;
109 
111  const Elem *& _neighbor_elem;
112 
115 
116 private:
117  static Threads::spin_mutex _mutex;
118 };
119 
120 #endif
unsigned int & _side
current side of the current element
virtual void serialize(std::string &serialized_buffer)
A base class that loops over elements and do things.
std::map< std::pair< dof_id_type, dof_id_type >, Real > _side_area
store the side area into this map indexed by pair of element ID and neighbor ID
virtual const std::vector< RealGradient > & getElementSlope(dof_id_type elementid) const
accessor function call to get element slope values
virtual void reconstructElementSlope()=0
compute the slope of the cell
std::map< dof_id_type, std::vector< Real > > _avars
store the average variable values into this map indexed by element ID
virtual const Point & getSideCentroid(dof_id_type elementid, dof_id_type neighborid) const
accessor function call to get cached internal side centroid
static Threads::spin_mutex _mutex
const MooseArray< Point > & _q_point_face
required data for face assembly
virtual void deserialize(std::vector< std::string > &serialized_buffers)
Base class for piecewise linear slope reconstruction to get the slopes of element average variables...
virtual const Real & getBoundarySideArea(dof_id_type elementid, unsigned int side) const
accessor function call to get cached boundary side area
std::map< std::pair< dof_id_type, dof_id_type >, Point > _side_normal
store the side normal into this map indexed by pair of element ID and neighbor ID ...
std::map< dof_id_type, std::vector< RealGradient > > _rslope
store the reconstructed slopes into this map indexed by element ID
InputParameters validParams< SlopeReconstructionBase >()
SlopeReconstructionBase(const InputParameters &parameters)
const Elem *& _neighbor_elem
the neighboring element
std::map< std::pair< dof_id_type, unsigned int >, Point > _bnd_side_normal
store the boundary side normal into this map indexed by pair of element ID and local side ID ...
virtual const Point & getBoundarySideNormal(dof_id_type elementid, unsigned int side) const
accessor function call to get cached boundary side centroid
const MooseArray< Real > & _JxW_face
const MooseArray< Point > & _normals_face
std::map< std::pair< dof_id_type, dof_id_type >, Point > _side_centroid
store the side centroid into this map indexed by pair of element ID and neighbor ID ...
std::map< std::pair< dof_id_type, unsigned int >, Point > _bnd_side_centroid
store the boundary side centroid into this map indexed by pair of element ID and local side ID ...
std::map< std::pair< dof_id_type, unsigned int >, Real > _bnd_side_area
store the boundary side area into this map indexed by pair of element ID and local side ID ...
virtual const Point & getBoundarySideCentroid(dof_id_type elementid, unsigned int side) const
accessor function call to get cached boundary side centroid
virtual const std::vector< Real > & getElementAverageValue(dof_id_type elementid) const
accessor function call to get element average variable values
virtual const Point & getSideNormal(dof_id_type elementid, dof_id_type neighborid) const
accessor function call to get cached internal side normal
virtual const std::vector< Real > & getBoundaryAverageValue(dof_id_type elementid, unsigned int side) const
accessor function call to get boundary average variable values
bool _side_geoinfo_cached
flag to indicated if side geometry info is cached
virtual const Real & getSideArea(dof_id_type elementid, dof_id_type neighborid) const
accessor function call to get cached internal side area
std::map< std::pair< dof_id_type, unsigned int >, std::vector< Real > > _bnd_avars
store the boundary average variable values into this map indexed by pair of element ID and local side...