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 
22 class NonlocalKernel : public Kernel
23 {
24 public:
26 
28 
36  virtual void computeJacobian() override;
37  virtual void computeOffDiagJacobian(unsigned int jvar) override;
38 
47  virtual void computeNonlocalJacobian() override;
48  virtual void computeNonlocalOffDiagJacobian(unsigned int jvar) override;
49 
50 protected:
52  virtual Real computeQpNonlocalJacobian(dof_id_type /*dof_index*/) { return 0; }
53  virtual Real computeQpNonlocalOffDiagJacobian(unsigned int /*jvar*/, dof_id_type /*dof_index*/)
54  {
55  return 0;
56  }
57 
59  virtual void getUserObjectJacobian(unsigned int /*jvar*/, dof_id_type /*dof_index*/) {}
61  virtual bool globalDoFEnabled(MooseVariableFEBase & /*var*/, dof_id_type /*dof_index*/)
62  {
63  return true;
64  }
65 
66  unsigned int _k;
67 };
virtual void getUserObjectJacobian(unsigned int, dof_id_type)
Optimization option for getting jocobinas from userobject once per dof.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual void computeJacobian() override
computeJacobian and computeQpOffDiagJacobian methods are almost same as Kernel except for few additio...
NonlocalKernel(const InputParameters &parameters)
static InputParameters validParams()
virtual bool globalDoFEnabled(MooseVariableFEBase &, dof_id_type)
optimization option for executing nonlocal jacobian calculation only for nonzero elements ...
virtual void computeOffDiagJacobian(unsigned int jvar) override
Computes d-residual / d-jvar... storing the result in Ke.
virtual Real computeQpNonlocalOffDiagJacobian(unsigned int, dof_id_type)
virtual void computeNonlocalOffDiagJacobian(unsigned int jvar) override
Computes Jacobian entries corresponding to nonlocal dofs of the jvar.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
NonlocalKernel is used for solving integral terms in integro-differential equations.
Definition: Kernel.h:15
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int _k
virtual void computeNonlocalJacobian() override
computeNonlocalJacobian and computeNonlocalOffDiagJacobian methods are introduced for providing the j...
virtual Real computeQpNonlocalJacobian(dof_id_type)
Compute this Kernel's contribution to the Jacobian corresponding to nolocal dof at the current quadra...
uint8_t dof_id_type