From c56edc262cde11af0276969d4718cf4900cf2586 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Sat, 12 Nov 2016 12:05:45 +0100
Subject: [PATCH] ENH: add read/write for labelledTri surfaces (issue #294)

- extends existing surfaceFormats to include surfaces with
  labelledTri as their face representation.
---
 .../surfaceFormats/ac3d/AC3DsurfaceFormat.H   | 18 ++++--
 .../ac3d/AC3DsurfaceFormatRunTime.C           | 28 +++++++++-
 .../fire/FLMAsurfaceFormatRunTime.C           | 18 ++++++
 .../surfaceFormats/gts/GTSsurfaceFormat.H     | 18 ++++--
 .../gts/GTSsurfaceFormatRunTime.C             | 28 +++++++++-
 .../surfaceFormats/nas/NASsurfaceFormat.H     |  6 +-
 .../nas/NASsurfaceFormatRunTime.C             | 22 +++++++-
 .../surfaceFormats/obj/OBJsurfaceFormat.H     | 12 ++--
 .../obj/OBJsurfaceFormatRunTime.C             | 19 ++++++-
 .../surfaceFormats/off/OFFsurfaceFormat.H     | 12 ++--
 .../off/OFFsurfaceFormatRunTime.C             | 20 ++++++-
 .../surfaceFormats/smesh/SMESHsurfaceFormat.H | 12 ++--
 .../smesh/SMESHsurfaceFormatRunTime.C         | 11 +++-
 .../starcd/STARCDsurfaceFormat.H              |  6 +-
 .../starcd/STARCDsurfaceFormatRunTime.C       | 20 ++++++-
 .../surfaceFormats/stl/STLsurfaceFormat.H     | 18 ++++--
 .../stl/STLsurfaceFormatRunTime.C             | 55 ++++++++++++++++++-
 .../surfaceFormats/surfaceFormatsCore.H       | 18 +++++-
 .../surfaceFormats/tri/TRIsurfaceFormat.H     | 18 ++++--
 .../surfaceFormats/tri/TRIsurfaceFormatCore.H |  8 +--
 .../tri/TRIsurfaceFormatRunTime.C             | 28 +++++++++-
 .../surfaceFormats/vtk/VTKsurfaceFormat.H     | 19 +++++--
 .../surfaceFormats/vtk/VTKsurfaceFormatCore.H |  3 +-
 .../vtk/VTKsurfaceFormatRunTime.C             | 29 +++++++++-
 .../surfaceFormats/x3d/X3DsurfaceFormat.H     | 15 +++--
 .../surfaceFormats/x3d/X3DsurfaceFormatCore.H |  3 +-
 .../x3d/X3DsurfaceFormatRunTime.C             | 11 +++-
 27 files changed, 400 insertions(+), 75 deletions(-)

diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H
index 8d626099c34..177c2deb41e 100644
--- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -67,10 +67,10 @@ class AC3DsurfaceFormat
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        AC3DsurfaceFormat(const AC3DsurfaceFormat<Face>&);
+        AC3DsurfaceFormat(const AC3DsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const AC3DsurfaceFormat<Face>&);
+        void operator=(const AC3DsurfaceFormat<Face>&) = delete;
 
 
 public:
@@ -101,10 +101,18 @@ public:
     // Member Functions
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Write UnsortedMeshedSurface, the output is always sorted by zones.
-        static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
+        static void write
+        (
+            const fileName&,
+            const UnsortedMeshedSurface<Face>&
+        );
 
         //- Read from file
         virtual bool read(const fileName&);
diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatRunTime.C
index 89e4f5eb638..9c2846efee3 100644
--- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -52,6 +52,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     ac
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    AC3DsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    ac
+);
 
 // write MeshedSurfaceProxy
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -72,6 +80,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     ac
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    AC3DsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    ac
+);
 
 
 // write UnsortedMeshedSurface
@@ -93,6 +110,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     ac
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    UnsortedMeshedSurface,
+    AC3DsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    ac
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormatRunTime.C
index a4b00b40f0c..d4fd924b7b2 100644
--- a/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/fire/FLMAsurfaceFormatRunTime.C
@@ -54,6 +54,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     flma
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    FLMAsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    flma
+);
 
 
 // write MeshedSurfaceProxy (comnpressed versions of above)
@@ -75,6 +84,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     flmaz
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    FLMAZsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    flmaz
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H
index 7a0175d0d29..c39c005af51 100644
--- a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -60,10 +60,10 @@ class GTSsurfaceFormat
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        GTSsurfaceFormat(const GTSsurfaceFormat<Face>&);
+        GTSsurfaceFormat(const GTSsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const GTSsurfaceFormat<Face>&);
+        void operator=(const GTSsurfaceFormat<Face>&) = delete;
 
 
 public:
@@ -94,10 +94,18 @@ public:
     // Member Functions
 
         //- Write MeshedSurface
-        static void write(const fileName&, const MeshedSurface<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurface<Face>&
+        );
 
         //- Write UnsortedMeshedSurface, the output remains unsorted
-        static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
+        static void write
+        (
+            const fileName&,
+            const UnsortedMeshedSurface<Face>&
+        );
 
         //- Read from file
         virtual bool read(const fileName&);
diff --git a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormatRunTime.C
index 03fc0569ab2..35a6e95ba8a 100644
--- a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -52,6 +52,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     gts
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    UnsortedMeshedSurface,
+    GTSsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    gts
+);
 
 // write MeshedSurface
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -72,6 +80,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     gts
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurface,
+    GTSsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    gts
+);
 
 // write UnsortedMeshedSurface
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -92,6 +109,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     gts
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    UnsortedMeshedSurface,
+    GTSsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    gts
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H
index 65f22eecf7b..d6b0ed0852b 100644
--- a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -68,10 +68,10 @@ class NASsurfaceFormat
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        NASsurfaceFormat(const NASsurfaceFormat<Face>&);
+        NASsurfaceFormat(const NASsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const NASsurfaceFormat<Face>&);
+        void operator=(const NASsurfaceFormat<Face>&) = delete;
 
 
 public:
diff --git a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormatRunTime.C
index 4fca5cc1b68..572a9aa9827 100644
--- a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -35,7 +35,7 @@ namespace Foam
 namespace fileFormats
 {
 
-// read MeshedSurface - .bdf (Bulk Data Format)
+// read MeshedSurface - .bdf (Bulk Data Format) and nas (Nastran)
 addNamedTemplatedToRunTimeSelectionTable
 (
     MeshedSurface,
@@ -53,7 +53,6 @@ addNamedTemplatedToRunTimeSelectionTable
     nas
 );
 
-// read MeshedSurface - .nas (Nastran)
 addNamedTemplatedToRunTimeSelectionTable
 (
     MeshedSurface,
@@ -71,6 +70,23 @@ addNamedTemplatedToRunTimeSelectionTable
     nas
 );
 
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    NASsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    bdf
+);
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    NASsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    nas
+);
+
 }
 }
 
diff --git a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H
index 71620781754..dc472070371 100644
--- a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -60,10 +60,10 @@ class OBJsurfaceFormat
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        OBJsurfaceFormat(const OBJsurfaceFormat<Face>&);
+        OBJsurfaceFormat(const OBJsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const OBJsurfaceFormat<Face>&);
+        void operator=(const OBJsurfaceFormat<Face>&) = delete;
 
 
 public:
@@ -94,7 +94,11 @@ public:
     // Member Functions
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Read from file
         virtual bool read(const fileName&);
diff --git a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormatRunTime.C
index a0d7ab518a1..ff8b7ee1e51 100644
--- a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -52,6 +52,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     obj
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    OBJsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    obj
+);
 
 // write MeshedSurfaceProxy
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -72,6 +80,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     obj
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    OBJsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    obj
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H
index 0fc6bdf6c67..654da0c93ed 100644
--- a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -68,10 +68,10 @@ class OFFsurfaceFormat
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        OFFsurfaceFormat(const OFFsurfaceFormat&);
+        OFFsurfaceFormat(const OFFsurfaceFormat&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const OFFsurfaceFormat&);
+        void operator=(const OFFsurfaceFormat&) = delete;
 
 
 public:
@@ -102,7 +102,11 @@ public:
     // Member Functions
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Read from file
         virtual bool read(const fileName&);
diff --git a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormatRunTime.C
index f3177520f87..6b355ecfe30 100644
--- a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -52,6 +52,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     off
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    OFFsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    off
+);
 
 // write MeshedSurfaceProxy
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -72,7 +80,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     off
 );
-
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    OFFsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    off
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H
index 94fd8e1df0d..0a4e315f3eb 100644
--- a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -64,10 +64,10 @@ class SMESHsurfaceFormat
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        SMESHsurfaceFormat(const SMESHsurfaceFormat<Face>&);
+        SMESHsurfaceFormat(const SMESHsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const SMESHsurfaceFormat<Face>&);
+        void operator=(const SMESHsurfaceFormat<Face>&) = delete;
 
 
 public:
@@ -86,7 +86,11 @@ public:
     // Member Functions
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Write object
         virtual void write(const fileName& name) const
diff --git a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormatRunTime.C
index 34db152c9f1..2bb1dae7863 100644
--- a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -54,6 +54,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     smesh
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    SMESHsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    smesh
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H
index 8d21f2cd870..a0e3b39da3a 100644
--- a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H
@@ -108,7 +108,11 @@ public:
     // Member Functions
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Read from file
         virtual bool read(const fileName&);
diff --git a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatRunTime.C
index 50e395ff48e..866a0d5d162 100644
--- a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -52,6 +52,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     inp
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    STARCDsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    inp
+);
 
 // write MeshedSurfaceProxy
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -72,7 +80,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     inp
 );
-
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    STARCDsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    inp
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H
index 76aaf028a32..754ea005d92 100644
--- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -83,10 +83,10 @@ class STLsurfaceFormat
 
 
         //- Disallow default bitwise copy construct
-        STLsurfaceFormat(const STLsurfaceFormat<Face>&);
+        STLsurfaceFormat(const STLsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const STLsurfaceFormat<Face>&);
+        void operator=(const STLsurfaceFormat<Face>&) = delete;
 
 
 public:
@@ -132,7 +132,11 @@ public:
 
         //- Write surface mesh components by proxy
         //  as ASCII or BINARY, depending on the extension
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Write surface mesh components by proxy
         //  as ASCII or BINARY or dependent on the extension
@@ -159,7 +163,11 @@ public:
 
         //- Write UnsortedMeshedSurface
         //  as ASCII or BINARY, depending on the extension
-        static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
+        static void write
+        (
+            const fileName&,
+            const UnsortedMeshedSurface<Face>&
+        );
 
         //- Write UnsortedMeshedSurface
         //  as ASCII or BINARY or dependent on the extension
diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatRunTime.C
index f50cff99c2a..298da7e8e1d 100644
--- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "STLsurfaceFormat.H"
+#include "labelledTri.H"
 
 #include "addToRunTimeSelectionTable.H"
 #include "addToMemberFunctionSelectionTable.H"
@@ -52,6 +53,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     stl
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    STLsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    stl
+);
 
 // read MeshedSurface (binary)
 addNamedTemplatedToRunTimeSelectionTable
@@ -70,6 +79,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     stlb
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    STLsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    stlb
+);
 
 
 // write MeshedSurfaceProxy (ascii)
@@ -91,6 +108,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     stl
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    STLsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    stl
+);
 
 // write MeshedSurfaceProxy (binary)
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -111,6 +137,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     stlb
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    STLsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    stlb
+);
 
 // write UnsortedMeshedSurface (ascii)
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -131,6 +166,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     stl
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    UnsortedMeshedSurface,
+    STLsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    stl
+);
 
 // write UnsortedMeshedSurface (binary)
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -151,6 +195,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     stlb
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    UnsortedMeshedSurface,
+    STLsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    stlb
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/surfaceFormatsCore.H b/src/surfMesh/surfaceFormats/surfaceFormatsCore.H
index 39218b9bc93..73ccc8eff3b 100644
--- a/src/surfMesh/surfaceFormats/surfaceFormatsCore.H
+++ b/src/surfMesh/surfaceFormats/surfaceFormatsCore.H
@@ -99,15 +99,26 @@ public:
 
         //- Return the local file name (within time directory)
         //  NEEDS FIXING
-        static fileName localMeshFileName(const word& surfName="");
+        static fileName localMeshFileName
+        (
+            const word& surfName = word::null
+        );
 
         //- Find instance with surfName
         //  NEEDS FIXING
-        static fileName findMeshInstance(const Time&, const word& surfName="");
+        static fileName findMeshInstance
+        (
+            const Time&,
+            const word& surfName = word::null
+        );
 
         //- Find mesh file with surfName
         //  NEEDS FIXING
-        static fileName findMeshFile(const Time&, const word& surfName="");
+        static fileName findMeshFile
+        (
+            const Time&,
+            const word& surfName = word::null
+        );
 
 
     // Constructors
@@ -118,6 +129,7 @@ public:
 
     //- Destructor
     virtual ~surfaceFormatsCore();
+
 };
 
 
diff --git a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H
index 12834226f4f..b4b914800a5 100644
--- a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -71,10 +71,10 @@ class TRIsurfaceFormat
         );
 
         //- Disallow default bitwise copy construct
-        TRIsurfaceFormat(const TRIsurfaceFormat<Face>&);
+        TRIsurfaceFormat(const TRIsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const TRIsurfaceFormat<Face>&);
+        void operator=(const TRIsurfaceFormat<Face>&) = delete;
 
 
 public:
@@ -105,11 +105,19 @@ public:
     // Member Functions
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Write UnsortedMeshedSurface,
         //  by default the output is not sorted by zones
-        static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
+        static void write
+        (
+            const fileName&,
+            const UnsortedMeshedSurface<Face>&
+        );
 
         //- Read from file
         virtual bool read(const fileName&);
diff --git a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatCore.H b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatCore.H
index 95fc0ffae59..12ce08e3725 100644
--- a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatCore.H
+++ b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatCore.H
@@ -38,10 +38,6 @@ SourceFiles
 #include "surfaceFormatsCore.H"
 #include "triFace.H"
 
-#include "IFstream.H"
-#include "Ostream.H"
-#include "OFstream.H"
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
@@ -74,10 +70,10 @@ class TRIsurfaceFormatCore
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        TRIsurfaceFormatCore(const TRIsurfaceFormatCore&);
+        TRIsurfaceFormatCore(const TRIsurfaceFormatCore&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const TRIsurfaceFormatCore&);
+        void operator=(const TRIsurfaceFormatCore&) = delete;
 
         bool read(const fileName&);
 
diff --git a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatRunTime.C
index edceb53d08c..cd34f8311e9 100644
--- a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -52,6 +52,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     tri
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    TRIsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    tri
+);
 
 // write MeshedSurfaceProxy
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -72,6 +80,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     tri
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    TRIsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    tri
+);
 
 // write UnsortedMeshedSurface
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -92,6 +109,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     tri
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    UnsortedMeshedSurface,
+    TRIsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    tri
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H
index 0691f404141..437eb249212 100644
--- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -64,10 +64,10 @@ class VTKsurfaceFormat
         static void writeHeaderPolygons(Ostream&, const UList<Face>&);
 
         //- Disallow default bitwise copy construct
-        VTKsurfaceFormat(const VTKsurfaceFormat<Face>&);
+        VTKsurfaceFormat(const VTKsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const VTKsurfaceFormat<Face>&);
+        void operator=(const VTKsurfaceFormat<Face>&) = delete;
 
 
 public:
@@ -89,6 +89,7 @@ public:
             );
         }
 
+
     //- Destructor
     virtual ~VTKsurfaceFormat()
     {}
@@ -99,10 +100,18 @@ public:
         // Write
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
         //- Write UnsortedMeshedSurface, the output remains unsorted
-        static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
+        static void write
+        (
+            const fileName&,
+            const UnsortedMeshedSurface<Face>&
+        );
 
         //- Read from file
         virtual bool read(const fileName&);
diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.H b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.H
index d9e7ebdbc42..946440ddb0c 100644
--- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.H
+++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.H
@@ -35,9 +35,8 @@ SourceFiles
 #ifndef VTKsurfaceFormatCore_H
 #define VTKsurfaceFormatCore_H
 
-#include "Ostream.H"
-#include "OFstream.H"
 #include "MeshedSurface.H"
+#include "Ostream.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatRunTime.C
index 3636317223f..5dc1aa2b679 100644
--- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -52,6 +52,14 @@ addNamedTemplatedToRunTimeSelectionTable
     fileExtension,
     vtk
 );
+addNamedTemplatedToRunTimeSelectionTable
+(
+    MeshedSurface,
+    VTKsurfaceFormat,
+    labelledTri,
+    fileExtension,
+    vtk
+);
 
 // write MeshedSurfaceProxy
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -72,6 +80,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     vtk
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    VTKsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    vtk
+);
 
 // write UnsortedMeshedSurface
 addNamedTemplatedToMemberFunctionSelectionTable
@@ -92,7 +109,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     vtk
 );
-
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    UnsortedMeshedSurface,
+    VTKsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    vtk
+);
 
 }
 }
diff --git a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H
index 1dce035069a..20caa634202 100644
--- a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -60,10 +60,10 @@ class X3DsurfaceFormat
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
-        X3DsurfaceFormat(const X3DsurfaceFormat<Face>&);
+        X3DsurfaceFormat(const X3DsurfaceFormat<Face>&) = delete;
 
         //- Disallow default bitwise assignment
-        void operator=(const X3DsurfaceFormat<Face>&);
+        void operator=(const X3DsurfaceFormat<Face>&) = delete;
 
 public:
 
@@ -81,9 +81,14 @@ public:
     // Member Functions
 
         //- Write surface mesh components by proxy
-        static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
+        static void write
+        (
+            const fileName&,
+            const MeshedSurfaceProxy<Face>&
+        );
 
-        //- Write object file
+
+        //- Write object
         virtual void write(const fileName& name) const
         {
             write(name, MeshedSurfaceProxy<Face>(*this));
diff --git a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatCore.H b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatCore.H
index 309fdd2380e..751d91e2b25 100644
--- a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatCore.H
+++ b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatCore.H
@@ -35,9 +35,8 @@ SourceFiles
 #ifndef X3DsurfaceFormatCore_H
 #define X3DsurfaceFormatCore_H
 
-#include "Ostream.H"
-#include "OFstream.H"
 #include "MeshedSurface.H"
+#include "Ostream.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatRunTime.C b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatRunTime.C
index aff02bfcc44..5a15901df38 100644
--- a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatRunTime.C
+++ b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormatRunTime.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -53,6 +53,15 @@ addNamedTemplatedToMemberFunctionSelectionTable
     fileExtension,
     x3d
 );
+addNamedTemplatedToMemberFunctionSelectionTable
+(
+    MeshedSurfaceProxy,
+    X3DsurfaceFormat,
+    labelledTri,
+    write,
+    fileExtension,
+    x3d
+);
 
 }
 }
-- 
GitLab