https://mooseframework.inl.gov
BoundaryFluxGasMixGhostBase.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 
12 
15 {
17 
18  params.addRequiredParam<UserObjectName>("numerical_flux", "Name of numerical flux user object");
19  params.addRequiredParam<Real>("normal", "Outward normal");
20 
21  return params;
22 }
23 
25  : ADBoundaryFluxBase(parameters),
26  _numerical_flux(getUserObject<NumericalFluxGasMixBase>("numerical_flux")),
27  _normal(getParam<Real>("normal"))
28 {
29 }
30 
31 void
33  dof_id_type ielem,
34  const std::vector<ADReal> & U1,
35  const RealVectorValue & /*normal*/,
36  std::vector<ADReal> & flux) const
37 {
38  const std::vector<ADReal> U2 = getGhostCellSolution(U1);
39  flux = _numerical_flux.getFlux(iside, ielem, true, U1, U2, _normal);
40 }
static InputParameters validParams()
Base class for computing numerical fluxes for FlowModelGasMix.
static InputParameters validParams()
const Real & _normal
Outward normal.
virtual void calcFlux(unsigned int iside, dof_id_type ielem, const std::vector< ADReal > &U1, const RealVectorValue &normal, std::vector< ADReal > &flux) const override
Solve the Riemann problem on the boundary face.
virtual const std::vector< ADReal > & getFlux(const unsigned int iside, const dof_id_type ielem, bool res_side_is_left, const std::vector< ADReal > &UL_1d, const std::vector< ADReal > &UR_1d, Real nLR_dot_d) const
Gets the 1D flux vector for an element/side combination.
void addRequiredParam(const std::string &name, const std::string &doc_string)
A base class for computing/caching fluxes at boundaries.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
BoundaryFluxGasMixGhostBase(const InputParameters &parameters)
const NumericalFluxGasMixBase & _numerical_flux
Numerical flux user object.
virtual std::vector< ADReal > getGhostCellSolution(const std::vector< ADReal > &U1) const =0
Gets the solution vector in the ghost cell.
uint8_t dof_id_type