152 #ifndef vtkLSDynaReader_h 153 #define vtkLSDynaReader_h 155 #include "vtkIOLSDynaModule.h" 177 void Dump(ostream& os);
188 virtual int CanReadFile(
const char* fname);
195 virtual void SetDatabaseDirectory(
const std::string&);
196 virtual void SetDatabaseDirectory(
const char*);
197 #ifdef VTK_LEGACY_REMOVE 200 VTK_LEGACY(
const char* GetDatabaseDirectory());
202 int IsDatabaseValid();
213 virtual void SetFileName(
const char*);
214 #ifdef VTK_LEGACY_REMOVE 233 int GetDimensionality();
323 vtkGetVector2Macro(TimeStepRange,
int);
324 vtkSetVector2Macro(TimeStepRange,
int);
332 int GetNumberOfPointArrays();
333 const char* GetPointArrayName(
int);
334 virtual void SetPointArrayStatus(
int arr,
int status);
335 virtual void SetPointArrayStatus(
const char* arrName,
int status);
336 int GetPointArrayStatus(
int arr);
337 int GetPointArrayStatus(
const char* arrName);
338 int GetNumberOfComponentsInPointArray(
int arr);
339 int GetNumberOfComponentsInPointArray(
const char* arrName);
349 int GetNumberOfCellArrays(
int cellType);
350 const char* GetCellArrayName(
int cellType,
int arr);
351 virtual void SetCellArrayStatus(
int cellType,
int arr,
int status);
352 virtual void SetCellArrayStatus(
int cellType,
const char* arrName,
int status);
353 int GetCellArrayStatus(
int cellType,
int arr);
354 int GetCellArrayStatus(
int cellType,
const char* arrName);
355 int GetNumberOfComponentsInCellArray(
int cellType,
int arr);
356 int GetNumberOfComponentsInCellArray(
int cellType,
const char* arrName);
364 int GetNumberOfSolidArrays();
365 const char* GetSolidArrayName(
int);
366 virtual void SetSolidArrayStatus(
int arr,
int status);
367 virtual void SetSolidArrayStatus(
const char* arrName,
int status);
368 int GetSolidArrayStatus(
int arr);
369 int GetSolidArrayStatus(
const char* arrName);
372 int GetNumberOfComponentsInSolidArray(
int a);
373 int GetNumberOfComponentsInSolidArray(
const char* arrName);
380 int GetNumberOfThickShellArrays();
381 const char* GetThickShellArrayName(
int);
382 virtual void SetThickShellArrayStatus(
int arr,
int status);
383 virtual void SetThickShellArrayStatus(
const char* arrName,
int status);
384 int GetThickShellArrayStatus(
int arr);
385 int GetThickShellArrayStatus(
const char* arrName);
388 int GetNumberOfComponentsInThickShellArray(
int a);
389 int GetNumberOfComponentsInThickShellArray(
const char* arrName);
396 int GetNumberOfShellArrays();
397 const char* GetShellArrayName(
int);
398 virtual void SetShellArrayStatus(
int arr,
int status);
399 virtual void SetShellArrayStatus(
const char* arrName,
int status);
400 int GetShellArrayStatus(
int arr);
401 int GetShellArrayStatus(
const char* arrName);
404 int GetNumberOfComponentsInShellArray(
int a);
405 int GetNumberOfComponentsInShellArray(
const char* arrName);
412 int GetNumberOfRigidBodyArrays();
413 const char* GetRigidBodyArrayName(
int);
414 virtual void SetRigidBodyArrayStatus(
int arr,
int status);
415 virtual void SetRigidBodyArrayStatus(
const char* arrName,
int status);
416 int GetRigidBodyArrayStatus(
int arr);
417 int GetRigidBodyArrayStatus(
const char* arrName);
420 int GetNumberOfComponentsInRigidBodyArray(
int a);
421 int GetNumberOfComponentsInRigidBodyArray(
const char* arrName);
428 int GetNumberOfRoadSurfaceArrays();
429 const char* GetRoadSurfaceArrayName(
int);
430 virtual void SetRoadSurfaceArrayStatus(
int arr,
int status);
431 virtual void SetRoadSurfaceArrayStatus(
const char* arrName,
int status);
432 int GetRoadSurfaceArrayStatus(
int arr);
433 int GetRoadSurfaceArrayStatus(
const char* arrName);
436 int GetNumberOfComponentsInRoadSurfaceArray(
int a);
437 int GetNumberOfComponentsInRoadSurfaceArray(
const char* arrName);
444 int GetNumberOfBeamArrays();
445 const char* GetBeamArrayName(
int);
446 virtual void SetBeamArrayStatus(
int arr,
int status);
447 virtual void SetBeamArrayStatus(
const char* arrName,
int status);
448 int GetBeamArrayStatus(
int arr);
449 int GetBeamArrayStatus(
const char* arrName);
452 int GetNumberOfComponentsInBeamArray(
int a);
453 int GetNumberOfComponentsInBeamArray(
const char* arrName);
460 int GetNumberOfParticleArrays();
461 const char* GetParticleArrayName(
int);
462 virtual void SetParticleArrayStatus(
int arr,
int status);
463 virtual void SetParticleArrayStatus(
const char* arrName,
int status);
464 int GetParticleArrayStatus(
int arr);
465 int GetParticleArrayStatus(
const char* arrName);
468 int GetNumberOfComponentsInParticleArray(
int a);
469 int GetNumberOfComponentsInParticleArray(
const char* arrName);
503 vtkSetMacro(DeletedCellsAsGhostArray,
vtkTypeBool);
504 vtkGetMacro(DeletedCellsAsGhostArray,
vtkTypeBool);
505 vtkBooleanMacro(DeletedCellsAsGhostArray,
vtkTypeBool);
520 vtkSetStringMacro(InputDeck);
521 vtkGetStringMacro(InputDeck);
535 int GetNumberOfPartArrays();
536 const char* GetPartArrayName(
int);
537 virtual void SetPartArrayStatus(
int arr,
int status);
538 virtual void SetPartArrayStatus(
const char* partName,
int status);
539 int GetPartArrayStatus(
int arr);
540 int GetPartArrayStatus(
const char* partName);
566 int TimeStepRange[2];
584 int ReadHeaderInformation(
int currentAdaptLevel);
595 int ScanDatabaseTimeSteps();
610 virtual int ReadTopology();
611 virtual int ReadNodes();
612 virtual int ReadPartSizes();
613 virtual int ReadConnectivityAndMaterial();
614 virtual int ReadUserIds();
616 virtual int ReadNodeStateInfo(
vtkIdType);
617 virtual int ReadCellStateInfo(
vtkIdType);
618 virtual int ReadDeletion();
626 virtual void ResetPartInfo();
632 virtual int ReadInputDeck();
639 virtual int ReadPartTitlesFromRootFile();
646 virtual int ReadUserMaterialIds();
653 int ReadInputDeckXML(istream& deck);
654 int ReadInputDeckKeywords(istream& deck);
661 int WriteInputDeckSummary(
const char* fname);
679 virtual void ReadCellProperties(
const int&
type,
const int& numTuples);
683 void ResetPartsCache();
688 template <
typename T>
690 const vtkIdType& numCells,
const int& deathPos,
const int& cellSize);
692 template <
int wordSize,
typename T>
693 int FillTopology(T* buffer);
695 template <
typename T,
int blockType, vtkIdType numWordsPerCell, vtkIdType cellLength>
696 void ReadBlockCellSizes();
698 template <
typename T>
707 for (
int a = 0; a < this->GetNumberOfPointArrays(); ++a)
709 if (strcmp(arrName, this->GetPointArrayName(a)) == 0)
711 this->SetPointArrayStatus(a, status);
715 vtkWarningMacro(
"Point array \"" << arrName <<
"\" does not exist");
720 for (
int a = 0; a < this->GetNumberOfPointArrays(); ++a)
722 if (strcmp(arrName, this->GetPointArrayName(a)) == 0)
724 return this->GetPointArrayStatus(a);
733 for (
int a = 0; a < this->GetNumberOfPointArrays(); ++a)
735 if (strcmp(arrName, this->GetPointArrayName(a)) == 0)
737 return this->GetNumberOfComponentsInPointArray(a);
746 for (
int a = 0; a < this->GetNumberOfCellArrays(cellType); ++a)
748 if (strcmp(arrName, this->GetCellArrayName(cellType, a)) == 0)
750 this->SetCellArrayStatus(cellType, a, status);
754 vtkWarningMacro(
"Cell array \"" << arrName <<
"\" (type " << cellType <<
") does not exist");
759 for (
int a = 0; a < this->GetNumberOfCellArrays(cellType); ++a)
761 if (strcmp(arrName, this->GetCellArrayName(cellType, a)) == 0)
763 return this->GetCellArrayStatus(cellType, a);
772 for (
int a = 0; a < this->GetNumberOfCellArrays(cellType); ++a)
774 if (strcmp(arrName, this->GetCellArrayName(cellType, a)) == 0)
776 return this->GetNumberOfComponentsInCellArray(cellType, a);
785 for (
int a = 0; a < this->GetNumberOfSolidArrays(); ++a)
787 if (strcmp(arrName, this->GetSolidArrayName(a)) == 0)
789 this->SetSolidArrayStatus(a, status);
793 vtkWarningMacro(
"Solid array \"" << arrName <<
"\" does not exist");
798 for (
int a = 0; a < this->GetNumberOfSolidArrays(); ++a)
800 if (strcmp(arrName, this->GetSolidArrayName(a)) == 0)
802 return this->GetSolidArrayStatus(a);
811 for (
int a = 0; a < this->GetNumberOfSolidArrays(); ++a)
813 if (strcmp(arrName, this->GetSolidArrayName(a)) == 0)
815 return this->GetNumberOfComponentsInSolidArray(a);
824 for (
int a = 0; a < this->GetNumberOfThickShellArrays(); ++a)
826 if (strcmp(arrName, this->GetThickShellArrayName(a)) == 0)
828 this->SetThickShellArrayStatus(a, status);
832 vtkWarningMacro(
"Thick shell array \"" << arrName <<
"\" does not exist");
837 for (
int a = 0; a < this->GetNumberOfThickShellArrays(); ++a)
839 if (strcmp(arrName, this->GetThickShellArrayName(a)) == 0)
841 return this->GetThickShellArrayStatus(a);
850 for (
int a = 0; a < this->GetNumberOfThickShellArrays(); ++a)
852 if (strcmp(arrName, this->GetThickShellArrayName(a)) == 0)
854 return this->GetNumberOfComponentsInThickShellArray(a);
863 for (
int a = 0; a < this->GetNumberOfShellArrays(); ++a)
865 if (strcmp(arrName, this->GetShellArrayName(a)) == 0)
867 this->SetShellArrayStatus(a, status);
871 vtkWarningMacro(
"Shell array \"" << arrName <<
"\" does not exist");
876 for (
int a = 0; a < this->GetNumberOfShellArrays(); ++a)
878 if (strcmp(arrName, this->GetShellArrayName(a)) == 0)
880 return this->GetShellArrayStatus(a);
889 for (
int a = 0; a < this->GetNumberOfShellArrays(); ++a)
891 if (strcmp(arrName, this->GetShellArrayName(a)) == 0)
893 return this->GetNumberOfComponentsInShellArray(a);
902 for (
int a = 0; a < this->GetNumberOfBeamArrays(); ++a)
904 if (strcmp(arrName, this->GetBeamArrayName(a)) == 0)
906 this->SetBeamArrayStatus(a, status);
910 vtkWarningMacro(
"Beam array \"" << arrName <<
"\" does not exist");
915 for (
int a = 0; a < this->GetNumberOfBeamArrays(); ++a)
917 if (strcmp(arrName, this->GetBeamArrayName(a)) == 0)
919 return this->GetBeamArrayStatus(a);
928 for (
int a = 0; a < this->GetNumberOfBeamArrays(); ++a)
930 if (strcmp(arrName, this->GetBeamArrayName(a)) == 0)
932 return this->GetNumberOfComponentsInBeamArray(a);
941 for (
int a = 0; a < this->GetNumberOfParticleArrays(); ++a)
943 if (strcmp(arrName, this->GetParticleArrayName(a)) == 0)
945 this->SetParticleArrayStatus(a, status);
949 vtkWarningMacro(
"Particle array \"" << arrName <<
"\" does not exist");
954 for (
int a = 0; a < this->GetNumberOfParticleArrays(); ++a)
956 if (strcmp(arrName, this->GetParticleArrayName(a)) == 0)
958 return this->GetParticleArrayStatus(a);
967 for (
int a = 0; a < this->GetNumberOfParticleArrays(); ++a)
969 if (strcmp(arrName, this->GetParticleArrayName(a)) == 0)
971 return this->GetNumberOfComponentsInParticleArray(a);
980 for (
int a = 0; a < this->GetNumberOfRigidBodyArrays(); ++a)
982 if (strcmp(arrName, this->GetRigidBodyArrayName(a)) == 0)
984 this->SetRigidBodyArrayStatus(a, status);
988 vtkWarningMacro(
"Rigid body array \"" << arrName <<
"\" does not exist");
993 for (
int a = 0; a < this->GetNumberOfRigidBodyArrays(); ++a)
995 if (strcmp(arrName, this->GetRigidBodyArrayName(a)) == 0)
997 return this->GetRigidBodyArrayStatus(a);
1006 for (
int a = 0; a < this->GetNumberOfRigidBodyArrays(); ++a)
1008 if (strcmp(arrName, this->GetRigidBodyArrayName(a)) == 0)
1010 return this->GetNumberOfComponentsInRigidBodyArray(a);
1019 for (
int a = 0; a < this->GetNumberOfRoadSurfaceArrays(); ++a)
1021 if (strcmp(arrName, this->GetRoadSurfaceArrayName(a)) == 0)
1023 this->SetRoadSurfaceArrayStatus(a, status);
1027 vtkWarningMacro(
"Road surface array \"" << arrName <<
"\" does not exist");
1032 for (
int a = 0; a < this->GetNumberOfRoadSurfaceArrays(); ++a)
1034 if (strcmp(arrName, this->GetRoadSurfaceArrayName(a)) == 0)
1036 return this->GetRoadSurfaceArrayStatus(a);
1045 for (
int a = 0; a < this->GetNumberOfRoadSurfaceArrays(); ++a)
1047 if (strcmp(arrName, this->GetRoadSurfaceArrayName(a)) == 0)
1049 return this->GetNumberOfComponentsInRoadSurfaceArray(a);
1058 for (
int a = 0; a < this->GetNumberOfPartArrays(); ++a)
1060 if (strcmp(arrName, this->GetPartArrayName(a)) == 0)
1062 this->SetPartArrayStatus(a, status);
1066 vtkWarningMacro(
"Part \"" << arrName <<
"\" does not exist");
1071 for (
int a = 0; a < this->GetNumberOfPartArrays(); ++a)
1073 if (strcmp(partName, this->GetPartArrayName(a)) == 0)
1075 return this->GetPartArrayStatus(a);
1082 #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
std::string GetFileName(const std::string &fileName) noexcept
Set the appropriate file name based on recognized user input.
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.