https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementAndTraceScalarHDGAssemblyHelper.h
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
10#pragma once
11
12#include "MooseArray.h"
13#include "MooseFunctorForward.h"
14#include "MooseTypes.h"
16
17#include <array>
18#include <set>
19#include <string>
20#include <vector>
21
22template <typename>
23class MooseVariableFE;
24class Assembly;
25class MooseObject;
27class SystemBase;
30
39{
40public:
42
45 const TransientInterface * ti,
46 SystemBase & sys,
47 const Assembly & assembly,
48 THREAD_ID tid,
49 const std::set<SubdomainID> & blocks_ids,
50 const std::set<BoundaryID> & boundary_ids);
51
53 void resizeResiduals();
54
56 virtual void scalarVolume() = 0;
57
59 virtual void scalarFace() = 0;
60
62 virtual void lmFace() = 0;
63
65 virtual void scalarDirichlet(const Moose::Functor<Real> & dirichlet_value) = 0;
66
68 void lmDirichlet(const Moose::Functor<Real> & dirichlet_value);
69
71 void lmPrescribedFlux(const Moose::Functor<Real> & flux_value);
72
76 std::array<ADResidualsPacket, 2> taggingData() const;
77
81 std::set<std::string> additionalROVariables();
82
84
85protected:
88
91
94
96 const std::vector<dof_id_type> & _u_dof_indices;
97
99 const std::vector<dof_id_type> & _lm_u_dof_indices;
100
103
106
109
112
115
118
120 const Real & _elem_volume;
121
123 const Real & _side_area;
124
126 const Elem * const & _current_elem;
127
129 const unsigned int & _current_side;
130
132 const Elem * const & _current_side_elem;
133
136
138 const libMesh::QBase * const & _qrule;
139
142
145
148
151
154
156 DenseVector<ADReal> _scalar_re;
157
159 DenseVector<ADReal> _lm_re;
160};
161
162inline void
unsigned int THREAD_ID
Definition MooseTypes.h:237
Keeps track of stuff related to assembling.
Definition Assembly.h:110
Method-neutral assembly data and operations for an element-and-trace scalar hybridized DG discretizat...
const std::vector< dof_id_type > & _lm_u_dof_indices
Degree-of-freedom indices for the facet trace.
const MooseVariableFE< Real > & _u_face_var
Facet trace variable.
const MooseArray< Real > & _JxW
Element quadrature weights including the transformed Jacobian.
virtual ~ElementAndTraceScalarHDGAssemblyHelper()=default
DenseVector< ADReal > _scalar_re
Residual for the element-interior scalar equation.
virtual void scalarFace()=0
Assembles the element-interior equation's face contribution.
void lmDirichlet(const Moose::Functor< Real > &dirichlet_value)
Enforces a Dirichlet value in the facet equation.
const MooseVariableFE< Real > & _u_var
Element-interior scalar variable.
const MooseArray< Point > & _q_point_face
Physical face quadrature points.
DenseVector< ADReal > _lm_re
Residual for the facet trace equation.
const TransientInterface & _ti
Transient state used to evaluate boundary functors.
std::array< ADResidualsPacket, 2 > taggingData() const
const std::vector< dof_id_type > & _u_dof_indices
Degree-of-freedom indices for the element-interior scalar.
const MooseArray< ADReal > & _lm_u_sol
Facet trace values at face quadrature points.
const Elem *const & _current_side_elem
Current side element.
void resizeResiduals()
Resizes the element-interior and facet residual vectors for the current element.
const libMesh::QBase *const & _qrule
Element quadrature rule.
virtual void lmFace()=0
Assembles the facet equation's interior-face contribution.
const MooseArray< Point > & _normals
Outward unit normals on the current face.
const MooseArray< Point > & _q_point
Physical element quadrature points.
void lmPrescribedFlux(const Moose::Functor< Real > &flux_value)
Applies a prescribed flux in the facet equation.
virtual void scalarVolume()=0
Assembles the element-interior equation's volume contribution.
virtual void scalarDirichlet(const Moose::Functor< Real > &dirichlet_value)=0
Assembles the element-interior equation on a Dirichlet boundary.
const MooseArray< std::vector< Real > > & _lm_phi_face
Facet trace test functions evaluated on a face.
const MooseArray< ADReal > & _u_sol
Element-interior scalar values at quadrature points.
const MooseArray< std::vector< Real > > & _scalar_phi
Element-interior scalar test functions.
const MooseArray< std::vector< RealVectorValue > > & _grad_scalar_phi
Gradients of the element-interior scalar test functions.
const unsigned int & _current_side
Current element-side index.
const MooseArray< std::vector< Real > > & _scalar_phi_face
Element-interior scalar test functions evaluated on a face.
const libMesh::QBase *const & _qrule_face
Face quadrature rule.
const MooseArray< Real > & _JxW_face
Face quadrature weights including the transformed Jacobian.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
forward declarations
Definition MooseArray.h:18
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
Class for stuff related to variables.
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
Base class for a system (of equations)
Definition SystemBase.h:87
This interface is designed currently for DomainUserObject where material properties on element,...
Interface for objects that needs transient capabilities.
Utility structure for packaging up all of the residual object's information needed to add into the sy...