diff --git a/Source/LinearSolvers/ERF_PoissonSolve.cpp b/Source/LinearSolvers/ERF_PoissonSolve.cpp index 2218380c4..0a80fe725 100644 --- a/Source/LinearSolvers/ERF_PoissonSolve.cpp +++ b/Source/LinearSolvers/ERF_PoissonSolve.cpp @@ -43,6 +43,7 @@ void ERF::project_velocities (int lev, Real l_dt, Vector& mom_mf, Mult // Now convert the rho0w MultiFab to hold Omega rather than rhow // **************************************************************************** // +#ifndef ERF_USE_EB if (l_use_terrain && !SolverChoice::terrain_is_flat) { for ( MFIter mfi(rhs[0],TilingIfNotGPU()); mfi.isValid(); ++mfi) { @@ -65,6 +66,7 @@ void ERF::project_velocities (int lev, Real l_dt, Vector& mom_mf, Mult }); } // mfi } +#endif // **************************************************************************** // Compute divergence which will form RHS diff --git a/Source/LinearSolvers/ERF_solve_with_EB_mlmg.cpp b/Source/LinearSolvers/ERF_solve_with_EB_mlmg.cpp index 72b465443..87c7e4fc7 100644 --- a/Source/LinearSolvers/ERF_solve_with_EB_mlmg.cpp +++ b/Source/LinearSolvers/ERF_solve_with_EB_mlmg.cpp @@ -66,7 +66,7 @@ void ERF::solve_with_EB_mlmg (int lev, Vector& rhs, Vector& for (int idim = 0; idim < AMREX_SPACEDIM; ++idim) { bcoef[idim].define(convert(ba_tmp[0],IntVect::TheDimensionVector(idim)), dm_tmp[0], 1, 0, MFInfo(), *m_factory[lev]); - bcoef[idim].setVal(1.0); + bcoef[idim].setVal(-1.0); } mleb.setBCoeffs(0, amrex::GetArrOfConstPtrs(bcoef)); @@ -83,6 +83,13 @@ void ERF::solve_with_EB_mlmg (int lev, Vector& rhs, Vector& phi[0].FillBoundary(geom[lev].periodicity()); + // + // This arises because we solve MINUS del dot beta grad phi = div (rho u) + // + fluxes[0][0].mult(-1.); + fluxes[0][1].mult(-1.); + fluxes[0][2].mult(-1.); + // **************************************************************************** // Impose bc's on pprime // ****************************************************************************