https://mooseframework.inl.gov
ADBoundaryFlux3EqnGhostBase.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.addClassDescription("Computes boundary fluxes for the 1-D, variable-area Euler equations "
19  "using a numerical flux user object and a ghost cell solution");
20 
21  params.addRequiredParam<UserObjectName>("numerical_flux", "Name of numerical flux user object");
22  params.addRequiredParam<Real>("normal", "Outward normal");
23 
24  return params;
25 }
26 
28  : ADBoundaryFluxBase(parameters),
29  _numerical_flux(getUserObject<ADNumericalFlux3EqnBase>("numerical_flux")),
30  _normal(getParam<Real>("normal"))
31 {
32 }
33 
34 void
36  dof_id_type ielem,
37  const std::vector<ADReal> & U1,
38  const RealVectorValue & /*normal*/,
39  std::vector<ADReal> & flux) const
40 {
41  const std::vector<ADReal> U2 = getGhostCellSolution(U1);
42  flux = _numerical_flux.getFlux(iside, ielem, true, U1, U2, _normal);
43 }
static InputParameters validParams()
static InputParameters validParams()
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)
Base class for computing numerical fluxes for FlowModelSinglePhase.
ADBoundaryFlux3EqnGhostBase(const InputParameters &parameters)
A base class for computing/caching fluxes at boundaries.
const ADNumericalFlux3EqnBase & _numerical_flux
Numerical flux user object.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const Real & _normal
Outward normal.
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
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.