www.mooseframework.org
SlopeLimitingBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #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 
48  const bool _include_bc;
49 
51  const MooseArray<Point> & _q_point_face;
52  const QBase * const & _qrule_face;
53  const MooseArray<Real> & _JxW_face;
54  const MooseArray<Point> & _normals_face;
55 
57  const unsigned int & _side;
58 
59  const Elem * const & _side_elem;
60  const Real & _side_volume;
61 
63  const Elem * const & _neighbor_elem;
64 
65 private:
66  static Threads::spin_mutex _mutex;
67 };
SlopeLimitingBase::getElementSlope
virtual const std::vector< RealGradient > & getElementSlope(dof_id_type elementid) const
accessor function call
Definition: SlopeLimitingBase.C:58
SlopeLimitingBase::serialize
virtual void serialize(std::string &serialized_buffer)
Definition: SlopeLimitingBase.C:78
ElementLoopUserObject
A base class that loops over elements and do things.
Definition: ElementLoopUserObject.h:58
SlopeLimitingBase
Base class for slope limiting to limit the slopes of cell average variables.
Definition: SlopeLimitingBase.h:24
SlopeLimitingBase::_q_point_face
const MooseArray< Point > & _q_point_face
required data for face assembly
Definition: SlopeLimitingBase.h:51
validParams< SlopeLimitingBase >
InputParameters validParams< SlopeLimitingBase >()
Definition: SlopeLimitingBase.C:20
SlopeLimitingBase::_JxW_face
const MooseArray< Real > & _JxW_face
Definition: SlopeLimitingBase.h:53
SlopeLimitingBase::_lslope
std::map< dof_id_type, std::vector< RealGradient > > & _lslope
store the updated slopes into this map indexed by element ID
Definition: SlopeLimitingBase.h:45
SlopeLimitingBase::_normals_face
const MooseArray< Point > & _normals_face
Definition: SlopeLimitingBase.h:54
SlopeLimitingBase::_qrule_face
const QBase *const & _qrule_face
Definition: SlopeLimitingBase.h:52
SlopeLimitingBase::finalize
virtual void finalize()
Definition: SlopeLimitingBase.C:133
SlopeLimitingBase::_include_bc
const bool _include_bc
option whether to include BCs
Definition: SlopeLimitingBase.h:48
SlopeLimitingBase::computeElement
virtual void computeElement()
Definition: SlopeLimitingBase.C:70
SlopeLimitingBase::_mutex
static Threads::spin_mutex _mutex
Definition: SlopeLimitingBase.h:66
SlopeLimitingBase::SlopeLimitingBase
SlopeLimitingBase(const InputParameters &parameters)
Definition: SlopeLimitingBase.C:33
SlopeLimitingBase::_side_elem
const Elem *const & _side_elem
Definition: SlopeLimitingBase.h:59
SlopeLimitingBase::_neighbor_elem
const Elem *const & _neighbor_elem
the neighboring element
Definition: SlopeLimitingBase.h:63
SlopeLimitingBase::deserialize
virtual void deserialize(std::vector< std::string > &serialized_buffers)
Definition: SlopeLimitingBase.C:97
SlopeLimitingBase::_side_volume
const Real & _side_volume
Definition: SlopeLimitingBase.h:60
SlopeLimitingBase::initialize
virtual void initialize()
Definition: SlopeLimitingBase.C:50
SlopeLimitingBase::limitElementSlope
virtual std::vector< RealGradient > limitElementSlope() const =0
compute the slope of the cell
ElementLoopUserObject.h
SlopeLimitingBase::_side
const unsigned int & _side
current side of the current element
Definition: SlopeLimitingBase.h:57