Skip to content
Snippets Groups Projects
Commit 2a82f605 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Bug fix in passing zero tgeoemtry transformation from the Crystal

parent 2de8fc59
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,6 @@ void TestMesoCrystal1::execute()
simulation->runSimulation();
simulation->normalize();
/*
OutputData<double> *data = simulation->getIntensityData();
TCanvas *c1 = DrawHelper::createAndRegisterCanvas("sim_meso_crystal",
......@@ -69,7 +68,6 @@ void TestMesoCrystal1::execute()
OutputDataIOFactory::writeIntensityData(*data,"test_mesocrystal1.txt");
delete data;
*/
delete simulation;
delete reference;
......
......@@ -23,6 +23,8 @@ FormFactorCrystal::FormFactorCrystal(
, m_wavevector_scattering_factor(wavevector_scattering_factor)
, mp_ambient_material(p_material)
, m_max_rec_length(0.0)
, mP_transform(0)
, mP_inverse_transform(0)
{
setName("FormFactorCrystal");
mp_lattice_basis = p_crystal.createBasis();
......
......@@ -114,6 +114,7 @@ BOOST_PYTHON_MODULE(libBornAgainCore){
register_Beam_class();
register_Bin1D_class();
register_Bin1DCVector_class();
register_ITransform3D_class();
register_ICloneable_class();
register_ISample_class();
register_ICompositeSample_class();
......@@ -144,7 +145,6 @@ BOOST_PYTHON_MODULE(libBornAgainCore){
register_FormFactorSphereGaussianRadius_class();
register_kvector_t_class();
register_cvector_t_class();
register_ITransform3D_class();
register_RotateY_3D_class();
register_RotateZ_3D_class();
register_IMaterial_class();
......
......@@ -44,7 +44,7 @@ public:
const IFormFactor& meso_crystal_form_factor,
const IMaterial *p_ambient_material,
complex_t wavevector_scattering_factor,
const Geometry::ITransform3D& transform) const;
const Geometry::ITransform3D *transform = 0) const;
Lattice getLattice() const { return m_lattice; }
LatticeBasis *createBasis() const { return mp_lattice_basis->clone(); }
......
......@@ -60,7 +60,7 @@ public:
const IFormFactor& meso_crystal_form_factor,
const IMaterial *p_ambient_material,
complex_t wavevector_scattering_factor,
const Geometry::ITransform3D& transform) const
const Geometry::ITransform3D *transform = 0) const
{
(void)meso_crystal_form_factor;
(void)p_ambient_material;
......
......@@ -53,14 +53,14 @@ IFormFactor* Crystal::createTotalFormFactor(
const IFormFactor& meso_crystal_form_factor,
const IMaterial *p_ambient_material,
complex_t wavevector_scattering_factor,
const Geometry::ITransform3D& P_transform) const
const Geometry::ITransform3D *P_transform) const
{
FormFactorCrystal *p_ff_crystal =
new FormFactorCrystal(*this, meso_crystal_form_factor,
p_ambient_material, wavevector_scattering_factor);
// if (P_transform.get()) {
p_ff_crystal->setTransformation(P_transform);
// }
if (P_transform) {
p_ff_crystal->setTransformation(*P_transform);
}
if (m_dw_factor>0.0) {
return new FormFactorDecoratorDebyeWaller(p_ff_crystal, m_dw_factor);
}
......
......@@ -72,7 +72,7 @@ IFormFactor* MesoCrystal::createFormFactor(
{
return mp_particle_structure->createTotalFormFactor(
*mp_meso_form_factor, mp_ambient_material,
wavevector_scattering_factor, *mP_transform.get());
wavevector_scattering_factor, mP_transform.get());
}
void MesoCrystal::setSimpleFormFactor(IFormFactor* p_form_factor)
......
......@@ -288,3 +288,7 @@
# after removing "alpha_f", "phi_f"
2013-11-25 15:42:38 | jcnsopc73 | macosx64, 2800 MHz | 21.978 | 22.9885 | 1.47059 | 740741 |
2013-11-25 15:42:46 | jcnsopc73 | macosx64, 2800 MHz | 22.2222 | 22.7273 | 1.41844 | 800000 |
# after getting rid of shared_ptr in ITransformation3D
2013-11-26 17:20:01 | jcnsopc73 | macosx64, 2800 MHz | 23.8095 | 23.8095 | 1.48148 | 800000 |
2013-11-26 17:20:51 | jcnsopc73 | macosx64, 2800 MHz | 23.5294 | 23.5294 | 1.48148 | 769231 |
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment