BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Collect the different options for simulation. More...
Public Member Functions | |
SimulationOptions () | |
unsigned | getCurrentBatch () const |
unsigned | getHardwareConcurrency () const |
size_t | getMcPoints () const |
unsigned | getNumberOfBatches () const |
unsigned | getNumberOfThreads () const |
bool | includeSpecular () const |
bool | isIntegrate () const |
void | setIncludeSpecular (bool include_specular) |
void | setMonteCarloIntegration (bool flag=true, size_t mc_points=50) |
Enables/disables MonetCarlo integration. More... | |
void | setNumberOfBatches (int nbatches) |
Sets number of batches to split. More... | |
void | setNumberOfThreads (int nthreads) |
Sets number of threads to use during the simulation (0 - take the default value from the hardware) More... | |
void | setThreadInfo (const ThreadInfo &thread_info) |
Sets the batch and thread information to be used. More... | |
void | setUseAvgMaterials (bool use_avg_materials) |
bool | useAvgMaterials () const |
Private Attributes | |
bool | m_include_specular |
bool | m_mc_integration |
size_t | m_mc_points |
ThreadInfo | m_thread_info |
bool | m_use_avg_materials |
Collect the different options for simulation.
Definition at line 27 of file SimulationOptions.h.
SimulationOptions::SimulationOptions | ( | ) |
Definition at line 19 of file SimulationOptions.cpp.
References getHardwareConcurrency(), m_thread_info, and ThreadInfo::n_threads.
unsigned SimulationOptions::getCurrentBatch | ( | ) | const |
Definition at line 70 of file SimulationOptions.cpp.
References ThreadInfo::current_batch, getNumberOfBatches(), and m_thread_info.
Referenced by ISimulation::runSimulation().
unsigned SimulationOptions::getHardwareConcurrency | ( | ) | const |
Definition at line 78 of file SimulationOptions.cpp.
Referenced by SimulationOptions(), and setNumberOfThreads().
|
inline |
Definition at line 32 of file SimulationOptions.h.
References m_mc_points.
Referenced by IInterferenceFunctionStrategy::MCIntegratedEvaluate(), and GUIObjectBuilder::populateDocumentModel().
unsigned SimulationOptions::getNumberOfBatches | ( | ) | const |
Definition at line 62 of file SimulationOptions.cpp.
References m_thread_info, and ThreadInfo::n_batches.
Referenced by getCurrentBatch(), and ISimulation::runSimulation().
unsigned SimulationOptions::getNumberOfThreads | ( | ) | const |
Definition at line 46 of file SimulationOptions.cpp.
References m_thread_info, and ThreadInfo::n_threads.
Referenced by ISimulation::runSingleSimulation().
|
inline |
Definition at line 59 of file SimulationOptions.h.
References m_include_specular.
Referenced by DWBAComputation::DWBAComputation(), and GUIObjectBuilder::populateDocumentModel().
bool SimulationOptions::isIntegrate | ( | ) | const |
Definition at line 25 of file SimulationOptions.cpp.
References m_mc_integration, and m_mc_points.
Referenced by IInterferenceFunctionStrategy::evaluate(), and GUIObjectBuilder::populateDocumentModel().
|
inline |
Definition at line 57 of file SimulationOptions.h.
References m_include_specular.
Referenced by StandardSimulations::MiniGISASSpecularPeak(), and TransformToDomain::setSimulationOptions().
void SimulationOptions::setMonteCarloIntegration | ( | bool | flag = true , |
size_t | mc_points = 50 |
||
) |
Enables/disables MonetCarlo integration.
flag | If true, MonteCarlo integration will be used, otherwise analytical calculations |
mc_points | Number of points for MonteCarlo integrator |
Definition at line 30 of file SimulationOptions.cpp.
References m_mc_integration, and m_mc_points.
Referenced by StandardSimulations::MiniGISASMonteCarlo(), and TransformToDomain::setSimulationOptions().
void SimulationOptions::setNumberOfBatches | ( | int | nbatches | ) |
Sets number of batches to split.
Definition at line 54 of file SimulationOptions.cpp.
References m_thread_info, and ThreadInfo::n_batches.
void SimulationOptions::setNumberOfThreads | ( | int | nthreads | ) |
Sets number of threads to use during the simulation (0 - take the default value from the hardware)
Definition at line 36 of file SimulationOptions.cpp.
References getHardwareConcurrency(), m_thread_info, and ThreadInfo::n_threads.
Referenced by TransformToDomain::setSimulationOptions().
|
inline |
Sets the batch and thread information to be used.
Definition at line 53 of file SimulationOptions.h.
References m_thread_info.
|
inline |
Definition at line 61 of file SimulationOptions.h.
References m_use_avg_materials.
Referenced by swigAPI::defaultMaterialProfileLimits(), swigAPI::materialProfileSLD(), and TransformToDomain::setSimulationOptions().
|
inline |
Definition at line 63 of file SimulationOptions.h.
References m_use_avg_materials.
Referenced by ProcessedSample::initFresnelMap(), ProcessedSample::initSlices(), and GUIObjectBuilder::populateDocumentModel().
|
private |
Definition at line 67 of file SimulationOptions.h.
Referenced by includeSpecular(), and setIncludeSpecular().
|
private |
Definition at line 66 of file SimulationOptions.h.
Referenced by isIntegrate(), and setMonteCarloIntegration().
|
private |
Definition at line 69 of file SimulationOptions.h.
Referenced by getMcPoints(), isIntegrate(), and setMonteCarloIntegration().
|
private |
Definition at line 70 of file SimulationOptions.h.
Referenced by SimulationOptions(), getCurrentBatch(), getNumberOfBatches(), getNumberOfThreads(), setNumberOfBatches(), setNumberOfThreads(), and setThreadInfo().
|
private |
Definition at line 68 of file SimulationOptions.h.
Referenced by setUseAvgMaterials(), and useAvgMaterials().