VTK
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 "LSDynaExport.h"
31#include "LSDynaFamily.h"
32
33#include <string>
34#include <map>
35#include <set>
36#include <vector>
37
39{
40public:
42
43 bool AddPointArray( std::string name, int numComponents, int status );
44
45 bool AddCellArray( int cellType, std::string name, int numComponents, int status );
46
48
49 void Reset();
50
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 NULL)
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
90 std::set<int> RigidMaterials;
92 std::set<int> FluidMaterials;
93
94 std::vector<std::string> PointArrayNames;
95 std::vector<int> PointArrayComponents;
96 std::vector<int> PointArrayStatus;
97
98 std::map<int, std::vector<std::string> > CellArrayNames;
99 std::map<int, std::vector<int> > CellArrayComponents;
100 std::map<int, std::vector<int> > CellArrayStatus;
101
102 std::vector<std::string> PartNames;
103 std::vector<int> PartIds;
104 std::vector<int> PartMaterials;
105 std::vector<int> PartStatus;
106
107 std::vector<int> MaterialsOrdered;
108 std::vector<int> MaterialsUnordered;
109 std::vector<int> MaterialsLookup;
110
111 std::vector<vtkIdType> RigidSurfaceSegmentSizes;
112 std::vector<double> TimeValues;
113
114 // For the current time value, what file contains this state (0=d3plot,1=d3plot01, ...)
116 // For the current time value, what is the byte offset of the state in file FileNumberThisState?
118 // Size of all data that appears before first state
120 // Number of bytes required to store a single timestep
122
123 //Number of words into the state that the element deletion starts at
125
126 //Number of words into the state that the SPH state data starts at
128};
129
130#endif // __LSDynaMetaData_h
std::vector< vtkIdType > RigidSurfaceSegmentSizes
std::vector< int > MaterialsUnordered
vtkIdType PreStateSize
std::vector< int > PartStatus
int GetTotalMaterialCount()
std::vector< std::string > PointArrayNames
std::map< std::string, vtkIdType > Dict
vtkIdType CurrentState
bool AddPointArray(std::string name, int numComponents, int status)
vtkIdType SPHStateOffset
std::vector< int > PartMaterials
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 ElementDeletionOffset
std::map< int, std::vector< int > > CellArrayStatus
LSDYNA_TYPES
LS-Dyna cell types.
vtkIdType FileNumberThisState
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
std::map< int, std::vector< std::string > > CellArrayNames
vtkIdType NumberOfCells[LSDynaMetaData::NUM_CELL_TYPES]
vtkIdType NumberOfNodes
bool AddCellArray(int cellType, std::string name, int numComponents, int status)
CellTypeInDataSet cellType(vtkDataSet *input)
@ name
Definition: vtkX3D.h:219
@ string
Definition: vtkX3D.h:490
int vtkIdType
Definition: vtkType.h:287