VTK  9.1.0
LSDynaMetaData.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: LSDynaMetaData.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
20// .NAME LSDynaMetaData - Read LS-Dyna databases (d3plot)
21// .SECTION Description
22// A class to hold metadata about a particular file (such as time steps,
23// the start of state information for each time step, the number of
24// adaptive remeshes, and the large collection of constants that determine
25// the available attributes). It contains an LSDynaFamily instance.
26
27#ifndef __LSDynaMetaData_h
28#define __LSDynaMetaData_h
29
30#include "LSDynaFamily.h"
31
32#include <map>
33#include <set>
34#include <string>
35#include <vector>
36
38{
39public:
41
42 bool AddPointArray(const std::string& name, int numComponents, int status);
43
44 bool AddCellArray(int cellType, const std::string& name, int numComponents, int status);
45
47
48 void Reset();
49
58 {
60 BEAM = 1,
61 SHELL = 2,
63 SOLID = 4,
67 };
68
69 // If this is 0, the rest of the members have undefined
70 // values (although "derived-value" arrays will be
71 // initialized to nullptr)
73 int FileSizeFactor; // scale factor used to compute MaxFileLength
74 vtkIdType MaxFileLength; // Maximum size of any file (data too big is split into multiple files)
75
76 LSDynaFamily Fam; // file family I/O aggregator
77
78 char Title[41];
79 char ReleaseNumber[16];
82 vtkIdType CurrentState; // time step
85 int ReadRigidRoadMvmt; // Are some of the quads rigid? (eliminating a lot of state)
86 int ConnectivityUnpacked; // Is the connectivity packed, 3 to a word?
87 std::map<std::string, vtkIdType> Dict;
88
91 std::set<int> RigidMaterials;
94 std::set<int> FluidMaterials;
95
96 std::vector<std::string> PointArrayNames;
97 std::vector<int> PointArrayComponents;
98 std::vector<int> PointArrayStatus;
99
100 std::map<int, std::vector<std::string>> CellArrayNames;
101 std::map<int, std::vector<int>> CellArrayComponents;
102 std::map<int, std::vector<int>> CellArrayStatus;
103
104 std::vector<std::string> PartNames;
105 std::vector<int> PartIds;
106 std::vector<int> PartMaterials;
107 std::vector<int> PartStatus;
108
109 std::vector<int> MaterialsOrdered;
110 std::vector<int> MaterialsUnordered;
111 std::vector<int> MaterialsLookup;
112
113 std::vector<vtkIdType> RigidSurfaceSegmentSizes;
114 std::vector<double> TimeValues;
115
116 // For the current time value, what file contains this state (0=d3plot,1=d3plot01, ...)
118 // For the current time value, what is the byte offset of the state in file FileNumberThisState?
120 // Size of all data that appears before first state
122 // Number of bytes required to store a single timestep
124
125 // Number of words into the state that the element deletion starts at
127
128 // Number of words into the state that the SPH state data starts at
130};
131
132#endif // __LSDynaMetaData_h
std::vector< vtkIdType > RigidSurfaceSegmentSizes
std::vector< int > MaterialsUnordered
vtkIdType PreStateSize
std::vector< int > PartStatus
std::vector< std::string > PointArrayNames
vtkIdType CurrentState
vtkIdType SPHStateOffset
std::vector< int > PartMaterials
bool AddCellArray(int cellType, const std::string &name, int numComponents, int status)
std::vector< int > MaterialsOrdered
std::vector< int > MaterialsLookup
vtkIdType StateSize
std::vector< int > PointArrayStatus
std::vector< double > TimeValues
std::map< int, std::vector< int > > CellArrayComponents
vtkIdType GetTotalMaterialCount()
vtkIdType ElementDeletionOffset
std::map< int, std::vector< int > > CellArrayStatus
LSDYNA_TYPES
LS-Dyna cell types.
vtkIdType FileNumberThisState
std::map< std::string, vtkIdType > Dict
vtkIdType FileOffsetThisState
LSDynaFamily Fam
std::vector< int > PartIds
std::vector< int > PointArrayComponents
std::set< int > FluidMaterials
List of material IDs that indicate the associated solid element represents an Eulerian or ALE fluid.
std::set< int > RigidMaterials
List of material IDs that indicate the associated shell element is rigid (and has no state data)
char ReleaseNumber[16]
std::vector< std::string > PartNames
vtkIdType MaxFileLength
bool AddPointArray(const std::string &name, int numComponents, int status)
std::map< int, std::vector< std::string > > CellArrayNames
vtkIdType NumberOfCells[LSDynaMetaData::NUM_CELL_TYPES]
vtkIdType NumberOfNodes
@ name
Definition: vtkX3D.h:225
@ string
Definition: vtkX3D.h:496
int vtkIdType
Definition: vtkType.h:332