BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
SimulationOptions () | |
bool | isIntegrate () const |
size_t | getMcPoints () const |
void | setMonteCarloIntegration (bool flag=true, size_t mc_points=50) |
void | setNumberOfThreads (int nthreads) |
unsigned | getNumberOfThreads () const |
void | setNumberOfBatches (int nbatches) |
unsigned | getNumberOfBatches () const |
unsigned | getCurrentBatch () const |
void | setThreadInfo (const ThreadInfo &thread_info) |
unsigned | getHardwareConcurrency () const |
void | setIncludeSpecular (bool include_specular) |
bool | includeSpecular () const |
void | setUseAvgMaterials (bool use_avg_materials) |
bool | useAvgMaterials () const |
Private Attributes | |
bool | m_mc_integration |
bool | m_include_specular |
bool | m_use_avg_materials |
size_t | m_mc_points |
ThreadInfo | m_thread_info |
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.
bool SimulationOptions::isIntegrate | ( | ) | const |
Definition at line 25 of file SimulationOptions.cpp.
References m_mc_integration, and m_mc_points.
Referenced by anonymous_namespace{ProcessedSample.cpp}::CreateFresnelMap(), SimulationToPython::defineSimulationOptions(), and IInterferenceFunctionStrategy::evaluate().
|
inline |
Definition at line 33 of file SimulationOptions.h.
References m_mc_points.
Referenced by SimulationToPython::defineSimulationOptions(), and IInterferenceFunctionStrategy::MCIntegratedEvaluate().
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().
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.
unsigned SimulationOptions::getNumberOfThreads | ( | ) | const |
Definition at line 46 of file SimulationOptions.cpp.
References m_thread_info, and ThreadInfo::n_threads.
Referenced by SimulationToPython::defineSimulationOptions(), and Simulation::runSingleSimulation().
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.
unsigned SimulationOptions::getNumberOfBatches | ( | ) | const |
Definition at line 62 of file SimulationOptions.cpp.
References m_thread_info, and ThreadInfo::n_batches.
Referenced by getCurrentBatch(), and Simulation::runSimulation().
unsigned SimulationOptions::getCurrentBatch | ( | ) | const |
Definition at line 70 of file SimulationOptions.cpp.
References ThreadInfo::current_batch, getNumberOfBatches(), and m_thread_info.
Referenced by Simulation::runSimulation().
|
inline |
Sets the batch and thread information to be used.
Definition at line 54 of file SimulationOptions.h.
References m_thread_info.
unsigned SimulationOptions::getHardwareConcurrency | ( | ) | const |
Definition at line 78 of file SimulationOptions.cpp.
Referenced by SimulationToPython::defineSimulationOptions(), setNumberOfThreads(), and SimulationOptions().
|
inline |
Definition at line 58 of file SimulationOptions.h.
References m_include_specular.
Referenced by StandardSimulations::MiniGISASSpecularPeak().
|
inline |
Definition at line 60 of file SimulationOptions.h.
References m_include_specular.
Referenced by SimulationToPython::defineSimulationOptions(), and DWBAComputation::DWBAComputation().
|
inline |
Definition at line 62 of file SimulationOptions.h.
References m_use_avg_materials.
Referenced by DefaultMaterialProfileLimits(), and MaterialProfile().
|
inline |
Definition at line 64 of file SimulationOptions.h.
References m_use_avg_materials.
Referenced by SimulationToPython::defineSimulationOptions(), ProcessedSample::initFresnelMap(), and ProcessedSample::initSlices().
|
private |
Definition at line 67 of file SimulationOptions.h.
Referenced by isIntegrate(), and setMonteCarloIntegration().
|
private |
Definition at line 68 of file SimulationOptions.h.
Referenced by includeSpecular(), and setIncludeSpecular().
|
private |
Definition at line 69 of file SimulationOptions.h.
Referenced by setUseAvgMaterials(), and useAvgMaterials().
|
private |
Definition at line 70 of file SimulationOptions.h.
Referenced by getMcPoints(), isIntegrate(), and setMonteCarloIntegration().
|
private |
Definition at line 71 of file SimulationOptions.h.
Referenced by getCurrentBatch(), getNumberOfBatches(), getNumberOfThreads(), setNumberOfBatches(), setNumberOfThreads(), setThreadInfo(), and SimulationOptions().