Abstract base class for computing and caching internal or boundary fluxes for RDG. More...
#include <RDGFluxBase.h>
Public Member Functions | |
RDGFluxBase (const InputParameters ¶meters) | |
virtual void | execute () override |
virtual void | initialize () override |
virtual void | finalize () override |
virtual void | threadJoin (const UserObject &) override |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Protected Attributes | |
unsigned int | _cached_flux_elem_id |
element ID of the cached flux values More... | |
unsigned int | _cached_flux_side_id |
side ID of the cached flux values More... | |
unsigned int | _cached_jacobian_elem_id |
element ID of the cached Jacobian values More... | |
unsigned int | _cached_jacobian_side_id |
side ID of the cached Jacobian values More... | |
std::vector< Real > | _flux |
flux vector More... | |
DenseMatrix< Real > | _jac1 |
Jacobian matrix contribution to the "left" cell. More... | |
DenseMatrix< Real > | _jac2 |
Jacobian matrix contribution to the "right" cell. More... | |
Abstract base class for computing and caching internal or boundary fluxes for RDG.
Here a call to compute flux computes the flux for all equations in the system, so to avoid duplicating the calculations, a wrapper is used to cache the system flux for an element/side combination.
Definition at line 26 of file RDGFluxBase.h.
RDGFluxBase::RDGFluxBase | ( | const InputParameters & | parameters | ) |
Definition at line 22 of file RDGFluxBase.C.
|
pure virtual |
Calculates the flux vector given "left" and "right" states.
This function is called only if the values are not already cached.
[in] | uvec1 | vector of variables on the "left" |
[in] | uvec2 | vector of variables on the "right" |
[in] | normal | vector of unit normal |
[out] | flux | flux vector |
Referenced by getFlux().
|
pure virtual |
Calculates the flux Jacobian matrices given "left" and "right" states.
This function is called only if the values are not already cached.
[in] | uvec1 | vector of variables on the "left" |
[in] | uvec2 | vector of variables on the "right" |
[in] | normal | vector of unit normal |
[out] | jac1 | Jacobian matrix contribution to the "left" cell |
[out] | jac2 | Jacobian matrix contribution to the "right" cell |
Referenced by getJacobian().
|
overridevirtual |
Definition at line 41 of file RDGFluxBase.C.
|
overridevirtual |
Definition at line 46 of file RDGFluxBase.C.
|
virtual |
Gets the flux vector for an element/side combination.
If the element/side is cached, the cached values are used. Otherwise the values are computed, cached, and returned.
[in] | iside | local index of current side |
[in] | ielem | global index of the current element |
[in] | uvec1 | vector of variables on the "left" |
[in] | uvec2 | vector of variables on the "right" |
[in] | normal | vector of unit normal |
Definition at line 56 of file RDGFluxBase.C.
|
virtual |
Gets the flux Jacobian matrix for an element/side combination.
If the element/side is cached, the cached values are used. Otherwise the values are computed, cached, and returned. The user decides which Jacobian to receive (either with respect to first solution vector or second solution vector). If the user wants both, then the function can just be called a second time with the other Jacobian requested - since that Jacobian is already cached, no redundant calculations will occur.
[in] | get_first_jacobian | get the Jacobian w.r.t. the first solution; else get the Jacobian w.r.t. the second solution |
[in] | iside | local index of current side |
[in] | ielem | global index of the current element |
[in] | uvec1 | vector of variables on the "left" |
[in] | uvec2 | vector of variables on the "right" |
[in] | normal | vector of unit normal |
Definition at line 73 of file RDGFluxBase.C.
|
overridevirtual |
Definition at line 32 of file RDGFluxBase.C.
|
overridevirtual |
Definition at line 51 of file RDGFluxBase.C.
|
mutableprotected |
element ID of the cached flux values
Definition at line 117 of file RDGFluxBase.h.
Referenced by getFlux(), and initialize().
|
mutableprotected |
side ID of the cached flux values
Definition at line 119 of file RDGFluxBase.h.
Referenced by getFlux(), and initialize().
|
mutableprotected |
element ID of the cached Jacobian values
Definition at line 122 of file RDGFluxBase.h.
Referenced by getJacobian(), and initialize().
|
mutableprotected |
side ID of the cached Jacobian values
Definition at line 124 of file RDGFluxBase.h.
Referenced by getJacobian(), and initialize().
|
mutableprotected |
|
mutableprotected |
Jacobian matrix contribution to the "left" cell.
Definition at line 129 of file RDGFluxBase.h.
Referenced by getJacobian().
|
mutableprotected |
Jacobian matrix contribution to the "right" cell.
Definition at line 131 of file RDGFluxBase.h.
Referenced by getJacobian().