https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BoundaryFluxBase.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
26{
27public:
29
31
32 virtual void execute() override {}
33 virtual void initialize() override;
34 virtual void finalize() override {}
35 virtual void threadJoin(const UserObject &) override {}
36
44 virtual const std::vector<Real> & getFlux(unsigned int iside,
45 dof_id_type ielem,
46 const std::vector<Real> & uvec1,
47 const RealVectorValue & dwave) const;
48
57 virtual void calcFlux(unsigned int iside,
58 dof_id_type ielem,
59 const std::vector<Real> & uvec1,
60 const RealVectorValue & dwave,
61 std::vector<Real> & flux) const = 0;
62
70 virtual const DenseMatrix<Real> & getJacobian(unsigned int iside,
71 dof_id_type ielem,
72 const std::vector<Real> & uvec1,
73 const RealVectorValue & dwave) const;
74
83 virtual void calcJacobian(unsigned int iside,
84 dof_id_type ielem,
85 const std::vector<Real> & uvec1,
86 const RealVectorValue & dwave,
87 DenseMatrix<Real> & jac1) const = 0;
88
89protected:
91 mutable unsigned int _cached_flux_elem_id;
93 mutable unsigned int _cached_flux_side_id;
94
96 mutable unsigned int _cached_jacobian_elem_id;
98 mutable unsigned int _cached_jacobian_side_id;
99
101 mutable std::vector<Real> _flux;
102
104 mutable DenseMatrix<Real> _jac1;
105};
A base class for computing/caching fluxes at boundaries.
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 execute() override
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.
virtual void finalize() override
virtual void initialize() override
virtual void threadJoin(const UserObject &) 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
const InputParameters & parameters() const