- variableThe variable(s) for which to find connected regions of interests, i.e. "features".
C++ Type:std::vector<VariableName>
Controllable:No
Description:The variable(s) for which to find connected regions of interests, i.e. "features".
FeatureFloodCount
The FeatureFloodCount object is a utility that inspects solution fields looking for Connected Components) or "topologically connected regions of a solution field sharing a similar characteristic". Typically, this means a region where the solution value is higher than some threshold. This object is designed to work efficiently on a partitioned unstructured mesh with hundreds to thousands of processors.
<br/> The algorithm for identifying portions of connected components begins by running a Flood Fill algorithm on each processor that recursively visits neighboring elements on the unstructured mesh while the connecting criteria is met. Figure 1 illustrates the identification of a new region on a processor. The dark shaded element represents an element that was identified whose variable value exceeds a given threshold. The lightly shaded elements surrounding the dark element represent the current "halo" markings of the region. These halo markings always extend one neighbor beyond the currently shaded region. They are used for both the connected component algorithm and for identifying potential collisions among disjoint regions.
<br/> Several pieces of information are recorded on each processor including all of the marked elements, a minimum ID for a partition independent stable ordering and "overlapping elements" for stitching. Figure 5 shows a regular mesh partitioned among three processors with several regions of interest. The alpha characters represent a possible local ordering of the features. The subscript represents the processor ID. Portions of the feature data structure is serialized and sent to the rank 0 process where connection information is used to discover the global picture Figure 6.
The object is able to find and count "connected components" in any solution field or number of solution fields. A primary example would be to count "bubbles".
Input Parameters
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- compute_halo_mapsFalseInstruct the Postprocessor to communicate proper halo information to all ranks
Default:False
C++ Type:bool
Controllable:No
Description:Instruct the Postprocessor to communicate proper halo information to all ranks
- compute_var_to_feature_mapFalseInstruct the Postprocessor to compute the active vars to features map
Default:False
C++ Type:bool
Controllable:No
Description:Instruct the Postprocessor to compute the active vars to features map
- connecting_thresholdThe threshold for which an existing feature may be extended (defaults to "threshold")
C++ Type:double
Controllable:No
Description:The threshold for which an existing feature may be extended (defaults to "threshold")
- enable_var_coloringFalseInstruct the Postprocessor to populate the variable index map.
Default:False
C++ Type:bool
Controllable:No
Description:Instruct the Postprocessor to populate the variable index map.
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- flood_entity_typeELEMENTALDetermines whether the flood algorithm runs on nodes or elements
Default:ELEMENTAL
C++ Type:MooseEnum
Options:NODAL, ELEMENTAL
Controllable:No
Description:Determines whether the flood algorithm runs on nodes or elements
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- secondary_percolation_boundariesPaired boundaries with "primaryary_percolation_boundaries" parameter
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:Paired boundaries with "primaryary_percolation_boundaries" parameter
- specified_boundariesAn optional list of boundaries; if supplied, each feature is checked to determine whether it intersects any of the specified boundaries in this list.
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:An optional list of boundaries; if supplied, each feature is checked to determine whether it intersects any of the specified boundaries in this list.
- threshold0.5The threshold value for which a new feature may be started
Default:0.5
C++ Type:double
Controllable:No
Description:The threshold value for which a new feature may be started
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
- use_less_than_threshold_comparisonTrueControls whether features are defined to be less than or greater than the threshold value.
Default:True
C++ Type:bool
Controllable:No
Description:Controls whether features are defined to be less than or greater than the threshold value.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- condense_map_infoFalseDetermines whether we condense all the node values when in multimap mode (default: false)
Default:False
C++ Type:bool
Controllable:No
Description:Determines whether we condense all the node values when in multimap mode (default: false)
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- primary_percolation_boundariesA list of boundaries used in conjunction with the corresponding "secondary_percolation_boundaries" parameter for determining if a feature creates a path connecting any pair of boundaries
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:A list of boundaries used in conjunction with the corresponding "secondary_percolation_boundaries" parameter for determining if a feature creates a path connecting any pair of boundaries
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
- use_global_numberingTrueDetermine whether or not global numbers are used to label features on multiple maps (default: true)
Default:True
C++ Type:bool
Controllable:No
Description:Determine whether or not global numbers are used to label features on multiple maps (default: true)
- use_single_mapTrueDetermine whether information is tracked per coupled variable or consolidated into one (default: true)
Default:True
C++ Type:bool
Controllable:No
Description:Determine whether information is tracked per coupled variable or consolidated into one (default: true)
Advanced Parameters
Input Files
- (modules/combined/test/tests/feature_volume_fraction/feature_volume_fraction.i)
- (modules/phase_field/test/tests/grain_growth/voronoi_adaptivity.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D_single.i)
- (modules/phase_field/test/tests/boundary_intersecting_features/boundary_intersecting_features.i)
- (modules/phase_field/test/tests/initial_conditions/polycrystal_BndsCalcIC.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/nodal_flood_periodic_2var.i)
- (modules/phase_field/test/tests/grain_growth/voronoi.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/test_problem.i)
- (modules/phase_field/test/tests/grain_growth/voronoi_adaptivity_ghost.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/feature_volume_vpp_test.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
- (modules/combined/examples/phase_field-mechanics/poly_grain_growth_2D_eldrforce.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/flood_aux_elemental.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_normal_test.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_test.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/flood_counter_boundary_restrictable.i)
- (modules/combined/test/tests/feature_volume_fraction/Avrami.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/flood_aux.i)
- (modules/phase_field/test/tests/feature_flood_test/parallel_feature_count.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D_single.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/boundary_intersection.i)
- (modules/phase_field/test/tests/grain_growth/voronoi_columnar_3D.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_normal_test.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_test.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/percolation_test.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/simple.i)
- (modules/phase_field/test/tests/flood_counter_periodic_test/nodal_flood_periodic.i)
Child Objects
(modules/combined/test/tests/feature_volume_fraction/feature_volume_fraction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 20
y1 = 20
radius = 10
int_width = 1
invalue = 1
outvalue = 0
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[VectorPostprocessors]
[./feature_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = feature_counter
execute_on = 'initial timestep_end'
outputs = none
[../]
[]
[Postprocessors]
[./feature_counter]
type = FeatureFloodCount
variable = u
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[../]
[./Volume]
type = VolumePostprocessor
execute_on = 'initial'
[../]
[./volume_fraction]
type = FeatureVolumeFraction
mesh_volume = Volume
feature_volumes = feature_volumes
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi_adaptivity.i)
[Mesh]
[drmg]
type = DistributedRectilinearMeshGenerator
dim = 2
nx = 30
ny = 30
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = FauxPolycrystalVoronoi
rand_seed = 105
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
active = ''
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Preconditioning]
active = ''
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-13
start_time = 0.0
num_steps = 2
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D_single.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 25
nz = 15
xmin = 20
xmax = 30
ymin = 0
ymax = 50
zmin = 10
zmax = 40
elem_type = HEX8
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 50'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 50'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '40 25 0'
z_positions = '25 25 25'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = true
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/boundary_intersecting_features/boundary_intersecting_features.i)
[Mesh]
# ImageMesh ignores nx, xmin, xmax (and similarly for y and z) and
# tries to read them from the image file...
type = ImageMesh
dim = 2
# Be sure to choose a corresponding image name below!
# file = image001_cropped3_closing_298.png # full size, 157 Mb Exodus file!
# file = eighth_image001_cropped3_closing_298.png # 1/8
file = sixteenth_image001_cropped3_closing_298.png # 1/16
# Uncomment to maintain 1:1 ratio between number of pixels and mesh size.
# scale_to_one = false
# Uncomment to set cells_per_pixel to something other than the default value of 1.0.
# Must be <= 1.
# cells_per_pixel = .75
# To crop an image to e.g. 1/8th size, install ImageMagick and run:
# convert image001_cropped3_closing_298.png -crop 230x198+100+100 eighth_image001_cropped3_closing_298.png
# Note: Do not use 'sips' on OSX to crop! It actually interpolates
# the colors in the image instead of just cropping.
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxVariables]
[./grain_auxvar]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./nodal_flood_aux]
variable = grain_auxvar
type = FeatureFloodCountAux
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
flood_counter = flood_count_pp
field_display = CENTROID
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./tif]
# ImageFunction gets its file range parameters from ImageMesh,
# when it is present. This prevents duplicating information in
# input files.
type = ImageFunction
# In these sample images the features we want to analyze are RED (or close to pure red). The
# background is BLUE so we can easily distinguish between the two by selecting only the red channel.
component = 0
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
function = tif
variable = u
[../]
[]
[Postprocessors]
[./flood_count_pp]
type = FeatureFloodCount
variable = u
threshold = 1.0
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[../]
[]
[VectorPostprocessors]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[]
[Problem]
type = FEProblem
solve = false
[../]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/initial_conditions/polycrystal_BndsCalcIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 3
var_name_base = gr
int_width = 5 # int_width > 0 is required for initial adaptivity to work based on Bnds
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 105
grain_num = 3
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./bnds]
type = BndsCalcIC # IC is created for activating the initial adaptivity
variable = bnds
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 6 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Adaptivity]
initial_steps = 1
max_h_level = 1
marker = err_bnds
[./Markers]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.9
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/flood_counter_aux_test/nodal_flood_periodic_2var.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./bubble_map0]
order = FIRST
family = LAGRANGE
[../]
[./bubble_map1]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./diffv]
type = Diffusion
variable = v
[../]
[./forcing_1]
type = GaussContForcing
variable = u
x_center = 1.0
y_center = 1.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_2]
type = GaussContForcing
variable = u
x_center = 20.0
y_center = 39.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_3]
type = GaussContForcing
variable = u
x_center = 39.0
y_center = 20.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_4]
type = GaussContForcing
variable = u
x_center = 15.0
y_center = 15.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_1v]
type = GaussContForcing
variable = v
x_center = 8.0
y_center = 8.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_2v]
type = GaussContForcing
variable = v
x_center = 18.0
y_center = 22.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_3v]
type = GaussContForcing
variable = v
x_center = 39.0
y_center = 20.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_4v]
type = GaussContForcing
variable = v
x_center = 32.0
y_center = 8.0
x_spread = 0.5
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[./dotv]
type = TimeDerivative
variable = v
[../]
[]
[AuxKernels]
[./mapper0]
type = FeatureFloodCountAux
variable = bubble_map0
execute_on = timestep_end
flood_counter = bubbles
map_index = 0
[../]
[./mapper1]
type = FeatureFloodCountAux
variable = bubble_map1
execute_on = timestep_end
flood_counter = bubbles
map_index = 1
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'u v'
auto_direction = 'x y'
[../]
[../]
[]
[UserObjects]
[./bubbles]
type = FeatureFloodCount
variable = 'u v'
threshold = 0.3
execute_on = timestep_end
use_single_map = false
use_global_numbering = true
outputs = none
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
dt = 4.0
num_steps = 5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_2var
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 105
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
active = ''
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Preconditioning]
active = ''
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 80.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/test_problem.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./features]
order = CONSTANT
family = MONOMIAL
[../]
[./ghosts]
order = CONSTANT
family = MONOMIAL
[../]
[./halos]
order = CONSTANT
family = MONOMIAL
[../]
[./proc_id]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '2 2'
pos_variation = 10.0
radius = 8.0
int_width = 5.0
radius_variation_type = uniform
avoid_bounds = false
[../]
[]
[BCs]
[./Periodic]
[./c]
variable = c
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = c
[../]
[]
[AuxKernels]
[./features]
type = FeatureFloodCountAux
variable = features
execute_on = 'initial timestep_end'
flood_counter = features
[../]
[./ghosts]
type = FeatureFloodCountAux
variable = ghosts
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
flood_counter = features
[../]
[./halos]
type = FeatureFloodCountAux
variable = halos
field_display = HALOS
execute_on = 'initial timestep_end'
flood_counter = features
[../]
[./proc_id]
type = ProcessorIDAux
variable = proc_id
execute_on = 'initial timestep_end'
[../]
[]
[Postprocessors]
[./features]
type = FeatureFloodCount
variable = c
flood_entity_type = ELEMENTAL
execute_on = 'initial timestep_end'
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi_adaptivity_ghost.i)
[Mesh]
[drmg]
type = DistributedRectilinearMeshGenerator
dim = 2
nx = 30
ny = 30
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
partition = linear
[]
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 105
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[ghosting0]
order = CONSTANT
family = MONOMIAL
[]
[ghosting1]
order = CONSTANT
family = MONOMIAL
[]
[ghosting2]
order = CONSTANT
family = MONOMIAL
[]
[evaluable0]
order = CONSTANT
family = MONOMIAL
[]
[evaluable1]
order = CONSTANT
family = MONOMIAL
[]
[evaluable2]
order = CONSTANT
family = MONOMIAL
[]
[proc]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ghosting0]
type = ElementUOAux
variable = ghosting0
element_user_object = ghosting_uo0
field_name = "ghosted"
execute_on = initial
[]
[ghosting1]
type = ElementUOAux
variable = ghosting1
element_user_object = ghosting_uo1
field_name = "ghosted"
execute_on = initial
[]
[ghosting2]
type = ElementUOAux
variable = ghosting2
element_user_object = ghosting_uo2
field_name = "ghosted"
execute_on = initial
[]
[evaluable0]
type = ElementUOAux
variable = evaluable0
element_user_object = ghosting_uo0
field_name = "evaluable"
execute_on = initial
[]
[evaluable1]
type = ElementUOAux
variable = evaluable1
element_user_object = ghosting_uo1
field_name = "evaluable"
execute_on = initial
[]
[evaluable2]
type = ElementUOAux
variable = evaluable2
element_user_object = ghosting_uo2
field_name = "evaluable"
execute_on = initial
[]
[proc]
type = ProcessorIDAux
variable = proc
execute_on = initial
[]
[]
[UserObjects]
[ghosting_uo0]
type = ElemSideNeighborLayersGeomTester
execute_on = initial
element_side_neighbor_layers = 2
rank = 0
[]
[ghosting_uo1]
type = ElemSideNeighborLayersGeomTester
execute_on = initial
element_side_neighbor_layers = 2
rank = 1
[]
[ghosting_uo2]
type = ElemSideNeighborLayersGeomTester
execute_on = initial
element_side_neighbor_layers = 2
rank = 2
[]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
active = ''
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Preconditioning]
active = ''
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-13
start_time = 0.0
num_steps = 2
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
#
# Example simulation of an iron-chromium alloy at 500 C. Equilibrium
# concentrations are at 23.6 and 82.3 mol% Cr. Kappa value, free energy equation,
# and mobility equation were provided by Lars Hoglund. Solved using the split
# form of the Cahn-Hilliard equation.
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
scaling = 1e+04
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./f_density] # Local energy density (eV/mol)
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[AuxKernels]
# Calculates the energy density by combining the local and gradient energies
[./f_density] # (eV/mol/nm^2)
type = TotalFreeEnergy
variable = f_density
f_name = 'f_loc'
kappa_names = 'kappa_c'
interfacial_vars = c
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the first three
# materials and must have the same value in each one.
[./kappa] # Gradient energy coefficient (eV nm^2/mol)
type = GenericFunctionMaterial
prop_names = 'kappa_c'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27'
# kappa_c *eV_J*nm_m^2* d
[../]
[./mobility] # Mobility (nm^2 mol/eV/s)
# NOTE: This is a fitted equation, so only 'Conv' has units
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
constant_names = 'Acr Bcr Ccr Dcr
Ecr Fcr Gcr
Afe Bfe Cfe Dfe
Efe Ffe Gfe
nm_m eV_J d'
constant_expressions = '-32.770969 -25.8186669 -3.29612744 17.669757
37.6197853 20.6941796 10.8095813
-31.687117 -26.0291774 0.2286581 24.3633544
44.3334237 8.72990497 20.956768
1e+09 6.24150934e+18 1e-27'
expression = 'nm_m^2/eV_J/d*((1-c)^2*c*10^
(Acr*c+Bcr*(1-c)+Ccr*c*log(c)+Dcr*(1-c)*log(1-c)+
Ecr*c*(1-c)+Fcr*c*(1-c)*(2*c-1)+Gcr*c*(1-c)*(2*c-1)^2)
+c^2*(1-c)*10^
(Afe*c+Bfe*(1-c)+Cfe*c*log(c)+Dfe*(1-c)*log(1-c)+
Efe*c*(1-c)+Ffe*c*(1-c)*(2*c-1)+Gfe*c*(1-c)*(2*c-1)^2))'
derivative_order = 1
outputs = exodus
[../]
[./local_energy] # Local free energy function (eV/mol)
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[./precipitate_indicator] # Returns 1/625 if precipitate
type = ParsedMaterial
property_name = prec_indic
coupled_variables = c
expression = if(c>0.6,0.0016,0)
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./total_energy] # Total free energy at each timestep
type = ElementIntegralVariablePostprocessor
variable = f_density
execute_on = 'initial timestep_end'
[../]
[./num_features] # Number of precipitates formed
type = FeatureFloodCount
variable = c
threshold = 0.6
[../]
[./precipitate_area] # Fraction of surface devoted to precipitates
type = ElementIntegralMaterialProperty
mat_prop = prec_indic
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/feature_volume_vpp_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[Variables]
[c]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '3 2'
pos_variation = 10.0
radius = 4.0
int_width = 5.0
radius_variation_type = uniform
avoid_bounds = false
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned out to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
outputs = none
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
x_positions = '10 50 90'
y_positions = '30 20 80'
z_positions = '30 50 75'
radii = '21 25 16'
invalue = 1.0
outvalue = 0.0001
int_width = 4
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/poly_grain_growth_2D_eldrforce.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 8
var_name_base = gr
grain_num = 36
[]
[Variables]
[./PolycrystalVariables]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_36_rand_2D.tex
[../]
[./voronoi]
type = PolycrystalVoronoi
coloring_algorithm = bt
[../]
[./grain_tracker]
type = GrainTrackerElasticity
threshold = 0.2
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
flood_entity_type = ELEMENTAL
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
fill_method = symmetric9
euler_angle_provider = euler_angle_file
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./elastic_strain11]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain22]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain12]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises_stress]
order = CONSTANT
family = MONOMIAL
[../]
[./C1111]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalElasticDrivingForce]
[../]
[./TensorMechanics]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./elastic_strain11]
type = RankTwoAux
variable = elastic_strain11
rank_two_tensor = elastic_strain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./elastic_strain22]
type = RankTwoAux
variable = elastic_strain22
rank_two_tensor = elastic_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./elastic_strain12]
type = RankTwoAux
variable = elastic_strain12
rank_two_tensor = elastic_strain
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = timestep_end
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
execute_on = timestep_end
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[./C1111]
type = RankFourAux
variable = C1111
rank_four_tensor = elasticity_tensor
index_l = 0
index_j = 0
index_k = 0
index_i = 0
execute_on = timestep_end
[../]
[./vonmises_stress]
type = RankTwoScalarAux
variable = vonmises_stress
rank_two_tensor = stress
scalar_type = VonMisesStress
execute_on = timestep_end
[../]
[./euler_angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x'
variable = 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7'
[../]
[../]
[./top_displacement]
type = DirichletBC
variable = disp_y
boundary = top
value = -50.0
[../]
[./x_anchor]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[../]
[./y_anchor]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 15 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[./ElasticityTensor]
type = ComputePolycrystalElasticityTensor
grain_tracker = grain_tracker
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[Postprocessors]
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[./dofs]
type = NumDOFs
[../]
[./dt]
type = TimestepSize
[../]
[./run_time]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
coupled_groups = 'disp_x,disp_y'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 25
nl_rel_tol = 1.0e-7
start_time = 0.0
num_steps = 50
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1.5
growth_factor = 1.2
cutback_factor = 0.8
optimal_iterations = 8
[../]
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 3
[../]
[]
[Outputs]
file_base = poly36_grtracker
exodus = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[./left_side]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 0'
input = gen
[../]
[./right_side]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 0'
input = left_side
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./unique_regions]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '37.5 25 0'
z_positions = '0 0 0'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.001
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = false
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[./unique_regions]
type = FeatureFloodCountAux
variable = unique_regions
flood_counter = flood_count
field_display = UNIQUE_REGION
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 25
nz = 15
xmin = 20
xmax = 30
ymin = 0
ymax = 50
zmin = 10
zmax = 40
elem_type = HEX8
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 50'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 50'
[../]
[./iface_u]
input = right_side
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '40 25 0'
z_positions = '25 25 25'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.001
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = false
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/flood_counter_aux_test/flood_aux_elemental.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./bubble_map]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing_1 forcing_2 forcing_3 forcing_4 dot'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing_1]
type = GaussContForcing
variable = u
x_center = 1.0
y_center = 1.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./forcing_2]
type = GaussContForcing
variable = u
x_center = 20.0
y_center = 39.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./forcing_3]
type = GaussContForcing
variable = u
x_center = 39.0
y_center = 20.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./forcing_4]
type = GaussContForcing
variable = u
x_center = 15.0
y_center = 15.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./mapper]
type = FeatureFloodCountAux
variable = bubble_map
execute_on = timestep_end
flood_counter = bubbles
[../]
[]
[BCs]
[./Periodic]
[./x]
variable = u
auto_direction = 'x y'
[../]
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = u
threshold = 0.3
execute_on = timestep_end
[../]
[]
[Executioner]
active = ''
type = Transient
dt = 4.0
num_steps = 5
# [./Adaptivity]
# refine_fraction = .40
# coarsen_fraction = .02
# max_h_level = 3
# error_estimator = KellyErrorEstimator
# [../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_normal_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = MultiSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
bubspac = 30.0 # This spacing is from bubble center to bubble center
numbub = 10
radius = 10.0
int_width = 12.0
rand_seed = 2000
radius_variation = 2 #This is the standard deviation
radius_variation_type = normal
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = MultiSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
bubspac = 30.0 # This spacing is from bubble center to bubble center
numbub = 6
radius = 10.0
int_width = 12.0
radius_variation = 0.2
radius_variation_type = uniform
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[./Adaptivity]
refine_fraction = .5
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/flood_counter_aux_test/flood_counter_boundary_restrictable.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./bubble_map]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing_1 forcing_2 forcing_3 forcing_4 dot'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing_1]
type = GaussContForcing
variable = u
x_center = 1.0
y_center = 1.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./forcing_2]
type = GaussContForcing
variable = u
x_center = 20.0
y_center = 39.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./forcing_3]
type = GaussContForcing
variable = u
x_center = 39.0
y_center = 20.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./forcing_4]
type = GaussContForcing
variable = u
x_center = 15.0
y_center = 15.0
x_spread = 0.5
y_spread = 0.5
amplitude = 2.0
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./mapper]
type = FeatureFloodCountAux
variable = bubble_map
execute_on = 'initial timestep_end'
flood_counter = bubbles
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = u
threshold = 0.1
execute_on = 'initial timestep_end'
boundary = 'top right left bottom'
[../]
[]
[Executioner]
type = Transient
dt = 4.0
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/combined/test/tests/feature_volume_fraction/Avrami.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 20
y1 = 20
radius = 10
int_width = 1
invalue = 1
outvalue = 0
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[VectorPostprocessors]
[./feature_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = feature_counter
execute_on = 'initial timestep_end'
outputs = none
[../]
[]
[Postprocessors]
[./feature_counter]
type = FeatureFloodCount
variable = u
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[../]
[./Volume]
type = VolumePostprocessor
execute_on = 'initial'
[../]
[./Avrami]
type = FeatureVolumeFraction
execute_on = 'initial timestep_end'
mesh_volume = Volume
feature_volumes = feature_volumes
equil_fraction = 0.5
value_type = AVRAMI
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/flood_counter_aux_test/flood_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./bubble_map]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff forcing_1 forcing_2 forcing_3 forcing_4 dot'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing_1]
type = GaussContForcing
variable = u
x_center = 1.0
y_center = 1.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_2]
type = GaussContForcing
variable = u
x_center = 20.0
y_center = 39.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_3]
type = GaussContForcing
variable = u
x_center = 39.0
y_center = 20.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_4]
type = GaussContForcing
variable = u
x_center = 15.0
y_center = 15.0
x_spread = 0.5
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./mapper]
type = FeatureFloodCountAux
variable = bubble_map
execute_on = timestep_end
flood_counter = bubbles
[../]
[]
[BCs]
[./Periodic]
[./x]
variable = u
auto_direction = 'x y'
[../]
[../]
[]
[UserObjects]
[./bubbles]
type = FeatureFloodCount
variable = u
threshold = 0.3
execute_on = timestep_end
outputs = none
flood_entity_type = NODAL
[../]
[]
[Executioner]
active = ''
type = Transient
dt = 4.0
num_steps = 5
[./Adaptivity]
refine_fraction = .40
coarsen_fraction = .02
max_h_level = 3
error_estimator = KellyErrorEstimator
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
(modules/phase_field/test/tests/feature_flood_test/parallel_feature_count.i)
[Mesh]
type = ImageMesh
dim = 2
file = spiral_16x16.png
scale_to_one = false
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxVariables]
[./feature]
order = CONSTANT
family = MONOMIAL
[../]
[./proc_id]
order = CONSTANT
family = MONOMIAL
[../]
[./feature_ghost]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./nodal_flood_aux]
type = FeatureFloodCountAux
variable = feature
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[./proc_id]
type = ProcessorIDAux
variable = proc_id
execute_on = 'initial timestep_end'
[../]
[./ghost]
type = FeatureFloodCountAux
variable = feature_ghost
field_display = GHOSTED_ENTITIES
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./tif]
type = ImageFunction
component = 0
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
function = tif
variable = u
[../]
[]
[Postprocessors]
[./flood_count_pp]
type = FeatureFloodCount
variable = u
threshold = 1.0
execute_on = 'initial timestep_end'
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D_single.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 0'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 0'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./unique_regions]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '37.5 25 0'
z_positions = '0 0 0'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = true
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[./unique_regions]
type = FeatureFloodCountAux
variable = unique_regions
flood_counter = flood_count
field_display = UNIQUE_REGION
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/flood_counter_aux_test/boundary_intersection.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 50
xmax = 10
ymax = 50
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
[]
[pid]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dot]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[intersect]
type = FeatureFloodCountAux
variable = v
flood_counter = intersection
field_display = INTERSECTS_SPECIFIED_BOUNDARY
execute_on = 'initial timestep_end'
[]
[pid]
type = ProcessorIDAux
variable = pid
[]
[]
[ICs]
[v]
type = BoundingBoxIC
variable = u
inside = 1
outside = 0
x1 = 3
x2 = 7
y1 = 0
y2 = 45
[]
[]
[Postprocessors]
[intersection]
type = FeatureFloodCount
variable = u
threshold = 0.3
specified_boundaries = bottom
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[]
[vint]
type = ElementIntegralVariablePostprocessor
variable = v
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi_columnar_3D.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 25
elem_type = HEX8
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 47
grain_num = 4
columnar_3D = true
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
active = ''
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-5
l_max_its = 15
nl_max_its = 20
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 40.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_normal_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 22
ny = 22
nz = 22
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '3 3 3'
pos_variation = 10.0
radius = 10.0
int_width = 12.0
radius_variation = 2
radius_variation_type = normal
[../]
[]
[Kernels]
active = 'ie_c diff'
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[]
[Materials]
active = 'Dv'
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
active = 'bubbles'
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps =1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 22
ny = 22
nz = 22
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '3 3 3'
pos_variation = 0.0
radius = 10.0
int_width = 12.0
radius_variation = 0.2
radius_variation_type = uniform
[../]
[]
[Kernels]
active = 'ie_c diff'
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[]
[Materials]
active = 'Dv'
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
active = 'bubbles'
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps =1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/percolation_test.i)
# This tests the percolation detection capability in FeatureFloodCount. One feature
# exists that intersects both left and right boundaries, so the FeatureVolumeVPP
# will return true for that feature based on the specified values of parameters
# primary_percolation_boundaries and secondary_percolation_boundaries.
# It also tests the capabilility of FeatureFloodCount to detect whether each feature
# is in contact with the boundaries set by the specified_boundaries parameter.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./unique_regions]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./c]
type = MultiSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
radius = 4.0
int_width = 2.0
numbub = 35
bubspac = 2
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned out to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
outputs = none
execute_on = INITIAL
primary_percolation_boundaries = 'left'
secondary_percolation_boundaries = 'right'
specified_boundaries = 'left right'
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[./unique_regions]
type = FeatureFloodCountAux
variable = unique_regions
flood_counter = flood_count
field_display = UNIQUE_REGION
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/flood_counter_aux_test/simple.i)
[Mesh]
file = square_nodes.e
uniform_refine = 0
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./bubble_map0]
order = FIRST
family = LAGRANGE
[../]
[./bubble_map1]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./diffv]
type = Diffusion
variable = v
[../]
[]
[AuxKernels]
[./mapper0]
type = FeatureFloodCountAux
variable = bubble_map0
execute_on = timestep_end
flood_counter = bubbles
map_index = 0
[../]
[./mapper1]
type = FeatureFloodCountAux
variable = bubble_map1
execute_on = timestep_end
flood_counter = bubbles
map_index = 1
[../]
[]
[BCs]
[./bott_left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./bott_right]
type = DirichletBC
variable = v
boundary = 2
value = 1
[../]
[./up_right]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./up_left]
type = DirichletBC
variable = v
boundary = 4
value = 1
[../]
[./the_rest_u]
type = DirichletBC
variable = u
boundary = '5 6 7 8'
value = 0
[../]
[./the_rest_v]
type = DirichletBC
variable = v
boundary = '5 6 7 8'
value = 0
[../]
[]
[UserObjects]
[./bubbles]
use_single_map = false
type = FeatureFloodCount
variable = 'u v'
threshold = 0.3
execute_on = timestep_end
outputs = none
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/flood_counter_periodic_test/nodal_flood_periodic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff forcing_1 forcing_2 forcing_3 forcing_4 dot'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing_1]
type = GaussContForcing
variable = u
x_center = 1.0
y_center = 1.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_2]
type = GaussContForcing
variable = u
x_center = 20.0
y_center = 39.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_3]
type = GaussContForcing
variable = u
x_center = 39.0
y_center = 20.0
x_spread = 0.5
y_spread = 0.5
[../]
[./forcing_4]
type = GaussContForcing
variable = u
x_center = 15.0
y_center = 15.0
x_spread = 0.5
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./Periodic]
[./x]
variable = u
auto_direction = 'x y'
[../]
[../]
[]
[Postprocessors]
active = 'bubbles'
[./bubbles]
type = FeatureFloodCount
variable = u
threshold = 0.3
execute_on = timestep_end
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
dt = 4.0
num_steps = 5
[./Adaptivity]
refine_fraction = .40
coarsen_fraction = .02
max_h_level = 3
error_estimator = KellyErrorEstimator
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
(modules/phase_field/include/postprocessors/FauxGrainTracker.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "FeatureFloodCount.h"
#include "GrainTrackerInterface.h"
/**
* This class is a fake grain tracker object, it will not actually track grains nor remap them
* but will provide the same interface as the grain tracker and can be used as a lightweight
* replacement when neither of those methods are needed. You may safely use this object anytime
* you have at least as many order parameters as you do grains.
*/
class FauxGrainTracker : public FeatureFloodCount, public GrainTrackerInterface
{
public:
static InputParameters validParams();
FauxGrainTracker(const InputParameters & parameters);
virtual ~FauxGrainTracker();
virtual void initialize() override;
virtual void finalize() override;
virtual Real getValue() const override;
virtual void execute() override;
// GrainTrackerInterface methods
virtual Real getEntityValue(dof_id_type entity_id,
FeatureFloodCount::FieldType field_type,
std::size_t var_idx) const override;
virtual const std::vector<unsigned int> &
getVarToFeatureVector(dof_id_type elem_id) const override;
virtual unsigned int getFeatureVar(unsigned int feature_id) const override;
virtual std::size_t getNumberActiveGrains() const override;
virtual std::size_t getTotalFeatureCount() const override;
virtual Point getGrainCentroid(unsigned int grain_id) const override;
virtual bool doesFeatureIntersectBoundary(unsigned int feature_id) const override;
private:
/// The mapping of entities to grains, in this case always the order parameter
std::map<dof_id_type, unsigned int> _entity_id_to_var_num;
std::map<dof_id_type, std::vector<unsigned int>> _entity_var_to_features;
std::vector<unsigned int> _empty_var_to_features;
/// Used as the lightweight grain counter
std::set<unsigned int> _variables_used;
/// Total Grain Count
std::size_t _grain_count;
// Convenience variable holding the number of variables coupled into this object
const std::size_t _n_vars;
/// Used to emulate the tracking step of the real grain tracker object
const int _tracking_step;
/// Order parameter to grain indices (just a reflexive vector)
std::vector<unsigned int> _op_to_grains;
/// The volume of the feature
std::map<unsigned int, Real> _volume;
/// The count of entities contributing to the volume calculation
std::map<unsigned int, unsigned int> _vol_count;
/// The centroid of the feature (average of coordinates from entities participating in the volume calculation)
std::map<unsigned int, Point> _centroid;
};
(modules/phase_field/include/userobjects/PolycrystalUserObjectBase.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "DenseMatrix.h"
#include "FeatureFloodCount.h"
// Forward Declarations
/**
* This object provides the base capability for creating proper polycrystal ICs. It is
* able to discover the grain structure to provide information about neighboring grains
* so that they will not be assigned the same order parameters with a reduced set of variables.
*/
class PolycrystalUserObjectBase : public FeatureFloodCount
{
public:
static InputParameters validParams();
PolycrystalUserObjectBase(const InputParameters & parameters);
/**
* This callback is triggered after the object is initialized and may be optionally
* overridden to do precompute the element to grain identifiers ahead of time.
*/
virtual void precomputeGrainStructure() {}
/**
* Method for retrieving active grain IDs based on some point in the mesh. Typically these
* are element centroids or nodes depending on the basis functions being initialized. ICs that
* have fixed resolution data (i.e. experimental datasets) may choose to implement
* the element based method as well for added convenience.
*/
virtual void getGrainsBasedOnPoint(const Point & point,
std::vector<unsigned int> & grains) const = 0;
/**
* This method may be defined in addition to the point based initialization to speed up lookups.
* It returns grain IDs based on the current element. Note: If your simulation contains adaptivity
* the point based method may be used to retrieve grain information as well as this method.
*/
virtual void getGrainsBasedOnElem(const Elem & elem, std::vector<unsigned int> & grains) const
{
getGrainsBasedOnPoint(elem.vertex_average(), grains);
}
/**
* Must be overridden by the deriving class to provide the number of grains in the polycrystal
* structure.
*/
virtual unsigned int getNumGrains() const = 0;
/**
* Returns the variable value for a given op_index and mesh point. This is the method used by the
* initial condition after the Polycrystal grain structure has be setup. Those grains are
* then distributed to the typically smaller number of order parameters by this class.
* This method is then used to return those values but it may be overridden in a derived class.
*/
virtual Real getVariableValue(unsigned int op_index, const Point & p) const = 0;
/**
* Similarly to the getVariableValue method, this method also returns values but may be optimized
* for returning nodal values.
*/
virtual Real getNodalVariableValue(unsigned int op_index, const Node & n) const
{
return getVariableValue(op_index, static_cast<const Point &>(n));
}
/* Returns all available coloring algorithms as an enumeration type for input files.
*/
static MooseEnum coloringAlgorithms();
/**
* Returns corresponding descriptions of available coloring algorithms.
*/
static std::string coloringAlgorithmDescriptions();
/**
* UserObject interface overrides. Derived classes should _not_ override any of these methods.
*/
virtual void initialSetup() override;
virtual void initialize() override;
virtual void execute() override;
virtual void finalize() override;
protected:
virtual bool areFeaturesMergeable(const FeatureData & f1, const FeatureData & f2) const override;
virtual bool isNewFeatureOrConnectedRegion(const DofObject * dof_object,
std::size_t & current_index,
FeatureData *& feature,
Status & status,
unsigned int & new_id) override;
virtual void prepareDataForTransfer() override;
virtual void mergeSets() override;
virtual processor_id_type numberOfDistributedMergeHelpers() const override;
virtual void restoreOriginalDataStructures(std::vector<std::list<FeatureData>> & orig) override;
/**
* Builds a dense adjacency matrix based on the discovery of grain neighbors and halos
* surrounding each grain.
*/
void buildGrainAdjacencyMatrix();
/**
* Method that runs a coloring algorithm to assign OPs to grains.
*/
void assignOpsToGrains();
/**
* Built-in simple "back-tracking" algorithm to assign colors to a graph.
*/
bool colorGraph(unsigned int vertex);
/**
* Helper method for the back-tracking graph coloring algorithm.
*/
bool isGraphValid(unsigned int vertex, unsigned int color);
/**
* Prints out the adjacency matrix in a nicely spaced integer format.
*/
void printGrainAdjacencyMatrix() const;
/*************************************************
*************** Data Structures *****************
************************************************/
/// The dense adjacency matrix
std::unique_ptr<DenseMatrix<Real>> _adjacency_matrix;
/// mesh dimension
const unsigned int _dim;
/// The maximum number of order parameters (colors) available to assign to the grain structure
const unsigned int _op_num;
/// A map of the grain_id to op
std::map<unsigned int, unsigned int> _grain_to_op;
/// The selected graph coloring algorithm used by this object
const MooseEnum _coloring_algorithm;
/// A Boolean indicating whether the object has assigned colors to grains (internal use)
bool _colors_assigned;
/// A user controllable Boolean which can be used to print the adjacency matrix to the console
const bool _output_adjacency_matrix;
/// Used to indicate an invalid coloring for the built-in back-tracking algorithm
static const unsigned int INVALID_COLOR;
/// Used to hold the thickness of the halo that should be constructed for detecting adjacency
static const unsigned int HALO_THICKNESS;
private:
/// The number of chunks (for merging the features together)
processor_id_type _num_chunks;
/// A vector indicating which op is assigned to each grain (by index of the grain)
std::vector<unsigned int> _grain_idx_to_op;
/// Temporary storage area for current grains at a point to avoid memory churn
std::vector<unsigned int> _prealloc_tmp_grains;
std::map<dof_id_type, std::vector<unsigned int>> _entity_to_grain_cache;
};
(modules/phase_field/include/postprocessors/GrainTracker.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "FeatureFloodCount.h"
#include "GrainTrackerInterface.h"
#include "libmesh/bounding_box.h"
class PolycrystalUserObjectBase;
struct GrainDistance;
class GrainTracker : public FeatureFloodCount, public GrainTrackerInterface
{
public:
static InputParameters validParams();
GrainTracker(const InputParameters & parameters);
virtual ~GrainTracker();
virtual void meshChanged() override;
virtual void initialize() override;
virtual void execute() override;
virtual void finalize() override;
virtual std::size_t getTotalFeatureCount() const override;
// Struct used to transfer minimal data to all ranks
struct PartialFeatureData
{
BoundaryIntersection boundary_intersection;
unsigned int id;
Point centroid;
Status status;
};
struct CacheValues
{
Real current;
Real old;
Real older;
};
enum class RemapCacheMode
{
FILL,
USE,
BYPASS
};
// GrainTrackerInterface methods
virtual Real getEntityValue(dof_id_type node_id,
FieldType field_type,
std::size_t var_index = 0) const override;
virtual const std::vector<unsigned int> &
getVarToFeatureVector(dof_id_type elem_id) const override;
virtual unsigned int getFeatureVar(unsigned int feature_id) const override;
virtual std::size_t getNumberActiveGrains() const override;
virtual Point getGrainCentroid(unsigned int grain_id) const override;
virtual bool doesFeatureIntersectBoundary(unsigned int feature_id) const override;
virtual bool doesFeatureIntersectSpecifiedBoundary(unsigned int feature_id) const override;
virtual bool isFeaturePercolated(unsigned int feature_id) const override;
virtual std::vector<unsigned int> getNewGrainIDs() const override;
protected:
virtual void updateFieldInfo() override;
virtual Real getThreshold(std::size_t current_index) const override;
/**
* This method extracts the necessary state from the passed in object necessary to continue
* tracking grains. This method is meant to be used with the PolycrystalUserobjectBase class
* that sets up initial conditions for Polycrystal simulations. We can use the state of that
* object rather than rediscovering everything ourselves.
*/
void prepopulateState(const FeatureFloodCount & ffc_object);
/**
*/
void communicateHaloMap();
/**
* When the tracking phase starts (_t_step == _tracking_step) it assigns a unique id to every
* FeatureData object found by the FeatureFloodCount object.
*/
void assignGrains();
/**
* On subsequent time_steps, incoming FeatureData objects are compared to previous time_step
* information to track grains between time steps.
*
* This method updates the _feature_sets data structure.
* This method should only be called on the root processor
*/
void trackGrains();
/**
* This method is called when a new grain is detected. It can be overridden by a derived class to
* handle setting new properties on the newly created grain.
*/
virtual void newGrainCreated(unsigned int new_grain_id);
/**
* This method is called after trackGrains to remap grains that are too close to each other.
*/
void remapGrains();
/**
* Broadcast essential Grain information to all processors. This method is used to get certain
* attributes like centroids distributed and whether or not a grain intersects a boundary updated.
*/
void broadcastAndUpdateGrainData();
/**
* Populates and sorts a min_distances vector with the minimum distances to all grains in the
* simulation for a given grain. There are _vars.size() entries in the outer vector, one for
* each order parameter. A list of grains with the same OP are ordered in lists per OP.
*/
void computeMinDistancesFromGrain(FeatureData & grain,
std::vector<std::list<GrainDistance>> & min_distances);
/**
* This is the recursive part of the remapping algorithm. It attempts to remap a grain to a new
* index and recurses until max_depth is reached.
*/
bool attemptGrainRenumber(FeatureData & grain, unsigned int depth, unsigned int max_depth);
/**
* A routine for moving all of the solution values from a given grain to a new variable number. It
* is called with different modes to only cache, or actually do the work, or bypass the cache
* altogether.
*/
void swapSolutionValues(FeatureData & grain,
std::size_t new_var_index,
std::vector<std::map<Node *, CacheValues>> & cache,
RemapCacheMode cache_mode);
/**
* Helper method for actually performing the swaps.
*/
void swapSolutionValuesHelper(Node * curr_node,
std::size_t curr_var_index,
std::size_t new_var_index,
std::vector<std::map<Node *, CacheValues>> & cache,
RemapCacheMode cache_mode);
/**
* This method returns the minimum periodic distance between two vectors of bounding boxes. If the
* bounding boxes overlap the result is always -1.0.
*/
Real boundingRegionDistance(std::vector<BoundingBox> & bboxes1,
std::vector<BoundingBox> & bboxes2) const;
/**
* This method returns the minimum periodic distance between the centroids of two vectors of
* bounding boxes.
*/
Real centroidRegionDistance(std::vector<BoundingBox> & bboxes1,
std::vector<BoundingBox> & bboxes2) const;
/**
* Retrieve the next unique grain number if a new grain is detected during trackGrains. This
* method handles reserve order parameter indices properly. Direct access to the next index
* should be avoided.
*/
unsigned int getNextUniqueID();
/*************************************************
*************** Data Structures *****************
************************************************/
/// The timestep to begin tracking grains
const int _tracking_step;
/// The thickness of the halo surrounding each grain
const unsigned short _halo_level;
/// Depth of renumbering recursion (a depth of zero means no recursion)
const unsigned short _max_remap_recursion_depth;
/// The number of reserved order parameters
const unsigned short _n_reserve_ops;
/// The cutoff index where if variable index >= this number, no remapping TO that variable
/// will occur
const std::size_t _reserve_op_index;
/// The threshold above (or below) where a grain may be found on a reserve op field
const Real _reserve_op_threshold;
/**
* Absolute value of the lower bound used to represent a region not assigned to this grain, used
* when a grain is remapped to another order parameter. The actual value used is -_bound_value
*/
const Real _bound_value;
/// Inidicates whether remapping should be done or not (remapping is independent of tracking)
const bool _remap;
/// Indicates whether we should continue after a remap failure (will result in non-physical results)
const bool _tolerate_failure;
/// A reference to the nonlinear system (used for retrieving solution vectors)
NonlinearSystemBase & _nl;
/**
* This data structure holds the map of unique grains from the previous time step.
* The information is updated each timestep to track grains over time.
*/
std::vector<FeatureData> _feature_sets_old;
/// An optional IC UserObject which can provide initial data structures to this object.
const PolycrystalUserObjectBase * const _poly_ic_uo;
/**
* Verbosity level controlling the amount of information printed to the console.
*/
const short _verbosity_level;
/**
* Boolean to indicate the first time this object executes.
* Note: _tracking_step isn't enough if people skip initial or execute more than once per step.
*/
bool & _first_time;
/**
* Boolean to terminate with an error if a new grain is created during the simulation.
* This is for simulations where new grains are not expected. Note, this does not impact
* the initial callback to newGrainCreated() nor does it get triggered for splitting grains.
*/
const bool _error_on_grain_creation;
private:
/// Holds the first unique grain index when using _reserve_op (all the remaining indices are sequential)
unsigned int _reserve_grain_first_index;
/// The previous max grain id (needed to figure out which ids are new in a given step)
unsigned int _old_max_grain_id;
/// Holds the next "regular" grain ID (a grain found or remapped to the standard op vars)
unsigned int & _max_curr_grain_id;
/// Boolean to indicate whether this is a Steady or Transient solve
const bool _is_transient;
/// Data structure to hold element ID ranges when using Distributed Mesh (populated on rank 0 only)
std::vector<std::pair<dof_id_type, dof_id_type>> _all_ranges;
};
/**
* This struct is used to hold distance information to other grains in the simulation. It is used
* for sorting and during the remapping algorithm.
*/
struct GrainDistance
{
GrainDistance(Real distance, std::size_t var_index);
GrainDistance(Real distance,
std::size_t var_index,
std::size_t grain_index,
unsigned int grain_id);
// Copy constructors
GrainDistance(const GrainDistance & f) = default;
GrainDistance & operator=(const GrainDistance & f) = default;
// Move constructors
GrainDistance(GrainDistance && f) = default;
GrainDistance & operator=(GrainDistance && f) = default;
bool operator<(const GrainDistance & rhs) const;
Real _distance;
std::size_t _var_index;
std::size_t _grain_index;
unsigned int _grain_id;
};
template <>
void dataStore(std::ostream & stream, GrainTracker::PartialFeatureData & feature, void * context);
template <>
void dataLoad(std::istream & stream, GrainTracker::PartialFeatureData & feature, void * context);