AC3DsurfaceFormat.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fileFormats::AC3DsurfaceFormat
26 
27 Description
28  Provide a means of reading/writing AC3D format.
29 
30  http://www.inivis.com/ac3d/man/ac3dfileformat.html
31 
32 Note
33  On input, the faces are already organised as zones.
34  The output is always sorted by zones.
35  In the absence of zones, a single zone will be assigned.
36 
37 SourceFiles
38  AC3DsurfaceFormat.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef AC3DsurfaceFormat_H
43 #define AC3DsurfaceFormat_H
44 
45 #include "MeshedSurface.H"
46 #include "MeshedSurfaceProxy.H"
47 #include "UnsortedMeshedSurface.H"
48 #include "AC3DsurfaceFormatCore.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace fileFormats
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class AC3DsurfaceFormat Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 template<class Face>
63 :
64  public MeshedSurface<Face>,
66 {
67 public:
68 
69  // Constructors
70 
71  //- Construct from file name
73 
74  //- Disallow default bitwise copy construction
76 
77 
78  // Selectors
79 
80  //- Read file and return surface
82  {
84  (
86  );
87  }
88 
89 
90  //- Destructor
91  virtual ~AC3DsurfaceFormat()
92  {}
93 
94 
95  // Member Functions
96 
97  //- Write surface mesh components by proxy
98  static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
99 
100  //- Write UnsortedMeshedSurface, the output is always sorted by zones.
101  static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
102 
103  //- Read from file
104  virtual bool read(const fileName&);
105 
106  //- Write object
107  virtual void write(const fileName& name) const
108  {
109  write(name, MeshedSurfaceProxy<Face>(*this));
110  }
111 
112 
113  // Member Operators
114 
115  //- Disallow default bitwise assignment
116  void operator=(const AC3DsurfaceFormat<Face>&) = delete;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace fileFormats
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #ifdef NoRepository
128  #include "AC3DsurfaceFormat.C"
129 #endif
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
A surface geometry mesh, in which the surface zone information is conveyed by the &#39;zoneId&#39; associated...
Definition: MeshedSurface.H:74
A class for handling file names.
Definition: fileName.H:79
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Definition: MeshedSurface.H:72
Internal class used by the AC3DsurfaceFormat.
void operator=(const AC3DsurfaceFormat< Face > &)=delete
Disallow default bitwise assignment.
Provide a means of reading/writing AC3D format.
static autoPtr< MeshedSurface< Face > > New(const fileName &name)
Read file and return surface.
virtual bool read(const fileName &)
Read from file.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
Definition: MeshedSurface.H:73
virtual ~AC3DsurfaceFormat()
Destructor.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
AC3DsurfaceFormat(const fileName &)
Construct from file name.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
static void write(const fileName &, const MeshedSurfaceProxy< Face > &)
Write surface mesh components by proxy.
Namespace for OpenFOAM.