BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ISimulation Class Referenceabstract

Description

Abstract base class, holds the infrastructure to run a simulation.

Base class of SpecularSimulation, ISimulation2D and DepthProbeSimulation.

Holds an instrument and sample model. Provides the common infrastructure to run a simulation: multithreading, batch processing, averaging over parameter distributions, etc.

Simulations are run, and results returned, by the function ISimulation::simulate().

Inheritance diagram for ISimulation:

Public Member Functions

 ISimulation (const ISimulation &)=delete
 
 ISimulation (const MultiLayer &sample)
 
 ISimulation (ISimulation &&)=default
 
 ~ISimulation () override
 
void addParameterDistribution (const ParameterDistribution &par_distr)
 
void addParameterDistribution (ParameterDistribution::WhichParameter whichParameter, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits())
 
virtual bool force_polarized () const =0
 Force polarized computation even in absence of sample magnetization or external fields. More...
 
SimulationOptions & options ()
 
const SimulationOptions & options () const
 
void setBackground (const IBackground &bg)
 
void setTerminalProgressMonitor ()
 
SimulationResult simulate ()
 Run a simulation, and return the result. More...
 

Constructor & Destructor Documentation

◆ ISimulation() [1/3]

ISimulation::ISimulation ( const MultiLayer sample)

◆ ~ISimulation()

ISimulation::~ISimulation ( )
override

◆ ISimulation() [2/3]

ISimulation::ISimulation ( const ISimulation )
delete

◆ ISimulation() [3/3]

ISimulation::ISimulation ( ISimulation &&  )
default

Member Function Documentation

◆ addParameterDistribution() [1/2]

void ISimulation::addParameterDistribution ( const ParameterDistribution par_distr)

◆ addParameterDistribution() [2/2]

void ISimulation::addParameterDistribution ( ParameterDistribution::WhichParameter  whichParameter,
const IDistribution1D &  distribution,
size_t  nbr_samples,
double  sigma_factor = 0.0,
const RealLimits limits = RealLimits() 
)

◆ force_polarized()

virtual bool ISimulation::force_polarized ( ) const
pure virtual

Force polarized computation even in absence of sample magnetization or external fields.

Implemented in SpecularSimulation, ISimulation2D, and DepthProbeSimulation.

◆ options() [1/2]

SimulationOptions& ISimulation::options ( )

◆ options() [2/2]

const SimulationOptions& ISimulation::options ( ) const

◆ setBackground()

void ISimulation::setBackground ( const IBackground bg)

◆ setTerminalProgressMonitor()

void ISimulation::setTerminalProgressMonitor ( )

◆ simulate()

SimulationResult ISimulation::simulate ( )

Run a simulation, and return the result.