From 69dd4c7928ac63e0212d4cbf729221c9494ea828 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Thu, 21 Apr 2016 15:43:02 +0200 Subject: [PATCH] Formfactor computation reacts to parameter changes, using precomputation. This closes bug 1413. Missing tests will be reactivated or written under issue 1294. --- Core/FormFactors/FormFactorPolyhedron.h | 2 +- dev-tools/ad-hoc/JWu/par_changed.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/FormFactors/FormFactorPolyhedron.h b/Core/FormFactors/FormFactorPolyhedron.h index 9345a5bb8dc..604279622e1 100644 --- a/Core/FormFactors/FormFactorPolyhedron.h +++ b/Core/FormFactors/FormFactorPolyhedron.h @@ -86,7 +86,7 @@ private: class FormFactorPolygonalPrism : public IFormFactorBorn { public: - FormFactorPolygonalPrism( const double _height ); + FormFactorPolygonalPrism( const double height ); virtual complex_t evaluate_for_q(const cvector_t q ) const final; double getVolume() const; double getHeight() const { return m_height; } diff --git a/dev-tools/ad-hoc/JWu/par_changed.py b/dev-tools/ad-hoc/JWu/par_changed.py index 1e552e1663e..8287eef4405 100644 --- a/dev-tools/ad-hoc/JWu/par_changed.py +++ b/dev-tools/ad-hoc/JWu/par_changed.py @@ -22,7 +22,11 @@ results.append( bp.Result(0, data, title) ) pool = ff.getParameterPool() print( pool.getParameterNames() ) +print( ff.getLength() ) +print( ff.getVolume() ) pool.setParameterValue('Length', 10 ) +print( ff.getLength() ) +print( ff.getVolume() ) title = 'E=10' data = bp.run_sim( sim, det ) -- GitLab