From 740a42eda5deb0be054b7e325cb08d38ceb5f241 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Thu, 11 Nov 2021 22:15:42 +0100 Subject: [PATCH] ... --- Sample/Multilayer/RoughnessModels.cpp | 5 ++++- Sample/Particle/Crystal.cpp | 14 +++++++------- Sample/Particle/Crystal.h | 4 ++-- Sample/Particle/FormFactorWeighted.cpp | 2 -- Sample/Particle/FormFactorWeighted.h | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Sample/Multilayer/RoughnessModels.cpp b/Sample/Multilayer/RoughnessModels.cpp index c333cdfb8f5..0300aa88017 100644 --- a/Sample/Multilayer/RoughnessModels.cpp +++ b/Sample/Multilayer/RoughnessModels.cpp @@ -17,11 +17,14 @@ #include <map> namespace { + const std::map<RoughnessModel, std::string> roughnessModelNames = { {RoughnessModel::DEFAULT, "RoughnessModel::DEFAULT"}, {RoughnessModel::TANH, "RoughnessModel::TANH"}, {RoughnessModel::NEVOT_CROCE, "RoughnessModel::NEVOT_CROCE"}}; -} + +} // namespace + std::string RoughnessModelWrap::roughnessModelName(RoughnessModel model) { diff --git a/Sample/Particle/Crystal.cpp b/Sample/Particle/Crystal.cpp index 28aed60e87d..2a286e28a2f 100644 --- a/Sample/Particle/Crystal.cpp +++ b/Sample/Particle/Crystal.cpp @@ -40,12 +40,12 @@ Crystal* Crystal::clone() const } IFormFactor* Crystal::createTotalFormFactor(const IFormFactor& meso_crystal_form_factor, - const IRotation* rot, const R3& translation) const + const IRotation* rotation, const R3& translation) const { - Lattice3D transformed_lattice = transformedLattice(rot); + Lattice3D transformed_lattice = transformedLattice(rotation); std::unique_ptr<IParticle> basis_clone{m_basis->clone()}; - if (rot) - basis_clone->rotate(*rot); + if (rotation) + basis_clone->rotate(*rotation); basis_clone->translate(translation); const std::unique_ptr<IFormFactor> basis_ff(basis_clone->createFormFactor()); return new FormFactorCrystal(transformed_lattice, *basis_ff, meso_crystal_form_factor, @@ -70,11 +70,11 @@ Admixtures Crystal::admixtures() const return result; } -Lattice3D Crystal::transformedLattice(const IRotation* rot) const +Lattice3D Crystal::transformedLattice(const IRotation* rotation) const { - if (!rot) + if (!rotation) return m_lattice; - return m_lattice.transformed(rot->getTransform3D()); + return m_lattice.transformed(rotation->getTransform3D()); } std::vector<const INode*> Crystal::getChildren() const diff --git a/Sample/Particle/Crystal.h b/Sample/Particle/Crystal.h index 2e4404a2c17..f9deb6d0218 100644 --- a/Sample/Particle/Crystal.h +++ b/Sample/Particle/Crystal.h @@ -45,11 +45,11 @@ public: void accept(INodeVisitor* visitor) const override { visitor->visit(this); } IFormFactor* createTotalFormFactor(const IFormFactor& meso_crystal_form_factor, - const IRotation* p_rotation, const R3& translation) const; + const IRotation* rotation, const R3& translation) const; Admixtures admixtures() const; - Lattice3D transformedLattice(const IRotation* p_rotation = nullptr) const; + Lattice3D transformedLattice(const IRotation* rotation = nullptr) const; std::vector<const INode*> getChildren() const override; diff --git a/Sample/Particle/FormFactorWeighted.cpp b/Sample/Particle/FormFactorWeighted.cpp index 48b1ab22409..eb4d120e436 100644 --- a/Sample/Particle/FormFactorWeighted.cpp +++ b/Sample/Particle/FormFactorWeighted.cpp @@ -15,8 +15,6 @@ #include "Sample/Particle/FormFactorWeighted.h" #include "Base/Util/Algorithms.h" -FormFactorWeighted::FormFactorWeighted() {} - FormFactorWeighted::~FormFactorWeighted() { for (size_t index = 0; index < m_form_factors.size(); ++index) diff --git a/Sample/Particle/FormFactorWeighted.h b/Sample/Particle/FormFactorWeighted.h index 4e18228b7f5..948d9a4ed06 100644 --- a/Sample/Particle/FormFactorWeighted.h +++ b/Sample/Particle/FormFactorWeighted.h @@ -29,7 +29,7 @@ public: inline static const std::string class_name = "FormFactorWeighted"; std::string className() const final { return class_name; } - FormFactorWeighted(); + FormFactorWeighted() = default; ~FormFactorWeighted() override; FormFactorWeighted* clone() const override; -- GitLab