153 #ifndef vtkLSDynaReader_h 154 #define vtkLSDynaReader_h 159 class LSDynaMetaData;
175 void Dump( ostream &os );
182 virtual int CanReadFile(
const char* fname );
187 virtual void SetDatabaseDirectory(
const char* );
188 const char* GetDatabaseDirectory();
189 int IsDatabaseValid();
197 virtual void SetFileName(
const char* );
198 const char* GetFileName();
210 int GetDimensionality();
281 int GetNumberOfPointArrays();
282 const char* GetPointArrayName(
int);
283 virtual void SetPointArrayStatus(
int arr,
int status );
284 virtual void SetPointArrayStatus(
const char* arrName,
int status );
285 int GetPointArrayStatus(
int arr );
286 int GetPointArrayStatus(
const char* arrName );
287 int GetNumberOfComponentsInPointArray(
int arr );
288 int GetNumberOfComponentsInPointArray(
const char* arrName );
296 int GetNumberOfCellArrays(
int cellType );
297 const char* GetCellArrayName(
int cellType,
int arr );
298 virtual void SetCellArrayStatus(
int cellType,
int arr,
int status );
299 virtual void SetCellArrayStatus(
int cellType,
const char* arrName,
int status );
300 int GetCellArrayStatus(
int cellType,
int arr );
301 int GetCellArrayStatus(
int cellType,
const char* arrName );
302 int GetNumberOfComponentsInCellArray(
int cellType,
int arr );
303 int GetNumberOfComponentsInCellArray(
int cellType,
const char* arrName );
309 int GetNumberOfSolidArrays();
310 const char* GetSolidArrayName(
int);
311 virtual void SetSolidArrayStatus(
int arr,
int status );
312 virtual void SetSolidArrayStatus(
const char* arrName,
int status );
313 int GetSolidArrayStatus(
int arr );
314 int GetSolidArrayStatus(
const char* arrName );
317 int GetNumberOfComponentsInSolidArray(
int a );
318 int GetNumberOfComponentsInSolidArray(
const char* arrName );
323 int GetNumberOfThickShellArrays();
324 const char* GetThickShellArrayName(
int);
325 virtual void SetThickShellArrayStatus(
int arr,
int status );
326 virtual void SetThickShellArrayStatus(
const char* arrName,
int status );
327 int GetThickShellArrayStatus(
int arr );
328 int GetThickShellArrayStatus(
const char* arrName );
331 int GetNumberOfComponentsInThickShellArray(
int a );
332 int GetNumberOfComponentsInThickShellArray(
const char* arrName );
337 int GetNumberOfShellArrays();
338 const char* GetShellArrayName(
int);
339 virtual void SetShellArrayStatus(
int arr,
int status );
340 virtual void SetShellArrayStatus(
const char* arrName,
int status );
341 int GetShellArrayStatus(
int arr );
342 int GetShellArrayStatus(
const char* arrName );
345 int GetNumberOfComponentsInShellArray(
int a );
346 int GetNumberOfComponentsInShellArray(
const char* arrName );
351 int GetNumberOfRigidBodyArrays();
352 const char* GetRigidBodyArrayName(
int);
353 virtual void SetRigidBodyArrayStatus(
int arr,
int status );
354 virtual void SetRigidBodyArrayStatus(
const char* arrName,
int status );
355 int GetRigidBodyArrayStatus(
int arr );
356 int GetRigidBodyArrayStatus(
const char* arrName );
359 int GetNumberOfComponentsInRigidBodyArray(
int a );
360 int GetNumberOfComponentsInRigidBodyArray(
const char* arrName );
365 int GetNumberOfRoadSurfaceArrays();
366 const char* GetRoadSurfaceArrayName(
int);
367 virtual void SetRoadSurfaceArrayStatus(
int arr,
int status );
368 virtual void SetRoadSurfaceArrayStatus(
const char* arrName,
int status );
369 int GetRoadSurfaceArrayStatus(
int arr );
370 int GetRoadSurfaceArrayStatus(
const char* arrName );
373 int GetNumberOfComponentsInRoadSurfaceArray(
int a );
374 int GetNumberOfComponentsInRoadSurfaceArray(
const char* arrName );
379 int GetNumberOfBeamArrays();
380 const char* GetBeamArrayName(
int);
381 virtual void SetBeamArrayStatus(
int arr,
int status );
382 virtual void SetBeamArrayStatus(
const char* arrName,
int status );
383 int GetBeamArrayStatus(
int arr );
384 int GetBeamArrayStatus(
const char* arrName );
387 int GetNumberOfComponentsInBeamArray(
int a );
388 int GetNumberOfComponentsInBeamArray(
const char* arrName );
393 int GetNumberOfParticleArrays();
394 const char* GetParticleArrayName(
int);
395 virtual void SetParticleArrayStatus(
int arr,
int status );
396 virtual void SetParticleArrayStatus(
const char* arrName,
int status );
397 int GetParticleArrayStatus(
int arr );
398 int GetParticleArrayStatus(
const char* arrName );
401 int GetNumberOfComponentsInParticleArray(
int a );
402 int GetNumberOfComponentsInParticleArray(
const char* arrName );
408 void SetDeformedMesh(
int);
458 int GetNumberOfPartArrays();
459 const char* GetPartArrayName(
int);
460 virtual void SetPartArrayStatus(
int arr,
int status );
461 virtual void SetPartArrayStatus(
const char* partName,
int status );
462 int GetPartArrayStatus(
int arr );
463 int GetPartArrayStatus(
const char* partName );
483 int TimeStepRange[2];
497 int ReadHeaderInformation(
int currentAdaptLevel );
506 int ScanDatabaseTimeSteps();
518 virtual int ReadTopology();
519 virtual int ReadNodes();
520 virtual int ReadPartSizes();
521 virtual int ReadConnectivityAndMaterial();
522 virtual int ReadUserIds();
524 virtual int ReadNodeStateInfo(
vtkIdType );
525 virtual int ReadCellStateInfo(
vtkIdType );
526 virtual int ReadDeletion();
531 virtual void ResetPartInfo();
535 virtual int ReadInputDeck();
539 virtual int ReadPartTitlesFromRootFile();
544 virtual int ReadUserMaterialIds();
549 int ReadInputDeckXML( ifstream& deck );
550 int ReadInputDeckKeywords( ifstream& deck );
555 int WriteInputDeckSummary(
const char* fname );
567 virtual void ReadCellProperties(
const int&
type,
const int& numTuples);
571 void ResetPartsCache();
578 const int& deathPos,
const int& cellSize);
580 template<
int wordSize,
typename T>
581 int FillTopology(T*
buffer);
583 template<
typename T,
int blockType, vtkIdType numWordsPerCell, vtkIdType cellLength>
584 void ReadBlockCellSizes();
595 for (
int a=0;
a<this->GetNumberOfPointArrays(); ++
a )
597 if ( strcmp( arrName, this->GetPointArrayName(
a) ) == 0 )
599 this->SetPointArrayStatus(
a, status );
608 for (
int a=0;
a<this->GetNumberOfPointArrays(); ++
a )
610 if ( strcmp( arrName, this->GetPointArrayName(
a) ) == 0 )
612 return this->GetPointArrayStatus(
a );
621 for (
int a=0;
a<this->GetNumberOfPointArrays(); ++
a )
623 if ( strcmp( arrName, this->GetPointArrayName(
a ) ) == 0 )
625 return this->GetNumberOfComponentsInPointArray(
a );
634 for (
int a=0;
a<this->GetNumberOfCellArrays( cellType ); ++
a )
636 if ( strcmp( arrName, this->GetCellArrayName( cellType,
a ) ) == 0 )
638 this->SetCellArrayStatus( cellType,
a, status );
642 vtkWarningMacro(
"Cell array \"" << arrName <<
"\" (type " << cellType <<
") does not exist" );
647 for (
int a=0;
a<this->GetNumberOfCellArrays( cellType ); ++
a )
649 if ( strcmp( arrName, this->GetCellArrayName( cellType,
a ) ) == 0 )
651 return this->GetCellArrayStatus( cellType,
a );
660 for (
int a=0;
a<this->GetNumberOfCellArrays( cellType ); ++
a )
662 if ( strcmp( arrName, this->GetCellArrayName( cellType,
a ) ) == 0 )
664 return this->GetNumberOfComponentsInCellArray( cellType,
a );
673 for (
int a=0;
a<this->GetNumberOfSolidArrays(); ++
a )
675 if ( strcmp( arrName, this->GetSolidArrayName(
a) ) == 0 )
677 this->SetSolidArrayStatus(
a, status );
686 for (
int a=0;
a<this->GetNumberOfSolidArrays(); ++
a )
688 if ( strcmp( arrName, this->GetSolidArrayName(
a) ) == 0 )
690 return this->GetSolidArrayStatus(
a );
699 for (
int a=0;
a<this->GetNumberOfSolidArrays(); ++
a )
701 if ( strcmp( arrName, this->GetSolidArrayName(
a) ) == 0 )
703 return this->GetNumberOfComponentsInSolidArray(
a );
712 for (
int a=0;
a<this->GetNumberOfThickShellArrays(); ++
a )
714 if ( strcmp( arrName, this->GetThickShellArrayName(
a) ) == 0 )
716 this->SetThickShellArrayStatus(
a, status );
720 vtkWarningMacro(
"Thick shell array \"" << arrName <<
"\" does not exist" );
725 for (
int a=0;
a<this->GetNumberOfThickShellArrays(); ++
a )
727 if ( strcmp( arrName, this->GetThickShellArrayName(
a) ) == 0 )
729 return this->GetThickShellArrayStatus(
a );
738 for (
int a=0;
a<this->GetNumberOfThickShellArrays(); ++
a )
740 if ( strcmp( arrName, this->GetThickShellArrayName(
a) ) == 0 )
742 return this->GetNumberOfComponentsInThickShellArray(
a );
751 for (
int a=0;
a<this->GetNumberOfShellArrays(); ++
a )
753 if ( strcmp( arrName, this->GetShellArrayName(
a) ) == 0 )
755 this->SetShellArrayStatus(
a, status );
764 for (
int a=0;
a<this->GetNumberOfShellArrays(); ++
a )
766 if ( strcmp( arrName, this->GetShellArrayName(
a) ) == 0 )
768 return this->GetShellArrayStatus(
a );
777 for (
int a=0;
a<this->GetNumberOfShellArrays(); ++
a )
779 if ( strcmp( arrName, this->GetShellArrayName(
a) ) == 0 )
781 return this->GetNumberOfComponentsInShellArray(
a );
790 for (
int a=0;
a<this->GetNumberOfBeamArrays(); ++
a )
792 if ( strcmp( arrName, this->GetBeamArrayName(
a) ) == 0 )
794 this->SetBeamArrayStatus(
a, status );
803 for (
int a=0;
a<this->GetNumberOfBeamArrays(); ++
a )
805 if ( strcmp( arrName, this->GetBeamArrayName(
a) ) == 0 )
807 return this->GetBeamArrayStatus(
a );
816 for (
int a=0;
a<this->GetNumberOfBeamArrays(); ++
a )
818 if ( strcmp( arrName, this->GetBeamArrayName(
a) ) == 0 )
820 return this->GetNumberOfComponentsInBeamArray(
a );
829 for (
int a=0;
a<this->GetNumberOfParticleArrays(); ++
a )
831 if ( strcmp( arrName, this->GetParticleArrayName(
a) ) == 0 )
833 this->SetParticleArrayStatus(
a, status );
837 vtkWarningMacro(
"Particle array \"" << arrName <<
"\" does not exist" );
842 for (
int a=0;
a<this->GetNumberOfParticleArrays(); ++
a )
844 if ( strcmp( arrName, this->GetParticleArrayName(
a) ) == 0 )
846 return this->GetParticleArrayStatus(
a );
855 for (
int a=0;
a<this->GetNumberOfParticleArrays(); ++
a )
857 if ( strcmp( arrName, this->GetParticleArrayName(
a) ) == 0 )
859 return this->GetNumberOfComponentsInParticleArray(
a );
868 for (
int a=0;
a<this->GetNumberOfRigidBodyArrays(); ++
a )
870 if ( strcmp( arrName, this->GetRigidBodyArrayName(
a) ) == 0 )
872 this->SetRigidBodyArrayStatus(
a, status );
876 vtkWarningMacro(
"Rigid body array \"" << arrName <<
"\" does not exist" );
881 for (
int a=0;
a<this->GetNumberOfRigidBodyArrays(); ++
a )
883 if ( strcmp( arrName, this->GetRigidBodyArrayName(
a) ) == 0 )
885 return this->GetRigidBodyArrayStatus(
a );
894 for (
int a=0;
a<this->GetNumberOfRigidBodyArrays(); ++
a )
896 if ( strcmp( arrName, this->GetRigidBodyArrayName(
a) ) == 0 )
898 return this->GetNumberOfComponentsInRigidBodyArray(
a );
907 for (
int a=0;
a<this->GetNumberOfRoadSurfaceArrays(); ++
a )
909 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(
a) ) == 0 )
911 this->SetRoadSurfaceArrayStatus(
a, status );
915 vtkWarningMacro(
"Road surface array \"" << arrName <<
"\" does not exist" );
920 for (
int a=0;
a<this->GetNumberOfRoadSurfaceArrays(); ++
a )
922 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(
a) ) == 0 )
924 return this->GetRoadSurfaceArrayStatus(
a );
933 for (
int a=0;
a<this->GetNumberOfRoadSurfaceArrays(); ++
a )
935 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(
a) ) == 0 )
937 return this->GetNumberOfComponentsInRoadSurfaceArray(
a );
946 for (
int a=0;
a<this->GetNumberOfPartArrays(); ++
a )
948 if ( strcmp( arrName, this->GetPartArrayName(
a) ) == 0 )
950 this->SetPartArrayStatus(
a, status );
959 for (
int a=0;
a<this->GetNumberOfPartArrays(); ++
a )
961 if ( strcmp( partName, this->GetPartArrayName(
a) ) == 0 )
963 return this->GetPartArrayStatus(
a );
970 #endif // vtkLSDynaReader_h
virtual void SetThickShellArrayStatus(int arr, int status)
int GetShellArrayStatus(int arr)
vtkLSDynaPartCollection * Parts
GLuint GLuint GLsizei GLenum type
int GetThickShellArrayStatus(int arr)
int GetNumberOfComponentsInBeamArray(int a)
int GetRoadSurfaceArrayStatus(int arr)
Read LS-Dyna databases (d3plot)
int DeletedCellsAsGhostArray
#define vtkGetMacro(name, type)
int GetNumberOfComponentsInCellArray(int cellType, int arr)
virtual void SetRigidBodyArrayStatus(int arr, int status)
int GetNumberOfComponentsInSolidArray(int a)
#define vtkWarningMacro(x)
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
#define vtkSetStringMacro(name)
virtual void SetSolidArrayStatus(int arr, int status)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
#define vtkTypeMacro(thisClass, superclass)
virtual void SetRoadSurfaceArrayStatus(int arr, int status)
static vtkMultiBlockDataSetAlgorithm * New()
int GetPointArrayStatus(int arr)
int GetRigidBodyArrayStatus(int arr)
virtual void SetShellArrayStatus(int arr, int status)
int GetCellArrayStatus(int cellType, int arr)
a simple class to control print indentation
int GetSolidArrayStatus(int arr)
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
#define vtkGetStringMacro(name)
dynamic, self-adjusting array of unsigned char
CellTypeInDataSet cellType(vtkDataSet *input)
int GetNumberOfComponentsInShellArray(int a)
GLboolean GLboolean GLboolean GLboolean a
#define vtkGetVector2Macro(name, type)
#define VTKIOLSDYNA_EXPORT
int GetNumberOfComponentsInRigidBodyArray(int a)
int GetPartArrayStatus(int arr)
int GetParticleArrayStatus(int arr)
int GetNumberOfComponentsInThickShellArray(int a)
int GetBeamArrayStatus(int arr)
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetBeamArrayStatus(int arr, int status)
virtual void SetCellArrayStatus(int cellType, int arr, int status)
#define vtkBooleanMacro(name, type)
virtual void SetParticleArrayStatus(int arr, int status)
virtual void SetPartArrayStatus(int arr, int status)
virtual void SetPointArrayStatus(int arr, int status)
int GetNumberOfComponentsInRoadSurfaceArray(int a)
#define vtkSetVector2Macro(name, type)
int GetNumberOfComponentsInParticleArray(int a)
represent and manipulate 3D points
int GetNumberOfComponentsInPointArray(int arr)
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
#define vtkSetMacro(name, type)