https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Mass.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// 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#include "metaphysicl/raw_type.h"
17
18registerMooseObject("SolidMechanicsApp", Mass);
19registerMooseObject("SolidMechanicsApp", ADMass);
20
21template <bool is_ad>
24{
27 "Computes the mass of the solid as the integral of the density material property");
28 params.set<bool>("use_displaced_mesh") = true;
29 return params;
30}
31
32template <bool is_ad>
35 _density(getGenericMaterialProperty<Real, is_ad>("density"))
36{
37}
38
39template <bool is_ad>
40Real
45
46template class MassTempl<false>;
47template class MassTempl<true>;
registerMooseObject("SolidMechanicsApp", Mass)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
This postprocessor computes the mass by integrating the density over the volume.
Definition Mass.h:19
virtual Real computeQpIntegral()
Definition Mass.C:41
MassTempl(const InputParameters &parameters)
Definition Mass.C:33
static InputParameters validParams()
Definition Mass.C:23
auto raw_value(const Eigen::Map< T > &in)