https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BoundaryFluxBase.C
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#include "BoundaryFluxBase.h"
11
18
20 : ThreadedGeneralUserObject(parameters),
21 _cached_flux_elem_id(libMesh::invalid_uint),
22 _cached_flux_side_id(libMesh::invalid_uint),
23 _cached_jacobian_elem_id(libMesh::invalid_uint),
24 _cached_jacobian_side_id(libMesh::invalid_uint)
25{
26}
27
28void
36
37const std::vector<Real> &
38BoundaryFluxBase::getFlux(unsigned int iside,
39 dof_id_type ielem,
40 const std::vector<Real> & uvec1,
41 const RealVectorValue & dwave) const
42{
43 if (_cached_flux_elem_id != ielem || _cached_flux_side_id != iside)
44 {
47
48 calcFlux(iside, ielem, uvec1, dwave, _flux);
49 }
50 return _flux;
51}
52
53const DenseMatrix<Real> &
55 dof_id_type ielem,
56 const std::vector<Real> & uvec1,
57 const RealVectorValue & dwave) const
58{
60 {
63
64 calcJacobian(iside, ielem, uvec1, dwave, _jac1);
65 }
66 return _jac1;
67}
unsigned int _cached_jacobian_side_id
side ID of the cached Jacobian values
virtual const DenseMatrix< Real > & getJacobian(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave) const
Get the boundary Jacobian matrix.
static InputParameters validParams()
virtual void calcFlux(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, std::vector< Real > &flux) const =0
Solve the Riemann problem on the boundary face.
virtual void calcJacobian(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave, DenseMatrix< Real > &jac1) const =0
Compute the Jacobian matrix on the boundary face.
unsigned int _cached_jacobian_elem_id
element ID of the cached Jacobian values
virtual const std::vector< Real > & getFlux(unsigned int iside, dof_id_type ielem, const std::vector< Real > &uvec1, const RealVectorValue &dwave) const
Get the boundary flux vector.
BoundaryFluxBase(const InputParameters &parameters)
virtual void initialize() override
std::vector< Real > _flux
Cached flux.
unsigned int _cached_flux_elem_id
element ID of the cached flux values
DenseMatrix< Real > _jac1
Cached flux Jacobian.
unsigned int _cached_flux_side_id
side ID of the cached flux values
static InputParameters validParams()
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const unsigned int invalid_uint