mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: quaternion ROLL_PITCH_YAW and YAW_PITCH_ROLL aliases/lookups
COMP: define labelSphericalTensor::I - remove spurious 'labelI' global constant (labelSphericalTensor::I) STYLE: replace use of deprecated Tensor vectorComponent STYLE: avoid bit-wise assignment of bool (VectorSpace compare ops)
This commit is contained in:
@ -72,13 +72,8 @@ tensor makeRandomContainer(Random& rnd)
|
||||
// Do ++nFail_ if values of two objects are not equal within a given tolerance.
|
||||
// The function is converted from PEP-485.
|
||||
template<class Type>
|
||||
typename std::enable_if
|
||||
<
|
||||
std::is_same<floatScalar, Type>::value ||
|
||||
std::is_same<doubleScalar, Type>::value ||
|
||||
std::is_same<complex, Type>::value,
|
||||
void
|
||||
>::type cmp
|
||||
typename std::enable_if<pTraits<Type>::rank == 0, void>::type
|
||||
cmp
|
||||
(
|
||||
const word& msg,
|
||||
const Type& x,
|
||||
@ -110,13 +105,8 @@ typename std::enable_if
|
||||
// Do ++nFail_ if two components are not equal within a given tolerance.
|
||||
// The function is converted from PEP-485
|
||||
template<class Type>
|
||||
typename std::enable_if
|
||||
<
|
||||
!std::is_same<floatScalar, Type>::value &&
|
||||
!std::is_same<doubleScalar, Type>::value &&
|
||||
!std::is_same<complex, Type>::value,
|
||||
void
|
||||
>::type cmp
|
||||
typename std::enable_if<pTraits<Type>::rank != 0, void>::type
|
||||
cmp
|
||||
(
|
||||
const word& msg,
|
||||
const Type& x,
|
||||
@ -129,7 +119,7 @@ typename std::enable_if
|
||||
|
||||
unsigned nFail = 0;
|
||||
|
||||
for (label i = 0; i < pTraits<Type>::nComponents; ++i)
|
||||
for (direction i = 0; i < pTraits<Type>::nComponents; ++i)
|
||||
{
|
||||
if (max(absTol, relTol*max(mag(x[i]), mag(y[i]))) < mag(x[i] - y[i]))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user