VTK  9.3.20240327
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
LSDynaFamily Class Reference

#include <LSDynaFamily.h>

Classes

class  LSDynaFamilyAdaptLevel
 
struct  LSDynaFamilySectionMark
 

Public Types

enum  SectionType {
  ControlSection = 0 , StaticSection , TimeStepSection , MaterialTypeData ,
  FluidMaterialIdData , SPHElementData , GeometryData , UserIdData ,
  AdaptedParentData , SPHNodeData , RigidSurfaceData , EndOfStaticSection ,
  ElementDeletionState , SPHNodeState , RigidSurfaceState , NumberOfSectionTypes
}
 
enum  WordType { Char , Float , Int }
 

Public Member Functions

 LSDynaFamily ()
 
 ~LSDynaFamily ()
 
void SetDatabaseDirectory (const std::string &dd)
 
std::string GetDatabaseDirectory ()
 
void SetDatabaseBaseName (const std::string &bn)
 
std::string GetDatabaseBaseName ()
 
int ScanDatabaseDirectory ()
 
int SkipToWord (SectionType sType, vtkIdType sId, vtkIdType wordNumber)
 
int MarkTimeStep ()
 
int SkipWords (vtkIdType numWords)
 
int BufferChunk (WordType wType, vtkIdType chunkSizeInWords)
 
int ClearBuffer ()
 
vtkIdType InitPartialChunkBuffering (const vtkIdType &numTuples, const vtkIdType &numComps)
 
vtkIdType GetNextChunk (const WordType &wType)
 
char * GetNextWordAsChars ()
 
double GetNextWordAsFloat ()
 
vtkIdType GetNextWordAsInt ()
 
template<typename T >
T * GetBufferAs ()
 
int AdvanceFile ()
 
void MarkSectionStart (int adaptLevel, SectionType m)
 
int JumpToMark (SectionType m)
 
int DetermineStorageModel ()
 
void SetStateSize (vtkIdType sz)
 
vtkIdType GetStateSize () const
 
vtkIdType GetNumberOfFiles ()
 
std::string GetFileName (int i)
 
vtkIdType GetFileSize (int i)
 
int GetCurrentAdaptLevel () const
 
int TimeAdaptLevel (int i) const
 
vtkIdType GetCurrentFWord () const
 
int GetWordSize () const
 
void Reset ()
 
void DumpMarks (std::ostream &os)
 Print all adaptation and time step marker information. More...
 
void CloseFileHandles ()
 
void OpenFileHandles ()
 

Static Public Member Functions

static const char * SectionTypeToString (SectionType s)
 

Static Public Attributes

static const char * SectionTypeNames []
 
static const float EOFMarker
 

Protected Attributes

std::string DatabaseDirectory
 The directory containing d3plot files. More...
 
std::string DatabaseBaseName
 The name (title string) of the database. More...
 
std::vector< std::string > Files
 The list of files that make up the database. More...
 
std::vector< vtkIdTypeFileSizes
 The size of each file in the database. More...
 
std::vector< int > FileAdaptLevels
 The adaptation level associated with each file. More...
 
std::vector< int > Adaptations
 Which files mark the start of a new mesh adaptation. More...
 
vtkLSDynaFile_t FD
 The currently open file descriptor. More...
 
vtkIdType FNum
 The index of currently open file descriptor into list of files. More...
 
int FAdapt
 The current adaptation level. More...
 
vtkIdType FWord
 The offset of Chunk in currently open file. More...
 
vtkIdType TimeStep
 A comprehensive list of all time values across all files (and mesh adaptations) More...
 
int SwapEndian
 Whether files are reverse endian-ness of architecture. More...
 
int WordSize
 Whether words are 4 or 8 bytes. More...
 
vtkIdType StateSize
 How many words is a timestep on disk? More...
 
std::vector< LSDynaFamilyAdaptLevelAdaptationsMarkers
 A vector of arrays of offsets to various header information sections (that do not vary with timestep), one for each mesh adaptation. More...
 
std::vector< LSDynaFamilySectionMarkTimeStepMarks
 An array of bookmarks pointing to the start of state information for each timestep. More...
 
std::vector< int > TimeAdaptLevels
 The adaptation level associated with each time step. More...
 
unsigned char * Chunk
 A buffer containing file contents of file FNum starting with word FWord. More...
 
vtkIdType ChunkWord
 A pointer to the next word in Chunk that will be returned when the reader requests a word. More...
 
vtkIdType ChunkValid
 
vtkIdType ChunkAlloc
 The allocated size (in words) of Chunk. More...
 
bool FileHandlesClosed
 
BufferingInfo * BufferInfo
 

Detailed Description

Definition at line 56 of file LSDynaFamily.h.

Member Enumeration Documentation

◆ SectionType

Enumerator
ControlSection 
StaticSection 
TimeStepSection 
MaterialTypeData 
FluidMaterialIdData 
SPHElementData 
GeometryData 
UserIdData 
AdaptedParentData 
SPHNodeData 
RigidSurfaceData 
EndOfStaticSection 
ElementDeletionState 
SPHNodeState 
RigidSurfaceState 
NumberOfSectionTypes 

Definition at line 76 of file LSDynaFamily.h.

◆ WordType

Enumerator
Char 
Float 
Int 

Definition at line 124 of file LSDynaFamily.h.

Constructor & Destructor Documentation

◆ LSDynaFamily()

LSDynaFamily::LSDynaFamily ( )

◆ ~LSDynaFamily()

LSDynaFamily::~LSDynaFamily ( )

Member Function Documentation

◆ SetDatabaseDirectory()

void LSDynaFamily::SetDatabaseDirectory ( const std::string &  dd)

◆ GetDatabaseDirectory()

std::string LSDynaFamily::GetDatabaseDirectory ( )

◆ SetDatabaseBaseName()

void LSDynaFamily::SetDatabaseBaseName ( const std::string &  bn)

◆ GetDatabaseBaseName()

std::string LSDynaFamily::GetDatabaseBaseName ( )

◆ ScanDatabaseDirectory()

int LSDynaFamily::ScanDatabaseDirectory ( )

◆ SectionTypeToString()

static const char* LSDynaFamily::SectionTypeToString ( SectionType  s)
static

◆ SkipToWord()

int LSDynaFamily::SkipToWord ( SectionType  sType,
vtkIdType  sId,
vtkIdType  wordNumber 
)

◆ MarkTimeStep()

int LSDynaFamily::MarkTimeStep ( )

◆ SkipWords()

int LSDynaFamily::SkipWords ( vtkIdType  numWords)

◆ BufferChunk()

int LSDynaFamily::BufferChunk ( WordType  wType,
vtkIdType  chunkSizeInWords 
)

◆ ClearBuffer()

int LSDynaFamily::ClearBuffer ( )

◆ InitPartialChunkBuffering()

vtkIdType LSDynaFamily::InitPartialChunkBuffering ( const vtkIdType numTuples,
const vtkIdType numComps 
)

◆ GetNextChunk()

vtkIdType LSDynaFamily::GetNextChunk ( const WordType wType)

◆ GetNextWordAsChars()

char * LSDynaFamily::GetNextWordAsChars ( )
inline

Definition at line 252 of file LSDynaFamily.h.

◆ GetNextWordAsFloat()

double LSDynaFamily::GetNextWordAsFloat ( )
inline

Definition at line 260 of file LSDynaFamily.h.

◆ GetNextWordAsInt()

vtkIdType LSDynaFamily::GetNextWordAsInt ( )
inline

Definition at line 283 of file LSDynaFamily.h.

◆ GetBufferAs()

template<typename T >
T * LSDynaFamily::GetBufferAs
inline

Definition at line 309 of file LSDynaFamily.h.

◆ AdvanceFile()

int LSDynaFamily::AdvanceFile ( )

◆ MarkSectionStart()

void LSDynaFamily::MarkSectionStart ( int  adaptLevel,
SectionType  m 
)

◆ JumpToMark()

int LSDynaFamily::JumpToMark ( SectionType  m)

◆ DetermineStorageModel()

int LSDynaFamily::DetermineStorageModel ( )

◆ SetStateSize()

void LSDynaFamily::SetStateSize ( vtkIdType  sz)

◆ GetStateSize()

vtkIdType LSDynaFamily::GetStateSize ( ) const

◆ GetNumberOfFiles()

vtkIdType LSDynaFamily::GetNumberOfFiles ( )

◆ GetFileName()

std::string LSDynaFamily::GetFileName ( int  i)

◆ GetFileSize()

vtkIdType LSDynaFamily::GetFileSize ( int  i)

◆ GetCurrentAdaptLevel()

int LSDynaFamily::GetCurrentAdaptLevel ( ) const
inline

Definition at line 172 of file LSDynaFamily.h.

◆ TimeAdaptLevel()

int LSDynaFamily::TimeAdaptLevel ( int  i) const
inline

Definition at line 173 of file LSDynaFamily.h.

◆ GetCurrentFWord()

vtkIdType LSDynaFamily::GetCurrentFWord ( ) const
inline

Definition at line 175 of file LSDynaFamily.h.

◆ GetWordSize()

int LSDynaFamily::GetWordSize ( ) const

◆ Reset()

void LSDynaFamily::Reset ( )

◆ DumpMarks()

void LSDynaFamily::DumpMarks ( std::ostream &  os)

Print all adaptation and time step marker information.

◆ CloseFileHandles()

void LSDynaFamily::CloseFileHandles ( )

◆ OpenFileHandles()

void LSDynaFamily::OpenFileHandles ( )

Member Data Documentation

◆ SectionTypeNames

const char* LSDynaFamily::SectionTypeNames[]
static

Definition at line 122 of file LSDynaFamily.h.

◆ EOFMarker

const float LSDynaFamily::EOFMarker
static

Definition at line 131 of file LSDynaFamily.h.

◆ DatabaseDirectory

std::string LSDynaFamily::DatabaseDirectory
protected

The directory containing d3plot files.

Definition at line 193 of file LSDynaFamily.h.

◆ DatabaseBaseName

std::string LSDynaFamily::DatabaseBaseName
protected

The name (title string) of the database.

This is the first 10 words (40 or 80 bytes) of the first file.

Definition at line 196 of file LSDynaFamily.h.

◆ Files

std::vector<std::string> LSDynaFamily::Files
protected

The list of files that make up the database.

Definition at line 198 of file LSDynaFamily.h.

◆ FileSizes

std::vector<vtkIdType> LSDynaFamily::FileSizes
protected

The size of each file in the database.

Note that they can be padded, so this is >= the amount of data in each file.

Definition at line 201 of file LSDynaFamily.h.

◆ FileAdaptLevels

std::vector<int> LSDynaFamily::FileAdaptLevels
protected

The adaptation level associated with each file.

Definition at line 203 of file LSDynaFamily.h.

◆ Adaptations

std::vector<int> LSDynaFamily::Adaptations
protected

Which files mark the start of a new mesh adaptation.

There is at least one entry and the first entry is always 0.

Definition at line 206 of file LSDynaFamily.h.

◆ FD

vtkLSDynaFile_t LSDynaFamily::FD
protected

The currently open file descriptor.

Definition at line 208 of file LSDynaFamily.h.

◆ FNum

vtkIdType LSDynaFamily::FNum
protected

The index of currently open file descriptor into list of files.

Definition at line 210 of file LSDynaFamily.h.

◆ FAdapt

int LSDynaFamily::FAdapt
protected

The current adaptation level.

This is checked whenever a file is advanced so we can skip its control+geometry headers.

Definition at line 213 of file LSDynaFamily.h.

◆ FWord

vtkIdType LSDynaFamily::FWord
protected

The offset of Chunk in currently open file.

Definition at line 215 of file LSDynaFamily.h.

◆ TimeStep

vtkIdType LSDynaFamily::TimeStep
protected

A comprehensive list of all time values across all files (and mesh adaptations)

The current timestep

Definition at line 220 of file LSDynaFamily.h.

◆ SwapEndian

int LSDynaFamily::SwapEndian
protected

Whether files are reverse endian-ness of architecture.

Definition at line 222 of file LSDynaFamily.h.

◆ WordSize

int LSDynaFamily::WordSize
protected

Whether words are 4 or 8 bytes.

Definition at line 224 of file LSDynaFamily.h.

◆ StateSize

vtkIdType LSDynaFamily::StateSize
protected

How many words is a timestep on disk?

Definition at line 226 of file LSDynaFamily.h.

◆ AdaptationsMarkers

std::vector<LSDynaFamilyAdaptLevel> LSDynaFamily::AdaptationsMarkers
protected

A vector of arrays of offsets to various header information sections (that do not vary with timestep), one for each mesh adaptation.

Definition at line 229 of file LSDynaFamily.h.

◆ TimeStepMarks

std::vector<LSDynaFamilySectionMark> LSDynaFamily::TimeStepMarks
protected

An array of bookmarks pointing to the start of state information for each timestep.

Definition at line 232 of file LSDynaFamily.h.

◆ TimeAdaptLevels

std::vector<int> LSDynaFamily::TimeAdaptLevels
protected

The adaptation level associated with each time step.

Definition at line 234 of file LSDynaFamily.h.

◆ Chunk

unsigned char* LSDynaFamily::Chunk
protected

A buffer containing file contents of file FNum starting with word FWord.

Definition at line 236 of file LSDynaFamily.h.

◆ ChunkWord

vtkIdType LSDynaFamily::ChunkWord
protected

A pointer to the next word in Chunk that will be returned when the reader requests a word.

Definition at line 239 of file LSDynaFamily.h.

◆ ChunkValid

vtkIdType LSDynaFamily::ChunkValid
protected

Definition at line 242 of file LSDynaFamily.h.

◆ ChunkAlloc

vtkIdType LSDynaFamily::ChunkAlloc
protected

The allocated size (in words) of Chunk.

Definition at line 244 of file LSDynaFamily.h.

◆ FileHandlesClosed

bool LSDynaFamily::FileHandlesClosed
protected

Definition at line 246 of file LSDynaFamily.h.

◆ BufferInfo

BufferingInfo* LSDynaFamily::BufferInfo
protected

Definition at line 248 of file LSDynaFamily.h.


The documentation for this class was generated from the following file: