diff --git a/Core/Background/ConstantBackground.cpp b/Core/Background/ConstantBackground.cpp index 5066bbe44bd1f9ed316f1253a738f32a846865db..163bae95e903d18609d67119b512ce50764ea8e4 100644 --- a/Core/Background/ConstantBackground.cpp +++ b/Core/Background/ConstantBackground.cpp @@ -21,6 +21,7 @@ ConstantBackground::ConstantBackground(const std::vector<double> P) P) , m_background_value(m_P[0]) { + checkNodeArgs(); } ConstantBackground::ConstantBackground(double background_value) diff --git a/Device/Beam/FootprintGauss.cpp b/Device/Beam/FootprintGauss.cpp index 857dfddde017619eee4138c8148cffeb4f826bf3..be8c45579f951b2efe8a452c1abe14e1a7723362 100644 --- a/Device/Beam/FootprintGauss.cpp +++ b/Device/Beam/FootprintGauss.cpp @@ -19,6 +19,7 @@ FootprintGauss::FootprintGauss(const std::vector<double> P) : IFootprintFactor({"FootprintGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FootprintGauss::FootprintGauss(double width_ratio) diff --git a/Device/Beam/FootprintSquare.cpp b/Device/Beam/FootprintSquare.cpp index 67459c515cbc890a2e96a571bb11a24f5552f181..7fcd1584a35fab349da00e38cf0258cb69203d78 100644 --- a/Device/Beam/FootprintSquare.cpp +++ b/Device/Beam/FootprintSquare.cpp @@ -21,6 +21,7 @@ FootprintSquare::FootprintSquare(const std::vector<double> P) : IFootprintFactor({"FootprintSquare", "class_tooltip", {}}, P) { + checkNodeArgs(); } FootprintSquare::FootprintSquare(double width_ratio) diff --git a/Param/Distrib/Distributions.cpp b/Param/Distrib/Distributions.cpp index 4b2c55dc430d4ad1a0eb33e424ee5fefbd4ec583..e9ebc5c3a928264bb38880bbc2db32446587f1bd 100644 --- a/Param/Distrib/Distributions.cpp +++ b/Param/Distrib/Distributions.cpp @@ -126,6 +126,7 @@ DistributionGate::DistributionGate(const std::vector<double> P) , m_min(m_P[0]) , m_max(m_P[1]) { + checkNodeArgs(); if (m_max < m_min) throw std::runtime_error("DistributionGate: max<min"); } @@ -178,6 +179,7 @@ DistributionLorentz::DistributionLorentz(const std::vector<double> P) , m_mean(m_P[0]) , m_hwhm(m_P[1]) { + checkNodeArgs(); if (m_hwhm < 0.0) throw std::runtime_error("DistributionLorentz: hwhm<0"); } @@ -230,6 +232,7 @@ DistributionGaussian::DistributionGaussian(const std::vector<double> P) , m_mean(m_P[0]) , m_std_dev(m_P[1]) { + checkNodeArgs(); if (m_std_dev < 0.0) throw std::runtime_error("DistributionGaussian: std_dev < 0"); } @@ -283,6 +286,7 @@ DistributionLogNormal::DistributionLogNormal(const std::vector<double> P) , m_median(m_P[0]) , m_scale_param(m_P[1]) { + checkNodeArgs(); if (m_scale_param < 0.0) throw std::runtime_error("DistributionLogNormal: scale_param < 0"); if (m_median <= 0.0) @@ -351,6 +355,7 @@ DistributionCosine::DistributionCosine(const std::vector<double> P) , m_mean(m_P[0]) , m_sigma(m_P[1]) { + checkNodeArgs(); if (m_sigma < 0.0) throw std::runtime_error("DistributionCosine: sigma<0"); } @@ -409,6 +414,7 @@ DistributionTrapezoid::DistributionTrapezoid(const std::vector<double> P) , m_middle(m_P[2]) , m_right(m_P[3]) { + checkNodeArgs(); if (m_left < 0.0) throw std::runtime_error("DistributionTrapezoid: leftWidth < 0"); if (m_middle < 0.0) diff --git a/Param/Node/INode.cpp b/Param/Node/INode.cpp index b1908ee9c963cdb13725394d885a3c7b35490385..ffcd637c664accbcc46faf01c66d99ab7ae17160 100644 --- a/Param/Node/INode.cpp +++ b/Param/Node/INode.cpp @@ -29,7 +29,6 @@ NodeMeta nodeMetaUnion(const std::vector<ParaMeta>& base, const NodeMeta& other) INode::INode(const NodeMeta& meta, std::vector<double> PValues) : m_P(std::move(PValues)), m_parDefs(meta.paraMeta) { - checkNodeArgs(); } void INode::checkNodeArgs() const diff --git a/Sample/Correlations/FTDecay1D.cpp b/Sample/Correlations/FTDecay1D.cpp index c2c187a2fb1a7ef0ab1987deb0fc78af04ab03c7..bc086ed2e1ea8dba4bad38bdaa74de6c839e0dfc 100644 --- a/Sample/Correlations/FTDecay1D.cpp +++ b/Sample/Correlations/FTDecay1D.cpp @@ -41,6 +41,7 @@ std::string IFTDecayFunction1D::pythonConstructor() const FTDecayFunction1DCauchy::FTDecayFunction1DCauchy(const std::vector<double> P) : IFTDecayFunction1D({"FTDecayFunction1DCauchy", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDecayFunction1DCauchy::FTDecayFunction1DCauchy(double decay_length) @@ -66,6 +67,7 @@ double FTDecayFunction1DCauchy::evaluate(double q) const FTDecayFunction1DGauss::FTDecayFunction1DGauss(const std::vector<double> P) : IFTDecayFunction1D({"FTDecayFunction1DGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDecayFunction1DGauss::FTDecayFunction1DGauss(double decay_length) @@ -91,6 +93,7 @@ double FTDecayFunction1DGauss::evaluate(double q) const FTDecayFunction1DTriangle::FTDecayFunction1DTriangle(const std::vector<double> P) : IFTDecayFunction1D({"FTDecayFunction1DTriangle", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDecayFunction1DTriangle::FTDecayFunction1DTriangle(double decay_length) @@ -122,6 +125,7 @@ FTDecayFunction1DVoigt::FTDecayFunction1DVoigt(const std::vector<double> P) P) , m_eta(m_P[1]) { + checkNodeArgs(); } FTDecayFunction1DVoigt::FTDecayFunction1DVoigt(double decay_length, double eta) diff --git a/Sample/Correlations/FTDecay2D.cpp b/Sample/Correlations/FTDecay2D.cpp index b85623edbacc0857da2a64c6670220cdcce2678d..fc06efd2a3b03ad46794d0e314780cfcbedcbe0f 100644 --- a/Sample/Correlations/FTDecay2D.cpp +++ b/Sample/Correlations/FTDecay2D.cpp @@ -71,6 +71,7 @@ std::pair<double, double> IFTDecayFunction2D::transformToRecLatticeCoordinates(d FTDecayFunction2DCauchy::FTDecayFunction2DCauchy(const std::vector<double> P) : IFTDecayFunction2D({"FTDecayFunction2DCauchy", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDecayFunction2DCauchy::FTDecayFunction2DCauchy(double decay_length_x, double decay_length_y, @@ -98,6 +99,7 @@ double FTDecayFunction2DCauchy::evaluate(double qx, double qy) const FTDecayFunction2DGauss::FTDecayFunction2DGauss(const std::vector<double> P) : IFTDecayFunction2D({"FTDecayFunction2DGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDecayFunction2DGauss::FTDecayFunction2DGauss(double decay_length_x, double decay_length_y, @@ -131,6 +133,7 @@ FTDecayFunction2DVoigt::FTDecayFunction2DVoigt(const std::vector<double> P) P) , m_eta(m_P[3]) { + checkNodeArgs(); } FTDecayFunction2DVoigt::FTDecayFunction2DVoigt(double decay_length_x, double decay_length_y, diff --git a/Sample/Correlations/FTDistributions1D.cpp b/Sample/Correlations/FTDistributions1D.cpp index a34f1d12c8d87a4ef903e5b165fdbfeaa8f847ef..68622ee9514cd5cdebd87b43c07258e714de7475 100644 --- a/Sample/Correlations/FTDistributions1D.cpp +++ b/Sample/Correlations/FTDistributions1D.cpp @@ -49,6 +49,7 @@ std::string IFTDistribution1D::pythonConstructor() const FTDistribution1DCauchy::FTDistribution1DCauchy(const std::vector<double> P) : IFTDistribution1D({"FTDistribution1DCauchy", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution1DCauchy::FTDistribution1DCauchy(double omega) @@ -84,6 +85,7 @@ std::unique_ptr<IDistribution1DSampler> FTDistribution1DCauchy::createSampler() FTDistribution1DGauss::FTDistribution1DGauss(const std::vector<double> P) : IFTDistribution1D({"FTDistribution1DGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution1DGauss::FTDistribution1DGauss(double omega) @@ -119,6 +121,7 @@ std::unique_ptr<IDistribution1DSampler> FTDistribution1DGauss::createSampler() c FTDistribution1DGate::FTDistribution1DGate(const std::vector<double> P) : IFTDistribution1D({"FTDistribution1DGate", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution1DGate::FTDistribution1DGate(double omega) @@ -153,6 +156,7 @@ std::unique_ptr<IDistribution1DSampler> FTDistribution1DGate::createSampler() co FTDistribution1DTriangle::FTDistribution1DTriangle(const std::vector<double> P) : IFTDistribution1D({"FTDistribution1DTriangle", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution1DTriangle::FTDistribution1DTriangle(double omega) @@ -188,6 +192,7 @@ std::unique_ptr<IDistribution1DSampler> FTDistribution1DTriangle::createSampler( FTDistribution1DCosine::FTDistribution1DCosine(const std::vector<double> P) : IFTDistribution1D({"FTDistribution1DCosine", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution1DCosine::FTDistribution1DCosine(double omega) @@ -231,6 +236,7 @@ FTDistribution1DVoigt::FTDistribution1DVoigt(const std::vector<double> P) P) , m_eta(m_P[1]) { + checkNodeArgs(); } FTDistribution1DVoigt::FTDistribution1DVoigt(double omega, double eta) diff --git a/Sample/Correlations/FTDistributions2D.cpp b/Sample/Correlations/FTDistributions2D.cpp index c9d080ec597e254e18931a52674ffb620dcb6fab..7faf26266e954a32647fbda2151f0f55b3af83e1 100644 --- a/Sample/Correlations/FTDistributions2D.cpp +++ b/Sample/Correlations/FTDistributions2D.cpp @@ -56,6 +56,7 @@ double IFTDistribution2D::sumsq(double qx, double qy) const FTDistribution2DCauchy::FTDistribution2DCauchy(const std::vector<double> P) : IFTDistribution2D({"FTDistribution2DCauchy", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution2DCauchy::FTDistribution2DCauchy(double omega_x, double omega_y, double gamma) @@ -85,6 +86,7 @@ std::unique_ptr<IDistribution2DSampler> FTDistribution2DCauchy::createSampler() FTDistribution2DGauss::FTDistribution2DGauss(const std::vector<double> P) : IFTDistribution2D({"FTDistribution2DGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution2DGauss::FTDistribution2DGauss(double omega_x, double omega_y, double gamma) @@ -114,6 +116,7 @@ std::unique_ptr<IDistribution2DSampler> FTDistribution2DGauss::createSampler() c FTDistribution2DGate::FTDistribution2DGate(const std::vector<double> P) : IFTDistribution2D({"FTDistribution2DGate", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution2DGate::FTDistribution2DGate(double omega_x, double omega_y, double gamma) @@ -144,6 +147,7 @@ std::unique_ptr<IDistribution2DSampler> FTDistribution2DGate::createSampler() co FTDistribution2DCone::FTDistribution2DCone(const std::vector<double> P) : IFTDistribution2D({"FTDistribution2DCone", "class_tooltip", {}}, P) { + checkNodeArgs(); } FTDistribution2DCone::FTDistribution2DCone(double omega_x, double omega_y, double gamma) @@ -185,6 +189,7 @@ FTDistribution2DVoigt::FTDistribution2DVoigt(const std::vector<double> P) P) , m_eta(m_P[3]) { + checkNodeArgs(); } FTDistribution2DVoigt::FTDistribution2DVoigt(double omega_x, double omega_y, double gamma, diff --git a/Sample/HardParticle/FormFactorAnisoPyramid.cpp b/Sample/HardParticle/FormFactorAnisoPyramid.cpp index a9f30a5a3661dedd0cb700fb1bbcf3ccb63efc8e..12774fa9c7d2393761ea54d104f5dceb7804c98a 100644 --- a/Sample/HardParticle/FormFactorAnisoPyramid.cpp +++ b/Sample/HardParticle/FormFactorAnisoPyramid.cpp @@ -38,6 +38,7 @@ FormFactorAnisoPyramid::FormFactorAnisoPyramid(const std::vector<double> P) , m_height(m_P[2]) , m_alpha(m_P[3]) { + checkNodeArgs(); double cot_alpha = Math::cot(m_alpha); if (!std::isfinite(cot_alpha) || cot_alpha < 0) throw std::runtime_error("AnisoPyramid: angle alpha out of bounds"); diff --git a/Sample/HardParticle/FormFactorBar.cpp b/Sample/HardParticle/FormFactorBar.cpp index c0baac614302c92561c825bfe79ced1b507935d2..81422ae8b4e28a7a219c5a2e216575f732688d3c 100644 --- a/Sample/HardParticle/FormFactorBar.cpp +++ b/Sample/HardParticle/FormFactorBar.cpp @@ -22,6 +22,7 @@ FormFactorBarGauss::FormFactorBarGauss(const std::vector<double> P) : IProfileRectangularRipple({"BarGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorBarGauss::FormFactorBarGauss(double length, double width, double height) @@ -46,6 +47,7 @@ complex_t FormFactorBarGauss::factor_x(complex_t qx) const FormFactorBarLorentz::FormFactorBarLorentz(const std::vector<double> P) : IProfileRectangularRipple({"BarLorentz", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorBarLorentz::FormFactorBarLorentz(double length, double width, double height) diff --git a/Sample/HardParticle/FormFactorBox.cpp b/Sample/HardParticle/FormFactorBox.cpp index 15fa8b371d2a26f47d5cc75f70b74049d500e38d..797f96727bc65754f80ba2317a378fbe731e291b 100644 --- a/Sample/HardParticle/FormFactorBox.cpp +++ b/Sample/HardParticle/FormFactorBox.cpp @@ -26,6 +26,7 @@ FormFactorBox::FormFactorBox(const std::vector<double> P) , m_width(m_P[1]) , m_height(m_P[2]) { + checkNodeArgs(); double a = m_length / 2; double b = m_width / 2; std::vector<R3> V{{a, b, 0.}, {-a, b, 0.}, {-a, -b, 0.}, {a, -b, 0}}; diff --git a/Sample/HardParticle/FormFactorCantellatedCube.cpp b/Sample/HardParticle/FormFactorCantellatedCube.cpp index 5d221fe0862f3afd01c423ad7a700450d177fcbf..9304bdfdd2f47ae3700732794e6d7c4bd7fec7f2 100644 --- a/Sample/HardParticle/FormFactorCantellatedCube.cpp +++ b/Sample/HardParticle/FormFactorCantellatedCube.cpp @@ -56,6 +56,7 @@ FormFactorCantellatedCube::FormFactorCantellatedCube(const std::vector<double> P , m_length(m_P[0]) , m_removed_length(m_P[1]) { + checkNodeArgs(); if (m_removed_length > 0.5 * m_length) { std::ostringstream ostr; ostr << "::FormFactorCantellatedCube() -> Error in class initialization "; diff --git a/Sample/HardParticle/FormFactorCone.cpp b/Sample/HardParticle/FormFactorCone.cpp index 8e0058ed706e97699780c15cb5fc2ad194802636..3e6176222fb94152f79e1c3108b4e085a420b94d 100644 --- a/Sample/HardParticle/FormFactorCone.cpp +++ b/Sample/HardParticle/FormFactorCone.cpp @@ -31,6 +31,7 @@ FormFactorCone::FormFactorCone(const std::vector<double> P) , m_height(m_P[1]) , m_alpha(m_P[2]) { + checkNodeArgs(); m_cot_alpha = Math::cot(m_alpha); if (!std::isfinite(m_cot_alpha) || m_cot_alpha < 0) throw std::runtime_error("pyramid angle alpha out of bounds"); diff --git a/Sample/HardParticle/FormFactorCone6.cpp b/Sample/HardParticle/FormFactorCone6.cpp index 2bc5cb7fe68087e5fc5e4eb493562c309c22f8b0..910e72159a6d31197d35cfca3ebd786201a486e8 100644 --- a/Sample/HardParticle/FormFactorCone6.cpp +++ b/Sample/HardParticle/FormFactorCone6.cpp @@ -39,6 +39,7 @@ FormFactorCone6::FormFactorCone6(const std::vector<double> P) , m_height(m_P[1]) , m_alpha(m_P[2]) { + checkNodeArgs(); double cot_alpha = Math::cot(m_alpha); if (!std::isfinite(cot_alpha) || cot_alpha < 0) throw std::runtime_error("pyramid angle alpha out of bounds"); diff --git a/Sample/HardParticle/FormFactorCosineRipple.cpp b/Sample/HardParticle/FormFactorCosineRipple.cpp index 74a603009f483fa8afe925ef973eb02eed7986ac..b2711bbf21a6bf366962606663c6b9dbb60a7884 100644 --- a/Sample/HardParticle/FormFactorCosineRipple.cpp +++ b/Sample/HardParticle/FormFactorCosineRipple.cpp @@ -22,6 +22,7 @@ FormFactorCosineRippleBox::FormFactorCosineRippleBox(const std::vector<double> P) : ICosineRipple({"CosineRippleBox", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorCosineRippleBox::FormFactorCosineRippleBox(double length, double width, double height) @@ -46,6 +47,7 @@ complex_t FormFactorCosineRippleBox::factor_x(complex_t qx) const FormFactorCosineRippleGauss::FormFactorCosineRippleGauss(const std::vector<double> P) : ICosineRipple({"CosineRippleGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorCosineRippleGauss::FormFactorCosineRippleGauss(double length, double width, double height) @@ -70,6 +72,7 @@ complex_t FormFactorCosineRippleGauss::factor_x(complex_t qx) const FormFactorCosineRippleLorentz::FormFactorCosineRippleLorentz(const std::vector<double> P) : ICosineRipple({"CosineRippleLorentz", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorCosineRippleLorentz::FormFactorCosineRippleLorentz(double length, double width, diff --git a/Sample/HardParticle/FormFactorCuboctahedron.cpp b/Sample/HardParticle/FormFactorCuboctahedron.cpp index 451b27bce0c9e98c1f6c5bf0ffa7f152b88f1420..ae3b790276f96b4851dc2375387c5dadc50e17a1 100644 --- a/Sample/HardParticle/FormFactorCuboctahedron.cpp +++ b/Sample/HardParticle/FormFactorCuboctahedron.cpp @@ -43,6 +43,7 @@ FormFactorCuboctahedron::FormFactorCuboctahedron(const std::vector<double> P) , m_height_ratio(m_P[2]) , m_alpha(m_P[3]) { + checkNodeArgs(); double cot_alpha = Math::cot(m_alpha); if (!std::isfinite(cot_alpha) || cot_alpha < 0) throw std::runtime_error("pyramid angle alpha out of bounds"); diff --git a/Sample/HardParticle/FormFactorCylinder.cpp b/Sample/HardParticle/FormFactorCylinder.cpp index 53b8cce6de977cae51a0f5861c7e231b4d86fc55..a0da5ba94fdf5fe57a52b078631c90e793f736b7 100644 --- a/Sample/HardParticle/FormFactorCylinder.cpp +++ b/Sample/HardParticle/FormFactorCylinder.cpp @@ -27,6 +27,7 @@ FormFactorCylinder::FormFactorCylinder(const std::vector<double> P) , m_radius(m_P[0]) , m_height(m_P[1]) { + checkNodeArgs(); m_shape3D = std::make_unique<DoubleEllipse>(m_radius, m_radius, m_height, m_radius, m_radius); } diff --git a/Sample/HardParticle/FormFactorDodecahedron.cpp b/Sample/HardParticle/FormFactorDodecahedron.cpp index 7f52c17bfe9b4e551b7a181bfcbd356e34c037d0..cd1a4b1e6fde9904b12c4fe501fea7000608ed6e 100644 --- a/Sample/HardParticle/FormFactorDodecahedron.cpp +++ b/Sample/HardParticle/FormFactorDodecahedron.cpp @@ -37,6 +37,7 @@ FormFactorDodecahedron::FormFactorDodecahedron(const std::vector<double> P) {"Dodecahedron", "regular dodecahedron", {{"Edge", "nm", "edge length", 0, +INF, 0}}}, P) , m_edge(m_P[0]) { + checkNodeArgs(); double a = m_edge; setPolyhedron(topology, -1.113516364411607 * a, {{0.8506508083520399 * a, 0 * a, -1.113516364411607 * a}, diff --git a/Sample/HardParticle/FormFactorEllipsoidalCylinder.cpp b/Sample/HardParticle/FormFactorEllipsoidalCylinder.cpp index f407faa5ca07835053e0558186c3570a74dd9693..257328f7178e07f785da423d18b19c80869d531f 100644 --- a/Sample/HardParticle/FormFactorEllipsoidalCylinder.cpp +++ b/Sample/HardParticle/FormFactorEllipsoidalCylinder.cpp @@ -29,6 +29,7 @@ FormFactorEllipsoidalCylinder::FormFactorEllipsoidalCylinder(const std::vector<d , m_radius_y(m_P[1]) , m_height(m_P[2]) { + checkNodeArgs(); m_shape3D = std::make_unique<DoubleEllipse>(m_radius_x, m_radius_y, m_height, m_radius_x, m_radius_y); } diff --git a/Sample/HardParticle/FormFactorFullSphere.cpp b/Sample/HardParticle/FormFactorFullSphere.cpp index 325e8fcfde51805bff938b8baba2a38aafdf0c16..ef77c3fad4b96690778ed0842e1b3dbc5858b9b8 100644 --- a/Sample/HardParticle/FormFactorFullSphere.cpp +++ b/Sample/HardParticle/FormFactorFullSphere.cpp @@ -23,6 +23,7 @@ FormFactorFullSphere::FormFactorFullSphere(const std::vector<double> P, bool pos , m_radius(m_P[0]) , m_position_at_center(position_at_center) { + checkNodeArgs(); } FormFactorFullSphere::FormFactorFullSphere(double radius, bool position_at_center) diff --git a/Sample/HardParticle/FormFactorFullSpheroid.cpp b/Sample/HardParticle/FormFactorFullSpheroid.cpp index 50a6e81afe5545c19700c8636155fbd2d422068a..e1fb3e14cae9ed54b2e596d19e8d0c021df60e45 100644 --- a/Sample/HardParticle/FormFactorFullSpheroid.cpp +++ b/Sample/HardParticle/FormFactorFullSpheroid.cpp @@ -29,6 +29,7 @@ FormFactorFullSpheroid::FormFactorFullSpheroid(const std::vector<double> P) , m_radius(m_P[0]) , m_height(m_P[1]) { + checkNodeArgs(); m_shape3D = std::make_unique<TruncatedEllipsoid>(m_radius, m_radius, m_height / 2.0, m_height, 0.0); } diff --git a/Sample/HardParticle/FormFactorHemiEllipsoid.cpp b/Sample/HardParticle/FormFactorHemiEllipsoid.cpp index ceb6a93af55d55a793923b4a5be2f8a751a0912c..58dc956d89a78507f0bcd9cb93a2a403647bcd08 100644 --- a/Sample/HardParticle/FormFactorHemiEllipsoid.cpp +++ b/Sample/HardParticle/FormFactorHemiEllipsoid.cpp @@ -30,6 +30,7 @@ FormFactorHemiEllipsoid::FormFactorHemiEllipsoid(const std::vector<double> P) , m_radius_y(m_P[1]) , m_height(m_P[2]) { + checkNodeArgs(); m_shape3D = std::make_unique<TruncatedEllipsoid>(m_radius_x, m_radius_x, m_height, m_height, 0.0); } diff --git a/Sample/HardParticle/FormFactorHollowSphere.cpp b/Sample/HardParticle/FormFactorHollowSphere.cpp index dc2f2f406005dd1c6a055a9bd62f4c6f0438955e..0060f6a262a771cd43f244852d6d8356c426fc08 100644 --- a/Sample/HardParticle/FormFactorHollowSphere.cpp +++ b/Sample/HardParticle/FormFactorHollowSphere.cpp @@ -26,6 +26,7 @@ FormFactorHollowSphere::FormFactorHollowSphere(const std::vector<double> P) , m_mean(m_P[0]) , m_full_width(m_P[1]) { + checkNodeArgs(); if (!checkParameters()) throw std::runtime_error("FormFactorHollowSphere::FormFactorHollowSphere:" " mean radius must be bigger than the half width"); diff --git a/Sample/HardParticle/FormFactorIcosahedron.cpp b/Sample/HardParticle/FormFactorIcosahedron.cpp index 925adddda3347daa74c0505753b10729f19a98a7..13cc6939e1a9ef802ef3d171c9d5708f08134ba3 100644 --- a/Sample/HardParticle/FormFactorIcosahedron.cpp +++ b/Sample/HardParticle/FormFactorIcosahedron.cpp @@ -47,6 +47,7 @@ FormFactorIcosahedron::FormFactorIcosahedron(const std::vector<double> P) {"Icosahedron", "regular icosahedron", {{"Edge", "nm", "edge length", 0, +INF, 0}}}, P) , m_edge(m_P[0]) { + checkNodeArgs(); double a = m_edge; setPolyhedron(topology, -0.7557613140761708 * a, {{0.5773502691896258 * a, 0 * a, -0.7557613140761708 * a}, diff --git a/Sample/HardParticle/FormFactorLongBoxGauss.cpp b/Sample/HardParticle/FormFactorLongBoxGauss.cpp index 6ce3205ec19eb62343177df3004853b43a56ecf8..5936ac5bfe9fd04c7a76eb9eebaf67400a22bfe2 100644 --- a/Sample/HardParticle/FormFactorLongBoxGauss.cpp +++ b/Sample/HardParticle/FormFactorLongBoxGauss.cpp @@ -27,6 +27,7 @@ FormFactorLongBoxGauss::FormFactorLongBoxGauss(const std::vector<double> P) , m_width(m_P[1]) , m_height(m_P[2]) { + checkNodeArgs(); m_shape3D = std::make_unique<Box>(m_length, m_width, m_height); } diff --git a/Sample/HardParticle/FormFactorLongBoxLorentz.cpp b/Sample/HardParticle/FormFactorLongBoxLorentz.cpp index 0eb11a89ca48f941a09734270392960b893369e4..3209b61caafae1a07ce6b38caa5473e858d6ccd9 100644 --- a/Sample/HardParticle/FormFactorLongBoxLorentz.cpp +++ b/Sample/HardParticle/FormFactorLongBoxLorentz.cpp @@ -27,6 +27,7 @@ FormFactorLongBoxLorentz::FormFactorLongBoxLorentz(const std::vector<double> P) , m_width(m_P[1]) , m_height(m_P[2]) { + checkNodeArgs(); m_shape3D = std::make_unique<Box>(m_length, m_width, m_height); } diff --git a/Sample/HardParticle/FormFactorPrism3.cpp b/Sample/HardParticle/FormFactorPrism3.cpp index 8ff00b664daac6005e5e6d63fb7ce8b26a9bed97..94aa7f68fa7db54067a77909d408eb83d63948fe 100644 --- a/Sample/HardParticle/FormFactorPrism3.cpp +++ b/Sample/HardParticle/FormFactorPrism3.cpp @@ -24,6 +24,7 @@ FormFactorPrism3::FormFactorPrism3(const std::vector<double> P) , m_base_edge(m_P[0]) , m_height(m_P[1]) { + checkNodeArgs(); double a = m_base_edge; double as = a / 2; double ac = a / sqrt(3) / 2; diff --git a/Sample/HardParticle/FormFactorPrism6.cpp b/Sample/HardParticle/FormFactorPrism6.cpp index 76d9534557a111aca1aa33e37d7e499a4aa195f3..088930ac3003f03ca1edfedd81e41fdd046bb1f5 100644 --- a/Sample/HardParticle/FormFactorPrism6.cpp +++ b/Sample/HardParticle/FormFactorPrism6.cpp @@ -23,6 +23,7 @@ FormFactorPrism6::FormFactorPrism6(const std::vector<double> P) , m_base_edge(m_P[0]) , m_height(m_P[1]) { + checkNodeArgs(); double a = m_base_edge; double as = a * sqrt(3) / 2; double ac = a / 2; diff --git a/Sample/HardParticle/FormFactorPyramid.cpp b/Sample/HardParticle/FormFactorPyramid.cpp index f5eebce4e745c5f72466f6cd07172c28c169a5fc..8ad69f21405ff0d9e51aaabb6cc075564c38f55a 100644 --- a/Sample/HardParticle/FormFactorPyramid.cpp +++ b/Sample/HardParticle/FormFactorPyramid.cpp @@ -38,6 +38,7 @@ FormFactorPyramid::FormFactorPyramid(const std::vector<double> P) , m_height(m_P[1]) , m_alpha(m_P[2]) { + checkNodeArgs(); double cot_alpha = Math::cot(m_alpha); if (!std::isfinite(cot_alpha)) throw std::runtime_error("pyramid angle alpha out of bounds"); diff --git a/Sample/HardParticle/FormFactorSawtoothRipple.cpp b/Sample/HardParticle/FormFactorSawtoothRipple.cpp index f5e02daf26249764b53798af9d345420c1115f8f..54f5eaadec60d5fa720f0468d06a43a4f6e7b7aa 100644 --- a/Sample/HardParticle/FormFactorSawtoothRipple.cpp +++ b/Sample/HardParticle/FormFactorSawtoothRipple.cpp @@ -22,6 +22,7 @@ FormFactorSawtoothRippleBox::FormFactorSawtoothRippleBox(const std::vector<double> P) : ISawtoothRipple({"SawtoothRippleBox", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorSawtoothRippleBox::FormFactorSawtoothRippleBox(double length, double width, double height, @@ -47,6 +48,7 @@ complex_t FormFactorSawtoothRippleBox::factor_x(complex_t qx) const FormFactorSawtoothRippleGauss::FormFactorSawtoothRippleGauss(const std::vector<double> P) : ISawtoothRipple({"SawtoothRippleGauss", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorSawtoothRippleGauss::FormFactorSawtoothRippleGauss(double length, double width, @@ -72,6 +74,7 @@ complex_t FormFactorSawtoothRippleGauss::factor_x(complex_t qx) const FormFactorSawtoothRippleLorentz::FormFactorSawtoothRippleLorentz(const std::vector<double> P) : ISawtoothRipple({"SawtoothRippleLorentz", "class_tooltip", {}}, P) { + checkNodeArgs(); } FormFactorSawtoothRippleLorentz::FormFactorSawtoothRippleLorentz(double length, double width, diff --git a/Sample/HardParticle/FormFactorTetrahedron.cpp b/Sample/HardParticle/FormFactorTetrahedron.cpp index 79890c651121be43cc2461b16d1263f9b00cc90b..2beae371f87bae7a50711c1e2429645f75abb815 100644 --- a/Sample/HardParticle/FormFactorTetrahedron.cpp +++ b/Sample/HardParticle/FormFactorTetrahedron.cpp @@ -36,6 +36,7 @@ FormFactorTetrahedron::FormFactorTetrahedron(const std::vector<double> P) , m_height(m_P[1]) , m_alpha(m_P[2]) { + checkNodeArgs(); double cot_alpha = Math::cot(m_alpha); if (!std::isfinite(cot_alpha) || cot_alpha < 0) throw std::runtime_error("pyramid angle alpha out of bounds"); diff --git a/Sample/HardParticle/FormFactorTruncatedCube.cpp b/Sample/HardParticle/FormFactorTruncatedCube.cpp index ce2a92324d7c14c982e46fc7a3ecfe3f3508f00a..22226805af5639838ad976c60a14a04ae7350e32 100644 --- a/Sample/HardParticle/FormFactorTruncatedCube.cpp +++ b/Sample/HardParticle/FormFactorTruncatedCube.cpp @@ -41,6 +41,7 @@ FormFactorTruncatedCube::FormFactorTruncatedCube(const std::vector<double> P) , m_length(m_P[0]) , m_removed_length(m_P[1]) { + checkNodeArgs(); if (m_removed_length > 0.5 * m_length) { std::ostringstream ostr; ostr << "::FormFactorTruncatedCube() -> Error in class initialization "; diff --git a/Sample/HardParticle/FormFactorTruncatedSphere.cpp b/Sample/HardParticle/FormFactorTruncatedSphere.cpp index 03bc1e82709f6154a551148826d6c763520efb99..9f999a9fa77da3d3a94faf6bac84afc77359cdba 100644 --- a/Sample/HardParticle/FormFactorTruncatedSphere.cpp +++ b/Sample/HardParticle/FormFactorTruncatedSphere.cpp @@ -30,6 +30,7 @@ FormFactorTruncatedSphere::FormFactorTruncatedSphere(const std::vector<double> P , m_height(m_P[1]) , m_dh(m_P[2]) { + checkNodeArgs(); if (m_height > 2. * m_radius || m_dh > m_height) { std::ostringstream ostr; ostr << "FormFactorTruncatedSphere: -> Error in class initialization "; diff --git a/Sample/HardParticle/FormFactorTruncatedSpheroid.cpp b/Sample/HardParticle/FormFactorTruncatedSpheroid.cpp index a280af9fd01e080fdc43234f9bf6534bc64a48a5..1f85b03628dd0c708614b19608aac90df7f151f1 100644 --- a/Sample/HardParticle/FormFactorTruncatedSpheroid.cpp +++ b/Sample/HardParticle/FormFactorTruncatedSpheroid.cpp @@ -32,6 +32,7 @@ FormFactorTruncatedSpheroid::FormFactorTruncatedSpheroid(const std::vector<doubl , m_height_flattening(m_P[2]) , m_dh(m_P[3]) { + checkNodeArgs(); if (m_height > 2. * m_radius * m_height_flattening || m_dh > m_height) { std::ostringstream ostr; ostr << "::FormFactorTruncatedSpheroid() -> Error in class initialization with parameters "; diff --git a/Sample/Scattering/Rotations.cpp b/Sample/Scattering/Rotations.cpp index 748d1c768f82d77b700a436796b4327fdadd3f0b..a7a6aca0c25a567fedaae3eeb335c5483931a47e 100644 --- a/Sample/Scattering/Rotations.cpp +++ b/Sample/Scattering/Rotations.cpp @@ -99,6 +99,7 @@ RotationX::RotationX(const std::vector<double> P) {"XRotation", "class_tooltip", {{"Angle", "rad", "Angle around x axis", -INF, +INF, 0}}}, P) , m_angle(m_P[0]) { + checkNodeArgs(); } RotationX::RotationX(double angle) : RotationX(std::vector<double>{angle}) {} @@ -118,6 +119,7 @@ RotationY::RotationY(const std::vector<double> P) {"YRotation", "class_tooltip", {{"Angle", "rad", "Angle around y axis", -INF, +INF, 0}}}, P) , m_angle(m_P[0]) { + checkNodeArgs(); } RotationY::RotationY(double angle) : RotationY(std::vector<double>{angle}) {} @@ -139,6 +141,7 @@ RotationZ::RotationZ(const std::vector<double> P) {"ZRotation", "class_tooltip", {{"Angle", "rad", "Angle around z axis", -INF, +INF, 0}}}, P) , m_angle(m_P[0]) { + checkNodeArgs(); } RotationZ::RotationZ(double angle) : RotationZ(std::vector<double>{angle}) {} @@ -163,6 +166,7 @@ RotationEuler::RotationEuler(const std::vector<double> P) , m_beta(m_P[1]) , m_gamma(m_P[2]) { + checkNodeArgs(); } RotationEuler::RotationEuler(double alpha, double beta, double gamma) diff --git a/Sample/SoftParticle/FormFactorGauss.cpp b/Sample/SoftParticle/FormFactorGauss.cpp index 277084babd21a532b86e709abccf4c0213a08563..39443fc5528dc780a822f19d4d4851c6d4a57410 100644 --- a/Sample/SoftParticle/FormFactorGauss.cpp +++ b/Sample/SoftParticle/FormFactorGauss.cpp @@ -24,6 +24,7 @@ FormFactorGaussSphere::FormFactorGaussSphere(const std::vector<double> P) P) , m_mean_radius(m_P[0]) { + checkNodeArgs(); } FormFactorGaussSphere::FormFactorGaussSphere(double mean_radius) diff --git a/Sample/SoftParticle/FormFactorSphereGaussianRadius.cpp b/Sample/SoftParticle/FormFactorSphereGaussianRadius.cpp index d9bf2a780f5b2f2f4f3266323d68e28280090bcb..ae5fd480fc85068bd144af138595da6e828d0791 100644 --- a/Sample/SoftParticle/FormFactorSphereGaussianRadius.cpp +++ b/Sample/SoftParticle/FormFactorSphereGaussianRadius.cpp @@ -25,6 +25,7 @@ FormFactorSphereGaussianRadius::FormFactorSphereGaussianRadius(const std::vector , m_mean(m_P[0]) , m_sigma(m_P[1]) { + checkNodeArgs(); m_mean_r3 = calculateMeanR3(); m_shape3D = std::make_unique<TruncatedEllipsoid>(m_mean, m_mean, m_mean, 2.0 * m_mean, 0.0); }