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) 2011-2015 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::FTRsurfaceFormat
26 
27 Description
28  Reading of the (now deprecated and infrequently used)
29  Foam Trisurface Format.
30 
31 Deprecated
32  Other formats are better. (deprecated Mar 2009)
33 
34 SourceFiles
35  FTRsurfaceFormat.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef FTRsurfaceFormat_H
40 #define FTRsurfaceFormat_H
41 
42 #include "IFstream.H"
43 #include "MeshedSurface.H"
44 #include "UnsortedMeshedSurface.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace fileFormats
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class FTRsurfaceFormat Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class Face>
58 class FTRsurfaceFormat
59 :
60  public UnsortedMeshedSurface<Face>
61 {
62  // Private classes
63 
64  //- Read compatibility for ftr patch definitions
65  class ftrPatch
66  {
67  //- Name of patch
68  word name_;
69 
70  //- Type of patch (ignored since it is usually "empty")
71  word type_;
72 
73  public:
74 
75  const word& name() const
76  {
77  return name_;
78  }
79 
80  friend Istream& operator>>(Istream& is, ftrPatch& p)
81  {
82  is >> p.name_ >> p.type_;
83  return is;
84  }
85  };
86 
87 
88  // Private Member Functions
89 
90  //- Disallow default bitwise copy construct
92 
93  //- Disallow default bitwise assignment
94  void operator=(const FTRsurfaceFormat<Face>&);
95 
96 
97 public:
98 
99  // Constructors
100 
101  //- Construct from file name
102  FTRsurfaceFormat(const fileName&);
103 
104 
105  // Selectors
106 
107  //- Read file and return surface
109  {
111  (
113  );
114  }
115 
116 
117  //- Destructor
118  virtual ~FTRsurfaceFormat()
119  {}
120 
121 
122  // Member Functions
123 
124  //- Read from file
125  virtual bool read(const fileName&);
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace fileFormats
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #ifdef NoRepository
137 # include "FTRsurfaceFormat.C"
138 #endif
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
Foam::fileFormats::FTRsurfaceFormat::FTRsurfaceFormat
FTRsurfaceFormat(const FTRsurfaceFormat< Face > &)
Disallow default bitwise copy construct.
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::fileFormats::FTRsurfaceFormat::ftrPatch::name
const word & name() const
Definition: FTRsurfaceFormat.H:74
Foam::fileFormats::FTRsurfaceFormat
Reading of the (now deprecated and infrequently used) Foam Trisurface Format.
Definition: FTRsurfaceFormat.H:57
Foam::fileFormats::FTRsurfaceFormat::ftrPatch::type_
word type_
Type of patch (ignored since it is usually "empty")
Definition: FTRsurfaceFormat.H:70
Foam::fileFormats::FTRsurfaceFormat::operator=
void operator=(const FTRsurfaceFormat< Face > &)
Disallow default bitwise assignment.
Foam::fileFormats::FTRsurfaceFormat::ftrPatch::operator>>
friend Istream & operator>>(Istream &is, ftrPatch &p)
Definition: FTRsurfaceFormat.H:79
UnsortedMeshedSurface.H
FTRsurfaceFormat.C
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::UnsortedMeshedSurface
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
Definition: MeshedSurface.H:74
Foam::fileFormats::FTRsurfaceFormat::ftrPatch::name_
word name_
Name of patch.
Definition: FTRsurfaceFormat.H:67
IFstream.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::fileFormats::FTRsurfaceFormat::~FTRsurfaceFormat
virtual ~FTRsurfaceFormat()
Destructor.
Definition: FTRsurfaceFormat.H:117
Foam::fileFormats::FTRsurfaceFormat::New
static autoPtr< UnsortedMeshedSurface< Face > > New(const fileName &name)
Read file and return surface.
Definition: FTRsurfaceFormat.H:107
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::fileFormats::FTRsurfaceFormat::ftrPatch
Read compatibility for ftr patch definitions.
Definition: FTRsurfaceFormat.H:64
Foam::fileFormats::FTRsurfaceFormat::read
virtual bool read(const fileName &)
Read from file.
Definition: FTRsurfaceFormat.C:46
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
MeshedSurface.H