https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BodyForce.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 "GenericKernel.h"
13
14class Function;
15
24template <bool is_ad>
25class BodyForceTempl : public GenericKernel<is_ad>
26{
27public:
29
31
32protected:
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< false > BodyForce
Definition BodyForce.h:50
BodyForceTempl< true > ADBodyForce
Definition BodyForce.h:51
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
Moose::GenericType< Real, is_ad > GenericReal
Definition MooseTypes.h:698
This kernel implements a generic functional body force term: $ - c \cdof f \cdot \phi_i $.
Definition BodyForce.h:26
const Function & _function
Optional function value.
Definition BodyForce.h:39
const Real & _scale
Scale factor.
Definition BodyForce.h:36
const PostprocessorValue & _postprocessor
Optional Postprocessor value.
Definition BodyForce.h:42
const MooseArray< Moose::GenericType< Point, is_ad > > * _generic_q_point
Definition BodyForce.h:45
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
Definition BodyForce.C:48
static InputParameters validParams()
Definition BodyForce.C:21
Base class for function objects.
Definition Function.h:30
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
forward declarations
Definition MooseArray.h:18
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131