Skip to content

Commit

Permalink
Merge pull request #87 from seahorce-scidac/tweak
Browse files Browse the repository at this point in the history
Remove some FillBoundary
  • Loading branch information
asalmgren authored Dec 14, 2023
2 parents d30be9b + 765e3ee commit aa534a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
6 changes: 4 additions & 2 deletions Source/Initialization/ROMSX_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ ROMSX::set_2darrays (int lev)
});
}

vec_ubar[lev]->FillBoundary(geom[lev].periodicity());
vec_vbar[lev]->FillBoundary(geom[lev].periodicity());
// DEBUGGING NOTE -- Upwelling fails if these are commented out
const Real time = 0.0;
FillPatch(lev,time, *vec_ubar[lev], GetVecOfPtrs(vec_ubar));
FillPatch(lev,time, *vec_vbar[lev], GetVecOfPtrs(vec_vbar));
}
21 changes: 12 additions & 9 deletions Source/ROMSX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,35 +361,38 @@ ROMSX::set_bathymetry(int lev)
{
init_custom_bathymetry(geom[lev], *vec_hOfTheConfusingName[lev], *vec_Zt_avg1[lev], solverChoice);

vec_hOfTheConfusingName[lev]->FillBoundary(geom[lev].periodicity());
vec_Zt_avg1[lev]->FillBoundary(geom[lev].periodicity());
Real time = 0.0;
FillPatch(lev, time, *vec_Zt_avg1[lev], GetVecOfPtrs(vec_Zt_avg1));
FillPatch(lev, time, *vec_hOfTheConfusingName[lev], GetVecOfPtrs(vec_hOfTheConfusingName));
}

void
ROMSX::set_vmix(int lev) {
init_custom_vmix(geom[lev], *vec_Akv[lev], *vec_Akt[lev], *vec_z_w[lev], solverChoice);

vec_Akv[lev]->FillBoundary(geom[lev].periodicity());
vec_Akt[lev]->FillBoundary(geom[lev].periodicity());
Real time = 0.0;
FillPatch(lev, time, *vec_Akv[lev], GetVecOfPtrs(vec_Akv));
FillPatch(lev, time, *vec_Akt[lev], GetVecOfPtrs(vec_Akt));
}

void
ROMSX::set_hmixcoef(int lev)
{
init_custom_hmix(geom[lev], *vec_visc2_p[lev], *vec_visc2_r[lev], *vec_diff2[lev], solverChoice);

vec_visc2_p[lev]->FillBoundary(geom[lev].periodicity());
vec_visc2_r[lev]->FillBoundary(geom[lev].periodicity());
vec_diff2[lev]->FillBoundary(geom[lev].periodicity());
Real time = 0.0;
FillPatch(lev, time, *vec_visc2_p[lev], GetVecOfPtrs(vec_visc2_p));
FillPatch(lev, time, *vec_visc2_r[lev], GetVecOfPtrs(vec_visc2_r));
FillPatch(lev, time, *vec_diff2[lev] , GetVecOfPtrs(vec_diff2));
}

void
ROMSX::set_smflux(int lev, Real time)
{
init_custom_smflux(geom[lev], time, *vec_sustr[lev], *vec_svstr[lev], solverChoice);

vec_sustr[lev]->FillBoundary(geom[lev].periodicity());
vec_svstr[lev]->FillBoundary(geom[lev].periodicity());
// FillPatch(lev, time, *vec_sustr[lev], GetVecOfPtrs(vec_sustr));
// FillPatch(lev, time, *vec_svstr[lev], GetVecOfPtrs(vec_svstr));
}

void
Expand Down

0 comments on commit aa534a3

Please sign in to comment.