VTK  9.3.20240424
LSDynaMetaData.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3// SPDX-License-Identifier: BSD-3-Clause
4
5// .NAME LSDynaMetaData - Read LS-Dyna databases (d3plot)
6// .SECTION Description
7// A class to hold metadata about a particular file (such as time steps,
8// the start of state information for each time step, the number of
9// adaptive remeshes, and the large collection of constants that determine
10// the available attributes). It contains an LSDynaFamily instance.
11
12#ifndef __LSDynaMetaData_h
13#define __LSDynaMetaData_h
14
15#include "LSDynaFamily.h"
16
17#include <map>
18#include <set>
19#include <string>
20#include <vector>
21
22VTK_ABI_NAMESPACE_BEGIN
24{
25public:
27
28 bool AddPointArray(const std::string& name, int numComponents, int status);
29
30 bool AddCellArray(int cellType, const std::string& name, int numComponents, int status);
31
33
34 void Reset();
35
44 {
46 BEAM = 1,
47 SHELL = 2,
49 SOLID = 4,
53 };
54
55 // If this is 0, the rest of the members have undefined
56 // values (although "derived-value" arrays will be
57 // initialized to nullptr)
59 int FileSizeFactor; // scale factor used to compute MaxFileLength
60 vtkIdType MaxFileLength; // Maximum size of any file (data too big is split into multiple files)
61
62 LSDynaFamily Fam; // file family I/O aggregator
63
64 char Title[41];
65 char ReleaseNumber[16];
68 vtkIdType CurrentState; // time step
71 int ReadRigidRoadMvmt; // Are some of the quads rigid? (eliminating a lot of state)
72 int ConnectivityUnpacked; // Is the connectivity packed, 3 to a word?
73 std::map<std::string, vtkIdType> Dict;
74
77 std::set<int> RigidMaterials;
80 std::set<int> FluidMaterials;
81
82 std::vector<std::string> PointArrayNames;
83 std::vector<int> PointArrayComponents;
84 std::vector<int> PointArrayStatus;
85
86 std::map<int, std::vector<std::string>> CellArrayNames;
87 std::map<int, std::vector<int>> CellArrayComponents;
88 std::map<int, std::vector<int>> CellArrayStatus;
89
90 std::vector<std::string> PartNames;
91 std::vector<int> PartIds;
92 std::vector<int> PartMaterials;
93 std::vector<int> PartStatus;
94
95 std::vector<int> MaterialsOrdered;
96 std::vector<int> MaterialsUnordered;
97 std::vector<int> MaterialsLookup;
98
99 std::vector<vtkIdType> RigidSurfaceSegmentSizes;
100 std::vector<double> TimeValues;
101
102 // For the current time value, what file contains this state (0=d3plot,1=d3plot01, ...)
104 // For the current time value, what is the byte offset of the state in file FileNumberThisState?
106 // Size of all data that appears before first state
108 // Number of bytes required to store a single timestep
110
111 // Number of words into the state that the element deletion starts at
113
114 // Number of words into the state that the SPH state data starts at
116};
117
118VTK_ABI_NAMESPACE_END
119#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
int vtkIdType
Definition vtkType.h:315