18 #include "libmesh/quadrature.h" 30 _lowerd_var(*getArrayVar(
"lowerd_variable", 0)),
31 _lambda(_is_implicit ? _lowerd_var.slnLower() : _lowerd_var.slnLowerOld()),
33 _phi_lambda(_lowerd_var.phiLower()),
34 _test_lambda(_lowerd_var.phiLower()),
39 if (lower_domains.count(
id) == 0)
43 "'lowerd_variable' must be defined on the boundary lower-dimensional subdomain '" +
45 "' that is added by Mesh/build_all_side_lowerd_mesh=true.\nThe check could be overly " 51 "Must not be defined on the boundary lower-dimensional subdomain '" +
56 "The number of components must be equal to the number of " 57 "components of 'variable'");
75 "Size of local residual is not equal to the number of array variable compoments");
97 "Jacobian types must have lower in computeLowerDJacobian");
149 const unsigned int jvar_num)
153 "Jacobian types must have lower in computeLowerDJacobian");
183 for (
_j = 0;
_j < loc_phi.size();
_j++)
210 mooseError(
"Vector variable cannot be coupled into array DG kernel currently");
230 return RealEigenMatrix::Zero(
_count, jvar.
count());
MooseMesh & _mesh
Reference to this Kernel's mesh object.
ArrayLowerDIntegratedBC(const InputParameters ¶meters)
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
const ArrayVariablePhiValue & _phi
shape function values (in QPs)
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
virtual void computeLowerDJacobian(Moose::ConstraintJacobianType type)
Method for computing the LowerLower, PrimaryLower and LowerPrimary parts of Jacobian.
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
unsigned int number() const
Get variable number coming from libMesh.
void saveDiagLocalArrayJacobian(DenseMatrix< Number > &ke, unsigned int i, unsigned int ntest, unsigned int j, unsigned int nphi, unsigned int ivar, const RealEigenVector &v) const
Helper function for assembling diagonal Jacobian contriubutions on local quadrature points for an arr...
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
static InputParameters validParams()
unsigned int _i
i-th, j-th index for enumerating test and shape functions
void mooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
This class provides an interface for common operations on field variables of both FE and FV types wit...
const unsigned int _count
Number of components of the array variable.
static InputParameters validParams()
void saveLocalArrayResidual(DenseVector< Number > &re, unsigned int i, unsigned int ntest, const RealEigenVector &v) const
Helper function for assembling residual contriubutions on local quadrature points for an array kernel...
DenseMatrix< Number > _local_ke
Holds local Jacobian entries as they are accumulated by this Kernel.
const ArrayVariableTestValue & _test_lambda
test functions
const MooseVariableFieldBase & getVariable(unsigned int jvar_num) const
Retrieve the variable object from our system associated with jvar_num.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
unsigned int _qp
quadrature point index
virtual void computeResidual() override
Compute this object's contribution to the residual.
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
unsigned int size() const
The number of elements that can currently be stored in the array.
const ArrayMooseVariable & _lowerd_var
Variable this kernel operates on.
OutputTools< Real >::VariableTestValue VariableTestValue
ArrayMooseVariable & _var
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-ivar-residual / d-jvar...
const std::string & type() const
Get the type of this class.
virtual void initLowerDQpOffDiagJacobian(Moose::ConstraintJacobianType, const MooseVariableFEBase &)
Put necessary evaluations depending on qp but independent on test and shape functions here for off-di...
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
void accumulateTaggedLocalMatrix()
Local Jacobian blocks will be appended by adding the current local kernel Jacobian.
const MooseArray< Real > & _coord
coordinate transformation
const std::set< SubdomainID > & boundaryLowerDBlocks() const
void computeLowerDOffDiagJacobian(Moose::ConstraintJacobianType type, const unsigned int jvar_num)
Method for computing an off-diagonal jacobian component.
const ArrayVariablePhiValue & _phi_lambda
Shape functions.
virtual void initLowerDQpJacobian(Moose::ConstraintJacobianType)
Put necessary evaluations depending on qp but independent on test and shape functions here...
Assembly & _assembly
Reference to this Kernel's assembly object.
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-ivar-residual / d-jvar...
const std::set< SubdomainID > & activeSubdomains() const
The subdomains the variable is active on.
const QBase *const & _qrule
active quadrature rule
const ArrayVariableTestValue & _test
test function values (in QPs)
virtual const FieldVariablePhiValue & phiLower() const override
Return the variable's shape functions on a lower-dimensional element.
virtual RealEigenMatrix computeLowerDQpOffDiagJacobian(Moose::ConstraintJacobianType type, const MooseVariableFEBase &jvar)
Method for computing an off-diagonal jacobian component at quadrature points.
void prepareMatrixTagLower(Assembly &assembly, unsigned int ivar, unsigned int jvar, Moose::ConstraintJacobianType type)
Prepare data for computing the jacobian according to the active tags for mortar.
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
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...
virtual RealEigenVector computeLowerDQpJacobian(Moose::ConstraintJacobianType)=0
Method for computing the LowerLower, PrimaryLower and LowerPrimary parts of Jacobian at quadrature po...
Base class for deriving any boundary condition of a integrated type.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
void prepareVectorTagLower(Assembly &assembly, unsigned int ivar)
Prepare data for computing the residual according to active tags for mortar constraints.
virtual void computeLowerDQpResidual(RealEigenVector &residual)=0
Method for computing the Lower part of residual at quadrature points, to be filled in residual...
void saveFullLocalArrayJacobian(DenseMatrix< Number > &ke, unsigned int i, unsigned int ntest, unsigned int j, unsigned int nphi, unsigned int ivar, unsigned int jvar, const RealEigenMatrix &v) const
Helper function for assembling full Jacobian contriubutions on local quadrature points for an array k...
virtual void initLowerDQpResidual()
Put necessary evaluations depending on qp but independent on test functions here. ...
RealEigenVector _work_vector
Work vector for residual.
const MooseArray< Real > & _JxW
transformed Jacobian weights
virtual void computeResidual() override
Compute this object's contribution to the residual.