From 1d79c0452cd1d557cbbc5a51a46720fcc299e33b Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Mon, 29 Jul 2019 11:36:30 +0200
Subject: [PATCH] ENH: additional contiguous traits (#1378)

- change contiguous from a series of global functions to separate
  templated traits classes:

    - is_contiguous
    - is_contiguous_label
    - is_contiguous_scalar

  The static constexpr 'value' and a constexpr conversion operator
  allow use in template expressions.  The change also makes it much
  easier to define general traits and to inherit from them.

  The is_contiguous_label and is_contiguous_scalar are special traits
  for handling data of homogeneous components of the respective types.
---
 applications/test/Hashing/Test-Hashing.C      |  18 +--
 applications/test/List/Test-List.C            |   4 +-
 applications/test/contiguous/Make/options     |   7 +-
 .../test/contiguous/Test-contiguous.C         |  54 ++++---
 .../indexedCell/indexedCellEnum.C             |   2 +-
 .../indexedCell/indexedCellEnum.H             |  12 +-
 .../indexedVertex/indexedVertex.H             |  28 ++--
 .../indexedVertex/indexedVertexEnum.H         |  16 ++-
 .../algorithms/indexedOctree/volumeType.H     |  12 +-
 .../IndirectListBase/IndirectListBaseIO.C     |   6 +-
 .../containers/Lists/FixedList/FixedList.H    |  18 ++-
 .../containers/Lists/FixedList/FixedListIO.C  |   7 +-
 src/OpenFOAM/containers/Lists/List/List.C     |  10 +-
 src/OpenFOAM/containers/Lists/List/List.H     |   2 +-
 src/OpenFOAM/containers/Lists/List/ListIO.C   |   4 +-
 src/OpenFOAM/containers/Lists/UList/UList.C   |   4 +-
 src/OpenFOAM/containers/Lists/UList/UList.H   |   6 +-
 src/OpenFOAM/containers/Lists/UList/UListIO.C |   8 +-
 .../IOstreams/Pstreams/combineGatherScatter.C |  18 +--
 src/OpenFOAM/db/IOstreams/Pstreams/exchange.C |   7 +-
 .../db/IOstreams/Pstreams/gatherScatter.C     |  10 +-
 .../db/IOstreams/Pstreams/gatherScatterList.C |  10 +-
 src/OpenFOAM/fields/Fields/Field/Field.C      |   2 +-
 .../pointConstraint/pointConstraint.H         |  18 ++-
 src/OpenFOAM/matrices/Matrix/MatrixIO.C       |   8 +-
 src/OpenFOAM/meshes/boundBox/boundBox.H       |  16 ++-
 src/OpenFOAM/meshes/meshShapes/edge/edge.H    |  12 +-
 .../meshShapes/labelledTri/labelledTri.H      |  15 +-
 .../meshes/meshShapes/tetCell/tetCell.H       |  15 +-
 .../meshes/meshShapes/triFace/triFace.H       |   9 +-
 .../globalMeshData/globalIndexTemplates.C     |  16 +--
 .../mapDistributeBaseTemplates.C              |   6 +-
 .../primitiveShapes/objectHit/pointIndexHit.H |   8 +-
 .../meshes/treeBoundBox/treeBoundBox.H        |  15 +-
 .../primitives/Barycentric/Barycentric.H      |  18 ++-
 .../Barycentric/BarycentricTensor.H           |  23 ++-
 .../Barycentric/barycentric/barycentric.H     |  16 +--
 .../barycentricTensor/barycentricTensor.H     |  11 +-
 .../primitives/Barycentric2D/Barycentric2D.H  |  16 +++
 .../barycentric2D/barycentric2D.H             |  15 +-
 .../primitives/DiagTensor/DiagTensor.H        |  18 ++-
 .../DiagTensor/diagTensor/diagTensor.H        |   9 +-
 src/OpenFOAM/primitives/Pair/Pair.H           |  21 ++-
 .../SphericalTensor/SphericalTensor.H         |  25 +++-
 .../labelSphericalTensor.H                    |   8 +-
 .../sphericalTensor/sphericalTensor.H         |   8 +-
 .../SphericalTensor2D/SphericalTensor2D.H     |  27 +++-
 .../sphericalTensor2D/sphericalTensor2D.H     |   9 +-
 .../primitives/SymmTensor/SymmTensor.H        |  19 ++-
 .../labelSymmTensor/labelSymmTensor.H         |   8 +-
 .../SymmTensor/symmTensor/symmTensor.H        |   8 +-
 .../primitives/SymmTensor2D/SymmTensor2D.H    |  19 ++-
 .../SymmTensor2D/symmTensor2D/symmTensor2D.H  |   8 +-
 src/OpenFOAM/primitives/Tensor/Tensor.H       |  17 ++-
 .../Tensor/doubleTensor/doubleTensor.H        |  11 +-
 .../Tensor/floatTensor/floatTensor.H          |   9 +-
 .../Tensor/labelTensor/labelTensor.H          |  10 +-
 .../primitives/Tensor/tensor/tensor.H         |   7 +-
 src/OpenFOAM/primitives/Tensor2D/Tensor2D.H   |  22 ++-
 .../primitives/Tensor2D/tensor2D/tensor2D.H   |   9 +-
 src/OpenFOAM/primitives/Vector/Vector.H       |  18 ++-
 .../Vector/doubleVector/doubleVector.H        |   9 +-
 .../Vector/floatVector/floatVector.H          |  11 +-
 .../Vector/labelVector/labelVector.H          |   9 +-
 .../primitives/Vector/vector/vector.H         |   9 +-
 src/OpenFOAM/primitives/Vector2D/Vector2D.H   |  19 ++-
 .../Vector2D/labelVector2D/labelVector2D.H    |   7 -
 .../primitives/Vector2D/vector2D/vector2D.H   |   9 +-
 src/OpenFOAM/primitives/complex/complex.H     |  17 ++-
 .../primitives/contiguous/contiguous.H        | 136 +++++++-----------
 .../vectorTensorTransform.H                   |  16 ++-
 .../primitives/quaternion/quaternion.H        |  14 +-
 .../primitives/septernion/septernion.H        |  21 +--
 .../CompactSpatialTensor.H                    |  23 ++-
 .../compactSpatialTensor.H                    |   7 +-
 .../CompactSpatialTensorT.H                   |  23 ++-
 .../SpatialTensor/SpatialTensor.H             |  24 +++-
 .../spatialTensor/spatialTensor.H             |   7 +-
 .../SpatialVector/SpatialVector.H             |  23 ++-
 .../spatialVector/spatialVector.H             |   6 +-
 src/OpenFOAM/primitives/triad/triad.H         |  18 ++-
 .../LES/LESdeltas/smoothDelta/smoothDelta.H   |  16 +--
 .../directions/directionInfo/directionInfo.H  |  20 ++-
 .../wallNormalInfo/wallNormalInfo.H           |  18 +--
 .../layeredSolver/pointEdgeStructuredWalk.H   |  12 +-
 .../pointPatchDist/externalPointEdgePoint.H   |  18 +--
 .../pointEdgeCollapse/pointEdgeCollapse.H     |  18 +--
 .../polyTopoChange/refinementData.H           |  20 ++-
 .../polyTopoChange/refinementDistanceData.H   |  18 +--
 .../finiteVolume/fvc/fvcSmooth/smoothData.H   |  11 +-
 .../finiteVolume/fvc/fvcSmooth/sweepData.H    |  11 +-
 .../wallDist/wallPointYPlus/wallPointYPlus.H  |  14 +-
 .../field/nearWallFields/findCellParticle.H   |  16 +--
 .../coalCombustion/coalParcel/coalParcel.H    |   9 +-
 .../basicHeterogeneousReactingParcel.H        |   8 +-
 .../basicKinematicMPPICParcel.H               |   8 +-
 .../basicKinematicParcel.H                    |   9 +-
 .../basicReactingMultiphaseParcel.H           |   8 +-
 .../basicReactingParcel/basicReactingParcel.H |   9 +-
 .../basicThermoParcel/basicThermoParcel.H     |   9 +-
 src/lagrangian/solidParticle/solidParticle.H  |  12 +-
 .../basicSprayParcel/basicSprayParcel.H       |   9 +-
 .../meshRefinement/meshRefinement.H           |   5 +-
 .../meshRefinement/patchFaceOrientation.H     |  21 ++-
 .../meshRefinement/transportData.H            |  14 +-
 .../PointIntegrateData/PointIntegrateData.H   |  28 ++--
 .../trackedParticle/trackedParticle.C         |   3 +-
 .../trackedParticle/trackedParticle.H         |  19 +--
 .../PatchEdgeFaceWave/patchEdgeFaceInfo.H     |  22 ++-
 .../PatchEdgeFaceWave/patchEdgeFaceRegion.H   |  21 ++-
 .../algorithms/PointEdgeWave/PointData.H      |  33 ++---
 .../algorithms/PointEdgeWave/pointEdgePoint.H |  21 ++-
 src/meshTools/cellClassification/cellInfo.H   |  22 +--
 src/meshTools/cellDist/wallPoint/wallPoint.H  |  20 +--
 .../cellDist/wallPoint/wallPointData.H        |  55 ++-----
 .../meshStructure/pointTopoDistanceData.H     |  29 ++--
 .../meshStructure/topoDistanceData.H          |  26 ++--
 src/meshTools/regionSplit/minData.H           |  21 ++-
 .../inverseDistance/meshToMeshData.H          |  21 ++-
 .../distributedTriSurfaceMesh.H               |   4 +-
 120 files changed, 954 insertions(+), 904 deletions(-)

diff --git a/applications/test/Hashing/Test-Hashing.C b/applications/test/Hashing/Test-Hashing.C
index 35e0bb6dc4e..68482745074 100644
--- a/applications/test/Hashing/Test-Hashing.C
+++ b/applications/test/Hashing/Test-Hashing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -78,7 +78,7 @@ void infoHashString
 
 void reportHashList(const UList<string>& list)
 {
-    Info<< "contiguous = " << contiguous<string>() << nl << nl;
+    Info<< "contiguous = " << is_contiguous<string>::value << nl << nl;
 
     for (const string& val : list)
     {
@@ -91,7 +91,7 @@ void reportHashList(const UList<string>& list)
 
 void reportHashList(const UList<label>& list)
 {
-    Info<<"contiguous = " << contiguous<label>() << nl << nl;
+    Info<<"contiguous = " << is_contiguous<label>::value << nl << nl;
 
     for (const label val : list)
     {
@@ -110,7 +110,7 @@ void reportHashList(const UList<label>& list)
 
 void reportHashList(const UList<face>& list)
 {
-    Info<<"contiguous = " << contiguous<label>() << nl << nl;
+    Info<<"contiguous = " << is_contiguous<label>::value << nl << nl;
 
     for (const face& f : list)
     {
@@ -157,7 +157,7 @@ typedef Pair<word> wordPair;
 
 void reportHashList(const UList<wordPair>& list)
 {
-    Info<<"contiguous = " << contiguous<wordPair>() << nl << nl;
+    Info<<"contiguous = " << is_contiguous<wordPair>::value << nl << nl;
 
     for (const wordPair& pr : list)
     {
@@ -182,7 +182,7 @@ void reportHashList(const UList<wordPair>& list)
 
 void reportHashList(const UList<labelPair>& list)
 {
-    Info<<"contiguous = " << contiguous<labelPair>() << nl << nl;
+    Info<<"contiguous = " << is_contiguous<labelPair>::value << nl << nl;
 
     for (const labelPair& pr : list)
     {
@@ -203,7 +203,7 @@ void reportHashList(const UList<labelPair>& list)
 
 void reportHashList(const UList<labelPairPair>& list)
 {
-    Info<<"contiguous = " << contiguous<labelPairPair>() << nl << nl;
+    Info<<"contiguous = " << is_contiguous<labelPairPair>::value << nl << nl;
 
     for (const labelPairPair& pr : list)
     {
@@ -224,7 +224,7 @@ void reportHashList(const UList<labelPairPair>& list)
 
 void reportHashList(const UList<edge>& list)
 {
-    Info<<"contiguous = " << contiguous<edge>() << nl << nl;
+    Info<<"contiguous = " << is_contiguous<edge>::value << nl << nl;
 
     for (const edge& e : list)
     {
@@ -245,7 +245,7 @@ void reportHashList(const UList<edge>& list)
 
 void reportHashList(const UList<triFace>& list)
 {
-    Info<<"contiguous = " << contiguous<triFace>() << nl << nl;
+    Info<<"contiguous = " << is_contiguous<triFace>::value << nl << nl;
 
     for (const triFace& f : list)
     {
diff --git a/applications/test/List/Test-List.C b/applications/test/List/Test-List.C
index b759f9033d7..4be32c8e418 100644
--- a/applications/test/List/Test-List.C
+++ b/applications/test/List/Test-List.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017-2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -112,7 +112,7 @@ Ostream& printListOutputType(const char* what)
 {
     Info<< what
         << " (contiguous="
-        << contiguous<T>() << " no_linebreak="
+        << is_contiguous<T>::value << " no_linebreak="
         << Detail::ListPolicy::no_linebreak<T>::value
         << " short_length="
         << Detail::ListPolicy::short_length<T>::value << ')';
diff --git a/applications/test/contiguous/Make/options b/applications/test/contiguous/Make/options
index 18e6fe47afa..d797f175596 100644
--- a/applications/test/contiguous/Make/options
+++ b/applications/test/contiguous/Make/options
@@ -1,2 +1,7 @@
-/* EXE_INC = */
+EXE_INC = \
+    -I$(LIB_SRC)/fileFormats/lnInclude \
+    -I$(LIB_SRC)/surfMesh/lnInclude \
+    -I$(LIB_SRC)/meshTools/lnInclude \
+    -I$(LIB_SRC)/parallel/distributed/lnInclude
+
 /* EXE_LIBS = */
diff --git a/applications/test/contiguous/Test-contiguous.C b/applications/test/contiguous/Test-contiguous.C
index 2de7836bd31..cdf59544a51 100644
--- a/applications/test/contiguous/Test-contiguous.C
+++ b/applications/test/contiguous/Test-contiguous.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,6 +37,7 @@ Description
 #include "IOstreams.H"
 #include "scalar.H"
 #include "vector.H"
+#include "Switch.H"
 
 #include "labelRange.H"
 #include "scalarList.H"
@@ -44,24 +45,43 @@ Description
 #include "FixedList.H"
 #include "Pair.H"
 
+#include "distributedTriSurfaceMesh.H"
+
 namespace Foam
 {
 
 // Wrong, but interesting to test
-// template<> struct contiguous<Pair<word>> : std::true_type {};
+template<> struct is_contiguous<Pair<word>> : std::true_type {};
 
-} // End namespace Foam
+} // end namespace Foam
 
 using namespace Foam;
 
 
 template<class T>
-void printContiguous()
+void printInfo(const char* const name = nullptr)
 {
-    Info<<"contiguous " << typeid(T).name() << " () = "
-        << contiguous<T>()
-        // << " value = " << contiguous<T>::value
-        << nl;
+    if (name == nullptr)
+    {
+        Info<< typeid(T).name();
+    }
+    else
+    {
+        Info<< name;
+    }
+
+    Info<< " contiguous=" <<  Switch(is_contiguous<T>::value);
+
+    if (is_contiguous_label<T>::value)
+    {
+        Info<< " label";
+    }
+    if (is_contiguous_scalar<T>::value)
+    {
+        Info<< " scalar";
+    }
+
+    Info<< nl;
 }
 
 
@@ -74,18 +94,16 @@ int main(int argc, char *argv[])
     argList::noParallel();
     argList::noFunctionObjects();
 
-    #include "setRootCase.H"
-
-    printContiguous<label>();
-    printContiguous<double>();
-    printContiguous<FixedList<int, 2>>();
-    printContiguous<FixedList<int, 3>>();
-    printContiguous<Pair<long>>();
+    printInfo<label>();
+    printInfo<double>();
+    printInfo<FixedList<double, 4>>();
+    printInfo<Pair<long>>();
 
-    printContiguous<FixedList<word, 2>>();
-    printContiguous<Pair<word>>();
+    printInfo<FixedList<word, 2>>();
+    printInfo<Pair<word>>();
 
-    printContiguous<FixedList<FixedList<int, 2>, 2>>();
+    printInfo<FixedList<FixedList<int, 2>, 2>>();
+    printInfo<segment>();
 
     return 0;
 }
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.C
index edbb3ff3610..7a21f50758d 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2017-2018 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2015 OpenFOAM Foundation
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.H
index b2cf8a75d46..647343a3fa3 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellEnum.H
@@ -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) 2012-2015 OpenFOAM Foundation
@@ -36,6 +36,7 @@ SourceFiles
 #ifndef indexedCellEnum_H
 #define indexedCellEnum_H
 
+#include "contiguous.H"
 #include "Enum.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -63,11 +64,10 @@ public:
 };
 
 
-template<>
-inline bool contiguous<indexedCellEnum>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for indexedCellEnum
+template<> struct is_contiguous<indexedCellEnum> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
index 3b8971a99b6..3eea2134d8d 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
@@ -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) 2012-2016 OpenFOAM Foundation
@@ -323,32 +323,26 @@ public:
 
 } // End namespace CGAL
 
-// * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
+
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
 #ifdef CGAL_INEXACT
 namespace Foam
 {
     // For inexact representations where the storage type is a double, the data
     // is contiguous. This may not be true for exact number types.
+
     template<>
-    inline bool contiguous
+    struct is_contiguous
     <
-        CGAL::indexedVertex
-        <
-            K,
-            CGAL::Triangulation_vertex_base_3<K>
-        >
-    >()
-    {
-        return true;
-    }
-
+        CGAL::indexedVertex<K, CGAL::Triangulation_vertex_base_3<K>>
+    > : std::true_type {};
 
     template<>
-    inline bool contiguous<CGAL::Triangulation_vertex_base_3<K>::Point>()
-    {
-        return true;
-    }
+    struct is_contiguous
+    <
+        CGAL::Triangulation_vertex_base_3<K>::Point
+    > : std::true_type {};
 
 } // End namespace Foam
 #endif
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexEnum.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexEnum.H
index 65580f9daaf..8a30152341f 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexEnum.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexEnum.H
@@ -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) 2012-2016 OpenFOAM Foundation
@@ -84,15 +84,17 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for indexedVertexEnum
+template<> struct is_contiguous<indexedVertexEnum> : std::true_type {};
+
+
+// * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
+
 Istream& operator>>(Istream&, indexedVertexEnum::vertexType&);
 Ostream& operator<<(Ostream&, const indexedVertexEnum::vertexType&);
 
-template<>
-inline bool contiguous<indexedVertexEnum>()
-{
-    return true;
-}
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/algorithms/indexedOctree/volumeType.H b/src/OpenFOAM/algorithms/indexedOctree/volumeType.H
index 26a0839aeb8..defadb0e878 100644
--- a/src/OpenFOAM/algorithms/indexedOctree/volumeType.H
+++ b/src/OpenFOAM/algorithms/indexedOctree/volumeType.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015-2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2014 OpenFOAM Foundation
@@ -38,6 +38,7 @@ SourceFiles
 #ifndef volumeType_H
 #define volumeType_H
 
+#include "contiguous.H"
 #include "Enum.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -45,7 +46,7 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declarations
+// Forward Declarations
 class dictionary;
 class volumeType;
 Istream& operator>>(Istream& is, volumeType& vt);
@@ -128,9 +129,10 @@ public:
 };
 
 
-//- Data associated with volumeType type are contiguous
-template<>
-inline bool contiguous<volumeType>() {return true;}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for volumeType
+template<> struct is_contiguous<volumeType> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C
index e5e67578d27..96fd82c8671 100644
--- a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C
+++ b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C
@@ -44,9 +44,9 @@ Foam::Ostream& Foam::IndirectListBase<T, Addr>::writeList
     const label len = list.size();
 
     // Write list contents depending on data format
-    if (os.format() == IOstream::ASCII || !contiguous<T>())
+    if (os.format() == IOstream::ASCII || !is_contiguous<T>::value)
     {
-        if (len > 1 && contiguous<T>() && list.uniform())
+        if (len > 1 && is_contiguous<T>::value && list.uniform())
         {
             // Two or more entries, and all entries have identical values.
             os << len << token::BEGIN_BLOCK << list[0] << token::END_BLOCK;
@@ -60,7 +60,7 @@ Foam::Ostream& Foam::IndirectListBase<T, Addr>::writeList
              &&
                 (
                     Detail::ListPolicy::no_linebreak<T>::value
-                 || contiguous<T>()
+                 || is_contiguous<T>::value
                 )
             )
         )
diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H
index c74b1d96b24..ca5f1d0aaba 100644
--- a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H
+++ b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H
@@ -431,7 +431,7 @@ public:
                 unsigned seed=0
             ) const
             {
-                if (contiguous<T>())
+                if (is_contiguous<T>::value)
                 {
                     return Hasher(obj.cdata(), N*sizeof(T), seed);
                 }
@@ -445,6 +445,20 @@ public:
         };
 };
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- FixedList is contiguous if the type is contiguous
+template<class T, unsigned N>
+struct is_contiguous<FixedList<T, N>> : is_contiguous<T> {};
+
+//- Check for FixedList of labels
+template<class T, unsigned N>
+struct is_contiguous_label<FixedList<T, N>> : is_contiguous_label<T> {};
+
+//- Check for FixedList of scalars
+template<class T, unsigned N>
+struct is_contiguous_scalar<FixedList<T, N>> : is_contiguous_scalar<T> {};
+
 
 // * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * * //
 
@@ -465,7 +479,7 @@ struct Hash<FixedList<T, N>>
         unsigned seed=0
     ) const
     {
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             return Hasher(obj.cdata(), N*sizeof(T), seed);
         }
diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C
index 75fd1e8e948..337736e54a4 100644
--- a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C
+++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C
@@ -29,7 +29,6 @@ License
 #include "Istream.H"
 #include "Ostream.H"
 #include "token.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
@@ -75,7 +74,7 @@ Foam::Ostream& Foam::FixedList<T, N>::writeList
     // small and we desire a consistent appearance.
     // Eg, FixedList<T,2> or Pair<T> as "(-1 -1)", not as "2{-1}"
 
-    if (os.format() == IOstream::ASCII || !contiguous<T>())
+    if (os.format() == IOstream::ASCII || !is_contiguous<T>::value)
     {
         if
         (
@@ -86,7 +85,7 @@ Foam::Ostream& Foam::FixedList<T, N>::writeList
              &&
                 (
                     Detail::ListPolicy::no_linebreak<T>::value
-                 || contiguous<T>()
+                 || is_contiguous<T>::value
                 )
             )
         )
@@ -146,7 +145,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, N>& list)
 {
     is.fatalCheck(FUNCTION_NAME);
 
-    if (is.format() == IOstream::ASCII || !contiguous<T>())
+    if (is.format() == IOstream::ASCII || !is_contiguous<T>::value)
     {
         token firstToken(is);
 
diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C
index 8e215e66662..2f746ce028e 100644
--- a/src/OpenFOAM/containers/Lists/List/List.C
+++ b/src/OpenFOAM/containers/Lists/List/List.C
@@ -56,7 +56,7 @@ void Foam::List<T>::doResize(const label newSize)
             if (overlap)
             {
                 #ifdef USEMEMCPY
-                if (contiguous<T>())
+                if (is_contiguous<T>::value)
                 {
                     memcpy(nv, this->v_, overlap*sizeof(T));
                 }
@@ -189,7 +189,7 @@ Foam::List<T>::List(const UList<T>& a)
         doAlloc();
 
         #ifdef USEMEMCPY
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             memcpy(this->v_, a.v_, this->byteSize());
         }
@@ -217,7 +217,7 @@ Foam::List<T>::List(const List<T>& a)
         doAlloc();
 
         #ifdef USEMEMCPY
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             memcpy(this->v_, a.v_, this->byteSize());
         }
@@ -252,7 +252,7 @@ Foam::List<T>::List(List<T>& a, bool reuse)
         doAlloc();
 
         #ifdef USEMEMCPY
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             memcpy(this->v_, a.v_, this->byteSize());
         }
@@ -456,7 +456,7 @@ void Foam::List<T>::operator=(const UList<T>& a)
     if (this->size_)
     {
         #ifdef USEMEMCPY
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             memcpy(this->v_, a.v_, this->byteSize());
         }
diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H
index c28fc1c36dc..019919ba57c 100644
--- a/src/OpenFOAM/containers/Lists/List/List.H
+++ b/src/OpenFOAM/containers/Lists/List/List.H
@@ -353,7 +353,7 @@ struct Hash<List<T>>
 {
     inline unsigned operator()(const UList<T>& obj, unsigned seed=0) const
     {
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             return Hasher(obj.cdata(), obj.size()*sizeof(T), seed);
         }
diff --git a/src/OpenFOAM/containers/Lists/List/ListIO.C b/src/OpenFOAM/containers/Lists/List/ListIO.C
index 123ac823274..696d90ad8ed 100644
--- a/src/OpenFOAM/containers/Lists/List/ListIO.C
+++ b/src/OpenFOAM/containers/Lists/List/ListIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -79,7 +79,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& list)
 
         // Read list contents depending on data format
 
-        if (is.format() == IOstream::ASCII || !contiguous<T>())
+        if (is.format() == IOstream::ASCII || !is_contiguous<T>::value)
         {
             // Read beginning of contents
             const char delimiter = is.readBeginList("List");
diff --git a/src/OpenFOAM/containers/Lists/UList/UList.C b/src/OpenFOAM/containers/Lists/UList/UList.C
index ece482a0398..5a4adac85c2 100644
--- a/src/OpenFOAM/containers/Lists/UList/UList.C
+++ b/src/OpenFOAM/containers/Lists/UList/UList.C
@@ -115,7 +115,7 @@ void Foam::UList<T>::deepCopy(const UList<T>& list)
     else if (len)
     {
         #ifdef USEMEMCPY
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             memcpy(this->v_, list.v_, this->byteSize());
         }
@@ -180,7 +180,7 @@ void Foam::UList<T>::operator=(const zero)
 template<class T>
 std::streamsize Foam::UList<T>::byteSize() const
 {
-    if (!contiguous<T>())
+    if (!is_contiguous<T>::value)
     {
         FatalErrorInFunction
             << "Cannot return binary size of a list with non-primitive elements"
diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H
index 7ea917510bf..8d90489f17d 100644
--- a/src/OpenFOAM/containers/Lists/UList/UList.H
+++ b/src/OpenFOAM/containers/Lists/UList/UList.H
@@ -247,7 +247,7 @@ public:
 
             //- Return the binary size in number of characters of the UList
             //- if the element is a primitive type
-            //  i.e. contiguous<T>() == true.
+            //  i.e. is_contiguous<T>::value == true.
             //  Note that is of type streamsize since used in stream ops
             std::streamsize byteSize() const;
 
@@ -524,7 +524,7 @@ public:
                 unsigned seed=0
             ) const
             {
-                if (contiguous<T>())
+                if (is_contiguous<T>::value)
                 {
                     return Hasher(obj.cdata(), obj.size()*sizeof(T), seed);
                 }
@@ -591,7 +591,7 @@ struct Hash<UList<T>>
 {
     inline unsigned operator()(const UList<T>& obj, unsigned seed=0) const
     {
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             return Hasher(obj.cdata(), obj.size()*sizeof(T), seed);
         }
diff --git a/src/OpenFOAM/containers/Lists/UList/UListIO.C b/src/OpenFOAM/containers/Lists/UList/UListIO.C
index cb12e88808e..1560032ff4d 100644
--- a/src/OpenFOAM/containers/Lists/UList/UListIO.C
+++ b/src/OpenFOAM/containers/Lists/UList/UListIO.C
@@ -81,9 +81,9 @@ Foam::Ostream& Foam::UList<T>::writeList
     const label len = list.size();
 
     // Write list contents depending on data format
-    if (os.format() == IOstream::ASCII || !contiguous<T>())
+    if (os.format() == IOstream::ASCII || !is_contiguous<T>::value)
     {
-        if (len > 1 && contiguous<T>() && list.uniform())
+        if (len > 1 && is_contiguous<T>::value && list.uniform())
         {
             // Two or more entries, and all entries have identical values.
             os  << len << token::BEGIN_BLOCK << list[0] << token::END_BLOCK;
@@ -97,7 +97,7 @@ Foam::Ostream& Foam::UList<T>::writeList
              &&
                 (
                     Detail::ListPolicy::no_linebreak<T>::value
-                 || contiguous<T>()
+                 || is_contiguous<T>::value
                 )
             )
         )
@@ -213,7 +213,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& list)
 
         // Read list contents depending on data format
 
-        if (is.format() == IOstream::ASCII || !contiguous<T>())
+        if (is.format() == IOstream::ASCII || !is_contiguous<T>::value)
         {
             // Read beginning of contents
             const char delimiter = is.readBeginList("List");
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C b/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C
index 7dbbb492e19..2018ad5b8b7 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C
@@ -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-2017 OpenFOAM Foundation
@@ -62,7 +62,7 @@ void Foam::Pstream::combineGather
         {
             label belowID = myComm.below()[belowI];
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 T value;
                 UIPstream::read
@@ -114,7 +114,7 @@ void Foam::Pstream::combineGather
                     << " data:" << Value << endl;
             }
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UOPstream::write
                 (
@@ -194,7 +194,7 @@ void Foam::Pstream::combineScatter
         // Receive from up
         if (myComm.above() != -1)
         {
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UIPstream::read
                 (
@@ -236,7 +236,7 @@ void Foam::Pstream::combineScatter
                 Pout<< " sending to " << belowID << " data:" << Value << endl;
             }
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UOPstream::write
                 (
@@ -304,7 +304,7 @@ void Foam::Pstream::listCombineGather
         {
             label belowID = myComm.below()[belowI];
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 List<T> receivedValues(Values.size());
 
@@ -363,7 +363,7 @@ void Foam::Pstream::listCombineGather
                     << " data:" << Values << endl;
             }
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UOPstream::write
                 (
@@ -443,7 +443,7 @@ void Foam::Pstream::listCombineScatter
         // Receive from up
         if (myComm.above() != -1)
         {
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UIPstream::read
                 (
@@ -485,7 +485,7 @@ void Foam::Pstream::listCombineScatter
                 Pout<< " sending to " << belowID << " data:" << Values << endl;
             }
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UOPstream::write
                 (
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C
index 85d5a1376e8..fc78a47669f 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -192,10 +192,11 @@ void Foam::Pstream::exchange
     const bool block
 )
 {
-    if (!contiguous<T>())
+    // OR  static_assert(is_contiguous<T>::value, "Contiguous data only!")
+    if (!is_contiguous<T>::value)
     {
         FatalErrorInFunction
-            << "Continuous data only." << sizeof(T) << Foam::abort(FatalError);
+            << "Contiguous data only." << sizeof(T) << Foam::abort(FatalError);
     }
 
     if (sendBufs.size() != UPstream::nProcs(comm))
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C
index b6f2cac98e6..fa9a40bcb3e 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C
@@ -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-2017 OpenFOAM Foundation
@@ -64,7 +64,7 @@ void Pstream::gather
         {
             T value;
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UIPstream::read
                 (
@@ -95,7 +95,7 @@ void Pstream::gather
         // Send up Value
         if (myComm.above() != -1)
         {
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UOPstream::write
                 (
@@ -161,7 +161,7 @@ void Pstream::scatter
         // Receive from up
         if (myComm.above() != -1)
         {
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UIPstream::read
                 (
@@ -192,7 +192,7 @@ void Pstream::scatter
         // (only when using a tree schedule!) first.
         forAllReverse(myComm.below(), belowI)
         {
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 UOPstream::write
                 (
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C
index 328b87aa7a2..63319d7b9e2 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -75,7 +75,7 @@ void Pstream::gatherList
             label belowID = myComm.below()[belowI];
             const labelList& belowLeaves = comms[belowID].allBelow();
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 List<T> receivedValues(belowLeaves.size() + 1);
 
@@ -145,7 +145,7 @@ void Pstream::gatherList
                     << " data:" << Values[UPstream::myProcNo(comm)] << endl;
             }
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 List<T> sendingValues(belowLeaves.size() + 1);
                 sendingValues[0] = Values[UPstream::myProcNo(comm)];
@@ -237,7 +237,7 @@ void Pstream::scatterList
         {
             const labelList& notBelowLeaves = myComm.allNotBelow();
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 List<T> receivedValues(notBelowLeaves.size());
 
@@ -288,7 +288,7 @@ void Pstream::scatterList
             label belowID = myComm.below()[belowI];
             const labelList& notBelowLeaves = comms[belowID].allNotBelow();
 
-            if (contiguous<T>())
+            if (is_contiguous<T>::value)
             {
                 List<T> sendingValues(notBelowLeaves.size());
 
diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C
index e203a6dacc9..19024266d3b 100644
--- a/src/OpenFOAM/fields/Fields/Field/Field.C
+++ b/src/OpenFOAM/fields/Fields/Field/Field.C
@@ -634,7 +634,7 @@ void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
     // The contents are 'uniform' if the list is non-empty
     // and all entries have identical values.
 
-    if (contiguous<Type>() && List<Type>::uniform())
+    if (is_contiguous<Type>::value && List<Type>::uniform())
     {
         os << "uniform " << this->first();
     }
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraint.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraint.H
index 74822115991..4414afdc336 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraint.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraint.H
@@ -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
@@ -46,6 +46,7 @@ SourceFiles
 #include "vector.H"
 #include "Tuple2.H"
 #include "transform.H"
+#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -95,6 +96,12 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for pointConstraint
+template<> struct is_contiguous<pointConstraint> : std::true_type {};
+
+
 //- Reduce operator
 class combineConstraintsEqOp
 {
@@ -102,14 +109,11 @@ public:
     inline void operator()(pointConstraint&, const pointConstraint&) const;
 };
 
-//- Transformation function
-inline pointConstraint transform(const tensor& tt, const pointConstraint& v);
 
-//- contiguous
-template<class T> bool contiguous();
-template<>
-inline bool contiguous<pointConstraint>() {return true;}
+// * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
+//- Transformation function
+inline pointConstraint transform(const tensor& tt, const pointConstraint& v);
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/Matrix/MatrixIO.C b/src/OpenFOAM/matrices/Matrix/MatrixIO.C
index 9b93656bb61..7f363acfe4a 100644
--- a/src/OpenFOAM/matrices/Matrix/MatrixIO.C
+++ b/src/OpenFOAM/matrices/Matrix/MatrixIO.C
@@ -68,7 +68,7 @@ bool Foam::Matrix<Form, Type>::readMatrix(Istream& is)
         const label len = size();
 
         // Read list contents depending on data format
-        if (is.format() == IOstream::ASCII || !contiguous<Type>())
+        if (is.format() == IOstream::ASCII || !is_contiguous<Type>::value)
         {
             // Read beginning of contents
             char listDelimiter = is.readBeginList("Matrix");
@@ -147,19 +147,19 @@ Foam::Ostream& Foam::Matrix<Form, Type>::writeMatrix
     os  << mat.m() << token::SPACE << mat.n();
 
     // Write list contents depending on data format
-    if (os.format() == IOstream::ASCII || !contiguous<Type>())
+    if (os.format() == IOstream::ASCII || !is_contiguous<Type>::value)
     {
         if (len)
         {
             const Type* v = mat.cdata();
 
             // Can the contents be considered 'uniform' (ie, identical)
-            if (len > 1 && contiguous<Type>() && mat.uniform())
+            if (len > 1 && is_contiguous<Type>::value && mat.uniform())
             {
                 // Two or more entries, and all entries have identical values.
                 os  << token::BEGIN_BLOCK << v[0] << token::END_BLOCK;
             }
-            else if (len < shortLen && contiguous<Type>())
+            else if (len < shortLen && is_contiguous<Type>::value)
             {
                 // Write start contents delimiter
                 os  << token::BEGIN_LIST;
diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.H b/src/OpenFOAM/meshes/boundBox/boundBox.H
index e263bfdd55a..87e140512da 100644
--- a/src/OpenFOAM/meshes/boundBox/boundBox.H
+++ b/src/OpenFOAM/meshes/boundBox/boundBox.H
@@ -345,11 +345,19 @@ public:
 };
 
 
-//- Data associated with boundBox type are contiguous
-template<>
-inline bool contiguous<boundBox>() {return contiguous<point>();}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
-// Global Operators
+//- Contiguous data for boundBox
+template<> struct is_contiguous<boundBox> : is_contiguous<point> {};
+
+//- Contiguous scalar data for boundBox
+template<> struct is_contiguous_scalar<boundBox>
+:
+    is_contiguous_scalar<point>
+{};
+
+
+// * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 inline bool operator==(const boundBox& a, const boundBox& b);
 inline bool operator!=(const boundBox& a, const boundBox& b);
diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edge.H b/src/OpenFOAM/meshes/meshShapes/edge/edge.H
index 6c81451c16a..696c2e815a8 100644
--- a/src/OpenFOAM/meshes/meshShapes/edge/edge.H
+++ b/src/OpenFOAM/meshes/meshShapes/edge/edge.H
@@ -306,12 +306,17 @@ public:
 };
 
 
-// * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for edge (a pair of labels)
+template<> struct is_contiguous<edge> : std::true_type {};
 
-// Edges are a pair of labels - thus contiguous
-template<> inline bool contiguous<edge>()  {return true;}
+//- Contiguous label data for edge (a pair of labels)
+template<> struct is_contiguous_label<edge> : std::true_type {};
 
 
+// * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * * //
+
 //- Return reverse of an edge
 inline edge reverse(const edge& e)
 {
@@ -339,6 +344,7 @@ inline bool operator==(const edge& a, const edge& b);
 inline bool operator!=(const edge& a, const edge& b);
 
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H
index 773d5ab2fe7..0954dedccba 100644
--- a/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H
+++ b/src/OpenFOAM/meshes/meshShapes/labelledTri/labelledTri.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -45,10 +45,8 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of friend functions and operators
-
+// Forward Declarations
 class labelledTri;
-
 Istream& operator>>(Istream&, labelledTri&);
 Ostream& operator<<(Ostream&, const labelledTri&);
 
@@ -126,8 +124,13 @@ public:
 };
 
 
-template<>
-inline bool contiguous<labelledTri>()  {return true;}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for labelledTri
+template<> struct is_contiguous<labelledTri> : std::true_type {};
+
+//- Contiguous label data for labelledTri
+template<> struct is_contiguous_label<labelledTri> : std::true_type {};
 
 
 //- Specialization to offset faces, used in ListListOps::combineOffset
diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H
index 8aa98ac732e..4757f51af79 100644
--- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H
+++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H
@@ -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-2017 OpenFOAM Foundation
@@ -52,10 +52,11 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 class cellShape;
 
 /*---------------------------------------------------------------------------*\
-                           class tetCell Declaration
+                           Class tetCell Declaration
 \*---------------------------------------------------------------------------*/
 
 class tetCell
@@ -120,11 +121,13 @@ public:
 };
 
 
-// * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
-//- Data associated with the type are contiguous
-template<>
-inline bool contiguous<tetCell>() {return true;}
+//- Contiguous data for tetCell
+template<> struct is_contiguous<tetCell> : std::true_type {};
+
+//- Contiguous label data for tetCell
+template<> struct is_contiguous_label<tetCell> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
index 87622154331..72660ea20be 100644
--- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
+++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
@@ -294,9 +294,14 @@ public:
 };
 
 
-// * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for triFace
+template<> struct is_contiguous<triFace> : std::true_type {};
+
+//- Contiguous label data for triFace
+template<> struct is_contiguous_label<triFace> : std::true_type {};
 
-template<> inline bool contiguous<triFace>()  {return true;}
 
 //- Hash specialization for triFace as a commutative hash value.
 template<>
diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C
index 752f32bfbfe..ca88085226d 100644
--- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C
@@ -58,7 +58,7 @@ void Foam::globalIndex::gather
             {
                 SubList<Type> procSlot(allFld, off[i+1]-off[i], off[i]);
 
-                if (contiguous<Type>())
+                if (is_contiguous<Type>::value)
                 {
                     IPstream::read
                     (
@@ -88,7 +88,7 @@ void Foam::globalIndex::gather
         {
             // nonBlocking
 
-            if (!contiguous<Type>())
+            if (!is_contiguous<Type>::value)
             {
                 FatalErrorInFunction
                     << "nonBlocking not supported for non-contiguous data"
@@ -125,7 +125,7 @@ void Foam::globalIndex::gather
          || commsType == Pstream::commsTypes::blocking
         )
         {
-            if (contiguous<Type>())
+            if (is_contiguous<Type>::value)
             {
                 OPstream::write
                 (
@@ -154,7 +154,7 @@ void Foam::globalIndex::gather
         {
             // nonBlocking
 
-            if (!contiguous<Type>())
+            if (!is_contiguous<Type>::value)
             {
                 FatalErrorInFunction
                     << "nonBlocking not supported for non-contiguous data"
@@ -311,7 +311,7 @@ void Foam::globalIndex::scatter
                     off[i]
                 );
 
-                if (contiguous<Type>())
+                if (is_contiguous<Type>::value)
                 {
                     OPstream::write
                     (
@@ -341,7 +341,7 @@ void Foam::globalIndex::scatter
         {
             // nonBlocking
 
-            if (!contiguous<Type>())
+            if (!is_contiguous<Type>::value)
             {
                 FatalErrorInFunction
                     << "nonBlocking not supported for non-contiguous data"
@@ -383,7 +383,7 @@ void Foam::globalIndex::scatter
          || commsType == Pstream::commsTypes::blocking
         )
         {
-            if (contiguous<Type>())
+            if (is_contiguous<Type>::value)
             {
                 IPstream::read
                 (
@@ -412,7 +412,7 @@ void Foam::globalIndex::scatter
         {
             // nonBlocking
 
-            if (!contiguous<Type>())
+            if (!is_contiguous<Type>::value)
             {
                 FatalErrorInFunction
                     << "nonBlocking not supported for non-contiguous data"
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
index de8475deba3..6df11aaafa6 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015-2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2016, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2015-2017 OpenFOAM Foundation
@@ -392,7 +392,7 @@ void Foam::mapDistributeBase::distribute
     {
         label nOutstanding = Pstream::nRequests();
 
-        if (!contiguous<T>())
+        if (!is_contiguous<T>::value)
         {
             PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag);
 
@@ -890,7 +890,7 @@ void Foam::mapDistributeBase::distribute
     {
         label nOutstanding = Pstream::nRequests();
 
-        if (!contiguous<T>())
+        if (!is_contiguous<T>::value)
         {
             PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag);
 
diff --git a/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointIndexHit.H b/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointIndexHit.H
index 0550453df7b..8957bfaebbf 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointIndexHit.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointIndexHit.H
@@ -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 OpenFOAM Foundation
@@ -43,10 +43,8 @@ namespace Foam
 
 typedef PointIndexHit<point> pointIndexHit;
 
-
-//- Data associated with pointIndexHit type are contiguous
-template<>
-inline bool contiguous<pointIndexHit>() {return contiguous<point>();}
+//- Contiguous data for pointIndexHit
+template<> struct is_contiguous<pointIndexHit> : is_contiguous<point> {};
 
 }
 
diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H
index b106d97fc55..421891d9fbe 100644
--- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H
+++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H
@@ -340,12 +340,19 @@ public:
 };
 
 
-//- Data associated with treeBoundBox type are contiguous
-template<>
-inline bool contiguous<treeBoundBox>() {return contiguous<boundBox>();}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
+//- Contiguous data for treeBoundBox
+template<> struct is_contiguous<treeBoundBox> : is_contiguous<boundBox> {};
 
-// Global Operators
+//- Contiguous scalar data for treeBoundBox
+template<> struct is_contiguous_scalar<treeBoundBox>
+:
+    is_contiguous_scalar<boundBox>
+{};
+
+
+// * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 inline bool operator==(const treeBoundBox& a, const treeBoundBox& b);
 inline bool operator!=(const treeBoundBox& a, const treeBoundBox& b);
diff --git a/src/OpenFOAM/primitives/Barycentric/Barycentric.H b/src/OpenFOAM/primitives/Barycentric/Barycentric.H
index ae4fe2fb420..11869d392f0 100644
--- a/src/OpenFOAM/primitives/Barycentric/Barycentric.H
+++ b/src/OpenFOAM/primitives/Barycentric/Barycentric.H
@@ -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) 2016-2017 OpenFOAM Foundation
@@ -38,6 +38,7 @@ SourceFiles
 #ifndef Barycentric_H
 #define Barycentric_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -104,6 +105,21 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<Barycentric<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<Barycentric<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<Barycentric<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Barycentric/BarycentricTensor.H b/src/OpenFOAM/primitives/Barycentric/BarycentricTensor.H
index e603dc5304a..204e2c3732c 100644
--- a/src/OpenFOAM/primitives/Barycentric/BarycentricTensor.H
+++ b/src/OpenFOAM/primitives/Barycentric/BarycentricTensor.H
@@ -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) 2017 OpenFOAM Foundation
@@ -117,6 +117,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<BarycentricTensor<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<BarycentricTensor<Cmpt>>
+:
+    is_contiguous_label<Cmpt>
+{};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<BarycentricTensor<Cmpt>>
+:
+    is_contiguous_scalar<Cmpt>
+{};
+
+
 template<class Cmpt>
 class typeOfTranspose<Cmpt, BarycentricTensor<Cmpt>>
 {
diff --git a/src/OpenFOAM/primitives/Barycentric/barycentric/barycentric.H b/src/OpenFOAM/primitives/Barycentric/barycentric/barycentric.H
index 1f0b0aa7bdf..4734ac0af17 100644
--- a/src/OpenFOAM/primitives/Barycentric/barycentric/barycentric.H
+++ b/src/OpenFOAM/primitives/Barycentric/barycentric/barycentric.H
@@ -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) 2016-2017 OpenFOAM Foundation
@@ -36,34 +36,22 @@ Description
 
 #include "scalar.H"
 #include "Barycentric.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class Random;
-class cachedRandom;
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 typedef Barycentric<scalar> barycentric;
 
-
 //- Generate a random barycentric coordinate within the unit tetrahedron
 barycentric barycentric01(Random& rndGen);
 
-
-template<>
-inline bool contiguous<barycentric>()
-{
-    return true;
-}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Barycentric/barycentricTensor/barycentricTensor.H b/src/OpenFOAM/primitives/Barycentric/barycentricTensor/barycentricTensor.H
index a4b7e8f5964..34d8ed75454 100644
--- a/src/OpenFOAM/primitives/Barycentric/barycentricTensor/barycentricTensor.H
+++ b/src/OpenFOAM/primitives/Barycentric/barycentricTensor/barycentricTensor.H
@@ -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) 2016-2017 OpenFOAM Foundation
@@ -36,7 +36,6 @@ Description
 
 #include "scalar.H"
 #include "BarycentricTensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -47,14 +46,6 @@ namespace Foam
 
 typedef BarycentricTensor<scalar> barycentricTensor;
 
-
-template<>
-inline bool contiguous<barycentricTensor>()
-{
-    return true;
-}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Barycentric2D/Barycentric2D.H b/src/OpenFOAM/primitives/Barycentric2D/Barycentric2D.H
index ed29386b972..0a50cf982d5 100644
--- a/src/OpenFOAM/primitives/Barycentric2D/Barycentric2D.H
+++ b/src/OpenFOAM/primitives/Barycentric2D/Barycentric2D.H
@@ -38,6 +38,7 @@ SourceFiles
 #ifndef Barycentric2D_H
 #define Barycentric2D_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -111,6 +112,21 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<Barycentric2D<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<Barycentric2D<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<Barycentric2D<Cmpt>> : is_contiguous_scalar<Cmpt>{};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Barycentric2D/barycentric2D/barycentric2D.H b/src/OpenFOAM/primitives/Barycentric2D/barycentric2D/barycentric2D.H
index 762bc76c779..6dfe6e1c805 100644
--- a/src/OpenFOAM/primitives/Barycentric2D/barycentric2D/barycentric2D.H
+++ b/src/OpenFOAM/primitives/Barycentric2D/barycentric2D/barycentric2D.H
@@ -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) 2017 OpenFOAM Foundation
@@ -36,34 +36,23 @@ Description
 
 #include "scalar.H"
 #include "Barycentric2D.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class Random;
-class cachedRandom;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 typedef Barycentric2D<scalar> barycentric2D;
 
-
 //- Generate a random barycentric coordinate within the unit triangle
 barycentric2D barycentric2D01(Random& rndGen);
 
-
-template<>
-inline bool contiguous<barycentric2D>()
-{
-    return true;
-}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H b/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H
index 797b7c68eb8..9d8c285c73d 100644
--- a/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H
+++ b/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H
@@ -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
@@ -107,13 +107,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<DiagTensor<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<DiagTensor<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<DiagTensor<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "DiagTensorI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H b/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H
index 2988c8ce03f..5b3362e3472 100644
--- a/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H
+++ b/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H
@@ -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 OpenFOAM Foundation
@@ -38,7 +38,6 @@ SourceFiles
 #define diagTensor_H
 
 #include "DiagTensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,12 +48,6 @@ namespace Foam
 
 typedef DiagTensor<scalar> diagTensor;
 
-
-//- Data associated with diagTensor type are contiguous
-template<>
-inline bool contiguous<diagTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Pair/Pair.H b/src/OpenFOAM/primitives/Pair/Pair.H
index db9589d6ace..fc8a1f01de1 100644
--- a/src/OpenFOAM/primitives/Pair/Pair.H
+++ b/src/OpenFOAM/primitives/Pair/Pair.H
@@ -173,6 +173,21 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Pair is contiguous if the type is contiguous
+template<class T>
+struct is_contiguous<Pair<T>> : is_contiguous<T> {};
+
+//- Check for Pair of labels
+template<class T>
+struct is_contiguous_label<Pair<T>> : is_contiguous_label<T> {};
+
+//- Check for Pair of scalars
+template<class T>
+struct is_contiguous_scalar<Pair<T>> : is_contiguous_scalar<T> {};
+
+
 // * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * * //
 
 //- Hashing for Pair data, which uses Hasher for contiguous data and
@@ -182,7 +197,7 @@ struct Hash<Pair<T>>
 {
     inline unsigned operator()(const Pair<T>& obj, unsigned seed=0) const
     {
-        if (contiguous<T>())
+        if (is_contiguous<T>::value)
         {
             return Hasher(obj.cdata(), sizeof(obj), seed);
         }
@@ -195,8 +210,6 @@ struct Hash<Pair<T>>
 };
 
 
-// * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * * //
-
 //- Return reverse of a Pair
 template<class T>
 Pair<T> reverse(const Pair<T>& p)
@@ -205,6 +218,8 @@ Pair<T> reverse(const Pair<T>& p)
 }
 
 
+// * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * * //
+
 template<class T>
 bool operator==(const Pair<T>& a, const Pair<T>& b)
 {
diff --git a/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H b/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H
index ff9f8ec9595..c08b288d093 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H
+++ b/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H
@@ -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
@@ -39,6 +39,7 @@ SourceFiles
 #ifndef SphericalTensor_H
 #define SphericalTensor_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -114,13 +115,33 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<SphericalTensor<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<SphericalTensor<Cmpt>>
+:
+    is_contiguous_label<Cmpt>
+{};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<SphericalTensor<Cmpt>>
+:
+    is_contiguous_scalar<Cmpt>
+{};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "SphericalTensorI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H b/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H
index bc1943f6081..b49a671e93b 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H
+++ b/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H
@@ -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 OpenFOAM Foundation
@@ -38,7 +38,6 @@ SourceFiles
 #define labelSphericalTensor_H
 
 #include "SphericalTensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -52,11 +51,6 @@ typedef SphericalTensor<label> labelSphericalTensor;
 //- Identity labelTensor
 static const labelSphericalTensor labelI(1);
 
-//- Data associated with labelSphericalTensor type are contiguous
-template<>
-inline bool contiguous<labelSphericalTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H b/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
index f2263af48a1..94b009f244e 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
+++ b/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
@@ -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
@@ -39,7 +39,6 @@ SourceFiles
 
 #include "SphericalTensor.H"
 #include "Identity.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -53,11 +52,6 @@ typedef SphericalTensor<scalar> sphericalTensor;
 static const sphericalTensor oneThirdI(1.0/3.0);
 static const sphericalTensor twoThirdsI(2.0/3.0);
 
-//- Specify data associated with sphericalTensor type are contiguous
-template<>
-inline bool contiguous<sphericalTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H b/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H
index 73186231088..0a0dd67321b 100644
--- a/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H
+++ b/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H
@@ -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
@@ -39,6 +39,7 @@ SourceFiles
 #ifndef SphericalTensor2D_H
 #define SphericalTensor2D_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -47,7 +48,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class SphericalTensor2D Declaration
+                      Class SphericalTensor2D Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Cmpt>
@@ -105,13 +106,33 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<SphericalTensor2D<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<SphericalTensor2D<Cmpt>>
+:
+    is_contiguous_label<Cmpt>
+{};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<SphericalTensor2D<Cmpt>>
+:
+    is_contiguous_scalar<Cmpt>
+{};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "SphericalTensor2DI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.H b/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.H
index 30ddd92931d..dbe441ccd30 100644
--- a/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.H
+++ b/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.H
@@ -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 OpenFOAM Foundation
@@ -39,7 +39,6 @@ SourceFiles
 
 #include "SphericalTensor2D.H"
 #include "tensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -56,12 +55,6 @@ static const sphericalTensor2D I2D(1);
 static const sphericalTensor2D oneThirdI2D(1.0/3.0);
 static const sphericalTensor2D twoThirdsI2D(2.0/3.0);
 
-
-//- Data associated with sphericalTensor2D type are contiguous
-template<>
-inline bool contiguous<sphericalTensor2D>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H
index 2fb50c93b96..8d5f5d43bf9 100644
--- a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H
+++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H
@@ -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
@@ -40,6 +40,7 @@ SourceFiles
 #ifndef SymmTensor_H
 #define SymmTensor_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 #include "SphericalTensor.H"
 
@@ -138,6 +139,21 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<SymmTensor<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<SymmTensor<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<SymmTensor<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 template<class Cmpt>
 class symmTypeOfRank<Cmpt, 2>
 {
@@ -153,7 +169,6 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "SymmTensorI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.H b/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.H
index 447e36e87ad..40dd09ce8a5 100644
--- a/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.H
+++ b/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.H
@@ -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 OpenFOAM Foundation
@@ -38,7 +38,6 @@ SourceFiles
 #define labelSymmTensor_H
 
 #include "SymmTensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,11 +48,6 @@ namespace Foam
 
 typedef SymmTensor<label> labelSymmTensor;
 
-//- Data associated with labelSymmTensor type are contiguous
-template<>
-inline bool contiguous<labelSymmTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.H b/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.H
index dcba66e5715..e49a4ea24d5 100644
--- a/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.H
+++ b/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.H
@@ -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-2012 OpenFOAM Foundation
@@ -38,7 +38,6 @@ SourceFiles
 #define symmTensor_H
 
 #include "SymmTensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,11 +48,6 @@ namespace Foam
 
 typedef SymmTensor<scalar> symmTensor;
 
-//- Data associated with symmTensor type are contiguous
-template<>
-inline bool contiguous<symmTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H
index c961f6203a5..f76790d29ae 100644
--- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H
+++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H
@@ -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
@@ -40,6 +40,7 @@ SourceFiles
 #ifndef SymmTensor2D_H
 #define SymmTensor2D_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 #include "SphericalTensor2D.H"
 
@@ -130,13 +131,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<SymmTensor2D<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<SymmTensor2D<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<SymmTensor2D<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "SymmTensor2DI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.H b/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.H
index c958137ff82..354b0da7596 100644
--- a/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.H
+++ b/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.H
@@ -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-2013 OpenFOAM Foundation
@@ -38,7 +38,6 @@ SourceFiles
 #define symmTensor2D_H
 
 #include "SymmTensor2D.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,11 +48,6 @@ namespace Foam
 
 typedef SymmTensor2D<scalar> symmTensor2D;
 
-//- Data associated with symmTensor2D type are contiguous
-template<>
-inline bool contiguous<symmTensor2D>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Tensor/Tensor.H b/src/OpenFOAM/primitives/Tensor/Tensor.H
index 21fc9176d05..322e6b31e28 100644
--- a/src/OpenFOAM/primitives/Tensor/Tensor.H
+++ b/src/OpenFOAM/primitives/Tensor/Tensor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -272,6 +272,21 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<Tensor<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<Tensor<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<Tensor<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 template<class Cmpt>
 class typeOfRank<Cmpt, 2>
 {
diff --git a/src/OpenFOAM/primitives/Tensor/doubleTensor/doubleTensor.H b/src/OpenFOAM/primitives/Tensor/doubleTensor/doubleTensor.H
index 5276c32974c..e58c4e189af 100644
--- a/src/OpenFOAM/primitives/Tensor/doubleTensor/doubleTensor.H
+++ b/src/OpenFOAM/primitives/Tensor/doubleTensor/doubleTensor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,7 @@ Typedef
     Foam::doubleTensor
 
 Description
-    A Tensor of values with double precision
+    A Tensor of double precision values
 
 SourceFiles
     doubleTensor.C
@@ -36,7 +36,6 @@ SourceFiles
 #define doubleTensor_H
 
 #include "Tensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -47,12 +46,6 @@ namespace Foam
 
 typedef Tensor<double> doubleTensor;
 
-//- Data associated with doubleTensor type are contiguous
-#if !defined(WM_DP)
-template<>
-inline bool contiguous<doubleTensor>() {return true;}
-#endif
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.H b/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.H
index 5240625536f..f92a52e7ece 100644
--- a/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.H
+++ b/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.H
@@ -27,7 +27,7 @@ Typedef
     Foam::floatTensor
 
 Description
-    A Tensor of values with float precision
+    A Tensor of float precision values
 
 SourceFiles
     floatTensor.C
@@ -38,7 +38,6 @@ SourceFiles
 #define floatTensor_H
 
 #include "Tensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,12 +48,6 @@ namespace Foam
 
 typedef Tensor<float> floatTensor;
 
-//- Data associated with floatTensor type are contiguous
-#if !defined(WM_SP) && !defined(WM_SPDP)
-template<>
-inline bool contiguous<floatTensor>() {return true;}
-#endif
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.H b/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.H
index d431e1c7594..fd24b361f1f 100644
--- a/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.H
+++ b/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.H
@@ -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 OpenFOAM Foundation
@@ -27,7 +27,7 @@ Typedef
     Foam::labelTensor
 
 Description
-    A Tensor of values using label (integer) representation.
+    A Tensor of label (integer) values
 
 SourceFiles
     labelTensor.C
@@ -38,7 +38,6 @@ SourceFiles
 #define labelTensor_H
 
 #include "Tensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,11 +48,6 @@ namespace Foam
 
 typedef Tensor<label> labelTensor;
 
-//- Specify data associated with labelTensor type are contiguous
-template<>
-inline bool contiguous<labelTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Tensor/tensor/tensor.H b/src/OpenFOAM/primitives/Tensor/tensor/tensor.H
index 7d2244caeef..3ca0a16255a 100644
--- a/src/OpenFOAM/primitives/Tensor/tensor/tensor.H
+++ b/src/OpenFOAM/primitives/Tensor/tensor/tensor.H
@@ -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-2014 OpenFOAM Foundation
@@ -41,7 +41,6 @@ SourceFiles
 #include "vector.H"
 #include "sphericalTensor.H"
 #include "symmTensor.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -74,10 +73,6 @@ vector eigenVector
 tensor eigenVectors(const symmTensor& T, const vector& lambdas);
 tensor eigenVectors(const symmTensor& T);
 
-//- Data associated with tensor type are contiguous
-template<>
-inline bool contiguous<tensor>() {return true;}
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H
index 332d74e9603..45d8f132fe5 100644
--- a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H
+++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -48,8 +48,8 @@ SourceFiles
 namespace Foam
 {
 
-template<class Cmpt>
-class SymmTensor2D;
+// Forward Declarations
+template<class Cmpt> class SymmTensor2D;
 
 /*---------------------------------------------------------------------------*\
                            Class Tensor2D Declaration
@@ -172,13 +172,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<Tensor2D<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<Tensor2D<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<Tensor2D<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "Tensor2DI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.H
index 56176ce9ec7..e844974d8e1 100644
--- a/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.H
+++ b/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.H
@@ -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-2017 OpenFOAM Foundation
@@ -27,7 +27,7 @@ Typedef
     Foam::tensor2D
 
 Description
-    Tensor2D or scalars.
+    Tensor2D of scalars.
 
 SourceFiles
     tensor2D.C
@@ -39,7 +39,6 @@ SourceFiles
 
 #include "Tensor2D.H"
 #include "vector2D.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -60,10 +59,6 @@ vector2D eigenVector
 tensor2D eigenVectors(const tensor2D& t, const vector2D& lambdas);
 tensor2D eigenVectors(const tensor2D& t);
 
-//- Data associated with tensor2D type are contiguous
-template<>
-inline bool contiguous<tensor2D>() {return true;}
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/Vector/Vector.H b/src/OpenFOAM/primitives/Vector/Vector.H
index bccc1bd25f8..ea9fb027f3e 100644
--- a/src/OpenFOAM/primitives/Vector/Vector.H
+++ b/src/OpenFOAM/primitives/Vector/Vector.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -43,6 +43,7 @@ SourceFiles
 #ifndef Vector_H
 #define Vector_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -132,6 +133,21 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<Vector<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<Vector<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<Vector<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 template<class Cmpt>
 class typeOfRank<Cmpt, 1>
 {
diff --git a/src/OpenFOAM/primitives/Vector/doubleVector/doubleVector.H b/src/OpenFOAM/primitives/Vector/doubleVector/doubleVector.H
index e50e1f60923..7397938e276 100644
--- a/src/OpenFOAM/primitives/Vector/doubleVector/doubleVector.H
+++ b/src/OpenFOAM/primitives/Vector/doubleVector/doubleVector.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,6 @@ SourceFiles
 #define doubleVector_H
 
 #include "Vector.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -47,12 +46,6 @@ namespace Foam
 
 typedef Vector<double> doubleVector;
 
-//- Data associated with doubleVector type are contiguous
-#if !defined(WM_DP)
-template<>
-inline bool contiguous<doubleVector>() {return true;}
-#endif
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Vector/floatVector/floatVector.H b/src/OpenFOAM/primitives/Vector/floatVector/floatVector.H
index 5c702f6d65d..f01c9753133 100644
--- a/src/OpenFOAM/primitives/Vector/floatVector/floatVector.H
+++ b/src/OpenFOAM/primitives/Vector/floatVector/floatVector.H
@@ -2,10 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2019 OpenCFD Ltd.
      \\/     M anipulation  |
--------------------------------------------------------------------------------
-                            | Copyright (C) 2011 OpenFOAM Foundation
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -38,7 +36,6 @@ SourceFiles
 #define floatVector_H
 
 #include "Vector.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,12 +46,6 @@ namespace Foam
 
 typedef Vector<float> floatVector;
 
-//- Data associated with floatVector type are contiguous
-#if !defined(WM_SP) && !defined(WM_SPDP)
-template<>
-inline bool contiguous<floatVector>() {return true;}
-#endif
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Vector/labelVector/labelVector.H b/src/OpenFOAM/primitives/Vector/labelVector/labelVector.H
index 4e1e9525409..095670df041 100644
--- a/src/OpenFOAM/primitives/Vector/labelVector/labelVector.H
+++ b/src/OpenFOAM/primitives/Vector/labelVector/labelVector.H
@@ -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 OpenFOAM Foundation
@@ -39,7 +39,6 @@ SourceFiles
 
 #include "label.H"
 #include "Vector.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -50,12 +49,6 @@ namespace Foam
 
 typedef Vector<label> labelVector;
 
-
-//- Data associated with labelVector type are contiguous
-template<>
-inline bool contiguous<labelVector>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Vector/vector/vector.H b/src/OpenFOAM/primitives/Vector/vector/vector.H
index 622560fa641..7889fd50d2f 100644
--- a/src/OpenFOAM/primitives/Vector/vector/vector.H
+++ b/src/OpenFOAM/primitives/Vector/vector/vector.H
@@ -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 OpenFOAM Foundation
@@ -39,7 +39,6 @@ SourceFiles
 
 #include "scalar.H"
 #include "Vector.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -50,11 +49,7 @@ namespace Foam
 
 typedef Vector<scalar> vector;
 
-
-//- Data associated with vector type are contiguous
-template<>
-inline bool contiguous<vector>() {return true;}
-
+// Traits
 
 template<class Type>
 class flux
diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2D.H b/src/OpenFOAM/primitives/Vector2D/Vector2D.H
index ed69c95ed7d..44ccff9071f 100644
--- a/src/OpenFOAM/primitives/Vector2D/Vector2D.H
+++ b/src/OpenFOAM/primitives/Vector2D/Vector2D.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -39,6 +39,7 @@ SourceFiles
 #ifndef Vector2D_H
 #define Vector2D_H
 
+#include "contiguous.H"
 #include "VectorSpace.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -115,13 +116,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<Vector2D<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<Vector2D<Cmpt>> : is_contiguous_label<Cmpt> {};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<Vector2D<Cmpt>> : is_contiguous_scalar<Cmpt> {};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "Vector2DI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/Vector2D/labelVector2D/labelVector2D.H b/src/OpenFOAM/primitives/Vector2D/labelVector2D/labelVector2D.H
index 5c558f9adeb..c8d094642f1 100644
--- a/src/OpenFOAM/primitives/Vector2D/labelVector2D/labelVector2D.H
+++ b/src/OpenFOAM/primitives/Vector2D/labelVector2D/labelVector2D.H
@@ -37,7 +37,6 @@ SourceFiles
 
 #include "label.H"
 #include "Vector2D.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -48,12 +47,6 @@ namespace Foam
 
 typedef Vector2D<label> labelVector2D;
 
-
-//- Data associated with labelVector2D type are contiguous
-template<>
-inline bool contiguous<labelVector2D>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.H b/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.H
index cd7d2fa33cc..c64db4a3ea2 100644
--- a/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.H
+++ b/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.H
@@ -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 OpenFOAM Foundation
@@ -39,7 +39,6 @@ SourceFiles
 
 #include "scalar.H"
 #include "Vector2D.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -50,12 +49,6 @@ namespace Foam
 
 typedef Vector2D<scalar> vector2D;
 
-
-//- Data associated with vector2D type are contiguous
-template<>
-inline bool contiguous<vector2D>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/complex/complex.H b/src/OpenFOAM/primitives/complex/complex.H
index 4702d9f7dab..88bdd871081 100644
--- a/src/OpenFOAM/primitives/complex/complex.H
+++ b/src/OpenFOAM/primitives/complex/complex.H
@@ -38,12 +38,12 @@ SourceFiles
 #ifndef complex_H
 #define complex_H
 
-#include <complex>
-#include <type_traits>
 #include "scalar.H"
 #include "word.H"
 #include "zero.H"
 #include "contiguous.H"
+#include <complex>
+#include <type_traits>
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -344,6 +344,15 @@ namespace Detail
 } // End namespace Detail
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for complex
+template<> struct is_contiguous<complex> : std::true_type {};
+
+//- Contiguous scalar data for complex
+template<> struct is_contiguous_scalar<complex> : std::true_type {};
+
+
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 Istream& operator>>(Istream& is, complex& c);
@@ -358,10 +367,6 @@ inline complex operator~(const complex& c);
 //- Return string representation of complex
 word name(const complex& c);
 
-//- Data associated with complex type are contiguous
-template<>
-inline bool contiguous<complex>() {return true;}
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/contiguous/contiguous.H b/src/OpenFOAM/primitives/contiguous/contiguous.H
index b8c1c55da0b..04e189c221a 100644
--- a/src/OpenFOAM/primitives/contiguous/contiguous.H
+++ b/src/OpenFOAM/primitives/contiguous/contiguous.H
@@ -23,21 +23,46 @@ License
     You should have received a copy of the GNU General Public License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
-InClass
-    Foam::contiguous
+Class
+    Foam::is_contiguous
 
 Description
-    Template function to specify if the data of a type are contiguous.
+    A template class to specify that a data type can be considered as being
+    contiguous in memory.
 
-    The default function specifies that data are not contiguous.
-    This is specialised for the types (eg, primitives) with contiguous data.
+    Normally only integral and floating-point types can be considered
+    contiguous, but some other types (eg, FixedList, Pair, Vector etc)
+    consisting purely of these fundamental types can be considered
+    as having a contiguous memory layout as well.
+
+Note
+    In OpenFOAM 1906 and earlier, the contiguous trait was handled
+    by templated \c contiguous global functions.
+
+    While possible to mark this as deleted, this does not detect or
+    prevent specializations. Thus omit the usual housekeeping.
+
+Class
+    Foam::is_contiguous_label
+
+Description
+    A template class to specify if a data type is composed solely of
+    Foam::label elements.
+
+Class
+    Foam::is_contiguous_scalar
+
+Description
+    A template class to specify if a data type is composed solely of
+    Foam::scalar elements.
 
 \*---------------------------------------------------------------------------*/
 
 #ifndef contiguous_H
 #define contiguous_H
 
-#include "int.H"
+#include "scalar.H"
+#include "label.H"
 #include <type_traits>
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -45,87 +70,30 @@ Description
 namespace Foam
 {
 
-// Forward Declarations
-template<class T, unsigned N> class FixedList;
-template<class T> class Pair;
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-//- Default definition: (integral | floating-point) are contiguous
+// Base definition for (integral | floating-point) as contiguous
 template<class T>
-inline bool contiguous()
-{
-    return std::is_arithmetic<T>::value;
-}
-
-//
-// Fixed size containers of (integral | floating-point) are contiguous
-//
-
-template<>
-inline bool contiguous<FixedList<bool, 2>>()               {return true;}
-template<>
-inline bool contiguous<Pair<bool>>()                       {return true;}
-
-template<>
-inline bool contiguous<FixedList<char, 2>>()               {return true;}
-template<>
-inline bool contiguous<Pair<char>>()                       {return true;}
-
-template<>
-inline bool contiguous<FixedList<int8_t, 2>>()             {return true;}
-template<>
-inline bool contiguous<Pair<int8_t>>()                     {return true;}
-
-template<>
-inline bool contiguous<FixedList<uint8_t, 2>>()            {return true;}
-template<>
-inline bool contiguous<Pair<uint8_t>>()                    {return true;}
-
-template<>
-inline bool contiguous<FixedList<int16_t, 2>>()            {return true;}
-template<>
-inline bool contiguous<Pair<int16_t>>()                    {return true;}
-
-template<>
-inline bool contiguous<FixedList<uint16_t, 2>>()           {return true;}
-template<>
-inline bool contiguous<Pair<uint16_t>>()                   {return true;}
-
-template<>
-inline bool contiguous<FixedList<int32_t, 2>>()            {return true;}
-template<>
-inline bool contiguous<Pair<int32_t>>()                    {return true;}
-
-template<>
-inline bool contiguous<FixedList<uint32_t, 2>>()           {return true;}
-template<>
-inline bool contiguous<Pair<uint32_t>>()                   {return true;}
-
-template<>
-inline bool contiguous<FixedList<int64_t, 2>>()            {return true;}
-template<>
-inline bool contiguous<Pair<int64_t>>()                    {return true;}
-
-template<>
-inline bool contiguous<FixedList<uint64_t, 2>>()           {return true;}
-template<>
-inline bool contiguous<Pair<uint64_t>>()                   {return true;}
-
-template<>
-inline bool contiguous<FixedList<float, 2>>()              {return true;}
-template<>
-inline bool contiguous<Pair<float>>()                      {return true;}
-
-template<>
-inline bool contiguous<FixedList<double, 2>>()             {return true;}
-template<>
-inline bool contiguous<Pair<double>>()                     {return true;}
-
-template<>
-inline bool contiguous<FixedList<long double, 2>>()        {return true;}
-template<>
-inline bool contiguous<Pair<long double>>()                {return true;}
+struct is_contiguous
+:
+    std::is_arithmetic<T>
+{};
+
+
+// Base definition for 'label'
+template<class T>
+struct is_contiguous_label
+:
+    std::is_same<T, label>
+{};
+
+
+// Base definition for 'scalar'
+template<class T>
+struct is_contiguous_scalar
+:
+    std::is_same<T, scalar>
+{};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H
index 605ee406198..75d045a9aad 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H
@@ -50,7 +50,7 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of friend functions and operators
+// Forward Declarations
 
 class vectorTensorTransform;
 Istream& operator>>(Istream& is, vectorTensorTransform&);
@@ -172,25 +172,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for vectorTensorTransform
+template<> struct is_contiguous<vectorTensorTransform> : std::true_type {};
+
+
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
 //- Return the inverse of the given vectorTensorTransform
 inline vectorTensorTransform inv(const vectorTensorTransform& tr);
 
-
 //- Return a string representation of a vectorTensorTransform
 word name(const vectorTensorTransform&);
 
-
-//- Data associated with vectorTensorTransform type are contiguous
-template<>
-inline bool contiguous<vectorTensorTransform>() {return true;}
-
 //- Template specialisations
 template<>
 tmp<Field<bool>> vectorTensorTransform::transform(const Field<bool>&) const;
+
 template<>
 tmp<Field<label>> vectorTensorTransform::transform(const Field<label>&) const;
+
 template<>
 tmp<Field<scalar>> vectorTensorTransform::transform(const Field<scalar>&)
 const;
diff --git a/src/OpenFOAM/primitives/quaternion/quaternion.H b/src/OpenFOAM/primitives/quaternion/quaternion.H
index b7b69bbc836..ca624e305de 100644
--- a/src/OpenFOAM/primitives/quaternion/quaternion.H
+++ b/src/OpenFOAM/primitives/quaternion/quaternion.H
@@ -42,7 +42,6 @@ SourceFiles
 #include "vector.H"
 #include "tensor.H"
 #include "word.H"
-#include "contiguous.H"
 #include "Enum.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -239,6 +238,15 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for quaternion
+template<> struct is_contiguous<quaternion> : std::true_type {};
+
+//- Contiguous scalar data for quaternion
+template<> struct is_contiguous_scalar<quaternion> : std::true_type {};
+
+
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
 inline scalar magSqr(const quaternion& q);
@@ -280,10 +288,6 @@ quaternion pow(const quaternion& q, const label power);
 //- Power of a quaternion
 quaternion pow(const quaternion& q, const scalar power);
 
-//- Data associated with quaternion type are contiguous
-template<>
-inline bool contiguous<quaternion>() {return true;}
-
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/septernion/septernion.H b/src/OpenFOAM/primitives/septernion/septernion.H
index da333c142df..d44fb1ed5ab 100644
--- a/src/OpenFOAM/primitives/septernion/septernion.H
+++ b/src/OpenFOAM/primitives/septernion/septernion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2004-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -47,15 +47,13 @@ SourceFiles
 #include "quaternion.H"
 #include "spatialTransform.H"
 #include "word.H"
-#include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
 
-// Forward declaration of friend functions and operators
-
+// Forward Declarations
 class septernion;
 Istream& operator>>(Istream& is, septernion&);
 Ostream& operator<<(Ostream& os, const septernion& C);
@@ -67,7 +65,7 @@ Ostream& operator<<(Ostream& os, const septernion& C);
 
 class septernion
 {
-    // private data
+    // Private Data
 
         //- Translation vector
         vector t_;
@@ -154,6 +152,15 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for septernion
+template<> struct is_contiguous<septernion> : std::true_type {};
+
+//- Contiguous scalar data for septernion
+template<> struct is_contiguous_scalar<septernion> : std::true_type {};
+
+
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
 //- Return the inverse of the given septernion
@@ -177,10 +184,6 @@ septernion average
     const UList<scalar> w
 );
 
-//- Data associated with septernion type are contiguous
-template<>
-inline bool contiguous<septernion>() {return true;}
-
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensor.H
index 75c5e00a002..3de1dfb9ab5 100644
--- a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensor.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensor.H
@@ -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) 2016-2017 OpenFOAM Foundation
@@ -98,6 +98,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<CompactSpatialTensor<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<CompactSpatialTensor<Cmpt>>
+:
+    is_contiguous_label<Cmpt>
+{};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<CompactSpatialTensor<Cmpt>>
+:
+    is_contiguous_scalar<Cmpt>
+{};
+
+
 template<class Cmpt>
 class typeOfInnerProduct<Cmpt, CompactSpatialTensor<Cmpt>, Tensor<Cmpt>>
 {
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.H
index 0d28d0cdf8a..0bccd16f5ac 100644
--- a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.H
@@ -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) 2016 OpenFOAM Foundation
@@ -48,11 +48,6 @@ namespace Foam
 
 typedef CompactSpatialTensor<scalar> compactSpatialTensor;
 
-//- Data associated with compactSpatialTensor type are contiguous
-template<>
-inline bool contiguous<compactSpatialTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorT.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorT.H
index 1a8354aa758..209fa96f243 100644
--- a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorT.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorT.H
@@ -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) 2016 OpenFOAM Foundation
@@ -97,6 +97,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<CompactSpatialTensorT<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<CompactSpatialTensorT<Cmpt>>
+:
+    is_contiguous_label<Cmpt>
+{};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<CompactSpatialTensorT<Cmpt>>
+:
+    is_contiguous_scalar<Cmpt>
+{};
+
+
 template<class Cmpt>
 class typeOfTranspose<Cmpt, CompactSpatialTensor<Cmpt>>
 {
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensor.H
index 923a05bd611..8b7b1b860f4 100644
--- a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensor.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensor.H
@@ -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) 2016 OpenFOAM Foundation
@@ -128,6 +128,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<SpatialTensor<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<SpatialTensor<Cmpt>>
+:
+    is_contiguous_label<Cmpt>
+{};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<SpatialTensor<Cmpt>>
+:
+    is_contiguous_scalar<Cmpt>
+{};
+
+
 template<class Cmpt>
 class typeOfTranspose<Cmpt, SpatialTensor<Cmpt>>
 {
@@ -170,7 +191,6 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Include inline implementations
 #include "SpatialTensorI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.H
index 9b96f76a510..279ed70329a 100644
--- a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.H
@@ -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) 2016 OpenFOAM Foundation
@@ -48,11 +48,6 @@ namespace Foam
 
 typedef SpatialTensor<scalar> spatialTensor;
 
-//- Data associated with spatialTensor type are contiguous
-template<>
-inline bool contiguous<spatialTensor>() {return true;}
-
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVector.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVector.H
index feaaf564916..b4fa977c8b1 100644
--- a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVector.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVector.H
@@ -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) 2016 OpenFOAM Foundation
@@ -158,6 +158,27 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Data are contiguous if component type is contiguous
+template<class Cmpt>
+struct is_contiguous<SpatialVector<Cmpt>> : is_contiguous<Cmpt> {};
+
+//- Data are contiguous label if component type is label
+template<class Cmpt>
+struct is_contiguous_label<SpatialVector<Cmpt>>
+:
+    is_contiguous_label<Cmpt>
+{};
+
+//- Data are contiguous scalar if component type is scalar
+template<class Cmpt>
+struct is_contiguous_scalar<SpatialVector<Cmpt>>
+:
+    is_contiguous_scalar<Cmpt>
+{};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.H
index c28807b2e02..ca59d3cf96f 100644
--- a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.H
@@ -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) 2016 OpenFOAM Foundation
@@ -48,10 +48,6 @@ namespace Foam
 
 typedef SpatialVector<scalar> spatialVector;
 
-//- Data associated with spatialVector type are contiguous
-template<>
-inline bool contiguous<spatialVector>() {return true;}
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/triad/triad.H b/src/OpenFOAM/primitives/triad/triad.H
index 21e062d858d..4f7bb6e9cfc 100644
--- a/src/OpenFOAM/primitives/triad/triad.H
+++ b/src/OpenFOAM/primitives/triad/triad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2016 OpenFOAM Foundation
@@ -53,13 +53,12 @@ namespace Foam
 
 // Forward declarations
 class triad;
+class quaternion;
 class Istream;
 class Ostream;
 Istream& operator>>(Istream&, triad&);
 Ostream& operator<<(Ostream&, const triad&);
 
-class quaternion;
-
 /*---------------------------------------------------------------------------*\
                            Class triad Declaration
 \*---------------------------------------------------------------------------*/
@@ -165,15 +164,20 @@ public:
 };
 
 
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for triad
+template<> struct is_contiguous<triad> : std::true_type {};
+
+//- Contiguous 'scalar' data for triad
+template<> struct is_contiguous_scalar<triad> : std::true_type {};
+
+
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
 //- Return a quantity of the difference between two triads
 scalar diff(const triad& A, const triad& B);
 
-//- Data associated with quaternion type are contiguous
-template<>
-inline bool contiguous<triad>() {return true;}
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H
index 81956b51545..8f2ef00f1fe 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2004-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -271,8 +271,7 @@ public:
 
 
     //- Destructor
-    virtual ~smoothDelta()
-    {}
+    virtual ~smoothDelta() = default;
 
 
     // Member Functions
@@ -289,14 +288,13 @@ public:
 
 } // End namespace LESModels
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-//- Data associated with deltaData type are contiguous
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for deltaData
 template<>
-inline bool contiguous<LESModels::smoothDelta::deltaData>()
-{
-    return true;
-}
+struct is_contiguous<LESModels::smoothDelta::deltaData> : std::true_type {};
+
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H
index 1892a3a5f2a..1ce342adc24 100644
--- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H
+++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H
@@ -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
@@ -64,16 +64,14 @@ SourceFiles
 
 namespace Foam
 {
+
+// Forward Declarations
 class polyPatch;
 class polyMesh;
 class primitiveMesh;
 class edge;
 class face;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class directionInfo;
 
 Istream& operator>>(Istream&, directionInfo&);
@@ -86,7 +84,7 @@ Ostream& operator<<(Ostream&, const directionInfo&);
 
 class directionInfo
 {
-    // Private data
+    // Private Data
 
         // Either mesh edge or face point
         label index_;
@@ -262,12 +260,10 @@ public:
 };
 
 
-//- Data associated with directionInfo type are contiguous
-template<>
-inline bool contiguous<directionInfo>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for directionInfo
+template<> struct is_contiguous<directionInfo> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H
index 67bf68504f1..98359fd8f09 100644
--- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H
+++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H
@@ -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
@@ -49,13 +49,9 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class wallNormalInfo;
 
 Istream& operator>>(Istream&, wallNormalInfo&);
@@ -202,12 +198,10 @@ public:
 };
 
 
-//- Data associated with wallNormalInfo type are contiguous
-template<>
-inline bool contiguous<wallNormalInfo>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for wallNormalInfo
+template<> struct is_contiguous<wallNormalInfo> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H
index 8fc9b6a06b6..6d03f1ecead 100644
--- a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H
+++ b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H
@@ -46,7 +46,7 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declarations
+// Forward Declarations
 class polyPatch;
 class polyMesh;
 class pointEdgeStructuredWalk;
@@ -236,12 +236,10 @@ public:
 };
 
 
-//- Data associated with pointEdgeStructuredWalk type are contiguous
-template<>
-inline bool contiguous<pointEdgeStructuredWalk>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for pointEdgeStructuredWalk
+template<> struct is_contiguous<pointEdgeStructuredWalk> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H
index fe4f35cb922..7eaac6d88d4 100644
--- a/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H
+++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H
@@ -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) 2013-2016 OpenFOAM Foundation
@@ -47,13 +47,9 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class externalPointEdgePoint;
 
 Istream& operator>>(Istream&, externalPointEdgePoint&);
@@ -251,12 +247,10 @@ public:
 };
 
 
-//- Data associated with externalPointEdgePoint type are contiguous
-template<>
-inline bool contiguous<externalPointEdgePoint>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for externalPointEdgePoint
+template<> struct is_contiguous<externalPointEdgePoint> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapse.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapse.H
index e00bc3b9d92..0038fa8f691 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapse.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapse.H
@@ -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) 2012-2016 OpenFOAM Foundation
@@ -46,13 +46,9 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class pointEdgeCollapse;
 
 Istream& operator>>(Istream&, pointEdgeCollapse&);
@@ -221,12 +217,10 @@ public:
 };
 
 
-//- Data associated with pointEdgeCollapse type are contiguous
-template<>
-inline bool contiguous<pointEdgeCollapse>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for pointEdgeCollapse
+template<> struct is_contiguous<pointEdgeCollapse> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H
index f82a41c517e..fc2a2b39c7e 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H
@@ -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
@@ -47,12 +47,9 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class refinementData;
 
 Istream& operator>>(Istream&, refinementData&);
@@ -219,12 +216,13 @@ public:
 };
 
 
-//- Data associated with refinementData type are contiguous
-template<>
-inline bool contiguous<refinementData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for refinementData
+template<> struct is_contiguous<refinementData> : std::true_type {};
+
+//- Contiguous label data for refinementData
+template<> struct is_contiguous_label<refinementData> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H
index e49ef5a0def..66318f4dfbe 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H
@@ -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
@@ -47,12 +47,9 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class refinementDistanceData;
 
 Istream& operator>>(Istream&, refinementDistanceData&);
@@ -65,7 +62,6 @@ Ostream& operator<<(Ostream&, const refinementDistanceData&);
 
 class refinementDistanceData
 {
-
     // Private data
 
         //- Unrefined (level0) buffer size (nBufferLayers*level0Size)
@@ -253,12 +249,10 @@ public:
 };
 
 
-//- Data associated with refinementDistanceData type are contiguous
-template<>
-inline bool contiguous<refinementDistanceData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for refinementDistanceData
+template<> struct is_contiguous<refinementDistanceData> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H
index 2f4919b338c..4de6094140f 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H
@@ -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
@@ -221,13 +221,10 @@ public:
 };
 
 
-//- Data associated with smoothData type are contiguous
-template<>
-inline bool contiguous<smoothData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
+//- Contiguous data for smoothData
+template<> struct is_contiguous<smoothData> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H
index 7533d31c6a3..3b64353117f 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2010-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -212,13 +212,10 @@ public:
 };
 
 
-//- Data associated with sweepData type are contiguous
-template<>
-inline bool contiguous<sweepData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
+//- Contiguous data for sweepData
+template<> struct is_contiguous<sweepData> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H
index 18cb23e3712..d01addb110a 100644
--- a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H
+++ b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H
@@ -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
@@ -53,7 +53,6 @@ SourceFiles
 namespace Foam
 {
 
-
 /*---------------------------------------------------------------------------*\
                            Class wallPointYPlus Declaration
 \*---------------------------------------------------------------------------*/
@@ -81,7 +80,7 @@ public:
 
     // Static data members
 
-        //- cut-off value for y+
+        //- The cut-off value for y+
         static scalar yPlusCutOff;
 
 
@@ -144,12 +143,11 @@ public:
 };
 
 
-//- Data associated with pointEdgePoint type as contiguous as underlying type
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for wallPointYPlus
 template<>
-inline bool contiguous<wallPointYPlus>()
-{
-    return contiguous<wallPointData<scalar>>();
-}
+struct is_contiguous<wallPointYPlus> : is_contiguous<wallPointData<scalar>> {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/functionObjects/field/nearWallFields/findCellParticle.H b/src/functionObjects/field/nearWallFields/findCellParticle.H
index 8e1505753d6..85bd34bcb16 100644
--- a/src/functionObjects/field/nearWallFields/findCellParticle.H
+++ b/src/functionObjects/field/nearWallFields/findCellParticle.H
@@ -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) 2013-2017 OpenFOAM Foundation
@@ -45,11 +45,8 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 class findCellParticleCloud;
-
-
-// Forward declaration of friend functions and operators
-
 class findCellParticle;
 
 Ostream& operator<<(Ostream&, const findCellParticle&);
@@ -273,11 +270,10 @@ public:
 };
 
 
-template<>
-inline bool contiguous<findCellParticle>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for findCellParticle
+template<> struct is_contiguous<findCellParticle> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/coalCombustion/coalParcel/coalParcel.H b/src/lagrangian/coalCombustion/coalParcel/coalParcel.H
index fef1d73a285..e960050d449 100644
--- a/src/lagrangian/coalCombustion/coalParcel/coalParcel.H
+++ b/src/lagrangian/coalCombustion/coalParcel/coalParcel.H
@@ -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-2015 OpenFOAM Foundation
@@ -62,11 +62,8 @@ namespace Foam
         >
     > coalParcel;
 
-    template<>
-    inline bool contiguous<coalParcel>()
-    {
-        return false;
-    }
+    //- Non-contiguous data for coalParcel
+    template<> struct is_contiguous<coalParcel> : std::false_type {};
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/basicHeterogeneousReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/basicHeterogeneousReactingParcel.H
index 63b9156fdb1..9600bbdbaed 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/basicHeterogeneousReactingParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/basicHeterogeneousReactingParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,11 +60,9 @@ namespace Foam
         >
     > basicHeterogeneousReactingParcel;
 
+    //- Non-contiguous data for basicHeterogeneousReactingParcel
     template<>
-    inline bool contiguous<basicHeterogeneousReactingParcel>()
-    {
-        return false;
-    }
+    struct is_contiguous<basicHeterogeneousReactingParcel> : std::false_type {};
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H b/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H
index ae1950ab5d9..65436b7d8f4 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H
@@ -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) 2013-2016 OpenFOAM Foundation
@@ -48,11 +48,9 @@ namespace Foam
 {
     typedef MPPICParcel<KinematicParcel<particle>> basicKinematicMPPICParcel;
 
+    //- Contiguous data for basicKinematicMPPICParcel
     template<>
-    inline bool contiguous<basicKinematicMPPICParcel>()
-    {
-        return true;
-    }
+    struct is_contiguous<basicKinematicMPPICParcel> : std::true_type {};
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H
index 23fc0fd8830..9bcd834d0c5 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H
@@ -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 OpenFOAM Foundation
@@ -47,11 +47,8 @@ namespace Foam
 {
     typedef KinematicParcel<particle> basicKinematicParcel;
 
-    template<>
-    inline bool contiguous<basicKinematicParcel>()
-    {
-        return true;
-    }
+    //- Contiguous data for basicKinematicParcel
+    template<> struct is_contiguous<basicKinematicParcel> : std::true_type {};
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H
index a86baaaf1aa..3a20d7709f5 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H
@@ -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 OpenFOAM Foundation
@@ -63,11 +63,9 @@ namespace Foam
         >
     > basicReactingMultiphaseParcel;
 
+    //- Non-contiguous data for basicReactingMultiphaseParcel
     template<>
-    inline bool contiguous<basicReactingMultiphaseParcel>()
-    {
-        return false;
-    }
+    struct is_contiguous<basicReactingMultiphaseParcel> : std::false_type {};
 }
 
 
diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H
index 7831c8ff1bb..a74f6d1d09b 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H
@@ -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
@@ -50,11 +50,8 @@ namespace Foam
     typedef ReactingParcel<ThermoParcel<KinematicParcel<particle>>>
         basicReactingParcel;
 
-    template<>
-    inline bool contiguous<basicReactingParcel>()
-    {
-        return false;
-    }
+    //- Non-contiguous data for basicReactingParcel
+    template<> struct is_contiguous<basicReactingParcel> : std::false_type {};
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H
index 6af3b3fb09d..c17e0522551 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H
@@ -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
@@ -48,11 +48,8 @@ namespace Foam
 {
     typedef ThermoParcel<KinematicParcel<particle>> basicThermoParcel;
 
-    template<>
-    inline bool contiguous<basicThermoParcel>()
-    {
-        return true;
-    }
+    //- Contiguous data for basicThermoParcel
+    template<> struct is_contiguous<basicThermoParcel> : std::true_type {};
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/solidParticle/solidParticle.H b/src/lagrangian/solidParticle/solidParticle.H
index a7eb274ad08..ca9a87168b6 100644
--- a/src/lagrangian/solidParticle/solidParticle.H
+++ b/src/lagrangian/solidParticle/solidParticle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -52,7 +52,6 @@ namespace Foam
 {
 
 // Forward Declarations
-
 class solidParticleCloud;
 class solidParticle;
 
@@ -237,11 +236,10 @@ public:
 };
 
 
-template<>
-inline bool contiguous<solidParticle>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for solidParticle
+template<> struct is_contiguous<solidParticle> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/parcels/derived/basicSprayParcel/basicSprayParcel.H b/src/lagrangian/spray/parcels/derived/basicSprayParcel/basicSprayParcel.H
index d62de144caa..5a9f27faabf 100644
--- a/src/lagrangian/spray/parcels/derived/basicSprayParcel/basicSprayParcel.H
+++ b/src/lagrangian/spray/parcels/derived/basicSprayParcel/basicSprayParcel.H
@@ -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 OpenFOAM Foundation
@@ -63,11 +63,8 @@ namespace Foam
         >
     > basicSprayParcel;
 
-    template<>
-    inline bool contiguous<basicSprayParcel>()
-    {
-        return false;
-    }
+    //- Non-contiguous data for basicSprayParcel
+    template<> struct is_contiguous<basicSprayParcel> : std::false_type {};
 }
 
 
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H
index 98c8650c2c4..50fd6acbe3f 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015-2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -1664,9 +1664,6 @@ public:
             );
 };
 
-template<>
-inline bool contiguous<FixedList<label, 3>>()               {return true;}
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H
index c8c9e5d9a56..d2c1e46ae2e 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H
+++ b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H
@@ -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) 2013-2015 OpenFOAM Foundation
@@ -46,12 +46,8 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class patchFaceOrientation;
 
 Istream& operator>>(Istream&, patchFaceOrientation&);
@@ -164,12 +160,13 @@ public:
 };
 
 
-//- Data associated with patchFaceOrientation type are contiguous
-template<>
-inline bool contiguous<patchFaceOrientation>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for patchFaceOrientation
+template<> struct is_contiguous<patchFaceOrientation> : std::true_type {};
+
+//- Contiguous label data for patchFaceOrientation
+template<> struct is_contiguous_label<patchFaceOrientation> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/snappyHexMesh/meshRefinement/transportData.H b/src/mesh/snappyHexMesh/meshRefinement/transportData.H
index c206a083504..ecf8da41e5e 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/transportData.H
+++ b/src/mesh/snappyHexMesh/meshRefinement/transportData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyMesh;
 
 /*---------------------------------------------------------------------------*\
@@ -148,17 +148,15 @@ public:
 };
 
 
-//- Data associated with transportData type is same as underlying
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for transportData
 template<>
-inline bool contiguous<transportData>()
-{
-    return contiguous<wallPointData<scalar>>();
-}
+struct is_contiguous<transportData> : is_contiguous<wallPointData<scalar>> {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateData.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateData.H
index a2d32ba9ed2..01c5a8fd720 100644
--- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateData.H
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,13 +40,11 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class Istream;
 class Ostream;
-template<class DataType>
-class PointIntegrateData;
+template<class DataType> class PointIntegrateData;
 
-// Forward declaration of friend functions and operators
 template<class DataType>
 Ostream& operator<<(Ostream&, const PointIntegrateData<DataType>&);
 template<class DataType>
@@ -86,7 +84,6 @@ public:
     };
 
 
-
     // Constructors
 
         //- Construct null
@@ -227,21 +224,16 @@ public:
         );
 };
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-//- Data associated with PointIntegrateData types is contiguous
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
-template<>
-inline bool contiguous<PointIntegrateData<scalar>>()
-{
-    return true;
-}
+//- Data are contiguous if the data type is contiguous
+template<class DataType>
+struct is_contiguous<PointIntegrateData<DataType>>
+:
+    is_contiguous<DataType>
+{};
 
-template<>
-inline bool contiguous<PointIntegrateData<vector>>()
-{
-    return true;
-}
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C
index e4187f63dc4..d5d1f47e80e 100644
--- a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C
+++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -27,7 +27,6 @@ License
 
 #include "trackedParticle.H"
 
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 const std::size_t Foam::trackedParticle::sizeofFields_
diff --git a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H
index 46b99b8bda9..066ae635de6 100644
--- a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H
+++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -47,7 +47,7 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declarations
+// Forward Declarations
 
 class trackedParticleCloud;
 class trackedParticle;
@@ -298,17 +298,10 @@ public:
 };
 
 
-template<>
-inline bool contiguous<trackedParticle>()
-{
-    return true;
-}
-
-//template<>
-//void Cloud<trackedParticle>::readFields();
-//
-//template<>
-//void Cloud<trackedParticle>::writeFields() const;
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for trackedParticle
+template<> struct is_contiguous<trackedParticle> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H
index 525851fb0e0..5a299a229fb 100644
--- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H
+++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H
@@ -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
@@ -49,14 +49,9 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
-
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class patchEdgeFaceInfo;
 
 Istream& operator>>(Istream&, patchEdgeFaceInfo&);
@@ -201,12 +196,13 @@ public:
 };
 
 
-//- Data associated with patchEdgeFaceInfo type are contiguous
-template<>
-inline bool contiguous<patchEdgeFaceInfo>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for patchEdgeFaceInfo
+template<> struct is_contiguous<patchEdgeFaceInfo> : std::true_type {};
+
+//- Contiguous scalar data for patchEdgeFaceInfo
+template<> struct is_contiguous_scalar<patchEdgeFaceInfo> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H
index f4d2293782d..802a46394bf 100644
--- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H
+++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H
@@ -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) 2012-2016 OpenFOAM Foundation
@@ -51,13 +51,9 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class patchEdgeFaceRegion;
 
 Istream& operator>>(Istream&, patchEdgeFaceRegion&);
@@ -181,12 +177,13 @@ public:
 };
 
 
-//- Data associated with patchEdgeFaceRegion type are contiguous
-template<>
-inline bool contiguous<patchEdgeFaceRegion>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for patchEdgeFaceRegion
+template<> struct is_contiguous<patchEdgeFaceRegion> : std::true_type {};
+
+//- Contiguous label data for patchEdgeFaceRegion
+template<> struct is_contiguous_label<patchEdgeFaceRegion> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/algorithms/PointEdgeWave/PointData.H b/src/meshTools/algorithms/PointEdgeWave/PointData.H
index 4adf7b240ae..4adc976fe53 100644
--- a/src/meshTools/algorithms/PointEdgeWave/PointData.H
+++ b/src/meshTools/algorithms/PointEdgeWave/PointData.H
@@ -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-2015 OpenFOAM Foundation
@@ -46,13 +46,11 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class Istream;
 class Ostream;
-template<class DataType>
-class PointData;
+template<class DataType> class PointData;
 
-// Forward declaration of friend functions and operators
 template<class DataType>
 Ostream& operator<<(Ostream&, const PointData<DataType>&);
 template<class DataType>
@@ -67,8 +65,6 @@ class PointData
 :
     public pointEdgePoint
 {
-private:
-
     // Private data
 
         //- Additional transported data
@@ -178,21 +174,20 @@ public:
         );
 };
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-//- Data associated with PointData types is contiguous
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
-template<>
-inline bool contiguous<PointData<scalar>>()
-{
-    return true;
-}
+//- Data are contiguous if data type is contiguous
+template<class DataType>
+struct is_contiguous<PointData<DataType>> : is_contiguous<DataType> {};
+
+//- Contiguous scalar only when data type is also scalar
+template<class DataType>
+struct is_contiguous_scalar<PointData<DataType>>
+:
+    is_contiguous_scalar<DataType>
+{};
 
-template<>
-inline bool contiguous<PointData<vector>>()
-{
-    return true;
-}
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H
index 2e51060d5a7..0a9d2ca13ee 100644
--- a/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H
+++ b/src/meshTools/algorithms/PointEdgeWave/pointEdgePoint.H
@@ -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
@@ -51,13 +51,9 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class pointEdgePoint;
 
 Istream& operator>>(Istream&, pointEdgePoint&);
@@ -237,12 +233,13 @@ public:
 };
 
 
-//- Data associated with pointEdgePoint type are contiguous
-template<>
-inline bool contiguous<pointEdgePoint>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for pointEdgePoint
+template<> struct is_contiguous<pointEdgePoint> : std::true_type {};
+
+//- Contiguous scalar data for pointEdgePoint
+template<> struct is_contiguous_scalar<pointEdgePoint> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/cellClassification/cellInfo.H b/src/meshTools/cellClassification/cellInfo.H
index 3c6265b5d2b..15b42eb8d45 100644
--- a/src/meshTools/cellClassification/cellInfo.H
+++ b/src/meshTools/cellClassification/cellInfo.H
@@ -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
@@ -47,12 +47,10 @@ SourceFiles
 
 namespace Foam
 {
+
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class cellInfo;
 
 Istream& operator>>(Istream&, cellInfo&);
@@ -69,6 +67,7 @@ class cellInfo
 
         label type_;
 
+
     // Private Member Functions
 
         //- Update current cell/face type with neighbouring
@@ -212,12 +211,13 @@ public:
 };
 
 
-//- Data associated with cellInfo type are contiguous
-template<>
-inline bool contiguous<cellInfo>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for cellInfo
+template<> struct is_contiguous<cellInfo> : std::true_type {};
+
+//- Contiguous label data for cellInfo
+template<> struct is_contiguous_label<cellInfo> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H
index cb11e2659d2..89179c6ec63 100644
--- a/src/meshTools/cellDist/wallPoint/wallPoint.H
+++ b/src/meshTools/cellDist/wallPoint/wallPoint.H
@@ -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
@@ -49,12 +49,11 @@ SourceFiles
 namespace Foam
 {
 
-// Forward declaration of classes
+// Forward Declarations
 class polyPatch;
 class polyMesh;
 class wallPoint;
 
-// Forward declaration of friend functions and operators
 Ostream& operator<<(Ostream&, const wallPoint&);
 Istream& operator>>(Istream&, wallPoint&);
 
@@ -65,7 +64,7 @@ Istream& operator>>(Istream&, wallPoint&);
 
 class wallPoint
 {
-    // Private data
+    // Private Data
 
         //- Position of nearest wall center
         point origin_;
@@ -219,12 +218,13 @@ public:
 };
 
 
-//- Data associated with wallPoint type are contiguous
-template<>
-inline bool contiguous<wallPoint>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for wallPoint
+template<> struct is_contiguous<wallPoint> : std::true_type {};
+
+//- Contiguous scalar data for wallPoint
+template<> struct is_contiguous_scalar<wallPoint> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/cellDist/wallPoint/wallPointData.H b/src/meshTools/cellDist/wallPoint/wallPointData.H
index b52d88a43c5..9591cc0f355 100644
--- a/src/meshTools/cellDist/wallPoint/wallPointData.H
+++ b/src/meshTools/cellDist/wallPoint/wallPointData.H
@@ -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
@@ -48,10 +48,9 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 template<class Type> class wallPointData;
 
-// Forward declaration of friend functions and operators
-
 template<class Type> Istream& operator>>(Istream&, wallPointData<Type>&);
 template<class Type> Ostream& operator<<(Ostream&, const wallPointData<Type>&);
 
@@ -162,48 +161,22 @@ public:
 };
 
 
-//- Data associated with wallPointData type are contiguous. List the usual
-//  ones.
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
 
-template<>
-inline bool contiguous<wallPointData<bool>>()
-{
-    return contiguous<wallPoint>();
-}
-template<>
-inline bool contiguous<wallPointData<label>>()
-{
-    return contiguous<wallPoint>();
-}
-template<>
-inline bool contiguous<wallPointData<scalar>>()
-{
-    return contiguous<wallPoint>();
-}
-template<>
-inline bool contiguous<wallPointData<vector>>()
-{
-    return contiguous<wallPoint>();
-}
-template<>
-inline bool contiguous<wallPointData<sphericalTensor>>()
-{
-    return contiguous<wallPoint>();
-}
-template<>
-inline bool contiguous<wallPointData<symmTensor>>()
-{
-    return contiguous<wallPoint>();
-}
-template<>
-inline bool contiguous<wallPointData<tensor>>()
-{
-    return contiguous<wallPoint>();
-}
+//- Data are contiguous if data type is contiguous
+template<class Type>
+struct is_contiguous<wallPointData<Type>> : is_contiguous<Type> {};
 
+//- Data are contiguous label if data type is label
+template<class Type>
+struct is_contiguous_label<wallPointData<Type>> : is_contiguous_label<Type> {};
+
+//- Data are contiguous scalar if data type is scalar
+template<class Type>
+struct is_contiguous_scalar<wallPointData<Type>> : is_contiguous_scalar<Type>{};
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
diff --git a/src/meshTools/meshStructure/pointTopoDistanceData.H b/src/meshTools/meshStructure/pointTopoDistanceData.H
index 2a6918a1038..f86e3b284ad 100644
--- a/src/meshTools/meshStructure/pointTopoDistanceData.H
+++ b/src/meshTools/meshStructure/pointTopoDistanceData.H
@@ -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) 2013-2016 OpenFOAM Foundation
@@ -47,12 +47,9 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class pointTopoDistanceData;
 
 Istream& operator>>(Istream&, pointTopoDistanceData&);
@@ -78,10 +75,10 @@ public:
 
     // Constructors
 
-        //- Construct null
+        //- Construct null with invalid (-1) for data and distance
         inline pointTopoDistanceData();
 
-        //- Construct from count
+        //- Construct from components
         inline pointTopoDistanceData
         (
             const label data,
@@ -93,7 +90,6 @@ public:
 
         // Access
 
-
             inline label data() const
             {
                 return data_;
@@ -208,6 +204,7 @@ public:
         inline bool operator==(const pointTopoDistanceData&) const;
         inline bool operator!=(const pointTopoDistanceData&) const;
 
+
     // IOstream Operators
 
         friend Ostream& operator<<(Ostream&, const pointTopoDistanceData&);
@@ -215,12 +212,16 @@ public:
 };
 
 
-//- Data associated with pointTopoDistanceData type are contiguous
-template<>
-inline bool contiguous<pointTopoDistanceData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for pointTopoDistanceData
+template<> struct is_contiguous<pointTopoDistanceData> : std::true_type {};
+
+//- Contiguous label data for pointTopoDistanceData
+template<> struct is_contiguous_label<pointTopoDistanceData>
+:
+    std::true_type
+{};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/meshStructure/topoDistanceData.H b/src/meshTools/meshStructure/topoDistanceData.H
index 7afe6de5934..40028734570 100644
--- a/src/meshTools/meshStructure/topoDistanceData.H
+++ b/src/meshTools/meshStructure/topoDistanceData.H
@@ -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
@@ -46,12 +46,9 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class topoDistanceData;
 
 Istream& operator>>(Istream&, topoDistanceData&);
@@ -77,10 +74,10 @@ public:
 
     // Constructors
 
-        //- Construct null
+        //- Construct null with invalid (-1) for data and distance
         inline topoDistanceData();
 
-        //- Construct from count
+        //- Construct from components
         inline topoDistanceData
         (
             const label data,
@@ -92,7 +89,6 @@ public:
 
         // Access
 
-
             inline label data() const
             {
                 return data_;
@@ -191,6 +187,7 @@ public:
             template<class TrackingData>
             inline bool equal(const topoDistanceData&, TrackingData& td) const;
 
+
     // Member Operators
 
         // Needed for List IO
@@ -206,12 +203,13 @@ public:
 };
 
 
-//- Data associated with topoDistanceData type are contiguous
-template<>
-inline bool contiguous<topoDistanceData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for topoDistanceData
+template<> struct is_contiguous<topoDistanceData> : std::true_type {};
+
+//- Contiguous label data for topoDistanceData
+template<> struct is_contiguous_label<topoDistanceData> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/regionSplit/minData.H b/src/meshTools/regionSplit/minData.H
index 20bba243a7f..05ed9ca00b0 100644
--- a/src/meshTools/regionSplit/minData.H
+++ b/src/meshTools/regionSplit/minData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2014-2016 OpenFOAM Foundation
@@ -45,12 +45,10 @@ SourceFiles
 namespace Foam
 {
 
+// Forward declarations
+
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class minData;
 
 Istream& operator>>(Istream&, minData&);
@@ -193,12 +191,13 @@ public:
 };
 
 
-//- Data associated with minData type are contiguous
-template<>
-inline bool contiguous<minData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for minData
+template<> struct is_contiguous<minData> : std::true_type {};
+
+//- Contiguous label data for minData
+template<> struct is_contiguous_label<minData> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/overset/cellCellStencil/inverseDistance/meshToMeshData.H b/src/overset/cellCellStencil/inverseDistance/meshToMeshData.H
index 0b252bbee05..d47a25b5f45 100644
--- a/src/overset/cellCellStencil/inverseDistance/meshToMeshData.H
+++ b/src/overset/cellCellStencil/inverseDistance/meshToMeshData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,12 +45,9 @@ SourceFiles
 namespace Foam
 {
 
+// Forward Declarations
 class polyPatch;
 class polyMesh;
-
-
-// Forward declaration of friend functions and operators
-
 class meshToMeshData;
 
 Istream& operator>>(Istream&, meshToMeshData&);
@@ -210,6 +207,7 @@ public:
                 TrackingData&
             ) const;
 
+
     // Member Operators
 
         // Needed for List IO
@@ -225,12 +223,13 @@ public:
 };
 
 
-//- Data associated with meshToMeshData type are contiguous
-template<>
-inline bool contiguous<meshToMeshData>()
-{
-    return true;
-}
+// * * * * * * * * * * * * * * * * * Traits  * * * * * * * * * * * * * * * * //
+
+//- Contiguous data for meshToMeshData
+template<> struct is_contiguous<meshToMeshData> : std::true_type {};
+
+//- Contiguous label data for meshToMeshData
+template<> struct is_contiguous_label<meshToMeshData> : std::true_type {};
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
index 779221faa87..4480c7c2c23 100644
--- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
+++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015-2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2015-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -76,8 +76,6 @@ class decompositionMethod;
 
 // Typedefs
 typedef Pair<point> segment;
-template<>
-inline bool contiguous<segment>() {return contiguous<point>();}
 
 
 /*---------------------------------------------------------------------------*\
-- 
GitLab