From e8fe59eac0e7c3545442efcade0a8e46fb1a88d4 Mon Sep 17 00:00:00 2001 From: JWu <j.wuttke@fz-juelich.de> Date: Tue, 19 Mar 2013 15:38:42 +0100 Subject: [PATCH] Insert new header comment block, remove old one, manually improve file comments (defines / implements), change brief function description to doxygen format, remove some outcommented code --- Core/Fitting/inc/AttFitting.h | 6 +- Core/Fitting/inc/AttLimits.h | 6 +- Core/Fitting/inc/FitObject.h | 7 +- Core/Fitting/inc/FitParameter.h | 6 +- Core/Fitting/inc/FitParameterLinked.h | 7 +- Core/Fitting/inc/FitSuite.h | 6 +- Core/Fitting/inc/FitSuiteFunctions.h | 17 +--- Core/Fitting/inc/FitSuiteObjects.h | 6 +- Core/Fitting/inc/FitSuiteParameters.h | 6 +- Core/Fitting/inc/FitSuiteStrategies.h | 6 +- Core/Fitting/inc/IFitSuiteStrategy.h | 34 +++---- Core/Fitting/inc/IMinimizer.h | 6 +- Core/Fitting/inc/MinimizerScan.h | 6 +- Core/Fitting/inc/MinimizerTest.h | 6 +- Core/Samples/inc/Crystal.h | 37 +++---- Core/Samples/inc/DiffuseParticleInfo.h | 33 ++++--- Core/Samples/inc/HomogeneousMaterial.h | 35 +++---- Core/Samples/inc/IClusteredParticles.h | 37 +++---- Core/Samples/inc/ICompositeIterator.h | 46 ++++----- Core/Samples/inc/ICompositeSample.h | 38 +++---- Core/Samples/inc/IDecoration.h | 32 +++--- Core/Samples/inc/IDispersalState.h | 37 ++++--- Core/Samples/inc/IInterferenceFunction.h | 35 ++++--- Core/Samples/inc/IMaterial.h | 37 ++++--- Core/Samples/inc/IRoughness.h | 35 +++---- Core/Samples/inc/ISample.h | 36 +++---- Core/Samples/inc/ISelectionRule.h | 31 +++--- .../inc/InterferenceFunction1DParaCrystal.h | 30 +++--- .../inc/InterferenceFunction2DLattice.h | 32 +++--- .../inc/InterferenceFunction2DParaCrystal.h | 32 +++--- Core/Samples/inc/InterferenceFunctionNone.h | 34 ++++--- Core/Samples/inc/InterferenceFunctions.h | 31 +++--- Core/Samples/inc/Lattice.h | 40 ++++---- Core/Samples/inc/Lattice2DIFParameters.h | 31 +++--- Core/Samples/inc/LatticeBasis.h | 31 +++--- Core/Samples/inc/Layer.h | 38 +++---- Core/Samples/inc/LayerDecorator.h | 30 +++--- Core/Samples/inc/LayerInterface.h | 35 +++---- Core/Samples/inc/LayerRoughness.h | 34 ++++--- Core/Samples/inc/MaterialManager.h | 37 +++---- Core/Samples/inc/MesoCrystal.h | 36 +++---- Core/Samples/inc/MultiLayer.h | 36 +++---- Core/Samples/inc/Particle.h | 36 +++---- Core/Samples/inc/ParticleBuilder.h | 35 +++---- Core/Samples/inc/ParticleCoreShell.h | 37 +++---- Core/Samples/inc/ParticleDecoration.h | 36 +++---- Core/Samples/inc/ParticleInfo.h | 37 +++---- Core/Samples/inc/PositionParticleInfo.h | 37 +++---- Core/Samples/inc/Samples.h | 17 ++++ Core/Samples/src/Crystal.cpp | 17 ++++ Core/Samples/src/DiffuseParticleInfo.cpp | 18 +++- Core/Samples/src/HomogeneousMaterial.cpp | 28 +++--- Core/Samples/src/ICompositeIterator.cpp | 20 +++- Core/Samples/src/ICompositeSample.cpp | 45 ++++----- Core/Samples/src/IMaterial.cpp | 21 +++- Core/Samples/src/ISample.cpp | 69 ++++--------- .../src/InterferenceFunction1DParaCrystal.cpp | 20 +++- .../src/InterferenceFunction2DLattice.cpp | 17 ++++ .../src/InterferenceFunction2DParaCrystal.cpp | 18 +++- Core/Samples/src/Lattice.cpp | 99 ++++--------------- Core/Samples/src/LatticeBasis.cpp | 17 ++++ Core/Samples/src/Layer.cpp | 51 ++++------ Core/Samples/src/LayerDecorator.cpp | 20 +++- Core/Samples/src/LayerInterface.cpp | 35 ++++--- Core/Samples/src/LayerRoughness.cpp | 31 +++--- Core/Samples/src/MaterialManager.cpp | 31 +++--- Core/Samples/src/MesoCrystal.cpp | 18 +++- Core/Samples/src/MultiLayer.cpp | 66 +++++-------- Core/Samples/src/Particle.cpp | 17 ++++ Core/Samples/src/ParticleBuilder.cpp | 27 +++-- Core/Samples/src/ParticleCoreShell.cpp | 17 ++++ Core/Samples/src/ParticleDecoration.cpp | 39 +++++--- Core/Samples/src/ParticleInfo.cpp | 28 ++++-- Core/Samples/src/PositionParticleInfo.cpp | 21 +++- 74 files changed, 1137 insertions(+), 989 deletions(-) diff --git a/Core/Fitting/inc/AttFitting.h b/Core/Fitting/inc/AttFitting.h index 1eb369718c5..3a4a651fe70 100644 --- a/Core/Fitting/inc/AttFitting.h +++ b/Core/Fitting/inc/AttFitting.h @@ -21,10 +21,8 @@ #include <iostream> #include <iomanip> -//- ------------------------------------------------------------------- -//! @class AttFitting -//! @brief Defines general fitting attributes -//- ------------------------------------------------------------------- +//! General fitting attributes. + class AttFitting { public: diff --git a/Core/Fitting/inc/AttLimits.h b/Core/Fitting/inc/AttLimits.h index c90e3b3a4ca..dc18ded68c9 100644 --- a/Core/Fitting/inc/AttLimits.h +++ b/Core/Fitting/inc/AttLimits.h @@ -21,10 +21,8 @@ #include <iostream> #include <iomanip> -//- ------------------------------------------------------------------- -//! @class AttLimits -//! @brief Defines limits for fit parameters -//- ------------------------------------------------------------------- +//! Limits for fit parameters + class AttLimits { public: diff --git a/Core/Fitting/inc/FitObject.h b/Core/Fitting/inc/FitObject.h index 6b9e4867638..ba1fea8f26a 100644 --- a/Core/Fitting/inc/FitObject.h +++ b/Core/Fitting/inc/FitObject.h @@ -23,11 +23,8 @@ #include "OutputData.h" #include "ChiSquaredModule.h" -//- ------------------------------------------------------------------- -//! @class FitObject -//! @brief Class to hold single simulation description, real data and chi2 module -//! Used by FitSuite -//- ------------------------------------------------------------------- +//! Single simulation description, real data and chi2 module (used by FitSuite) + class FitObject : public IParameterized { public: diff --git a/Core/Fitting/inc/FitParameter.h b/Core/Fitting/inc/FitParameter.h index 0d409740b30..ee619713a73 100644 --- a/Core/Fitting/inc/FitParameter.h +++ b/Core/Fitting/inc/FitParameter.h @@ -23,10 +23,8 @@ #include <string> #include <vector> -//- ------------------------------------------------------------------- -//! @class FitParameter -//! @brief Parameter with value, error and limits for fitting routines -//- ------------------------------------------------------------------- +//! Parameter with value, error and limits for fitting routines. + class FitParameter : public INamed, public AttLimits { public: diff --git a/Core/Fitting/inc/FitParameterLinked.h b/Core/Fitting/inc/FitParameterLinked.h index 045426574b9..1a32628295a 100644 --- a/Core/Fitting/inc/FitParameterLinked.h +++ b/Core/Fitting/inc/FitParameterLinked.h @@ -25,11 +25,8 @@ #include <vector> #include <iostream> -//- ------------------------------------------------------------------- -//! @class FitParameterLinked -//! @brief Provide simultaneous access for several real parameters from -//! parameter pool -//- ------------------------------------------------------------------- +//! Provide simultaneous access for several real parameters from parameter pool + class FitParameterLinked : public FitParameter { public: diff --git a/Core/Fitting/inc/FitSuite.h b/Core/Fitting/inc/FitSuite.h index 7f71828a853..60d6633df01 100644 --- a/Core/Fitting/inc/FitSuite.h +++ b/Core/Fitting/inc/FitSuite.h @@ -31,10 +31,8 @@ class Simulation; class ParameterPool; -//- ------------------------------------------------------------------- -//! @class FitSuite -//! @brief Main class to perform fitting -//- ------------------------------------------------------------------- +//! Main class to perform fitting + class FitSuite : public IObservable { public: diff --git a/Core/Fitting/inc/FitSuiteFunctions.h b/Core/Fitting/inc/FitSuiteFunctions.h index 76784f218a1..20a34df48d3 100644 --- a/Core/Fitting/inc/FitSuiteFunctions.h +++ b/Core/Fitting/inc/FitSuiteFunctions.h @@ -24,10 +24,8 @@ using std::size_t; class FitSuite; -//- ------------------------------------------------------------------- -//! @class IFitSuiteFunction -//! @brief Fitting functions interface to be used by Minimizer. -//- ------------------------------------------------------------------- +//! Fitting functions interface to be used by Minimizer. + class IFitSuiteFunction { public: @@ -40,10 +38,8 @@ protected: size_t m_ncall; }; -//- ------------------------------------------------------------------- -//! @class FitSuiteChiSquaredFunction -//! @brief Chi squared fitting function for minimizer -//- ------------------------------------------------------------------- +//! Chi squared fitting function for minimizer + class FitSuiteChiSquaredFunction : public IFitSuiteFunction { public: @@ -53,11 +49,8 @@ public: double evaluate(const double *pars); }; +//! Gradient fitting function for minimizer -//- ------------------------------------------------------------------- -//! @class FitSuiteChiSquaredFunction -//! @brief Gradient fitting function for minimizer -//- ------------------------------------------------------------------- class FitSuiteGradientFunction : public IFitSuiteFunction { public: diff --git a/Core/Fitting/inc/FitSuiteObjects.h b/Core/Fitting/inc/FitSuiteObjects.h index 6e187eb5bec..11cdea4b526 100644 --- a/Core/Fitting/inc/FitSuiteObjects.h +++ b/Core/Fitting/inc/FitSuiteObjects.h @@ -26,10 +26,8 @@ #include <vector> -//- ------------------------------------------------------------------- -//! @class FitSuiteObjects -//! @brief Class containing vector FitObject's (simulation and real data) to fit -//- ------------------------------------------------------------------- +//! class containing vector FitObject's (simulation and real data) to fit + class FitSuiteObjects : public IParameterized { public: diff --git a/Core/Fitting/inc/FitSuiteParameters.h b/Core/Fitting/inc/FitSuiteParameters.h index e635286e621..5e236d85062 100644 --- a/Core/Fitting/inc/FitSuiteParameters.h +++ b/Core/Fitting/inc/FitSuiteParameters.h @@ -25,10 +25,8 @@ class ParameterPool; -//- ------------------------------------------------------------------- -//! @class FitSuiteParameters -//! @brief Class holds vector of parameters for FitSuite -//- ------------------------------------------------------------------- +//! Holds vector of parameters for FitSuite + class FitSuiteParameters { public: diff --git a/Core/Fitting/inc/FitSuiteStrategies.h b/Core/Fitting/inc/FitSuiteStrategies.h index 4f38bc89dd6..88024f07f29 100644 --- a/Core/Fitting/inc/FitSuiteStrategies.h +++ b/Core/Fitting/inc/FitSuiteStrategies.h @@ -23,10 +23,8 @@ class FitSuite; -//- ------------------------------------------------------------------- -//! @class FitSuiteStrategies -//! @brief Collection of strategies to fit -//- ------------------------------------------------------------------- +//! Collection of strategies to fit + class FitSuiteStrategies { public: diff --git a/Core/Fitting/inc/IFitSuiteStrategy.h b/Core/Fitting/inc/IFitSuiteStrategy.h index 11825286a3f..f460989ce72 100644 --- a/Core/Fitting/inc/IFitSuiteStrategy.h +++ b/Core/Fitting/inc/IFitSuiteStrategy.h @@ -27,12 +27,10 @@ class FitSuite; #include <vector> #include <map> -//- ------------------------------------------------------------------- -//! @class IFitSuiteStrategy -//! @brief Interface to concrete fit strategy. -//! Concrete implementation should manipulate with fit parameters/data -//! and then call minimizer. -//- ------------------------------------------------------------------- +//! Interface to concrete fit strategy. +// Concrete implementation should manipulate with fit parameters/data +// and then call minimizer. + class IFitSuiteStrategy : public INamed { public: @@ -48,10 +46,8 @@ protected: FitSuite *m_fit_suite; }; -//- ------------------------------------------------------------------- -//! @class FitSuiteStrategyDefault -//! @brief Default fit strategy just let FitSuite to run it's minimization round -//- ------------------------------------------------------------------- +//! Default fit strategy just let FitSuite to run it's minimization round + class FitSuiteStrategyDefault : public IFitSuiteStrategy { public: @@ -59,10 +55,8 @@ public: virtual void execute(); }; -//- ------------------------------------------------------------------- -//! @class FitSuiteStrategyAdjustData -//! @brief Strategy modifies data before running minimization round -//- ------------------------------------------------------------------- +//! Strategy modifies data before running minimization round + class FitSuiteStrategyAdjustData : public IFitSuiteStrategy { public: @@ -76,10 +70,8 @@ private: bool m_call_minimize; //! if it's true, modify data and then call FitSuite's minimizer, if false - simply modify the data }; -//- ------------------------------------------------------------------- -//! @class FitSuiteStrategyAdjustParameters -//! @brief Strategy which fixes/releases fit parameters and call minimizer -//- ------------------------------------------------------------------- +//! Strategy which fixes/releases fit parameters and call minimizer + class FitSuiteStrategyAdjustParameters : public IFitSuiteStrategy { public: @@ -100,10 +92,8 @@ private: bool m_preserve_original_values; //! if it's true, strategy will set back values of parameters as they were before minimization round }; -//- ------------------------------------------------------------------- -//! @class FitSuiteStrategyBootstrap -//! @brief Helps minimizer get out of local minima by disturbing real data -//- ------------------------------------------------------------------- +//! Helps minimizer get out of local minima by disturbing real data + class FitSuiteStrategyBootstrap : public IFitSuiteStrategy { public: diff --git a/Core/Fitting/inc/IMinimizer.h b/Core/Fitting/inc/IMinimizer.h index e82c7ac3fcc..6a958765f46 100644 --- a/Core/Fitting/inc/IMinimizer.h +++ b/Core/Fitting/inc/IMinimizer.h @@ -25,10 +25,8 @@ class FitParameter; class FitSuiteParameters; -//- ------------------------------------------------------------------- -//! @class IMinimizer -//! @brief Common interface for all kind minimizer's -//- ------------------------------------------------------------------- +//! Common interface for all kind minimizer's + class IMinimizer { public: diff --git a/Core/Fitting/inc/MinimizerScan.h b/Core/Fitting/inc/MinimizerScan.h index 89987e28dcf..10dfcbc6468 100644 --- a/Core/Fitting/inc/MinimizerScan.h +++ b/Core/Fitting/inc/MinimizerScan.h @@ -22,10 +22,8 @@ #include "FitSuiteParameters.h" #include "OutputData.h" -//- ------------------------------------------------------------------- -//! @class MinimizerScan -//! @brief Simple scan minimizer looks for minimum of chi2 function on the grid -//- ------------------------------------------------------------------- +//! Simple scan minimizer looks for minimum of chi2 function on the grid + class MinimizerScan : public IMinimizer { public: diff --git a/Core/Fitting/inc/MinimizerTest.h b/Core/Fitting/inc/MinimizerTest.h index 642e3e4e09f..37f6598c9a3 100644 --- a/Core/Fitting/inc/MinimizerTest.h +++ b/Core/Fitting/inc/MinimizerTest.h @@ -22,10 +22,8 @@ #include "FitSuiteParameters.h" #include <map> -//- ------------------------------------------------------------------- -//! @class MinimizerTest -//! @brief Minimizer which calls minimization function once to test whole chain -//- ------------------------------------------------------------------- +//! Minimizer which calls minimization function once to test whole chain + class MinimizerTest : public IMinimizer { public: diff --git a/Core/Samples/inc/Crystal.h b/Core/Samples/inc/Crystal.h index 3c24c422c72..e524e5bce9f 100644 --- a/Core/Samples/inc/Crystal.h +++ b/Core/Samples/inc/Crystal.h @@ -1,28 +1,30 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Crystal.h +//! @brief Defines class Crystal. +// +// ************************************************************************** // + #ifndef CRYSTAL_H_ #define CRYSTAL_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file Crystal.h -//! @brief Definition of Crystal class -//! @author Scientific Computing Group at FRM II -//! @date Jul 12, 2012 #include "IClusteredParticles.h" #include "Particle.h" #include "Lattice.h" #include "LatticeBasis.h" -//- ------------------------------------------------------------------- -//! @class Crystal -//! @brief Definition of a crystal structure with a form factor as a basis -//- ------------------------------------------------------------------- +//! A crystal structure with a form factor as a basis + class Crystal : public IClusteredParticles { public: @@ -58,5 +60,4 @@ private: double m_dw_factor; }; - #endif /* CRYSTAL_H_ */ diff --git a/Core/Samples/inc/DiffuseParticleInfo.h b/Core/Samples/inc/DiffuseParticleInfo.h index 9e48124c8e3..1ec1e071b7b 100644 --- a/Core/Samples/inc/DiffuseParticleInfo.h +++ b/Core/Samples/inc/DiffuseParticleInfo.h @@ -1,21 +1,27 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/DiffuseParticleInfo.h +//! @brief Defines class DiffuseParticleInfo. +// +// ************************************************************************** // + #ifndef DIFFUSEPARTICLEINFO_H_ #define DIFFUSEPARTICLEINFO_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file DiffuseParticleInfo.h -//! @brief Definition of -//! @author Scientific Computing Group at FRM II -//! @date Sep 4, 2012 #include "ParticleInfo.h" +//! ? + class DiffuseParticleInfo: public ParticleInfo { public: @@ -44,7 +50,6 @@ public: protected: double m_number_per_meso; double m_height_range; - }; #endif /* DIFFUSEPARTICLEINFO_H_ */ diff --git a/Core/Samples/inc/HomogeneousMaterial.h b/Core/Samples/inc/HomogeneousMaterial.h index a1fa5115204..6f74b81e894 100644 --- a/Core/Samples/inc/HomogeneousMaterial.h +++ b/Core/Samples/inc/HomogeneousMaterial.h @@ -1,27 +1,28 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/HomogeneousMaterial.h +//! @brief Defines class HomogeneousMaterial. +// +// ************************************************************************** // + #ifndef HOMOGENEOUSMATERIAL_H #define HOMOGENEOUSMATERIAL_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file HomogeneousMaterial.h -//! @brief Definition of HomogeneousMaterial class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include "IMaterial.h" #include "Types.h" +//! A homogeneous material with refraction index -//- ------------------------------------------------------------------- -/// @class HomogeneousMaterial -/// @brief Definition of homogeneous material with refraction index -//- ------------------------------------------------------------------- class HomogeneousMaterial : public IMaterial { public: diff --git a/Core/Samples/inc/IClusteredParticles.h b/Core/Samples/inc/IClusteredParticles.h index 383f3181fa4..af753cf4eb6 100644 --- a/Core/Samples/inc/IClusteredParticles.h +++ b/Core/Samples/inc/IClusteredParticles.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/IClusteredParticles.h +//! @brief Defines class IClusteredParticles. +// +// ************************************************************************** // + #ifndef ICLUSTEREDPARTICLES_H_ #define ICLUSTEREDPARTICLES_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file IClusteredParticles.h -//! @brief Definition of IClusteredParticles interface -//! @author Scientific Computing Group at FRM II -//! @date Jul 12, 2012 #include "IFormFactor.h" #include "ICompositeSample.h" @@ -21,10 +25,8 @@ #include "Exceptions.h" #include "DiffuseParticleInfo.h" -//- ------------------------------------------------------------------- -//! @class IClusteredParticles -//! @brief Definition of an interface, representing an ordered assembly of particles -//- ------------------------------------------------------------------- +//! An ordered assembly of particles + class IClusteredParticles : public ICompositeSample { public: @@ -61,5 +63,4 @@ public: }; - #endif /* ICLUSTEREDNANOPARTICLES_H_ */ diff --git a/Core/Samples/inc/ICompositeIterator.h b/Core/Samples/inc/ICompositeIterator.h index acd9f8ef4d9..8e54dcf5e30 100644 --- a/Core/Samples/inc/ICompositeIterator.h +++ b/Core/Samples/inc/ICompositeIterator.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ICompositeIterator.h +//! @brief Defines class ICompositeIterator. +// +// ************************************************************************** // + #ifndef ICOMPOSITEITERATOR_H #define ICOMPOSITEITERATOR_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ICompositeIterator.h -//! @brief Definition of ICompositeIterator class and surroundings -//! @author Scientific Computing Group at FRM II -//! @date 18.06.2012 #include "ISample.h" #include "ICompositeSample.h" @@ -20,11 +24,8 @@ #include <stack> #include <list> +//! Holds state of IComositeSample iterator -//- ------------------------------------------------------------------- -//! @class MementoState -//! @brief Definition of MementoState to hold state of IComositeSample iterator -//- ------------------------------------------------------------------- class MementoState { public: @@ -59,11 +60,8 @@ private: MementoState(); }; +//! Holds state of IComositeSample iterator -//- ------------------------------------------------------------------- -//! @class MementoIterator -//! @brief Definition of MementoIterator to hold state of IComositeSample iterator -//- ------------------------------------------------------------------- class MementoIterator { public: @@ -82,8 +80,6 @@ protected: std::stack<MementoState > m_state_stack; }; - -//- ------------------------------------------------------------------- //! @class ICompositeIterator //! @brief Definition of ICompositeIterator to walk through ISample tree //! of objects inside ICompositeSample object. @@ -95,7 +91,7 @@ protected: //! ISample *child = it.get_current(); //! it.next(); //! } -//- ------------------------------------------------------------------- + class ICompositeIterator { public: @@ -113,6 +109,4 @@ protected: bool m_done; }; - - #endif // ICOMPOSITEITERATOR_H diff --git a/Core/Samples/inc/ICompositeSample.h b/Core/Samples/inc/ICompositeSample.h index 3d29853b52b..207353ae306 100644 --- a/Core/Samples/inc/ICompositeSample.h +++ b/Core/Samples/inc/ICompositeSample.h @@ -1,30 +1,30 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ICompositeSample.h +//! @brief Defines class ICompositeSample. +// +// ************************************************************************** // + #ifndef ICOMPOSITESAMPLE_H #define ICOMPOSITESAMPLE_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ICompositeSample -//! @brief Definition of ICompositeSample class -//! @author Scientific Computing Group at FRM II -//! @date 16.06.2012 #include "ISample.h" #include <list> - class ICompositeIterator; -//- ------------------------------------------------------------------- -//! @class ICompositeSample -//! @brief Definition of ICompositeSample which compose ISample objects -//! into tree structure -//- ------------------------------------------------------------------- +//! Compose ISample objects into tree structure + class ICompositeSample : public ISample { public: diff --git a/Core/Samples/inc/IDecoration.h b/Core/Samples/inc/IDecoration.h index 87c3402ef14..3c16434a922 100644 --- a/Core/Samples/inc/IDecoration.h +++ b/Core/Samples/inc/IDecoration.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/IDecoration.h +//! @brief Defines class IDecoration. +// +// ************************************************************************** // + #ifndef IDECORATION_H_ #define IDECORATION_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file IDecoration.h -//! @brief Definition of IDecoration interface -//! @author Scientific Computing Group at FRM II -//! @date Jun 22, 2012 #include "ICompositeSample.h" #include "IFormFactor.h" @@ -22,6 +26,8 @@ class IInterferenceFunctionStrategy; class IInterferenceFunction; +//! ? + class IDecoration : public ICompositeSample { public: diff --git a/Core/Samples/inc/IDispersalState.h b/Core/Samples/inc/IDispersalState.h index 51ff359a0ac..7f4cddd62e5 100644 --- a/Core/Samples/inc/IDispersalState.h +++ b/Core/Samples/inc/IDispersalState.h @@ -1,24 +1,25 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/IDispersalState.h +//! @brief Defines class IDispersalState. +// +// ************************************************************************** // + #ifndef IDISPERSALSTATE_H_ #define IDISPERSALSTATE_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file IDispersalState.h -//! @brief Definition of IDispersalState -//! @author Scientific Computing Group at FRM II -//! @date 12.06.2012 +//! ? -//- ------------------------------------------------------------------- -//! @class IDispersalState -//! @brief Definition of IDispersalState interface -//- ------------------------------------------------------------------- class IDispersalState { public: @@ -26,6 +27,4 @@ public: }; - - #endif /* IDISPERSALSTATE_H_ */ diff --git a/Core/Samples/inc/IInterferenceFunction.h b/Core/Samples/inc/IInterferenceFunction.h index e22df13cb67..42111ff12f7 100644 --- a/Core/Samples/inc/IInterferenceFunction.h +++ b/Core/Samples/inc/IInterferenceFunction.h @@ -1,31 +1,36 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/IInterferenceFunction.h +//! @brief Defines class IInterferenceFunction. +// +// ************************************************************************** // + #ifndef IINTERFERENCEFUNCTION_H_ #define IINTERFERENCEFUNCTION_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file IInterferenceFunction.h -//! @brief Definition of IInterferenceFunction interface -//! @author herck -//! @date 18.06.2012 #include "Types.h" #include "ISample.h" +//! ? + class IInterferenceFunction : public ISample { public: - virtual ~IInterferenceFunction() {} + virtual ~IInterferenceFunction() {} virtual double evaluate(const cvector_t &q) const=0; virtual IInterferenceFunction *clone() const=0; virtual double getKappa() const { return 0.0; } }; - #endif /* IINTERFERENCEFUNCTION_H_ */ diff --git a/Core/Samples/inc/IMaterial.h b/Core/Samples/inc/IMaterial.h index cde80da0736..e7cc8597e73 100644 --- a/Core/Samples/inc/IMaterial.h +++ b/Core/Samples/inc/IMaterial.h @@ -1,29 +1,30 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/IMaterial.h +//! @brief Defines class IMaterial. +// +// ************************************************************************** // + #ifndef IMATERIAL_H #define IMATERIAL_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file IMaterial.h -//! @brief Definition of IMaterial class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include <string> #include <iostream> #include <typeinfo> #include "INamed.h" +//! A Material -//- ------------------------------------------------------------------- -//! @class IMaterial -//! @brief Material definition -//- ------------------------------------------------------------------- class IMaterial : public INamed { public: @@ -45,6 +46,4 @@ protected: }; - - #endif // IMATERIAL_H diff --git a/Core/Samples/inc/IRoughness.h b/Core/Samples/inc/IRoughness.h index cccfdc1d921..c957d082701 100644 --- a/Core/Samples/inc/IRoughness.h +++ b/Core/Samples/inc/IRoughness.h @@ -1,26 +1,27 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/IRoughness.h +//! @brief Defines class IRoughness. +// +// ************************************************************************** // + #ifndef IROUGHNESS_H #define IROUGHNESS_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file IRoughness.h -//! @brief Definition of IRoughness class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include "ISample.h" +//! Roughness interface -//- ------------------------------------------------------------------- -//! @class IRoughness -//! @brief Definition of Roughness interface -//- ------------------------------------------------------------------- class IRoughness : public ISample { public: diff --git a/Core/Samples/inc/ISample.h b/Core/Samples/inc/ISample.h index 44f8d0893ca..1aee004c505 100644 --- a/Core/Samples/inc/ISample.h +++ b/Core/Samples/inc/ISample.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ISample.h +//! @brief Defines class ISample. +// +// ************************************************************************** // + #ifndef ISAMPLE_H #define ISAMPLE_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ISample.h -//! @brief Definition of ISample class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include "IParameterized.h" #include "ICloneable.h" @@ -20,10 +24,8 @@ class ICompositeSample; class DWBASimulation; -//- ------------------------------------------------------------------- -//! @class ISample -//! @brief Definition of ISample interface for objects related to scattering -//- ------------------------------------------------------------------- +//! Interface for objects related to scattering + class ISample : public IParameterized, public ICloneable { public: diff --git a/Core/Samples/inc/ISelectionRule.h b/Core/Samples/inc/ISelectionRule.h index 1932f55ebaa..3df35b0cbb6 100644 --- a/Core/Samples/inc/ISelectionRule.h +++ b/Core/Samples/inc/ISelectionRule.h @@ -1,20 +1,23 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ISelectionRule.h +//! @brief Defines class ISelectionRule. +// +// ************************************************************************** // + #ifndef ISELECTIONRULE_H_ #define ISELECTIONRULE_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ISelectionRule.h -//! @brief Definition of ISelectionRule interface -//! @author Scientific Computing Group at FRM II -//! @date Sep 11, 2012 - #include "Coordinate3D.h" class ISelectionRule diff --git a/Core/Samples/inc/InterferenceFunction1DParaCrystal.h b/Core/Samples/inc/InterferenceFunction1DParaCrystal.h index 69126aa2aea..ae6ee82de98 100644 --- a/Core/Samples/inc/InterferenceFunction1DParaCrystal.h +++ b/Core/Samples/inc/InterferenceFunction1DParaCrystal.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunction1DParaCrystal.h +//! @brief Defines class InterferenceFunction1DParaCrystal. +// +// ************************************************************************** // + #ifndef INTERFERENCEFUNCTION1DPARACRYSTAL_H_ #define INTERFERENCEFUNCTION1DPARACRYSTAL_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file InterferenceFunction1DParaCrystal.h -//! @brief Definition of InterferenceFunction1DParaCrystal class -//! @author Scientific Computing Group at FRM II -//! @date 19.06.2012 #include "IInterferenceFunction.h" diff --git a/Core/Samples/inc/InterferenceFunction2DLattice.h b/Core/Samples/inc/InterferenceFunction2DLattice.h index ff6acb46d3a..33e2a4c7e96 100644 --- a/Core/Samples/inc/InterferenceFunction2DLattice.h +++ b/Core/Samples/inc/InterferenceFunction2DLattice.h @@ -1,23 +1,29 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunction2DLattice.h +//! @brief Defines class InterferenceFunction2DLattice. +// +// ************************************************************************** // + #ifndef INTERFERENCEFUNCTION2DLATTICE_H_ #define INTERFERENCEFUNCTION2DLATTICE_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file InterferenceFunction2DLattice.h -//! @brief Definition of InterferenceFunction2DLattice class -//! @author Scientific Computing Group at FRM II -//! @date Jan 22, 2013 #include "IInterferenceFunction.h" #include "Lattice2DIFParameters.h" #include "FTDistributions.h" +//! ? + class InterferenceFunction2DLattice : public IInterferenceFunction { public: diff --git a/Core/Samples/inc/InterferenceFunction2DParaCrystal.h b/Core/Samples/inc/InterferenceFunction2DParaCrystal.h index 004dcf08397..d4b786083d4 100644 --- a/Core/Samples/inc/InterferenceFunction2DParaCrystal.h +++ b/Core/Samples/inc/InterferenceFunction2DParaCrystal.h @@ -1,22 +1,28 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunction2DParaCrystal.h +//! @brief Defines class InterferenceFunction2DParaCrystal. +// +// ************************************************************************** // + #ifndef INTERFERENCEFUNCTION2DPARACRYSTAL_H_ #define INTERFERENCEFUNCTION2DPARACRYSTAL_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file InterferenceFunction2DParaCrystal.h -//! @brief Definition of InterferenceFunction2DParaCrystal class -//! @author Scientific Computing Group at FRM II -//! @date Oct 17, 2012 #include "IInterferenceFunction.h" #include "FTDistributions.h" +//! ? + class InterferenceFunction2DParaCrystal : public IInterferenceFunction { public: diff --git a/Core/Samples/inc/InterferenceFunctionNone.h b/Core/Samples/inc/InterferenceFunctionNone.h index fb984d02ac5..4cb6139169a 100644 --- a/Core/Samples/inc/InterferenceFunctionNone.h +++ b/Core/Samples/inc/InterferenceFunctionNone.h @@ -1,21 +1,27 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunctionNone.h +//! @brief Defines class InterferenceFunctionNone. +// +// ************************************************************************** // + #ifndef INTERFERENCEFUNCTIONNONE_H_ #define INTERFERENCEFUNCTIONNONE_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file InterferenceFunctionNone.h -//! @brief Definition of InterferenceFunctionNone class -//! @author herck -//! @date 19.06.2012 #include "IInterferenceFunction.h" +//! ? + class InterferenceFunctionNone : public IInterferenceFunction { public: @@ -27,6 +33,4 @@ public: }; - - #endif /* INTERFERENCEFUNCTIONNONE_H_ */ diff --git a/Core/Samples/inc/InterferenceFunctions.h b/Core/Samples/inc/InterferenceFunctions.h index 4f7fda923ba..ce967d86bbc 100644 --- a/Core/Samples/inc/InterferenceFunctions.h +++ b/Core/Samples/inc/InterferenceFunctions.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunctions.h +//! @brief Include all interference function definitions. +// +// ************************************************************************** // + #ifndef INTERFERENCEFUNCTIONS_H_ #define INTERFERENCEFUNCTIONS_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file InterferenceFunctions.h -//! @brief Includes interference functions headers -//! @author Scientific Computing Group at FRM II -//! @date Jan 25, 2013 #include "IInterferenceFunction.h" #include "InterferenceFunctionNone.h" @@ -20,5 +24,4 @@ #include "InterferenceFunction2DLattice.h" #include "InterferenceFunction2DParaCrystal.h" - #endif /* INTERFERENCEFUNCTIONS_H_ */ diff --git a/Core/Samples/inc/Lattice.h b/Core/Samples/inc/Lattice.h index 58c8ed915ea..5f14bc42eb8 100644 --- a/Core/Samples/inc/Lattice.h +++ b/Core/Samples/inc/Lattice.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Lattice.h +//! @brief Defines class Lattice. +// +// ************************************************************************** // + #ifndef LATTICE_H_ #define LATTICE_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file Lattice.h -//! @brief Definition of Lattice class -//! @author Scientific Computing Group at FRM II -//! @date Jul 12, 2012 #include "Types.h" #include "Coordinate3D.h" @@ -22,10 +26,8 @@ #include <vector> -//- ------------------------------------------------------------------- -//! @class Lattice -//! @brief Definition of Lattice with three basis vectors -//- ------------------------------------------------------------------- +//! A Lattice with three basis vectors. + class Lattice { public: @@ -85,8 +87,6 @@ public: mp_selection_rule = p_selection_rule.clone(); } - - static Lattice createFCCLattice(double a); static Lattice createTrigonalLattice(double a, double c); @@ -104,7 +104,6 @@ private: const kvector_t &v1, const kvector_t &v2, const kvector_t &v3, const kvector_t &rec1, const kvector_t &rec2, const kvector_t &rec3) const; - void computeReciprocalVectors() const; void computeInverseLatticeVectors() const; void computeInverseReciprocalLatticeVectors() const; @@ -118,5 +117,4 @@ private: mutable KVectorContainer m_kvector_container; }; - #endif /* LATTICE_H_ */ diff --git a/Core/Samples/inc/Lattice2DIFParameters.h b/Core/Samples/inc/Lattice2DIFParameters.h index 2cbb0b27143..40e892ee20e 100644 --- a/Core/Samples/inc/Lattice2DIFParameters.h +++ b/Core/Samples/inc/Lattice2DIFParameters.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Lattice2DIFParameters.h +//! @brief Defines class Lattice2DIFParameters. +// +// ************************************************************************** // + #ifndef LATTICE2DIFPARAMETERS_H_ #define LATTICE2DIFPARAMETERS_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file Lattice2DIFParameters.h -//! @brief Definition of Lattice2DIFParameters -//! @author Scientific Computing Group at FRM II -//! @date Jan 22, 2013 #include "IParameterized.h" @@ -30,5 +34,4 @@ public: double m_corr_length_1, m_corr_length_2; }; - #endif /* LATTICE2DIFPARAMETERS_H_ */ diff --git a/Core/Samples/inc/LatticeBasis.h b/Core/Samples/inc/LatticeBasis.h index e8e5965c6d1..71eeaf68828 100644 --- a/Core/Samples/inc/LatticeBasis.h +++ b/Core/Samples/inc/LatticeBasis.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LatticeBasis.h +//! @brief Defines class LatticeBasis. +// +// ************************************************************************** // + #ifndef LATTICEBASIS_H_ #define LATTICEBASIS_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file LatticeBasis.h -//! @brief Definition of -//! @author Scientific Computing Group at FRM II -//! @date Jul 17, 2012 #include "Particle.h" #include "Types.h" @@ -58,5 +62,4 @@ private: std::vector<std::vector<kvector_t> > m_positions_vector; }; - #endif /* LATTICEBASIS_H_ */ diff --git a/Core/Samples/inc/Layer.h b/Core/Samples/inc/Layer.h index 34a826630b4..f96d12a39ec 100644 --- a/Core/Samples/inc/Layer.h +++ b/Core/Samples/inc/Layer.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Layer.h +//! @brief Defines class Layer. +// +// ************************************************************************** // + #ifndef LAYER_H #define LAYER_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file Layer.h -//! @brief Definition of Layer class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include "ICompositeSample.h" #include "IMaterial.h" @@ -20,10 +24,8 @@ #include "HomogeneousMaterial.h" #include "LayerDWBASimulation.h" -//- ------------------------------------------------------------------- -//! @class Layer -//! @brief Definition of Layer with thickness and pointer to the material -//- ------------------------------------------------------------------- +//! A Layer with thickness and pointer to the material + class Layer : public ICompositeSample { public: @@ -68,7 +70,6 @@ protected: virtual void init_parameters(); private: - //! print class void print(std::ostream &ostr) const; @@ -76,5 +77,4 @@ private: double m_thickness; //!< layer thickness in nanometers }; - #endif // LAYER_H diff --git a/Core/Samples/inc/LayerDecorator.h b/Core/Samples/inc/LayerDecorator.h index 46e1dbd31a8..fcca7774698 100644 --- a/Core/Samples/inc/LayerDecorator.h +++ b/Core/Samples/inc/LayerDecorator.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LayerDecorator.h +//! @brief Defines class LayerDecorator. +// +// ************************************************************************** // + #ifndef LAYERDECORATOR_H_ #define LAYERDECORATOR_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file LayerDecorator.h -//! @brief Definition of LayerDecorator class -//! @author Scientific Computing Group at FRM II -//! @date Jun 22, 2012 #include "Layer.h" #include "ParticleDecoration.h" diff --git a/Core/Samples/inc/LayerInterface.h b/Core/Samples/inc/LayerInterface.h index d77d7c49874..3364bff1462 100644 --- a/Core/Samples/inc/LayerInterface.h +++ b/Core/Samples/inc/LayerInterface.h @@ -1,33 +1,35 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LayerInterface.h +//! @brief Defines class LayerInterface. +// +// ************************************************************************** // + #ifndef LAYERINTERFACE_H #define LAYERINTERFACE_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file LayerInterface.h -//! @brief Definition of LayerInterface class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include "ICompositeSample.h" #include "LayerRoughness.h" class Layer; - -//- ------------------------------------------------------------------- //! @class LayerInterface //! @brief Interface between two layers. //! //! Interface between two layers connects two layers and posses roughness. //! We prevent usage of default/copy constructors and assignment //! operator and provide clone functionality from MultiLayer interface -//- ------------------------------------------------------------------- + class LayerInterface : public ICompositeSample { public: @@ -73,5 +75,4 @@ private: const Layer *m_LayerBottom; //!< pointer to the layer below interface }; - #endif // LAYERINTERFACE_H diff --git a/Core/Samples/inc/LayerRoughness.h b/Core/Samples/inc/LayerRoughness.h index bceb8299be4..fd22c01c777 100644 --- a/Core/Samples/inc/LayerRoughness.h +++ b/Core/Samples/inc/LayerRoughness.h @@ -1,24 +1,26 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LayerRoughness.h +//! @brief Defines class LayerRoughness. +// +// ************************************************************************** // + #ifndef LAYERROUGHNESS_H #define LAYERROUGHNESS_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file LayerRoughness.h -//! @brief Definition of LayerRoughness class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include "Types.h" #include "IRoughness.h" - -//- ------------------------------------------------------------------- //! @class LayerRoughness //! @brief Roughness of interface between two layers. //! @@ -26,7 +28,7 @@ //! D.K.G. de Boer, Physical review B, Volume 51, Number 8, 15 February 1995 //! "X-ray reflection and transmission by rough surfaces" //! See Appendix A2 -//- ------------------------------------------------------------------- + class LayerRoughness : public IRoughness { public: diff --git a/Core/Samples/inc/MaterialManager.h b/Core/Samples/inc/MaterialManager.h index f27d459b64f..69bdb9c6853 100644 --- a/Core/Samples/inc/MaterialManager.h +++ b/Core/Samples/inc/MaterialManager.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/MaterialManager.h +//! @brief Defines class MaterialManager. +// +// ************************************************************************** // + #ifndef MATERIALMANAGER_H #define MATERIALMANAGER_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file MaterialManager.h -//! @brief Definition of MaterialManager class -//! @author Scientific Computing Group at FRM II -//! @date 20.04.2012 #include <iostream> #include <string> @@ -22,14 +26,11 @@ #include "ISingleton.h" #include "HomogeneousMaterial.h" - -//- ------------------------------------------------------------------- -//! @class MaterialManager -//! @brief Manager of materials used in simulatiom. +//! Manager of materials used in simulation. //! //! It is a singleton which provides common and unique interface for //! material creation and access. No thread safety. -//- ------------------------------------------------------------------- + class MaterialManager: public ISingleton<MaterialManager> { public: diff --git a/Core/Samples/inc/MesoCrystal.h b/Core/Samples/inc/MesoCrystal.h index 23f986ef83a..e3355032a15 100644 --- a/Core/Samples/inc/MesoCrystal.h +++ b/Core/Samples/inc/MesoCrystal.h @@ -1,27 +1,29 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/MesoCrystal.h +//! @brief Defines class MesoCrystal. +// +// ************************************************************************** // + #ifndef MESOCRYSTAL_H_ #define MESOCRYSTAL_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file MesoCrystal.h -//! @brief Definition of MesoCrystal class -//! @author Scientific Computing Group at FRM II -//! @date Jul 11, 2012 #include "IClusteredParticles.h" #include "IFormFactor.h" #include "Particle.h" -//- ------------------------------------------------------------------- -//! @class MesoCrystal -//! @brief Defines a particle with an internal structure of smaller particles -//- ------------------------------------------------------------------- +//! A particle with an internal structure of smaller particles + class MesoCrystal : public Particle { public: diff --git a/Core/Samples/inc/MultiLayer.h b/Core/Samples/inc/MultiLayer.h index e3f43d2115d..af2f041c017 100644 --- a/Core/Samples/inc/MultiLayer.h +++ b/Core/Samples/inc/MultiLayer.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/MultiLayer.h +//! @brief Defines class MultiLayer. +// +// ************************************************************************** // + #ifndef MULTILAYER_H #define MULTILAYER_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file MultiLayer.h -//! @brief Definition of MultiLayer class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include <vector> #include "ICompositeSample.h" @@ -21,8 +25,6 @@ #include "LayerRoughness.h" #include "MultiLayerDWBASimulation.h" - -//- ------------------------------------------------------------------- //! @class MultiLayer //! @brief Stack of layers one below the other //! @@ -35,8 +37,7 @@ //! Cr, 40A layer #2 z=getLayerBottomZ(2)=-60.0 //! --------- interface #2 //! substrate layer #3 z=getLayerBottomZ(3)=-60.0 -//! -//- ------------------------------------------------------------------- + class MultiLayer : public ICompositeSample { public: @@ -136,4 +137,3 @@ private: }; #endif // MULTILAYER_H - diff --git a/Core/Samples/inc/Particle.h b/Core/Samples/inc/Particle.h index 9a9cabb94cb..207b74fd079 100644 --- a/Core/Samples/inc/Particle.h +++ b/Core/Samples/inc/Particle.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Particle.h +//! @brief Defines class Particle. +// +// ************************************************************************** // + #ifndef PARTICLE_H #define PARTICLE_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file Particle.h -//! @brief Definition of Particle class -//! @author Scientific Computing Group at FRM II -//! @date 01.04.2012 #include "ICompositeSample.h" #include "IFormFactor.h" @@ -21,10 +25,8 @@ class DiffuseParticleInfo; class ParticleInfo; -//- ------------------------------------------------------------------- -//! @class Particle -//! @brief Definition of a particle with a form factor and refractive index -//- ------------------------------------------------------------------- +//! A particle with a form factor and refractive index + class Particle : public ICompositeSample { public: diff --git a/Core/Samples/inc/ParticleBuilder.h b/Core/Samples/inc/ParticleBuilder.h index c097d6e022c..822a8fa5326 100644 --- a/Core/Samples/inc/ParticleBuilder.h +++ b/Core/Samples/inc/ParticleBuilder.h @@ -1,31 +1,33 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleBuilder.h +//! @brief Defines class ParticleBuilder. +// +// ************************************************************************** // + #ifndef PARTICLEBUILDER_H #define PARTICLEBUILDER_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ParticleBuilder.h -//! @brief Definition of ParticleBuilder class -//! @author Scientific Computing Group at FRM II -//! @date 20.08.2012 #include "Particle.h" #include "IStochasticParameter.h" #include "ParticleDecoration.h" - -//- ------------------------------------------------------------------- //! @class ParticleBuilder //! @brief To build set of particles with similar properties //! //! currently produces particles but probably can produce directly //! ParticleInfo, or even ISample -//- ------------------------------------------------------------------- + class ParticleBuilder { public: @@ -49,5 +51,4 @@ private: double m_scale; //!< global scale factor for probabilities }; - #endif // PARTICLEBUILDER_H diff --git a/Core/Samples/inc/ParticleCoreShell.h b/Core/Samples/inc/ParticleCoreShell.h index 084023a8f9d..8ff45e30468 100644 --- a/Core/Samples/inc/ParticleCoreShell.h +++ b/Core/Samples/inc/ParticleCoreShell.h @@ -1,26 +1,27 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleCoreShell.h +//! @brief Defines class ParticleCoreShell. +// +// ************************************************************************** // + #ifndef PARTICLECORESHELL_H #define PARTICLECORESHELL_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ParticleCoreShell.h -//! @brief Definition of ParticleCoreShell class -//! @author Scientific Computing Group at FRM II -//! @date 1/10/12 - #include "Particle.h" -//- ------------------------------------------------------------------- -//! @class ParticleCoreShell -//! @brief Describes a particle with a core/shell geometry -//- ------------------------------------------------------------------- +//! A particle with a core/shell geometry + class ParticleCoreShell : public Particle { public: diff --git a/Core/Samples/inc/ParticleDecoration.h b/Core/Samples/inc/ParticleDecoration.h index cd0d54691f1..37bbfcab842 100644 --- a/Core/Samples/inc/ParticleDecoration.h +++ b/Core/Samples/inc/ParticleDecoration.h @@ -1,18 +1,22 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleDecoration.h +//! @brief Defines class ParticleDecoration. +// +// ************************************************************************** // + #ifndef PARTICLEDECORATION_H #define PARTICLEDECORATION_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ParticleDecoration.h -//! @brief Definition of ParticleDecoration -//! @author Scientific Computing Group at FRM II -//! @date 23.05.2012 #include "IDecoration.h" #include "Particle.h" @@ -20,10 +24,8 @@ #include "IInterferenceFunction.h" #include "Transform3D.h" -//- ------------------------------------------------------------------- -//! @class ParticleDecoration -//! @brief Definition of decorator class that adds particles to ISample objects -//- ------------------------------------------------------------------- +//! Decorator class that adds particles to ISample objects + class ParticleDecoration : public IDecoration { public: diff --git a/Core/Samples/inc/ParticleInfo.h b/Core/Samples/inc/ParticleInfo.h index 003cb9114b0..6aedd691651 100644 --- a/Core/Samples/inc/ParticleInfo.h +++ b/Core/Samples/inc/ParticleInfo.h @@ -1,27 +1,29 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleInfo.h +//! @brief Defines class ParticleInfo. +// +// ************************************************************************** // + #ifndef PARTICLEINFO_H #define PARTICLEINFO_H -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file ParticleInfo.h -//! @brief Definition of Layer class -//! @author Scientific Computing Group at FRM II -//! @date 18.07.2012 #include "ICompositeSample.h" #include "Particle.h" #include "Transform3D.h" -//- ------------------------------------------------------------------- -//! @class ParticleInfo -//! @brief holds additional information about particle (used in ParticleDecoration) -//- ------------------------------------------------------------------- +//! Holds additional information about particle (used in ParticleDecoration) + class ParticleInfo : public ICompositeSample { public: @@ -71,5 +73,4 @@ protected: double m_abundance; }; - #endif // PARTICLEINFO_H diff --git a/Core/Samples/inc/PositionParticleInfo.h b/Core/Samples/inc/PositionParticleInfo.h index 64846dd74eb..f11fe121b16 100644 --- a/Core/Samples/inc/PositionParticleInfo.h +++ b/Core/Samples/inc/PositionParticleInfo.h @@ -1,26 +1,28 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/PositionParticleInfo.h +//! @brief Defines class PositionParticleInfo. +// +// ************************************************************************** // + #ifndef POSITIONPARTICLEINFO_H_ #define POSITIONPARTICLEINFO_H_ -// ******************************************************************** -// * The BornAgain project * -// * Simulation of neutron and x-ray scattering at grazing incidence * -// * * -// * LICENSE AND DISCLAIMER * -// * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris * -// * eget quam orci. Quisque porta varius dui, quis posuere nibh * -// * mollis quis. Mauris commodo rhoncus porttitor. * -// ******************************************************************** -//! @file PositionParticleInfo.h -//! @brief Definition of -//! @author Scientific Computing Group at FRM II -//! @date Jan 7, 2013 #include "ParticleInfo.h" -//- ------------------------------------------------------------------- -//! @class PositionParticleInfo -//! @brief holds additional information about particle and position +//! Holds additional information about particle and position //! (used in IsGISAXSMorphologyFileDecoration) -//- ------------------------------------------------------------------- + class PositionParticleInfo : public ParticleInfo { public: @@ -64,5 +66,4 @@ protected: double m_pos_y; }; - #endif /* POSITIONPARTICLEINFO_H_ */ diff --git a/Core/Samples/inc/Samples.h b/Core/Samples/inc/Samples.h index 7c73dd3e4c2..c252b6b9d4c 100644 --- a/Core/Samples/inc/Samples.h +++ b/Core/Samples/inc/Samples.h @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Samples.h +//! @brief Include various .h files. +// +// ************************************************************************** // + #ifndef SAMPLES_H #define SAMPLES_H diff --git a/Core/Samples/src/Crystal.cpp b/Core/Samples/src/Crystal.cpp index d5e7075891d..5ccbbadbe49 100644 --- a/Core/Samples/src/Crystal.cpp +++ b/Core/Samples/src/Crystal.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Crystal.cpp +//! @brief Implements class Crystal. +// +// ************************************************************************** // + #include "Crystal.h" #include "FormFactors.h" #include "Units.h" diff --git a/Core/Samples/src/DiffuseParticleInfo.cpp b/Core/Samples/src/DiffuseParticleInfo.cpp index 23eaecef821..8b59030e754 100644 --- a/Core/Samples/src/DiffuseParticleInfo.cpp +++ b/Core/Samples/src/DiffuseParticleInfo.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/DiffuseParticleInfo.cpp +//! @brief Implements class DiffuseParticleInfo. +// +// ************************************************************************** // + #include "DiffuseParticleInfo.h" DiffuseParticleInfo::DiffuseParticleInfo(Particle* p_particle, Geometry::Transform3D *transform, double depth, double abundance) @@ -9,4 +26,3 @@ DiffuseParticleInfo::DiffuseParticleInfo(Particle* p_particle, Geometry::Transfo DiffuseParticleInfo::~DiffuseParticleInfo() { } - diff --git a/Core/Samples/src/HomogeneousMaterial.cpp b/Core/Samples/src/HomogeneousMaterial.cpp index 25ac5942bf8..4ca4da0e771 100644 --- a/Core/Samples/src/HomogeneousMaterial.cpp +++ b/Core/Samples/src/HomogeneousMaterial.cpp @@ -1,39 +1,46 @@ -#include "HomogeneousMaterial.h" +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/HomogeneousMaterial.cpp +//! @brief Implements class HomogeneousMaterial. +// +// ************************************************************************** // +#include "HomogeneousMaterial.h" HomogeneousMaterial::HomogeneousMaterial() { - } - HomogeneousMaterial::HomogeneousMaterial(const complex_t &refractive_index) : IMaterial("noname"), m_refractive_index(refractive_index) { - } - HomogeneousMaterial::HomogeneousMaterial(const std::string &name, const complex_t &refractive_index) : IMaterial(name), m_refractive_index(refractive_index) { - } - HomogeneousMaterial::HomogeneousMaterial(const std::string &name, double refractive_index_real, double refractive_index_imag) : IMaterial(name), m_refractive_index(refractive_index_real, refractive_index_imag) { - } - HomogeneousMaterial::HomogeneousMaterial(const HomogeneousMaterial &other) : IMaterial(other) { m_refractive_index = other.m_refractive_index; } - HomogeneousMaterial &HomogeneousMaterial::operator=(const HomogeneousMaterial &other) { if(this != &other) @@ -43,4 +50,3 @@ HomogeneousMaterial &HomogeneousMaterial::operator=(const HomogeneousMaterial &o } return *this; } - diff --git a/Core/Samples/src/ICompositeIterator.cpp b/Core/Samples/src/ICompositeIterator.cpp index 04742c3aced..6f56f272b1d 100644 --- a/Core/Samples/src/ICompositeIterator.cpp +++ b/Core/Samples/src/ICompositeIterator.cpp @@ -1,7 +1,23 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ICompositeIterator.cpp +//! @brief Implements class ICompositeIterator. +// +// ************************************************************************** // + #include "ICompositeIterator.h" #include "Exceptions.h" - void ICompositeIterator::first() { m_memento_itor.reset(); @@ -13,7 +29,6 @@ void ICompositeIterator::first() m_memento_itor.push_state( MementoState(m_root->begin_shallow(), m_root->end_shallow()) ); } - void ICompositeIterator::next() { ISample *smp = (*m_memento_itor.get_current_itor()); @@ -37,5 +52,4 @@ void ICompositeIterator::next() } if (m_memento_itor.empty()) m_done = true; - } diff --git a/Core/Samples/src/ICompositeSample.cpp b/Core/Samples/src/ICompositeSample.cpp index 5e318066911..f58070c312c 100644 --- a/Core/Samples/src/ICompositeSample.cpp +++ b/Core/Samples/src/ICompositeSample.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ICompositeSample.cpp +//! @brief Implements class ICompositeSample. +// +// ************************************************************************** // + #include "ICompositeSample.h" #include "ICompositeIterator.h" #include "Utils.h" @@ -5,29 +22,14 @@ #include <sstream> #include "Exceptions.h" - - -//ICompositeSample::ICompositeSample() -//{ - -//} - - -//ICompositeSample::ICompositeSample(const ICompositeSample &other) : ISample(other) -//{ - -//} - - ICompositeSample *ICompositeSample::clone() const { throw NotImplementedException("ICompositeSample::clone() -> Error: not implemented"); } -/* ************************************************************************* */ -// register child in the container -/* ************************************************************************* */ +//! register child in the container + void ICompositeSample::registerChild(ISample *sample) { if(sample) { @@ -37,21 +39,16 @@ void ICompositeSample::registerChild(ISample *sample) } } +//! remove registere child from the container -/* ************************************************************************* */ -// remove registere child from the container -/* ************************************************************************* */ void ICompositeSample::deregisterChild(ISample *sample) { m_samples.remove(sample); } +//! create general iterator to walk through the tree of registered composite children -/* ************************************************************************* */ -// create general iterator to walk through the tree of registered composite children -/* ************************************************************************* */ ICompositeIterator ICompositeSample::createIterator() { return ICompositeIterator(this); } - diff --git a/Core/Samples/src/IMaterial.cpp b/Core/Samples/src/IMaterial.cpp index a9945b136a0..aeb0d15ed06 100644 --- a/Core/Samples/src/IMaterial.cpp +++ b/Core/Samples/src/IMaterial.cpp @@ -1,12 +1,26 @@ -#include "IMaterial.h" +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/IMaterial.cpp +//! @brief Implements class IMaterial. +// +// ************************************************************************** // +#include "IMaterial.h" IMaterial::IMaterial(const IMaterial &other) : INamed(other) { - } - IMaterial &IMaterial::operator=(const IMaterial &other) { if( this != &other) { @@ -15,4 +29,3 @@ IMaterial &IMaterial::operator=(const IMaterial &other) } return *this; } - diff --git a/Core/Samples/src/ISample.cpp b/Core/Samples/src/ISample.cpp index b3cd2c13bc3..9d26575b51f 100644 --- a/Core/Samples/src/ISample.cpp +++ b/Core/Samples/src/ISample.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ISample.cpp +//! @brief Implements class ISample. +// +// ************************************************************************** // + #include "ISample.h" #include "ICompositeSample.h" #include "ICompositeIterator.h" @@ -29,9 +46,8 @@ void ISample::print_structure() } } -/* ************************************************************************* */ -// add parameters from local pool to external pool and call recursion over direct children -/* ************************************************************************* */ +//! add parameters from local pool to external pool and call recursion over direct children + std::string ISample::addParametersToExternalPool(std::string path, ParameterPool *external_pool, int copy_number) const { std::string new_path = IParameterized::addParametersToExternalPool(path, external_pool, copy_number); @@ -62,50 +78,3 @@ std::string ISample::addParametersToExternalPool(std::string path, ParameterPool } return new_path; } - -/* ************************************************************************* */ -// another example of how to make same as above using iterators -// return new parameter pool which contains all local parameter as well as all -// parameters from CompositeSample; tree user has to take to delete it -// -// example shows how to walk through all subsamples using iterators instead -// of recursion -/* ************************************************************************* */ -//ParameterPool *ISample::createParameterTreeTest() -//{ -// // cloning first local parameter pool -// ParameterPool *newpool = m_parameters.cloneWithPrefix( std::string("/")+getName()+std::string("/")); - -// // walking through children tree -// ICompositeSample *sample = getCompositeSample(); -// if( sample ) { -// // using helper to get unique path in the tree as parameter names -// Utils::StringSampleHelper strHelper; -// strHelper.add(getName(), 0); // "folder" name, level of nesting (0 - for top level) - -// // loop over children tree -// ICompositeIterator it = sample->createIterator(); -// it.first(); -// while(!it.is_done()) -// { -// // adding child name to the path -// strHelper.add(it.get_current()->getName(), it.get_level() ); - -// // access to the poll parameter of child -// ParameterPool *pool = it.get_current()->getParameterPool(); -// if(pool->size()) { -// for(ParameterPool::iterator_t ip=pool->begin(); ip!=pool->end(); ip++) { -// //std::cout << (*ip).first << " " << (*ip).second << std::endl; -// // adding parameter name to the path -// strHelper.add( (*ip).first, it.get_level()+1 ); -// // registering new parameter with full path -// newpool->addParameter(strHelper.get_path(), (*ip).second); -// } -// } -// it.next(); -// } -// //std::cout << *newpool; -// } -// return newpool; -// return 0; -//} diff --git a/Core/Samples/src/InterferenceFunction1DParaCrystal.cpp b/Core/Samples/src/InterferenceFunction1DParaCrystal.cpp index 9038d13376c..4f088f62d94 100644 --- a/Core/Samples/src/InterferenceFunction1DParaCrystal.cpp +++ b/Core/Samples/src/InterferenceFunction1DParaCrystal.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunction1DParaCrystal.cpp +//! @brief Implements class InterferenceFunction1DParaCrystal. +// +// ************************************************************************** // + #include "InterferenceFunction1DParaCrystal.h" InterferenceFunction1DParaCrystal::InterferenceFunction1DParaCrystal(double peak_distance, double width, double corr_length) @@ -13,7 +30,6 @@ InterferenceFunction1DParaCrystal::InterferenceFunction1DParaCrystal(double peak init_parameters(); } - void InterferenceFunction1DParaCrystal::init_parameters() { getParameterPool()->clear(); @@ -22,7 +38,6 @@ void InterferenceFunction1DParaCrystal::init_parameters() getParameterPool()->registerParameter("corr_length", &m_corr_length); } - double InterferenceFunction1DParaCrystal::evaluate(const cvector_t &q) const { double qxr = q.x().real(); @@ -43,4 +58,3 @@ complex_t InterferenceFunction1DParaCrystal::FTGaussianCorrLength(double qpar) c } return result; } - diff --git a/Core/Samples/src/InterferenceFunction2DLattice.cpp b/Core/Samples/src/InterferenceFunction2DLattice.cpp index bcde5f6cb54..cb110baa489 100644 --- a/Core/Samples/src/InterferenceFunction2DLattice.cpp +++ b/Core/Samples/src/InterferenceFunction2DLattice.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunction2DLattice.cpp +//! @brief Implements class InterferenceFunction2DLattice. +// +// ************************************************************************** // + #include "InterferenceFunction2DLattice.h" #include <cassert> diff --git a/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp b/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp index ea8b696826c..2fda7bc7cda 100644 --- a/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp +++ b/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/InterferenceFunction2DParaCrystal.cpp +//! @brief Implements class InterferenceFunction2DParaCrystal. +// +// ************************************************************************** // + #include "InterferenceFunction2DParaCrystal.h" #include "MathFunctions.h" #include "MemberFunctionIntegrator.h" @@ -168,4 +185,3 @@ complex_t InterferenceFunction2DParaCrystal::FTPDF(double qx, double qy, double } return result; } - diff --git a/Core/Samples/src/Lattice.cpp b/Core/Samples/src/Lattice.cpp index 9d21c3dbc3f..a6a980854d4 100644 --- a/Core/Samples/src/Lattice.cpp +++ b/Core/Samples/src/Lattice.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Lattice.cpp +//! @brief Implements class Lattice. +// +// ************************************************************************** // + #include "Lattice.h" #include "Exceptions.h" @@ -85,27 +102,6 @@ Coordinate3D<int> Lattice::getNearestReciprocalLatticeVectorCoordinates(const kv return Coordinate3D<int>(c1, c2, c3); } -//std::vector<kvector_t> Lattice::getLatticeVectorsWithinRadius( -// const kvector_t& input_vector, double radius) const -//{ -// if (!m_cache_ok) { -// initialize(); -// } -// Coordinate3D<int> nearest_coords = getNearestLatticeVectorCoordinates(input_vector); -// return getVectorsWithinRadius(input_vector, nearest_coords, radius, m_a1, m_a2, m_a3, m_b1, m_b2, m_b3); -//} - -//std::vector<kvector_t> Lattice::getReciprocalLatticeVectorsWithinRadius( -// const kvector_t& input_vector, double radius) const -//{ -// if (!m_cache_ok) { -// initialize(); -// } -// Coordinate3D<int> nearest_coords = getNearestReciprocalLatticeVectorCoordinates(input_vector); -// return getVectorsWithinRadius(input_vector, nearest_coords, radius, m_b1, m_b2, m_b3, m_a1, m_a2, m_a3); - -//} - void Lattice::computeReciprocalLatticeVectorsWithinRadius( const kvector_t& input_vector, double radius) const { @@ -116,32 +112,6 @@ void Lattice::computeReciprocalLatticeVectorsWithinRadius( computeVectorsWithinRadius(input_vector, nearest_coords, radius, m_b1, m_b2, m_b3, m_a1, m_a2, m_a3); } - -//std::vector<double> Lattice::collectBraggAngles(size_t size, double max_radius, -// const TRange<double>& phi_range, const TRange<double>& z_range) const -//{ -// std::vector<double> result; -//// int granularity = std::max(1000, (int)size); // -// double brillouin_volume = 8*M_PI*M_PI*M_PI/getVolume(); -// double max_volume = max_radius*max_radius*phi_range.getDifference()*z_range.getDifference()/2.0; -// int max_nbr_angles = (int)(max_volume/brillouin_volume); -// if (size < (size_t)max_nbr_angles) { -// max_radius *= (double)size/max_nbr_angles; -// } -// double radius = std::max(max_radius, z_range.getMax()); -// std::vector<kvector_t> rec_vectors = getReciprocalLatticeVectorsWithinRadius(kvector_t(0.0, 0.0, 0.0), radius); -// for (size_t i=0; i<rec_vectors.size(); ++i) { -// kvector_t rvec = rec_vectors[i]; -// double phi = rvec.phi(); -// if (rvec.rho()<max_radius && phi_range.inRange(phi) && z_range.inRange(rvec.z())) { -// result.push_back(phi); -// } -// } -// std::cout << "Returning " << result.size() << " angles" << std::endl; -// return result; -//} - - std::vector<double> Lattice::collectBraggAngles(size_t size, double max_radius, const TRange<double>& phi_range, const TRange<double>& z_range) const { @@ -168,8 +138,6 @@ std::vector<double> Lattice::collectBraggAngles(size_t size, double max_radius, return result; } - - Lattice Lattice::createFCCLattice(double a) { double b = a/2.0; @@ -197,37 +165,6 @@ void Lattice::computeReciprocalVectors() const m_b3 = 2*M_PI/DotProduct(m_a3, a12)*a12; } -//std::vector<kvector_t> Lattice::getVectorsWithinRadius(const kvector_t &input_vector, -// const Coordinate3D<int> &nearest_coords, double radius, const kvector_t& v1, -// const kvector_t& v2, const kvector_t& v3, const kvector_t& rec1, -// const kvector_t& rec2, const kvector_t& rec3) const -//{ -// int max_X = (int)std::floor( rec1.mag()*radius/(2*M_PI) ); -// int max_Y = (int)std::floor( rec2.mag()*radius/(2*M_PI) ); -// int max_Z = (int)std::floor( rec3.mag()*radius/(2*M_PI) ); - -// std::vector<kvector_t> result; -// for (int index_X = -max_X; index_X <= max_X; ++index_X) -// { -// for (int index_Y = -max_Y; index_Y <= max_Y; ++index_Y) -// { -// for (int index_Z = -max_Z; index_Z <= max_Z; ++index_Z) -// { -// Coordinate3D<int> coords(index_X + nearest_coords[0], -// index_Y + nearest_coords[1], index_Z + nearest_coords[2]); -// if (mp_selection_rule && !mp_selection_rule->coordinateSelected(coords)) continue; -// kvector_t latticePoint = coords[0]*v1 + coords[1]*v2 + coords[2]*v3; -// if ((latticePoint - input_vector).mag() <= radius) -// { -// result.push_back(latticePoint); -// } -// } -// } -// } -// return result; -//} - - void Lattice::computeVectorsWithinRadius(const kvector_t &input_vector, const Coordinate3D<int> &nearest_coords, double radius, const kvector_t& v1, const kvector_t& v2, const kvector_t& v3, const kvector_t& rec1, @@ -257,8 +194,6 @@ void Lattice::computeVectorsWithinRadius(const kvector_t &input_vector, } } - - void Lattice::computeInverseLatticeVectors() const { computeInverseVectors(m_a1, m_a2, m_a3, m_amin1, m_amin2, m_amin3); diff --git a/Core/Samples/src/LatticeBasis.cpp b/Core/Samples/src/LatticeBasis.cpp index 9fe8769fee6..7a1faa64c1b 100644 --- a/Core/Samples/src/LatticeBasis.cpp +++ b/Core/Samples/src/LatticeBasis.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LatticeBasis.cpp +//! @brief Implements class LatticeBasis. +// +// ************************************************************************** // + #include "LatticeBasis.h" #include "FormFactors.h" #include "DiffuseParticleInfo.h" diff --git a/Core/Samples/src/Layer.cpp b/Core/Samples/src/Layer.cpp index 68c43aa8b48..71639206419 100644 --- a/Core/Samples/src/Layer.cpp +++ b/Core/Samples/src/Layer.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Layer.cpp +//! @brief Implements class Layer. +// +// ************************************************************************** // + #include "Layer.h" #include "Exceptions.h" #include <iomanip> @@ -28,41 +45,19 @@ Layer::Layer(const Layer &other) : ICompositeSample() } -//Layer &Layer::operator=(const Layer &other) -//{ -// if( this != &other) -// { -// ISample::operator=(other); -// mp_material = other.mp_material; -// m_thickness = other.m_thickness; -// init_parameters(); -// } -// return *this; -//} - +//! initialize pool parameters, i.e. register some of class members for later access via parameter pool - -/* ************************************************************************* */ -// initialize pool parameters, i.e. register some of class members for later -// access via parameter pool -/* ************************************************************************* */ void Layer::init_parameters() { getParameterPool()->clear(); getParameterPool()->registerParameter("thickness", &m_thickness); } - -/* ************************************************************************* */ -// clone -/* ************************************************************************* */ Layer *Layer::clone() const { return new Layer(*this); } - -/* ************************************************************************* */ void Layer::setThickness(double thickness) { if (thickness>=0.0) @@ -73,24 +68,16 @@ void Layer::setThickness(double thickness) throw DomainErrorException("Layer thickness cannot be negative"); } - void Layer::setMaterial(const IMaterial* p_material, double thickness) { setMaterial(p_material); setThickness(thickness); } +//! print content of multilayer -/* ************************************************************************* */ -// print content of multilayer -/* ************************************************************************* */ void Layer::print(std::ostream &ostr) const { ICompositeSample::print(ostr); ostr << *getMaterial(); -// ostr << getName() -// << " " << std::setw(12) << this -// << " " << getThickness() << "nm > " -// << *getMaterial(); } - diff --git a/Core/Samples/src/LayerDecorator.cpp b/Core/Samples/src/LayerDecorator.cpp index 729d3baf91e..ccdb2410810 100644 --- a/Core/Samples/src/LayerDecorator.cpp +++ b/Core/Samples/src/LayerDecorator.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LayerDecorator.cpp +//! @brief Implements class LayerDecorator. +// +// ************************************************************************** // + #include "LayerDecorator.h" LayerDecorator::LayerDecorator(const Layer &layer, @@ -68,9 +85,6 @@ LayerDecorator::LayerDecorator(const LayerDecorator& other) init_parameters(); } -/* ************************************************************************* */ -// print content of multilayer -/* ************************************************************************* */ void LayerDecorator::print(std::ostream &ostr) const { ICompositeSample::print(ostr); diff --git a/Core/Samples/src/LayerInterface.cpp b/Core/Samples/src/LayerInterface.cpp index f7401fb656c..97c1e1c6725 100644 --- a/Core/Samples/src/LayerInterface.cpp +++ b/Core/Samples/src/LayerInterface.cpp @@ -1,8 +1,24 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LayerInterface.cpp +//! @brief Implements class LayerInterface. +// +// ************************************************************************** // + #include "LayerInterface.h" #include <iostream> #include <iomanip> - LayerInterface::LayerInterface() : m_roughness(0) , m_LayerTop(0) @@ -11,13 +27,11 @@ LayerInterface::LayerInterface() setName("LayerInterface"); } - LayerInterface::~LayerInterface() { delete m_roughness; } - LayerInterface *LayerInterface::createSmoothInterface(const Layer *p_layer_top, const Layer *p_layer_bottom) { LayerInterface *lr = new LayerInterface(); @@ -26,7 +40,6 @@ LayerInterface *LayerInterface::createSmoothInterface(const Layer *p_layer_top, return lr; } - LayerInterface *LayerInterface::createRoughInterface(const Layer *p_layer_top, const Layer *p_layer_bottom, const LayerRoughness &roughness) { LayerInterface *lr = new LayerInterface(); @@ -36,7 +49,6 @@ LayerInterface *LayerInterface::createRoughInterface(const Layer *p_layer_top, c return lr; } - void LayerInterface::setRoughness(const LayerRoughness &roughness) { if(m_roughness) { @@ -50,21 +62,8 @@ void LayerInterface::setRoughness(const LayerRoughness &roughness) registerChild(m_roughness); } - -/* ************************************************************************* */ -// print -/* ************************************************************************* */ void LayerInterface::print(std::ostream &ostr) const { ICompositeSample::print(ostr); ostr << " top:" << getLayerTop() << " bottom:" << getLayerBottom(); -// ostr << getName() -// << " " << std::setw(12) << this -// << " top:"<< getLayerTop() << " bottom:" << getLayerBottom() << " "; -// const LayerRoughness *roughness = getRoughness(); -// if(roughness) { -// ostr << "> " << *roughness; -// }else{ -// ostr << "> no roughness"; -// } } diff --git a/Core/Samples/src/LayerRoughness.cpp b/Core/Samples/src/LayerRoughness.cpp index 6d52c05f37b..9dc39854ba7 100644 --- a/Core/Samples/src/LayerRoughness.cpp +++ b/Core/Samples/src/LayerRoughness.cpp @@ -1,9 +1,25 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/LayerRoughness.cpp +//! @brief Implements class LayerRoughness. +// +// ************************************************************************** // + #include "LayerRoughness.h" #include <cmath> #include <iostream> #include <iomanip> - LayerRoughness::LayerRoughness() : m_sigma(0) , m_hurstParameter(0) @@ -13,7 +29,6 @@ LayerRoughness::LayerRoughness() init_parameters(); } - LayerRoughness::LayerRoughness(double sigma, double hurstParameter, double latteralCorrLength) : m_sigma(sigma) , m_hurstParameter(hurstParameter) @@ -53,11 +68,8 @@ double LayerRoughness::getSpectralFun(const kvector_t &kvec) const return 4.0*M_PI*H * m_sigma*m_sigma * clength2 * std::pow( (1.0 + Qpar2*clength2), (-1-H) ); } - - -/* ************************************************************************* */ //! Correlation function of the roughness profile -/* ************************************************************************* */ + double LayerRoughness::getCorrFun(const kvector_t &k) const { double H = m_hurstParameter; @@ -66,14 +78,7 @@ double LayerRoughness::getCorrFun(const kvector_t &k) const return m_sigma*m_sigma*std::exp( -1.0*std::pow(R/clength, 2.*H) ); } - -/* ************************************************************************* */ -// print -/* ************************************************************************* */ void LayerRoughness::print(std::ostream &ostr) const { -// ostr << getName() -// << " " << std::setw(12) << this; -// ostr << "(s:" << m_sigma << ",H:"<<m_hurstParameter<< ",C:"<<m_latteralCorrLength << ")"; ISample::print(ostr); } diff --git a/Core/Samples/src/MaterialManager.cpp b/Core/Samples/src/MaterialManager.cpp index 9a865feffe9..3b63cb4aafb 100644 --- a/Core/Samples/src/MaterialManager.cpp +++ b/Core/Samples/src/MaterialManager.cpp @@ -1,10 +1,25 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/MaterialManager.cpp +//! @brief Implements class MaterialManager. +// +// ************************************************************************** // + #include "MaterialManager.h" #include "Exceptions.h" +//! clean material database -/* ************************************************************************* */ -// cleaning material database -/* ************************************************************************* */ void MaterialManager::clear() { for(materials_t::iterator it = m_materials.begin(); it!= m_materials.end(); ++it) { if( (*it).second ) delete (*it).second; @@ -12,10 +27,8 @@ void MaterialManager::clear() { m_materials.clear(); } +//! get material -/* ************************************************************************* */ -// get material -/* ************************************************************************* */ const IMaterial *MaterialManager::getMaterial(const std::string &name) { materials_t::const_iterator pos = m_materials.find(name); @@ -27,7 +40,6 @@ const IMaterial *MaterialManager::getMaterial(const std::string &name) } } - /* ************************************************************************* */ // Create material and add into database. The name of material serve as unique // identifier. If such material already exists, return it. If such material @@ -59,10 +71,6 @@ const IMaterial *MaterialManager::addHomogeneousMaterial(const std::string &name return addHomogeneousMaterial(name, complex_t(refractive_index_real, refractive_index_imag)); } - -/* ************************************************************************* */ -// print content of material database on the screen -/* ************************************************************************* */ void MaterialManager::print(std::ostream &ostr) const { ostr << typeid(*this).name() << " " << this << " nmaterials:" << m_materials.size() << std::endl; @@ -71,4 +79,3 @@ void MaterialManager::print(std::ostream &ostr) const ostr << *mat << std::endl; } } - diff --git a/Core/Samples/src/MesoCrystal.cpp b/Core/Samples/src/MesoCrystal.cpp index 4cf1745fe6c..bd046e89256 100644 --- a/Core/Samples/src/MesoCrystal.cpp +++ b/Core/Samples/src/MesoCrystal.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/MesoCrystal.cpp +//! @brief Implements class MesoCrystal. +// +// ************************************************************************** // + #include "MesoCrystal.h" MesoCrystal::MesoCrystal(IClusteredParticles* p_particle_structure, @@ -22,7 +39,6 @@ MesoCrystal::MesoCrystal(const IClusteredParticles &particle_structure, registerChild(mp_meso_form_factor); } - MesoCrystal::~MesoCrystal() { delete mp_meso_form_factor; diff --git a/Core/Samples/src/MultiLayer.cpp b/Core/Samples/src/MultiLayer.cpp index 919fb764e13..a256046122e 100644 --- a/Core/Samples/src/MultiLayer.cpp +++ b/Core/Samples/src/MultiLayer.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/MultiLayer.cpp +//! @brief Implements class MultiLayer. +// +// ************************************************************************** // + #include <algorithm> #include <stdexcept> #include <iomanip> @@ -10,13 +27,11 @@ MultiLayer::MultiLayer() : m_crossCorrLength(0) init_parameters(); } - MultiLayer::~MultiLayer() { clear(); } - /* ************************************************************************* */ // initialize pool parameters, i.e. register some of class members for later // access via parameter pool @@ -27,7 +42,6 @@ void MultiLayer::init_parameters() getParameterPool()->registerParameter("crossCorrLength", &m_crossCorrLength); } - /* ************************************************************************* */ // clear MultiLayer contents including interfaces /* ************************************************************************* */ @@ -48,10 +62,8 @@ void MultiLayer::clear() getParameterPool()->clear(); } +//! clone MultiLayer contents including interfaces -/* ************************************************************************* */ -// clone MultiLayer contents including interfaces -/* ************************************************************************* */ MultiLayer *MultiLayer::clone() const { MultiLayer *newMultiLayer = new MultiLayer(); @@ -83,7 +95,6 @@ MultiLayer *MultiLayer::clone() const return newMultiLayer; } - /* ************************************************************************* */ // return pointer to the top interface of the layer // (nInterfaces = nLayers-1, first layer in multilayer doesn't have interface) @@ -103,10 +114,8 @@ const LayerInterface *MultiLayer::getLayerBottomInterface(size_t i_layer) const return i_layer<m_interfaces.size() ? m_interfaces[ check_interface_index(i_layer) ] : 0; } +//! add layer with top roughness -/* ************************************************************************* */ -// add layer with top roughness -/* ************************************************************************* */ void MultiLayer::addLayerWithTopRoughness(const Layer &layer, const LayerRoughness &roughness) { Layer *p_new_layer = layer.clone(); @@ -123,11 +132,8 @@ void MultiLayer::addLayerWithTopRoughness(const Layer &layer, const LayerRoughne m_layers_z.push_back(0.0); } +//! add layer with default (zero) roughness - -/* ************************************************************************* */ -// add layer with default (zero) roughness -/* ************************************************************************* */ void MultiLayer::addLayer(const Layer &layer) { LayerRoughness zero_roughness; @@ -135,27 +141,9 @@ void MultiLayer::addLayer(const Layer &layer) } -///* ************************************************************************* */ -////! Correlation function of roughnesses between the interfaces -////! j,k - indexes of layers in multilayer whose bottom interfaces we are considering -///* ************************************************************************* */ -//double MultiLayer::getCrossCorrFun(const kvector_t &kvec, int j, int k) const -//{ -// double z_j = getLayerBottomZ(j); -// double z_k = getLayerBottomZ(k); -// const LayerRoughness &rough_j = getLayerBottomInterface(j)->getRoughness(); -// const LayerRoughness &rough_k = getLayerBottomInterface(k)->getRoughness(); -// double sigma_j = rough_j.getSigma(); -// double sigma_k = rough_k.getSigma(); -// double corr = 0.5*(sigma_k/sigma_j*rough_j.getCorrFun(kvec) + sigma_j/sigma_k*rough_k.getCorrFun(kvec) ) * std::exp( -1*std::abs(z_j-z_k)/m_crossCorrLength ); -// return corr; -//} - - -/* ************************************************************************* */ //! Fourier transform of the correlation function of roughnesses between the interfaces //! j,k - indexes of layers in multilayer whose bottom interfaces we are considering -/* ************************************************************************* */ + double MultiLayer::getCrossCorrSpectralFun(const kvector_t &kvec, size_t j, size_t k) const { if(m_crossCorrLength == 0) return 0.0; @@ -171,10 +159,8 @@ double MultiLayer::getCrossCorrSpectralFun(const kvector_t &kvec, size_t j, size return corr; } - -/* ************************************************************************* */ //! change layer thickness -/* ************************************************************************* */ + void MultiLayer::setLayerThickness(size_t i_layer, double thickness) { m_layers[ check_layer_index(i_layer) ]->setThickness(thickness); @@ -186,9 +172,7 @@ void MultiLayer::setLayerThickness(size_t i_layer, double thickness) } } -/* ************************************************************************* */ //! change layer thickness -/* ************************************************************************* */ MultiLayerDWBASimulation* MultiLayer::createDWBASimulation() const { @@ -204,15 +188,9 @@ MultiLayerDWBASimulation* MultiLayer::createDWBASimulation() const for(size_t i=0; i<getNumberOfInterfaces(); ++i) { if( getLayerInterface(i)->getRoughness() ) return new MultiLayerDWBASimulation(this); } - return 0; } - - -/* ************************************************************************* */ -// print content of multilayer -/* ************************************************************************* */ void MultiLayer::print(std::ostream &ostr) const { ostr << getName() << " " << this << std::endl; diff --git a/Core/Samples/src/Particle.cpp b/Core/Samples/src/Particle.cpp index b6815e63e3a..528f9e19be3 100644 --- a/Core/Samples/src/Particle.cpp +++ b/Core/Samples/src/Particle.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/Particle.cpp +//! @brief Implements class Particle. +// +// ************************************************************************** // + #include "Particle.h" #include "ParticleInfo.h" diff --git a/Core/Samples/src/ParticleBuilder.cpp b/Core/Samples/src/ParticleBuilder.cpp index 7d745029711..a2e53cc9c35 100644 --- a/Core/Samples/src/ParticleBuilder.cpp +++ b/Core/Samples/src/ParticleBuilder.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleBuilder.cpp +//! @brief Implements class ParticleBuilder. +// +// ************************************************************************** // + #include "ParticleBuilder.h" #include "ParticleDecoration.h" #include "Numeric.h" @@ -11,17 +28,14 @@ ParticleBuilder::ParticleBuilder() : { } - ParticleBuilder::~ParticleBuilder() { delete m_prototype; delete m_parameter; } +//! set prototype for particle production -/* ************************************************************************* */ -//set prototype for particle production -/* ************************************************************************* */ void ParticleBuilder::setPrototype(const Particle &particle, std::string name, const StochasticParameter<double> ¶m, double scale) { delete m_prototype; @@ -32,10 +46,8 @@ void ParticleBuilder::setPrototype(const Particle &particle, std::string name, c m_scale = scale; } +//! plant particles in given decoration -/* ************************************************************************* */ -// plant particles in given decoration -/* ************************************************************************* */ void ParticleBuilder::plantParticles(ParticleDecoration &decor) { if( !m_prototype ) throw NullPointerException("ParticleBuilder::plantParticle() -> Error. No prototype is defined"); @@ -73,5 +85,4 @@ void ParticleBuilder::plantParticles(ParticleDecoration &decor) } delete pool; - } diff --git a/Core/Samples/src/ParticleCoreShell.cpp b/Core/Samples/src/ParticleCoreShell.cpp index 4012fb0de90..9b2da4b8a0d 100644 --- a/Core/Samples/src/ParticleCoreShell.cpp +++ b/Core/Samples/src/ParticleCoreShell.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleCoreShell.cpp +//! @brief Implements class ParticleCoreShell. +// +// ************************************************************************** // + #include "ParticleCoreShell.h" #include "FormFactors.h" diff --git a/Core/Samples/src/ParticleDecoration.cpp b/Core/Samples/src/ParticleDecoration.cpp index 584871b80b5..bdc9095a3bb 100644 --- a/Core/Samples/src/ParticleDecoration.cpp +++ b/Core/Samples/src/ParticleDecoration.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleDecoration.cpp +//! @brief Implements class ParticleDecoration. +// +// ************************************************************************** // + #include "ParticleDecoration.h" #include "InterferenceFunctionNone.h" #include "DecouplingApproximationStrategy.h" @@ -5,7 +22,7 @@ #include "InterferenceFunction1DParaCrystal.h" #include "SizeSpacingCorrelationApproximationStrategy.h" -/* ************************************************************************* */ + ParticleDecoration::ParticleDecoration() : m_total_abundance(0.0) { @@ -26,7 +43,6 @@ ParticleDecoration::ParticleDecoration(const Particle &p_particle, double depth, addParticle(p_particle.clone(), 0, depth, abundance); } - ParticleDecoration::~ParticleDecoration() { for (size_t i=0; i<m_particles.size(); ++i) { @@ -34,7 +50,6 @@ ParticleDecoration::~ParticleDecoration() } } - ParticleDecoration* ParticleDecoration::clone() const { ParticleDecoration *p_new = new ParticleDecoration(); @@ -54,10 +69,8 @@ ParticleDecoration* ParticleDecoration::clone() const return p_new; } +//! add particle -/* ************************************************************************* */ -// add particle -/* ************************************************************************* */ void ParticleDecoration::addParticle(Particle* p_particle, double depth, double abundance) { @@ -83,17 +96,15 @@ void ParticleDecoration::addParticle(Particle* p_particle, addAndRegisterParticleInfo( new ParticleInfo(p_particle, transform, depth, abundance) ); } -/* ************************************************************************* */ -// add particle info -/* ************************************************************************* */ +//! add particle info + void ParticleDecoration::addParticleInfo(const ParticleInfo &info) { addAndRegisterParticleInfo( info.clone() ); } -/* ************************************************************************* */ -// get particle info -/* ************************************************************************* */ +//! get particle info + const ParticleInfo* ParticleDecoration::getParticleInfo(size_t index) const { if (index<m_particles.size()) { @@ -107,10 +118,8 @@ double ParticleDecoration::getAbundanceFractionOfParticle(size_t index) const return getParticleInfo(index)->getAbundance()/m_total_abundance; } +//! add interference functions -/* ************************************************************************* */ -// add interference functions -/* ************************************************************************* */ void ParticleDecoration::addInterferenceFunction(IInterferenceFunction* p_interference_function) { addAndRegisterInterferenceFunction(p_interference_function); diff --git a/Core/Samples/src/ParticleInfo.cpp b/Core/Samples/src/ParticleInfo.cpp index 6d47b21543c..9cc2c53a0a9 100644 --- a/Core/Samples/src/ParticleInfo.cpp +++ b/Core/Samples/src/ParticleInfo.cpp @@ -1,6 +1,21 @@ -#include "ParticleInfo.h" - +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/ParticleInfo.cpp +//! @brief Implements class ParticleInfo. +// +// ************************************************************************** // +#include "ParticleInfo.h" ParticleInfo::ParticleInfo(Particle* p_particle, Geometry::Transform3D *transform, double depth, double abundance) : mp_particle(p_particle) @@ -13,7 +28,6 @@ ParticleInfo::ParticleInfo(Particle* p_particle, Geometry::Transform3D *transfor init_parameters(); } - ParticleInfo::ParticleInfo(const Particle &p_particle, const Geometry::Transform3D &transform, double depth, double abundance) : mp_particle(p_particle.clone()) , mp_transform(new Geometry::Transform3D(transform)) @@ -25,25 +39,19 @@ ParticleInfo::ParticleInfo(const Particle &p_particle, const Geometry::Transform init_parameters(); } - ParticleInfo::~ParticleInfo() { delete mp_particle; delete mp_transform; } - -// initialize pool parameters, i.e. register some of class members for later access via parameter pool +//! initialize pool parameters, i.e. register some of class members for later access via parameter pool void ParticleInfo::init_parameters() { getParameterPool()->clear(); getParameterPool()->registerParameter("depth", &m_depth); } - -/* ************************************************************************* */ -// clone method -/* ************************************************************************* */ ParticleInfo *ParticleInfo::clone() const { Geometry::Transform3D *transform(0); diff --git a/Core/Samples/src/PositionParticleInfo.cpp b/Core/Samples/src/PositionParticleInfo.cpp index d5cbd362142..c55c0b518e6 100644 --- a/Core/Samples/src/PositionParticleInfo.cpp +++ b/Core/Samples/src/PositionParticleInfo.cpp @@ -1,3 +1,20 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @copyright Forschungszentrum Jülich GmbH 2013 +// +// Homepage: apps.jcns.fz-juelich.de/BornAgain +// License: GNU General Public License v3 or higher (see COPYING) +// +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +//! @file Samples/PositionParticleInfo.cpp +//! @brief Implements class PositionParticleInfo. +// +// ************************************************************************** // + #include "PositionParticleInfo.h" #include <iostream> PositionParticleInfo::PositionParticleInfo(Particle* p_particle, @@ -11,7 +28,6 @@ PositionParticleInfo::PositionParticleInfo(Particle* p_particle, init_parameters(); } - PositionParticleInfo::PositionParticleInfo(const Particle &particle, const Geometry::Transform3D &transform, kvector_t position, double abundance) @@ -23,7 +39,6 @@ PositionParticleInfo::PositionParticleInfo(const Particle &particle, init_parameters(); } - PositionParticleInfo::PositionParticleInfo(Particle* p_particle, kvector_t position, double abundance) : ParticleInfo(p_particle, 0, position.z(), abundance) , m_pos_x(position.x()) @@ -33,7 +48,6 @@ PositionParticleInfo::PositionParticleInfo(Particle* p_particle, kvector_t posit init_parameters(); } - PositionParticleInfo::PositionParticleInfo(const Particle &particle, kvector_t position, double abundance) : ParticleInfo(particle.clone(), 0, position.z(), abundance) , m_pos_x(position.x()) @@ -43,7 +57,6 @@ PositionParticleInfo::PositionParticleInfo(const Particle &particle, kvector_t p init_parameters(); } - PositionParticleInfo::~PositionParticleInfo() { } -- GitLab