Assert(this->size() == V.size(),
ExcDimensionMismatch(this->size(), V.size()));
-# if DEAL_II_TRILINOS_VERSION_GTE(11, 11, 0)
Epetra_Import data_exchange(vector->Map(), V.trilinos_vector().Map());
const int ierr = vector->Import(V.trilinos_vector(),
data_exchange,
Epetra_AddLocalAlso);
Assert(ierr == 0, ExcTrilinosError(ierr));
(void)ierr;
-# else
- // In versions older than 11.11 the Import function is broken for
- // adding Hence, we provide a workaround in this case
-
- Epetra_MultiVector dummy(vector->Map(), 1, false);
- Epetra_Import data_exchange(dummy.Map(), V.trilinos_vector().Map());
-
- int ierr = dummy.Import(V.trilinos_vector(), data_exchange, Insert);
- Assert(ierr == 0, ExcTrilinosError(ierr));
-
- ierr = vector->Update(1.0, dummy, 1.0);
- Assert(ierr == 0, ExcTrilinosError(ierr));
- (void)ierr;
-# endif
}
return *this;
parameter_list.set("coarse: type", coarse_type);
// Force re-initialization of the random seed to make ML deterministic
- // (only supported in trilinos >12.2):
-# if DEAL_II_TRILINOS_VERSION_GTE(12, 4, 0)
parameter_list.set("initialize random seed", true);
-# endif
parameter_list.set("smoother: sweeps", static_cast<int>(smoother_sweeps));
parameter_list.set("cycle applications", static_cast<int>(n_cycles));
AssertThrow(size() == v.size(),
ExcDimensionMismatch(size(), v.size()));
-# if DEAL_II_TRILINOS_VERSION_GTE(11, 11, 0)
Epetra_Import data_exchange(vector->Map(), v.vector->Map());
int ierr =
vector->Import(*v.vector, data_exchange, Epetra_AddLocalAlso);
AssertThrow(ierr == 0, ExcTrilinosError(ierr));
last_action = Add;
-# else
- // In versions older than 11.11 the Import function is broken for
- // adding Hence, we provide a workaround in this case
-
- Epetra_MultiVector dummy(vector->Map(), 1, false);
- Epetra_Import data_exchange(dummy.Map(), v.vector->Map());
-
- int ierr = dummy.Import(*v.vector, data_exchange, Insert);
- AssertThrow(ierr == 0, ExcTrilinosError(ierr));
-
- ierr = vector->Update(1.0, dummy, 1.0);
- AssertThrow(ierr == 0, ExcTrilinosError(ierr));
-# endif
}
}