VTK  9.1.0
vtkLSDynaReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLSDynaReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
152 #ifndef vtkLSDynaReader_h
153 #define vtkLSDynaReader_h
154 
155 #include "vtkIOLSDynaModule.h" // For export macro
156 #include "vtkLegacy.h" // For VTK_LEGACY_REMOVE
158 #include <string> // for method signature
159 
160 class LSDynaMetaData;
162 class vtkPoints;
163 class vtkDataArray;
165 class vtkUnstructuredGrid;
166 
167 class VTKIOLSDYNA_EXPORT vtkLSDynaReader : public vtkMultiBlockDataSetAlgorithm
168 {
169 public:
171  void PrintSelf(ostream& os, vtkIndent indent) override;
172  static vtkLSDynaReader* New();
173 
178  void Dump(ostream& os);
179 
184  void DebugDump();
185 
189  virtual int CanReadFile(VTK_FILEPATH const char* fname);
190 
192 
197  virtual void SetDatabaseDirectory(VTK_FILEPATH const char*);
198 #ifdef VTK_LEGACY_REMOVE
199  VTK_FILEPATH std::string GetDatabaseDirectory();
200 #else
201  VTK_LEGACY(VTK_FILEPATH const char* GetDatabaseDirectory());
202 #endif
205 
207 
213  virtual void SetFileName(VTK_FILEPATH const std::string&);
214  virtual void SetFileName(VTK_FILEPATH const char*);
215 #ifdef VTK_LEGACY_REMOVE
217 #else
218  VTK_LEGACY(VTK_FILEPATH const char* GetFileName());
219 #endif
221 
227  char* GetTitle();
228 
235 
242 
252 
264 
271 
278 
285 
292 
299 
306 
313 
315 
321  virtual void SetTimeStep(vtkIdType);
324  vtkGetVector2Macro(TimeStepRange, int);
325  vtkSetVector2Macro(TimeStepRange, int);
327 
329 
334  const char* GetPointArrayName(int);
335  virtual void SetPointArrayStatus(int arr, int status);
336  virtual void SetPointArrayStatus(const char* arrName, int status);
337  int GetPointArrayStatus(int arr);
338  int GetPointArrayStatus(const char* arrName);
340  int GetNumberOfComponentsInPointArray(const char* arrName);
342 
344 
350  int GetNumberOfCellArrays(int cellType);
351  const char* GetCellArrayName(int cellType, int arr);
352  virtual void SetCellArrayStatus(int cellType, int arr, int status);
353  virtual void SetCellArrayStatus(int cellType, const char* arrName, int status);
354  int GetCellArrayStatus(int cellType, int arr);
355  int GetCellArrayStatus(int cellType, const char* arrName);
356  int GetNumberOfComponentsInCellArray(int cellType, int arr);
357  int GetNumberOfComponentsInCellArray(int cellType, const char* arrName);
359 
361 
366  const char* GetSolidArrayName(int);
367  virtual void SetSolidArrayStatus(int arr, int status);
368  virtual void SetSolidArrayStatus(const char* arrName, int status);
369  int GetSolidArrayStatus(int arr);
370  int GetSolidArrayStatus(const char* arrName);
372 
374  int GetNumberOfComponentsInSolidArray(const char* arrName);
375 
377 
382  const char* GetThickShellArrayName(int);
383  virtual void SetThickShellArrayStatus(int arr, int status);
384  virtual void SetThickShellArrayStatus(const char* arrName, int status);
386  int GetThickShellArrayStatus(const char* arrName);
388 
390  int GetNumberOfComponentsInThickShellArray(const char* arrName);
391 
393 
398  const char* GetShellArrayName(int);
399  virtual void SetShellArrayStatus(int arr, int status);
400  virtual void SetShellArrayStatus(const char* arrName, int status);
401  int GetShellArrayStatus(int arr);
402  int GetShellArrayStatus(const char* arrName);
404 
406  int GetNumberOfComponentsInShellArray(const char* arrName);
407 
409 
414  const char* GetRigidBodyArrayName(int);
415  virtual void SetRigidBodyArrayStatus(int arr, int status);
416  virtual void SetRigidBodyArrayStatus(const char* arrName, int status);
418  int GetRigidBodyArrayStatus(const char* arrName);
420 
422  int GetNumberOfComponentsInRigidBodyArray(const char* arrName);
423 
425 
430  const char* GetRoadSurfaceArrayName(int);
431  virtual void SetRoadSurfaceArrayStatus(int arr, int status);
432  virtual void SetRoadSurfaceArrayStatus(const char* arrName, int status);
434  int GetRoadSurfaceArrayStatus(const char* arrName);
436 
438  int GetNumberOfComponentsInRoadSurfaceArray(const char* arrName);
439 
441 
446  const char* GetBeamArrayName(int);
447  virtual void SetBeamArrayStatus(int arr, int status);
448  virtual void SetBeamArrayStatus(const char* arrName, int status);
449  int GetBeamArrayStatus(int arr);
450  int GetBeamArrayStatus(const char* arrName);
452 
454  int GetNumberOfComponentsInBeamArray(const char* arrName);
455 
457 
462  const char* GetParticleArrayName(int);
463  virtual void SetParticleArrayStatus(int arr, int status);
464  virtual void SetParticleArrayStatus(const char* arrName, int status);
466  int GetParticleArrayStatus(const char* arrName);
468 
470  int GetNumberOfComponentsInParticleArray(const char* arrName);
471 
473 
479  vtkGetMacro(DeformedMesh, vtkTypeBool);
480  vtkBooleanMacro(DeformedMesh, vtkTypeBool);
482 
484 
494  vtkSetMacro(RemoveDeletedCells, vtkTypeBool);
495  vtkGetMacro(RemoveDeletedCells, vtkTypeBool);
496  vtkBooleanMacro(RemoveDeletedCells, vtkTypeBool);
498 
500 
504  vtkSetMacro(DeletedCellsAsGhostArray, vtkTypeBool);
505  vtkGetMacro(DeletedCellsAsGhostArray, vtkTypeBool);
506  vtkBooleanMacro(DeletedCellsAsGhostArray, vtkTypeBool);
508 
510 
521  vtkSetStringMacro(InputDeck);
522  vtkGetStringMacro(InputDeck);
524 
526 
537  const char* GetPartArrayName(int);
538  virtual void SetPartArrayStatus(int arr, int status);
539  virtual void SetPartArrayStatus(const char* partName, int status);
540  int GetPartArrayStatus(int arr);
541  int GetPartArrayStatus(const char* partName);
543 
544 protected:
545  // holds all the parts and all the properties for each part
547 
553 
555 
562 
567  int TimeStepRange[2];
568 
572  char* InputDeck;
573 
575  ~vtkLSDynaReader() override;
576 
585  int ReadHeaderInformation(int currentAdaptLevel);
586 
597 
600 
602 
611  virtual int ReadTopology();
612  virtual int ReadNodes();
613  virtual int ReadPartSizes();
615  virtual int ReadUserIds();
616  virtual int ReadState(vtkIdType);
619  virtual int ReadDeletion();
620  virtual int ReadSPHState(vtkIdType);
623 
627  virtual void ResetPartInfo();
628 
633  virtual int ReadInputDeck();
634 
641 
647  virtual int ReadUserMaterialIds();
648 
650 
654  int ReadInputDeckXML(istream& deck);
655  int ReadInputDeckKeywords(istream& deck);
657 
662  int WriteInputDeckSummary(const char* fname);
663 
675  virtual void ReadDeletionArray(vtkUnsignedCharArray* arr, const int& pos, const int& size);
676 
680  virtual void ReadCellProperties(const int& type, const int& numTuples);
681 
683 
685 
686 private:
687  // Helper templated methods to optimize reading. We cast the entire buffer
688  // to a given type instead of casting each element to improve performance
689  template <typename T>
690  void FillDeletionArray(T* buffer, vtkUnsignedCharArray* arr, const vtkIdType& start,
691  const vtkIdType& numCells, const int& deathPos, const int& cellSize);
692 
693  template <int wordSize, typename T>
694  int FillTopology(T* buffer);
695 
696  template <typename T, int blockType, vtkIdType numWordsPerCell, vtkIdType cellLength>
697  void ReadBlockCellSizes();
698 
699  template <typename T>
700  int FillPartSizes();
701 
702  vtkLSDynaReader(const vtkLSDynaReader&) = delete;
703  void operator=(const vtkLSDynaReader&) = delete;
704 };
705 
706 inline void vtkLSDynaReader::SetPointArrayStatus(const char* arrName, int status)
707 {
708  for (int a = 0; a < this->GetNumberOfPointArrays(); ++a)
709  {
710  if (strcmp(arrName, this->GetPointArrayName(a)) == 0)
711  {
712  this->SetPointArrayStatus(a, status);
713  return;
714  }
715  }
716  vtkWarningMacro("Point array \"" << arrName << "\" does not exist");
717 }
718 
719 inline int vtkLSDynaReader::GetPointArrayStatus(const char* arrName)
720 {
721  for (int a = 0; a < this->GetNumberOfPointArrays(); ++a)
722  {
723  if (strcmp(arrName, this->GetPointArrayName(a)) == 0)
724  {
725  return this->GetPointArrayStatus(a);
726  }
727  }
728  // vtkWarningMacro( "Point array \"" << arrName << "\" does not exist" );
729  return 0;
730 }
731 
733 {
734  for (int a = 0; a < this->GetNumberOfPointArrays(); ++a)
735  {
736  if (strcmp(arrName, this->GetPointArrayName(a)) == 0)
737  {
738  return this->GetNumberOfComponentsInPointArray(a);
739  }
740  }
741  // vtkWarningMacro( "Point array \"" << arrName << "\" does not exist" );
742  return 0;
743 }
744 
745 inline void vtkLSDynaReader::SetCellArrayStatus(int cellType, const char* arrName, int status)
746 {
747  for (int a = 0; a < this->GetNumberOfCellArrays(cellType); ++a)
748  {
749  if (strcmp(arrName, this->GetCellArrayName(cellType, a)) == 0)
750  {
751  this->SetCellArrayStatus(cellType, a, status);
752  return;
753  }
754  }
755  vtkWarningMacro("Cell array \"" << arrName << "\" (type " << cellType << ") does not exist");
756 }
757 
758 inline int vtkLSDynaReader::GetCellArrayStatus(int cellType, const char* arrName)
759 {
760  for (int a = 0; a < this->GetNumberOfCellArrays(cellType); ++a)
761  {
762  if (strcmp(arrName, this->GetCellArrayName(cellType, a)) == 0)
763  {
764  return this->GetCellArrayStatus(cellType, a);
765  }
766  }
767  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
768  return 0;
769 }
770 
771 inline int vtkLSDynaReader::GetNumberOfComponentsInCellArray(int cellType, const char* arrName)
772 {
773  for (int a = 0; a < this->GetNumberOfCellArrays(cellType); ++a)
774  {
775  if (strcmp(arrName, this->GetCellArrayName(cellType, a)) == 0)
776  {
777  return this->GetNumberOfComponentsInCellArray(cellType, a);
778  }
779  }
780  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
781  return 0;
782 }
783 
784 inline void vtkLSDynaReader::SetSolidArrayStatus(const char* arrName, int status)
785 {
786  for (int a = 0; a < this->GetNumberOfSolidArrays(); ++a)
787  {
788  if (strcmp(arrName, this->GetSolidArrayName(a)) == 0)
789  {
790  this->SetSolidArrayStatus(a, status);
791  return;
792  }
793  }
794  vtkWarningMacro("Solid array \"" << arrName << "\" does not exist");
795 }
796 
797 inline int vtkLSDynaReader::GetSolidArrayStatus(const char* arrName)
798 {
799  for (int a = 0; a < this->GetNumberOfSolidArrays(); ++a)
800  {
801  if (strcmp(arrName, this->GetSolidArrayName(a)) == 0)
802  {
803  return this->GetSolidArrayStatus(a);
804  }
805  }
806  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
807  return 0;
808 }
809 
811 {
812  for (int a = 0; a < this->GetNumberOfSolidArrays(); ++a)
813  {
814  if (strcmp(arrName, this->GetSolidArrayName(a)) == 0)
815  {
816  return this->GetNumberOfComponentsInSolidArray(a);
817  }
818  }
819  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
820  return 0;
821 }
822 
823 inline void vtkLSDynaReader::SetThickShellArrayStatus(const char* arrName, int status)
824 {
825  for (int a = 0; a < this->GetNumberOfThickShellArrays(); ++a)
826  {
827  if (strcmp(arrName, this->GetThickShellArrayName(a)) == 0)
828  {
829  this->SetThickShellArrayStatus(a, status);
830  return;
831  }
832  }
833  vtkWarningMacro("Thick shell array \"" << arrName << "\" does not exist");
834 }
835 
836 inline int vtkLSDynaReader::GetThickShellArrayStatus(const char* arrName)
837 {
838  for (int a = 0; a < this->GetNumberOfThickShellArrays(); ++a)
839  {
840  if (strcmp(arrName, this->GetThickShellArrayName(a)) == 0)
841  {
842  return this->GetThickShellArrayStatus(a);
843  }
844  }
845  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
846  return 0;
847 }
848 
850 {
851  for (int a = 0; a < this->GetNumberOfThickShellArrays(); ++a)
852  {
853  if (strcmp(arrName, this->GetThickShellArrayName(a)) == 0)
854  {
856  }
857  }
858  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
859  return 0;
860 }
861 
862 inline void vtkLSDynaReader::SetShellArrayStatus(const char* arrName, int status)
863 {
864  for (int a = 0; a < this->GetNumberOfShellArrays(); ++a)
865  {
866  if (strcmp(arrName, this->GetShellArrayName(a)) == 0)
867  {
868  this->SetShellArrayStatus(a, status);
869  return;
870  }
871  }
872  vtkWarningMacro("Shell array \"" << arrName << "\" does not exist");
873 }
874 
875 inline int vtkLSDynaReader::GetShellArrayStatus(const char* arrName)
876 {
877  for (int a = 0; a < this->GetNumberOfShellArrays(); ++a)
878  {
879  if (strcmp(arrName, this->GetShellArrayName(a)) == 0)
880  {
881  return this->GetShellArrayStatus(a);
882  }
883  }
884  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
885  return 0;
886 }
887 
889 {
890  for (int a = 0; a < this->GetNumberOfShellArrays(); ++a)
891  {
892  if (strcmp(arrName, this->GetShellArrayName(a)) == 0)
893  {
894  return this->GetNumberOfComponentsInShellArray(a);
895  }
896  }
897  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
898  return 0;
899 }
900 
901 inline void vtkLSDynaReader::SetBeamArrayStatus(const char* arrName, int status)
902 {
903  for (int a = 0; a < this->GetNumberOfBeamArrays(); ++a)
904  {
905  if (strcmp(arrName, this->GetBeamArrayName(a)) == 0)
906  {
907  this->SetBeamArrayStatus(a, status);
908  return;
909  }
910  }
911  vtkWarningMacro("Beam array \"" << arrName << "\" does not exist");
912 }
913 
914 inline int vtkLSDynaReader::GetBeamArrayStatus(const char* arrName)
915 {
916  for (int a = 0; a < this->GetNumberOfBeamArrays(); ++a)
917  {
918  if (strcmp(arrName, this->GetBeamArrayName(a)) == 0)
919  {
920  return this->GetBeamArrayStatus(a);
921  }
922  }
923  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
924  return 0;
925 }
926 
928 {
929  for (int a = 0; a < this->GetNumberOfBeamArrays(); ++a)
930  {
931  if (strcmp(arrName, this->GetBeamArrayName(a)) == 0)
932  {
933  return this->GetNumberOfComponentsInBeamArray(a);
934  }
935  }
936  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
937  return 0;
938 }
939 
940 inline void vtkLSDynaReader::SetParticleArrayStatus(const char* arrName, int status)
941 {
942  for (int a = 0; a < this->GetNumberOfParticleArrays(); ++a)
943  {
944  if (strcmp(arrName, this->GetParticleArrayName(a)) == 0)
945  {
946  this->SetParticleArrayStatus(a, status);
947  return;
948  }
949  }
950  vtkWarningMacro("Particle array \"" << arrName << "\" does not exist");
951 }
952 
953 inline int vtkLSDynaReader::GetParticleArrayStatus(const char* arrName)
954 {
955  for (int a = 0; a < this->GetNumberOfParticleArrays(); ++a)
956  {
957  if (strcmp(arrName, this->GetParticleArrayName(a)) == 0)
958  {
959  return this->GetParticleArrayStatus(a);
960  }
961  }
962  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
963  return 0;
964 }
965 
967 {
968  for (int a = 0; a < this->GetNumberOfParticleArrays(); ++a)
969  {
970  if (strcmp(arrName, this->GetParticleArrayName(a)) == 0)
971  {
972  return this->GetNumberOfComponentsInParticleArray(a);
973  }
974  }
975  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
976  return 0;
977 }
978 
979 inline void vtkLSDynaReader::SetRigidBodyArrayStatus(const char* arrName, int status)
980 {
981  for (int a = 0; a < this->GetNumberOfRigidBodyArrays(); ++a)
982  {
983  if (strcmp(arrName, this->GetRigidBodyArrayName(a)) == 0)
984  {
985  this->SetRigidBodyArrayStatus(a, status);
986  return;
987  }
988  }
989  vtkWarningMacro("Rigid body array \"" << arrName << "\" does not exist");
990 }
991 
992 inline int vtkLSDynaReader::GetRigidBodyArrayStatus(const char* arrName)
993 {
994  for (int a = 0; a < this->GetNumberOfRigidBodyArrays(); ++a)
995  {
996  if (strcmp(arrName, this->GetRigidBodyArrayName(a)) == 0)
997  {
998  return this->GetRigidBodyArrayStatus(a);
999  }
1000  }
1001  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
1002  return 0;
1003 }
1004 
1006 {
1007  for (int a = 0; a < this->GetNumberOfRigidBodyArrays(); ++a)
1008  {
1009  if (strcmp(arrName, this->GetRigidBodyArrayName(a)) == 0)
1010  {
1011  return this->GetNumberOfComponentsInRigidBodyArray(a);
1012  }
1013  }
1014  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
1015  return 0;
1016 }
1017 
1018 inline void vtkLSDynaReader::SetRoadSurfaceArrayStatus(const char* arrName, int status)
1019 {
1020  for (int a = 0; a < this->GetNumberOfRoadSurfaceArrays(); ++a)
1021  {
1022  if (strcmp(arrName, this->GetRoadSurfaceArrayName(a)) == 0)
1023  {
1024  this->SetRoadSurfaceArrayStatus(a, status);
1025  return;
1026  }
1027  }
1028  vtkWarningMacro("Road surface array \"" << arrName << "\" does not exist");
1029 }
1030 
1031 inline int vtkLSDynaReader::GetRoadSurfaceArrayStatus(const char* arrName)
1032 {
1033  for (int a = 0; a < this->GetNumberOfRoadSurfaceArrays(); ++a)
1034  {
1035  if (strcmp(arrName, this->GetRoadSurfaceArrayName(a)) == 0)
1036  {
1037  return this->GetRoadSurfaceArrayStatus(a);
1038  }
1039  }
1040  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
1041  return 0;
1042 }
1043 
1045 {
1046  for (int a = 0; a < this->GetNumberOfRoadSurfaceArrays(); ++a)
1047  {
1048  if (strcmp(arrName, this->GetRoadSurfaceArrayName(a)) == 0)
1049  {
1051  }
1052  }
1053  // vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
1054  return 0;
1055 }
1056 
1057 inline void vtkLSDynaReader::SetPartArrayStatus(const char* arrName, int status)
1058 {
1059  for (int a = 0; a < this->GetNumberOfPartArrays(); ++a)
1060  {
1061  if (strcmp(arrName, this->GetPartArrayName(a)) == 0)
1062  {
1063  this->SetPartArrayStatus(a, status);
1064  return;
1065  }
1066  }
1067  vtkWarningMacro("Part \"" << arrName << "\" does not exist");
1068 }
1069 
1070 inline int vtkLSDynaReader::GetPartArrayStatus(const char* partName)
1071 {
1072  for (int a = 0; a < this->GetNumberOfPartArrays(); ++a)
1073  {
1074  if (strcmp(partName, this->GetPartArrayName(a)) == 0)
1075  {
1076  return this->GetPartArrayStatus(a);
1077  }
1078  }
1079  // vtkWarningMacro( "PartArray \"" << partName << "\" does not exist" );
1080  return 0;
1081 }
1082 
1083 #endif // vtkLSDynaReader_h
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Read LS-Dyna databases (d3plot)
virtual void SetDatabaseDirectory(VTK_FILEPATH const char *)
Get/Set the directory containing the LS-Dyna database and determine whether it is valid.
int GetNumberOfParticleArrays()
These methods allow you to load only selected subsets of the cell 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 int ReadSPHState(vtkIdType)
These functions read various parts of the database.
virtual int ReadInputDeck()
Called from within ReadHeaderInformation() to read part names associated with material IDs.
virtual int ReadCellStateInfo(vtkIdType)
These functions read various parts of the database.
const char * GetPointArrayName(int)
These methods allow you to load only selected subsets of the nodal variables defined over the mesh.
void Dump(ostream &os)
Print out more complete information about the dataset (and less complete information about the VTK hi...
int GetRoadSurfaceArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
virtual int ReadPartTitlesFromRootFile()
Called from within ReadHeaderInformation to read part names from the end of the first d3plot file.
vtkIdType GetNumberOfCells()
Retrieve the number of cells of a given type in the database.
int GetNumberOfComponentsInParticleArray(int a)
int GetParticleArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
virtual int ReadUserIds()
These functions read various parts of the database.
virtual void SetThickShellArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
vtkIdType GetNumberOfShellCells()
Retrieve the number of cells of a given type in the database.
int ReadInputDeckKeywords(istream &deck)
ReadInputDeck determines the type of file (keyword or XML summary) and calls one of these two routine...
const char * GetParticleArrayName(int)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
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 SetShellArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
int GetNumberOfComponentsInBeamArray(int a)
int ReadHeaderInformation(int currentAdaptLevel)
This function populates the reader's private dictionary with information about the database.
virtual void SetDatabaseDirectory(VTK_FILEPATH const std::string &)
Get/Set the directory containing the LS-Dyna database and determine whether it is valid.
char * InputDeck
The name of a file containing part names and IDs.
virtual int CanReadFile(VTK_FILEPATH const char *fname)
Determine if the file can be read with this reader.
virtual void SetSolidArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
VTK_FILEPATH const char * GetDatabaseDirectory()
Get/Set the directory containing the LS-Dyna database and determine whether it is valid.
void ResetPartsCache()
virtual int ReadUserMaterialIds()
Called from within ReadHeaderInformation() to read arbitrary material IDs (if present) or manufacture...
int GetThickShellArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
int GetNumberOfSolidArrays()
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
int GetBeamArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
virtual int ReadNodeStateInfo(vtkIdType)
These functions read various parts of the database.
vtkLSDynaPartCollection * Parts
void DebugDump()
A routine to call Dump() from within a lame debugger that won't properly pass a C++ iostream object l...
int GetNumberOfRigidBodyArrays()
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
virtual int ReadState(vtkIdType)
These functions read various parts of the database.
int GetNumberOfPartArrays()
These methods allow you to load only selected parts of the input.
vtkIdType GetNumberOfRigidBodyCells()
Retrieve the number of cells of a given type in the database.
const char * GetPartArrayName(int)
These methods allow you to load only selected parts of the input.
int GetNumberOfComponentsInPointArray(int arr)
These methods allow you to load only selected subsets of the nodal variables defined over the mesh.
vtkTypeBool DeformedMesh
Should deflected coordinates be used, or should the mesh remain undeflected? By default,...
virtual void ReadDeletionArray(vtkUnsignedCharArray *arr, const int &pos, const int &size)
Read an array of deletion data.
int WriteInputDeckSummary(const char *fname)
ReadInputDeckKeywords calls this function if it was successful in reading part names for materials.
int GetDimensionality()
Retrieve the dimension of points in the database.
vtkIdType GetNumberOfThickShellCells()
Retrieve the number of cells of a given type in the database.
virtual void SetParticleArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
VTK_FILEPATH const char * GetFileName()
Get/Set the filename.
int GetNumberOfShellArrays()
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.
const char * GetRigidBodyArrayName(int)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
~vtkLSDynaReader() override
const char * GetCellArrayName(int cellType, int arr)
Routines that allow the status of a cell variable to be adjusted or queried independent of the output...
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 GetNumberOfComponentsInRigidBodyArray(int a)
virtual void SetFileName(VTK_FILEPATH const char *)
Get/Set the filename.
int GetNumberOfThickShellArrays()
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
double GetTimeValue(vtkIdType)
Retrieve information about the time extents of the LS-Dyna database.
const char * GetBeamArrayName(int)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
int GetNumberOfCellArrays(int cellType)
Routines that allow the status of a cell variable to be adjusted or queried independent of the output...
int GetNumberOfRoadSurfaceArrays()
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
virtual int ReadPartSizes()
These functions read various parts of the database.
virtual void SetBeamArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
int ReadInputDeckXML(istream &deck)
ReadInputDeck determines the type of file (keyword or XML summary) and calls one of these two routine...
vtkIdType GetTimeStep()
Retrieve information about the time extents of the LS-Dyna database.
int IsDatabaseValid()
Get/Set the directory containing the LS-Dyna database and determine whether it is valid.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType GetNumberOfParticleCells()
Retrieve the number of cells of a given type in the database.
int GetNumberOfBeamArrays()
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.
vtkTypeBool DeletedCellsAsGhostArray
Should cells marked as deleted be removed from the mesh? By default, this is true.
char * GetTitle()
The title of the database is a 40 or 80 character text description stored at the front of a d3plot fi...
virtual int ReadConnectivityAndMaterial()
These functions read various parts of the database.
virtual void ResetPartInfo()
Resets the Part information to the default state.
virtual void SetFileName(VTK_FILEPATH const std::string &)
Get/Set the filename.
virtual int ReadNodes()
These functions read various parts of the database.
vtkIdType GetNumberOfNodes()
Retrieve the number of points in the database.
const char * GetSolidArrayName(int)
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.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual int ReadTopology()
These functions read various parts of the database.
int GetNumberOfComponentsInRoadSurfaceArray(int a)
int GetNumberOfComponentsInSolidArray(int a)
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int GetNumberOfPointArrays()
These methods allow you to load only selected subsets of the nodal 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...
int GetNumberOfComponentsInThickShellArray(int a)
const char * GetThickShellArrayName(int)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
virtual int ComputeDeflectionAndUpdateGeometry(vtkUnstructuredGrid *grid)
These functions read various parts of the database.
vtkIdType GetNumberOfSolidCells()
Retrieve the number of cells of a given type in the database.
LSDynaMetaData * P
virtual void ReadCellProperties(const int &type, const int &numTuples)
Read all the cell properties of a given part type.
int ScanDatabaseTimeSteps()
This function scans the list of files in the database and bookmarks the start of each time step's sta...
const char * GetRoadSurfaceArrayName(int)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
vtkIdType GetNumberOfTimeSteps()
Retrieve information about the time extents of the LS-Dyna database.
int GetCellArrayStatus(int cellType, int arr)
Routines that allow the status of a cell variable to be adjusted or queried independent of the output...
int GetPointArrayStatus(int arr)
These methods allow you to load only selected subsets of the nodal variables defined over the mesh.
vtkIdType GetNumberOfRoadSurfaceCells()
Retrieve the number of cells of a given type in the database.
vtkIdType GetNumberOfBeamCells()
Retrieve the number of cells of a given type in the database.
int GetNumberOfComponentsInShellArray(int a)
virtual void SetTimeStep(vtkIdType)
Retrieve information about the time extents of the LS-Dyna database.
vtkTypeBool RemoveDeletedCells
Should cells marked as deleted be removed from the mesh? By default, this is true.
int GetSolidArrayStatus(int arr)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
virtual void SetRigidBodyArrayStatus(int arr, int status)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
vtkIdType GetNumberOfContinuumCells()
Retrieve the number of cells of a given type in the database.
const char * GetShellArrayName(int)
These methods allow you to load only selected subsets of the cell variables defined over the mesh.
void SetDeformedMesh(vtkTypeBool)
Should deflected coordinates be used, or should the mesh remain undeflected? By default,...
virtual int ReadDeletion()
These functions read various parts of the database.
int GetPartArrayStatus(int arr)
These methods allow you to load only selected parts of the input.
static vtkLSDynaReader * New()
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
represent and manipulate 3D points
Definition: vtkPoints.h:34
dynamic, self-adjusting array of unsigned char
dataset represents arbitrary combinations of all possible cell types
@ type
Definition: vtkX3D.h:522
@ size
Definition: vtkX3D.h:259
@ string
Definition: vtkX3D.h:496
std::string GetFileName(const std::string &fileName) noexcept
Set the appropriate file name based on recognized user input.
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332
#define VTK_FILEPATH