Line data Source code
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 : #include "BoundaryFluxGasMixGhostBase.h" 11 : #include "NumericalFluxGasMixBase.h" 12 : 13 : InputParameters 14 82 : BoundaryFluxGasMixGhostBase::validParams() 15 : { 16 82 : InputParameters params = ADBoundaryFluxBase::validParams(); 17 : 18 164 : params.addRequiredParam<UserObjectName>("numerical_flux", "Name of numerical flux user object"); 19 164 : params.addRequiredParam<Real>("normal", "Outward normal"); 20 : 21 82 : return params; 22 0 : } 23 : 24 44 : BoundaryFluxGasMixGhostBase::BoundaryFluxGasMixGhostBase(const InputParameters & parameters) 25 : : ADBoundaryFluxBase(parameters), 26 44 : _numerical_flux(getUserObject<NumericalFluxGasMixBase>("numerical_flux")), 27 132 : _normal(getParam<Real>("normal")) 28 : { 29 44 : } 30 : 31 : void 32 460 : BoundaryFluxGasMixGhostBase::calcFlux(unsigned int iside, 33 : dof_id_type ielem, 34 : const std::vector<ADReal> & U1, 35 : const RealVectorValue & /*normal*/, 36 : std::vector<ADReal> & flux) const 37 : { 38 460 : const std::vector<ADReal> U2 = getGhostCellSolution(U1); 39 460 : flux = _numerical_flux.getFlux(iside, ielem, true, U1, U2, _normal); 40 460 : }