https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
44
45void
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}
unsigned int THREAD_ID
static InputParameters validParams()
void lmDirichletZero()
Constrains the unused L-HDG Dirichlet facet variable to zero.
const Moose::Functor< ADRealVectorValue > & _velocity_trace
Velocity trace used in numerical face fluxes.
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)
virtual ADRealVectorValue faceVelocity(unsigned int qp) const override
const MooseArray< Point > & _q_point_face
DenseVector< ADReal > _lm_re
const TransientInterface & _ti
const MooseArray< ADReal > & _lm_u_sol
const MooseArray< std::vector< Real > > & _lm_phi_face
const unsigned int & _current_side
const libMesh::QBase *const & _qrule_face
const MooseArray< Real > & _JxW_face
const Elem *const & _current_elem
Moose::StateArg determineState() const
unsigned int n_points() const