Added flags to lbpm_color_simulator.h to define ANALYSIS_INTERVAL and BLOBID_INTERVAL

This commit is contained in:
James E McClure
2015-09-21 23:15:44 -04:00
parent 3ed9afd03e
commit 8011a8261a

View File

@@ -1,6 +1,8 @@
// Run the analysis, blob identification, and write restart files
#include "common/Array.h"
#define ANALYSIS_INTERVAL=1000
#define BLOBID_INTERVAL=1000
enum AnalysisType{ AnalyzeNone=0, IdentifyBlobs=0x01, CopyPhaseIndicator=0x02,
CopyAverages=0x04, CalcDist=0x08, CreateRestart=0x10 };
@@ -181,15 +183,15 @@ void run_analysis( int timestep, int restart_interval,
// Determin the analysis we want to perform
AnalysisType type = AnalyzeNone;
if ( timestep%1000 == 995 ) {
if ( timestep%ANALYSIS_INTERVAL + 5 == ANALYSIS_INTERVAL ) {
// Copy the phase indicator field for the earlier timestep
type = static_cast<AnalysisType>( type | CopyPhaseIndicator );
}
if ( timestep%250 == 0 ) {
if ( timestep%BLOBID_INTERVAL == 0 ) {
// Identify blobs and update global ids in time
type = static_cast<AnalysisType>( type | IdentifyBlobs );
}
#ifdef USE_CUDA
/* #ifdef USE_CUDA
if ( tpool.getQueueSize()<=3 && tpool.getNumThreads()>0 && timestep%50==0 ) {
// Keep a few blob identifications queued up to keep the processors busy,
// allowing us to track the blobs as fast as possible
@@ -197,12 +199,13 @@ void run_analysis( int timestep, int restart_interval,
type = static_cast<AnalysisType>( type | IdentifyBlobs );
}
#endif
if ( timestep%1000 == 0 ) {
*/
if ( timestep%ANALYSIS_INTERVAL == 0 ) {
// Copy the averages to the CPU (and identify blobs)
type = static_cast<AnalysisType>( type | CopyAverages );
type = static_cast<AnalysisType>( type | IdentifyBlobs );
}
if ( timestep%1000 == 5 ) {
if ( timestep%ANALYSIS_INTERVAL == 5 ) {
// Run the analysis
type = static_cast<AnalysisType>( type | CalcDist );
}