From fdeda76af47cde9829af5d7ee44090d496d44ee6 Mon Sep 17 00:00:00 2001 From: AMLattanzi Date: Tue, 19 Dec 2023 14:54:19 -0800 Subject: [PATCH] No need to read/write qmoist to chk file now. --- Source/IO/Checkpoint.cpp | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/Source/IO/Checkpoint.cpp b/Source/IO/Checkpoint.cpp index dce2ee8a1..67c8886b5 100644 --- a/Source/IO/Checkpoint.cpp +++ b/Source/IO/Checkpoint.cpp @@ -128,20 +128,8 @@ ERF::WriteCheckpointFile () const MultiFab::Copy(zvel,vars_new[lev][Vars::zvel],0,0,1,0); VisMF::Write(zvel, amrex::MultiFabFileFullPrefix(lev, checkpointname, "Level_", "ZFace")); - IntVect ng; - if (solverChoice.moisture_type != MoistureType::None) { - for (int mvar(0); mvarnGrowVect(); - int nvar = qmoist[lev][mvar]->nComp(); - MultiFab moist_vars(grids[lev],dmap[lev],nvar,ng); - MultiFab::Copy(moist_vars,*(qmoist[lev][mvar]),0,0,nvar,ng); - VisMF::Write(moist_vars, amrex::MultiFabFileFullPrefix(lev, checkpointname, "Level_", "MoistVars")); - } - } - // Note that we write the ghost cells of the base state (unlike above) - ng = base_state[lev].nGrowVect(); + IntVect ng = base_state[lev].nGrowVect(); MultiFab base(grids[lev],dmap[lev],base_state[lev].nComp(),ng); MultiFab::Copy(base,base_state[lev],0,0,base.nComp(),ng); VisMF::Write(base, amrex::MultiFabFileFullPrefix(lev, checkpointname, "Level_", "BaseState")); @@ -339,19 +327,8 @@ ERF::ReadCheckpointFile () VisMF::Read(zvel, amrex::MultiFabFileFullPrefix(lev, restart_chkfile, "Level_", "ZFace")); MultiFab::Copy(vars_new[lev][Vars::zvel],zvel,0,0,1,0); - IntVect ng; - if (solverChoice.moisture_type != MoistureType::None) { - for (int mvar(0); mvarnGrowVect(); - int nvar = qmoist[lev][mvar]->nComp(); - MultiFab moist_vars(grids[lev],dmap[lev],nvar,ng); - VisMF::Read(moist_vars, amrex::MultiFabFileFullPrefix(lev, restart_chkfile, "Level_", "MoistVars")); - MultiFab::Copy(*(qmoist[lev][mvar]),moist_vars,0,0,nvar,ng); - } - } - // Note that we read the ghost cells of the base state (unlike above) - ng = base_state[lev].nGrowVect(); + IntVect ng = base_state[lev].nGrowVect(); MultiFab base(grids[lev],dmap[lev],base_state[lev].nComp(),ng); VisMF::Read(base, amrex::MultiFabFileFullPrefix(lev, restart_chkfile, "Level_", "BaseState")); MultiFab::Copy(base_state[lev],base,0,0,base.nComp(),ng);