|
Open PaperOpt
|
#include <SimVolume.h>

Public Member Functions | |
| SimVolume () | |
| virtual | ~SimVolume () |
| int | Process (WavePacket &wp) |
Public Attributes | |
| std::vector< LightSource * > | mLight |
| std::vector< float > | mLambda |
| int | mNbrWp |
| StructureObject * | mFirstPo |
| StructureObject * | mLastPo |
| Detector * | mFirstDetec |
SimVolume organises the different objects in the simulated structure. It contains the different light sources, objects (surfaces and layers), and detectors in the simulation. It points to the first object, which is surrounding medium above the simulated structure to get the incoming refractive index, and to the first detector. Each object points to its previous and next object and the same applies to detectors.
| SimVolume::SimVolume | ( | ) |
| SimVolume::~SimVolume | ( | ) | [virtual] |
| int SimVolume::Process | ( | WavePacket & | wp | ) |
The Process method called after light source generation in the main program is the scattering simulation main function. It sends the wave packet to the top surface and then to the other layers and surfaces until the wave packet reached the first object (top surrounding), the last object (bottom surrounding), or has been absorbed.
Calculate first surface scattering This will return the number of objects that the wp will go through in case of zero thickness layers. If the next layer performs surface scattering, i.e. surface scattering is performed by layer's components, move the wavepacket to the surface position and go to next object without surface scattering
Find the first object that wp enter. wp is going down
Process wp until it leaves the structure Stop if more than 700 loops TODO: set max number as a parameter
Check wether surface scattering is controlled by surface object or layer's components
Process in the current paper object returns >0 if going up, <0 if going down absoolute value is the number of objects the wp went through (in case of zero thickness layers)
Get the next PO
Set the state of the wp before leaving TRA or REF


First detector in the simulation volume Each detector points then to its previous and next detector Last detector's next is NULL
First object in the simulation volume Each object points then to its previous and next object mFirstPo is a HomogeneousLayer representing the surrounding medium on top of the structure (mainly for refractive index).
| std::vector<float> SimVolume::mLambda |
simulated wavelenghts
Last object in the simulation volume
| std::vector<LightSource*> SimVolume::mLight |
Lights sources to be simulated