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 "ViewFactorPP.h" 11 : #include "ViewFactorBase.h" 12 : 13 : registerMooseObject("HeatTransferApp", ViewFactorPP); 14 : 15 : InputParameters 16 424 : ViewFactorPP::validParams() 17 : { 18 424 : InputParameters params = GeneralPostprocessor::validParams(); 19 848 : params.addRequiredParam<UserObjectName>("view_factor_object_name", 20 : "Name of the ViewFactor userobjects."); 21 848 : params.addRequiredParam<BoundaryName>("from_boundary", 22 : "The boundary from which to compute the view factor."); 23 848 : params.addRequiredParam<BoundaryName>("to_boundary", 24 : "The boundary from which to compute the view factor."); 25 424 : params.addClassDescription( 26 : "This postprocessor allows to extract view factors from ViewFactor userobjects."); 27 424 : return params; 28 0 : } 29 : 30 212 : ViewFactorPP::ViewFactorPP(const InputParameters & parameters) 31 : : GeneralPostprocessor(parameters), 32 212 : _vf_uo(getUserObject<ViewFactorBase>("view_factor_object_name")), 33 424 : _from_bnd_id(_fe_problem.mesh().getBoundaryID(getParam<BoundaryName>("from_boundary"))), 34 636 : _to_bnd_id(_fe_problem.mesh().getBoundaryID(getParam<BoundaryName>("to_boundary"))) 35 : { 36 212 : } 37 : 38 : PostprocessorValue 39 188 : ViewFactorPP::getValue() const 40 : { 41 188 : return _vf_uo.getViewFactor(_from_bnd_id, _to_bnd_id); 42 : }