https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GrainTrackerInterface.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#include "FeatureFloodCount.h"
12
15{
17 params.addParam<int>("tracking_step", 0, "The timestep for when we should start tracking grains");
18 params.addParam<unsigned short>(
19 "halo_level", 2, "The thickness of the halo surrounding each feature.");
20 params.addParam<bool>(
21 "remap_grains", true, "Indicates whether remapping should be done or not (default: true)");
22 params.addParam<bool>("tolerate_failure",
23 false,
24 "Allow the grain tracker to continue when it fails to find suitable grains "
25 "for remapping. This will allow the simulation to continue but it will "
26 "also allow non-physical grain coalescence. DO NOT USE for production "
27 "results!");
28
29 params.addParam<unsigned short>(
30 "reserve_op",
31 0,
32 "Indicates the number of reserved ops (variables that cannot be remapped to)");
33 params.addParam<Real>("reserve_op_threshold",
34 0.95,
35 "Threshold for locating a new feature on the reserved op variable(s)");
36 params.addParam<UserObjectName>("polycrystal_ic_uo", "Optional: Polycrystal IC object");
37 params.addParam<bool>("error_on_grain_creation",
38 false,
39 "Terminate with an error if a grain is created "
40 "(does not include initial callback to start simulation)");
41
42 params.addParam<unsigned short>("max_remap_recursion_depth",
43 6,
44 "The recursion depth allowed when searching for remapping "
45 "candidates. Note: Setting this value high may result in very "
46 "computationally expensive searches with little benefit. "
47 "(Recommended level: 6)");
48
49 params.addRangeCheckedParam<short>(
50 "verbosity_level",
51 1,
52 "verbosity_level>=0 & verbosity_level<=3",
53 "Level 0: Silent during normal operation, "
54 "Level 1: Informational messages but no detailed grain structure printouts, "
55 "Level 2: Verbose output including data structure dumps, "
56 "Level 3: Debugging mode.");
57
59 "variable", "var_name_base", "op_num", "Array of coupled variables");
60
61 params.addParamNamesToGroup("tolerate_failure max_remap_recursion_depth", "Advanced");
62
63 // Set suitable default parameters for grain tracking
64 params.set<Real>("threshold") = 0.1; // flood out to a fairly low value for grain remapping
65 params.set<Real>("connecting_threshold") =
66 0.09; // connecting threshold should be just slightly lower than threshold
67 params.set<bool>("use_single_map") =
68 false; // This is needed to allow for arbitrary feature overlap during remapping
69 params.set<bool>("condense_map_info") =
70 true; // It's better to have all information in one map for normal visualization
71 params.set<bool>("enable_var_coloring") =
72 true; // Generally we need to see the variable (OP) indices
73
74 params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
75 return params;
76}
77
78std::vector<unsigned int>
80{
81 return std::vector<unsigned int>();
82}
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_INITIAL
static InputParameters validParams()
static InputParameters validParams()
virtual std::vector< unsigned int > getNewGrainIDs() const
This method returns all of the new ids generated in an invocation of the GrainTracker.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void addRequiredCoupledVarWithAutoBuild(const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)