https://mooseframework.inl.gov
AdvectionLHDGAssemblyHelper.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 
11 #include "TransientInterface.h"
12 
15 {
17  params.addRequiredParam<MooseFunctorName>("face_velocity",
18  "Velocity trace used for numerical face fluxes");
19  return params;
20 }
21 
23  const MooseObject * const moose_obj,
25  const TransientInterface * const ti,
26  SystemBase & sys,
27  const Assembly & assembly,
28  const THREAD_ID tid,
29  const std::set<SubdomainID> & block_ids,
30  const std::set<BoundaryID> & boundary_ids)
31  : AdvectionHDGAssemblyHelper(moose_obj, mvdi, ti, sys, assembly, tid, block_ids, boundary_ids),
32  ADFunctorInterface(moose_obj),
33  _velocity_trace(getFunctor<ADRealVectorValue>("face_velocity"))
34 {
35 }
36 
38 AdvectionLHDGAssemblyHelper::faceVelocity(const unsigned int qp) const
39 {
40  return _velocity_trace(
43 }
44 
45 void
47 {
48  for (const auto qp : make_range(_qrule_face->n_points()))
49  for (const auto i : index_range(_lm_re))
50  // Match the zero-trace convention used by the L-HDG diffusion Dirichlet boundary condition.
51  _lm_re(i) -= _JxW_face[qp] * _lm_u_sol[qp] * _lm_phi_face[i][qp];
52 }
void lmDirichletZero()
Constrains the unused L-HDG Dirichlet facet variable to zero.
const MooseArray< std::vector< Real > > & _lm_phi_face
Moose::StateArg determineState() const
const MooseArray< Real > & _JxW_face
static InputParameters validParams()
const MooseArray< ADReal > & _lm_u_sol
AdvectionLHDGAssemblyHelper(const MooseObject *moose_obj, MooseVariableDependencyInterface *mvdi, const TransientInterface *ti, SystemBase &sys, const Assembly &assembly, THREAD_ID tid, const std::set< SubdomainID > &block_ids, const std::set< BoundaryID > &boundary_ids)
unsigned int n_points() const
const Moose::Functor< ADRealVectorValue > & _velocity_trace
Velocity trace used in numerical face fluxes.
const MooseArray< Point > & _q_point_face
const Elem *const & _current_elem
const unsigned int & _current_side
IntRange< T > make_range(T beg, T end)
virtual ADRealVectorValue faceVelocity(unsigned int qp) const override
const TransientInterface & _ti
const libMesh::QBase *const & _qrule_face
auto index_range(const T &sizable)
unsigned int THREAD_ID
DenseVector< ADReal > _lm_re
static InputParameters validParams()