diff --git a/GUI/Model/FromCore/ItemizeSample.cpp b/GUI/Model/FromCore/ItemizeSample.cpp index 680d63e5a8ff37cc2db918f329e51aea32cd7dc2..9f95690b97f0ee1f5817555fc13c6b69a8d70655 100644 --- a/GUI/Model/FromCore/ItemizeSample.cpp +++ b/GUI/Model/FromCore/ItemizeSample.cpp @@ -292,6 +292,13 @@ void set_InterlayerModel(RoughnessItem* parent, const InterlayerModel* interlaye ASSERT_NEVER; } +void set_CrosscorrelationModel(RoughnessItem* parent, const CrosscorrelationModel* crosscorr) +{ + if (const auto cd = dynamic_cast<const CommonDepthCrosscorrelation*>(crosscorr)) + parent->crossrorrModelSelection().setCertainItem( + new CommonDepthCrosscorrelationItem(cd->crossCorrDepth(R3()))); +} + void set_Roughness(LayerItem* parent, const LayerInterface* top_interface) { if (!top_interface) { @@ -308,12 +315,14 @@ void set_Roughness(LayerItem* parent, const LayerInterface* top_interface) const AutocorrelationModel* autocorrelation = roughness->autocorrelationModel(); const InterlayerModel* interlayer = roughness->interlayerModel(); + const CrosscorrelationModel* crosscorrelation = roughness->crosscorrelationModel(); if (const auto* autocorrItem = dynamic_cast<const K_CorrelationModel*>(autocorrelation)) { - auto* br = new K_CorrelationRoughnessItem(autocorrItem->sigma(), autocorrItem->hurst(), - autocorrItem->lateralCorrLength()); - set_InterlayerModel(br, interlayer); - parent->roughnessSelection().setCertainItem(br); + auto* k_corr = new K_CorrelationRoughnessItem(autocorrItem->sigma(), autocorrItem->hurst(), + autocorrItem->lateralCorrLength()); + set_InterlayerModel(k_corr, interlayer); + set_CrosscorrelationModel(k_corr, crosscorrelation); + parent->roughnessSelection().setCertainItem(k_corr); } else ASSERT_NEVER; } @@ -628,7 +637,6 @@ SampleItem* itemizeSample(const MultiLayer& sample, const QString& nodeName) { auto* result = new SampleItem; result->setName(nodeName.isEmpty() ? QString::fromStdString(sample.name()) : nodeName); - result->setCrossCorLength(sample.crossCorrLength()); result->setExternalField(sample.externalField()); MaterialsSet& matItems = result->materialModel(); diff --git a/GUI/Model/Job/ParameterTreeBuilder.cpp b/GUI/Model/Job/ParameterTreeBuilder.cpp index 84e3fa993c9399bfca5de38e8797f8276e698e5a..2b16504b03d1d7f04244a5defc466ef40103aa3e 100644 --- a/GUI/Model/Job/ParameterTreeBuilder.cpp +++ b/GUI/Model/Job/ParameterTreeBuilder.cpp @@ -97,7 +97,6 @@ void ParameterTreeBuilder::addMaterials() void ParameterTreeBuilder::addSample() { auto* label = new ParameterLabelItem("Sample", parameterContainerItem()->parameterTreeRoot()); - addParameterItem(label, m_job_item->sampleItem()->crossCorrLength()); // Processing external field is not implemented yet, so temporary disable it (see issue #654) // if (allowMagneticFields()) diff --git a/GUI/Model/Sample/CrosscorrelationItems.cpp b/GUI/Model/Sample/CrosscorrelationItems.cpp new file mode 100644 index 0000000000000000000000000000000000000000..289ef01786a84510a3fd8b2c1c7b7f1b14e1d8b2 --- /dev/null +++ b/GUI/Model/Sample/CrosscorrelationItems.cpp @@ -0,0 +1,55 @@ +// ************************************************************************************************ +// +// BornAgain: simulate and fit reflection and scattering +// +//! @file GUI/Model/Sample/CrosscorrelationItems.h +//! @brief Implements classes CrosscorrelationItem. +//! +//! @homepage http://www.bornagainproject.org +//! @license GNU General Public License v3 or higher (see COPYING) +//! @copyright Forschungszentrum Jülich GmbH 2024 +//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) +// +// ************************************************************************************************ + +#include "GUI/Model/Sample/CrosscorrelationItems.h" +#include "GUI/Model/Util/UtilXML.h" +#include "Sample/Interface/CrosscorrelationModels.h" + +namespace { +namespace Tag { + +const QString CrosscorrelationDepth("CrosscorrelationDepth"); + +} // namespace Tag +} // namespace + +CommonDepthCrosscorrelationItem::CommonDepthCrosscorrelationItem(double cross_corr_depth) +{ + m_crosscorrelation_depth.init( + "Crosscorrelation depth (nm)", + "Vertical length for the correlation of roughness at different interfaces", + cross_corr_depth, "crossCorrDepth"); +} + +void CommonDepthCrosscorrelationItem::writeTo(QXmlStreamWriter* w) const +{ + m_crosscorrelation_depth.writeTo2(w, Tag::CrosscorrelationDepth); +} + +void CommonDepthCrosscorrelationItem::readFrom(QXmlStreamReader* r) +{ + while (r->readNextStartElement()) { + QString tag = r->name().toString(); + + if (tag == Tag::CrosscorrelationDepth) + m_crosscorrelation_depth.readFrom2(r, tag); + else + r->skipCurrentElement(); + } +} + +std::unique_ptr<CrosscorrelationModel> CommonDepthCrosscorrelationItem::createModel() const +{ + return std::make_unique<CommonDepthCrosscorrelation>(m_crosscorrelation_depth.dVal()); +} diff --git a/GUI/Model/Sample/CrosscorrelationItems.h b/GUI/Model/Sample/CrosscorrelationItems.h new file mode 100644 index 0000000000000000000000000000000000000000..8e25f57a3dd305013060bb80f8de968f21f32e00 --- /dev/null +++ b/GUI/Model/Sample/CrosscorrelationItems.h @@ -0,0 +1,50 @@ +// ************************************************************************************************ +// +// BornAgain: simulate and fit reflection and scattering +// +//! @file GUI/Model/Sample/CrosscorrelationItems.h +//! @brief Defines classes CrosscorrelationItem. +//! +//! @homepage http://www.bornagainproject.org +//! @license GNU General Public License v3 or higher (see COPYING) +//! @copyright Forschungszentrum Jülich GmbH 2024 +//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) +// +// ************************************************************************************************ + +#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_CROSSCORRELATIONITEMS_H +#define BORNAGAIN_GUI_MODEL_SAMPLE_CROSSCORRELATIONITEMS_H + +#include "GUI/Model/Descriptor/DoubleProperty.h" +#include <QXmlStreamReader> + +class CrosscorrelationModel; + +class CrosscorrelationItem { +public: + virtual ~CrosscorrelationItem() = default; + + virtual void writeTo(QXmlStreamWriter*) const = 0; + virtual void readFrom(QXmlStreamReader*) = 0; + virtual std::unique_ptr<CrosscorrelationModel> createModel() const = 0; + virtual DoubleProperties crossCorrProperties() = 0; + +protected: + CrosscorrelationItem() = default; +}; + +class CommonDepthCrosscorrelationItem : public CrosscorrelationItem { +public: + CommonDepthCrosscorrelationItem(double cross_corr_depth); + + void writeTo(QXmlStreamWriter* w) const override; + void readFrom(QXmlStreamReader* r) override; + + std::unique_ptr<CrosscorrelationModel> createModel() const override; + DoubleProperties crossCorrProperties() override { return {&m_crosscorrelation_depth}; } + +private: + DoubleProperty m_crosscorrelation_depth; +}; + +#endif // BORNAGAIN_GUI_MODEL_SAMPLE_CROSSCORRELATIONITEMS_H diff --git a/GUI/Model/Sample/RoughnessCatalog.cpp b/GUI/Model/Sample/RoughnessCatalog.cpp index 845abdb91f2b028ac6fc881741da9ebaf42b0438..c9f6d72e67c3c6a07121b12b2ca247c28e20b2d0 100644 --- a/GUI/Model/Sample/RoughnessCatalog.cpp +++ b/GUI/Model/Sample/RoughnessCatalog.cpp @@ -14,6 +14,7 @@ #include "GUI/Model/Sample/RoughnessCatalog.h" #include "Base/Util/Assert.h" +#include "GUI/Model/Sample/CrosscorrelationItems.h" #include "GUI/Model/Sample/InterlayerItems.h" #include "GUI/Model/Sample/RoughnessItems.h" @@ -23,7 +24,7 @@ RoughnessItem* RoughnessCatalog::create(Type type) case Type::None: return nullptr; case Type::K_Correlation: - return new K_CorrelationRoughnessItem(0., .3, 5.); + return new K_CorrelationRoughnessItem(0., .7, 25.); } ASSERT_NEVER; } @@ -94,3 +95,44 @@ InterlayerCatalog::Type InterlayerCatalog::type(const InterlayerItem* model) ASSERT_NEVER; } + +//-------------------------------------------------------------------------- + +CrosscorrelationItem* CrosscorrelationCatalog::create(Type type) +{ + switch (type) { + case Type::None: + return nullptr; + case Type::CommonDepth: + return new CommonDepthCrosscorrelationItem(0); + } + ASSERT_NEVER; +} + +QVector<CrosscorrelationCatalog::Type> CrosscorrelationCatalog::types() +{ + return {Type::None, Type::CommonDepth}; +} + +UiInfo CrosscorrelationCatalog::uiInfo(Type type) +{ + switch (type) { + case Type::None: + return {"None", "", ""}; + case Type::CommonDepth: + return {"CommonDepth", "Roughness crosscorrelation does not depend on spatial frequency", + ""}; + } + ASSERT_NEVER; +} + +CrosscorrelationCatalog::Type CrosscorrelationCatalog::type(const CrosscorrelationItem* item) +{ + if (!item) + return Type::None; + + if (dynamic_cast<const CommonDepthCrosscorrelationItem*>(item)) + return Type::CommonDepth; + + ASSERT_NEVER; +} diff --git a/GUI/Model/Sample/RoughnessCatalog.h b/GUI/Model/Sample/RoughnessCatalog.h index ece2a6cf577d4943a0473774654e1ab9878005c2..63ac048c00db397fd550045eea01e0d976bf00ca 100644 --- a/GUI/Model/Sample/RoughnessCatalog.h +++ b/GUI/Model/Sample/RoughnessCatalog.h @@ -18,6 +18,7 @@ #include "GUI/Model/Type/UiInfo.h" #include <QVector> +class CrosscorrelationItem; class InterlayerItem; class RoughnessItem; @@ -59,4 +60,24 @@ public: static Type type(const InterlayerItem* model); }; +//-------------------------------------------------------------------------- + +class CrosscorrelationCatalog { +public: + // Do not change the numbering! It is serialized! + enum class Type : uint8_t { None = 0, CommonDepth = 1 }; + + //! Creates the item of the given type. + static CrosscorrelationItem* create(Type type); + + //! List of available types, sorted as expected in the UI. + static QVector<Type> types(); + + //! UiInfo on the given type. + static UiInfo uiInfo(Type t); + + //! Returns the enum type of the given item. + static Type type(const CrosscorrelationItem* item); +}; + #endif // BORNAGAIN_GUI_MODEL_SAMPLE_ROUGHNESSCATALOG_H diff --git a/GUI/Model/Sample/RoughnessItems.cpp b/GUI/Model/Sample/RoughnessItems.cpp index 5cfe85ca561cec03f9e9233834b0e56fc10a9cb3..85509f13bf35d148439265e10dc2fabc2fb9ef92 100644 --- a/GUI/Model/Sample/RoughnessItems.cpp +++ b/GUI/Model/Sample/RoughnessItems.cpp @@ -14,12 +14,14 @@ #include "GUI/Model/Sample/RoughnessItems.h" #include "GUI/Model/Util/UtilXML.h" +#include "Sample/Interface/AutocorrelationModels.h" namespace { namespace Tag { const QString BaseData("BaseData"); const QString HeightDistributionModel("HeightDistributionModel"); +const QString CrosscorrelationModel("CrosscorrelationModel"); const QString Sigma("Sigma"); const QString Hurst("Hurst"); const QString LateralCorrelationLength("LateralCorrelationLength"); @@ -30,6 +32,7 @@ const QString LateralCorrelationLength("LateralCorrelationLength"); void RoughnessItem::writeTo(QXmlStreamWriter* w) const { XML::writeTaggedElement(w, Tag::HeightDistributionModel, m_interlayer_model); + XML::writeTaggedElement(w, Tag::CrosscorrelationModel, m_crosscorr_model); } void RoughnessItem::readFrom(QXmlStreamReader* r) @@ -39,6 +42,8 @@ void RoughnessItem::readFrom(QXmlStreamReader* r) if (tag == Tag::HeightDistributionModel) XML::readTaggedElement(r, tag, m_interlayer_model); + else if (tag == Tag::CrosscorrelationModel) + XML::readTaggedElement(r, tag, m_crosscorr_model); else r->skipCurrentElement(); } @@ -50,6 +55,9 @@ RoughnessItem::RoughnessItem() "Laterally averaged profile of the interlayer transition (or " "roughness height distribution)", InterlayerCatalog::Type::Tanh); + m_crosscorr_model.simpleInit("Crosscorrelation", + "Model of roughness crosscorrelation between interfaces", + CrosscorrelationCatalog::Type::None); } //------------------------------------------------------------------------------------------------ @@ -92,3 +100,9 @@ void K_CorrelationRoughnessItem::readFrom(QXmlStreamReader* r) r->skipCurrentElement(); } } + +std::unique_ptr<AutocorrelationModel> K_CorrelationRoughnessItem::createModel() const +{ + return std::make_unique<K_CorrelationModel>(m_sigma.dVal(), m_hurst.dVal(), + m_lateral_correlation_length.dVal()); +} diff --git a/GUI/Model/Sample/RoughnessItems.h b/GUI/Model/Sample/RoughnessItems.h index c1d3811a2e45ff9be09e6e535d0edbdf6a34739c..d65f782c69823f4353fc188138f272e4f6491f80 100644 --- a/GUI/Model/Sample/RoughnessItems.h +++ b/GUI/Model/Sample/RoughnessItems.h @@ -17,15 +17,19 @@ #include "GUI/Model/Descriptor/DoubleProperty.h" #include "GUI/Model/Descriptor/PolyPtr.h" +#include "GUI/Model/Sample/CrosscorrelationItems.h" #include "GUI/Model/Sample/InterlayerItems.h" #include "GUI/Model/Sample/RoughnessCatalog.h" +class AutocorrelationModel; + class RoughnessItem { public: virtual ~RoughnessItem() = default; virtual void writeTo(QXmlStreamWriter* w) const; virtual void readFrom(QXmlStreamReader* r); + virtual std::unique_ptr<AutocorrelationModel> createModel() const = 0; virtual DoubleProperties lateralProperties() = 0; PolyPtr<InterlayerItem, InterlayerCatalog>& interlayerModelSelection() @@ -35,9 +39,17 @@ public: InterlayerItem* certainInterlayerModel() const { return m_interlayer_model.certainItem(); } void setInterlayerModelType(InterlayerItem* p) { m_interlayer_model.setCertainItem(p); } + PolyPtr<CrosscorrelationItem, CrosscorrelationCatalog>& crossrorrModelSelection() + { + return m_crosscorr_model; + } + CrosscorrelationItem* certainCrosscorrModel() const { return m_crosscorr_model.certainItem(); } + void setCrosscorrModelType(CrosscorrelationItem* p) { m_crosscorr_model.setCertainItem(p); } + protected: RoughnessItem(); PolyPtr<InterlayerItem, InterlayerCatalog> m_interlayer_model; + PolyPtr<CrosscorrelationItem, CrosscorrelationCatalog> m_crosscorr_model; }; class K_CorrelationRoughnessItem : public RoughnessItem { @@ -58,6 +70,7 @@ public: void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; + std::unique_ptr<AutocorrelationModel> createModel() const override; DoubleProperties lateralProperties() override { diff --git a/GUI/Model/Sample/SampleItem.cpp b/GUI/Model/Sample/SampleItem.cpp index a234ebb3ba1f0acca9b23d571b83eaa5ae93ab0f..51f46335f68c0f3268d3cea3a4a6c5e6785d30be 100644 --- a/GUI/Model/Sample/SampleItem.cpp +++ b/GUI/Model/Sample/SampleItem.cpp @@ -24,7 +24,6 @@ namespace Tag { const QString Name("Name"); const QString Description("Description"); -const QString CrossCorrelationLength("CrossCorrelationLength"); const QString MaterialsSet("MaterialsSet"); const QString Layer("Layer"); const QString ExternalField("ExternalField"); @@ -36,9 +35,6 @@ const QString ExpandInfoGroupbox("ExpandInfoGroupbox"); SampleItem::SampleItem() : NamedItem("Sample") { - m_cross_correlation_length.init("Cross-correlation length (nm)", - "Cross correlation length of roughnesses between interfaces", - 0.0, 5, RealLimits::nonnegative(), "cross"); m_external_field.init("External field", "External field (A/m)", "extField"); } @@ -128,7 +124,6 @@ void SampleItem::writeTo(QXmlStreamWriter* w) const { XML::writeTaggedValue(w, Tag::Name, name()); XML::writeTaggedValue(w, Tag::Description, description()); - m_cross_correlation_length.writeTo2(w, Tag::CrossCorrelationLength); XML::writeTaggedElement(w, Tag::ExternalField, m_external_field); XML::writeTaggedElement(w, Tag::MaterialsSet, m_materials); for (const auto* layer : m_layers) @@ -147,8 +142,6 @@ void SampleItem::readFrom(QXmlStreamReader* r) setName(XML::readTaggedString(r, tag)); else if (tag == Tag::Description) setDescription(XML::readTaggedString(r, tag)); - else if (tag == Tag::CrossCorrelationLength) - m_cross_correlation_length.readFrom2(r, tag); else if (tag == Tag::ExternalField) XML::readTaggedElement(r, tag, m_external_field); else if (tag == Tag::MaterialsSet) diff --git a/GUI/Model/Sample/SampleItem.h b/GUI/Model/Sample/SampleItem.h index fdca0f29b29d406916bb9107fe04794bd564e146..200d23ad5e4f6d196954fd979b37a5fe82719e7c 100644 --- a/GUI/Model/Sample/SampleItem.h +++ b/GUI/Model/Sample/SampleItem.h @@ -37,10 +37,6 @@ public: void addStandardMaterials(); - DoubleProperty& crossCorrLength() { return m_cross_correlation_length; } - const DoubleProperty& crossCorrLength() const { return m_cross_correlation_length; } - void setCrossCorLength(double d) { m_cross_correlation_length.setDVal(d); } - VectorProperty& externalField() { return m_external_field; } const VectorProperty& externalField() const { return m_external_field; } void setExternalField(const R3& r) { m_external_field.setR3(r); } @@ -68,7 +64,6 @@ public: bool expandInfo = true; private: - DoubleProperty m_cross_correlation_length; VectorProperty m_external_field; OwningVector<LayerItem> m_layers; MaterialsSet m_materials; diff --git a/GUI/Model/ToCore/SampleToCore.cpp b/GUI/Model/ToCore/SampleToCore.cpp index 5069db80aaf288a399680d9a2e83cd448dc6246a..dfcfe03a689aa3b7e9dff61cc35761766482fb58 100644 --- a/GUI/Model/ToCore/SampleToCore.cpp +++ b/GUI/Model/ToCore/SampleToCore.cpp @@ -40,9 +40,6 @@ namespace { std::unique_ptr<MultiLayer> createMultiLayer(const SampleItem& item) { auto sample = std::make_unique<MultiLayer>(); - double cross_corr_length = item.crossCorrLength().dVal(); - if (cross_corr_length > 0) - sample->setCrossCorrLength(cross_corr_length); R3 external_field = item.externalField(); sample->setExternalField(external_field); return sample; @@ -121,17 +118,17 @@ std::unique_ptr<MultiLayer> GUI::ToCore::itemToSample(const SampleItem& sampleIt continue; } - std::unique_ptr<InterlayerModel> interlayer( - roughItem->certainInterlayerModel()->createModel()); - std::unique_ptr<AutocorrelationModel> autocorrelation; + std::unique_ptr<AutocorrelationModel> autocorrelation = roughItem->createModel(); - if (const auto* br = dynamic_cast<const K_CorrelationRoughnessItem*>(roughItem)) - autocorrelation = std::make_unique<K_CorrelationModel>( - br->sigma().dVal(), br->hurst().dVal(), br->lateralCorrelationLength().dVal()); - else - ASSERT_NEVER; + std::unique_ptr<InterlayerModel> interlayer = + roughItem->certainInterlayerModel()->createModel(); - LayerRoughness roughness(autocorrelation.get(), interlayer.get()); + std::unique_ptr<CrosscorrelationModel> crosscorrelation; + if (!layerItem->isBottomLayer()) + if (const auto* item = roughItem->certainCrosscorrModel()) + crosscorrelation = item->createModel(); + + LayerRoughness roughness(autocorrelation.get(), interlayer.get(), crosscorrelation.get()); sample->addLayerWithTopRoughness(*layer, roughness); } return sample; diff --git a/GUI/View/Realspace/RealspaceBuilder.cpp b/GUI/View/Realspace/RealspaceBuilder.cpp index bb9c8d5be7fba3d9557e193b85e0d71cb1facf94..74ec96b73a738f22f97fb098d873405106dd4660 100644 --- a/GUI/View/Realspace/RealspaceBuilder.cpp +++ b/GUI/View/Realspace/RealspaceBuilder.cpp @@ -94,16 +94,15 @@ std::unique_ptr<const double2d_t> layerRoughnessMap(const LayerItem& layerItem, const SceneGeometry& sceneGeometry, int seed) { std::unique_ptr<const double2d_t> result; - std::unique_ptr<AutocorrelationModel> autocorrelation; - std::unique_ptr<InterlayerModel> interlayer; const RoughnessItem* roughItem = layerItem.certainRoughness(); - if (roughItem) - interlayer = roughItem->certainInterlayerModel()->createModel(); + if (!roughItem) + return result; + + std::unique_ptr<AutocorrelationModel> autocorrelation = roughItem->createModel(); - if (const auto* br = dynamic_cast<const K_CorrelationRoughnessItem*>(roughItem)) - autocorrelation = std::make_unique<K_CorrelationModel>( - br->sigma().dVal(), br->hurst().dVal(), br->lateralCorrelationLength().dVal()); + std::unique_ptr<InterlayerModel> interlayer = + roughItem->certainInterlayerModel()->createModel(); auto roughness = LayerRoughness(autocorrelation.get(), interlayer.get()); if (roughness.sigma() == 0) diff --git a/GUI/View/Sample/HeinzFormLayout.cpp b/GUI/View/Sample/HeinzFormLayout.cpp index cd9c3b12d10690352528b5efd5e5f5c892c5ed21..8a4785c982e2610ae0b155985e2f7ac0b10f7524 100644 --- a/GUI/View/Sample/HeinzFormLayout.cpp +++ b/GUI/View/Sample/HeinzFormLayout.cpp @@ -93,13 +93,6 @@ void HeinzFormLayout::addVector(VectorProperty& d, bool vertically /*= true*/) addBoldRow(d.label(), w); } -void HeinzFormLayout::setRowVisible(int row, bool visible) -{ - // Qt >=6.4 has the embedded method 'QFormLayout::setRowVisible(int row, bool visible)' - // After updating Qt on CI computers, 'HeinzFormLayout::setRowVisible' can be deleted. - QFormLayout::itemAt(row, QFormLayout::FieldRole)->widget()->setVisible(visible); -} - void HeinzFormLayout::addStructureEditingRow(QPushButton* button) { auto* w = new QWidget(QFormLayout::parentWidget()); diff --git a/GUI/View/Sample/HeinzFormLayout.h b/GUI/View/Sample/HeinzFormLayout.h index 477b208c184b937fa06bab1302fd5e49f0ba4ca5..b5e971d902edd6d5cbccb883a651194b9aa3dacb 100644 --- a/GUI/View/Sample/HeinzFormLayout.h +++ b/GUI/View/Sample/HeinzFormLayout.h @@ -108,9 +108,6 @@ public: //! (vertically=false). void addVector(VectorProperty& d, bool vertically = true); - //! Shows or hides the widgets in a row. - void setRowVisible(int row, bool visible); - //! Adds a button for structure editing. //! //! Creates a widget, places the given button as a child left-aligned into this widget and adds diff --git a/GUI/View/Sample/LayerForm.cpp b/GUI/View/Sample/LayerForm.cpp index 61b5d5a6701e6ffdbf1f9068cd8d113827166fec..67e7202b19e9c29615ef1993d2af7c4f9e3189cf 100644 --- a/GUI/View/Sample/LayerForm.cpp +++ b/GUI/View/Sample/LayerForm.cpp @@ -112,8 +112,9 @@ LayerForm::LayerForm(QWidget* parent, LayerItem* layerItem, SampleEditorControll "Used for Average Layer Material calculations \n" "when corresponding simulation option is set.")); - m_layout->addRow( - new RoughnessForm(this, m_layer->roughnessSelection(), m_layer->expandRoughness, m_ec)); + m_roughnessForm = + new RoughnessForm(this, m_layer->roughnessSelection(), m_layer->expandRoughness, m_ec); + m_layout->addRow(m_roughnessForm); m_roughness_row = m_layout->rowCount() - 1; // -- layouts @@ -166,10 +167,13 @@ void LayerForm::updateLayerPositionDependentElements() (isFirstLayer || isLastLayer) && (sample->layerItems().size() != 1); const bool thicknessIsInfinite = sample->layerItems().size() == 1; - m_layout->setRowVisible(m_roughness_row, !isFirstLayer); + m_roughnessForm->setVisible(!isFirstLayer); if (m_thickness_row == -1) return; + + m_roughnessForm->markLayerAsBottom(isLastLayer); + QWidget* w = m_layout->itemAt(m_thickness_row, QFormLayout::FieldRole)->widget(); if (thicknessIsSemiInfinite || thicknessIsInfinite) { auto* info = qobject_cast<QLineEdit*>(w); diff --git a/GUI/View/Sample/LayerForm.h b/GUI/View/Sample/LayerForm.h index 34f750051b6d585562f288427d697a23fa89fdb6..4359777c5c45d3f38e82a2e9dace0af23c8b7c16 100644 --- a/GUI/View/Sample/LayerForm.h +++ b/GUI/View/Sample/LayerForm.h @@ -21,6 +21,7 @@ class HeinzFormLayout; class LayerItem; class ParticleLayoutItem; +class RoughnessForm; class SampleEditorController; class WidgetMoverButton; @@ -49,6 +50,7 @@ private: SampleEditorController* m_ec; QVector<QWidget*> m_structure_editing_widgets; WidgetMoverButton* m_move_button; + RoughnessForm* m_roughnessForm; }; #endif // BORNAGAIN_GUI_VIEW_SAMPLE_LAYERFORM_H diff --git a/GUI/View/Sample/PolyForm.cpp b/GUI/View/Sample/PolyForm.cpp index 07d7aa6faae0d2099882d1653442dcf922d25b27..45bda299e6368f8d3793827cd2339f1a9c0f1fc9 100644 --- a/GUI/View/Sample/PolyForm.cpp +++ b/GUI/View/Sample/PolyForm.cpp @@ -57,3 +57,10 @@ DoubleProperties PolyForm::doublePropertiesOfItem(InterlayerItem*) { return {}; } + +DoubleProperties PolyForm::doublePropertiesOfItem(CrosscorrelationItem* item) +{ + if (!item) + return {}; + return item->crossCorrProperties(); +} diff --git a/GUI/View/Sample/PolyForm.h b/GUI/View/Sample/PolyForm.h index 59d76559df384807b4eed1eb5e152c4c9c67d743..ea8c26f5295d39f2828fec16f308c29a93203b38 100644 --- a/GUI/View/Sample/PolyForm.h +++ b/GUI/View/Sample/PolyForm.h @@ -52,6 +52,7 @@ public: virtual void createContent(); private: + static DoubleProperties doublePropertiesOfItem(class CrosscorrelationItem* item); static DoubleProperties doublePropertiesOfItem(class InterlayerItem* item); static DoubleProperties doublePropertiesOfItem(class FormfactorItem* item); static DoubleProperties doublePropertiesOfItem(class Profile1DItem* item); diff --git a/GUI/View/Sample/RoughnessForm.cpp b/GUI/View/Sample/RoughnessForm.cpp index 87582348c72b966cc06f201c0c9908138cc1a96f..a4baa79c44b57f8ff10a2e80f8996cf63815bbd9 100644 --- a/GUI/View/Sample/RoughnessForm.cpp +++ b/GUI/View/Sample/RoughnessForm.cpp @@ -49,12 +49,23 @@ void RoughnessForm::updateTitle() setTitle("Roughness (" + m_cb->currentText() + ")"); } -void RoughnessForm::onRoughnessTypeChanged() +void RoughnessForm::recreateWidgets() { while (m_layout->rowCount() > 1) m_layout->removeRow(1); createRoughnessWidgets(); +} + +void RoughnessForm::markLayerAsBottom(bool is_bottom) +{ + m_is_bottom_layer = is_bottom; + recreateWidgets(); +} + +void RoughnessForm::onRoughnessTypeChanged() +{ + recreateWidgets(); updateTitle(); } @@ -65,5 +76,7 @@ void RoughnessForm::createRoughnessWidgets() if (auto* rsi = dynamic_cast<K_CorrelationRoughnessItem*>(roughness)) { m_layout->addGroupOfValues("Lateral parameters", rsi->lateralProperties()); m_layout->addSelection(roughness->interlayerModelSelection()); + if (!m_is_bottom_layer) + m_layout->addSelection(roughness->crossrorrModelSelection()); } } diff --git a/GUI/View/Sample/RoughnessForm.h b/GUI/View/Sample/RoughnessForm.h index e15fd9309615464c15aa812b90683c44a567e1be..4728a8098310259c37b22cedaaa97f79ff66b198 100644 --- a/GUI/View/Sample/RoughnessForm.h +++ b/GUI/View/Sample/RoughnessForm.h @@ -30,6 +30,8 @@ public: bool& expandRoughness, SampleEditorController* ec); void onRoughnessTypeChanged(); + void recreateWidgets(); + void markLayerAsBottom(bool is_bottom); private: void updateTitle(); @@ -38,6 +40,7 @@ private: HeinzFormLayout* m_layout; QComboBox* m_cb; PolyPtr<RoughnessItem, RoughnessCatalog>& m_rs; + bool m_is_bottom_layer = false; }; #endif // BORNAGAIN_GUI_VIEW_SAMPLE_ROUGHNESSFORM_H diff --git a/GUI/View/Sample/SampleForm.cpp b/GUI/View/Sample/SampleForm.cpp index 616077b0a62974bb7e228936b8d38dc94f8ffcea..729442e4390ca617139f5f83087698d1420626bc 100644 --- a/GUI/View/Sample/SampleForm.cpp +++ b/GUI/View/Sample/SampleForm.cpp @@ -92,8 +92,6 @@ SampleForm::SampleForm(SampleItem* sampleItem, SampleEditorController* ec) gDoc->samplesRW()->setCurrentDescription(descriptionEdit->toPlainText()); }); - gLayout->addValue(sampleItem->crossCorrLength()); - // Processing external field is not implemented yet, so temporary disable it (see issue #654) // m_layout->addVector(sampleItem->externalField(), false); diff --git a/Img3D/Mesh/Box.cpp b/Img3D/Mesh/Box.cpp index c052f5ef561665f07d8dd0f91e265cafb6318fc0..357d3e9aa309b435f04e2e661d612a018739996b 100644 --- a/Img3D/Mesh/Box.cpp +++ b/Img3D/Mesh/Box.cpp @@ -47,11 +47,13 @@ Geometry::Mesh Geometry::meshBox() Geometry::Mesh Geometry::meshRoughBox(const double2d_t* topR, const double2d_t* bottomR) { - ASSERT(topR); - ASSERT(topR->size()); + ASSERT(topR || bottomR); + const double2d_t* base = topR ? topR : bottomR; + ASSERT(base->size()); - const auto& t = *topR; - const auto& b = bottomR ? *bottomR : double2d_t(t.size(), std::vector<double>(t[0].size())); + const auto& t = topR ? *topR : double2d_t(base->size(), std::vector<double>(base[0].size())); + const auto& b = + bottomR ? *bottomR : double2d_t(base->size(), std::vector<double>(base[0].size())); float const D = 0.5f; diff --git a/Img3D/Model/PlottableBody.cpp b/Img3D/Model/PlottableBody.cpp index 5ebdd5e8f6eddaf498db446e023f22ce2e62b096..74354ec61c39dd41c5eb6bd87dc2e371f21dfced 100644 --- a/Img3D/Model/PlottableBody.cpp +++ b/Img3D/Model/PlottableBody.cpp @@ -71,7 +71,7 @@ PlottableBody::PlottableBody(GeometricID::Key gky_, const double2d_t* top, const , m_color(clrObject) , gky(gky_) { - if (top) + if (top || bottom) m_geo = std::shared_ptr<Geometry>(new Geometry(gky, top, bottom)); } diff --git a/Sample/Interface/AutocorrelationModels.cpp b/Sample/Interface/AutocorrelationModels.cpp index 6c2099bf7ca8e4afaffaa12d6195e8e324203888..a08e233b133386327be83209a2250e02bc729b7d 100644 --- a/Sample/Interface/AutocorrelationModels.cpp +++ b/Sample/Interface/AutocorrelationModels.cpp @@ -22,7 +22,7 @@ using std::numbers::pi; //! @param sigma: rms of the roughness in nanometers //! @param hurstParameter: hurst parameter which describes how jagged the interface, -//! dimensionless [0.0, 1.0], where 0.0 gives more spikes, 1.0 more smoothness +//! dimensionless (0.0, 1.0], where 0.0 gives more spikes, 1.0 more smoothness //! @param lateralCorrLength: lateral correlation length of the roughness in nanometers K_CorrelationModel::K_CorrelationModel(double sigma, double hurst, double lateralCorrLength) : m_sigma(sigma) diff --git a/Sample/Interface/AutocorrelationModels.h b/Sample/Interface/AutocorrelationModels.h index 5d87ae7f39df4fd9975eba559173d222fb9e7365..a0ea5329bccce285d596dd6676950ec9cda6f237 100644 --- a/Sample/Interface/AutocorrelationModels.h +++ b/Sample/Interface/AutocorrelationModels.h @@ -28,7 +28,7 @@ public: virtual double corrFunction(const R3& k) const = 0; #ifndef SWIG - //! Creates the Python constructor of this class + //! Used to create the Python constructor of this class virtual std::string pythonArguments() const = 0; #endif }; diff --git a/Sample/Interface/CrosscorrelationModels.cpp b/Sample/Interface/CrosscorrelationModels.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d791d9e65967f0855d0ecb8389f945db4ffe4d65 --- /dev/null +++ b/Sample/Interface/CrosscorrelationModels.cpp @@ -0,0 +1,54 @@ +// ************************************************************************************************ +// +// BornAgain: simulate and fit reflection and scattering +// +//! @file Sample/Interface/CrosscorrelationModels.cpp +//! @brief Implement CrossCorrModel classes. +//! +//! @homepage http://www.bornagainproject.org +//! @license GNU General Public License v3 or higher (see COPYING) +//! @copyright Forschungszentrum Jülich GmbH 2024 +//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) +// +// ************************************************************************************************ + +#include "Sample/Interface/CrosscorrelationModels.h" +#include "Base/Py/PyFmt.h" +#include "Base/Util/Assert.h" +#include <cmath> + +CommonDepthCrosscorrelation::CommonDepthCrosscorrelation(double cross_corr_depth) + : m_crosscorrelation_depth(cross_corr_depth) +{ + validateOrThrow(); +} + +CommonDepthCrosscorrelation* CommonDepthCrosscorrelation::clone() const +{ + return new CommonDepthCrosscorrelation(m_crosscorrelation_depth); +} + +std::string CommonDepthCrosscorrelation::validate() const +{ + std::vector<std::string> errs; + requestGe0(errs, m_crosscorrelation_depth, "crossCorrDepth"); + if (!errs.empty()) + return jointError(errs); + m_validated = true; + return ""; +} + +std::string CommonDepthCrosscorrelation::pythonArguments() const +{ + return Py::Fmt::printArguments({{m_crosscorrelation_depth, parDefs()[0].unit}}); +} + +double CommonDepthCrosscorrelation::replicationFactor(const R3&, double thickness) const +{ + ASSERT(thickness >= 0); + + if (m_crosscorrelation_depth == 0) + return 0; + + return std::exp(-thickness / m_crosscorrelation_depth); +} diff --git a/Sample/Interface/CrosscorrelationModels.h b/Sample/Interface/CrosscorrelationModels.h new file mode 100644 index 0000000000000000000000000000000000000000..1df5069128b8b98df1884fbb7c230ce7d8f20a4c --- /dev/null +++ b/Sample/Interface/CrosscorrelationModels.h @@ -0,0 +1,55 @@ +// ************************************************************************************************ +// +// BornAgain: simulate and fit reflection and scattering +// +//! @file Sample/Interface/CrosscorrelationModels.h +//! @brief Define CrosscorrelationModel classes. +//! +//! @homepage http://www.bornagainproject.org +//! @license GNU General Public License v3 or higher (see COPYING) +//! @copyright Forschungszentrum Jülich GmbH 2024 +//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) +// +// ************************************************************************************************ + +#ifndef BORNAGAIN_SAMPLE_INTERFACE_CROSSCORRELATIONMODELS_H +#define BORNAGAIN_SAMPLE_INTERFACE_CROSSCORRELATIONMODELS_H + +#include "Base/Type/ICloneable.h" +#include "Param/Node/INode.h" +#include <heinz/Vectors3D.h> + +//! Base class for cross-correlation function models. +class CrosscorrelationModel : public ICloneable, public INode { +public: + CrosscorrelationModel* clone() const override = 0; + virtual double crossCorrDepth(const R3& k) const = 0; + virtual double replicationFactor(const R3& k, double thickness) const = 0; + +#ifndef SWIG + //! Used to create the Python constructor of this class + virtual std::string pythonArguments() const = 0; +#endif +}; + +//! The crosscorrelation factor depends on the distance between interfaces and does not depend +//! on the spatial frequency of roughness. +class CommonDepthCrosscorrelation : public CrosscorrelationModel { +public: + CommonDepthCrosscorrelation(double cross_corr_depth = 0); + CommonDepthCrosscorrelation* clone() const override; + std::string className() const override { return "CommonDepthCrosscorrelation"; } + std::string validate() const override; + double crossCorrDepth(const R3&) const override { return m_crosscorrelation_depth; } + double replicationFactor(const R3&, double thickness) const override; + std::vector<ParaMeta> parDefs() const final { return {{"CrosscorrDepth", "nm"}}; } + +#ifndef SWIG + std::string pythonArguments() const override; +#endif + +private: + double m_crosscorrelation_depth = 0; +}; + +#endif // BORNAGAIN_SAMPLE_INTERFACE_CROSSCORRELATIONMODELS_H diff --git a/Sample/Interface/LayerRoughness.cpp b/Sample/Interface/LayerRoughness.cpp index 51c3f39c639deb0c922709bf8ce760e87b39ae11..636d5dfdf1ca75f4bd024dd9be8c853ae6d19510 100644 --- a/Sample/Interface/LayerRoughness.cpp +++ b/Sample/Interface/LayerRoughness.cpp @@ -19,9 +19,11 @@ //! @param autoCorrModel: autocorrelation function and spectrum //! @param interlayerModel: shape of the interfacial transition region LayerRoughness::LayerRoughness(const AutocorrelationModel* autocorrelation, - const InterlayerModel* interlayer) + const InterlayerModel* interlayer, + const CrosscorrelationModel* crosscorrelation) : m_autocorrelation_model(autocorrelation ? autocorrelation->clone() : nullptr) , m_interlayer_model(interlayer ? interlayer->clone() : nullptr) + , m_crosscorrelation_model(crosscorrelation ? crosscorrelation->clone() : nullptr) { ASSERT(m_autocorrelation_model); ASSERT(m_interlayer_model); @@ -29,12 +31,14 @@ LayerRoughness::LayerRoughness(const AutocorrelationModel* autocorrelation, LayerRoughness* LayerRoughness::clone() const { - return new LayerRoughness(m_autocorrelation_model.get(), m_interlayer_model.get()); + return new LayerRoughness(m_autocorrelation_model.get(), m_interlayer_model.get(), + m_crosscorrelation_model.get()); } std::vector<const INode*> LayerRoughness::nodeChildren() const { - return std::vector<const INode*>() << m_autocorrelation_model << m_interlayer_model; + return std::vector<const INode*>() + << m_autocorrelation_model << m_interlayer_model << m_crosscorrelation_model; } bool LayerRoughness::showInScriptOrGui() const @@ -61,3 +65,8 @@ void LayerRoughness::setInterlayerModel(const InterlayerModel* interlayer) m_interlayer_model.reset(interlayer->clone()); } + +void LayerRoughness::setCrosscorrelationModel(const CrosscorrelationModel* crosscorrelation) +{ + m_crosscorrelation_model.reset(crosscorrelation ? crosscorrelation->clone() : nullptr); +} diff --git a/Sample/Interface/LayerRoughness.h b/Sample/Interface/LayerRoughness.h index 690b66a43527aee522d5f0636ddf65b6961e577e..711445d47578d001aa105634895866643faf7b35 100644 --- a/Sample/Interface/LayerRoughness.h +++ b/Sample/Interface/LayerRoughness.h @@ -16,6 +16,7 @@ #define BORNAGAIN_SAMPLE_INTERFACE_LAYERROUGHNESS_H #include "Sample/Interface/AutocorrelationModels.h" +#include "Sample/Interface/CrosscorrelationModels.h" #include "Sample/Interface/InterlayerModels.h" #include "Sample/Scattering/ISampleNode.h" #include <heinz/Vectors3D.h> @@ -27,7 +28,8 @@ class LayerRoughness : public ISampleNode { public: - LayerRoughness(const AutocorrelationModel* autocorrelation, const InterlayerModel* interlayer); + LayerRoughness(const AutocorrelationModel* autocorrelation, const InterlayerModel* interlayer, + const CrosscorrelationModel* crosscorrelation = nullptr); LayerRoughness* clone() const override; std::string className() const final { return "LayerRoughness"; } @@ -55,9 +57,16 @@ public: return m_interlayer_model.get(); } + void setCrosscorrelationModel(const CrosscorrelationModel* crosscorrelation); + const CrosscorrelationModel* crosscorrelationModel() const + { + return m_crosscorrelation_model.get(); + } + private: std::unique_ptr<AutocorrelationModel> m_autocorrelation_model; // never nullptr std::unique_ptr<InterlayerModel> m_interlayer_model; // never nullptr + std::unique_ptr<CrosscorrelationModel> m_crosscorrelation_model; }; #endif // BORNAGAIN_SAMPLE_INTERFACE_LAYERROUGHNESS_H diff --git a/Sample/Multilayer/MultiLayer.cpp b/Sample/Multilayer/MultiLayer.cpp index d60d7350e9b4cf81c74b935e73a81e69d4014eb0..51e486a75115d06e5fe90d54b578a888d0427eff 100644 --- a/Sample/Multilayer/MultiLayer.cpp +++ b/Sample/Multilayer/MultiLayer.cpp @@ -23,7 +23,6 @@ #include <utility> MultiLayer::MultiLayer() - : m_cross_corr_length(0) { validateOrThrow(); } @@ -33,7 +32,6 @@ MultiLayer::~MultiLayer() = default; MultiLayer* MultiLayer::clone() const { auto* result = new MultiLayer; - result->setCrossCorrLength(crossCorrLength()); result->setExternalField(externalField()); for (size_t i = 0; i < numberOfLayers(); ++i) { const LayerInterface* interface = i > 0 ? m_interfaces[i - 1] : nullptr; @@ -103,14 +101,6 @@ const LayerInterface* MultiLayer::layerInterface(size_t i_interface) const return m_interfaces.at(i_interface); } -void MultiLayer::setCrossCorrLength(double crossCorrLength) -{ - if (crossCorrLength < 0.0) - throw std::runtime_error("MultiLayer::setCrossCorrLength called with negative argument"); - m_cross_corr_length = crossCorrLength; - m_validated = false; -} - void MultiLayer::setExternalField(R3 ext_field) { m_ext_field = ext_field; @@ -165,8 +155,6 @@ std::string MultiLayer::validate() const errs.push_back("{ interface " + std::to_string(i) + ": " + err + " }"); } - requestGe0(errs, m_cross_corr_length, "CrossCorrelationLength"); - if (!errs.empty()) return "[ " + Base::String::join(errs, ", ") + " ]"; diff --git a/Sample/Multilayer/MultiLayer.h b/Sample/Multilayer/MultiLayer.h index d4c1df189a6c15df0ab7f3a454e09535438bd7a6..dfcf3747d12d1ba722fb0561381e3507b478aacc 100644 --- a/Sample/Multilayer/MultiLayer.h +++ b/Sample/Multilayer/MultiLayer.h @@ -49,8 +49,6 @@ public: void addLayer(const Layer& layer); void addLayerWithTopRoughness(const Layer& layer, const LayerRoughness& roughness); - //! Sets cross correlation length of roughnesses between interfaces - void setCrossCorrLength(double crossCorrLength); //! Sets the external field applied to the sample (units: A/m) void setExternalField(R3 ext_field); @@ -75,10 +73,6 @@ public: } const Layer* layer(size_t i_layer) const; const LayerInterface* layerInterface(size_t i_interface) const; - double crossCorrLength() const - { - return m_cross_corr_length; - } R3 externalField() const { return m_ext_field; @@ -93,8 +87,6 @@ private: OwningVector<const Layer> m_layers; //! stack of layer interfaces [nlayers-1] OwningVector<const LayerInterface> m_interfaces; - //! cross correlation length (in z direction) between different layers - double m_cross_corr_length; //! external magnetic field (in A/m) R3 m_ext_field; diff --git a/Sample/StandardSample/MultiLayerWithRoughnessBuilder.cpp b/Sample/StandardSample/MultiLayerWithRoughnessBuilder.cpp index 63bfe1e8bc8bd273855b556e624800e9593536ed..e6f8096b709f20b0a221a3e92fb0e1b2d13b2c11 100644 --- a/Sample/StandardSample/MultiLayerWithRoughnessBuilder.cpp +++ b/Sample/StandardSample/MultiLayerWithRoughnessBuilder.cpp @@ -26,7 +26,7 @@ MultiLayer* createMultiLayerWithInterlayerModel(const InterlayerModel* interlaye const double sigma(1.0); const double hurst(0.3); const double lateralCorrLength(5.0); - const double crossCorrLength(10.0); + const double crossCorrDepth(10.0); Material vacuum_material = RefractiveMaterial("Vacuum", 0., 0.); Material substrate_material = RefractiveMaterial("Substrate", 15e-6, 0.0); @@ -39,7 +39,8 @@ MultiLayer* createMultiLayerWithInterlayerModel(const InterlayerModel* interlaye Layer substrate_layer(substrate_material, 0); K_CorrelationModel autocorrelation(sigma, hurst, lateralCorrLength); - LayerRoughness roughness(&autocorrelation, interlayerModel); + CommonDepthCrosscorrelation crosscorrelation(crossCorrDepth); + LayerRoughness roughness(&autocorrelation, interlayerModel, &crosscorrelation); auto* sample = new MultiLayer; sample->addLayer(vacuum_layer); @@ -48,7 +49,6 @@ MultiLayer* createMultiLayerWithInterlayerModel(const InterlayerModel* interlaye sample->addLayerWithTopRoughness(partB_layer, roughness); } sample->addLayerWithTopRoughness(substrate_layer, roughness); - sample->setCrossCorrLength(crossCorrLength); return sample; } } // namespace diff --git a/Sample/StandardSample/ResonatorBuilder.cpp b/Sample/StandardSample/ResonatorBuilder.cpp index 6fe606159de588cae81f77e1a51f52253ca02a33..e6d3368d0e56aea141ededc08ef76dc5012f0d94 100644 --- a/Sample/StandardSample/ResonatorBuilder.cpp +++ b/Sample/StandardSample/ResonatorBuilder.cpp @@ -38,7 +38,8 @@ MultiLayer* ExemplarySamples::createResonator(double ti_thickness) K_CorrelationModel autocorrelation(2.0, 0.8, 1e4); TanhInterlayer interlayer; - LayerRoughness roughness(&autocorrelation, &interlayer); + CommonDepthCrosscorrelation crosscorrelation(400); + LayerRoughness roughness(&autocorrelation, &interlayer, &crosscorrelation); result->addLayer(l_Si); @@ -52,7 +53,5 @@ MultiLayer* ExemplarySamples::createResonator(double ti_thickness) result->addLayerWithTopRoughness(l_TiO2, roughness); result->addLayerWithTopRoughness(l_D2O, roughness); - result->setCrossCorrLength(400); - return result; } diff --git a/Sim/Computation/RoughMultiLayerContribution.cpp b/Sim/Computation/RoughMultiLayerContribution.cpp index 57f0389df32807ea5f3a17a7629a6da394a83dfe..6df88f3e2a04bb1fe202061d9e692aab5dafb613 100644 --- a/Sim/Computation/RoughMultiLayerContribution.cpp +++ b/Sim/Computation/RoughMultiLayerContribution.cpp @@ -101,9 +101,10 @@ complex_t get_sum8terms(const ReSample& re_sample, size_t i_layer, const Diffuse } // Fourier transform of the correlation function of roughnesses between the interfaces -double crossCorrSpectralFun(const R3& kvec, const SliceStack& stack, size_t j, size_t k, - double crossCorrLength) +double crossCorrSpectralFun(const R3& qvec, const SliceStack& stack, size_t j, size_t k) { + ASSERT(j < k); + const double distance = std::abs(stack[j].hig() - stack[k].hig()); const AutocorrelationModel* rough_j = stack[j].topRoughness()->autocorrelationModel(); const AutocorrelationModel* rough_k = stack[k].topRoughness()->autocorrelationModel(); @@ -113,10 +114,15 @@ double crossCorrSpectralFun(const R3& kvec, const SliceStack& stack, size_t j, s if (sigma_j <= 0 || sigma_k <= 0) return 0.0; + const CrosscorrelationModel* crosscorr_j = stack[j].topRoughness()->crosscorrelationModel(); + + if (!crosscorr_j) + return 0.0; + return 0.5 - * ((sigma_k / sigma_j) * rough_j->spectralFunction(kvec) - + (sigma_j / sigma_k) * rough_k->spectralFunction(kvec)) - * std::exp(-distance / crossCorrLength); + * ((sigma_k / sigma_j) * rough_j->spectralFunction(qvec) + + (sigma_j / sigma_k) * rough_k->spectralFunction(qvec)) + * crosscorr_j->replicationFactor(qvec, distance); } } // namespace @@ -130,7 +136,6 @@ double Compute::roughMultiLayerContribution(const ReSample& re_sample, const Dif const size_t n_slices = re_sample.numberOfSlices(); const R3 q = ele.meanQ(); const double wavelength = ele.wavelength(); - const double crossCorrLength = re_sample.sample().crossCorrLength(); double autocorr = 0; double crosscorr = 0; @@ -157,11 +162,13 @@ double Compute::roughMultiLayerContribution(const ReSample& re_sample, const Dif * roughStack[i].topRoughness()->autocorrelationModel()->spectralFunction(q); // cross correlation between layers (second term in loc. cit.) - if (crossCorrLength > 0.0) - for (size_t j = 0; j < n_interfaces; j++) - for (size_t k = j + 1; k < n_interfaces; k++) - crosscorr += (rterm[j] * sterm[j] * std::conj(rterm[k] * sterm[k])).real() - * ::crossCorrSpectralFun(q, roughStack, j, k, crossCorrLength); + for (size_t j = 0; j < n_interfaces; j++) { + if (!roughStack[j].topRoughness()->crosscorrelationModel()) + continue; + for (size_t k = j + 1; k < n_interfaces; k++) + crosscorr += (rterm[j] * sterm[j] * std::conj(rterm[k] * sterm[k])).real() + * ::crossCorrSpectralFun(q, roughStack, j, k); + } const double k0 = (2 * pi) / wavelength; return pow(k0, 4) / 16 / pi / pi * (autocorr + 2 * crosscorr); diff --git a/Sim/Export/SampleToPython.cpp b/Sim/Export/SampleToPython.cpp index a9ab49a0cc07ab47280d0ccf6a6ca369cb2a39c7..0912c3bec56b4e5230de68c6d811f9f7803b3d35 100644 --- a/Sim/Export/SampleToPython.cpp +++ b/Sim/Export/SampleToPython.cpp @@ -149,12 +149,15 @@ std::string defineLayers(const ComponentKeyHandler& objHandler, std::string defineRoughnesses(const ComponentKeyHandler& objHandler) { std::vector<const LayerRoughness*> roughness = objHandler.objectsOfType<LayerRoughness>(); - std::vector<const AutocorrelationModel*> autocorr = + std::vector<const AutocorrelationModel*> autocorrelation = objHandler.objectsOfType<AutocorrelationModel>(); std::vector<const InterlayerModel*> interlayer = objHandler.objectsOfType<InterlayerModel>(); + std::vector<const CrosscorrelationModel*> crosscorrelation = + objHandler.objectsOfType<CrosscorrelationModel>(); ASSERT(roughness.size() == interlayer.size()); - ASSERT(roughness.size() == autocorr.size()); + ASSERT(roughness.size() == autocorrelation.size()); + ASSERT(roughness.size() >= crosscorrelation.size()); if (roughness.empty()) return ""; @@ -175,9 +178,9 @@ std::string defineRoughnesses(const ComponentKeyHandler& objHandler) for (size_t i = 0; i < roughness.size(); i++) { if (!roughness[i]->showInScriptOrGui()) continue; - const std::string& key = objHandler.obj2key(autocorr[i]); - result << indent() << key << " = ba." << autocorr[i]->className() << "(" - << autocorr[i]->pythonArguments() << ")\n"; + const std::string& key = objHandler.obj2key(autocorrelation[i]); + result << indent() << key << " = ba." << autocorrelation[i]->className() << "(" + << autocorrelation[i]->pythonArguments() << ")\n"; } result << "\n"; // define interlayers @@ -188,15 +191,29 @@ std::string defineRoughnesses(const ComponentKeyHandler& objHandler) result << indent() << key << " = ba." << interlayer[i]->className() << "()\n"; } result << "\n"; + // define crosscorrelations + if (crosscorrelation.size() > 0) { + for (const auto r : roughness) { + if (!r->showInScriptOrGui()) + continue; + if (const auto cc = r->crosscorrelationModel()) + result << indent() << objHandler.obj2key(cc) << " = ba." << cc->className() << "(" + << cc->pythonArguments() << ")\n"; + } + result << "\n"; + } // define roughnesses - for (size_t i = 0; i < roughness.size(); i++) { - if (!roughness[i]->showInScriptOrGui()) + for (const auto r : roughness) { + if (!r->showInScriptOrGui()) continue; - const std::string& roughness_key = objHandler.obj2key(roughness[i]); - const std::string& autocorr_key = objHandler.obj2key(autocorr[i]); - const std::string& interlayer_key = objHandler.obj2key(interlayer[i]); - result << indent() << roughness_key << " = ba." << roughness[i]->className() << "(" - << autocorr_key << ", " << interlayer_key << ")\n"; + const std::string& roughness_key = objHandler.obj2key(r); + const std::string& autocorr_key = objHandler.obj2key(r->autocorrelationModel()); + const std::string& interlayer_key = objHandler.obj2key(r->interlayerModel()); + result << indent() << roughness_key << " = ba." << r->className() << "(" << autocorr_key + << ", " << interlayer_key; + if (const auto crosscorrelation = r->crosscorrelationModel()) + result << ", " << objHandler.obj2key(crosscorrelation); + result << ")\n"; } return result.str(); } @@ -213,7 +230,6 @@ std::string defineFormfactors(const ComponentKeyHandler& objHandler) const std::string& key = objHandler.obj2key(s); result << indent() << key << " = ba." << s->pythonConstructor() << "\n"; } - return result.str(); } @@ -502,9 +518,6 @@ std::string defineMultiLayers(const ComponentKeyHandler& objHandler) for (const auto* s : v) { const std::string& key = objHandler.obj2key(s); result << indent() << key << " = ba.MultiLayer()\n"; - double ccl = s->crossCorrLength(); - if (ccl > 0.0) - result << indent() << key << ".setCrossCorrLength(" << ccl << ")\n"; auto external_field = s->externalField(); if (external_field.mag() > 0.0) { std::string field_name = key + "_external_field"; @@ -556,6 +569,8 @@ std::string SampleToPython::sampleCode(const MultiLayer& sample) objHandler.insertModel("layer", x); for (const auto* x : NodeUtil::AllDescendantsOfType<LayerRoughness>(sample)) objHandler.insertModel("roughness", x); + for (const auto* x : NodeUtil::AllDescendantsOfType<CrosscorrelationModel>(sample)) + objHandler.insertModel("crosscorrelation", x); for (const auto* x : NodeUtil::AllDescendantsOfType<InterlayerModel>(sample)) objHandler.insertModel("interlayer", x); for (const auto* x : NodeUtil::AllDescendantsOfType<AutocorrelationModel>(sample)) diff --git a/Tests/Unit/Sample/MultiLayerTest.cpp b/Tests/Unit/Sample/MultiLayerTest.cpp index 8c3dbe004411c21c577c8b48f9f9e72e138e74a9..29b10dfff5259d5a7285d300a19c0218522908ef 100644 --- a/Tests/Unit/Sample/MultiLayerTest.cpp +++ b/Tests/Unit/Sample/MultiLayerTest.cpp @@ -38,7 +38,6 @@ protected: TEST_F(MultiLayerTest, BasicProperty) { // check default properties - EXPECT_EQ(0.0, mLayer.crossCorrLength()); EXPECT_EQ(size_t(0), mLayer.numberOfLayers()); // adding layers @@ -108,7 +107,6 @@ TEST_F(MultiLayerTest, Clone) MultiLayer* mLayerClone = mLayer.clone(); // check properties - EXPECT_EQ(0.0, mLayerClone->crossCorrLength()); EXPECT_EQ(size_t(4), mLayerClone->numberOfLayers()); // check layer thickness @@ -122,16 +120,19 @@ TEST_F(MultiLayerTest, Clone) EXPECT_TRUE(nullptr != interface0); EXPECT_TRUE(nullptr != interface0->roughness()); EXPECT_EQ(interface0->roughness()->sigma(), 0.0); + EXPECT_TRUE(nullptr == interface0->roughness()->crosscorrelationModel()); const LayerInterface* interface1 = mLayerClone->layerInterface(1); EXPECT_TRUE(nullptr != interface1); EXPECT_TRUE(nullptr != interface1->roughness()); EXPECT_EQ(interface1->roughness()->sigma(), 0.0); + EXPECT_TRUE(nullptr == interface1->roughness()->crosscorrelationModel()); const LayerInterface* interface2 = mLayerClone->layerInterface(2); EXPECT_TRUE(nullptr != interface2); EXPECT_TRUE(nullptr != interface2->roughness()); EXPECT_EQ(interface2->roughness()->sigma(), 0.0); + EXPECT_TRUE(nullptr == interface2->roughness()->crosscorrelationModel()); delete mLayerClone; } diff --git a/Wrap/Swig/libBornAgainSample.i b/Wrap/Swig/libBornAgainSample.i index 9aaacafc0f2b0bec993c8e815bd629ea13c36f56..2e0e86dcb8cfdc5f93450abd11dceeb81fbee054 100644 --- a/Wrap/Swig/libBornAgainSample.i +++ b/Wrap/Swig/libBornAgainSample.i @@ -105,6 +105,8 @@ %include "Sample/Interface/AutocorrelationModels.h" %include "Sample/Interface/InterlayerModels.h" +%include "Sample/Interface/CrosscorrelationModels.h" + %include "Sample/HardParticle/IFormfactorPolyhedron.h" %include "Sample/HardParticle/IFormfactorPrism.h" diff --git a/auto/Examples/scatter2d/CorrelatedRoughness.py b/auto/Examples/scatter2d/CorrelatedRoughness.py index f5b84991873656ffdd411f2320bc49d604d92622..6a6f5cc882fc4aa50aa3b1d57034349da675f463 100755 --- a/auto/Examples/scatter2d/CorrelatedRoughness.py +++ b/auto/Examples/scatter2d/CorrelatedRoughness.py @@ -25,7 +25,8 @@ def get_sample(): sigma, hurst, corrLength = 1*nm, 0.3, 5*nm autocorr = ba.K_CorrelationModel(sigma, hurst, corrLength) interlayer = ba.TanhInterlayer() - roughness = ba.LayerRoughness(autocorr, interlayer) + crosscorrelation = ba.CommonDepthCrosscorrelation(10*nm) + roughness = ba.LayerRoughness(autocorr, interlayer, crosscorrelation) my_sample = ba.MultiLayer() @@ -38,7 +39,6 @@ def get_sample(): my_sample.addLayerWithTopRoughness(l_part_b, roughness) my_sample.addLayerWithTopRoughness(l_substrate, roughness) - my_sample.setCrossCorrLength(10*nm) return my_sample diff --git a/auto/MiniExamples/scatter2d/CorrelatedRoughness.py b/auto/MiniExamples/scatter2d/CorrelatedRoughness.py index d5daf8a7168a1db02c6c2154799ee8e232032891..a7e366a2f61aa7a8796d7776271580bd20da1823 100755 --- a/auto/MiniExamples/scatter2d/CorrelatedRoughness.py +++ b/auto/MiniExamples/scatter2d/CorrelatedRoughness.py @@ -25,7 +25,8 @@ def get_sample(): sigma, hurst, corrLength = 1*nm, 0.3, 5*nm autocorr = ba.K_CorrelationModel(sigma, hurst, corrLength) interlayer = ba.TanhInterlayer() - roughness = ba.LayerRoughness(autocorr, interlayer) + crosscorrelation = ba.CommonDepthCrosscorrelation(10*nm) + roughness = ba.LayerRoughness(autocorr, interlayer, crosscorrelation) my_sample = ba.MultiLayer() @@ -38,7 +39,6 @@ def get_sample(): my_sample.addLayerWithTopRoughness(l_part_b, roughness) my_sample.addLayerWithTopRoughness(l_substrate, roughness) - my_sample.setCrossCorrLength(10*nm) return my_sample diff --git a/auto/Wrap/libBornAgainSample.py b/auto/Wrap/libBornAgainSample.py index ae5d6ac11652e54fc3424b200e986d54fe4c6745..48054397ad9d91ad69c65fc31b10d022f50c9adc 100644 --- a/auto/Wrap/libBornAgainSample.py +++ b/auto/Wrap/libBornAgainSample.py @@ -4175,9 +4175,9 @@ class LayerRoughness(ISampleNode): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr - def __init__(self, autocorrelation, interlayer): - r"""__init__(LayerRoughness self, AutocorrelationModel autocorrelation, InterlayerModel interlayer) -> LayerRoughness""" - _libBornAgainSample.LayerRoughness_swiginit(self, _libBornAgainSample.new_LayerRoughness(autocorrelation, interlayer)) + def __init__(self, autocorrelation, interlayer, crosscorrelation=None): + r"""__init__(LayerRoughness self, AutocorrelationModel autocorrelation, InterlayerModel interlayer, CrosscorrelationModel crosscorrelation=None) -> LayerRoughness""" + _libBornAgainSample.LayerRoughness_swiginit(self, _libBornAgainSample.new_LayerRoughness(autocorrelation, interlayer, crosscorrelation)) def clone(self): r"""clone(LayerRoughness self) -> LayerRoughness""" @@ -4210,6 +4210,14 @@ class LayerRoughness(ISampleNode): def interlayerModel(self): r"""interlayerModel(LayerRoughness self) -> InterlayerModel""" return _libBornAgainSample.LayerRoughness_interlayerModel(self) + + def setCrosscorrelationModel(self, crosscorrelation): + r"""setCrosscorrelationModel(LayerRoughness self, CrosscorrelationModel crosscorrelation)""" + return _libBornAgainSample.LayerRoughness_setCrosscorrelationModel(self, crosscorrelation) + + def crosscorrelationModel(self): + r"""crosscorrelationModel(LayerRoughness self) -> CrosscorrelationModel""" + return _libBornAgainSample.LayerRoughness_crosscorrelationModel(self) __swig_destroy__ = _libBornAgainSample.delete_LayerRoughness # Register LayerRoughness in _libBornAgainSample: @@ -4295,10 +4303,6 @@ class MultiLayer(ISampleNode): r"""addLayerWithTopRoughness(MultiLayer self, Layer layer, LayerRoughness roughness)""" return _libBornAgainSample.MultiLayer_addLayerWithTopRoughness(self, layer, roughness) - def setCrossCorrLength(self, crossCorrLength): - r"""setCrossCorrLength(MultiLayer self, double crossCorrLength)""" - return _libBornAgainSample.MultiLayer_setCrossCorrLength(self, crossCorrLength) - def setExternalField(self, ext_field): r"""setExternalField(MultiLayer self, R3 ext_field)""" return _libBornAgainSample.MultiLayer_setExternalField(self, ext_field) @@ -4492,6 +4496,67 @@ class TanhInterlayer(InterlayerModel): # Register TanhInterlayer in _libBornAgainSample: _libBornAgainSample.TanhInterlayer_swigregister(TanhInterlayer) +class CrosscorrelationModel(libBornAgainBase.ICloneable, libBornAgainParam.INode): + r"""Proxy of C++ CrosscorrelationModel class.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clone(self): + r"""clone(CrosscorrelationModel self) -> CrosscorrelationModel""" + return _libBornAgainSample.CrosscorrelationModel_clone(self) + + def crossCorrDepth(self, k): + r"""crossCorrDepth(CrosscorrelationModel self, R3 k) -> double""" + return _libBornAgainSample.CrosscorrelationModel_crossCorrDepth(self, k) + + def replicationFactor(self, k, thickness): + r"""replicationFactor(CrosscorrelationModel self, R3 k, double thickness) -> double""" + return _libBornAgainSample.CrosscorrelationModel_replicationFactor(self, k, thickness) + __swig_destroy__ = _libBornAgainSample.delete_CrosscorrelationModel + +# Register CrosscorrelationModel in _libBornAgainSample: +_libBornAgainSample.CrosscorrelationModel_swigregister(CrosscorrelationModel) +class CommonDepthCrosscorrelation(CrosscorrelationModel): + r"""Proxy of C++ CommonDepthCrosscorrelation class.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def __init__(self, cross_corr_depth=0): + r"""__init__(CommonDepthCrosscorrelation self, double cross_corr_depth=0) -> CommonDepthCrosscorrelation""" + _libBornAgainSample.CommonDepthCrosscorrelation_swiginit(self, _libBornAgainSample.new_CommonDepthCrosscorrelation(cross_corr_depth)) + + def clone(self): + r"""clone(CommonDepthCrosscorrelation self) -> CommonDepthCrosscorrelation""" + return _libBornAgainSample.CommonDepthCrosscorrelation_clone(self) + + def className(self): + r"""className(CommonDepthCrosscorrelation self) -> std::string""" + return _libBornAgainSample.CommonDepthCrosscorrelation_className(self) + + def validate(self): + r"""validate(CommonDepthCrosscorrelation self) -> std::string""" + return _libBornAgainSample.CommonDepthCrosscorrelation_validate(self) + + def crossCorrDepth(self, arg2): + r"""crossCorrDepth(CommonDepthCrosscorrelation self, R3 arg2) -> double""" + return _libBornAgainSample.CommonDepthCrosscorrelation_crossCorrDepth(self, arg2) + + def replicationFactor(self, arg2, thickness): + r"""replicationFactor(CommonDepthCrosscorrelation self, R3 arg2, double thickness) -> double""" + return _libBornAgainSample.CommonDepthCrosscorrelation_replicationFactor(self, arg2, thickness) + + def parDefs(self): + r"""parDefs(CommonDepthCrosscorrelation self) -> std::vector< ParaMeta,std::allocator< ParaMeta > >""" + return _libBornAgainSample.CommonDepthCrosscorrelation_parDefs(self) + __swig_destroy__ = _libBornAgainSample.delete_CommonDepthCrosscorrelation + +# Register CommonDepthCrosscorrelation in _libBornAgainSample: +_libBornAgainSample.CommonDepthCrosscorrelation_swigregister(CommonDepthCrosscorrelation) class IFormfactorPolyhedron(IFormfactor): r"""Proxy of C++ IFormfactorPolyhedron class.""" diff --git a/auto/Wrap/libBornAgainSample_wrap.cpp b/auto/Wrap/libBornAgainSample_wrap.cpp index 2e086c100c4623200c9eb46a32f50d7c7bb4eeb0..483777083f0846b065bfc280d18f4edf912829d9 100644 --- a/auto/Wrap/libBornAgainSample_wrap.cpp +++ b/auto/Wrap/libBornAgainSample_wrap.cpp @@ -3652,164 +3652,166 @@ namespace Swig { #define SWIGTYPE_p_Bipyramid4 swig_types[4] #define SWIGTYPE_p_Box swig_types[5] #define SWIGTYPE_p_CantellatedCube swig_types[6] -#define SWIGTYPE_p_Compound swig_types[7] -#define SWIGTYPE_p_Cone swig_types[8] -#define SWIGTYPE_p_CoreAndShell swig_types[9] -#define SWIGTYPE_p_CosineRippleBox swig_types[10] -#define SWIGTYPE_p_CosineRippleGauss swig_types[11] -#define SWIGTYPE_p_CosineRippleLorentz swig_types[12] -#define SWIGTYPE_p_Crystal swig_types[13] -#define SWIGTYPE_p_Cylinder swig_types[14] -#define SWIGTYPE_p_Dodecahedron swig_types[15] -#define SWIGTYPE_p_EllipsoidalCylinder swig_types[16] -#define SWIGTYPE_p_ErfInterlayer swig_types[17] -#define SWIGTYPE_p_FuzzySphere swig_types[18] -#define SWIGTYPE_p_GaussFisherPeakShape swig_types[19] -#define SWIGTYPE_p_GaussSphere swig_types[20] -#define SWIGTYPE_p_HemiEllipsoid swig_types[21] -#define SWIGTYPE_p_HexagonalLattice2D swig_types[22] -#define SWIGTYPE_p_HorizontalCylinder swig_types[23] -#define SWIGTYPE_p_ICloneable swig_types[24] -#define SWIGTYPE_p_ICosineRipple swig_types[25] -#define SWIGTYPE_p_IFormfactor swig_types[26] -#define SWIGTYPE_p_IFormfactorPolyhedron swig_types[27] -#define SWIGTYPE_p_IFormfactorPrism swig_types[28] -#define SWIGTYPE_p_IInterference swig_types[29] -#define SWIGTYPE_p_IMaterialImpl swig_types[30] -#define SWIGTYPE_p_INode swig_types[31] -#define SWIGTYPE_p_IParticle swig_types[32] -#define SWIGTYPE_p_IPeakShape swig_types[33] -#define SWIGTYPE_p_IProfile1D swig_types[34] -#define SWIGTYPE_p_IProfile2D swig_types[35] -#define SWIGTYPE_p_IProfileRectangularRipple swig_types[36] -#define SWIGTYPE_p_IProfileRipple swig_types[37] -#define SWIGTYPE_p_IRotation swig_types[38] -#define SWIGTYPE_p_ISampleNode swig_types[39] -#define SWIGTYPE_p_ISawtoothRipple swig_types[40] -#define SWIGTYPE_p_ISelectionRule swig_types[41] -#define SWIGTYPE_p_Icosahedron swig_types[42] -#define SWIGTYPE_p_IdentityRotation swig_types[43] -#define SWIGTYPE_p_Interference1DLattice swig_types[44] -#define SWIGTYPE_p_Interference2DLattice swig_types[45] -#define SWIGTYPE_p_Interference2DParacrystal swig_types[46] -#define SWIGTYPE_p_Interference2DSuperLattice swig_types[47] -#define SWIGTYPE_p_InterferenceFinite2DLattice swig_types[48] -#define SWIGTYPE_p_InterferenceHardDisk swig_types[49] -#define SWIGTYPE_p_InterferenceNone swig_types[50] -#define SWIGTYPE_p_InterferenceRadialParacrystal swig_types[51] -#define SWIGTYPE_p_InterlayerModel swig_types[52] -#define SWIGTYPE_p_IsotropicGaussPeakShape swig_types[53] -#define SWIGTYPE_p_IsotropicLorentzPeakShape swig_types[54] -#define SWIGTYPE_p_K_CorrelationModel swig_types[55] -#define SWIGTYPE_p_Lattice2D swig_types[56] -#define SWIGTYPE_p_Lattice2D__ReciprocalBases swig_types[57] -#define SWIGTYPE_p_Lattice3D swig_types[58] -#define SWIGTYPE_p_Layer swig_types[59] -#define SWIGTYPE_p_LayerRoughness swig_types[60] -#define SWIGTYPE_p_LongBoxGauss swig_types[61] -#define SWIGTYPE_p_LongBoxLorentz swig_types[62] -#define SWIGTYPE_p_LorentzFisherPeakShape swig_types[63] -#define SWIGTYPE_p_Material swig_types[64] -#define SWIGTYPE_p_MaterialBySLDImpl swig_types[65] -#define SWIGTYPE_p_Mesocrystal swig_types[66] -#define SWIGTYPE_p_MisesFisherGaussPeakShape swig_types[67] -#define SWIGTYPE_p_MisesGaussPeakShape swig_types[68] -#define SWIGTYPE_p_MultiLayer swig_types[69] -#define SWIGTYPE_p_Particle swig_types[70] -#define SWIGTYPE_p_ParticleLayout swig_types[71] -#define SWIGTYPE_p_PlatonicOctahedron swig_types[72] -#define SWIGTYPE_p_PlatonicTetrahedron swig_types[73] -#define SWIGTYPE_p_Prism3 swig_types[74] -#define SWIGTYPE_p_Prism6 swig_types[75] -#define SWIGTYPE_p_Profile1DCauchy swig_types[76] -#define SWIGTYPE_p_Profile1DCosine swig_types[77] -#define SWIGTYPE_p_Profile1DGate swig_types[78] -#define SWIGTYPE_p_Profile1DGauss swig_types[79] -#define SWIGTYPE_p_Profile1DTriangle swig_types[80] -#define SWIGTYPE_p_Profile1DVoigt swig_types[81] -#define SWIGTYPE_p_Profile2DCauchy swig_types[82] -#define SWIGTYPE_p_Profile2DCone swig_types[83] -#define SWIGTYPE_p_Profile2DGate swig_types[84] -#define SWIGTYPE_p_Profile2DGauss swig_types[85] -#define SWIGTYPE_p_Profile2DVoigt swig_types[86] -#define SWIGTYPE_p_Pyramid2 swig_types[87] -#define SWIGTYPE_p_Pyramid3 swig_types[88] -#define SWIGTYPE_p_Pyramid4 swig_types[89] -#define SWIGTYPE_p_Pyramid6 swig_types[90] -#define SWIGTYPE_p_RefractiveMaterialImpl swig_types[91] -#define SWIGTYPE_p_Rotation3DT_double_t swig_types[92] -#define SWIGTYPE_p_RotationEuler swig_types[93] -#define SWIGTYPE_p_RotationX swig_types[94] -#define SWIGTYPE_p_RotationY swig_types[95] -#define SWIGTYPE_p_RotationZ swig_types[96] -#define SWIGTYPE_p_RoughnessMap swig_types[97] -#define SWIGTYPE_p_SawtoothRippleBox swig_types[98] -#define SWIGTYPE_p_SawtoothRippleGauss swig_types[99] -#define SWIGTYPE_p_SawtoothRippleLorentz swig_types[100] -#define SWIGTYPE_p_SimpleSelectionRule swig_types[101] -#define SWIGTYPE_p_Span swig_types[102] -#define SWIGTYPE_p_Sphere swig_types[103] -#define SWIGTYPE_p_Spheroid swig_types[104] -#define SWIGTYPE_p_SpinMatrix swig_types[105] -#define SWIGTYPE_p_SquareLattice2D swig_types[106] -#define SWIGTYPE_p_TanhInterlayer swig_types[107] -#define SWIGTYPE_p_TruncatedCube swig_types[108] -#define SWIGTYPE_p_TruncatedSphere swig_types[109] -#define SWIGTYPE_p_TruncatedSpheroid swig_types[110] -#define SWIGTYPE_p_Vec3T_double_t swig_types[111] -#define SWIGTYPE_p_Vec3T_int_t swig_types[112] -#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[113] -#define SWIGTYPE_p_WavevectorInfo swig_types[114] -#define SWIGTYPE_p_allocator_type swig_types[115] -#define SWIGTYPE_p_char swig_types[116] -#define SWIGTYPE_p_difference_type swig_types[117] -#define SWIGTYPE_p_double2d_t swig_types[118] -#define SWIGTYPE_p_first_type swig_types[119] -#define SWIGTYPE_p_int swig_types[120] -#define SWIGTYPE_p_key_type swig_types[121] -#define SWIGTYPE_p_long_long swig_types[122] -#define SWIGTYPE_p_mapped_type swig_types[123] -#define SWIGTYPE_p_p_PyObject swig_types[124] -#define SWIGTYPE_p_second_type swig_types[125] -#define SWIGTYPE_p_short swig_types[126] -#define SWIGTYPE_p_signed_char swig_types[127] -#define SWIGTYPE_p_size_type swig_types[128] -#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[129] -#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[130] -#define SWIGTYPE_p_std__allocatorT_double_t swig_types[131] -#define SWIGTYPE_p_std__allocatorT_int_t swig_types[132] -#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[133] -#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[134] -#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[135] -#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[136] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_t_t swig_types[137] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_t_t swig_types[138] -#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[139] -#define SWIGTYPE_p_std__complexT_double_t swig_types[140] -#define SWIGTYPE_p_std__functionT_double_fdoubleF_t swig_types[141] -#define SWIGTYPE_p_std__invalid_argument swig_types[142] -#define SWIGTYPE_p_std__lessT_std__string_t swig_types[143] -#define SWIGTYPE_p_std__mapT_std__string_double_t swig_types[144] -#define SWIGTYPE_p_std__pairT_double_double_t swig_types[145] -#define SWIGTYPE_p_std__vectorT_INode_const_p_t swig_types[146] -#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[147] -#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_t swig_types[148] -#define SWIGTYPE_p_std__vectorT_double_t swig_types[149] -#define SWIGTYPE_p_std__vectorT_int_t swig_types[150] -#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_t swig_types[151] -#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_t swig_types[152] -#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[153] -#define SWIGTYPE_p_std__vectorT_std__vectorT_double_t_t swig_types[154] -#define SWIGTYPE_p_std__vectorT_std__vectorT_int_t_t swig_types[155] -#define SWIGTYPE_p_std__vectorT_unsigned_long_t swig_types[156] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[157] -#define SWIGTYPE_p_unsigned_char swig_types[158] -#define SWIGTYPE_p_unsigned_int swig_types[159] -#define SWIGTYPE_p_unsigned_long_long swig_types[160] -#define SWIGTYPE_p_unsigned_short swig_types[161] -#define SWIGTYPE_p_value_type swig_types[162] -static swig_type_info *swig_types[164]; -static swig_module_info swig_module = {swig_types, 163, 0, 0, 0, 0}; +#define SWIGTYPE_p_CommonDepthCrosscorrelation swig_types[7] +#define SWIGTYPE_p_Compound swig_types[8] +#define SWIGTYPE_p_Cone swig_types[9] +#define SWIGTYPE_p_CoreAndShell swig_types[10] +#define SWIGTYPE_p_CosineRippleBox swig_types[11] +#define SWIGTYPE_p_CosineRippleGauss swig_types[12] +#define SWIGTYPE_p_CosineRippleLorentz swig_types[13] +#define SWIGTYPE_p_CrosscorrelationModel swig_types[14] +#define SWIGTYPE_p_Crystal swig_types[15] +#define SWIGTYPE_p_Cylinder swig_types[16] +#define SWIGTYPE_p_Dodecahedron swig_types[17] +#define SWIGTYPE_p_EllipsoidalCylinder swig_types[18] +#define SWIGTYPE_p_ErfInterlayer swig_types[19] +#define SWIGTYPE_p_FuzzySphere swig_types[20] +#define SWIGTYPE_p_GaussFisherPeakShape swig_types[21] +#define SWIGTYPE_p_GaussSphere swig_types[22] +#define SWIGTYPE_p_HemiEllipsoid swig_types[23] +#define SWIGTYPE_p_HexagonalLattice2D swig_types[24] +#define SWIGTYPE_p_HorizontalCylinder swig_types[25] +#define SWIGTYPE_p_ICloneable swig_types[26] +#define SWIGTYPE_p_ICosineRipple swig_types[27] +#define SWIGTYPE_p_IFormfactor swig_types[28] +#define SWIGTYPE_p_IFormfactorPolyhedron swig_types[29] +#define SWIGTYPE_p_IFormfactorPrism swig_types[30] +#define SWIGTYPE_p_IInterference swig_types[31] +#define SWIGTYPE_p_IMaterialImpl swig_types[32] +#define SWIGTYPE_p_INode swig_types[33] +#define SWIGTYPE_p_IParticle swig_types[34] +#define SWIGTYPE_p_IPeakShape swig_types[35] +#define SWIGTYPE_p_IProfile1D swig_types[36] +#define SWIGTYPE_p_IProfile2D swig_types[37] +#define SWIGTYPE_p_IProfileRectangularRipple swig_types[38] +#define SWIGTYPE_p_IProfileRipple swig_types[39] +#define SWIGTYPE_p_IRotation swig_types[40] +#define SWIGTYPE_p_ISampleNode swig_types[41] +#define SWIGTYPE_p_ISawtoothRipple swig_types[42] +#define SWIGTYPE_p_ISelectionRule swig_types[43] +#define SWIGTYPE_p_Icosahedron swig_types[44] +#define SWIGTYPE_p_IdentityRotation swig_types[45] +#define SWIGTYPE_p_Interference1DLattice swig_types[46] +#define SWIGTYPE_p_Interference2DLattice swig_types[47] +#define SWIGTYPE_p_Interference2DParacrystal swig_types[48] +#define SWIGTYPE_p_Interference2DSuperLattice swig_types[49] +#define SWIGTYPE_p_InterferenceFinite2DLattice swig_types[50] +#define SWIGTYPE_p_InterferenceHardDisk swig_types[51] +#define SWIGTYPE_p_InterferenceNone swig_types[52] +#define SWIGTYPE_p_InterferenceRadialParacrystal swig_types[53] +#define SWIGTYPE_p_InterlayerModel swig_types[54] +#define SWIGTYPE_p_IsotropicGaussPeakShape swig_types[55] +#define SWIGTYPE_p_IsotropicLorentzPeakShape swig_types[56] +#define SWIGTYPE_p_K_CorrelationModel swig_types[57] +#define SWIGTYPE_p_Lattice2D swig_types[58] +#define SWIGTYPE_p_Lattice2D__ReciprocalBases swig_types[59] +#define SWIGTYPE_p_Lattice3D swig_types[60] +#define SWIGTYPE_p_Layer swig_types[61] +#define SWIGTYPE_p_LayerRoughness swig_types[62] +#define SWIGTYPE_p_LongBoxGauss swig_types[63] +#define SWIGTYPE_p_LongBoxLorentz swig_types[64] +#define SWIGTYPE_p_LorentzFisherPeakShape swig_types[65] +#define SWIGTYPE_p_Material swig_types[66] +#define SWIGTYPE_p_MaterialBySLDImpl swig_types[67] +#define SWIGTYPE_p_Mesocrystal swig_types[68] +#define SWIGTYPE_p_MisesFisherGaussPeakShape swig_types[69] +#define SWIGTYPE_p_MisesGaussPeakShape swig_types[70] +#define SWIGTYPE_p_MultiLayer swig_types[71] +#define SWIGTYPE_p_Particle swig_types[72] +#define SWIGTYPE_p_ParticleLayout swig_types[73] +#define SWIGTYPE_p_PlatonicOctahedron swig_types[74] +#define SWIGTYPE_p_PlatonicTetrahedron swig_types[75] +#define SWIGTYPE_p_Prism3 swig_types[76] +#define SWIGTYPE_p_Prism6 swig_types[77] +#define SWIGTYPE_p_Profile1DCauchy swig_types[78] +#define SWIGTYPE_p_Profile1DCosine swig_types[79] +#define SWIGTYPE_p_Profile1DGate swig_types[80] +#define SWIGTYPE_p_Profile1DGauss swig_types[81] +#define SWIGTYPE_p_Profile1DTriangle swig_types[82] +#define SWIGTYPE_p_Profile1DVoigt swig_types[83] +#define SWIGTYPE_p_Profile2DCauchy swig_types[84] +#define SWIGTYPE_p_Profile2DCone swig_types[85] +#define SWIGTYPE_p_Profile2DGate swig_types[86] +#define SWIGTYPE_p_Profile2DGauss swig_types[87] +#define SWIGTYPE_p_Profile2DVoigt swig_types[88] +#define SWIGTYPE_p_Pyramid2 swig_types[89] +#define SWIGTYPE_p_Pyramid3 swig_types[90] +#define SWIGTYPE_p_Pyramid4 swig_types[91] +#define SWIGTYPE_p_Pyramid6 swig_types[92] +#define SWIGTYPE_p_RefractiveMaterialImpl swig_types[93] +#define SWIGTYPE_p_Rotation3DT_double_t swig_types[94] +#define SWIGTYPE_p_RotationEuler swig_types[95] +#define SWIGTYPE_p_RotationX swig_types[96] +#define SWIGTYPE_p_RotationY swig_types[97] +#define SWIGTYPE_p_RotationZ swig_types[98] +#define SWIGTYPE_p_RoughnessMap swig_types[99] +#define SWIGTYPE_p_SawtoothRippleBox swig_types[100] +#define SWIGTYPE_p_SawtoothRippleGauss swig_types[101] +#define SWIGTYPE_p_SawtoothRippleLorentz swig_types[102] +#define SWIGTYPE_p_SimpleSelectionRule swig_types[103] +#define SWIGTYPE_p_Span swig_types[104] +#define SWIGTYPE_p_Sphere swig_types[105] +#define SWIGTYPE_p_Spheroid swig_types[106] +#define SWIGTYPE_p_SpinMatrix swig_types[107] +#define SWIGTYPE_p_SquareLattice2D swig_types[108] +#define SWIGTYPE_p_TanhInterlayer swig_types[109] +#define SWIGTYPE_p_TruncatedCube swig_types[110] +#define SWIGTYPE_p_TruncatedSphere swig_types[111] +#define SWIGTYPE_p_TruncatedSpheroid swig_types[112] +#define SWIGTYPE_p_Vec3T_double_t swig_types[113] +#define SWIGTYPE_p_Vec3T_int_t swig_types[114] +#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[115] +#define SWIGTYPE_p_WavevectorInfo swig_types[116] +#define SWIGTYPE_p_allocator_type swig_types[117] +#define SWIGTYPE_p_char swig_types[118] +#define SWIGTYPE_p_difference_type swig_types[119] +#define SWIGTYPE_p_double2d_t swig_types[120] +#define SWIGTYPE_p_first_type swig_types[121] +#define SWIGTYPE_p_int swig_types[122] +#define SWIGTYPE_p_key_type swig_types[123] +#define SWIGTYPE_p_long_long swig_types[124] +#define SWIGTYPE_p_mapped_type swig_types[125] +#define SWIGTYPE_p_p_PyObject swig_types[126] +#define SWIGTYPE_p_second_type swig_types[127] +#define SWIGTYPE_p_short swig_types[128] +#define SWIGTYPE_p_signed_char swig_types[129] +#define SWIGTYPE_p_size_type swig_types[130] +#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[131] +#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[132] +#define SWIGTYPE_p_std__allocatorT_double_t swig_types[133] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[134] +#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[135] +#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[136] +#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[137] +#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[138] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_t_t swig_types[139] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_t_t swig_types[140] +#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[141] +#define SWIGTYPE_p_std__complexT_double_t swig_types[142] +#define SWIGTYPE_p_std__functionT_double_fdoubleF_t swig_types[143] +#define SWIGTYPE_p_std__invalid_argument swig_types[144] +#define SWIGTYPE_p_std__lessT_std__string_t swig_types[145] +#define SWIGTYPE_p_std__mapT_std__string_double_t swig_types[146] +#define SWIGTYPE_p_std__pairT_double_double_t swig_types[147] +#define SWIGTYPE_p_std__vectorT_INode_const_p_t swig_types[148] +#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[149] +#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_t swig_types[150] +#define SWIGTYPE_p_std__vectorT_double_t swig_types[151] +#define SWIGTYPE_p_std__vectorT_int_t swig_types[152] +#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_t swig_types[153] +#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_t swig_types[154] +#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[155] +#define SWIGTYPE_p_std__vectorT_std__vectorT_double_t_t swig_types[156] +#define SWIGTYPE_p_std__vectorT_std__vectorT_int_t_t swig_types[157] +#define SWIGTYPE_p_std__vectorT_unsigned_long_t swig_types[158] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[159] +#define SWIGTYPE_p_unsigned_char swig_types[160] +#define SWIGTYPE_p_unsigned_int swig_types[161] +#define SWIGTYPE_p_unsigned_long_long swig_types[162] +#define SWIGTYPE_p_unsigned_short swig_types[163] +#define SWIGTYPE_p_value_type swig_types[164] +static swig_type_info *swig_types[166]; +static swig_module_info swig_module = {swig_types, 165, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -50494,19 +50496,66 @@ SWIGINTERN PyObject *ParticleLayout_swiginit(PyObject *SWIGUNUSEDPARM(self), PyO return SWIG_Python_InitShadowInstance(args); } -SWIGINTERN PyObject *_wrap_new_LayerRoughness(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_new_LayerRoughness__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; AutocorrelationModel *arg1 = (AutocorrelationModel *) 0 ; InterlayerModel *arg2 = (InterlayerModel *) 0 ; + CrosscorrelationModel *arg3 = (CrosscorrelationModel *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - PyObject *swig_obj[2] ; + void *argp3 = 0 ; + int res3 = 0 ; LayerRoughness *result = 0 ; (void)self; - if (!SWIG_Python_UnpackTuple(args, "new_LayerRoughness", 2, 2, swig_obj)) SWIG_fail; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_AutocorrelationModel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LayerRoughness" "', argument " "1"" of type '" "AutocorrelationModel const *""'"); + } + arg1 = reinterpret_cast< AutocorrelationModel * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_InterlayerModel, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LayerRoughness" "', argument " "2"" of type '" "InterlayerModel const *""'"); + } + arg2 = reinterpret_cast< InterlayerModel * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_CrosscorrelationModel, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LayerRoughness" "', argument " "3"" of type '" "CrosscorrelationModel const *""'"); + } + arg3 = reinterpret_cast< CrosscorrelationModel * >(argp3); + { + try { + result = (LayerRoughness *)new LayerRoughness((AutocorrelationModel const *)arg1,(InterlayerModel const *)arg2,(CrosscorrelationModel const *)arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LayerRoughness, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LayerRoughness__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + AutocorrelationModel *arg1 = (AutocorrelationModel *) 0 ; + InterlayerModel *arg2 = (InterlayerModel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + LayerRoughness *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_AutocorrelationModel, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LayerRoughness" "', argument " "1"" of type '" "AutocorrelationModel const *""'"); @@ -50535,6 +50584,57 @@ fail: } +SWIGINTERN PyObject *_wrap_new_LayerRoughness(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_LayerRoughness", 0, 3, argv))) SWIG_fail; + --argc; + if (argc == 2) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AutocorrelationModel, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_InterlayerModel, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_LayerRoughness__SWIG_1(self, argc, argv); + } + } + } + if (argc == 3) { + int _v = 0; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AutocorrelationModel, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_InterlayerModel, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_CrosscorrelationModel, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_LayerRoughness__SWIG_0(self, argc, argv); + } + } + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_LayerRoughness'.\n" + " Possible C/C++ prototypes are:\n" + " LayerRoughness::LayerRoughness(AutocorrelationModel const *,InterlayerModel const *,CrosscorrelationModel const *)\n" + " LayerRoughness::LayerRoughness(AutocorrelationModel const *,InterlayerModel const *)\n"); + return 0; +} + + SWIGINTERN PyObject *_wrap_LayerRoughness_clone(PyObject *self, PyObject *args) { PyObject *resultobj = 0; LayerRoughness *arg1 = (LayerRoughness *) 0 ; @@ -50819,6 +50919,80 @@ fail: } +SWIGINTERN PyObject *_wrap_LayerRoughness_setCrosscorrelationModel(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + LayerRoughness *arg1 = (LayerRoughness *) 0 ; + CrosscorrelationModel *arg2 = (CrosscorrelationModel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "LayerRoughness_setCrosscorrelationModel", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_LayerRoughness, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_setCrosscorrelationModel" "', argument " "1"" of type '" "LayerRoughness *""'"); + } + arg1 = reinterpret_cast< LayerRoughness * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_CrosscorrelationModel, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LayerRoughness_setCrosscorrelationModel" "', argument " "2"" of type '" "CrosscorrelationModel const *""'"); + } + arg2 = reinterpret_cast< CrosscorrelationModel * >(argp2); + { + try { + (arg1)->setCrosscorrelationModel((CrosscorrelationModel const *)arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LayerRoughness_crosscorrelationModel(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + LayerRoughness *arg1 = (LayerRoughness *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + CrosscorrelationModel *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_LayerRoughness, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LayerRoughness_crosscorrelationModel" "', argument " "1"" of type '" "LayerRoughness const *""'"); + } + arg1 = reinterpret_cast< LayerRoughness * >(argp1); + { + try { + result = (CrosscorrelationModel *)((LayerRoughness const *)arg1)->crosscorrelationModel(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CrosscorrelationModel, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_delete_LayerRoughness(PyObject *self, PyObject *args) { PyObject *resultobj = 0; LayerRoughness *arg1 = (LayerRoughness *) 0 ; @@ -51770,46 +51944,6 @@ fail: } -SWIGINTERN PyObject *_wrap_MultiLayer_setCrossCorrLength(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - MultiLayer *arg1 = (MultiLayer *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject *swig_obj[2] ; - - (void)self; - if (!SWIG_Python_UnpackTuple(args, "MultiLayer_setCrossCorrLength", 2, 2, swig_obj)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_MultiLayer, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiLayer_setCrossCorrLength" "', argument " "1"" of type '" "MultiLayer *""'"); - } - arg1 = reinterpret_cast< MultiLayer * >(argp1); - ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiLayer_setCrossCorrLength" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - { - try { - (arg1)->setCrossCorrLength(arg2); - } catch (const std::exception& ex) { - // message shown in the Python interpreter - const std::string msg { - "BornAgain C++ Exception: " + std::string(ex.what()) - }; - SWIG_exception(SWIG_RuntimeError, msg.c_str()); - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_MultiLayer_setExternalField(PyObject *self, PyObject *args) { PyObject *resultobj = 0; MultiLayer *arg1 = (MultiLayer *) 0 ; @@ -53559,6 +53693,539 @@ SWIGINTERN PyObject *TanhInterlayer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyO return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_CrosscorrelationModel_clone(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CrosscorrelationModel *arg1 = (CrosscorrelationModel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + CrosscorrelationModel *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CrosscorrelationModel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrosscorrelationModel_clone" "', argument " "1"" of type '" "CrosscorrelationModel const *""'"); + } + arg1 = reinterpret_cast< CrosscorrelationModel * >(argp1); + { + try { + result = (CrosscorrelationModel *)((CrosscorrelationModel const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CrosscorrelationModel, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CrosscorrelationModel_crossCorrDepth(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CrosscorrelationModel *arg1 = (CrosscorrelationModel *) 0 ; + R3 *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + double result; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "CrosscorrelationModel_crossCorrDepth", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CrosscorrelationModel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrosscorrelationModel_crossCorrDepth" "', argument " "1"" of type '" "CrosscorrelationModel const *""'"); + } + arg1 = reinterpret_cast< CrosscorrelationModel * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Vec3T_double_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CrosscorrelationModel_crossCorrDepth" "', argument " "2"" of type '" "R3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CrosscorrelationModel_crossCorrDepth" "', argument " "2"" of type '" "R3 const &""'"); + } + arg2 = reinterpret_cast< R3 * >(argp2); + { + try { + result = (double)((CrosscorrelationModel const *)arg1)->crossCorrDepth((R3 const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CrosscorrelationModel_replicationFactor(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CrosscorrelationModel *arg1 = (CrosscorrelationModel *) 0 ; + R3 *arg2 = 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + double result; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "CrosscorrelationModel_replicationFactor", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CrosscorrelationModel, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CrosscorrelationModel_replicationFactor" "', argument " "1"" of type '" "CrosscorrelationModel const *""'"); + } + arg1 = reinterpret_cast< CrosscorrelationModel * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Vec3T_double_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CrosscorrelationModel_replicationFactor" "', argument " "2"" of type '" "R3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CrosscorrelationModel_replicationFactor" "', argument " "2"" of type '" "R3 const &""'"); + } + arg2 = reinterpret_cast< R3 * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CrosscorrelationModel_replicationFactor" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (double)((CrosscorrelationModel const *)arg1)->replicationFactor((R3 const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CrosscorrelationModel(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CrosscorrelationModel *arg1 = (CrosscorrelationModel *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CrosscorrelationModel, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CrosscorrelationModel" "', argument " "1"" of type '" "CrosscorrelationModel *""'"); + } + arg1 = reinterpret_cast< CrosscorrelationModel * >(argp1); + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CrosscorrelationModel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CrosscorrelationModel, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_CommonDepthCrosscorrelation__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + CommonDepthCrosscorrelation *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CommonDepthCrosscorrelation" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (CommonDepthCrosscorrelation *)new CommonDepthCrosscorrelation(arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CommonDepthCrosscorrelation, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CommonDepthCrosscorrelation__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + { + try { + result = (CommonDepthCrosscorrelation *)new CommonDepthCrosscorrelation(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CommonDepthCrosscorrelation, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CommonDepthCrosscorrelation(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_CommonDepthCrosscorrelation", 0, 1, argv))) SWIG_fail; + --argc; + if (argc == 0) { + return _wrap_new_CommonDepthCrosscorrelation__SWIG_1(self, argc, argv); + } + if (argc == 1) { + int _v = 0; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CommonDepthCrosscorrelation__SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CommonDepthCrosscorrelation'.\n" + " Possible C/C++ prototypes are:\n" + " CommonDepthCrosscorrelation::CommonDepthCrosscorrelation(double)\n" + " CommonDepthCrosscorrelation::CommonDepthCrosscorrelation()\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_CommonDepthCrosscorrelation_clone(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *arg1 = (CommonDepthCrosscorrelation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + CommonDepthCrosscorrelation *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CommonDepthCrosscorrelation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommonDepthCrosscorrelation_clone" "', argument " "1"" of type '" "CommonDepthCrosscorrelation const *""'"); + } + arg1 = reinterpret_cast< CommonDepthCrosscorrelation * >(argp1); + { + try { + result = (CommonDepthCrosscorrelation *)((CommonDepthCrosscorrelation const *)arg1)->clone(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CommonDepthCrosscorrelation, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CommonDepthCrosscorrelation_className(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *arg1 = (CommonDepthCrosscorrelation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CommonDepthCrosscorrelation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommonDepthCrosscorrelation_className" "', argument " "1"" of type '" "CommonDepthCrosscorrelation const *""'"); + } + arg1 = reinterpret_cast< CommonDepthCrosscorrelation * >(argp1); + { + try { + result = ((CommonDepthCrosscorrelation const *)arg1)->className(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CommonDepthCrosscorrelation_validate(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *arg1 = (CommonDepthCrosscorrelation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CommonDepthCrosscorrelation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommonDepthCrosscorrelation_validate" "', argument " "1"" of type '" "CommonDepthCrosscorrelation const *""'"); + } + arg1 = reinterpret_cast< CommonDepthCrosscorrelation * >(argp1); + { + try { + result = ((CommonDepthCrosscorrelation const *)arg1)->validate(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CommonDepthCrosscorrelation_crossCorrDepth(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *arg1 = (CommonDepthCrosscorrelation *) 0 ; + R3 *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + double result; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "CommonDepthCrosscorrelation_crossCorrDepth", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CommonDepthCrosscorrelation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommonDepthCrosscorrelation_crossCorrDepth" "', argument " "1"" of type '" "CommonDepthCrosscorrelation const *""'"); + } + arg1 = reinterpret_cast< CommonDepthCrosscorrelation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Vec3T_double_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CommonDepthCrosscorrelation_crossCorrDepth" "', argument " "2"" of type '" "R3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CommonDepthCrosscorrelation_crossCorrDepth" "', argument " "2"" of type '" "R3 const &""'"); + } + arg2 = reinterpret_cast< R3 * >(argp2); + { + try { + result = (double)((CommonDepthCrosscorrelation const *)arg1)->crossCorrDepth((R3 const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CommonDepthCrosscorrelation_replicationFactor(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *arg1 = (CommonDepthCrosscorrelation *) 0 ; + R3 *arg2 = 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + double result; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "CommonDepthCrosscorrelation_replicationFactor", 3, 3, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CommonDepthCrosscorrelation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommonDepthCrosscorrelation_replicationFactor" "', argument " "1"" of type '" "CommonDepthCrosscorrelation const *""'"); + } + arg1 = reinterpret_cast< CommonDepthCrosscorrelation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Vec3T_double_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CommonDepthCrosscorrelation_replicationFactor" "', argument " "2"" of type '" "R3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CommonDepthCrosscorrelation_replicationFactor" "', argument " "2"" of type '" "R3 const &""'"); + } + arg2 = reinterpret_cast< R3 * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CommonDepthCrosscorrelation_replicationFactor" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + { + try { + result = (double)((CommonDepthCrosscorrelation const *)arg1)->replicationFactor((R3 const &)*arg2,arg3); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CommonDepthCrosscorrelation_parDefs(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *arg1 = (CommonDepthCrosscorrelation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::vector< ParaMeta,std::allocator< ParaMeta > > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CommonDepthCrosscorrelation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommonDepthCrosscorrelation_parDefs" "', argument " "1"" of type '" "CommonDepthCrosscorrelation const *""'"); + } + arg1 = reinterpret_cast< CommonDepthCrosscorrelation * >(argp1); + { + try { + result = ((CommonDepthCrosscorrelation const *)arg1)->parDefs(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj((new std::vector< ParaMeta,std::allocator< ParaMeta > >(result)), SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CommonDepthCrosscorrelation(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + CommonDepthCrosscorrelation *arg1 = (CommonDepthCrosscorrelation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CommonDepthCrosscorrelation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CommonDepthCrosscorrelation" "', argument " "1"" of type '" "CommonDepthCrosscorrelation *""'"); + } + arg1 = reinterpret_cast< CommonDepthCrosscorrelation * >(argp1); + { + try { + delete arg1; + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CommonDepthCrosscorrelation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CommonDepthCrosscorrelation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *CommonDepthCrosscorrelation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_delete_IFormfactorPolyhedron(PyObject *self, PyObject *args) { PyObject *resultobj = 0; IFormfactorPolyhedron *arg1 = (IFormfactorPolyhedron *) 0 ; @@ -73505,7 +74172,7 @@ static PyMethodDef SwigMethods[] = { { "ParticleLayout_setAbsoluteWeight", _wrap_ParticleLayout_setAbsoluteWeight, METH_VARARGS, "ParticleLayout_setAbsoluteWeight(ParticleLayout self, double weight)"}, { "ParticleLayout_swigregister", ParticleLayout_swigregister, METH_O, NULL}, { "ParticleLayout_swiginit", ParticleLayout_swiginit, METH_VARARGS, NULL}, - { "new_LayerRoughness", _wrap_new_LayerRoughness, METH_VARARGS, "new_LayerRoughness(AutocorrelationModel autocorrelation, InterlayerModel interlayer) -> LayerRoughness"}, + { "new_LayerRoughness", _wrap_new_LayerRoughness, METH_VARARGS, "LayerRoughness(AutocorrelationModel autocorrelation, InterlayerModel interlayer, CrosscorrelationModel crosscorrelation=None)"}, { "LayerRoughness_clone", _wrap_LayerRoughness_clone, METH_O, "LayerRoughness_clone(LayerRoughness self) -> LayerRoughness"}, { "LayerRoughness_className", _wrap_LayerRoughness_className, METH_O, "LayerRoughness_className(LayerRoughness self) -> std::string"}, { "LayerRoughness_nodeChildren", _wrap_LayerRoughness_nodeChildren, METH_O, "LayerRoughness_nodeChildren(LayerRoughness self) -> swig_dummy_type_const_inode_vector"}, @@ -73514,6 +74181,8 @@ static PyMethodDef SwigMethods[] = { { "LayerRoughness_autocorrelationModel", _wrap_LayerRoughness_autocorrelationModel, METH_O, "LayerRoughness_autocorrelationModel(LayerRoughness self) -> AutocorrelationModel"}, { "LayerRoughness_setInterlayerModel", _wrap_LayerRoughness_setInterlayerModel, METH_VARARGS, "LayerRoughness_setInterlayerModel(LayerRoughness self, InterlayerModel interlayer)"}, { "LayerRoughness_interlayerModel", _wrap_LayerRoughness_interlayerModel, METH_O, "LayerRoughness_interlayerModel(LayerRoughness self) -> InterlayerModel"}, + { "LayerRoughness_setCrosscorrelationModel", _wrap_LayerRoughness_setCrosscorrelationModel, METH_VARARGS, "LayerRoughness_setCrosscorrelationModel(LayerRoughness self, CrosscorrelationModel crosscorrelation)"}, + { "LayerRoughness_crosscorrelationModel", _wrap_LayerRoughness_crosscorrelationModel, METH_O, "LayerRoughness_crosscorrelationModel(LayerRoughness self) -> CrosscorrelationModel"}, { "delete_LayerRoughness", _wrap_delete_LayerRoughness, METH_O, "delete_LayerRoughness(LayerRoughness self)"}, { "LayerRoughness_swigregister", LayerRoughness_swigregister, METH_O, NULL}, { "LayerRoughness_swiginit", LayerRoughness_swiginit, METH_VARARGS, NULL}, @@ -73538,7 +74207,6 @@ static PyMethodDef SwigMethods[] = { { "MultiLayer_className", _wrap_MultiLayer_className, METH_O, "MultiLayer_className(MultiLayer self) -> std::string"}, { "MultiLayer_addLayer", _wrap_MultiLayer_addLayer, METH_VARARGS, "MultiLayer_addLayer(MultiLayer self, Layer layer)"}, { "MultiLayer_addLayerWithTopRoughness", _wrap_MultiLayer_addLayerWithTopRoughness, METH_VARARGS, "MultiLayer_addLayerWithTopRoughness(MultiLayer self, Layer layer, LayerRoughness roughness)"}, - { "MultiLayer_setCrossCorrLength", _wrap_MultiLayer_setCrossCorrLength, METH_VARARGS, "MultiLayer_setCrossCorrLength(MultiLayer self, double crossCorrLength)"}, { "MultiLayer_setExternalField", _wrap_MultiLayer_setExternalField, METH_VARARGS, "MultiLayer_setExternalField(MultiLayer self, R3 ext_field)"}, { "MultiLayer_setName", _wrap_MultiLayer_setName, METH_VARARGS, "MultiLayer_setName(MultiLayer self, std::string const & name)"}, { "MultiLayer_swigregister", MultiLayer_swigregister, METH_O, NULL}, @@ -73589,6 +74257,21 @@ static PyMethodDef SwigMethods[] = { { "delete_TanhInterlayer", _wrap_delete_TanhInterlayer, METH_O, "delete_TanhInterlayer(TanhInterlayer self)"}, { "TanhInterlayer_swigregister", TanhInterlayer_swigregister, METH_O, NULL}, { "TanhInterlayer_swiginit", TanhInterlayer_swiginit, METH_VARARGS, NULL}, + { "CrosscorrelationModel_clone", _wrap_CrosscorrelationModel_clone, METH_O, "CrosscorrelationModel_clone(CrosscorrelationModel self) -> CrosscorrelationModel"}, + { "CrosscorrelationModel_crossCorrDepth", _wrap_CrosscorrelationModel_crossCorrDepth, METH_VARARGS, "CrosscorrelationModel_crossCorrDepth(CrosscorrelationModel self, R3 k) -> double"}, + { "CrosscorrelationModel_replicationFactor", _wrap_CrosscorrelationModel_replicationFactor, METH_VARARGS, "CrosscorrelationModel_replicationFactor(CrosscorrelationModel self, R3 k, double thickness) -> double"}, + { "delete_CrosscorrelationModel", _wrap_delete_CrosscorrelationModel, METH_O, "delete_CrosscorrelationModel(CrosscorrelationModel self)"}, + { "CrosscorrelationModel_swigregister", CrosscorrelationModel_swigregister, METH_O, NULL}, + { "new_CommonDepthCrosscorrelation", _wrap_new_CommonDepthCrosscorrelation, METH_VARARGS, "CommonDepthCrosscorrelation(double cross_corr_depth=0)"}, + { "CommonDepthCrosscorrelation_clone", _wrap_CommonDepthCrosscorrelation_clone, METH_O, "CommonDepthCrosscorrelation_clone(CommonDepthCrosscorrelation self) -> CommonDepthCrosscorrelation"}, + { "CommonDepthCrosscorrelation_className", _wrap_CommonDepthCrosscorrelation_className, METH_O, "CommonDepthCrosscorrelation_className(CommonDepthCrosscorrelation self) -> std::string"}, + { "CommonDepthCrosscorrelation_validate", _wrap_CommonDepthCrosscorrelation_validate, METH_O, "CommonDepthCrosscorrelation_validate(CommonDepthCrosscorrelation self) -> std::string"}, + { "CommonDepthCrosscorrelation_crossCorrDepth", _wrap_CommonDepthCrosscorrelation_crossCorrDepth, METH_VARARGS, "CommonDepthCrosscorrelation_crossCorrDepth(CommonDepthCrosscorrelation self, R3 arg2) -> double"}, + { "CommonDepthCrosscorrelation_replicationFactor", _wrap_CommonDepthCrosscorrelation_replicationFactor, METH_VARARGS, "CommonDepthCrosscorrelation_replicationFactor(CommonDepthCrosscorrelation self, R3 arg2, double thickness) -> double"}, + { "CommonDepthCrosscorrelation_parDefs", _wrap_CommonDepthCrosscorrelation_parDefs, METH_O, "CommonDepthCrosscorrelation_parDefs(CommonDepthCrosscorrelation self) -> std::vector< ParaMeta,std::allocator< ParaMeta > >"}, + { "delete_CommonDepthCrosscorrelation", _wrap_delete_CommonDepthCrosscorrelation, METH_O, "delete_CommonDepthCrosscorrelation(CommonDepthCrosscorrelation self)"}, + { "CommonDepthCrosscorrelation_swigregister", CommonDepthCrosscorrelation_swigregister, METH_O, NULL}, + { "CommonDepthCrosscorrelation_swiginit", CommonDepthCrosscorrelation_swiginit, METH_VARARGS, NULL}, { "delete_IFormfactorPolyhedron", _wrap_delete_IFormfactorPolyhedron, METH_O, "delete_IFormfactorPolyhedron(IFormfactorPolyhedron self)"}, { "IFormfactorPolyhedron_volume", _wrap_IFormfactorPolyhedron_volume, METH_O, "IFormfactorPolyhedron_volume(IFormfactorPolyhedron self) -> double"}, { "IFormfactorPolyhedron_radialExtension", _wrap_IFormfactorPolyhedron_radialExtension, METH_O, "IFormfactorPolyhedron_radialExtension(IFormfactorPolyhedron self) -> double"}, @@ -74201,6 +74884,9 @@ static PyMethodDef SwigMethods[] = { static void *_p_K_CorrelationModelTo_p_AutocorrelationModel(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((AutocorrelationModel *) ((K_CorrelationModel *) x)); } +static void *_p_CommonDepthCrosscorrelationTo_p_CrosscorrelationModel(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((CrosscorrelationModel *) ((CommonDepthCrosscorrelation *) x)); +} static void *_p_AutocorrelationModelTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((ICloneable *) ((AutocorrelationModel *) x)); } @@ -74222,6 +74908,9 @@ static void *_p_BoxTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { static void *_p_CantellatedCubeTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((ICloneable *) (ISampleNode *)(IFormfactor *)(IFormfactorPolyhedron *) ((CantellatedCube *) x)); } +static void *_p_CommonDepthCrosscorrelationTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((ICloneable *) (CrosscorrelationModel *) ((CommonDepthCrosscorrelation *) x)); +} static void *_p_CompoundTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((ICloneable *) (ISampleNode *)(IParticle *) ((Compound *) x)); } @@ -74240,6 +74929,9 @@ static void *_p_CosineRippleGaussTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(ne static void *_p_CosineRippleLorentzTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((ICloneable *) (ISampleNode *)(IFormfactor *)(IProfileRipple *)(ICosineRipple *) ((CosineRippleLorentz *) x)); } +static void *_p_CrosscorrelationModelTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((ICloneable *) ((CrosscorrelationModel *) x)); +} static void *_p_CrystalTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((ICloneable *) (ISampleNode *) ((Crystal *) x)); } @@ -74729,6 +75421,9 @@ static void *_p_BoxTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) { static void *_p_CantellatedCubeTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((INode *) (ISampleNode *)(IFormfactor *)(IFormfactorPolyhedron *) ((CantellatedCube *) x)); } +static void *_p_CommonDepthCrosscorrelationTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((INode *) (CrosscorrelationModel *) ((CommonDepthCrosscorrelation *) x)); +} static void *_p_CompoundTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((INode *) (ISampleNode *)(IParticle *) ((Compound *) x)); } @@ -74747,6 +75442,9 @@ static void *_p_CosineRippleGaussTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemo static void *_p_CosineRippleLorentzTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((INode *) (ISampleNode *)(IFormfactor *)(IProfileRipple *)(ICosineRipple *) ((CosineRippleLorentz *) x)); } +static void *_p_CrosscorrelationModelTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((INode *) ((CrosscorrelationModel *) x)); +} static void *_p_CrystalTo_p_INode(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((INode *) (ISampleNode *) ((Crystal *) x)); } @@ -75309,12 +76007,14 @@ static swig_type_info _swigt__p_BasicLattice2D = {"_p_BasicLattice2D", "BasicLat static swig_type_info _swigt__p_Bipyramid4 = {"_p_Bipyramid4", "Bipyramid4 *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Box = {"_p_Box", "Box *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CantellatedCube = {"_p_CantellatedCube", "CantellatedCube *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CommonDepthCrosscorrelation = {"_p_CommonDepthCrosscorrelation", "CommonDepthCrosscorrelation *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Compound = {"_p_Compound", "Compound *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Cone = {"_p_Cone", "Cone *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CoreAndShell = {"_p_CoreAndShell", "CoreAndShell *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CosineRippleBox = {"_p_CosineRippleBox", "CosineRippleBox *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CosineRippleGauss = {"_p_CosineRippleGauss", "CosineRippleGauss *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CosineRippleLorentz = {"_p_CosineRippleLorentz", "CosineRippleLorentz *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CrosscorrelationModel = {"_p_CrosscorrelationModel", "CrosscorrelationModel *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Crystal = {"_p_Crystal", "Crystal *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Cylinder = {"_p_Cylinder", "Cylinder *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Dodecahedron = {"_p_Dodecahedron", "Dodecahedron *", 0, 0, (void*)0, 0}; @@ -75474,12 +76174,14 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Bipyramid4, &_swigt__p_Box, &_swigt__p_CantellatedCube, + &_swigt__p_CommonDepthCrosscorrelation, &_swigt__p_Compound, &_swigt__p_Cone, &_swigt__p_CoreAndShell, &_swigt__p_CosineRippleBox, &_swigt__p_CosineRippleGauss, &_swigt__p_CosineRippleLorentz, + &_swigt__p_CrosscorrelationModel, &_swigt__p_Crystal, &_swigt__p_Cylinder, &_swigt__p_Dodecahedron, @@ -75639,12 +76341,14 @@ static swig_cast_info _swigc__p_BasicLattice2D[] = { {&_swigt__p_BasicLattice2D static swig_cast_info _swigc__p_Bipyramid4[] = { {&_swigt__p_Bipyramid4, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Box[] = { {&_swigt__p_Box, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CantellatedCube[] = { {&_swigt__p_CantellatedCube, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CommonDepthCrosscorrelation[] = { {&_swigt__p_CommonDepthCrosscorrelation, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Compound[] = { {&_swigt__p_Compound, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Cone[] = { {&_swigt__p_Cone, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CoreAndShell[] = { {&_swigt__p_CoreAndShell, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CosineRippleBox[] = { {&_swigt__p_CosineRippleBox, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CosineRippleGauss[] = { {&_swigt__p_CosineRippleGauss, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CosineRippleLorentz[] = { {&_swigt__p_CosineRippleLorentz, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CrosscorrelationModel[] = { {&_swigt__p_CrosscorrelationModel, 0, 0, 0}, {&_swigt__p_CommonDepthCrosscorrelation, _p_CommonDepthCrosscorrelationTo_p_CrosscorrelationModel, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Crystal[] = { {&_swigt__p_Crystal, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Cylinder[] = { {&_swigt__p_Cylinder, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Dodecahedron[] = { {&_swigt__p_Dodecahedron, 0, 0, 0},{0, 0, 0, 0}}; @@ -75656,14 +76360,14 @@ static swig_cast_info _swigc__p_GaussSphere[] = { {&_swigt__p_GaussSphere, 0, 0 static swig_cast_info _swigc__p_HemiEllipsoid[] = { {&_swigt__p_HemiEllipsoid, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_HexagonalLattice2D[] = { {&_swigt__p_HexagonalLattice2D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_HorizontalCylinder[] = { {&_swigt__p_HorizontalCylinder, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ICloneable[] = { {&_swigt__p_ICloneable, 0, 0, 0}, {&_swigt__p_AutocorrelationModel, _p_AutocorrelationModelTo_p_ICloneable, 0, 0}, {&_swigt__p_BarGauss, _p_BarGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_BarLorentz, _p_BarLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_BasicLattice2D, _p_BasicLattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_Bipyramid4, _p_Bipyramid4To_p_ICloneable, 0, 0}, {&_swigt__p_Box, _p_BoxTo_p_ICloneable, 0, 0}, {&_swigt__p_CantellatedCube, _p_CantellatedCubeTo_p_ICloneable, 0, 0}, {&_swigt__p_Compound, _p_CompoundTo_p_ICloneable, 0, 0}, {&_swigt__p_Cone, _p_ConeTo_p_ICloneable, 0, 0}, {&_swigt__p_CoreAndShell, _p_CoreAndShellTo_p_ICloneable, 0, 0}, {&_swigt__p_CosineRippleBox, _p_CosineRippleBoxTo_p_ICloneable, 0, 0}, {&_swigt__p_CosineRippleGauss, _p_CosineRippleGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_CosineRippleLorentz, _p_CosineRippleLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_Crystal, _p_CrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_Cylinder, _p_CylinderTo_p_ICloneable, 0, 0}, {&_swigt__p_Dodecahedron, _p_DodecahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_EllipsoidalCylinder, _p_EllipsoidalCylinderTo_p_ICloneable, 0, 0}, {&_swigt__p_ErfInterlayer, _p_ErfInterlayerTo_p_ICloneable, 0, 0}, {&_swigt__p_FuzzySphere, _p_FuzzySphereTo_p_ICloneable, 0, 0}, {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_GaussSphere, _p_GaussSphereTo_p_ICloneable, 0, 0}, {&_swigt__p_HemiEllipsoid, _p_HemiEllipsoidTo_p_ICloneable, 0, 0}, {&_swigt__p_HexagonalLattice2D, _p_HexagonalLattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_HorizontalCylinder, _p_HorizontalCylinderTo_p_ICloneable, 0, 0}, {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_IFormfactor, _p_IFormfactorTo_p_ICloneable, 0, 0}, {&_swigt__p_IFormfactorPolyhedron, _p_IFormfactorPolyhedronTo_p_ICloneable, 0, 0}, {&_swigt__p_IFormfactorPrism, _p_IFormfactorPrismTo_p_ICloneable, 0, 0}, {&_swigt__p_IInterference, _p_IInterferenceTo_p_ICloneable, 0, 0}, {&_swigt__p_IParticle, _p_IParticleTo_p_ICloneable, 0, 0}, {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfile1D, _p_IProfile1DTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfile2D, _p_IProfile2DTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_IRotation, _p_IRotationTo_p_ICloneable, 0, 0}, {&_swigt__p_ISampleNode, _p_ISampleNodeTo_p_ICloneable, 0, 0}, {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_Icosahedron, _p_IcosahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference1DLattice, _p_Interference1DLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference2DLattice, _p_Interference2DLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference2DParacrystal, _p_Interference2DParacrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference2DSuperLattice, _p_Interference2DSuperLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceFinite2DLattice, _p_InterferenceFinite2DLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceHardDisk, _p_InterferenceHardDiskTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceNone, _p_InterferenceNoneTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceRadialParacrystal, _p_InterferenceRadialParacrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_InterlayerModel, _p_InterlayerModelTo_p_ICloneable, 0, 0}, {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_K_CorrelationModel, _p_K_CorrelationModelTo_p_ICloneable, 0, 0}, {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_Layer, _p_LayerTo_p_ICloneable, 0, 0}, {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_ICloneable, 0, 0}, {&_swigt__p_LongBoxGauss, _p_LongBoxGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_LongBoxLorentz, _p_LongBoxLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_Mesocrystal, _p_MesocrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_ICloneable, 0, 0}, {&_swigt__p_Particle, _p_ParticleTo_p_ICloneable, 0, 0}, {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_ICloneable, 0, 0}, {&_swigt__p_PlatonicOctahedron, _p_PlatonicOctahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_PlatonicTetrahedron, _p_PlatonicTetrahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_Prism3, _p_Prism3To_p_ICloneable, 0, 0}, {&_swigt__p_Prism6, _p_Prism6To_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DCauchy, _p_Profile1DCauchyTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DCosine, _p_Profile1DCosineTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DGate, _p_Profile1DGateTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DGauss, _p_Profile1DGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DTriangle, _p_Profile1DTriangleTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DVoigt, _p_Profile1DVoigtTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DCauchy, _p_Profile2DCauchyTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DCone, _p_Profile2DConeTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DGate, _p_Profile2DGateTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DGauss, _p_Profile2DGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DVoigt, _p_Profile2DVoigtTo_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid2, _p_Pyramid2To_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid3, _p_Pyramid3To_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid4, _p_Pyramid4To_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid6, _p_Pyramid6To_p_ICloneable, 0, 0}, {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_ICloneable, 0, 0}, {&_swigt__p_RotationX, _p_RotationXTo_p_ICloneable, 0, 0}, {&_swigt__p_RotationY, _p_RotationYTo_p_ICloneable, 0, 0}, {&_swigt__p_RotationZ, _p_RotationZTo_p_ICloneable, 0, 0}, {&_swigt__p_SawtoothRippleBox, _p_SawtoothRippleBoxTo_p_ICloneable, 0, 0}, {&_swigt__p_SawtoothRippleGauss, _p_SawtoothRippleGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_SawtoothRippleLorentz, _p_SawtoothRippleLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_Sphere, _p_SphereTo_p_ICloneable, 0, 0}, {&_swigt__p_Spheroid, _p_SpheroidTo_p_ICloneable, 0, 0}, {&_swigt__p_SquareLattice2D, _p_SquareLattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_TanhInterlayer, _p_TanhInterlayerTo_p_ICloneable, 0, 0}, {&_swigt__p_TruncatedCube, _p_TruncatedCubeTo_p_ICloneable, 0, 0}, {&_swigt__p_TruncatedSphere, _p_TruncatedSphereTo_p_ICloneable, 0, 0}, {&_swigt__p_TruncatedSpheroid, _p_TruncatedSpheroidTo_p_ICloneable, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ICloneable[] = { {&_swigt__p_ICloneable, 0, 0, 0}, {&_swigt__p_AutocorrelationModel, _p_AutocorrelationModelTo_p_ICloneable, 0, 0}, {&_swigt__p_BarGauss, _p_BarGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_BarLorentz, _p_BarLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_BasicLattice2D, _p_BasicLattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_Bipyramid4, _p_Bipyramid4To_p_ICloneable, 0, 0}, {&_swigt__p_Box, _p_BoxTo_p_ICloneable, 0, 0}, {&_swigt__p_CantellatedCube, _p_CantellatedCubeTo_p_ICloneable, 0, 0}, {&_swigt__p_CommonDepthCrosscorrelation, _p_CommonDepthCrosscorrelationTo_p_ICloneable, 0, 0}, {&_swigt__p_Compound, _p_CompoundTo_p_ICloneable, 0, 0}, {&_swigt__p_Cone, _p_ConeTo_p_ICloneable, 0, 0}, {&_swigt__p_CoreAndShell, _p_CoreAndShellTo_p_ICloneable, 0, 0}, {&_swigt__p_CosineRippleBox, _p_CosineRippleBoxTo_p_ICloneable, 0, 0}, {&_swigt__p_CosineRippleGauss, _p_CosineRippleGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_CosineRippleLorentz, _p_CosineRippleLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_CrosscorrelationModel, _p_CrosscorrelationModelTo_p_ICloneable, 0, 0}, {&_swigt__p_Crystal, _p_CrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_Cylinder, _p_CylinderTo_p_ICloneable, 0, 0}, {&_swigt__p_Dodecahedron, _p_DodecahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_EllipsoidalCylinder, _p_EllipsoidalCylinderTo_p_ICloneable, 0, 0}, {&_swigt__p_ErfInterlayer, _p_ErfInterlayerTo_p_ICloneable, 0, 0}, {&_swigt__p_FuzzySphere, _p_FuzzySphereTo_p_ICloneable, 0, 0}, {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_GaussSphere, _p_GaussSphereTo_p_ICloneable, 0, 0}, {&_swigt__p_HemiEllipsoid, _p_HemiEllipsoidTo_p_ICloneable, 0, 0}, {&_swigt__p_HexagonalLattice2D, _p_HexagonalLattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_HorizontalCylinder, _p_HorizontalCylinderTo_p_ICloneable, 0, 0}, {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_IFormfactor, _p_IFormfactorTo_p_ICloneable, 0, 0}, {&_swigt__p_IFormfactorPolyhedron, _p_IFormfactorPolyhedronTo_p_ICloneable, 0, 0}, {&_swigt__p_IFormfactorPrism, _p_IFormfactorPrismTo_p_ICloneable, 0, 0}, {&_swigt__p_IInterference, _p_IInterferenceTo_p_ICloneable, 0, 0}, {&_swigt__p_IParticle, _p_IParticleTo_p_ICloneable, 0, 0}, {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfile1D, _p_IProfile1DTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfile2D, _p_IProfile2DTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_IRotation, _p_IRotationTo_p_ICloneable, 0, 0}, {&_swigt__p_ISampleNode, _p_ISampleNodeTo_p_ICloneable, 0, 0}, {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_ICloneable, 0, 0}, {&_swigt__p_Icosahedron, _p_IcosahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference1DLattice, _p_Interference1DLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference2DLattice, _p_Interference2DLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference2DParacrystal, _p_Interference2DParacrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_Interference2DSuperLattice, _p_Interference2DSuperLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceFinite2DLattice, _p_InterferenceFinite2DLatticeTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceHardDisk, _p_InterferenceHardDiskTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceNone, _p_InterferenceNoneTo_p_ICloneable, 0, 0}, {&_swigt__p_InterferenceRadialParacrystal, _p_InterferenceRadialParacrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_InterlayerModel, _p_InterlayerModelTo_p_ICloneable, 0, 0}, {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_K_CorrelationModel, _p_K_CorrelationModelTo_p_ICloneable, 0, 0}, {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_Layer, _p_LayerTo_p_ICloneable, 0, 0}, {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_ICloneable, 0, 0}, {&_swigt__p_LongBoxGauss, _p_LongBoxGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_LongBoxLorentz, _p_LongBoxLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_Mesocrystal, _p_MesocrystalTo_p_ICloneable, 0, 0}, {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_ICloneable, 0, 0}, {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_ICloneable, 0, 0}, {&_swigt__p_Particle, _p_ParticleTo_p_ICloneable, 0, 0}, {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_ICloneable, 0, 0}, {&_swigt__p_PlatonicOctahedron, _p_PlatonicOctahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_PlatonicTetrahedron, _p_PlatonicTetrahedronTo_p_ICloneable, 0, 0}, {&_swigt__p_Prism3, _p_Prism3To_p_ICloneable, 0, 0}, {&_swigt__p_Prism6, _p_Prism6To_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DCauchy, _p_Profile1DCauchyTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DCosine, _p_Profile1DCosineTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DGate, _p_Profile1DGateTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DGauss, _p_Profile1DGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DTriangle, _p_Profile1DTriangleTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile1DVoigt, _p_Profile1DVoigtTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DCauchy, _p_Profile2DCauchyTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DCone, _p_Profile2DConeTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DGate, _p_Profile2DGateTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DGauss, _p_Profile2DGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_Profile2DVoigt, _p_Profile2DVoigtTo_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid2, _p_Pyramid2To_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid3, _p_Pyramid3To_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid4, _p_Pyramid4To_p_ICloneable, 0, 0}, {&_swigt__p_Pyramid6, _p_Pyramid6To_p_ICloneable, 0, 0}, {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_ICloneable, 0, 0}, {&_swigt__p_RotationX, _p_RotationXTo_p_ICloneable, 0, 0}, {&_swigt__p_RotationY, _p_RotationYTo_p_ICloneable, 0, 0}, {&_swigt__p_RotationZ, _p_RotationZTo_p_ICloneable, 0, 0}, {&_swigt__p_SawtoothRippleBox, _p_SawtoothRippleBoxTo_p_ICloneable, 0, 0}, {&_swigt__p_SawtoothRippleGauss, _p_SawtoothRippleGaussTo_p_ICloneable, 0, 0}, {&_swigt__p_SawtoothRippleLorentz, _p_SawtoothRippleLorentzTo_p_ICloneable, 0, 0}, {&_swigt__p_Sphere, _p_SphereTo_p_ICloneable, 0, 0}, {&_swigt__p_Spheroid, _p_SpheroidTo_p_ICloneable, 0, 0}, {&_swigt__p_SquareLattice2D, _p_SquareLattice2DTo_p_ICloneable, 0, 0}, {&_swigt__p_TanhInterlayer, _p_TanhInterlayerTo_p_ICloneable, 0, 0}, {&_swigt__p_TruncatedCube, _p_TruncatedCubeTo_p_ICloneable, 0, 0}, {&_swigt__p_TruncatedSphere, _p_TruncatedSphereTo_p_ICloneable, 0, 0}, {&_swigt__p_TruncatedSpheroid, _p_TruncatedSpheroidTo_p_ICloneable, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ICosineRipple[] = { {&_swigt__p_ICosineRipple, 0, 0, 0}, {&_swigt__p_CosineRippleBox, _p_CosineRippleBoxTo_p_ICosineRipple, 0, 0}, {&_swigt__p_CosineRippleGauss, _p_CosineRippleGaussTo_p_ICosineRipple, 0, 0}, {&_swigt__p_CosineRippleLorentz, _p_CosineRippleLorentzTo_p_ICosineRipple, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IFormfactor[] = { {&_swigt__p_IFormfactor, 0, 0, 0}, {&_swigt__p_BarGauss, _p_BarGaussTo_p_IFormfactor, 0, 0}, {&_swigt__p_BarLorentz, _p_BarLorentzTo_p_IFormfactor, 0, 0}, {&_swigt__p_Bipyramid4, _p_Bipyramid4To_p_IFormfactor, 0, 0}, {&_swigt__p_Box, _p_BoxTo_p_IFormfactor, 0, 0}, {&_swigt__p_CantellatedCube, _p_CantellatedCubeTo_p_IFormfactor, 0, 0}, {&_swigt__p_Cone, _p_ConeTo_p_IFormfactor, 0, 0}, {&_swigt__p_CosineRippleBox, _p_CosineRippleBoxTo_p_IFormfactor, 0, 0}, {&_swigt__p_CosineRippleGauss, _p_CosineRippleGaussTo_p_IFormfactor, 0, 0}, {&_swigt__p_CosineRippleLorentz, _p_CosineRippleLorentzTo_p_IFormfactor, 0, 0}, {&_swigt__p_Cylinder, _p_CylinderTo_p_IFormfactor, 0, 0}, {&_swigt__p_Dodecahedron, _p_DodecahedronTo_p_IFormfactor, 0, 0}, {&_swigt__p_EllipsoidalCylinder, _p_EllipsoidalCylinderTo_p_IFormfactor, 0, 0}, {&_swigt__p_FuzzySphere, _p_FuzzySphereTo_p_IFormfactor, 0, 0}, {&_swigt__p_GaussSphere, _p_GaussSphereTo_p_IFormfactor, 0, 0}, {&_swigt__p_HemiEllipsoid, _p_HemiEllipsoidTo_p_IFormfactor, 0, 0}, {&_swigt__p_HorizontalCylinder, _p_HorizontalCylinderTo_p_IFormfactor, 0, 0}, {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_IFormfactor, 0, 0}, {&_swigt__p_IFormfactorPolyhedron, _p_IFormfactorPolyhedronTo_p_IFormfactor, 0, 0}, {&_swigt__p_IFormfactorPrism, _p_IFormfactorPrismTo_p_IFormfactor, 0, 0}, {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_IFormfactor, 0, 0}, {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_IFormfactor, 0, 0}, {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_IFormfactor, 0, 0}, {&_swigt__p_Icosahedron, _p_IcosahedronTo_p_IFormfactor, 0, 0}, {&_swigt__p_LongBoxGauss, _p_LongBoxGaussTo_p_IFormfactor, 0, 0}, {&_swigt__p_LongBoxLorentz, _p_LongBoxLorentzTo_p_IFormfactor, 0, 0}, {&_swigt__p_PlatonicOctahedron, _p_PlatonicOctahedronTo_p_IFormfactor, 0, 0}, {&_swigt__p_PlatonicTetrahedron, _p_PlatonicTetrahedronTo_p_IFormfactor, 0, 0}, {&_swigt__p_Prism3, _p_Prism3To_p_IFormfactor, 0, 0}, {&_swigt__p_Prism6, _p_Prism6To_p_IFormfactor, 0, 0}, {&_swigt__p_Pyramid2, _p_Pyramid2To_p_IFormfactor, 0, 0}, {&_swigt__p_Pyramid3, _p_Pyramid3To_p_IFormfactor, 0, 0}, {&_swigt__p_Pyramid4, _p_Pyramid4To_p_IFormfactor, 0, 0}, {&_swigt__p_Pyramid6, _p_Pyramid6To_p_IFormfactor, 0, 0}, {&_swigt__p_SawtoothRippleBox, _p_SawtoothRippleBoxTo_p_IFormfactor, 0, 0}, {&_swigt__p_SawtoothRippleGauss, _p_SawtoothRippleGaussTo_p_IFormfactor, 0, 0}, {&_swigt__p_SawtoothRippleLorentz, _p_SawtoothRippleLorentzTo_p_IFormfactor, 0, 0}, {&_swigt__p_Sphere, _p_SphereTo_p_IFormfactor, 0, 0}, {&_swigt__p_Spheroid, _p_SpheroidTo_p_IFormfactor, 0, 0}, {&_swigt__p_TruncatedCube, _p_TruncatedCubeTo_p_IFormfactor, 0, 0}, {&_swigt__p_TruncatedSphere, _p_TruncatedSphereTo_p_IFormfactor, 0, 0}, {&_swigt__p_TruncatedSpheroid, _p_TruncatedSpheroidTo_p_IFormfactor, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IFormfactorPolyhedron[] = { {&_swigt__p_IFormfactorPolyhedron, 0, 0, 0}, {&_swigt__p_Bipyramid4, _p_Bipyramid4To_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Box, _p_BoxTo_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_CantellatedCube, _p_CantellatedCubeTo_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Dodecahedron, _p_DodecahedronTo_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_IFormfactorPrism, _p_IFormfactorPrismTo_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Icosahedron, _p_IcosahedronTo_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_PlatonicOctahedron, _p_PlatonicOctahedronTo_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_PlatonicTetrahedron, _p_PlatonicTetrahedronTo_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Prism3, _p_Prism3To_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Prism6, _p_Prism6To_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Pyramid2, _p_Pyramid2To_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Pyramid3, _p_Pyramid3To_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Pyramid4, _p_Pyramid4To_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_Pyramid6, _p_Pyramid6To_p_IFormfactorPolyhedron, 0, 0}, {&_swigt__p_TruncatedCube, _p_TruncatedCubeTo_p_IFormfactorPolyhedron, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IFormfactorPrism[] = { {&_swigt__p_IFormfactorPrism, 0, 0, 0}, {&_swigt__p_Box, _p_BoxTo_p_IFormfactorPrism, 0, 0}, {&_swigt__p_Prism3, _p_Prism3To_p_IFormfactorPrism, 0, 0}, {&_swigt__p_Prism6, _p_Prism6To_p_IFormfactorPrism, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IInterference[] = { {&_swigt__p_IInterference, 0, 0, 0}, {&_swigt__p_Interference1DLattice, _p_Interference1DLatticeTo_p_IInterference, 0, 0}, {&_swigt__p_Interference2DLattice, _p_Interference2DLatticeTo_p_IInterference, 0, 0}, {&_swigt__p_Interference2DParacrystal, _p_Interference2DParacrystalTo_p_IInterference, 0, 0}, {&_swigt__p_Interference2DSuperLattice, _p_Interference2DSuperLatticeTo_p_IInterference, 0, 0}, {&_swigt__p_InterferenceFinite2DLattice, _p_InterferenceFinite2DLatticeTo_p_IInterference, 0, 0}, {&_swigt__p_InterferenceHardDisk, _p_InterferenceHardDiskTo_p_IInterference, 0, 0}, {&_swigt__p_InterferenceNone, _p_InterferenceNoneTo_p_IInterference, 0, 0}, {&_swigt__p_InterferenceRadialParacrystal, _p_InterferenceRadialParacrystalTo_p_IInterference, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IMaterialImpl[] = { {&_swigt__p_IMaterialImpl, 0, 0, 0}, {&_swigt__p_MaterialBySLDImpl, _p_MaterialBySLDImplTo_p_IMaterialImpl, 0, 0}, {&_swigt__p_RefractiveMaterialImpl, _p_RefractiveMaterialImplTo_p_IMaterialImpl, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_INode[] = { {&_swigt__p_INode, 0, 0, 0}, {&_swigt__p_AutocorrelationModel, _p_AutocorrelationModelTo_p_INode, 0, 0}, {&_swigt__p_BarGauss, _p_BarGaussTo_p_INode, 0, 0}, {&_swigt__p_BarLorentz, _p_BarLorentzTo_p_INode, 0, 0}, {&_swigt__p_BasicLattice2D, _p_BasicLattice2DTo_p_INode, 0, 0}, {&_swigt__p_Bipyramid4, _p_Bipyramid4To_p_INode, 0, 0}, {&_swigt__p_Box, _p_BoxTo_p_INode, 0, 0}, {&_swigt__p_CantellatedCube, _p_CantellatedCubeTo_p_INode, 0, 0}, {&_swigt__p_Compound, _p_CompoundTo_p_INode, 0, 0}, {&_swigt__p_Cone, _p_ConeTo_p_INode, 0, 0}, {&_swigt__p_CoreAndShell, _p_CoreAndShellTo_p_INode, 0, 0}, {&_swigt__p_CosineRippleBox, _p_CosineRippleBoxTo_p_INode, 0, 0}, {&_swigt__p_CosineRippleGauss, _p_CosineRippleGaussTo_p_INode, 0, 0}, {&_swigt__p_CosineRippleLorentz, _p_CosineRippleLorentzTo_p_INode, 0, 0}, {&_swigt__p_Crystal, _p_CrystalTo_p_INode, 0, 0}, {&_swigt__p_Cylinder, _p_CylinderTo_p_INode, 0, 0}, {&_swigt__p_Dodecahedron, _p_DodecahedronTo_p_INode, 0, 0}, {&_swigt__p_EllipsoidalCylinder, _p_EllipsoidalCylinderTo_p_INode, 0, 0}, {&_swigt__p_ErfInterlayer, _p_ErfInterlayerTo_p_INode, 0, 0}, {&_swigt__p_FuzzySphere, _p_FuzzySphereTo_p_INode, 0, 0}, {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_GaussSphere, _p_GaussSphereTo_p_INode, 0, 0}, {&_swigt__p_HemiEllipsoid, _p_HemiEllipsoidTo_p_INode, 0, 0}, {&_swigt__p_HexagonalLattice2D, _p_HexagonalLattice2DTo_p_INode, 0, 0}, {&_swigt__p_HorizontalCylinder, _p_HorizontalCylinderTo_p_INode, 0, 0}, {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_INode, 0, 0}, {&_swigt__p_IFormfactor, _p_IFormfactorTo_p_INode, 0, 0}, {&_swigt__p_IFormfactorPolyhedron, _p_IFormfactorPolyhedronTo_p_INode, 0, 0}, {&_swigt__p_IFormfactorPrism, _p_IFormfactorPrismTo_p_INode, 0, 0}, {&_swigt__p_IInterference, _p_IInterferenceTo_p_INode, 0, 0}, {&_swigt__p_IParticle, _p_IParticleTo_p_INode, 0, 0}, {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_IProfile1D, _p_IProfile1DTo_p_INode, 0, 0}, {&_swigt__p_IProfile2D, _p_IProfile2DTo_p_INode, 0, 0}, {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_INode, 0, 0}, {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_INode, 0, 0}, {&_swigt__p_IRotation, _p_IRotationTo_p_INode, 0, 0}, {&_swigt__p_ISampleNode, _p_ISampleNodeTo_p_INode, 0, 0}, {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_INode, 0, 0}, {&_swigt__p_Icosahedron, _p_IcosahedronTo_p_INode, 0, 0}, {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_INode, 0, 0}, {&_swigt__p_Interference1DLattice, _p_Interference1DLatticeTo_p_INode, 0, 0}, {&_swigt__p_Interference2DLattice, _p_Interference2DLatticeTo_p_INode, 0, 0}, {&_swigt__p_Interference2DParacrystal, _p_Interference2DParacrystalTo_p_INode, 0, 0}, {&_swigt__p_Interference2DSuperLattice, _p_Interference2DSuperLatticeTo_p_INode, 0, 0}, {&_swigt__p_InterferenceFinite2DLattice, _p_InterferenceFinite2DLatticeTo_p_INode, 0, 0}, {&_swigt__p_InterferenceHardDisk, _p_InterferenceHardDiskTo_p_INode, 0, 0}, {&_swigt__p_InterferenceNone, _p_InterferenceNoneTo_p_INode, 0, 0}, {&_swigt__p_InterferenceRadialParacrystal, _p_InterferenceRadialParacrystalTo_p_INode, 0, 0}, {&_swigt__p_InterlayerModel, _p_InterlayerModelTo_p_INode, 0, 0}, {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_K_CorrelationModel, _p_K_CorrelationModelTo_p_INode, 0, 0}, {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INode, 0, 0}, {&_swigt__p_Lattice3D, _p_Lattice3DTo_p_INode, 0, 0}, {&_swigt__p_Layer, _p_LayerTo_p_INode, 0, 0}, {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INode, 0, 0}, {&_swigt__p_LongBoxGauss, _p_LongBoxGaussTo_p_INode, 0, 0}, {&_swigt__p_LongBoxLorentz, _p_LongBoxLorentzTo_p_INode, 0, 0}, {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_Mesocrystal, _p_MesocrystalTo_p_INode, 0, 0}, {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INode, 0, 0}, {&_swigt__p_Particle, _p_ParticleTo_p_INode, 0, 0}, {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INode, 0, 0}, {&_swigt__p_PlatonicOctahedron, _p_PlatonicOctahedronTo_p_INode, 0, 0}, {&_swigt__p_PlatonicTetrahedron, _p_PlatonicTetrahedronTo_p_INode, 0, 0}, {&_swigt__p_Prism3, _p_Prism3To_p_INode, 0, 0}, {&_swigt__p_Prism6, _p_Prism6To_p_INode, 0, 0}, {&_swigt__p_Profile1DCauchy, _p_Profile1DCauchyTo_p_INode, 0, 0}, {&_swigt__p_Profile1DCosine, _p_Profile1DCosineTo_p_INode, 0, 0}, {&_swigt__p_Profile1DGate, _p_Profile1DGateTo_p_INode, 0, 0}, {&_swigt__p_Profile1DGauss, _p_Profile1DGaussTo_p_INode, 0, 0}, {&_swigt__p_Profile1DTriangle, _p_Profile1DTriangleTo_p_INode, 0, 0}, {&_swigt__p_Profile1DVoigt, _p_Profile1DVoigtTo_p_INode, 0, 0}, {&_swigt__p_Profile2DCauchy, _p_Profile2DCauchyTo_p_INode, 0, 0}, {&_swigt__p_Profile2DCone, _p_Profile2DConeTo_p_INode, 0, 0}, {&_swigt__p_Profile2DGate, _p_Profile2DGateTo_p_INode, 0, 0}, {&_swigt__p_Profile2DGauss, _p_Profile2DGaussTo_p_INode, 0, 0}, {&_swigt__p_Profile2DVoigt, _p_Profile2DVoigtTo_p_INode, 0, 0}, {&_swigt__p_Pyramid2, _p_Pyramid2To_p_INode, 0, 0}, {&_swigt__p_Pyramid3, _p_Pyramid3To_p_INode, 0, 0}, {&_swigt__p_Pyramid4, _p_Pyramid4To_p_INode, 0, 0}, {&_swigt__p_Pyramid6, _p_Pyramid6To_p_INode, 0, 0}, {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INode, 0, 0}, {&_swigt__p_RotationX, _p_RotationXTo_p_INode, 0, 0}, {&_swigt__p_RotationY, _p_RotationYTo_p_INode, 0, 0}, {&_swigt__p_RotationZ, _p_RotationZTo_p_INode, 0, 0}, {&_swigt__p_SawtoothRippleBox, _p_SawtoothRippleBoxTo_p_INode, 0, 0}, {&_swigt__p_SawtoothRippleGauss, _p_SawtoothRippleGaussTo_p_INode, 0, 0}, {&_swigt__p_SawtoothRippleLorentz, _p_SawtoothRippleLorentzTo_p_INode, 0, 0}, {&_swigt__p_Sphere, _p_SphereTo_p_INode, 0, 0}, {&_swigt__p_Spheroid, _p_SpheroidTo_p_INode, 0, 0}, {&_swigt__p_SquareLattice2D, _p_SquareLattice2DTo_p_INode, 0, 0}, {&_swigt__p_TanhInterlayer, _p_TanhInterlayerTo_p_INode, 0, 0}, {&_swigt__p_TruncatedCube, _p_TruncatedCubeTo_p_INode, 0, 0}, {&_swigt__p_TruncatedSphere, _p_TruncatedSphereTo_p_INode, 0, 0}, {&_swigt__p_TruncatedSpheroid, _p_TruncatedSpheroidTo_p_INode, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_INode[] = { {&_swigt__p_INode, 0, 0, 0}, {&_swigt__p_AutocorrelationModel, _p_AutocorrelationModelTo_p_INode, 0, 0}, {&_swigt__p_BarGauss, _p_BarGaussTo_p_INode, 0, 0}, {&_swigt__p_BarLorentz, _p_BarLorentzTo_p_INode, 0, 0}, {&_swigt__p_BasicLattice2D, _p_BasicLattice2DTo_p_INode, 0, 0}, {&_swigt__p_Bipyramid4, _p_Bipyramid4To_p_INode, 0, 0}, {&_swigt__p_Box, _p_BoxTo_p_INode, 0, 0}, {&_swigt__p_CantellatedCube, _p_CantellatedCubeTo_p_INode, 0, 0}, {&_swigt__p_CommonDepthCrosscorrelation, _p_CommonDepthCrosscorrelationTo_p_INode, 0, 0}, {&_swigt__p_Compound, _p_CompoundTo_p_INode, 0, 0}, {&_swigt__p_Cone, _p_ConeTo_p_INode, 0, 0}, {&_swigt__p_CoreAndShell, _p_CoreAndShellTo_p_INode, 0, 0}, {&_swigt__p_CosineRippleBox, _p_CosineRippleBoxTo_p_INode, 0, 0}, {&_swigt__p_CosineRippleGauss, _p_CosineRippleGaussTo_p_INode, 0, 0}, {&_swigt__p_CosineRippleLorentz, _p_CosineRippleLorentzTo_p_INode, 0, 0}, {&_swigt__p_CrosscorrelationModel, _p_CrosscorrelationModelTo_p_INode, 0, 0}, {&_swigt__p_Crystal, _p_CrystalTo_p_INode, 0, 0}, {&_swigt__p_Cylinder, _p_CylinderTo_p_INode, 0, 0}, {&_swigt__p_Dodecahedron, _p_DodecahedronTo_p_INode, 0, 0}, {&_swigt__p_EllipsoidalCylinder, _p_EllipsoidalCylinderTo_p_INode, 0, 0}, {&_swigt__p_ErfInterlayer, _p_ErfInterlayerTo_p_INode, 0, 0}, {&_swigt__p_FuzzySphere, _p_FuzzySphereTo_p_INode, 0, 0}, {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_GaussSphere, _p_GaussSphereTo_p_INode, 0, 0}, {&_swigt__p_HemiEllipsoid, _p_HemiEllipsoidTo_p_INode, 0, 0}, {&_swigt__p_HexagonalLattice2D, _p_HexagonalLattice2DTo_p_INode, 0, 0}, {&_swigt__p_HorizontalCylinder, _p_HorizontalCylinderTo_p_INode, 0, 0}, {&_swigt__p_ICosineRipple, _p_ICosineRippleTo_p_INode, 0, 0}, {&_swigt__p_IFormfactor, _p_IFormfactorTo_p_INode, 0, 0}, {&_swigt__p_IFormfactorPolyhedron, _p_IFormfactorPolyhedronTo_p_INode, 0, 0}, {&_swigt__p_IFormfactorPrism, _p_IFormfactorPrismTo_p_INode, 0, 0}, {&_swigt__p_IInterference, _p_IInterferenceTo_p_INode, 0, 0}, {&_swigt__p_IParticle, _p_IParticleTo_p_INode, 0, 0}, {&_swigt__p_IPeakShape, _p_IPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_IProfile1D, _p_IProfile1DTo_p_INode, 0, 0}, {&_swigt__p_IProfile2D, _p_IProfile2DTo_p_INode, 0, 0}, {&_swigt__p_IProfileRectangularRipple, _p_IProfileRectangularRippleTo_p_INode, 0, 0}, {&_swigt__p_IProfileRipple, _p_IProfileRippleTo_p_INode, 0, 0}, {&_swigt__p_IRotation, _p_IRotationTo_p_INode, 0, 0}, {&_swigt__p_ISampleNode, _p_ISampleNodeTo_p_INode, 0, 0}, {&_swigt__p_ISawtoothRipple, _p_ISawtoothRippleTo_p_INode, 0, 0}, {&_swigt__p_Icosahedron, _p_IcosahedronTo_p_INode, 0, 0}, {&_swigt__p_IdentityRotation, _p_IdentityRotationTo_p_INode, 0, 0}, {&_swigt__p_Interference1DLattice, _p_Interference1DLatticeTo_p_INode, 0, 0}, {&_swigt__p_Interference2DLattice, _p_Interference2DLatticeTo_p_INode, 0, 0}, {&_swigt__p_Interference2DParacrystal, _p_Interference2DParacrystalTo_p_INode, 0, 0}, {&_swigt__p_Interference2DSuperLattice, _p_Interference2DSuperLatticeTo_p_INode, 0, 0}, {&_swigt__p_InterferenceFinite2DLattice, _p_InterferenceFinite2DLatticeTo_p_INode, 0, 0}, {&_swigt__p_InterferenceHardDisk, _p_InterferenceHardDiskTo_p_INode, 0, 0}, {&_swigt__p_InterferenceNone, _p_InterferenceNoneTo_p_INode, 0, 0}, {&_swigt__p_InterferenceRadialParacrystal, _p_InterferenceRadialParacrystalTo_p_INode, 0, 0}, {&_swigt__p_InterlayerModel, _p_InterlayerModelTo_p_INode, 0, 0}, {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_K_CorrelationModel, _p_K_CorrelationModelTo_p_INode, 0, 0}, {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INode, 0, 0}, {&_swigt__p_Lattice3D, _p_Lattice3DTo_p_INode, 0, 0}, {&_swigt__p_Layer, _p_LayerTo_p_INode, 0, 0}, {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INode, 0, 0}, {&_swigt__p_LongBoxGauss, _p_LongBoxGaussTo_p_INode, 0, 0}, {&_swigt__p_LongBoxLorentz, _p_LongBoxLorentzTo_p_INode, 0, 0}, {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_Mesocrystal, _p_MesocrystalTo_p_INode, 0, 0}, {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_INode, 0, 0}, {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INode, 0, 0}, {&_swigt__p_Particle, _p_ParticleTo_p_INode, 0, 0}, {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INode, 0, 0}, {&_swigt__p_PlatonicOctahedron, _p_PlatonicOctahedronTo_p_INode, 0, 0}, {&_swigt__p_PlatonicTetrahedron, _p_PlatonicTetrahedronTo_p_INode, 0, 0}, {&_swigt__p_Prism3, _p_Prism3To_p_INode, 0, 0}, {&_swigt__p_Prism6, _p_Prism6To_p_INode, 0, 0}, {&_swigt__p_Profile1DCauchy, _p_Profile1DCauchyTo_p_INode, 0, 0}, {&_swigt__p_Profile1DCosine, _p_Profile1DCosineTo_p_INode, 0, 0}, {&_swigt__p_Profile1DGate, _p_Profile1DGateTo_p_INode, 0, 0}, {&_swigt__p_Profile1DGauss, _p_Profile1DGaussTo_p_INode, 0, 0}, {&_swigt__p_Profile1DTriangle, _p_Profile1DTriangleTo_p_INode, 0, 0}, {&_swigt__p_Profile1DVoigt, _p_Profile1DVoigtTo_p_INode, 0, 0}, {&_swigt__p_Profile2DCauchy, _p_Profile2DCauchyTo_p_INode, 0, 0}, {&_swigt__p_Profile2DCone, _p_Profile2DConeTo_p_INode, 0, 0}, {&_swigt__p_Profile2DGate, _p_Profile2DGateTo_p_INode, 0, 0}, {&_swigt__p_Profile2DGauss, _p_Profile2DGaussTo_p_INode, 0, 0}, {&_swigt__p_Profile2DVoigt, _p_Profile2DVoigtTo_p_INode, 0, 0}, {&_swigt__p_Pyramid2, _p_Pyramid2To_p_INode, 0, 0}, {&_swigt__p_Pyramid3, _p_Pyramid3To_p_INode, 0, 0}, {&_swigt__p_Pyramid4, _p_Pyramid4To_p_INode, 0, 0}, {&_swigt__p_Pyramid6, _p_Pyramid6To_p_INode, 0, 0}, {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INode, 0, 0}, {&_swigt__p_RotationX, _p_RotationXTo_p_INode, 0, 0}, {&_swigt__p_RotationY, _p_RotationYTo_p_INode, 0, 0}, {&_swigt__p_RotationZ, _p_RotationZTo_p_INode, 0, 0}, {&_swigt__p_SawtoothRippleBox, _p_SawtoothRippleBoxTo_p_INode, 0, 0}, {&_swigt__p_SawtoothRippleGauss, _p_SawtoothRippleGaussTo_p_INode, 0, 0}, {&_swigt__p_SawtoothRippleLorentz, _p_SawtoothRippleLorentzTo_p_INode, 0, 0}, {&_swigt__p_Sphere, _p_SphereTo_p_INode, 0, 0}, {&_swigt__p_Spheroid, _p_SpheroidTo_p_INode, 0, 0}, {&_swigt__p_SquareLattice2D, _p_SquareLattice2DTo_p_INode, 0, 0}, {&_swigt__p_TanhInterlayer, _p_TanhInterlayerTo_p_INode, 0, 0}, {&_swigt__p_TruncatedCube, _p_TruncatedCubeTo_p_INode, 0, 0}, {&_swigt__p_TruncatedSphere, _p_TruncatedSphereTo_p_INode, 0, 0}, {&_swigt__p_TruncatedSpheroid, _p_TruncatedSpheroidTo_p_INode, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IParticle[] = { {&_swigt__p_IParticle, 0, 0, 0}, {&_swigt__p_Compound, _p_CompoundTo_p_IParticle, 0, 0}, {&_swigt__p_CoreAndShell, _p_CoreAndShellTo_p_IParticle, 0, 0}, {&_swigt__p_Mesocrystal, _p_MesocrystalTo_p_IParticle, 0, 0}, {&_swigt__p_Particle, _p_ParticleTo_p_IParticle, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IPeakShape[] = { {&_swigt__p_IPeakShape, 0, 0, 0}, {&_swigt__p_GaussFisherPeakShape, _p_GaussFisherPeakShapeTo_p_IPeakShape, 0, 0}, {&_swigt__p_IsotropicGaussPeakShape, _p_IsotropicGaussPeakShapeTo_p_IPeakShape, 0, 0}, {&_swigt__p_IsotropicLorentzPeakShape, _p_IsotropicLorentzPeakShapeTo_p_IPeakShape, 0, 0}, {&_swigt__p_LorentzFisherPeakShape, _p_LorentzFisherPeakShapeTo_p_IPeakShape, 0, 0}, {&_swigt__p_MisesFisherGaussPeakShape, _p_MisesFisherGaussPeakShapeTo_p_IPeakShape, 0, 0}, {&_swigt__p_MisesGaussPeakShape, _p_MisesGaussPeakShapeTo_p_IPeakShape, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IProfile1D[] = { {&_swigt__p_IProfile1D, 0, 0, 0}, {&_swigt__p_Profile1DCauchy, _p_Profile1DCauchyTo_p_IProfile1D, 0, 0}, {&_swigt__p_Profile1DCosine, _p_Profile1DCosineTo_p_IProfile1D, 0, 0}, {&_swigt__p_Profile1DGate, _p_Profile1DGateTo_p_IProfile1D, 0, 0}, {&_swigt__p_Profile1DGauss, _p_Profile1DGaussTo_p_IProfile1D, 0, 0}, {&_swigt__p_Profile1DTriangle, _p_Profile1DTriangleTo_p_IProfile1D, 0, 0}, {&_swigt__p_Profile1DVoigt, _p_Profile1DVoigtTo_p_IProfile1D, 0, 0},{0, 0, 0, 0}}; @@ -75804,12 +76508,14 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Bipyramid4, _swigc__p_Box, _swigc__p_CantellatedCube, + _swigc__p_CommonDepthCrosscorrelation, _swigc__p_Compound, _swigc__p_Cone, _swigc__p_CoreAndShell, _swigc__p_CosineRippleBox, _swigc__p_CosineRippleGauss, _swigc__p_CosineRippleLorentz, + _swigc__p_CrosscorrelationModel, _swigc__p_Crystal, _swigc__p_Cylinder, _swigc__p_Dodecahedron, diff --git a/rawEx/scatter2d/CorrelatedRoughness.py b/rawEx/scatter2d/CorrelatedRoughness.py index e97f3678aad0ee8ae0258e7a5d69e9b4088f4572..d55a91bbf884e6e8f35c74dae03baff1a90160a3 100755 --- a/rawEx/scatter2d/CorrelatedRoughness.py +++ b/rawEx/scatter2d/CorrelatedRoughness.py @@ -25,7 +25,8 @@ def get_sample(): sigma, hurst, corrLength = 1*nm, 0.3, 5*nm autocorr = ba.K_CorrelationModel(sigma, hurst, corrLength) interlayer = ba.TanhInterlayer() - roughness = ba.LayerRoughness(autocorr, interlayer) + crosscorrelation = ba.CommonDepthCrosscorrelation(10*nm) + roughness = ba.LayerRoughness(autocorr, interlayer, crosscorrelation) my_sample = ba.MultiLayer() @@ -38,7 +39,6 @@ def get_sample(): my_sample.addLayerWithTopRoughness(l_part_b, roughness) my_sample.addLayerWithTopRoughness(l_substrate, roughness) - my_sample.setCrossCorrLength(10*nm) return my_sample