www.mooseframework.org
SlopeReconstructionMultiD.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<SlopeReconstructionBase>();
15 
16  params.addRequiredParam<std::vector<BoundaryName>>("boundary_list", "List of boundary IDs");
17 
18  params.addRequiredParam<std::vector<UserObjectName>>(
19  "boundary_condition_user_object_list", "List of boundary condition user object names");
20 
21  return params;
22 }
23 
24 SlopeReconstructionMultiD::SlopeReconstructionMultiD(const InputParameters & parameters)
25  : SlopeReconstructionBase(parameters)
26 {
27  const std::vector<BoundaryName> & bnd_name = getParam<std::vector<BoundaryName>>("boundary_list");
28 
29  const std::vector<UserObjectName> & bc_uo_name =
30  getParam<std::vector<UserObjectName>>("boundary_condition_user_object_list");
31 
32  if (bnd_name.size() != bc_uo_name.size())
33  mooseError("Number of boundaries NOT equal to number of BCUserObject names:",
34  "\nNumber of boundaries is ",
35  bnd_name.size(),
36  "\nNumber of BCUserObject is ",
37  bc_uo_name.size());
38 
39  for (unsigned int i = 0; i < bnd_name.size(); i++)
40  {
41  BoundaryID bnd_id = _mesh.getBoundaryID(bnd_name[i]);
42 
43  _bnd_uo_name_map.insert(std::pair<BoundaryID, UserObjectName>(bnd_id, bc_uo_name[i]));
44  }
45 }
SlopeReconstructionMultiD(const InputParameters &parameters)
InputParameters validParams< SlopeReconstructionMultiD >()
Base class for piecewise linear slope reconstruction to get the slopes of element average variables...
std::map< BoundaryID, UserObjectName > _bnd_uo_name_map
store the pair of boundary ID and user object name
InputParameters validParams< SlopeReconstructionBase >()