18 InputParameters params = validParams<InitialCondition>();
19 params.addRequiredParam<UserObjectName>(
"ebsd_reader",
20 "The EBSDReader object holding the EBSD data");
21 params.addRequiredParam<
unsigned int>(
"phase",
"EBSD phase number this variable is to represent");
26 : InitialCondition(parameters),
27 _mesh(_fe_problem.mesh()),
28 _ebsd_reader(getUserObject<
EBSDReader>(
"ebsd_reader")),
29 _phase(getParam<unsigned int>(
"phase")),
30 _node_to_phase_weight_map(_ebsd_reader.getNodeToPhaseWeightMap())
38 if (_current_node ==
nullptr)
39 mooseError(
"_current_node is reporting NULL");
42 std::map<dof_id_type, std::vector<Real>>::const_iterator it =
45 mooseError(
"The following node id is not in the node map: ", _current_node->id());
48 if (
_phase >= it->second.size())
49 mooseError(
"Requested an out-of-range phase number");