From 24b78bdf5345c03e3c5ec2240b36b78c26f60613 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Wed, 15 Dec 2021 12:30:32 +0100 Subject: [PATCH] deb msgs --- Sample/Scattering/DecoratedFF.cpp | 5 +++++ Sample/Scattering/FormFactorDecoratorPositionFactor.cpp | 7 ++++++- Sample/Scattering/FormFactorDecoratorRotation.cpp | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Sample/Scattering/DecoratedFF.cpp b/Sample/Scattering/DecoratedFF.cpp index f102cf297f3..4fb5f8fad90 100644 --- a/Sample/Scattering/DecoratedFF.cpp +++ b/Sample/Scattering/DecoratedFF.cpp @@ -14,9 +14,11 @@ #include "Sample/Scattering/DecoratedFF.h" #include "Base/Vector/RotMatrix.h" +#include "Base/Vector/WavevectorInfo.h" // debug #include "Sample/Material/Material.h" #include "Sample/Material/MaterialFactoryFuncs.h" #include "Sample/Scattering/Rotations.h" +#include <iostream> DecoratedFF::DecoratedFF(IDecoratableBorn* ff, const Material& material, const Material& ambient_material, const R3* position, @@ -66,10 +68,13 @@ void DecoratedFF::setRotMatrix(const RotMatrix& rotMatrix) complex_t DecoratedFF::theFF(const WavevectorInfo& wavevectors) const { + std::cout << "DEBUG DecoratedFF::theFF, q=" << wavevectors.getQ() << std::endl; complex_t result = m_ff->theFF(wavevectors); + std::cout << "-> sub result = " << result << std::endl; if (m_material && m_ambient_material) result = (m_material->scalarSubtrSLD(wavevectors) - m_ambient_material->scalarSubtrSLD(wavevectors)) * result; + std::cout << "-> final result = " << result << std::endl; return result; } diff --git a/Sample/Scattering/FormFactorDecoratorPositionFactor.cpp b/Sample/Scattering/FormFactorDecoratorPositionFactor.cpp index 33d1aacbafe..934230acd76 100644 --- a/Sample/Scattering/FormFactorDecoratorPositionFactor.cpp +++ b/Sample/Scattering/FormFactorDecoratorPositionFactor.cpp @@ -36,7 +36,12 @@ double FormFactorDecoratorPositionFactor::topZ(const IRotation* rotation) const complex_t FormFactorDecoratorPositionFactor::theFF(const WavevectorInfo& wavevectors) const { - return exp_I(m_position->dot(wavevectors.getQ())) * m_ff->theFF(wavevectors); + std::cout << "DEBUG FFDecPos::theFF, q=" << wavevectors.getQ() << std::endl; + complex_t result = m_ff->theFF(wavevectors); + std::cout << "-> sub result = " << result << std::endl; + result *= exp_I(m_position->dot(wavevectors.getQ())); + std::cout << "-> final result = " << result << std::endl; + return result; } Eigen::Matrix2cd diff --git a/Sample/Scattering/FormFactorDecoratorRotation.cpp b/Sample/Scattering/FormFactorDecoratorRotation.cpp index a93b6697641..32d2d83ec12 100644 --- a/Sample/Scattering/FormFactorDecoratorRotation.cpp +++ b/Sample/Scattering/FormFactorDecoratorRotation.cpp @@ -47,6 +47,9 @@ double FormFactorDecoratorRotation::topZ(const IRotation* rotation) const complex_t FormFactorDecoratorRotation::theFF(const WavevectorInfo& wavevectors) const { + std::cout << "DEBUG FFDecPos::theFF, q=" << wavevectors.getQ() << std::endl; + std::cout << " transformed q=" << wavevectors.transformed(m_rotMatrix->getInverse()).getQ() + << std::endl; return m_ff->theFF(wavevectors.transformed(m_rotMatrix->getInverse())); } -- GitLab