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:
Mark Olesen
2022-06-02 09:13:20 +02:00
parent 8b63b8cdfe
commit eba7a485ba
21 changed files with 122 additions and 155 deletions

View File

@ -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]))
{