151 #ifndef vtkLSDynaReader_h
152 #define vtkLSDynaReader_h
154 #include "vtkIOLSDynaModule.h"
175 void Dump( ostream &os );
186 virtual int CanReadFile(
const char* fname );
193 virtual void SetDatabaseDirectory(
const char* );
194 const char* GetDatabaseDirectory();
195 int IsDatabaseValid();
205 virtual void SetFileName(
const char* );
206 const char* GetFileName();
221 int GetDimensionality();
310 vtkGetVector2Macro(TimeStepRange,
int);
311 vtkSetVector2Macro(TimeStepRange,
int);
319 int GetNumberOfPointArrays();
320 const char* GetPointArrayName(
int);
321 virtual void SetPointArrayStatus(
int arr,
int status );
322 virtual void SetPointArrayStatus(
const char* arrName,
int status );
323 int GetPointArrayStatus(
int arr );
324 int GetPointArrayStatus(
const char* arrName );
325 int GetNumberOfComponentsInPointArray(
int arr );
326 int GetNumberOfComponentsInPointArray(
const char* arrName );
336 int GetNumberOfCellArrays(
int cellType );
337 const char* GetCellArrayName(
int cellType,
int arr );
338 virtual void SetCellArrayStatus(
int cellType,
int arr,
int status );
339 virtual void SetCellArrayStatus(
int cellType,
const char* arrName,
int status );
340 int GetCellArrayStatus(
int cellType,
int arr );
341 int GetCellArrayStatus(
int cellType,
const char* arrName );
342 int GetNumberOfComponentsInCellArray(
int cellType,
int arr );
343 int GetNumberOfComponentsInCellArray(
int cellType,
const char* arrName );
351 int GetNumberOfSolidArrays();
352 const char* GetSolidArrayName(
int);
353 virtual void SetSolidArrayStatus(
int arr,
int status );
354 virtual void SetSolidArrayStatus(
const char* arrName,
int status );
355 int GetSolidArrayStatus(
int arr );
356 int GetSolidArrayStatus(
const char* arrName );
359 int GetNumberOfComponentsInSolidArray(
int a );
360 int GetNumberOfComponentsInSolidArray(
const char* arrName );
367 int GetNumberOfThickShellArrays();
368 const char* GetThickShellArrayName(
int);
369 virtual void SetThickShellArrayStatus(
int arr,
int status );
370 virtual void SetThickShellArrayStatus(
const char* arrName,
int status );
371 int GetThickShellArrayStatus(
int arr );
372 int GetThickShellArrayStatus(
const char* arrName );
375 int GetNumberOfComponentsInThickShellArray(
int a );
376 int GetNumberOfComponentsInThickShellArray(
const char* arrName );
383 int GetNumberOfShellArrays();
384 const char* GetShellArrayName(
int);
385 virtual void SetShellArrayStatus(
int arr,
int status );
386 virtual void SetShellArrayStatus(
const char* arrName,
int status );
387 int GetShellArrayStatus(
int arr );
388 int GetShellArrayStatus(
const char* arrName );
391 int GetNumberOfComponentsInShellArray(
int a );
392 int GetNumberOfComponentsInShellArray(
const char* arrName );
399 int GetNumberOfRigidBodyArrays();
400 const char* GetRigidBodyArrayName(
int);
401 virtual void SetRigidBodyArrayStatus(
int arr,
int status );
402 virtual void SetRigidBodyArrayStatus(
const char* arrName,
int status );
403 int GetRigidBodyArrayStatus(
int arr );
404 int GetRigidBodyArrayStatus(
const char* arrName );
407 int GetNumberOfComponentsInRigidBodyArray(
int a );
408 int GetNumberOfComponentsInRigidBodyArray(
const char* arrName );
415 int GetNumberOfRoadSurfaceArrays();
416 const char* GetRoadSurfaceArrayName(
int);
417 virtual void SetRoadSurfaceArrayStatus(
int arr,
int status );
418 virtual void SetRoadSurfaceArrayStatus(
const char* arrName,
int status );
419 int GetRoadSurfaceArrayStatus(
int arr );
420 int GetRoadSurfaceArrayStatus(
const char* arrName );
423 int GetNumberOfComponentsInRoadSurfaceArray(
int a );
424 int GetNumberOfComponentsInRoadSurfaceArray(
const char* arrName );
431 int GetNumberOfBeamArrays();
432 const char* GetBeamArrayName(
int);
433 virtual void SetBeamArrayStatus(
int arr,
int status );
434 virtual void SetBeamArrayStatus(
const char* arrName,
int status );
435 int GetBeamArrayStatus(
int arr );
436 int GetBeamArrayStatus(
const char* arrName );
439 int GetNumberOfComponentsInBeamArray(
int a );
440 int GetNumberOfComponentsInBeamArray(
const char* arrName );
447 int GetNumberOfParticleArrays();
448 const char* GetParticleArrayName(
int);
449 virtual void SetParticleArrayStatus(
int arr,
int status );
450 virtual void SetParticleArrayStatus(
const char* arrName,
int status );
451 int GetParticleArrayStatus(
int arr );
452 int GetParticleArrayStatus(
const char* arrName );
455 int GetNumberOfComponentsInParticleArray(
int a );
456 int GetNumberOfComponentsInParticleArray(
const char* arrName );
464 void SetDeformedMesh(
int);
465 vtkGetMacro(DeformedMesh,
int);
481 vtkGetMacro(RemoveDeletedCells,
int);
491 vtkGetMacro(DeletedCellsAsGhostArray,
int);
507 vtkSetStringMacro(InputDeck);
522 int GetNumberOfPartArrays();
523 const char* GetPartArrayName(
int);
524 virtual void SetPartArrayStatus(
int arr,
int status );
525 virtual void SetPartArrayStatus(
const char* partName,
int status );
526 int GetPartArrayStatus(
int arr );
527 int GetPartArrayStatus(
const char* partName );
553 int TimeStepRange[2];
571 int ReadHeaderInformation(
int currentAdaptLevel );
582 int ScanDatabaseTimeSteps();
585 int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* ) VTK_OVERRIDE;
597 virtual
int ReadTopology();
598 virtual
int ReadNodes();
599 virtual
int ReadPartSizes();
600 virtual
int ReadConnectivityAndMaterial();
601 virtual
int ReadUserIds();
603 virtual
int ReadNodeStateInfo( vtkIdType );
604 virtual
int ReadCellStateInfo( vtkIdType );
605 virtual
int ReadDeletion();
606 virtual
int ReadSPHState( vtkIdType );
612 virtual
void ResetPartInfo();
618 virtual
int ReadInputDeck();
625 virtual
int ReadPartTitlesFromRootFile();
632 virtual
int ReadUserMaterialIds();
639 int ReadInputDeckXML( ifstream& deck );
640 int ReadInputDeckKeywords( ifstream& deck );
647 int WriteInputDeckSummary( const
char* fname );
665 virtual
void ReadCellProperties(const
int&
type,const
int& numTuples);
669 void ResetPartsCache();
675 void FillDeletionArray(T* buffer,
vtkUnsignedCharArray* arr, const vtkIdType& start, const vtkIdType& numCells,
676 const
int& deathPos, const
int& cellSize);
678 template<
int wordSize, typename T>
679 int FillTopology(T* buffer);
681 template<typename T,
int blockType, vtkIdType numWordsPerCell, vtkIdType cellLength>
682 void ReadBlockCellSizes();
693 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
695 if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
697 this->SetPointArrayStatus( a, status );
701 vtkWarningMacro(
"Point array \"" << arrName <<
"\" does not exist" );
706 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
708 if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
710 return this->GetPointArrayStatus( a );
719 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
721 if ( strcmp( arrName, this->GetPointArrayName( a ) ) == 0 )
723 return this->GetNumberOfComponentsInPointArray( a );
732 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
734 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
736 this->SetCellArrayStatus( cellType, a, status );
740 vtkWarningMacro(
"Cell array \"" << arrName <<
"\" (type " << cellType <<
") does not exist" );
745 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
747 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
749 return this->GetCellArrayStatus( cellType, a );
758 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
760 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
762 return this->GetNumberOfComponentsInCellArray( cellType, a );
771 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
773 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
775 this->SetSolidArrayStatus( a, status );
779 vtkWarningMacro(
"Solid array \"" << arrName <<
"\" does not exist" );
784 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
786 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
788 return this->GetSolidArrayStatus( a );
797 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
799 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
801 return this->GetNumberOfComponentsInSolidArray( a );
810 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
812 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
814 this->SetThickShellArrayStatus( a, status );
818 vtkWarningMacro(
"Thick shell array \"" << arrName <<
"\" does not exist" );
823 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
825 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
827 return this->GetThickShellArrayStatus( a );
836 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
838 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
840 return this->GetNumberOfComponentsInThickShellArray( a );
849 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
851 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
853 this->SetShellArrayStatus( a, status );
857 vtkWarningMacro(
"Shell array \"" << arrName <<
"\" does not exist" );
862 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
864 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
866 return this->GetShellArrayStatus( a );
875 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
877 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
879 return this->GetNumberOfComponentsInShellArray( a );
888 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
890 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
892 this->SetBeamArrayStatus( a, status );
896 vtkWarningMacro(
"Beam array \"" << arrName <<
"\" does not exist" );
901 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
903 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
905 return this->GetBeamArrayStatus( a );
914 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
916 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
918 return this->GetNumberOfComponentsInBeamArray( a );
927 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
929 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
931 this->SetParticleArrayStatus( a, status );
935 vtkWarningMacro(
"Particle array \"" << arrName <<
"\" does not exist" );
940 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
942 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
944 return this->GetParticleArrayStatus( a );
953 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
955 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
957 return this->GetNumberOfComponentsInParticleArray( a );
966 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
968 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
970 this->SetRigidBodyArrayStatus( a, status );
974 vtkWarningMacro(
"Rigid body array \"" << arrName <<
"\" does not exist" );
979 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
981 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
983 return this->GetRigidBodyArrayStatus( a );
992 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
994 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
996 return this->GetNumberOfComponentsInRigidBodyArray( a );
1005 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1007 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1009 this->SetRoadSurfaceArrayStatus( a, status );
1013 vtkWarningMacro(
"Road surface array \"" << arrName <<
"\" does not exist" );
1018 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1020 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1022 return this->GetRoadSurfaceArrayStatus( a );
1031 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1033 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1035 return this->GetNumberOfComponentsInRoadSurfaceArray( a );
1044 for (
int a=0; a<this->GetNumberOfPartArrays(); ++a )
1046 if ( strcmp( arrName, this->GetPartArrayName(a) ) == 0 )
1048 this->SetPartArrayStatus( a, status );
1052 vtkWarningMacro(
"Part \"" << arrName <<
"\" does not exist" );
1057 for (
int a=0; a<this->GetNumberOfPartArrays(); ++a )
1059 if ( strcmp( partName, this->GetPartArrayName(a) ) == 0 )
1061 return this->GetPartArrayStatus( a );
1068 #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)
int DeletedCellsAsGhostArray
Should cells marked as deleted be removed from the mesh? 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 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
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int DeformedMesh
Should deflected coordinates be used, or should the mesh remain undeflected? By default, this is true.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
int GetNumberOfComponentsInShellArray(int a)
int RemoveDeletedCells
Should cells marked as deleted be removed from the mesh? By default, this is true.
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...
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.
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...