mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add magType to pTraits and arithmetic primitives
This commit is contained in:
committed by
Andrew Heather
parent
375fd3d9d3
commit
dc32b20a5c
@ -52,10 +52,14 @@ public:
|
||||
//- Component type
|
||||
typedef Scalar cmptType;
|
||||
|
||||
//- Magnitude type
|
||||
typedef Scalar magType;
|
||||
|
||||
//- Equivalent type of labels used for valid component indexing
|
||||
typedef label labelType;
|
||||
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
//- Dimensionality of space
|
||||
|
||||
@ -88,6 +88,9 @@ public:
|
||||
//- Component type
|
||||
typedef Cmpt cmptType;
|
||||
|
||||
//- Magnitude type
|
||||
typedef Cmpt magType;
|
||||
|
||||
|
||||
// Static Constants
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -44,13 +44,13 @@ namespace Foam
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- Abstract template class to provide the form resulting from
|
||||
// the inner-product of two forms
|
||||
//- the inner-product of two forms
|
||||
template<class Cmpt, class Form1, class Form2>
|
||||
class typeOfInnerProduct
|
||||
{};
|
||||
|
||||
//- Abstract template class to provide the form resulting from
|
||||
// the outer-product of two forms
|
||||
//- the outer-product of two forms
|
||||
template<class Cmpt, class Form1, class Form2>
|
||||
class typeOfOuterProduct
|
||||
{};
|
||||
@ -71,6 +71,16 @@ class symmTypeOfRank
|
||||
{};
|
||||
|
||||
|
||||
//- The magnitude type for given argument.
|
||||
template<class arg1>
|
||||
class typeOfMag
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename pTraits<typename pTraits<arg1>::cmptType>::magType type;
|
||||
};
|
||||
|
||||
|
||||
template<class arg1, class arg2>
|
||||
class typeOfSum
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -74,6 +74,10 @@ public:
|
||||
//- Component type
|
||||
typedef bool cmptType;
|
||||
|
||||
//- Magnitude type
|
||||
typedef bool magType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
//- Dimensionality of space
|
||||
|
||||
@ -252,6 +252,9 @@ public:
|
||||
//- Component type
|
||||
typedef complex cmptType;
|
||||
|
||||
//- Magnitude type
|
||||
typedef scalar magType;
|
||||
|
||||
//- Equivalent type of labels used for valid component indexing
|
||||
typedef label labelType;
|
||||
|
||||
|
||||
@ -138,6 +138,9 @@ public:
|
||||
//- Component type
|
||||
typedef int32_t cmptType;
|
||||
|
||||
//- Magnitude type
|
||||
typedef int32_t magType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
|
||||
@ -139,6 +139,9 @@ public:
|
||||
//- Component type
|
||||
typedef int64_t cmptType;
|
||||
|
||||
//- Magnitude type
|
||||
typedef int64_t magType;
|
||||
|
||||
|
||||
// Member constants
|
||||
|
||||
|
||||
@ -96,6 +96,9 @@ public:
|
||||
//- Component type
|
||||
typedef scalar cmptType;
|
||||
|
||||
//- Magnitude type
|
||||
typedef scalar magType;
|
||||
|
||||
//- Euler-angle rotation order
|
||||
enum eulerOrder : unsigned char
|
||||
{
|
||||
|
||||
@ -132,6 +132,7 @@ public:
|
||||
//- The value type the MinMax represents
|
||||
typedef T value_type;
|
||||
|
||||
//- Component type
|
||||
typedef typename pTraits<T>::cmptType cmptType;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user