Skip to content

Commit 4ed14fe

Browse files
committed
bugfix in Jacobi - still not quite right
1 parent 1dd9b6f commit 4ed14fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ExampleCodes/LinearSolvers/GMRES/Poisson/AMReX_GMRES_Poisson.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ void GMRESPOISSON::precond (MultiFab& lhs, MultiFab const& rhs) const
169169

170170
const GpuArray<Real, AMREX_SPACEDIM> dx = m_geom.CellSizeArray();
171171

172-
amrex::Real fac = 1.;
173-
for (int d=0; d<AMREX_SPACEDIM; ++d) fac += 2./(dx[d]*dx[d]);
172+
amrex::Real fac = 0.;
173+
for (int d=0; d<AMREX_SPACEDIM; ++d) fac -= 2./(dx[d]*dx[d]);
174174

175175
for ( MFIter mfi(lhs,TilingIfNotGPU()); mfi.isValid(); ++mfi ) {
176176

0 commit comments

Comments
 (0)