https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADArrayIntegratedBC.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 "IntegratedBCBase.h"
14#include "ADFunctorInterface.h"
15
21 public MooseVariableInterface<RealEigenVector>,
23{
24public:
26
28
29 virtual const ArrayMooseVariable & variable() const override { return _var; }
30
31 virtual void computeResidual() override;
32 virtual void computeJacobian() override;
33 virtual void computeOffDiagJacobian(unsigned int jvar) override;
34 virtual void computeOffDiagJacobianScalar(unsigned int jvar) override;
35 virtual void computeResidualAndJacobian() override;
36
37protected:
42 virtual void computeQpResidual(ADRealEigenVector & residual) = 0;
43
47 virtual void initQpResidual() {}
48
51
54
57
60
63
66
69
72
75
77 const unsigned int _count;
78
79private:
82
84 ADRealEigenVector _work_vector;
85
87 RealEigenVector _raw_work_vector;
88
90 std::vector<ADReal> _local_ad_re;
91};
OutputTools< RealEigenVector >::VariableTestGradient ArrayVariableTestGradient
Definition MooseTypes.h:396
OutputTools< RealEigenVector >::VariableTestValue ArrayVariableTestValue
Definition MooseTypes.h:395
Base class for integrated boundary conditions on array variables whose Jacobians are computed with au...
const ArrayVariableTestGradient & _grad_test
gradients of test functions (in QPs)
virtual void computeQpResidual(ADRealEigenVector &residual)=0
Compute this boundary condition's contribution to the residual at the current quadrature point,...
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object's contribution to off-diagonal blocks of the system Jacobian matrix.
ArrayMooseVariable & _var
The array variable this boundary condition acts on.
virtual void computeResidual() override
Compute this object's contribution to the residual.
const ADArrayVariableGradient & _grad_u
the gradient of the unknown variable this BC is acting on
const MooseArray< ADReal > & _ad_JxW
Quadrature weights times the face Jacobian, with derivatives on a displaced mesh.
const MooseArray< ADReal > & _ad_coord
Coordinate transformation factors, with derivatives on a displaced mesh.
ADRealEigenVector _work_vector
Work vector for the residual at a quadrature point.
void computeResidualsForJacobian()
Fill _local_ad_re with the AD residuals of all test functions on the current face.
const ArrayVariableTestValue & _test
test function values (in QPs)
const unsigned int _count
Number of components of the array variable.
virtual void computeOffDiagJacobianScalar(unsigned int jvar) override
Computes jacobian block with respect to a scalar variable.
virtual void computeResidualAndJacobian() override
Compute this object's contribution to the residual and Jacobian simultaneously.
virtual const ArrayMooseVariable & variable() const override
Returns the variable that this object operates on.
const bool _use_displaced_mesh
Whether this boundary condition is evaluated on the displaced mesh.
static InputParameters validParams()
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
std::vector< ADReal > _local_ad_re
Local AD residuals for the Jacobian computation.
const ADArrayVariableValue & _u
the values of the unknown variable this BC is acting on
RealEigenVector _raw_work_vector
Values of _work_vector without derivatives, for the residual computation.
const MooseArray< ADPoint > & _normals
normals at quadrature points
virtual void initQpResidual()
Put necessary evaluations depending on qp but independent of test functions here.
An interface for accessing Moose::Functors for systems that care about automatic differentiation,...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for deriving any boundary condition of a integrated type.
forward declarations
Definition MooseArray.h:18
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Interface for objects that need to get values of MooseVariables.