diff --git a/Device/Beam/IFootprintFactor.h b/Device/Beam/IFootprintFactor.h index b88a5ed233a0c532f9e94d853f8dc8ad258595a1..283d83ab559d8b0c7229ca79670f139271ef6904 100644 --- a/Device/Beam/IFootprintFactor.h +++ b/Device/Beam/IFootprintFactor.h @@ -31,10 +31,7 @@ public: IFootprintFactor* clone() const override = 0; - std::vector<ParaMeta> parDefs() const final - { - return {{"BeamToSampleWidthRatio", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"BeamToSampleWidthRatio", ""}}; } double widthRatio() const { return m_width_ratio; } diff --git a/Device/Detector/IDetector.h b/Device/Detector/IDetector.h index 853b2a7520cca93185e48398aefc00292bcd2591..5bd81c2cb66bb6af0e3f9cea53a37d58916b4937 100644 --- a/Device/Detector/IDetector.h +++ b/Device/Detector/IDetector.h @@ -200,7 +200,10 @@ public: std::unique_ptr<Datafield> createDetectorMap() const; //! Returns detection properties - const PolFilter& analyzer() const { return m_polAnalyzer; } + const PolFilter& analyzer() const + { + return m_polAnalyzer; + } #endif // SWIG protected: diff --git a/Device/Histo/SimulationResult.h b/Device/Histo/SimulationResult.h index 87aa93834f1e6b93b59434b91f18dc3fcfa48f57..6d6e434c4e3ec2572fbe13915e118f64d5cbc818 100644 --- a/Device/Histo/SimulationResult.h +++ b/Device/Histo/SimulationResult.h @@ -72,8 +72,14 @@ public: //! Returns coordinates of x-axis in default units. std::vector<double> convertedBinCenters(size_t i_axis, Coords units = Coords::UNDEFINED) const; - void setTitle(const std::string& title) { m_title = title; } - std::string title() { return m_title; } + void setTitle(const std::string& title) + { + m_title = title; + } + std::string title() + { + return m_title; + } private: void checkRank() const; diff --git a/Device/Pol/PolFilter.h b/Device/Pol/PolFilter.h index 2256ba22daff638f6fe3f4a5acc89353e56a2dee..bda519594802e8250da8fe0891e7db1fb7606e5b 100644 --- a/Device/Pol/PolFilter.h +++ b/Device/Pol/PolFilter.h @@ -33,8 +33,7 @@ public: std::string className() const final { return "PolFilter"; } std::vector<ParaMeta> parDefs() const final { - return {{"Efficiency", ""}, - {"Transmission", ""}}; + return {{"Efficiency", ""}, {"Transmission", ""}}; } //! Return the polarization density matrix (in spin basis along z-axis) diff --git a/Device/Resolution/ResolutionFunction2DGaussian.h b/Device/Resolution/ResolutionFunction2DGaussian.h index 92361afb1fc5e2d94a5697186ecefa6b7a20bee5..f5d3a504432090ab6ca9c9b1549efde8577e0022 100644 --- a/Device/Resolution/ResolutionFunction2DGaussian.h +++ b/Device/Resolution/ResolutionFunction2DGaussian.h @@ -28,11 +28,7 @@ public: return new ResolutionFunction2DGaussian(m_sigma_x, m_sigma_y); } std::string className() const final { return "ResolutionFunction2DGaussian"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Sigma_x", "?"}, - {"Sigma_y", "?"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Sigma_x", "?"}, {"Sigma_y", "?"}}; } double evaluateCDF(double x, double y) const override; diff --git a/Fit/Minimizer/IMinimizer.h b/Fit/Minimizer/IMinimizer.h index 2a09f84811294ec6d42b2ce02342d3c2aba75f24..22f34b943b38dbf080591c32e0a471da3687bdf8 100644 --- a/Fit/Minimizer/IMinimizer.h +++ b/Fit/Minimizer/IMinimizer.h @@ -57,7 +57,10 @@ public: #ifndef SWIG //! Returns true if minimizer computations are residual-based, false otherwise. - virtual bool requiresResiduals() { return false; } + virtual bool requiresResiduals() + { + return false; + } #endif // SWIG }; diff --git a/Fit/Test/Functional/MinimizerTests.cpp b/Fit/Test/Functional/MinimizerTests.cpp index 9026f9f42d1c56d0978f0aa6c99fa7101305f882..c47b9e1f5916a8dc432b53471a6bf2d645e08675 100644 --- a/Fit/Test/Functional/MinimizerTests.cpp +++ b/Fit/Test/Functional/MinimizerTests.cpp @@ -16,8 +16,7 @@ #include "Fit/Test/Functional/PlanCases.h" #include "Tests/GTestWrapper/google_test.h" -class Minimize : public ::testing::Test { -}; +class Minimize : public ::testing::Test {}; bool runMinimizerTest(const std::string& minimizer_name, const std::string& algorithm_name, MinimizerTestPlan& plan, const std::string& options = "") diff --git a/Fit/Test/Unit/AttLimitsTest.cpp b/Fit/Test/Unit/AttLimitsTest.cpp index f8d35582dd17aaa1c0ee65fd6d868ce4e287a4b3..b89f240676d23f4359fef94dc124bd16c5946543 100644 --- a/Fit/Test/Unit/AttLimitsTest.cpp +++ b/Fit/Test/Unit/AttLimitsTest.cpp @@ -1,8 +1,7 @@ #include "Fit/Param/AttLimits.h" #include "Tests/GTestWrapper/google_test.h" -class AttLimitsTest : public ::testing::Test { -}; +class AttLimitsTest : public ::testing::Test {}; TEST_F(AttLimitsTest, InitialState) { diff --git a/Fit/Test/Unit/MinimizerOptionsTest.cpp b/Fit/Test/Unit/MinimizerOptionsTest.cpp index 8598b32786f51945398a3302dfb5760d7469dad1..ab7a9bff9033db5f033d88e5bb304aa119f9cc10 100644 --- a/Fit/Test/Unit/MinimizerOptionsTest.cpp +++ b/Fit/Test/Unit/MinimizerOptionsTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <exception> -class MinimizerOptionsTest : public ::testing::Test { -}; +class MinimizerOptionsTest : public ::testing::Test {}; TEST_F(MinimizerOptionsTest, toOptionString) { diff --git a/Fit/Test/Unit/MultiOptionTest.cpp b/Fit/Test/Unit/MultiOptionTest.cpp index 6a56d0b046001ef9cf149338dbe45bd51977e714..dba677cde72d2a707e5edc0968c3741ea19dd6d4 100644 --- a/Fit/Test/Unit/MultiOptionTest.cpp +++ b/Fit/Test/Unit/MultiOptionTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <string> -class MultiOptionTest : public ::testing::Test { -}; +class MultiOptionTest : public ::testing::Test {}; TEST_F(MultiOptionTest, Variant) { diff --git a/Fit/Test/Unit/OptionContainerTest.cpp b/Fit/Test/Unit/OptionContainerTest.cpp index 6a78439696a03c04ac616f0dea0fd9bdf8faf8cc..f5dfe87dec601d0bc80ade455b968b1a498cfb4b 100644 --- a/Fit/Test/Unit/OptionContainerTest.cpp +++ b/Fit/Test/Unit/OptionContainerTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <exception> -class OptionContainerTest : public ::testing::Test { -}; +class OptionContainerTest : public ::testing::Test {}; TEST_F(OptionContainerTest, addOption) { diff --git a/Fit/Test/Unit/ParameterTest.cpp b/Fit/Test/Unit/ParameterTest.cpp index 92553da6c61047df70fcc83d565fc4854c302343..e849d029d854ff00a901c0d59f8a69157bb9ef68 100644 --- a/Fit/Test/Unit/ParameterTest.cpp +++ b/Fit/Test/Unit/ParameterTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <string> -class ParameterTest : public ::testing::Test { -}; +class ParameterTest : public ::testing::Test {}; TEST_F(ParameterTest, defaultConstructor) { diff --git a/Fit/Test/Unit/ParametersTest.cpp b/Fit/Test/Unit/ParametersTest.cpp index 09faddab143672ac56a2d2c5802516860a73b051..c2fb9558fc56e2f8c0081251cf4be455c1ac4ec4 100644 --- a/Fit/Test/Unit/ParametersTest.cpp +++ b/Fit/Test/Unit/ParametersTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <string> -class ParametersTest : public ::testing::Test { -}; +class ParametersTest : public ::testing::Test {}; TEST_F(ParametersTest, defaultConstructor) { diff --git a/Fit/Test/Unit/RealLimitsTest.cpp b/Fit/Test/Unit/RealLimitsTest.cpp index 337a01547ea446ae1390ac229838e19e8d3f7c08..fcca8133f0a42839eeea8eaf8d8e518d0bfcae86 100644 --- a/Fit/Test/Unit/RealLimitsTest.cpp +++ b/Fit/Test/Unit/RealLimitsTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <limits> -class RealLimitsTest : public ::testing::Test { -}; +class RealLimitsTest : public ::testing::Test {}; TEST_F(RealLimitsTest, LimitsInitial) { diff --git a/GUI/Model/Descriptor/AxisProperty.h b/GUI/Model/Descriptor/AxisProperty.h index d69bc2b21b05751c84ba380b9c87ab4695a21e16..6ace7b48b1fdad8b914af5ce15b6134d5ab9bda9 100644 --- a/GUI/Model/Descriptor/AxisProperty.h +++ b/GUI/Model/Descriptor/AxisProperty.h @@ -65,6 +65,9 @@ protected: AxisProperty m_##nameLower; \ \ public: \ - AxisProperty& nameLower() const { return *const_cast<AxisProperty*>(&m_##nameLower); } + AxisProperty& nameLower() const \ + { \ + return *const_cast<AxisProperty*>(&m_##nameLower); \ + } #endif // BORNAGAIN_GUI_MODEL_DESCRIPTOR_AXISPROPERTY_H diff --git a/GUI/Model/Descriptor/DoubleProperty.h b/GUI/Model/Descriptor/DoubleProperty.h index 3581fd838c65dfb1f1105009949f68255d42936c..472a98ddc2f1a2ac8add8fa26ba56ea0ff41f743 100644 --- a/GUI/Model/Descriptor/DoubleProperty.h +++ b/GUI/Model/Descriptor/DoubleProperty.h @@ -109,8 +109,14 @@ protected: DoubleProperty m_##nameLower; \ \ public: \ - DoubleDescriptor nameLower() const { return m_##nameLower; } \ - void set##nameUpper(double v) { m_##nameLower.set(v); } + DoubleDescriptor nameLower() const \ + { \ + return m_##nameLower; \ + } \ + void set##nameUpper(double v) \ + { \ + m_##nameLower.set(v); \ + } #endif // BORNAGAIN_GUI_MODEL_DESCRIPTOR_DOUBLEPROPERTY_H diff --git a/GUI/Model/Descriptor/UIntProperty.h b/GUI/Model/Descriptor/UIntProperty.h index 924c43295563d5a8edb6b4f1f8ce092acbe6de37..81487b605c470b53e51050177f8288d69f3aab6c 100644 --- a/GUI/Model/Descriptor/UIntProperty.h +++ b/GUI/Model/Descriptor/UIntProperty.h @@ -66,10 +66,22 @@ private: UIntProperty m_##nameLower; \ \ public: \ - UIntDescriptor nameLower() const { return m_##nameLower; } \ - void set##nameUpper(int v) { m_##nameLower.set(v); } \ - void set##nameUpper(uint v) { m_##nameLower.set(v); } \ - void set##nameUpper(size_t v) { m_##nameLower.set((int)v); } + UIntDescriptor nameLower() const \ + { \ + return m_##nameLower; \ + } \ + void set##nameUpper(int v) \ + { \ + m_##nameLower.set(v); \ + } \ + void set##nameUpper(uint v) \ + { \ + m_##nameLower.set(v); \ + } \ + void set##nameUpper(size_t v) \ + { \ + m_##nameLower.set((int)v); \ + } #endif // BORNAGAIN_GUI_MODEL_DESCRIPTOR_UINTPROPERTY_H diff --git a/GUI/Model/Descriptor/VectorProperty.h b/GUI/Model/Descriptor/VectorProperty.h index 120ff6747d465df6ac9af0236c90892043fab08f..4670f2ce2fc17b002cdbf0be7473226b281b5a0a 100644 --- a/GUI/Model/Descriptor/VectorProperty.h +++ b/GUI/Model/Descriptor/VectorProperty.h @@ -65,8 +65,14 @@ protected: VectorProperty m_##nameLower; \ \ public: \ - VectorDescriptor nameLower() const { return m_##nameLower; } \ - void set##nameUpper(const R3& v) { m_##nameLower.set(v); } + VectorDescriptor nameLower() const \ + { \ + return m_##nameLower; \ + } \ + void set##nameUpper(const R3& v) \ + { \ + m_##nameLower.set(v); \ + } ; diff --git a/GUI/Model/Sample/FormFactorItems.h b/GUI/Model/Sample/FormFactorItems.h index 8b1845af517996b0172e67f8dd89c217514d59c1..68cf54714cffe7409c2c3056cde5f1838f558f06 100644 --- a/GUI/Model/Sample/FormFactorItems.h +++ b/GUI/Model/Sample/FormFactorItems.h @@ -28,8 +28,14 @@ private: DoubleProperty m_##nameLower; \ \ public: \ - DoubleDescriptor nameLower() const { return m_##nameLower; } \ - void set##nameUpper(double v) { m_##nameLower.set(v); } + DoubleDescriptor nameLower() const \ + { \ + return m_##nameLower; \ + } \ + void set##nameUpper(double v) \ + { \ + m_##nameLower.set(v); \ + } class FormFactorItem { public: diff --git a/GUI/Support/IO/AbstractDataLoader1D.h b/GUI/Support/IO/AbstractDataLoader1D.h index 762ff0a3cf63dd534ccce8528701bf7bf08c9ec7..1753e86220c3d108e91a9c28ed00b0ca3e07e8e8 100644 --- a/GUI/Support/IO/AbstractDataLoader1D.h +++ b/GUI/Support/IO/AbstractDataLoader1D.h @@ -19,7 +19,6 @@ //! Abstract base class for reflectometry data loaders. -class AbstractDataLoader1D : public AbstractDataLoader { -}; +class AbstractDataLoader1D : public AbstractDataLoader {}; #endif // BORNAGAIN_GUI_SUPPORT_IO_ABSTRACTDATALOADER1D_H diff --git a/GUI/View/SampleDesigner/ParticleCoreShellForm.cpp b/GUI/View/SampleDesigner/ParticleCoreShellForm.cpp index f9c4d5a46c3fd50b6a07d1e8c7f7a65bc5d019af..912aea09c1cc0947087bbb1931bc7455eeaa7657 100644 --- a/GUI/View/SampleDesigner/ParticleCoreShellForm.cpp +++ b/GUI/View/SampleDesigner/ParticleCoreShellForm.cpp @@ -70,8 +70,7 @@ ParticleCoreShellForm::ParticleCoreShellForm(QWidget* parent, ParticleCoreShellI core.layouter = std::make_unique<FormLayouter>(coreParticleGroup, ec); core.formfactorCombo = createFormFactorCombo( - coreParticleGroup, - item->core() != nullptr ? item->core()->formfactor() : nullptr); + coreParticleGroup, item->core() != nullptr ? item->core()->formfactor() : nullptr); connect(core.formfactorCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ParticleCoreShellForm::onCoreComboChanged); core.layouter->addRow("Form factor:", core.formfactorCombo); @@ -94,8 +93,7 @@ ParticleCoreShellForm::ParticleCoreShellForm(QWidget* parent, ParticleCoreShellI shellParticleGroup->setObjectName("Particle"); shell.layouter = std::make_unique<FormLayouter>(shellParticleGroup, ec); shell.formfactorCombo = createFormFactorCombo( - shellParticleGroup, - item->shell() != nullptr ? item->shell()->formfactor() : nullptr); + shellParticleGroup, item->shell() != nullptr ? item->shell()->formfactor() : nullptr); connect(shell.formfactorCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ParticleCoreShellForm::onShellComboChanged); shell.layouter->addRow("Form factor:", shell.formfactorCombo); @@ -161,12 +159,10 @@ void ParticleCoreShellForm::createCoreWidgets() QString groupTitle = "Core"; if (ParticleItem* particle = m_item->core()) { - const QString formfactor = - FormFactorItemCatalog::menuEntry(particle->formfactor()); + const QString formfactor = FormFactorItemCatalog::menuEntry(particle->formfactor()); groupTitle += " (" + formfactor + ")"; - core.layouter->addGroupOfValues("Geometry", - particle->formfactor()->geometryValues()); + core.layouter->addGroupOfValues("Geometry", particle->formfactor()->geometryValues()); core.layouter->addVector(particle->positionVector(), false); core.layouter->addSelection(particle->rotation()); // no abundance since this is handled in CoreShell itself! @@ -180,12 +176,10 @@ void ParticleCoreShellForm::createShellWidgets() QString groupTitle = "Shell"; if (ParticleItem* particle = m_item->shell()) { - const QString formfactor = - FormFactorItemCatalog::menuEntry(particle->formfactor()); + const QString formfactor = FormFactorItemCatalog::menuEntry(particle->formfactor()); groupTitle += " (" + formfactor + ")"; - shell.layouter->addGroupOfValues("Geometry", - particle->formfactor()->geometryValues()); + shell.layouter->addGroupOfValues("Geometry", particle->formfactor()->geometryValues()); shell.layouter->addSelection(particle->rotation()); // no position vector - not allowed in CoreShell // no abundance since this is handled in CoreShell itself! diff --git a/GUI/View/SampleDesigner/ParticleForm.cpp b/GUI/View/SampleDesigner/ParticleForm.cpp index 09286c51eeda9e3a8a021cbcdf44d7979a3cdf4b..b448aeeb12954fbda0dccc75185fcc6e1f10810a 100644 --- a/GUI/View/SampleDesigner/ParticleForm.cpp +++ b/GUI/View/SampleDesigner/ParticleForm.cpp @@ -27,8 +27,7 @@ ParticleForm::ParticleForm(QWidget* parent, ParticleItem* particleItem, bool all SampleEditorController* ec, bool allowRemove) : QGroupBox(parent) { - const QString formfactor = - FormFactorItemCatalog::menuEntry(particleItem->formfactor()); + const QString formfactor = FormFactorItemCatalog::menuEntry(particleItem->formfactor()); setTitle("Particle (" + formfactor + ")"); FormLayouter layouter(this, ec); diff --git a/Param/Distrib/Distributions.cpp b/Param/Distrib/Distributions.cpp index 867dadfdaa04f8afc5cf8e227d861d519c5c2ef7..16b04c4bc5a887b9a47cb8467132fce2c50345ca 100644 --- a/Param/Distrib/Distributions.cpp +++ b/Param/Distrib/Distributions.cpp @@ -535,9 +535,9 @@ void DistributionTrapezoid::adjustLimitsToNonZeroSamples(double& min, double& ma std::string DistributionTrapezoid::validate() const { std::vector<std::string> errs; - if (m_left>m_middle) + if (m_left > m_middle) errs.push_back("parameters violate condition left<=middle"); - if (m_middle>m_right) + if (m_middle > m_right) errs.push_back("parameters violate condition middle<=right"); if (!errs.empty()) return jointError(errs); diff --git a/Param/Distrib/Distributions.h b/Param/Distrib/Distributions.h index 78c4bd02a6b0d0e50f66fcf6e4fff38fd64a6c35..48616f74d74a0b0bcb91dcd0ffe0a141f8fc4710 100644 --- a/Param/Distrib/Distributions.h +++ b/Param/Distrib/Distributions.h @@ -94,11 +94,7 @@ public: DistributionGate* clone() const override { return new DistributionGate(m_min, m_max); } std::string className() const final { return "DistributionGate"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Min", ""}, - {"Max", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Min", ""}, {"Max", ""}}; } double probabilityDensity(double x) const override; double mean() const override { return (m_min + m_max) / 2.0; } @@ -137,11 +133,7 @@ public: DistributionLorentz* clone() const override { return new DistributionLorentz(m_mean, m_hwhm); } std::string className() const final { return "DistributionLorentz"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Mean", ""}, - {"HWHM", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Mean", ""}, {"HWHM", ""}}; } double probabilityDensity(double x) const override; double mean() const override { return m_mean; } @@ -182,11 +174,7 @@ public: return new DistributionGaussian(m_mean, m_std_dev); } std::string className() const final { return "DistributionGaussian"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Mean", ""}, - {"StdDev", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Mean", ""}, {"StdDev", ""}}; } double probabilityDensity(double x) const override; double mean() const override { return m_mean; } @@ -226,11 +214,7 @@ public: return new DistributionLogNormal(m_median, m_scale_param); } std::string className() const final { return "DistributionLogNormal"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Median", ""}, - {"ScaleParameter", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Median", ""}, {"ScaleParameter", ""}}; } double probabilityDensity(double x) const override; double mean() const override; @@ -271,11 +255,7 @@ public: DistributionCosine* clone() const override { return new DistributionCosine(m_mean, m_sigma); } std::string className() const final { return "DistributionCosine"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Mean", ""}, - {"Sigma", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Mean", ""}, {"Sigma", ""}}; } double probabilityDensity(double x) const override; double mean() const override { return m_mean; } @@ -318,10 +298,7 @@ public: std::string className() const final { return "DistributionTrapezoid"; } std::vector<ParaMeta> parDefs() const final { - return {{"Center", ""}, - {"LeftWidth", ""}, - {"MiddleWidth", ""}, - {"RightWidth", ""}}; + return {{"Center", ""}, {"LeftWidth", ""}, {"MiddleWidth", ""}, {"RightWidth", ""}}; } double probabilityDensity(double x) const override; diff --git a/Param/Node/INode.cpp b/Param/Node/INode.cpp index b26e4e4408835f1db4a9c0a2ff3370a745d8ed72..2a3a6da4ab2c412bdfeb22d51dab54e90d567a95 100644 --- a/Param/Node/INode.cpp +++ b/Param/Node/INode.cpp @@ -41,27 +41,24 @@ std::vector<const INode*> INode::nodeOffspring() const return result; } -void INode::requestGt0( - std::vector<std::string>& errs, const double& val, const std::string& name) +void INode::requestGt0(std::vector<std::string>& errs, const double& val, const std::string& name) { - if (val<=0) + if (val <= 0) errs.push_back("nonpositive " + name + "=" + std::to_string(val)); } -void INode::requestGe0( - std::vector<std::string>& errs, const double& val, const std::string& name) +void INode::requestGe0(std::vector<std::string>& errs, const double& val, const std::string& name) { - if (val<0) + if (val < 0) errs.push_back("negative " + name + "=" + std::to_string(val)); } -void INode::requestIn( - std::vector<std::string>& errs, const double& val, const std::string& name, - double min, double max) +void INode::requestIn(std::vector<std::string>& errs, const double& val, const std::string& name, + double min, double max) { - if (val<min || val>max) - errs.push_back("parameter " + name + "=" + std::to_string(val) - + " not in [" + std::to_string(min) + ", " + std::to_string(max) + "]"); + if (val < min || val > max) + errs.push_back("parameter " + name + "=" + std::to_string(val) + " not in [" + + std::to_string(min) + ", " + std::to_string(max) + "]"); } std::string INode::jointError(const std::vector<std::string> errs) const @@ -72,6 +69,6 @@ std::string INode::jointError(const std::vector<std::string> errs) const void INode::validateOrThrow() const { const std::string err = validate(); - if (err!="") + if (err != "") throw std::runtime_error(err); } diff --git a/Param/Node/INode.h b/Param/Node/INode.h index bb84b4ef77f1199c226f5ebb07829c1d61140665..fef0e3244fb25b469e54c07e00a0ae3c3a12ed0a 100644 --- a/Param/Node/INode.h +++ b/Param/Node/INode.h @@ -52,13 +52,12 @@ public: //! Returns all descendants. std::vector<const INode*> nodeOffspring() const; - static void requestGt0( - std::vector<std::string>& errs, const double& val, const std::string& name); - static void requestGe0( - std::vector<std::string>& errs, const double& val, const std::string& name); - static void requestIn( - std::vector<std::string>& errs, const double& val, const std::string& name, - double min, double max); + static void requestGt0(std::vector<std::string>& errs, const double& val, + const std::string& name); + static void requestGe0(std::vector<std::string>& errs, const double& val, + const std::string& name); + static void requestIn(std::vector<std::string>& errs, const double& val, + const std::string& name, double min, double max); std::string jointError(const std::vector<std::string> errs) const; virtual std::string validate() const { return ""; } diff --git a/Sample/Aggregate/Interference1DLattice.h b/Sample/Aggregate/Interference1DLattice.h index 2bafee3c121558aee9bb8e097539970b58f8493f..744f6776a948dec0742ea0d1a60300037ea739ae 100644 --- a/Sample/Aggregate/Interference1DLattice.h +++ b/Sample/Aggregate/Interference1DLattice.h @@ -29,11 +29,7 @@ public: Interference1DLattice* clone() const override; std::string className() const final { return "Interference1DLattice"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Length", "nm"}, - {"Xi", "rad"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Length", "nm"}, {"Xi", "rad"}}; } void setDecayFunction(const IProfile1D& decay); diff --git a/Sample/Aggregate/Interference2DParaCrystal.h b/Sample/Aggregate/Interference2DParaCrystal.h index c0dfd36500783decbff8a57d89082cc9f2afc66c..0d7830794614d48817cae9f192f2c686160485ec 100644 --- a/Sample/Aggregate/Interference2DParaCrystal.h +++ b/Sample/Aggregate/Interference2DParaCrystal.h @@ -37,9 +37,7 @@ public: std::string className() const final { return "Interference2DParaCrystal"; } std::vector<ParaMeta> parDefs() const final { - return {{"DampingLength", "nm"}, - {"DomainSize 1", "nm"}, - {"DomainSize 2", "nm"}}; + return {{"DampingLength", "nm"}, {"DomainSize 1", "nm"}, {"DomainSize 2", "nm"}}; } void setDomainSizes(double size_1, double size_2); diff --git a/Sample/Aggregate/Interference2DSuperLattice.h b/Sample/Aggregate/Interference2DSuperLattice.h index bf5d68b68322b31f34b59feb6680546d5bb5c0de..8940cb370873e67efc949f87dd91d6c26a7163b3 100644 --- a/Sample/Aggregate/Interference2DSuperLattice.h +++ b/Sample/Aggregate/Interference2DSuperLattice.h @@ -33,10 +33,7 @@ public: std::string className() const final { return "Interference2DSuperLattice"; } std::vector<ParaMeta> parDefs() const final { - return {{"Length1", "nm"}, - {"Length2", "nm"}, - {"Alpha", "rad"}, - {"Xi", "rad"}}; + return {{"Length1", "nm"}, {"Length2", "nm"}, {"Alpha", "rad"}, {"Xi", "rad"}}; } void setSubstructureIFF(const IInterference& sub_iff); diff --git a/Sample/Aggregate/InterferenceHardDisk.h b/Sample/Aggregate/InterferenceHardDisk.h index e9894e21626b6f2a336199588f469c46afaf36f3..b1e6d1856554b552300c455726584918e3fa5e95 100644 --- a/Sample/Aggregate/InterferenceHardDisk.h +++ b/Sample/Aggregate/InterferenceHardDisk.h @@ -30,9 +30,7 @@ public: ~InterferenceHardDisk() override = default; std::vector<ParaMeta> parDefs() const final { - return {{"Radius", "nm"}, - {"Density", "nm^-2"}, - {"Variance", "nm?"}}; + return {{"Radius", "nm"}, {"Density", "nm^-2"}, {"Variance", "nm?"}}; } InterferenceHardDisk* clone() const override; diff --git a/Sample/Aggregate/InterferenceRadialParaCrystal.h b/Sample/Aggregate/InterferenceRadialParaCrystal.h index c14aa1d0ba1bb4a80004dea2432ecbe8ef5ba885..33d929e7e0576b8182a968da90da1235c2a912bb 100644 --- a/Sample/Aggregate/InterferenceRadialParaCrystal.h +++ b/Sample/Aggregate/InterferenceRadialParaCrystal.h @@ -30,8 +30,7 @@ public: std::string className() const final { return "InterferenceRadialParaCrystal"; } std::vector<ParaMeta> parDefs() const final { - return {{"PeakDistance", "nm"}, - {"DampingLength", "nm"}}; + return {{"PeakDistance", "nm"}, {"DampingLength", "nm"}}; } void setKappa(double kappa); diff --git a/Sample/Aggregate/InterferenceTwin.h b/Sample/Aggregate/InterferenceTwin.h index 7690806fe62343ea2781b4c8be9bac2e58588d1a..5990cda38abc7871188479f400a7e6bc93b472ea 100644 --- a/Sample/Aggregate/InterferenceTwin.h +++ b/Sample/Aggregate/InterferenceTwin.h @@ -30,8 +30,7 @@ public: std::string className() const final { return "InterferenceTwin"; } std::vector<ParaMeta> parDefs() const final { - return {{"MeanDistance", "nm"}, - {"StdDeviation", "nm"}}; + return {{"MeanDistance", "nm"}, {"StdDeviation", "nm"}}; } R3 direction() const; diff --git a/Sample/Aggregate/ParticleLayout.cpp b/Sample/Aggregate/ParticleLayout.cpp index 1733052ee2bd7918439b582024a727c3bb518f56..ff1ab7d7ee70cc751416840dbb5da22d805a32ee 100644 --- a/Sample/Aggregate/ParticleLayout.cpp +++ b/Sample/Aggregate/ParticleLayout.cpp @@ -122,7 +122,7 @@ void ParticleLayout::setAndRegisterInterference(IInterference* child) std::string ParticleLayout::validate() const { std::vector<std::string> errs; - for (size_t i=0; i<m_particles.size(); ++i) { + for (size_t i = 0; i < m_particles.size(); ++i) { std::string err = m_particles[i]->validate(); if (!err.empty()) errs.push_back("{ particle " + std::to_string(i) + ": " + err + " }"); diff --git a/Sample/Aggregate/ParticleLayout.h b/Sample/Aggregate/ParticleLayout.h index 3c93dbb57ae5fa4fd77e8945981a4c669e7f92f7..04b275f9cacb04c61806c37f1b2911537a3811dc 100644 --- a/Sample/Aggregate/ParticleLayout.h +++ b/Sample/Aggregate/ParticleLayout.h @@ -33,10 +33,7 @@ public: ParticleLayout* clone() const override; std::string className() const final { return "ParticleLayout"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Abundance", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Abundance", ""}}; } std::vector<const INode*> nodeChildren() const override; void addParticle(const IParticle& particle, double abundance = -1.0); diff --git a/Sample/Correlations/IPeakShape.h b/Sample/Correlations/IPeakShape.h index a7393a3301b1167753d1167ee2a8829e76258428..48114c44abc15c5ccb299bd4b67ce512063d75de 100644 --- a/Sample/Correlations/IPeakShape.h +++ b/Sample/Correlations/IPeakShape.h @@ -50,8 +50,7 @@ public: std::string className() const final { return "IsotropicGaussPeakShape"; } std::vector<ParaMeta> parDefs() const final { - return {{"MaxIntensity", ""}, - {"DomainSize", "nm"}}; + return {{"MaxIntensity", ""}, {"DomainSize", "nm"}}; } double peakDistribution(R3 q, R3 q_lattice_point) const override; @@ -73,8 +72,7 @@ public: std::string className() const final { return "IsotropicLorentzPeakShape"; } std::vector<ParaMeta> parDefs() const final { - return {{"MaxIntensity", ""}, - {"DomainSize", "nm"}}; + return {{"MaxIntensity", ""}, {"DomainSize", "nm"}}; } double peakDistribution(R3 q, R3 q_lattice_point) const override; @@ -97,9 +95,7 @@ public: std::string className() const final { return "GaussFisherPeakShape"; } std::vector<ParaMeta> parDefs() const final { - return {{"MaxIntensity", ""}, - {"DomainSize", "nm"}, - {"Kappa", ""}}; + return {{"MaxIntensity", ""}, {"DomainSize", "nm"}, {"Kappa", ""}}; } double peakDistribution(R3 q, R3 q_lattice_point) const override; @@ -124,9 +120,7 @@ public: std::string className() const final { return "LorentzFisherPeakShape"; } std::vector<ParaMeta> parDefs() const final { - return {{"MaxIntensity", ""}, - {"DomainSize", "nm"}, - {"Kappa", ""}}; + return {{"MaxIntensity", ""}, {"DomainSize", "nm"}, {"Kappa", ""}}; } double peakDistribution(R3 q, R3 q_lattice_point) const override; @@ -152,10 +146,7 @@ public: std::string className() const final { return "MisesFisherGaussPeakShape"; } std::vector<ParaMeta> parDefs() const final { - return {{"MaxIntensity", ""}, - {"Radial Size", "nm"}, - {"Kappa1", ""}, - {"Kappa2", ""}}; + return {{"MaxIntensity", ""}, {"Radial Size", "nm"}, {"Kappa1", ""}, {"Kappa2", ""}}; } double peakDistribution(R3 q, R3 q_lattice_point) const override; @@ -180,9 +171,7 @@ public: std::string className() const final { return "MisesGaussPeakShape"; } std::vector<ParaMeta> parDefs() const final { - return {{"MaxIntensity", ""}, - {"Radial Size", "nm"}, - {"Kappa", ""}}; + return {{"MaxIntensity", ""}, {"Radial Size", "nm"}, {"Kappa", ""}}; } double peakDistribution(R3 q, R3 q_lattice_point) const override; diff --git a/Sample/Correlations/Profiles1D.h b/Sample/Correlations/Profiles1D.h index 319eafaeb21e0ab4803a6bf8b5c9ca5fc16df88f..2303a15a5cb7b5938415a98afad65e5ed5f3b1f2 100644 --- a/Sample/Correlations/Profiles1D.h +++ b/Sample/Correlations/Profiles1D.h @@ -32,10 +32,7 @@ public: IProfile1D* clone() const override = 0; - std::vector<ParaMeta> parDefs() const override - { - return {{"Omega", "nm"}}; - } + std::vector<ParaMeta> parDefs() const override { return {{"Omega", "nm"}}; } //! Returns Fourier transform of the normalized distribution; //! is a decay function starting at standardizedFT(0)=1. @@ -172,11 +169,7 @@ public: Profile1DVoigt* clone() const override; std::string className() const final { return "Profile1DVoigt"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Omega", "nm"}, - {"Eta", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Omega", "nm"}, {"Eta", ""}}; } double standardizedFT(double q) const override; double decayFT(double q) const override; double eta() const { return m_eta; } diff --git a/Sample/Correlations/Profiles2D.h b/Sample/Correlations/Profiles2D.h index 80f6928d7874146bd8bac7a044a3caef2f58ff3b..becaa1a02fb73760671da58f598fe1f0a975c5ae 100644 --- a/Sample/Correlations/Profiles2D.h +++ b/Sample/Correlations/Profiles2D.h @@ -34,9 +34,7 @@ public: std::vector<ParaMeta> parDefs() const override { - return {{"OmegaX", "nm"}, - {"OmegaY", "nm"}, - {"Gamma", "rad"}}; + return {{"OmegaX", "nm"}, {"OmegaY", "nm"}, {"Gamma", "rad"}}; } double omegaX() const { return m_omega_x; } @@ -67,7 +65,7 @@ protected: const double& m_omega_x; //!< Half-width along x axis const double& m_omega_y; //!< Half-width along y axis - const double& m_gamma; //!< direct-space orientation with respect to the first lattice vector + const double& m_gamma; //!< direct-space orientation with respect to the first lattice vector }; #endif // USER_API @@ -161,10 +159,7 @@ public: std::string className() const final { return "Profile2DVoigt"; } std::vector<ParaMeta> parDefs() const final { - return {{"OmegaX", "nm"}, - {"OmegaY", "nm"}, - {"Gamma", "rad"}, - {"Eta", ""}}; + return {{"OmegaX", "nm"}, {"OmegaY", "nm"}, {"Gamma", "rad"}, {"Eta", ""}}; } double standardizedFT2D(double qx, double qy) const override; double decayFT2D(double qx, double qy) const override; diff --git a/Sample/HardParticle/Bar.h b/Sample/HardParticle/Bar.h index d8823287b3fdc9d1fa1161763ccc61ba45f652d6..24684684ab90e091b1092beef16b64eb99a25395 100644 --- a/Sample/HardParticle/Bar.h +++ b/Sample/HardParticle/Bar.h @@ -25,13 +25,14 @@ public: #ifndef USER_API BarGauss(std::vector<double> P); BarGauss* clone() const override; - std::string className() const final { return "BarGauss"; } + std::string className() const final + { + return "BarGauss"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } #endif // USER_API @@ -47,12 +48,13 @@ public: #ifndef USER_API BarLorentz(std::vector<double> P); BarLorentz* clone() const override; - std::string className() const final { return "BarLorentz"; } + std::string className() const final + { + return "BarLorentz"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } #endif // USER_API diff --git a/Sample/HardParticle/Bipyramid4.cpp b/Sample/HardParticle/Bipyramid4.cpp index 16b03b8927bca7a646f9a271c5377d2c8ad5ad70..4cd0bd5d7307bda793c591f9f90944c0aa234dac 100644 --- a/Sample/HardParticle/Bipyramid4.cpp +++ b/Sample/HardParticle/Bipyramid4.cpp @@ -52,7 +52,7 @@ std::string Bipyramid4::validate() const requestGt0(errs, m_height_ratio, "height_ratio"); const double cot_alpha = Math::cot(m_alpha); - if (m_alpha<=0 || !std::isfinite(cot_alpha) || cot_alpha < 0) + if (m_alpha <= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) errs.push_back("pyramid angle alpha=" + std::to_string(m_alpha) + " out of bounds"); if (!errs.empty()) diff --git a/Sample/HardParticle/Bipyramid4.h b/Sample/HardParticle/Bipyramid4.h index b1731241d3e33d30b13b2539b5d6be48b37a12f2..5d31b88c7026dd1c59322d54ecfa46068403fc72 100644 --- a/Sample/HardParticle/Bipyramid4.h +++ b/Sample/HardParticle/Bipyramid4.h @@ -29,18 +29,30 @@ public: { return new Bipyramid4(m_length, m_height, m_height_ratio, m_alpha); } - std::string className() const final { return "Bipyramid4"; } + std::string className() const final + { + return "Bipyramid4"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Height", "nm"}, - {"HeightRatio", ""}, - {"Alpha", "rad"}}; + return {{"Length", "nm"}, {"Height", "nm"}, {"HeightRatio", ""}, {"Alpha", "rad"}}; + } + double length() const + { + return m_length; + } + double height() const + { + return m_height; + } + double heightRatio() const + { + return m_height_ratio; + } + double alpha() const + { + return m_alpha; } - double length() const { return m_length; } - double height() const { return m_height; } - double heightRatio() const { return m_height_ratio; } - double alpha() const { return m_alpha; } std::string validate() const override; #endif // USER_API diff --git a/Sample/HardParticle/Box.cpp b/Sample/HardParticle/Box.cpp index cb46339cb45579b519c81f3ac8101276cf080a06..e169f1c976842e95e0646c8c58e6a4b0faf4306f 100644 --- a/Sample/HardParticle/Box.cpp +++ b/Sample/HardParticle/Box.cpp @@ -13,8 +13,8 @@ // ************************************************************************************************ #include "Sample/HardParticle/Box.h" -#include "Base/Util/Assert.h" #include "Base/Math/Functions.h" +#include "Base/Util/Assert.h" Box::Box(const std::vector<double> P) : IFormFactorPrism(P) diff --git a/Sample/HardParticle/Box.h b/Sample/HardParticle/Box.h index b5b0351b4309aa9bcf16ee055624b567a13b3ebe..03dda90bb45381606b12d5f483ebcaf49bb3d26e 100644 --- a/Sample/HardParticle/Box.h +++ b/Sample/HardParticle/Box.h @@ -26,22 +26,41 @@ public: #ifndef USER_API Box(std::vector<double> P); - Box* clone() const override { return new Box(m_length, m_width, m_height); } - std::string className() const final { return "Box"; } + Box* clone() const override + { + return new Box(m_length, m_width, m_height); + } + std::string className() const final + { + return "Box"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } - double length() const { return m_length; } - double width() const { return m_width; } - double height() const override { return m_height; } + double length() const + { + return m_length; + } + double width() const + { + return m_width; + } + double height() const override + { + return m_height; + } - double volume() const override { return m_length * m_height * m_width; } - double radialExtension() const override { return m_length / 2.0; } + double volume() const override + { + return m_length * m_height * m_width; + } + double radialExtension() const override + { + return m_length / 2.0; + } complex_t formfactor_at_bottom(C3 q) const override; std::string validate() const override; diff --git a/Sample/HardParticle/CantellatedCube.h b/Sample/HardParticle/CantellatedCube.h index a468f3acf2c33e26d60bf57922bf0e797195b45c..d49fc2280459d61aaae0850b11027ba494547e70 100644 --- a/Sample/HardParticle/CantellatedCube.h +++ b/Sample/HardParticle/CantellatedCube.h @@ -30,15 +30,23 @@ public: { return new CantellatedCube(m_length, m_removed_length); } - std::string className() const final { return "CantellatedCube"; } + std::string className() const final + { + return "CantellatedCube"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"RemovedLength", "nm"}}; + return {{"Length", "nm"}, {"RemovedLength", "nm"}}; } - double length() const { return m_length; } - double removedLength() const { return m_removed_length; } + double length() const + { + return m_length; + } + double removedLength() const + { + return m_removed_length; + } std::string validate() const override; #endif // USER_API diff --git a/Sample/HardParticle/Cone.cpp b/Sample/HardParticle/Cone.cpp index bfb78fe78c5194186906953284b9b89b2861419d..27eb4dde90afeaa00e2281562dfeacf7ee6fcbd8 100644 --- a/Sample/HardParticle/Cone.cpp +++ b/Sample/HardParticle/Cone.cpp @@ -63,7 +63,7 @@ std::string Cone::validate() const requestGt0(errs, m_radius, "radius"); requestGt0(errs, m_height, "height"); m_cot_alpha = Math::cot(m_alpha); - if (m_alpha<= 0 || !std::isfinite(m_cot_alpha) || m_cot_alpha < 0) + if (m_alpha <= 0 || !std::isfinite(m_cot_alpha) || m_cot_alpha < 0) errs.push_back("cone angle alpha " + std::to_string(m_alpha) + " out of bounds"); if (!errs.empty()) return jointError(errs); diff --git a/Sample/HardParticle/Cone.h b/Sample/HardParticle/Cone.h index bddc31a8e565dc268748bc5444c4a2499eab2d21..b87c8204c7e8fecd3db964710db16742a1d5809a 100644 --- a/Sample/HardParticle/Cone.h +++ b/Sample/HardParticle/Cone.h @@ -26,20 +26,36 @@ public: #ifndef USER_API Cone(std::vector<double> P); - Cone* clone() const override { return new Cone(m_radius, m_height, m_alpha); } - std::string className() const final { return "Cone"; } + Cone* clone() const override + { + return new Cone(m_radius, m_height, m_alpha); + } + std::string className() const final + { + return "Cone"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Radius", "nm"}, - {"Height", "nm"}, - {"Alpha", "rad"}}; + return {{"Radius", "nm"}, {"Height", "nm"}, {"Alpha", "rad"}}; } - double radius() const { return m_radius; } - double height() const { return m_height; } - double alpha() const { return m_alpha; } + double radius() const + { + return m_radius; + } + double height() const + { + return m_height; + } + double alpha() const + { + return m_alpha; + } - double radialExtension() const override { return m_radius; } + double radialExtension() const override + { + return m_radius; + } complex_t formfactor_at_bottom(C3 q) const override; diff --git a/Sample/HardParticle/CosineRipple.h b/Sample/HardParticle/CosineRipple.h index 909c3c381c3b80f4ab0c017accaa85ebe8619f76..a36b71a9454a093b324644ed4d638dbaa11a92e9 100644 --- a/Sample/HardParticle/CosineRipple.h +++ b/Sample/HardParticle/CosineRipple.h @@ -25,12 +25,13 @@ public: #ifndef USER_API CosineRippleBox(std::vector<double> P); CosineRippleBox* clone() const override; - std::string className() const final { return "CosineRippleBox"; } + std::string className() const final + { + return "CosineRippleBox"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } private: @@ -46,12 +47,13 @@ public: #ifndef USER_API CosineRippleGauss(std::vector<double> P); CosineRippleGauss* clone() const override; - std::string className() const final { return "CosineRippleGauss"; } + std::string className() const final + { + return "CosineRippleGauss"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } private: @@ -67,12 +69,13 @@ public: #ifndef USER_API CosineRippleLorentz(std::vector<double> P); CosineRippleLorentz* clone() const override; - std::string className() const final { return "CosineRippleLorentz"; } + std::string className() const final + { + return "CosineRippleLorentz"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } private: diff --git a/Sample/HardParticle/Cylinder.h b/Sample/HardParticle/Cylinder.h index 7ded4762096b161667d18a7959aa2b362cb4f043..211cd5b096e18580abf088e47a527f58f703cdd1 100644 --- a/Sample/HardParticle/Cylinder.h +++ b/Sample/HardParticle/Cylinder.h @@ -26,18 +26,32 @@ public: #ifndef USER_API Cylinder(std::vector<double> P); - Cylinder* clone() const override { return new Cylinder(m_radius, m_height); } - std::string className() const final { return "Cylinder"; } + Cylinder* clone() const override + { + return new Cylinder(m_radius, m_height); + } + std::string className() const final + { + return "Cylinder"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Radius", "nm"}, - {"Height", "nm"}}; + return {{"Radius", "nm"}, {"Height", "nm"}}; } - double height() const { return m_height; } - double radius() const { return m_radius; } + double height() const + { + return m_height; + } + double radius() const + { + return m_radius; + } - double radialExtension() const override { return m_radius; } + double radialExtension() const override + { + return m_radius; + } complex_t formfactor_at_bottom(C3 q) const override; diff --git a/Sample/HardParticle/Dodecahedron.cpp b/Sample/HardParticle/Dodecahedron.cpp index bd0fdd4f380a88cfb9c224b93fb1ebdc8f5d77f8..48236e0b10852d7e38a8c74a62b974dd4091db3f 100644 --- a/Sample/HardParticle/Dodecahedron.cpp +++ b/Sample/HardParticle/Dodecahedron.cpp @@ -29,7 +29,7 @@ Dodecahedron::Dodecahedron(double edge) std::string Dodecahedron::validate() const { - if (m_edge<=0) + if (m_edge <= 0) return jointError({"nonpositive edge=" + std::to_string(m_edge)}); setPolyhedron(ff::platonic::Dodecahedron::topology(), -1.113516364411607 * m_edge, diff --git a/Sample/HardParticle/Dodecahedron.h b/Sample/HardParticle/Dodecahedron.h index feff5d0786f2189506dec62d2612e6e3a63082c6..1abab77bac3c9d9ae6b41b187649b0e6c679c808 100644 --- a/Sample/HardParticle/Dodecahedron.h +++ b/Sample/HardParticle/Dodecahedron.h @@ -26,14 +26,23 @@ public: #ifndef USER_API Dodecahedron(std::vector<double> P); - Dodecahedron* clone() const override { return new Dodecahedron(m_edge); } - std::string className() const final { return "Dodecahedron"; } + Dodecahedron* clone() const override + { + return new Dodecahedron(m_edge); + } + std::string className() const final + { + return "Dodecahedron"; + } std::vector<ParaMeta> parDefs() const final { return {{"Edge", "nm"}}; } - double edge() const { return m_edge; } + double edge() const + { + return m_edge; + } std::string validate() const override; diff --git a/Sample/HardParticle/EllipsoidalCylinder.h b/Sample/HardParticle/EllipsoidalCylinder.h index a852e5f98ab1aaf126d2010799f6a52b16e8edf2..aa7e34c217b58e036a8873ab932b0351727d9079 100644 --- a/Sample/HardParticle/EllipsoidalCylinder.h +++ b/Sample/HardParticle/EllipsoidalCylinder.h @@ -30,17 +30,27 @@ public: { return new EllipsoidalCylinder(m_radius_x, m_radius_y, m_height); } - std::string className() const final { return "EllipsoidalCylinder"; } + std::string className() const final + { + return "EllipsoidalCylinder"; + } std::vector<ParaMeta> parDefs() const final { - return {{"RadiusX", "nm"}, - {"RadiusY", "nm"}, - {"Height", "nm"}}; + return {{"RadiusX", "nm"}, {"RadiusY", "nm"}, {"Height", "nm"}}; } - double radiusX() const { return m_radius_x; } - double radiusY() const { return m_radius_y; } - double height() const { return m_height; } + double radiusX() const + { + return m_radius_x; + } + double radiusY() const + { + return m_radius_y; + } + double height() const + { + return m_height; + } double radialExtension() const override; diff --git a/Sample/HardParticle/HemiEllipsoid.h b/Sample/HardParticle/HemiEllipsoid.h index 50c9c1e27215eb048957edd5294c980d4a80bf23..e805db9d859c2f0a87ef0dca1be47b7301465d21 100644 --- a/Sample/HardParticle/HemiEllipsoid.h +++ b/Sample/HardParticle/HemiEllipsoid.h @@ -32,17 +32,27 @@ public: { return new HemiEllipsoid(m_radius_x, m_radius_y, m_height); } - std::string className() const final { return "HemiEllipsoid"; } + std::string className() const final + { + return "HemiEllipsoid"; + } std::vector<ParaMeta> parDefs() const final { - return {{"RadiusX", "nm"}, - {"RadiusY", "nm"}, - {"Height", "nm"}}; + return {{"RadiusX", "nm"}, {"RadiusY", "nm"}, {"Height", "nm"}}; } - double height() const { return m_height; } - double radiusX() const { return m_radius_x; } - double radiusY() const { return m_radius_y; } + double height() const + { + return m_height; + } + double radiusX() const + { + return m_radius_x; + } + double radiusY() const + { + return m_radius_y; + } double radialExtension() const override; @@ -54,7 +64,7 @@ private: const double& m_radius_x; const double& m_radius_y; const double& m_height; //!< radius in +z direction -#endif // USER_API +#endif // USER_API }; #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_HEMIELLIPSOID_H diff --git a/Sample/HardParticle/HollowSphere.h b/Sample/HardParticle/HollowSphere.h index 4a5c428eb302404b279091e3d4d3d686d0a4a98b..235470cba4b3083e29dc7b5170b545495dbadac2 100644 --- a/Sample/HardParticle/HollowSphere.h +++ b/Sample/HardParticle/HollowSphere.h @@ -26,15 +26,23 @@ public: #ifndef USER_API HollowSphere(std::vector<double> P); - HollowSphere* clone() const override { return new HollowSphere(m_mean, m_full_width); } - std::string className() const final { return "HollowSphere"; } + HollowSphere* clone() const override + { + return new HollowSphere(m_mean, m_full_width); + } + std::string className() const final + { + return "HollowSphere"; + } std::vector<ParaMeta> parDefs() const final { - return {{"MeanRadius", "nm"}, - {"FullWidth", "nm"}}; + return {{"MeanRadius", "nm"}, {"FullWidth", "nm"}}; } - double radialExtension() const override { return m_mean; } + double radialExtension() const override + { + return m_mean; + } complex_t formfactor_at_bottom(C3 q) const override; diff --git a/Sample/HardParticle/HorizontalCylinder.cpp b/Sample/HardParticle/HorizontalCylinder.cpp index 6a1401ac854e9a00b37ab5433f67ab6f78404504..01f5f0cb0feb0b54e212552a508bd0512540b34f 100644 --- a/Sample/HardParticle/HorizontalCylinder.cpp +++ b/Sample/HardParticle/HorizontalCylinder.cpp @@ -74,11 +74,11 @@ std::string HorizontalCylinder::validate() const std::vector<std::string> errs; requestGt0(errs, m_radius, "radius"); requestGt0(errs, m_length, "length"); - if (m_slice_bottom<-m_radius) - errs.push_back("slice_bottom="+std::to_string(m_slice_bottom)+"<-R"); - if (m_slice_top>m_radius) - errs.push_back("slice_top="+std::to_string(m_slice_top)+"<R"); - if (m_slice_bottom>=m_slice_top) + if (m_slice_bottom < -m_radius) + errs.push_back("slice_bottom=" + std::to_string(m_slice_bottom) + "<-R"); + if (m_slice_top > m_radius) + errs.push_back("slice_top=" + std::to_string(m_slice_top) + "<R"); + if (m_slice_bottom >= m_slice_top) errs.push_back("parameters violate condition bottom<top"); if (!errs.empty()) return jointError(errs); diff --git a/Sample/HardParticle/HorizontalCylinder.h b/Sample/HardParticle/HorizontalCylinder.h index 91932e7aa489b4f2b9093520672e733fccd774c5..63bcb78edf5ea83673768523b25a35b7d5fd4b1a 100644 --- a/Sample/HardParticle/HorizontalCylinder.h +++ b/Sample/HardParticle/HorizontalCylinder.h @@ -31,22 +31,36 @@ public: { return new HorizontalCylinder(m_radius, m_length, m_slice_bottom, m_slice_top); } - std::string className() const final { return "HorizontalCylinder"; } + std::string className() const final + { + return "HorizontalCylinder"; + } std::vector<ParaMeta> parDefs() const final { - return { - {"Radius", "nm"}, - {"Length", "nm"}, - {"Slice_bottom", "nm"}, - {"Slice_top", "nm"}}; + return {{"Radius", "nm"}, {"Length", "nm"}, {"Slice_bottom", "nm"}, {"Slice_top", "nm"}}; } - double length() const { return m_length; } - double radius() const { return m_radius; } - double slice_bottom() const { return m_slice_bottom; } - double slice_top() const { return m_slice_top; } + double length() const + { + return m_length; + } + double radius() const + { + return m_radius; + } + double slice_bottom() const + { + return m_slice_bottom; + } + double slice_top() const + { + return m_slice_top; + } - double radialExtension() const override { return m_radius; } + double radialExtension() const override + { + return m_radius; + } complex_t formfactor_at_bottom(C3 q) const override; diff --git a/Sample/HardParticle/IFormFactorPrism.h b/Sample/HardParticle/IFormFactorPrism.h index f53dd2aad6d1e26d57d4baabef765e62073140a7..6f8f898e9c3734a470d51bd34f61453f39df5151 100644 --- a/Sample/HardParticle/IFormFactorPrism.h +++ b/Sample/HardParticle/IFormFactorPrism.h @@ -49,8 +49,8 @@ protected: // with the order of child constructor arguments, especially Box(l, w, h). private: - mutable std::unique_ptr<ff::Prism> pimpl; - mutable std::vector<R3> m_vertices; //! for topZ, bottomZ computation only + mutable std::unique_ptr<ff::Prism> pimpl; + mutable std::vector<R3> m_vertices; //! for topZ, bottomZ computation only }; #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H diff --git a/Sample/HardParticle/Icosahedron.cpp b/Sample/HardParticle/Icosahedron.cpp index 98aace93eff1337e5b6b01cbc542a62e01442a60..5bf8f534711e43a9fa59af81215fcb95be48c1a0 100644 --- a/Sample/HardParticle/Icosahedron.cpp +++ b/Sample/HardParticle/Icosahedron.cpp @@ -29,7 +29,7 @@ Icosahedron::Icosahedron(double edge) std::string Icosahedron::validate() const { - if (m_edge<=0) + if (m_edge <= 0) return jointError({"nonpositive edge=" + std::to_string(m_edge)}); setPolyhedron(ff::platonic::Icosahedron::topology(), -0.7557613140761708 * m_edge, diff --git a/Sample/HardParticle/Icosahedron.h b/Sample/HardParticle/Icosahedron.h index 1a930a74c26193d244a0df4474f366604e19421f..6bd7fac4b567a31de20c61ba7c2242feb2a69861 100644 --- a/Sample/HardParticle/Icosahedron.h +++ b/Sample/HardParticle/Icosahedron.h @@ -26,14 +26,23 @@ public: #ifndef USER_API Icosahedron(std::vector<double> P); - Icosahedron* clone() const override { return new Icosahedron(m_edge); } - std::string className() const final { return "Icosahedron"; } + Icosahedron* clone() const override + { + return new Icosahedron(m_edge); + } + std::string className() const final + { + return "Icosahedron"; + } std::vector<ParaMeta> parDefs() const final { return {{"Edge", "nm"}}; } - double edge() const { return m_edge; } + double edge() const + { + return m_edge; + } std::string validate() const override; diff --git a/Sample/HardParticle/LongBoxGauss.h b/Sample/HardParticle/LongBoxGauss.h index e31b81e59f3a1d990f87f8d2fb6211d925c8cc53..c92ec1e53a0209ce62c012288822c00028f5e805 100644 --- a/Sample/HardParticle/LongBoxGauss.h +++ b/Sample/HardParticle/LongBoxGauss.h @@ -26,19 +26,35 @@ public: #ifndef USER_API LongBoxGauss(std::vector<double> P); - LongBoxGauss* clone() const override { return new LongBoxGauss(m_length, m_width, m_height); } - std::string className() const final { return "LongBoxGauss"; } + LongBoxGauss* clone() const override + { + return new LongBoxGauss(m_length, m_width, m_height); + } + std::string className() const final + { + return "LongBoxGauss"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } - double length() const { return m_length; } - double height() const { return m_height; } - double width() const { return m_width; } - double radialExtension() const override { return m_length / 2.0; } + double length() const + { + return m_length; + } + double height() const + { + return m_height; + } + double width() const + { + return m_width; + } + double radialExtension() const override + { + return m_length / 2.0; + } complex_t formfactor_at_bottom(C3 q) const override; diff --git a/Sample/HardParticle/LongBoxLorentz.h b/Sample/HardParticle/LongBoxLorentz.h index 9f30438c302d6dd3ea65f3e48c1f592a12100039..eacbae70c0b007918b4b7ab7ecbf0c80b4cbd8db 100644 --- a/Sample/HardParticle/LongBoxLorentz.h +++ b/Sample/HardParticle/LongBoxLorentz.h @@ -30,19 +30,32 @@ public: { return new LongBoxLorentz(m_length, m_width, m_height); } - std::string className() const final { return "LongBoxLorentz"; } + std::string className() const final + { + return "LongBoxLorentz"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}}; } - double length() const { return m_length; } - double height() const { return m_height; } - double width() const { return m_width; } + double length() const + { + return m_length; + } + double height() const + { + return m_height; + } + double width() const + { + return m_width; + } - double radialExtension() const override { return m_length / 2.0; } + double radialExtension() const override + { + return m_length / 2.0; + } complex_t formfactor_at_bottom(C3 q) const override; diff --git a/Sample/HardParticle/PlatonicOctahedron.cpp b/Sample/HardParticle/PlatonicOctahedron.cpp index 51004cdda0898c74e507255e0ad5385522ad4321..0e63a4dbe5693d776d3626b32479557bb89d13f7 100644 --- a/Sample/HardParticle/PlatonicOctahedron.cpp +++ b/Sample/HardParticle/PlatonicOctahedron.cpp @@ -32,7 +32,7 @@ PlatonicOctahedron::PlatonicOctahedron(double edge) std::string PlatonicOctahedron::validate() const { - if (m_edge<=0) + if (m_edge <= 0) return jointError({"nonpositive edge=" + std::to_string(m_edge)}); setPolyhedron(ff::platonic::Octahedron::topology(), -m_edge / sqrt(2), diff --git a/Sample/HardParticle/PlatonicOctahedron.h b/Sample/HardParticle/PlatonicOctahedron.h index 7affe089fc907fdf6b428071d34e1be1664472b9..9b73baabeed179034782dc34539a23a57c0f2c35 100644 --- a/Sample/HardParticle/PlatonicOctahedron.h +++ b/Sample/HardParticle/PlatonicOctahedron.h @@ -26,15 +26,27 @@ public: #ifndef USER_API PlatonicOctahedron(std::vector<double> P); - PlatonicOctahedron* clone() const override { return new PlatonicOctahedron(m_edge); } - std::string className() const final { return "PlatonicOctahedron"; } + PlatonicOctahedron* clone() const override + { + return new PlatonicOctahedron(m_edge); + } + std::string className() const final + { + return "PlatonicOctahedron"; + } std::vector<ParaMeta> parDefs() const final { return {{"Edge", "nm"}}; } - double edge() const { return m_edge; } - double height() const { return sqrt(1 / 2.) * m_edge; } + double edge() const + { + return m_edge; + } + double height() const + { + return sqrt(1 / 2.) * m_edge; + } std::string validate() const override; diff --git a/Sample/HardParticle/PlatonicTetrahedron.cpp b/Sample/HardParticle/PlatonicTetrahedron.cpp index ef3a6617884583d68968e583a0f2dff9f9c5ee9a..2771e4883f86381f667035ee18fc116516b97d51 100644 --- a/Sample/HardParticle/PlatonicTetrahedron.cpp +++ b/Sample/HardParticle/PlatonicTetrahedron.cpp @@ -31,7 +31,7 @@ PlatonicTetrahedron::PlatonicTetrahedron(double edge) std::string PlatonicTetrahedron::validate() const { - if (m_edge<=0) + if (m_edge <= 0) return jointError({"nonpositive edge=" + std::to_string(m_edge)}); setPolyhedron(ff::platonic::Tetrahedron::topology(), -height() / 4, diff --git a/Sample/HardParticle/PlatonicTetrahedron.h b/Sample/HardParticle/PlatonicTetrahedron.h index 96d63989fcbfb159823d9bc984069a0e0f84225a..8eb61942f8e1680bb21e6b966ac9b8f6aab803df 100644 --- a/Sample/HardParticle/PlatonicTetrahedron.h +++ b/Sample/HardParticle/PlatonicTetrahedron.h @@ -26,15 +26,27 @@ public: #ifndef USER_API PlatonicTetrahedron(std::vector<double> P); - PlatonicTetrahedron* clone() const override { return new PlatonicTetrahedron(m_edge); } - std::string className() const final { return "PlatonicTetrahedron"; } + PlatonicTetrahedron* clone() const override + { + return new PlatonicTetrahedron(m_edge); + } + std::string className() const final + { + return "PlatonicTetrahedron"; + } std::vector<ParaMeta> parDefs() const final { return {{"Edge", "nm"}}; } - double edge() const { return m_edge; } - double height() const { return sqrt(2. / 3) * m_edge; } + double edge() const + { + return m_edge; + } + double height() const + { + return sqrt(2. / 3) * m_edge; + } std::string validate() const override; diff --git a/Sample/HardParticle/Prism3.h b/Sample/HardParticle/Prism3.h index ec84c1773b5bc70ed27abcaf09d0743865c81407..f9ea728925f52b6e8c532777b0294a6ee9742cc5 100644 --- a/Sample/HardParticle/Prism3.h +++ b/Sample/HardParticle/Prism3.h @@ -26,16 +26,27 @@ public: #ifndef USER_API Prism3(std::vector<double> P); - Prism3* clone() const override { return new Prism3(m_base_edge, m_height); } - std::string className() const final { return "Prism3"; } + Prism3* clone() const override + { + return new Prism3(m_base_edge, m_height); + } + std::string className() const final + { + return "Prism3"; + } std::vector<ParaMeta> parDefs() const final { - return {{"BaseEdge", "nm"}, - {"Height", "nm"}}; + return {{"BaseEdge", "nm"}, {"Height", "nm"}}; } - double baseEdge() const { return m_base_edge; } - double height() const override { return m_height; } + double baseEdge() const + { + return m_base_edge; + } + double height() const override + { + return m_height; + } std::string validate() const override; diff --git a/Sample/HardParticle/Prism6.h b/Sample/HardParticle/Prism6.h index cfcc2558031e84a5bc6fd73d8903c926c7b68433..b04f8a5a7c0a174961c3b2f1f77e92697c0651c7 100644 --- a/Sample/HardParticle/Prism6.h +++ b/Sample/HardParticle/Prism6.h @@ -26,16 +26,27 @@ public: #ifndef USER_API Prism6(std::vector<double> P); - Prism6* clone() const override { return new Prism6(m_base_edge, m_height); } - std::string className() const final { return "Prism6"; } + Prism6* clone() const override + { + return new Prism6(m_base_edge, m_height); + } + std::string className() const final + { + return "Prism6"; + } std::vector<ParaMeta> parDefs() const final { - return {{"BaseEdge", "nm"}, - {"Height", "nm"}}; + return {{"BaseEdge", "nm"}, {"Height", "nm"}}; } - double baseEdge() const { return m_base_edge; } - double height() const override { return m_height; } + double baseEdge() const + { + return m_base_edge; + } + double height() const override + { + return m_height; + } std::string validate() const override; diff --git a/Sample/HardParticle/Pyramid2.cpp b/Sample/HardParticle/Pyramid2.cpp index e4ee14d5f7dcf8bde49f62563ea4d85dcf5d87a3..5f090685e4f6bb88a5ab972402cfd5021ebe6044 100644 --- a/Sample/HardParticle/Pyramid2.cpp +++ b/Sample/HardParticle/Pyramid2.cpp @@ -46,7 +46,7 @@ std::string Pyramid2::validate() const requestGt0(errs, m_width, "width"); requestGt0(errs, m_height, "height"); const double cot_alpha = Math::cot(m_alpha); - if (m_alpha<= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) + if (m_alpha <= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) errs.push_back("pyramid angle alpha " + std::to_string(m_alpha) + " out of bounds"); if (!errs.empty()) return jointError(errs); diff --git a/Sample/HardParticle/Pyramid2.h b/Sample/HardParticle/Pyramid2.h index 9b6d40a26ce93c583eb73fa957329784101bfa7c..890024936ffbfe2ba1c6f33746e54cc6ed6b57cd 100644 --- a/Sample/HardParticle/Pyramid2.h +++ b/Sample/HardParticle/Pyramid2.h @@ -26,20 +26,35 @@ public: #ifndef USER_API Pyramid2(std::vector<double> P); - Pyramid2* clone() const override { return new Pyramid2(m_length, m_width, m_height, m_alpha); } - std::string className() const final { return "Pyramid2"; } + Pyramid2* clone() const override + { + return new Pyramid2(m_length, m_width, m_height, m_alpha); + } + std::string className() const final + { + return "Pyramid2"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}, - {"Alpha", "rad"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}, {"Alpha", "rad"}}; } - double length() const { return m_length; } - double width() const { return m_width; } - double height() const { return m_height; } - double alpha() const { return m_alpha; } + double length() const + { + return m_length; + } + double width() const + { + return m_width; + } + double height() const + { + return m_height; + } + double alpha() const + { + return m_alpha; + } std::string validate() const override; diff --git a/Sample/HardParticle/Pyramid3.cpp b/Sample/HardParticle/Pyramid3.cpp index fe1b607cd5d60ed028403830c4b4f6fb12de8a6b..91cac117ed7a27b00c12cbd0818759c66880dd2c 100644 --- a/Sample/HardParticle/Pyramid3.cpp +++ b/Sample/HardParticle/Pyramid3.cpp @@ -43,15 +43,15 @@ std::string Pyramid3::validate() const requestGt0(errs, m_base_edge, "base_edge"); requestGt0(errs, m_height, "height"); const double cot_alpha = Math::cot(m_alpha); - if (m_alpha<= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) + if (m_alpha <= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) errs.push_back("pyramid angle alpha " + std::to_string(m_alpha) + " out of bounds"); if (!errs.empty()) return jointError(errs); double r = cot_alpha * 2 * sqrt(3.) * m_height / m_base_edge; // L(top)/L(base) if (r > 1) - return jointError({ - "parameters violate condition 2*sqrt(3)*ctg(alpha) <= base_edge/height" }); + return jointError( + {"parameters violate condition 2*sqrt(3)*ctg(alpha) <= base_edge/height"}); double a = m_base_edge; double as = a / 2; diff --git a/Sample/HardParticle/Pyramid3.h b/Sample/HardParticle/Pyramid3.h index 836dfe8fae34335a8995b9b5a37eae2f59168085..ecd00766e71849faf6c4ca2a7ab43c1e90ff5025 100644 --- a/Sample/HardParticle/Pyramid3.h +++ b/Sample/HardParticle/Pyramid3.h @@ -26,19 +26,31 @@ public: #ifndef USER_API Pyramid3(std::vector<double> P); - Pyramid3* clone() const override { return new Pyramid3(m_base_edge, m_height, m_alpha); } - std::string className() const final { return "Pyramid3"; } + Pyramid3* clone() const override + { + return new Pyramid3(m_base_edge, m_height, m_alpha); + } + std::string className() const final + { + return "Pyramid3"; + } std::vector<ParaMeta> parDefs() const final { - return { - {"BaseEdge", "nm"}, - {"Height", "nm"}, - {"Alpha", "rad"}}; + return {{"BaseEdge", "nm"}, {"Height", "nm"}, {"Alpha", "rad"}}; } - double baseEdge() const { return m_base_edge; } - double height() const { return m_height; } - double alpha() const { return m_alpha; } + double baseEdge() const + { + return m_base_edge; + } + double height() const + { + return m_height; + } + double alpha() const + { + return m_alpha; + } std::string validate() const override; private: diff --git a/Sample/HardParticle/Pyramid4.cpp b/Sample/HardParticle/Pyramid4.cpp index 11d1399c4d7a2cfa6579923e69a03197d40ee5f7..417e4195ffddb6f65a74ce731c5cae263c27f037 100644 --- a/Sample/HardParticle/Pyramid4.cpp +++ b/Sample/HardParticle/Pyramid4.cpp @@ -46,15 +46,14 @@ std::string Pyramid4::validate() const requestGt0(errs, m_base_edge, "base_edge"); requestGt0(errs, m_height, "height"); const double cot_alpha = Math::cot(m_alpha); - if (m_alpha<= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) + if (m_alpha <= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) errs.push_back("pyramid angle alpha " + std::to_string(m_alpha) + " out of bounds"); if (!errs.empty()) return jointError(errs); double r = cot_alpha * 2 * m_height / m_base_edge; // L(top)/L(base) if (r > 1) - return jointError({ - "parameters violate condition 2*ctg(alpha) <= base_edge/height" }); + return jointError({"parameters violate condition 2*ctg(alpha) <= base_edge/height"}); double a = m_base_edge / 2; double b = a * (1 - r); diff --git a/Sample/HardParticle/Pyramid4.h b/Sample/HardParticle/Pyramid4.h index 87f7eeb9d9b1faa5f5f642a3fb58f02768d0e81a..943278ebc05db0836dfc09adba343a2ff4c332af 100644 --- a/Sample/HardParticle/Pyramid4.h +++ b/Sample/HardParticle/Pyramid4.h @@ -26,18 +26,31 @@ public: #ifndef USER_API Pyramid4(std::vector<double> P); - Pyramid4* clone() const override { return new Pyramid4(m_base_edge, m_height, m_alpha); } - std::string className() const final { return "Pyramid4"; } + Pyramid4* clone() const override + { + return new Pyramid4(m_base_edge, m_height, m_alpha); + } + std::string className() const final + { + return "Pyramid4"; + } std::vector<ParaMeta> parDefs() const final { - return {{"BaseEdge", "nm"}, - {"Height", "nm"}, - {"Alpha", "rad"}}; + return {{"BaseEdge", "nm"}, {"Height", "nm"}, {"Alpha", "rad"}}; } - double height() const { return m_height; } - double baseEdge() const { return m_base_edge; } - double alpha() const { return m_alpha; } + double height() const + { + return m_height; + } + double baseEdge() const + { + return m_base_edge; + } + double alpha() const + { + return m_alpha; + } std::string validate() const override; private: diff --git a/Sample/HardParticle/Pyramid6.cpp b/Sample/HardParticle/Pyramid6.cpp index a25f467ccbdaf7013874d40b50a9421d187ce5fa..451aa1fa5c7b8877ed9f6262a10749c843fcd901 100644 --- a/Sample/HardParticle/Pyramid6.cpp +++ b/Sample/HardParticle/Pyramid6.cpp @@ -46,15 +46,15 @@ std::string Pyramid6::validate() const requestGt0(errs, m_base_edge, "base_edge"); requestGt0(errs, m_height, "height"); const double cot_alpha = Math::cot(m_alpha); - if (m_alpha<= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) + if (m_alpha <= 0 || !std::isfinite(cot_alpha) || cot_alpha < 0) errs.push_back("pyramid angle alpha " + std::to_string(m_alpha) + " out of bounds"); if (!errs.empty()) return jointError(errs); double r = cot_alpha * 2 / sqrt(3) * m_height / m_base_edge; // L(top)/L(base) if (r > 1) - return jointError({ - "parameters violate condition 2/sqrt(3)*ctg(alpha) <= base_edge/height" }); + return jointError( + {"parameters violate condition 2/sqrt(3)*ctg(alpha) <= base_edge/height"}); double a = m_base_edge; double as = a / 2; diff --git a/Sample/HardParticle/Pyramid6.h b/Sample/HardParticle/Pyramid6.h index 26ed3504e86593033c557b3d0ba2fb9fa97be464..6391a511b0d3239baaa12ee460a5bfe78e50281f 100644 --- a/Sample/HardParticle/Pyramid6.h +++ b/Sample/HardParticle/Pyramid6.h @@ -26,19 +26,31 @@ public: #ifndef USER_API Pyramid6(std::vector<double> P); - Pyramid6* clone() const override { return new Pyramid6(m_base_edge, m_height, m_alpha); } - std::string className() const final { return "Pyramid6"; } + Pyramid6* clone() const override + { + return new Pyramid6(m_base_edge, m_height, m_alpha); + } + std::string className() const final + { + return "Pyramid6"; + } std::vector<ParaMeta> parDefs() const final { - return { - {"BaseEdge", "nm"}, - {"Height", "nm"}, - {"Alpha", "rad"}}; + return {{"BaseEdge", "nm"}, {"Height", "nm"}, {"Alpha", "rad"}}; } - double baseEdge() const { return m_base_edge; } - double height() const { return m_height; } - double alpha() const { return m_alpha; } + double baseEdge() const + { + return m_base_edge; + } + double height() const + { + return m_height; + } + double alpha() const + { + return m_alpha; + } std::string validate() const override; private: diff --git a/Sample/HardParticle/SawtoothRipple.h b/Sample/HardParticle/SawtoothRipple.h index 03542aebfa78561a35a345892093dc2d82aa5b14..f1a7571e3cc664b450032a675cb0e3a6b4621b76 100644 --- a/Sample/HardParticle/SawtoothRipple.h +++ b/Sample/HardParticle/SawtoothRipple.h @@ -25,13 +25,13 @@ public: #ifndef USER_API SawtoothRippleBox(std::vector<double> P); SawtoothRippleBox* clone() const override; - std::string className() const final { return "SawtoothRippleBox"; } + std::string className() const final + { + return "SawtoothRippleBox"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}, - {"AsymmetryLength", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}, {"AsymmetryLength", "nm"}}; } private: @@ -47,13 +47,13 @@ public: #ifndef USER_API SawtoothRippleGauss(std::vector<double> P); SawtoothRippleGauss* clone() const override; - std::string className() const final { return "SawtoothRippleGauss"; } + std::string className() const final + { + return "SawtoothRippleGauss"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}, - {"AsymmetryLength", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}, {"AsymmetryLength", "nm"}}; } private: @@ -69,13 +69,13 @@ public: #ifndef USER_API SawtoothRippleLorentz(std::vector<double> P); SawtoothRippleLorentz* clone() const override; - std::string className() const final { return "SawtoothRippleLorentz"; } + std::string className() const final + { + return "SawtoothRippleLorentz"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"Width", "nm"}, - {"Height", "nm"}, - {"AsymmetryLength", "nm"}}; + return {{"Length", "nm"}, {"Width", "nm"}, {"Height", "nm"}, {"AsymmetryLength", "nm"}}; } private: diff --git a/Sample/HardParticle/Sphere.cpp b/Sample/HardParticle/Sphere.cpp index 6e2796c1a6396d257baca4622c2ec5b20f0316f9..0380dc4b18c60feefe804dbe39569ac61bdc558b 100644 --- a/Sample/HardParticle/Sphere.cpp +++ b/Sample/HardParticle/Sphere.cpp @@ -65,8 +65,8 @@ complex_t Sphere::formfactor_at_bottom(C3 q) const std::string Sphere::validate() const { - if (m_radius<=0) - return jointError({"nonpositive value of radius="+std::to_string(m_radius)}); + if (m_radius <= 0) + return jointError({"nonpositive value of radius=" + std::to_string(m_radius)}); m_validated = true; return ""; } diff --git a/Sample/HardParticle/Sphere.h b/Sample/HardParticle/Sphere.h index 2f7935abb6a16ba4f760f4dc1eaa1b5fa3deface..47fe6a1d05d44c2fa70b1db0c5014ea4814a9c08 100644 --- a/Sample/HardParticle/Sphere.h +++ b/Sample/HardParticle/Sphere.h @@ -26,13 +26,28 @@ public: #ifndef USER_API Sphere(std::vector<double> P, bool position_at_center = false); - Sphere* clone() const override { return new Sphere(m_radius, m_position_at_center); } - std::string className() const final { return "Sphere"; } - std::vector<ParaMeta> parDefs() const final { return {{"Radius", "nm"}}; } + Sphere* clone() const override + { + return new Sphere(m_radius, m_position_at_center); + } + std::string className() const final + { + return "Sphere"; + } + std::vector<ParaMeta> parDefs() const final + { + return {{"Radius", "nm"}}; + } - double radius() const { return m_radius; } + double radius() const + { + return m_radius; + } - double radialExtension() const override { return m_radius; } + double radialExtension() const override + { + return m_radius; + } double bottomZ(const IRotation* rotation) const override; @@ -43,7 +58,10 @@ public: std::string validate() const override; protected: - bool canSliceAnalytically(const IRotation*) const override { return true; } + bool canSliceAnalytically(const IRotation*) const override + { + return true; + } private: const double& m_radius; diff --git a/Sample/HardParticle/Spheroid.h b/Sample/HardParticle/Spheroid.h index 5bf936325fdfb70b025e60d3ac8c8a5abdd53514..a47b38182fb3788ba08d807950b5901d811b302e 100644 --- a/Sample/HardParticle/Spheroid.h +++ b/Sample/HardParticle/Spheroid.h @@ -26,19 +26,32 @@ public: #ifndef USER_API Spheroid(std::vector<double> P); - Spheroid* clone() const override { return new Spheroid(m_radius, m_height); } - std::string className() const final { return "Spheroid"; } + Spheroid* clone() const override + { + return new Spheroid(m_radius, m_height); + } + std::string className() const final + { + return "Spheroid"; + } std::vector<ParaMeta> parDefs() const final { - return { - {"Radius", "nm"}, - {"Height", "nm"}}; + return {{"Radius", "nm"}, {"Height", "nm"}}; } - double height() const { return m_height; } - double radius() const { return m_radius; } + double height() const + { + return m_height; + } + double radius() const + { + return m_radius; + } - double radialExtension() const override { return m_radius; } + double radialExtension() const override + { + return m_radius; + } complex_t formfactor_at_bottom(C3 q) const override; diff --git a/Sample/HardParticle/TruncatedCube.cpp b/Sample/HardParticle/TruncatedCube.cpp index 1509f9d4bd35412b8fb260a566bb05c3ac17e9f8..d2e32014d782016329ce2269ab65d182eda4b889 100644 --- a/Sample/HardParticle/TruncatedCube.cpp +++ b/Sample/HardParticle/TruncatedCube.cpp @@ -53,7 +53,7 @@ std::string TruncatedCube::validate() const const double a = m_length / 2; const double c = a - m_removed_length; - if (c<0) + if (c < 0) return jointError({"parameters violate condition removed_length <= 0.5*length"}); diff --git a/Sample/HardParticle/TruncatedCube.h b/Sample/HardParticle/TruncatedCube.h index a4edfda9e1cddb7e7e1fa7bf75de2c428f1460eb..d7da06ee2c221ea32c435791adab3572924c1bf2 100644 --- a/Sample/HardParticle/TruncatedCube.h +++ b/Sample/HardParticle/TruncatedCube.h @@ -26,16 +26,27 @@ public: #ifndef USER_API TruncatedCube(std::vector<double> P); - TruncatedCube* clone() const override { return new TruncatedCube(m_length, m_removed_length); } - std::string className() const final { return "TruncatedCube"; } + TruncatedCube* clone() const override + { + return new TruncatedCube(m_length, m_removed_length); + } + std::string className() const final + { + return "TruncatedCube"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm"}, - {"RemovedLength", "nm"}}; + return {{"Length", "nm"}, {"RemovedLength", "nm"}}; } - double length() const { return m_length; } - double removedLength() const { return m_removed_length; } + double length() const + { + return m_length; + } + double removedLength() const + { + return m_removed_length; + } std::string validate() const override; private: diff --git a/Sample/HardParticle/TruncatedSphere.h b/Sample/HardParticle/TruncatedSphere.h index 9a4741deebd397c08d6a4cd8ef48c363a32ac2f4..21a3067dc6d34e8e81a04e5a586387c063f65303 100644 --- a/Sample/HardParticle/TruncatedSphere.h +++ b/Sample/HardParticle/TruncatedSphere.h @@ -30,19 +30,32 @@ public: { return new TruncatedSphere(m_radius, m_height, m_dh); } - std::string className() const final { return "TruncatedSphere"; } + std::string className() const final + { + return "TruncatedSphere"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Radius", "nm"}, - {"Height", "nm"}, - {"DeltaHeight", "nm"}}; + return {{"Radius", "nm"}, {"Height", "nm"}, {"DeltaHeight", "nm"}}; } - double height() const { return m_height; } - double radius() const { return m_radius; } - double removedTop() const { return m_dh; } + double height() const + { + return m_height; + } + double radius() const + { + return m_radius; + } + double removedTop() const + { + return m_dh; + } - double radialExtension() const override { return m_radius; } + double radialExtension() const override + { + return m_radius; + } complex_t formfactor_at_bottom(C3 q) const override; @@ -52,7 +65,7 @@ private: const double& m_radius; const double& m_height; //!< height before removal of cap const double& m_dh; //!< height of removed cap -#endif // USER_API +#endif // USER_API }; #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_TRUNCATEDSPHERE_H diff --git a/Sample/HardParticle/TruncatedSpheroid.cpp b/Sample/HardParticle/TruncatedSpheroid.cpp index e1cf5303bb76b82aafb88030d071d64f42277bfa..1e0f7e5c36f7b75c9e844cd4f5e132c01fa29175 100644 --- a/Sample/HardParticle/TruncatedSpheroid.cpp +++ b/Sample/HardParticle/TruncatedSpheroid.cpp @@ -76,8 +76,8 @@ std::string TruncatedSpheroid::validate() const if (!errs.empty()) return jointError(errs); - m_shape3D = std::make_unique<TruncatedEllipsoidNet>( - m_radius, m_radius, m_fp * m_radius, m_height, m_dh); + m_shape3D = std::make_unique<TruncatedEllipsoidNet>(m_radius, m_radius, m_fp * m_radius, + m_height, m_dh); m_validated = true; return ""; diff --git a/Sample/HardParticle/TruncatedSpheroid.h b/Sample/HardParticle/TruncatedSpheroid.h index 7ffecc4955f108578a9f33a9f9d2b356ce230781..356dc32255cf3295094080443f57f35d6ca3ca0f 100644 --- a/Sample/HardParticle/TruncatedSpheroid.h +++ b/Sample/HardParticle/TruncatedSpheroid.h @@ -31,21 +31,37 @@ public: { return new TruncatedSpheroid(m_radius, m_height, m_fp, m_dh); } - std::string className() const final { return "TruncatedSpheroid"; } + std::string className() const final + { + return "TruncatedSpheroid"; + } std::vector<ParaMeta> parDefs() const final { - return {{"Radius", "nm"}, - {"Height", "nm"}, - {"HeightFlattening", ""}, - {"DeltaHeight", "nm"}}; + return { + {"Radius", "nm"}, {"Height", "nm"}, {"HeightFlattening", ""}, {"DeltaHeight", "nm"}}; } - double radius() const { return m_radius; } - double height() const { return m_height; } - double heightFlattening() const { return m_fp; } - double removedTop() const { return m_dh; } + double radius() const + { + return m_radius; + } + double height() const + { + return m_height; + } + double heightFlattening() const + { + return m_fp; + } + double removedTop() const + { + return m_dh; + } - double radialExtension() const override { return m_radius; } + double radialExtension() const override + { + return m_radius; + } complex_t formfactor_at_bottom(C3 q) const override; @@ -54,9 +70,9 @@ public: private: const double& m_radius; const double& m_height; //!< height before removal of cap - const double& m_fp; //!< ratio of vertical to horizontal radius - const double& m_dh; //!< height of removed cap -#endif // USER_API + const double& m_fp; //!< ratio of vertical to horizontal radius + const double& m_dh; //!< height of removed cap +#endif // USER_API }; #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_TRUNCATEDSPHEROID_H diff --git a/Sample/Interface/LayerRoughness.cpp b/Sample/Interface/LayerRoughness.cpp index 6835579a1120f87546f34203c825223cbca3707c..eb66aec285abb4d7e91ed29df48728f9eb8a42ac 100644 --- a/Sample/Interface/LayerRoughness.cpp +++ b/Sample/Interface/LayerRoughness.cpp @@ -14,8 +14,8 @@ #include "Sample/Interface/LayerRoughness.h" #include "Base/Math/Constants.h" -#include "Base/Util/Assert.h" #include "Base/Py/PyFmt.h" +#include "Base/Util/Assert.h" //! Constructor of layer roughness. //! @param sigma: rms of the roughness in nanometers @@ -75,7 +75,7 @@ std::string LayerRoughness::validate() const { std::vector<std::string> errs; requestGe0(errs, m_sigma, "sigma"); - if (m_sigma>0) { + if (m_sigma > 0) { requestIn(errs, m_hurstParameter, "hurst", 0, 1); requestGe0(errs, m_lateralCorrLength, "lateralCorrLength"); // TODO why not gt0 ? } @@ -83,5 +83,4 @@ std::string LayerRoughness::validate() const return jointError(errs); m_validated = true; return ""; - } diff --git a/Sample/Interface/LayerRoughness.h b/Sample/Interface/LayerRoughness.h index 4be17fe95069bf84e774048d25563e7bb779a667..0dccada938138e61820b800bbdc35a2a681caabf 100644 --- a/Sample/Interface/LayerRoughness.h +++ b/Sample/Interface/LayerRoughness.h @@ -38,9 +38,7 @@ public: std::string className() const final { return "LayerRoughness"; } std::vector<ParaMeta> parDefs() const final { - return {{"Sigma", ""}, - {"Hurst", ""}, - {"CorrLength", "nm"}}; + return {{"Sigma", ""}, {"Hurst", ""}, {"CorrLength", "nm"}}; } //! Returns power spectral density of the surface roughness diff --git a/Sample/Lattice/Lattice2D.cpp b/Sample/Lattice/Lattice2D.cpp index 588a871ab78bcdc81c2dfad7093c5395ced32b0c..c4999ef8e2783a9584a8787e538f871c9fea8c58 100644 --- a/Sample/Lattice/Lattice2D.cpp +++ b/Sample/Lattice/Lattice2D.cpp @@ -80,7 +80,6 @@ std::string BasicLattice2D::validate() const return jointError(errs); m_validated = true; return ""; - } // ************************************************************************************************ @@ -117,7 +116,6 @@ std::string SquareLattice2D::validate() const return jointError(errs); m_validated = true; return ""; - } // ************************************************************************************************ @@ -155,5 +153,4 @@ std::string HexagonalLattice2D::validate() const return jointError(errs); m_validated = true; return ""; - } diff --git a/Sample/Lattice/Lattice2D.h b/Sample/Lattice/Lattice2D.h index fd8ce6f27b4e4622be69d3b6f5b45350ed41d1df..7edbd33eb214abaefb0a36fee3bc5f3cdd6e3f34 100644 --- a/Sample/Lattice/Lattice2D.h +++ b/Sample/Lattice/Lattice2D.h @@ -56,9 +56,7 @@ public: std::string className() const final { return "BasicLattice2D"; } std::vector<ParaMeta> parDefs() const final { - return {{"Length1", "nm"}, - {"Length2", "nm"}, - {"Alpha", "rad"}}; + return {{"Length1", "nm"}, {"Length2", "nm"}, {"Alpha", "rad"}}; } double length1() const override { return m_length1; } @@ -81,10 +79,7 @@ public: SquareLattice2D* clone() const override; std::string className() const final { return "SquareLattice2D"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Length", "nm"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Length", "nm"}}; } double length1() const override { return m_length; } double length2() const override { return m_length; } @@ -105,11 +100,7 @@ public: HexagonalLattice2D* clone() const override; std::string className() const final { return "HexagonalLattice2D"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Length", "nm"}, - {"Xi", "rad"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Length", "nm"}, {"Xi", "rad"}}; } double length1() const override { return m_length; } double length2() const override { return m_length; } diff --git a/Sample/Multilayer/Layer.cpp b/Sample/Multilayer/Layer.cpp index c5bd34a0095b4378d80e623a72c63056f58a94fd..739a3d12f1e61f5ef2c1dd8edf5c5b69b1243882 100644 --- a/Sample/Multilayer/Layer.cpp +++ b/Sample/Multilayer/Layer.cpp @@ -63,7 +63,7 @@ std::vector<const ParticleLayout*> Layer::layouts() const std::string Layer::validate() const { std::vector<std::string> errs; - for (size_t i=0; i<m_layouts.size(); ++i) { + for (size_t i = 0; i < m_layouts.size(); ++i) { std::string err = m_layouts[i]->validate(); if (!err.empty()) errs.push_back("{ layout " + std::to_string(i) + ": " + err + " }"); diff --git a/Sample/Multilayer/Layer.h b/Sample/Multilayer/Layer.h index 737c0c5c527168dc1e3c023f96e4e0d43959cc56..4d09e9eed21bcb96af8a0ab8b14f15d6f923aec9 100644 --- a/Sample/Multilayer/Layer.h +++ b/Sample/Multilayer/Layer.h @@ -30,10 +30,7 @@ public: Layer* clone() const override; std::string className() const final { return "Layer"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Thickness", "nm"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Thickness", "nm"}}; } std::vector<const INode*> nodeChildren() const override; const Material* material() const override { return &m_material; } diff --git a/Sample/Multilayer/MultiLayer.cpp b/Sample/Multilayer/MultiLayer.cpp index adb897dc1ee55e3a10c21a3ec79993bf04ab629d..55b839d7200281580043dd283493a13d55d7df04 100644 --- a/Sample/Multilayer/MultiLayer.cpp +++ b/Sample/Multilayer/MultiLayer.cpp @@ -146,13 +146,13 @@ std::string MultiLayer::validate() const == MATERIAL_TYPES::InvalidMaterialType) errs.push_back("Sample contains incompatible material definitions"); - for (size_t i=0; i<m_layers.size(); ++i) { + for (size_t i = 0; i < m_layers.size(); ++i) { std::string err = m_layers[i]->validate(); if (!err.empty()) errs.push_back("{ layer " + std::to_string(i) + ": " + err + " }"); } - for (size_t i=0; i<m_interfaces.size(); ++i) { + for (size_t i = 0; i < m_interfaces.size(); ++i) { std::string err = m_interfaces[i]->validate(); if (!err.empty()) errs.push_back("{ interface " + std::to_string(i) + ": " + err + " }"); diff --git a/Sample/Particle/Crystal.h b/Sample/Particle/Crystal.h index 7ef9b442ecc1ba2dd20f898fb3bfbf1b552dee58..092d2a69066a9001a87856655b75eb1397532f53 100644 --- a/Sample/Particle/Crystal.h +++ b/Sample/Particle/Crystal.h @@ -39,10 +39,7 @@ public: Crystal* clone() const override; std::string className() const final { return "Crystal"; } std::vector<const INode*> nodeChildren() const override; - std::vector<ParaMeta> parDefs() const final - { - return {{"Variance", "nm?"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Variance", "nm?"}}; } const IParticle* basis() const { return m_basis.get(); } const Lattice3D* lattice() const { return m_lattice.get(); } diff --git a/Sample/Particle/ParticleComposition.h b/Sample/Particle/ParticleComposition.h index 90238cb706b84f74570c801424d26fbf8c3d2147..543e7e41af879d6a8122702ca2a53fdb2b506ef6 100644 --- a/Sample/Particle/ParticleComposition.h +++ b/Sample/Particle/ParticleComposition.h @@ -40,11 +40,17 @@ public: void addParticles(const IParticle& particle, std::vector<R3> positions); //! Returns number of different particles - size_t nbrParticles() const { return m_particles.size(); } + size_t nbrParticles() const + { + return m_particles.size(); + } std::vector<const IParticle*> particles() const; - std::string validate() const override { return ""; } + std::string validate() const override + { + return ""; + } private: OwningVector<IParticle> m_particles; diff --git a/Sample/Scattering/Rotations.h b/Sample/Scattering/Rotations.h index c33b6971afccc9d35494b3e35e7706be125ed949..1b688df06e4428ddde48782ccaf8a9cd3387fa5d 100644 --- a/Sample/Scattering/Rotations.h +++ b/Sample/Scattering/Rotations.h @@ -77,10 +77,7 @@ public: RotationX* clone() const override { return new RotationX(m_angle); } std::string className() const final { return "RotationX"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Angle", "rad"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Angle", "rad"}}; } RotationX* createInverse() const override { return new RotationX(-m_angle); } double angle() const { return m_angle; } @@ -100,10 +97,7 @@ public: RotationY* clone() const override { return new RotationY(m_angle); } std::string className() const final { return "RotationY"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Angle", "rad"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Angle", "rad"}}; } RotationY* createInverse() const override { return new RotationY(-m_angle); } double angle() const { return m_angle; } @@ -123,10 +117,7 @@ public: RotationZ* clone() const override { return new RotationZ(m_angle); } std::string className() const final { return "RotationZ"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Angle", "rad"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Angle", "rad"}}; } RotationZ* createInverse() const override { return new RotationZ(-m_angle); } double angle() const { return m_angle; } @@ -148,9 +139,7 @@ public: std::string className() const final { return "RotationEuler"; } std::vector<ParaMeta> parDefs() const final { - return {{"Alpha", "rad"}, - {"Beta", "rad"}, - {"Gamma", "rad"}}; + return {{"Alpha", "rad"}, {"Beta", "rad"}, {"Gamma", "rad"}}; } IRotation* createInverse() const override; diff --git a/Sample/SoftParticle/FuzzySphere.h b/Sample/SoftParticle/FuzzySphere.h index f366aa2657acc23f7f679f3755e74f77121696d2..12ef0e3b42aa83ea849536f608da4f8aa52ea210 100644 --- a/Sample/SoftParticle/FuzzySphere.h +++ b/Sample/SoftParticle/FuzzySphere.h @@ -28,11 +28,7 @@ public: FuzzySphere* clone() const override { return new FuzzySphere(m_radius, m_sigma); } std::string className() const final { return "FuzzySphere"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"Radius", "nm"}, - {"Fuzziness", "nm"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"Radius", "nm"}, {"Fuzziness", "nm"}}; } double radialExtension() const override { return m_radius; } diff --git a/Sample/SoftParticle/Gauss.cpp b/Sample/SoftParticle/Gauss.cpp index 45d999bcda1bdfee05ea69cfb47542e5315943f7..f7d5369ed9a117c71f4edd262843f674550fadf9 100644 --- a/Sample/SoftParticle/Gauss.cpp +++ b/Sample/SoftParticle/Gauss.cpp @@ -57,7 +57,7 @@ std::string GaussSphere::validate() const return jointError(errs); const double R = m_mean_radius; - m_shape3D = std::make_unique<TruncatedEllipsoidNet>(R, R, R, 2*R, 0); + m_shape3D = std::make_unique<TruncatedEllipsoidNet>(R, R, R, 2 * R, 0); m_validated = true; return ""; diff --git a/Sample/SoftParticle/Gauss.h b/Sample/SoftParticle/Gauss.h index c97136a045efaeb424e06ecaad01ae62109638f7..d4ad5cd625756e4a244dec97142447e52c1249c1 100644 --- a/Sample/SoftParticle/Gauss.h +++ b/Sample/SoftParticle/Gauss.h @@ -27,10 +27,7 @@ public: GaussSphere* clone() const override { return new GaussSphere(m_mean_radius); } std::string className() const final { return "GaussSphere"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"MeanRadius", "nm"}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"MeanRadius", "nm"}}; } double meanRadius() const { return m_mean_radius; } diff --git a/Sim/Background/ConstantBackground.h b/Sim/Background/ConstantBackground.h index 63d274907ead9e9516f2312a5c91b15e1ed3a32c..c95ae48de1f33c61e8bd25bc388fcdc2c2863221 100644 --- a/Sim/Background/ConstantBackground.h +++ b/Sim/Background/ConstantBackground.h @@ -28,10 +28,7 @@ public: ConstantBackground* clone() const override; std::string className() const final { return "ConstantBackground"; } - std::vector<ParaMeta> parDefs() const final - { - return {{"BackgroundValue", ""}}; - } + std::vector<ParaMeta> parDefs() const final { return {{"BackgroundValue", ""}}; } double backgroundValue() const { return m_background_value; } diff --git a/Sim/Scan/AlphaScan.h b/Sim/Scan/AlphaScan.h index d425eb952f2444675d6643fb706f07f2732d0bff..8e311861064ce5c861b28992d7bda58d417fa476 100644 --- a/Sim/Scan/AlphaScan.h +++ b/Sim/Scan/AlphaScan.h @@ -42,10 +42,16 @@ public: std::vector<SpecularElement> generateElements() const override; //! Returns coordinate axis assigned to the data holder - const IAxis* coordinateAxis() const override { return m_inc_angle.get(); } + const IAxis* coordinateAxis() const override + { + return m_inc_angle.get(); + } //! Returns IFootprintFactor object pointer - const IFootprintFactor* footprintFactor() const override { return m_footprint.get(); } + const IFootprintFactor* footprintFactor() const override + { + return m_footprint.get(); + } //! Returns footprint correction factor for a range of simulation elements of size _n_elements_ //! and starting from element with index _i_. @@ -60,11 +66,20 @@ public: std::vector<double> createIntensities(const std::vector<SpecularElement>& eles) const override; // TODO: remove these getters after transition to the new resolution machinery is finished - const ScanResolution* wavelengthResolution() const { return m_wl_resolution.get(); } - const ScanResolution* angleResolution() const { return m_inc_resolution.get(); } + const ScanResolution* wavelengthResolution() const + { + return m_wl_resolution.get(); + } + const ScanResolution* angleResolution() const + { + return m_inc_resolution.get(); + } #endif // USER_API - double wavelength() const override { return m_wl; } + double wavelength() const override + { + return m_wl; + } //! Sets footprint correction factor void setFootprintFactor(const IFootprintFactor* f_factor); diff --git a/Sim/Scan/QzScan.h b/Sim/Scan/QzScan.h index a8e1ab3b91d8fc4e478e90c758923dc63c1c1ad8..40345cd51e453e1a9ad57a4edd39f5b48f70125a 100644 --- a/Sim/Scan/QzScan.h +++ b/Sim/Scan/QzScan.h @@ -48,10 +48,16 @@ public: std::vector<SpecularElement> generateElements() const override; //! Returns coordinate axis assigned to the data holder - const IAxis* coordinateAxis() const override { return m_qs.get(); } + const IAxis* coordinateAxis() const override + { + return m_qs.get(); + } //! Returns IFootprintFactor object pointer - const IFootprintFactor* footprintFactor() const override { return nullptr; } + const IFootprintFactor* footprintFactor() const override + { + return nullptr; + } //! Returns footprint correction factor for a range of simulation elements of size _n_elements_ //! and starting from element with index _i_. @@ -85,8 +91,14 @@ public: void setAbsoluteQResolution(const IRangedDistribution& distr, const std::vector<double>& std_dev); - void setOffset(double offset) { m_offset = offset; } - double offset() const { return m_offset; } + void setOffset(double offset) + { + m_offset = offset; + } + double offset() const + { + return m_offset; + } private: QzScan(IAxis* qs_nm); diff --git a/Sim/Scan/ScanResolution.h b/Sim/Scan/ScanResolution.h index 7b83b415cdf211a2b9fcfda99f1f02d15e5d8e2b..b281dd4443140cc657db62f62dafc061c7c25ffc 100644 --- a/Sim/Scan/ScanResolution.h +++ b/Sim/Scan/ScanResolution.h @@ -41,14 +41,20 @@ public: static ScanResolution* scanEmptyResolution(); ScanResolution* clone() const override = 0; - const IRangedDistribution* distribution() const { return m_distr.get(); } + const IRangedDistribution* distribution() const + { + return m_distr.get(); + } size_t nSamples() const; virtual DistrOutput generateSamples(double mean, size_t n_times) const = 0; virtual DistrOutput generateSamples(const std::vector<double>& mean) const = 0; virtual std::vector<double> stdDevs(double mean, size_t n_times) const = 0; virtual std::vector<double> stdDevs(const std::vector<double>& mean) const = 0; - bool empty() const { return !m_distr; } + bool empty() const + { + return !m_distr; + } virtual std::string name() const = 0; virtual double delta() const = 0; diff --git a/Sim/Simulation/DepthProbeSimulation.h b/Sim/Simulation/DepthProbeSimulation.h index 0ab6eba92720733f45f015947c770721bc2817af..8aad97711a257a4afc6d7e51a4cd1d7189212f51 100644 --- a/Sim/Simulation/DepthProbeSimulation.h +++ b/Sim/Simulation/DepthProbeSimulation.h @@ -68,7 +68,10 @@ public: #ifndef SWIG - const Beam& beam() const { return *m_beam; } + const Beam& beam() const + { + return *m_beam; + } ICoordSystem* createCoordSystem() const override; diff --git a/Sim/Simulation/ISimulation.h b/Sim/Simulation/ISimulation.h index 9cd787f841027b9fc45c561956eb31d668272998..b81cc2c18cfb09b7f259f254709ca67e28d2d28d 100644 --- a/Sim/Simulation/ISimulation.h +++ b/Sim/Simulation/ISimulation.h @@ -74,7 +74,10 @@ public: const MultiLayer* sample() const; - const IBackground* background() const { return m_background.get(); } + const IBackground* background() const + { + return m_background.get(); + } const std::vector<ParameterDistribution>& getDistributions() const; diff --git a/Sim/Simulation/ISimulation2D.h b/Sim/Simulation/ISimulation2D.h index 19395df7c33b1aeb99326118036b89a99815d690..2002d1ec1abd00d33e75ea9e22fc2f1602fa1770 100644 --- a/Sim/Simulation/ISimulation2D.h +++ b/Sim/Simulation/ISimulation2D.h @@ -59,9 +59,18 @@ public: #ifndef SWIG - const Beam& beam() const { return *m_beam; } - const IDetector& detector() const { return *m_detector; } - const IDetector* getDetector() const { return m_detector.get(); } + const Beam& beam() const + { + return *m_beam; + } + const IDetector& detector() const + { + return *m_detector; + } + const IDetector* getDetector() const + { + return m_detector.get(); + } protected: //! Put into a clean state for running a simulation diff --git a/Sim/Simulation/SpecularSimulation.h b/Sim/Simulation/SpecularSimulation.h index 4e9d1988adb6ad82bd59e7ad0aad7f78787d8f70..2ee3aee78ad5ea2ff7bfeb3fddab5006b3b7797d 100644 --- a/Sim/Simulation/SpecularSimulation.h +++ b/Sim/Simulation/SpecularSimulation.h @@ -46,7 +46,10 @@ public: ICoordSystem* createCoordSystem() const override; //! Returns internal data handler - const ISpecularScan* scan() const { return m_scan.get(); } + const ISpecularScan* scan() const + { + return m_scan.get(); + } private: SimulationResult pack_result() override; diff --git a/Tests/Functional/Consistence/ConsistenceTests.cpp b/Tests/Functional/Consistence/ConsistenceTests.cpp index e909fd32425fb75d247f28bb9f7aa3c825591377..0d878d7ad71cb6a246b0631d571926c3de2c8ecc 100644 --- a/Tests/Functional/Consistence/ConsistenceTests.cpp +++ b/Tests/Functional/Consistence/ConsistenceTests.cpp @@ -27,8 +27,7 @@ int compareTwoReferences(const std::string& name0, const std::string& name1, double limit); -class Consistence : public ::testing::Test { -}; +class Consistence : public ::testing::Test {}; TEST_F(Consistence, SpecularWithSlicing) { diff --git a/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp b/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp index 9ebc175d17877757bb860db2eb8390bed4dc2f77..f7b72db800aec5f786ad28cfd54c66b4578341a1 100644 --- a/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp +++ b/Tests/Functional/CoreSpecial/CoreIOPathTest.cpp @@ -42,8 +42,7 @@ bool test_io(const Datafield* data, const std::string& file_name) } // namespace -class CoreIOPathTest : public ::testing::Test { -}; +class CoreIOPathTest : public ::testing::Test {}; TEST_F(CoreIOPathTest, CoreIOPath) { diff --git a/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp b/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp index 80f78c983e0d60a7ffd93731b5682655dc564200..4a2bbd39d4b9a4b80ef3037938edd379492d0d63 100644 --- a/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp +++ b/Tests/Functional/CoreSpecial/FourierTransformationTest.cpp @@ -82,8 +82,7 @@ bool test_fft(const std::string& input_image_name, const std::string& reference_ } // namespace -class FourierTransformationTest : public ::testing::Test { -}; +class FourierTransformationTest : public ::testing::Test {}; TEST_F(FourierTransformationTest, FourierTransformation) { diff --git a/Tests/Functional/Fitting/FitTests.cpp b/Tests/Functional/Fitting/FitTests.cpp index 0e89f7537e7ea1e8165602ce7d0574ad6f617054..10c0c792a6c970ec832432c8c496c2372dfa9e6b 100644 --- a/Tests/Functional/Fitting/FitTests.cpp +++ b/Tests/Functional/Fitting/FitTests.cpp @@ -33,8 +33,7 @@ using mumufit::Parameter; using Units::deg; using Units::nm; -class Fitting : public ::testing::Test { -}; +class Fitting : public ::testing::Test {}; bool runFitTest(const std::string& minimizer_name, const std::string& algorithm_name, const SimfitTestPlan& plan, const std::string& options = "") diff --git a/Tests/Functional/Py/Embedded/Tests.cpp b/Tests/Functional/Py/Embedded/Tests.cpp index 61be4ceb03b021e50e912df76b8aa50d4c080f41..7334b136a440ccdb57d49a1d0c52f871f8493cef 100644 --- a/Tests/Functional/Py/Embedded/Tests.cpp +++ b/Tests/Functional/Py/Embedded/Tests.cpp @@ -25,8 +25,7 @@ #include <iostream> #include <sstream> -class PyEmbedded : public ::testing::Test { -}; +class PyEmbedded : public ::testing::Test {}; //! Accessing to the information about Python used during the build, content of path.sys variable. diff --git a/Tests/Functional/Suite/TestSuite.h b/Tests/Functional/Suite/TestSuite.h index cae82b3b1dc2e78ca76cf466f9b5facde7bf95a7..dddfd3dff23091d6c7a19307c8bbdd88c7da1b53 100644 --- a/Tests/Functional/Suite/TestSuite.h +++ b/Tests/Functional/Suite/TestSuite.h @@ -39,8 +39,7 @@ #define DISTRIBUTION_TEST_F(test_fixture, name) TEST_F(test_fixture, name) #endif -class Suite : public ::testing::Test { -}; +class Suite : public ::testing::Test {}; TEST_F(Suite, FormFactors) { diff --git a/Tests/Unit/Base/Concat.cpp b/Tests/Unit/Base/Concat.cpp index 0e4506785709fd59785d58326ca6bdef007f10a5..d9014adadad4dd860a9ae7ab7f839a88495e5221 100644 --- a/Tests/Unit/Base/Concat.cpp +++ b/Tests/Unit/Base/Concat.cpp @@ -3,8 +3,7 @@ #include <string> #include <vector> -class ConcatTest : public ::testing::Test { -}; +class ConcatTest : public ::testing::Test {}; TEST_F(ConcatTest, SimpleType) { diff --git a/Tests/Unit/Base/MinMaxValueTest.cpp b/Tests/Unit/Base/MinMaxValueTest.cpp index 97d2f0bf31ea7d5c3010d8b158db6f4683ab7779..806f8d2c97bc3070f05bef30eb0b5870f961c4c4 100644 --- a/Tests/Unit/Base/MinMaxValueTest.cpp +++ b/Tests/Unit/Base/MinMaxValueTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <cmath> -class MinMaxValueTest : public ::testing::Test { -}; +class MinMaxValueTest : public ::testing::Test {}; TEST_F(MinMaxValueTest, MinMaxValueAlmostEq) { diff --git a/Tests/Unit/Base/StringUtilsTest.cpp b/Tests/Unit/Base/StringUtilsTest.cpp index 729b3e31e4fd5768338d516b1fc6deab1346e251..1a53e745ff233e9945a0c2e4b5e7eccf385ee9f4 100644 --- a/Tests/Unit/Base/StringUtilsTest.cpp +++ b/Tests/Unit/Base/StringUtilsTest.cpp @@ -2,8 +2,7 @@ #include "BATesting.h" #include "Tests/GTestWrapper/google_test.h" -class StringUtilsTest : public ::testing::Test { -}; +class StringUtilsTest : public ::testing::Test {}; TEST_F(StringUtilsTest, toInt) { diff --git a/Tests/Unit/Device/ArrayUtilsTest.cpp b/Tests/Unit/Device/ArrayUtilsTest.cpp index b78a8486fc085ff418fbe2687ebfb809d1dd98b1..c99576e606566024214b2b2b113801eedd75b385 100644 --- a/Tests/Unit/Device/ArrayUtilsTest.cpp +++ b/Tests/Unit/Device/ArrayUtilsTest.cpp @@ -4,8 +4,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <vector> -class ArrayUtilsTest : public ::testing::Test { -}; +class ArrayUtilsTest : public ::testing::Test {}; TEST_F(ArrayUtilsTest, DatafieldFromVector1D) { diff --git a/Tests/Unit/Device/BeamFootprintTest.cpp b/Tests/Unit/Device/BeamFootprintTest.cpp index 3b919aa267ecd2d4493bc8d55aa1d07f6ce1bfc1..4a2323b85d155538ff0612ac7afa827b85628321 100644 --- a/Tests/Unit/Device/BeamFootprintTest.cpp +++ b/Tests/Unit/Device/BeamFootprintTest.cpp @@ -7,8 +7,7 @@ #include <limits> #include <memory> -class BeamFootprintTest : public ::testing::Test { -}; +class BeamFootprintTest : public ::testing::Test {}; TEST_F(BeamFootprintTest, ErroneousArguments) { diff --git a/Tests/Unit/Device/FixedBinAxisTest.cpp b/Tests/Unit/Device/FixedBinAxisTest.cpp index 21d73f88ad83f637981bfce5859f2e76bd845488..4007cf3c804edcba09899b479f579b39f74f5424 100644 --- a/Tests/Unit/Device/FixedBinAxisTest.cpp +++ b/Tests/Unit/Device/FixedBinAxisTest.cpp @@ -4,8 +4,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <iostream> -class FixedBinAxisTest : public ::testing::Test { -}; +class FixedBinAxisTest : public ::testing::Test {}; TEST_F(FixedBinAxisTest, IndexedAccessor) { diff --git a/Tests/Unit/Device/IntensityDataFunctionsTest.cpp b/Tests/Unit/Device/IntensityDataFunctionsTest.cpp index 812b63f689282ae753e33148c7a539184537d04b..32200d0a3bc68f90d1c4ed0eda9fafeff72a0696 100644 --- a/Tests/Unit/Device/IntensityDataFunctionsTest.cpp +++ b/Tests/Unit/Device/IntensityDataFunctionsTest.cpp @@ -6,8 +6,7 @@ #include "Device/Data/Datafield.h" #include "Tests/GTestWrapper/google_test.h" -class DataUtilsTest : public ::testing::Test { -}; +class DataUtilsTest : public ::testing::Test {}; TEST_F(DataUtilsTest, createRearrangedDataSet) { diff --git a/Tests/Unit/Device/PointwiseAxisTest.cpp b/Tests/Unit/Device/PointwiseAxisTest.cpp index 13f5dfac9d41fac7a78068a742881a87382c0726..bd588c5fa82a42c6f0ca5dd41f63a6a0b87891bf 100644 --- a/Tests/Unit/Device/PointwiseAxisTest.cpp +++ b/Tests/Unit/Device/PointwiseAxisTest.cpp @@ -5,8 +5,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <iostream> -class PointwiseAxisTest : public ::testing::Test { -}; +class PointwiseAxisTest : public ::testing::Test {}; TEST_F(PointwiseAxisTest, Construction) { diff --git a/Tests/Unit/Device/PolygonTest.cpp b/Tests/Unit/Device/PolygonTest.cpp index 492b78e891fa87551cd866154e1ea2ed2944ffac..86112e7eb0d106cb38591ab49d9764f20206772e 100644 --- a/Tests/Unit/Device/PolygonTest.cpp +++ b/Tests/Unit/Device/PolygonTest.cpp @@ -3,8 +3,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <memory> -class PolygonTest : public ::testing::Test { -}; +class PolygonTest : public ::testing::Test {}; TEST_F(PolygonTest, SimpleRectangle) { diff --git a/Tests/Unit/Device/ReadSANSDRawTest.cpp b/Tests/Unit/Device/ReadSANSDRawTest.cpp index c2ea37984cce57674c5de3e81db145865ac0af56..15d42fe2ee6d2b99e9743eac7b530cf779cddfe6 100644 --- a/Tests/Unit/Device/ReadSANSDRawTest.cpp +++ b/Tests/Unit/Device/ReadSANSDRawTest.cpp @@ -3,8 +3,7 @@ #include "Device/IO/IOFactory.h" #include "Tests/GTestWrapper/google_test.h" -class ReadSANSDRawTest : public ::testing::Test { -}; +class ReadSANSDRawTest : public ::testing::Test {}; TEST_F(ReadSANSDRawTest, Read) { diff --git a/Tests/Unit/Device/RegionOfInterestTest.cpp b/Tests/Unit/Device/RegionOfInterestTest.cpp index e0df938f633c58eac0687ec376c05b7077110ddd..240fc4429039ea72505e1269b1fbec6902c6a4b8 100644 --- a/Tests/Unit/Device/RegionOfInterestTest.cpp +++ b/Tests/Unit/Device/RegionOfInterestTest.cpp @@ -3,8 +3,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <memory> -class RegionOfInterestTest : public ::testing::Test { -}; +class RegionOfInterestTest : public ::testing::Test {}; //! Testing region of interest with reasonable area within the detector. diff --git a/Tests/Unit/Device/Shape2DTest.cpp b/Tests/Unit/Device/Shape2DTest.cpp index bef6194863e5086ad661941b42ecc372f3be87d4..bf1e4cad7f204de9651ecf0159df3c7edf1268f3 100644 --- a/Tests/Unit/Device/Shape2DTest.cpp +++ b/Tests/Unit/Device/Shape2DTest.cpp @@ -7,8 +7,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <memory> -class Shape2DTest : public ::testing::Test { -}; +class Shape2DTest : public ::testing::Test {}; TEST_F(Shape2DTest, Rectangle) { diff --git a/Tests/Unit/Device/SimulationAreaTest.cpp b/Tests/Unit/Device/SimulationAreaTest.cpp index 2a03a7bf6854e1e42531eed73ad921882f970144..269342b312ff61f0d369145a532a5a224309188c 100644 --- a/Tests/Unit/Device/SimulationAreaTest.cpp +++ b/Tests/Unit/Device/SimulationAreaTest.cpp @@ -5,8 +5,7 @@ #include <iostream> #include <memory> -class SimulationAreaTest : public ::testing::Test { -}; +class SimulationAreaTest : public ::testing::Test {}; // Iterators test diff --git a/Tests/Unit/Device/SpectrumTest.cpp b/Tests/Unit/Device/SpectrumTest.cpp index 38e98dbf537df48507b0c7516b04224ee4a8ef34..e52b4fbb16a4922f7a96105ad0a3df468f6caff7 100644 --- a/Tests/Unit/Device/SpectrumTest.cpp +++ b/Tests/Unit/Device/SpectrumTest.cpp @@ -3,8 +3,7 @@ #include <iostream> #include <tspectrum.h> -class SpectrumTest : public ::testing::Test { -}; +class SpectrumTest : public ::testing::Test {}; TEST_F(SpectrumTest, arrayPeaks) { diff --git a/Tests/Unit/Device/SphericalDetectorTest.cpp b/Tests/Unit/Device/SphericalDetectorTest.cpp index 32cfcaf6a64ce87961f2f2d1a86564f7f69b0070..bb1d844e48e5ab1d6a07e7b6b8c4f5f04e3f88e7 100644 --- a/Tests/Unit/Device/SphericalDetectorTest.cpp +++ b/Tests/Unit/Device/SphericalDetectorTest.cpp @@ -11,8 +11,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <memory> -class SphericalDetectorTest : public ::testing::Test { -}; +class SphericalDetectorTest : public ::testing::Test {}; // Construction of the detector with axes. TEST_F(SphericalDetectorTest, constructionWithAxes) diff --git a/Tests/Unit/Device/VariableBinAxisTest.cpp b/Tests/Unit/Device/VariableBinAxisTest.cpp index 00a55805e7a6bc7f9b6281c61dfbc2ff91550788..240f0489f6d1fefc4228ea304d1cf6815231c0fd 100644 --- a/Tests/Unit/Device/VariableBinAxisTest.cpp +++ b/Tests/Unit/Device/VariableBinAxisTest.cpp @@ -3,8 +3,7 @@ #include "Device/IO/DataFormatUtils.h" #include "Tests/GTestWrapper/google_test.h" -class VariableBinAxisTest : public ::testing::Test { -}; +class VariableBinAxisTest : public ::testing::Test {}; TEST_F(VariableBinAxisTest, VectorOfUnitLength) { diff --git a/Tests/Unit/GUI/TestDetectorItems.cpp b/Tests/Unit/GUI/TestDetectorItems.cpp index c9651e19bc025c29c5f2e8f35d9705b0637095f2..d51825a64d84cbabd4813111c48d10295ec86dab 100644 --- a/Tests/Unit/GUI/TestDetectorItems.cpp +++ b/Tests/Unit/GUI/TestDetectorItems.cpp @@ -10,8 +10,7 @@ #include "GUI/Support/Type/Unit.h" #include "Tests/GTestWrapper/google_test.h" -class TestDetectorItems : public ::testing::Test { -}; +class TestDetectorItems : public ::testing::Test {}; TEST_F(TestDetectorItems, resolutionFunction) { diff --git a/Tests/Unit/GUI/TestFitParameterModel.cpp b/Tests/Unit/GUI/TestFitParameterModel.cpp index 8b49615ca9d0311848889920cc5e8ae68fabbc22..6e4504a8095cc740e648e0e048c0b059849e596a 100644 --- a/Tests/Unit/GUI/TestFitParameterModel.cpp +++ b/Tests/Unit/GUI/TestFitParameterModel.cpp @@ -6,8 +6,7 @@ #include "GUI/Model/Model/JobModel.h" #include "Tests/GTestWrapper/google_test.h" -class TestFitParameterModel : public ::testing::Test { -}; +class TestFitParameterModel : public ::testing::Test {}; TEST_F(TestFitParameterModel, InitialState) { diff --git a/Tests/Unit/GUI/TestFormFactorItems.cpp b/Tests/Unit/GUI/TestFormFactorItems.cpp index ebe6e73ac6e5b247f98dbcf2efccece76400609e..9d7af207ce0dbd32d056d4a112b722317ff7d488 100644 --- a/Tests/Unit/GUI/TestFormFactorItems.cpp +++ b/Tests/Unit/GUI/TestFormFactorItems.cpp @@ -4,8 +4,7 @@ #include "Sample/HardParticle/Pyramid2.h" #include "Tests/GTestWrapper/google_test.h" -class TestFormFactorItems : public ::testing::Test { -}; +class TestFormFactorItems : public ::testing::Test {}; TEST_F(TestFormFactorItems, Pyramid2Item) { diff --git a/Tests/Unit/GUI/TestHelpers.cpp b/Tests/Unit/GUI/TestHelpers.cpp index 427cf4caaf32793887c9ff6edcb008ed76bd596b..bda415f1ffc1956cdfaeb9665b2922973040d144 100644 --- a/Tests/Unit/GUI/TestHelpers.cpp +++ b/Tests/Unit/GUI/TestHelpers.cpp @@ -1,8 +1,7 @@ #include "GUI/Util/Path.h" #include "Tests/GTestWrapper/google_test.h" -class TestHelpers : public ::testing::Test { -}; +class TestHelpers : public ::testing::Test {}; TEST_F(TestHelpers, VersionString) { diff --git a/Tests/Unit/GUI/TestInstrumentItems.cpp b/Tests/Unit/GUI/TestInstrumentItems.cpp index 70464f59f14c5ecea57b2f206e6005e9eeee726c..fd2a8e05b13f3290ceb260a7a61659fbac71e60e 100644 --- a/Tests/Unit/GUI/TestInstrumentItems.cpp +++ b/Tests/Unit/GUI/TestInstrumentItems.cpp @@ -5,8 +5,7 @@ Q_DECLARE_METATYPE(const InstrumentItem*) -class TestInstrumentCollection : public ::testing::Test { -}; +class TestInstrumentCollection : public ::testing::Test {}; //! Checks whether instrumentAddedRemoved will be emitted as expected diff --git a/Tests/Unit/GUI/TestLinkInstrument.cpp b/Tests/Unit/GUI/TestLinkInstrument.cpp index 6feedbf40359c74564f971b2f76bc87056edd8db..afdb4a1de4523930c6a30f8aacbb3e7ea0e6599e 100644 --- a/Tests/Unit/GUI/TestLinkInstrument.cpp +++ b/Tests/Unit/GUI/TestLinkInstrument.cpp @@ -11,8 +11,7 @@ #include <QSignalSpy> #include <QTest> -class TestLinkInstrument : public ::testing::Test { -}; +class TestLinkInstrument : public ::testing::Test {}; QList<RealItem*> linkedRealDataItems(RealModel& realModel, const InstrumentItem* instrumentItem) { diff --git a/Tests/Unit/GUI/TestMaterialItems.cpp b/Tests/Unit/GUI/TestMaterialItems.cpp index 4376028218b93747558accb5d49e2517963fd02c..21c2729fa2aa63c23eabc5cb6e6ea43e456d80b9 100644 --- a/Tests/Unit/GUI/TestMaterialItems.cpp +++ b/Tests/Unit/GUI/TestMaterialItems.cpp @@ -5,8 +5,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <memory> -class TestMaterialItems : public ::testing::Test { -}; +class TestMaterialItems : public ::testing::Test {}; TEST_F(TestMaterialItems, addRefractiveMaterial) { diff --git a/Tests/Unit/GUI/TestProfileItems.cpp b/Tests/Unit/GUI/TestProfileItems.cpp index f9d4388bdcdbf1d57c3d22d1de2697226dd8d68b..6294ddb18012df8819d66dcc06ffb6bfae9ad917 100644 --- a/Tests/Unit/GUI/TestProfileItems.cpp +++ b/Tests/Unit/GUI/TestProfileItems.cpp @@ -1,8 +1,7 @@ #include "GUI/Model/Sample/ProfileItems.h" #include "Tests/GTestWrapper/google_test.h" -class TestProfileItems : public ::testing::Test { -}; +class TestProfileItems : public ::testing::Test {}; TEST_F(TestProfileItems, Profile1DCauchy) { diff --git a/Tests/Unit/GUI/TestRealDataModel.cpp b/Tests/Unit/GUI/TestRealDataModel.cpp index c07d7ace901b8b7fbf99eff98b30009707ad45c8..84323a440fbc325cba557cbd710bd44fa5060491 100644 --- a/Tests/Unit/GUI/TestRealDataModel.cpp +++ b/Tests/Unit/GUI/TestRealDataModel.cpp @@ -5,8 +5,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <QSignalSpy> -class TestRealDataModel : public ::testing::Test { -}; +class TestRealDataModel : public ::testing::Test {}; //! Checks that LinkInstrumentManager listens instrument model. diff --git a/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp b/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp index b598cdfcab3a50e46aea9c049b23d2af118ceb65..787102add8fe57afd853ba8109b8de39d49d53b3 100644 --- a/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp +++ b/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp @@ -13,8 +13,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <QObject> -class TestRealSpaceBuilderUtils : public ::testing::Test { -}; +class TestRealSpaceBuilderUtils : public ::testing::Test {}; TEST_F(TestRealSpaceBuilderUtils, RealSpaceModelandParticle) { diff --git a/Tests/Unit/GUI/TestScientificSpinBox.cpp b/Tests/Unit/GUI/TestScientificSpinBox.cpp index c2ad3e8b846549d5ae5217a093d4606a7c660a83..2dfabe215a006f7b10d4a65681c89de738c1907a 100644 --- a/Tests/Unit/GUI/TestScientificSpinBox.cpp +++ b/Tests/Unit/GUI/TestScientificSpinBox.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <limits> -class TestScientificSpinBox : public ::testing::Test { -}; +class TestScientificSpinBox : public ::testing::Test {}; TEST_F(TestScientificSpinBox, testValueFromText) { diff --git a/Tests/Unit/GUI/TestSessionItem.cpp b/Tests/Unit/GUI/TestSessionItem.cpp index ff12306fe2edd2cd176ffb95f4c4166ed32e5d2f..f48850498a9f0de83e87ff27fc049a14fc4c0fe6 100644 --- a/Tests/Unit/GUI/TestSessionItem.cpp +++ b/Tests/Unit/GUI/TestSessionItem.cpp @@ -2,8 +2,7 @@ #include "GUI/Support/Data/SessionFlags.h" #include "Tests/GTestWrapper/google_test.h" -class TestSessionItem : public ::testing::Test { -}; +class TestSessionItem : public ::testing::Test {}; TEST_F(TestSessionItem, initialState) { diff --git a/Tests/Unit/GUI/TestSessionItemData.cpp b/Tests/Unit/GUI/TestSessionItemData.cpp index ba182253966d985b1d92eb17b9228679b0e99386..1955624bb98da012c0f2e40ac034d9c1bd46522c 100644 --- a/Tests/Unit/GUI/TestSessionItemData.cpp +++ b/Tests/Unit/GUI/TestSessionItemData.cpp @@ -2,8 +2,7 @@ #include "GUI/Support/Data/SessionItemData.h" #include "Tests/GTestWrapper/google_test.h" -class TestSessionItemData : public ::testing::Test { -}; +class TestSessionItemData : public ::testing::Test {}; TEST_F(TestSessionItemData, initialState) { diff --git a/Tests/Unit/GUI/TestSessionItemUtils.cpp b/Tests/Unit/GUI/TestSessionItemUtils.cpp index cbdb377ea387ba4c2905707b9c09abb5bac8eec6..284baed594f27dbd66c997adf9086cc349bd33a4 100644 --- a/Tests/Unit/GUI/TestSessionItemUtils.cpp +++ b/Tests/Unit/GUI/TestSessionItemUtils.cpp @@ -3,8 +3,7 @@ #include "GUI/Util/ComboProperty.h" #include "Tests/GTestWrapper/google_test.h" -class TestSessionItemUtils : public ::testing::Test { -}; +class TestSessionItemUtils : public ::testing::Test {}; //! Comparing types of variant. diff --git a/Tests/Unit/GUI/TestSessionModel.cpp b/Tests/Unit/GUI/TestSessionModel.cpp index 1f53450efb4b0bb5393eb1398ae75d93e359b3e6..683cf0f8674973779c863eb2f383369daff5c837 100644 --- a/Tests/Unit/GUI/TestSessionModel.cpp +++ b/Tests/Unit/GUI/TestSessionModel.cpp @@ -13,8 +13,7 @@ #include <QXmlStreamWriter> #include <memory> -class TestSessionModel : public ::testing::Test { -}; +class TestSessionModel : public ::testing::Test {}; //! Testing SessionModel::setData notifications. diff --git a/Tests/Unit/GUI/TestSessionXML.cpp b/Tests/Unit/GUI/TestSessionXML.cpp index 0910362479fe5f20901f1c3563d7a74d1cd4c9b7..1ecec3dad7dbc14467e561489b96f6b573a865f0 100644 --- a/Tests/Unit/GUI/TestSessionXML.cpp +++ b/Tests/Unit/GUI/TestSessionXML.cpp @@ -47,8 +47,7 @@ void deserialize(ItemType& t, const QByteArray& a) } // namespace -class TestSessionXML : public ::testing::Test { -}; +class TestSessionXML : public ::testing::Test {}; //! Testing to/from xml: simple property item. diff --git a/Tests/Unit/GUI/TestUpdateTimer.cpp b/Tests/Unit/GUI/TestUpdateTimer.cpp index 2ee14440a5a1c73f31e88e5c0b2c37874191f1eb..2491d13f1f60adb5d313eec55ebdffef0bd2c1ba 100644 --- a/Tests/Unit/GUI/TestUpdateTimer.cpp +++ b/Tests/Unit/GUI/TestUpdateTimer.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <QSignalSpy> -class TestUpdateTimer : public ::testing::Test { -}; +class TestUpdateTimer : public ::testing::Test {}; TEST_F(TestUpdateTimer, updateTimerShort) { diff --git a/Tests/Unit/Numeric/BesselTest.cpp b/Tests/Unit/Numeric/BesselTest.cpp index 7d9e32def75d6159189bf9f8339ab44b40a923c8..cf3c3b95730f19f56deb88fc583903f29ed43288 100644 --- a/Tests/Unit/Numeric/BesselTest.cpp +++ b/Tests/Unit/Numeric/BesselTest.cpp @@ -1,8 +1,7 @@ #include "Base/Math/Bessel.h" #include "Tests/GTestWrapper/google_test.h" -class BesselTest : public ::testing::Test { -}; +class BesselTest : public ::testing::Test {}; // Test complex Bessel function J1 TEST_F(BesselTest, BesselJ1) diff --git a/Tests/Unit/Numeric/BisectFF.cpp b/Tests/Unit/Numeric/BisectFF.cpp index dc03489e00b821c7103101fab733c1c1ed56c2b9..4ece43ac01c753f66ab0c6b116480c83222bd348 100644 --- a/Tests/Unit/Numeric/BisectFF.cpp +++ b/Tests/Unit/Numeric/BisectFF.cpp @@ -115,8 +115,7 @@ void run_test(IFormFactor& ff) EXPECT_EQ(ifail, 0); } -class BisectFF : public testing::Test { -}; +class BisectFF : public testing::Test {}; TEST_F(BisectFF, Bisect1) { diff --git a/Tests/Unit/Numeric/FormFactorOtherTest.cpp b/Tests/Unit/Numeric/FormFactorOtherTest.cpp index 8559d17b9bfa18c8cb415ef30c167e3850cada62..983df4f408a3d1078286728ed70aa4409cf2c5b4 100644 --- a/Tests/Unit/Numeric/FormFactorOtherTest.cpp +++ b/Tests/Unit/Numeric/FormFactorOtherTest.cpp @@ -6,8 +6,7 @@ using Units::deg; -class FormFactorOtherTest : public MultiQTest { -}; +class FormFactorOtherTest : public MultiQTest {}; //*********** cylinders *************** diff --git a/Tests/Unit/Numeric/FourierTransformTest.cpp b/Tests/Unit/Numeric/FourierTransformTest.cpp index 0b4f6f631be1324971c3d3678e4f2345d51cc860..a794e839eac8773386b8f8c71bd19e30e6999554 100644 --- a/Tests/Unit/Numeric/FourierTransformTest.cpp +++ b/Tests/Unit/Numeric/FourierTransformTest.cpp @@ -3,8 +3,7 @@ #include "Device/Data/Datafield.h" #include "Tests/GTestWrapper/google_test.h" -class FourierTransformTest : public ::testing::Test { -}; +class FourierTransformTest : public ::testing::Test {}; // Testing implementation of 1D FT with with low freuency centering TEST_F(FourierTransformTest, fft1DTest) diff --git a/Tests/Unit/Numeric/SpecialFunctionsTest.cpp b/Tests/Unit/Numeric/SpecialFunctionsTest.cpp index 7daf008dbccb72107508ba734a201029f6c91a51..6906dc967652951a77aabfcc377c867a26482c9e 100644 --- a/Tests/Unit/Numeric/SpecialFunctionsTest.cpp +++ b/Tests/Unit/Numeric/SpecialFunctionsTest.cpp @@ -6,8 +6,7 @@ EXPECT_NEAR((a).real(), (b).real(), epsi); \ EXPECT_NEAR((a).imag(), (b).imag(), epsi); -class SpecialFunctionsTest : public ::testing::Test { -}; +class SpecialFunctionsTest : public ::testing::Test {}; // Test accuracy of complex function sinc(z) near the removable singularity at z=0 diff --git a/Tests/Unit/Param/DistributionsTest.cpp b/Tests/Unit/Param/DistributionsTest.cpp index 37f05c0a56a7d13d69eba5342f05dcdcd1b58081..bb41b6746803a633e1557a1f3afa21004a12105c 100644 --- a/Tests/Unit/Param/DistributionsTest.cpp +++ b/Tests/Unit/Param/DistributionsTest.cpp @@ -5,8 +5,7 @@ #include <cmath> #include <memory> -class DistributionsTest : public ::testing::Test { -}; +class DistributionsTest : public ::testing::Test {}; TEST_F(DistributionsTest, DistributionGateDefaultConstructor) { diff --git a/Tests/Unit/Param/ParameterDistributionTest.cpp b/Tests/Unit/Param/ParameterDistributionTest.cpp index 078852b70aecb546a65f6e595512f0861dd130cc..26dea434842a1c8fc812c60675bac7a6e17fdd22 100644 --- a/Tests/Unit/Param/ParameterDistributionTest.cpp +++ b/Tests/Unit/Param/ParameterDistributionTest.cpp @@ -3,8 +3,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <cmath> -class ParameterDistributionTest : public ::testing::Test { -}; +class ParameterDistributionTest : public ::testing::Test {}; /* #baPool implement tests ParameterDistributionTest diff --git a/Tests/Unit/Resample/KzComputationTest.cpp b/Tests/Unit/Resample/KzComputationTest.cpp index 86d685298d5830d5e2bdf041d191cd86f6b404de..350f96ec7e42cbbe38084c196314f60d2b038c83 100644 --- a/Tests/Unit/Resample/KzComputationTest.cpp +++ b/Tests/Unit/Resample/KzComputationTest.cpp @@ -9,8 +9,7 @@ #include "Sample/StandardSamples/PlainMultiLayerBySLDBuilder.h" #include "Tests/GTestWrapper/google_test.h" -class KzComputationTest : public ::testing::Test { -}; +class KzComputationTest : public ::testing::Test {}; TEST_F(KzComputationTest, initial) { diff --git a/Tests/Unit/Resample/MaterialTest.cpp b/Tests/Unit/Resample/MaterialTest.cpp index f669cbc764e05b53fc502448de29da733b041e53..039f373ff7e9d3b4fd0cac5b1628a51d7d0fe005 100644 --- a/Tests/Unit/Resample/MaterialTest.cpp +++ b/Tests/Unit/Resample/MaterialTest.cpp @@ -6,8 +6,7 @@ #include "Resample/Processed/ReSample.cpp" -class MaterialTest : public ::testing::Test { -}; +class MaterialTest : public ::testing::Test {}; TEST_F(MaterialTest, MaterialConstruction) { diff --git a/Tests/Unit/Resample/ZLimitsTest.cpp b/Tests/Unit/Resample/ZLimitsTest.cpp index 32aa7fa0b4df0e044288a9fdb78141d152f40de5..8a58dcc45804ecb00b2f580d75a3b4a8cad61529 100644 --- a/Tests/Unit/Resample/ZLimitsTest.cpp +++ b/Tests/Unit/Resample/ZLimitsTest.cpp @@ -4,8 +4,7 @@ constexpr double inf = std::numeric_limits<double>::infinity(); -class ZLimitsTest : public ::testing::Test { -}; +class ZLimitsTest : public ::testing::Test {}; TEST_F(ZLimitsTest, Constructor) { diff --git a/Tests/Unit/Sample/Lattice2DTest.cpp b/Tests/Unit/Sample/Lattice2DTest.cpp index 25eacb5a9b0eaa0c7267912c7849d73e5242610d..e30dae82ecb595b200afd147a6c3d3e49382e3bb 100644 --- a/Tests/Unit/Sample/Lattice2DTest.cpp +++ b/Tests/Unit/Sample/Lattice2DTest.cpp @@ -2,8 +2,7 @@ #include "Base/Math/Constants.h" #include "Tests/GTestWrapper/google_test.h" -class Lattice2DTest : public ::testing::Test { -}; +class Lattice2DTest : public ::testing::Test {}; TEST_F(Lattice2DTest, basicLatticeClone) { diff --git a/Tests/Unit/Sample/LatticeTest.cpp b/Tests/Unit/Sample/LatticeTest.cpp index d7436865a58dee65ad4f1a081d037c11368ee2f6..57a7ddbfbc2f2667369da72c7a5c26a4b1e53693 100644 --- a/Tests/Unit/Sample/LatticeTest.cpp +++ b/Tests/Unit/Sample/LatticeTest.cpp @@ -4,8 +4,7 @@ #include "Sample/Lattice/Lattice3D.h" #include "Tests/GTestWrapper/google_test.h" -class LatticeTest : public ::testing::Test { -}; +class LatticeTest : public ::testing::Test {}; // tests volume of the unit cell TEST_F(LatticeTest, volumeTest) diff --git a/Tests/Unit/Sample/LayerRoughnessTest.cpp b/Tests/Unit/Sample/LayerRoughnessTest.cpp index b4c167531f6adcc359ce1ed36856d164efdabb14..d83ce0dc090751436189616ea0439d0c95dfdff2 100644 --- a/Tests/Unit/Sample/LayerRoughnessTest.cpp +++ b/Tests/Unit/Sample/LayerRoughnessTest.cpp @@ -1,8 +1,7 @@ #include "Sample/Interface/LayerRoughness.h" #include "Tests/GTestWrapper/google_test.h" -class LayerRoughnessTest : public ::testing::Test { -}; +class LayerRoughnessTest : public ::testing::Test {}; // test clone LayerRoughness TEST_F(LayerRoughnessTest, LayerRoughnessClone) diff --git a/Tests/Unit/Sample/LayerTest.cpp b/Tests/Unit/Sample/LayerTest.cpp index 45e5d371e5ca424fb33823c9c00a0467ce6f0c77..ae3f44e42eacc4377b4f28095073df65ab87f80c 100644 --- a/Tests/Unit/Sample/LayerTest.cpp +++ b/Tests/Unit/Sample/LayerTest.cpp @@ -4,8 +4,7 @@ #include "Sample/Material/MaterialFactoryFuncs.h" #include "Tests/GTestWrapper/google_test.h" -class LayerTest : public ::testing::Test { -}; +class LayerTest : public ::testing::Test {}; TEST_F(LayerTest, LayerGetAndSet) { diff --git a/Tests/Unit/Sample/ParticleCompositionTest.cpp b/Tests/Unit/Sample/ParticleCompositionTest.cpp index ab227bf1b31e049bd0d0b386b3165714d9e7b390..eeacc67053508cc2d544d95557854b03b7403197 100644 --- a/Tests/Unit/Sample/ParticleCompositionTest.cpp +++ b/Tests/Unit/Sample/ParticleCompositionTest.cpp @@ -6,8 +6,7 @@ #include "Sample/Scattering/Rotations.h" #include "Tests/GTestWrapper/google_test.h" -class ParticleCompositionTest : public ::testing::Test { -}; +class ParticleCompositionTest : public ::testing::Test {}; TEST_F(ParticleCompositionTest, ParticleCompositionDefaultConstructor) { diff --git a/Tests/Unit/Sample/ParticleCoreShellTest.cpp b/Tests/Unit/Sample/ParticleCoreShellTest.cpp index ef1cef43df7054e8d06704a48d8fadd4b99bfbab..ce0ed56daa6df9f81657484c9a47a8e28241e443 100644 --- a/Tests/Unit/Sample/ParticleCoreShellTest.cpp +++ b/Tests/Unit/Sample/ParticleCoreShellTest.cpp @@ -7,8 +7,7 @@ #include "Sample/Scattering/Rotations.h" #include "Tests/GTestWrapper/google_test.h" -class ParticleCoreShellTest : public ::testing::Test { -}; +class ParticleCoreShellTest : public ::testing::Test {}; TEST_F(ParticleCoreShellTest, ComplexCoreShellClone) { diff --git a/Tests/Unit/Sample/ProfilesTest.cpp b/Tests/Unit/Sample/ProfilesTest.cpp index 434da352b034a9d6569916a0efd4d061f37ae5cd..63c9b2737704a57515b0bdcd9623f22e9d315665 100644 --- a/Tests/Unit/Sample/ProfilesTest.cpp +++ b/Tests/Unit/Sample/ProfilesTest.cpp @@ -3,8 +3,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <memory> -class ProfilesTest : public ::testing::Test { -}; +class ProfilesTest : public ::testing::Test {}; // test 1D diff --git a/Tests/Unit/Sample/RotationTest.cpp b/Tests/Unit/Sample/RotationTest.cpp index 0fc627f072541ea7eda075d1230448fd107b8070..430b88973594b6866721c2ddab71f955b9ca62ec 100644 --- a/Tests/Unit/Sample/RotationTest.cpp +++ b/Tests/Unit/Sample/RotationTest.cpp @@ -4,8 +4,7 @@ #include <memory> -class RotationTest : public ::testing::Test { -}; +class RotationTest : public ::testing::Test {}; TEST_F(RotationTest, XRotations) { diff --git a/Tests/Unit/Sim/FitObjectiveTest.cpp b/Tests/Unit/Sim/FitObjectiveTest.cpp index 77cf2978ed87b9c415c733657ae6c21c83a77672..552724599a755387aea20d0324239f9554049b62 100644 --- a/Tests/Unit/Sim/FitObjectiveTest.cpp +++ b/Tests/Unit/Sim/FitObjectiveTest.cpp @@ -2,8 +2,7 @@ #include "Tests/GTestWrapper/google_test.h" #include "Tests/Unit/FittingTestHelper.h" -class FitObjectiveTest : public ::testing::Test { -}; +class FitObjectiveTest : public ::testing::Test {}; TEST_F(FitObjectiveTest, twoDatasets) { diff --git a/Tests/Unit/Sim/ObjectiveMetricTest.cpp b/Tests/Unit/Sim/ObjectiveMetricTest.cpp index 9422c104105dd62e17401b71afbc7761aab7af4e..a51779533cd964c7b51b308566fbe45b7b760d8b 100644 --- a/Tests/Unit/Sim/ObjectiveMetricTest.cpp +++ b/Tests/Unit/Sim/ObjectiveMetricTest.cpp @@ -3,8 +3,7 @@ #include "Tests/GTestWrapper/google_test.h" #include <cmath> -class ObjectiveMetricTest : public ::testing::Test { -}; +class ObjectiveMetricTest : public ::testing::Test {}; TEST_F(ObjectiveMetricTest, Chi2WellFormed) { diff --git a/Tests/Unit/Sim/PythonFormattingTest.cpp b/Tests/Unit/Sim/PythonFormattingTest.cpp index ece433fd7f12a7bd91cbedd8e1ca1b9a8e9cee5a..57250a6fd0ded50d4d01432596cd15a81a43d312 100644 --- a/Tests/Unit/Sim/PythonFormattingTest.cpp +++ b/Tests/Unit/Sim/PythonFormattingTest.cpp @@ -40,8 +40,7 @@ #include "Sim/Export/PyFmtLimits.h" #include "Tests/GTestWrapper/google_test.h" -class PythonFormattingTest : public ::testing::Test { -}; +class PythonFormattingTest : public ::testing::Test {}; TEST_F(PythonFormattingTest, ValueTimesUnits) { diff --git a/Tests/Unit/Sim/SimDataPairTest.cpp b/Tests/Unit/Sim/SimDataPairTest.cpp index 906f46159b39dd66942be93abd201ff59074b8d2..0c7c1124bd5a637bcccebe2a7162b90a12f2b9e6 100644 --- a/Tests/Unit/Sim/SimDataPairTest.cpp +++ b/Tests/Unit/Sim/SimDataPairTest.cpp @@ -3,8 +3,7 @@ #include "Tests/Unit/FittingTestHelper.h" #include <numeric> -class SimDataPairTest : public ::testing::Test { -}; +class SimDataPairTest : public ::testing::Test {}; TEST_F(SimDataPairTest, standardPair) { diff --git a/Tests/Unit/Sim/SpecularScanTest.cpp b/Tests/Unit/Sim/SpecularScanTest.cpp index f54c489a47d28a73d31b2e9094ad2e5206d79fd0..0bd7f9f8619f446b813eef0e9ffb81f4d61a0029 100644 --- a/Tests/Unit/Sim/SpecularScanTest.cpp +++ b/Tests/Unit/Sim/SpecularScanTest.cpp @@ -10,8 +10,7 @@ #include "Sim/Scan/ScanResolution.h" #include "Tests/GTestWrapper/google_test.h" -class SpecularScanTest : public ::testing::Test { -}; +class SpecularScanTest : public ::testing::Test {}; TEST_F(SpecularScanTest, AngularScanInit) {