https://mooseframework.inl.gov
ElementAndTraceScalarHDGBC.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 #include "TaggingInterface.h"
13 
16 {
18 }
19 
21  : ADIntegratedBC(parameters), _cached_elem(nullptr), _cached_side(libMesh::invalid_uint)
22 {
23 }
24 
25 void
27 {
28  auto & helper = hdgHelper();
29  compute(helper);
30  for (const auto & residual_packet : helper.taggingData())
31  addResiduals(_assembly, residual_packet);
32 }
33 
34 void
36 {
37  auto & helper = hdgHelper();
38  compute(helper);
39  for (const auto & residual_packet : helper.taggingData())
40  addJacobian(_assembly, residual_packet);
41 }
42 
43 void
45 {
46  auto & helper = hdgHelper();
47  compute(helper);
48  for (const auto & residual_packet : helper.taggingData())
49  addResidualsAndJacobian(_assembly, residual_packet);
50 }
51 
52 void
54 {
55  _cached_elem = nullptr;
57 }
58 
59 void
61 {
63  {
67  }
68 }
69 
70 const std::unordered_set<unsigned int> &
72 {
74 }
75 
76 bool
78 {
80 }
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const
Retrieve the set of material properties that this object depends on.
const Elem * _cached_elem
Element for which the complete AD Jacobian was most recently assembled.
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const override
Retrieve the set of material properties that this object depends on.
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals and derivatives for the Jacobian, corresponding to the provided d...
const unsigned int invalid_uint
virtual bool getMaterialPropertyCalled() const
Returns true if getMaterialProperty() has been called, false otherwise.
const Elem *const & _current_elem
current element
virtual void computeJacobian() override
Compute this object&#39;s contribution to the diagonal Jacobian entries.
unsigned int _cached_side
Side for which the complete AD Jacobian was most recently assembled.
void addResiduals(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals corresponding to the provided dof indices.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object&#39;s contribution to off-diagonal blocks of the system Jacobian matrix...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
static InputParameters validParams()
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job...
void addJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided residual derivatives into the Jacobian for the provided dof indices.
virtual void compute(ElementAndTraceScalarHDGAssemblyHelper &helper)=0
Computes the boundary residual data using the supplied assembly helper.
Base class for deriving any boundary condition of a integrated type.
Assembly & _assembly
Reference to this Kernel&#39;s assembly object.
virtual void computeResidual() override
Compute this object&#39;s contribution to the residual.
const unsigned int & _current_side
current side of the current element
static InputParameters validParams()
virtual ElementAndTraceScalarHDGAssemblyHelper & hdgHelper()=0
Returns the helper used for common element-and-trace scalar HDG assembly.
virtual void computeResidualAndJacobian() override
Compute this object&#39;s contribution to the residual and Jacobian simultaneously.
virtual bool getMaterialPropertyCalled() const override
Returns true if getMaterialProperty() has been called, false otherwise.
ElementAndTraceScalarHDGBC(const InputParameters &parameters)