From 1212ec08d3e8c2a129d3234886eba5546398ee5a Mon Sep 17 00:00:00 2001 From: Andy Nonaka Date: Tue, 11 Feb 2025 07:16:41 -0800 Subject: [PATCH] fix surfcov restart with random numbers --- src_compressible_stag/Checkpoint.cpp | 17 +++++++++++++++++ src_compressible_stag/main_driver.cpp | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src_compressible_stag/Checkpoint.cpp b/src_compressible_stag/Checkpoint.cpp index 448d0b4f..fb998068 100644 --- a/src_compressible_stag/Checkpoint.cpp +++ b/src_compressible_stag/Checkpoint.cpp @@ -1087,6 +1087,10 @@ void ReadCheckPoint2D(int& step, Read_Copy_MF_Checkpoint(cumom[1],"cumomy",checkpointname,ba_old,dmap_old,1,1,1); Read_Copy_MF_Checkpoint(cumom[2],"cumomz",checkpointname,ba_old,dmap_old,1,1,2); + if (n_ads_spec>0) { + Read_Copy_MF_Checkpoint(surfcov,"surfcov",checkpointname,ba_old,dmap_old,n_ads_spec,0); + } + // Set all stats to zero if reset stats, else read if (reset_stats == 1) { cuMeans.setVal(0.0); @@ -1100,6 +1104,13 @@ void ReadCheckPoint2D(int& step, cumomVars[d].setVal(0.); } coVars.setVal(0.0); + if (n_ads_spec>0) { + for (int m=0;m0) { + Read_Copy_MF_Checkpoint(surfcovMeans,"surfcovMeans",checkpointname,ba_old,dmap_old,n_ads_spec,0); + Read_Copy_MF_Checkpoint(surfcovVars,"surfcovVars",checkpointname,ba_old,dmap_old,n_ads_spec,0); + Read_Copy_MF_Checkpoint(surfcovcoVars,"surfcovcoVars",checkpointname,ba_old,dmap_old,n_ads_spec*6,0); + } } // FillBoundaries diff --git a/src_compressible_stag/main_driver.cpp b/src_compressible_stag/main_driver.cpp index 990be4f6..18eeac0c 100644 --- a/src_compressible_stag/main_driver.cpp +++ b/src_compressible_stag/main_driver.cpp @@ -1030,6 +1030,8 @@ void main_driver(const char* argv) } else { Abort("splitting_MFsurfchem can be 0 or 1"); } + + VisMF::Write(surfcov,"a_surfcov"); } // FHD