https://mooseframework.inl.gov
NumericalFlux3EqnBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
13 
24 {
25 public:
27 
28  virtual void execute() override;
29  virtual void initialize() override;
30  virtual void finalize() override;
31  virtual void threadJoin(const UserObject &) override;
32 
49  virtual const std::vector<Real> & getFlux(const unsigned int iside,
50  const dof_id_type ielem,
51  bool res_side_is_left,
52  const std::vector<Real> & UL,
53  const std::vector<Real> & UR,
54  const Real & nLR_dot_d) const;
55 
77  virtual const DenseMatrix<Real> & getJacobian(bool res_side_is_left,
78  bool jac_side_is_left,
79  const unsigned int iside,
80  const dof_id_type ielem,
81  const std::vector<Real> & UL,
82  const std::vector<Real> & UR,
83  const Real & nLR_dot_d) const;
84 
97  virtual void calcFlux(const std::vector<Real> & UL,
98  const std::vector<Real> & UR,
99  const Real & nLR_dot_d,
100  std::vector<Real> & FL,
101  std::vector<Real> & FR) const = 0;
102 
117  virtual void calcJacobian(const std::vector<Real> & UL,
118  const std::vector<Real> & UR,
119  const Real & nLR_dot_d,
120  DenseMatrix<Real> & dFL_dUL,
121  DenseMatrix<Real> & dFL_dUR,
122  DenseMatrix<Real> & dFR_dUL,
123  DenseMatrix<Real> & dFR_dUR) const = 0;
124 
133  unsigned int getLastRegionIndex() const { return _last_region_index; }
134 
143  virtual unsigned int getNumberOfRegions() const = 0;
144 
145 protected:
147  mutable unsigned int _cached_flux_elem_id;
149  mutable unsigned int _cached_flux_side_id;
150 
152  mutable unsigned int _cached_jacobian_elem_id;
154  mutable unsigned int _cached_jacobian_side_id;
155 
157  mutable std::vector<Real> _FL;
159  mutable std::vector<Real> _FR;
168 
170  mutable unsigned int _last_region_index;
171 
172 public:
173  static InputParameters validParams();
174 };
std::vector< Real > _FR
flux vector for the "right" cell
unsigned int _cached_jacobian_elem_id
element ID of the cached Jacobian values
NumericalFlux3EqnBase(const InputParameters &parameters)
static InputParameters validParams()
Abstract base class for computing and caching internal or boundary fluxes for RDG for the 3-equation ...
unsigned int getLastRegionIndex() const
Returns the index of the region last entered.
virtual void threadJoin(const UserObject &) override
DenseMatrix< Real > _dFR_dUR
derivative of "right" flux w.r.t. "right" solution
virtual void calcFlux(const std::vector< Real > &UL, const std::vector< Real > &UR, const Real &nLR_dot_d, std::vector< Real > &FL, std::vector< Real > &FR) const =0
Calculates the flux vectors given "left" and "right" states.
DenseMatrix< Real > _dFL_dUL
derivative of "left" flux w.r.t. "left" solution
unsigned int _cached_jacobian_side_id
side ID of the cached Jacobian values
virtual void execute() override
virtual const std::vector< Real > & getFlux(const unsigned int iside, const dof_id_type ielem, bool res_side_is_left, const std::vector< Real > &UL, const std::vector< Real > &UR, const Real &nLR_dot_d) const
Gets the flux vector for an element/side combination.
virtual unsigned int getNumberOfRegions() const =0
Returns the total possible number of regions.
virtual void calcJacobian(const std::vector< Real > &UL, const std::vector< Real > &UR, const Real &nLR_dot_d, DenseMatrix< Real > &dFL_dUL, DenseMatrix< Real > &dFL_dUR, DenseMatrix< Real > &dFR_dUL, DenseMatrix< Real > &dFR_dUR) const =0
Calculates the flux Jacobian matrices given "left" and "right" states.
unsigned int _cached_flux_elem_id
element ID of the cached flux values
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
DenseMatrix< Real > _dFL_dUR
derivative of "left" flux w.r.t. "right" solution
virtual const DenseMatrix< Real > & getJacobian(bool res_side_is_left, bool jac_side_is_left, const unsigned int iside, const dof_id_type ielem, const std::vector< Real > &UL, const std::vector< Real > &UR, const Real &nLR_dot_d) const
Gets the flux Jacobian matrix for an element/side combination.
unsigned int _last_region_index
Index describing the region last entered, which is useful for testing and debugging.
virtual void initialize() override
const InputParameters & parameters() const
virtual void finalize() override
std::vector< Real > _FL
flux vector for the "left" cell
unsigned int _cached_flux_side_id
side ID of the cached flux values
DenseMatrix< Real > _dFR_dUL
derivative of "right" flux w.r.t. "left" solution
uint8_t dof_id_type