https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
14
18class ArrayNodalBC : public NodalBCBase, public MooseVariableInterface<RealEigenVector>
19{
20public:
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
34protected:
36
38 const Node * const & _current_node;
39
41 const RealEigenVector & _u;
42
47 virtual void computeQpResidual(RealEigenVector & residual) = 0;
48
54 virtual RealEigenVector computeQpJacobian();
55
60 virtual RealEigenMatrix computeQpOffDiagJacobian(MooseVariableFEBase & jvar);
61
63 const unsigned int _count;
64
65private:
67 RealEigenVector _work_vector;
68};
Base class for deriving any boundary condition that works at nodes on vector variables.
const unsigned int _count
Number of components of the array variable.
virtual void computeResidual() override
Compute this object's contribution to the residual.
virtual RealEigenMatrix computeQpOffDiagJacobian(MooseVariableFEBase &jvar)
This is the virtual that derived classes should override for computing an off-diagonal jacobian compo...
virtual void computeQpResidual(RealEigenVector &residual)=0
Compute this BC's contribution to the residual at the current quadrature point, to be filled in resid...
ArrayMooseVariable & _var
RealEigenVector _work_vector
Work vector for residual.
const Node *const & _current_node
current node being processed
static InputParameters validParams()
virtual const ArrayMooseVariable & variable() const override
Gets the variable this BC is active on.
virtual void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
const RealEigenVector & _u
Value of the unknown variable this BC is acting on.
virtual RealEigenVector computeQpJacobian()
The user can override this function to compute the "on-diagonal" Jacobian contribution for this Vecto...
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes this object's contribution to off-diagonal blocks of the system Jacobian matrix.
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
This class provides an interface for common operations on field variables of both FE and FV types wit...
Interface for objects that need to get values of MooseVariables.
Base class for deriving any boundary condition that works at nodes.
Definition NodalBCBase.h:28