SMESHsurfaceFormat.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2016-2017 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::fileFormats::SMESHsurfaceFormat
29 
30 Description
31  Write tetgen SMESH format.
32 
33  Tetgen http://tetgen.berlios.de
34 
35 See also
36  File format information:
37  http://tetgen.berlios.de/fformats.smesh.html
38 
39 SourceFiles
40  SMESHsurfaceFormat.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef SMESHsurfaceFormat_H
45 #define SMESHsurfaceFormat_H
46 
47 #include "MeshedSurface.H"
48 #include "MeshedSurfaceProxy.H"
49 #include "UnsortedMeshedSurface.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace fileFormats
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class fileFormats::SMESHsurfaceFormat Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class Face>
64 :
65  public MeshedSurface<Face>
66 {
67 public:
68 
69  // Constructors
70 
71  //- Construct null
72  SMESHsurfaceFormat() = default;
73 
74 
75  //- Destructor
76  virtual ~SMESHsurfaceFormat() = default;
77 
78 
79  // Static Member Functions
80 
81  //- Write surface mesh components by proxy
82  static void write
83  (
84  const fileName& filename,
85  const MeshedSurfaceProxy<Face>& surf,
86  const dictionary& options = dictionary::null
87  );
88 
89 
90  // Member Functions
91 
92  //- Write surface mesh to file
93  virtual void write
94  (
95  const fileName& name,
96  const dictionary& options = dictionary::null
97  ) const
98  {
99  write(name, MeshedSurfaceProxy<Face>(*this), options);
100  }
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace fileFormats
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #ifdef NoRepository
112  #include "SMESHsurfaceFormat.C"
113 #endif
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
MeshedSurfaceProxy.H
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::fileFormats::SMESHsurfaceFormat::~SMESHsurfaceFormat
virtual ~SMESHsurfaceFormat()=default
Destructor.
SMESHsurfaceFormat.C
Foam::MeshedSurfaceProxy
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
Definition: MeshedSurface.H:78
Foam::fileFormats::SMESHsurfaceFormat::SMESHsurfaceFormat
SMESHsurfaceFormat()=default
Construct null.
Foam::dictionary::null
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Definition: dictionary.H:385
UnsortedMeshedSurface.H
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fileFormats::SMESHsurfaceFormat::write
static void write(const fileName &filename, const MeshedSurfaceProxy< Face > &surf, const dictionary &options=dictionary::null)
Write surface mesh components by proxy.
Definition: SMESHsurfaceFormat.C:37
Foam::MeshedSurface
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Definition: triSurfaceTools.H:80
Foam::fileFormats::SMESHsurfaceFormat
Write tetgen SMESH format.
Definition: SMESHsurfaceFormat.H:62
MeshedSurface.H