1 /*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkFLUENTReader.cxx
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14 =========================================================================*/
15 // Thanks to Brian W. Dotson & Terry E. Jordan (Department of Energy, National
16 // Energy Technology Laboratory) & Douglas McCorkle (Iowa State University)
17 // who developed this class.
18 //
19 // Please address all comments to Brian Dotson (brian.dotson@netl.doe.gov) &
20 // Terry Jordan (terry.jordan@sa.netl.doe.gov)
21 // & Doug McCorkle (mccdo@iastate.edu)
22
23 #include "vtkFLUENTReader.h"
24 #include "vtkDataArraySelection.h"
25 #include "vtkErrorCode.h"
26 #include "vtkMultiBlockDataSet.h"
27 #include "vtkUnstructuredGrid.h"
28 #include "vtkInformation.h"
29 #include "vtkInformationVector.h"
30 #include "vtkObjectFactory.h"
31 #include "vtkFieldData.h"
32 #include "vtkPointData.h"
33 #include "vtkCellData.h"
34 #include "vtkByteSwap.h"
35 #include "vtkIdTypeArray.h"
36 #include "vtkFloatArray.h"
37 #include "vtkIntArray.h"
38 #include "vtkByteSwap.h"
39 #include "vtkCellArray.h"
40 #include "vtkHexahedron.h"
41 #include "vtkDoubleArray.h"
42 #include "vtkPoints.h"
43 #include "vtkTriangle.h"
44 #include "vtkQuad.h"
45 #include "vtkTetra.h"
46 #include "vtkWedge.h"
47 #include "vtkPyramid.h"
48 #include "vtkConvexPointSet.h"
49
50 #include <string>
51 #include <map>
52 #include <vector>
53 #include <set>
54 #include "fstream"
55 #include <sstream>
56 #include <algorithm>
57
58 #include <cctype>
59 #include <sys/stat.h>
60
61 vtkStandardNewMacro(vtkFLUENTReader);
62
63 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
64 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
65
66 //Structures
67 struct vtkFLUENTReader::Cell
68 {
69 int type;
70 int zone;
71 std::vector< int > faces;
72 int parent;
73 int child;
74 std::vector< int > nodes;
75 };
76
77 struct vtkFLUENTReader::Face
78 {
79 int type;
80 unsigned int zone;
81 std::vector< int > nodes;
82 int c0;
83 int c1;
84 int periodicShadow;
85 int parent;
86 int child;
87 int interfaceFaceParent;
88 int interfaceFaceChild;
89 int ncgParent;
90 int ncgChild;
91 };
92
93 struct vtkFLUENTReader::ScalarDataChunk
94 {
95 int subsectionId;
96 unsigned int zoneId;
97 std::vector< double > scalarData;
98 };
99
100 struct vtkFLUENTReader::VectorDataChunk
101 {
102 int subsectionId;
103 unsigned int zoneId;
104 std::vector< double > iComponentData;
105 std::vector< double > jComponentData;
106 std::vector< double > kComponentData;
107 };
108
109 struct vtkFLUENTReader::stdString
110 {
111 std::string value;
112 };
113 struct vtkFLUENTReader::intVector
114 {
115 std::vector<int> value;
116 };
117 struct vtkFLUENTReader::doubleVector
118 {
119 std::vector<double> value;
120 };
121 struct vtkFLUENTReader::stringVector
122 {
123 std::vector< std::string > value;
124 };
125 struct vtkFLUENTReader::cellVector
126 {
127 std::vector< Cell > value;
128 };
129 struct vtkFLUENTReader::faceVector
130 {
131 std::vector< Face > value;
132 };
133 struct vtkFLUENTReader::stdMap
134 {
135 std::map< int, std::string > value;
136 };
137 struct vtkFLUENTReader::scalarDataVector
138 {
139 std::vector< ScalarDataChunk > value;
140 };
141 struct vtkFLUENTReader::vectorDataVector
142 {
143 std::vector< VectorDataChunk > value;
144 };
145 struct vtkFLUENTReader::intVectorVector
146 {
147 std::vector< std::vector< int > > value;
148 };
149
150 //----------------------------------------------------------------------------
vtkFLUENTReader()151 vtkFLUENTReader::vtkFLUENTReader()
152 {
153 this->SwapBytes = 0;
154 this->SetNumberOfInputPorts(0);
155 this->FileName = nullptr;
156 this->Points = vtkPoints::New();
157 this->Triangle = vtkTriangle::New();
158 this->Tetra = vtkTetra::New();
159 this->Quad = vtkQuad::New();
160 this->Hexahedron = vtkHexahedron::New();
161 this->Pyramid = vtkPyramid::New();
162 this->Wedge = vtkWedge::New();
163 this->ConvexPointSet = vtkConvexPointSet::New();
164
165 this->CaseBuffer = new stdString;
166 this->DataBuffer = new stdString;
167 this->Cells = new cellVector;
168 this->Faces = new faceVector;
169 this->VariableNames = new stdMap;
170 this->CellZones = new intVector;
171 this->ScalarDataChunks = new scalarDataVector;
172 this->VectorDataChunks = new vectorDataVector;
173 this->SubSectionZones = new intVectorVector;
174 this->SubSectionIds = new intVector;
175 this->SubSectionSize = new intVector;
176 this->ScalarVariableNames = new stringVector;
177 this->ScalarSubSectionIds = new intVector;
178 this->VectorVariableNames = new stringVector;
179 this->VectorSubSectionIds = new intVector;
180 this->FluentCaseFile = new ifstream;
181 this->FluentDataFile = new ifstream;
182
183 this->NumberOfCells=0;
184
185 this->CellDataArraySelection = vtkDataArraySelection::New();
186 this->SetDataByteOrderToLittleEndian();
187 }
188
189 //----------------------------------------------------------------------------
~vtkFLUENTReader()190 vtkFLUENTReader::~vtkFLUENTReader()
191 {
192 this->Points->Delete();
193 this->Triangle->Delete();
194 this->Tetra->Delete();
195 this->Quad->Delete();
196 this->Hexahedron->Delete();
197 this->Pyramid->Delete();
198 this->Wedge->Delete();
199 this->ConvexPointSet->Delete();
200
201 delete this->CaseBuffer;
202 delete this->DataBuffer;
203 delete this->Cells;
204 delete this->Faces;
205 delete this->VariableNames;
206 delete this->CellZones;
207 delete this->ScalarDataChunks;
208 delete this->VectorDataChunks;
209 delete this->SubSectionZones;
210 delete this->SubSectionIds;
211 delete this->SubSectionSize;
212 delete this->ScalarVariableNames;
213 delete this->ScalarSubSectionIds;
214 delete this->VectorVariableNames;
215 delete this->VectorSubSectionIds;
216 delete this->FluentCaseFile;
217 delete this->FluentDataFile;
218
219 this->CellDataArraySelection->Delete();
220
221 delete[] this->FileName;
222 }
223
224 //----------------------------------------------------------------------------
RequestData(vtkInformation * vtkNotUsed (request),vtkInformationVector ** vtkNotUsed (inputVector),vtkInformationVector * outputVector)225 int vtkFLUENTReader::RequestData(
226 vtkInformation *vtkNotUsed(request),
227 vtkInformationVector **vtkNotUsed(inputVector),
228 vtkInformationVector *outputVector)
229 {
230 if (!this->FileName)
231 {
232 vtkErrorMacro("FileName has to be specified!");
233 return 0;
234 }
235
236 vtkInformation *outInfo = outputVector->GetInformationObject(0);
237
238 vtkMultiBlockDataSet *output = vtkMultiBlockDataSet::SafeDownCast(
239 outInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT()));
240
241 output->SetNumberOfBlocks(
242 static_cast< unsigned int >(this->CellZones->value.size()) );
243 //vtkUnstructuredGrid *Grid[CellZones.size()];
244
245 std::vector< vtkUnstructuredGrid * > grid;
246 grid.resize(this->CellZones->value.size());
247
248 for(int test=0; test < (int)this->CellZones->value.size(); test++)
249 {
250 grid[test] = vtkUnstructuredGrid::New();
251 }
252
253 for (int i = 0; i < (int)this->Cells->value.size(); i++)
254 {
255 int location =
256 std::find(this->CellZones->value.begin(),
257 this->CellZones->value.end(),
258 this->Cells->value[i].zone) -
259 this->CellZones->value.begin();
260 ;
261 if (this->Cells->value[i].type == 1 )
262 {
263 for (int j = 0; j < 3; j++)
264 {
265 this->Triangle->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
266 }
267 grid[location]->InsertNextCell(this->Triangle->GetCellType(),
268 this->Triangle->GetPointIds());
269 }
270 else if (this->Cells->value[i].type == 2 )
271 {
272 for (int j = 0; j < 4; j++)
273 {
274 this->Tetra->GetPointIds()->SetId(j, Cells->value[i].nodes[j]);
275 }
276 grid[location]->InsertNextCell(this->Tetra->GetCellType(),
277 this->Tetra->GetPointIds());
278 }
279 else if (this->Cells->value[i].type == 3 )
280 {
281 for (int j = 0; j < 4; j++)
282 {
283 this->Quad->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
284 }
285 grid[location]->InsertNextCell(this->Quad->GetCellType(),
286 this->Quad->GetPointIds());
287 }
288 else if (this->Cells->value[i].type == 4 )
289 {
290 for (int j = 0; j < 8; j++)
291 {
292 this->Hexahedron->GetPointIds()->
293 SetId(j, this->Cells->value[i].nodes[j]);
294 }
295 grid[location]->InsertNextCell(this->Hexahedron->GetCellType(),
296 this->Hexahedron->GetPointIds());
297 }
298 else if (this->Cells->value[i].type == 5 )
299 {
300 for (int j = 0; j < 5; j++)
301 {
302 this->Pyramid->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
303 }
304 grid[location]->InsertNextCell(this->Pyramid->GetCellType(),
305 this->Pyramid->GetPointIds());
306 }
307 else if (this->Cells->value[i].type == 6 )
308 {
309 for (int j = 0; j < 6; j++)
310 {
311 this->Wedge->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
312 }
313 grid[location]->InsertNextCell(this->Wedge->GetCellType(),
314 this->Wedge->GetPointIds());
315 }
316 else if (this->Cells->value[i].type == 7 )
317 {
318 this->ConvexPointSet->GetPointIds()->
319 SetNumberOfIds(static_cast<vtkIdType>(this->Cells->value[i].nodes.size()));
320 for (int j = 0; j < (int)this->Cells->value[i].nodes.size(); j++)
321 {
322 this->ConvexPointSet->GetPointIds()->
323 SetId(j, this->Cells->value[i].nodes[j]);
324 }
325 grid[location]->InsertNextCell(this->ConvexPointSet->GetCellType(),
326 this->ConvexPointSet->GetPointIds());
327 }
328 }
329 // this->Cells->value.clear();
330
331 //Scalar Data
332 for (int l = 0; l < (int)this->ScalarDataChunks->value.size(); l++)
333 {
334 int location =
335 std::find(this->CellZones->value.begin(),
336 this->CellZones->value.end(),
337 this->ScalarDataChunks->value[l].zoneId) -
338 this->CellZones->value.begin();
339
340 vtkDoubleArray *v = vtkDoubleArray::New();
341 for (int m = 0; m <
342 (int)this->ScalarDataChunks->value[l].scalarData.size(); m++)
343 {
344 v->InsertValue(m, this->ScalarDataChunks->value[l].scalarData[m]);
345 }
346 //v->SetName(this->ScalarVariableNames->
347 // value[l/this->CellZones->value.size()].c_str());
348 v->SetName(this->VariableNames->
349 value[this->ScalarDataChunks->value[l].subsectionId].c_str());
350 grid[location]->GetCellData()->AddArray(v);
351 v->Delete();
352 }
353 this->ScalarDataChunks->value.clear();
354
355 //Vector Data
356 for (int l = 0; l < (int)this->VectorDataChunks->value.size(); l++)
357 {
358 int location =
359 std::find(this->CellZones->value.begin(),
360 this->CellZones->value.end(),
361 this->VectorDataChunks->value[l].zoneId) -
362 this->CellZones->value.begin();
363 vtkDoubleArray *v = vtkDoubleArray::New();
364 v->SetNumberOfComponents(3);
365 for (int m = 0;
366 m < (int)this->VectorDataChunks->value[l].iComponentData.size(); m++)
367 {
368 v->InsertComponent(m, 0,
369 this->VectorDataChunks->value[l].iComponentData[m]);
370 v->InsertComponent(m, 1,
371 this->VectorDataChunks->value[l].jComponentData[m]);
372 v->InsertComponent(m, 2,
373 this->VectorDataChunks->value[l].kComponentData[m]);
374 }
375 //v->SetName(this->VectorVariableNames->
376 // value[l/this->CellZones->value.size()].c_str());
377 v->SetName(this->VariableNames->
378 value[this->VectorDataChunks->value[l].subsectionId].c_str());
379 grid[location]->GetCellData()->AddArray(v);
380 v->Delete();
381 }
382 this->VectorDataChunks->value.clear();
383
384 for(int addTo = 0; addTo < (int)this->CellZones->value.size(); addTo++)
385 {
386 grid[addTo]->SetPoints(Points);
387 output->SetBlock(addTo, grid[addTo]);
388 grid[addTo]->Delete();
389 }
390 return 1;
391 }
392
393 //----------------------------------------------------------------------------
PrintSelf(ostream & os,vtkIndent indent)394 void vtkFLUENTReader::PrintSelf(ostream& os, vtkIndent indent)
395 {
396 this->Superclass::PrintSelf(os,indent);
397 os << indent << "File Name: "
398 << (this->FileName ? this->FileName : "(none)") << endl;
399 os << indent << "Number Of Cells: " << this->NumberOfCells << endl;
400 }
401
402 //----------------------------------------------------------------------------
RequestInformation(vtkInformation * vtkNotUsed (request),vtkInformationVector ** vtkNotUsed (inputVector),vtkInformationVector * vtkNotUsed (outputVector))403 int vtkFLUENTReader::RequestInformation(
404 vtkInformation *vtkNotUsed(request),
405 vtkInformationVector **vtkNotUsed(inputVector),
406 vtkInformationVector *vtkNotUsed(outputVector))
407 {
408 if (!this->FileName)
409 {
410 vtkErrorMacro("FileName has to be specified!");
411 return 0;
412 }
413
414 if(!this->OpenCaseFile(this->FileName))
415 {
416 vtkErrorMacro("Unable to open cas file.");
417 return 0;
418 }
419
420 int dat_file_opened = this->OpenDataFile(this->FileName);
421 if(!dat_file_opened)
422 {
423 vtkWarningMacro("Unable to open dat file.");
424 }
425
426 this->LoadVariableNames();
427 this->ParseCaseFile(); // Reads Necessary Information from the .cas file.
428 this->CleanCells(); // Removes unnecessary faces from the cells.
429 this->PopulateCellNodes();
430 this->GetNumberOfCellZones();
431 this->NumberOfScalars = 0;
432 this->NumberOfVectors = 0;
433 if(dat_file_opened)
434 {
435 this->ParseDataFile();
436 }
437 for (int i = 0; i < (int)this->SubSectionIds->value.size(); i++)
438 {
439 if (this->SubSectionSize->value[i] == 1)
440 {
441 this->CellDataArraySelection->AddArray(this->VariableNames->value[this->
442 SubSectionIds->value[i]].c_str());
443 this->ScalarVariableNames->value.
444 push_back(this->VariableNames->value[this->SubSectionIds->value[i]]);
445 this->ScalarSubSectionIds->value.push_back(this->SubSectionIds->value[i]);
446 }
447 else if (this->SubSectionSize->value[i] == 3)
448 {
449 this->CellDataArraySelection->
450 AddArray(this->VariableNames->
451 value[this->SubSectionIds->value[i]].c_str());
452 this->VectorVariableNames->value.push_back(this->VariableNames->value[
453 this->SubSectionIds->value[i]]);
454 this->VectorSubSectionIds->value.push_back(this->SubSectionIds->value[i]);
455 }
456 }
457 this->NumberOfCells = (int)this->Cells->value.size();
458 return 1;
459 }
460
461 //----------------------------------------------------------------------------
OpenCaseFile(const char * filename)462 bool vtkFLUENTReader::OpenCaseFile(const char *filename)
463 {
464 #ifdef _WIN32
465 //this->FluentCaseFile->open(filename, ios::in | ios::binary);
466 this->FluentCaseFile = new ifstream(filename, ios::in | ios::binary);
467 #else
468 //this->FluentCaseFile->open(filename, ios::in);
469 this->FluentCaseFile = new ifstream(filename, ios::in);
470 #endif
471
472 if (!this->FluentCaseFile->fail())
473 {
474 return true;
475 }
476 else
477 {
478 return false;
479 }
480 }
481
482 //----------------------------------------------------------------------------
GetNumberOfCellArrays()483 int vtkFLUENTReader::GetNumberOfCellArrays()
484 {
485 return this->CellDataArraySelection->GetNumberOfArrays();
486 }
487
488 //----------------------------------------------------------------------------
GetCellArrayName(int index)489 const char* vtkFLUENTReader::GetCellArrayName(int index)
490 {
491 return this->CellDataArraySelection->GetArrayName(index);
492 }
493
494 //----------------------------------------------------------------------------
GetCellArrayStatus(const char * name)495 int vtkFLUENTReader::GetCellArrayStatus(const char* name)
496 {
497 return this->CellDataArraySelection->ArrayIsEnabled(name);
498 }
499
500 //----------------------------------------------------------------------------
SetCellArrayStatus(const char * name,int status)501 void vtkFLUENTReader::SetCellArrayStatus(const char* name, int status)
502 {
503 if(status)
504 {
505 this->CellDataArraySelection->EnableArray(name);
506 }
507 else
508 {
509 this->CellDataArraySelection->DisableArray(name);
510 }
511 }
512
513 //----------------------------------------------------------------------------
EnableAllCellArrays()514 void vtkFLUENTReader::EnableAllCellArrays()
515 {
516 this->CellDataArraySelection->EnableAllArrays();
517 }
518
519 //----------------------------------------------------------------------------
DisableAllCellArrays()520 void vtkFLUENTReader::DisableAllCellArrays()
521 {
522 this->CellDataArraySelection->DisableAllArrays();
523 }
524
525 //----------------------------------------------------------------------------
526
527 //----------------------------------------------------------------------------
OpenDataFile(const char * filename)528 bool vtkFLUENTReader::OpenDataFile(const char *filename)
529 {
530 std::string dfilename(filename);
531 dfilename.erase(dfilename.length()-3, 3);
532 dfilename.append("dat");
533
534 #ifdef _WIN32
535 //this->FluentDataFile->open(dfilename.c_str(), ios::in | ios::binary);
536 this->FluentDataFile = new ifstream(dfilename.c_str(), ios::in | ios::binary);
537 #else
538 //this->FluentDataFile->open(dfilename.c_str(), ios::in);
539 this->FluentDataFile = new ifstream(dfilename.c_str(), ios::in);
540 #endif
541
542 if (this->FluentDataFile->fail())
543 {
544 return false;
545 }
546 else
547 {
548 return true;
549 }
550 }
551
552 //----------------------------------------------------------------------------
GetCaseChunk()553 int vtkFLUENTReader::GetCaseChunk ()
554 {
555 this->CaseBuffer->value = ""; // Clear buffer
556
557 //
558 // Look for beginning of chunk
559 //
560 while(this->FluentCaseFile->peek() != '(')
561 {
562 this->FluentCaseFile->get();
563 if (this->FluentCaseFile->eof())
564 {
565 return 0;
566 }
567 }
568
569 //
570 // Figure out whether this is a binary or ascii chunk.
571 // If the index is 3 digits or more, then binary, otherwise ascii.
572 //
573 std::string index;
574 while(this->FluentCaseFile->peek() != ' ')
575 {
576 //index.push_back(this->FluentCaseFile->peek());
577 index += this->FluentCaseFile->peek();
578 //this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
579 this->CaseBuffer->value += this->FluentCaseFile->get();
580 if (this->FluentCaseFile->eof())
581 {
582 return 0;
583 }
584 }
585
586 index.erase(0,1); // Get rid of the "("
587
588 //
589 // Grab the chunk and put it in buffer.
590 // You have to look for the end of section std::string if it is
591 // a binary chunk.
592 //
593
594 if (index.size() > 2)
595 { // Binary Chunk
596 char end[120];
597 strcpy(end, "End of Binary Section ");
598 strcat(end, index.c_str());
599 strcat(end, ")");
600 size_t len = strlen(end);
601
602 // Load the case buffer enough to start comparing to the end std::string.
603 while (this->CaseBuffer->value.size() < len)
604 {
605 //this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
606 this->CaseBuffer->value += this->FluentCaseFile->get();
607 }
608
609 //while (CaseBuffer.compare(CaseBuffer.size()-strlen(end),
610 //strlen(end), end))
611 while (strcmp(this->CaseBuffer->value.c_str()+
612 (this->CaseBuffer->value.size()-len), end))
613 {
614 //this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
615 this->CaseBuffer->value += this->FluentCaseFile->get();
616 }
617
618 }
619 else
620 { // Ascii Chunk
621 int level = 0;
622 while ((this->FluentCaseFile->peek() != ')') || (level != 0) )
623 {
624 //this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
625 this->CaseBuffer->value += this->FluentCaseFile->get();
626 if (this->CaseBuffer->value.at(this->CaseBuffer->value.length()-1) == '(')
627 {
628 level++;
629 }
630 if (this->CaseBuffer->value.at(this->CaseBuffer->value.length()-1) == ')')
631 {
632 level--;
633 }
634 if (this->FluentCaseFile->eof())
635 {
636 return 0;
637 }
638 }
639 //this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
640 this->CaseBuffer->value += this->FluentCaseFile->get();
641 }
642 return 1;
643 }
644
645 //----------------------------------------------------------------------------
GetCaseIndex()646 int vtkFLUENTReader::GetCaseIndex()
647 {
648 std::string sindex;
649
650 int i = 1;
651 while (this->CaseBuffer->value.at(i) != ' ')
652 {
653 //sindex.push_back(this->CaseBuffer->value.at(i++));
654 sindex += this->CaseBuffer->value.at(i++);
655 }
656 return atoi(sindex.c_str());
657 }
658
659 //----------------------------------------------------------------------------
GetNumberOfCellZones()660 void vtkFLUENTReader::GetNumberOfCellZones()
661 {
662 int match;
663
664 for (int i = 0; i < (int)this->Cells->value.size(); i++)
665 {
666 if (this->CellZones->value.empty())
667 {
668 this->CellZones->value.push_back(this->Cells->value[i].zone);
669 }
670 else
671 {
672 match = 0;
673 for (int j = 0; j < (int)this->CellZones->value.size(); j++)
674 {
675 if (this->CellZones->value[j] == this->Cells->value[i].zone)
676 {
677 match = 1;
678 }
679 }
680 if (match == 0)
681 {
682 this->CellZones->value.push_back(this->Cells->value[i].zone);
683 }
684 }
685 }
686 }
687
688
689 //----------------------------------------------------------------------------
GetDataIndex()690 int vtkFLUENTReader::GetDataIndex()
691 {
692 std::string sindex;
693
694 int i = 1;
695 while (this->DataBuffer->value.at(i) != ' ')
696 {
697 //sindex.push_back(this->DataBuffer->value.at(i++));
698 sindex += this->DataBuffer->value.at(i++);
699 }
700 return atoi(sindex.c_str());
701 }
702
703 //----------------------------------------------------------------------------
GetDataChunk()704 int vtkFLUENTReader::GetDataChunk ()
705 {
706 this->DataBuffer->value = ""; // Clear buffer
707 //
708 // Look for beginning of chunk
709 //
710 while(this->FluentDataFile->peek() != '(')
711 {
712 this->FluentDataFile->get();
713 if (this->FluentDataFile->eof())
714 {
715 return 0;
716 }
717 }
718
719 //
720 // Figure out whether this is a binary or ascii chunk.
721 // If the index is 3 digits or more, then binary, otherwise ascii.
722 //
723 std::string index;
724 while(this->FluentDataFile->peek() != ' ')
725 {
726 //index.push_back(this->FluentDataFile->peek());
727 index += this->FluentDataFile->peek();
728 //this->DataBuffer->value.push_back(this->FluentDataFile->get());
729 this->DataBuffer->value += this->FluentDataFile->get();
730 if (this->FluentDataFile->eof())
731 {
732 return 0;
733 }
734 }
735
736 index.erase(0,1); // Get rid of the "("
737
738 //
739 // Grab the chunk and put it in buffer.
740 // You have to look for the end of section std::string if it is
741 // a binary chunk.
742 //
743 if (index.size() > 3)
744 { // Binary Chunk
745 //it may be in our best interest to do away with the index portion of the
746 //"end" string - we have found a dataset, that although errant, does work
747 //fine in ensight and the index does not match - maybe just an end string
748 //that contains "End of Binary Section" and and a search to relocate the
749 //file pointer to the "))" entry.
750 char end[120];
751 strcpy(end, "End of Binary Section ");
752 //strcat(end, index.c_str());
753 //strcat(end, ")");
754 size_t len = strlen(end);
755
756 // Load the data buffer enough to start comparing to the end std::string.
757 while (this->DataBuffer->value.size() < len)
758 {
759 //this->DataBuffer->value.push_back(this->FluentDataFile->get());
760 this->DataBuffer->value += this->FluentDataFile->get();
761 }
762
763 //while (DataBuffer.compare(DataBuffer.size()-strlen(end),
764 //strlen(end), end))
765 while (strcmp(this->DataBuffer->value.c_str()+
766 (this->DataBuffer->value.size()-len), end))
767 {
768 //this->DataBuffer->value.push_back(this->FluentDataFile->get());
769 this->DataBuffer->value += this->FluentDataFile->get();
770 }
771
772 }
773 else
774 { // Ascii Chunk
775 int level = 0;
776 while ((this->FluentDataFile->peek() != ')') || (level != 0) )
777 {
778 //this->DataBuffer->value.push_back(this->FluentDataFile->get());
779 this->DataBuffer->value += this->FluentDataFile->get();
780 if (this->DataBuffer->value.at(this->DataBuffer->value.length()-1) == '(')
781 {
782 level++;
783 }
784 if (this->DataBuffer->value.at(this->DataBuffer->value.length()-1) == ')')
785 {
786 level--;
787 }
788 if (this->FluentDataFile->eof())
789 {
790 return 0;
791 }
792 }
793 //this->DataBuffer->value.push_back(this->FluentDataFile->get());
794 this->DataBuffer->value += this->FluentDataFile->get();
795 }
796
797 return 1;
798 }
799
800
LoadVariableNames()801 void vtkFLUENTReader::LoadVariableNames()
802 {
803 this->VariableNames->value[1] = "PRESSURE";
804 this->VariableNames->value[2] = "MOMENTUM";
805 this->VariableNames->value[3] = "TEMPERATURE";
806 this->VariableNames->value[4] = "ENTHALPY";
807 this->VariableNames->value[5] = "TKE";
808 this->VariableNames->value[6] = "TED";
809 this->VariableNames->value[7] = "SPECIES";
810 this->VariableNames->value[8] = "G";
811 this->VariableNames->value[9] = "WSWIRL";
812 this->VariableNames->value[10] = "DPMS_MASS";
813 this->VariableNames->value[11] = "DPMS_MOM";
814 this->VariableNames->value[12] = "DPMS_ENERGY";
815 this->VariableNames->value[13] = "DPMS_SPECIES";
816 this->VariableNames->value[14] = "DVOLUME_DT";
817 this->VariableNames->value[15] = "BODY_FORCES";
818 this->VariableNames->value[16] = "FMEAN";
819 this->VariableNames->value[17] = "FVAR";
820 this->VariableNames->value[18] = "MASS_FLUX";
821 this->VariableNames->value[19] = "WALL_SHEAR";
822 this->VariableNames->value[20] = "BOUNDARY_HEAT_FLUX";
823 this->VariableNames->value[21] = "BOUNDARY_RAD_HEAT_FLUX";
824 this->VariableNames->value[22] = "OLD_PRESSURE";
825 this->VariableNames->value[23] = "POLLUT";
826 this->VariableNames->value[24] = "DPMS_P1_S";
827 this->VariableNames->value[25] = "DPMS_P1_AP";
828 this->VariableNames->value[26] = "WALL_GAS_TEMPERATURE";
829 this->VariableNames->value[27] = "DPMS_P1_DIFF";
830 this->VariableNames->value[28] = "DR_SURF";
831 this->VariableNames->value[29] = "W_M1";
832 this->VariableNames->value[30] = "W_M2";
833 this->VariableNames->value[31] = "DPMS_BURNOUT";
834
835 this->VariableNames->value[32] = "DPMS_CONCENTRATION";
836 this->VariableNames->value[33] = "PDF_MW";
837 this->VariableNames->value[34] = "DPMS_WSWIRL";
838 this->VariableNames->value[35] = "YPLUS";
839 this->VariableNames->value[36] = "YPLUS_UTAU";
840 this->VariableNames->value[37] = "WALL_SHEAR_SWIRL";
841 this->VariableNames->value[38] = "WALL_T_INNER";
842 this->VariableNames->value[39] = "POLLUT0";
843 this->VariableNames->value[40] = "POLLUT1";
844 this->VariableNames->value[41] = "WALL_G_INNER";
845 this->VariableNames->value[42] = "PREMIXC";
846 this->VariableNames->value[43] = "PREMIXC_T";
847 this->VariableNames->value[44] = "PREMIXC_RATE";
848 this->VariableNames->value[45] = "POLLUT2";
849 this->VariableNames->value[46] = "POLLUT3";
850 this->VariableNames->value[47] = "MASS_FLUX_M1";
851 this->VariableNames->value[48] = "MASS_FLUX_M2";
852 this->VariableNames->value[49] = "GRID_FLUX";
853 this->VariableNames->value[50] = "DO_I";
854 this->VariableNames->value[51] = "DO_RECON_I";
855 this->VariableNames->value[52] = "DO_ENERGY_SOURCE";
856 this->VariableNames->value[53] = "DO_IRRAD";
857 this->VariableNames->value[54] = "DO_QMINUS";
858 this->VariableNames->value[55] = "DO_IRRAD_OLD";
859 this->VariableNames->value[56] = "DO_IWX=56";
860 this->VariableNames->value[57] = "DO_IWY";
861 this->VariableNames->value[58] = "DO_IWZ";
862 this->VariableNames->value[59] = "MACH";
863 this->VariableNames->value[60] = "SLIP_U";
864 this->VariableNames->value[61] = "SLIP_V";
865 this->VariableNames->value[62] = "SLIP_W";
866 this->VariableNames->value[63] = "SDR";
867 this->VariableNames->value[64] = "SDR_M1";
868 this->VariableNames->value[65] = "SDR_M2";
869 this->VariableNames->value[66] = "POLLUT4";
870 this->VariableNames->value[67] = "GRANULAR_TEMPERATURE";
871 this->VariableNames->value[68] = "GRANULAR_TEMPERATURE_M1";
872 this->VariableNames->value[69] = "GRANULAR_TEMPERATURE_M2";
873 this->VariableNames->value[70] = "VFLUX";
874 this->VariableNames->value[80] = "VFLUX_M1";
875 this->VariableNames->value[90] = "VFLUX_M2";
876 this->VariableNames->value[91] = "DO_QNET";
877 this->VariableNames->value[92] = "DO_QTRANS";
878 this->VariableNames->value[93] = "DO_QREFL";
879 this->VariableNames->value[94] = "DO_QABS";
880 this->VariableNames->value[95] = "POLLUT5";
881 this->VariableNames->value[96] = "WALL_DIST";
882 this->VariableNames->value[97] = "SOLAR_SOURCE";
883 this->VariableNames->value[98] = "SOLAR_QREFL";
884 this->VariableNames->value[99] = "SOLAR_QABS";
885 this->VariableNames->value[100] = "SOLAR_QTRANS";
886 this->VariableNames->value[101] = "DENSITY";
887 this->VariableNames->value[102] = "MU_LAM";
888 this->VariableNames->value[103] = "MU_TURB";
889 this->VariableNames->value[104] = "CP";
890 this->VariableNames->value[105] = "KTC";
891 this->VariableNames->value[106] = "VGS_DTRM";
892 this->VariableNames->value[107] = "VGF_DTRM";
893 this->VariableNames->value[108] = "RSTRESS";
894 this->VariableNames->value[109] = "THREAD_RAD_FLUX";
895 this->VariableNames->value[110] = "SPE_Q";
896 this->VariableNames->value[111] = "X_VELOCITY";
897 this->VariableNames->value[112] = "Y_VELOCITY";
898 this->VariableNames->value[113] = "Z_VELOCITY";
899 this->VariableNames->value[114] = "WALL_VELOCITY";
900 this->VariableNames->value[115] = "X_VELOCITY_M1";
901 this->VariableNames->value[116] = "Y_VELOCITY_M1";
902 this->VariableNames->value[117] = "Z_VELOCITY_M1";
903 this->VariableNames->value[118] = "PHASE_MASS";
904 this->VariableNames->value[119] = "TKE_M1";
905 this->VariableNames->value[120] = "TED_M1";
906 this->VariableNames->value[121] = "POLLUT6";
907 this->VariableNames->value[122] = "X_VELOCITY_M2";
908 this->VariableNames->value[123] = "Y_VELOCITY_M2";
909 this->VariableNames->value[124] = "Z_VELOCITY_M2";
910 this->VariableNames->value[126] = "TKE_M2";
911 this->VariableNames->value[127] = "TED_M2";
912 this->VariableNames->value[128] = "RUU";
913 this->VariableNames->value[129] = "RVV";
914 this->VariableNames->value[130] = "RWW";
915 this->VariableNames->value[131] = "RUV";
916 this->VariableNames->value[132] = "RVW";
917 this->VariableNames->value[133] = "RUW";
918 this->VariableNames->value[134] = "DPMS_EROSION";
919 this->VariableNames->value[135] = "DPMS_ACCRETION";
920 this->VariableNames->value[136] = "FMEAN2";
921 this->VariableNames->value[137] = "FVAR2";
922 this->VariableNames->value[138] = "ENTHALPY_M1";
923 this->VariableNames->value[139] = "ENTHALPY_M2";
924 this->VariableNames->value[140] = "FMEAN_M1";
925 this->VariableNames->value[141] = "FMEAN_M2";
926 this->VariableNames->value[142] = "FVAR_M1";
927 this->VariableNames->value[143] = "FVAR_M2";
928 this->VariableNames->value[144] = "FMEAN2_M1";
929 this->VariableNames->value[145] = "FMEAN2_M2";
930 this->VariableNames->value[146] = "FVAR2_M1";
931 this->VariableNames->value[147] = "FVAR2_M2";
932 this->VariableNames->value[148] = "PREMIXC_M1";
933 this->VariableNames->value[149] = "PREMIXC_M2";
934 this->VariableNames->value[150] = "VOF";
935 this->VariableNames->value[151] = "VOF_1";
936 this->VariableNames->value[152] = "VOF_2";
937 this->VariableNames->value[153] = "VOF_3";
938 this->VariableNames->value[154] = "VOF_4";
939 this->VariableNames->value[160] = "VOF_M1";
940 this->VariableNames->value[161] = "VOF_1_M1";
941 this->VariableNames->value[162] = "VOF_2_M1";
942 this->VariableNames->value[163] = "VOF_3_M1";
943 this->VariableNames->value[164] = "VOF_4_M1";
944 this->VariableNames->value[170] = "VOF_M2";
945 this->VariableNames->value[171] = "VOF_1_M2";
946 this->VariableNames->value[172] = "VOF_2_M2";
947 this->VariableNames->value[173] = "VOF_3_M2";
948 this->VariableNames->value[174] = "VOF_4_M2";
949 this->VariableNames->value[180] = "VOLUME_M2";
950 this->VariableNames->value[181] = "WALL_GRID_VELOCITY";
951 this->VariableNames->value[182] = "POLLUT7";
952 this->VariableNames->value[183] = "POLLUT8";
953 this->VariableNames->value[184] = "POLLUT9";
954 this->VariableNames->value[185] = "POLLUT10";
955 this->VariableNames->value[186] = "POLLUT11";
956 this->VariableNames->value[187] = "POLLUT12";
957 this->VariableNames->value[188] = "POLLUT13";
958 this->VariableNames->value[190] = "SV_T_AUX";
959 this->VariableNames->value[191] = "SV_T_AP_AUX";
960 this->VariableNames->value[192] = "TOTAL_PRESSURE";
961 this->VariableNames->value[193] = "TOTAL_TEMPERATURE";
962 this->VariableNames->value[194] = "NRBC_DC";
963 this->VariableNames->value[195] = "DP_TMFR";
964
965 this->VariableNames->value[200] = "Y_00";
966 this->VariableNames->value[201] = "Y_01";
967 this->VariableNames->value[202] = "Y_02";
968 this->VariableNames->value[203] = "Y_03";
969 this->VariableNames->value[204] = "Y_04";
970 this->VariableNames->value[205] = "Y_05";
971 this->VariableNames->value[206] = "Y_06";
972 this->VariableNames->value[207] = "Y_07";
973 this->VariableNames->value[208] = "Y_08";
974 this->VariableNames->value[209] = "Y_09";
975 this->VariableNames->value[210] = "Y_10";
976 this->VariableNames->value[211] = "Y_11";
977 this->VariableNames->value[212] = "Y_12";
978 this->VariableNames->value[213] = "Y_13";
979 this->VariableNames->value[214] = "Y_14";
980 this->VariableNames->value[215] = "Y_15";
981 this->VariableNames->value[216] = "Y_16";
982 this->VariableNames->value[217] = "Y_17";
983 this->VariableNames->value[218] = "Y_18";
984 this->VariableNames->value[219] = "Y_19";
985 this->VariableNames->value[220] = "Y_20";
986 this->VariableNames->value[221] = "Y_21";
987 this->VariableNames->value[222] = "Y_22";
988 this->VariableNames->value[223] = "Y_23";
989 this->VariableNames->value[224] = "Y_24";
990 this->VariableNames->value[225] = "Y_25";
991 this->VariableNames->value[226] = "Y_26";
992 this->VariableNames->value[227] = "Y_27";
993 this->VariableNames->value[228] = "Y_28";
994 this->VariableNames->value[229] = "Y_29";
995 this->VariableNames->value[230] = "Y_30";
996 this->VariableNames->value[231] = "Y_31";
997 this->VariableNames->value[232] = "Y_32";
998 this->VariableNames->value[233] = "Y_33";
999 this->VariableNames->value[234] = "Y_34";
1000 this->VariableNames->value[235] = "Y_35";
1001 this->VariableNames->value[236] = "Y_36";
1002 this->VariableNames->value[237] = "Y_37";
1003 this->VariableNames->value[238] = "Y_38";
1004 this->VariableNames->value[239] = "Y_39";
1005 this->VariableNames->value[240] = "Y_40";
1006 this->VariableNames->value[241] = "Y_41";
1007 this->VariableNames->value[242] = "Y_42";
1008 this->VariableNames->value[243] = "Y_43";
1009 this->VariableNames->value[244] = "Y_44";
1010 this->VariableNames->value[245] = "Y_45";
1011 this->VariableNames->value[246] = "Y_46";
1012 this->VariableNames->value[247] = "Y_47";
1013 this->VariableNames->value[248] = "Y_48";
1014 this->VariableNames->value[249] = "Y_49";
1015
1016 this->VariableNames->value[250] = "Y_M1_00";
1017 this->VariableNames->value[251] = "Y_M1_01";
1018 this->VariableNames->value[252] = "Y_M1_02";
1019 this->VariableNames->value[253] = "Y_M1_03";
1020 this->VariableNames->value[254] = "Y_M1_04";
1021 this->VariableNames->value[255] = "Y_M1_05";
1022 this->VariableNames->value[256] = "Y_M1_06";
1023 this->VariableNames->value[257] = "Y_M1_07";
1024 this->VariableNames->value[258] = "Y_M1_08";
1025 this->VariableNames->value[259] = "Y_M1_09";
1026 this->VariableNames->value[260] = "Y_M1_10";
1027 this->VariableNames->value[261] = "Y_M1_11";
1028 this->VariableNames->value[262] = "Y_M1_12";
1029 this->VariableNames->value[263] = "Y_M1_13";
1030 this->VariableNames->value[264] = "Y_M1_14";
1031 this->VariableNames->value[265] = "Y_M1_15";
1032 this->VariableNames->value[266] = "Y_M1_16";
1033 this->VariableNames->value[267] = "Y_M1_17";
1034 this->VariableNames->value[268] = "Y_M1_18";
1035 this->VariableNames->value[269] = "Y_M1_19";
1036 this->VariableNames->value[270] = "Y_M1_20";
1037 this->VariableNames->value[271] = "Y_M1_21";
1038 this->VariableNames->value[272] = "Y_M1_22";
1039 this->VariableNames->value[273] = "Y_M1_23";
1040 this->VariableNames->value[274] = "Y_M1_24";
1041 this->VariableNames->value[275] = "Y_M1_25";
1042 this->VariableNames->value[276] = "Y_M1_26";
1043 this->VariableNames->value[277] = "Y_M1_27";
1044 this->VariableNames->value[278] = "Y_M1_28";
1045 this->VariableNames->value[279] = "Y_M1_29";
1046 this->VariableNames->value[280] = "Y_M1_30";
1047 this->VariableNames->value[281] = "Y_M1_31";
1048 this->VariableNames->value[282] = "Y_M1_32";
1049 this->VariableNames->value[283] = "Y_M1_33";
1050 this->VariableNames->value[284] = "Y_M1_34";
1051 this->VariableNames->value[285] = "Y_M1_35";
1052 this->VariableNames->value[286] = "Y_M1_36";
1053 this->VariableNames->value[287] = "Y_M1_37";
1054 this->VariableNames->value[288] = "Y_M1_38";
1055 this->VariableNames->value[289] = "Y_M1_39";
1056 this->VariableNames->value[290] = "Y_M1_40";
1057 this->VariableNames->value[291] = "Y_M1_41";
1058 this->VariableNames->value[292] = "Y_M1_42";
1059 this->VariableNames->value[293] = "Y_M1_43";
1060 this->VariableNames->value[294] = "Y_M1_44";
1061 this->VariableNames->value[295] = "Y_M1_45";
1062 this->VariableNames->value[296] = "Y_M1_46";
1063 this->VariableNames->value[297] = "Y_M1_47";
1064 this->VariableNames->value[298] = "Y_M1_48";
1065 this->VariableNames->value[299] = "Y_M1_49";
1066
1067 this->VariableNames->value[300] = "Y_M2_00";
1068 this->VariableNames->value[301] = "Y_M2_01";
1069 this->VariableNames->value[302] = "Y_M2_02";
1070 this->VariableNames->value[303] = "Y_M2_03";
1071 this->VariableNames->value[304] = "Y_M2_04";
1072 this->VariableNames->value[305] = "Y_M2_05";
1073 this->VariableNames->value[306] = "Y_M2_06";
1074 this->VariableNames->value[307] = "Y_M2_07";
1075 this->VariableNames->value[308] = "Y_M2_08";
1076 this->VariableNames->value[309] = "Y_M2_09";
1077 this->VariableNames->value[310] = "Y_M2_10";
1078 this->VariableNames->value[311] = "Y_M2_11";
1079 this->VariableNames->value[312] = "Y_M2_12";
1080 this->VariableNames->value[313] = "Y_M2_13";
1081 this->VariableNames->value[314] = "Y_M2_14";
1082 this->VariableNames->value[315] = "Y_M2_15";
1083 this->VariableNames->value[316] = "Y_M2_16";
1084 this->VariableNames->value[317] = "Y_M2_17";
1085 this->VariableNames->value[318] = "Y_M2_18";
1086 this->VariableNames->value[319] = "Y_M2_19";
1087 this->VariableNames->value[320] = "Y_M2_20";
1088 this->VariableNames->value[321] = "Y_M2_21";
1089 this->VariableNames->value[322] = "Y_M2_22";
1090 this->VariableNames->value[323] = "Y_M2_23";
1091 this->VariableNames->value[324] = "Y_M2_24";
1092 this->VariableNames->value[325] = "Y_M2_25";
1093 this->VariableNames->value[326] = "Y_M2_26";
1094 this->VariableNames->value[327] = "Y_M2_27";
1095 this->VariableNames->value[328] = "Y_M2_28";
1096 this->VariableNames->value[329] = "Y_M2_29";
1097 this->VariableNames->value[330] = "Y_M2_30";
1098 this->VariableNames->value[331] = "Y_M2_31";
1099 this->VariableNames->value[332] = "Y_M2_32";
1100 this->VariableNames->value[333] = "Y_M2_33";
1101 this->VariableNames->value[334] = "Y_M2_34";
1102 this->VariableNames->value[335] = "Y_M2_35";
1103 this->VariableNames->value[336] = "Y_M2_36";
1104 this->VariableNames->value[337] = "Y_M2_37";
1105 this->VariableNames->value[338] = "Y_M2_38";
1106 this->VariableNames->value[339] = "Y_M2_39";
1107 this->VariableNames->value[340] = "Y_M2_40";
1108 this->VariableNames->value[341] = "Y_M2_41";
1109 this->VariableNames->value[342] = "Y_M2_42";
1110 this->VariableNames->value[343] = "Y_M2_43";
1111 this->VariableNames->value[344] = "Y_M2_44";
1112 this->VariableNames->value[345] = "Y_M2_45";
1113 this->VariableNames->value[346] = "Y_M2_46";
1114 this->VariableNames->value[347] = "Y_M2_47";
1115 this->VariableNames->value[348] = "Y_M2_48";
1116 this->VariableNames->value[349] = "Y_M2_49";
1117
1118 this->VariableNames->value[350] = "DR_SURF_00";
1119 this->VariableNames->value[351] = "DR_SURF_01";
1120 this->VariableNames->value[352] = "DR_SURF_02";
1121 this->VariableNames->value[353] = "DR_SURF_03";
1122 this->VariableNames->value[354] = "DR_SURF_04";
1123 this->VariableNames->value[355] = "DR_SURF_05";
1124 this->VariableNames->value[356] = "DR_SURF_06";
1125 this->VariableNames->value[357] = "DR_SURF_07";
1126 this->VariableNames->value[358] = "DR_SURF_08";
1127 this->VariableNames->value[359] = "DR_SURF_09";
1128 this->VariableNames->value[360] = "DR_SURF_10";
1129 this->VariableNames->value[361] = "DR_SURF_11";
1130 this->VariableNames->value[362] = "DR_SURF_12";
1131 this->VariableNames->value[363] = "DR_SURF_13";
1132 this->VariableNames->value[364] = "DR_SURF_14";
1133 this->VariableNames->value[365] = "DR_SURF_15";
1134 this->VariableNames->value[366] = "DR_SURF_16";
1135 this->VariableNames->value[367] = "DR_SURF_17";
1136 this->VariableNames->value[368] = "DR_SURF_18";
1137 this->VariableNames->value[369] = "DR_SURF_19";
1138 this->VariableNames->value[370] = "DR_SURF_20";
1139 this->VariableNames->value[371] = "DR_SURF_21";
1140 this->VariableNames->value[372] = "DR_SURF_22";
1141 this->VariableNames->value[373] = "DR_SURF_23";
1142 this->VariableNames->value[374] = "DR_SURF_24";
1143 this->VariableNames->value[375] = "DR_SURF_25";
1144 this->VariableNames->value[376] = "DR_SURF_26";
1145 this->VariableNames->value[377] = "DR_SURF_27";
1146 this->VariableNames->value[378] = "DR_SURF_28";
1147 this->VariableNames->value[379] = "DR_SURF_29";
1148 this->VariableNames->value[380] = "DR_SURF_30";
1149 this->VariableNames->value[381] = "DR_SURF_31";
1150 this->VariableNames->value[382] = "DR_SURF_32";
1151 this->VariableNames->value[383] = "DR_SURF_33";
1152 this->VariableNames->value[384] = "DR_SURF_34";
1153 this->VariableNames->value[385] = "DR_SURF_35";
1154 this->VariableNames->value[386] = "DR_SURF_36";
1155 this->VariableNames->value[387] = "DR_SURF_37";
1156 this->VariableNames->value[388] = "DR_SURF_38";
1157 this->VariableNames->value[389] = "DR_SURF_39";
1158 this->VariableNames->value[390] = "DR_SURF_40";
1159 this->VariableNames->value[391] = "DR_SURF_41";
1160 this->VariableNames->value[392] = "DR_SURF_42";
1161 this->VariableNames->value[393] = "DR_SURF_43";
1162 this->VariableNames->value[394] = "DR_SURF_44";
1163 this->VariableNames->value[395] = "DR_SURF_45";
1164 this->VariableNames->value[396] = "DR_SURF_46";
1165 this->VariableNames->value[397] = "DR_SURF_47";
1166 this->VariableNames->value[398] = "DR_SURF_48";
1167 this->VariableNames->value[399] = "DR_SURF_49";
1168
1169 this->VariableNames->value[400] = "PRESSURE_MEAN";
1170 this->VariableNames->value[401] = "PRESSURE_RMS";
1171 this->VariableNames->value[402] = "X_VELOCITY_MEAN";
1172 this->VariableNames->value[403] = "X_VELOCITY_RMS";
1173 this->VariableNames->value[404] = "Y_VELOCITY_MEAN";
1174 this->VariableNames->value[405] = "Y_VELOCITY_RMS";
1175 this->VariableNames->value[406] = "Z_VELOCITY_MEAN";
1176 this->VariableNames->value[407] = "Z_VELOCITY_RMS";
1177 this->VariableNames->value[408] = "TEMPERATURE_MEAN";
1178 this->VariableNames->value[409] = "TEMPERATURE_RMS";
1179 this->VariableNames->value[410] = "VOF_MEAN";
1180 this->VariableNames->value[411] = "VOF_RMS";
1181 this->VariableNames->value[412] = "PRESSURE_M1";
1182 this->VariableNames->value[413] = "PRESSURE_M2";
1183 this->VariableNames->value[414] = "GRANULAR_TEMPERATURE_MEAN";
1184 this->VariableNames->value[415] = "GRANULAR_TEMPERATURE_RMS";
1185
1186 this->VariableNames->value[450] = "DPMS_Y_00";
1187 this->VariableNames->value[451] = "DPMS_Y_01";
1188 this->VariableNames->value[452] = "DPMS_Y_02";
1189 this->VariableNames->value[453] = "DPMS_Y_03";
1190 this->VariableNames->value[454] = "DPMS_Y_04";
1191 this->VariableNames->value[455] = "DPMS_Y_05";
1192 this->VariableNames->value[456] = "DPMS_Y_06";
1193 this->VariableNames->value[457] = "DPMS_Y_07";
1194 this->VariableNames->value[458] = "DPMS_Y_08";
1195 this->VariableNames->value[459] = "DPMS_Y_09";
1196 this->VariableNames->value[460] = "DPMS_Y_10";
1197 this->VariableNames->value[461] = "DPMS_Y_11";
1198 this->VariableNames->value[462] = "DPMS_Y_12";
1199 this->VariableNames->value[463] = "DPMS_Y_13";
1200 this->VariableNames->value[464] = "DPMS_Y_14";
1201 this->VariableNames->value[465] = "DPMS_Y_15";
1202 this->VariableNames->value[466] = "DPMS_Y_16";
1203 this->VariableNames->value[467] = "DPMS_Y_17";
1204 this->VariableNames->value[468] = "DPMS_Y_18";
1205 this->VariableNames->value[469] = "DPMS_Y_19";
1206 this->VariableNames->value[470] = "DPMS_Y_20";
1207 this->VariableNames->value[471] = "DPMS_Y_21";
1208 this->VariableNames->value[472] = "DPMS_Y_22";
1209 this->VariableNames->value[473] = "DPMS_Y_23";
1210 this->VariableNames->value[474] = "DPMS_Y_24";
1211 this->VariableNames->value[475] = "DPMS_Y_25";
1212 this->VariableNames->value[476] = "DPMS_Y_26";
1213 this->VariableNames->value[477] = "DPMS_Y_27";
1214 this->VariableNames->value[478] = "DPMS_Y_28";
1215 this->VariableNames->value[479] = "DPMS_Y_29";
1216 this->VariableNames->value[480] = "DPMS_Y_30";
1217 this->VariableNames->value[481] = "DPMS_Y_31";
1218 this->VariableNames->value[482] = "DPMS_Y_32";
1219 this->VariableNames->value[483] = "DPMS_Y_33";
1220 this->VariableNames->value[484] = "DPMS_Y_34";
1221 this->VariableNames->value[485] = "DPMS_Y_35";
1222 this->VariableNames->value[486] = "DPMS_Y_36";
1223 this->VariableNames->value[487] = "DPMS_Y_37";
1224 this->VariableNames->value[488] = "DPMS_Y_38";
1225 this->VariableNames->value[489] = "DPMS_Y_39";
1226 this->VariableNames->value[490] = "DPMS_Y_40";
1227 this->VariableNames->value[491] = "DPMS_Y_41";
1228 this->VariableNames->value[492] = "DPMS_Y_42";
1229 this->VariableNames->value[493] = "DPMS_Y_43";
1230 this->VariableNames->value[494] = "DPMS_Y_44";
1231 this->VariableNames->value[495] = "DPMS_Y_45";
1232 this->VariableNames->value[496] = "DPMS_Y_46";
1233 this->VariableNames->value[497] = "DPMS_Y_47";
1234 this->VariableNames->value[498] = "DPMS_Y_48";
1235 this->VariableNames->value[499] = "DPMS_Y_49";
1236
1237 this->VariableNames->value[500] = "NUT";
1238 this->VariableNames->value[501] = "NUT_M1";
1239 this->VariableNames->value[502] = "NUT_M2";
1240 this->VariableNames->value[503] = "RUU_M1";
1241 this->VariableNames->value[504] = "RVV_M1";
1242 this->VariableNames->value[505] = "RWW_M1";
1243 this->VariableNames->value[506] = "RUV_M1";
1244 this->VariableNames->value[507] = "RVW_M1";
1245 this->VariableNames->value[508] = "RUW_M1";
1246 this->VariableNames->value[509] = "RUU_M2";
1247 this->VariableNames->value[510] = "RVV_M2";
1248 this->VariableNames->value[511] = "RWW_M2";
1249 this->VariableNames->value[512] = "RUV_M2";
1250 this->VariableNames->value[513] = "RVW_M2";
1251 this->VariableNames->value[514] = "RUW_M2";
1252 this->VariableNames->value[515] = "ENERGY_M1";
1253 this->VariableNames->value[516] = "ENERGY_M2";
1254 this->VariableNames->value[517] = "DENSITY_M1";
1255 this->VariableNames->value[518] = "DENSITY_M2";
1256 this->VariableNames->value[519] = "DPMS_PDF_1";
1257 this->VariableNames->value[520] = "DPMS_PDF_2";
1258 this->VariableNames->value[521] = "V2";
1259 this->VariableNames->value[522] = "V2_M1";
1260 this->VariableNames->value[523] = "V2_M2";
1261 this->VariableNames->value[524] = "FEL";
1262 this->VariableNames->value[525] = "FEL_M1";
1263 this->VariableNames->value[526] = "FEL_M2";
1264 this->VariableNames->value[527] = "LKE";
1265 this->VariableNames->value[528] = "LKE_M1";
1266 this->VariableNames->value[529] = "LKE_M2";
1267 this->VariableNames->value[530] = "SHELL_CELL_T";
1268 this->VariableNames->value[531] = "SHELL_FACE_T";
1269 this->VariableNames->value[532] = "SHELL_CELL_ENERGY_M1";
1270 this->VariableNames->value[533] = "SHELL_CELL_ENERGY_M2";
1271 this->VariableNames->value[540] = "DPMS_TKE";
1272 this->VariableNames->value[541] = "DPMS_D";
1273 this->VariableNames->value[542] = "DPMS_O";
1274 this->VariableNames->value[543] = "DPMS_TKE_RUU";
1275 this->VariableNames->value[544] = "DPMS_TKE_RVV";
1276 this->VariableNames->value[545] = "DPMS_TKE_RWW";
1277 this->VariableNames->value[546] = "DPMS_TKE_RUV";
1278 this->VariableNames->value[547] = "DPMS_TKE_RVW";
1279 this->VariableNames->value[548] = "DPMS_TKE_RUW";
1280 this->VariableNames->value[549] = "DPMS_DS_MASS";
1281 this->VariableNames->value[550] = "DPMS_DS_ENERGY";
1282 this->VariableNames->value[551] = "DPMS_DS_TKE";
1283 this->VariableNames->value[552] = "DPMS_DS_D";
1284 this->VariableNames->value[553] = "DPMS_DS_O";
1285 this->VariableNames->value[554] = "DPMS_DS_TKE_RUU";
1286 this->VariableNames->value[555] = "DPMS_DS_TKE_RVV";
1287 this->VariableNames->value[556] = "DPMS_DS_TKE_RWW";
1288 this->VariableNames->value[557] = "DPMS_DS_TKE_RUV";
1289 this->VariableNames->value[558] = "DPMS_DS_TKE_RVW";
1290 this->VariableNames->value[559] = "DPMS_DS_TKE_RUW";
1291 this->VariableNames->value[560] = "DPMS_DS_PDF_1";
1292 this->VariableNames->value[561] = "DPMS_DS_PDF_2";
1293 this->VariableNames->value[562] = "DPMS_DS_EMISS";
1294 this->VariableNames->value[563] = "DPMS_DS_ABS";
1295 this->VariableNames->value[564] = "DPMS_DS_SCAT";
1296 this->VariableNames->value[565] = "DPMS_DS_BURNOUT";
1297 this->VariableNames->value[566] = "DPMS_DS_MOM";
1298 this->VariableNames->value[567] = "DPMS_DS_WSWIRL";
1299 this->VariableNames->value[580] = "MU_TURB_L";
1300 this->VariableNames->value[581] = "MU_TURB_S";
1301 this->VariableNames->value[582] = "TKE_TRANS";
1302 this->VariableNames->value[583] = "TKE_TRANS_M1";
1303 this->VariableNames->value[584] = "TKE_TRANS_M2";
1304 this->VariableNames->value[585] = "MU_TURB_W";
1305 this->VariableNames->value[600] = "DELH";
1306 this->VariableNames->value[601] = "DPMS_MOM_AP";
1307 this->VariableNames->value[602] = "DPMS_WSWIRL_AP";
1308 this->VariableNames->value[603] = "X_PULL";
1309 this->VariableNames->value[604] = "Y_PULL";
1310 this->VariableNames->value[605] = "Z_PULL";
1311 this->VariableNames->value[606] = "LIQF";
1312 this->VariableNames->value[610] = "PDFT_QBAR";
1313 this->VariableNames->value[611] = "PDFT_PHI";
1314 this->VariableNames->value[612] = "PDFT_Q_TA";
1315 this->VariableNames->value[613] = "PDFT_SVOL_TA";
1316 this->VariableNames->value[614] = "PDFT_MASS_TA";
1317 this->VariableNames->value[615] = "PDFT_T4_TA";
1318 this->VariableNames->value[620] = "MICRO_MIX_FVAR1 ";
1319 this->VariableNames->value[621] = "MICRO_MIX_FVAR2 ";
1320 this->VariableNames->value[622] = "MICRO_MIX_FVAR3 ";
1321 this->VariableNames->value[623] = "MICRO_MIX_FVAR1_M1 ";
1322 this->VariableNames->value[624] = "MICRO_MIX_FVAR2_M1 ";
1323 this->VariableNames->value[625] = "MICRO_MIX_FVAR3_M1 ";
1324 this->VariableNames->value[626] = "MICRO_MIX_FVAR1_M2 ";
1325 this->VariableNames->value[627] = "MICRO_MIX_FVAR2_M2 ";
1326 this->VariableNames->value[628] = "MICRO_MIX_FVAR3_M2 ";
1327 this->VariableNames->value[630] = "SCAD_LES ";
1328 this->VariableNames->value[635] = "UFLA_Y ";
1329 this->VariableNames->value[636] = "UFLA_Y_M1 ";
1330 this->VariableNames->value[637] = "UFLA_Y_M2 ";
1331 this->VariableNames->value[645] = "CREV_MASS";
1332 this->VariableNames->value[646] = "CREV_ENRG";
1333 this->VariableNames->value[647] = "CREV_MOM";
1334 this->VariableNames->value[650] = "ACOUSTICS_MODEL";
1335 this->VariableNames->value[651] = "AC_RECEIVERS_DATA";
1336 this->VariableNames->value[652] = "SV_DPDT_RMS";
1337 this->VariableNames->value[653] = "SV_PRESSURE_M1";
1338 this->VariableNames->value[654] = "AC_PERIODIC_INDEX";
1339 this->VariableNames->value[655] = "AC_PERIODIC_PS";
1340 this->VariableNames->value[656] = "AC_F_NORMAL";
1341 this->VariableNames->value[657] = "AC_F_CENTROID";
1342 this->VariableNames->value[660] = "IGNITE";
1343 this->VariableNames->value[661] = "IGNITE_M1";
1344 this->VariableNames->value[662] = "IGNITE_M2";
1345 this->VariableNames->value[663] = "IGNITE_RATE";
1346
1347 this->VariableNames->value[680] = "WALL_SHEAR_MEAN";
1348 this->VariableNames->value[681] = "UV_MEAN";
1349 this->VariableNames->value[682] = "UW_MEAN";
1350 this->VariableNames->value[683] = "VW_MEAN";
1351 this->VariableNames->value[684] = "UT_MEAN";
1352 this->VariableNames->value[685] = "VT_MEAN";
1353 this->VariableNames->value[686] = "WT_MEAN";
1354 this->VariableNames->value[687] = "BOUNDARY_HEAT_FLUX_MEAN";
1355
1356 this->VariableNames->value[700] = "UDS_00";
1357 this->VariableNames->value[701] = "UDS_01";
1358 this->VariableNames->value[702] = "UDS_02";
1359 this->VariableNames->value[703] = "UDS_03";
1360 this->VariableNames->value[704] = "UDS_04";
1361 this->VariableNames->value[705] = "UDS_05";
1362 this->VariableNames->value[706] = "UDS_06";
1363 this->VariableNames->value[707] = "UDS_07";
1364 this->VariableNames->value[708] = "UDS_08";
1365 this->VariableNames->value[709] = "UDS_09";
1366 this->VariableNames->value[710] = "UDS_10";
1367 this->VariableNames->value[711] = "UDS_11";
1368 this->VariableNames->value[712] = "UDS_12";
1369 this->VariableNames->value[713] = "UDS_13";
1370 this->VariableNames->value[714] = "UDS_14";
1371 this->VariableNames->value[715] = "UDS_15";
1372 this->VariableNames->value[716] = "UDS_16";
1373 this->VariableNames->value[717] = "UDS_17";
1374 this->VariableNames->value[718] = "UDS_18";
1375 this->VariableNames->value[719] = "UDS_19";
1376 this->VariableNames->value[720] = "UDS_20";
1377 this->VariableNames->value[721] = "UDS_21";
1378 this->VariableNames->value[722] = "UDS_22";
1379 this->VariableNames->value[723] = "UDS_23";
1380 this->VariableNames->value[724] = "UDS_24";
1381 this->VariableNames->value[725] = "UDS_25";
1382 this->VariableNames->value[726] = "UDS_26";
1383 this->VariableNames->value[727] = "UDS_27";
1384 this->VariableNames->value[728] = "UDS_28";
1385 this->VariableNames->value[729] = "UDS_29";
1386 this->VariableNames->value[730] = "UDS_30";
1387 this->VariableNames->value[731] = "UDS_31";
1388 this->VariableNames->value[732] = "UDS_32";
1389 this->VariableNames->value[733] = "UDS_33";
1390 this->VariableNames->value[734] = "UDS_34";
1391 this->VariableNames->value[735] = "UDS_35";
1392 this->VariableNames->value[736] = "UDS_36";
1393 this->VariableNames->value[737] = "UDS_37";
1394 this->VariableNames->value[738] = "UDS_38";
1395 this->VariableNames->value[739] = "UDS_39";
1396 this->VariableNames->value[740] = "UDS_40";
1397 this->VariableNames->value[741] = "UDS_41";
1398 this->VariableNames->value[742] = "UDS_42";
1399 this->VariableNames->value[743] = "UDS_43";
1400 this->VariableNames->value[744] = "UDS_44";
1401 this->VariableNames->value[745] = "UDS_45";
1402 this->VariableNames->value[746] = "UDS_46";
1403 this->VariableNames->value[747] = "UDS_47";
1404 this->VariableNames->value[748] = "UDS_48";
1405 this->VariableNames->value[749] = "UDS_49";
1406
1407 this->VariableNames->value[750] = "UDS_M1_00";
1408 this->VariableNames->value[751] = "UDS_M1_01";
1409 this->VariableNames->value[752] = "UDS_M1_02";
1410 this->VariableNames->value[753] = "UDS_M1_03";
1411 this->VariableNames->value[754] = "UDS_M1_04";
1412 this->VariableNames->value[755] = "UDS_M1_05";
1413 this->VariableNames->value[756] = "UDS_M1_06";
1414 this->VariableNames->value[757] = "UDS_M1_07";
1415 this->VariableNames->value[758] = "UDS_M1_08";
1416 this->VariableNames->value[759] = "UDS_M1_09";
1417 this->VariableNames->value[760] = "UDS_M1_10";
1418 this->VariableNames->value[761] = "UDS_M1_11";
1419 this->VariableNames->value[762] = "UDS_M1_12";
1420 this->VariableNames->value[763] = "UDS_M1_13";
1421 this->VariableNames->value[764] = "UDS_M1_14";
1422 this->VariableNames->value[765] = "UDS_M1_15";
1423 this->VariableNames->value[766] = "UDS_M1_16";
1424 this->VariableNames->value[767] = "UDS_M1_17";
1425 this->VariableNames->value[768] = "UDS_M1_18";
1426 this->VariableNames->value[769] = "UDS_M1_19";
1427 this->VariableNames->value[770] = "UDS_M1_20";
1428 this->VariableNames->value[771] = "UDS_M1_21";
1429 this->VariableNames->value[772] = "UDS_M1_22";
1430 this->VariableNames->value[773] = "UDS_M1_23";
1431 this->VariableNames->value[774] = "UDS_M1_24";
1432 this->VariableNames->value[775] = "UDS_M1_25";
1433 this->VariableNames->value[776] = "UDS_M1_26";
1434 this->VariableNames->value[777] = "UDS_M1_27";
1435 this->VariableNames->value[778] = "UDS_M1_28";
1436 this->VariableNames->value[779] = "UDS_M1_29";
1437 this->VariableNames->value[780] = "UDS_M1_30";
1438 this->VariableNames->value[781] = "UDS_M1_31";
1439 this->VariableNames->value[782] = "UDS_M1_32";
1440 this->VariableNames->value[783] = "UDS_M1_33";
1441 this->VariableNames->value[784] = "UDS_M1_34";
1442 this->VariableNames->value[785] = "UDS_M1_35";
1443 this->VariableNames->value[786] = "UDS_M1_36";
1444 this->VariableNames->value[787] = "UDS_M1_37";
1445 this->VariableNames->value[788] = "UDS_M1_38";
1446 this->VariableNames->value[789] = "UDS_M1_39";
1447 this->VariableNames->value[790] = "UDS_M1_40";
1448 this->VariableNames->value[791] = "UDS_M1_41";
1449 this->VariableNames->value[792] = "UDS_M1_42";
1450 this->VariableNames->value[793] = "UDS_M1_43";
1451 this->VariableNames->value[794] = "UDS_M1_44";
1452 this->VariableNames->value[795] = "UDS_M1_45";
1453 this->VariableNames->value[796] = "UDS_M1_46";
1454 this->VariableNames->value[797] = "UDS_M1_47";
1455 this->VariableNames->value[798] = "UDS_M1_48";
1456 this->VariableNames->value[799] = "UDS_M1_49";
1457
1458 this->VariableNames->value[800] = "UDS_M2_00";
1459 this->VariableNames->value[801] = "UDS_M2_01";
1460 this->VariableNames->value[802] = "UDS_M2_02";
1461 this->VariableNames->value[803] = "UDS_M2_03";
1462 this->VariableNames->value[804] = "UDS_M2_04";
1463 this->VariableNames->value[805] = "UDS_M2_05";
1464 this->VariableNames->value[806] = "UDS_M2_06";
1465 this->VariableNames->value[807] = "UDS_M2_07";
1466 this->VariableNames->value[808] = "UDS_M2_08";
1467 this->VariableNames->value[809] = "UDS_M2_09";
1468 this->VariableNames->value[810] = "UDS_M2_10";
1469 this->VariableNames->value[811] = "UDS_M2_11";
1470 this->VariableNames->value[812] = "UDS_M2_12";
1471 this->VariableNames->value[813] = "UDS_M2_13";
1472 this->VariableNames->value[814] = "UDS_M2_14";
1473 this->VariableNames->value[815] = "UDS_M2_15";
1474 this->VariableNames->value[816] = "UDS_M2_16";
1475 this->VariableNames->value[817] = "UDS_M2_17";
1476 this->VariableNames->value[818] = "UDS_M2_18";
1477 this->VariableNames->value[819] = "UDS_M2_19";
1478 this->VariableNames->value[820] = "UDS_M2_20";
1479 this->VariableNames->value[821] = "UDS_M2_21";
1480 this->VariableNames->value[822] = "UDS_M2_22";
1481 this->VariableNames->value[823] = "UDS_M2_23";
1482 this->VariableNames->value[824] = "UDS_M2_24";
1483 this->VariableNames->value[825] = "UDS_M2_25";
1484 this->VariableNames->value[826] = "UDS_M2_26";
1485 this->VariableNames->value[827] = "UDS_M2_27";
1486 this->VariableNames->value[828] = "UDS_M2_28";
1487 this->VariableNames->value[829] = "UDS_M2_29";
1488 this->VariableNames->value[830] = "UDS_M2_30";
1489 this->VariableNames->value[831] = "UDS_M2_31";
1490 this->VariableNames->value[832] = "UDS_M2_32";
1491 this->VariableNames->value[833] = "UDS_M2_33";
1492 this->VariableNames->value[834] = "UDS_M2_34";
1493 this->VariableNames->value[835] = "UDS_M2_35";
1494 this->VariableNames->value[836] = "UDS_M2_36";
1495 this->VariableNames->value[837] = "UDS_M2_37";
1496 this->VariableNames->value[838] = "UDS_M2_38";
1497 this->VariableNames->value[839] = "UDS_M2_39";
1498 this->VariableNames->value[840] = "UDS_M2_40";
1499 this->VariableNames->value[841] = "UDS_M2_41";
1500 this->VariableNames->value[842] = "UDS_M2_42";
1501 this->VariableNames->value[843] = "UDS_M2_43";
1502 this->VariableNames->value[844] = "UDS_M2_44";
1503 this->VariableNames->value[845] = "UDS_M2_45";
1504 this->VariableNames->value[846] = "UDS_M2_46";
1505 this->VariableNames->value[847] = "UDS_M2_47";
1506 this->VariableNames->value[848] = "UDS_M2_48";
1507 this->VariableNames->value[849] = "UDS_M2_49";
1508
1509 this->VariableNames->value[850] = "DPMS_DS_Y_00";
1510 this->VariableNames->value[851] = "DPMS_DS_Y_01";
1511 this->VariableNames->value[852] = "DPMS_DS_Y_02";
1512 this->VariableNames->value[853] = "DPMS_DS_Y_03";
1513 this->VariableNames->value[854] = "DPMS_DS_Y_04";
1514 this->VariableNames->value[855] = "DPMS_DS_Y_05";
1515 this->VariableNames->value[856] = "DPMS_DS_Y_06";
1516 this->VariableNames->value[857] = "DPMS_DS_Y_07";
1517 this->VariableNames->value[858] = "DPMS_DS_Y_08";
1518 this->VariableNames->value[859] = "DPMS_DS_Y_09";
1519 this->VariableNames->value[860] = "DPMS_DS_Y_10";
1520 this->VariableNames->value[861] = "DPMS_DS_Y_11";
1521 this->VariableNames->value[862] = "DPMS_DS_Y_12";
1522 this->VariableNames->value[863] = "DPMS_DS_Y_13";
1523 this->VariableNames->value[864] = "DPMS_DS_Y_14";
1524 this->VariableNames->value[865] = "DPMS_DS_Y_15";
1525 this->VariableNames->value[866] = "DPMS_DS_Y_16";
1526 this->VariableNames->value[867] = "DPMS_DS_Y_17";
1527 this->VariableNames->value[868] = "DPMS_DS_Y_18";
1528 this->VariableNames->value[869] = "DPMS_DS_Y_19";
1529 this->VariableNames->value[870] = "DPMS_DS_Y_20";
1530 this->VariableNames->value[871] = "DPMS_DS_Y_21";
1531 this->VariableNames->value[872] = "DPMS_DS_Y_22";
1532 this->VariableNames->value[873] = "DPMS_DS_Y_23";
1533 this->VariableNames->value[874] = "DPMS_DS_Y_24";
1534 this->VariableNames->value[875] = "DPMS_DS_Y_25";
1535 this->VariableNames->value[876] = "DPMS_DS_Y_26";
1536 this->VariableNames->value[877] = "DPMS_DS_Y_27";
1537 this->VariableNames->value[878] = "DPMS_DS_Y_28";
1538 this->VariableNames->value[879] = "DPMS_DS_Y_29";
1539 this->VariableNames->value[880] = "DPMS_DS_Y_30";
1540 this->VariableNames->value[881] = "DPMS_DS_Y_31";
1541 this->VariableNames->value[882] = "DPMS_DS_Y_32";
1542 this->VariableNames->value[883] = "DPMS_DS_Y_33";
1543 this->VariableNames->value[884] = "DPMS_DS_Y_34";
1544 this->VariableNames->value[885] = "DPMS_DS_Y_35";
1545 this->VariableNames->value[886] = "DPMS_DS_Y_36";
1546 this->VariableNames->value[887] = "DPMS_DS_Y_37";
1547 this->VariableNames->value[888] = "DPMS_DS_Y_38";
1548 this->VariableNames->value[889] = "DPMS_DS_Y_39";
1549 this->VariableNames->value[890] = "DPMS_DS_Y_40";
1550 this->VariableNames->value[891] = "DPMS_DS_Y_41";
1551 this->VariableNames->value[892] = "DPMS_DS_Y_42";
1552 this->VariableNames->value[893] = "DPMS_DS_Y_43";
1553 this->VariableNames->value[894] = "DPMS_DS_Y_44";
1554 this->VariableNames->value[895] = "DPMS_DS_Y_45";
1555 this->VariableNames->value[896] = "DPMS_DS_Y_46";
1556 this->VariableNames->value[897] = "DPMS_DS_Y_47";
1557 this->VariableNames->value[898] = "DPMS_DS_Y_48";
1558 this->VariableNames->value[899] = "DPMS_DS_Y_49";
1559
1560 this->VariableNames->value[910] = "GRANULAR_PRESSURE";
1561 this->VariableNames->value[911] = "DPMS_DS_P1_S";
1562 this->VariableNames->value[912] = "DPMS_DS_P1_AP";
1563 this->VariableNames->value[913] = "DPMS_DS_P1_DIFF";
1564
1565 this->VariableNames->value[920] = "DPMS_DS_SURFACE_SPECIES_00";
1566 this->VariableNames->value[921] = "DPMS_DS_SURFACE_SPECIES_01";
1567 this->VariableNames->value[922] = "DPMS_DS_SURFACE_SPECIES_02";
1568 this->VariableNames->value[923] = "DPMS_DS_SURFACE_SPECIES_03";
1569 this->VariableNames->value[924] = "DPMS_DS_SURFACE_SPECIES_04";
1570 this->VariableNames->value[925] = "DPMS_DS_SURFACE_SPECIES_05";
1571 this->VariableNames->value[926] = "DPMS_DS_SURFACE_SPECIES_06";
1572 this->VariableNames->value[927] = "DPMS_DS_SURFACE_SPECIES_07";
1573 this->VariableNames->value[928] = "DPMS_DS_SURFACE_SPECIES_08";
1574 this->VariableNames->value[929] = "DPMS_DS_SURFACE_SPECIES_09";
1575 this->VariableNames->value[930] = "DPMS_DS_SURFACE_SPECIES_10";
1576 this->VariableNames->value[931] = "DPMS_DS_SURFACE_SPECIES_11";
1577 this->VariableNames->value[932] = "DPMS_DS_SURFACE_SPECIES_12";
1578 this->VariableNames->value[933] = "DPMS_DS_SURFACE_SPECIES_13";
1579 this->VariableNames->value[934] = "DPMS_DS_SURFACE_SPECIES_14";
1580 this->VariableNames->value[935] = "DPMS_DS_SURFACE_SPECIES_15";
1581 this->VariableNames->value[936] = "DPMS_DS_SURFACE_SPECIES_16";
1582 this->VariableNames->value[937] = "DPMS_DS_SURFACE_SPECIES_17";
1583 this->VariableNames->value[938] = "DPMS_DS_SURFACE_SPECIES_18";
1584 this->VariableNames->value[939] = "DPMS_DS_SURFACE_SPECIES_19";
1585 this->VariableNames->value[940] = "DPMS_DS_SURFACE_SPECIES_20";
1586 this->VariableNames->value[941] = "DPMS_DS_SURFACE_SPECIES_21";
1587 this->VariableNames->value[942] = "DPMS_DS_SURFACE_SPECIES_22";
1588 this->VariableNames->value[943] = "DPMS_DS_SURFACE_SPECIES_23";
1589 this->VariableNames->value[944] = "DPMS_DS_SURFACE_SPECIES_24";
1590 this->VariableNames->value[945] = "DPMS_DS_SURFACE_SPECIES_25";
1591 this->VariableNames->value[946] = "DPMS_DS_SURFACE_SPECIES_26";
1592 this->VariableNames->value[947] = "DPMS_DS_SURFACE_SPECIES_27";
1593 this->VariableNames->value[948] = "DPMS_DS_SURFACE_SPECIES_28";
1594 this->VariableNames->value[949] = "DPMS_DS_SURFACE_SPECIES_29";
1595 this->VariableNames->value[950] = "DPMS_DS_SURFACE_SPECIES_30";
1596 this->VariableNames->value[951] = "DPMS_DS_SURFACE_SPECIES_31";
1597 this->VariableNames->value[952] = "DPMS_DS_SURFACE_SPECIES_32";
1598 this->VariableNames->value[953] = "DPMS_DS_SURFACE_SPECIES_33";
1599 this->VariableNames->value[954] = "DPMS_DS_SURFACE_SPECIES_34";
1600 this->VariableNames->value[955] = "DPMS_DS_SURFACE_SPECIES_35";
1601 this->VariableNames->value[956] = "DPMS_DS_SURFACE_SPECIES_36";
1602 this->VariableNames->value[957] = "DPMS_DS_SURFACE_SPECIES_37";
1603 this->VariableNames->value[958] = "DPMS_DS_SURFACE_SPECIES_38";
1604 this->VariableNames->value[959] = "DPMS_DS_SURFACE_SPECIES_39";
1605 this->VariableNames->value[960] = "DPMS_DS_SURFACE_SPECIES_40";
1606 this->VariableNames->value[961] = "DPMS_DS_SURFACE_SPECIES_41";
1607 this->VariableNames->value[962] = "DPMS_DS_SURFACE_SPECIES_42";
1608 this->VariableNames->value[963] = "DPMS_DS_SURFACE_SPECIES_43";
1609 this->VariableNames->value[964] = "DPMS_DS_SURFACE_SPECIES_44";
1610 this->VariableNames->value[965] = "DPMS_DS_SURFACE_SPECIES_45";
1611 this->VariableNames->value[966] = "DPMS_DS_SURFACE_SPECIES_46";
1612 this->VariableNames->value[967] = "DPMS_DS_SURFACE_SPECIES_47";
1613 this->VariableNames->value[968] = "DPMS_DS_SURFACE_SPECIES_48";
1614 this->VariableNames->value[969] = "DPMS_DS_SURFACE_SPECIES_49";
1615 this->VariableNames->value[970] = "UDM_I";
1616
1617 this->VariableNames->value[1000] = "Y_MEAN_00";
1618 this->VariableNames->value[1001] = "Y_MEAN_01";
1619 this->VariableNames->value[1002] = "Y_MEAN_02";
1620 this->VariableNames->value[1003] = "Y_MEAN_03";
1621 this->VariableNames->value[1004] = "Y_MEAN_04";
1622 this->VariableNames->value[1005] = "Y_MEAN_05";
1623 this->VariableNames->value[1006] = "Y_MEAN_06";
1624 this->VariableNames->value[1007] = "Y_MEAN_07";
1625 this->VariableNames->value[1008] = "Y_MEAN_08";
1626 this->VariableNames->value[1009] = "Y_MEAN_09";
1627 this->VariableNames->value[1010] = "Y_MEAN_10";
1628 this->VariableNames->value[1011] = "Y_MEAN_11";
1629 this->VariableNames->value[1012] = "Y_MEAN_12";
1630 this->VariableNames->value[1013] = "Y_MEAN_13";
1631 this->VariableNames->value[1014] = "Y_MEAN_14";
1632 this->VariableNames->value[1015] = "Y_MEAN_15";
1633 this->VariableNames->value[1016] = "Y_MEAN_16";
1634 this->VariableNames->value[1017] = "Y_MEAN_17";
1635 this->VariableNames->value[1018] = "Y_MEAN_18";
1636 this->VariableNames->value[1019] = "Y_MEAN_19";
1637 this->VariableNames->value[1020] = "Y_MEAN_20";
1638 this->VariableNames->value[1021] = "Y_MEAN_21";
1639 this->VariableNames->value[1022] = "Y_MEAN_22";
1640 this->VariableNames->value[1023] = "Y_MEAN_23";
1641 this->VariableNames->value[1024] = "Y_MEAN_24";
1642 this->VariableNames->value[1025] = "Y_MEAN_25";
1643 this->VariableNames->value[1026] = "Y_MEAN_26";
1644 this->VariableNames->value[1027] = "Y_MEAN_27";
1645 this->VariableNames->value[1028] = "Y_MEAN_28";
1646 this->VariableNames->value[1029] = "Y_MEAN_29";
1647 this->VariableNames->value[1030] = "Y_MEAN_30";
1648 this->VariableNames->value[1031] = "Y_MEAN_31";
1649 this->VariableNames->value[1032] = "Y_MEAN_32";
1650 this->VariableNames->value[1033] = "Y_MEAN_33";
1651 this->VariableNames->value[1034] = "Y_MEAN_34";
1652 this->VariableNames->value[1035] = "Y_MEAN_35";
1653 this->VariableNames->value[1036] = "Y_MEAN_36";
1654 this->VariableNames->value[1037] = "Y_MEAN_37";
1655 this->VariableNames->value[1038] = "Y_MEAN_38";
1656 this->VariableNames->value[1039] = "Y_MEAN_39";
1657 this->VariableNames->value[1040] = "Y_MEAN_40";
1658 this->VariableNames->value[1041] = "Y_MEAN_41";
1659 this->VariableNames->value[1042] = "Y_MEAN_42";
1660 this->VariableNames->value[1043] = "Y_MEAN_43";
1661 this->VariableNames->value[1044] = "Y_MEAN_44";
1662 this->VariableNames->value[1045] = "Y_MEAN_45";
1663 this->VariableNames->value[1046] = "Y_MEAN_46";
1664 this->VariableNames->value[1047] = "Y_MEAN_47";
1665 this->VariableNames->value[1048] = "Y_MEAN_48";
1666 this->VariableNames->value[1049] = "Y_MEAN_49";
1667
1668 this->VariableNames->value[1050] = "Y_RMS_00";
1669 this->VariableNames->value[1051] = "Y_RMS_01";
1670 this->VariableNames->value[1052] = "Y_RMS_02";
1671 this->VariableNames->value[1053] = "Y_RMS_03";
1672 this->VariableNames->value[1054] = "Y_RMS_04";
1673 this->VariableNames->value[1055] = "Y_RMS_05";
1674 this->VariableNames->value[1056] = "Y_RMS_06";
1675 this->VariableNames->value[1057] = "Y_RMS_07";
1676 this->VariableNames->value[1058] = "Y_RMS_08";
1677 this->VariableNames->value[1059] = "Y_RMS_09";
1678 this->VariableNames->value[1060] = "Y_RMS_10";
1679 this->VariableNames->value[1061] = "Y_RMS_11";
1680 this->VariableNames->value[1062] = "Y_RMS_12";
1681 this->VariableNames->value[1063] = "Y_RMS_13";
1682 this->VariableNames->value[1064] = "Y_RMS_14";
1683 this->VariableNames->value[1065] = "Y_RMS_15";
1684 this->VariableNames->value[1066] = "Y_RMS_16";
1685 this->VariableNames->value[1067] = "Y_RMS_17";
1686 this->VariableNames->value[1068] = "Y_RMS_18";
1687 this->VariableNames->value[1069] = "Y_RMS_19";
1688 this->VariableNames->value[1070] = "Y_RMS_20";
1689 this->VariableNames->value[1071] = "Y_RMS_21";
1690 this->VariableNames->value[1072] = "Y_RMS_22";
1691 this->VariableNames->value[1073] = "Y_RMS_23";
1692 this->VariableNames->value[1074] = "Y_RMS_24";
1693 this->VariableNames->value[1075] = "Y_RMS_25";
1694 this->VariableNames->value[1076] = "Y_RMS_26";
1695 this->VariableNames->value[1077] = "Y_RMS_27";
1696 this->VariableNames->value[1078] = "Y_RMS_28";
1697 this->VariableNames->value[1079] = "Y_RMS_29";
1698 this->VariableNames->value[1080] = "Y_RMS_30";
1699 this->VariableNames->value[1081] = "Y_RMS_31";
1700 this->VariableNames->value[1082] = "Y_RMS_32";
1701 this->VariableNames->value[1083] = "Y_RMS_33";
1702 this->VariableNames->value[1084] = "Y_RMS_34";
1703 this->VariableNames->value[1085] = "Y_RMS_35";
1704 this->VariableNames->value[1086] = "Y_RMS_36";
1705 this->VariableNames->value[1087] = "Y_RMS_37";
1706 this->VariableNames->value[1088] = "Y_RMS_38";
1707 this->VariableNames->value[1089] = "Y_RMS_39";
1708 this->VariableNames->value[1090] = "Y_RMS_40";
1709 this->VariableNames->value[1091] = "Y_RMS_41";
1710 this->VariableNames->value[1092] = "Y_RMS_42";
1711 this->VariableNames->value[1093] = "Y_RMS_43";
1712 this->VariableNames->value[1094] = "Y_RMS_44";
1713 this->VariableNames->value[1095] = "Y_RMS_45";
1714 this->VariableNames->value[1096] = "Y_RMS_46";
1715 this->VariableNames->value[1097] = "Y_RMS_47";
1716 this->VariableNames->value[1098] = "Y_RMS_48";
1717 this->VariableNames->value[1099] = "Y_RMS_49";
1718
1719
1720 this->VariableNames->value[1200] = "SITE_F_00";
1721 this->VariableNames->value[1201] = "SITE_F_01";
1722 this->VariableNames->value[1202] = "SITE_F_02";
1723 this->VariableNames->value[1203] = "SITE_F_03";
1724 this->VariableNames->value[1204] = "SITE_F_04";
1725 this->VariableNames->value[1205] = "SITE_F_05";
1726 this->VariableNames->value[1206] = "SITE_F_06";
1727 this->VariableNames->value[1207] = "SITE_F_07";
1728 this->VariableNames->value[1208] = "SITE_F_08";
1729 this->VariableNames->value[1209] = "SITE_F_09";
1730 this->VariableNames->value[1210] = "SITE_F_10";
1731 this->VariableNames->value[1211] = "SITE_F_11";
1732 this->VariableNames->value[1212] = "SITE_F_12";
1733 this->VariableNames->value[1213] = "SITE_F_13";
1734 this->VariableNames->value[1214] = "SITE_F_14";
1735 this->VariableNames->value[1215] = "SITE_F_15";
1736 this->VariableNames->value[1216] = "SITE_F_16";
1737 this->VariableNames->value[1217] = "SITE_F_17";
1738 this->VariableNames->value[1218] = "SITE_F_18";
1739 this->VariableNames->value[1219] = "SITE_F_19";
1740 this->VariableNames->value[1220] = "SITE_F_20";
1741 this->VariableNames->value[1221] = "SITE_F_21";
1742 this->VariableNames->value[1222] = "SITE_F_22";
1743 this->VariableNames->value[1223] = "SITE_F_23";
1744 this->VariableNames->value[1224] = "SITE_F_24";
1745 this->VariableNames->value[1225] = "SITE_F_25";
1746 this->VariableNames->value[1226] = "SITE_F_26";
1747 this->VariableNames->value[1227] = "SITE_F_27";
1748 this->VariableNames->value[1228] = "SITE_F_28";
1749 this->VariableNames->value[1229] = "SITE_F_29";
1750 this->VariableNames->value[1230] = "SITE_F_30";
1751 this->VariableNames->value[1231] = "SITE_F_31";
1752 this->VariableNames->value[1232] = "SITE_F_32";
1753 this->VariableNames->value[1233] = "SITE_F_33";
1754 this->VariableNames->value[1234] = "SITE_F_34";
1755 this->VariableNames->value[1235] = "SITE_F_35";
1756 this->VariableNames->value[1236] = "SITE_F_36";
1757 this->VariableNames->value[1237] = "SITE_F_37";
1758 this->VariableNames->value[1238] = "SITE_F_38";
1759 this->VariableNames->value[1239] = "SITE_F_39";
1760 this->VariableNames->value[1240] = "SITE_F_40";
1761 this->VariableNames->value[1241] = "SITE_F_41";
1762 this->VariableNames->value[1242] = "SITE_F_42";
1763 this->VariableNames->value[1243] = "SITE_F_43";
1764 this->VariableNames->value[1244] = "SITE_F_44";
1765 this->VariableNames->value[1245] = "SITE_F_45";
1766 this->VariableNames->value[1246] = "SITE_F_46";
1767 this->VariableNames->value[1247] = "SITE_F_47";
1768 this->VariableNames->value[1248] = "SITE_F_48";
1769 this->VariableNames->value[1249] = "SITE_F_49";
1770
1771 this->VariableNames->value[1250] = "CREV_Y_00";
1772 this->VariableNames->value[1251] = "CREV_Y_01";
1773 this->VariableNames->value[1252] = "CREV_Y_02";
1774 this->VariableNames->value[1253] = "CREV_Y_03";
1775 this->VariableNames->value[1254] = "CREV_Y_04";
1776 this->VariableNames->value[1255] = "CREV_Y_05";
1777 this->VariableNames->value[1256] = "CREV_Y_06";
1778 this->VariableNames->value[1257] = "CREV_Y_07";
1779 this->VariableNames->value[1258] = "CREV_Y_08";
1780 this->VariableNames->value[1259] = "CREV_Y_09";
1781 this->VariableNames->value[1260] = "CREV_Y_10";
1782 this->VariableNames->value[1261] = "CREV_Y_11";
1783 this->VariableNames->value[1262] = "CREV_Y_12";
1784 this->VariableNames->value[1263] = "CREV_Y_13";
1785 this->VariableNames->value[1264] = "CREV_Y_14";
1786 this->VariableNames->value[1265] = "CREV_Y_15";
1787 this->VariableNames->value[1266] = "CREV_Y_16";
1788 this->VariableNames->value[1267] = "CREV_Y_17";
1789 this->VariableNames->value[1268] = "CREV_Y_18";
1790 this->VariableNames->value[1269] = "CREV_Y_19";
1791 this->VariableNames->value[1270] = "CREV_Y_20";
1792 this->VariableNames->value[1271] = "CREV_Y_21";
1793 this->VariableNames->value[1272] = "CREV_Y_22";
1794 this->VariableNames->value[1273] = "CREV_Y_23";
1795 this->VariableNames->value[1274] = "CREV_Y_24";
1796 this->VariableNames->value[1275] = "CREV_Y_25";
1797 this->VariableNames->value[1276] = "CREV_Y_26";
1798 this->VariableNames->value[1277] = "CREV_Y_27";
1799 this->VariableNames->value[1278] = "CREV_Y_28";
1800 this->VariableNames->value[1279] = "CREV_Y_29";
1801 this->VariableNames->value[1280] = "CREV_Y_30";
1802 this->VariableNames->value[1281] = "CREV_Y_31";
1803 this->VariableNames->value[1282] = "CREV_Y_32";
1804 this->VariableNames->value[1283] = "CREV_Y_33";
1805 this->VariableNames->value[1284] = "CREV_Y_34";
1806 this->VariableNames->value[1285] = "CREV_Y_35";
1807 this->VariableNames->value[1286] = "CREV_Y_36";
1808 this->VariableNames->value[1287] = "CREV_Y_37";
1809 this->VariableNames->value[1288] = "CREV_Y_38";
1810 this->VariableNames->value[1289] = "CREV_Y_39";
1811 this->VariableNames->value[1290] = "CREV_Y_40";
1812 this->VariableNames->value[1291] = "CREV_Y_41";
1813 this->VariableNames->value[1292] = "CREV_Y_42";
1814 this->VariableNames->value[1293] = "CREV_Y_43";
1815 this->VariableNames->value[1294] = "CREV_Y_44";
1816 this->VariableNames->value[1295] = "CREV_Y_45";
1817 this->VariableNames->value[1296] = "CREV_Y_46";
1818 this->VariableNames->value[1297] = "CREV_Y_47";
1819 this->VariableNames->value[1298] = "CREV_Y_48";
1820 this->VariableNames->value[1299] = "CREV_Y_49";
1821
1822 this->VariableNames->value[1301] = "WSB";
1823 this->VariableNames->value[1302] = "WSN";
1824 this->VariableNames->value[1303] = "WSR";
1825 this->VariableNames->value[1304] = "WSB_M1";
1826 this->VariableNames->value[1305] = "WSB_M2";
1827 this->VariableNames->value[1306] = "WSN_M1";
1828 this->VariableNames->value[1307] = "WSN_M2";
1829 this->VariableNames->value[1308] = "WSR_M1";
1830 this->VariableNames->value[1309] = "WSR_M2";
1831 this->VariableNames->value[1310] = "MASGEN";
1832 this->VariableNames->value[1311] = "NUCRAT";
1833 this->VariableNames->value[1330] = "TEMPERATURE_M1";
1834 this->VariableNames->value[1331] = "TEMPERATURE_M2";
1835
1836 this->VariableNames->value[1350] = "SURF_F_00";
1837 this->VariableNames->value[1351] = "SURF_F_01";
1838 this->VariableNames->value[1352] = "SURF_F_02";
1839 this->VariableNames->value[1353] = "SURF_F_03";
1840 this->VariableNames->value[1354] = "SURF_F_04";
1841 this->VariableNames->value[1355] = "SURF_F_05";
1842 this->VariableNames->value[1356] = "SURF_F_06";
1843 this->VariableNames->value[1357] = "SURF_F_07";
1844 this->VariableNames->value[1358] = "SURF_F_08";
1845 this->VariableNames->value[1359] = "SURF_F_09";
1846 this->VariableNames->value[1360] = "SURF_F_10";
1847 this->VariableNames->value[1361] = "SURF_F_11";
1848 this->VariableNames->value[1362] = "SURF_F_12";
1849 this->VariableNames->value[1363] = "SURF_F_13";
1850 this->VariableNames->value[1364] = "SURF_F_14";
1851 this->VariableNames->value[1365] = "SURF_F_15";
1852 this->VariableNames->value[1366] = "SURF_F_16";
1853 this->VariableNames->value[1367] = "SURF_F_17";
1854 this->VariableNames->value[1368] = "SURF_F_18";
1855 this->VariableNames->value[1369] = "SURF_F_19";
1856 this->VariableNames->value[1370] = "SURF_F_20";
1857 this->VariableNames->value[1371] = "SURF_F_21";
1858 this->VariableNames->value[1372] = "SURF_F_22";
1859 this->VariableNames->value[1373] = "SURF_F_23";
1860 this->VariableNames->value[1374] = "SURF_F_24";
1861 this->VariableNames->value[1375] = "SURF_F_25";
1862 this->VariableNames->value[1376] = "SURF_F_26";
1863 this->VariableNames->value[1377] = "SURF_F_27";
1864 this->VariableNames->value[1378] = "SURF_F_28";
1865 this->VariableNames->value[1379] = "SURF_F_29";
1866 this->VariableNames->value[1380] = "SURF_F_30";
1867 this->VariableNames->value[1381] = "SURF_F_31";
1868 this->VariableNames->value[1382] = "SURF_F_32";
1869 this->VariableNames->value[1383] = "SURF_F_33";
1870 this->VariableNames->value[1384] = "SURF_F_34";
1871 this->VariableNames->value[1385] = "SURF_F_35";
1872 this->VariableNames->value[1386] = "SURF_F_36";
1873 this->VariableNames->value[1387] = "SURF_F_37";
1874 this->VariableNames->value[1388] = "SURF_F_38";
1875 this->VariableNames->value[1389] = "SURF_F_39";
1876 this->VariableNames->value[1390] = "SURF_F_40";
1877 this->VariableNames->value[1391] = "SURF_F_41";
1878 this->VariableNames->value[1392] = "SURF_F_42";
1879 this->VariableNames->value[1393] = "SURF_F_43";
1880 this->VariableNames->value[1394] = "SURF_F_44";
1881 this->VariableNames->value[1395] = "SURF_F_45";
1882 this->VariableNames->value[1396] = "SURF_F_46";
1883 this->VariableNames->value[1397] = "SURF_F_47";
1884 this->VariableNames->value[1398] = "SURF_F_48";
1885 this->VariableNames->value[1399] = "SURF_F_49";
1886
1887 this->VariableNames->value[7700] = "PB_DISC_00";
1888 this->VariableNames->value[7701] = "PB_DISC_01";
1889 this->VariableNames->value[7702] = "PB_DISC_02";
1890 this->VariableNames->value[7703] = "PB_DISC_03";
1891 this->VariableNames->value[7704] = "PB_DISC_04";
1892 this->VariableNames->value[7705] = "PB_DISC_05";
1893 this->VariableNames->value[7706] = "PB_DISC_06";
1894 this->VariableNames->value[7707] = "PB_DISC_07";
1895 this->VariableNames->value[7708] = "PB_DISC_08";
1896 this->VariableNames->value[7709] = "PB_DISC_09";
1897 this->VariableNames->value[7710] = "PB_DISC_10";
1898 this->VariableNames->value[7711] = "PB_DISC_11";
1899 this->VariableNames->value[7712] = "PB_DISC_12";
1900 this->VariableNames->value[7713] = "PB_DISC_13";
1901 this->VariableNames->value[7714] = "PB_DISC_14";
1902 this->VariableNames->value[7715] = "PB_DISC_15";
1903 this->VariableNames->value[7716] = "PB_DISC_16";
1904 this->VariableNames->value[7717] = "PB_DISC_17";
1905 this->VariableNames->value[7718] = "PB_DISC_18";
1906 this->VariableNames->value[7719] = "PB_DISC_19";
1907 this->VariableNames->value[7720] = "PB_DISC_20";
1908 this->VariableNames->value[7721] = "PB_DISC_21";
1909 this->VariableNames->value[7722] = "PB_DISC_22";
1910 this->VariableNames->value[7723] = "PB_DISC_23";
1911 this->VariableNames->value[7724] = "PB_DISC_24";
1912 this->VariableNames->value[7725] = "PB_DISC_25";
1913 this->VariableNames->value[7726] = "PB_DISC_26";
1914 this->VariableNames->value[7727] = "PB_DISC_27";
1915 this->VariableNames->value[7728] = "PB_DISC_28";
1916 this->VariableNames->value[7729] = "PB_DISC_29";
1917 this->VariableNames->value[7730] = "PB_DISC_30";
1918 this->VariableNames->value[7731] = "PB_DISC_31";
1919 this->VariableNames->value[7732] = "PB_DISC_32";
1920 this->VariableNames->value[7733] = "PB_DISC_33";
1921 this->VariableNames->value[7734] = "PB_DISC_34";
1922 this->VariableNames->value[7735] = "PB_DISC_35";
1923 this->VariableNames->value[7736] = "PB_DISC_36";
1924 this->VariableNames->value[7737] = "PB_DISC_37";
1925 this->VariableNames->value[7738] = "PB_DISC_38";
1926 this->VariableNames->value[7739] = "PB_DISC_39";
1927 this->VariableNames->value[7740] = "PB_DISC_40";
1928 this->VariableNames->value[7741] = "PB_DISC_41";
1929 this->VariableNames->value[7742] = "PB_DISC_42";
1930 this->VariableNames->value[7743] = "PB_DISC_43";
1931 this->VariableNames->value[7744] = "PB_DISC_44";
1932 this->VariableNames->value[7745] = "PB_DISC_45";
1933 this->VariableNames->value[7746] = "PB_DISC_46";
1934 this->VariableNames->value[7747] = "PB_DISC_47";
1935 this->VariableNames->value[7748] = "PB_DISC_48";
1936 this->VariableNames->value[7749] = "PB_DISC_49";
1937
1938 this->VariableNames->value[7750] = "PB_DISC_M1_00";
1939 this->VariableNames->value[7751] = "PB_DISC_M1_01";
1940 this->VariableNames->value[7752] = "PB_DISC_M1_02";
1941 this->VariableNames->value[7753] = "PB_DISC_M1_03";
1942 this->VariableNames->value[7754] = "PB_DISC_M1_04";
1943 this->VariableNames->value[7755] = "PB_DISC_M1_05";
1944 this->VariableNames->value[7756] = "PB_DISC_M1_06";
1945 this->VariableNames->value[7757] = "PB_DISC_M1_07";
1946 this->VariableNames->value[7758] = "PB_DISC_M1_08";
1947 this->VariableNames->value[7759] = "PB_DISC_M1_09";
1948 this->VariableNames->value[7760] = "PB_DISC_M1_10";
1949 this->VariableNames->value[7761] = "PB_DISC_M1_11";
1950 this->VariableNames->value[7762] = "PB_DISC_M1_12";
1951 this->VariableNames->value[7763] = "PB_DISC_M1_13";
1952 this->VariableNames->value[7764] = "PB_DISC_M1_14";
1953 this->VariableNames->value[7765] = "PB_DISC_M1_15";
1954 this->VariableNames->value[7766] = "PB_DISC_M1_16";
1955 this->VariableNames->value[7767] = "PB_DISC_M1_17";
1956 this->VariableNames->value[7768] = "PB_DISC_M1_18";
1957 this->VariableNames->value[7769] = "PB_DISC_M1_19";
1958 this->VariableNames->value[7770] = "PB_DISC_M1_20";
1959 this->VariableNames->value[7771] = "PB_DISC_M1_21";
1960 this->VariableNames->value[7772] = "PB_DISC_M1_22";
1961 this->VariableNames->value[7773] = "PB_DISC_M1_23";
1962 this->VariableNames->value[7774] = "PB_DISC_M1_24";
1963 this->VariableNames->value[7775] = "PB_DISC_M1_25";
1964 this->VariableNames->value[7776] = "PB_DISC_M1_26";
1965 this->VariableNames->value[7777] = "PB_DISC_M1_27";
1966 this->VariableNames->value[7778] = "PB_DISC_M1_28";
1967 this->VariableNames->value[7779] = "PB_DISC_M1_29";
1968 this->VariableNames->value[7780] = "PB_DISC_M1_30";
1969 this->VariableNames->value[7781] = "PB_DISC_M1_31";
1970 this->VariableNames->value[7782] = "PB_DISC_M1_32";
1971 this->VariableNames->value[7783] = "PB_DISC_M1_33";
1972 this->VariableNames->value[7784] = "PB_DISC_M1_34";
1973 this->VariableNames->value[7785] = "PB_DISC_M1_35";
1974 this->VariableNames->value[7786] = "PB_DISC_M1_36";
1975 this->VariableNames->value[7787] = "PB_DISC_M1_37";
1976 this->VariableNames->value[7788] = "PB_DISC_M1_38";
1977 this->VariableNames->value[7789] = "PB_DISC_M1_39";
1978 this->VariableNames->value[7790] = "PB_DISC_M1_40";
1979 this->VariableNames->value[7791] = "PB_DISC_M1_41";
1980 this->VariableNames->value[7792] = "PB_DISC_M1_42";
1981 this->VariableNames->value[7793] = "PB_DISC_M1_43";
1982 this->VariableNames->value[7794] = "PB_DISC_M1_44";
1983 this->VariableNames->value[7795] = "PB_DISC_M1_45";
1984 this->VariableNames->value[7796] = "PB_DISC_M1_46";
1985 this->VariableNames->value[7797] = "PB_DISC_M1_47";
1986 this->VariableNames->value[7798] = "PB_DISC_M1_48";
1987 this->VariableNames->value[7799] = "PB_DISC_M1_49";
1988
1989 this->VariableNames->value[7800] = "PB_DISC_M2_00";
1990 this->VariableNames->value[7801] = "PB_DISC_M2_01";
1991 this->VariableNames->value[7802] = "PB_DISC_M2_02";
1992 this->VariableNames->value[7803] = "PB_DISC_M2_03";
1993 this->VariableNames->value[7804] = "PB_DISC_M2_04";
1994 this->VariableNames->value[7805] = "PB_DISC_M2_05";
1995 this->VariableNames->value[7806] = "PB_DISC_M2_06";
1996 this->VariableNames->value[7807] = "PB_DISC_M2_07";
1997 this->VariableNames->value[7808] = "PB_DISC_M2_08";
1998 this->VariableNames->value[7809] = "PB_DISC_M2_09";
1999 this->VariableNames->value[7810] = "PB_DISC_M2_10";
2000 this->VariableNames->value[7811] = "PB_DISC_M2_11";
2001 this->VariableNames->value[7812] = "PB_DISC_M2_12";
2002 this->VariableNames->value[7813] = "PB_DISC_M2_13";
2003 this->VariableNames->value[7814] = "PB_DISC_M2_14";
2004 this->VariableNames->value[7815] = "PB_DISC_M2_15";
2005 this->VariableNames->value[7816] = "PB_DISC_M2_16";
2006 this->VariableNames->value[7817] = "PB_DISC_M2_17";
2007 this->VariableNames->value[7818] = "PB_DISC_M2_18";
2008 this->VariableNames->value[7819] = "PB_DISC_M2_19";
2009 this->VariableNames->value[7820] = "PB_DISC_M2_20";
2010 this->VariableNames->value[7821] = "PB_DISC_M2_21";
2011 this->VariableNames->value[7822] = "PB_DISC_M2_22";
2012 this->VariableNames->value[7823] = "PB_DISC_M2_23";
2013 this->VariableNames->value[7824] = "PB_DISC_M2_24";
2014 this->VariableNames->value[7825] = "PB_DISC_M2_25";
2015 this->VariableNames->value[7826] = "PB_DISC_M2_26";
2016 this->VariableNames->value[7827] = "PB_DISC_M2_27";
2017 this->VariableNames->value[7828] = "PB_DISC_M2_28";
2018 this->VariableNames->value[7829] = "PB_DISC_M2_29";
2019 this->VariableNames->value[7830] = "PB_DISC_M2_30";
2020 this->VariableNames->value[7831] = "PB_DISC_M2_31";
2021 this->VariableNames->value[7832] = "PB_DISC_M2_32";
2022 this->VariableNames->value[7833] = "PB_DISC_M2_33";
2023 this->VariableNames->value[7834] = "PB_DISC_M2_34";
2024 this->VariableNames->value[7835] = "PB_DISC_M2_35";
2025 this->VariableNames->value[7836] = "PB_DISC_M2_36";
2026 this->VariableNames->value[7837] = "PB_DISC_M2_37";
2027 this->VariableNames->value[7838] = "PB_DISC_M2_38";
2028 this->VariableNames->value[7839] = "PB_DISC_M2_39";
2029 this->VariableNames->value[7840] = "PB_DISC_M2_40";
2030 this->VariableNames->value[7841] = "PB_DISC_M2_41";
2031 this->VariableNames->value[7842] = "PB_DISC_M2_42";
2032 this->VariableNames->value[7843] = "PB_DISC_M2_43";
2033 this->VariableNames->value[7844] = "PB_DISC_M2_44";
2034 this->VariableNames->value[7845] = "PB_DISC_M2_45";
2035 this->VariableNames->value[7846] = "PB_DISC_M2_46";
2036 this->VariableNames->value[7847] = "PB_DISC_M2_47";
2037 this->VariableNames->value[7848] = "PB_DISC_M2_48";
2038 this->VariableNames->value[7849] = "PB_DISC_M2_49";
2039
2040 this->VariableNames->value[7850] = "PB_QMOM_00";
2041 this->VariableNames->value[7851] = "PB_QMOM_01";
2042 this->VariableNames->value[7852] = "PB_QMOM_02";
2043 this->VariableNames->value[7853] = "PB_QMOM_03";
2044 this->VariableNames->value[7854] = "PB_QMOM_04";
2045 this->VariableNames->value[7855] = "PB_QMOM_05";
2046 this->VariableNames->value[7856] = "PB_QMOM_06";
2047 this->VariableNames->value[7857] = "PB_QMOM_07";
2048 this->VariableNames->value[7858] = "PB_QMOM_08";
2049 this->VariableNames->value[7859] = "PB_QMOM_09";
2050 this->VariableNames->value[7860] = "PB_QMOM_10";
2051 this->VariableNames->value[7861] = "PB_QMOM_11";
2052 this->VariableNames->value[7862] = "PB_QMOM_12";
2053 this->VariableNames->value[7863] = "PB_QMOM_13";
2054 this->VariableNames->value[7864] = "PB_QMOM_14";
2055 this->VariableNames->value[7865] = "PB_QMOM_15";
2056 this->VariableNames->value[7866] = "PB_QMOM_16";
2057 this->VariableNames->value[7867] = "PB_QMOM_17";
2058 this->VariableNames->value[7868] = "PB_QMOM_18";
2059 this->VariableNames->value[7869] = "PB_QMOM_19";
2060 this->VariableNames->value[7870] = "PB_QMOM_20";
2061 this->VariableNames->value[7871] = "PB_QMOM_21";
2062 this->VariableNames->value[7872] = "PB_QMOM_22";
2063 this->VariableNames->value[7873] = "PB_QMOM_23";
2064 this->VariableNames->value[7874] = "PB_QMOM_24";
2065 this->VariableNames->value[7875] = "PB_QMOM_25";
2066 this->VariableNames->value[7876] = "PB_QMOM_26";
2067 this->VariableNames->value[7877] = "PB_QMOM_27";
2068 this->VariableNames->value[7878] = "PB_QMOM_28";
2069 this->VariableNames->value[7879] = "PB_QMOM_29";
2070 this->VariableNames->value[7880] = "PB_QMOM_30";
2071 this->VariableNames->value[7881] = "PB_QMOM_31";
2072 this->VariableNames->value[7882] = "PB_QMOM_32";
2073 this->VariableNames->value[7883] = "PB_QMOM_33";
2074 this->VariableNames->value[7884] = "PB_QMOM_34";
2075 this->VariableNames->value[7885] = "PB_QMOM_35";
2076 this->VariableNames->value[7886] = "PB_QMOM_36";
2077 this->VariableNames->value[7887] = "PB_QMOM_37";
2078 this->VariableNames->value[7888] = "PB_QMOM_38";
2079 this->VariableNames->value[7889] = "PB_QMOM_39";
2080 this->VariableNames->value[7890] = "PB_QMOM_40";
2081 this->VariableNames->value[7891] = "PB_QMOM_41";
2082 this->VariableNames->value[7892] = "PB_QMOM_42";
2083 this->VariableNames->value[7893] = "PB_QMOM_43";
2084 this->VariableNames->value[7894] = "PB_QMOM_44";
2085 this->VariableNames->value[7895] = "PB_QMOM_45";
2086 this->VariableNames->value[7896] = "PB_QMOM_46";
2087 this->VariableNames->value[7897] = "PB_QMOM_47";
2088 this->VariableNames->value[7898] = "PB_QMOM_48";
2089 this->VariableNames->value[7899] = "PB_QMOM_49";
2090
2091 this->VariableNames->value[7900] = "PB_QMOM_M1_00";
2092 this->VariableNames->value[7901] = "PB_QMOM_M1_01";
2093 this->VariableNames->value[7902] = "PB_QMOM_M1_02";
2094 this->VariableNames->value[7903] = "PB_QMOM_M1_03";
2095 this->VariableNames->value[7904] = "PB_QMOM_M1_04";
2096 this->VariableNames->value[7905] = "PB_QMOM_M1_05";
2097 this->VariableNames->value[7906] = "PB_QMOM_M1_06";
2098 this->VariableNames->value[7907] = "PB_QMOM_M1_07";
2099 this->VariableNames->value[7908] = "PB_QMOM_M1_08";
2100 this->VariableNames->value[7909] = "PB_QMOM_M1_09";
2101 this->VariableNames->value[7910] = "PB_QMOM_M1_10";
2102 this->VariableNames->value[7911] = "PB_QMOM_M1_11";
2103 this->VariableNames->value[7912] = "PB_QMOM_M1_12";
2104 this->VariableNames->value[7913] = "PB_QMOM_M1_13";
2105 this->VariableNames->value[7914] = "PB_QMOM_M1_14";
2106 this->VariableNames->value[7915] = "PB_QMOM_M1_15";
2107 this->VariableNames->value[7916] = "PB_QMOM_M1_16";
2108 this->VariableNames->value[7917] = "PB_QMOM_M1_17";
2109 this->VariableNames->value[7918] = "PB_QMOM_M1_18";
2110 this->VariableNames->value[7919] = "PB_QMOM_M1_19";
2111 this->VariableNames->value[7920] = "PB_QMOM_M1_20";
2112 this->VariableNames->value[7921] = "PB_QMOM_M1_21";
2113 this->VariableNames->value[7922] = "PB_QMOM_M1_22";
2114 this->VariableNames->value[7923] = "PB_QMOM_M1_23";
2115 this->VariableNames->value[7924] = "PB_QMOM_M1_24";
2116 this->VariableNames->value[7925] = "PB_QMOM_M1_25";
2117 this->VariableNames->value[7926] = "PB_QMOM_M1_26";
2118 this->VariableNames->value[7927] = "PB_QMOM_M1_27";
2119 this->VariableNames->value[7928] = "PB_QMOM_M1_28";
2120 this->VariableNames->value[7929] = "PB_QMOM_M1_29";
2121 this->VariableNames->value[7930] = "PB_QMOM_M1_30";
2122 this->VariableNames->value[7931] = "PB_QMOM_M1_31";
2123 this->VariableNames->value[7932] = "PB_QMOM_M1_32";
2124 this->VariableNames->value[7933] = "PB_QMOM_M1_33";
2125 this->VariableNames->value[7934] = "PB_QMOM_M1_34";
2126 this->VariableNames->value[7935] = "PB_QMOM_M1_35";
2127 this->VariableNames->value[7936] = "PB_QMOM_M1_36";
2128 this->VariableNames->value[7937] = "PB_QMOM_M1_37";
2129 this->VariableNames->value[7938] = "PB_QMOM_M1_38";
2130 this->VariableNames->value[7939] = "PB_QMOM_M1_39";
2131 this->VariableNames->value[7940] = "PB_QMOM_M1_40";
2132 this->VariableNames->value[7941] = "PB_QMOM_M1_41";
2133 this->VariableNames->value[7942] = "PB_QMOM_M1_42";
2134 this->VariableNames->value[7943] = "PB_QMOM_M1_43";
2135 this->VariableNames->value[7944] = "PB_QMOM_M1_44";
2136 this->VariableNames->value[7945] = "PB_QMOM_M1_45";
2137 this->VariableNames->value[7946] = "PB_QMOM_M1_46";
2138 this->VariableNames->value[7947] = "PB_QMOM_M1_47";
2139 this->VariableNames->value[7948] = "PB_QMOM_M1_48";
2140 this->VariableNames->value[7949] = "PB_QMOM_M1_49";
2141
2142 this->VariableNames->value[7950] = "PB_QMOM_M2_00";
2143 this->VariableNames->value[7951] = "PB_QMOM_M2_01";
2144 this->VariableNames->value[7952] = "PB_QMOM_M2_02";
2145 this->VariableNames->value[7953] = "PB_QMOM_M2_03";
2146 this->VariableNames->value[7954] = "PB_QMOM_M2_04";
2147 this->VariableNames->value[7955] = "PB_QMOM_M2_05";
2148 this->VariableNames->value[7956] = "PB_QMOM_M2_06";
2149 this->VariableNames->value[7957] = "PB_QMOM_M2_07";
2150 this->VariableNames->value[7958] = "PB_QMOM_M2_08";
2151 this->VariableNames->value[7959] = "PB_QMOM_M2_09";
2152 this->VariableNames->value[7960] = "PB_QMOM_M2_10";
2153 this->VariableNames->value[7961] = "PB_QMOM_M2_11";
2154 this->VariableNames->value[7962] = "PB_QMOM_M2_12";
2155 this->VariableNames->value[7963] = "PB_QMOM_M2_13";
2156 this->VariableNames->value[7964] = "PB_QMOM_M2_14";
2157 this->VariableNames->value[7965] = "PB_QMOM_M2_15";
2158 this->VariableNames->value[7966] = "PB_QMOM_M2_16";
2159 this->VariableNames->value[7967] = "PB_QMOM_M2_17";
2160 this->VariableNames->value[7968] = "PB_QMOM_M2_18";
2161 this->VariableNames->value[7969] = "PB_QMOM_M2_19";
2162 this->VariableNames->value[7970] = "PB_QMOM_M2_20";
2163 this->VariableNames->value[7971] = "PB_QMOM_M2_21";
2164 this->VariableNames->value[7972] = "PB_QMOM_M2_22";
2165 this->VariableNames->value[7973] = "PB_QMOM_M2_23";
2166 this->VariableNames->value[7974] = "PB_QMOM_M2_24";
2167 this->VariableNames->value[7975] = "PB_QMOM_M2_25";
2168 this->VariableNames->value[7976] = "PB_QMOM_M2_26";
2169 this->VariableNames->value[7977] = "PB_QMOM_M2_27";
2170 this->VariableNames->value[7978] = "PB_QMOM_M2_28";
2171 this->VariableNames->value[7979] = "PB_QMOM_M2_29";
2172 this->VariableNames->value[7980] = "PB_QMOM_M2_30";
2173 this->VariableNames->value[7981] = "PB_QMOM_M2_31";
2174 this->VariableNames->value[7982] = "PB_QMOM_M2_32";
2175 this->VariableNames->value[7983] = "PB_QMOM_M2_33";
2176 this->VariableNames->value[7984] = "PB_QMOM_M2_34";
2177 this->VariableNames->value[7985] = "PB_QMOM_M2_35";
2178 this->VariableNames->value[7986] = "PB_QMOM_M2_36";
2179 this->VariableNames->value[7987] = "PB_QMOM_M2_37";
2180 this->VariableNames->value[7988] = "PB_QMOM_M2_38";
2181 this->VariableNames->value[7989] = "PB_QMOM_M2_39";
2182 this->VariableNames->value[7990] = "PB_QMOM_M2_40";
2183 this->VariableNames->value[7991] = "PB_QMOM_M2_41";
2184 this->VariableNames->value[7992] = "PB_QMOM_M2_42";
2185 this->VariableNames->value[7993] = "PB_QMOM_M2_43";
2186 this->VariableNames->value[7994] = "PB_QMOM_M2_44";
2187 this->VariableNames->value[7995] = "PB_QMOM_M2_45";
2188 this->VariableNames->value[7996] = "PB_QMOM_M2_46";
2189 this->VariableNames->value[7997] = "PB_QMOM_M2_47";
2190 this->VariableNames->value[7998] = "PB_QMOM_M2_48";
2191 this->VariableNames->value[7999] = "PB_QMOM_M2_49";
2192
2193 this->VariableNames->value[8000] = "PB_SMM_00";
2194 this->VariableNames->value[8001] = "PB_SMM_01";
2195 this->VariableNames->value[8002] = "PB_SMM_02";
2196 this->VariableNames->value[8003] = "PB_SMM_03";
2197 this->VariableNames->value[8004] = "PB_SMM_04";
2198 this->VariableNames->value[8005] = "PB_SMM_05";
2199 this->VariableNames->value[8006] = "PB_SMM_06";
2200 this->VariableNames->value[8007] = "PB_SMM_07";
2201 this->VariableNames->value[8008] = "PB_SMM_08";
2202 this->VariableNames->value[8009] = "PB_SMM_09";
2203 this->VariableNames->value[8010] = "PB_SMM_10";
2204 this->VariableNames->value[8011] = "PB_SMM_11";
2205 this->VariableNames->value[8012] = "PB_SMM_12";
2206 this->VariableNames->value[8013] = "PB_SMM_13";
2207 this->VariableNames->value[8014] = "PB_SMM_14";
2208 this->VariableNames->value[8015] = "PB_SMM_15";
2209 this->VariableNames->value[8016] = "PB_SMM_16";
2210 this->VariableNames->value[8017] = "PB_SMM_17";
2211 this->VariableNames->value[8018] = "PB_SMM_18";
2212 this->VariableNames->value[8019] = "PB_SMM_19";
2213 this->VariableNames->value[8020] = "PB_SMM_20";
2214 this->VariableNames->value[8021] = "PB_SMM_21";
2215 this->VariableNames->value[8022] = "PB_SMM_22";
2216 this->VariableNames->value[8023] = "PB_SMM_23";
2217 this->VariableNames->value[8024] = "PB_SMM_24";
2218 this->VariableNames->value[8025] = "PB_SMM_25";
2219 this->VariableNames->value[8026] = "PB_SMM_26";
2220 this->VariableNames->value[8027] = "PB_SMM_27";
2221 this->VariableNames->value[8028] = "PB_SMM_28";
2222 this->VariableNames->value[8029] = "PB_SMM_29";
2223 this->VariableNames->value[8030] = "PB_SMM_30";
2224 this->VariableNames->value[8031] = "PB_SMM_31";
2225 this->VariableNames->value[8032] = "PB_SMM_32";
2226 this->VariableNames->value[8033] = "PB_SMM_33";
2227 this->VariableNames->value[8034] = "PB_SMM_34";
2228 this->VariableNames->value[8035] = "PB_SMM_35";
2229 this->VariableNames->value[8036] = "PB_SMM_36";
2230 this->VariableNames->value[8037] = "PB_SMM_37";
2231 this->VariableNames->value[8038] = "PB_SMM_38";
2232 this->VariableNames->value[8039] = "PB_SMM_39";
2233 this->VariableNames->value[8040] = "PB_SMM_40";
2234 this->VariableNames->value[8041] = "PB_SMM_41";
2235 this->VariableNames->value[8042] = "PB_SMM_42";
2236 this->VariableNames->value[8043] = "PB_SMM_43";
2237 this->VariableNames->value[8044] = "PB_SMM_44";
2238 this->VariableNames->value[8045] = "PB_SMM_45";
2239 this->VariableNames->value[8046] = "PB_SMM_46";
2240 this->VariableNames->value[8047] = "PB_SMM_47";
2241 this->VariableNames->value[8048] = "PB_SMM_48";
2242 this->VariableNames->value[8049] = "PB_SMM_49";
2243
2244 this->VariableNames->value[8050] = "PB_SMM_M1_00";
2245 this->VariableNames->value[8051] = "PB_SMM_M1_01";
2246 this->VariableNames->value[8052] = "PB_SMM_M1_02";
2247 this->VariableNames->value[8053] = "PB_SMM_M1_03";
2248 this->VariableNames->value[8054] = "PB_SMM_M1_04";
2249 this->VariableNames->value[8055] = "PB_SMM_M1_05";
2250 this->VariableNames->value[8056] = "PB_SMM_M1_06";
2251 this->VariableNames->value[8057] = "PB_SMM_M1_07";
2252 this->VariableNames->value[8058] = "PB_SMM_M1_08";
2253 this->VariableNames->value[8059] = "PB_SMM_M1_09";
2254 this->VariableNames->value[8060] = "PB_SMM_M1_10";
2255 this->VariableNames->value[8061] = "PB_SMM_M1_11";
2256 this->VariableNames->value[8062] = "PB_SMM_M1_12";
2257 this->VariableNames->value[8063] = "PB_SMM_M1_13";
2258 this->VariableNames->value[8064] = "PB_SMM_M1_14";
2259 this->VariableNames->value[8065] = "PB_SMM_M1_15";
2260 this->VariableNames->value[8066] = "PB_SMM_M1_16";
2261 this->VariableNames->value[8067] = "PB_SMM_M1_17";
2262 this->VariableNames->value[8068] = "PB_SMM_M1_18";
2263 this->VariableNames->value[8069] = "PB_SMM_M1_19";
2264 this->VariableNames->value[8070] = "PB_SMM_M1_20";
2265 this->VariableNames->value[8071] = "PB_SMM_M1_21";
2266 this->VariableNames->value[8072] = "PB_SMM_M1_22";
2267 this->VariableNames->value[8073] = "PB_SMM_M1_23";
2268 this->VariableNames->value[8074] = "PB_SMM_M1_24";
2269 this->VariableNames->value[8075] = "PB_SMM_M1_25";
2270 this->VariableNames->value[8076] = "PB_SMM_M1_26";
2271 this->VariableNames->value[8077] = "PB_SMM_M1_27";
2272 this->VariableNames->value[8078] = "PB_SMM_M1_28";
2273 this->VariableNames->value[8079] = "PB_SMM_M1_29";
2274 this->VariableNames->value[8080] = "PB_SMM_M1_30";
2275 this->VariableNames->value[8081] = "PB_SMM_M1_31";
2276 this->VariableNames->value[8082] = "PB_SMM_M1_32";
2277 this->VariableNames->value[8083] = "PB_SMM_M1_33";
2278 this->VariableNames->value[8084] = "PB_SMM_M1_34";
2279 this->VariableNames->value[8085] = "PB_SMM_M1_35";
2280 this->VariableNames->value[8086] = "PB_SMM_M1_36";
2281 this->VariableNames->value[8087] = "PB_SMM_M1_37";
2282 this->VariableNames->value[8088] = "PB_SMM_M1_38";
2283 this->VariableNames->value[8089] = "PB_SMM_M1_39";
2284 this->VariableNames->value[8090] = "PB_SMM_M1_40";
2285 this->VariableNames->value[8091] = "PB_SMM_M1_41";
2286 this->VariableNames->value[8092] = "PB_SMM_M1_42";
2287 this->VariableNames->value[8093] = "PB_SMM_M1_43";
2288 this->VariableNames->value[8094] = "PB_SMM_M1_44";
2289 this->VariableNames->value[8095] = "PB_SMM_M1_45";
2290 this->VariableNames->value[8096] = "PB_SMM_M1_46";
2291 this->VariableNames->value[8097] = "PB_SMM_M1_47";
2292 this->VariableNames->value[8098] = "PB_SMM_M1_48";
2293 this->VariableNames->value[8099] = "PB_SMM_M1_49";
2294
2295 this->VariableNames->value[8100] = "PB_SMM_M2_00";
2296 this->VariableNames->value[8101] = "PB_SMM_M2_01";
2297 this->VariableNames->value[8102] = "PB_SMM_M2_02";
2298 this->VariableNames->value[8103] = "PB_SMM_M2_03";
2299 this->VariableNames->value[8104] = "PB_SMM_M2_04";
2300 this->VariableNames->value[8105] = "PB_SMM_M2_05";
2301 this->VariableNames->value[8106] = "PB_SMM_M2_06";
2302 this->VariableNames->value[8107] = "PB_SMM_M2_07";
2303 this->VariableNames->value[8108] = "PB_SMM_M2_08";
2304 this->VariableNames->value[8109] = "PB_SMM_M2_09";
2305 this->VariableNames->value[8110] = "PB_SMM_M2_10";
2306 this->VariableNames->value[8111] = "PB_SMM_M2_11";
2307 this->VariableNames->value[8112] = "PB_SMM_M2_12";
2308 this->VariableNames->value[8113] = "PB_SMM_M2_13";
2309 this->VariableNames->value[8114] = "PB_SMM_M2_14";
2310 this->VariableNames->value[8115] = "PB_SMM_M2_15";
2311 this->VariableNames->value[8116] = "PB_SMM_M2_16";
2312 this->VariableNames->value[8117] = "PB_SMM_M2_17";
2313 this->VariableNames->value[8118] = "PB_SMM_M2_18";
2314 this->VariableNames->value[8119] = "PB_SMM_M2_19";
2315 this->VariableNames->value[8120] = "PB_SMM_M2_20";
2316 this->VariableNames->value[8121] = "PB_SMM_M2_21";
2317 this->VariableNames->value[8122] = "PB_SMM_M2_22";
2318 this->VariableNames->value[8123] = "PB_SMM_M2_23";
2319 this->VariableNames->value[8124] = "PB_SMM_M2_24";
2320 this->VariableNames->value[8125] = "PB_SMM_M2_25";
2321 this->VariableNames->value[8126] = "PB_SMM_M2_26";
2322 this->VariableNames->value[8127] = "PB_SMM_M2_27";
2323 this->VariableNames->value[8128] = "PB_SMM_M2_28";
2324 this->VariableNames->value[8129] = "PB_SMM_M2_29";
2325 this->VariableNames->value[8130] = "PB_SMM_M2_30";
2326 this->VariableNames->value[8131] = "PB_SMM_M2_31";
2327 this->VariableNames->value[8132] = "PB_SMM_M2_32";
2328 this->VariableNames->value[8133] = "PB_SMM_M2_33";
2329 this->VariableNames->value[8134] = "PB_SMM_M2_34";
2330 this->VariableNames->value[8135] = "PB_SMM_M2_35";
2331 this->VariableNames->value[8136] = "PB_SMM_M2_36";
2332 this->VariableNames->value[8137] = "PB_SMM_M2_37";
2333 this->VariableNames->value[8138] = "PB_SMM_M2_38";
2334 this->VariableNames->value[8139] = "PB_SMM_M2_39";
2335 this->VariableNames->value[8140] = "PB_SMM_M2_40";
2336 this->VariableNames->value[8141] = "PB_SMM_M2_41";
2337 this->VariableNames->value[8142] = "PB_SMM_M2_42";
2338 this->VariableNames->value[8143] = "PB_SMM_M2_43";
2339 this->VariableNames->value[8144] = "PB_SMM_M2_44";
2340 this->VariableNames->value[8145] = "PB_SMM_M2_45";
2341 this->VariableNames->value[8146] = "PB_SMM_M2_46";
2342 this->VariableNames->value[8147] = "PB_SMM_M2_47";
2343 this->VariableNames->value[8148] = "PB_SMM_M2_48";
2344 this->VariableNames->value[8149] = "PB_SMM_M2_49";
2345
2346 }
2347
2348 //----------------------------------------------------------------------------
ParseCaseFile()2349 void vtkFLUENTReader::ParseCaseFile()
2350 {
2351 this->FluentCaseFile->clear();
2352 this->FluentCaseFile->seekg (0, ios::beg);
2353
2354 while (this->GetCaseChunk())
2355 {
2356
2357 int index = this->GetCaseIndex();
2358 switch (index)
2359 {
2360 case 0:
2361 break;
2362 case 1:
2363 break;
2364 case 2:
2365 this->GridDimension = this->GetDimension();
2366 break;
2367 case 4:
2368 this->GetLittleEndianFlag();
2369 break;
2370 case 10:
2371 this->GetNodesAscii();
2372 break;
2373 case 12:
2374 this->GetCellsAscii();
2375 break;
2376 case 13:
2377 this->GetFacesAscii();
2378 break;
2379 case 18:
2380 this->GetPeriodicShadowFacesAscii();
2381 break;
2382 case 37:
2383 this->GetSpeciesVariableNames();
2384 break;
2385 case 38:
2386 break;
2387 case 39:
2388 break;
2389 case 40:
2390 break;
2391 case 41:
2392 break;
2393 case 45:
2394 break;
2395 case 58:
2396 this->GetCellTreeAscii();
2397 break;
2398 case 59:
2399 this->GetFaceTreeAscii();
2400 break;
2401 case 61:
2402 this->GetInterfaceFaceParentsAscii();
2403 break;
2404 case 62:
2405 this->GetNonconformalGridInterfaceFaceInformationAscii();
2406 break;
2407 case 63:
2408 break;
2409 case 64:
2410 break;
2411 case 2010:
2412 this->GetNodesSinglePrecision();
2413 break;
2414 case 3010:
2415 this->GetNodesDoublePrecision();
2416 break;
2417 case 2012:
2418 this->GetCellsBinary();
2419 break;
2420 case 3012:
2421 this->GetCellsBinary(); // Should be the same as single precision..
2422 //only grabbing ints.
2423 break;
2424 case 2013:
2425 this->GetFacesBinary();
2426 break;
2427 case 3013:
2428 this->GetFacesBinary();
2429 break;
2430 case 2018:
2431 this->GetPeriodicShadowFacesBinary();
2432 break;
2433 case 3018:
2434 this->GetPeriodicShadowFacesBinary();
2435 break;
2436 case 2040:
2437 break;
2438 case 3040:
2439 break;
2440 case 2041:
2441 break;
2442 case 3041:
2443 break;
2444 case 2058:
2445 this->GetCellTreeBinary();
2446 break;
2447 case 3058:
2448 this->GetCellTreeBinary();
2449 break;
2450 case 2059:
2451 this->GetFaceTreeBinary();
2452 break;
2453 case 3059:
2454 this->GetFaceTreeBinary();
2455 break;
2456 case 2061:
2457 this->GetInterfaceFaceParentsBinary();
2458 break;
2459 case 3061:
2460 this->GetInterfaceFaceParentsBinary();
2461 break;
2462 case 2062:
2463 this->GetNonconformalGridInterfaceFaceInformationBinary();
2464 break;
2465 case 3062:
2466 this->GetNonconformalGridInterfaceFaceInformationBinary();
2467 break;
2468 case 2063:
2469 break;
2470 case 3063:
2471 break;
2472 default:
2473 //cout << "Undefined Section = " << index << endl;
2474 break;
2475 }
2476 }
2477 }
2478
2479 //----------------------------------------------------------------------------
GetDimension()2480 int vtkFLUENTReader::GetDimension()
2481 {
2482 size_t start = this->CaseBuffer->value.find('(', 1);
2483 std::string info = this->CaseBuffer->value.substr(start+4, 1 );
2484 return atoi(info.c_str());
2485 }
2486
2487 //----------------------------------------------------------------------------
GetLittleEndianFlag()2488 void vtkFLUENTReader::GetLittleEndianFlag()
2489 {
2490 size_t start = this->CaseBuffer->value.find('(', 1);
2491 size_t end = this->CaseBuffer->value.find(')',1);
2492 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2493 int flag;
2494 sscanf(info.c_str(), "%d", &flag);
2495
2496 if (flag == 60)
2497 {
2498 this->SetDataByteOrderToLittleEndian();
2499 }
2500 else
2501 {
2502 this->SetDataByteOrderToBigEndian();
2503 }
2504 }
2505
2506 //----------------------------------------------------------------------------
GetNodesAscii()2507 void vtkFLUENTReader::GetNodesAscii()
2508 {
2509 size_t start = this->CaseBuffer->value.find('(', 1);
2510 size_t end = this->CaseBuffer->value.find(')',1);
2511 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2512 unsigned int zoneId, firstIndex, lastIndex;
2513 int type, nd;
2514 sscanf(info.c_str(), "%x %x %x %d %d", &zoneId, &firstIndex, &lastIndex,
2515 &type, &nd);
2516
2517 if (this->CaseBuffer->value.at(5) == '0')
2518 {
2519 this->Points->Allocate(lastIndex);
2520 }
2521 else
2522 {
2523 size_t dstart = this->CaseBuffer->value.find('(', 5);
2524 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
2525 std::string pdata = this->CaseBuffer->
2526 value.substr(dstart+1, dend-start-1);
2527 std::stringstream pdatastream(pdata);
2528
2529 double x, y, z;
2530 if (this->GridDimension == 3)
2531 {
2532 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2533 {
2534 pdatastream >> x;
2535 pdatastream >> y;
2536 pdatastream >> z;
2537 this->Points->InsertPoint(i-1, x, y, z);
2538 }
2539 }
2540 else
2541 {
2542 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2543 {
2544 pdatastream >> x;
2545 pdatastream >> y;
2546 this->Points->InsertPoint(i-1, x, y, 0.0);
2547 }
2548 }
2549 }
2550 }
2551
2552 //----------------------------------------------------------------------------
GetNodesSinglePrecision()2553 void vtkFLUENTReader::GetNodesSinglePrecision()
2554 {
2555 size_t start = this->CaseBuffer->value.find('(', 1);
2556 size_t end = this->CaseBuffer->value.find(')',1);
2557 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2558 unsigned int zoneId, firstIndex, lastIndex;
2559 int type;
2560 sscanf(info.c_str(), "%x %x %x %d", &zoneId, &firstIndex, &lastIndex, &type);
2561
2562 size_t dstart = this->CaseBuffer->value.find('(', 7);
2563 size_t ptr = dstart + 1;
2564
2565 double x, y, z;
2566 if (this->GridDimension == 3)
2567 {
2568 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2569 {
2570 x = this->GetCaseBufferFloat( static_cast< int >(ptr) );
2571 ptr = ptr + 4;
2572
2573 y = this->GetCaseBufferFloat( static_cast< int >(ptr) );
2574 ptr = ptr + 4;
2575
2576 z = this->GetCaseBufferFloat( static_cast< int >(ptr) );
2577 ptr = ptr + 4;
2578 this->Points->InsertPoint(i-1, x, y, z);
2579 }
2580 }
2581 else
2582 {
2583 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2584 {
2585 x = this->GetCaseBufferFloat( static_cast< int >(ptr) );
2586 ptr = ptr + 4;
2587
2588 y = this->GetCaseBufferFloat( static_cast< int >(ptr) );
2589 ptr = ptr + 4;
2590
2591 z = 0.0;
2592
2593 this->Points->InsertPoint(i-1, x, y, z);
2594 }
2595 }
2596 }
2597
2598 //----------------------------------------------------------------------------
GetNodesDoublePrecision()2599 void vtkFLUENTReader::GetNodesDoublePrecision()
2600 {
2601 size_t start = this->CaseBuffer->value.find('(', 1);
2602 size_t end = this->CaseBuffer->value.find(')',1);
2603 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2604 unsigned int zoneId, firstIndex, lastIndex;
2605 int type;
2606 sscanf(info.c_str(), "%x %x %x %d", &zoneId, &firstIndex, &lastIndex, &type);
2607
2608 size_t dstart = this->CaseBuffer->value.find('(', 7);
2609 size_t ptr = dstart+1;
2610
2611 if (this->GridDimension == 3)
2612 {
2613 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2614 {
2615 double x = this->GetCaseBufferDouble( static_cast< int >(ptr) );
2616 ptr = ptr + 8;
2617
2618 double y = this->GetCaseBufferDouble( static_cast< int >(ptr) );
2619 ptr = ptr + 8;
2620
2621 double z = this->GetCaseBufferDouble( static_cast< int >(ptr) );
2622 ptr = ptr + 8;
2623 this->Points->InsertPoint(i-1, x, y, z);
2624 }
2625 }
2626 else
2627 {
2628 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2629 {
2630 double x = this->GetCaseBufferDouble( static_cast< int >(ptr) );
2631 ptr = ptr + 8;
2632
2633 double y = this->GetCaseBufferDouble( static_cast< int >(ptr) );
2634 ptr = ptr + 8;
2635
2636 this->Points->InsertPoint(i-1, x, y, 0.0);
2637 }
2638 }
2639 }
2640
2641 //----------------------------------------------------------------------------
GetCellsAscii()2642 void vtkFLUENTReader::GetCellsAscii()
2643 {
2644 if (this->CaseBuffer->value.at(5) == '0')
2645 { // Cell Info
2646 size_t start = this->CaseBuffer->value.find('(', 1);
2647 size_t end = this->CaseBuffer->value.find(')',1);
2648 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2649 unsigned int zoneId, firstIndex, lastIndex;
2650 int type;
2651 sscanf(info.c_str(), "%x %x %x %d", &zoneId, &firstIndex, &lastIndex,
2652 &type);
2653 this->Cells->value.resize(lastIndex);
2654 }
2655 else
2656 { // Cell Definitions
2657 size_t start = this->CaseBuffer->value.find('(', 1);
2658 size_t end = this->CaseBuffer->value.find(')',1);
2659 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2660 unsigned int zoneId, firstIndex, lastIndex;
2661 int type, elementType;
2662 sscanf(info.c_str(), "%x %x %x %d %d", &zoneId, &firstIndex, &lastIndex,
2663 &type, &elementType);
2664
2665 if (elementType == 0)
2666 {
2667 size_t dstart = this->CaseBuffer->value.find('(', 5);
2668 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
2669 std::string pdata = this->CaseBuffer->
2670 value.substr(dstart+1, dend-start-1);
2671 std::stringstream pdatastream(pdata);
2672 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2673 {
2674 pdatastream >> this->Cells->value[i-1].type;
2675 this->Cells->value[i-1].zone = zoneId;
2676 this->Cells->value[i-1].parent = 0;
2677 this->Cells->value[i-1].child = 0;
2678 }
2679 }
2680 else
2681 {
2682 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2683 {
2684 this->Cells->value[i-1].type = elementType;
2685 this->Cells->value[i-1].zone = zoneId;
2686 this->Cells->value[i-1].parent = 0;
2687 this->Cells->value[i-1].child = 0;
2688 }
2689 }
2690 }
2691 }
2692
2693 //----------------------------------------------------------------------------
GetCellsBinary()2694 void vtkFLUENTReader::GetCellsBinary()
2695 {
2696 size_t start = this->CaseBuffer->value.find('(', 1);
2697 size_t end = this->CaseBuffer->value.find(')',1);
2698 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2699 unsigned int zoneId, firstIndex, lastIndex, type, elementType;
2700 sscanf(info.c_str(), "%x %x %x %x %x", &zoneId, &firstIndex, &lastIndex,
2701 &type, &elementType);
2702
2703 if (elementType == 0)
2704 {
2705 size_t dstart = this->CaseBuffer->value.find('(', 7);
2706 size_t ptr = dstart + 1;
2707 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2708 {
2709 this->Cells->value[i-1].type =
2710 this->GetCaseBufferInt( static_cast< int >(ptr) );
2711 ptr = ptr +4;
2712 this->Cells->value[i-1].zone = zoneId;
2713 this->Cells->value[i-1].parent = 0;
2714 this->Cells->value[i-1].child = 0;
2715 }
2716 }
2717 else
2718 {
2719 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2720 {
2721 this->Cells->value[i-1].type = elementType;
2722 this->Cells->value[i-1].zone = zoneId;
2723 this->Cells->value[i-1].parent = 0;
2724 this->Cells->value[i-1].child = 0;
2725 }
2726 }
2727 }
2728
2729 //----------------------------------------------------------------------------
GetFacesAscii()2730 void vtkFLUENTReader::GetFacesAscii()
2731 {
2732
2733 if (this->CaseBuffer->value.at(5) == '0')
2734 { // Face Info
2735 size_t start = this->CaseBuffer->value.find('(', 1);
2736 size_t end = this->CaseBuffer->value.find(')',1);
2737 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2738 unsigned int zoneId, firstIndex, lastIndex, bcType;
2739 sscanf(info.c_str(), "%x %x %x %x", &zoneId, &firstIndex, &lastIndex,
2740 &bcType);
2741
2742 this->Faces->value.resize(lastIndex);
2743 }
2744 else
2745 { // Face Definitions
2746 size_t start = this->CaseBuffer->value.find('(', 1);
2747 size_t end = this->CaseBuffer->value.find(')',1);
2748 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2749 unsigned int zoneId, firstIndex, lastIndex, bcType, faceType;
2750 sscanf(info.c_str(), "%x %x %x %x %x", &zoneId, &firstIndex, &lastIndex,
2751 &bcType, &faceType);
2752
2753 size_t dstart = this->CaseBuffer->value.find('(', 7);
2754 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
2755 std::string pdata = this->CaseBuffer->
2756 value.substr(dstart+1, dend-start-1);
2757 std::stringstream pdatastream(pdata);
2758
2759 int numberOfNodesInFace = 0;
2760 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2761 {
2762 if (faceType == 0 || faceType == 5)
2763 {
2764 pdatastream >> numberOfNodesInFace;
2765 }
2766 else
2767 {
2768 numberOfNodesInFace = faceType;
2769 }
2770 this->Faces->value[i-1].nodes.resize(numberOfNodesInFace);
2771 for (int j = 0; j<numberOfNodesInFace; j++)
2772 {
2773 pdatastream >> hex >> this->Faces->value[i-1].nodes[j];
2774 this->Faces->value[i-1].nodes[j]--;
2775 }
2776 pdatastream >> hex >> this->Faces->value[i-1].c0;
2777 pdatastream >> hex >> this->Faces->value[i-1].c1;
2778 this->Faces->value[i-1].c0--;
2779 this->Faces->value[i-1].c1--;
2780 this->Faces->value[i-1].type = numberOfNodesInFace;
2781 this->Faces->value[i-1].zone = zoneId;
2782 this->Faces->value[i-1].periodicShadow = 0;
2783 this->Faces->value[i-1].parent = 0;
2784 this->Faces->value[i-1].child = 0;
2785 this->Faces->value[i-1].interfaceFaceParent = 0;
2786 this->Faces->value[i-1].ncgParent = 0;
2787 this->Faces->value[i-1].ncgChild = 0;
2788 this->Faces->value[i-1].interfaceFaceChild = 0;
2789 if (this->Faces->value[i-1].c0 >= 0)
2790 {
2791 this->Cells->value[this->Faces->value[i-1].c0].faces.push_back(i-1);
2792 }
2793 if (this->Faces->value[i-1].c1 >= 0)
2794 {
2795 this->Cells->value[this->Faces->value[i-1].c1].faces.push_back(i-1);
2796 }
2797 }
2798 }
2799 }
2800
2801 //----------------------------------------------------------------------------
GetFacesBinary()2802 void vtkFLUENTReader::GetFacesBinary()
2803 {
2804 size_t start = this->CaseBuffer->value.find('(', 1);
2805 size_t end = this->CaseBuffer->value.find(')',1);
2806 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2807 unsigned int zoneId, firstIndex, lastIndex, bcType, faceType;
2808 sscanf(info.c_str(), "%x %x %x %x %x", &zoneId, &firstIndex, &lastIndex,
2809 &bcType, &faceType);
2810 size_t dstart = this->CaseBuffer->value.find('(', 7);
2811 int numberOfNodesInFace = 0;
2812 size_t ptr = dstart + 1;
2813 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2814 {
2815 if ((faceType == 0) || (faceType == 5))
2816 {
2817 numberOfNodesInFace = this->GetCaseBufferInt( static_cast< int >(ptr) );
2818 ptr = ptr + 4;
2819 }
2820 else
2821 {
2822 numberOfNodesInFace = faceType;
2823 }
2824
2825 this->Faces->value[i-1].nodes.resize(numberOfNodesInFace);
2826
2827 for (int k = 0; k<numberOfNodesInFace; k++)
2828 {
2829 this->Faces->value[i-1].nodes[k] =
2830 this->GetCaseBufferInt(static_cast< int >(ptr));
2831 this->Faces->value[i-1].nodes[k]--;
2832 ptr = ptr + 4;
2833 }
2834
2835 this->Faces->value[i-1].c0 =
2836 this->GetCaseBufferInt( static_cast< int >(ptr) );
2837 ptr = ptr + 4;
2838 this->Faces->value[i-1].c1 =
2839 this->GetCaseBufferInt( static_cast< int >(ptr) );
2840 ptr = ptr + 4;
2841 this->Faces->value[i-1].c0--;
2842 this->Faces->value[i-1].c1--;
2843 this->Faces->value[i-1].type = numberOfNodesInFace;
2844 this->Faces->value[i-1].zone = zoneId;
2845 this->Faces->value[i-1].periodicShadow = 0;
2846 this->Faces->value[i-1].parent = 0;
2847 this->Faces->value[i-1].child = 0;
2848 this->Faces->value[i-1].interfaceFaceParent = 0;
2849 this->Faces->value[i-1].ncgParent = 0;
2850 this->Faces->value[i-1].ncgChild = 0;
2851 this->Faces->value[i-1].interfaceFaceChild = 0;
2852 if (this->Faces->value[i-1].c0 >= 0)
2853 {
2854 this->Cells->value[this->Faces->value[i-1].c0].faces.push_back(i-1);
2855 }
2856 if (this->Faces->value[i-1].c1 >= 0)
2857 {
2858 this->Cells->value[this->Faces->value[i-1].c1].faces.push_back(i-1);
2859 }
2860 }
2861 }
2862
2863 //----------------------------------------------------------------------------
GetPeriodicShadowFacesAscii()2864 void vtkFLUENTReader::GetPeriodicShadowFacesAscii()
2865 {
2866 size_t start = this->CaseBuffer->value.find('(', 1);
2867 size_t end = this->CaseBuffer->value.find(')',1);
2868 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2869 unsigned int firstIndex, lastIndex, periodicZone, shadowZone;
2870 sscanf(info.c_str(), "%x %x %x %x", &firstIndex, &lastIndex, &periodicZone,
2871 &shadowZone);
2872
2873 size_t dstart = this->CaseBuffer->value.find('(', 7);
2874 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
2875 std::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
2876 std::stringstream pdatastream(pdata);
2877
2878 int faceIndex1, faceIndex2;
2879 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2880 {
2881 pdatastream >> hex >> faceIndex1;
2882 pdatastream >> hex >> faceIndex2;
2883 this->Faces->value[faceIndex1].periodicShadow = 1;
2884 }
2885 }
2886
2887 //----------------------------------------------------------------------------
GetPeriodicShadowFacesBinary()2888 void vtkFLUENTReader::GetPeriodicShadowFacesBinary()
2889 {
2890 size_t start = this->CaseBuffer->value.find('(', 1);
2891 size_t end = this->CaseBuffer->value.find(')',1);
2892 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2893 unsigned int firstIndex, lastIndex, periodicZone, shadowZone;
2894 sscanf(info.c_str(), "%x %x %x %x", &firstIndex, &lastIndex, &periodicZone,
2895 &shadowZone);
2896
2897 size_t dstart = this->CaseBuffer->value.find('(', 7);
2898 size_t ptr = dstart + 1;
2899
2900 //int faceIndex1, faceIndex2;
2901 for (unsigned int i = firstIndex; i <= lastIndex; i++)
2902 {
2903 //faceIndex1 = this->GetCaseBufferInt(ptr);
2904 this->GetCaseBufferInt( static_cast< int >(ptr) );
2905 ptr = ptr + 4;
2906 //faceIndex2 = this->GetCaseBufferInt(ptr);
2907 this->GetCaseBufferInt( static_cast< int >(ptr) );
2908 ptr = ptr + 4;
2909 }
2910 }
2911
2912 //----------------------------------------------------------------------------
GetCellTreeAscii()2913 void vtkFLUENTReader::GetCellTreeAscii()
2914 {
2915 size_t start = this->CaseBuffer->value.find('(', 1);
2916 size_t end = this->CaseBuffer->value.find(')',1);
2917 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2918 unsigned int cellId0, cellId1, parentZoneId, childZoneId;
2919 sscanf(info.c_str(), "%x %x %x %x", &cellId0, &cellId1, &parentZoneId,
2920 &childZoneId);
2921
2922 size_t dstart = this->CaseBuffer->value.find('(', 7);
2923 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
2924 std::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
2925 std::stringstream pdatastream(pdata);
2926
2927 int numberOfKids, kid;
2928 for (unsigned int i = cellId0; i <= cellId1; i++)
2929 {
2930 this->Cells->value[i-1].parent = 1;
2931 pdatastream >> hex >> numberOfKids;
2932 for (int j = 0; j < numberOfKids; j++)
2933 {
2934 pdatastream >> hex >> kid;
2935 this->Cells->value[kid-1].child = 1;
2936 }
2937 }
2938 }
2939
2940 //----------------------------------------------------------------------------
GetCellTreeBinary()2941 void vtkFLUENTReader::GetCellTreeBinary()
2942 {
2943
2944 size_t start = this->CaseBuffer->value.find('(', 1);
2945 size_t end = this->CaseBuffer->value.find(')',1);
2946 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2947 unsigned int cellId0, cellId1, parentZoneId, childZoneId;
2948 sscanf(info.c_str(), "%x %x %x %x", &cellId0, &cellId1, &parentZoneId,
2949 &childZoneId);
2950
2951 size_t dstart = this->CaseBuffer->value.find('(', 7);
2952 size_t ptr = dstart + 1;
2953
2954 int numberOfKids, kid;
2955 for (unsigned int i = cellId0; i <= cellId1; i++)
2956 {
2957 this->Cells->value[i-1].parent = 1;
2958 numberOfKids = this->GetCaseBufferInt( static_cast< int >(ptr) );
2959 ptr = ptr + 4;
2960 for (int j = 0; j < numberOfKids; j++)
2961 {
2962 kid = this->GetCaseBufferInt( static_cast< int >(ptr) );
2963 ptr = ptr + 4;
2964 this->Cells->value[kid-1].child = 1;
2965 }
2966 }
2967 }
2968
2969 //----------------------------------------------------------------------------
GetFaceTreeAscii()2970 void vtkFLUENTReader::GetFaceTreeAscii()
2971 {
2972 size_t start = this->CaseBuffer->value.find('(', 1);
2973 size_t end = this->CaseBuffer->value.find(')',1);
2974 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
2975 unsigned int faceId0, faceId1, parentZoneId, childZoneId;
2976 sscanf(info.c_str(), "%x %x %x %x", &faceId0, &faceId1, &parentZoneId,
2977 &childZoneId);
2978
2979 size_t dstart = this->CaseBuffer->value.find('(', 7);
2980 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
2981 std::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
2982 std::stringstream pdatastream(pdata);
2983
2984 int numberOfKids, kid;
2985 for (unsigned int i = faceId0; i <= faceId1; i++)
2986 {
2987 this->Faces->value[i-1].parent = 1;
2988 pdatastream >> hex >> numberOfKids;
2989 for (int j = 0; j < numberOfKids; j++)
2990 {
2991 pdatastream >> hex >> kid;
2992 this->Faces->value[kid-1].child = 1;
2993 }
2994 }
2995 }
2996
2997 //----------------------------------------------------------------------------
GetFaceTreeBinary()2998 void vtkFLUENTReader::GetFaceTreeBinary()
2999 {
3000 size_t start = this->CaseBuffer->value.find('(', 1);
3001 size_t end = this->CaseBuffer->value.find(')',1);
3002 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
3003 unsigned int faceId0, faceId1, parentZoneId, childZoneId;
3004 sscanf(info.c_str(), "%x %x %x %x", &faceId0, &faceId1, &parentZoneId,
3005 &childZoneId);
3006
3007 size_t dstart = this->CaseBuffer->value.find('(', 7);
3008 size_t ptr = dstart + 1;
3009
3010 int numberOfKids, kid;
3011 for (unsigned int i = faceId0; i <= faceId1; i++)
3012 {
3013 this->Faces->value[i-1].parent = 1;
3014 numberOfKids = this->GetCaseBufferInt( static_cast< int >(ptr) );
3015 ptr = ptr + 4;
3016 for (int j = 0; j < numberOfKids; j++)
3017 {
3018 kid = this->GetCaseBufferInt( static_cast< int >(ptr) );
3019 ptr = ptr + 4;
3020 this->Faces->value[kid-1].child = 1;
3021 }
3022 }
3023 }
3024
3025 //----------------------------------------------------------------------------
GetInterfaceFaceParentsAscii()3026 void vtkFLUENTReader::GetInterfaceFaceParentsAscii()
3027 {
3028 size_t start = this->CaseBuffer->value.find('(', 1);
3029 size_t end = this->CaseBuffer->value.find(')',1);
3030 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
3031 unsigned int faceId0, faceId1;
3032 sscanf(info.c_str(), "%x %x", &faceId0, &faceId1);
3033
3034 size_t dstart = this->CaseBuffer->value.find('(', 7);
3035 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
3036 std::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
3037 std::stringstream pdatastream(pdata);
3038
3039 int parentId0, parentId1;
3040 for (unsigned int i = faceId0; i <= faceId1; i++)
3041 {
3042 pdatastream >> hex >> parentId0;
3043 pdatastream >> hex >> parentId1;
3044 this->Faces->value[parentId0-1].interfaceFaceParent = 1;
3045 this->Faces->value[parentId1-1].interfaceFaceParent = 1;
3046 this->Faces->value[i-1].interfaceFaceChild = 1;
3047 }
3048
3049 }
3050
3051 //----------------------------------------------------------------------------
GetInterfaceFaceParentsBinary()3052 void vtkFLUENTReader::GetInterfaceFaceParentsBinary()
3053 {
3054 size_t start = this->CaseBuffer->value.find('(', 1);
3055 size_t end = this->CaseBuffer->value.find(')',1);
3056 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
3057 unsigned int faceId0, faceId1;
3058 sscanf(info.c_str(), "%x %x", &faceId0, &faceId1);
3059
3060 size_t dstart = this->CaseBuffer->value.find('(', 7);
3061 size_t ptr = dstart + 1;
3062
3063 int parentId0, parentId1;
3064 for (unsigned int i = faceId0; i <= faceId1; i++)
3065 {
3066 parentId0 = this->GetCaseBufferInt( static_cast< int >(ptr) );
3067 ptr = ptr + 4;
3068 parentId1 = this->GetCaseBufferInt( static_cast< int >(ptr) );
3069 ptr = ptr + 4;
3070 this->Faces->value[parentId0-1].interfaceFaceParent = 1;
3071 this->Faces->value[parentId1-1].interfaceFaceParent = 1;
3072 this->Faces->value[i-1].interfaceFaceChild = 1;
3073 }
3074
3075 }
3076
3077 //----------------------------------------------------------------------------
GetNonconformalGridInterfaceFaceInformationAscii()3078 void vtkFLUENTReader::GetNonconformalGridInterfaceFaceInformationAscii()
3079 {
3080 size_t start = this->CaseBuffer->value.find('(', 1);
3081 size_t end = this->CaseBuffer->value.find(')',1);
3082 std::string info = this->CaseBuffer->value.substr(start+1,end-start-1 );
3083 int kidId, parentId, numberOfFaces;
3084 sscanf(info.c_str(), "%d %d %d", &kidId, &parentId, &numberOfFaces);
3085
3086 size_t dstart = this->CaseBuffer->value.find('(', 7);
3087 size_t dend = this->CaseBuffer->value.find(')', dstart+1);
3088 std::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
3089 std::stringstream pdatastream(pdata);
3090
3091 int child, parent;
3092 for (int i = 0; i < numberOfFaces; i++)
3093 {
3094 pdatastream >> hex >> child;
3095 pdatastream >> hex >> parent;
3096 this->Faces->value[child-1].ncgChild = 1;
3097 this->Faces->value[parent-1].ncgParent = 1;
3098 }
3099
3100 }
3101
3102 //----------------------------------------------------------------------------
GetNonconformalGridInterfaceFaceInformationBinary()3103 void vtkFLUENTReader::GetNonconformalGridInterfaceFaceInformationBinary()
3104 {
3105 size_t start = this->CaseBuffer->value.find('(', 1);
3106 size_t end = this->CaseBuffer->value.find(')',1);
3107 std::string info = CaseBuffer->value.substr(start+1,end-start-1 );
3108 int kidId, parentId, numberOfFaces;
3109 sscanf(info.c_str(), "%d %d %d", &kidId, &parentId, &numberOfFaces);
3110
3111 size_t dstart = this->CaseBuffer->value.find('(', 7);
3112 size_t ptr = dstart + 1;
3113
3114 int child, parent;
3115 for (int i = 0; i < numberOfFaces; i++)
3116 {
3117 child = this->GetCaseBufferInt( static_cast< int >(ptr) );
3118 ptr = ptr + 4;
3119 parent = this->GetCaseBufferInt( static_cast< int >(ptr) );
3120 ptr = ptr + 4;
3121 this->Faces->value[child-1].ncgChild = 1;
3122 this->Faces->value[parent-1].ncgParent = 1;
3123 }
3124
3125 }
3126
3127 //----------------------------------------------------------------------------
CleanCells()3128 void vtkFLUENTReader::CleanCells()
3129 {
3130
3131 std::vector<int> t;
3132 for (int i = 0; i < (int)Cells->value.size(); i++)
3133 {
3134
3135 if ( ((this->Cells->value[i].type == 1)&&
3136 (this->Cells->value[i].faces.size() != 3))||
3137 ((this->Cells->value[i].type == 2)&&
3138 (this->Cells->value[i].faces.size() != 4))||
3139 ((this->Cells->value[i].type == 3)&&
3140 (this->Cells->value[i].faces.size() != 4))||
3141 ((this->Cells->value[i].type == 4)&&
3142 (this->Cells->value[i].faces.size() != 6))||
3143 ((this->Cells->value[i].type == 5)&&
3144 (this->Cells->value[i].faces.size() != 5))||
3145 ((this->Cells->value[i].type == 6)&&
3146 (this->Cells->value[i].faces.size() != 5)) )
3147 {
3148
3149 // Copy faces
3150 t.clear();
3151 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3152 {
3153 t.push_back(this->Cells->value[i].faces[j]);
3154 }
3155
3156 // Clear Faces
3157 this->Cells->value[i].faces.clear();
3158
3159 // Copy the faces that are not flagged back into the cell
3160 for (int j = 0; j < (int)t.size(); j++)
3161 {
3162 if ( (this->Faces->value[t[j]].child == 0 ) &&
3163 (this->Faces->value[t[j]].ncgChild == 0 ) &&
3164 (this->Faces->value[t[j]].interfaceFaceChild == 0 ))
3165 {
3166 this->Cells->value[i].faces.push_back(t[j]);
3167 }
3168 }
3169 }
3170 }
3171 }
3172
3173 //----------------------------------------------------------------------------
PopulateCellNodes()3174 void vtkFLUENTReader::PopulateCellNodes()
3175 {
3176 for (int i = 0; i < (int)this->Cells->value.size(); i++)
3177 {
3178 switch (this->Cells->value[i].type)
3179 {
3180 case 1: // Triangle
3181 this->PopulateTriangleCell(i);
3182 break;
3183
3184 case 2: // Tetrahedron
3185 this->PopulateTetraCell(i);
3186 break;
3187
3188 case 3: // Quadrilateral
3189 this->PopulateQuadCell(i);
3190 break;
3191
3192 case 4: // Hexahedral
3193 this->PopulateHexahedronCell(i);
3194 break;
3195
3196 case 5: // Pyramid
3197 this->PopulatePyramidCell(i);
3198 break;
3199
3200 case 6: // Wedge
3201 this->PopulateWedgeCell(i);
3202 break;
3203
3204 case 7: // Polyhedron
3205 this->PopulatePolyhedronCell(i);
3206 break;
3207 }
3208 }
3209 }
3210
3211 //----------------------------------------------------------------------------
GetCaseBufferInt(int ptr)3212 int vtkFLUENTReader::GetCaseBufferInt(int ptr)
3213 {
3214 union mix_i
3215 {
3216 int i;
3217 char c[4];
3218 } mi = {1};
3219
3220 for (int j = 0; j < 4; j++)
3221 {
3222 if (this->GetSwapBytes())
3223 {
3224 mi.c[3 - j] = this->CaseBuffer->value.at(ptr+j);
3225 }
3226 else
3227 {
3228 mi.c[j] = this->CaseBuffer->value.at(ptr+j);
3229 }
3230 }
3231 return mi.i;
3232 }
3233
3234 //----------------------------------------------------------------------------
GetCaseBufferFloat(int ptr)3235 float vtkFLUENTReader::GetCaseBufferFloat(int ptr)
3236 {
3237 union mix_f
3238 {
3239 float f;
3240 char c[4];
3241 } mf = {1.0};
3242
3243 for (int j = 0; j < 4; j++)
3244 {
3245 if (this->GetSwapBytes())
3246 {
3247 mf.c[3 - j] = this->CaseBuffer->value.at(ptr+j);
3248 }
3249 else
3250 {
3251 mf.c[j] = this->CaseBuffer->value.at(ptr+j);
3252 }
3253 }
3254 return mf.f;
3255 }
3256
3257 //----------------------------------------------------------------------------
GetCaseBufferDouble(int ptr)3258 double vtkFLUENTReader::GetCaseBufferDouble(int ptr)
3259 {
3260 union mix_i
3261 {
3262 double d;
3263 char c[8];
3264 } md = {1.0};
3265
3266 for (int j = 0; j < 8; j++)
3267 {
3268 if (this->GetSwapBytes())
3269 {
3270 md.c[7 - j] = this->CaseBuffer->value.at(ptr+j);
3271 }
3272 else
3273 {
3274 md.c[j] = this->CaseBuffer->value.at(ptr+j);
3275 }
3276 }
3277 return md.d;
3278 }
3279
3280 //----------------------------------------------------------------------------
PopulateTriangleCell(int i)3281 void vtkFLUENTReader::PopulateTriangleCell(int i)
3282 {
3283 this->Cells->value[i].nodes.resize(3);
3284 if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
3285 {
3286 this->Cells->value[i].nodes[0] =
3287 this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
3288 this->Cells->value[i].nodes[1] =
3289 this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
3290 }
3291 else
3292 {
3293 this->Cells->value[i].nodes[1] =
3294 this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
3295 this->Cells->value[i].nodes[0] =
3296 this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
3297 }
3298
3299 if (this->Faces->value[this->Cells->value[i].faces[1]].nodes[0]!=
3300 this->Cells->value[i].nodes[0]
3301 && this->Faces->value[this->Cells->value[i].faces[1]].nodes[0]!=
3302 this->Cells->value[i].nodes[1])
3303 {
3304 this->Cells->value[i].nodes[2] =
3305 this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
3306 }
3307 else
3308 {
3309 this->Cells->value[i].nodes[2] =
3310 this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
3311 }
3312 }
3313
3314 //----------------------------------------------------------------------------
PopulateTetraCell(int i)3315 void vtkFLUENTReader::PopulateTetraCell(int i)
3316 {
3317 this->Cells->value[i].nodes.resize(4);
3318
3319 if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
3320 {
3321 this->Cells->value[i].nodes[0] =
3322 this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
3323 this->Cells->value[i].nodes[1] =
3324 this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
3325 this->Cells->value[i].nodes[2] =
3326 this->Faces->value[this->Cells->value[i].faces[0]].nodes[2];
3327 }
3328 else
3329 {
3330 this->Cells->value[i].nodes[2] =
3331 this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
3332 this->Cells->value[i].nodes[1] =
3333 this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
3334 this->Cells->value[i].nodes[0] =
3335 this->Faces->value[this->Cells->value[i].faces[0]].nodes[2];
3336 }
3337
3338 if (this->Faces->value[this->Cells->value[i].faces[1]].nodes[0]!=
3339 this->Cells->value[i].nodes[0]
3340 && this->Faces->value[this->Cells->value[i].faces[1]].nodes[0]!=
3341 this->Cells->value[i].nodes[1]
3342 && this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] !=
3343 this->Cells->value[i].nodes[2] )
3344 {
3345 this->Cells->value[i].nodes[3] =
3346 this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
3347 }
3348 else if (this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
3349 this->Cells->value[i].nodes[0] &&
3350 this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
3351 this->Cells->value[i].nodes[1] &&
3352 this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
3353 this->Cells->value[i].nodes[2])
3354 {
3355 this->Cells->value[i].nodes[3] =
3356 this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
3357 }
3358 else
3359 {
3360 this->Cells->value[i].nodes[3] =
3361 this->Faces->value[this->Cells->value[i].faces[1]].nodes[2];
3362 }
3363 }
3364
3365 //----------------------------------------------------------------------------
PopulateQuadCell(int i)3366 void vtkFLUENTReader::PopulateQuadCell(int i)
3367 {
3368 this->Cells->value[i].nodes.resize(4);
3369
3370 if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
3371 {
3372 this->Cells->value[i].nodes[0] =
3373 this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
3374 this->Cells->value[i].nodes[1] =
3375 this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
3376 }
3377 else
3378 {
3379 this->Cells->value[i].nodes[1] =
3380 this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
3381 this->Cells->value[i].nodes[0] =
3382 this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
3383 }
3384
3385 if ((this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] !=
3386 this->Cells->value[i].nodes[0] &&
3387 this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] !=
3388 this->Cells->value[i].nodes[1]) &&
3389 (this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
3390 this->Cells->value[i].nodes[0] &&
3391 this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
3392 this->Cells->value[i].nodes[1]))
3393 {
3394 if (this->Faces->value[this->Cells->value[i].faces[1]].c0 == i)
3395 {
3396 this->Cells->value[i].nodes[2] =
3397 this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
3398 this->Cells->value[i].nodes[3] =
3399 this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
3400 }
3401 else
3402 {
3403 this->Cells->value[i].nodes[3] =
3404 this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
3405 this->Cells->value[i].nodes[2] =
3406 this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
3407 }
3408 }
3409 else if ((this->Faces->value[this->Cells->value[i].faces[2]].nodes[0] !=
3410 this->Cells->value[i].nodes[0] &&
3411 this->Faces->value[this->Cells->value[i].faces[2]].nodes[0] !=
3412 this->Cells->value[i].nodes[1]) &&
3413 (this->Faces->value[this->Cells->value[i].faces[2]].nodes[1] !=
3414 this->Cells->value[i].nodes[0] &&
3415 this->Faces->value[this->Cells->value[i].faces[2]].nodes[1] !=
3416 this->Cells->value[i].nodes[1]))
3417 {
3418 if (this->Faces->value[this->Cells->value[i].faces[2]].c0 == i)
3419 {
3420 this->Cells->value[i].nodes[2] =
3421 this->Faces->value[this->Cells->value[i].faces[2]].nodes[0];
3422 this->Cells->value[i].nodes[3] =
3423 this->Faces->value[this->Cells->value[i].faces[2]].nodes[1];
3424 }
3425 else
3426 {
3427 this->Cells->value[i].nodes[3] =
3428 this->Faces->value[this->Cells->value[i].faces[2]].nodes[0];
3429 this->Cells->value[i].nodes[2] =
3430 this->Faces->value[this->Cells->value[i].faces[2]].nodes[1];
3431 }
3432 }
3433 else
3434 {
3435 if (this->Faces->value[this->Cells->value[i].faces[3]].c0 == i)
3436 {
3437 this->Cells->value[i].nodes[2] =
3438 this->Faces->value[this->Cells->value[i].faces[3]].nodes[0];
3439 this->Cells->value[i].nodes[3] =
3440 this->Faces->value[this->Cells->value[i].faces[3]].nodes[1];
3441 }
3442 else
3443 {
3444 this->Cells->value[i].nodes[3] =
3445 this->Faces->value[this->Cells->value[i].faces[3]].nodes[0];
3446 this->Cells->value[i].nodes[2] =
3447 this->Faces->value[this->Cells->value[i].faces[3]].nodes[1];
3448 }
3449 }
3450 }
3451
3452 //----------------------------------------------------------------------------
PopulateHexahedronCell(int i)3453 void vtkFLUENTReader::PopulateHexahedronCell(int i)
3454 {
3455 this->Cells->value[i].nodes.resize(8);
3456
3457 if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
3458 {
3459 for (int j = 0; j < 4; j++)
3460 {
3461 this->Cells->value[i].nodes[j] =
3462 this->Faces->value[this->Cells->value[i].faces[0]].nodes[j];
3463 }
3464 }
3465 else
3466 {
3467 for (int j = 3; j >=0; j--)
3468 {
3469 this->Cells->value[i].nodes[3-j]=
3470 this->Faces->value[this->Cells->value[i].faces[0]].nodes[j];
3471 }
3472 }
3473
3474 // Look for opposite face of hexahedron
3475 for (int j = 1; j < 6; j++)
3476 {
3477 int flag = 0;
3478 for (int k = 0; k < 4; k++)
3479 {
3480 if ( (this->Cells->value[i].nodes[0] ==
3481 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]) ||
3482 (this->Cells->value[i].nodes[1] ==
3483 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]) ||
3484 (this->Cells->value[i].nodes[2] ==
3485 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]) ||
3486 (this->Cells->value[i].nodes[3] ==
3487 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]) )
3488 {
3489 flag = 1;
3490 }
3491 }
3492 if (flag == 0)
3493 {
3494 if (this->Faces->value[this->Cells->value[i].faces[j]].c1 == i)
3495 {
3496 for (int k = 4; k < 8; k++)
3497 {
3498 this->Cells->value[i].nodes[k] =
3499 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k-4];
3500 }
3501 }
3502 else
3503 {
3504 for (int k = 7; k >= 4; k--)
3505 {
3506 this->Cells->value[i].nodes[k] =
3507 this->Faces->value[this->Cells->value[i].faces[j]].nodes[7-k];
3508 }
3509 }
3510 }
3511 }
3512
3513 // Find the face with points 0 and 1 in them.
3514 int f01[4] = {-1, -1, -1, -1};
3515 for (int j = 1; j < 6; j++)
3516 {
3517 int flag0 = 0;
3518 int flag1 = 0;
3519 for (int k = 0; k < 4; k++)
3520 {
3521 if (this->Cells->value[i].nodes[0] ==
3522 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3523 {
3524 flag0 = 1;
3525 }
3526 if (this->Cells->value[i].nodes[1] ==
3527 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3528 {
3529 flag1 = 1;
3530 }
3531 }
3532 if ((flag0 == 1) && (flag1 == 1))
3533 {
3534 if (this->Faces->value[this->Cells->value[i].faces[j]].c0 == i)
3535 {
3536 for (int k=0; k<4; k++)
3537 {
3538 f01[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
3539 }
3540 }
3541 else
3542 {
3543 for (int k=3; k>=0; k--)
3544 {
3545 f01[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
3546 }
3547 }
3548 }
3549 }
3550
3551 // Find the face with points 0 and 3 in them.
3552 int f03[4] = {-1, -1, -1, -1};
3553 for (int j = 1; j < 6; j++)
3554 {
3555 int flag0 = 0;
3556 int flag1 = 0;
3557 for (int k = 0; k < 4; k++)
3558 {
3559 if (this->Cells->value[i].nodes[0] ==
3560 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3561 {
3562 flag0 = 1;
3563 }
3564 if (this->Cells->value[i].nodes[3] ==
3565 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3566 {
3567 flag1 = 1;
3568 }
3569 }
3570
3571 if ((flag0 == 1) && (flag1 == 1))
3572 {
3573 if (this->Faces->value[this->Cells->value[i].faces[j]].c0 == i)
3574 {
3575 for (int k=0; k<4; k++)
3576 {
3577 f03[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
3578 }
3579 }
3580 else
3581 {
3582 for (int k=3; k>=0; k--)
3583 {
3584 f03[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
3585 }
3586 }
3587 }
3588 }
3589
3590 // What point is in f01 and f03 besides 0 ... this is point 4
3591 int p4 = 0;
3592 for (int k = 0; k < 4; k++)
3593 {
3594 if ( f01[k] != this->Cells->value[i].nodes[0])
3595 {
3596 for (int n = 0; n < 4; n++)
3597 {
3598 if (f01[k] == f03[n])
3599 {
3600 p4 = f01[k];
3601 }
3602 }
3603 }
3604 }
3605
3606 // Since we know point 4 now we check to see if points
3607 // 4, 5, 6, and 7 are in the correct positions.
3608 int t[8];
3609 t[4] = this->Cells->value[i].nodes[4];
3610 t[5] = this->Cells->value[i].nodes[5];
3611 t[6] = this->Cells->value[i].nodes[6];
3612 t[7] = this->Cells->value[i].nodes[7];
3613 if (p4 == this->Cells->value[i].nodes[5])
3614 {
3615 this->Cells->value[i].nodes[5] = t[6];
3616 this->Cells->value[i].nodes[6] = t[7];
3617 this->Cells->value[i].nodes[7] = t[4];
3618 this->Cells->value[i].nodes[4] = t[5];
3619 }
3620 else if (p4 == Cells->value[i].nodes[6])
3621 {
3622 this->Cells->value[i].nodes[5] = t[7];
3623 this->Cells->value[i].nodes[6] = t[4];
3624 this->Cells->value[i].nodes[7] = t[5];
3625 this->Cells->value[i].nodes[4] = t[6];
3626 }
3627 else if (p4 == Cells->value[i].nodes[7])
3628 {
3629 this->Cells->value[i].nodes[5] = t[4];
3630 this->Cells->value[i].nodes[6] = t[5];
3631 this->Cells->value[i].nodes[7] = t[6];
3632 this->Cells->value[i].nodes[4] = t[7];
3633 }
3634 // else point 4 was lined up so everything was correct.
3635 }
3636
3637 //----------------------------------------------------------------------------
PopulatePyramidCell(int i)3638 void vtkFLUENTReader::PopulatePyramidCell(int i)
3639 {
3640 this->Cells->value[i].nodes.resize(5);
3641 // The quad face will be the base of the pyramid
3642 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3643 {
3644 if ( this->Faces->value[this->Cells->value[i].faces[j]].nodes.size() == 4)
3645 {
3646 if (this->Faces->value[this->Cells->value[i].faces[j]].c0 == i)
3647 {
3648 for (int k = 0; k < 4; k++)
3649 {
3650 this->Cells->value[i].nodes[k] =
3651 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
3652 }
3653 }
3654 else
3655 {
3656 for (int k = 0; k < 4; k++)
3657 {
3658 this->Cells->value[i].nodes[3-k] =
3659 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
3660 }
3661 }
3662 }
3663 }
3664
3665 // Just need to find point 4
3666 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3667 {
3668 if ( this->Faces->value[this->Cells->value[i].faces[j]].nodes.size() == 3)
3669 {
3670 for (int k = 0; k < 3; k ++)
3671 {
3672 if ( (this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
3673 this->Cells->value[i].nodes[0]) &&
3674 (this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
3675 this->Cells->value[i].nodes[1]) &&
3676 (this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
3677 this->Cells->value[i].nodes[2]) &&
3678 (this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
3679 this->Cells->value[i].nodes[3]) )
3680 {
3681 this->Cells->value[i].nodes[4] =
3682 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
3683 }
3684 }
3685 }
3686 }
3687
3688 }
3689
3690 //----------------------------------------------------------------------------
PopulateWedgeCell(int i)3691 void vtkFLUENTReader::PopulateWedgeCell(int i)
3692 {
3693 this->Cells->value[i].nodes.resize(6);
3694
3695 // Find the first triangle face and make it the base.
3696 int base = 0;
3697 int first = 0;
3698 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3699 {
3700 if ((this->Faces->value[this->Cells->value[i].faces[j]].type == 3) &&
3701 (first == 0))
3702 {
3703 base = this->Cells->value[i].faces[j];
3704 first = 1;
3705 }
3706 }
3707
3708 // Find the second triangle face and make it the top.
3709 int top = 0;
3710 int second = 0;
3711 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3712 {
3713 if ((this->Faces->value[this->Cells->value[i].faces[j]].type == 3) &&
3714 (second == 0) && (this->Cells->value[i].faces[j] != base))
3715 {
3716 top = this->Cells->value[i].faces[j];
3717 second = 1;
3718 }
3719 }
3720
3721 // Load Base nodes into the nodes std::vector
3722 if (this->Faces->value[base].c0 == i)
3723 {
3724 for (int j = 0; j < 3; j++)
3725 {
3726 this->Cells->value[i].nodes[j] = this->Faces->value[base].nodes[j];
3727 }
3728 }
3729 else
3730 {
3731 for (int j = 2; j >=0; j--)
3732 {
3733 this->Cells->value[i].nodes[2-j] = this->Faces->value[base].nodes[j];
3734 }
3735 }
3736 // Load Top nodes into the nodes std::vector
3737 if (this->Faces->value[top].c1 == i)
3738 {
3739 for (int j = 3; j < 6; j++)
3740 {
3741 this->Cells->value[i].nodes[j] = this->Faces->value[top].nodes[j-3];
3742 }
3743 }
3744 else
3745 {
3746 for (int j = 3; j < 6; j++)
3747 {
3748 this->Cells->value[i].nodes[j] = this->Faces->value[top].nodes[5-j];
3749 }
3750 }
3751
3752 // Find the quad face with points 0 and 1 in them.
3753 int w01[4] = {-1, -1, -1, -1};
3754 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3755 {
3756 if (this->Cells->value[i].faces[j] != base &&
3757 this->Cells->value[i].faces[j] != top)
3758 {
3759 int wf0 = 0;
3760 int wf1 = 0;
3761 for (int k = 0; k < 4; k++)
3762 {
3763 if (this->Cells->value[i].nodes[0] ==
3764 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3765 {
3766 wf0 = 1;
3767 }
3768 if (this->Cells->value[i].nodes[1] ==
3769 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3770 {
3771 wf1 = 1;
3772 }
3773 if ((wf0 == 1) && (wf1 == 1))
3774 {
3775 for (int n=0; n<4; n++)
3776 {
3777 w01[n]=this->Faces->value[this->Cells->value[i].faces[j]].nodes[n];
3778 }
3779 }
3780 }
3781 }
3782 }
3783
3784 // Find the quad face with points 0 and 2 in them.
3785 int w02[4] = {-1, -1, -1, -1};
3786 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3787 {
3788 if (this->Cells->value[i].faces[j] != base &&
3789 this->Cells->value[i].faces[j] != top)
3790 {
3791 int wf0 = 0;
3792 int wf2 = 0;
3793 for (int k = 0; k < 4; k++)
3794 {
3795 if (this->Cells->value[i].nodes[0] ==
3796 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3797 {
3798 wf0 = 1;
3799 }
3800 if (this->Cells->value[i].nodes[2] ==
3801 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3802 {
3803 wf2 = 1;
3804 }
3805 if ((wf0 == 1) && (wf2 == 1))
3806 {
3807 for (int n=0; n<4; n++)
3808 {
3809 w02[n]=this->Faces->value[this->Cells->value[i].faces[j]].nodes[n];
3810 }
3811 }
3812 }
3813 }
3814 }
3815
3816 // Point 3 is the point that is in both w01 and w02
3817
3818 // What point is in f01 and f02 besides 0 ... this is point 3
3819 int p3 = 0;
3820 for (int k = 0; k < 4; k++)
3821 {
3822 if ( w01[k] != this->Cells->value[i].nodes[0])
3823 {
3824 for (int n = 0; n < 4; n++)
3825 {
3826 if (w01[k] == w02[n])
3827 {
3828 p3 = w01[k];
3829 }
3830 }
3831 }
3832 }
3833
3834 // Since we know point 3 now we check to see if points
3835 // 3, 4, and 5 are in the correct positions.
3836 int t[6];
3837 t[3] = this->Cells->value[i].nodes[3];
3838 t[4] = this->Cells->value[i].nodes[4];
3839 t[5] = this->Cells->value[i].nodes[5];
3840 if (p3 == this->Cells->value[i].nodes[4])
3841 {
3842 this->Cells->value[i].nodes[3] = t[4];
3843 this->Cells->value[i].nodes[4] = t[5];
3844 this->Cells->value[i].nodes[5] = t[3];
3845 }
3846 else if (p3 == this->Cells->value[i].nodes[5])
3847 {
3848 this->Cells->value[i].nodes[3] = t[5];
3849 this->Cells->value[i].nodes[4] = t[3];
3850 this->Cells->value[i].nodes[5] = t[4];
3851 }
3852 // else point 3 was lined up so everything was correct.
3853
3854 }
3855
3856 //----------------------------------------------------------------------------
PopulatePolyhedronCell(int i)3857 void vtkFLUENTReader::PopulatePolyhedronCell(int i)
3858 {
3859 // We can't set the size on the nodes std::vector because we
3860 // are not sure how many we are going to have.
3861 // All we have to do here is add the nodes from the faces into
3862 // nodes std::vector within the cell. All we have to check for is
3863 // duplicate nodes.
3864 //
3865 //cout << "number of faces in cell = " << Cells[i].faces.size() << endl;
3866
3867 for (int j = 0; j < (int)this->Cells->value[i].faces.size(); j++)
3868 {
3869 //cout << "number of nodes in face = " <<
3870 //Faces[Cells[i].faces[j]].nodes.size() << endl;
3871 int k;
3872 for(k=0; k < (int)this->Faces->value[this->Cells->value[i].faces[j]].
3873 nodes.size(); k++)
3874 {
3875 int flag;
3876 flag = 0;
3877 // Is the node already in the cell?
3878 for (int n = 0; n < (int)Cells->value[i].nodes.size(); n++)
3879 {
3880 if (this->Cells->value[i].nodes[n] ==
3881 this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
3882 {
3883 flag = 1;
3884 }
3885 }
3886 if (flag == 0)
3887 {
3888 //No match - insert node into cell.
3889 this->Cells->value[i].nodes.
3890 push_back(this->Faces->
3891 value[this->Cells->value[i].faces[j]].nodes[k]);
3892 }
3893 }
3894 }
3895 }
3896
3897 //----------------------------------------------------------------------------
ParseDataFile()3898 void vtkFLUENTReader::ParseDataFile()
3899 {
3900 while (this->GetDataChunk())
3901 {
3902 int index = this->GetDataIndex();
3903 switch (index)
3904 {
3905 case 0:
3906 //cout << "Comment Section" << endl;
3907 break;
3908
3909 case 4:
3910 //cout << "Machine Configuration Section" << endl;
3911 break;
3912
3913 case 33:
3914 //cout << "Grid Size Section" << endl;
3915 break;
3916
3917 case 37:
3918 //cout << "Variables Section" << endl;
3919 break;
3920
3921 case 300:
3922 //cout << "Data Section" << endl;
3923 GetData(1);
3924 break;
3925
3926 case 301:
3927 //cout << "Residuals Section" << endl;
3928 break;
3929
3930 case 302:
3931 //cout << "Residuals Section" << endl;
3932 break;
3933
3934 case 2300:
3935 //cout << "Single Precision Data Section" << endl;
3936 GetData(2);
3937 break;
3938
3939 case 2301:
3940 //cout << "Single Precision Residuals Section" << endl;
3941 break;
3942
3943 case 2302:
3944 //cout << "Single Precision Residuals Section" << endl;
3945 break;
3946
3947 case 3300:
3948 //cout << "Single Precision Data Section" << endl;
3949 GetData(3);
3950 break;
3951
3952 case 3301:
3953 //cout << "Single Precision Residuals Section" << endl;
3954 break;
3955
3956 case 3302:
3957 //cout << "Single Precision Residuals Section" << endl;
3958 break;
3959
3960 default:
3961 //cout << "Data Undefined Section = " << index << endl;
3962 break;
3963 }
3964 }
3965 }
3966
3967 //----------------------------------------------------------------------------
GetDataBufferInt(int ptr)3968 int vtkFLUENTReader::GetDataBufferInt(int ptr)
3969 {
3970 union mix_i
3971 {
3972 int i;
3973 char c[4];
3974 } mi = {1};
3975
3976 for (int j = 0; j < 4; j++)
3977 {
3978 if (this->GetSwapBytes())
3979 {
3980 mi.c[3 - j] = this->DataBuffer->value.at(ptr+j);
3981 }
3982 else
3983 {
3984 mi.c[j] = this->DataBuffer->value.at(ptr+j);
3985 }
3986 }
3987 return mi.i;
3988 }
3989
3990 //----------------------------------------------------------------------------
GetDataBufferFloat(int ptr)3991 float vtkFLUENTReader::GetDataBufferFloat(int ptr)
3992 {
3993 union mix_f
3994 {
3995 float f;
3996 char c[4];
3997 } mf = {1.0};
3998
3999 for (int j = 0; j < 4; j++)
4000 {
4001 if (this->GetSwapBytes())
4002 {
4003 mf.c[3 - j] = this->DataBuffer->value.at(ptr+j);
4004 }
4005 else
4006 {
4007 mf.c[j] = this->DataBuffer->value.at(ptr+j);
4008 }
4009 }
4010 return mf.f;
4011 }
4012
4013 //----------------------------------------------------------------------------
GetDataBufferDouble(int ptr)4014 double vtkFLUENTReader::GetDataBufferDouble(int ptr)
4015 {
4016 union mix_i
4017 {
4018 double d;
4019 char c[8];
4020 } md = {1.0};
4021
4022 for (int j = 0; j < 8; j++)
4023 {
4024 if (this->GetSwapBytes())
4025 {
4026 md.c[7 - j] = this->DataBuffer->value.at(ptr+j);
4027 }
4028 else
4029 {
4030 md.c[j] = this->DataBuffer->value.at(ptr+j);
4031 }
4032 }
4033 return md.d;
4034 }
4035
4036 //------------------------------------------------------------------------------
GetData(int dataType)4037 void vtkFLUENTReader::GetData(int dataType)
4038 {
4039 size_t start = this->DataBuffer->value.find('(', 1);
4040 size_t end = this->DataBuffer->value.find(')',1);
4041 std::string info = this->DataBuffer->value.substr(start+1,end-start-1 );
4042 std::stringstream infostream(info);
4043 int subSectionId, zoneId, size, nTimeLevels, nPhases, firstId, lastId;
4044 infostream >> subSectionId >> zoneId >> size >> nTimeLevels >> nPhases >>
4045 firstId >> lastId;
4046
4047 // Is this a cell zone?
4048 int zmatch = 0;
4049 for (int i = 0; i < (int)this->CellZones->value.size(); i++)
4050 {
4051 if (this->CellZones->value[i] == zoneId)
4052 {
4053 zmatch = 1;
4054 }
4055 }
4056
4057 if (zmatch)
4058 {
4059
4060 // Set up stream or pointer to data
4061 size_t dstart = this->DataBuffer->value.find('(', 7);
4062 size_t dend = this->DataBuffer->value.find(')', dstart+1);
4063 std::string pdata = this->DataBuffer->
4064 value.substr(dstart+1, dend-dstart-2);
4065 std::stringstream pdatastream(pdata);
4066 size_t ptr = dstart + 1;
4067
4068 // Is this a new variable?
4069 int match = 0;
4070 for (int i = 0; i < (int)this->SubSectionIds->value.size(); i++)
4071 {
4072 if (subSectionId == this->SubSectionIds->value[i])
4073 {
4074 match = 1;
4075 }
4076 }
4077
4078 if ((match == 0) && (size < 4))
4079 { // new variable
4080 this->SubSectionIds->value.push_back(subSectionId);
4081 this->SubSectionSize->value.push_back(size);
4082 this->SubSectionZones->
4083 value.resize(this->SubSectionZones->value.size()+1);
4084 this->SubSectionZones->
4085 value[this->SubSectionZones->value.size()-1].push_back(zoneId);
4086 }
4087
4088 if (size == 1)
4089 {
4090 this->NumberOfScalars++;
4091 this->ScalarDataChunks->
4092 value.resize(this->ScalarDataChunks->value.size() + 1);
4093 this->ScalarDataChunks->
4094 value[this->ScalarDataChunks->value.size()-1].subsectionId =
4095 subSectionId;
4096 this->ScalarDataChunks->
4097 value[this->ScalarDataChunks->value.size()-1].zoneId = zoneId;
4098 for (int i=firstId; i<=lastId; i++)
4099 {
4100 double temp;
4101 if (dataType == 1)
4102 {
4103 pdatastream >> temp;
4104 }
4105 else if (dataType == 2)
4106 {
4107 temp = this->GetDataBufferFloat( static_cast< int >(ptr) );
4108 ptr = ptr + 4;
4109 }
4110 else
4111 {
4112 temp = this->GetDataBufferDouble( static_cast< int >(ptr) );
4113 ptr = ptr + 8;
4114 }
4115 this->ScalarDataChunks->value[this->ScalarDataChunks->value.size()-1].
4116 scalarData.push_back(temp);
4117 }
4118 }
4119 else if (size == 3)
4120 {
4121 this->NumberOfVectors++;
4122 this->VectorDataChunks->
4123 value.resize(this->VectorDataChunks->value.size() + 1);
4124 this->VectorDataChunks->
4125 value[this->VectorDataChunks->value.size()-1].subsectionId =
4126 subSectionId;
4127 this->VectorDataChunks->
4128 value[this->VectorDataChunks->value.size()-1].zoneId = zoneId;
4129 for (int i=firstId; i<=lastId; i++)
4130 {
4131 double tempx, tempy, tempz;
4132
4133 if (dataType == 1)
4134 {
4135 pdatastream >> tempx;
4136 pdatastream >> tempy;
4137 pdatastream >> tempz;
4138 }
4139 else if (dataType == 2)
4140 {
4141 tempx = this->GetDataBufferFloat( static_cast< int >(ptr) );
4142 ptr = ptr + 4;
4143 tempy = this->GetDataBufferFloat( static_cast< int >(ptr) );
4144 ptr = ptr + 4;
4145 tempz = this->GetDataBufferFloat( static_cast< int >(ptr) );
4146 ptr = ptr + 4;
4147 }
4148 else
4149 {
4150 tempx = this->GetDataBufferDouble( static_cast< int >(ptr) );
4151 ptr = ptr + 8;
4152 tempy = this->GetDataBufferDouble( static_cast< int >(ptr) );
4153 ptr = ptr + 8;
4154 tempz = this->GetDataBufferDouble( static_cast< int >(ptr) );
4155 ptr = ptr + 8;
4156 }
4157 this->VectorDataChunks->value[this->VectorDataChunks->value.size()-1].
4158 iComponentData.push_back(tempx);
4159 this->VectorDataChunks->value[this->VectorDataChunks->value.size()-1].
4160 jComponentData.push_back(tempy);
4161 this->VectorDataChunks->value[this->VectorDataChunks->value.size()-1].
4162 kComponentData.push_back(tempz);
4163 }
4164 }
4165 else
4166 {
4167 //cout << "Weird Variable Size = " << size << endl;
4168 }
4169 }
4170 }
4171 //----------------------------------------------------------------------------
SetDataByteOrderToBigEndian()4172 void vtkFLUENTReader::SetDataByteOrderToBigEndian()
4173 {
4174 #ifndef VTK_WORDS_BIGENDIAN
4175 this->SwapBytesOn();
4176 #else
4177 this->SwapBytesOff();
4178 #endif
4179 }
4180 //----------------------------------------------------------------------------
SetDataByteOrderToLittleEndian()4181 void vtkFLUENTReader::SetDataByteOrderToLittleEndian()
4182 {
4183 #ifdef VTK_WORDS_BIGENDIAN
4184 this->SwapBytesOn();
4185 #else
4186 this->SwapBytesOff();
4187 #endif
4188 }
4189 //----------------------------------------------------------------------------
SetDataByteOrder(int byteOrder)4190 void vtkFLUENTReader::SetDataByteOrder(int byteOrder)
4191 {
4192 if ( byteOrder == VTK_FILE_BYTE_ORDER_BIG_ENDIAN )
4193 {
4194 this->SetDataByteOrderToBigEndian();
4195 }
4196 else
4197 {
4198 this->SetDataByteOrderToLittleEndian();
4199 }
4200 }
4201 //----------------------------------------------------------------------------
GetDataByteOrder()4202 int vtkFLUENTReader::GetDataByteOrder()
4203 {
4204 #ifdef VTK_WORDS_BIGENDIAN
4205 if ( this->SwapBytes )
4206 {
4207 return VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN;
4208 }
4209 else
4210 {
4211 return VTK_FILE_BYTE_ORDER_BIG_ENDIAN;
4212 }
4213 #else
4214 if ( this->SwapBytes )
4215 {
4216 return VTK_FILE_BYTE_ORDER_BIG_ENDIAN;
4217 }
4218 else
4219 {
4220 return VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN;
4221 }
4222 #endif
4223 }
4224 //----------------------------------------------------------------------------
GetDataByteOrderAsString()4225 const char *vtkFLUENTReader::GetDataByteOrderAsString()
4226 {
4227 #ifdef VTK_WORDS_BIGENDIAN
4228 if ( this->SwapBytes )
4229 {
4230 return "LittleEndian";
4231 }
4232 else
4233 {
4234 return "BigEndian";
4235 }
4236 #else
4237 if ( this->SwapBytes )
4238 {
4239 return "BigEndian";
4240 }
4241 else
4242 {
4243 return "LittleEndian";
4244 }
4245 #endif
4246 }
4247 //------------------------------------------------------------------------------
GetSpeciesVariableNames()4248 void vtkFLUENTReader::GetSpeciesVariableNames()
4249 {
4250 //Locate the "(species (names" entry
4251 std::string variables = this->CaseBuffer->value;
4252 size_t startPos = variables.find("(species (names (") +17;
4253 if (startPos != std::string::npos)
4254 {
4255 variables.erase( 0, startPos);
4256
4257 size_t endPos = variables.find(')');
4258 variables.erase(endPos);
4259
4260 std::stringstream tokenizer(variables);
4261
4262 int iterator = 0;
4263
4264 while ( !tokenizer.eof() )
4265 {
4266 std::string temp;
4267 tokenizer >> temp;
4268
4269 this->VariableNames->value[200 + iterator] = temp;
4270 this->VariableNames->value[250 + iterator] = "M1_" + temp;
4271 this->VariableNames->value[300 + iterator] = "M2_" + temp;
4272 this->VariableNames->value[450 + iterator] = "DPMS_" + temp;
4273 this->VariableNames->value[850 + iterator] = "DPMS_DS_" + temp;
4274 this->VariableNames->value[1000 + iterator] = "MEAN_" + temp;
4275 this->VariableNames->value[1050 + iterator] = "RMS_" + temp;
4276 this->VariableNames->value[1250 + iterator] = "CREV_" + temp;
4277
4278 iterator++;
4279 }
4280 }
4281 }
4282