https://mooseframework.inl.gov
ArrayNodalBC.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 "NodalBCBase.h"
13 #include "MooseVariableInterface.h"
14 
18 class ArrayNodalBC : public NodalBCBase, public MooseVariableInterface<RealEigenVector>
19 {
20 public:
22 
24 
29  virtual const ArrayMooseVariable & variable() const override { return _var; }
30  virtual void computeResidual() override;
31  virtual void computeJacobian() override;
32  virtual void computeOffDiagJacobian(unsigned int jvar) override;
33 
34 protected:
36 
38  const Node * const & _current_node;
39 
42 
47  virtual void computeQpResidual(RealEigenVector & residual) = 0;
48 
55 
61 
63  const unsigned int _count;
64 
65 private:
68 };
Class for stuff related to variables.
Definition: Adaptivity.h:31
Base class for deriving any boundary condition that works at nodes on vector variables.
Definition: ArrayNodalBC.h:18
const unsigned int _count
Number of components of the array variable.
Definition: ArrayNodalBC.h:63
virtual void computeJacobian() override
Compute this object&#39;s contribution to the diagonal Jacobian entries.
Definition: ArrayNodalBC.C:56
const RealEigenVector & _u
Value of the unknown variable this BC is acting on.
Definition: ArrayNodalBC.h:41
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual const ArrayMooseVariable & variable() const override
Gets the variable this BC is active on.
Definition: ArrayNodalBC.h:29
This class provides an interface for common operations on field variables of both FE and FV types wit...
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
Definition: MooseTypes.h:149
Base class for deriving any boundary condition that works at nodes.
Definition: NodalBCBase.h:26
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object&#39;s contribution to off-diagonal blocks of the system Jacobian matrix...
Definition: ArrayNodalBC.C:73
ArrayMooseVariable & _var
Definition: ArrayNodalBC.h:35
ArrayNodalBC(const InputParameters &parameters)
Definition: ArrayNodalBC.C:25
const Node *const & _current_node
current node being processed
Definition: ArrayNodalBC.h:38
virtual RealEigenMatrix computeQpOffDiagJacobian(MooseVariableFEBase &jvar)
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...
Definition: ArrayNodalBC.C:104
RealEigenVector _work_vector
Work vector for residual.
Definition: ArrayNodalBC.h:67
Interface for objects that need to get values of MooseVariables.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void computeQpResidual(RealEigenVector &residual)=0
Compute this BC&#39;s contribution to the residual at the current quadrature point, to be filled in resid...
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146
static InputParameters validParams()
Definition: ArrayNodalBC.C:19
virtual void computeResidual() override
Compute this object&#39;s contribution to the residual.
Definition: ArrayNodalBC.C:42
virtual RealEigenVector computeQpJacobian()
The user can override this function to compute the "on-diagonal" Jacobian contribution for this Vecto...
Definition: ArrayNodalBC.C:97