www.mooseframework.org
BodyForce.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 
14 class Function;
15 
24 template <bool is_ad>
25 class BodyForceTempl : public GenericKernel<is_ad>
26 {
27 public:
29 
31 
32 protected:
33  virtual GenericReal<is_ad> computeQpResidual() override;
34 
36  const Real & _scale;
37 
40 
43 
44  // AD/non-AD version of the quadrature point coordinates
46 
48 };
49 
BodyForceTempl(const InputParameters &parameters)
Definition: BodyForce.C:36
Base class for function objects.
Definition: Function.h:37
static InputParameters validParams()
Definition: BodyForce.C:21
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: BodyForce.C:48
usingGenericKernelMembers
Definition: BodyForce.h:47
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
BodyForceTempl< true > ADBodyForce
Definition: BodyForce.h:51
const Function & _function
Optional function value.
Definition: BodyForce.h:39
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
const Real & _scale
Scale factor.
Definition: BodyForce.h:36
const PostprocessorValue & _postprocessor
Optional Postprocessor value.
Definition: BodyForce.h:42
BodyForceTempl< false > BodyForce
Definition: BodyForce.h:50
forward declarations
Definition: MooseArray.h:17
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MooseArray< MooseADWrapper< Point, is_ad > > * _generic_q_point
Definition: BodyForce.h:45
const InputParameters & parameters() const
Get the parameters of the object.
typename Moose::GenericType< Real, is_ad > GenericReal
Definition: MooseTypes.h:559
This kernel implements a generic functional body force term: $ - c f $.
Definition: BodyForce.h:25