Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MatBodyForceTempl< is_ad, Parent > Class Template Reference

This kernel creates a body force that is modified by a mask defined as a material. More...

#include <MatBodyForce.h>

Inheritance diagram for MatBodyForceTempl< is_ad, Parent >:
[legend]

Public Member Functions

 MatBodyForceTempl (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual GenericReal< is_ad > computeQpResidual () override
 

Protected Attributes

const GenericMaterialProperty< Real, is_ad > & _property
 
 usingGenericKernelMembers
 

Detailed Description

template<bool is_ad, class Parent>
class MatBodyForceTempl< is_ad, Parent >

This kernel creates a body force that is modified by a mask defined as a material.

Common uses of this would be to turn off or change the body force in certain regions of the mesh.

Definition at line 22 of file MatBodyForce.h.

Constructor & Destructor Documentation

◆ MatBodyForceTempl()

template<bool is_ad, class Parent >
MatBodyForceTempl< is_ad, Parent >::MatBodyForceTempl ( const InputParameters parameters)

Definition at line 27 of file MatBodyForce.C.

28  : Parent(parameters),
29  _property(this->template getGenericMaterialProperty<Real, is_ad>("material_property"))
30 {
31 }
const GenericMaterialProperty< Real, is_ad > & _property
Definition: MatBodyForce.h:32

Member Function Documentation

◆ computeQpResidual()

template<bool is_ad, class Parent >
GenericReal< is_ad > MatBodyForceTempl< is_ad, Parent >::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 35 of file MatBodyForce.C.

36 {
37  return Parent::computeQpResidual() * _property[_qp];
38 }
const GenericMaterialProperty< Real, is_ad > & _property
Definition: MatBodyForce.h:32

◆ validParams()

template<bool is_ad, class Parent >
InputParameters MatBodyForceTempl< is_ad, Parent >::validParams ( )
static

Definition at line 17 of file MatBodyForce.C.

18 {
20  params.addClassDescription("Kernel that defines a body force modified by a material property");
21  params.addRequiredParam<MaterialPropertyName>("material_property",
22  "Material property defining the body force");
23  return params;
24 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...

Member Data Documentation

◆ _property

template<bool is_ad, class Parent >
const GenericMaterialProperty<Real, is_ad>& MatBodyForceTempl< is_ad, Parent >::_property
protected

Definition at line 32 of file MatBodyForce.h.

◆ usingGenericKernelMembers

template<bool is_ad, class Parent >
MatBodyForceTempl< is_ad, Parent >::usingGenericKernelMembers
protected

Definition at line 34 of file MatBodyForce.h.


The documentation for this class was generated from the following files: