www.mooseframework.org
tensor_mechanics
src
postprocessors
Mass.C
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
// This post processor returns the mass value of an element. It is used
11
// to check that mass is conserved (per the evolving density calculation)
12
// when volume changes occur.
13
//
14
#include "
Mass.h
"
15
16
registerMooseObject
(
"TensorMechanicsApp"
,
Mass
);
17
18
defineLegacyParams
(
Mass
);
19
20
InputParameters
21
Mass::validParams
()
22
{
23
InputParameters params =
ElementIntegralVariablePostprocessor::validParams
();
24
params.set<
bool
>(
"use_displaced_mesh"
) =
true
;
25
return
params;
26
}
27
28
Mass::Mass
(
const
InputParameters & parameters)
29
: ElementIntegralVariablePostprocessor(parameters), _density(getMaterialProperty<Real>(
"density"
))
30
{
31
}
32
33
Real
34
Mass::computeQpIntegral
()
35
{
36
return
_density
[_qp];
37
}
Mass
This postprocessor computes the mass by integrating the density over the volume.
Definition:
Mass.h:24
Mass::Mass
Mass(const InputParameters ¶meters)
Definition:
Mass.C:28
Mass::validParams
static InputParameters validParams()
Definition:
Mass.C:21
Mass::_density
const MaterialProperty< Real > & _density
Definition:
Mass.h:33
Mass.h
registerMooseObject
registerMooseObject("TensorMechanicsApp", Mass)
validParams
InputParameters validParams()
Mass::computeQpIntegral
virtual Real computeQpIntegral()
Definition:
Mass.C:34
defineLegacyParams
defineLegacyParams(Mass)
Generated on Sat Jan 25 2020 12:04:47 for www.mooseframework.org by
1.8.16