https://mooseframework.inl.gov
Loading...
Searching...
No Matches
InternalSideFluxBase.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
28{
29public:
31
33
34 virtual void execute() override;
35 virtual void initialize() override;
36 virtual void finalize() override;
37 virtual void threadJoin(const UserObject &) override;
38
48 virtual const std::vector<Real> & getFlux(unsigned int iside,
49 dof_id_type ielem,
50 dof_id_type ineig,
51 const std::vector<Real> & uvec1,
52 const std::vector<Real> & uvec2,
53 const RealVectorValue & dwave) const;
54
65 virtual void calcFlux(unsigned int iside,
66 dof_id_type ielem,
67 dof_id_type ineig,
68 const std::vector<Real> & uvec1,
69 const std::vector<Real> & uvec2,
70 const RealVectorValue & dwave,
71 std::vector<Real> & flux) const = 0;
72
82 virtual const DenseMatrix<Real> & getJacobian(Moose::DGResidualType type,
83 unsigned int iside,
84 dof_id_type ielem,
85 dof_id_type ineig,
86 const std::vector<Real> & uvec1,
87 const std::vector<Real> & uvec2,
88 const RealVectorValue & dwave) const;
89
101 virtual void calcJacobian(unsigned int iside,
102 dof_id_type ielem,
103 dof_id_type ineig,
104 const std::vector<Real> & uvec1,
105 const std::vector<Real> & uvec2,
106 const RealVectorValue & dwave,
107 DenseMatrix<Real> & jac1,
108 DenseMatrix<Real> & jac2) const = 0;
109
110protected:
112 mutable unsigned int _cached_flux_elem_id;
114 mutable unsigned int _cached_flux_neig_id;
115
117 mutable unsigned int _cached_jacobian_elem_id;
119 mutable unsigned int _cached_jacobian_neig_id;
120
122 mutable std::vector<Real> _flux;
124 mutable DenseMatrix<Real> _jac1;
126 mutable DenseMatrix<Real> _jac2;
127};
A base class for computing and caching internal side flux.
virtual void calcJacobian(unsigned int iside, dof_id_type ielem, dof_id_type ineig, const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &dwave, DenseMatrix< Real > &jac1, DenseMatrix< Real > &jac2) const =0
Compute the Jacobian matrix.
virtual const DenseMatrix< Real > & getJacobian(Moose::DGResidualType type, unsigned int iside, dof_id_type ielem, dof_id_type ineig, const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &dwave) const
Get the Jacobian matrix.
virtual void initialize() override
virtual void execute() override
virtual void threadJoin(const UserObject &) override
virtual void calcFlux(unsigned int iside, dof_id_type ielem, dof_id_type ineig, const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &dwave, std::vector< Real > &flux) const =0
Solve the Riemann problem.
unsigned int _cached_flux_neig_id
neighbor element ID of the cached flux values
virtual void finalize() override
unsigned int _cached_jacobian_elem_id
element ID of the cached Jacobian values
unsigned int _cached_jacobian_neig_id
neighbor element ID of the cached Jacobian values
virtual const std::vector< Real > & getFlux(unsigned int iside, dof_id_type ielem, dof_id_type ineig, const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &dwave) const
Get the flux vector.
unsigned int _cached_flux_elem_id
element ID of the cached flux values
static InputParameters validParams()
DenseMatrix< Real > _jac1
Jacobian matrix contribution to the "left" cell.
std::vector< Real > _flux
flux vector of this side
DenseMatrix< Real > _jac2
Jacobian matrix contribution to the "right" cell.
const InputParameters & parameters() const
const std::string & type() const
DGResidualType