https://mooseframework.inl.gov
ElementAndTraceScalarHDGBC.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 "ADIntegratedBC.h"
13 
15 
21 {
22 public:
24 
26 
27  virtual void computeResidual() override;
28  virtual void computeJacobian() override;
29  virtual void computeOffDiagJacobian(unsigned int jvar) override;
30  virtual void computeResidualAndJacobian() override;
31  virtual void jacobianSetup() override;
32  virtual const std::unordered_set<unsigned int> & getMatPropDependencies() const override;
33  virtual bool getMaterialPropertyCalled() const override;
34 
35 private:
37  virtual void compute(ElementAndTraceScalarHDGAssemblyHelper & helper) = 0;
38 
42 
43  virtual ADReal computeQpResidual() override { mooseError("this will never be called"); }
44 
46  const Elem * _cached_elem;
47 
49  unsigned int _cached_side;
50 };
51 
54 {
55  return const_cast<ElementAndTraceScalarHDGBC *>(this)->hdgHelper();
56 }
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.
virtual ADReal computeQpResidual() override
Compute this IntegratedBC&#39;s contribution to the residual at the current quadrature point...
virtual void computeJacobian() override
Compute this object&#39;s contribution to the diagonal Jacobian entries.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
unsigned int _cached_side
Side for which the complete AD Jacobian was most recently assembled.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object&#39;s contribution to off-diagonal blocks of the system Jacobian matrix...
Base boundary condition for element-and-trace scalar hybridized DG discretizations assembled with aut...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:42
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job...
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.
Method-neutral assembly data and operations for an element-and-trace scalar hybridized DG discretizat...
virtual void computeResidual() override
Compute this object&#39;s contribution to the residual.
static InputParameters validParams()
virtual ElementAndTraceScalarHDGAssemblyHelper & hdgHelper()=0
Returns the helper used for common element-and-trace scalar HDG assembly.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:271
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)