FreeFOAM The Cross-Platform CFD Toolkit
FTRsurfaceFormat.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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::FTRsurfaceFormat
26 
27 Description
28  Reading of the (now deprecated and infrequently used)
29  Foam Trisurface Format.
30 
31 SourceFiles
32  FTRsurfaceFormat.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef FTRsurfaceFormat_H
37 #define FTRsurfaceFormat_H
38 
39 #include <OpenFOAM/IFstream.H>
40 #include <surfMesh/MeshedSurface.H>
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace fileFormats
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class FTRsurfaceFormat Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class Face>
56 :
57  public UnsortedMeshedSurface<Face>
58 {
59  // Private classes
60 
61  //- read compatibility for ftr patch definitions
62  class ftrPatch
63  {
64  //- Name of patch
65  word name_;
66 
67  //- Type of patch (ignored since it is usually "empty")
68  word type_;
69 
70  public:
71 
72  const word& name() const
73  {
74  return name_;
75  }
76 
77  friend Istream& operator>>(Istream& is, ftrPatch& p)
78  {
79  is >> p.name_ >> p.type_;
80  return is;
81  }
82  };
83 
84 
85  // Private Member Functions
86 
87  //- Disallow default bitwise copy construct
89 
90  //- Disallow default bitwise assignment
91  void operator=(const FTRsurfaceFormat<Face>&);
92 
93 
94 public:
95 
96  // Constructors
97 
98  //- Construct from file name
99  FTRsurfaceFormat(const fileName&);
100 
101 
102  // Selectors
103 
104  //- Read file and return surface
106  {
108  (
110  );
111  }
112 
113 
114  // Destructor
115 
117  {}
118 
119 
120  // Member Functions
121 
122  //- Read from file
123  virtual bool read(const fileName&);
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace fileFormats
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #ifdef NoRepository
135 # include "FTRsurfaceFormat.C"
136 #endif
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************ vim: set sw=4 sts=4 et: ************************ //