AbstractLookupTableCollection Class Reference

#include <AbstractLookupTableCollection.hpp>

Collaboration diagram for AbstractLookupTableCollection:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractLookupTableCollection ()
std::vector< std::string > GetKeyingVariableNames () const
unsigned GetNumberOfTables (const std::string &rKeyingVariableName) const
void GetTableProperties (const std::string &rKeyingVariableName, double &rMin, double &rStep, double &rMax) const
void SetTableProperties (const std::string &rKeyingVariableName, double min, double step, double max)
void SetTimestep (double dt)
virtual void RegenerateTables ()=0
virtual ~AbstractLookupTableCollection ()

Protected Member Functions

unsigned GetTableIndex (const std::string &rKeyingVariableName) const

Protected Attributes

std::vector< std::string > mKeyingVariableNames
std::vector< unsigned > mNumberOfTables
std::vector< double > mTableSteps
std::vector< double > mTableStepInverses
std::vector< double > mTableMins
std::vector< double > mTableMaxs
std::vector< bool > mNeedsRegeneration
double mDt

Classes

class  EventHandler


Detailed Description

Base class for lookup tables used in optimised cells generated by PyCml. Contains methods to query and adjust table parameters (i.e. size and spacing), and an event handler to time table generation.

Definition at line 42 of file AbstractLookupTableCollection.hpp.


Constructor & Destructor Documentation

AbstractLookupTableCollection::AbstractLookupTableCollection (  ) 

Default constructor.

Definition at line 33 of file AbstractLookupTableCollection.cpp.

AbstractLookupTableCollection::~AbstractLookupTableCollection (  )  [virtual]

Virtual destructor since we have a virtual method.

Definition at line 102 of file AbstractLookupTableCollection.cpp.


Member Function Documentation

std::vector< std::string > AbstractLookupTableCollection::GetKeyingVariableNames (  )  const

Get the names of variables used to index lookup tables.

Definition at line 38 of file AbstractLookupTableCollection.cpp.

References mKeyingVariableNames.

unsigned AbstractLookupTableCollection::GetNumberOfTables ( const std::string &  rKeyingVariableName  )  const

Get the number of lookup tables keyed by the given variable.

Parameters:
rKeyingVariableName the table key name

Definition at line 43 of file AbstractLookupTableCollection.cpp.

References GetTableIndex(), and mNumberOfTables.

void AbstractLookupTableCollection::GetTableProperties ( const std::string &  rKeyingVariableName,
double &  rMin,
double &  rStep,
double &  rMax 
) const

Get the properties of lookup tables keyed by the given variable.

Parameters:
rKeyingVariableName the table key name
rMin will be filled with the lower table bound
rStep will be filled with the table spacing
rMax will be filled with the upper table bound

Definition at line 48 of file AbstractLookupTableCollection.cpp.

References GetTableIndex(), mTableMaxs, mTableMins, and mTableSteps.

void AbstractLookupTableCollection::SetTableProperties ( const std::string &  rKeyingVariableName,
double  min,
double  step,
double  max 
)

Set the properties of lookup tables keyed by the given variable.

Parameters:
rKeyingVariableName the table key name
min the lower table bound
step the table spacing; must divide the interval between min and max exactly
max the upper table bound

Definition at line 56 of file AbstractLookupTableCollection.cpp.

References EXCEPTION, GetTableIndex(), mNeedsRegeneration, mTableMaxs, mTableMins, mTableStepInverses, and mTableSteps.

void AbstractLookupTableCollection::SetTimestep ( double  dt  ) 

With some PyCml settings, the cell model timestep may be included within lookup tables. If the cell's dt is changed, this method must be called to reflect this, and RegenerateTables called to update the tables to match.

Parameters:
dt the new timestep

Definition at line 76 of file AbstractLookupTableCollection.cpp.

References mDt, and mNeedsRegeneration.

virtual void AbstractLookupTableCollection::RegenerateTables (  )  [pure virtual]

Subclasses implement this method to generate the lookup tables based on the current settings.

unsigned AbstractLookupTableCollection::GetTableIndex ( const std::string &  rKeyingVariableName  )  const [protected]

Get the index of the given keying variable within our vector.

Parameters:
rKeyingVariableName the table key name

Definition at line 85 of file AbstractLookupTableCollection.cpp.

References EXCEPTION, and mKeyingVariableNames.

Referenced by GetNumberOfTables(), GetTableProperties(), and SetTableProperties().


Member Data Documentation

std::vector<std::string> AbstractLookupTableCollection::mKeyingVariableNames [protected]

Names of variables used to index lookup tables

Definition at line 124 of file AbstractLookupTableCollection.hpp.

Referenced by GetKeyingVariableNames(), and GetTableIndex().

std::vector<unsigned> AbstractLookupTableCollection::mNumberOfTables [protected]

Number of tables indexed by each variable

Definition at line 127 of file AbstractLookupTableCollection.hpp.

Referenced by GetNumberOfTables().

std::vector<double> AbstractLookupTableCollection::mTableSteps [protected]

Spacing of tables indexed by each variable

Definition at line 130 of file AbstractLookupTableCollection.hpp.

Referenced by GetTableProperties(), and SetTableProperties().

std::vector<double> AbstractLookupTableCollection::mTableStepInverses [protected]

Contains the reciprocals of mTableSteps

Definition at line 133 of file AbstractLookupTableCollection.hpp.

Referenced by SetTableProperties().

std::vector<double> AbstractLookupTableCollection::mTableMins [protected]

Lower bound of tables indexed by each variable

Definition at line 136 of file AbstractLookupTableCollection.hpp.

Referenced by GetTableProperties(), and SetTableProperties().

std::vector<double> AbstractLookupTableCollection::mTableMaxs [protected]

Upper bound of tables indexed by each variable

Definition at line 139 of file AbstractLookupTableCollection.hpp.

Referenced by GetTableProperties(), and SetTableProperties().

Whether the parameters for each set of tables have changed

Definition at line 142 of file AbstractLookupTableCollection.hpp.

Referenced by SetTableProperties(), and SetTimestep().

Timestep to use in lookup tables

Definition at line 145 of file AbstractLookupTableCollection.hpp.

Referenced by SetTimestep().


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

Generated on Mon Apr 18 11:36:02 2011 for Chaste by  doxygen 1.5.5