some minor refactoring

This commit is contained in:
James E McClure
2018-05-07 21:14:01 -04:00
parent 4a4029c48d
commit 72b01d926b

View File

@@ -423,6 +423,7 @@ AnalysisType runAnalysis::computeAnalysisType( int timestep )
AnalysisType type = AnalysisType::AnalyzeNone;
if ( timestep%d_analysis_interval + 8 == d_analysis_interval ) {
// Copy the phase indicator field for the earlier timestep
printf("Copy phase indicator,timestep=%i\n",timestep);
type |= AnalysisType::CopyPhaseIndicator;
}
if ( timestep%d_blobid_interval == 0 ) {
@@ -439,11 +440,13 @@ AnalysisType runAnalysis::computeAnalysisType( int timestep )
#endif */
if ( timestep%d_analysis_interval + 4 == d_analysis_interval ) {
// Copy the averages to the CPU (and identify blobs)
printf("Copy sim state, timestep=%i \n",timestep);
type |= AnalysisType::CopySimState;
type |= AnalysisType::IdentifyBlobs;
}
if ( timestep%d_analysis_interval == 0 ) {
// Run the analysis
printf("Compute averages, timestep=%i \n",timestep);
type |= AnalysisType::ComputeAverages;
}
if (timestep%d_restart_interval == 0) {
@@ -574,7 +577,9 @@ void runAnalysis::run( int timestep, TwoPhase& Averages, const double *Phi,
}
// Spawn threads to do the analysis work
if ( matches(type,AnalysisType::ComputeAverages) ) {
//if (timestep%d_restart_interval==0){
if ( matches(type,AnalysisType::ComputeAverages) ) {
//if ( timestep%d_analysis_interval == 0 ) {
auto work = new AnalysisWorkItem(type,timestep,Averages,d_last_index,d_last_id_map,d_beta);
work->add_dependency(d_wait_blobID);
work->add_dependency(d_wait_analysis);