X3DsurfaceFormat.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 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::X3DsurfaceFormat
29 
30 Description
31  Provide a means of writing x3d format.
32 
33 SourceFiles
34  X3DsurfaceFormat.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef X3DsurfaceFormat_H
39 #define X3DsurfaceFormat_H
40 
41 #include "MeshedSurface.H"
42 #include "MeshedSurfaceProxy.H"
43 #include "UnsortedMeshedSurface.H"
44 #include "X3DsurfaceFormatCore.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace fileFormats
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class fileFormats::X3DsurfaceFormat Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class Face>
58 class X3DsurfaceFormat
59 :
60  public MeshedSurface<Face>,
62 {
63 public:
64 
65  // Constructors
66 
67  //- Construct null
68  X3DsurfaceFormat() = default;
69 
70 
71  //- Destructor
72  virtual ~X3DsurfaceFormat() = default;
73 
74 
75  // Static Member Functions
76 
77  //- Write surface mesh components by proxy
78  static void write
79  (
80  const fileName& filename,
81  const MeshedSurfaceProxy<Face>& surf,
82  const dictionary& options = dictionary::null
83  );
84 
85 
86  // Member Functions
87 
88  //- Write surface mesh to file
89  virtual void write
90  (
91  const fileName& name,
92  const dictionary& options = dictionary::null
93  ) const
94  {
95  write(name, MeshedSurfaceProxy<Face>(*this), options);
96  }
97 };
98 
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 } // End namespace fileFormats
103 } // End namespace Foam
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #ifdef NoRepository
108  #include "X3DsurfaceFormat.C"
109 #endif
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
Foam::fileFormats::X3DsurfaceFormat::~X3DsurfaceFormat
virtual ~X3DsurfaceFormat()=default
Destructor.
MeshedSurfaceProxy.H
Foam::fileFormats::X3DsurfaceFormatCore
Internal class used by the X3DsurfaceFormat.
Definition: X3DsurfaceFormatCore.H:52
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::fileFormats::X3DsurfaceFormat::X3DsurfaceFormat
X3DsurfaceFormat()=default
Construct null.
X3DsurfaceFormat.C
Foam::MeshedSurfaceProxy
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
Definition: MeshedSurface.H:78
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
X3DsurfaceFormatCore.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fileFormats::X3DsurfaceFormat::write
static void write(const fileName &filename, const MeshedSurfaceProxy< Face > &surf, const dictionary &options=dictionary::null)
Write surface mesh components by proxy.
Definition: X3DsurfaceFormat.C:36
Foam::fileFormats::X3DsurfaceFormat
Provide a means of writing x3d format.
Definition: X3DsurfaceFormat.H:57
Foam::MeshedSurface
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Definition: triSurfaceTools.H:80
MeshedSurface.H