v.compress ();
// then check the norm
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
Assert (fabs(v.l2_norm()-std::sqrt(norm))<eps, ExcInternalError());
deallog << "OK" << std::endl;
// make sure they're equal
deallog << v*w << ' ' << v.l2_norm() * w.l2_norm()
<< ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl;
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < eps*(v*w),
ExcInternalError());
// make sure they're equal
deallog << v*w << ' ' << v.l2_norm() * w.l2_norm()
<< ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl;
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < eps*(v*w),
ExcInternalError());
v.compress ();
// then check the norm
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
Assert (std::fabs(v.norm_sqr() - norm) < eps*norm,
ExcInternalError());
v.compress ();
// then check the norm
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
Assert (std::fabs(v.mean_value() - sum/v.size()) < eps*sum/v.size(),
ExcInternalError());
v.compress ();
// then check the norm
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
Assert (std::fabs(v.lp_norm(3) - std::pow(sum, 1./3.)) <
eps*std::pow(sum, 1./3.),
ExcInternalError());
v.ratio (w, x);
// make sure we get the expected result
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
for (unsigned int i=0; i<v.size(); ++i)
{
Assert (w(i) == i+1., ExcInternalError());
// make sure they're equal
deallog << v*w << ' ' << v.l2_norm() * w.l2_norm()
<< ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl;
- const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5;
+ const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5;
Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < eps*(v*w),
ExcInternalError());