Commit 92d18fe4 authored by frey_m's avatar frey_m
Browse files

MGPoissonSolver: resizeMesh function

parent 06fdb909
......@@ -351,8 +351,10 @@ void MGPoissonSolver::computePotential(Field_t &rho, Vector_t hr) {
for (int idz = localId[2].first(); idz <= localId[2].last(); idz++) {
for (int idy = localId[1].first(); idy <= localId[1].last(); idy++) {
for (int idx = localId[0].first(); idx <= localId[0].last(); idx++) {
NDIndex<3> l(Index(idx, idx), Index(idy, idy), Index(idz, idz));
if (bp_m->isInside(idx, idy, idz))
RHS->getDataNonConst()[id++] = 4*M_PI*rho[idx][idy][idz].get()/scaleFactor;
RHS->replaceGlobalValue(bp_m->getIdx(idx, idy, idz),
4.0 * M_PI * rho.localElement(l) / scaleFactor);
}
}
}
......@@ -506,6 +508,7 @@ void MGPoissonSolver::IPPLToMap3D(NDIndex<3> localId) {
}
}
}
int indexbase = 0;
map_p = Teuchos::rcp(new TpetraMap_t(Teuchos::OrdinalTraits<Tpetra::global_size_t>::invalid(),
&MyGlobalElements[0], NumMyElements, indexbase, comm_mp));
......
......@@ -123,8 +123,14 @@ public:
void extrapolateLHS();
void resizeMesh(Vector_t& origin, Vector_t& hr, PartBunchBase<double, 3>* bunch) {
bp_m->resizeMesh(origin, hr, bunch);
}
Inform &print(Inform &os) const;
private:
bool isMatrixfilled_m;
......@@ -169,6 +175,7 @@ private:
/// Map holding the processor distribution of data
Teuchos::RCP<TpetraMap_t> map_p;
/// communicator used by Trilinos
Teuchos::RCP<const Comm_t> comm_mp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment