Langmuir
Simulation
|
A class to hold all objects in a simulation. More...
#include <world.h>
Public Member Functions | |
World (const QString &fileName, int cores=-1, int gpuID=-1, QObject *parent=0) | |
create a world to simulate in More... | |
World (SimulationParameters ¶meters, int cores=-1, int gpuID=-1, QObject *parent=0) | |
World (SimulationParameters ¶meters, ConfigurationInfo &configInfo, int cores=-1, int gpuID=-1, QObject *parent=0) | |
~World () | |
destroys the entire World, and everything in it...including you. More... | |
KeyValueParser & | keyValueParser () |
get the KeyValueParser, used for parsing input files. More... | |
CheckPointer & | checkPointer () |
get the CheckPointer, used for reading and writing input files. More... | |
Grid & | electronGrid () |
get the Grid used, used for holding ElectronAgents More... | |
Grid & | holeGrid () |
get the hole Grid, used for holding HoleAgents More... | |
Potential & | potential () |
get the Potential, a calculator used for...calculating the potential. More... | |
SimulationParameters & | parameters () |
get the SimulationParameters, a struct used for holding simulation parameters. More... | |
Random & | randomNumberGenerator () |
get the Random, used for creating random numbers More... | |
Logger & | logger () |
get the Logger, used for writing output More... | |
OpenClHelper & | opencl () |
get the OpenClHelper, used for calculating Coulomb interactions with a Graphics Card More... | |
QList< SourceAgent * > & | sources () |
get a list of all SourceAgents More... | |
QList< SourceAgent * > & | eSources () |
get a list of all ElectronSourceAgents More... | |
QList< SourceAgent * > & | hSources () |
get a list of all ElectronSourceAgents More... | |
QList< SourceAgent * > & | xSources () |
get a list of all ElectronSourceAgents More... | |
QList< DrainAgent * > & | drains () |
get a list of all DrainAgents More... | |
QList< DrainAgent * > & | eDrains () |
get a list of all ElectronSourceAgents More... | |
QList< DrainAgent * > & | hDrains () |
get a list of all ElectronSourceAgents More... | |
QList< DrainAgent * > & | xDrains () |
get a list of all ElectronSourceAgents More... | |
QList< FluxAgent * > & | fluxes () |
get a list of all FluxAgents More... | |
ElectronSourceAgent & | electronSourceAgentRight () |
get the right ElectronSourceAgent More... | |
ElectronSourceAgent & | electronSourceAgentLeft () |
get the left ElectronSourceAgent More... | |
HoleSourceAgent & | holeSourceAgentRight () |
get the right HoleSourceAgent More... | |
HoleSourceAgent & | holeSourceAgentLeft () |
get the left HoleSourceAgent More... | |
ExcitonSourceAgent & | excitonSourceAgent () |
get the RecombinationAgent More... | |
ElectronDrainAgent & | electronDrainAgentRight () |
get the right ElectronDrainAgent More... | |
ElectronDrainAgent & | electronDrainAgentLeft () |
get the left ElectronDrainAgent More... | |
HoleDrainAgent & | holeDrainAgentRight () |
get the right HoleDrainAgent More... | |
HoleDrainAgent & | holeDrainAgentLeft () |
get the left HoleDrainAgent More... | |
RecombinationAgent & | recombinationAgent () |
get the RecombinationAgent More... | |
QList< ChargeAgent * > & | electrons () |
get a list of all ElectronAgents More... | |
QList< ChargeAgent * > & | holes () |
get a list of all HoleAgents More... | |
QList< int > & | defectSiteIDs () |
get a list of all defect sites More... | |
QList< int > & | trapSiteIDs () |
get a list of all trap sites More... | |
QList< double > & | trapSitePotentials () |
get a list of all trap potentials More... | |
boost::multi_array< double, 3 > & | R1 () |
get the array of precomputed r-squared values More... | |
boost::multi_array< double, 3 > & | R2 () |
get the array of precomputed r values More... | |
boost::multi_array< double, 3 > & | iR () |
get the array of precomputed inverse-r values More... | |
boost::multi_array< double, 3 > & | eR () |
get the array of precomputed erf(r/(sqrt(2)*sigma)) More... | |
boost::multi_array< double, 3 > & | sI () |
get the self interactions More... | |
boost::multi_array< double, 3 > & | couplingConstants () |
get the coupling constants More... | |
int | maxElectronAgents () |
get the max number of ElectronAgents allowed More... | |
int | maxHoleAgents () |
get the max number of HoleAgents allowed More... | |
int | maxChargeAgents () |
get the max number of ChargeAgents allowed More... | |
int | maxChargeAgentsAndChargedDefects () |
get the max number of ChargeAgents & charged defects More... | |
int | maxDefects () |
get the max number of Defects allowed More... | |
int | maxTraps () |
get the max number of Traps allowed More... | |
int | numElectronAgents () |
get the current number of ElectronAgents More... | |
int | numHoleAgents () |
get the current number of HoleAgents More... | |
int | numChargeAgents () |
get the current number of ChargeAgents More... | |
int | electronsMinusHoles () |
The number of electrons - holes. More... | |
int | holesMinusElectrons () |
The number of holes - electrons. More... | |
bool | chargesAreBalanced () |
true when electrons and holes are balanced More... | |
int | numChargeAgentsAndChargedDefects () |
get the current number of ChargeAgents & charged defects More... | |
int | numDefects () |
get the current number of Defects More... | |
int | numTraps () |
get the current number of Traps More... | |
double | reachedChargeAgents () |
get the percent of ChargeAgents reached, of the max allowed More... | |
double | reachedElectronAgents () |
get the percent of ElectronAgents reached, of the max allowed More... | |
double | reachedHoleAgents () |
get the percent of HoleAgents reached, of the max allowed More... | |
double | percentHoleAgents () |
get the percent of HoleAgents reached, of the total grid volume More... | |
double | percentElectronAgents () |
get the percent of ElectronAgents reached, of the total grid volume More... | |
bool | atMaxElectrons () |
check if the maximum number of electrons has been reached More... | |
bool | atMaxHoles () |
check if the maximum number of holes has been reached More... | |
bool | atMaxCharges () |
check if the maximum number of charges has been reached More... | |
Private Member Functions | |
void | placeDefects (const QList< int > &siteIDs=QList< int >()) |
places defects More... | |
void | placeElectrons (const QList< int > &siteIDs=QList< int >()) |
places electrons More... | |
void | placeHoles (const QList< int > &siteIDs=QList< int >()) |
places holes More... | |
void | createSources () |
create SourceAgents More... | |
void | createDrains () |
create DrainAgents More... | |
void | setFluxInfo (const QList< quint64 > &fluxInfo) |
set attempts / successes for sources / drains More... | |
void | alterMaxThreads (int cores=-1) |
Change the number of cores used. More... | |
void | initialize (const QString &fileName="", SimulationParameters *pparameters=NULL, ConfigurationInfo *pconfigInfo=NULL, int cores=-1, int gpuID=-1) |
initialize all objects More... | |
Private Attributes | |
KeyValueParser * | m_keyValueParser |
pointer to KeyValueParser, used for parsing key=value pairs More... | |
CheckPointer * | m_checkPointer |
pointer to CheckPointer, used for reading/writing input(checkpoint) files More... | |
QList< SourceAgent * > | m_sources |
list of SourceAgents More... | |
QList< SourceAgent * > | m_eSources |
list of ElectronSourceAgents More... | |
QList< SourceAgent * > | m_hSources |
list of HoleSourceAgents More... | |
QList< SourceAgent * > | m_xSources |
list of ExcitonSourceAgents More... | |
QList< DrainAgent * > | m_drains |
list of DrainAgents More... | |
QList< DrainAgent * > | m_eDrains |
list of ElectronSourceAgents More... | |
QList< DrainAgent * > | m_hDrains |
list of HoleSourceAgents More... | |
QList< DrainAgent * > | m_xDrains |
list of ExcitonSourceAgents More... | |
QList< FluxAgent * > | m_fluxAgents |
list of all FluxAgents, such as SoureAgents, DrainAgents, etc. More... | |
ElectronSourceAgent * | m_electronSourceAgentRight |
pointer to right ElectronDrainAgent More... | |
ElectronSourceAgent * | m_electronSourceAgentLeft |
pointer to left ElectronDrainAgent More... | |
HoleSourceAgent * | m_holeSourceAgentRight |
pointer to right HoleDrainAgent More... | |
HoleSourceAgent * | m_holeSourceAgentLeft |
pointer to left HoleDrainAgent More... | |
ExcitonSourceAgent * | m_excitonSourceAgent |
pointer to ExcitonSourceAgent, used for injecting Excitons More... | |
ElectronDrainAgent * | m_electronDrainAgentRight |
pointer to right ElectronDrainAgent More... | |
ElectronDrainAgent * | m_electronDrainAgentLeft |
pointer to left ElectronDrainAgent More... | |
HoleDrainAgent * | m_holeDrainAgentRight |
pointer to right HoleDrainAgent More... | |
HoleDrainAgent * | m_holeDrainAgentLeft |
pointer to left HoleDrainAgent More... | |
RecombinationAgent * | m_recombinationAgent |
pointer to electron/hole RecombinationAgent, used for removing Excitons More... | |
Grid * | m_electronGrid |
pointer to electron Grid, used for keeping track of ElectronAgents More... | |
Grid * | m_holeGrid |
pointer to hole Grid, used for keeping track of HoleAgents More... | |
Random * | m_rand |
pointer to Random, used for generating random numbers More... | |
Potential * | m_potential |
pointer to Potential, used for calculating the potential More... | |
SimulationParameters * | m_parameters |
pointer to SimulationParameters More... | |
Logger * | m_logger |
pointer to Logger, used for output More... | |
OpenClHelper * | m_ocl |
pointer to OpenClHelper, used for Graphics Card calculations More... | |
QList< ChargeAgent * > | m_electrons |
list of electrons More... | |
QList< ChargeAgent * > | m_holes |
list of holes More... | |
QList< int > | m_defectSiteIDs |
list of defect sites More... | |
QList< int > | m_trapSiteIDs |
list of trap sites More... | |
QList< double > | m_trapSitePotentials |
list of trap potentials More... | |
boost::multi_array< double, 3 > | m_R2 |
array of precomputed r-squared values More... | |
boost::multi_array< double, 3 > | m_R1 |
array of precomputed r values More... | |
boost::multi_array< double, 3 > | m_iR |
array of precomputed inverse-r values More... | |
boost::multi_array< double, 3 > | m_eR |
array of precomputed erf(r/(s*sqrt(2)) values More... | |
boost::multi_array< double, 3 > | m_sI |
self interaction, which is 1/(4 pi e e0 r), with r=1 grid unit When a charge at it's future site interacts with other charges at their current site, the charge will interact with it's own current site. So, this value needs to be subtracted off. More... | |
boost::multi_array< double, 3 > | m_couplingConstants |
array of coupling constants More... | |
int | m_maxElectrons |
max number of electrons More... | |
int | m_maxHoles |
max number of holes More... | |
int | m_maxDefects |
max number of defects More... | |
int | m_maxTraps |
max number of traps More... | |
A class to hold all objects in a simulation.
LangmuirCore::World::World | ( | const QString & | fileName, |
int | cores = -1 , |
||
int | gpuID = -1 , |
||
QObject * | parent = 0 |
||
) |
create a world to simulate in
fileName | the input file name |
cores | number of CPU cores |
gpuID | OpenCL GPU id |
parent | QObject this belongs to |
Calls the initialize() function.
LangmuirCore::World::World | ( | SimulationParameters & | parameters, |
int | cores = -1 , |
||
int | gpuID = -1 , |
||
QObject * | parent = 0 |
||
) |
LangmuirCore::World::World | ( | SimulationParameters & | parameters, |
ConfigurationInfo & | configInfo, | ||
int | cores = -1 , |
||
int | gpuID = -1 , |
||
QObject * | parent = 0 |
||
) |
LangmuirCore::World::~World | ( | ) |
destroys the entire World, and everything in it...including you.
|
private |
Change the number of cores used.
cores | the number of cores |
bool LangmuirCore::World::atMaxCharges | ( | ) |
check if the maximum number of charges has been reached
bool LangmuirCore::World::atMaxElectrons | ( | ) |
check if the maximum number of electrons has been reached
bool LangmuirCore::World::atMaxHoles | ( | ) |
check if the maximum number of holes has been reached
bool LangmuirCore::World::chargesAreBalanced | ( | ) |
true when electrons and holes are balanced
CheckPointer& LangmuirCore::World::checkPointer | ( | ) |
get the CheckPointer, used for reading and writing input files.
boost::multi_array<double,3>& LangmuirCore::World::couplingConstants | ( | ) |
get the coupling constants
|
private |
create DrainAgents
|
private |
create SourceAgents
QList<int>& LangmuirCore::World::defectSiteIDs | ( | ) |
get a list of all defect sites
QList<DrainAgent*>& LangmuirCore::World::drains | ( | ) |
get a list of all DrainAgents
QList<DrainAgent*>& LangmuirCore::World::eDrains | ( | ) |
get a list of all ElectronSourceAgents
ElectronDrainAgent& LangmuirCore::World::electronDrainAgentLeft | ( | ) |
get the left ElectronDrainAgent
ElectronDrainAgent& LangmuirCore::World::electronDrainAgentRight | ( | ) |
get the right ElectronDrainAgent
QList<ChargeAgent*>& LangmuirCore::World::electrons | ( | ) |
get a list of all ElectronAgents
int LangmuirCore::World::electronsMinusHoles | ( | ) |
The number of electrons - holes.
ElectronSourceAgent& LangmuirCore::World::electronSourceAgentLeft | ( | ) |
get the left ElectronSourceAgent
ElectronSourceAgent& LangmuirCore::World::electronSourceAgentRight | ( | ) |
get the right ElectronSourceAgent
boost::multi_array<double,3>& LangmuirCore::World::eR | ( | ) |
get the array of precomputed erf(r/(sqrt(2)*sigma))
QList<SourceAgent*>& LangmuirCore::World::eSources | ( | ) |
get a list of all ElectronSourceAgents
ExcitonSourceAgent& LangmuirCore::World::excitonSourceAgent | ( | ) |
get the RecombinationAgent
QList<FluxAgent*>& LangmuirCore::World::fluxes | ( | ) |
get a list of all FluxAgents
QList<DrainAgent*>& LangmuirCore::World::hDrains | ( | ) |
get a list of all ElectronSourceAgents
HoleDrainAgent& LangmuirCore::World::holeDrainAgentLeft | ( | ) |
get the left HoleDrainAgent
HoleDrainAgent& LangmuirCore::World::holeDrainAgentRight | ( | ) |
get the right HoleDrainAgent
QList<ChargeAgent*>& LangmuirCore::World::holes | ( | ) |
get a list of all HoleAgents
int LangmuirCore::World::holesMinusElectrons | ( | ) |
The number of holes - electrons.
HoleSourceAgent& LangmuirCore::World::holeSourceAgentLeft | ( | ) |
get the left HoleSourceAgent
HoleSourceAgent& LangmuirCore::World::holeSourceAgentRight | ( | ) |
get the right HoleSourceAgent
QList<SourceAgent*>& LangmuirCore::World::hSources | ( | ) |
get a list of all ElectronSourceAgents
|
private |
initialize all objects
fileName | input file name |
pparameters | pointer to a parameters object |
pconfigInfo | pointer to a configuration info object |
cores | number of CPU cores |
gpuID | OpenCL GPU id |
A very long, though not all that complicated function that creates all the simulation objects. Best to read through it in the source code.
boost::multi_array<double,3>& LangmuirCore::World::iR | ( | ) |
get the array of precomputed inverse-r values
KeyValueParser& LangmuirCore::World::keyValueParser | ( | ) |
get the KeyValueParser, used for parsing input files.
int LangmuirCore::World::maxChargeAgents | ( | ) |
get the max number of ChargeAgents allowed
int LangmuirCore::World::maxChargeAgentsAndChargedDefects | ( | ) |
get the max number of ChargeAgents & charged defects
int LangmuirCore::World::maxDefects | ( | ) |
get the max number of Defects allowed
int LangmuirCore::World::maxElectronAgents | ( | ) |
get the max number of ElectronAgents allowed
int LangmuirCore::World::maxHoleAgents | ( | ) |
get the max number of HoleAgents allowed
int LangmuirCore::World::maxTraps | ( | ) |
get the max number of Traps allowed
int LangmuirCore::World::numChargeAgents | ( | ) |
get the current number of ChargeAgents
int LangmuirCore::World::numChargeAgentsAndChargedDefects | ( | ) |
get the current number of ChargeAgents & charged defects
int LangmuirCore::World::numDefects | ( | ) |
get the current number of Defects
int LangmuirCore::World::numElectronAgents | ( | ) |
get the current number of ElectronAgents
int LangmuirCore::World::numHoleAgents | ( | ) |
get the current number of HoleAgents
int LangmuirCore::World::numTraps | ( | ) |
get the current number of Traps
OpenClHelper& LangmuirCore::World::opencl | ( | ) |
get the OpenClHelper, used for calculating Coulomb interactions with a Graphics Card
SimulationParameters& LangmuirCore::World::parameters | ( | ) |
get the SimulationParameters, a struct used for holding simulation parameters.
double LangmuirCore::World::percentElectronAgents | ( | ) |
get the percent of ElectronAgents reached, of the total grid volume
double LangmuirCore::World::percentHoleAgents | ( | ) |
get the percent of HoleAgents reached, of the total grid volume
|
private |
places defects
siteIDs | a list of defect site ids |
Places carriers according to the site ids passed. If more need placing (according to SimulationParameters::seedCharges), then they are placed randomly.
|
private |
places electrons
siteIDs | a list of electron site ids |
Places carriers according to the site ids passed. If more need placing (according to SimulationParameters::seedCharges), then they are placed randomly.
|
private |
places holes
siteIDs | a list of hole site ids |
Places carriers according to the site ids passed. If more need placing (according to SimulationParameters::seedCharges), then they are placed randomly.
Potential& LangmuirCore::World::potential | ( | ) |
get the Potential, a calculator used for...calculating the potential.
boost::multi_array<double,3>& LangmuirCore::World::R1 | ( | ) |
get the array of precomputed r-squared values
boost::multi_array<double,3>& LangmuirCore::World::R2 | ( | ) |
get the array of precomputed r values
Random& LangmuirCore::World::randomNumberGenerator | ( | ) |
get the Random, used for creating random numbers
double LangmuirCore::World::reachedChargeAgents | ( | ) |
get the percent of ChargeAgents reached, of the max allowed
double LangmuirCore::World::reachedElectronAgents | ( | ) |
get the percent of ElectronAgents reached, of the max allowed
double LangmuirCore::World::reachedHoleAgents | ( | ) |
get the percent of HoleAgents reached, of the max allowed
RecombinationAgent& LangmuirCore::World::recombinationAgent | ( | ) |
get the RecombinationAgent
|
private |
set attempts / successes for sources / drains
boost::multi_array<double, 3>& LangmuirCore::World::sI | ( | ) |
get the self interactions
QList<SourceAgent*>& LangmuirCore::World::sources | ( | ) |
get a list of all SourceAgents
QList<int>& LangmuirCore::World::trapSiteIDs | ( | ) |
get a list of all trap sites
QList<double>& LangmuirCore::World::trapSitePotentials | ( | ) |
get a list of all trap potentials
QList<DrainAgent*>& LangmuirCore::World::xDrains | ( | ) |
get a list of all ElectronSourceAgents
QList<SourceAgent*>& LangmuirCore::World::xSources | ( | ) |
get a list of all ElectronSourceAgents
|
private |
pointer to CheckPointer, used for reading/writing input(checkpoint) files
|
private |
array of coupling constants
This array is indexed by dx, dy, dz values.
|
private |
list of defect sites
|
private |
list of DrainAgents
|
private |
list of ElectronSourceAgents
|
private |
pointer to left ElectronDrainAgent
|
private |
pointer to right ElectronDrainAgent
|
private |
pointer to electron Grid, used for keeping track of ElectronAgents
|
private |
list of electrons
|
private |
pointer to left ElectronDrainAgent
|
private |
pointer to right ElectronDrainAgent
|
private |
array of precomputed erf(r/(s*sqrt(2)) values
This array is indexed by dx, dy, dz values, and r is in grid-units
|
private |
list of ElectronSourceAgents
|
private |
pointer to ExcitonSourceAgent, used for injecting Excitons
|
private |
list of all FluxAgents, such as SoureAgents, DrainAgents, etc.
|
private |
list of HoleSourceAgents
|
private |
pointer to left HoleDrainAgent
|
private |
pointer to right HoleDrainAgent
|
private |
pointer to hole Grid, used for keeping track of HoleAgents
|
private |
list of holes
|
private |
pointer to left HoleDrainAgent
|
private |
pointer to right HoleDrainAgent
|
private |
list of HoleSourceAgents
|
private |
array of precomputed inverse-r values
This array is indexed by dx, dy, dz values, and r is in grid-units
|
private |
pointer to KeyValueParser, used for parsing key=value pairs
|
private |
max number of defects
|
private |
max number of electrons
|
private |
max number of holes
|
private |
max number of traps
|
private |
pointer to OpenClHelper, used for Graphics Card calculations
|
private |
pointer to SimulationParameters
|
private |
pointer to Potential, used for calculating the potential
|
private |
array of precomputed r values
This array is indexed by dx, dy, dz values, and r is in grid-units
|
private |
array of precomputed r-squared values
This array is indexed by dx, dy, dz values, and r is in grid-units
|
private |
pointer to electron/hole RecombinationAgent, used for removing Excitons
|
private |
self interaction, which is 1/(4 pi e e0 r), with r=1 grid unit When a charge at it's future site interacts with other charges at their current site, the charge will interact with it's own current site. So, this value needs to be subtracted off.
|
private |
list of SourceAgents
|
private |
list of trap sites
|
private |
list of trap potentials
|
private |
list of ExcitonSourceAgents
|
private |
list of ExcitonSourceAgents