fix issue with vis db
This commit is contained in:
commit
645e76f13b
@ -167,8 +167,8 @@ void SubPhase::Basic(){
|
||||
// If inlet/outlet layers exist use these as default
|
||||
if (Dm->inlet_layers_x > 0) imin = Dm->inlet_layers_x;
|
||||
if (Dm->inlet_layers_y > 0) jmin = Dm->inlet_layers_y;
|
||||
if (Dm->inlet_layers_z > 0) kmin = Dm->inlet_layers_z;
|
||||
if (Dm->outlet_layers_z > 0) kmax = Dm->outlet_layers_z;
|
||||
if (Dm->inlet_layers_z > 0 && Dm->kproc() == 0) kmin += Dm->inlet_layers_z;
|
||||
if (Dm->outlet_layers_z > 0 && Dm->kproc() == Dm->nprocz()-1) kmax -= Dm->outlet_layers_z;
|
||||
|
||||
nb.reset(); wb.reset();
|
||||
|
||||
@ -246,8 +246,14 @@ void SubPhase::Basic(){
|
||||
|
||||
count_w=sumReduce( Dm->Comm, count_w);
|
||||
count_n=sumReduce( Dm->Comm, count_n);
|
||||
if (count_w > 0.0)
|
||||
gwb.p=sumReduce( Dm->Comm, wb.p) / count_w;
|
||||
else
|
||||
gwb.p = 0.0;
|
||||
if (count_n > 0.0)
|
||||
gnb.p=sumReduce( Dm->Comm, nb.p) / count_n;
|
||||
else
|
||||
gnb.p = 0.0;
|
||||
|
||||
// check for NaN
|
||||
bool err=false;
|
||||
@ -364,7 +370,8 @@ void SubPhase::Full(){
|
||||
// If inlet layers exist use these as default
|
||||
if (Dm->inlet_layers_x > 0) imin = Dm->inlet_layers_x;
|
||||
if (Dm->inlet_layers_y > 0) jmin = Dm->inlet_layers_y;
|
||||
if (Dm->inlet_layers_z > 0) kmin = Dm->inlet_layers_z;
|
||||
if (Dm->inlet_layers_z > 0 && Dm->kproc() == 0) kmin += Dm->inlet_layers_z;
|
||||
if (Dm->outlet_layers_z > 0 && Dm->kproc() == Dm->nprocz()-1) kmax -= Dm->outlet_layers_z;
|
||||
|
||||
nd.reset(); nc.reset(); wd.reset(); wc.reset(); iwn.reset(); iwnc.reset();
|
||||
|
||||
|
@ -941,7 +941,7 @@ void runAnalysis::basic( std::shared_ptr<Database> input_db, SubPhase &Averages,
|
||||
|
||||
// Check which analysis steps we need to perform
|
||||
auto color_db = input_db->getDatabase( "Color" );
|
||||
auto vis_db = input_db->getDatabase( "Visualization" );
|
||||
//auto vis_db = input_db->getDatabase( "Visualization" );
|
||||
|
||||
int timestep = color_db->getWithDefault<int>( "timestep", 0 );
|
||||
auto type = computeAnalysisType( timestep );
|
||||
@ -1028,7 +1028,7 @@ void runAnalysis::basic( std::shared_ptr<Database> input_db, SubPhase &Averages,
|
||||
|
||||
if (timestep%d_visualization_interval==0){
|
||||
// Write the vis files
|
||||
auto work = new IOWorkItem( vis_db, d_meshData, Averages, d_fillData, getComm() );
|
||||
auto work = new IOWorkItem( input_db, d_meshData, Averages, d_fillData, getComm() );
|
||||
work->add_dependency(d_wait_analysis);
|
||||
work->add_dependency(d_wait_subphase);
|
||||
work->add_dependency(d_wait_vis);
|
||||
|
Loading…
Reference in New Issue
Block a user