Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
DataFormats.h
Go to the documentation of this file.
1
#ifndef DATA_FORMATS_H
2
#define DATA_FORMATS_H
3
4
// The DataFormats class handles IO and conversion between different
5
// data formats such as Plot3d, Ingrid, ply, ...
6
7
#include "
Mapping.h
"
8
#include "
MappingInformation.h
"
9
10
// Forward declarations:
11
class
DataPointMapping
;
12
class
UnstructuredMapping
;
13
class
GenericGraphicsInterface
;
14
class
MappedGrid
;
15
class
CompositeGrid
;
16
class
floatCompositeGridFunction
;
17
class
doubleCompositeGridFunction
;
18
#ifdef OV_USE_DOUBLE
19
typedef
doubleCompositeGridFunction
realCompositeGridFunction
;
20
#else
21
typedef
floatCompositeGridFunction
realCompositeGridFunction
;
22
#endif
23
24
class
DataFormats
25
{
26
public
:
27
28
enum
DataFormatsEnum
29
{
30
Plot3d
,
31
IGES
,
32
Ingrid
,
33
Ply
34
};
35
36
37
// DataFormats(GenericGraphicsInterface *ggiPointer=NULL );
38
// virtual ~DataFormats();
39
40
// virtual int setGraphicsInterface( GenericGraphicsInterface *ggiPointer=NULL );
41
42
// read in a single grid from a file, optionally read a mask (iblank) array
43
static
int
readPlot3d
(
DataPointMapping
& dpm,
44
int
gridToRead=-1,
45
const
aString
& gridFileName=
nullString
,
46
intArray *maskPointer=
NULL
,
47
const
bool
expectIblank=
false
);
48
49
// read in all grids from a file.
50
static
int
readPlot3d
(
MappingInformation
& mapInfo,
51
const
aString
& gridFileName
/*=nullString*/
,
52
intArray *&maskPointer,
53
const
bool
expectIblank=
false
);
54
55
// read in a solution array and parameters from a file
56
static
int
readPlot3d
(
realArray
& q,
RealArray
& par,
57
const
aString
& qFileName=
nullString
);
58
59
// read in all solutions and parameters from a file
60
static
int
readPlot3d
(
realArray
*& q,
RealArray
& par,
61
const
aString
& qFileName=
nullString
);
62
63
// read in an unstructured Mapping from an Ingrid file
64
static
int
readIngrid
(
UnstructuredMapping
&map,
65
const
aString
& gridFileName=
nullString
);
66
67
static
int
readTecplot
(
ListOfMappingRC
&mList,
const
aString
&gridFileName =
nullString
);
68
69
static
int
readCart3dTri
(
ListOfMappingRC
&mList,
const
aString
&gridFileName =
nullString
);
70
71
#if 0
72
// read in an unstructured mesh into a mapped grid
73
static
int
readIngrid
(
MappedGrid
&mg,
74
const
aString
& gridFileName=
nullString
);
75
#endif
76
77
// read in an unstructured Mapping from a Ply polygonal file (Stanford/graphics)
78
static
int
readPly
(
UnstructuredMapping
&map,
79
const
aString
&gridFileName =
nullString
);
80
81
// read in an unstructured Mapping from an STL file
82
static
int
readSTL
(
UnstructuredMapping
&map,
83
const
aString
& stlFileName =
nullString
);
84
85
// save a Mapping in plot3d format
86
static
int
writePlot3d
(
Mapping
& map,
87
const
aString
& gridFileName=
nullString
);
88
89
// save a MappedGrid in plot3d format
90
static
int
writePlot3d
(
MappedGrid
& mg,
91
const
aString
& gridFileName=
nullString
);
92
93
// save a CompositeGrid in plot3d format
94
static
int
writePlot3d
(
CompositeGrid
& cg,
95
const
aString
& gridFileName=
nullString
,
96
const
aString
& interpolationDataFileName=
nullString
);
97
98
// save a realCompositeGridFunction in a plot3d "q" file.
99
static
int
writePlot3d
(
realCompositeGridFunction
& u,
100
const
RealArray
& par );
101
102
// write a Mapping to an Ingrid file
103
static
int
writeIngrid
(
Mapping
&map,
104
const
aString
& gridFileName=
nullString
);
105
106
// write a ComposteGrid to an Ingrid file
107
static
int
writeIngrid
(
CompositeGrid
& cg,
108
const
aString
& gridFileName=
nullString
);
109
110
protected
:
111
112
static
int
readPlot3d
(
MappingInformation
& mapInfo,
113
int
gridToRead,
114
const
aString
& plot3dFileName,
115
DataPointMapping
*dpmPointer,
116
realArray
*&qPointer,
117
RealArray
& par
/*= Overture::nullRealArray()*/
,
118
intArray *&maskPointer
/*=NULL*/
,
119
const
bool
expectIblank
/* =false */
);
120
121
// GenericGraphicsInterface *giPointer;
122
123
};
124
125
#endif
Generated on Fri Jan 4 2013 10:17:50 for Overture by
1.8.3