diff --git a/src_compressible_stag/Checkpoint.cpp b/src_compressible_stag/Checkpoint.cpp index 9e3fef22..124af9a7 100644 --- a/src_compressible_stag/Checkpoint.cpp +++ b/src_compressible_stag/Checkpoint.cpp @@ -394,7 +394,7 @@ void ReadCheckPoint(int& step, // spatialCrossMF if (do_1D && all_correl) { spatialCrossMF.define(ba,dmap,ncross*5,0); // for five x*: [0, fl(n_cells[0]/4), fl(n_cells[0]/2), fl(n_cells[0]*3/4), n_cells[0]-1] - } else if (do_2D) { + } else if (do_1D || do_2D) { spatialCrossMF.define(ba,dmap,ncross,0); } @@ -506,11 +506,10 @@ void ReadCheckPoint(int& step, Read_Copy_MF_Checkpoint(coVars,"coVars",checkpointname,ba_old,dmap_old,26,0); - if (do_1D && all_correl == 0) { - Read_Copy_MF_Checkpoint(spatialCrossMF,"spatialCrossMF",checkpointname,ba_old,dmap_old,ncross,0); - } - else if (do_2D) { + if (do_1D && all_correl) { Read_Copy_MF_Checkpoint(spatialCrossMF,"spatialCrossMF",checkpointname,ba_old,dmap_old,ncross*5,0); + } else if (do_1D || do_2D) { + Read_Copy_MF_Checkpoint(spatialCrossMF,"spatialCrossMF",checkpointname,ba_old,dmap_old,ncross,0); } Read_Copy_MF_Checkpoint(velMeans[0],"velmeanx",checkpointname,ba_old,dmap_old,1,0,0); diff --git a/src_compressible_stag/main_driver.cpp b/src_compressible_stag/main_driver.cpp index 30604693..4595c475 100644 --- a/src_compressible_stag/main_driver.cpp +++ b/src_compressible_stag/main_driver.cpp @@ -256,9 +256,6 @@ void main_driver(const char* argv) if (do_2D and slicepoint >= 0) { Abort("Cannot use do_2D and slicepoint"); } - if (do_2D and n_ads_spec>0 and ads_wall_dir == 2) { - Abort("do_2D with n_ads_spec>0 requires ads_wall_dir != 2"); - } if (project_dir >= 0) { if (do_slab_sf and ((membrane_cell <= 0) or (membrane_cell >= n_cells[project_dir]-1))) { Abort("Slab structure factor needs a membrane cell within the domain: 0 < membrane_cell < n_cells[project_dir] - 1"); @@ -268,8 +265,11 @@ void main_driver(const char* argv) } } } - if ((all_correl > 1) or (all_correl < 0)) { - Abort("all_correl can be 0 or 1"); + if (do_2D and n_ads_spec>0 and ads_wall_dir == 2) { + Abort("do_2D with n_ads_spec>0 requires ads_wall_dir != 2"); + } + if (do_1D and n_ads_spec>0 and ads_wall_dir != 0) { + Abort("do_1D with n_ads_spec>0 requires ads_wall_dir = 0"); } if ((all_correl == 1) and (cross_cell > 0) and (cross_cell < n_cells[0]-1)) { amrex::Print() << "Correlations will be done at four equi-distant x* because all_correl = 1" << "\n";