https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
23public:
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
112protected:
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;
126 mutable DenseMatrix<Real> _jac1;
128 mutable DenseMatrix<Real> _jac2;
129};
const InputParameters & parameters() const
Abstract base class for computing and caching internal or boundary fluxes for RDG.
Definition RDGFluxBase.h:22
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.
virtual void initialize() override
Definition RDGFluxBase.C:31
virtual void finalize() override
Definition RDGFluxBase.C:45
virtual void execute() override
Definition RDGFluxBase.C:40
DenseMatrix< Real > _jac2
Jacobian matrix contribution to the "right" cell.
virtual void threadJoin(const UserObject &) override
Definition RDGFluxBase.C:50
std::vector< Real > _flux
flux vector
DenseMatrix< Real > _jac1
Jacobian matrix contribution to the "left" cell.
unsigned int _cached_flux_elem_id
element ID of the cached flux values
static InputParameters validParams()
Definition RDGFluxBase.C:13
unsigned int _cached_flux_side_id
side ID of the cached flux values
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.
unsigned int _cached_jacobian_elem_id
element ID of the cached Jacobian values
unsigned int _cached_jacobian_side_id
side ID of the cached Jacobian values
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
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