diff --git a/App/inc/App.h b/App/inc/App.h index 33a2d6f9b8a7a415b572cfb5323b8aac3246bfda..26b64a7b85ed2b890ff17cff0bc320529a6b3995 100644 --- a/App/inc/App.h +++ b/App/inc/App.h @@ -1,5 +1,18 @@ #ifndef APP_H #define APP_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 App.h +//! @brief Common include for files involved into ROOT dictionary generation +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include "DrawHelper.h" diff --git a/App/inc/AppLinkDef.h b/App/inc/AppLinkDef.h index 18014c817cea0a1fe92b783c91d57c13a8b7ef9f..0b39e89dc0ea691ca185d65ddb70ade07a718634 100644 --- a/App/inc/AppLinkDef.h +++ b/App/inc/AppLinkDef.h @@ -1,4 +1,17 @@ #ifdef __CINT__ +// ******************************************************************** +// * 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 AppLinkDef.h +//! @brief Steering file for ROOT dictionary generation +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #pragma link off all globals; #pragma link off all classes; diff --git a/App/inc/DrawHelper.h b/App/inc/DrawHelper.h index 2d91d9040144cf3a301198ceaf7dd81ccabba542..9066497aab2a41a4fc808795d052b4b11af87cdb 100644 --- a/App/inc/DrawHelper.h +++ b/App/inc/DrawHelper.h @@ -1,5 +1,18 @@ #ifndef DRAWHELPER_H #define DRAWHELPER_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 DrawHelper.h +//! @brief Helper class definition for sophisticated data drawing +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include "TObject.h" diff --git a/App/inc/TestDWBAFormFactor.h b/App/inc/TestDWBAFormFactor.h index c05f66726f2bb309dc24eaad300fbf807223bd01..825c79e6281535285ccc18756f27bbbe69602c86 100644 --- a/App/inc/TestDWBAFormFactor.h +++ b/App/inc/TestDWBAFormFactor.h @@ -1,12 +1,19 @@ -/* - * TestDWBAFormFactor.h - * - * Created on: May 2, 2012 - * Author: herck - */ - #ifndef TESTDWBAFORMFACTOR_H_ #define TESTDWBAFORMFACTOR_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 TestDWBAFormFactor.h +//! @brief Definition of TestDWBAFormFactor class for formfactor validation +//! @author herk +//! @date 02.05.2012 + #include "IAlgorithm.h" #include "OutputData.h" diff --git a/App/inc/TestDiffuseScattering.h b/App/inc/TestDiffuseScattering.h index cdd8ab173b36dd4236fe603479dd2764489b7a63..d1e45d64a41ac3402da9fbf7c728d26a622753b4 100644 --- a/App/inc/TestDiffuseScattering.h +++ b/App/inc/TestDiffuseScattering.h @@ -11,7 +11,7 @@ // ******************************************************************** //! @file TestDiffuseScattering.h //! @brief Test of diffusse (incoherent) scattering from rough multilayer in DWBA. -//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de> +//! @author Scientific Computing Group at FRM II //! @date 01.04.2012 #include "IAlgorithm.h" diff --git a/App/inc/TestFormFactor.h b/App/inc/TestFormFactor.h index efccc46eab411d6f210444e82b3aafc496265a08..205b8dffa69b58765b347152f2e4af668e8a40b6 100644 --- a/App/inc/TestFormFactor.h +++ b/App/inc/TestFormFactor.h @@ -1,10 +1,24 @@ #ifndef TESTFORMFACTOR_H #define TESTFORMFACTOR_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 TestFormFactor.h +//! @brief Definition of TestFormFactor class for formfactor validation +//! @author herk +//! @date 02.05.2012 #include "IAlgorithm.h" #include "OutputData.h" #include "FormFactorCylinder.h" + class TestFormFactor : public IAlgorithm { public: diff --git a/App/inc/TestFresnelCoeff.h b/App/inc/TestFresnelCoeff.h index 47d599271395fb76ee2f7671657534bec9cc9104..5bf60f682a0116a86ac554383ec0bab44d4464e5 100644 --- a/App/inc/TestFresnelCoeff.h +++ b/App/inc/TestFresnelCoeff.h @@ -1,3 +1,16 @@ +// ******************************************************************** +// * 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 TestFresnelCoeff.h +//! @brief Definition of TestFresnelCoeff class for tests of Fresnel coeffs +//! @author Scientific Computing Group at FRM II +//! @date 02.05.2012 #ifndef TESTFRESNELCOEFF_H #define TESTFRESNELCOEFF_H diff --git a/App/inc/TestRoughness.h b/App/inc/TestRoughness.h index fa7518394280e9b8bfd93a003ebd6e0987dcfb2f..e300af6b8ce810b519dcc62bfe32a7847b920323 100644 --- a/App/inc/TestRoughness.h +++ b/App/inc/TestRoughness.h @@ -1,9 +1,20 @@ #ifndef TESTROUGHNESS_H #define TESTROUGHNESS_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 TestRoughness.h +//! @brief Tests of roughness +//! @author Scientific Computing Group at FRM II +//! @date 02.05.2012 #include <vector> - #include "IAlgorithm.h" #include "LayerRoughness.h" diff --git a/App/src/DrawHelper.cpp b/App/src/DrawHelper.cpp index 4d76ebe22c6470a8e90a1d41229de38b402348c1..f522cf40c19ab1c67759a514fa5942f27fe5f5a4 100644 --- a/App/src/DrawHelper.cpp +++ b/App/src/DrawHelper.cpp @@ -177,12 +177,8 @@ void DrawHelper::SaveReport() // canvas->Print(sfilename.c_str()); // simple method if file page and all canvases have same aspect ratio - // user canvas will be redrawn in TPad with preserving initial apsect ratio - - std::cout << c1->GetName() << c1->GetX1() << c1->GetY1() << c1->GetX2() << c1->GetY2() << std::endl; - std::cout << c1->GetName() << " " << c1->GetWindowWidth() << " " << c1->GetWindowHeight() << std::endl; - - // first we need appropriate TPad in our master canvas + // preserving aspect ratio of user's canvas + // first we need appropriate TPad in our master canvas which has same aspect ratio as user canvas double xlow(0), ylow(0), xup(1), yup(1); if( c1->GetWindowWidth() >= c1->GetWindowHeight() ) { double npx_user_new = npx_master; @@ -201,15 +197,14 @@ void DrawHelper::SaveReport() } TPad *pad = new TPad("tmppad", "tmppad", xlow, ylow, xup, yup); + // draw pad in master canvas, draw user canvas in the pad and save whole thing in file cmaster->cd(); pad->Draw(); pad->cd(); c1->DrawClonePad(); - cmaster->Print(sfilename.c_str()); } - stmpname = sfilename + "]"; cmaster->Print(stmpname.c_str()); // close file } diff --git a/App/src/main.cpp b/App/src/main.cpp index 582a255b856156268f75f5e3f9aa7a48cf6f76af..2ebee5d96d5c57dc0004dd050ee34353adb4382b 100644 --- a/App/src/main.cpp +++ b/App/src/main.cpp @@ -1,5 +1,3 @@ -#include <iostream> -#include <string> #include "TestFresnelCoeff.h" #include "TestDiffuseScattering.h" #include "TestFormFactor.h" @@ -7,8 +5,11 @@ #include "TestRoughness.h" #include "DrawHelper.h" +#include <iostream> +#include <string> #include "TApplication.h" + bool exists(int argc, char **argv, const std::string &stext); int main(int argc, char **argv) @@ -42,11 +43,13 @@ int main(int argc, char **argv) test.execute(); } + // user algorithm to test DWBA formfactors if( exists(argc, argv, "dwba") ) { TestDWBAFormFactor test; test.execute(); } + // utility which saves user plots in multi-page pdf file if( exists(argc, argv, "report") ) { DrawHelper::SaveReport(); } diff --git a/Core/inc/CalculatorOptical.h b/Core/inc/CalculatorOptical.h index 82deb220b32f6851099a586f74e1e940257dbd8f..7e3f5d97ad0a8a2e3fb15a9362f987a67a08a8b0 100644 --- a/Core/inc/CalculatorOptical.h +++ b/Core/inc/CalculatorOptical.h @@ -1,5 +1,18 @@ #ifndef CALCULATOROPTICAL_H #define CALCULATOROPTICAL_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 CalculatorOptical.h +//! @brief Defenition of base class for optical calculations +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 class CalculatorOptical { diff --git a/Core/inc/DWBAFormFactor.h b/Core/inc/DWBAFormFactor.h index 2f591f8bb139b283d90e1d61b186555e71a235d2..175756291b383206cd8553846830a4928a9b08a1 100644 --- a/Core/inc/DWBAFormFactor.h +++ b/Core/inc/DWBAFormFactor.h @@ -1,16 +1,23 @@ -/* - * DWBAFormFactor.h - * - * Created on: Apr 26, 2012 - * Author: herck - */ - #ifndef DWBAFORMFACTOR_H_ #define DWBAFORMFACTOR_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 DWBAFormFactor.h +//! @brief Definition of DWBAFormFactor +//! @author herck +//! @date 01.05.2012 #include "IFormFactor.h" #include "IDoubleToComplexFunction.h" + class DWBAFormFactor: public IFormFactor { public: diff --git a/Core/inc/DispersedParticleDecorator.h b/Core/inc/DispersedParticleDecorator.h index 880b568f7b14d65b1c864286796b239b6157403b..35d3e1f642eacd19801813db251b6b64587e0e27 100644 --- a/Core/inc/DispersedParticleDecorator.h +++ b/Core/inc/DispersedParticleDecorator.h @@ -1,8 +1,22 @@ #ifndef DISPERSEDPARTICLEDECORATOR_H #define DISPERSEDPARTICLEDECORATOR_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 DispersedParticleDecorator.h +//! @brief Defenition of DispersedParticleDecorator +//! @author Scientific Computing Group at FRM II +//! @date 01.05.2012 #include "ISample.h" + class DispersedParticleDecorator : public ISample { public: diff --git a/Core/inc/DoubleToComplexInterpolatingFunction.h b/Core/inc/DoubleToComplexInterpolatingFunction.h index dd2249c12b31da9e1413ca47a01291b613398202..5e8fa0fecf321432fbf4863f1f1cf453d513c9fb 100644 --- a/Core/inc/DoubleToComplexInterpolatingFunction.h +++ b/Core/inc/DoubleToComplexInterpolatingFunction.h @@ -1,16 +1,23 @@ -/* - * DoubleToComplexInterpolatingFunction.h - * - * Created on: Apr 27, 2012 - * Author: herck - */ - #ifndef DOUBLETOCOMPLEXINTERPOLATINGFUNCTION_H_ #define DOUBLETOCOMPLEXINTERPOLATINGFUNCTION_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 DoubleToComplexInterpolatingFunction.h +//! @brief Definition of something really cool ane necessary +//! @author herck +//! @date 01.05.2012 #include "IDoubleToComplexFunction.h" #include <map> + class DoubleToComplexInterpolatingFunction : public IDoubleToComplexFunction { public: diff --git a/Core/inc/Exceptions.h b/Core/inc/Exceptions.h index c24d45448e133b2c5905e20c4aaed350f6be745f..5791539a3a451b45179f6cb39c3c261666867c5a 100644 --- a/Core/inc/Exceptions.h +++ b/Core/inc/Exceptions.h @@ -1,9 +1,23 @@ #ifndef EXCEPTIONS_H #define EXCEPTIONS_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 Exceptions.h +//! @brief Definition of Exceptions +//! @author Scientific Computing Group at FRM II +//! @date 01.05.2012 #include <stdexcept> #include <string> + class NotImplementedException : public std::logic_error { public: diff --git a/Core/inc/FormFactorCylinder.h b/Core/inc/FormFactorCylinder.h index cd141baf6f80a6391e9d9e896184b3591c08ff57..3be3e5f5377841d628ddf2505b2a0bc8f3fd4ed9 100644 --- a/Core/inc/FormFactorCylinder.h +++ b/Core/inc/FormFactorCylinder.h @@ -1,9 +1,23 @@ #ifndef FORMFACTORCYLINDER_H #define FORMFACTORCYLINDER_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 FormFactorCylinder.h +//! @brief Definition of FormFactorCylinder +//! @author Scientific Computing Group at FRM II +//! @date 01.05.2012 #include "IFormFactor.h" #include "IStochasticParameter.h" + class FormFactorCylinder : public IBornFormFactor { public: diff --git a/Core/inc/HomogeneousMaterial.h b/Core/inc/HomogeneousMaterial.h index 646c8825aaa227245ca1194974408c221a946063..a45093538c9f482b3a842366053f7923ff2d4b84 100644 --- a/Core/inc/HomogeneousMaterial.h +++ b/Core/inc/HomogeneousMaterial.h @@ -11,7 +11,7 @@ // ******************************************************************** //! @file HomogeneousMaterial.h //! @brief Definition of HomogeneousMaterial class -//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de> +//! @author Scientific Computing Group at FRM II //! @date 01.04.2012 #include "IMaterial.h" diff --git a/Core/inc/IAlgorithm.h b/Core/inc/IAlgorithm.h index 05017b22567c8441c8d87b16cb27aa4a7ade4867..d768e2b308d4572f5357cff08c742942a1857888 100644 --- a/Core/inc/IAlgorithm.h +++ b/Core/inc/IAlgorithm.h @@ -1,5 +1,19 @@ #ifndef IALGORITHM_H #define IALGORITHM_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 IAlgorithm.h +//! @brief Definition of IAlgorithm +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 + class IAlgorithm { diff --git a/Core/inc/IDoubleToComplexFunction.h b/Core/inc/IDoubleToComplexFunction.h index 47f1eeba91a9e86c7a0b82c1124194da1a5250df..482bea7de7ca6e802f3fa949165bc6086f89698a 100644 --- a/Core/inc/IDoubleToComplexFunction.h +++ b/Core/inc/IDoubleToComplexFunction.h @@ -1,22 +1,31 @@ -/* - * IDoubleToComplexFunction.h - * - * Created on: Apr 27, 2012 - * Author: herck - */ - #ifndef IDOUBLETOCOMPLEXFUNCTION_H_ #define IDOUBLETOCOMPLEXFUNCTION_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 IDoubleToComplexFunction.h +//! @brief Definition of HomogeneousMaterial class +//! @author herck +//! @date 27.04.2012 #include "Types.h" -class IDoubleToComplexFunction { + +class IDoubleToComplexFunction +{ public: virtual ~IDoubleToComplexFunction() {} virtual complex_t evaluate(double value)=0; }; + class DoubleToComplexFunctionWrapper : public IDoubleToComplexFunction { public: diff --git a/Core/inc/IFormFactor.h b/Core/inc/IFormFactor.h index 4d3b07546db3b0a427bc5b8d1fecbadbe1aed809..d666527ce24a28bbdfb3b10898bacbc4d637b059 100644 --- a/Core/inc/IFormFactor.h +++ b/Core/inc/IFormFactor.h @@ -1,8 +1,22 @@ #ifndef IFORMFACTOR_H #define IFORMFACTOR_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 IFormFactor.h +//! @brief Definition of IFormFactor +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include "Types.h" + class IFormFactor { public: diff --git a/Core/inc/IMaterial.h b/Core/inc/IMaterial.h index 07469e5d6e553eef08b5e311a3189e3733771016..c66f3fb0d154c4865ce3a42a968d6668f917a713 100644 --- a/Core/inc/IMaterial.h +++ b/Core/inc/IMaterial.h @@ -11,12 +11,13 @@ // ******************************************************************** //! @file IMaterial.h //! @brief Definition of IMaterial class -//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de> +//! @author Scientific Computing Group at FRM II //! @date 01.04.2012 #include <string> #include <iostream> + //- ------------------------------------------------------------------- //! @class IMaterial //! @brief Material definition diff --git a/Core/inc/IRoughness.h b/Core/inc/IRoughness.h index e3d888b550d2b42b6e29653fdf1d4aad7d6c795c..2c93d7b353b5cd3bf48d538f614360699702b0ca 100644 --- a/Core/inc/IRoughness.h +++ b/Core/inc/IRoughness.h @@ -1,5 +1,19 @@ #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 + class IRoughness { diff --git a/Core/inc/ISample.h b/Core/inc/ISample.h index 44d548d4e5fe9eb3f7192b15e27f23d480178feb..1adaee4db77ac7ccf4e8d0a735b024eff6bb6871 100644 --- a/Core/inc/ISample.h +++ b/Core/inc/ISample.h @@ -1,8 +1,22 @@ #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 "Exceptions.h" + class ISample { public: diff --git a/Core/inc/ISimulation.h b/Core/inc/ISimulation.h index 898d0113a805fc9f8fdb5a2a95cf11a64fb7f01c..2b75991087e1b9cfe9918cda520f68c73e840d12 100644 --- a/Core/inc/ISimulation.h +++ b/Core/inc/ISimulation.h @@ -1,7 +1,19 @@ #ifndef ISIMULATION_H #define ISIMULATION_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 ISimulation.h +//! @brief Definition of ISimulation class +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 -// class OutputData; class ISimulation { diff --git a/Core/inc/IStochasticParameter.h b/Core/inc/IStochasticParameter.h index c51e78b05dd22218f9777207e2cda1da8e7b93ec..4b3e3f926c35a2205d8a8e60c084d4fd7bf9be6d 100644 --- a/Core/inc/IStochasticParameter.h +++ b/Core/inc/IStochasticParameter.h @@ -1,5 +1,19 @@ #ifndef ISTOCHASTICPARAMETER_H #define ISTOCHASTICPARAMETER_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 IStochasticParameter.h +//! @brief Definition of IStochasticParameter class +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 + class IStochasticParameter { diff --git a/Core/inc/Layer.h b/Core/inc/Layer.h index ec0c4182400fa25dd8539b19e483c6935efcd01d..2c245a7e0c5b350efe09fa900df086d007b9accf 100644 --- a/Core/inc/Layer.h +++ b/Core/inc/Layer.h @@ -11,7 +11,7 @@ // ******************************************************************** //! @file Layer.h //! @brief Definition of Layer class -//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de> +//! @author Scientific Computing Group at FRM II //! @date 01.04.2012 #include "ISample.h" diff --git a/Core/inc/LayerInterface.h b/Core/inc/LayerInterface.h index 0fc594fa53c4d5eb81b24f75d3dfee767f0e80f0..ff8b02cc5c897bb561b929db9aa30237749c88b3 100644 --- a/Core/inc/LayerInterface.h +++ b/Core/inc/LayerInterface.h @@ -11,14 +11,13 @@ // ******************************************************************** //! @file LayerInterface.h //! @brief Definition of LayerInterface class -//! @author JCNS Scientific Computing group +//! @author Scientific Computing Group at FRM II //! @date 01.04.2012 #include "LayerRoughness.h" class Layer; - //- ------------------------------------------------------------------- //! @class LayerInterface //! @brief Interface between two layers. diff --git a/Core/inc/LayerRoughness.h b/Core/inc/LayerRoughness.h index 913b0cd3ce488e5ca4c6453b1714bcef59cc998f..c9ef955dccb258b33bb9abc40dbfab78ab2a2242 100644 --- a/Core/inc/LayerRoughness.h +++ b/Core/inc/LayerRoughness.h @@ -11,7 +11,7 @@ // ******************************************************************** //! @file LayerRoughness.h //! @brief Definition of LayerRoughness class -//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de> +//! @author Scientific Computing Group at FRM II //! @date 01.04.2012 #include "Types.h" @@ -19,13 +19,13 @@ //- ------------------------------------------------------------------- -/// @class LayerRoughness -/// @brief Roughness of interface between two layers. -/// -/// Based on the article -/// 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 +//! @brief Roughness of interface between two layers. +//! +//! Based on the article +//! 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 { @@ -33,30 +33,30 @@ public: LayerRoughness(); LayerRoughness(double sigma, double hurstParameter, double latteralCorrLength); - /// return power spectral density of the surface roughness + //! return power spectral density of the surface roughness double getSpectralFun(const kvector_t &kvec) const; double getCorrFun(const kvector_t &k) const; - /// set rms value of roughness + //! set rms value of roughness void setSigma(double sigma) { m_sigma = sigma; } - /// return rms value of roughness + //! return rms value of roughness double getSigma() const { return m_sigma; } - /// Set hurst parameter. It describes how jagged the surface is. + //! Set hurst parameter. It describes how jagged the surface is. inline void setHurstParameter(double hurstParameter) { m_hurstParameter = hurstParameter; } - /// return hurst parameter + //! return hurst parameter inline double getHurstParameter() const { return m_hurstParameter; } - /// set lateral correlation length + //! set lateral correlation length inline void setLatteralCorrLength(double latteralCorrLength) { m_latteralCorrLength = latteralCorrLength; } - /// return latteral correlation length + //! return latteral correlation length inline double getLatteralCorrLength() const { return m_latteralCorrLength; } protected: - double m_sigma; ///< rms of roughness - double m_hurstParameter; ///< Hurst parameter which describes how jagged the interface, 0<H<=1 - double m_latteralCorrLength; ///< latteral correlation length of the roughness + double m_sigma; //!< rms of roughness + double m_hurstParameter; //!< Hurst parameter which describes how jagged the interface, 0<H<=1 + double m_latteralCorrLength; //!< latteral correlation length of the roughness }; #endif // LAYERROUGHNESS_H diff --git a/Core/inc/MaterialManager.h b/Core/inc/MaterialManager.h index 9aba38581b8e3e8fe3ffd0d334b95b0d535ba83d..417c83d8eb08f0af71527c5e677fd4d6bce0cfe4 100644 --- a/Core/inc/MaterialManager.h +++ b/Core/inc/MaterialManager.h @@ -11,7 +11,7 @@ // ******************************************************************** //! @file MaterialManager.h //! @brief Definition of MaterialManager class -//! @author JCNS Scientific Computing Group +//! @author Scientific Computing Group at FRM II //! @date 20.04.2012 #include <iostream> @@ -23,11 +23,11 @@ //- ------------------------------------------------------------------- -/// @class MaterialManager -/// @brief Manager of materials used in simulatiom. -/// -/// It is a singleton which provide common and unique interface for -/// material creation and access. No thread safeness. +//! @class MaterialManager +//! @brief Manager of materials used in simulatiom. +//! +//! It is a singleton which provide common and unique interface for +//! material creation and access. No thread safeness. //- ------------------------------------------------------------------- class MaterialManager { diff --git a/Core/inc/MathFunctions.h b/Core/inc/MathFunctions.h index 957b224b13e57ae552db1033c2f402d06105e74c..6a205a81bd5ffa50c779afc553894509b53f8c2e 100644 --- a/Core/inc/MathFunctions.h +++ b/Core/inc/MathFunctions.h @@ -1,13 +1,25 @@ #ifndef MATHFUNCTIONS_H #define MATHFUNCTIONS_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 MathFunctions.h +//! @brief Collection of mathematical functions +//! @author Scientific Computing Group at FRM II +//! @date 20.04.2012 #include <cstdlib> - -#include "Types.h" - +#include <vector> #include "gsl/gsl_sf_bessel.h" #include "gsl/gsl_sf_trig.h" -#include <vector> +#include "Types.h" + namespace MathFunctions { diff --git a/Core/inc/MultiLayer.h b/Core/inc/MultiLayer.h index e1f294c7bcd951c02ad0dbc472588fb8c2d9ab92..abe8ebf08c3a05115068ef614be25399e8c8c472 100644 --- a/Core/inc/MultiLayer.h +++ b/Core/inc/MultiLayer.h @@ -11,7 +11,7 @@ // ******************************************************************** //! @file MultiLayer.h //! @brief Definition of MultiLayer class -//! @author James Bond <j.bond@fz-juelich.de>, Chuck Norris <c.norris@fz-juelich.de> +//! @author Scientific Computing Group at FRM II //! @date 01.04.2012 #include <vector> @@ -22,19 +22,19 @@ //- ------------------------------------------------------------------- -/// @class MultiLayer -/// @brief Stack of layers one on top of the other -/// -/// Example of system of 4 layers (3 interfaces): -/// -/// ambience layer #0 z=getLayerBottomZ(0)=0.0 -/// --------- interface #0 -/// Fe, 20A layer #1 z=getLayerBottomZ(1)=-20.0 -/// --------- interface #1 -/// Cr, 40A layer #2 z=getLayerBottomZ(2)=-60.0 -/// --------- interface #2 -/// substrate layer #3 z=getLayerBottomZ(3)=-60.0 -/// +//! @class MultiLayer +//! @brief Stack of layers one on top of the other +//! +//! Example of system of 4 layers (3 interfaces): +//! +//! ambience layer #0 z=getLayerBottomZ(0)=0.0 +//! --------- interface #0 +//! Fe, 20A layer #1 z=getLayerBottomZ(1)=-20.0 +//! --------- interface #1 +//! Cr, 40A layer #2 z=getLayerBottomZ(2)=-60.0 +//! --------- interface #2 +//! substrate layer #3 z=getLayerBottomZ(3)=-60.0 +//! //- ------------------------------------------------------------------- class MultiLayer : public ISample { @@ -42,45 +42,45 @@ public: MultiLayer(); ~MultiLayer(); - /// return number of layers in multilayer + //! return number of layers in multilayer inline size_t getNumberOfLayers() const { return m_layers.size(); } - /// add object to multilayer, overrides from ISample + //! add object to multilayer, overrides from ISample void addLayer(const Layer &p_child); - /// add layer with top roughness + //! add layer with top roughness void addLayerWithTopRoughness(const Layer &layer, const LayerRoughness &roughness); - /// return layer with given index + //! return layer with given index const Layer *getLayer(size_t i_layer) const { return m_layers[ check_layer_index(i_layer) ]; } - /// return z-coordinate of the layer's bottom + //! return z-coordinate of the layer's bottom double getLayerBottomZ(size_t i_layer) const { return m_layers_z[ check_layer_index(i_layer) ]; } - /// return top interface of layer + //! return top interface of layer const LayerInterface *getLayerTopInterface(size_t i_layer) const; - /// return bottom interface of layer + //! return bottom interface of layer const LayerInterface *getLayerBottomInterface(size_t i_layer) const; - /// destruct allocated objects + //! destruct allocated objects void clear(); - /// return clone of multilayer with clones of all layers and recreated interfaces between layers + //! return clone of multilayer with clones of all layers and recreated interfaces between layers virtual MultiLayer *clone() const; - /// print structure of multilayer + //! print structure of multilayer void print(); private: - /// hiding copy constructor & assignment operator + //! hiding copy constructor & assignment operator MultiLayer(const MultiLayer &); MultiLayer &operator=(const MultiLayer &); - /// check index of layer w.r.t. vector length + //! check index of layer w.r.t. vector length inline size_t check_layer_index(size_t i_layer) const { return i_layer < m_layers.size() ? i_layer : throw OutOfBoundsException("Layer index is out of bounds"); } - /// check index of interface w.r.t. vector length + //! check index of interface w.r.t. vector length inline size_t check_interface_index(size_t i_interface) const { return i_interface < m_interfaces.size() ? i_interface : throw OutOfBoundsException("Interface index is out of bounds"); } std::vector<Layer *> m_layers; ///< stack of layers [nlayers] diff --git a/Core/inc/NamedVector.h b/Core/inc/NamedVector.h index 5f39e7ebbb09b85ee501adfc5e03e0b72416d467..0a7d731d692214aa99864580bf9f48050b601b84 100644 --- a/Core/inc/NamedVector.h +++ b/Core/inc/NamedVector.h @@ -1,9 +1,23 @@ #ifndef NAMEDVECTOR_H #define NAMEDVECTOR_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 NamedVector.h +//! @brief Definition of NamedVector class +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include <string> #include <vector> + class NamedVectorBase { public: diff --git a/Core/inc/NanoParticle.h b/Core/inc/NanoParticle.h index 327cc6084d885bfdca15e910e3ee3a9b059ee5c7..989d275cf22f9a52e36f47b30cfb7c26c82f80e6 100644 --- a/Core/inc/NanoParticle.h +++ b/Core/inc/NanoParticle.h @@ -1,9 +1,23 @@ #ifndef NANOPARTICLE_H #define NANOPARTICLE_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 NanoParticle.h +//! @brief Definition of NanoParticle +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include "ISample.h" #include "IFormFactor.h" + class NanoParticle : public ISample { public: diff --git a/Core/inc/OpticalFresnel.h b/Core/inc/OpticalFresnel.h index ee28aae15fa66804d6c70361cdf38aa697d8fa92..406cccec203e251b74dea73134924762e21f34f6 100644 --- a/Core/inc/OpticalFresnel.h +++ b/Core/inc/OpticalFresnel.h @@ -1,11 +1,25 @@ #ifndef OPTICALFRESNEL_H #define OPTICALFRESNEL_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 OpticalFresnel.h +//! @brief Definition of OpticalFresnel class +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include <vector> #include "Types.h" #include "ISimulation.h" #include "MultiLayer.h" + class OpticalFresnel : public ISimulation { public: diff --git a/Core/inc/OutputData.h b/Core/inc/OutputData.h index abacafe00260c0d4da62522dfcb8098744c68698..cf58cc1701c574ed19662a68b63653fc73ce2f83 100644 --- a/Core/inc/OutputData.h +++ b/Core/inc/OutputData.h @@ -1,10 +1,23 @@ #ifndef OUTPUTDATA_H #define OUTPUTDATA_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 OutputData.h +//! @brief Definition of OutputData class +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include "NamedVector.h" - #include <map> + template <class T> class OutputData; class MultiIndex diff --git a/Core/inc/StochasticDiracDelta.h b/Core/inc/StochasticDiracDelta.h index 3f812187de917fc318fd54cdf398bcbe464ebe23..daa6040a6a9aa508652f35efa330ee2d7cb58670 100644 --- a/Core/inc/StochasticDiracDelta.h +++ b/Core/inc/StochasticDiracDelta.h @@ -1,8 +1,22 @@ #ifndef STOCHASTICDIRACDELTA_H #define STOCHASTICDIRACDELTA_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 StochasticDiracDelta.h +//! @brief Definition of StochasticDiracDelta class +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include "IStochasticParameter.h" + template <class T> class StochasticDiracDelta : public StochasticParameter<T> { public: diff --git a/Core/inc/StochasticGaussian.h b/Core/inc/StochasticGaussian.h index d7f55a2f741f4dd29e21341b4d3a2964394b234d..5d8fa0849e91df3f9c0f25aec33eddc5d5a2b498 100644 --- a/Core/inc/StochasticGaussian.h +++ b/Core/inc/StochasticGaussian.h @@ -1,8 +1,22 @@ #ifndef STOCHASTICGAUSSIAN_H #define STOCHASTICGAUSSIAN_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 StochasticGaussian.h +//! @brief Definition of StochasticGaussian class +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include "IStochasticParameter.h" + class StochasticDoubleGaussian : public StochasticParameter<double> { public: diff --git a/Core/inc/Types.h b/Core/inc/Types.h index f1a4c43b9b952585912d8b469bc888dc0a8c98f2..db0add88bcea048d9fcde993cc14a1c4cf742c18 100644 --- a/Core/inc/Types.h +++ b/Core/inc/Types.h @@ -1,6 +1,18 @@ #ifndef TYPES_H #define TYPES_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 Types.h +//! @brief Definition of Types +//! @author Scientific Computing Group at FRM II +//! @date 01.04.2012 #include <complex> #include <vector> @@ -8,7 +20,6 @@ typedef std::complex<double > complex_t; - // we need forward declaration here to be able to redefine ostream as friend template<typename T> class KVector; template<typename T> std::ostream& operator<< (std::ostream& o, const KVector<T>& ); diff --git a/Core/src/ISample.cpp b/Core/src/ISample.cpp index 7db811f1218dbbd1d964b1157e7c14aa59193ae5..6b6506da6f3f43a00f8de683f918ca69dfe032fe 100644 --- a/Core/src/ISample.cpp +++ b/Core/src/ISample.cpp @@ -3,6 +3,5 @@ void ISample::add(ISample* /*p_child*/) { - (void)p_child; throw NotImplementedException("This sample class is not allowed to have subsamples."); }