FIREMeshReader.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) 2016-2018 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::fileFormats::FIREMeshReader
28
29Description
30 Read AVL/FIRE fpma, fpmb files.
31
32Note
33 Does not handle compressed versions (fpmaz, fpmbz) of these files.
34
35SourceFiles
36 FIREMeshReader.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef FIREMeshReader_H
41#define FIREMeshReader_H
42
43#include "meshReader.H"
44#include "FIRECore.H"
45#include "labelList.H"
46#include "IFstream.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52// Forward declarations
53class polyMesh;
55namespace fileFormats
56{
57
58/*---------------------------------------------------------------------------*\
59 Class fileFormats::FIREMeshReader Declaration
60\*---------------------------------------------------------------------------*/
63:
64 public meshReader,
65 public FIRECore
66{
67
68protected:
69
70 // Protected Data
77
78
79 // Protected Member Functions
80
81 //- No copy construct
82 FIREMeshReader(const FIREMeshReader&) = delete;
83
84 //- No copy assignment
85 void operator=(const FIREMeshReader&) = delete;
86
87
88 //- Read the mesh from the file(s)
89 virtual bool readGeometry(const scalar scaleFactor = 1.0);
90
91 //- Read points from file
92 void readPoints(ISstream&, const scalar scaleFactor = 1.0);
93
94 //- Read points from file
95 void readFaces(ISstream&);
96
97 //- Read cell connectivities from file
98 void readCells(ISstream&);
99
100 //- Read cell/face selections from file
102
103 //-
104 void reorganize();
105
106 void addPatches(polyMesh&) const;
107
108
109public:
110
111 // Constructors
112
113 //- Construct by reading file, optionally with scaling
114 FIREMeshReader(const fileName&, const scalar scaleFactor = 1.0);
115
116
117 //- Destructor
118 virtual ~FIREMeshReader() = default;
119
120
121 // Member Functions
122
123 //- Create and return polyMesh
124 virtual autoPtr<polyMesh> mesh(const objectRegistry&);
125
126};
127
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131} // End namespace fileFormats
132} // End namespace Foam
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136#endif
137
138// ************************************************************************* //
Generic input stream using a standard (STL) stream.
Definition: ISstream.H:58
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Core routines used when reading/writing AVL/FIRE files.
Definition: FIRECore.H:61
Read AVL/FIRE fpma, fpmb files.
void readFaces(ISstream &)
Read points from file.
virtual ~FIREMeshReader()=default
Destructor.
void readCells(ISstream &)
Read cell connectivities from file.
void operator=(const FIREMeshReader &)=delete
No copy assignment.
void readSelections(ISstream &)
Read cell/face selections from file.
void addPatches(polyMesh &) const
FIREMeshReader(const FIREMeshReader &)=delete
No copy construct.
virtual bool readGeometry(const scalar scaleFactor=1.0)
Read the mesh from the file(s)
void readPoints(ISstream &, const scalar scaleFactor=1.0)
Read points from file.
A class for handling file names.
Definition: fileName.H:76
This class supports creating polyMeshes with baffles.
Definition: meshReader.H:69
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
dynamicFvMesh & mesh
Namespace for OpenFOAM.