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 (std::string dd)
 
std::string GetDatabaseDirectory ()
 
void SetDatabaseBaseName (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< intFileAdaptLevels
 The adaptation level associated with each file. More...
 
std::vector< intAdaptations
 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< intTimeAdaptLevels
 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 71 of file LSDynaFamily.h.

Member Enumeration Documentation

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

Definition at line 91 of file LSDynaFamily.h.

Enumerator
Char 
Float 
Int 

Definition at line 138 of file LSDynaFamily.h.

Constructor & Destructor Documentation

LSDynaFamily::LSDynaFamily ( )
LSDynaFamily::~LSDynaFamily ( )

Member Function Documentation

void LSDynaFamily::SetDatabaseDirectory ( std::string  dd)
std::string LSDynaFamily::GetDatabaseDirectory ( )
void LSDynaFamily::SetDatabaseBaseName ( std::string  bn)
std::string LSDynaFamily::GetDatabaseBaseName ( )
int LSDynaFamily::ScanDatabaseDirectory ( )
static const char* LSDynaFamily::SectionTypeToString ( SectionType  s)
static
int LSDynaFamily::SkipToWord ( SectionType  sType,
vtkIdType  sId,
vtkIdType  wordNumber 
)
int LSDynaFamily::MarkTimeStep ( )
int LSDynaFamily::SkipWords ( vtkIdType  numWords)
int LSDynaFamily::BufferChunk ( WordType  wType,
vtkIdType  chunkSizeInWords 
)
int LSDynaFamily::ClearBuffer ( )
vtkIdType LSDynaFamily::InitPartialChunkBuffering ( const vtkIdType numTuples,
const vtkIdType numComps 
)
vtkIdType LSDynaFamily::GetNextChunk ( const WordType wType)
char * LSDynaFamily::GetNextWordAsChars ( )
inline

Definition at line 265 of file LSDynaFamily.h.

double LSDynaFamily::GetNextWordAsFloat ( )
inline

Definition at line 272 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::GetNextWordAsInt ( )
inline

Definition at line 294 of file LSDynaFamily.h.

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

Definition at line 320 of file LSDynaFamily.h.

int LSDynaFamily::AdvanceFile ( )
void LSDynaFamily::MarkSectionStart ( int  adapteLevel,
SectionType  m 
)
int LSDynaFamily::JumpToMark ( SectionType  m)
int LSDynaFamily::DetermineStorageModel ( )
void LSDynaFamily::SetStateSize ( vtkIdType  sz)
vtkIdType LSDynaFamily::GetStateSize ( ) const
vtkIdType LSDynaFamily::GetNumberOfFiles ( )
std::string LSDynaFamily::GetFileName ( int  i)
vtkIdType LSDynaFamily::GetFileSize ( int  i)
int LSDynaFamily::GetCurrentAdaptLevel ( ) const
inline

Definition at line 185 of file LSDynaFamily.h.

int LSDynaFamily::TimeAdaptLevel ( int  i) const
inline

Definition at line 186 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::GetCurrentFWord ( ) const
inline

Definition at line 188 of file LSDynaFamily.h.

int LSDynaFamily::GetWordSize ( ) const
void LSDynaFamily::Reset ( )
void LSDynaFamily::DumpMarks ( std::ostream &  os)

Print all adaptation and time step marker information.

void LSDynaFamily::CloseFileHandles ( )
void LSDynaFamily::OpenFileHandles ( )

Member Data Documentation

const char* LSDynaFamily::SectionTypeNames[]
static

Definition at line 136 of file LSDynaFamily.h.

const float LSDynaFamily::EOFMarker
static

Definition at line 144 of file LSDynaFamily.h.

std::string LSDynaFamily::DatabaseDirectory
protected

The directory containing d3plot files.

Definition at line 206 of file LSDynaFamily.h.

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 209 of file LSDynaFamily.h.

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

The list of files that make up the database.

Definition at line 211 of file LSDynaFamily.h.

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 214 of file LSDynaFamily.h.

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

The adaptation level associated with each file.

Definition at line 216 of file LSDynaFamily.h.

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 219 of file LSDynaFamily.h.

vtkLSDynaFile_t LSDynaFamily::FD
protected

The currently open file descriptor.

Definition at line 221 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::FNum
protected

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

Definition at line 223 of file LSDynaFamily.h.

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 226 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::FWord
protected

The offset of Chunk in currently open file.

Definition at line 228 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::TimeStep
protected

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

The current timestep

Definition at line 233 of file LSDynaFamily.h.

int LSDynaFamily::SwapEndian
protected

Whether files are reverse endian-ness of architecture.

Definition at line 235 of file LSDynaFamily.h.

int LSDynaFamily::WordSize
protected

Whether words are 4 or 8 bytes.

Definition at line 237 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::StateSize
protected

How many words is a timestep on disk?

Definition at line 239 of file LSDynaFamily.h.

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 242 of file LSDynaFamily.h.

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

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

Definition at line 245 of file LSDynaFamily.h.

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

The adaptation level associated with each time step.

Definition at line 247 of file LSDynaFamily.h.

unsigned char* LSDynaFamily::Chunk
protected

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

Definition at line 249 of file LSDynaFamily.h.

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 252 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::ChunkValid
protected

Definition at line 255 of file LSDynaFamily.h.

vtkIdType LSDynaFamily::ChunkAlloc
protected

The allocated size (in words) of Chunk.

Definition at line 257 of file LSDynaFamily.h.

bool LSDynaFamily::FileHandlesClosed
protected

Definition at line 259 of file LSDynaFamily.h.

BufferingInfo* LSDynaFamily::BufferInfo
protected

Definition at line 260 of file LSDynaFamily.h.


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