www.mooseframework.org
CoupledForce.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 "GenericKernel.h"
13 
18 template <bool is_ad>
19 class CoupledForceTempl : public GenericKernel<is_ad>
20 {
21 public:
23 
25 
26 protected:
27  virtual GenericReal<is_ad> computeQpResidual() override;
28 
29  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
30 
32 
33 private:
35  unsigned int _v_var;
40 };
41 
Real _coef
Multiplier for the coupled force term.
Definition: CoupledForce.h:39
CoupledForceTempl< false > CoupledForce
Definition: CoupledForce.h:42
typename Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Definition: MooseTypes.h:573
static InputParameters validParams()
Definition: CoupledForce.C:19
unsigned int _v_var
Coupled variable number.
Definition: CoupledForce.h:35
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
CoupledForceTempl< true > ADCoupledForce
Definition: CoupledForce.h:43
const GenericVariableValue< is_ad > & _v
Coupled variable.
Definition: CoupledForce.h:37
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
For coupling standard variables.
Definition: CoupledForce.C:54
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: CoupledForce.C:47
const InputParameters & parameters() const
Get the parameters of the object.
typename Moose::GenericType< Real, is_ad > GenericReal
Definition: MooseTypes.h:559
Implements a source term proportional to the value of a coupled variable.
Definition: CoupledForce.h:19
CoupledForceTempl(const InputParameters &parameters)
Definition: CoupledForce.C:33