https://mooseframework.inl.gov
src
postprocessors
ElementIntegralMaterialProperty.C
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
#include "
ElementIntegralMaterialProperty.h
"
11
12
#include "metaphysicl/raw_type.h"
13
14
registerMooseObject
(
"MooseApp"
,
ElementIntegralMaterialProperty
);
15
registerMooseObject
(
"MooseApp"
,
ADElementIntegralMaterialProperty
);
16
17
template
<
bool
is_ad>
18
InputParameters
19
ElementIntegralMaterialPropertyTempl<is_ad>::validParams
()
20
{
21
InputParameters
params =
ElementIntegralPostprocessor::validParams
();
22
params.
addRequiredParam
<MaterialPropertyName>(
"mat_prop"
,
"The name of the material property"
);
23
params.
addClassDescription
(
"Compute the integral of the material property over the domain"
);
24
return
params;
25
}
26
27
template
<
bool
is_ad>
28
ElementIntegralMaterialPropertyTempl<is_ad>::ElementIntegralMaterialPropertyTempl
(
29
const
InputParameters
& parameters)
30
:
ElementIntegralPostprocessor
(parameters),
31
_scalar(getGenericMaterialProperty<
Real
, is_ad>(
"mat_prop"
))
32
{
33
}
34
35
template
<
bool
is_ad>
36
Real
37
ElementIntegralMaterialPropertyTempl<is_ad>::computeQpIntegral
()
38
{
39
return
MetaPhysicL::raw_value
(_scalar[_qp]);
40
}
41
42
template
class
ElementIntegralMaterialPropertyTempl<false>
;
43
template
class
ElementIntegralMaterialPropertyTempl<true>
;
ElementIntegralPostprocessor
This postprocessor computes a volume integral of the specified variable.
Definition:
ElementIntegralPostprocessor.h:20
ElementIntegralMaterialPropertyTempl::validParams
static InputParameters validParams()
Definition:
ElementIntegralMaterialProperty.C:19
MetaPhysicL::raw_value
auto raw_value(const Eigen::Map< T > &in)
Definition:
EigenADReal.h:73
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Definition:
InputParameters.h:66
ElementIntegralMaterialPropertyTempl::computeQpIntegral
virtual Real computeQpIntegral() override
Definition:
ElementIntegralMaterialProperty.C:37
ElementIntegralMaterialProperty.h
InputParameters::addRequiredParam
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...
Definition:
InputParameters.h:1628
ElementIntegralPostprocessor::validParams
static InputParameters validParams()
Definition:
ElementIntegralPostprocessor.C:15
ElementIntegralMaterialPropertyTempl
Definition:
ElementIntegralMaterialProperty.h:15
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ElementIntegralMaterialPropertyTempl::ElementIntegralMaterialPropertyTempl
ElementIntegralMaterialPropertyTempl(const InputParameters ¶meters)
Definition:
ElementIntegralMaterialProperty.C:28
registerMooseObject
registerMooseObject("MooseApp", ElementIntegralMaterialProperty)
InputParameters::addClassDescription
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...
Definition:
InputParameters.C:82
Generated on Thu Jul 17 2025 01:32:15 for https://mooseframework.inl.gov by
1.8.14