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 );
467 void SetDeformedMesh(
int);
468 vtkGetMacro(DeformedMesh,
int);
484 vtkGetMacro(RemoveDeletedCells,
int);
494 vtkGetMacro(DeletedCellsAsGhostArray,
int);
510 vtkSetStringMacro(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();
615 virtual void ResetPartInfo();
621 virtual int ReadInputDeck();
628 virtual int ReadPartTitlesFromRootFile();
635 virtual int ReadUserMaterialIds();
642 int ReadInputDeckXML( ifstream& deck );
643 int ReadInputDeckKeywords( ifstream& deck );
650 int WriteInputDeckSummary(
const char* fname );
668 virtual void ReadCellProperties(
const int&
type,
const int& numTuples);
672 void ResetPartsCache();
679 const int& deathPos,
const int& cellSize);
681 template<
int wordSize,
typename T>
682 int FillTopology(T* buffer);
684 template<
typename T,
int blockType, vtkIdType numWordsPerCell, vtkIdType cellLength>
685 void ReadBlockCellSizes();
696 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
698 if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
700 this->SetPointArrayStatus( a, status );
704 vtkWarningMacro(
"Point array \"" << arrName <<
"\" does not exist" );
709 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
711 if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
713 return this->GetPointArrayStatus( a );
722 for (
int a=0; a<this->GetNumberOfPointArrays(); ++a )
724 if ( strcmp( arrName, this->GetPointArrayName( a ) ) == 0 )
726 return this->GetNumberOfComponentsInPointArray( a );
735 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
737 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
739 this->SetCellArrayStatus( cellType, a, status );
743 vtkWarningMacro(
"Cell array \"" << arrName <<
"\" (type " << cellType <<
") does not exist" );
748 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
750 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
752 return this->GetCellArrayStatus( cellType, a );
761 for (
int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
763 if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
765 return this->GetNumberOfComponentsInCellArray( cellType, a );
774 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
776 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
778 this->SetSolidArrayStatus( a, status );
782 vtkWarningMacro(
"Solid array \"" << arrName <<
"\" does not exist" );
787 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
789 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
791 return this->GetSolidArrayStatus( a );
800 for (
int a=0; a<this->GetNumberOfSolidArrays(); ++a )
802 if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
804 return this->GetNumberOfComponentsInSolidArray( a );
813 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
815 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
817 this->SetThickShellArrayStatus( a, status );
821 vtkWarningMacro(
"Thick shell array \"" << arrName <<
"\" does not exist" );
826 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
828 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
830 return this->GetThickShellArrayStatus( a );
839 for (
int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
841 if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
843 return this->GetNumberOfComponentsInThickShellArray( a );
852 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
854 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
856 this->SetShellArrayStatus( a, status );
860 vtkWarningMacro(
"Shell array \"" << arrName <<
"\" does not exist" );
865 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
867 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
869 return this->GetShellArrayStatus( a );
878 for (
int a=0; a<this->GetNumberOfShellArrays(); ++a )
880 if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
882 return this->GetNumberOfComponentsInShellArray( a );
891 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
893 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
895 this->SetBeamArrayStatus( a, status );
899 vtkWarningMacro(
"Beam array \"" << arrName <<
"\" does not exist" );
904 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
906 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
908 return this->GetBeamArrayStatus( a );
917 for (
int a=0; a<this->GetNumberOfBeamArrays(); ++a )
919 if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
921 return this->GetNumberOfComponentsInBeamArray( a );
930 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
932 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
934 this->SetParticleArrayStatus( a, status );
938 vtkWarningMacro(
"Particle array \"" << arrName <<
"\" does not exist" );
943 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
945 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
947 return this->GetParticleArrayStatus( a );
956 for (
int a=0; a<this->GetNumberOfParticleArrays(); ++a )
958 if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
960 return this->GetNumberOfComponentsInParticleArray( a );
969 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
971 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
973 this->SetRigidBodyArrayStatus( a, status );
977 vtkWarningMacro(
"Rigid body array \"" << arrName <<
"\" does not exist" );
982 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
984 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
986 return this->GetRigidBodyArrayStatus( a );
995 for (
int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
997 if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
999 return this->GetNumberOfComponentsInRigidBodyArray( a );
1008 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1010 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1012 this->SetRoadSurfaceArrayStatus( a, status );
1016 vtkWarningMacro(
"Road surface array \"" << arrName <<
"\" does not exist" );
1021 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1023 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1025 return this->GetRoadSurfaceArrayStatus( a );
1034 for (
int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
1036 if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
1038 return this->GetNumberOfComponentsInRoadSurfaceArray( a );
1047 for (
int a=0; a<this->GetNumberOfPartArrays(); ++a )
1049 if ( strcmp( arrName, this->GetPartArrayName(a) ) == 0 )
1051 this->SetPartArrayStatus( a, status );
1055 vtkWarningMacro(
"Part \"" << arrName <<
"\" does not exist" );
1060 for (
int a=0; a<this->GetNumberOfPartArrays(); ++a )
1062 if ( strcmp( partName, this->GetPartArrayName(a) ) == 0 )
1064 return this->GetPartArrayStatus( a );
1071 #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 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
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
CellTypeInDataSet cellType(vtkDataSet *input)
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...
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.