https://mooseframework.inl.gov
SlopeReconstructionMultiD.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 
11 
14 {
16 
17  params.addRequiredParam<std::vector<BoundaryName>>("boundary_list", "List of boundary IDs");
18 
19  params.addRequiredParam<std::vector<UserObjectName>>(
20  "boundary_condition_user_object_list", "List of boundary condition user object names");
21 
22  return params;
23 }
24 
26  : SlopeReconstructionBase(parameters)
27 {
28  const std::vector<BoundaryName> & bnd_name = getParam<std::vector<BoundaryName>>("boundary_list");
29 
30  const std::vector<UserObjectName> & bc_uo_name =
31  getParam<std::vector<UserObjectName>>("boundary_condition_user_object_list");
32 
33  if (bnd_name.size() != bc_uo_name.size())
34  mooseError("Number of boundaries NOT equal to number of BCUserObject names:",
35  "\nNumber of boundaries is ",
36  bnd_name.size(),
37  "\nNumber of BCUserObject is ",
38  bc_uo_name.size());
39 
40  for (unsigned int i = 0; i < bnd_name.size(); i++)
41  {
42  BoundaryID bnd_id = _mesh.getBoundaryID(bnd_name[i]);
43 
44  _bnd_uo_name_map.insert(std::pair<BoundaryID, UserObjectName>(bnd_id, bc_uo_name[i]));
45  }
46 }
SlopeReconstructionMultiD(const InputParameters &parameters)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
Base class for piecewise linear slope reconstruction to get the slopes of element average variables...
boundary_id_type BoundaryID
std::map< BoundaryID, UserObjectName > _bnd_uo_name_map
store the pair of boundary ID and user object name
void mooseError(Args &&... args) const
static InputParameters validParams()
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const