Line data Source code
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 : 10 : #include "GrainTrackerInterface.h" 11 : #include "FeatureFloodCount.h" 12 : 13 : InputParameters 14 1572 : GrainTrackerInterface::validParams() 15 : { 16 1572 : InputParameters params = FeatureFloodCount::validParams(); 17 3144 : params.addParam<int>("tracking_step", 0, "The timestep for when we should start tracking grains"); 18 3144 : params.addParam<unsigned short>( 19 3144 : "halo_level", 2, "The thickness of the halo surrounding each feature."); 20 3144 : params.addParam<bool>( 21 3144 : "remap_grains", true, "Indicates whether remapping should be done or not (default: true)"); 22 3144 : params.addParam<bool>("tolerate_failure", 23 3144 : 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 3144 : params.addParam<unsigned short>( 30 : "reserve_op", 31 3144 : 0, 32 : "Indicates the number of reserved ops (variables that cannot be remapped to)"); 33 3144 : params.addParam<Real>("reserve_op_threshold", 34 3144 : 0.95, 35 : "Threshold for locating a new feature on the reserved op variable(s)"); 36 3144 : params.addParam<UserObjectName>("polycrystal_ic_uo", "Optional: Polycrystal IC object"); 37 3144 : params.addParam<bool>("error_on_grain_creation", 38 3144 : false, 39 : "Terminate with an error if a grain is created " 40 : "(does not include initial callback to start simulation)"); 41 : 42 3144 : params.addParam<unsigned short>("max_remap_recursion_depth", 43 3144 : 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 4716 : params.addRangeCheckedParam<short>( 50 : "verbosity_level", 51 3144 : 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 : 58 3144 : params.addRequiredCoupledVarWithAutoBuild( 59 : "variable", "var_name_base", "op_num", "Array of coupled variables"); 60 : 61 3144 : params.addParamNamesToGroup("tolerate_failure max_remap_recursion_depth", "Advanced"); 62 : 63 : // Set suitable default parameters for grain tracking 64 1572 : params.set<Real>("threshold") = 0.1; // flood out to a fairly low value for grain remapping 65 1572 : params.set<Real>("connecting_threshold") = 66 : 0.09; // connecting threshold should be just slightly lower than threshold 67 1572 : params.set<bool>("use_single_map") = 68 : false; // This is needed to allow for arbitrary feature overlap during remapping 69 1572 : params.set<bool>("condense_map_info") = 70 : true; // It's better to have all information in one map for normal visualization 71 1572 : params.set<bool>("enable_var_coloring") = 72 : true; // Generally we need to see the variable (OP) indices 73 : 74 6288 : params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END}; 75 1572 : return params; 76 1572 : } 77 : 78 : std::vector<unsigned int> 79 0 : GrainTrackerInterface::getNewGrainIDs() const 80 : { 81 0 : return std::vector<unsigned int>(); 82 : }