5 #ifndef _FLUENTDATAEXPORTER_H_
6 #define _FLUENTDATAEXPORTER_H_
20 const string fileName,
22 const int atypeComponent) :
24 _fp(fopen(fileName.c_str(),
"wb")),
30 throw CException(
"FluentDataExporter: cannot open file " + fileName +
36 fprintf(
_fp,
"(4 (60 0 0 1 2 4 4 4 8 8 4))\n");
42 fprintf(
_fp,
"\nEnd of Binary Section 3300");
47 const int fluentFieldId)
54 foreach(
const CellZonesMap::value_type& pos, cellZones)
64 const TArray& aCell =
dynamic_cast<const TArray&
>(field[cells]);
65 fprintf(
_fp,
"(%d (%d %d 1 0 1 %d %d)\n(",
79 fprintf(
_fp,
"(%d (%d %d 1 0 1 %d %d)\n(",
83 int cbeg = faceCells(0,1);
91 const TArray& aFaces =
dynamic_cast<const TArray&
>(field[faces]);
98 fprintf(
_fp,
"(%d (%d %d 1 0 1 %d %d)\n(",
101 writer.
write(
_fp,aFaces,faceOffset,count);
113 fprintf(
_fp,
"(%d (%d %d 1 0 1 %d %d)\n(",
133 for(
int nd=0; nd<3; nd++)
137 foreach(
const CellZonesMap::value_type& pos, cellZones)
146 const VectorT3Array& aCell =
dynamic_cast<const VectorT3Array&
>(field[cells]);
148 fprintf(
_fp,
"(%d (%d %d 1 0 1 %d %d)\n(",
162 fprintf(
_fp,
"(%d (%d %d 1 0 1 %d %d)\n(",
166 int cbeg = faceCells(0,1);
const FaceGroupList & getBoundaryFaceGroups() const
virtual void write(FILE *fp, const ArrayType &array, const int iBeg, int count, const Array< bool > *mask=0)
shared_ptr< FaceGroup > FaceGroupPtr
bool hasArray(const StorageSite &s) const
void writeVectorField(const Field &field, const int fluentFieldId)
void writeScalarField(const Field &field, const int fluentFieldId)
map< int, FluentFaceZone * > FaceZonesMap
void write(FILE *fp, const Array< T > &array, const int iBeg, int count, const Array< bool > *mask=0)
Array< Vector< double, 3 > > VectorT3Array
FaceZonesMap & getFaceZones()
map< int, FluentCellZone * > CellZonesMap
CellZonesMap & getCellZones()
const StorageSite & getFaces() const
const StorageSite & getCells() const
const CRConnectivity & getFaceCells(const StorageSite &site) const
vector< int > interiorZoneIds
FluentDataExporter(FluentReader &reader, const string fileName, const bool binary, const int atypeComponent)
const int _atypeComponent