https://mooseframework.inl.gov
RDGFluxBase.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 
22 {
23 public:
25 
27 
28  virtual void execute() override;
29  virtual void initialize() override;
30  virtual void finalize() override;
31  virtual void threadJoin(const UserObject &) override;
32 
47  virtual const std::vector<Real> & getFlux(const unsigned int iside,
48  const dof_id_type ielem,
49  const std::vector<Real> & uvec1,
50  const std::vector<Real> & uvec2,
51  const RealVectorValue & normal) const;
52 
73  virtual const DenseMatrix<Real> & getJacobian(const bool get_first_jacobian,
74  const unsigned int iside,
75  const dof_id_type ielem,
76  const std::vector<Real> & uvec1,
77  const std::vector<Real> & uvec2,
78  const RealVectorValue & normal) const;
79 
90  virtual void calcFlux(const std::vector<Real> & uvec1,
91  const std::vector<Real> & uvec2,
92  const RealVectorValue & normal,
93  std::vector<Real> & flux) const = 0;
94 
106  virtual void calcJacobian(const std::vector<Real> & uvec1,
107  const std::vector<Real> & uvec2,
108  const RealVectorValue & normal,
109  DenseMatrix<Real> & jac1,
110  DenseMatrix<Real> & jac2) const = 0;
111 
112 protected:
114  mutable unsigned int _cached_flux_elem_id;
116  mutable unsigned int _cached_flux_side_id;
117 
119  mutable unsigned int _cached_jacobian_elem_id;
121  mutable unsigned int _cached_jacobian_side_id;
122 
124  mutable std::vector<Real> _flux;
129 };
unsigned int _cached_flux_elem_id
element ID of the cached flux values
Definition: RDGFluxBase.h:114
DenseMatrix< Real > _jac1
Jacobian matrix contribution to the "left" cell.
Definition: RDGFluxBase.h:126
virtual void calcFlux(const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &normal, std::vector< Real > &flux) const =0
Calculates the flux vector given "left" and "right" states.
virtual const DenseMatrix< Real > & getJacobian(const bool get_first_jacobian, const unsigned int iside, const dof_id_type ielem, const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &normal) const
Gets the flux Jacobian matrix for an element/side combination.
Definition: RDGFluxBase.C:72
unsigned int _cached_jacobian_elem_id
element ID of the cached Jacobian values
Definition: RDGFluxBase.h:119
static InputParameters validParams()
Definition: RDGFluxBase.C:13
virtual void initialize() override
Definition: RDGFluxBase.C:31
virtual const std::vector< Real > & getFlux(const unsigned int iside, const dof_id_type ielem, const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &normal) const
Gets the flux vector for an element/side combination.
Definition: RDGFluxBase.C:55
RDGFluxBase(const InputParameters &parameters)
Definition: RDGFluxBase.C:21
std::vector< Real > _flux
flux vector
Definition: RDGFluxBase.h:124
Abstract base class for computing and caching internal or boundary fluxes for RDG.
Definition: RDGFluxBase.h:21
unsigned int _cached_jacobian_side_id
side ID of the cached Jacobian values
Definition: RDGFluxBase.h:121
virtual void threadJoin(const UserObject &) override
Definition: RDGFluxBase.C:50
virtual void finalize() override
Definition: RDGFluxBase.C:45
DenseMatrix< Real > _jac2
Jacobian matrix contribution to the "right" cell.
Definition: RDGFluxBase.h:128
virtual void execute() override
Definition: RDGFluxBase.C:40
virtual void calcJacobian(const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &normal, DenseMatrix< Real > &jac1, DenseMatrix< Real > &jac2) const =0
Calculates the flux Jacobian matrices given "left" and "right" states.
const InputParameters & parameters() const
unsigned int _cached_flux_side_id
side ID of the cached flux values
Definition: RDGFluxBase.h:116
uint8_t dof_id_type