3 #define BOOST_DISABLE_ASSERTS
10 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
11 #pragma GCC diagnostic push
12 #pragma GCC system_header
15 #include "boost/multi_array.hpp"
17 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
18 #pragma GCC diagnostic pop
35 class ElectronDrainAgent;
36 class RecombinationAgent;
40 class HoleSourceAgent;
41 class ExcitonSourceAgent;
42 class ElectronSourceAgent;
45 struct SimulationParameters;
46 struct ConfigurationInfo;
67 World(
const QString& fileName,
int cores=-1,
int gpuID=-1, QObject *parent = 0);
124 QList<SourceAgent*>&
sources();
144 QList<DrainAgent*>&
drains();
164 QList<FluxAgent*>&
fluxes();
224 QList<ChargeAgent*>&
holes();
244 boost::multi_array<double,3>&
R1();
249 boost::multi_array<double,3>&
R2();
254 boost::multi_array<double,3>&
iR();
259 boost::multi_array<double,3>&
eR();
264 boost::multi_array<double, 3>&
sI();
557 boost::multi_array<double,3>
m_R2;
564 boost::multi_array<double,3>
m_R1;
571 boost::multi_array<double,3>
m_iR;
578 boost::multi_array<double,3>
m_eR;
586 boost::multi_array<double, 3>
m_sI;
623 void placeDefects(
const QList<int>& siteIDs = QList<int>());
643 void placeHoles(
const QList<int>& siteIDs = QList<int>());
679 int cores = -1,
int gpuID = -1);
ElectronSourceAgent * m_electronSourceAgentRight
pointer to right ElectronDrainAgent
Definition: world.h:445
boost::multi_array< double, 3 > m_couplingConstants
array of coupling constants
Definition: world.h:593
bool atMaxElectrons()
check if the maximum number of electrons has been reached
int maxChargeAgents()
get the max number of ChargeAgents allowed
double percentHoleAgents()
get the percent of HoleAgents reached, of the total grid volume
void createDrains()
create DrainAgents
Grid & holeGrid()
get the hole Grid, used for holding HoleAgents
int m_maxTraps
max number of traps
Definition: world.h:613
Grid * m_holeGrid
pointer to hole Grid, used for keeping track of HoleAgents
Definition: world.h:500
bool atMaxHoles()
check if the maximum number of holes has been reached
bool atMaxCharges()
check if the maximum number of charges has been reached
int numChargeAgents()
get the current number of ChargeAgents
QList< SourceAgent * > & xSources()
get a list of all ElectronSourceAgents
A class to generate random numbers.
Definition: rand.h:31
A class to inject HoleAgents.
Definition: sourceagent.h:134
SimulationParameters & parameters()
get the SimulationParameters, a struct used for holding simulation parameters.
double percentElectronAgents()
get the percent of ElectronAgents reached, of the total grid volume
void setFluxInfo(const QList< quint64 > &fluxInfo)
set attempts / successes for sources / drains
int m_maxElectrons
max number of electrons
Definition: world.h:598
HoleSourceAgent * m_holeSourceAgentRight
pointer to right HoleDrainAgent
Definition: world.h:455
boost::multi_array< double, 3 > & iR()
get the array of precomputed inverse-r values
A class to remove HoleAgents.
Definition: drainagent.h:62
A class to read and write checkpoint files.
Definition: checkpointer.h:20
RecombinationAgent & recombinationAgent()
get the RecombinationAgent
QList< int > & trapSiteIDs()
get a list of all trap sites
QList< SourceAgent * > & sources()
get a list of all SourceAgents
int maxDefects()
get the max number of Defects allowed
HoleSourceAgent & holeSourceAgentLeft()
get the left HoleSourceAgent
QList< DrainAgent * > m_eDrains
list of ElectronSourceAgents
Definition: world.h:425
A class to hold Agents, calculate their positions, and store the background potential.
Definition: cubicgrid.h:35
A class to remove Excitons.
Definition: drainagent.h:93
ElectronSourceAgent & electronSourceAgentLeft()
get the left ElectronSourceAgent
KeyValueParser * m_keyValueParser
pointer to KeyValueParser, used for parsing key=value pairs
Definition: world.h:390
KeyValueParser & keyValueParser()
get the KeyValueParser, used for parsing input files.
QList< DrainAgent * > m_hDrains
list of HoleSourceAgents
Definition: world.h:430
~World()
destroys the entire World, and everything in it...including you.
boost::multi_array< double, 3 > & sI()
get the self interactions
A class to inject Excitons.
Definition: sourceagent.h:166
QList< DrainAgent * > & xDrains()
get a list of all ElectronSourceAgents
Grid & electronGrid()
get the Grid used, used for holding ElectronAgents
A class that organizes output.
Definition: writer.h:156
QList< SourceAgent * > m_xSources
list of ExcitonSourceAgents
Definition: world.h:415
CheckPointer * m_checkPointer
pointer to CheckPointer, used for reading/writing input(checkpoint) files
Definition: world.h:395
QList< FluxAgent * > & fluxes()
get a list of all FluxAgents
void placeDefects(const QList< int > &siteIDs=QList< int >())
places defects
Logger & logger()
get the Logger, used for writing output
int m_maxHoles
max number of holes
Definition: world.h:603
A class to remove ElectronAgents.
Definition: drainagent.h:36
QList< int > & defectSiteIDs()
get a list of all defect sites
bool chargesAreBalanced()
true when electrons and holes are balanced
void createSources()
create SourceAgents
void placeHoles(const QList< int > &siteIDs=QList< int >())
places holes
ElectronDrainAgent & electronDrainAgentRight()
get the right ElectronDrainAgent
A class to hold all objects in a simulation.
Definition: world.h:51
QList< SourceAgent * > & eSources()
get a list of all ElectronSourceAgents
QList< SourceAgent * > m_hSources
list of HoleSourceAgents
Definition: world.h:410
boost::multi_array< double, 3 > m_R2
array of precomputed r-squared values
Definition: world.h:557
QList< int > m_defectSiteIDs
list of defect sites
Definition: world.h:540
boost::multi_array< double, 3 > & R1()
get the array of precomputed r-squared values
QList< ChargeAgent * > m_holes
list of holes
Definition: world.h:535
World(const QString &fileName, int cores=-1, int gpuID=-1, QObject *parent=0)
create a world to simulate in
void placeElectrons(const QList< int > &siteIDs=QList< int >())
places electrons
Random * m_rand
pointer to Random, used for generating random numbers
Definition: world.h:505
ElectronDrainAgent * m_electronDrainAgentLeft
pointer to left ElectronDrainAgent
Definition: world.h:475
QList< SourceAgent * > m_sources
list of SourceAgents
Definition: world.h:400
boost::multi_array< double, 3 > & eR()
get the array of precomputed erf(r/(sqrt(2)*sigma))
HoleDrainAgent * m_holeDrainAgentRight
pointer to right HoleDrainAgent
Definition: world.h:480
QList< ChargeAgent * > m_electrons
list of electrons
Definition: world.h:530
boost::multi_array< double, 3 > & couplingConstants()
get the coupling constants
ExcitonSourceAgent * m_excitonSourceAgent
pointer to ExcitonSourceAgent, used for injecting Excitons
Definition: world.h:465
QList< DrainAgent * > & hDrains()
get a list of all ElectronSourceAgents
int m_maxDefects
max number of defects
Definition: world.h:608
ExcitonSourceAgent & excitonSourceAgent()
get the RecombinationAgent
QList< double > m_trapSitePotentials
list of trap potentials
Definition: world.h:550
HoleDrainAgent * m_holeDrainAgentLeft
pointer to left HoleDrainAgent
Definition: world.h:485
boost::multi_array< double, 3 > m_iR
array of precomputed inverse-r values
Definition: world.h:571
int numDefects()
get the current number of Defects
A struct to temporarily store site IDs.
Definition: parameters.h:14
boost::multi_array< double, 3 > m_R1
array of precomputed r values
Definition: world.h:564
Potential & potential()
get the Potential, a calculator used for...calculating the potential.
RecombinationAgent * m_recombinationAgent
pointer to electron/hole RecombinationAgent, used for removing Excitons
Definition: world.h:490
int maxTraps()
get the max number of Traps allowed
Random & randomNumberGenerator()
get the Random, used for creating random numbers
OpenClHelper & opencl()
get the OpenClHelper, used for calculating Coulomb interactions with a Graphics Card ...
double reachedChargeAgents()
get the percent of ChargeAgents reached, of the max allowed
A struct to store all simulation options.
Definition: parameters.h:46
ElectronSourceAgent * m_electronSourceAgentLeft
pointer to left ElectronDrainAgent
Definition: world.h:450
OpenClHelper * m_ocl
pointer to OpenClHelper, used for Graphics Card calculations
Definition: world.h:525
A class to run OpenCL calculations.
Definition: openclhelper.h:21
QList< ChargeAgent * > & holes()
get a list of all HoleAgents
QList< DrainAgent * > m_xDrains
list of ExcitonSourceAgents
Definition: world.h:435
double reachedHoleAgents()
get the percent of HoleAgents reached, of the max allowed
int numTraps()
get the current number of Traps
int maxElectronAgents()
get the max number of ElectronAgents allowed
QList< DrainAgent * > & eDrains()
get a list of all ElectronSourceAgents
int numElectronAgents()
get the current number of ElectronAgents
ElectronDrainAgent & electronDrainAgentLeft()
get the left ElectronDrainAgent
Grid * m_electronGrid
pointer to electron Grid, used for keeping track of ElectronAgents
Definition: world.h:495
CheckPointer & checkPointer()
get the CheckPointer, used for reading and writing input files.
void initialize(const QString &fileName="", SimulationParameters *pparameters=NULL, ConfigurationInfo *pconfigInfo=NULL, int cores=-1, int gpuID=-1)
initialize all objects
QList< DrainAgent * > & drains()
get a list of all DrainAgents
ElectronSourceAgent & electronSourceAgentRight()
get the right ElectronSourceAgent
QList< SourceAgent * > m_eSources
list of ElectronSourceAgents
Definition: world.h:405
double reachedElectronAgents()
get the percent of ElectronAgents reached, of the max allowed
void alterMaxThreads(int cores=-1)
Change the number of cores used.
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 inte...
Definition: world.h:586
HoleSourceAgent & holeSourceAgentRight()
get the right HoleSourceAgent
int numHoleAgents()
get the current number of HoleAgents
QList< FluxAgent * > m_fluxAgents
list of all FluxAgents, such as SoureAgents, DrainAgents, etc.
Definition: world.h:440
int maxHoleAgents()
get the max number of HoleAgents allowed
QList< SourceAgent * > & hSources()
get a list of all ElectronSourceAgents
A class to calculate the potential.
Definition: potential.h:31
QList< double > & trapSitePotentials()
get a list of all trap potentials
Logger * m_logger
pointer to Logger, used for output
Definition: world.h:520
ElectronDrainAgent * m_electronDrainAgentRight
pointer to right ElectronDrainAgent
Definition: world.h:470
boost::multi_array< double, 3 > & R2()
get the array of precomputed r values
int electronsMinusHoles()
The number of electrons - holes.
QList< DrainAgent * > m_drains
list of DrainAgents
Definition: world.h:420
int maxChargeAgentsAndChargedDefects()
get the max number of ChargeAgents & charged defects
QList< ChargeAgent * > & electrons()
get a list of all ElectronAgents
int numChargeAgentsAndChargedDefects()
get the current number of ChargeAgents & charged defects
A class to read the parameters and store them in the correct place.
Definition: keyvalueparser.h:27
HoleSourceAgent * m_holeSourceAgentLeft
pointer to left HoleDrainAgent
Definition: world.h:460
QList< int > m_trapSiteIDs
list of trap sites
Definition: world.h:545
SimulationParameters * m_parameters
pointer to SimulationParameters
Definition: world.h:515
int holesMinusElectrons()
The number of holes - electrons.
boost::multi_array< double, 3 > m_eR
array of precomputed erf(r/(s*sqrt(2)) values
Definition: world.h:578
A class to inject ElectronAgents.
Definition: sourceagent.h:102
Potential * m_potential
pointer to Potential, used for calculating the potential
Definition: world.h:510
HoleDrainAgent & holeDrainAgentLeft()
get the left HoleDrainAgent
HoleDrainAgent & holeDrainAgentRight()
get the right HoleDrainAgent