154 #ifndef vtkLSDynaReader_h 155 #define vtkLSDynaReader_h 157 #include "vtkIOLSDynaModule.h" 178 void Dump( ostream &os );
189 virtual int CanReadFile(
const char* fname );
196 virtual void SetDatabaseDirectory(
const char* );
197 const char* GetDatabaseDirectory();
198 int IsDatabaseValid();
208 virtual void SetFileName(
const char* );
209 const char* GetFileName();
224 int GetDimensionality();
313 vtkGetVector2Macro(TimeStepRange,
int);
314 vtkSetVector2Macro(TimeStepRange,
int);
322 int GetNumberOfPointArrays();
323 const char* GetPointArrayName(
int);
324 virtual void SetPointArrayStatus(
int arr,
int status );
325 virtual void SetPointArrayStatus(
const char* arrName,
int status );
326 int GetPointArrayStatus(
int arr );
327 int GetPointArrayStatus(
const char* arrName );
328 int GetNumberOfComponentsInPointArray(
int arr );
329 int GetNumberOfComponentsInPointArray(
const char* arrName );
339 int GetNumberOfCellArrays(
int cellType );
340 const char* GetCellArrayName(
int cellType,
int arr );
341 virtual void SetCellArrayStatus(
int cellType,
int arr,
int status );
342 virtual void SetCellArrayStatus(
int cellType,
const char* arrName,
int status );
343 int GetCellArrayStatus(
int cellType,
int arr );
344 int GetCellArrayStatus(
int cellType,
const char* arrName );
345 int GetNumberOfComponentsInCellArray(
int cellType,
int arr );
346 int GetNumberOfComponentsInCellArray(
int cellType,
const char* arrName );
354 int GetNumberOfSolidArrays();
355 const char* GetSolidArrayName(
int);
356 virtual void SetSolidArrayStatus(
int arr,
int status );
357 virtual void SetSolidArrayStatus(
const char* arrName,
int status );
358 int GetSolidArrayStatus(
int arr );
359 int GetSolidArrayStatus(
const char* arrName );
362 int GetNumberOfComponentsInSolidArray(
int a );
363 int GetNumberOfComponentsInSolidArray(
const char* arrName );
370 int GetNumberOfThickShellArrays();
371 const char* GetThickShellArrayName(
int);
372 virtual void SetThickShellArrayStatus(
int arr,
int status );
373 virtual void SetThickShellArrayStatus(
const char* arrName,
int status );
374 int GetThickShellArrayStatus(
int arr );
375 int GetThickShellArrayStatus(
const char* arrName );
378 int GetNumberOfComponentsInThickShellArray(
int a );
379 int GetNumberOfComponentsInThickShellArray(
const char* arrName );
386 int GetNumberOfShellArrays();
387 const char* GetShellArrayName(
int);
388 virtual void SetShellArrayStatus(
int arr,
int status );
389 virtual void SetShellArrayStatus(
const char* arrName,
int status );
390 int GetShellArrayStatus(
int arr );
391 int GetShellArrayStatus(
const char* arrName );
394 int GetNumberOfComponentsInShellArray(
int a );
395 int GetNumberOfComponentsInShellArray(
const char* arrName );
402 int GetNumberOfRigidBodyArrays();
403 const char* GetRigidBodyArrayName(
int);
404 virtual void SetRigidBodyArrayStatus(
int arr,
int status );
405 virtual void SetRigidBodyArrayStatus(
const char* arrName,
int status );
406 int GetRigidBodyArrayStatus(
int arr );
407 int GetRigidBodyArrayStatus(
const char* arrName );
410 int GetNumberOfComponentsInRigidBodyArray(
int a );
411 int GetNumberOfComponentsInRigidBodyArray(
const char* arrName );
418 int GetNumberOfRoadSurfaceArrays();
419 const char* GetRoadSurfaceArrayName(
int);
420 virtual void SetRoadSurfaceArrayStatus(
int arr,
int status );
421 virtual void SetRoadSurfaceArrayStatus(
const char* arrName,
int status );
422 int GetRoadSurfaceArrayStatus(
int arr );
423 int GetRoadSurfaceArrayStatus(
const char* arrName );
426 int GetNumberOfComponentsInRoadSurfaceArray(
int a );
427 int GetNumberOfComponentsInRoadSurfaceArray(
const char* arrName );
434 int GetNumberOfBeamArrays();
435 const char* GetBeamArrayName(
int);
436 virtual void SetBeamArrayStatus(
int arr,
int status );
437 virtual void SetBeamArrayStatus(
const char* arrName,
int status );
438 int GetBeamArrayStatus(
int arr );
439 int GetBeamArrayStatus(
const char* arrName );
442 int GetNumberOfComponentsInBeamArray(
int a );
443 int GetNumberOfComponentsInBeamArray(
const char* arrName );
450 int GetNumberOfParticleArrays();
451 const char* GetParticleArrayName(
int);
452 virtual void SetParticleArrayStatus(
int arr,
int status );
453 virtual void SetParticleArrayStatus(
const char* arrName,
int status );
454 int GetParticleArrayStatus(
int arr );
455 int GetParticleArrayStatus(
const char* arrName );
458 int GetNumberOfComponentsInParticleArray(
int a );
459 int GetNumberOfComponentsInParticleArray(
const char* arrName );
495 vtkBooleanMacro(DeletedCellsAsGhostArray,
vtkTypeBool);
510 vtkSetStringMacro(InputDeck);
511 vtkGetStringMacro(InputDeck);
525 int GetNumberOfPartArrays();
526 const char* GetPartArrayName(
int);
527 virtual void SetPartArrayStatus(
int arr,
int status );
528 virtual void SetPartArrayStatus(
const char* partName,
int status );
529 int GetPartArrayStatus(
int arr );
530 int GetPartArrayStatus(
const char* partName );
556 int TimeStepRange[2];
574 int ReadHeaderInformation(
int currentAdaptLevel );
585 int ScanDatabaseTimeSteps();
600 virtual int ReadTopology();
601 virtual int ReadNodes();
602 virtual int ReadPartSizes();
603 virtual int ReadConnectivityAndMaterial();
604 virtual int ReadUserIds();
606 virtual int ReadNodeStateInfo(
vtkIdType );
607 virtual int ReadCellStateInfo(
vtkIdType );
608 virtual int ReadDeletion();
616 virtual void ResetPartInfo();
622 virtual int ReadInputDeck();
629 virtual int ReadPartTitlesFromRootFile();
636 virtual int ReadUserMaterialIds();
643 int ReadInputDeckXML( ifstream& deck );
644 int ReadInputDeckKeywords( ifstream& deck );
651 int WriteInputDeckSummary(
const char* fname );
669 virtual void ReadCellProperties(
const int&
type,
const int& numTuples);
673 void ResetPartsCache();
680 const int& deathPos,
const int& cellSize);
682 template<
int wordSize,
typename T>
683 int FillTopology(T* buffer);
685 template<
typename T,
int blockType, vtkIdType numWordsPerCell, vtkIdType cellLength>
686 void ReadBlockCellSizes();
697 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
699 if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
701 this->SetPointArrayStatus( a, status );
705 vtkWarningMacro(
"Point array \"" << arrName <<
"\" does not exist" );
710 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
712 if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
714 return this->GetPointArrayStatus( a );
723 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
725 if ( strcmp( arrName, this->GetPointArrayName( a ) ) == 0 )
727 return this->GetNumberOfComponentsInPointArray( a );
736 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
738 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
740 this->SetCellArrayStatus( cellType, a, status );
744 vtkWarningMacro(
"Cell array \"" << arrName <<
"\" (type " << cellType <<
") does not exist" );
749 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
751 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
753 return this->GetCellArrayStatus( cellType, a );
762 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
764 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
766 return this->GetNumberOfComponentsInCellArray( cellType, a );
775 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
777 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
779 this->SetSolidArrayStatus( a, status );
783 vtkWarningMacro(
"Solid array \"" << arrName <<
"\" does not exist" );
788 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
790 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
792 return this->GetSolidArrayStatus( a );
801 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
803 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
805 return this->GetNumberOfComponentsInSolidArray( a );
814 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
816 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
818 this->SetThickShellArrayStatus( a, status );
822 vtkWarningMacro(
"Thick shell array \"" << arrName <<
"\" does not exist" );
827 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
829 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
831 return this->GetThickShellArrayStatus( a );
840 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
842 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
844 return this->GetNumberOfComponentsInThickShellArray( a );
853 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
855 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
857 this->SetShellArrayStatus( a, status );
861 vtkWarningMacro(
"Shell array \"" << arrName <<
"\" does not exist" );
866 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
868 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
870 return this->GetShellArrayStatus( a );
879 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
881 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
883 return this->GetNumberOfComponentsInShellArray( a );
892 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
894 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
896 this->SetBeamArrayStatus( a, status );
900 vtkWarningMacro(
"Beam array \"" << arrName <<
"\" does not exist" );
905 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
907 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
909 return this->GetBeamArrayStatus( a );
918 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
920 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
922 return this->GetNumberOfComponentsInBeamArray( a );
931 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
933 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
935 this->SetParticleArrayStatus( a, status );
939 vtkWarningMacro(
"Particle array \"" << arrName <<
"\" does not exist" );
944 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
946 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
948 return this->GetParticleArrayStatus( a );
957 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
959 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
961 return this->GetNumberOfComponentsInParticleArray( a );
970 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
972 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
974 this->SetRigidBodyArrayStatus( a, status );
978 vtkWarningMacro(
"Rigid body array \"" << arrName <<
"\" does not exist" );
983 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
985 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
987 return this->GetRigidBodyArrayStatus( a );
996 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
998 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
1000 return this->GetNumberOfComponentsInRigidBodyArray( a );
1009 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1011 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1013 this->SetRoadSurfaceArrayStatus( a, status );
1017 vtkWarningMacro(
"Road surface array \"" << arrName <<
"\" does not exist" );
1022 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1024 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1026 return this->GetRoadSurfaceArrayStatus( a );
1035 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1037 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1039 return this->GetNumberOfComponentsInRoadSurfaceArray( a );
1048 for (
int a=0; a<this->GetNumberOfPartArrays(); ++a )
1050 if ( strcmp( arrName, this->GetPartArrayName(a) ) == 0 )
1052 this->SetPartArrayStatus( a, status );
1056 vtkWarningMacro(
"Part \"" << arrName <<
"\" does not exist" );
1061 for (
int a=0; a<this->GetNumberOfPartArrays(); ++a )
1063 if ( strcmp( partName, this->GetPartArrayName(a) ) == 0 )
1065 return this->GetPartArrayStatus( a );
1072 #endif // vtkLSDynaReader_h virtual void SetThickShellArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
int GetShellArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
vtkLSDynaPartCollection * Parts
int GetThickShellArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
int GetNumberOfComponentsInBeamArray(int a)
int GetRoadSurfaceArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
Read LS-Dyna databases (d3plot)
vtkTypeBool DeformedMesh
Should deflected coordinates be used, or should the mesh remain undeflected? By default, this is true.
int GetNumberOfComponentsInCellArray(int cellType, int arr)
Routines that allow the status of a cell variable to be adjusted or queried independent of the output...
virtual void SetRigidBodyArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
int GetNumberOfComponentsInSolidArray(int a)
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual void SetSolidArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkTypeBool DeletedCellsAsGhostArray
Should cells marked as deleted be removed from the mesh? By default, this is true.
virtual void SetRoadSurfaceArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
static vtkMultiBlockDataSetAlgorithm * New()
int GetPointArrayStatus(int arr)
These methods allow you to load only selected subsets of the nodal variables defined over the mesh...
int GetRigidBodyArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
virtual void SetShellArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
int GetCellArrayStatus(int cellType, int arr)
Routines that allow the status of a cell variable to be adjusted or queried independent of the output...
a simple class to control print indentation
int GetSolidArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool RemoveDeletedCells
Should cells marked as deleted be removed from the mesh? By default, this is true.
dynamic, self-adjusting array of unsigned char
int GetNumberOfComponentsInShellArray(int a)
int GetNumberOfComponentsInRigidBodyArray(int a)
int GetPartArrayStatus(int arr)
These methods allow you to load only selected parts of the input.
int GetParticleArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
int GetNumberOfComponentsInThickShellArray(int a)
int GetBeamArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
virtual void SetBeamArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
virtual void SetCellArrayStatus(int cellType, int arr, int status)
Routines that allow the status of a cell variable to be adjusted or queried independent of the output...
char * InputDeck
The name of a file containing part names and IDs.
virtual void SetParticleArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh...
virtual void SetPartArrayStatus(int arr, int status)
These methods allow you to load only selected parts of the input.
virtual void SetPointArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the nodal variables defined over the mesh...
int GetNumberOfComponentsInRoadSurfaceArray(int a)
int GetNumberOfComponentsInParticleArray(int a)
represent and manipulate 3D points
int GetNumberOfComponentsInPointArray(int arr)
These methods allow you to load only selected subsets of the nodal variables defined over the mesh...
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.