https://mooseframework.inl.gov
IPHDGBC.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 
19 class IPHDGBC : public ADIntegratedBC
20 {
21 public:
23 
25 
26  virtual void computeResidual() override;
27  virtual void computeJacobian() override;
28  virtual void computeOffDiagJacobian(unsigned int jvar) override;
29  virtual void computeResidualAndJacobian() override;
30  virtual void jacobianSetup() override;
31  virtual const std::unordered_set<unsigned int> & getMatPropDependencies() const override;
32 
33 protected:
37  virtual void compute() = 0;
38 
39  virtual IPHDGAssemblyHelper & iphdgHelper() = 0;
40  const IPHDGAssemblyHelper & iphdgHelper() const;
41 
42  virtual ADReal computeQpResidual() override { mooseError("this will never be called"); }
43 
45  const Elem * _cached_elem;
46 
48  unsigned int _cached_side;
49 };
50 
51 inline const IPHDGAssemblyHelper &
53 {
54  return const_cast<IPHDGBC *>(this)->iphdgHelper();
55 }
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const override
Retrieve the set of material properties that this object depends on.
Definition: IPHDGBC.C:67
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job...
Definition: IPHDGBC.C:49
const Elem * _cached_elem
A data member used for determining when to compute the Jacobian.
Definition: IPHDGBC.h:45
Implements a prescribed flux for an IP-HDG discretization.
Definition: IPHDGBC.h:19
IPHDGBC(const InputParameters &parameters)
Definition: IPHDGBC.C:19
virtual void computeResidualAndJacobian() override
Compute this object&#39;s contribution to the residual and Jacobian simultaneously.
Definition: IPHDGBC.C:41
static InputParameters validParams()
Definition: IPHDGBC.C:14
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:47
Base class that declares all the methods for assembling a hybridized interior penalty discontinuous G...
virtual void compute()=0
compute the AD residuals
virtual ADReal computeQpResidual() override
Compute this IntegratedBC&#39;s contribution to the residual at the current quadrature point...
Definition: IPHDGBC.h:42
virtual IPHDGAssemblyHelper & iphdgHelper()=0
Base class for deriving any boundary condition of a integrated type.
virtual void computeJacobian() override
Compute this object&#39;s contribution to the diagonal Jacobian entries.
Definition: IPHDGBC.C:33
unsigned int _cached_side
A cache variable to prevent multiple computations of Jacobians.
Definition: IPHDGBC.h:48
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object&#39;s contribution to off-diagonal blocks of the system Jacobian matrix...
Definition: IPHDGBC.C:56
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void computeResidual() override
Compute this object&#39;s contribution to the residual.
Definition: IPHDGBC.C:25