28#ifndef __LSDynaFamily_h
29#define __LSDynaFamily_h
48#define VTK_LSDYNA_BADFILE -1
49#define VTK_LSDYNA_TELL(fid) lseek(fid, 0, SEEK_CUR)
50#define VTK_LSDYNA_SEEK(fid, off, whence) lseek(fid, off, whence)
51#define VTK_LSDYNA_SEEKTELL(fid, off, whence) lseek(fid, off, whence)
52#define VTK_LSDYNA_READ(fid, ptr, cnt) read(fid, ptr, cnt)
53#define VTK_LSDYNA_ISBADFILE(fid) (fid < 0)
54#define VTK_LSDYNA_CLOSEFILE(fid) close(fid)
58#define VTK_LSDYNA_BADFILE 0
59#define VTK_LSDYNA_TELL(fid) ftell(fid)
60#define VTK_LSDYNA_SEEK(fid, off, whence) fseek(fid, off, whence)
61#define VTK_LSDYNA_SEEKTELL(fid, off, whence) fseek(fid, off, whence), ftell(fid)
62#define VTK_LSDYNA_READ(fid, ptr, cnt) fread(ptr, 1, cnt, fid)
63#define VTK_LSDYNA_ISBADFILE(fid) (fid == 0)
64#define VTK_LSDYNA_CLOSEFILE(fid) fclose(fid)
66#ifdef VTKSNL_HAVE_ERRNO_H
131 this->Marks[i] = mark;
168 template <
typename T>
261 struct BufferingInfo;
269 fprintf(stderr,
"Read char past end of buffer\n");
277 fprintf(stderr,
"Read float past end of buffer\n");
282 vtkTypeFloat32
value;
289 vtkTypeFloat64
value;
301 fprintf(stderr,
"Read int past end of buffer\n");
325 return reinterpret_cast<T*
>(this->
Chunk);
LSDynaFamilySectionMark Marks[NumberOfSectionTypes]
vtkIdType GetCurrentFWord() const
int BufferChunk(WordType wType, vtkIdType chunkSizeInWords)
int ScanDatabaseDirectory()
vtkIdType GetNextWordAsInt()
static const char * SectionTypeNames[]
unsigned char * Chunk
A buffer containing file contents of file FNum starting with word FWord.
BufferingInfo * BufferInfo
vtkIdType StateSize
How many words is a timestep on disk?
void SetDatabaseBaseName(const std::string &bn)
int WordSize
Whether words are 4 or 8 bytes.
std::vector< int > Adaptations
Which files mark the start of a new mesh adaptation.
std::vector< int > TimeAdaptLevels
The adaptation level associated with each time step.
int GetCurrentAdaptLevel() const
std::vector< LSDynaFamilyAdaptLevel > AdaptationsMarkers
A vector of arrays of offsets to various header information sections (that do not vary with timestep)...
static const float EOFMarker
int DetermineStorageModel()
int SkipToWord(SectionType sType, vtkIdType sId, vtkIdType wordNumber)
vtkIdType TimeStep
A comprehensive list of all time values across all files (and mesh adaptations)
double GetNextWordAsFloat()
vtkIdType GetNumberOfFiles()
int FAdapt
The current adaptation level.
int SkipWords(vtkIdType numWords)
int SwapEndian
Whether files are reverse endian-ness of architecture.
vtkIdType GetNextChunk(const WordType &wType)
std::string GetDatabaseBaseName()
std::string GetDatabaseDirectory()
vtkIdType FNum
The index of currently open file descriptor into list of files.
std::vector< vtkIdType > FileSizes
The size of each file in the database.
void SetDatabaseDirectory(const std::string &dd)
std::string DatabaseDirectory
The directory containing d3plot files.
vtkLSDynaFile_t FD
The currently open file descriptor.
vtkIdType GetStateSize() const
vtkIdType ChunkWord
A pointer to the next word in Chunk that will be returned when the reader requests a word.
vtkIdType GetFileSize(int i)
vtkIdType InitPartialChunkBuffering(const vtkIdType &numTuples, const vtkIdType &numComps)
std::vector< int > FileAdaptLevels
The adaptation level associated with each file.
void DumpMarks(std::ostream &os)
Print all adaptation and time step marker information.
vtkIdType ChunkAlloc
The allocated size (in words) of Chunk.
std::string DatabaseBaseName
The name (title string) of the database.
int TimeAdaptLevel(int i) const
void MarkSectionStart(int adaptLevel, SectionType m)
std::string GetFileName(int i)
void SetStateSize(vtkIdType sz)
static const char * SectionTypeToString(SectionType s)
std::vector< LSDynaFamilySectionMark > TimeStepMarks
An array of bookmarks pointing to the start of state information for each timestep.
int JumpToMark(SectionType m)
char * GetNextWordAsChars()
std::vector< std::string > Files
The list of files that make up the database.
vtkIdType FWord
The offset of Chunk in currently open file.