www.mooseframework.org
InternalSideFluxBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 {
29 public:
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 
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 
110 protected:
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;
127 };
InternalSideFluxBase(const InputParameters &parameters)
unsigned int _cached_flux_elem_id
element ID of the cached flux values
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.
unsigned int _cached_jacobian_neig_id
neighbor element ID of the cached Jacobian values
DGResidualType
virtual void initialize() 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.
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.
DenseMatrix< Real > _jac2
Jacobian matrix contribution to the "right" cell.
std::vector< Real > _flux
flux vector of this side
const std::string & type() const
virtual void execute() override
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, dof_id_type ineig, const std::vector< Real > &uvec1, const std::vector< Real > &uvec2, const RealVectorValue &dwave) const
Get the flux vector.
A base class for computing and caching internal side flux.
virtual void finalize() override
const InputParameters & parameters() const
DenseMatrix< Real > _jac1
Jacobian matrix contribution to the "left" cell.
unsigned int _cached_flux_neig_id
neighbor element ID of the cached flux values
static InputParameters validParams()
uint8_t dof_id_type