diff --git a/Core/FormFactors/FormFactorCone6.h b/Core/FormFactors/FormFactorCone6.h index 312bfcc6ea691c50744a81f10adf725936305399..cb79a2fc906004abccc2b79a615fe033504ba83d 100644 --- a/Core/FormFactors/FormFactorCone6.h +++ b/Core/FormFactors/FormFactorCone6.h @@ -37,9 +37,8 @@ public: virtual void accept(ISampleVisitor *visitor) const; - double getHeight() const; - virtual double getRadius() const final; - double getAlpha() const; + double getHeight() const { return m_height; } + double getAlpha() const { return m_alpha; } protected: virtual bool check_initialization() const; @@ -51,8 +50,4 @@ private: double m_alpha; }; -inline double FormFactorCone6::getHeight() const { return m_height; } -inline double FormFactorCone6::getRadius() const { return m_radius; } -inline double FormFactorCone6::getAlpha() const { return m_alpha; } - #endif // FORMFACTORCONE6_H diff --git a/Core/FormFactors/FormFactorCuboctahedron.cpp b/Core/FormFactors/FormFactorCuboctahedron.cpp index 608b9e711609a3fb7c19b7249838efd46f86d6e4..56839fbcbdbdc53802695c3eaee316b5a2809164 100644 --- a/Core/FormFactors/FormFactorCuboctahedron.cpp +++ b/Core/FormFactors/FormFactorCuboctahedron.cpp @@ -103,8 +103,3 @@ void FormFactorCuboctahedron::accept(ISampleVisitor *visitor) const { visitor->visit(this); } - -double FormFactorCuboctahedron::getRadius() const -{ - return m_length / 2.0; -} diff --git a/Core/FormFactors/FormFactorCuboctahedron.h b/Core/FormFactors/FormFactorCuboctahedron.h index 5d77f891a951a200fd19930dab42c8504feae960..1cf86695051c7debb7cb801f965049cba639d5c8 100644 --- a/Core/FormFactors/FormFactorCuboctahedron.h +++ b/Core/FormFactors/FormFactorCuboctahedron.h @@ -40,7 +40,6 @@ public: virtual FormFactorCuboctahedron *clone() const final; virtual void accept(ISampleVisitor *visitor) const final; - virtual double getRadius() const final; double getHeight() const; double getHeightRatio() const; double getLength() const; diff --git a/Core/FormFactors/FormFactorDodecahedron.cpp b/Core/FormFactors/FormFactorDodecahedron.cpp index bbdde473fd560b761b4535c6fdf7921453e94826..a3ff6adde5d30a424e8fe693a7da4c46d7b41630 100644 --- a/Core/FormFactors/FormFactorDodecahedron.cpp +++ b/Core/FormFactors/FormFactorDodecahedron.cpp @@ -20,18 +20,17 @@ FormFactorDodecahedron::FormFactorDodecahedron(double edge) - : FormFactorPolyhedron( polyhedral_faces(edge), -1.113516364411607*edge, true ) + : FormFactorPolyhedron() , m_edge(edge) { setName(BornAgain::FFDodecahedronType); - check_initialization(); - assert_platonic(); - init_parameters(); + registerParameter(BornAgain::Edge, &m_edge); + onChange(); } -std::vector<PolyhedralFace> FormFactorDodecahedron::polyhedral_faces(double edge) +void FormFactorDodecahedron::onChange() { - double a = edge; + double a = m_edge; kvector_t V[20] = { { 0.8506508083520399*a, 0*a, -1.113516364411607*a}, { 0.2628655560595668*a, 0.8090169943749473*a, -1.113516364411607*a}, @@ -53,30 +52,29 @@ std::vector<PolyhedralFace> FormFactorDodecahedron::polyhedral_faces(double edge { 0.6881909602355868*a, -0.5*a, 1.113516364411607*a}, { 0.6881909602355868*a, 0.5*a, 1.113516364411607*a}, { -0.2628655560595668*a, 0.8090169943749473*a, 1.113516364411607*a} }; - std::vector<PolyhedralFace> faces; + m_faces.clear(); // bottom: - faces.push_back( PolyhedralFace( { V[ 0], V[ 4], V[ 3], V[ 2], V[ 1] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 0], V[ 4], V[ 3], V[ 2], V[ 1] } ) ); // lower ring: - faces.push_back( PolyhedralFace( { V[ 0], V[ 5], V[12], V[ 9], V[ 4] } ) ); - faces.push_back( PolyhedralFace( { V[ 4], V[ 9], V[11], V[ 8], V[ 3] } ) ); - faces.push_back( PolyhedralFace( { V[ 3], V[ 8], V[10], V[ 7], V[ 2] } ) ); - faces.push_back( PolyhedralFace( { V[ 2], V[ 7], V[14], V[ 6], V[ 1] } ) ); - faces.push_back( PolyhedralFace( { V[ 1], V[ 6], V[13], V[ 5], V[ 0] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 0], V[ 5], V[12], V[ 9], V[ 4] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 4], V[ 9], V[11], V[ 8], V[ 3] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 3], V[ 8], V[10], V[ 7], V[ 2] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 2], V[ 7], V[14], V[ 6], V[ 1] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 1], V[ 6], V[13], V[ 5], V[ 0] } ) ); // upper ring: - faces.push_back( PolyhedralFace( { V[ 8], V[11], V[16], V[15], V[10] } ) ); - faces.push_back( PolyhedralFace( { V[ 9], V[12], V[17], V[16], V[11] } ) ); - faces.push_back( PolyhedralFace( { V[ 5], V[13], V[18], V[17], V[12] } ) ); - faces.push_back( PolyhedralFace( { V[ 6], V[14], V[19], V[18], V[13] } ) ); - faces.push_back( PolyhedralFace( { V[ 7], V[10], V[15], V[19], V[14] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 8], V[11], V[16], V[15], V[10] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 9], V[12], V[17], V[16], V[11] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 5], V[13], V[18], V[17], V[12] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 6], V[14], V[19], V[18], V[13] } ) ); + m_faces.push_back( PolyhedralFace( { V[ 7], V[10], V[15], V[19], V[14] } ) ); // top: - faces.push_back( PolyhedralFace( { V[15], V[16], V[17], V[18], V[19] } ) ); - return faces; -} + m_faces.push_back( PolyhedralFace( { V[15], V[16], V[17], V[18], V[19] } ) ); + assert_platonic(); -void FormFactorDodecahedron::init_parameters() -{ - clearParameterPool(); - registerParameter(BornAgain::Edge, &m_edge); + m_z_origin = -1.113516364411607*a; + m_sym_Ci = true; + + FormFactorPolyhedron::precompute(); } FormFactorDodecahedron* FormFactorDodecahedron::clone() const @@ -88,14 +86,3 @@ void FormFactorDodecahedron::accept(ISampleVisitor *visitor) const { visitor->visit(this); } - -double FormFactorDodecahedron::getRadius() const -{ - return m_edge/2.0; //! @todo this is obviously WRONG -} - -bool FormFactorDodecahedron::check_initialization() const -{ - bool result(true); - return result; -} diff --git a/Core/FormFactors/FormFactorDodecahedron.h b/Core/FormFactors/FormFactorDodecahedron.h index d776840f3e9123c781a2c8c97b815d31855ede47..3b4666d406eec255fc948e80cb3f7b92c001ca99 100644 --- a/Core/FormFactors/FormFactorDodecahedron.h +++ b/Core/FormFactors/FormFactorDodecahedron.h @@ -29,18 +29,13 @@ public: //! @param edge length FormFactorDodecahedron(double edge); - static std::vector<PolyhedralFace> polyhedral_faces(double edge); - virtual FormFactorDodecahedron *clone() const final; virtual void accept(ISampleVisitor *visitor) const final; - virtual double getRadius() const final; double getEdge() const; private: - virtual bool check_initialization() const; - virtual void init_parameters(); - + virtual void onChange() final; double m_edge; }; diff --git a/Core/FormFactors/FormFactorIcosahedron.cpp b/Core/FormFactors/FormFactorIcosahedron.cpp index 593b1d4fb6f423ae29894980d37dbf8cc13f1927..a092b26c417c419e674f5a135b88e2f1f54d000e 100644 --- a/Core/FormFactors/FormFactorIcosahedron.cpp +++ b/Core/FormFactors/FormFactorIcosahedron.cpp @@ -91,11 +91,6 @@ void FormFactorIcosahedron::accept(ISampleVisitor *visitor) const visitor->visit(this); } -double FormFactorIcosahedron::getRadius() const -{ - return m_edge/2.0; //! @todo this is obviously WRONG -} - bool FormFactorIcosahedron::check_initialization() const { bool result(true); diff --git a/Core/FormFactors/FormFactorIcosahedron.h b/Core/FormFactors/FormFactorIcosahedron.h index d5daefa713a19cab32e464f086a2d425b3cb83c0..2d14f4cadb457debd56c3eb0d1937ef0094bdd4b 100644 --- a/Core/FormFactors/FormFactorIcosahedron.h +++ b/Core/FormFactors/FormFactorIcosahedron.h @@ -34,7 +34,6 @@ public: virtual FormFactorIcosahedron *clone() const final; virtual void accept(ISampleVisitor *visitor) const final; - virtual double getRadius() const final; double getEdge() const; private: diff --git a/Core/FormFactors/FormFactorPolyhedron.cpp b/Core/FormFactors/FormFactorPolyhedron.cpp index 23bb8fa5334e32a600d9fce4b5446b8a51a0468a..d4e6d699f972b412066c14214692dedaff257518 100644 --- a/Core/FormFactors/FormFactorPolyhedron.cpp +++ b/Core/FormFactors/FormFactorPolyhedron.cpp @@ -121,12 +121,12 @@ PolyhedralFace::PolyhedralFace( const std::vector<kvector_t>& V, bool _sym_S2 ) rperp += V[j].dot(normal); rperp /= N; // compute radius in 3d - radius_3d = 0; + m_radius_3d = 0; for( const kvector_t v: V ) - radius_3d = std::max( radius_3d, v.mag() ); + m_radius_3d = std::max( m_radius_3d, v.mag() ); // assert that the vertices lay in a plane for ( size_t j=1; j<N; ++j ) - if( std::abs(V[j].dot(normal) - rperp) > 1e-14*radius_3d ) + if( std::abs(V[j].dot(normal) - rperp) > 1e-14*m_radius_3d ) throw std::runtime_error("Face is not planar"); // compute area area = 0; @@ -135,9 +135,9 @@ PolyhedralFace::PolyhedralFace( const std::vector<kvector_t>& V, bool _sym_S2 ) area += normal.dot( V[j].cross( V[jj] ) ) / 2; } // compute radius in 2d - radius_2d = 0; + m_radius_2d = 0; for( const kvector_t v: V ) - radius_2d = std::max( radius_2d, (v-rperp*normal).mag() ); + m_radius_2d = std::max( m_radius_2d, (v-rperp*normal).mag() ); // only now deal with inversion symmetry if( sym_S2 ) { @@ -145,7 +145,7 @@ PolyhedralFace::PolyhedralFace( const std::vector<kvector_t>& V, bool _sym_S2 ) throw std::runtime_error("Odd #edges violates symmetry S2"); N /= 2; for( size_t j=0; j<N; ++j ){ - if( ((V[j]-rperp*normal)+(V[j+N]-rperp*normal)).mag2()>1e-24*radius_2d*radius_2d ) + if( ((V[j]-rperp*normal)+(V[j+N]-rperp*normal)).mag2()>1e-24*m_radius_2d*m_radius_2d ) throw std::runtime_error("Given points violate symmetry S2"); } // keep only half of the egdes @@ -213,7 +213,7 @@ complex_t PolyhedralFace::ff( const cvector_t q, const bool sym_Ci ) const complex_t qperp; cvector_t qpa; decompose_q( q, qperp, qpa ); - double qpa_red = radius_2d * qpa.mag(); + double qpa_red = m_radius_2d * qpa.mag(); complex_t qr_perp = qperp*rperp; if ( qpa_red==0 ) { return qn * (sym_Ci ? 2.*I*sin(qr_perp) : exp(I*qr_perp)) * area; @@ -268,7 +268,7 @@ complex_t PolyhedralFace::ff_2D( const cvector_t qpa ) const { if ( std::abs(qpa.dot(normal))>eps*qpa.mag() ) throw std::runtime_error("ff_2D called with perpendicular q component"); - double qpa_red = radius_2d * qpa.mag(); + double qpa_red = m_radius_2d * qpa.mag(); if ( qpa_red==0 ) { return area; } else if ( qpa_red < qpa_limit_series ) { @@ -322,77 +322,69 @@ void PolyhedralFace::assert_Ci( const PolyhedralFace& other ) const const double FormFactorPolyhedron::q_limit_series = 1e-6; -FormFactorPolyhedron::FormFactorPolyhedron( - const std::vector<PolyhedralFace>& _faces, const double _z_origin, const bool _sym_Ci ) - : z_origin(_z_origin), sym_Ci(_sym_Ci), faces(_faces) +void FormFactorPolyhedron::precompute() { - radius = 0; - volume = 0; - for( const PolyhedralFace& Gk: faces ) { - radius = std::max( radius, Gk.radius_3d ); - volume += Gk.getPyramidalVolume(); + m_radius = 0; + m_volume = 0; + for( const PolyhedralFace& Gk: m_faces ) { + m_radius = std::max( m_radius, Gk.m_radius_3d ); + m_volume += Gk.getPyramidalVolume(); } - if( sym_Ci ) { - if( faces.size()&1 ) + if( m_sym_Ci ) { + if( m_faces.size()&1 ) throw std::runtime_error("Odd #faces violates symmetry Ci"); - size_t N = faces.size()/2; - // for this tests, faces must be in a specific order + size_t N = m_faces.size()/2; + // for this tests, m_faces must be in a specific order for( size_t k=0; k<N; ++k ) - faces[k].assert_Ci( faces[2*N-1-k] ); + m_faces[k].assert_Ci( m_faces[2*N-1-k] ); // keep only half of the faces - faces.erase( faces.begin()+N, faces.end() ); + m_faces.erase( m_faces.begin()+N, m_faces.end() ); } } -void FormFactorPolyhedron::onChange() -{ - throw NotImplementedException( - "FFPolyhedron::onChange() -> Error! Method is not implemented"); -} - //! Returns the form factor F(q) of this polyhedron, respecting the offset z_origin. complex_t FormFactorPolyhedron::evaluate_for_q( const cvector_t q ) const { - return exp(-I*z_origin*q.z()) * evaluate_centered(q); + return exp(-I*m_z_origin*q.z()) * evaluate_centered(q); } //! Returns the form factor F(q) of this polyhedron, with origin at z=0. complex_t FormFactorPolyhedron::evaluate_centered( const cvector_t q ) const { - double q_red = radius * q.mag(); + double q_red = m_radius * q.mag(); #ifdef POLYHEDRAL_DIAGNOSTIC diagnosis = { 0, 0 }; #endif if( q_red==0 ) { - return volume; + return m_volume; } else if ( q_red < q_limit_series ) { // summation of power series - complex_t ret = volume; - complex_t n_fac = ( sym_Ci ? -2 : I ) / q.mag2(); + complex_t ret = m_volume; + complex_t n_fac = ( m_sym_Ci ? -2 : I ) / q.mag2(); for( int n=1; n<20; ++n ) { - if( sym_Ci && n&1 ) + if( m_sym_Ci && n&1 ) continue; #ifdef POLYHEDRAL_DIAGNOSTIC diagnosis.maxOrder = std::max( diagnosis.maxOrder, n ); #endif complex_t term = 0; - for( const PolyhedralFace& Gk: faces ) + for( const PolyhedralFace& Gk: m_faces ) term += Gk.ff_n( n+1, q ); term *= n_fac; ret += term; if( !(n&1) && std::abs(term)<=eps*std::abs(ret) ) return ret; - n_fac *= ( sym_Ci ? -1 : I ); + n_fac *= ( m_sym_Ci ? -1 : I ); } throw std::runtime_error("Bug in formfactor computation: series F(q) not converged"); } else { // direct evaluation of analytic formula (coefficients may involve series) complex_t ret = 0; - for( const PolyhedralFace& Gk: faces ) - ret += Gk.ff(q, sym_Ci ); + for( const PolyhedralFace& Gk: m_faces ) + ret += Gk.ff(q, m_sym_Ci ); return ret / (I * q.mag2()); } } @@ -403,10 +395,10 @@ void FormFactorPolyhedron::assert_platonic() const { // just one test; one could do much more ... double pyramidal_volume = 0; - for( const auto& Gk: faces ) + for( const auto& Gk: m_faces ) pyramidal_volume += Gk.getPyramidalVolume(); - pyramidal_volume /= faces.size(); - for( const auto& Gk: faces ) + pyramidal_volume /= m_faces.size(); + for( const auto& Gk: m_faces ) if (std::abs(Gk.getPyramidalVolume()-pyramidal_volume) > 160*eps*pyramidal_volume) { std::cout<<std::setprecision(16)<<"BUG: pyr_volume(this face)="<< Gk.getPyramidalVolume()<<" vs pyr_volume(avge)="<<pyramidal_volume<<"\n"; @@ -427,10 +419,11 @@ FormFactorPolygonalPrism::FormFactorPolygonalPrism( //! Returns the volume of this prism. double FormFactorPolygonalPrism::getVolume() const { return m_height * m_base.getArea(); } + //! Returns the height of this prism. double FormFactorPolygonalPrism::getHeight() const { return m_height; } -//! Returns the form factor F(q) of this polyhedron, respecting the offset z_origin. +//! Returns the form factor F(q) of this polyhedron, respecting the offset height/2. complex_t FormFactorPolygonalPrism::evaluate_for_q( const cvector_t q ) const { diff --git a/Core/FormFactors/FormFactorPolyhedron.h b/Core/FormFactors/FormFactorPolyhedron.h index ace2b15aed11029cf7589bc1cadc34e52e6449c6..87ca878c330e5d80814828911965ef4d9a81d030 100644 --- a/Core/FormFactors/FormFactorPolyhedron.h +++ b/Core/FormFactors/FormFactorPolyhedron.h @@ -40,7 +40,7 @@ public: class PolyhedralFace { public: PolyhedralFace( const std::vector<kvector_t>& _V=std::vector<kvector_t>(), bool _sym_S2=false ); - double radius_3d; //!< radius of enclosing sphere + double m_radius_3d; //!< radius of enclosing sphere double getArea() const; double getPyramidalVolume() const; complex_t ff_n( int m, const cvector_t q ) const; @@ -54,7 +54,7 @@ private: double area; kvector_t normal; //!< normal vector of this polygon's plane double rperp; //!< distance of this polygon's plane from the origin, along 'normal' - double radius_2d; //!< radius of enclosing cylinder + double m_radius_2d; //!< radius of enclosing cylinder void decompose_q( const cvector_t q, complex_t& qperp, cvector_t& qpa ) const; complex_t ff_n_core( int m, const cvector_t qpa ) const; }; @@ -64,19 +64,23 @@ private: class FormFactorPolyhedron : public IFormFactorBorn { public: + FormFactorPolyhedron() {} FormFactorPolyhedron( const std::vector<PolyhedralFace>& _faces, - const double _z_origin, const bool _sym_Ci=false ); + const double _z_origin, const bool _sym_Ci=false ) + : m_faces(_faces), m_z_origin(_z_origin), m_sym_Ci(_sym_Ci) {}; //! @TODO rm virtual complex_t evaluate_for_q(const cvector_t q ) const final; - double getVolume() const { return volume; } + virtual double getVolume() const final { return m_volume; } + virtual double getRadius() const final { return m_radius; } void assert_platonic() const; +protected: + std::vector<PolyhedralFace> m_faces; + double m_z_origin; + bool m_sym_Ci; //!< if true, then faces obtainable by inversion are not provided + void precompute(); private: - double z_origin; - bool sym_Ci; //!< if true, then faces obtainable by inversion are not provided - double radius; - double volume; + double m_radius; + double m_volume; static const double q_limit_series; - std::vector<PolyhedralFace> faces; - virtual void onChange() final; complex_t evaluate_centered( const cvector_t q ) const; }; diff --git a/Core/FormFactors/FormFactorPyramid.h b/Core/FormFactors/FormFactorPyramid.h index 5b134b35c4fc51f916b87c5ee51b4af9eef51e24..22ec7ad6ba04849a73d64c2d1b5a422f47cdab9c 100644 --- a/Core/FormFactors/FormFactorPyramid.h +++ b/Core/FormFactors/FormFactorPyramid.h @@ -36,10 +36,9 @@ public: virtual FormFactorPyramid* clone() const final; virtual void accept(ISampleVisitor *visitor) const final; - virtual double getRadius() const final; - double getHeight() const; - double getLength() const; - double getAlpha() const; + double getHeight() const { return m_height; } + double getLength() const { return m_length; } + double getAlpha() const { return m_alpha; } private: virtual bool check_initialization() const final; @@ -50,9 +49,4 @@ private: double m_alpha; }; -inline double FormFactorPyramid::getHeight() const { return m_height; } -inline double FormFactorPyramid::getLength() const { return m_length; } -inline double FormFactorPyramid::getAlpha() const { return m_alpha; } -inline double FormFactorPyramid::getRadius() const { return m_length/2.0; } - #endif // FORMFACTORPYRAMID_H diff --git a/Core/FormFactors/FormFactorTetrahedron.cpp b/Core/FormFactors/FormFactorTetrahedron.cpp index fe21ebd4d372bfd0f13dd44937e825c72e22e965..8748050a8fdec091fb1f8356d5abf6b65d25da62 100644 --- a/Core/FormFactors/FormFactorTetrahedron.cpp +++ b/Core/FormFactors/FormFactorTetrahedron.cpp @@ -112,8 +112,3 @@ void FormFactorTetrahedron::accept(ISampleVisitor *visitor) const { visitor->visit(this); } - -double FormFactorTetrahedron::getRadius() const -{ - return m_length / 2; -} diff --git a/Core/FormFactors/FormFactorTetrahedron.h b/Core/FormFactors/FormFactorTetrahedron.h index ace55b2148fe1bc5d69d26f08a858abe2c1971df..6d8c08bb2c29d7c82e6de748003a1909085a1253 100644 --- a/Core/FormFactors/FormFactorTetrahedron.h +++ b/Core/FormFactors/FormFactorTetrahedron.h @@ -38,7 +38,6 @@ public: virtual void accept(ISampleVisitor *visitor) const; - virtual double getRadius() const; double getHeight() const; double getLength() const; double getAlpha() const; diff --git a/Core/FormFactors/FormFactorTruncatedCube.cpp b/Core/FormFactors/FormFactorTruncatedCube.cpp index 2b2f06eacd1942a8f79e2ff5a893bfe0e0527be4..40543aba70ccbe711c012c7267c26bfb49918783 100644 --- a/Core/FormFactors/FormFactorTruncatedCube.cpp +++ b/Core/FormFactors/FormFactorTruncatedCube.cpp @@ -96,11 +96,6 @@ void FormFactorTruncatedCube::accept(ISampleVisitor *visitor) const visitor->visit(this); } -double FormFactorTruncatedCube::getRadius() const -{ - return m_length/2.0; -} - bool FormFactorTruncatedCube::check_initialization() const { bool result(true); diff --git a/Core/FormFactors/FormFactorTruncatedCube.h b/Core/FormFactors/FormFactorTruncatedCube.h index 8caccd4ed3287bbc0227bf1832de4a35d71df7de..2de65cfd1427964c89d7314c563d35b2177d59b6 100644 --- a/Core/FormFactors/FormFactorTruncatedCube.h +++ b/Core/FormFactors/FormFactorTruncatedCube.h @@ -35,9 +35,8 @@ public: virtual FormFactorTruncatedCube *clone() const final; virtual void accept(ISampleVisitor *visitor) const final; - virtual double getRadius() const final; - double getLength() const; - double getRemovedLength() const; + double getLength() const { return m_length; } + double getRemovedLength() const { return m_removed_length; } private: virtual bool check_initialization() const; @@ -47,7 +46,4 @@ private: double m_removed_length; }; -inline double FormFactorTruncatedCube::getLength() const { return m_length; } -inline double FormFactorTruncatedCube::getRemovedLength() const { return m_removed_length; } - #endif // FORMFACTORTRUNCATEDCUBE_H diff --git a/Core/PythonAPI/libBornAgainCore.py b/Core/PythonAPI/libBornAgainCore.py index 8b5280979c2bc275a710fc94151c2eda43683422..4095d379dc4089faa1455634aa3073334849a4ad 100644 --- a/Core/PythonAPI/libBornAgainCore.py +++ b/Core/PythonAPI/libBornAgainCore.py @@ -1936,11 +1936,6 @@ class IParameterized(INamed): return _libBornAgainCore.IParameterized__print(self, ostr) - def init_parameters(self): - """init_parameters(IParameterized self)""" - return _libBornAgainCore.IParameterized_init_parameters(self) - - def registerParameter(self, *args): """ registerParameter(IParameterized self, std::string const & name, double * parpointer, AttLimits limits) @@ -4185,11 +4180,6 @@ class ISample(ICloneable, IParameterized): """_print(ISample self, std::ostream & ostr)""" return _libBornAgainCore.ISample__print(self, ostr) - - def init_parameters(self): - """init_parameters(ISample self)""" - return _libBornAgainCore.ISample_init_parameters(self) - ISample_swigregister = _libBornAgainCore.ISample_swigregister ISample_swigregister(ISample) @@ -4685,11 +4675,6 @@ class ISampleBuilder(IParameterized): """_print(ISampleBuilder self, std::ostream & ostr)""" return _libBornAgainCore.ISampleBuilder__print(self, ostr) - - def init_parameters(self): - """init_parameters(ISampleBuilder self)""" - return _libBornAgainCore.ISampleBuilder_init_parameters(self) - ISampleBuilder_swigregister = _libBornAgainCore.ISampleBuilder_swigregister ISampleBuilder_swigregister(ISampleBuilder) @@ -7715,11 +7700,6 @@ class IFormFactor(ISample): """_print(IFormFactor self, std::ostream & ostr)""" return _libBornAgainCore.IFormFactor__print(self, ostr) - - def init_parameters(self): - """init_parameters(IFormFactor self)""" - return _libBornAgainCore.IFormFactor_init_parameters(self) - IFormFactor_swigregister = _libBornAgainCore.IFormFactor_swigregister IFormFactor_swigregister(IFormFactor) @@ -8046,11 +8026,6 @@ class IFormFactorBorn(IFormFactor): """_print(IFormFactorBorn self, std::ostream & ostr)""" return _libBornAgainCore.IFormFactorBorn__print(self, ostr) - - def init_parameters(self): - """init_parameters(IFormFactorBorn self)""" - return _libBornAgainCore.IFormFactorBorn_init_parameters(self) - IFormFactorBorn_swigregister = _libBornAgainCore.IFormFactorBorn_swigregister IFormFactorBorn_swigregister(IFormFactorBorn) @@ -8223,10 +8198,10 @@ class PolyhedralFace(_object): self.this.append(this) except: self.this = this - __swig_setmethods__["radius_3d"] = _libBornAgainCore.PolyhedralFace_radius_3d_set - __swig_getmethods__["radius_3d"] = _libBornAgainCore.PolyhedralFace_radius_3d_get + __swig_setmethods__["m_radius_3d"] = _libBornAgainCore.PolyhedralFace_m_radius_3d_set + __swig_getmethods__["m_radius_3d"] = _libBornAgainCore.PolyhedralFace_m_radius_3d_get if _newclass: - radius_3d = _swig_property(_libBornAgainCore.PolyhedralFace_radius_3d_get, _libBornAgainCore.PolyhedralFace_radius_3d_set) + m_radius_3d = _swig_property(_libBornAgainCore.PolyhedralFace_m_radius_3d_get, _libBornAgainCore.PolyhedralFace_m_radius_3d_set) def getArea(self): """ @@ -8350,6 +8325,18 @@ class FormFactorPolyhedron(IFormFactorBorn): return _libBornAgainCore.FormFactorPolyhedron_getVolume(self) + def getRadius(self): + """ + getRadius(FormFactorPolyhedron self) -> double + + virtual double IFormFactor::getRadius() const =0 + + Returns the (approximate in some cases) radial size of the particle of this form factor's shape. This is used for SSCA calculations + + """ + return _libBornAgainCore.FormFactorPolyhedron_getRadius(self) + + def assert_platonic(self): """ assert_platonic(FormFactorPolyhedron self) @@ -9458,14 +9445,6 @@ class FormFactorDodecahedron(FormFactorPolyhedron): except: self.this = this - def polyhedral_faces(edge): - """polyhedral_faces(double edge) -> std::vector< PolyhedralFace,std::allocator< PolyhedralFace > >""" - return _libBornAgainCore.FormFactorDodecahedron_polyhedral_faces(edge) - - if _newclass: - polyhedral_faces = staticmethod(polyhedral_faces) - __swig_getmethods__["polyhedral_faces"] = lambda x: polyhedral_faces - def clone(self): """ clone(FormFactorDodecahedron self) -> FormFactorDodecahedron @@ -9490,18 +9469,6 @@ class FormFactorDodecahedron(FormFactorPolyhedron): return _libBornAgainCore.FormFactorDodecahedron_accept(self, visitor) - def getRadius(self): - """ - getRadius(FormFactorDodecahedron self) -> double - - double FormFactorDodecahedron::getRadius() const final - - Returns the (approximate in some cases) radial size of the particle of this form factor's shape. This is used for SSCA calculations - - """ - return _libBornAgainCore.FormFactorDodecahedron_getRadius(self) - - def getEdge(self): """ getEdge(FormFactorDodecahedron self) -> double @@ -9516,10 +9483,6 @@ class FormFactorDodecahedron(FormFactorPolyhedron): FormFactorDodecahedron_swigregister = _libBornAgainCore.FormFactorDodecahedron_swigregister FormFactorDodecahedron_swigregister(FormFactorDodecahedron) -def FormFactorDodecahedron_polyhedral_faces(edge): - """FormFactorDodecahedron_polyhedral_faces(double edge) -> std::vector< PolyhedralFace,std::allocator< PolyhedralFace > >""" - return _libBornAgainCore.FormFactorDodecahedron_polyhedral_faces(edge) - class FormFactorEllipsoidalCylinder(IFormFactorBorn): """ diff --git a/Core/PythonAPI/libBornAgainCore_wrap.cxx b/Core/PythonAPI/libBornAgainCore_wrap.cxx index 2573f5bfb0245b51ea03f9338c5f11c2909420da..c77f00fa7d141246f83107df7b159505208f888e 100644 --- a/Core/PythonAPI/libBornAgainCore_wrap.cxx +++ b/Core/PythonAPI/libBornAgainCore_wrap.cxx @@ -7088,29 +7088,6 @@ void SwigDirector_IParameterized::print(std::ostream &ostr) const { } -void SwigDirector_IParameterized::init_parameters() { - swig_set_inner("init_parameters", true); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IParameterized.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 2; - const char * const swig_method_name = "init_parameters"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "init_parameters", NULL); -#endif - swig_set_inner("init_parameters", false); - if (!result) { - PyObject *error = PyErr_Occurred(); - if (error) { - Swig::DirectorMethodException::raise("Error detected when calling 'IParameterized.init_parameters'"); - } - } -} - - SwigDirector_ISample::SwigDirector_ISample(PyObject *self): ISample(), Swig::Director(self) { SWIG_DIRECTOR_RGTR((ISample *)this, this); } @@ -7228,29 +7205,6 @@ void SwigDirector_ISample::print(std::ostream &ostr) const { } -void SwigDirector_ISample::init_parameters() { - swig_set_inner("init_parameters", true); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 4; - const char * const swig_method_name = "init_parameters"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "init_parameters", NULL); -#endif - swig_set_inner("init_parameters", false); - if (!result) { - PyObject *error = PyErr_Occurred(); - if (error) { - Swig::DirectorMethodException::raise("Error detected when calling 'ISample.init_parameters'"); - } - } -} - - ISample *SwigDirector_ISample::cloneInvertB() const { void *swig_argp ; int swig_res ; @@ -7261,7 +7215,7 @@ ISample *SwigDirector_ISample::cloneInvertB() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 5; + const size_t swig_method_index = 4; const char * const swig_method_name = "cloneInvertB"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7291,7 +7245,7 @@ void SwigDirector_ISample::accept(ISampleVisitor *p_visitor) const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 6; + const size_t swig_method_index = 5; const char * const swig_method_name = "accept"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -7317,7 +7271,7 @@ DWBASimulation *SwigDirector_ISample::createDWBASimulation() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 7; + const size_t swig_method_index = 6; const char * const swig_method_name = "createDWBASimulation"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7345,7 +7299,7 @@ void SwigDirector_ISample::printSampleTree() { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 8; + const size_t swig_method_index = 7; const char * const swig_method_name = "printSampleTree"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7367,7 +7321,7 @@ bool SwigDirector_ISample::containsMagneticMaterial() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 9; + const size_t swig_method_index = 8; const char * const swig_method_name = "containsMagneticMaterial"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7399,7 +7353,7 @@ std::vector< ISample const *,std::allocator< ISample const * > > SwigDirector_IS Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 10; + const size_t swig_method_index = 9; const char * const swig_method_name = "getChildren"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7428,7 +7382,7 @@ size_t SwigDirector_ISample::size() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 11; + const size_t swig_method_index = 10; const char * const swig_method_name = "size"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7514,29 +7468,6 @@ void SwigDirector_ISampleBuilder::print(std::ostream &ostr) const { } -void SwigDirector_ISampleBuilder::init_parameters() { - swig_set_inner("init_parameters", true); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISampleBuilder.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 2; - const char * const swig_method_name = "init_parameters"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "init_parameters", NULL); -#endif - swig_set_inner("init_parameters", false); - if (!result) { - PyObject *error = PyErr_Occurred(); - if (error) { - Swig::DirectorMethodException::raise("Error detected when calling 'ISampleBuilder.init_parameters'"); - } - } -} - - ISample *SwigDirector_ISampleBuilder::buildSample() const { void *swig_argp ; int swig_res ; @@ -7547,7 +7478,7 @@ ISample *SwigDirector_ISampleBuilder::buildSample() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISampleBuilder.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 3; + const size_t swig_method_index = 2; const char * const swig_method_name = "buildSample"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7577,7 +7508,7 @@ void SwigDirector_ISampleBuilder::init_from(IComponentService const *arg0) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISampleBuilder.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 4; + const size_t swig_method_index = 3; const char * const swig_method_name = "init_from"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -7710,29 +7641,6 @@ void SwigDirector_IFormFactor::print(std::ostream &ostr) const { } -void SwigDirector_IFormFactor::init_parameters() { - swig_set_inner("init_parameters", true); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 4; - const char * const swig_method_name = "init_parameters"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "init_parameters", NULL); -#endif - swig_set_inner("init_parameters", false); - if (!result) { - PyObject *error = PyErr_Occurred(); - if (error) { - Swig::DirectorMethodException::raise("Error detected when calling 'IFormFactor.init_parameters'"); - } - } -} - - ISample *SwigDirector_IFormFactor::cloneInvertB() const { void *swig_argp ; int swig_res ; @@ -7743,7 +7651,7 @@ ISample *SwigDirector_IFormFactor::cloneInvertB() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 5; + const size_t swig_method_index = 4; const char * const swig_method_name = "cloneInvertB"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7773,7 +7681,7 @@ void SwigDirector_IFormFactor::accept(ISampleVisitor *visitor) const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 6; + const size_t swig_method_index = 5; const char * const swig_method_name = "accept"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -7799,7 +7707,7 @@ DWBASimulation *SwigDirector_IFormFactor::createDWBASimulation() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 7; + const size_t swig_method_index = 6; const char * const swig_method_name = "createDWBASimulation"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7827,7 +7735,7 @@ void SwigDirector_IFormFactor::printSampleTree() { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 8; + const size_t swig_method_index = 7; const char * const swig_method_name = "printSampleTree"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7849,7 +7757,7 @@ bool SwigDirector_IFormFactor::containsMagneticMaterial() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 9; + const size_t swig_method_index = 8; const char * const swig_method_name = "containsMagneticMaterial"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7878,7 +7786,7 @@ std::vector< ISample const *,std::allocator< ISample const * > > SwigDirector_IF Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 10; + const size_t swig_method_index = 9; const char * const swig_method_name = "getChildren"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7908,7 +7816,7 @@ size_t SwigDirector_IFormFactor::size() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 11; + const size_t swig_method_index = 10; const char * const swig_method_name = "size"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -7938,7 +7846,7 @@ void SwigDirector_IFormFactor::setAmbientMaterial(IMaterial const &arg0) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 12; + const size_t swig_method_index = 11; const char * const swig_method_name = "setAmbientMaterial"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -7962,7 +7870,7 @@ complex_t SwigDirector_IFormFactor::evaluate(WavevectorInfo const &wavevectors) Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 13; + const size_t swig_method_index = 12; const char * const swig_method_name = "evaluate"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -7991,7 +7899,7 @@ double SwigDirector_IFormFactor::getVolume() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 14; + const size_t swig_method_index = 13; const char * const swig_method_name = "getVolume"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8020,7 +7928,7 @@ double SwigDirector_IFormFactor::getRadius() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 15; + const size_t swig_method_index = 14; const char * const swig_method_name = "getRadius"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8052,7 +7960,7 @@ void SwigDirector_IFormFactor::setSpecularInfo(ILayerRTCoefficients const *p_in_ Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 16; + const size_t swig_method_index = 15; const char * const swig_method_name = "setSpecularInfo"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(OO)" ,(PyObject *)obj0,(PyObject *)obj1); @@ -8185,29 +8093,6 @@ void SwigDirector_IFormFactorBorn::print(std::ostream &ostr) const { } -void SwigDirector_IFormFactorBorn::init_parameters() { - swig_set_inner("init_parameters", true); - if (!swig_get_self()) { - Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); - } -#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 4; - const char * const swig_method_name = "init_parameters"; - PyObject* method = swig_get_method(swig_method_index, swig_method_name); - swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); -#else - swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "init_parameters", NULL); -#endif - swig_set_inner("init_parameters", false); - if (!result) { - PyObject *error = PyErr_Occurred(); - if (error) { - Swig::DirectorMethodException::raise("Error detected when calling 'IFormFactorBorn.init_parameters'"); - } - } -} - - ISample *SwigDirector_IFormFactorBorn::cloneInvertB() const { void *swig_argp ; int swig_res ; @@ -8218,7 +8103,7 @@ ISample *SwigDirector_IFormFactorBorn::cloneInvertB() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 5; + const size_t swig_method_index = 4; const char * const swig_method_name = "cloneInvertB"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8248,7 +8133,7 @@ void SwigDirector_IFormFactorBorn::accept(ISampleVisitor *visitor) const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 6; + const size_t swig_method_index = 5; const char * const swig_method_name = "accept"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -8274,7 +8159,7 @@ DWBASimulation *SwigDirector_IFormFactorBorn::createDWBASimulation() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 7; + const size_t swig_method_index = 6; const char * const swig_method_name = "createDWBASimulation"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8302,7 +8187,7 @@ void SwigDirector_IFormFactorBorn::printSampleTree() { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 8; + const size_t swig_method_index = 7; const char * const swig_method_name = "printSampleTree"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8324,7 +8209,7 @@ bool SwigDirector_IFormFactorBorn::containsMagneticMaterial() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 9; + const size_t swig_method_index = 8; const char * const swig_method_name = "containsMagneticMaterial"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8353,7 +8238,7 @@ std::vector< ISample const *,std::allocator< ISample const * > > SwigDirector_IF Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 10; + const size_t swig_method_index = 9; const char * const swig_method_name = "getChildren"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8383,7 +8268,7 @@ size_t SwigDirector_IFormFactorBorn::size() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 11; + const size_t swig_method_index = 10; const char * const swig_method_name = "size"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8413,7 +8298,7 @@ void SwigDirector_IFormFactorBorn::setAmbientMaterial(IMaterial const &arg0) { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 12; + const size_t swig_method_index = 11; const char * const swig_method_name = "setAmbientMaterial"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -8437,7 +8322,7 @@ complex_t SwigDirector_IFormFactorBorn::evaluate(WavevectorInfo const &wavevecto Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 13; + const size_t swig_method_index = 12; const char * const swig_method_name = "evaluate"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -8466,7 +8351,7 @@ double SwigDirector_IFormFactorBorn::getVolume() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 14; + const size_t swig_method_index = 13; const char * const swig_method_name = "getVolume"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8495,7 +8380,7 @@ double SwigDirector_IFormFactorBorn::getRadius() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 15; + const size_t swig_method_index = 14; const char * const swig_method_name = "getRadius"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -8527,7 +8412,7 @@ void SwigDirector_IFormFactorBorn::setSpecularInfo(ILayerRTCoefficients const *p Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 16; + const size_t swig_method_index = 15; const char * const swig_method_name = "setSpecularInfo"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(OO)" ,(PyObject *)obj0,(PyObject *)obj1); @@ -8551,7 +8436,7 @@ complex_t SwigDirector_IFormFactorBorn::evaluate_for_q(cvector_t const q) const Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 17; + const size_t swig_method_index = 16; const char * const swig_method_name = "evaluate_for_q"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); @@ -8581,7 +8466,7 @@ bool SwigDirector_IFormFactorBorn::check_initialization() const { Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__."); } #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) - const size_t swig_method_index = 18; + const size_t swig_method_index = 17; const char * const swig_method_name = "check_initialization"; PyObject* method = swig_get_method(swig_method_index, swig_method_name); swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL); @@ -22409,45 +22294,6 @@ fail: } -SWIGINTERN PyObject *_wrap_IParameterized_init_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IParameterized *arg1 = (IParameterized *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - SwigDirector_IParameterized *darg = 0; - - if (!PyArg_ParseTuple(args,(char *)"O:IParameterized_init_parameters",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IParameterized, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IParameterized_init_parameters" "', argument " "1"" of type '" "IParameterized *""'"); - } - arg1 = reinterpret_cast< IParameterized * >(argp1); - director = SWIG_DIRECTOR_CAST(arg1); - if (!director || !(director->swig_get_inner("init_parameters"))) { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing protected member init_parameters"); - SWIG_fail; - } - upcall = (director && (director->swig_get_self()==obj0)); - try { - darg = dynamic_cast<SwigDirector_IParameterized *>(arg1); - if (upcall) { - (darg)->init_parametersSwigPublic(); - } else { - (darg)->init_parameters(); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_IParameterized_registerParameter__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IParameterized *arg1 = (IParameterized *) 0 ; @@ -31947,45 +31793,6 @@ fail: } -SWIGINTERN PyObject *_wrap_ISample_init_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ISample *arg1 = (ISample *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - SwigDirector_ISample *darg = 0; - - if (!PyArg_ParseTuple(args,(char *)"O:ISample_init_parameters",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ISample, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISample_init_parameters" "', argument " "1"" of type '" "ISample *""'"); - } - arg1 = reinterpret_cast< ISample * >(argp1); - director = SWIG_DIRECTOR_CAST(arg1); - if (!director || !(director->swig_get_inner("init_parameters"))) { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing protected member init_parameters"); - SWIG_fail; - } - upcall = (director && (director->swig_get_self()==obj0)); - try { - darg = dynamic_cast<SwigDirector_ISample *>(arg1); - if (upcall) { - (darg)->init_parametersSwigPublic(); - } else { - (darg)->init_parameters(); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *ISample_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -36347,57 +36154,6 @@ fail: } -SWIGINTERN PyObject *_wrap_ISampleBuilder_init_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ISampleBuilder *arg1 = (ISampleBuilder *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::shared_ptr< ISampleBuilder > tempshared1 ; - std::shared_ptr< ISampleBuilder > *smartarg1 = 0 ; - PyObject * obj0 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - SwigDirector_ISampleBuilder *darg = 0; - - if (!PyArg_ParseTuple(args,(char *)"O:ISampleBuilder_init_parameters",&obj0)) SWIG_fail; - { - int newmem = 0; - res1 = SWIG_ConvertPtrAndOwn(obj0, &argp1, SWIGTYPE_p_std__shared_ptrT_ISampleBuilder_t, 0 | 0 , &newmem); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISampleBuilder_init_parameters" "', argument " "1"" of type '" "ISampleBuilder *""'"); - } - if (newmem & SWIG_CAST_NEW_MEMORY) { - tempshared1 = *reinterpret_cast< std::shared_ptr< ISampleBuilder > * >(argp1); - delete reinterpret_cast< std::shared_ptr< ISampleBuilder > * >(argp1); - arg1 = const_cast< ISampleBuilder * >(tempshared1.get()); - } else { - smartarg1 = reinterpret_cast< std::shared_ptr< ISampleBuilder > * >(argp1); - arg1 = const_cast< ISampleBuilder * >((smartarg1 ? smartarg1->get() : 0)); - } - } - director = SWIG_DIRECTOR_CAST(arg1); - if (!director || !(director->swig_get_inner("init_parameters"))) { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing protected member init_parameters"); - SWIG_fail; - } - upcall = (director && (director->swig_get_self()==obj0)); - try { - darg = dynamic_cast<SwigDirector_ISampleBuilder *>(arg1); - if (upcall) { - (darg)->init_parametersSwigPublic(); - } else { - (darg)->init_parameters(); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *ISampleBuilder_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -47273,45 +47029,6 @@ fail: } -SWIGINTERN PyObject *_wrap_IFormFactor_init_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IFormFactor *arg1 = (IFormFactor *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - SwigDirector_IFormFactor *darg = 0; - - if (!PyArg_ParseTuple(args,(char *)"O:IFormFactor_init_parameters",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IFormFactor, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactor_init_parameters" "', argument " "1"" of type '" "IFormFactor *""'"); - } - arg1 = reinterpret_cast< IFormFactor * >(argp1); - director = SWIG_DIRECTOR_CAST(arg1); - if (!director || !(director->swig_get_inner("init_parameters"))) { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing protected member init_parameters"); - SWIG_fail; - } - upcall = (director && (director->swig_get_self()==obj0)); - try { - darg = dynamic_cast<SwigDirector_IFormFactor *>(arg1); - if (upcall) { - (darg)->init_parametersSwigPublic(); - } else { - (darg)->init_parameters(); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *IFormFactor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -49594,45 +49311,6 @@ fail: } -SWIGINTERN PyObject *_wrap_IFormFactorBorn_init_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IFormFactorBorn *arg1 = (IFormFactorBorn *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - Swig::Director *director = 0; - bool upcall = false; - SwigDirector_IFormFactorBorn *darg = 0; - - if (!PyArg_ParseTuple(args,(char *)"O:IFormFactorBorn_init_parameters",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IFormFactorBorn, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactorBorn_init_parameters" "', argument " "1"" of type '" "IFormFactorBorn *""'"); - } - arg1 = reinterpret_cast< IFormFactorBorn * >(argp1); - director = SWIG_DIRECTOR_CAST(arg1); - if (!director || !(director->swig_get_inner("init_parameters"))) { - SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing protected member init_parameters"); - SWIG_fail; - } - upcall = (director && (director->swig_get_self()==obj0)); - try { - darg = dynamic_cast<SwigDirector_IFormFactorBorn *>(arg1); - if (upcall) { - (darg)->init_parametersSwigPublic(); - } else { - (darg)->init_parameters(); - } - } catch (Swig::DirectorException&) { - SWIG_fail; - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *IFormFactorBorn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -50169,7 +49847,7 @@ fail: } -SWIGINTERN PyObject *_wrap_PolyhedralFace_radius_3d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_PolyhedralFace_m_radius_3d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PolyhedralFace *arg1 = (PolyhedralFace *) 0 ; double arg2 ; @@ -50180,18 +49858,18 @@ SWIGINTERN PyObject *_wrap_PolyhedralFace_radius_3d_set(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:PolyhedralFace_radius_3d_set",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:PolyhedralFace_m_radius_3d_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PolyhedralFace, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolyhedralFace_radius_3d_set" "', argument " "1"" of type '" "PolyhedralFace *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolyhedralFace_m_radius_3d_set" "', argument " "1"" of type '" "PolyhedralFace *""'"); } arg1 = reinterpret_cast< PolyhedralFace * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolyhedralFace_radius_3d_set" "', argument " "2"" of type '" "double""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolyhedralFace_m_radius_3d_set" "', argument " "2"" of type '" "double""'"); } arg2 = static_cast< double >(val2); - if (arg1) (arg1)->radius_3d = arg2; + if (arg1) (arg1)->m_radius_3d = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -50199,7 +49877,7 @@ fail: } -SWIGINTERN PyObject *_wrap_PolyhedralFace_radius_3d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_PolyhedralFace_m_radius_3d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PolyhedralFace *arg1 = (PolyhedralFace *) 0 ; void *argp1 = 0 ; @@ -50207,13 +49885,13 @@ SWIGINTERN PyObject *_wrap_PolyhedralFace_radius_3d_get(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; double result; - if (!PyArg_ParseTuple(args,(char *)"O:PolyhedralFace_radius_3d_get",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:PolyhedralFace_m_radius_3d_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PolyhedralFace, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolyhedralFace_radius_3d_get" "', argument " "1"" of type '" "PolyhedralFace *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolyhedralFace_m_radius_3d_get" "', argument " "1"" of type '" "PolyhedralFace *""'"); } arg1 = reinterpret_cast< PolyhedralFace * >(argp1); - result = (double) ((arg1)->radius_3d); + result = (double) ((arg1)->m_radius_3d); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -50522,6 +50200,28 @@ fail: } +SWIGINTERN PyObject *_wrap_FormFactorPolyhedron_getRadius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FormFactorPolyhedron *arg1 = (FormFactorPolyhedron *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + double result; + + if (!PyArg_ParseTuple(args,(char *)"O:FormFactorPolyhedron_getRadius",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FormFactorPolyhedron, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FormFactorPolyhedron_getRadius" "', argument " "1"" of type '" "FormFactorPolyhedron const *""'"); + } + arg1 = reinterpret_cast< FormFactorPolyhedron * >(argp1); + result = (double)((FormFactorPolyhedron const *)arg1)->getRadius(); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_FormFactorPolyhedron_assert_platonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FormFactorPolyhedron *arg1 = (FormFactorPolyhedron *) 0 ; @@ -52655,28 +52355,6 @@ fail: } -SWIGINTERN PyObject *_wrap_FormFactorDodecahedron_polyhedral_faces(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< std::vector< PolyhedralFace,std::allocator< PolyhedralFace > > > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FormFactorDodecahedron_polyhedral_faces",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "FormFactorDodecahedron_polyhedral_faces" "', argument " "1"" of type '" "double""'"); - } - arg1 = static_cast< double >(val1); - result = FormFactorDodecahedron::polyhedral_faces(arg1); - resultobj = SWIG_NewPointerObj((new std::vector< PolyhedralFace,std::allocator< PolyhedralFace > >(static_cast< const std::vector< PolyhedralFace,std::allocator< PolyhedralFace > >& >(result))), SWIGTYPE_p_std__vectorT_PolyhedralFace_std__allocatorT_PolyhedralFace_t_t, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_FormFactorDodecahedron_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FormFactorDodecahedron *arg1 = (FormFactorDodecahedron *) 0 ; @@ -52729,28 +52407,6 @@ fail: } -SWIGINTERN PyObject *_wrap_FormFactorDodecahedron_getRadius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FormFactorDodecahedron *arg1 = (FormFactorDodecahedron *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:FormFactorDodecahedron_getRadius",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FormFactorDodecahedron, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FormFactorDodecahedron_getRadius" "', argument " "1"" of type '" "FormFactorDodecahedron const *""'"); - } - arg1 = reinterpret_cast< FormFactorDodecahedron * >(argp1); - result = (double)((FormFactorDodecahedron const *)arg1)->getRadius(); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_FormFactorDodecahedron_getEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FormFactorDodecahedron *arg1 = (FormFactorDodecahedron *) 0 ; @@ -90892,7 +90548,6 @@ static PyMethodDef SwigMethods[] = { ""}, { (char *)"IParameterized_onChange", _wrap_IParameterized_onChange, METH_VARARGS, (char *)"IParameterized_onChange(IParameterized self)"}, { (char *)"IParameterized__print", _wrap_IParameterized__print, METH_VARARGS, (char *)"IParameterized__print(IParameterized self, std::ostream & ostr)"}, - { (char *)"IParameterized_init_parameters", _wrap_IParameterized_init_parameters, METH_VARARGS, (char *)"IParameterized_init_parameters(IParameterized self)"}, { (char *)"IParameterized_registerParameter", _wrap_IParameterized_registerParameter, METH_VARARGS, (char *)"\n" "registerParameter(std::string const & name, double * parpointer, AttLimits limits)\n" "registerParameter(std::string const & name, double * parpointer)\n" @@ -92022,7 +91677,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"disown_ISample", _wrap_disown_ISample, METH_VARARGS, NULL}, { (char *)"ISample_onChange", _wrap_ISample_onChange, METH_VARARGS, (char *)"ISample_onChange(ISample self)"}, { (char *)"ISample__print", _wrap_ISample__print, METH_VARARGS, (char *)"ISample__print(ISample self, std::ostream & ostr)"}, - { (char *)"ISample_init_parameters", _wrap_ISample_init_parameters, METH_VARARGS, (char *)"ISample_init_parameters(ISample self)"}, { (char *)"ISample_swigregister", ISample_swigregister, METH_VARARGS, NULL}, { (char *)"swig_dummy_type_isample_vector_iterator", _wrap_swig_dummy_type_isample_vector_iterator, METH_VARARGS, (char *)"swig_dummy_type_isample_vector_iterator(swig_dummy_type_isample_vector self) -> SwigPyIterator"}, { (char *)"swig_dummy_type_isample_vector___nonzero__", _wrap_swig_dummy_type_isample_vector___nonzero__, METH_VARARGS, (char *)"swig_dummy_type_isample_vector___nonzero__(swig_dummy_type_isample_vector self) -> bool"}, @@ -92178,7 +91832,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"disown_ISampleBuilder", _wrap_disown_ISampleBuilder, METH_VARARGS, NULL}, { (char *)"ISampleBuilder_onChange", _wrap_ISampleBuilder_onChange, METH_VARARGS, (char *)"ISampleBuilder_onChange(ISampleBuilder self)"}, { (char *)"ISampleBuilder__print", _wrap_ISampleBuilder__print, METH_VARARGS, (char *)"ISampleBuilder__print(ISampleBuilder self, std::ostream & ostr)"}, - { (char *)"ISampleBuilder_init_parameters", _wrap_ISampleBuilder_init_parameters, METH_VARARGS, (char *)"ISampleBuilder_init_parameters(ISampleBuilder self)"}, { (char *)"ISampleBuilder_swigregister", ISampleBuilder_swigregister, METH_VARARGS, NULL}, { (char *)"new_ISampleVisitor", _wrap_new_ISampleVisitor, METH_VARARGS, (char *)"\n" "new_ISampleVisitor() -> ISampleVisitor\n" @@ -93815,7 +93468,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"disown_IFormFactor", _wrap_disown_IFormFactor, METH_VARARGS, NULL}, { (char *)"IFormFactor_onChange", _wrap_IFormFactor_onChange, METH_VARARGS, (char *)"IFormFactor_onChange(IFormFactor self)"}, { (char *)"IFormFactor__print", _wrap_IFormFactor__print, METH_VARARGS, (char *)"IFormFactor__print(IFormFactor self, std::ostream & ostr)"}, - { (char *)"IFormFactor_init_parameters", _wrap_IFormFactor_init_parameters, METH_VARARGS, (char *)"IFormFactor_init_parameters(IFormFactor self)"}, { (char *)"IFormFactor_swigregister", IFormFactor_swigregister, METH_VARARGS, NULL}, { (char *)"vector_IFormFactorPtr_t_iterator", _wrap_vector_IFormFactorPtr_t_iterator, METH_VARARGS, (char *)"vector_IFormFactorPtr_t_iterator(vector_IFormFactorPtr_t self) -> SwigPyIterator"}, { (char *)"vector_IFormFactorPtr_t___nonzero__", _wrap_vector_IFormFactorPtr_t___nonzero__, METH_VARARGS, (char *)"vector_IFormFactorPtr_t___nonzero__(vector_IFormFactorPtr_t self) -> bool"}, @@ -93941,7 +93593,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"disown_IFormFactorBorn", _wrap_disown_IFormFactorBorn, METH_VARARGS, NULL}, { (char *)"IFormFactorBorn_onChange", _wrap_IFormFactorBorn_onChange, METH_VARARGS, (char *)"IFormFactorBorn_onChange(IFormFactorBorn self)"}, { (char *)"IFormFactorBorn__print", _wrap_IFormFactorBorn__print, METH_VARARGS, (char *)"IFormFactorBorn__print(IFormFactorBorn self, std::ostream & ostr)"}, - { (char *)"IFormFactorBorn_init_parameters", _wrap_IFormFactorBorn_init_parameters, METH_VARARGS, (char *)"IFormFactorBorn_init_parameters(IFormFactorBorn self)"}, { (char *)"IFormFactorBorn_swigregister", IFormFactorBorn_swigregister, METH_VARARGS, NULL}, { (char *)"delete_IFormFactorDecorator", _wrap_delete_IFormFactorDecorator, METH_VARARGS, (char *)"\n" "delete_IFormFactorDecorator(IFormFactorDecorator self)\n" @@ -94020,8 +93671,8 @@ static PyMethodDef SwigMethods[] = { "Sets internal variables for given vertex chain. \n" "\n" ""}, - { (char *)"PolyhedralFace_radius_3d_set", _wrap_PolyhedralFace_radius_3d_set, METH_VARARGS, (char *)"PolyhedralFace_radius_3d_set(PolyhedralFace self, double radius_3d)"}, - { (char *)"PolyhedralFace_radius_3d_get", _wrap_PolyhedralFace_radius_3d_get, METH_VARARGS, (char *)"PolyhedralFace_radius_3d_get(PolyhedralFace self) -> double"}, + { (char *)"PolyhedralFace_m_radius_3d_set", _wrap_PolyhedralFace_m_radius_3d_set, METH_VARARGS, (char *)"PolyhedralFace_m_radius_3d_set(PolyhedralFace self, double m_radius_3d)"}, + { (char *)"PolyhedralFace_m_radius_3d_get", _wrap_PolyhedralFace_m_radius_3d_get, METH_VARARGS, (char *)"PolyhedralFace_m_radius_3d_get(PolyhedralFace self) -> double"}, { (char *)"PolyhedralFace_getArea", _wrap_PolyhedralFace_getArea, METH_VARARGS, (char *)"\n" "PolyhedralFace_getArea(PolyhedralFace self) -> double\n" "\n" @@ -94088,6 +93739,14 @@ static PyMethodDef SwigMethods[] = { "Returns the total volume of the particle of this form factor's shape. \n" "\n" ""}, + { (char *)"FormFactorPolyhedron_getRadius", _wrap_FormFactorPolyhedron_getRadius, METH_VARARGS, (char *)"\n" + "FormFactorPolyhedron_getRadius(FormFactorPolyhedron self) -> double\n" + "\n" + "virtual double IFormFactor::getRadius() const =0\n" + "\n" + "Returns the (approximate in some cases) radial size of the particle of this form factor's shape. This is used for SSCA calculations \n" + "\n" + ""}, { (char *)"FormFactorPolyhedron_assert_platonic", _wrap_FormFactorPolyhedron_assert_platonic, METH_VARARGS, (char *)"\n" "FormFactorPolyhedron_assert_platonic(FormFactorPolyhedron self)\n" "\n" @@ -94722,7 +94381,6 @@ static PyMethodDef SwigMethods[] = { "length \n" "\n" ""}, - { (char *)"FormFactorDodecahedron_polyhedral_faces", _wrap_FormFactorDodecahedron_polyhedral_faces, METH_VARARGS, (char *)"FormFactorDodecahedron_polyhedral_faces(double edge) -> std::vector< PolyhedralFace,std::allocator< PolyhedralFace > >"}, { (char *)"FormFactorDodecahedron_clone", _wrap_FormFactorDodecahedron_clone, METH_VARARGS, (char *)"\n" "FormFactorDodecahedron_clone(FormFactorDodecahedron self) -> FormFactorDodecahedron\n" "\n" @@ -94739,14 +94397,6 @@ static PyMethodDef SwigMethods[] = { "Calls the ISampleVisitor's visit method. \n" "\n" ""}, - { (char *)"FormFactorDodecahedron_getRadius", _wrap_FormFactorDodecahedron_getRadius, METH_VARARGS, (char *)"\n" - "FormFactorDodecahedron_getRadius(FormFactorDodecahedron self) -> double\n" - "\n" - "double FormFactorDodecahedron::getRadius() const final\n" - "\n" - "Returns the (approximate in some cases) radial size of the particle of this form factor's shape. This is used for SSCA calculations \n" - "\n" - ""}, { (char *)"FormFactorDodecahedron_getEdge", _wrap_FormFactorDodecahedron_getEdge, METH_VARARGS, (char *)"\n" "FormFactorDodecahedron_getEdge(FormFactorDodecahedron self) -> double\n" "\n" diff --git a/Core/PythonAPI/libBornAgainCore_wrap.h b/Core/PythonAPI/libBornAgainCore_wrap.h index 987be42b5356748e69f9216f388bf841f9862c1a..c1e9aaeff5ad209743b513e2f2f4226bdc04d3ce 100644 --- a/Core/PythonAPI/libBornAgainCore_wrap.h +++ b/Core/PythonAPI/libBornAgainCore_wrap.h @@ -52,10 +52,6 @@ public: virtual void printSwigPublic(std::ostream &ostr) const { IParameterized::print(ostr); } - virtual void init_parameters(); - virtual void init_parametersSwigPublic() { - IParameterized::init_parameters(); - } /* Internal director utilities */ public: @@ -86,7 +82,7 @@ private: return method; } private: - mutable swig::SwigVar_PyObject vtable[3]; + mutable swig::SwigVar_PyObject vtable[2]; #endif }; @@ -108,10 +104,6 @@ public: virtual void printSwigPublic(std::ostream &ostr) const { IParameterized::print(ostr); } - virtual void init_parameters(); - virtual void init_parametersSwigPublic() { - IParameterized::init_parameters(); - } virtual ISample *cloneInvertB() const; virtual void accept(ISampleVisitor *p_visitor) const; virtual DWBASimulation *createDWBASimulation() const; @@ -149,7 +141,7 @@ private: return method; } private: - mutable swig::SwigVar_PyObject vtable[12]; + mutable swig::SwigVar_PyObject vtable[11]; #endif }; @@ -169,10 +161,6 @@ public: virtual void printSwigPublic(std::ostream &ostr) const { IParameterized::print(ostr); } - virtual void init_parameters(); - virtual void init_parametersSwigPublic() { - IParameterized::init_parameters(); - } virtual ISample *buildSample() const; virtual void init_from(IComponentService const *arg0); @@ -205,7 +193,7 @@ private: return method; } private: - mutable swig::SwigVar_PyObject vtable[5]; + mutable swig::SwigVar_PyObject vtable[4]; #endif }; @@ -227,10 +215,6 @@ public: virtual void printSwigPublic(std::ostream &ostr) const { IParameterized::print(ostr); } - virtual void init_parameters(); - virtual void init_parametersSwigPublic() { - IParameterized::init_parameters(); - } virtual ISample *cloneInvertB() const; virtual void accept(ISampleVisitor *visitor) const; virtual DWBASimulation *createDWBASimulation() const; @@ -273,7 +257,7 @@ private: return method; } private: - mutable swig::SwigVar_PyObject vtable[17]; + mutable swig::SwigVar_PyObject vtable[16]; #endif }; @@ -295,10 +279,6 @@ public: virtual void printSwigPublic(std::ostream &ostr) const { IParameterized::print(ostr); } - virtual void init_parameters(); - virtual void init_parametersSwigPublic() { - IParameterized::init_parameters(); - } virtual ISample *cloneInvertB() const; virtual void accept(ISampleVisitor *visitor) const; virtual DWBASimulation *createDWBASimulation() const; @@ -346,7 +326,7 @@ private: return method; } private: - mutable swig::SwigVar_PyObject vtable[19]; + mutable swig::SwigVar_PyObject vtable[18]; #endif }; diff --git a/Core/Tools/IParameterized.cpp b/Core/Tools/IParameterized.cpp index 62bc2a497c0bc59cbc765fba30afa1e2fa6d0e3a..9fa3465a3788355453a9c19f9dbdfa7b0413e11b 100644 --- a/Core/Tools/IParameterized.cpp +++ b/Core/Tools/IParameterized.cpp @@ -3,7 +3,7 @@ // BornAgain: simulate and fit scattering at grazing incidence // //! @file Tools/IParameterized.cpp -//! @brief Implements class IParameterized. +//! @brief Implements classes IParameterized and ParameterPattern. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -75,17 +75,12 @@ void IParameterized::printParameters() /* TODO restore const */ std::cout << *P_pool << std::endl; } -void IParameterized::init_parameters() -{ - throw NotImplementedException("IParameterized::init_parameters() -> " - "Error! Method is not implemented"); -} - void IParameterized::print(std::ostream& ostr) const { ostr << "IParameterized:" << getName() << " " << m_parameters; } + ParameterPattern::ParameterPattern() : m_pattern { } { diff --git a/Core/Tools/IParameterized.h b/Core/Tools/IParameterized.h index a60fd850904185d717488a39dd30f2a1824bdec3..12889b85fd4c64b5af3d056113be92658e7bd8bc 100644 --- a/Core/Tools/IParameterized.h +++ b/Core/Tools/IParameterized.h @@ -67,10 +67,6 @@ protected: //! default implementation prints "IParameterized:" and the parameter pool virtual void print(std::ostream& ostr) const; - //! Registers class parameters in the parameter pool - //! Needs to be implemented by subclasses. - virtual void init_parameters(); - ParameterPool m_parameters; //!< parameter pool friend ParameterPool; }; diff --git a/Fit/FitKernel/FitSuiteObjects.cpp b/Fit/FitKernel/FitSuiteObjects.cpp index 8773e482907ed81af6d30d589fa47e3d98846b62..2933fcf776ea427379bbe07fe2f14392544a6554 100644 --- a/Fit/FitKernel/FitSuiteObjects.cpp +++ b/Fit/FitKernel/FitSuiteObjects.cpp @@ -30,7 +30,6 @@ FitSuiteObjects::FitSuiteObjects() FitSuiteObjects::~FitSuiteObjects() { - } void FitSuiteObjects::add(const GISASSimulation& simulation, const OutputData<double >& real_data, @@ -167,11 +166,6 @@ void FitSuiteObjects::clear() m_fit_elements.clear(); } -void FitSuiteObjects::init_parameters() -{ - -} - double FitSuiteObjects::calculateChiSquaredValue() { m_chi2_module->processFitElements(m_fit_elements.begin(), m_fit_elements.end()); @@ -196,6 +190,3 @@ size_t FitSuiteObjects::check_index(size_t index) const return index < m_fit_objects.size() ? index : throw OutOfBoundsException("FitSuiteKit::check() -> Index outside of range"); } - - - diff --git a/Fit/FitKernel/FitSuiteObjects.h b/Fit/FitKernel/FitSuiteObjects.h index a4a5149b40236e50915918f2275e7d46f3715102..edc68e5f121bdba4ee0df740a99bc40232927074 100644 --- a/Fit/FitKernel/FitSuiteObjects.h +++ b/Fit/FitKernel/FitSuiteObjects.h @@ -30,10 +30,10 @@ class IChiSquaredModule; //! @ingroup fitting_internal //! @brief The class containing vector of FitObject (simulation and real data) to fit -class BA_CORE_API_ FitSuiteObjects : public IParameterized +class BA_CORE_API_ FitSuiteObjects : public IParameterized { public: - typedef SafePointerVector<FitObject > FitObjects_t; + typedef SafePointerVector<FitObject> FitObjects_t; FitSuiteObjects(); virtual ~FitSuiteObjects(); @@ -85,7 +85,7 @@ class BA_CORE_API_ FitSuiteObjects : public IParameterized protected: //! Registers some class members for later access via parameter pool - virtual void init_parameters(); + virtual void init_parameters() final {}; double calculateChiSquaredValue(); @@ -105,5 +105,3 @@ class BA_CORE_API_ FitSuiteObjects : public IParameterized }; #endif // FITSUITEOBJECTS_H - - diff --git a/GUI/coregui/Models/DistributionItem.cpp b/GUI/coregui/Models/DistributionItem.cpp index d0ced0a283831f4fbec9f6c16489d53b9075c8ff..bc7ae7de325a0f446d7b7b6fdae78c43d64151bb 100644 --- a/GUI/coregui/Models/DistributionItem.cpp +++ b/GUI/coregui/Models/DistributionItem.cpp @@ -3,7 +3,7 @@ // BornAgain: simulate and fit scattering at grazing incidence // //! @file coregui/Models/DistributionItem.cpp -//! @brief Implements class DistributionItem +//! @brief Implements class DistributionItem and several subclasses //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) diff --git a/GUI/coregui/Models/DistributionItem.h b/GUI/coregui/Models/DistributionItem.h index 48dad04a18893113c2924bbe441839502fd2d789..2b32e0813dbe5b82647fee1c2cdffde7489f5157 100644 --- a/GUI/coregui/Models/DistributionItem.h +++ b/GUI/coregui/Models/DistributionItem.h @@ -3,7 +3,7 @@ // BornAgain: simulate and fit scattering at grazing incidence // //! @file coregui/Models/DistributionItem.h -//! @brief Declares class DistributionItem +//! @brief Declares class DistributionItem and several subclasses //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -115,4 +115,3 @@ public: }; #endif // DISTRIBUTIONITEM_H -