// verify correctness
if (myid != 0)
- AssertThrow (vec(vec.local_range().first+10) == vec.local_range().first-25,
+ AssertThrow (PetscRealPart(vec(vec.local_range().first+10)) == vec.local_range().first-25,
ExcInternalError());
if (myid != n_processes-1)
- AssertThrow (vec(vec.local_range().first+90) == vec.local_range().first+105,
+ AssertThrow (PetscRealPart(vec(vec.local_range().first+90)) == vec.local_range().first+105,
ExcInternalError());
for (unsigned int i=vec.local_range().first; i<vec.local_range().second; ++i)
&&
(i != vec.local_range().first+90))
{
- double val = vec(i);
- AssertThrow (std::fabs(val - i) <= 1e-6, ExcInternalError());
+ PetscScalar val = vec(i);
+ AssertThrow (std::fabs(PetscRealPart(val) - i) <= 1e-6, ExcInternalError());
+ AssertThrow (std::fabs(PetscImaginaryPart(val)) <= 1e-6, ExcInternalError());
}
}