Skip to content

Commit

Permalink
Macproj fix eb set bcoeffs (#823)
Browse files Browse the repository at this point in the history
* Pass m_beta_loc in call to setBCoeffs

* MacProjector:: Remove unneeded local copies of phi_loc and beta_loc
cgilet authored Apr 29, 2020
1 parent 45f2c8f commit ad3619d
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 0 additions & 6 deletions Src/LinearSolvers/Projections/AMReX_MacProjector.H
Original file line number Diff line number Diff line change
@@ -115,12 +115,6 @@ private:
// Location of umac -- face center vs face centroid
MLMG::Location m_umac_loc;

// Location of beta (coefficient) -- face center vs face centroid
MLMG::Location m_beta_loc;

// Location of phi (solution variable) -- cell center vs cell centroid
MLMG::Location m_phi_loc;

// Location of divu (RHS -- optional) -- cell center vs cell centroid
MLMG::Location m_divu_loc;

6 changes: 2 additions & 4 deletions Src/LinearSolvers/Projections/AMReX_MacProjector.cpp
Original file line number Diff line number Diff line change
@@ -20,8 +20,6 @@ MacProjector::MacProjector (const Vector<Array<MultiFab*,AMREX_SPACEDIM> >& a_um
: m_umac(a_umac),
m_geom(a_geom),
m_umac_loc(a_umac_loc),
m_beta_loc(a_beta_loc),
m_phi_loc ( a_phi_loc),
m_divu_loc(a_divu_loc)
{
int nlevs = a_umac.size();
@@ -56,11 +54,11 @@ MacProjector::MacProjector (const Vector<Array<MultiFab*,AMREX_SPACEDIM> >& a_um
m_eb_abeclap.reset(new MLEBABecLap(a_geom, ba, dm, a_lpinfo, m_eb_factory));
m_linop = m_eb_abeclap.get();

if (m_phi_loc == MLMG::Location::CellCentroid) m_eb_abeclap->setPhiOnCentroid();
if (a_phi_loc == MLMG::Location::CellCentroid) m_eb_abeclap->setPhiOnCentroid();

m_eb_abeclap->setScalars(0.0, 1.0);
for (int ilev = 0; ilev < nlevs; ++ilev) {
m_eb_abeclap->setBCoeffs(ilev, a_beta[ilev]);
m_eb_abeclap->setBCoeffs(ilev, a_beta[ilev], a_beta_loc);
}
}
else

0 comments on commit ad3619d

Please sign in to comment.