create an array of fields from a single field based on material properties of cell sets
Each cell set in a field has an associated properties array. You may use this array to store anything related to the cell set, but it is commonly used to store material properties of the cells in the cell set.
explode_materials splits up the field into an array of fields based on the values of a particular element of the properties array. The same array index is used to look up the value in the properties array of each cell set. Each cell set with a distinct value of that property goes into a separate output field. Whether the values are equal is all that is significant, the actual values are not significant.
Note that this macro compares floating point numbers for equality; you are responsible for ensuring that the values in the material property array are bit-for-bit equal or not equal, as desired.
Libraries.Examples.Visualization.Explode_Field
v/dv_examp/explode.v