Line data Source code
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 "CavityPressurePostprocessor.h" 11 : 12 : #include "CavityPressureUserObject.h" 13 : 14 : registerMooseObject("SolidMechanicsApp", CavityPressurePostprocessor); 15 : 16 : InputParameters 17 0 : CavityPressurePostprocessor::validParams() 18 : { 19 0 : InputParameters params = GeneralPostprocessor::validParams(); 20 0 : params.addClassDescription("Interfaces with the CavityPressureUserObject to store " 21 : "the initial number of moles of a gas contained within " 22 : "an internal volume."); 23 0 : params.addRequiredParam<UserObjectName>( 24 : "cavity_pressure_uo", "The CavityPressureUserObject that computes the initial moles"); 25 0 : MooseEnum quantity("initial_moles cavity_pressure"); 26 0 : params.addRequiredParam<MooseEnum>( 27 0 : "quantity", quantity, "The quantity to report: " + quantity.getRawNames()); 28 0 : params.set<bool>("use_displaced_mesh") = true; 29 0 : return params; 30 0 : } 31 : 32 0 : CavityPressurePostprocessor::CavityPressurePostprocessor(const InputParameters & params) 33 : : GeneralPostprocessor(params), 34 0 : _cpuo(getUserObject<CavityPressureUserObject>("cavity_pressure_uo")), 35 0 : _quantity(getParam<MooseEnum>("quantity")) 36 : { 37 0 : } 38 : 39 : PostprocessorValue 40 0 : CavityPressurePostprocessor::getValue() const 41 : { 42 0 : return _cpuo.getValue(_quantity); 43 : }