https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
22public:
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
35private:
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}
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
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...
Base boundary condition for element-and-trace scalar hybridized DG discretizations assembled with aut...
unsigned int _cached_side
Side for which the complete AD Jacobian was most recently assembled.
virtual void compute(ElementAndTraceScalarHDGAssemblyHelper &helper)=0
Computes the boundary residual data using the supplied assembly helper.
virtual void computeResidual() override
Compute this object's contribution to the residual.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object's contribution to off-diagonal blocks of the system Jacobian matrix.
virtual ElementAndTraceScalarHDGAssemblyHelper & hdgHelper()=0
Returns the helper used for common element-and-trace scalar HDG assembly.
virtual void computeResidualAndJacobian() override
Compute this object's contribution to the residual and Jacobian simultaneously.
virtual ADReal computeQpResidual() override
Compute this IntegratedBC's contribution to the residual at the current quadrature point.
const Elem * _cached_elem
Element for which the complete AD Jacobian was most recently assembled.
virtual bool getMaterialPropertyCalled() const override
Returns true if getMaterialProperty() has been called, false otherwise.
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job.
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const override
Retrieve the set of material properties that this object depends on.
static InputParameters validParams()
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131