# FeatureVolumeVectorPostprocessor

This VectorPostprocessor is designed to pull data from a FeatureFloodCount or one of its derived classes. In particular, the FeatureFloodCount object stores information about each connected component that it discovers: volumes, whether or not that component intersects a boundary, and the variable number.

If this VPP is used with a GrainTracker or derived object, the row number represents the unique identifier of each feature. This value is stable between time steps meaning that row number 5 would always represent the grain with an ID of 5 (zero-based indexing). This also means that information from inactive grains is output and should be ignored. Inactive grains are identified with var_num == -1.

When using this VPP with a FeatureFloodCount object, there is no implied ordering of the features.

• var_num - The index of which coupled variable represents this feature [0..n).

• feature_volume - The volume of the feature, computed as an integral of the solution over each element representing this feature.

• intersects_bounds - A Boolean indicating whether this feature intersects any boundary.

• centroid_ (optional) - The coordinates of each feature centroid (Currently only supported when no periodic boundaries are used).

## Typical Output

feature_volumes,intersects_bounds,var_num
3.1408620543403,0,0
1.02515625,0,1
0.26265625,0,1

(modules/phase_field/test/tests/grain_tracker_test/gold/grain_tracker_volume_out_grain_volumes_0000.csv)

## Centroid Output

This VectorPosptrocessor can also output centroid information when the simulation is not using periodic boundary conditions. To enable centroid output, add output_centroids = true to the VPP block in your input file.

## Usage

To use this VPP, you simply need to specify the name of a FeatureFloodCount or derived object in the input file.

[VectorPostprocessors]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_tracker
execute_on = 'initial'
[../]
[]

(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_volume.i)

The single_feature_per_element parameter is a crude attempt at total volume conservation. When you set this Boolean to true, the volume of every element will be added only to the most dominant feature. In this manner, the loss of an element in one feature results in the addition of an element to another feature. There is no loss of volume to grain boundaries or anything else using this assumption.

## Class Description

This object is designed to pull information from the data structures of a "FeatureFloodCount" or derived object (e.g. individual feature volumes)

## Input Parameters

• flood_counterThe FeatureFloodCount UserObject to get values from.

C++ Type:UserObjectName

Options:

Description:The FeatureFloodCount UserObject to get values from.

### Required Parameters

• output_centroidsFalseSet to true to output the feature centroids

Default:False

C++ Type:bool

Options:

Description:Set to true to output the feature centroids

• execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

Default:TIMESTEP_END

C++ Type:ExecFlagEnum

Options:NONE INITIAL LINEAR NONLINEAR TIMESTEP_END TIMESTEP_BEGIN FINAL CUSTOM

Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

• single_feature_per_elementFalseSet this Boolean if you wish to use an element based volume where the dominant order parameter determines the feature that accumulates the entire element volume

Default:False

C++ Type:bool

Options:

Description:Set this Boolean if you wish to use an element based volume where the dominant order parameter determines the feature that accumulates the entire element volume

• contains_complete_historyFalseSet this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

Default:False

C++ Type:bool

Options:

Description:Set this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

### Optional Parameters

• enableTrueSet the enabled status of the MooseObject.

Default:True

C++ Type:bool

Options:

Description:Set the enabled status of the MooseObject.

• 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

Options:

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.

• outputsVector of output names were you would like to restrict the output of variables(s) associated with this object

C++ Type:std::vector

Options:

Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object

• control_tagsAdds user-defined labels for accessing object parameters via control logic.

C++ Type:std::vector

Options:

Description:Adds user-defined labels for accessing object parameters via control logic.

• 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

Options:

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).

• force_preauxFalseForces the GeneralUserObject to be executed in PREAUX

Default:False

C++ Type:bool

Options:

Description:Forces the GeneralUserObject to be executed in PREAUX