BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
Simulation () | |
virtual | ~Simulation () |
virtual Simulation * | clone () const =0 |
virtual void | prepareSimulation () |
void | runSimulation () |
void | runMPISimulation () |
void | setInstrument (const Instrument &instrument_) |
const Instrument & | instrument () const |
Instrument & | instrument () |
void | setBeamIntensity (double intensity) |
double | getBeamIntensity () const |
void | setBeamPolarization (const kvector_t bloch_vector) |
void | setDetectorResolutionFunction (const IResolutionFunction2D &resolution_function) |
void | removeDetectorResolutionFunction () |
void | setAnalyzerProperties (const kvector_t direction, double efficiency, double total_transmission) |
void | setSample (const MultiLayer &sample) |
const MultiLayer * | sample () const |
void | setSampleBuilder (const std::shared_ptr< ISampleBuilder > &sample_builder) |
void | setBackground (const IBackground &bg) |
const IBackground * | background () const |
virtual size_t | intensityMapSize () const =0 |
virtual SimulationResult | result () const =0 |
void | addParameterDistribution (const std::string ¶m_name, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits()) |
void | addParameterDistribution (const ParameterDistribution &par_distr) |
const DistributionHandler & | getDistributionHandler () const |
void | setOptions (const SimulationOptions &options) |
const SimulationOptions & | getOptions () const |
SimulationOptions & | getOptions () |
void | subscribe (ProgressHandler::Callback_t inform) |
void | setTerminalProgressMonitor () |
std::vector< const INode * > | getChildren () const |
SimulationResult | convertData (const OutputData< double > &data, bool put_masked_areas_to_zero=true) |
virtual void | transferToCPP () |
virtual void | accept (INodeVisitor *visitor) const =0 |
virtual std::string | treeToString () const |
void | registerChild (INode *node) |
virtual void | setParent (const INode *newParent) |
const INode * | parent () const |
INode * | parent () |
int | copyNumber (const INode *node) const |
std::string | displayName () const |
ParameterPool * | createParameterTree () const |
ParameterPool * | parameterPool () const |
std::string | parametersToString () const |
RealParameter & | registerParameter (const std::string &name, double *parpointer) |
void | registerVector (const std::string &base_name, kvector_t *p_vec, const std::string &units="nm") |
void | setParameterValue (const std::string &name, double value) |
void | setVectorValue (const std::string &base_name, kvector_t value) |
RealParameter * | parameter (const std::string &name) const |
virtual void | onChange () |
void | removeParameter (const std::string &name) |
void | removeVector (const std::string &base_name) |
void | setName (const std::string &name) |
const std::string & | getName () const |
Static Public Member Functions | |
static std::string | XComponentName (const std::string &base_name) |
static std::string | YComponentName (const std::string &base_name) |
static std::string | ZComponentName (const std::string &base_name) |
Protected Member Functions | |
Simulation (const Simulation &other) | |
virtual void | transferResultsToIntensityMap () |
virtual void | initSimulationElementVector ()=0 |
virtual void | updateIntensityMap () |
virtual size_t | numberOfSimulationElements () const =0 |
const SimulationOptions & | options () const |
ProgressHandler & | progress () |
Protected Attributes | |
const size_t | m_NP |
std::vector< double > | m_P |
Private Member Functions | |
void | initialize () |
void | runSingleSimulation (size_t batch_start, size_t batch_size, double weight=1.0) |
virtual std::unique_ptr< IComputation > | generateSingleThreadedComputation (size_t start, size_t n_elements)=0 |
virtual void | validateParametrization (const ParameterDistribution &) const |
virtual void | addBackgroundIntensity (size_t start_ind, size_t n_elements)=0 |
virtual void | normalize (size_t start_ind, size_t n_elements)=0 |
virtual void | addDataToCache (double weight)=0 |
virtual void | moveDataFromCache ()=0 |
virtual std::vector< double > | rawResults () const =0 |
virtual void | setRawResults (const std::vector< double > &raw_data)=0 |
Private Attributes | |
SimulationOptions | m_options |
ProgressHandler | m_progress |
SampleProvider | m_sample_provider |
DistributionHandler | m_distribution_handler |
Instrument | m_instrument |
std::unique_ptr< IBackground > | m_background |
const INode * | m_parent {nullptr} |
std::string | m_name |
std::unique_ptr< ParameterPool > | m_pool |
Friends | |
class | MPISimulation |
Pure virtual base class of OffSpecularSimulation, GISASSimulation and SpecularSimulation.
Holds the common infrastructure to run a simulation: multithreading, batch processing, weighting over parameter distributions, ...
Definition at line 37 of file Simulation.h.
Simulation::Simulation | ( | ) |
Definition at line 121 of file Simulation.cpp.
References initialize().
|
virtualdefault |
|
protected |
Definition at line 126 of file Simulation.cpp.
References initialize(), m_background, and setBackground().
|
pure virtual |
Implements ICloneable.
Implemented in Simulation2D, SpecularSimulation, OffSpecSimulation, GISASSimulation, and DepthProbeSimulation.
Referenced by anonymous_namespace{ExportToPython.cpp}::simulationCode().
|
virtual |
Put into a clean state for running a simulation.
Reimplemented in SpecularSimulation, Simulation2D, GISASSimulation, and OffSpecSimulation.
Definition at line 189 of file Simulation.cpp.
References MultiLayerUtils::ContainsCompatibleMaterials(), m_sample_provider, SampleProvider::sample(), and SampleProvider::updateSample().
Referenced by Simulation2D::prepareSimulation(), SpecularSimulation::prepareSimulation(), and runSimulation().
void Simulation::runSimulation | ( | ) |
Run a simulation, possibly averaged over parameter distributions.
Run simulation with possible averaging over parameter distributions.
Definition at line 200 of file Simulation.cpp.
References INode::createParameterTree(), SimulationOptions::getCurrentBatch(), SimulationOptions::getNumberOfBatches(), anonymous_namespace{Simulation.cpp}::getNumberOfElements(), anonymous_namespace{Simulation.cpp}::getStartIndex(), DistributionHandler::getTotalNumberOfSamples(), m_distribution_handler, m_options, m_progress, moveDataFromCache(), numberOfSimulationElements(), prepareSimulation(), ProgressHandler::reset(), runSingleSimulation(), ProgressHandler::setExpectedNTicks(), DistributionHandler::setParameterToMeans(), DistributionHandler::setParameterValues(), and transferResultsToIntensityMap().
void Simulation::runMPISimulation | ( | ) |
Run a simulation in a MPI environment.
Definition at line 229 of file Simulation.cpp.
References MPISimulation::runSimulation().
void Simulation::setInstrument | ( | const Instrument & | instrument_ | ) |
Definition at line 235 of file Simulation.cpp.
References m_instrument, and updateIntensityMap().
|
inline |
Definition at line 55 of file Simulation.h.
References m_instrument.
Referenced by Simulation2D::addMask(), OffSpecSimulation::checkInitialization(), convertData(), DepthProbeSimulation::createUnitConverter(), OffSpecSimulation::createUnitConverter(), SimulationToPython::defineDetector(), SimulationToPython::defineDetectorPolarizationAnalysis(), SimulationToPython::defineDetectorResolutionFunction(), SimulationToPython::defineGISASBeam(), SimulationToPython::defineMasks(), SimulationToPython::defineOffSpecBeam(), SimulationToPython::defineSpecularScan(), Simulation2D::generateSimulationElements(), getBeamIntensity(), getChildren(), DepthProbeSimulation::initialize(), SpecularSimulation::initialize(), DepthProbeSimulation::initSimulationElementVector(), GISASSimulation::initSimulationElementVector(), OffSpecSimulation::initSimulationElementVector(), SpecularSimulation::initSimulationElementVector(), GISASSimulation::intensityMapSize(), OffSpecSimulation::intensityMapSize(), Simulation2D::maskAll(), DepthProbeSimulation::normalize(), SpecularSimulation::normalize(), GISASSimulation::prepareSimulation(), Simulation2D::prepareSimulation(), SpecularSimulation::prepareSimulation(), removeDetectorResolutionFunction(), Simulation2D::removeMasks(), GISASSimulation::result(), OffSpecSimulation::result(), setAnalyzerProperties(), setBeamIntensity(), DepthProbeSimulation::setBeamParameters(), OffSpecSimulation::setBeamParameters(), GISASSimulation::setBeamParameters(), setBeamPolarization(), Simulation2D::setDetector(), Simulation2D::setDetectorParameters(), setDetectorResolutionFunction(), Simulation2D::setRegionOfInterest(), SpecularSimulation::setScan(), OffSpecSimulation::transferDetectorImage(), OffSpecSimulation::transferResultsToIntensityMap(), and OffSpecSimulation::updateIntensityMap().
|
inline |
void Simulation::setBeamIntensity | ( | double | intensity | ) |
Definition at line 173 of file Simulation.cpp.
References instrument(), and Instrument::setBeamIntensity().
Referenced by StandardSimulations::GISASWithMasks().
double Simulation::getBeamIntensity | ( | ) | const |
Definition at line 178 of file Simulation.cpp.
References Instrument::getBeamIntensity(), and instrument().
Referenced by DepthProbeSimulation::normalize(), Simulation2D::normalize(), and SpecularSimulation::normalize().
void Simulation::setBeamPolarization | ( | const kvector_t | bloch_vector | ) |
Sets the beam polarization according to the given Bloch vector.
Definition at line 184 of file Simulation.cpp.
References instrument(), and Instrument::setBeamPolarization().
Referenced by StandardSimulations::BasicGISAS00(), StandardSimulations::BasicPolarizedGISAS(), StandardSimulations::MaxiGISAS00(), StandardSimulations::MiniGISASPolarizationMM(), StandardSimulations::MiniGISASPolarizationMP(), StandardSimulations::MiniGISASPolarizationPM(), and StandardSimulations::MiniGISASPolarizationPP().
void Simulation::setDetectorResolutionFunction | ( | const IResolutionFunction2D & | resolution_function | ) |
Definition at line 156 of file Simulation.cpp.
References instrument(), and Instrument::setDetectorResolutionFunction().
Referenced by StandardSimulations::MiniGISASDetectorResolution().
void Simulation::removeDetectorResolutionFunction | ( | ) |
Definition at line 161 of file Simulation.cpp.
References instrument(), and Instrument::removeDetectorResolution().
void Simulation::setAnalyzerProperties | ( | const kvector_t | direction, |
double | efficiency, | ||
double | total_transmission | ||
) |
Sets the polarization analyzer characteristics of the detector.
Definition at line 167 of file Simulation.cpp.
References instrument(), and Instrument::setAnalyzerProperties().
Referenced by StandardSimulations::BasicGISAS00(), StandardSimulations::BasicPolarizedGISAS(), StandardSimulations::MaxiGISAS00(), StandardSimulations::MiniGISASPolarizationMM(), StandardSimulations::MiniGISASPolarizationMP(), StandardSimulations::MiniGISASPolarizationPM(), and StandardSimulations::MiniGISASPolarizationPP().
void Simulation::setSample | ( | const MultiLayer & | sample | ) |
The MultiLayer object will not be owned by the Simulation object.
Definition at line 242 of file Simulation.cpp.
References m_sample_provider, sample(), and SampleProvider::setSample().
const MultiLayer * Simulation::sample | ( | ) | const |
Definition at line 247 of file Simulation.cpp.
References m_sample_provider, and SampleProvider::sample().
Referenced by SimulationToPython::generateSimulationCode(), DepthProbeSimulation::generateSingleThreadedComputation(), Simulation2D::generateSingleThreadedComputation(), SpecularSimulation::generateSingleThreadedComputation(), setSample(), and DepthProbeSimulation::validityCheck().
void Simulation::setSampleBuilder | ( | const std::shared_ptr< ISampleBuilder > & | sample_builder | ) |
Definition at line 252 of file Simulation.cpp.
References m_sample_provider, and SampleProvider::setBuilder().
void Simulation::setBackground | ( | const IBackground & | bg | ) |
Definition at line 257 of file Simulation.cpp.
References IBackground::clone(), m_background, and INode::registerChild().
Referenced by StandardSimulations::ConstantBackgroundGISAS(), and Simulation().
|
inline |
Definition at line 75 of file Simulation.h.
References m_background.
Referenced by DepthProbeSimulation::addBackgroundIntensity(), Simulation2D::addBackgroundIntensity(), SpecularSimulation::addBackgroundIntensity(), and SimulationToPython::defineBackground().
|
pure virtual |
Returns the total number of the intensity values in the simulation result.
Implemented in SpecularSimulation, OffSpecSimulation, GISASSimulation, and DepthProbeSimulation.
|
pure virtual |
Returns the results of the simulation in a format that supports unit conversion and export to numpy arrays.
Implemented in SpecularSimulation, OffSpecSimulation, GISASSimulation, and DepthProbeSimulation.
Referenced by Simulation2D::generateSimulationElements(), getChildren(), and Simulation2D::rawResults().
void Simulation::addParameterDistribution | ( | const std::string & | param_name, |
const IDistribution1D & | distribution, | ||
size_t | nbr_samples, | ||
double | sigma_factor = 0.0 , |
||
const RealLimits & | limits = RealLimits() |
||
) |
Definition at line 273 of file Simulation.cpp.
Referenced by StandardSimulations::MiniGISASBeamDivergence().
void Simulation::addParameterDistribution | ( | const ParameterDistribution & | par_distr | ) |
Definition at line 281 of file Simulation.cpp.
References DistributionHandler::addParameterDistribution(), m_distribution_handler, and validateParametrization().
|
inline |
Definition at line 89 of file Simulation.h.
References m_distribution_handler.
Referenced by SimulationToPython::defineParameterDistributions().
|
inline |
Definition at line 91 of file Simulation.h.
References m_options, and options().
|
inline |
Definition at line 92 of file Simulation.h.
References m_options.
Referenced by SimulationToPython::defineSimulationOptions(), StandardSimulations::MiniGISASMonteCarlo(), and StandardSimulations::MiniGISASSpecularPeak().
|
inline |
|
inline |
Definition at line 95 of file Simulation.h.
References m_progress, and ProgressHandler::subscribe().
void Simulation::setTerminalProgressMonitor | ( | ) |
Initializes a progress monitor that prints to stdout.
Definition at line 145 of file Simulation.cpp.
References m_progress, and ProgressHandler::subscribe().
|
virtual |
Returns a vector of children (const).
Reimplemented from INode.
Definition at line 263 of file Simulation.cpp.
References SampleProvider::getChildren(), instrument(), m_background, m_sample_provider, and result().
SimulationResult Simulation::convertData | ( | const OutputData< double > & | data, |
bool | put_masked_areas_to_zero = true |
||
) |
Convert user data to SimulationResult object for later drawing in various axes units.
User data will be cropped to the ROI defined in the simulation, amplitudes in areas corresponding to the masked areas of the detector will be set to zero.
Definition at line 317 of file Simulation.cpp.
References UnitConverterUtils::createConverter(), UnitConverterUtils::createOutputData(), Instrument::detector(), SimulationAreaIterator::detectorIndex(), anonymous_namespace{Simulation.cpp}::detHasSameDimensions(), OutputData< T >::getRawDataVector(), instrument(), IDetector::iterate(), and SimulationAreaIterator::roiIndex().
|
inlineprotectedvirtual |
Creates the appropriate data structure (e.g.
2D intensity map) from the calculated SimulationElement objects
Reimplemented in OffSpecSimulation.
Definition at line 110 of file Simulation.h.
Referenced by runSimulation(), Simulation2D::setRawResults(), and SpecularSimulation::setRawResults().
|
protectedpure virtual |
Initializes the vector of Simulation elements.
Implemented in SpecularSimulation, OffSpecSimulation, GISASSimulation, and DepthProbeSimulation.
Referenced by runSingleSimulation(), and Simulation2D::setRawResults().
|
inlineprotectedvirtual |
Reimplemented in OffSpecSimulation.
Definition at line 115 of file Simulation.h.
Referenced by Simulation2D::setDetectorParameters(), and setInstrument().
|
protectedpure virtual |
Gets the number of elements this simulation needs to calculate.
Implemented in SpecularSimulation, Simulation2D, DepthProbeSimulation, and OffSpecSimulation.
Referenced by runSimulation().
|
inlineprotected |
Definition at line 120 of file Simulation.h.
References m_options.
Referenced by DepthProbeSimulation::generateSingleThreadedComputation(), Simulation2D::generateSingleThreadedComputation(), SpecularSimulation::generateSingleThreadedComputation(), and setOptions().
|
inlineprotected |
Definition at line 121 of file Simulation.h.
References m_progress.
Referenced by DepthProbeSimulation::generateSingleThreadedComputation(), Simulation2D::generateSingleThreadedComputation(), and SpecularSimulation::generateSingleThreadedComputation().
|
private |
Definition at line 138 of file Simulation.cpp.
References m_instrument, m_sample_provider, and INode::registerChild().
Referenced by Simulation().
|
private |
Runs a single simulation with fixed parameter values.
If desired, the simulation is run in several threads.
Definition at line 289 of file Simulation.cpp.
References addBackgroundIntensity(), addDataToCache(), ASSERT, generateSingleThreadedComputation(), anonymous_namespace{Simulation.cpp}::getNumberOfElements(), SimulationOptions::getNumberOfThreads(), anonymous_namespace{Simulation.cpp}::getStartIndex(), initSimulationElementVector(), m_options, normalize(), and anonymous_namespace{Simulation.cpp}::runComputations().
Referenced by runSimulation().
|
privatepure virtual |
Generate a single threaded computation for a given range of simulation elements.
start | Index of the first element to include into computation |
n_elements | Number of elements to process |
Implemented in SpecularSimulation, Simulation2D, and DepthProbeSimulation.
Referenced by runSingleSimulation().
|
inlineprivatevirtual |
Checks the distribution validity for simulation.
Reimplemented in SpecularSimulation, OffSpecSimulation, and DepthProbeSimulation.
Definition at line 135 of file Simulation.h.
Referenced by addParameterDistribution().
|
privatepure virtual |
Implemented in SpecularSimulation, Simulation2D, and DepthProbeSimulation.
Referenced by runSingleSimulation().
|
privatepure virtual |
Normalize the detector counts to beam intensity, to solid angle, and to exposure angle.
start_ind | Index of the first element to operate on |
n_elements | Number of elements to process |
Implemented in SpecularSimulation, Simulation2D, and DepthProbeSimulation.
Referenced by runSingleSimulation().
|
privatepure virtual |
Implemented in SpecularSimulation, Simulation2D, and DepthProbeSimulation.
Referenced by runSingleSimulation().
|
privatepure virtual |
Implemented in SpecularSimulation, Simulation2D, and DepthProbeSimulation.
Referenced by runSimulation().
|
privatepure virtual |
Implemented in SpecularSimulation, Simulation2D, and DepthProbeSimulation.
|
privatepure virtual |
Implemented in SpecularSimulation, Simulation2D, and DepthProbeSimulation.
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 34 of file ICloneable.h.
|
pure virtualinherited |
Calls the INodeVisitor's visit method.
Implemented in FormFactorSphereLogNormalRadius, FormFactorSphereGaussianRadius, FormFactorGaussSphere, FormFactorDecoratorRotation, FormFactorDecoratorPositionFactor, FormFactorDecoratorMaterial, ParticleDistribution, ParticleCoreShell, ParticleComposition, Particle, MesoCrystal, FormFactorWeighted, FormFactorCrystal, FormFactorCoreShell, Crystal, Layer, FormFactorTruncatedSpheroid, FormFactorTruncatedSphere, FormFactorTruncatedCube, FormFactorTetrahedron, FormFactorSawtoothRippleLorentz, FormFactorSawtoothRippleGauss, FormFactorSawtoothRippleBox, FormFactorPyramid, FormFactorPrism6, FormFactorPrism3, FormFactorLongBoxLorentz, FormFactorLongBoxGauss, FormFactorIcosahedron, FormFactorHollowSphere, FormFactorHemiEllipsoid, FormFactorFullSpheroid, FormFactorFullSphere, FormFactorEllipsoidalCylinder, FormFactorDot, FormFactorDodecahedron, FormFactorCylinder, FormFactorCuboctahedron, FormFactorCosineRippleLorentz, FormFactorCosineRippleGauss, FormFactorCosineRippleBox, FormFactorCone6, FormFactorCone, FormFactorCantellatedCube, FormFactorBox, FormFactorAnisoPyramid, FTDistribution1DVoigt, FTDistribution1DCosine, FTDistribution1DTriangle, FTDistribution1DGate, FTDistribution1DGauss, FTDistribution1DCauchy, InterferenceFunctionTwin, InterferenceFunctionRadialParaCrystal, InterferenceFunctionNone, InterferenceFunctionHardDisk, InterferenceFunctionFinite3DLattice, InterferenceFunctionFinite2DLattice, InterferenceFunction3DLattice, InterferenceFunction2DSuperLattice, InterferenceFunction2DParaCrystal, InterferenceFunction2DLattice, InterferenceFunction1DLattice, SpecularSimulation, DepthProbeSimulation, FormFactorDWBAPol, FormFactorDWBA, FormFactorBAPol, Lattice, MisesGaussPeakShape, MisesFisherGaussPeakShape, LorentzFisherPeakShape, GaussFisherPeakShape, IsotropicLorentzPeakShape, IsotropicGaussPeakShape, SphericalDetector, SpecularDetector1D, FootprintSquare, FootprintGauss, Beam, GISASSimulation, PoissonNoiseBackground, ConstantBackground, MultiLayer, ParticleLayout, SampleProvider, SampleBuilderNode, HexagonalLattice, SquareLattice, BasicLattice, FormFactorBarLorentz, FormFactorBarGauss, FTDistribution2DVoigt, FTDistribution2DCone, FTDistribution2DGate, FTDistribution2DGauss, FTDistribution2DCauchy, FTDecayFunction2DVoigt, FTDecayFunction2DGauss, FTDecayFunction2DCauchy, FTDecayFunction1DVoigt, FTDecayFunction1DTriangle, FTDecayFunction1DGauss, FTDecayFunction1DCauchy, DistributionTrapezoid, DistributionCosine, DistributionLogNormal, DistributionGaussian, DistributionLorentz, DistributionGate, ResolutionFunction2DGaussian, ConvolutionDetectorResolution, Instrument, RectangularDetector, IsGISAXSDetector, DetectionProperties, OffSpecSimulation, ILayout, LayerRoughness, LayerInterface, RotationEuler, RotationZ, RotationY, RotationX, IdentityRotation, and IAbstractParticle.
Referenced by VisitNodesPostorder(), and VisitNodesPreorder().
|
virtualinherited |
Returns multiline string representing tree structure below the node.
Definition at line 53 of file INode.cpp.
References NodeUtils::nodeToString().
|
inherited |
Definition at line 58 of file INode.cpp.
References ASSERT, and INode::setParent().
Referenced by ParticleLayout::addAndRegisterAbstractParticle(), ParticleCoreShell::addAndRegisterCore(), MultiLayer::addAndRegisterInterface(), MultiLayer::addAndRegisterLayer(), ParticleCoreShell::addAndRegisterShell(), Layer::addLayout(), ParticleComposition::addParticlePointer(), Beam::Beam(), Crystal::Crystal(), IDetector::IDetector(), initialize(), MesoCrystal::initialize(), Instrument::Instrument(), Beam::operator=(), Instrument::operator=(), Particle::Particle(), ParticleDistribution::ParticleDistribution(), IParticle::rotate(), ParticleLayout::setAndRegisterInterferenceFunction(), setBackground(), InterferenceFunction1DLattice::setDecayFunction(), InterferenceFunction2DLattice::setDecayFunction(), Instrument::setDetector(), IDetector::setDetectorResolution(), Beam::setFootprintFactor(), Particle::setFormFactor(), InterferenceFunctionFinite3DLattice::setLattice(), InterferenceFunction2DLattice::setLattice(), InterferenceFunction2DParaCrystal::setLattice(), InterferenceFunction2DSuperLattice::setLattice(), InterferenceFunctionFinite2DLattice::setLattice(), InterferenceFunctionRadialParaCrystal::setProbabilityDistribution(), InterferenceFunction2DParaCrystal::setProbabilityDistributions(), ConvolutionDetectorResolution::setResolutionFunction(), IParticle::setRotation(), LayerInterface::setRoughness(), and InterferenceFunction2DSuperLattice::setSubstructureIFF().
|
virtualinherited |
Reimplemented in SampleProvider.
Definition at line 69 of file INode.cpp.
References INode::m_parent.
Referenced by INode::registerChild(), SampleProvider::setBuilder(), and SampleProvider::setParent().
|
inherited |
Definition at line 74 of file INode.cpp.
References INode::m_parent.
Referenced by INode::copyNumber(), INode::createParameterTree(), NodeUtils::nodePath(), Lattice2D::onChange(), SampleProvider::setBuilder(), SampleProvider::setParent(), and SampleProvider::setSample().
|
inherited |
|
inherited |
Returns copyNumber of child, which takes into account existence of children with same name.
Definition at line 84 of file INode.cpp.
References INode::getChildren(), IParameterized::getName(), and INode::parent().
Referenced by INode::displayName().
|
inherited |
Returns display name, composed from the name of node and it's copy number.
Definition at line 105 of file INode.cpp.
References INode::copyNumber(), IParameterized::getName(), and INode::m_parent.
Referenced by NodeUtils::nodePath(), and anonymous_namespace{NodeUtils.cpp}::nodeString().
|
virtualinherited |
Creates new parameter pool, with all local parameters and those of its children.
Reimplemented from IParameterized.
Definition at line 116 of file INode.cpp.
References ParameterPool::copyToExternalPool(), NodeIterator< Strategy >::first(), NodeIterator< Strategy >::getCurrent(), NodeIterator< Strategy >::isDone(), NodeIterator< Strategy >::next(), NodeUtils::nodePath(), IParameterized::parameterPool(), and INode::parent().
Referenced by ParticleDistribution::generateParticles(), runSimulation(), DepthProbeSimulation::validateParametrization(), OffSpecSimulation::validateParametrization(), and SpecularSimulation::validateParametrization().
|
inlineinherited |
Returns pointer to the parameter pool.
Definition at line 38 of file IParameterized.h.
References IParameterized::m_pool.
Referenced by pyfmt2::argumentList(), SampleBuilderNode::borrow_builder_parameters(), INode::createParameterTree(), INode::INode(), IParameterized::IParameterized(), anonymous_namespace{NodeUtils.cpp}::poolToString(), SampleBuilderNode::reset(), and IDistribution1D::setUnits().
|
inherited |
Returns multiline string representing available parameters.
Definition at line 40 of file IParameterized.cpp.
References IParameterized::createParameterTree().
|
inherited |
Definition at line 48 of file IParameterized.cpp.
References IParameterized::getName(), IParameterized::m_pool, and IParameterized::onChange().
Referenced by BasicLattice::BasicLattice(), Beam::Beam(), CylindersInBABuilder::CylindersInBABuilder(), DetectionProperties::DetectionProperties(), HexagonalLattice::HexagonalLattice(), IInterferenceFunction::IInterferenceFunction(), INode::INode(), InterferenceFunction1DLattice::InterferenceFunction1DLattice(), InterferenceFunction2DParaCrystal::InterferenceFunction2DParaCrystal(), InterferenceFunctionHardDisk::InterferenceFunctionHardDisk(), InterferenceFunctionRadialParaCrystal::InterferenceFunctionRadialParaCrystal(), InterferenceFunctionTwin::InterferenceFunctionTwin(), Lattice2D::Lattice2D(), LayerRoughness::LayerRoughness(), MultiLayer::MultiLayer(), ParticleDistribution::ParticleDistribution(), PlainMultiLayerBySLDBuilder::PlainMultiLayerBySLDBuilder(), IParticle::registerAbundance(), ParticleLayout::registerParticleDensity(), Layer::registerThickness(), IParameterized::registerVector(), ParticleLayout::registerWeight(), ResolutionFunction2DGaussian::ResolutionFunction2DGaussian(), ResonatorBuilder::ResonatorBuilder(), Lattice2D::setRotationEnabled(), SquareLattice::SquareLattice(), and TriangularRippleBuilder::TriangularRippleBuilder().
|
inherited |
Definition at line 54 of file IParameterized.cpp.
References IParameterized::registerParameter(), RealParameter::setUnit(), IParameterized::XComponentName(), IParameterized::YComponentName(), and IParameterized::ZComponentName().
Referenced by Beam::Beam(), DetectionProperties::DetectionProperties(), InterferenceFunctionTwin::InterferenceFunctionTwin(), MultiLayer::MultiLayer(), Lattice::registerBasisVectors(), and IParticle::registerPosition().
|
inherited |
Definition at line 62 of file IParameterized.cpp.
References IParameterized::createParameterTree(), IParameterized::m_pool, and ParameterPool::setMatchedParametersValue().
Referenced by AsymRippleBuilder::buildSample(), and IParameterized::setVectorValue().
|
inherited |
Definition at line 75 of file IParameterized.cpp.
References IParameterized::setParameterValue(), BasicVector3D< T >::x(), IParameterized::XComponentName(), BasicVector3D< T >::y(), IParameterized::YComponentName(), BasicVector3D< T >::z(), and IParameterized::ZComponentName().
|
inherited |
Returns parameter with given 'name'.
Definition at line 83 of file IParameterized.cpp.
References IParameterized::m_pool.
Referenced by DepthProbeSimulation::initialize(), SpecularSimulation::initialize(), IParticle::registerAbundance(), Lattice::registerBasisVectors(), ParticleLayout::registerParticleDensity(), IParticle::registerPosition(), Layer::registerThickness(), Lattice2D::setRotationEnabled(), and DistributionLogNormal::setUnits().
|
inlinevirtualinherited |
Action to be taken in inherited class when a parameter has changed.
Reimplemented in IProfileRipple, FormFactorSphereLogNormalRadius, FormFactorSphereGaussianRadius, FormFactorGaussSphere, ISawtoothRipple, ICosineRipple, IProfileRectangularRipple, FormFactorTruncatedSpheroid, FormFactorTruncatedSphere, FormFactorTruncatedCube, FormFactorTetrahedron, FormFactorPyramid, FormFactorPrism6, FormFactorPrism3, FormFactorLongBoxLorentz, FormFactorLongBoxGauss, FormFactorIcosahedron, FormFactorHollowSphere, FormFactorHemiEllipsoid, FormFactorFullSpheroid, FormFactorFullSphere, FormFactorEllipsoidalCylinder, FormFactorDodecahedron, FormFactorCylinder, FormFactorCuboctahedron, FormFactorCone6, FormFactorCone, FormFactorCantellatedCube, FormFactorBox, FormFactorAnisoPyramid, InterferenceFunction3DLattice, InterferenceFunction2DLattice, Lattice, and Lattice2D.
Definition at line 58 of file IParameterized.h.
Referenced by Lattice2D::onChange(), and IParameterized::registerParameter().
|
inherited |
Definition at line 88 of file IParameterized.cpp.
References IParameterized::m_pool.
Referenced by IParticle::registerAbundance(), ParticleLayout::registerParticleDensity(), Layer::registerThickness(), IParameterized::removeVector(), and Lattice2D::setRotationEnabled().
|
inherited |
Definition at line 93 of file IParameterized.cpp.
References IParameterized::removeParameter(), IParameterized::XComponentName(), IParameterized::YComponentName(), and IParameterized::ZComponentName().
Referenced by IParticle::registerPosition().
|
staticinherited |
Definition at line 100 of file IParameterized.cpp.
Referenced by Lattice::registerBasisVectors(), IParticle::registerPosition(), IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().
|
staticinherited |
Definition at line 105 of file IParameterized.cpp.
Referenced by IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().
|
staticinherited |
Definition at line 110 of file IParameterized.cpp.
Referenced by IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().
|
inlineinherited |
Definition at line 68 of file IParameterized.h.
References IParameterized::m_name.
Referenced by BasicLattice::BasicLattice(), Beam::Beam(), Layer::clone(), ConvolutionDetectorResolution::ConvolutionDetectorResolution(), LayersWithAbsorptionBuilder::createSampleByIndex(), Basic2DParaCrystalBuilder::createSampleByIndex(), ParticleInVacuumBuilder::createSampleByIndex(), SimpleMagneticRotationBuilder::createSampleByIndex(), Crystal::Crystal(), DetectionProperties::DetectionProperties(), DistributionHandler::DistributionHandler(), FormFactorBAPol::FormFactorBAPol(), FormFactorCoreShell::FormFactorCoreShell(), FormFactorCrystal::FormFactorCrystal(), FormFactorDecoratorMaterial::FormFactorDecoratorMaterial(), FormFactorDecoratorPositionFactor::FormFactorDecoratorPositionFactor(), FormFactorDecoratorRotation::FormFactorDecoratorRotation(), FormFactorDWBA::FormFactorDWBA(), FormFactorDWBAPol::FormFactorDWBAPol(), FormFactorWeighted::FormFactorWeighted(), HexagonalLattice::HexagonalLattice(), IDetector::IDetector(), DepthProbeSimulation::initialize(), GISASSimulation::initialize(), OffSpecSimulation::initialize(), SpecularSimulation::initialize(), SpecularDetector1D::initialize(), MesoCrystal::initialize(), Particle::initialize(), ParticleComposition::initialize(), INode::INode(), Instrument::Instrument(), InterferenceFunction1DLattice::InterferenceFunction1DLattice(), InterferenceFunction2DLattice::InterferenceFunction2DLattice(), InterferenceFunction2DParaCrystal::InterferenceFunction2DParaCrystal(), InterferenceFunction2DSuperLattice::InterferenceFunction2DSuperLattice(), InterferenceFunction3DLattice::InterferenceFunction3DLattice(), InterferenceFunctionFinite2DLattice::InterferenceFunctionFinite2DLattice(), InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(), InterferenceFunctionHardDisk::InterferenceFunctionHardDisk(), InterferenceFunctionNone::InterferenceFunctionNone(), InterferenceFunctionRadialParaCrystal::InterferenceFunctionRadialParaCrystal(), InterferenceFunctionTwin::InterferenceFunctionTwin(), ISampleBuilder::ISampleBuilder(), IsGISAXSDetector::IsGISAXSDetector(), Lattice::Lattice(), Layer::Layer(), LayerInterface::LayerInterface(), LayerRoughness::LayerRoughness(), MultiLayer::MultiLayer(), Beam::operator=(), SampleBuilderNode::operator=(), ParticleCoreShell::ParticleCoreShell(), ParticleDistribution::ParticleDistribution(), ParticleLayout::ParticleLayout(), RectangularDetector::RectangularDetector(), SampleBuilderNode::reset(), ResolutionFunction2DGaussian::ResolutionFunction2DGaussian(), SampleBuilderNode::SampleBuilderNode(), SampleBuilderNode::setSBN(), SphericalDetector::SphericalDetector(), and SquareLattice::SquareLattice().
|
inlineinherited |
Definition at line 69 of file IParameterized.h.
References IParameterized::m_name.
Referenced by Beam::Beam(), Layer::clone(), IFormFactorBorn::computeSlicingEffects(), ConvolutionDetectorResolution::ConvolutionDetectorResolution(), INode::copyNumber(), IParameterized::createParameterTree(), IFormFactor::createSlicedFormFactor(), SampleToPython::defineFormFactors(), SampleToPython::defineInterferenceFunctions(), INode::displayName(), IDetector::IDetector(), Instrument::Instrument(), IParameterized::IParameterized(), Beam::operator=(), SampleBuilderNode::operator=(), anonymous_namespace{ParticleLayout.cpp}::particleDensityIsProvidedByInterference(), IParameterized::registerParameter(), SampleBuilderNode::SampleBuilderNode(), and IFormFactor::sliceFormFactor().
|
friend |
Definition at line 103 of file Simulation.h.
|
private |
Definition at line 152 of file Simulation.h.
Referenced by getOptions(), options(), runSimulation(), runSingleSimulation(), and setOptions().
|
private |
Definition at line 153 of file Simulation.h.
Referenced by progress(), runSimulation(), setTerminalProgressMonitor(), and subscribe().
|
private |
Definition at line 154 of file Simulation.h.
Referenced by getChildren(), initialize(), prepareSimulation(), sample(), setSample(), and setSampleBuilder().
|
private |
Definition at line 155 of file Simulation.h.
Referenced by addParameterDistribution(), getDistributionHandler(), and runSimulation().
|
private |
Definition at line 156 of file Simulation.h.
Referenced by initialize(), instrument(), and setInstrument().
|
private |
Definition at line 157 of file Simulation.h.
Referenced by background(), getChildren(), setBackground(), and Simulation().
|
privateinherited |
Definition at line 81 of file INode.h.
Referenced by INode::displayName(), INode::parent(), and INode::setParent().
|
protectedinherited |
Definition at line 86 of file INode.h.
Referenced by INode::INode().
|
protectedinherited |
Definition at line 87 of file INode.h.
Referenced by INode::INode(), and IFootprintFactor::setWidthRatio().
|
privateinherited |
Definition at line 72 of file IParameterized.h.
Referenced by IParameterized::getName(), and IParameterized::setName().
|
privateinherited |
parameter pool (kind of pointer-to-implementation)
Definition at line 73 of file IParameterized.h.
Referenced by IParameterized::createParameterTree(), IParameterized::parameter(), IParameterized::parameterPool(), IParameterized::registerParameter(), IParameterized::removeParameter(), and IParameterized::setParameterValue().