From: Jean-Paul Pelteret Date: Sun, 29 Apr 2018 09:20:20 +0000 (+0200) Subject: Use numbers comparators in physics standard tensor functions X-Git-Tag: v9.0.0-rc1~35^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c7cab63a126879fd3fbf73470ec37288747fe79;p=dealii.git Use numbers comparators in physics standard tensor functions --- diff --git a/include/deal.II/physics/elasticity/standard_tensors.h b/include/deal.II/physics/elasticity/standard_tensors.h index a0a9d90a74..65682d5344 100644 --- a/include/deal.II/physics/elasticity/standard_tensors.h +++ b/include/deal.II/physics/elasticity/standard_tensors.h @@ -17,6 +17,7 @@ #define dealii_elasticity_standard_tensors_h +#include #include #include @@ -292,7 +293,7 @@ SymmetricTensor<4, dim, Number> Physics::Elasticity::StandardTensors::Dev_P (const Tensor<2, dim, Number> &F) { const Number det_F = determinant(F); - Assert(det_F > Number(0.0), + Assert(numbers::value_is_greater_than(det_F,0.0), ExcMessage("Deformation gradient has a negative determinant.")); const Tensor<2,dim,Number> C_ns = transpose(F)*F; const SymmetricTensor<2,dim,Number> C = symmetrize(C_ns); @@ -316,7 +317,7 @@ SymmetricTensor<4, dim, Number> Physics::Elasticity::StandardTensors::Dev_P_T (const Tensor<2, dim, Number> &F) { const Number det_F = determinant(F); - Assert(det_F > Number(0.0), + Assert(numbers::value_is_greater_than(det_F,0.0), ExcMessage("Deformation gradient has a negative determinant.")); const Tensor<2,dim,Number> C_ns = transpose(F)*F; const SymmetricTensor<2,dim,Number> C = symmetrize(C_ns);