void FeatureFloodCount::finalize() { communicateAndMerge(); // Populate _feature_maps and _var_index_maps updateFieldInfo(); // Calculate and out output bubble volume data if (_pars.isParamValid("bubble_volume_file")) { calculateBubbleVolumes(); std::vector<Real> data; data.reserve(_all_feature_volumes.size() + _total_volume_intersecting_boundary.size() + 2); // Insert the current timestep and the simulation time into the data vector data.push_back(_fe_problem.timeStep()); data.push_back(_fe_problem.time()); // Insert the (sorted) bubble volumes into the data vector data.insert(data.end(), _all_feature_volumes.begin(), _all_feature_volumes.end()); // If we are computing the boundary-intersecting volumes, insert // those numbers into the normalized boundary-intersecting bubble // volumes into the data vector. if (_compute_boundary_intersecting_volume) data.insert(data.end(), _total_volume_intersecting_boundary.begin(), _total_volume_intersecting_boundary.end()); // Finally, write the file writeCSVFile(getParam<FileName>("bubble_volume_file"), data); } }
void FeatureFloodCount::finalize() { // Gather all information on processor zero and merge communicateAndMerge(); // Sort and label the features if (_is_master) sortAndLabel(); // Send out the local to global mappings scatterAndUpdateRanks(); // Populate _feature_maps and _var_index_maps updateFieldInfo(); }