Skip to content
Snippets Groups Projects
Commit ee026240 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

ReParticle::bottom_Z ignoring argument rotation, apparently never nonnull

parent 3d81c6e1
No related branches found
No related tags found
1 merge request!1174IFormFactor and children: replace BottomZ, TopZ by spanZ
......@@ -13,6 +13,7 @@
// ************************************************************************************************
#include "Resample/Particle/ReParticle.h"
#include "Base/Util/Assert.h"
#include "Base/Vector/WavevectorInfo.h" // debug
#include "Sample/Material/Material.h"
#include "Sample/Material/MaterialFactoryFuncs.h"
......@@ -111,26 +112,22 @@ SpinMatrix ReParticle::thePolFF(const WavevectorInfo& wavevectors) const
return result;
}
double ReParticle::bottom_Z(const IRotation* rotation) const
double ReParticle::bottom_Z(const IRotation*) const
{
RotMatrix transform = rotation ? rotation->rotMatrix() : RotMatrix();
if (m_rotMatrix)
transform = transform * *m_rotMatrix;
RotMatrix transform = m_rotMatrix ? *m_rotMatrix : RotMatrix();
std::unique_ptr<const IRotation> total_rotation(IRotation::createRotation(transform));
double result = m_ff->bottomZ(total_rotation.get());
if (m_position)
result += (rotation ? rotation->transformed(*m_position) : *m_position).z();
result += m_position->z();
return result;
}
double ReParticle::top_Z(const IRotation* rotation) const
double ReParticle::top_Z(const IRotation*) const
{
RotMatrix transform = rotation ? rotation->rotMatrix() : RotMatrix();
if (m_rotMatrix)
transform = transform * *m_rotMatrix;
RotMatrix transform = m_rotMatrix ? *m_rotMatrix : RotMatrix();
std::unique_ptr<const IRotation> total_rotation(IRotation::createRotation(transform));
double result = m_ff->topZ(total_rotation.get());
if (m_position)
result += (rotation ? rotation->transformed(*m_position) : *m_position).z();
result += m_position->z();
return result;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment