Commit fbe739b5 authored by frey_m's avatar frey_m

fix bug

parent 1e28ab17
......@@ -84,7 +84,8 @@ MGPoissonSolver::MGPoissonSolver ( PartBunch *beam,
double tol,
int maxiters,
std::string precmode)
: geometries_m(geometries)
: isMatrixfilled_m(false)
, geometries_m(geometries)
, tol_m(tol)
, maxiters_m(maxiters)
, comm_mp(new Comm_t(Ippl::getComm()))
......@@ -612,7 +613,7 @@ void MGPoissonSolver::ComputeStencil(Vector_t /*hr*/, Teuchos::RCP<TpetraVector_
// if matrix has already been filled (fillComplete()) we can only
// replace entries
if (A->isFillComplete()) {
if (isMatrixfilled_m) {
// off-diagonal entries
A->replaceGlobalValues(MyGlobalElements[i], NumEntries, &Values[0], &Indices[0]);
// diagonal entry
......@@ -628,6 +629,7 @@ void MGPoissonSolver::ComputeStencil(Vector_t /*hr*/, Teuchos::RCP<TpetraVector_
RCP<ParameterList_t> params = Teuchos::parameterList();
params->set ("Optimize Storage", true);
A->fillComplete(params);
isMatrixfilled_m = true;
}
void MGPoissonSolver::printLoadBalanceStats() {
......
......@@ -138,6 +138,8 @@ public:
private:
bool isMatrixfilled_m;
//TODO: we need to update this and maybe change attached
//solver!
/// holding the currently active geometry
......
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