www.mooseframework.org
CavityPressurePostprocessor.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 
11 
13 
15 
18 {
20  params.addClassDescription("Interfaces with the CavityPressureUserObject to store "
21  "the initial number of moles of a gas contained within "
22  "an internal volume.");
23  params.addRequiredParam<UserObjectName>(
24  "cavity_pressure_uo", "The CavityPressureUserObject that computes the initial moles");
25  MooseEnum quantity("initial_moles cavity_pressure");
27  "quantity", quantity, "The quantity to report: " + quantity.getRawNames());
28  params.set<bool>("use_displaced_mesh") = true;
29  return params;
30 }
31 
33  : GeneralPostprocessor(params),
34  _cpuo(getUserObject<CavityPressureUserObject>("cavity_pressure_uo")),
35  _quantity(getParam<MooseEnum>("quantity"))
36 {
37 }
38 
41 {
42  return _cpuo.getValue(_quantity);
43 }
Real getValue(const MooseEnum &quantity) const
virtual PostprocessorValue getValue() const override
registerMooseObject("SolidMechanicsApp", CavityPressurePostprocessor)
T & set(const std::string &name, bool quiet_mode=false)
std::string getRawNames() const
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Real PostprocessorValue
static InputParameters validParams()
const CavityPressureUserObject & _cpuo
CavityPressurePostprocessor(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)