www.mooseframework.org
NonlocalKernel.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "Kernel.h"
13 
14 class NonlocalKernel;
15 
16 template <>
18 
27 class NonlocalKernel : public Kernel
28 {
29 public:
31 
39  virtual void computeJacobian() override;
40  virtual void computeOffDiagJacobian(MooseVariableFEBase & jvar) override;
42 
51  virtual void computeNonlocalJacobian() override;
52  virtual void computeNonlocalOffDiagJacobian(unsigned int jvar) override;
53 
54 protected:
56  virtual Real computeQpNonlocalJacobian(dof_id_type /*dof_index*/) { return 0; }
57  virtual Real computeQpNonlocalOffDiagJacobian(unsigned int /*jvar*/, dof_id_type /*dof_index*/)
58  {
59  return 0;
60  }
61 
63  virtual void getUserObjectJacobian(unsigned int /*jvar*/, dof_id_type /*dof_index*/) {}
65  virtual bool globalDoFEnabled(MooseVariableFEBase & /*var*/, dof_id_type /*dof_index*/)
66  {
67  return true;
68  }
69 
70  unsigned int _k;
71 };
72 
virtual void getUserObjectJacobian(unsigned int, dof_id_type)
Optimization option for getting jocobinas from userobject once per dof.
InputParameters validParams< NonlocalKernel >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void computeJacobian() override
computeJacobian and computeQpOffDiagJacobian methods are almost same as Kernel except for few additio...
virtual void computeOffDiagJacobian(MooseVariableFEBase &jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
Definition: Kernel.C:138
NonlocalKernel(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
virtual bool globalDoFEnabled(MooseVariableFEBase &, dof_id_type)
optimization option for executing nonlocal jacobian calculation only for nonzero elements ...
virtual Real computeQpNonlocalOffDiagJacobian(unsigned int, dof_id_type)
virtual void computeNonlocalOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar...
NonlocalKernel is used for solving integral terms in integro-differential equations.
Definition: Kernel.h:20
unsigned int _k
virtual void computeNonlocalJacobian() override
computeNonlocalJacobian and computeNonlocalOffDiagJacobian methods are introduced for providing the j...
virtual void computeOffDiagJacobian(MooseVariableFEBase &jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
virtual Real computeQpNonlocalJacobian(dof_id_type)
Compute this Kernel&#39;s contribution to the Jacobian corresponding to nolocal dof at the current quadra...