54 dealii::ParameterHandler ¶meter_handler);
60 load_BC_list(
const std::vector<std::string> &list_of_BCs);
79 Assert(model_constants.find(constant_name) != model_constants.end(),
81 "PRISMS-PF Error: Mismatch between constants in parameters.prm and "
82 "customPDE.h. The constant that you attempted to access was " +
83 constant_name +
"."));
85 return boost::get<double>(model_constants.at(constant_name));
97 Assert(model_constants.find(constant_name) != model_constants.end(),
99 "PRISMS-PF Error: Mismatch between constants in parameters.prm and "
100 "customPDE.h. The constant that you attempted to access was " +
101 constant_name +
"."));
103 return boost::get<int>(model_constants.at(constant_name));
115 Assert(model_constants.find(constant_name) != model_constants.end(),
117 "PRISMS-PF Error: Mismatch between constants in parameters.prm and "
118 "customPDE.h. The constant that you attempted to access was " +
119 constant_name +
"."));
121 return boost::get<bool>(model_constants.at(constant_name));
130 [[nodiscard]] dealii::Tensor<1, dim>
133 Assert(model_constants.find(constant_name) != model_constants.end(),
135 "PRISMS-PF Error: Mismatch between constants in parameters.prm and "
136 "customPDE.h. The constant that you attempted to access was " +
137 constant_name +
"."));
139 return boost::get<dealii::Tensor<1, dim>>(model_constants.at(constant_name));
148 [[nodiscard]] dealii::Tensor<2, dim>
151 Assert(model_constants.find(constant_name) != model_constants.end(),
153 "PRISMS-PF Error: Mismatch between constants in parameters.prm and "
154 "customPDE.h. The constant that you attempted to access was " +
155 constant_name +
"."));
157 return boost::get<dealii::Tensor<2, dim>>(model_constants.at(constant_name));
166 [[nodiscard]] dealii::Tensor<2, 2 * dim - 1 + dim / 3>
169 Assert(model_constants.find(constant_name) != model_constants.end(),
171 "PRISMS-PF Error: Mismatch between constants in parameters.prm and "
172 "customPDE.h. The constant that you attempted to access was " +
173 constant_name +
"."));
175 return boost::get<dealii::Tensor<2, 2 * dim - 1 + dim / 3>>(
176 model_constants.at(constant_name));
181 loadVariableAttributes();
184 [[nodiscard]] std::vector<double>
185 get_nucleus_semiaxes(
unsigned int var_index)
const
187 return nucleation_parameters_list[nucleation_parameters_list_index.at(var_index)]
191 [[nodiscard]] std::vector<double>
192 get_nucleus_freeze_semiaxes(
unsigned int var_index)
const
194 return nucleation_parameters_list[nucleation_parameters_list_index.at(var_index)]
198 [[nodiscard]] std::vector<double>
199 get_nucleus_rotation(
unsigned int var_index)
const
201 return nucleation_parameters_list[nucleation_parameters_list_index.at(var_index)]
206 get_no_nucleation_border_thickness(
unsigned int var_index)
const
208 return nucleation_parameters_list[nucleation_parameters_list_index.at(var_index)]
209 .no_nucleation_border_thickness;
213 get_nucleus_hold_time(
unsigned int var_index)
const
215 return nucleation_parameters_list[nucleation_parameters_list_index.at(var_index)]
219 dealii::Tensor<2, dim, double>
220 get_nucleus_rotation_matrix(
unsigned int var_index)
const
222 return nucleation_parameters_list[nucleation_parameters_list_index.at(var_index)]
227 std::vector<double> domain_size;
228 std::vector<unsigned int> subdivisions;
229 unsigned int refine_factor;
234 unsigned int max_refinement_level;
235 unsigned int min_refinement_level;
236 unsigned int skip_remeshing_steps;
237 std::vector<RefinementCriterion> refinement_criteria;
240 unsigned int skip_print_steps;
241 std::string output_file_type;
242 bool output_vtu_per_process;
243 std::string output_file_name;
244 std::vector<unsigned int> outputTimeStepList;
245 bool print_timing_with_output;
250 unsigned int totalIncrements;
259 boost::unordered_map<unsigned int, dealii::Point<dim>> pinned_point;
263 const AttributesList &var_attributes;
264 const AttributesList &pp_attributes;
267 unsigned int num_var_explicit_RHS, num_var_nonexplicit_RHS;
268 std::vector<variable_info> varInfoListExplicitRHS, varInfoListNonexplicitRHS;
271 unsigned int num_var_LHS;
272 std::vector<variable_info> varInfoListLHS;
273 std::vector<variable_info> varChangeInfoListLHS;
276 std::vector<bool> load_ICs;
277 std::vector<bool> load_parallel_file;
278 std::vector<std::string> load_file_name;
279 std::vector<std::string> load_field_name;
282 bool resume_from_checkpoint;
283 std::vector<unsigned int> checkpointTimeStepList;
286 unsigned int num_integrated_fields;
287 bool postProcessingRequired;
288 std::vector<unsigned int> integrated_field_indices;
291 std::vector<variable_info> pp_varInfoList;
292 std::vector<variable_info> pp_baseVarInfoList;
295 std::vector<varBCs<dim>> BC_list;
298 std::map<std::string, InputVariant<dim>> model_constants;
301 bool nucleation_occurs;
302 std::vector<unsigned int> nucleating_variable_indices;
303 std::vector<unsigned int> nucleation_need_value;
304 bool evolution_before_nucleation;
307 double min_distance_between_nuclei;
309 double nucleation_order_parameter_cutoff;
310 unsigned int steps_between_nucleation_attempts;
311 double nucleation_start_time;
312 double nucleation_end_time;
315 bool grain_remapping_activated;
316 std::vector<unsigned int> variables_for_remapping;
317 unsigned int skip_grain_reassignment_steps;
318 double order_parameter_threshold;
319 double buffer_between_grains;
321 bool load_grain_structure;
322 std::string load_vtk_file_type;
325 double min_radius_for_loading_grains;
326 std::string grain_structure_filename;
327 std::string grain_structure_variable_name;
328 unsigned int num_grain_smoothing_cycles;
336 assign_spatial_discretization_parameters(dealii::ParameterHandler ¶meter_handler);
343 assign_temporal_discretization_parameters(dealii::ParameterHandler ¶meter_handler);
349 assign_linear_solve_parameters(dealii::ParameterHandler ¶meter_handler);
356 assign_nonlinear_solve_parameters(dealii::ParameterHandler ¶meter_handler);
363 assign_output_parameters(dealii::ParameterHandler ¶meter_handler);
370 assign_load_initial_condition_parameters(dealii::ParameterHandler ¶meter_handler);
377 assign_nucleation_parameters(dealii::ParameterHandler ¶meter_handler);
384 assign_grain_parameters(dealii::ParameterHandler ¶meter_handler);
391 assign_boundary_condition_parameters(dealii::ParameterHandler ¶meter_handler);
395 std::vector<unsigned int>
396 setTimeStepList(
const std::string &outputSpacingType,
397 unsigned int numberOfOutputs,
398 const std::vector<unsigned int> &userGivenTimeStepList);
402 dealii::ParameterHandler ¶meter_handler);
408 compute_tensor_parentheses(
const unsigned int n_elements,
409 const std::vector<std::string> &tensor_elements);
415 remove_parentheses(std::vector<std::string> &tensor_elements);
420 dealii::Tensor<1, dim>
421 compute_rank_1_tensor_constant(
const unsigned int n_elements,
422 std::vector<std::string> tensor_elements);
427 dealii::Tensor<2, dim>
428 compute_rank_2_tensor_constant(
const unsigned int n_elements,
429 std::vector<std::string> tensor_elements);
435 construct_user_constant(std::vector<std::string> &model_constants_strings);
441 primitive_model_constant(std::vector<std::string> &model_constants_strings);
443 [[nodiscard]] dealii::Tensor<2, 2 * dim - 1 + dim / 3>
444 get_Cij_tensor(std::vector<double> elastic_constants,
445 const std::string &elastic_const_symmetry)
const;
447 dealii::Tensor<2, 2 * dim - 1 + dim / 3>
448 getCIJMatrix(
const elasticityModel model,
449 const std::vector<double> &constants,
450 dealii::ConditionalOStream &pcout)
const;
453 std::vector<nucleationParameters<dim>> nucleation_parameters_list;
454 std::map<unsigned int, unsigned int> nucleation_parameters_list_index;