Langmuir
Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LangmuirCore::CheckPointer Class Reference

A class to read and write checkpoint files. More...

#include <checkpointer.h>

Public Types

enum  Section {
  Parameters, Electrons, Holes, Defects,
  Traps, TrapPotentials, RandomState, FluxState
}
 A way to identify different sections in the input file. More...
 

Public Member Functions

 CheckPointer (World &world, QObject *parent=0)
 Create the checkpointer object. More...
 
void load (const QString &fileName, ConfigurationInfo &configInfo)
 load simulation information More...
 
void save (const QString &fileName="%stub.chk")
 save simulation information More...
 
void checkStream (std::istream &stream, const QString &message="")
 check to see if input stream has failed More...
 

Private Member Functions

std::istream & loadElectrons (std::istream &stream, ConfigurationInfo &configInfo)
 load electrons sites from input file More...
 
std::istream & loadHoles (std::istream &stream, ConfigurationInfo &configInfo)
 load hole sites from input file More...
 
std::istream & loadDefects (std::istream &stream, ConfigurationInfo &configInfo)
 load defect sites from input file More...
 
std::istream & loadTraps (std::istream &stream, ConfigurationInfo &configInfo)
 load trap sites from input file More...
 
std::istream & loadTrapPotentials (std::istream &stream, ConfigurationInfo &configInfo)
 load trap energies from input file More...
 
std::istream & loadFluxState (std::istream &stream, ConfigurationInfo &configInfo)
 load flux state from input file More...
 
std::istream & loadParameters (std::istream &stream)
 load parameter from input file More...
 
std::istream & loadRandomState (std::istream &stream)
 load random number generator state from input file More...
 
std::ostream & saveElectrons (std::ostream &stream)
 save electron site ids to output file More...
 
std::ostream & saveHoles (std::ostream &stream)
 save hole site ids to output file More...
 
std::ostream & saveDefects (std::ostream &stream)
 save defect site ids to output file More...
 
std::ostream & saveTraps (std::ostream &stream)
 save trap site ids to output file More...
 
std::ostream & saveTrapPotentials (std::ostream &stream)
 save trap energies to output file More...
 
std::ostream & saveFluxState (std::ostream &stream)
 save flux states to output file More...
 
std::ostream & saveParameters (std::ostream &stream)
 save parameters to output file More...
 
std::ostream & saveRandomState (std::ostream &stream)
 save random number generator state to output file More...
 

Private Attributes

Worldm_world
 reference to world object More...
 

Detailed Description

A class to read and write checkpoint files.

Checkpoint files are essentially the same as input files

Member Enumeration Documentation

A way to identify different sections in the input file.

Enumerator
Parameters 
Electrons 
Holes 
Defects 
Traps 
TrapPotentials 
RandomState 
FluxState 

Constructor & Destructor Documentation

LangmuirCore::CheckPointer::CheckPointer ( World world,
QObject *  parent = 0 
)
explicit

Create the checkpointer object.

Parameters
worldreference world object
parentparent QObject

Member Function Documentation

void LangmuirCore::CheckPointer::checkStream ( std::istream &  stream,
const QString &  message = "" 
)

check to see if input stream has failed

Parameters
streaminput stream
messagethe error message to output if stream failed
void LangmuirCore::CheckPointer::load ( const QString &  fileName,
ConfigurationInfo configInfo 
)

load simulation information

Parameters
fileNamename of input file
configInfotemporary storage for electrons, holes, etc
std::istream& LangmuirCore::CheckPointer::loadDefects ( std::istream &  stream,
ConfigurationInfo configInfo 
)
private

load defect sites from input file

Parameters
streamthe input stream
configInfotemporary storage for site ids
std::istream& LangmuirCore::CheckPointer::loadElectrons ( std::istream &  stream,
ConfigurationInfo configInfo 
)
private

load electrons sites from input file

Parameters
streamthe input stream
configInfotemporary storage for site ids
std::istream& LangmuirCore::CheckPointer::loadFluxState ( std::istream &  stream,
ConfigurationInfo configInfo 
)
private

load flux state from input file

Parameters
streamthe input stream
configInfotemporary storage for flux state
std::istream& LangmuirCore::CheckPointer::loadHoles ( std::istream &  stream,
ConfigurationInfo configInfo 
)
private

load hole sites from input file

Parameters
streamthe input stream
configInfotemporary storage for site ids
std::istream& LangmuirCore::CheckPointer::loadParameters ( std::istream &  stream)
private

load parameter from input file

Parameters
streamthe input stream
std::istream& LangmuirCore::CheckPointer::loadRandomState ( std::istream &  stream)
private

load random number generator state from input file

Parameters
streamthe input stream
std::istream& LangmuirCore::CheckPointer::loadTrapPotentials ( std::istream &  stream,
ConfigurationInfo configInfo 
)
private

load trap energies from input file

Parameters
streamthe input stream
configInfotemporary storage for site energies
std::istream& LangmuirCore::CheckPointer::loadTraps ( std::istream &  stream,
ConfigurationInfo configInfo 
)
private

load trap sites from input file

Parameters
streamthe input stream
configInfotemporary storage for site ids
void LangmuirCore::CheckPointer::save ( const QString &  fileName = "%stub.chk")

save simulation information

Parameters
fileNamename of output file
std::ostream& LangmuirCore::CheckPointer::saveDefects ( std::ostream &  stream)
private

save defect site ids to output file

Parameters
streamoutput stream
std::ostream& LangmuirCore::CheckPointer::saveElectrons ( std::ostream &  stream)
private

save electron site ids to output file

Parameters
streamoutput stream
std::ostream& LangmuirCore::CheckPointer::saveFluxState ( std::ostream &  stream)
private

save flux states to output file

Parameters
streamoutput stream
std::ostream& LangmuirCore::CheckPointer::saveHoles ( std::ostream &  stream)
private

save hole site ids to output file

Parameters
streamoutput stream
std::ostream& LangmuirCore::CheckPointer::saveParameters ( std::ostream &  stream)
private

save parameters to output file

Parameters
streamoutput stream
std::ostream& LangmuirCore::CheckPointer::saveRandomState ( std::ostream &  stream)
private

save random number generator state to output file

Parameters
streamoutput stream
std::ostream& LangmuirCore::CheckPointer::saveTrapPotentials ( std::ostream &  stream)
private

save trap energies to output file

Parameters
streamoutput stream
std::ostream& LangmuirCore::CheckPointer::saveTraps ( std::ostream &  stream)
private

save trap site ids to output file

Parameters
streamoutput stream

Member Data Documentation

World& LangmuirCore::CheckPointer::m_world
private

reference to world object


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