www.mooseframework.org
Mass.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 // This post processor returns the mass value of an element. It is used
8 // to check that mass is conserved (per the evolving density calculation)
9 // when volume changes occur.
10 //
11 #include "Mass.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<ElementIntegralVariablePostprocessor>();
18  params.set<bool>("use_displaced_mesh") = true;
19  return params;
20 }
21 
22 Mass::Mass(const InputParameters & parameters)
23  : ElementIntegralVariablePostprocessor(parameters), _density(getMaterialProperty<Real>("density"))
24 {
25 }
26 
27 Real
29 {
30  return _density[_qp];
31 }
virtual Real computeQpIntegral()
Definition: Mass.C:28
const MaterialProperty< Real > & _density
Definition: Mass.h:29
InputParameters validParams< Mass >()
Definition: Mass.C:15
Mass(const InputParameters &parameters)
Definition: Mass.C:22