From 4c189a600c922c7247ba31e1b6d3db188c1985c2 Mon Sep 17 00:00:00 2001 From: Hannah Klion Date: Mon, 19 Aug 2024 16:27:53 -0700 Subject: [PATCH] move override sync for velocities to before ubar/vbar are calculated --- Source/REMORA.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/REMORA.cpp b/Source/REMORA.cpp index d69c150..17f9246 100644 --- a/Source/REMORA.cpp +++ b/Source/REMORA.cpp @@ -668,6 +668,12 @@ REMORA::init_only (int lev, Real time) amrex::Abort("Need to specify T init procedure"); } + // Ensure that the face-based data are the same on both sides of a periodic domain. + // The data associated with the lower grid ID is considered the correct value. + xvel_new[lev]->OverrideSync(geom[lev].periodicity()); + yvel_new[lev]->OverrideSync(geom[lev].periodicity()); + zvel_new[lev]->OverrideSync(geom[lev].periodicity()); + set_2darrays(lev); init_set_vmix(lev); @@ -675,11 +681,6 @@ REMORA::init_only (int lev, Real time) set_coriolis(lev); init_custom_smflux(geom[lev], time, *vec_sustr[lev], *vec_svstr[lev], solverChoice); - // Ensure that the face-based data are the same on both sides of a periodic domain. - // The data associated with the lower grid ID is considered the correct value. - xvel_new[lev]->OverrideSync(geom[lev].periodicity()); - yvel_new[lev]->OverrideSync(geom[lev].periodicity()); - zvel_new[lev]->OverrideSync(geom[lev].periodicity()); } // read in some parameters from inputs file