https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SpecifiedViewFactor.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#include "SpecifiedViewFactor.h"
11
13
16{
18 params.addRequiredParam<std::vector<std::vector<Real>>>(
19 "view_factors", "The view factors from sideset i to sideset j.");
20 params.addClassDescription("View factors specified directly in the input file");
21 return params;
22}
23
25 : ViewFactorBase(parameters)
26{
27 _view_factors = getParam<std::vector<std::vector<Real>>>("view_factors");
28
30}
31
32void
34{
35 // check that the input has the right format
36 if (_view_factors.size() != _n_sides)
37 paramError("view_factors",
38 "Leading dimension of view_factors must be equal to number of side sets.");
39
40 for (unsigned int i = 0; i < _n_sides; ++i)
41 if (_view_factors[i].size() != _n_sides)
42 paramError("view_factors",
43 "view_factors must be provided as square array. Row ",
44 i,
45 " has ",
46 _view_factors[i].size(),
47 " entries.");
48}
registerMooseObject("HeatTransferApp", SpecifiedViewFactor)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void paramError(const std::string &param, Args... args) const
View factors specified directly in the input file.
static InputParameters validParams()
SpecifiedViewFactor(const InputParameters &parameters)
virtual void checkViewFactors() const
A base class for automatic computation of view factors between sidesets.
std::vector< std::vector< Real > > _view_factors
the view factor from side i to side j
unsigned int _n_sides
number of boundaries of this side uo
static InputParameters validParams()