VTK
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 adapteLevel, 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 70 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 90 of file LSDynaFamily.h.

◆ WordType

Enumerator
Char 
Float 
Int 

Definition at line 138 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 266 of file LSDynaFamily.h.

◆ GetNextWordAsFloat()

double LSDynaFamily::GetNextWordAsFloat ( )
inline

Definition at line 274 of file LSDynaFamily.h.

◆ GetNextWordAsInt()

vtkIdType LSDynaFamily::GetNextWordAsInt ( )
inline

Definition at line 297 of file LSDynaFamily.h.

◆ GetBufferAs()

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

Definition at line 323 of file LSDynaFamily.h.

◆ AdvanceFile()

int LSDynaFamily::AdvanceFile ( )

◆ MarkSectionStart()

void LSDynaFamily::MarkSectionStart ( int  adapteLevel,
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 186 of file LSDynaFamily.h.

◆ TimeAdaptLevel()

int LSDynaFamily::TimeAdaptLevel ( int  i) const
inline

Definition at line 187 of file LSDynaFamily.h.

◆ GetCurrentFWord()

vtkIdType LSDynaFamily::GetCurrentFWord ( ) const
inline

Definition at line 189 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 136 of file LSDynaFamily.h.

◆ EOFMarker

const float LSDynaFamily::EOFMarker
static

Definition at line 145 of file LSDynaFamily.h.

◆ DatabaseDirectory

std::string LSDynaFamily::DatabaseDirectory
protected

The directory containing d3plot files.

Definition at line 207 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 210 of file LSDynaFamily.h.

◆ Files

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

The list of files that make up the database.

Definition at line 212 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 215 of file LSDynaFamily.h.

◆ FileAdaptLevels

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

The adaptation level associated with each file.

Definition at line 217 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 220 of file LSDynaFamily.h.

◆ FD

vtkLSDynaFile_t LSDynaFamily::FD
protected

The currently open file descriptor.

Definition at line 222 of file LSDynaFamily.h.

◆ FNum

vtkIdType LSDynaFamily::FNum
protected

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

Definition at line 224 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 227 of file LSDynaFamily.h.

◆ FWord

vtkIdType LSDynaFamily::FWord
protected

The offset of Chunk in currently open file.

Definition at line 229 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 234 of file LSDynaFamily.h.

◆ SwapEndian

int LSDynaFamily::SwapEndian
protected

Whether files are reverse endian-ness of architecture.

Definition at line 236 of file LSDynaFamily.h.

◆ WordSize

int LSDynaFamily::WordSize
protected

Whether words are 4 or 8 bytes.

Definition at line 238 of file LSDynaFamily.h.

◆ StateSize

vtkIdType LSDynaFamily::StateSize
protected

How many words is a timestep on disk?

Definition at line 240 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 243 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 246 of file LSDynaFamily.h.

◆ TimeAdaptLevels

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

The adaptation level associated with each time step.

Definition at line 248 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 250 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 253 of file LSDynaFamily.h.

◆ ChunkValid

vtkIdType LSDynaFamily::ChunkValid
protected

Definition at line 256 of file LSDynaFamily.h.

◆ ChunkAlloc

vtkIdType LSDynaFamily::ChunkAlloc
protected

The allocated size (in words) of Chunk.

Definition at line 258 of file LSDynaFamily.h.

◆ FileHandlesClosed

bool LSDynaFamily::FileHandlesClosed
protected

Definition at line 260 of file LSDynaFamily.h.

◆ BufferInfo

BufferingInfo* LSDynaFamily::BufferInfo
protected

Definition at line 261 of file LSDynaFamily.h.


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