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