diff --git a/Core/Computation/Slice.h b/Core/Computation/Slice.h
index 006e21c6cd5fd2d98d83c3beda8c66fef9cace7c..ce7e96f493d85d37fe0068ef059d4fbc78f40b1e 100644
--- a/Core/Computation/Slice.h
+++ b/Core/Computation/Slice.h
@@ -18,7 +18,7 @@
 
 #include <memory>
 
-class IMaterial;
+class HomogeneousMaterial;
 class LayerRoughness;
 
 //! Represents a single slice, constructed from the division of a layer into (possibly) multiple
@@ -29,11 +29,11 @@ class LayerRoughness;
 class Slice
 {
 public:
-    Slice(const IMaterial& material, double thickness, const LayerRoughness* top_roughness=nullptr);
+    Slice(const HomogeneousMaterial& material, double thickness, const LayerRoughness* top_roughness=nullptr);
     ~Slice();
 
 private:
-    std::unique_ptr<IMaterial> mP_material;
+    std::unique_ptr<HomogeneousMaterial> mP_material;
     double m_thickness;
     std::unique_ptr<LayerRoughness> mP_top_roughness;
 };
diff --git a/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.cpp b/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.cpp
index d7ae4eaf523a6df769a39fa7dc4a4bd6fe56bfac..26205ec37a17284584821f32377654bc953c0a2d 100644
--- a/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.cpp
+++ b/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.cpp
@@ -15,7 +15,7 @@
 
 #include "FormFactorDecoratorMaterial.h"
 #include "BornAgainNamespace.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "MathConstants.h"
 #include "WavevectorInfo.h"
 
@@ -39,13 +39,13 @@ FormFactorDecoratorMaterial* FormFactorDecoratorMaterial::clone() const
     return P_result.release();
 }
 
-void FormFactorDecoratorMaterial::setMaterial(const IMaterial& material)
+void FormFactorDecoratorMaterial::setMaterial(const HomogeneousMaterial& material)
 {
     if (mP_material.get() != &material)
         mP_material.reset(material.clone());
 }
 
-void FormFactorDecoratorMaterial::setAmbientMaterial(const IMaterial& material)
+void FormFactorDecoratorMaterial::setAmbientMaterial(const HomogeneousMaterial& material)
 {
     if (mP_ambient_material.get() != &material)
         mP_ambient_material.reset(material.clone());
diff --git a/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.h b/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.h
index ce5b8fe75e535c423aae0c1a643abb4e0076cc2c..062457906a684c2e5ff0f746e6174ea229edf59a 100644
--- a/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.h
+++ b/Core/DecoratedFormFactor/FormFactorDecoratorMaterial.h
@@ -19,7 +19,7 @@
 #include "IFormFactorDecorator.h"
 #include <memory>
 
-class IMaterial;
+class HomogeneousMaterial;
 
 //! Decorates a scalar formfactor with the correct factor for the material's
 //! refractive index and that of its surrounding material.
@@ -37,10 +37,10 @@ public:
     void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
 
     //! Sets the material of the scatterer
-    void setMaterial(const IMaterial& material);
+    void setMaterial(const HomogeneousMaterial& material);
 
     //! Sets the ambient material
-    void setAmbientMaterial(const IMaterial& material) override;
+    void setAmbientMaterial(const HomogeneousMaterial& material) override;
 
     complex_t getAmbientRefractiveIndex() const;
 
@@ -53,8 +53,8 @@ public:
 private:
     complex_t getRefractiveIndexFactor(const WavevectorInfo& wavevectors) const;
 
-    std::unique_ptr<IMaterial> mP_material;
-    std::unique_ptr<IMaterial> mP_ambient_material;
+    std::unique_ptr<HomogeneousMaterial> mP_material;
+    std::unique_ptr<HomogeneousMaterial> mP_ambient_material;
 };
 
 #endif // FORMFACTORDECORATORMATERIAL_H
diff --git a/Core/DecoratedFormFactor/IFormFactorDecorator.h b/Core/DecoratedFormFactor/IFormFactorDecorator.h
index f14dd9e213a7bd0da177b70c7ce35bdf07394ea1..6dcafe6bee64fddd0113d47374a5083aacd958a0 100644
--- a/Core/DecoratedFormFactor/IFormFactorDecorator.h
+++ b/Core/DecoratedFormFactor/IFormFactorDecorator.h
@@ -34,7 +34,7 @@ public:
     IFormFactorDecorator* clone() const override=0;
     void accept(INodeVisitor* visitor) const override=0;
 
-    void setAmbientMaterial(const IMaterial &material) override {
+    void setAmbientMaterial(const HomogeneousMaterial &material) override {
         mp_form_factor->setAmbientMaterial(material); }
 
     double getVolume() const override {
diff --git a/Core/Export/ExportToPython.cpp b/Core/Export/ExportToPython.cpp
index 13a5fcc69f4def6050c1dc91421ed115da4af6fb..b814d5f1a6da443720f2fc45c11091f29e123940 100644
--- a/Core/Export/ExportToPython.cpp
+++ b/Core/Export/ExportToPython.cpp
@@ -19,7 +19,7 @@
 #include "Crystal.h"
 #include "Distributions.h"
 #include "GISASSimulation.h"
-#include "HomogeneousMagneticMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "IFormFactor.h"
 #include "InterferenceFunctions.h"
 #include "Layer.h"
@@ -180,7 +180,7 @@ std::string ExportToPython::defineMaterials() const
         if (visitedMaterials.find(it->second) != visitedMaterials.end())
             continue;
         visitedMaterials.insert(it->second);
-        const IMaterial* p_material = it->first;
+        const HomogeneousMaterial* p_material = it->first;
         complex_t ri = p_material->refractiveIndex();
         double delta = 1.0 - std::real(ri);
         double beta = std::imag(ri);
@@ -190,18 +190,12 @@ std::string ExportToPython::defineMaterials() const
                    << "\", " << printDouble(delta) << ", "
                    << printDouble(beta) << ")\n";
         } else {
-            const HomogeneousMagneticMaterial* p_mag_material
-                = dynamic_cast<const HomogeneousMagneticMaterial*>(p_material);
-            if (p_mag_material == 0)
-                throw Exceptions::RuntimeErrorException(
-                    "ExportToPython::defineMaterials: "
-                    "Non scalar material should be of type HomogeneousMagneticMaterial");
-            kvector_t magnetic_field = p_mag_material->magneticField();
+            kvector_t magnetic_field = p_material->magneticField();
             result << indent() << "magnetic_field = kvector_t(" << magnetic_field.x() << ", "
                    << magnetic_field.y() << ", " << magnetic_field.z() << ", "
                    << ")\n";
             result << indent() << m_label->getLabelMaterial(p_material)
-                   << " = ba.HomogeneousMagneticMaterial(\"" << p_material->getName();
+                   << " = ba.HomogeneousMaterial(\"" << p_material->getName();
             result << "\", " << printDouble(delta) << ", "
                    << printDouble(beta) << ", "
                    << "magnetic_field)\n";
diff --git a/Core/Export/SampleLabelHandler.cpp b/Core/Export/SampleLabelHandler.cpp
index 6d9338fe7119c7f5096532322d66c90f39f662df..33c2971047ce001073d265c0aa977fa21daf6594 100644
--- a/Core/Export/SampleLabelHandler.cpp
+++ b/Core/Export/SampleLabelHandler.cpp
@@ -14,9 +14,8 @@
 // ************************************************************************** //
 
 #include "SampleLabelHandler.h"
-#include "HomogeneousMagneticMaterial.h"
 #include "IInterferenceFunction.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "LayerRoughness.h"
 #include "MultiLayer.h"
 #include "Particle.h"
@@ -34,7 +33,7 @@ std::string SampleLabelHandler::getLabelInterferenceFunction(const IInterference
     return m_InterferenceFunctionLabel[iff];
 }
 
-std::string SampleLabelHandler::getLabelMaterial(const IMaterial* mat)
+std::string SampleLabelHandler::getLabelMaterial(const HomogeneousMaterial* mat)
 {
     return m_MaterialLabel[mat];
 }
@@ -93,7 +92,7 @@ std::string SampleLabelHandler::getLabelRotation(const IRotation* rot)
     return m_RotationsLabel[rot];
 }
 
-void SampleLabelHandler::insertMaterial(const IMaterial* mat)
+void SampleLabelHandler::insertMaterial(const HomogeneousMaterial* mat)
 {
     for (auto it=m_MaterialLabel.begin(); it!=m_MaterialLabel.end(); ++it) {
         if( *(it->first) == *mat ) {
diff --git a/Core/Export/SampleLabelHandler.h b/Core/Export/SampleLabelHandler.h
index 4c7a2873579bc88fba18ad949bbef4b714dca575..0d4fa2cf60140d9fa7c554d7cc59529a634c3611 100644
--- a/Core/Export/SampleLabelHandler.h
+++ b/Core/Export/SampleLabelHandler.h
@@ -27,7 +27,7 @@ class IAbstractParticle;
 class IFormFactor;
 class IInterferenceFunction;
 class ILayout;
-class IMaterial;
+class HomogeneousMaterial;
 class IRotation;
 class Layer;
 class LayerRoughness;
@@ -116,7 +116,7 @@ public:
     typedef LabelMap<const IFormFactor*> formfactors_t;
     typedef LabelMap<const IInterferenceFunction*> interferences_t;
     typedef LabelMap<const ILayout*> layouts_t;
-    typedef std::map<const IMaterial*, std::string> materials_t;
+    typedef std::map<const HomogeneousMaterial*, std::string> materials_t;
     typedef LabelMap<const IRotation*> rotations_t;
     typedef LabelMap<const Layer*> layers_t;
     typedef LabelMap<const LayerRoughness*> roughnesses_t;
@@ -144,7 +144,7 @@ public:
     std::string getLabelFormFactor(const IFormFactor* sample);
     std::string getLabelInterferenceFunction(const IInterferenceFunction* sample);
     std::string getLabelLayout(const ILayout* sample);
-    std::string getLabelMaterial(const IMaterial* sample);
+    std::string getLabelMaterial(const HomogeneousMaterial* sample);
     std::string getLabelRotation(const IRotation* sample);
     std::string getLabelLayer(const Layer* sample);
     std::string getLabelRoughness(const LayerRoughness* sample);
@@ -153,7 +153,7 @@ public:
     std::string getLabelParticleCoreShell(const ParticleCoreShell* sample);
     std::string getLabelParticleDistribution(const ParticleDistribution* sample);
 
-    void insertMaterial(const IMaterial* sample);
+    void insertMaterial(const HomogeneousMaterial* sample);
     void insertFormFactor(const IFormFactor* sample);
     void insertInterferenceFunction(const IInterferenceFunction* sample);
     void insertLayout(const ILayout* sample);
diff --git a/Core/Material/HomogeneousMagneticMaterial.cpp b/Core/Material/HomogeneousMagneticMaterial.cpp
deleted file mode 100644
index 8c56893b92f8c412d65bebf1b38121e93c588f90..0000000000000000000000000000000000000000
--- a/Core/Material/HomogeneousMagneticMaterial.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-// ************************************************************************** //
-//
-//  BornAgain: simulate and fit scattering at grazing incidence
-//
-//! @file      Core/Material/HomogeneousMagneticMaterial.cpp
-//! @brief     Implements class HomogeneousMagneticMaterial.
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2015
-//! @authors   Scientific Computing Group at MLZ Garching
-//! @authors   C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke
-//
-// ************************************************************************** //
-
-#include "HomogeneousMagneticMaterial.h"
-#include "WavevectorInfo.h"
-#include "Transform3D.h"
-
-// this prefactor is equal to m_n*g_n*mu_N / (hbar^2), with
-// m_n: neutron mass
-// g_n: neutron g-factor (-3.826)
-// mu_N: nuclear magneton
-// hbar: reduced Planck constant
-// Units are: 1/(nm^2 * T)
-static const double Magnetic_Prefactor = -2.91042993836710484e-3;
-
-// Unit 2x2 matrix
-static const Eigen::Matrix2cd Unit_Matrix(Eigen::Matrix2cd::Identity());
-
-// Imaginary unit
-namespace {
-    const complex_t I(0,1);
-}
-
-// Pauli matrices
-static const Eigen::Matrix2cd Pauli_X((Eigen::Matrix2cd() << 0,  1,
-                                                             1,  0).finished());
-static const Eigen::Matrix2cd Pauli_Y((Eigen::Matrix2cd() << 0, -I,
-                                                             I,  0).finished());
-static const Eigen::Matrix2cd Pauli_Z((Eigen::Matrix2cd() << 1,  0,
-                                                             0, -1).finished());
-
-namespace {
-// Used in experimental calculation of scattering matrix:
-cvector_t OrthogonalToBaseVector(cvector_t base, const kvector_t vector)
-{
-    cvector_t projection = (base.dot(vector)/base.mag2())*base;
-    return vector.complex() - projection;
-}
-}
-
-HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(
-        const std::string& name, const complex_t refractive_index,
-        const kvector_t magnetic_field)
-: HomogeneousMaterial(name, refractive_index)
-, m_magnetic_field(magnetic_field)
-{}
-
-HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(
-        const std::string& name, double refractive_index_delta,
-        double refractive_index_beta, const kvector_t magnetic_field)
-    : HomogeneousMaterial(name, refractive_index_delta, refractive_index_beta)
-    , m_magnetic_field(magnetic_field)
-{}
-
-HomogeneousMagneticMaterial* HomogeneousMagneticMaterial::clone() const
-{
-    return new HomogeneousMagneticMaterial(getName(), refractiveIndex(), magneticField());
-}
-
-HomogeneousMagneticMaterial* HomogeneousMagneticMaterial::cloneInverted() const
-{
-    return new HomogeneousMagneticMaterial(
-        getName()+"_inv", refractiveIndex(), -magneticField());
-}
-
-kvector_t HomogeneousMagneticMaterial::magneticField() const
-{
-    return m_magnetic_field;
-}
-
-Eigen::Matrix2cd HomogeneousMagneticMaterial::polarizedSLD(
-        const WavevectorInfo& wavevectors) const
-{
-//    return getPolarizedSLDExperimental(wavevectors);
-    Eigen::Matrix2cd result;
-    double factor = Magnetic_Prefactor/4.0/M_PI;
-    complex_t unit_factor = scalarSLD(wavevectors);
-    result = unit_factor*Unit_Matrix
-            + factor*Pauli_X*m_magnetic_field[0]
-            + factor*Pauli_Y*m_magnetic_field[1]
-            + factor*Pauli_Z*m_magnetic_field[2];
-    return result;
-}
-
-// Implementation only for experimental testing purposes
-// The magnetic field is here interpreted as the magnetization, which is seven orders
-// of magnitude bigger in general!
-Eigen::Matrix2cd HomogeneousMagneticMaterial::polarizedSLDExperimental(
-        const WavevectorInfo& wavevectors) const
-{
-    const double mag_prefactor = 0.291e-9; // needs to be given more precisely?
-    cvector_t mag_ortho = OrthogonalToBaseVector(wavevectors.getQ(), m_magnetic_field);
-    complex_t unit_factor = scalarSLD(wavevectors);
-    Eigen::Matrix2cd result;
-    result = unit_factor*Unit_Matrix
-            + mag_prefactor*Pauli_X*mag_ortho[0]
-            + mag_prefactor*Pauli_Y*mag_ortho[1]
-            + mag_prefactor*Pauli_Z*mag_ortho[2];
-    return result;
-}
-
-Eigen::Matrix2cd HomogeneousMagneticMaterial::polarizedFresnel(
-        const kvector_t k, double n_ref) const
-{
-    Eigen::Matrix2cd result;
-    double factor = Magnetic_Prefactor/k.mag2();
-    complex_t unit_factor = scalarFresnel(k, n_ref);
-    result = unit_factor*Unit_Matrix
-            + factor*Pauli_X*m_magnetic_field[0]
-            + factor*Pauli_Y*m_magnetic_field[1]
-            + factor*Pauli_Z*m_magnetic_field[2];
-    return result;
-}
-
-const IMaterial* HomogeneousMagneticMaterial::createTransformedMaterial(
-        const Transform3D& transform) const
-{
-    kvector_t mag_field_transformed = transform.transformed(m_magnetic_field);
-    return new HomogeneousMagneticMaterial(getName(), refractiveIndex(),
-            mag_field_transformed);
-}
-
-void HomogeneousMagneticMaterial::print(std::ostream& ostr) const
-{
-    ostr << "HomMagMat:" << getName() << "<" << this << ">{ "
-         << "R=" << m_refractive_index << ", B=" << m_magnetic_field << "}";
-}
diff --git a/Core/Material/HomogeneousMagneticMaterial.h b/Core/Material/HomogeneousMagneticMaterial.h
deleted file mode 100644
index 91004f42332ceb170d46a87a4da1fa10b6c876b2..0000000000000000000000000000000000000000
--- a/Core/Material/HomogeneousMagneticMaterial.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// ************************************************************************** //
-//
-//  BornAgain: simulate and fit scattering at grazing incidence
-//
-//! @file      Core/Material/HomogeneousMagneticMaterial.h
-//! @brief     Defines class HomogeneousMagneticMaterial
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2015
-//! @authors   Scientific Computing Group at MLZ Garching
-//! @authors   C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke
-//
-// ************************************************************************** //
-
-#ifndef HOMOGENEOUSMAGNETICMATERIAL_H
-#define HOMOGENEOUSMAGNETICMATERIAL_H
-
-#include "HomogeneousMaterial.h"
-
-//! A homogeneous material with magnetization.
-//! @ingroup materials
-
-class BA_CORE_API_ HomogeneousMagneticMaterial : public HomogeneousMaterial
-{
-public:
-#ifndef SWIG
-    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
-#endif
-    //! Constructs a material with _name_, _refractive_index_ and _magnetic_field_
-    HomogeneousMagneticMaterial(const std::string& name, const complex_t refractive_index,
-                                const kvector_t magnetic_field);
-
-    //! Constructs a material with _name_, refractive_index parameters and _magnetic_field_
-    HomogeneousMagneticMaterial(const std::string &name, double refractive_index_delta,
-                                double refractive_index_beta, const kvector_t magnetic_field);
-
-    HomogeneousMagneticMaterial* clone() const final;
-    HomogeneousMagneticMaterial* cloneInverted() const final;
-
-    //! Get the magnetic field (in Tesla)
-    kvector_t magneticField() const;
-
-    //! Set the magnetic field (in Tesla)
-    void setMagneticField(const kvector_t magnetic_field) { m_magnetic_field = magnetic_field; }
-
-    bool isScalarMaterial() const final { return false; }
-
-#ifndef SWIG
-    virtual Eigen::Matrix2cd polarizedSLD(const WavevectorInfo& wavevectors) const;
-
-    //! Get the scattering matrix for a material defined by its magnetization (experimental)
-    Eigen::Matrix2cd polarizedSLDExperimental(const WavevectorInfo& wavevectors) const;
-
-    virtual Eigen::Matrix2cd polarizedFresnel(const kvector_t k, double n_ref) const;
-#endif
-
-    const IMaterial* createTransformedMaterial(const Transform3D& transform) const final;
-
-protected:
-    void print(std::ostream &ostr) const final;
-
-    kvector_t m_magnetic_field; //!< magnetic field in Tesla
-};
-
-#endif // HOMOGENEOUSMAGNETICMATERIAL_H
diff --git a/Core/Material/HomogeneousMaterial.cpp b/Core/Material/HomogeneousMaterial.cpp
index 293069e744b6e0f1e4222d07bde4311871d6c44e..fc05629a7fa039a22d31b470e1984329f2b16c50 100644
--- a/Core/Material/HomogeneousMaterial.cpp
+++ b/Core/Material/HomogeneousMaterial.cpp
@@ -1,26 +1,65 @@
 #include "HomogeneousMaterial.h"
 #include "WavevectorInfo.h"
+#include "Transform3D.h"
 
+// this prefactor is equal to m_n*g_n*mu_N / (hbar^2), with
+// m_n: neutron mass
+// g_n: neutron g-factor (-3.826)
+// mu_N: nuclear magneton
+// hbar: reduced Planck constant
+// Units are: 1/(nm^2 * T)
+static const double Magnetic_Prefactor = -2.91042993836710484e-3;
 
-HomogeneousMaterial::HomogeneousMaterial(const std::string& name, const complex_t refractive_index)
-    : IMaterial(name)
+// Unit 2x2 matrix
+static const Eigen::Matrix2cd Unit_Matrix(Eigen::Matrix2cd::Identity());
+
+// Imaginary unit
+namespace {
+    const complex_t I(0,1);
+}
+
+// Pauli matrices
+static const Eigen::Matrix2cd Pauli_X((Eigen::Matrix2cd() << 0,  1,
+                                                             1,  0).finished());
+static const Eigen::Matrix2cd Pauli_Y((Eigen::Matrix2cd() << 0, -I,
+                                                             I,  0).finished());
+static const Eigen::Matrix2cd Pauli_Z((Eigen::Matrix2cd() << 1,  0,
+                                                             0, -1).finished());
+
+namespace {
+// Used in experimental calculation of scattering matrix:
+cvector_t OrthogonalToBaseVector(cvector_t base, const kvector_t vector)
+{
+    cvector_t projection = (base.dot(vector)/base.mag2())*base;
+    return vector.complex() - projection;
+}
+}
+
+HomogeneousMaterial::HomogeneousMaterial(
+        const std::string& name, const complex_t refractive_index, const kvector_t magnetic_field)
+    : INamed(name)
     , m_refractive_index(refractive_index)
+    , m_magnetic_field(magnetic_field)
 {}
 
-HomogeneousMaterial::HomogeneousMaterial(const std::string& name, double refractive_index_delta,
-                                         double refractive_index_beta)
-    : IMaterial(name)
+HomogeneousMaterial::HomogeneousMaterial(
+        const std::string& name, double refractive_index_delta,
+        double refractive_index_beta, const kvector_t magnetic_field)
+    : INamed(name)
     , m_refractive_index(complex_t(1.0 - refractive_index_delta, refractive_index_beta))
+    , m_magnetic_field(magnetic_field)
 {}
 
 HomogeneousMaterial*HomogeneousMaterial::clone() const
 {
-    return new HomogeneousMaterial(getName(), refractiveIndex());
+    return new HomogeneousMaterial(getName(), refractiveIndex(), magneticField());
 }
 
 HomogeneousMaterial*HomogeneousMaterial::cloneInverted() const
 {
-    return clone();
+    std::string name = isScalarMaterial() ? getName()
+                                          : getName()+"_inv";
+    return new HomogeneousMaterial(name, refractiveIndex(), -magneticField());
 }
 
 complex_t HomogeneousMaterial::refractiveIndex() const
@@ -33,13 +72,105 @@ void HomogeneousMaterial::setRefractiveIndex(const complex_t refractive_index)
     m_refractive_index = refractive_index;
 }
 
-const IMaterial*HomogeneousMaterial::createTransformedMaterial(const Transform3D&) const
+bool HomogeneousMaterial::isScalarMaterial() const
+{
+    return m_magnetic_field == kvector_t {};
+}
+
+kvector_t HomogeneousMaterial::magneticField() const
 {
-    return new HomogeneousMaterial(getName(), refractiveIndex());
+    return m_magnetic_field;
+}
+
+void HomogeneousMaterial::setMagneticField(const kvector_t magnetic_field)
+{
+    m_magnetic_field = magnetic_field;
+}
+
+complex_t HomogeneousMaterial::scalarSLD(const WavevectorInfo& wavevectors) const
+{
+    double wavelength = wavevectors.getWavelength();
+    double prefactor = M_PI/wavelength/wavelength;
+    complex_t refractive_index = refractiveIndex();
+    return prefactor * refractive_index * refractive_index;
+}
+
+complex_t HomogeneousMaterial::scalarFresnel(const kvector_t k, double n_ref) const
+{
+    complex_t refractive_index = refractiveIndex();
+    return refractive_index*refractive_index - n_ref*n_ref*k.sin2Theta();
+}
+
+Eigen::Matrix2cd HomogeneousMaterial::polarizedSLD(const WavevectorInfo& wavevectors) const
+{
+    //    return getPolarizedSLDExperimental(wavevectors);
+        Eigen::Matrix2cd result;
+        double factor = Magnetic_Prefactor/4.0/M_PI;
+        complex_t unit_factor = scalarSLD(wavevectors);
+        result = unit_factor*Unit_Matrix
+                + factor*Pauli_X*m_magnetic_field[0]
+                + factor*Pauli_Y*m_magnetic_field[1]
+                + factor*Pauli_Z*m_magnetic_field[2];
+        return result;
+}
+
+// Implementation only for experimental testing purposes
+// The magnetic field is here interpreted as the magnetization, which is seven orders
+// of magnitude bigger in general!
+Eigen::Matrix2cd HomogeneousMaterial::polarizedSLDExperimental(
+        const WavevectorInfo& wavevectors) const
+{
+    const double mag_prefactor = 0.291e-9; // needs to be given more precisely?
+    cvector_t mag_ortho = OrthogonalToBaseVector(wavevectors.getQ(), m_magnetic_field);
+    complex_t unit_factor = scalarSLD(wavevectors);
+    Eigen::Matrix2cd result;
+    result = unit_factor*Unit_Matrix
+            + mag_prefactor*Pauli_X*mag_ortho[0]
+            + mag_prefactor*Pauli_Y*mag_ortho[1]
+            + mag_prefactor*Pauli_Z*mag_ortho[2];
+    return result;
+}
+
+Eigen::Matrix2cd HomogeneousMaterial::polarizedFresnel(const kvector_t k, double n_ref) const
+{
+    Eigen::Matrix2cd result;
+    double factor = Magnetic_Prefactor/k.mag2();
+    complex_t unit_factor = scalarFresnel(k, n_ref);
+    result = unit_factor*Unit_Matrix
+            + factor*Pauli_X*m_magnetic_field[0]
+            + factor*Pauli_Y*m_magnetic_field[1]
+            + factor*Pauli_Z*m_magnetic_field[2];
+    return result;
+}
+
+const HomogeneousMaterial* HomogeneousMaterial::createTransformedMaterial(
+        const Transform3D& transform) const
+{
+    kvector_t transformed_field = transform.transformed(m_magnetic_field);
+    return new HomogeneousMaterial(getName(), refractiveIndex(), transformed_field);
 }
 
 void HomogeneousMaterial::print(std::ostream& ostr) const
 {
     ostr << "HomMat:" << getName() << "<" << this << ">{ "
-         << "R=" << m_refractive_index << "}";
+         << "R=" << m_refractive_index << ", B=" << m_magnetic_field << "}";
+}
+
+std::ostream& operator<<(std::ostream& ostr, const HomogeneousMaterial& m)
+{
+    m.print(ostr);
+    return ostr;
+}
+
+bool operator==(const HomogeneousMaterial& left, const HomogeneousMaterial& right)
+{
+    if (left.getName() != right.getName()) return false;
+    if (left.refractiveIndex() != right.refractiveIndex()) return false;
+    if (left.magneticField() != right.magneticField()) return false;
+    return true;
+}
+
+bool operator!=(const HomogeneousMaterial& left, const HomogeneousMaterial& right)
+{
+    return !(left==right);
 }
diff --git a/Core/Material/HomogeneousMaterial.h b/Core/Material/HomogeneousMaterial.h
index c256894a80e4eeb805957998188ad3dd631be243..72a35af2081e8ce28822fe00f4ac0a88062b2645 100644
--- a/Core/Material/HomogeneousMaterial.h
+++ b/Core/Material/HomogeneousMaterial.h
@@ -16,36 +16,74 @@
 #ifndef HOMOGENEOUSMATERIAL_H
 #define HOMOGENEOUSMATERIAL_H
 
-#include "IMaterial.h"
+#include "INamed.h"
+#include "Complex.h"
+#include "Vectors3D.h"
+#include "EigenCore.h"
 #include <vector>
 
-//! An homogeneous material with a refractive index.
+class Transform3D;
+class WavevectorInfo;
+
+//! An homogeneous material with a refractive index and (optionally) a magnetic field.
 //! @ingroup materials
 
-class BA_CORE_API_ HomogeneousMaterial : public IMaterial
+class BA_CORE_API_ HomogeneousMaterial : public INamed
 {
 public:
     //! Constructs a material with _name_ and _refractive_index_.
-    HomogeneousMaterial(const std::string &name, const complex_t refractive_index);
+    HomogeneousMaterial(const std::string &name, const complex_t refractive_index,
+                        const kvector_t magnetic_field=kvector_t());
 
     //! Constructs a material with _name_ and refractive_index parameters
     //! delta and beta (n = 1 - delta + i*beta).
     HomogeneousMaterial(const std::string &name, double refractive_index_delta,
-                        double refractive_index_beta);
+                        double refractive_index_beta, const kvector_t magnetic_field=kvector_t());
     ~HomogeneousMaterial() {}
 
-    HomogeneousMaterial* clone() const override;
-    HomogeneousMaterial* cloneInverted() const override;
+    HomogeneousMaterial* clone() const;
+    HomogeneousMaterial* cloneInverted() const;
 
-    complex_t refractiveIndex() const override;
+    complex_t refractiveIndex() const;
     void setRefractiveIndex(const complex_t refractive_index);
 
-    const IMaterial* createTransformedMaterial(const Transform3D& transform) const override;
+    //! Indicates whether the interaction with the material is scalar.
+    //! This means that different polarization states will be diffracted equally
+    bool isScalarMaterial() const;
+
+    bool isMagneticMaterial() const { return !isScalarMaterial(); }
+
+    //! Get the magnetic field (in Tesla)
+    kvector_t magneticField() const;
+
+    //! Set the magnetic field (in Tesla)
+    void setMagneticField(const kvector_t magnetic_field);
+
+    complex_t scalarSLD(const WavevectorInfo& wavevectors) const;
 
-protected:
-    void print(std::ostream &ostr) const override;
+    //! Return the potential term that is used in the one-dimensional Fresnel calculations
+    complex_t scalarFresnel(const kvector_t k, double n_ref) const;
+
+#ifndef SWIG
+    virtual Eigen::Matrix2cd polarizedSLD(const WavevectorInfo& wavevectors) const;
+
+    //! Get the scattering matrix for a material defined by its magnetization (experimental)
+    Eigen::Matrix2cd polarizedSLDExperimental(const WavevectorInfo& wavevectors) const;
+
+    virtual Eigen::Matrix2cd polarizedFresnel(const kvector_t k, double n_ref) const;
+#endif
+    const HomogeneousMaterial* createTransformedMaterial(const Transform3D& transform) const;
+
+    friend std::ostream& operator<<(std::ostream& ostr, const HomogeneousMaterial& mat);
+private:
+    void print(std::ostream &ostr) const;
 
     complex_t m_refractive_index; //!< complex index of refraction
+    kvector_t m_magnetic_field; //!< magnetic field in Tesla
 };
 
+// Comparison operators:
+bool operator==(const HomogeneousMaterial& left, const HomogeneousMaterial& right);
+bool operator!=(const HomogeneousMaterial& left, const HomogeneousMaterial& right);
+
 #endif // HOMOGENEOUSMATERIAL_H
diff --git a/Core/Material/IMaterial.cpp b/Core/Material/IMaterial.cpp
deleted file mode 100644
index 74610c760d412db79ce2ccf741c993f54841b977..0000000000000000000000000000000000000000
--- a/Core/Material/IMaterial.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// ************************************************************************** //
-//
-//  BornAgain: simulate and fit scattering at grazing incidence
-//
-//! @file      Core/Material/IMaterial.cpp
-//! @brief     Implements class IMaterial.
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2015
-//! @authors   Scientific Computing Group at MLZ Garching
-//! @authors   C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke
-//
-// ************************************************************************** //
-
-#include "IMaterial.h"
-#include "Exceptions.h"
-#include "HomogeneousMagneticMaterial.h"
-#include "WavevectorInfo.h"
-
-//! Returns true if *this agrees with other in all parameters.
-complex_t IMaterial::scalarSLD(const WavevectorInfo& wavevectors) const
-{
-    double wavelength = wavevectors.getWavelength();
-    double prefactor = M_PI/wavelength/wavelength;
-    complex_t refractive_index = refractiveIndex();
-    return prefactor * refractive_index * refractive_index;
-}
-
-complex_t IMaterial::scalarFresnel(const kvector_t k, double n_ref) const
-{
-    complex_t refractive_index = refractiveIndex();
-    return refractive_index*refractive_index - n_ref*n_ref*k.sin2Theta();
-}
-
-Eigen::Matrix2cd IMaterial::polarizedSLD(const WavevectorInfo& wavevectors) const
-{
-    return scalarSLD(wavevectors)*Eigen::Matrix2cd::Identity();
-}
-
-Eigen::Matrix2cd IMaterial::polarizedFresnel(const kvector_t k, double n_ref) const
-{
-    return scalarFresnel(k, n_ref)*Eigen::Matrix2cd::Identity();
-}
-
-bool IMaterial::operator==(const IMaterial& other) const
-{
-    if( getName()!=other.getName() )
-        return false;
-    if( refractiveIndex().real() != other.refractiveIndex().real() )
-        return false;
-    if( refractiveIndex().imag() != other.refractiveIndex().imag() )
-        return false;
-    if( isScalarMaterial() != other.isScalarMaterial() )
-        return false;
-    auto p_this  = dynamic_cast<const HomogeneousMagneticMaterial*>(this);
-    auto p_other = dynamic_cast<const HomogeneousMagneticMaterial*>(&other);
-    if (p_this && p_other && p_this->magneticField() != p_other->magneticField() )
-        return false;
-    return true;
-}
-
-void IMaterial::print(std::ostream& ostr) const
-{
-    ostr << "IMat:" << getName() << "<" << this << ">";
-}
-
-std::ostream& operator<<(std::ostream& ostr, const IMaterial& m)
-{
-    m.print(ostr);
-    return ostr;
-}
diff --git a/Core/Material/IMaterial.h b/Core/Material/IMaterial.h
deleted file mode 100644
index 2eae2ef059ead09c9fbeec84be19c98911dd2a38..0000000000000000000000000000000000000000
--- a/Core/Material/IMaterial.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// ************************************************************************** //
-//
-//  BornAgain: simulate and fit scattering at grazing incidence
-//
-//! @file      Core/Material/IMaterial.h
-//! @brief     Defines interface class IMaterial.
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2015
-//! @authors   Scientific Computing Group at MLZ Garching
-//! @authors   C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke
-//
-// ************************************************************************** //
-
-#ifndef IMATERIAL_H
-#define IMATERIAL_H
-
-#include "INamed.h"
-#include "Complex.h"
-#include "Vectors3D.h"
-#include "EigenCore.h"
-
-class Transform3D;
-class WavevectorInfo;
-
-//! Interface to a named material.
-//! @ingroup materials_internal
-
-class BA_CORE_API_ IMaterial : public INamed
-{
-public:
-    explicit IMaterial(const std::string& name) : INamed(name) {}
-    virtual ~IMaterial() {}
-    virtual IMaterial* clone() const =0;
-    virtual IMaterial* cloneInverted() const =0;
-
-    //! Indicates whether the interaction with the material is scalar.
-    //! This means that different polarization states will be diffracted equally
-    virtual bool isScalarMaterial() const { return true; }
-    bool isMagneticMaterial() const { return !isScalarMaterial(); }
-
-    virtual complex_t refractiveIndex() const { return 1.0; }
-
-    complex_t scalarSLD(const WavevectorInfo& wavevectors) const;
-
-    //! Return the potential term that is used in the one-dimensional Fresnel calculations
-    complex_t scalarFresnel(const kvector_t k, double n_ref) const;
-
-#ifndef SWIG
-    //! Get the scattering matrix (~potential V) from the material.
-    //! This matrix appears in the full three-dimensional Schroedinger equation.
-    virtual Eigen::Matrix2cd polarizedSLD(const WavevectorInfo& wavevectors) const;
-
-    //! Return the potential term that is used in the one-dimensional Fresnel calculations
-    virtual Eigen::Matrix2cd polarizedFresnel(const kvector_t k, double n_ref) const;
-#endif
-
-    //! Create a new material that is transformed with respect to this one
-    virtual const IMaterial* createTransformedMaterial(const Transform3D& transform) const =0;
-
-    bool operator==(const IMaterial& other) const;
-
-    friend std::ostream& operator<<(std::ostream& ostr, const IMaterial& m);
-protected:
-    virtual void print(std::ostream& ostr) const;
-};
-
-#endif // IMATERIAL_H
diff --git a/Core/Multilayer/FormFactorDWBA.h b/Core/Multilayer/FormFactorDWBA.h
index 80aabec267ae7352bda42292c9235759000e8384..0f5995489b0883bd19a951bfe87b82af6d88e61a 100644
--- a/Core/Multilayer/FormFactorDWBA.h
+++ b/Core/Multilayer/FormFactorDWBA.h
@@ -34,7 +34,7 @@ public:
 
     void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
-    void setAmbientMaterial(const IMaterial& material) override {
+    void setAmbientMaterial(const HomogeneousMaterial& material) override {
         mP_form_factor->setAmbientMaterial(material);
     }
 
diff --git a/Core/Multilayer/FormFactorDWBAPol.h b/Core/Multilayer/FormFactorDWBAPol.h
index 64061c4dd441911cb8caacb69348e6cd409a7e3b..52170cb776e9802d03b3e43b20f61bd542e7e8ef 100644
--- a/Core/Multilayer/FormFactorDWBAPol.h
+++ b/Core/Multilayer/FormFactorDWBAPol.h
@@ -35,7 +35,7 @@ public:
 
     void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
 
-    void setAmbientMaterial(const IMaterial& material) override {
+    void setAmbientMaterial(const HomogeneousMaterial& material) override {
         mP_form_factor->setAmbientMaterial(material);
     }
 
diff --git a/Core/Multilayer/Layer.cpp b/Core/Multilayer/Layer.cpp
index 71a05f3472ead09a45132defd66229211772c495..8591489dbf19ed30e40c37af49f3d35ede94d930 100644
--- a/Core/Multilayer/Layer.cpp
+++ b/Core/Multilayer/Layer.cpp
@@ -17,11 +17,11 @@
 #include "BornAgainNamespace.h"
 #include "Exceptions.h"
 #include "ILayout.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "ParameterPool.h"
 #include "RealParameter.h"
 
-Layer::Layer(const IMaterial& material, double thickness)
+Layer::Layer(const HomogeneousMaterial& material, double thickness)
     : mp_material(nullptr), m_thickness(thickness)
 {
     setName(BornAgain::LayerType);
@@ -61,7 +61,7 @@ void Layer::setThickness(double thickness)
 }
 
 //! Sets _material_ of the layer.
-void Layer::setMaterial(const IMaterial& material)
+void Layer::setMaterial(const HomogeneousMaterial& material)
 {
     delete mp_material;
     mp_material = material.clone();
@@ -72,7 +72,7 @@ complex_t Layer::refractiveIndex() const
     return mp_material ? mp_material->refractiveIndex() : 1.0;
 }
 
-//TODO: remove this in favor of the IMaterial methods (or rename)
+//TODO: remove this in favor of the HomogeneousMaterial methods (or rename)
 complex_t Layer::refractiveIndex2() const
 {
     return refractiveIndex()*refractiveIndex();
diff --git a/Core/Multilayer/Layer.h b/Core/Multilayer/Layer.h
index 3db55299de95ede76af2f42ed70492b871db409e..d74bfcaefb0fbb9a8467220ec1689588127e6b9f 100644
--- a/Core/Multilayer/Layer.h
+++ b/Core/Multilayer/Layer.h
@@ -21,7 +21,7 @@
 #include "SafePointerVector.h"
 
 class ILayout;
-class IMaterial;
+class HomogeneousMaterial;
 
 //! A layer, with thickness (in nanometer) and material.
 //! @ingroup samples
@@ -29,7 +29,7 @@ class IMaterial;
 class BA_CORE_API_ Layer : public ISample
 {
 public:
-    Layer(const IMaterial& material, double thickness = 0);
+    Layer(const HomogeneousMaterial& material, double thickness = 0);
 
     ~Layer() final;
 
@@ -41,8 +41,8 @@ public:
     void setThickness(double thickness);
     double thickness() const { return m_thickness; }
 
-    void setMaterial(const IMaterial& material);
-    const IMaterial* material() const { return mp_material; }
+    void setMaterial(const HomogeneousMaterial& material);
+    const HomogeneousMaterial* material() const { return mp_material; }
 
     complex_t refractiveIndex() const;
     complex_t refractiveIndex2() const; //!< squared refractive index
@@ -61,7 +61,7 @@ public:
 private:
     Layer(const Layer& other);
 
-    IMaterial* mp_material;   //!< pointer to the material
+    HomogeneousMaterial* mp_material;   //!< pointer to the material
     double m_thickness;       //!< layer thickness in nanometers
     SafePointerVector<ILayout> m_layouts; //!< independent layouts in this layer
 };
diff --git a/Core/Multilayer/LayoutStrategyBuilder.cpp b/Core/Multilayer/LayoutStrategyBuilder.cpp
index 92258686c5a54c9030b2813ff1d78d425b12686c..f329766170f8b5145532785e10ddb373f5ad2b6b 100644
--- a/Core/Multilayer/LayoutStrategyBuilder.cpp
+++ b/Core/Multilayer/LayoutStrategyBuilder.cpp
@@ -109,7 +109,7 @@ FormFactorCoherentSum* LayoutStrategyBuilder::createFormFactorCoherentSum(
             P_ff_framework.reset(ff_pair.first->clone());
 
         size_t layer_index = ff_pair.second;
-        const IMaterial* p_layer_material = mp_multilayer->layer(layer_index)->material();
+        const HomogeneousMaterial* p_layer_material = mp_multilayer->layer(layer_index)->material();
         P_ff_framework->setAmbientMaterial(*p_layer_material);
 
         auto part = FormFactorCoherentPart(P_ff_framework.release());
diff --git a/Core/Multilayer/LayoutStrategyBuilder.h b/Core/Multilayer/LayoutStrategyBuilder.h
index 57bfa2969272fb3bf009896008689a89559f429b..17dcf4c390686342003f80e3242394b06a3e104b 100644
--- a/Core/Multilayer/LayoutStrategyBuilder.h
+++ b/Core/Multilayer/LayoutStrategyBuilder.h
@@ -24,7 +24,7 @@ class FormFactorCoherentSum;
 class IFormFactor;
 class IInterferenceFunctionStrategy;
 class ILayout;
-class IMaterial;
+class HomogeneousMaterial;
 class IParticle;
 class IFresnelMap;
 class MultiLayer;
diff --git a/Core/Multilayer/MultiLayer.cpp b/Core/Multilayer/MultiLayer.cpp
index 415720e40d1c2494296b439e7f2167785247e779..e13ca8b60fced3fb6ab283ae3c5bbf8aab9f6c64 100644
--- a/Core/Multilayer/MultiLayer.cpp
+++ b/Core/Multilayer/MultiLayer.cpp
@@ -20,7 +20,7 @@
 #include "Layer.h"
 #include "LayerInterface.h"
 #include "LayerRoughness.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "ParameterPool.h"
 #include "RealParameter.h"
 #include <iomanip>
@@ -237,7 +237,7 @@ int MultiLayer::indexOfLayer(const Layer* layer) const
 
 bool MultiLayer::containsMagneticMaterial() const
 {
-    for (const IMaterial* mat: containedMaterials())
+    for (const HomogeneousMaterial* mat: containedMaterials())
         if (mat->isMagneticMaterial())
             return true;
     return false;
diff --git a/Core/Multilayer/SpecularMagnetic.cpp b/Core/Multilayer/SpecularMagnetic.cpp
index f1b34e3bfa14f80ff0ee1b7403a3ebcf282f7101..41c3db80f593033b9e623bd7c89cf3a9dc311212 100644
--- a/Core/Multilayer/SpecularMagnetic.cpp
+++ b/Core/Multilayer/SpecularMagnetic.cpp
@@ -16,7 +16,7 @@
 #include "SpecularMagnetic.h"
 #include "Layer.h"
 #include "LayerInterface.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "MultiLayer.h"
 #include "WavevectorInfo.h"
 #include <Eigen/LU>
diff --git a/Core/Multilayer/SpecularMatrix.cpp b/Core/Multilayer/SpecularMatrix.cpp
index e8bba2af07111ed37944205bf55a7dc16c6b8c97..305ac89784ffe80420028d1bda966cc881de43d9 100644
--- a/Core/Multilayer/SpecularMatrix.cpp
+++ b/Core/Multilayer/SpecularMatrix.cpp
@@ -14,7 +14,7 @@
 // ************************************************************************** //
 
 #include "SpecularMatrix.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "Layer.h"
 #include "LayerInterface.h"
 #include "LayerRoughness.h"
diff --git a/Core/Particle/FormFactorCoreShell.cpp b/Core/Particle/FormFactorCoreShell.cpp
index 569b934fd07543d35e5bc50855319c11ad1d1f66..6ea3a015be7a05ba8ff9c4092dadfc20c10a8d24 100644
--- a/Core/Particle/FormFactorCoreShell.cpp
+++ b/Core/Particle/FormFactorCoreShell.cpp
@@ -47,7 +47,7 @@ double FormFactorCoreShell::topZ(const IRotation& rotation) const
     return mP_shell->topZ(rotation);
 }
 
-void FormFactorCoreShell::setAmbientMaterial(const IMaterial& material)
+void FormFactorCoreShell::setAmbientMaterial(const HomogeneousMaterial& material)
 {
     mP_shell->setAmbientMaterial(material);
 }
diff --git a/Core/Particle/FormFactorCoreShell.h b/Core/Particle/FormFactorCoreShell.h
index d65f105d5e29627702d36e785fc7173b3e47bea6..5ecbdbd923120d8e9a2843c7387965176a26beee 100644
--- a/Core/Particle/FormFactorCoreShell.h
+++ b/Core/Particle/FormFactorCoreShell.h
@@ -42,7 +42,7 @@ public:
 
     double topZ(const IRotation& rotation) const override final;
 
-    void setAmbientMaterial(const IMaterial& material) override final;
+    void setAmbientMaterial(const HomogeneousMaterial& material) override final;
 
     complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
 
diff --git a/Core/Particle/FormFactorCrystal.h b/Core/Particle/FormFactorCrystal.h
index 9c4c94959d1fa4ba393af2b3501ab2813a69baf6..4d5547d48a362b6fa092e37b095bf31e0d697bc8 100644
--- a/Core/Particle/FormFactorCrystal.h
+++ b/Core/Particle/FormFactorCrystal.h
@@ -34,7 +34,7 @@ public:
 
     void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
 
-    void setAmbientMaterial(const IMaterial& material) override {
+    void setAmbientMaterial(const HomogeneousMaterial& material) override {
         mp_basis_form_factor->setAmbientMaterial(material);
     }
 
diff --git a/Core/Particle/FormFactorWeighted.cpp b/Core/Particle/FormFactorWeighted.cpp
index 92926851edcca17be009972574ea00631c0211ac..ec4b8ee62142cf5285b21b0e2426e750a3bcc503 100644
--- a/Core/Particle/FormFactorWeighted.cpp
+++ b/Core/Particle/FormFactorWeighted.cpp
@@ -72,7 +72,7 @@ void FormFactorWeighted::addFormFactor(const IFormFactor& form_factor, double we
     m_weights.push_back(weight);
 }
 
-void FormFactorWeighted::setAmbientMaterial(const IMaterial& material)
+void FormFactorWeighted::setAmbientMaterial(const HomogeneousMaterial& material)
 {
     for (size_t index=0; index<m_form_factors.size(); ++index)
         m_form_factors[index]->setAmbientMaterial(material);
diff --git a/Core/Particle/FormFactorWeighted.h b/Core/Particle/FormFactorWeighted.h
index 22992ec299510b982e0f56e7c845e2018e5e9533..b127df1e750f9e0a0daae953087c431587156bc2 100644
--- a/Core/Particle/FormFactorWeighted.h
+++ b/Core/Particle/FormFactorWeighted.h
@@ -44,7 +44,7 @@ public:
 
     void addFormFactor(const IFormFactor& form_factor, double weight=1.0);
 
-    void setAmbientMaterial(const IMaterial& material) override final;
+    void setAmbientMaterial(const HomogeneousMaterial& material) override final;
 
     complex_t evaluate(const WavevectorInfo& wavevectors) const override final;
 
diff --git a/Core/Particle/IAbstractParticle.h b/Core/Particle/IAbstractParticle.h
index 4cb6990fa9d85d0aa1212b3bd0084e70e37320c4..cb2ac23cdf0afb43c4bf87c942b661bd8032c884 100644
--- a/Core/Particle/IAbstractParticle.h
+++ b/Core/Particle/IAbstractParticle.h
@@ -21,7 +21,7 @@
 #include "BornAgainNamespace.h"
 #include <memory>
 
-class IMaterial;
+class HomogeneousMaterial;
 
 //! Interface for a generic particle.
 //!
diff --git a/Core/Particle/MesoCrystal.h b/Core/Particle/MesoCrystal.h
index 4b1a9033757e4d81bfbbb1d326cd8d42909c8b22..48971413ee65c79508ac4f5ce43338313968db2d 100644
--- a/Core/Particle/MesoCrystal.h
+++ b/Core/Particle/MesoCrystal.h
@@ -19,7 +19,7 @@
 #include "IParticle.h"
 
 class IClusteredParticles;
-class IMaterial;
+class HomogeneousMaterial;
 
 //! A particle with an internal structure of smaller particles.
 //! @ingroup samples
diff --git a/Core/Particle/Particle.cpp b/Core/Particle/Particle.cpp
index 9ea9962dde68f3758b1764b8b97fb63e228c6a66..c36b3e1f4fbda688f9cc6654b5762be1701050d8 100644
--- a/Core/Particle/Particle.cpp
+++ b/Core/Particle/Particle.cpp
@@ -16,20 +16,20 @@
 #include "Particle.h"
 #include "BornAgainNamespace.h"
 #include "FormFactorDecoratorPositionFactor.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 
 Particle::Particle()
 {
     initialize();
 }
 
-Particle::Particle(const IMaterial& p_material)
+Particle::Particle(const HomogeneousMaterial& p_material)
     : mP_material(p_material.clone())
 {
     initialize();
 }
 
-Particle::Particle(const IMaterial& p_material, const IFormFactor& form_factor)
+Particle::Particle(const HomogeneousMaterial& p_material, const IFormFactor& form_factor)
     : mP_material(p_material.clone())
     , mP_form_factor(form_factor.clone())
 {
@@ -37,7 +37,7 @@ Particle::Particle(const IMaterial& p_material, const IFormFactor& form_factor)
     registerChild(mP_form_factor.get());
 }
 
-Particle::Particle(const IMaterial& p_material, const IFormFactor& form_factor,
+Particle::Particle(const HomogeneousMaterial& p_material, const IFormFactor& form_factor,
                    const IRotation& rotation)
     : mP_material(p_material.clone())
     , mP_form_factor(form_factor.clone())
@@ -88,14 +88,14 @@ IFormFactor* Particle::createSlicedFormFactor(ZLimits limits) const
                 mP_form_factor->createSlicedFormFactor(limits, *P_rotation, m_position));
     FormFactorDecoratorMaterial* p_ff = new FormFactorDecoratorMaterial(*P_temp_ff);
     if (mP_material) {
-        const std::unique_ptr<const IMaterial> P_transformed_material(
+        const std::unique_ptr<const HomogeneousMaterial> P_transformed_material(
                     mP_material->createTransformedMaterial(P_rotation->getTransform3D()));
         p_ff->setMaterial(*P_transformed_material);
     }
     return p_ff;
 }
 
-void Particle::setMaterial(const IMaterial& material)
+void Particle::setMaterial(const HomogeneousMaterial& material)
 {
     if(mP_material.get() != &material)
         mP_material.reset(material.clone());
diff --git a/Core/Particle/Particle.h b/Core/Particle/Particle.h
index 9df02414b67460ce65c435aa20bf58c4f43a9ec2..4a86ab33fc4d98f7ff430a0c3f185bcbeb2e89e6 100644
--- a/Core/Particle/Particle.h
+++ b/Core/Particle/Particle.h
@@ -17,7 +17,7 @@
 #define PARTICLE_H
 
 #include "IParticle.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "FormFactorDecoratorMaterial.h"
 #include "FormFactorDecoratorRotation.h"
 
@@ -28,9 +28,9 @@ class BA_CORE_API_ Particle : public IParticle
 {
 public:
     Particle();
-    Particle(const IMaterial& p_material);
-    Particle(const IMaterial& p_material, const IFormFactor& form_factor);
-    Particle(const IMaterial& p_material, const IFormFactor& form_factor,
+    Particle(const HomogeneousMaterial& p_material);
+    Particle(const HomogeneousMaterial& p_material, const IFormFactor& form_factor);
+    Particle(const HomogeneousMaterial& p_material, const IFormFactor& form_factor,
              const IRotation& rotation);
 
     Particle* clone() const override final;
@@ -42,8 +42,8 @@ public:
 
     IFormFactor* createSlicedFormFactor(ZLimits limits) const override final;
 
-    void setMaterial(const IMaterial& material);
-    const IMaterial* material() const override final { return mP_material.get(); }
+    void setMaterial(const HomogeneousMaterial& material);
+    const HomogeneousMaterial* material() const override final { return mP_material.get(); }
 
     complex_t refractiveIndex() const;
 
@@ -53,7 +53,7 @@ public:
     std::vector<const INode*> getChildren() const override final;
 
 protected:
-    std::unique_ptr<IMaterial> mP_material;
+    std::unique_ptr<HomogeneousMaterial> mP_material;
     std::unique_ptr<IFormFactor> mP_form_factor;
 private:
     void initialize();
diff --git a/Core/Particle/ParticleComposition.cpp b/Core/Particle/ParticleComposition.cpp
index d6e220ec49a93a1ab3c6de5a57f1221151aa630c..33b8b5180406026aabe55131bc7bdc98713876de 100644
--- a/Core/Particle/ParticleComposition.cpp
+++ b/Core/Particle/ParticleComposition.cpp
@@ -17,7 +17,7 @@
 #include "BornAgainNamespace.h"
 #include "Exceptions.h"
 #include "FormFactorWeighted.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "ParticleDistribution.h"
 
 ParticleComposition::ParticleComposition()
diff --git a/Core/Particle/ParticleComposition.h b/Core/Particle/ParticleComposition.h
index 7186e76bde3f731ab3aa150f3f76b3eb36834540..91a4c5e8df01d762f68e600a19ff30a9a13341fc 100644
--- a/Core/Particle/ParticleComposition.h
+++ b/Core/Particle/ParticleComposition.h
@@ -19,7 +19,7 @@
 #include "IParticle.h"
 #include <memory>
 
-class IMaterial;
+class HomogeneousMaterial;
 
 //! A composition of particles at fixed positions
 //! @ingroup samples
diff --git a/Core/Particle/ParticleCoreShell.cpp b/Core/Particle/ParticleCoreShell.cpp
index 90397d7e1ad870c190c4b9554c1a9125c5d0f5e3..b90456b37d22f1d24652dfaa10a23e7ff0c6a709 100644
--- a/Core/Particle/ParticleCoreShell.cpp
+++ b/Core/Particle/ParticleCoreShell.cpp
@@ -16,7 +16,7 @@
 #include "ParticleCoreShell.h"
 #include "BornAgainNamespace.h"
 #include "FormFactorCoreShell.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "Particle.h"
 
 ParticleCoreShell::ParticleCoreShell(
@@ -80,9 +80,9 @@ IFormFactor* ParticleCoreShell::createSlicedFormFactor(ZLimits limits) const
 
     // set core ambient material (needs to be rotated separately, AFTER applying
     // ParticleCoreShell's rotation to the clone of the shell particle)
-    const IMaterial* p_shell_material = P_shell->material();
+    const HomogeneousMaterial* p_shell_material = P_shell->material();
     if (p_shell_material) {
-        const std::unique_ptr<const IMaterial> P_transformed_material(
+        const std::unique_ptr<const HomogeneousMaterial> P_transformed_material(
                     p_shell_material->createTransformedMaterial(
                         P_shell->rotation()->getTransform3D()));
         P_ff_core->setAmbientMaterial(*P_transformed_material);
diff --git a/Core/Particle/ParticleCoreShell.h b/Core/Particle/ParticleCoreShell.h
index 73ca16e6047500a34b395543dccfb0e3fa909771..1ee616da7cc121b61be06ecedc28eb1e743f62f6 100644
--- a/Core/Particle/ParticleCoreShell.h
+++ b/Core/Particle/ParticleCoreShell.h
@@ -18,7 +18,7 @@
 
 #include "IParticle.h"
 
-class IMaterial;
+class HomogeneousMaterial;
 class Particle;
 
 //! A particle with a core/shell geometry.
diff --git a/Core/Scattering/IFormFactor.h b/Core/Scattering/IFormFactor.h
index 3b8751687b0a9c82cea39c996b92b23fdbfa7bf4..7c3081a2cc2bec4daa40b169b68cfaf4d6c3f2c5 100644
--- a/Core/Scattering/IFormFactor.h
+++ b/Core/Scattering/IFormFactor.h
@@ -22,7 +22,7 @@
 #include "Vectors3D.h"
 #include "ZLimits.h"
 
-class IMaterial;
+class HomogeneousMaterial;
 class ILayerRTCoefficients;
 class IRotation;
 class WavevectorInfo;
@@ -50,7 +50,7 @@ public:
                                         kvector_t translation) const;
 
     //! Passes the refractive index of the ambient material in which this particle is embedded.
-    virtual void setAmbientMaterial(const IMaterial&) =0;
+    virtual void setAmbientMaterial(const HomogeneousMaterial&) =0;
 
     //! Returns scattering amplitude for complex wavevectors ki, kf.
     virtual complex_t evaluate(const WavevectorInfo& wavevectors) const=0;
diff --git a/Core/Scattering/IFormFactorBorn.h b/Core/Scattering/IFormFactorBorn.h
index 3351db81b373426bc1f5255c0f7a7e4a20b9a72c..42016d19877df502870467165c6511e704f67e2c 100644
--- a/Core/Scattering/IFormFactorBorn.h
+++ b/Core/Scattering/IFormFactorBorn.h
@@ -38,7 +38,7 @@ public:
 
     IFormFactorBorn* clone() const override=0;
 
-    void setAmbientMaterial(const IMaterial&) override {}
+    void setAmbientMaterial(const HomogeneousMaterial&) override {}
 
     complex_t evaluate(const WavevectorInfo& wavevectors) const override;
 
diff --git a/Core/Scattering/ISample.cpp b/Core/Scattering/ISample.cpp
index 7bc24038a3faa68842adbb6ea66afb41ef554648..7b2d07a6175ae80df1e3f217da75246096f4d5cf 100644
--- a/Core/Scattering/ISample.cpp
+++ b/Core/Scattering/ISample.cpp
@@ -26,16 +26,16 @@ ISample* ISample::cloneInvertB() const
         "ISample::cloneInvertB() -> Error! Method is not implemented");
 }
 
-std::vector<const IMaterial*> ISample::containedMaterials() const
+std::vector<const HomogeneousMaterial*> ISample::containedMaterials() const
 {
-    std::vector<const IMaterial*> result;
-    if( const IMaterial* p_material = material() )
+    std::vector<const HomogeneousMaterial*> result;
+    if( const HomogeneousMaterial* p_material = material() )
         result.push_back( p_material );
-    if( const IMaterial* p_material = getAmbientMaterial() )
+    if( const HomogeneousMaterial* p_material = getAmbientMaterial() )
         result.push_back( p_material );
     for(auto child: getChildren() ) {
         if(const ISample* sample = dynamic_cast<const ISample *>(child)) {
-            for( const IMaterial* p_material: sample->containedMaterials() )
+            for( const HomogeneousMaterial* p_material: sample->containedMaterials() )
                 result.push_back( p_material );
         }
     }
diff --git a/Core/Scattering/ISample.h b/Core/Scattering/ISample.h
index 8c002eaa0354ea387cd95f91790dfa8909827b71..ac5472bc12da38f4c7d27f123edac650095f92c3 100644
--- a/Core/Scattering/ISample.h
+++ b/Core/Scattering/ISample.h
@@ -20,7 +20,7 @@
 #include "INode.h"
 #include <vector>
 
-class IMaterial;
+class HomogeneousMaterial;
 
 //! Pure virtual base class for sample components and properties related to scattering.
 //! @ingroup samples_internal
@@ -35,13 +35,13 @@ public:
     virtual ISample* cloneInvertB() const;
 
     //! Returns nullptr, unless overwritten to return a specific material.
-    virtual const IMaterial* material() const { return nullptr; }
+    virtual const HomogeneousMaterial* material() const { return nullptr; }
 
     //! Returns nullptr, unless overwritten to return a specific material.
-    virtual const IMaterial* getAmbientMaterial() const { return nullptr; }
+    virtual const HomogeneousMaterial* getAmbientMaterial() const { return nullptr; }
 
     //! Returns set of unique materials contained in this ISample.
-    std::vector<const IMaterial*> containedMaterials() const;
+    std::vector<const HomogeneousMaterial*> containedMaterials() const;
 
     template<class T> std::vector<const T*> containedSubclass() const;
 };
diff --git a/Core/StandardSamples/MagneticLayersBuilder.cpp b/Core/StandardSamples/MagneticLayersBuilder.cpp
index e319fe8de1d3b25206690e142e6f33f33589d9e6..b7f3eb1984f7fb12e1573bad3309763bfed514ec 100644
--- a/Core/StandardSamples/MagneticLayersBuilder.cpp
+++ b/Core/StandardSamples/MagneticLayersBuilder.cpp
@@ -1,6 +1,6 @@
 #include "MagneticLayersBuilder.h"
 #include "FormFactorFullSphere.h"
-#include "HomogeneousMagneticMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "Layer.h"
 #include "MultiLayer.h"
 #include "Particle.h"
@@ -22,8 +22,8 @@ MultiLayer*MagneticSubstrateZeroFieldBuilder::buildSample() const
     kvector_t substr_field(0.0, 0.0, 0.0);
     kvector_t particle_field(0.1, 0.0, 0.0);
     HomogeneousMaterial air_material("Air", 0.0, 0.0);
-    HomogeneousMagneticMaterial substrate_material("Substrate", 7e-6, 2e-8, substr_field);
-    HomogeneousMagneticMaterial particle_material("MagParticle", 6e-4, 2e-8, particle_field);
+    HomogeneousMaterial substrate_material("Substrate", 7e-6, 2e-8, substr_field);
+    HomogeneousMaterial particle_material("MagParticle", 6e-4, 2e-8, particle_field);
 
     ParticleLayout particle_layout;
     kvector_t position(0.0, 0.0, -10.0*Units::nanometer);
@@ -58,8 +58,8 @@ MultiLayer*MagneticRotationBuilder::buildSample() const
     kvector_t substr_field(0.0, 1.0, 0.0);
     kvector_t particle_field(1.0, 0.0, 0.0);
     HomogeneousMaterial air_material("Air", 0.0, 0.0);
-    HomogeneousMagneticMaterial substrate_material("Substrate", 7e-6, 2e-8, substr_field);
-    HomogeneousMagneticMaterial particle_material("MagParticle", 6e-4, 2e-8, particle_field);
+    HomogeneousMaterial substrate_material("Substrate", 7e-6, 2e-8, substr_field);
+    HomogeneousMaterial particle_material("MagParticle", 6e-4, 2e-8, particle_field);
 
     ParticleLayout particle_layout;
     kvector_t position(0.0, 0.0, -10.0*Units::nanometer);
diff --git a/Core/StandardSamples/MagneticParticlesBuilder.cpp b/Core/StandardSamples/MagneticParticlesBuilder.cpp
index ad87f568b12543736c873ab44e00badfeaa2c6b5..9a6691bc1fbb9b8cdb10232acd800270afedea78 100644
--- a/Core/StandardSamples/MagneticParticlesBuilder.cpp
+++ b/Core/StandardSamples/MagneticParticlesBuilder.cpp
@@ -18,7 +18,7 @@
 #include "Layer.h"
 #include "LayerInterface.h"
 #include "LayerRoughness.h"
-#include "HomogeneousMagneticMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "MultiLayer.h"
 #include "Particle.h"
 #include "ParticleLayout.h"
@@ -49,7 +49,7 @@ MultiLayer* MagneticParticleZeroFieldBuilder::buildSample() const
     HomogeneousMaterial air_material("Air", 0.0, 0.0);
     HomogeneousMaterial substrate_material("Substrate", 6e-6, 2e-8);
     kvector_t magnetic_field(0.0, 0.0, 0.0);
-    HomogeneousMagneticMaterial particle_material("MagParticle", 6e-4, 2e-8, magnetic_field);
+    HomogeneousMaterial particle_material("MagParticle", 6e-4, 2e-8, magnetic_field);
 
     Layer air_layer(air_material);
     Layer substrate_layer(substrate_material);
@@ -90,7 +90,7 @@ MultiLayer* MagneticCylindersBuilder::buildSample() const
     HomogeneousMaterial air_material("Air", 0.0, 0.0);
     HomogeneousMaterial substrate_material("Substrate", 15e-6, 0.0);
     kvector_t magnetic_field(0.0, 1.0, 0.0);
-    HomogeneousMagneticMaterial particle_material("MagParticle2", 5e-6, 0.0, magnetic_field);
+    HomogeneousMaterial particle_material("MagParticle2", 5e-6, 0.0, magnetic_field);
 
     Layer air_layer(air_material);
     Layer substrate_layer(substrate_material);
diff --git a/Doc/UserManual/Sample.tex b/Doc/UserManual/Sample.tex
index 0357ab3960a99fb8faa31732636bf279561cc806..7e58dbf374dcbcc495dd835a10644fadb6b48e48 100644
--- a/Doc/UserManual/Sample.tex
+++ b/Doc/UserManual/Sample.tex
@@ -72,9 +72,9 @@ A \ttIdx{Layer} is constructed through the following API:
 \begin{lstlisting}
 class Layer {
     Layer();
-    Layer(const IMaterial& material, double thickness=0);
+    Layer(const HomogeneousMaterial& material, double thickness=0);
     void setThickness(double thickness);
-    void setMaterial(const IMaterial& material);
+    void setMaterial(const HomogeneousMaterial& material);
     void addLayout(const ParticleLayout& decoration);
 };
 \end{lstlisting}
@@ -95,7 +95,7 @@ Scattering from different layouts adds incoherently.
 \section{Material}\label{SRefMat}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-Material classes all inherit from the pure virtual interface class \ttIdx{IMaterial}.
+Material classes all inherit from the pure virtual interface class \ttIdx{HomogeneousMaterial}.
 Currently, BornAgain only supports homogeneous materials.
 They can be either nonmagnetic or magnetic.
 A nonmagnetic \ttIdx{HomogeneousMaterial} is created through the API
diff --git a/GUI/coregui/Models/GUIObjectBuilder.cpp b/GUI/coregui/Models/GUIObjectBuilder.cpp
index 8f430e2e9485f690f153c9d06c24ecbc413b5e82..f47702ac36f8cd2263106ad58d5a87834d1218fd 100644
--- a/GUI/coregui/Models/GUIObjectBuilder.cpp
+++ b/GUI/coregui/Models/GUIObjectBuilder.cpp
@@ -26,7 +26,7 @@
 #include "FormFactors.h"
 #include "GISASSimulation.h"
 #include "GUIHelpers.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "InstrumentModel.h"
 #include "IMultiLayerBuilder.h"
 #include "Layer.h"
@@ -625,7 +625,7 @@ void GUIObjectBuilder::buildPositionInfo(SessionItem* particleItem, const IParti
 }
 
 MaterialProperty GUIObjectBuilder::createMaterialFromDomain(
-        const IMaterial* material)
+        const HomogeneousMaterial* material)
 {
     QString materialName = m_topSampleName + QString("_") + QString(material->getName().c_str());
 
diff --git a/GUI/coregui/Models/GUIObjectBuilder.h b/GUI/coregui/Models/GUIObjectBuilder.h
index 2a0113b324015e827f50cd8e679ef551d5c33b33..3e5cd696204f7fb4fcd90f553c0ad566b0fa627a 100644
--- a/GUI/coregui/Models/GUIObjectBuilder.h
+++ b/GUI/coregui/Models/GUIObjectBuilder.h
@@ -20,7 +20,7 @@
 #include "INodeVisitor.h"
 #include "MaterialProperty.h"
 
-class IMaterial;
+class HomogeneousMaterial;
 class InstrumentModel;
 class SampleModel;
 class SessionItem;
@@ -98,7 +98,7 @@ public:
 private:
     void buildAbundanceInfo(SessionItem* particleItem);
     void buildPositionInfo(SessionItem* particleItem, const IParticle* sample);
-    MaterialProperty createMaterialFromDomain(const IMaterial*);
+    MaterialProperty createMaterialFromDomain(const HomogeneousMaterial*);
 
     SampleModel* m_sampleModel;
 
diff --git a/GUI/coregui/Models/IconProvider.cpp b/GUI/coregui/Models/IconProvider.cpp
index 7af53e2c1cb7eafceadfd966c109a3647ea8a3bf..6a42819f4c2f45e6ec06f674ce2169fedda1d362 100644
--- a/GUI/coregui/Models/IconProvider.cpp
+++ b/GUI/coregui/Models/IconProvider.cpp
@@ -27,7 +27,7 @@ QIcon IconProvider::icon(const SessionItem *item)
         result.addPixmap(QPixmap(":/images/gisas_instrument.png"), QIcon::Selected);
     }
 
-    else if(item->modelType() == Constants::MaterialType) {
+    else if(item->modelType() == Constants::HomogeneousMaterialType) {
         if(const MaterialItem *materialItem = dynamic_cast<const MaterialItem *>(item)) {
             QPixmap pixmap(10,10);
             pixmap.fill(materialItem->getColor());
diff --git a/GUI/coregui/Models/ItemFactory.cpp b/GUI/coregui/Models/ItemFactory.cpp
index eccfe4a82d6d0c676696e333358c7c3ee474c028..388c4f8493edca062b058d42af33f6cf22049b13 100644
--- a/GUI/coregui/Models/ItemFactory.cpp
+++ b/GUI/coregui/Models/ItemFactory.cpp
@@ -148,7 +148,7 @@ ItemFactory::ItemMap_t initializeItemMap() {
     result[Constants::SquareLatticeType] = &createInstance<SquareLatticeItem>;
     result[Constants::HexagonalLatticeType] = &createInstance<HexagonalLatticeItem>;
 
-    result[Constants::MaterialType] = &createInstance<MaterialItem>;
+    result[Constants::HomogeneousMaterialType] = &createInstance<MaterialItem>;
 
     result[Constants::RefractiveIndexType] = &createInstance<RefractiveIndexItem>;
 
diff --git a/GUI/coregui/Models/MaterialItem.cpp b/GUI/coregui/Models/MaterialItem.cpp
index a101e7893c6667bf6a31e86bea7dc6fa3717f3e4..df0a4296143c09deb32220920f3fa123e2cba619 100644
--- a/GUI/coregui/Models/MaterialItem.cpp
+++ b/GUI/coregui/Models/MaterialItem.cpp
@@ -26,9 +26,9 @@ const QString MaterialItem::P_REFRACTIVE_INDEX = "Refractive index";
 const QString MaterialItem::P_IDENTIFIER = "Identifier";
 
 MaterialItem::MaterialItem()
-    : SessionItem(Constants::MaterialType)
+    : SessionItem(Constants::HomogeneousMaterialType)
 {
-    setItemName(Constants::MaterialType);
+    setItemName(Constants::HomogeneousMaterialType);
 
     ColorProperty color;
     addProperty(P_COLOR, color.getVariant());
@@ -48,7 +48,7 @@ QColor MaterialItem::getColor() const
     return property.getColor();
 }
 
-std::unique_ptr<IMaterial> MaterialItem::createMaterial() const
+std::unique_ptr<HomogeneousMaterial> MaterialItem::createMaterial() const
 {
     const RefractiveIndexItem *refractiveIndexItem
         = dynamic_cast<const RefractiveIndexItem *>(
diff --git a/GUI/coregui/Models/MaterialItem.h b/GUI/coregui/Models/MaterialItem.h
index f5602425115a8bd040a981ef7835ed25ff960a8e..3cb7bf6b93b1be0587d9a936a9f5a969c231124c 100644
--- a/GUI/coregui/Models/MaterialItem.h
+++ b/GUI/coregui/Models/MaterialItem.h
@@ -19,7 +19,7 @@
 
 #include "SessionItem.h"
 
-class IMaterial;
+class HomogeneousMaterial;
 
 class BA_CORE_API_ MaterialItem : public SessionItem
 {
@@ -33,7 +33,7 @@ public:
 
     QString getIdentifier() const;
     QColor getColor() const;
-    std::unique_ptr<IMaterial> createMaterial() const;
+    std::unique_ptr<HomogeneousMaterial> createMaterial() const;
 };
 
 #endif // MATERIALITEM_H
diff --git a/GUI/coregui/Models/MaterialModel.cpp b/GUI/coregui/Models/MaterialModel.cpp
index 9fdb320e636fb0c4a6f9d3f26c5ea4514c5dd8a3..f48a08ec87e3c60c04b34f424ccfc90c13ecdf79 100644
--- a/GUI/coregui/Models/MaterialModel.cpp
+++ b/GUI/coregui/Models/MaterialModel.cpp
@@ -36,17 +36,20 @@ MaterialModel *MaterialModel::createCopy(SessionItem *parent)
 
 MaterialItem *MaterialModel::addMaterial(const QString &name, double delta, double beta)
 {
-    MaterialItem *materialItem = dynamic_cast<MaterialItem *>(insertNewItem(Constants::MaterialType));
+    MaterialItem *materialItem = dynamic_cast<MaterialItem *>(
+                                     insertNewItem(Constants::HomogeneousMaterialType));
     materialItem->setItemName(name);
 
     RefractiveIndexItem *refractiveIndexItem =
-            dynamic_cast<RefractiveIndexItem *>(materialItem->getItem(MaterialItem::P_REFRACTIVE_INDEX));
+            dynamic_cast<RefractiveIndexItem *>(
+                materialItem->getItem(MaterialItem::P_REFRACTIVE_INDEX));
     Q_ASSERT(refractiveIndexItem);
 
     refractiveIndexItem->setDelta(delta);
     refractiveIndexItem->setBeta(beta);
 
-    materialItem->setItemValue(MaterialItem::P_COLOR, MaterialUtils::suggestMaterialColorProperty(name).getVariant());
+    materialItem->setItemValue(MaterialItem::P_COLOR,
+                               MaterialUtils::suggestMaterialColorProperty(name).getVariant());
 
     return materialItem;
 }
diff --git a/GUI/coregui/Models/TransformToDomain.cpp b/GUI/coregui/Models/TransformToDomain.cpp
index e092aa44af7393f964f370a5aaee929a837edc1f..7f0cbff74d69b2cf46090bebfcd628b0ade874e9 100644
--- a/GUI/coregui/Models/TransformToDomain.cpp
+++ b/GUI/coregui/Models/TransformToDomain.cpp
@@ -51,7 +51,7 @@
 #include "Units.h"
 #include "VectorItem.h"
 
-std::unique_ptr<IMaterial> TransformToDomain::createDomainMaterial(const SessionItem& item)
+std::unique_ptr<HomogeneousMaterial> TransformToDomain::createDomainMaterial(const SessionItem& item)
 {
     MaterialProperty material_property;
     if (item.modelType() == Constants::ParticleType) {
diff --git a/GUI/coregui/Models/TransformToDomain.h b/GUI/coregui/Models/TransformToDomain.h
index adcffcd91f024f021be11624cb0f7dd2e1e315ff..07af8d86befec439ccbf6faf013992e16e5fd54a 100644
--- a/GUI/coregui/Models/TransformToDomain.h
+++ b/GUI/coregui/Models/TransformToDomain.h
@@ -20,7 +20,7 @@
 #include "Beam.h"
 #include "Distributions.h" // for IDistribution1D
 #include "IInterferenceFunction.h"
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "IParticle.h"
 #include "Instrument.h"
 #include "Layer.h"
@@ -36,7 +36,7 @@ class DetectorItem;
 
 namespace TransformToDomain
 {
-BA_CORE_API_ std::unique_ptr<IMaterial> createDomainMaterial(const SessionItem& item);
+BA_CORE_API_ std::unique_ptr<HomogeneousMaterial> createDomainMaterial(const SessionItem& item);
 BA_CORE_API_ std::unique_ptr<IParticle> createIParticle(const SessionItem& item);
 BA_CORE_API_ std::unique_ptr<Layer> createLayer(const SessionItem& item);
 BA_CORE_API_ std::unique_ptr<LayerRoughness> createLayerRoughness(const SessionItem& item);
diff --git a/GUI/coregui/Models/item_constants.h b/GUI/coregui/Models/item_constants.h
index d5a6d4eede0eda7a47a3c7fdaa65112aca3441bc..982ddc30bd1ac6f6bc3a36ff231ae5c8945847b2 100644
--- a/GUI/coregui/Models/item_constants.h
+++ b/GUI/coregui/Models/item_constants.h
@@ -112,9 +112,7 @@ const ModelType BasicLatticeType = "BasicLattice";
 const ModelType SquareLatticeType = "SquareLattice";
 const ModelType HexagonalLatticeType = "HexagonalLattice";
 
-const ModelType MaterialType = "Material";
-const ModelType HomogeneousMaterialType = "Homogeneous Material";
-const ModelType HomogeneousMagneticMaterialType = "Homogeneous Magnetic Material";
+const ModelType HomogeneousMaterialType = "HomogeneousMaterial";
 
 const ModelType RefractiveIndexType = "RefractiveIndex";
 
diff --git a/GUI/coregui/Views/MaterialEditor/MaterialUtils.cpp b/GUI/coregui/Views/MaterialEditor/MaterialUtils.cpp
index 579fe5e25a25db3453b7ccc9959ea81a345cdf9b..3b38b083f68a18ca2661cdee26aa92bdd30256c2 100644
--- a/GUI/coregui/Views/MaterialEditor/MaterialUtils.cpp
+++ b/GUI/coregui/Views/MaterialEditor/MaterialUtils.cpp
@@ -18,7 +18,6 @@
 #include "ComboProperty.h"
 #include "DesignerHelper.h"
 #include "GUIHelpers.h"
-#include "HomogeneousMagneticMaterial.h"
 #include "HomogeneousMaterial.h"
 #include "MagneticFieldItem.h"
 #include "MaterialModel.h"
@@ -62,7 +61,7 @@ ColorProperty MaterialUtils::suggestMaterialColorProperty(const QString &name)
     return ColorProperty(MaterialUtils::suggestMaterialColor(name));
 }
 
-std::unique_ptr<IMaterial>
+std::unique_ptr<HomogeneousMaterial>
 MaterialUtils::createDomainMaterial(const MaterialProperty &material_property)
 {
     MaterialItem *materialItem
diff --git a/GUI/coregui/Views/MaterialEditor/MaterialUtils.h b/GUI/coregui/Views/MaterialEditor/MaterialUtils.h
index 9c6ed4a207afcdcc383487cdaba8f8909a7186fd..f86b3dbf072641b1e2ee1628922defcb6c563ddc 100644
--- a/GUI/coregui/Views/MaterialEditor/MaterialUtils.h
+++ b/GUI/coregui/Views/MaterialEditor/MaterialUtils.h
@@ -24,7 +24,7 @@
 #include <QString>
 #include <memory>
 
-class IMaterial;
+class HomogeneousMaterial;
 
 namespace MaterialUtils
 {
@@ -32,7 +32,7 @@ namespace MaterialUtils
 BA_CORE_API_ QColor suggestMaterialColor(const QString &name);
 BA_CORE_API_ MaterialProperty getDefaultMaterialProperty();
 BA_CORE_API_ ColorProperty suggestMaterialColorProperty(const QString &name);
-BA_CORE_API_ std::unique_ptr<IMaterial> createDomainMaterial(
+BA_CORE_API_ std::unique_ptr<HomogeneousMaterial> createDomainMaterial(
         const MaterialProperty &material_property);
 
 BA_CORE_API_ QString materialTag(const SessionItem &item);
diff --git a/Tests/Functional/PyCore/legacy/polmagcylinders1.py b/Tests/Functional/PyCore/legacy/polmagcylinders1.py
index a52cbae03d4b99d34c50a6da3442fde527b176e0..51ecda3c51981fc51e9ca4b431b3c566e27001ef 100644
--- a/Tests/Functional/PyCore/legacy/polmagcylinders1.py
+++ b/Tests/Functional/PyCore/legacy/polmagcylinders1.py
@@ -16,7 +16,7 @@ def runSimulation():
 
     magnetic_field = ba.kvector_t(0, 0, 0)
 
-    magParticle = ba.HomogeneousMagneticMaterial("magParticle", 6e-4, 2e-8, magnetic_field )
+    magParticle = ba.HomogeneousMaterial("magParticle", 6e-4, 2e-8, magnetic_field )
     # collection of particles
     cylinder_ff = ba.FormFactorCylinder(5*nanometer, 5*nanometer)
     cylinder = ba.Particle(magParticle, cylinder_ff)
diff --git a/Tests/Functional/PyCore/legacy/polmagcylinders2.py b/Tests/Functional/PyCore/legacy/polmagcylinders2.py
index 974f90540f16733bb80a94ae8e18357566bce02c..ac465662f83d4ddd71f538824705f9b88d9e1085 100644
--- a/Tests/Functional/PyCore/legacy/polmagcylinders2.py
+++ b/Tests/Functional/PyCore/legacy/polmagcylinders2.py
@@ -19,7 +19,7 @@ def getSimulationIntensity(rho_beam, efficiency):
 
     magnetic_field = kvector_t(0, 1, 0)
 
-    magParticle = HomogeneousMagneticMaterial("magParticle", 5e-6, 0.0, magnetic_field )
+    magParticle = HomogeneousMaterial("magParticle", 5e-6, 0.0, magnetic_field )
     # collection of particles
     cylinder_ff = FormFactorCylinder(5*nanometer, 5*nanometer)
     cylinder = Particle(magParticle, cylinder_ff)
diff --git a/Tests/UnitTests/Core/DataStructure/LLDataTest.h b/Tests/UnitTests/Core/DataStructure/LLDataTest.h
index a0db9ef35cc10daf927d26961f1224c17ef3dade..3b38935c6ff440eba11972faea45910aec59fe4d 100644
--- a/Tests/UnitTests/Core/DataStructure/LLDataTest.h
+++ b/Tests/UnitTests/Core/DataStructure/LLDataTest.h
@@ -1,6 +1,6 @@
 #include "LLData.h"
 #include <algorithm>
-#include "IMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "Complex.h"
 
 
diff --git a/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h b/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h
index ea10dfa222c65892966e0c8008bbdc192bef5290..617bd7da8c43e6bb0443e00a53f43ba08af62fc7 100644
--- a/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h
+++ b/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h
@@ -1,6 +1,6 @@
 #include "SpecularMatrix.h"
 #include "SpecularMagnetic.h"
-#include "HomogeneousMagneticMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "Units.h"
 
 class SpecularMagneticTest : public ::testing :: Test
@@ -48,7 +48,7 @@ TEST_F(SpecularMagneticTest, zerofield)
     std::vector<ScalarRTCoefficients> coeffs_scalar;
 
     MultiLayer multi_layer_zerofield;
-    HomogeneousMagneticMaterial substr_material_zerofield("Substrate", 7e-6, 2e-8, substr_field);
+    HomogeneousMaterial substr_material_zerofield("Substrate", 7e-6, 2e-8, substr_field);
     Layer substr_layer_zerofield(substr_material_zerofield);
     multi_layer_zerofield.addLayer(air_layer);
     multi_layer_zerofield.addLayer(substr_layer_zerofield);
diff --git a/Tests/UnitTests/Core/Other/HomogeneousMagneticMaterialTest.h b/Tests/UnitTests/Core/Other/HomogeneousMagneticMaterialTest.h
deleted file mode 100644
index 7185c45051be25344188b88cfe051afcf48aa21f..0000000000000000000000000000000000000000
--- a/Tests/UnitTests/Core/Other/HomogeneousMagneticMaterialTest.h
+++ /dev/null
@@ -1,120 +0,0 @@
-#include "HomogeneousMagneticMaterial.h"
-#include "Rotations.h"
-#include "Units.h"
-
-class HomogeneousMagneticMaterialTest : public ::testing::Test
-{
-public:
-    HomogeneousMagneticMaterialTest() {}
-    virtual ~HomogeneousMagneticMaterialTest() {}
-};
-
-TEST_F(HomogeneousMagneticMaterialTest, HomogeneousMagneticMaterialWithRefIndex)
-{
-    complex_t refIndex = complex_t(1.0, 2.0);
-    kvector_t magnetism = kvector_t(3.0, 4.0, 5.0);
-    HomogeneousMagneticMaterial material("MagMaterial", refIndex, magnetism);
-    EXPECT_EQ("MagMaterial", material.getName());
-    EXPECT_EQ(refIndex, material.refractiveIndex());
-    EXPECT_EQ(magnetism, material.magneticField());
-
-//    Eigen::Matrix2cd matrix = material.getPolarizedSLD(-2.91042993836710484e-3);
-//    EXPECT_EQ(complex_t(2,4.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(3.0,-4.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(3.0, 4.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(-8,4.0), matrix(1,1));
-
-    complex_t refIndex2 = complex_t(2.0, 3.0);
-    material.setRefractiveIndex(refIndex2);
-    EXPECT_EQ(refIndex2, material.refractiveIndex());
-
-//    Eigen::Matrix2cd matrix2 = material.getPolarizedSLD(-2.91042993836710484e-3);
-//    EXPECT_EQ(complex_t(0.0,12.0), matrix2(0,0));
-//    EXPECT_EQ(complex_t(3.0, -4.0), matrix2(0,1));
-//    EXPECT_EQ(complex_t(3.0,4.0), matrix2(1,0));
-//    EXPECT_EQ(complex_t(-10.0,12.0), matrix2(1,1));
-
-    kvector_t magnetism2 = kvector_t(5.0, 6.0, 7.0);
-    material.setMagneticField(magnetism2);
-    EXPECT_EQ(magnetism2, material.magneticField());
-}
-
-TEST_F(HomogeneousMagneticMaterialTest, HomogeneousMagneticMaterialWithRefIndexAndMagField)
-{
-    kvector_t magnetism = kvector_t(3.0, 4.0, 5.0);
-    HomogeneousMagneticMaterial material("MagMaterial", 2.0, 2.0, magnetism);
-    EXPECT_EQ("MagMaterial", material.getName());
-    EXPECT_EQ(complex_t(-1.0, 2.0), material.refractiveIndex());
-    EXPECT_EQ(magnetism, material.magneticField());
-
-//    Eigen::Matrix2cd matrix = material.getPolarizedSLD(-2.91042993836710484e-3);
-//    EXPECT_EQ(complex_t(2,-4.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(3.0,-4.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(3.0, 4.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(-8,-4.0), matrix(1,1));
-
-    complex_t refIndex2 = complex_t(2.0, 3.0);
-    material.setRefractiveIndex(refIndex2);
-    EXPECT_EQ(refIndex2, material.refractiveIndex());
-
-    kvector_t magnetism2 = kvector_t(5.0, 6.0, 7.0);
-    material.setMagneticField(magnetism2);
-    EXPECT_EQ(magnetism2, material.magneticField());
-}
-
-TEST_F(HomogeneousMagneticMaterialTest, HomogeneousMagneticMaterialTransform)
-{
-    complex_t refIndex = complex_t(0.0, 0.0);
-    kvector_t magnetism = kvector_t(0.0, 0.0, 0.0);
-    HomogeneousMagneticMaterial material("MagMaterial", refIndex, magnetism);
-
-    RotationZ transform(45.*Units::degree);
-    const IMaterial * tMaterial = material.createTransformedMaterial(transform.getTransform3D());
-
-    EXPECT_EQ("MagMaterial", tMaterial->getName());
-    EXPECT_EQ(refIndex, tMaterial->refractiveIndex());
-
-//    Eigen::Matrix2cd matrix = tMaterial->getPolarizedSLD(-2.91042993836710484e-3);
-//    EXPECT_EQ(complex_t(0.0, 0.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(0.0, 0.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(0.0, 0.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(0.0, 0.0), matrix(1,1));
-
-    delete tMaterial;
-}
-
-TEST_F(HomogeneousMagneticMaterialTest, HomogeneousMagneticMaterialClone)
-{
-    complex_t refIndex = complex_t(1.0, 2.0);
-    kvector_t magnetism = kvector_t(3.0, 4.0, 5.0);
-    HomogeneousMagneticMaterial material("MagMaterial", refIndex, magnetism);
-
-    HomogeneousMagneticMaterial * clone = material.clone();
-
-    EXPECT_EQ("MagMaterial", clone->getName());
-    EXPECT_EQ(refIndex, clone->refractiveIndex());
-    EXPECT_EQ(magnetism, clone->magneticField());
-
-//    Eigen::Matrix2cd matrix = clone->getPolarizedSLD(-2.91042993836710484e-3);
-//    EXPECT_EQ(complex_t(2,4.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(3.0,-4.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(3.0, 4.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(-8,4.0), matrix(1,1));
-
-    complex_t refIndex2 = complex_t(2.0, 3.0);
-    clone->setRefractiveIndex(refIndex2);
-    EXPECT_EQ(refIndex2, clone->refractiveIndex());
-
-    kvector_t magnetism2 = kvector_t(5.0, 6.0, 7.0);
-    clone->setMagneticField(magnetism2);
-    EXPECT_EQ(magnetism2, clone->magneticField());
-
-    RotationZ transform(45.*Units::degree);
-    const IMaterial * tMaterial = clone->createTransformedMaterial(transform.getTransform3D());
-
-    EXPECT_EQ("MagMaterial", tMaterial->getName());
-    EXPECT_EQ(refIndex2, tMaterial->refractiveIndex());
-
-    delete tMaterial;
-    delete clone;
-}
diff --git a/Tests/UnitTests/Core/Other/HomogeneousMaterialTest.h b/Tests/UnitTests/Core/Other/HomogeneousMaterialTest.h
index 545dce0b39742b4f16841e581ab48ee1978ef8ec..003347469d062375c6cfe37f851c5b6e5df9b442 100644
--- a/Tests/UnitTests/Core/Other/HomogeneousMaterialTest.h
+++ b/Tests/UnitTests/Core/Other/HomogeneousMaterialTest.h
@@ -1,110 +1,90 @@
 #include "HomogeneousMaterial.h"
 #include "Rotations.h"
 #include "Units.h"
-#include "WavevectorInfo.h"
 
-class HomogeneousMaterialTest : public ::testing :: Test
+class HomogeneousMaterialTest : public ::testing::Test
 {
 public:
     HomogeneousMaterialTest() {}
-    virtual ~HomogeneousMaterialTest(){}
+    virtual ~HomogeneousMaterialTest() {}
 };
 
 TEST_F(HomogeneousMaterialTest, HomogeneousMaterialWithRefIndex)
 {
     complex_t refIndex = complex_t(1.0, 2.0);
-    HomogeneousMaterial material("Material1", refIndex);
-    EXPECT_EQ("Material1", material.getName());
+    kvector_t magnetism = kvector_t(3.0, 4.0, 5.0);
+    HomogeneousMaterial material("MagMaterial", refIndex, magnetism);
+    EXPECT_EQ("MagMaterial", material.getName());
     EXPECT_EQ(refIndex, material.refractiveIndex());
-
-//    cvector_t k(1.0, 0.0, 0.0);
-//    WavevectorInfo wavevectors(k, k, 2.0*M_PI);
-//    Eigen::Matrix2cd matrix = material.getPolarizedSLD(wavevectors);
-//    EXPECT_EQ(complex_t(-3.0,4.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(-3.0,4.0), matrix(1,1));
+    EXPECT_EQ(magnetism, material.magneticField());
 
     complex_t refIndex2 = complex_t(2.0, 3.0);
     material.setRefractiveIndex(refIndex2);
     EXPECT_EQ(refIndex2, material.refractiveIndex());
 
-//    Eigen::Matrix2cd matrix2 = material.getPolarizedSLD(wavevectors);
-//    EXPECT_EQ(complex_t(-5.0,12.0), matrix2(0,0));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix2(0,1));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix2(1,0));
-//    EXPECT_EQ(complex_t(-5.0,12.0), matrix2(1,1));
+    kvector_t magnetism2 = kvector_t(5.0, 6.0, 7.0);
+    material.setMagneticField(magnetism2);
+    EXPECT_EQ(magnetism2, material.magneticField());
 }
 
-TEST_F(HomogeneousMaterialTest, HomogeneousMaterialWithRefIndexParam)
+TEST_F(HomogeneousMaterialTest, HomogeneousMaterialWithRefIndexAndMagField)
 {
-    HomogeneousMaterial material("Material1", 2.0, 2.0);
-    EXPECT_EQ("Material1", material.getName());
-    EXPECT_EQ(complex_t(-1.0,2.0), material.refractiveIndex());
-
-//    cvector_t k(1.0, 0.0, 0.0);
-//    WavevectorInfo wavevectors(k, k, 2.0*M_PI);
-//    Eigen::Matrix2cd matrix = material.getPolarizedSLD(wavevectors);
-//    EXPECT_EQ(complex_t(-3.0,-4.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(-3.0,-4.0), matrix(1,1));
+    kvector_t magnetism = kvector_t(3.0, 4.0, 5.0);
+    HomogeneousMaterial material("MagMaterial", 2.0, 2.0, magnetism);
+    EXPECT_EQ("MagMaterial", material.getName());
+    EXPECT_EQ(complex_t(-1.0, 2.0), material.refractiveIndex());
+    EXPECT_EQ(magnetism, material.magneticField());
+
+    complex_t refIndex2 = complex_t(2.0, 3.0);
+    material.setRefractiveIndex(refIndex2);
+    EXPECT_EQ(refIndex2, material.refractiveIndex());
+
+    kvector_t magnetism2 = kvector_t(5.0, 6.0, 7.0);
+    material.setMagneticField(magnetism2);
+    EXPECT_EQ(magnetism2, material.magneticField());
 }
 
 TEST_F(HomogeneousMaterialTest, HomogeneousMaterialTransform)
 {
-    complex_t refIndex = complex_t(1.0, 2.0);
-    HomogeneousMaterial material("Material1", refIndex);
+    complex_t refIndex = complex_t(0.0, 0.0);
+    kvector_t magnetism = kvector_t(0.0, 0.0, 0.0);
+    HomogeneousMaterial material("MagMaterial", refIndex, magnetism);
 
     RotationZ transform(45.*Units::degree);
-    const IMaterial * tMaterial = material.createTransformedMaterial(transform.getTransform3D());
+    const HomogeneousMaterial * tMaterial = material.createTransformedMaterial(
+                                                transform.getTransform3D());
 
-    EXPECT_EQ("Material1", tMaterial->getName());
+    EXPECT_EQ("MagMaterial", tMaterial->getName());
     EXPECT_EQ(refIndex, tMaterial->refractiveIndex());
 
-//    cvector_t k(1.0, 0.0, 0.0);
-//    WavevectorInfo wavevectors(k, k, 2.0*M_PI);
-//    Eigen::Matrix2cd matrix = tMaterial->getPolarizedSLD(wavevectors);
-//    EXPECT_EQ(complex_t(-3.0,4.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(-3.0,4.0), matrix(1,1));
-
     delete tMaterial;
 }
 
 TEST_F(HomogeneousMaterialTest, HomogeneousMaterialClone)
 {
     complex_t refIndex = complex_t(1.0, 2.0);
-    HomogeneousMaterial material("Material1", refIndex);
+    kvector_t magnetism = kvector_t(3.0, 4.0, 5.0);
+    HomogeneousMaterial material("MagMaterial", refIndex, magnetism);
 
     HomogeneousMaterial * clone = material.clone();
 
-    EXPECT_EQ("Material1", clone->getName());
+    EXPECT_EQ("MagMaterial", clone->getName());
     EXPECT_EQ(refIndex, clone->refractiveIndex());
-
-//    cvector_t k(1.0, 0.0, 0.0);
-//    WavevectorInfo wavevectors(k, k, 2.0*M_PI);
-//    Eigen::Matrix2cd matrix = clone->getPolarizedSLD(wavevectors);
-//    EXPECT_EQ(complex_t(-3.0,4.0), matrix(0,0));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(0,1));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix(1,0));
-//    EXPECT_EQ(complex_t(-3.0,4.0), matrix(1,1));
+    EXPECT_EQ(magnetism, clone->magneticField());
 
     complex_t refIndex2 = complex_t(2.0, 3.0);
     clone->setRefractiveIndex(refIndex2);
     EXPECT_EQ(refIndex2, clone->refractiveIndex());
 
-//    Eigen::Matrix2cd matrix2 = clone->getPolarizedSLD(wavevectors);
-//    EXPECT_EQ(complex_t(-5.0,12.0), matrix2(0,0));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix2(0,1));
-//    EXPECT_EQ(complex_t(0.0,0.0), matrix2(1,0));
-//    EXPECT_EQ(complex_t(-5.0,12.0), matrix2(1,1));
+    kvector_t magnetism2 = kvector_t(5.0, 6.0, 7.0);
+    clone->setMagneticField(magnetism2);
+    EXPECT_EQ(magnetism2, clone->magneticField());
 
     RotationZ transform(45.*Units::degree);
-    const IMaterial * tMaterial = clone->createTransformedMaterial(transform.getTransform3D());
+    const HomogeneousMaterial * tMaterial = clone->createTransformedMaterial(
+                                                transform.getTransform3D());
 
-    EXPECT_EQ("Material1", tMaterial->getName());
+    EXPECT_EQ("MagMaterial", tMaterial->getName());
     EXPECT_EQ(refIndex2, tMaterial->refractiveIndex());
 
     delete tMaterial;
diff --git a/Tests/UnitTests/Core/Other/testlist.h b/Tests/UnitTests/Core/Other/testlist.h
index 0e14a4f868ae90c3614942b065f5182268b56d82..ded90cf0eea472f7cf40c80a5d5aace484336880 100644
--- a/Tests/UnitTests/Core/Other/testlist.h
+++ b/Tests/UnitTests/Core/Other/testlist.h
@@ -8,6 +8,5 @@
 #include "ChiSquaredModuleTest.h"
 #include "CumulativeValueTest.h"
 #include "BeamTest.h"
-#include "HomogeneousMagneticMaterialTest.h"
 #include "Shape2DTest.h"
 #include "GISASSimulationTest.h"
diff --git a/Tests/UnitTests/Core/Sample/MultiLayerTest.h b/Tests/UnitTests/Core/Sample/MultiLayerTest.h
index 2382fbf95de76971181f8b196848c01c01831fa4..d82d820a571d3eb1f1ea980abd95db0c2e7c828e 100644
--- a/Tests/UnitTests/Core/Sample/MultiLayerTest.h
+++ b/Tests/UnitTests/Core/Sample/MultiLayerTest.h
@@ -1,7 +1,7 @@
 //! Trivial construct/clone/get tests for class MultiLayer. No physics tested here.
 
 #include "BornAgainNamespace.h"
-#include "HomogeneousMagneticMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "Layer.h"
 #include "Layer.h"
 #include "LayerInterface.h"
@@ -442,9 +442,9 @@ TEST_F(MultiLayerTest, CloneInvertBWithRoughness)
 
 TEST_F(MultiLayerTest, WithMagneticMaterial)
 {
-    kvector_t magnetic_field(0.0, 0.0, 0.0);
-    HomogeneousMagneticMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
-    HomogeneousMagneticMaterial magMaterial1("MagMat1", -5.6, 10, magnetic_field);
+    kvector_t magnetic_field(0.0, 0.0, 1.0);
+    HomogeneousMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
+    HomogeneousMaterial magMaterial1("MagMat1", -5.6, 10, magnetic_field);
 
     Layer layer1(iron, 20*Units::nanometer);
     Layer layer2(stone, 30*Units::nanometer);
@@ -464,7 +464,7 @@ TEST_F(MultiLayerTest, WithMagneticMaterial)
 TEST_F(MultiLayerTest, CloneWithMagneticMaterial)
 {
     kvector_t magnetic_field(1.1, 2.1, -5.1);
-    HomogeneousMagneticMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
+    HomogeneousMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
 
     Layer layer1(iron, 20*Units::nanometer);
     Layer layer2(magMaterial0, 20*Units::nanometer);
@@ -479,8 +479,8 @@ TEST_F(MultiLayerTest, CloneWithMagneticMaterial)
 
 TEST_F(MultiLayerTest, CloneInvertBMagneticMaterial)
 {
-    kvector_t magnetic_field(0.0, 0.0, 0.0);
-    HomogeneousMagneticMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
+    kvector_t magnetic_field(0.0, 0.0, 1.0);
+    HomogeneousMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
 
     Layer layer1(iron, 20*Units::nanometer);
     Layer layer2(magMaterial0, 20*Units::nanometer);
@@ -498,8 +498,8 @@ TEST_F(MultiLayerTest, MultiLayerCompositeTest)
 {
     MultiLayer mLayer;
     kvector_t magnetic_field(0.0, 0.0, 0.0);
-    HomogeneousMagneticMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
-    HomogeneousMagneticMaterial magMaterial1("MagMat1", -5.6, 10, magnetic_field);
+    HomogeneousMaterial magMaterial0("MagMat0", 6e-4, 2e-8, magnetic_field);
+    HomogeneousMaterial magMaterial1("MagMat1", -5.6, 10, magnetic_field);
 
     Layer layer1(iron, 10*Units::nanometer);
     Layer layer2(magMaterial0, 20*Units::nanometer);
diff --git a/Tests/UnitTests/Core/Sample/RTTest.h b/Tests/UnitTests/Core/Sample/RTTest.h
index 4171743761de2b657ca12401fc7473fab0aab723..d4c396dd09bc591f258d80abd9f24897e9601f0f 100644
--- a/Tests/UnitTests/Core/Sample/RTTest.h
+++ b/Tests/UnitTests/Core/Sample/RTTest.h
@@ -1,7 +1,7 @@
 //! Numeric tests of scalar RT computation.
 
 #include "BornAgainNamespace.h"
-#include "HomogeneousMagneticMaterial.h"
+#include "HomogeneousMaterial.h"
 #include "Layer.h"
 #include "Layer.h"
 #include "LayerInterface.h"
diff --git a/Wrap/swig/libBornAgainCore.i b/Wrap/swig/libBornAgainCore.i
index 5831697f99e58ff2b48cb96b4233c245a8d97061..aa328e85779a2fda83e710d6eed9ae12138ccab1 100644
--- a/Wrap/swig/libBornAgainCore.i
+++ b/Wrap/swig/libBornAgainCore.i
@@ -134,7 +134,6 @@
 #include "GISASSimulation.h"
 #include "Histogram1D.h"
 #include "Histogram2D.h"
-#include "HomogeneousMagneticMaterial.h"
 #include "HomogeneousMaterial.h"
 #include "IAbstractParticle.h"
 #include "ICloneable.h"
@@ -148,7 +147,6 @@
 #include "IIntensityFunction.h"
 #include "IInterferenceFunction.h"
 #include "ILayout.h"
-#include "IMaterial.h"
 #include "INamed.h"
 #include "INode.h"
 #include "INoncopyable.h"
@@ -356,9 +354,7 @@
 %include "IHistogram.h"
 %include "Histogram1D.h"
 %include "Histogram2D.h"
-%include "IMaterial.h"
 %include "HomogeneousMaterial.h"
-%include "HomogeneousMagneticMaterial.h"
 %include "IDetector2D.h"
 %include "IDetectorResolution.h"
 %include "Distributions.h"
diff --git a/auto/Wrap/doxygen_core.i b/auto/Wrap/doxygen_core.i
index 517a2ef1871329bf23fef34e13959aa9ef34acac..cb2a7290b1d986f966d09d3c477e1b5f7114da45 100644
--- a/auto/Wrap/doxygen_core.i
+++ b/auto/Wrap/doxygen_core.i
@@ -2846,7 +2846,7 @@ Returns the z-coordinate of the lowest point in this shape after a given rotatio
 Returns the z-coordinate of the lowest point in this shape after a given rotation. 
 ";
 
-%feature("docstring")  FormFactorCoreShell::setAmbientMaterial "void FormFactorCoreShell::setAmbientMaterial(const IMaterial &material) overridefinal
+%feature("docstring")  FormFactorCoreShell::setAmbientMaterial "void FormFactorCoreShell::setAmbientMaterial(const HomogeneousMaterial &material) overridefinal
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -2886,7 +2886,7 @@ Returns a clone of this  ISample object.
 Calls the  INodeVisitor's visit method. 
 ";
 
-%feature("docstring")  FormFactorCrystal::setAmbientMaterial "void FormFactorCrystal::setAmbientMaterial(const IMaterial &material) override
+%feature("docstring")  FormFactorCrystal::setAmbientMaterial "void FormFactorCrystal::setAmbientMaterial(const HomogeneousMaterial &material) override
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -3072,12 +3072,12 @@ Returns a clone of this  ISample object.
 Calls the  INodeVisitor's visit method. 
 ";
 
-%feature("docstring")  FormFactorDecoratorMaterial::setMaterial "void FormFactorDecoratorMaterial::setMaterial(const IMaterial &material)
+%feature("docstring")  FormFactorDecoratorMaterial::setMaterial "void FormFactorDecoratorMaterial::setMaterial(const HomogeneousMaterial &material)
 
 Sets the material of the scatterer. 
 ";
 
-%feature("docstring")  FormFactorDecoratorMaterial::setAmbientMaterial "void FormFactorDecoratorMaterial::setAmbientMaterial(const IMaterial &material) override
+%feature("docstring")  FormFactorDecoratorMaterial::setAmbientMaterial "void FormFactorDecoratorMaterial::setAmbientMaterial(const HomogeneousMaterial &material) override
 
 Sets the ambient material. 
 ";
@@ -3239,7 +3239,7 @@ Returns a clone of this  ISample object.
 Calls the  INodeVisitor's visit method. 
 ";
 
-%feature("docstring")  FormFactorDWBA::setAmbientMaterial "void FormFactorDWBA::setAmbientMaterial(const IMaterial &material) override
+%feature("docstring")  FormFactorDWBA::setAmbientMaterial "void FormFactorDWBA::setAmbientMaterial(const HomogeneousMaterial &material) override
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -3299,7 +3299,7 @@ Returns a clone of this  ISample object.
 Calls the  INodeVisitor's visit method. 
 ";
 
-%feature("docstring")  FormFactorDWBAPol::setAmbientMaterial "void FormFactorDWBAPol::setAmbientMaterial(const IMaterial &material) override
+%feature("docstring")  FormFactorDWBAPol::setAmbientMaterial "void FormFactorDWBAPol::setAmbientMaterial(const HomogeneousMaterial &material) override
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -4646,7 +4646,7 @@ Returns the z-coordinate of the lowest point in this shape after a given rotatio
 %feature("docstring")  FormFactorWeighted::addFormFactor "void FormFactorWeighted::addFormFactor(const IFormFactor &form_factor, double weight=1.0)
 ";
 
-%feature("docstring")  FormFactorWeighted::setAmbientMaterial "void FormFactorWeighted::setAmbientMaterial(const IMaterial &material) overridefinal
+%feature("docstring")  FormFactorWeighted::setAmbientMaterial "void FormFactorWeighted::setAmbientMaterial(const HomogeneousMaterial &material) overridefinal
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -5536,102 +5536,77 @@ Add to values in histograms channels from numpy array,.
 ";
 
 
-// File: classHomogeneousMagneticMaterial.xml
-%feature("docstring") HomogeneousMagneticMaterial "
+// File: classHomogeneousMaterial.xml
+%feature("docstring") HomogeneousMaterial "
 
-A homogeneous material with magnetization.
+An homogeneous material with a refractive index and (optionally) a magnetic field.
 
-C++ includes: HomogeneousMagneticMaterial.h
+C++ includes: HomogeneousMaterial.h
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::HomogeneousMagneticMaterial "HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(const std::string &name, const complex_t refractive_index, const kvector_t magnetic_field)
+%feature("docstring")  HomogeneousMaterial::HomogeneousMaterial "HomogeneousMaterial::HomogeneousMaterial(const std::string &name, const complex_t refractive_index, const kvector_t magnetic_field=kvector_t())
 
-Constructs a material with  name,  refractive_index and  magnetic_field
+Constructs a material with  name and  refractive_index. 
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::HomogeneousMagneticMaterial "HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta, const kvector_t magnetic_field)
-
-Constructs a material with  name, refractive_index parameters and  magnetic_field
-";
+%feature("docstring")  HomogeneousMaterial::HomogeneousMaterial "HomogeneousMaterial::HomogeneousMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta, const kvector_t magnetic_field=kvector_t())
 
-%feature("docstring")  HomogeneousMagneticMaterial::clone "HomogeneousMagneticMaterial * HomogeneousMagneticMaterial::clone() const final
+Constructs a material with  name and refractive_index parameters delta and beta (n = 1 - delta + i*beta). 
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::cloneInverted "HomogeneousMagneticMaterial * HomogeneousMagneticMaterial::cloneInverted() const final
+%feature("docstring")  HomogeneousMaterial::~HomogeneousMaterial "HomogeneousMaterial::~HomogeneousMaterial()
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::magneticField "kvector_t HomogeneousMagneticMaterial::magneticField() const
-
-Get the magnetic field (in Tesla) 
+%feature("docstring")  HomogeneousMaterial::clone "HomogeneousMaterial * HomogeneousMaterial::clone() const 
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::setMagneticField "void HomogeneousMagneticMaterial::setMagneticField(const kvector_t magnetic_field)
-
-Set the magnetic field (in Tesla) 
+%feature("docstring")  HomogeneousMaterial::cloneInverted "HomogeneousMaterial * HomogeneousMaterial::cloneInverted() const 
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::isScalarMaterial "bool HomogeneousMagneticMaterial::isScalarMaterial() const final
-
-Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally 
+%feature("docstring")  HomogeneousMaterial::refractiveIndex "complex_t HomogeneousMaterial::refractiveIndex() const 
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::polarizedSLD "Eigen::Matrix2cd HomogeneousMagneticMaterial::polarizedSLD(const WavevectorInfo &wavevectors) const
-
-Get the scattering matrix (~potential V) from the material. This matrix appears in the full three-dimensional Schroedinger equation. 
+%feature("docstring")  HomogeneousMaterial::setRefractiveIndex "void HomogeneousMaterial::setRefractiveIndex(const complex_t refractive_index)
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::polarizedSLDExperimental "Eigen::Matrix2cd HomogeneousMagneticMaterial::polarizedSLDExperimental(const WavevectorInfo &wavevectors) const
+%feature("docstring")  HomogeneousMaterial::isScalarMaterial "bool HomogeneousMaterial::isScalarMaterial() const
 
-Get the scattering matrix for a material defined by its magnetization (experimental) 
+Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally 
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::polarizedFresnel "Eigen::Matrix2cd HomogeneousMagneticMaterial::polarizedFresnel(const kvector_t k, double n_ref) const
-
-Return the potential term that is used in the one-dimensional Fresnel calculations. 
+%feature("docstring")  HomogeneousMaterial::isMagneticMaterial "bool HomogeneousMaterial::isMagneticMaterial() const 
 ";
 
-%feature("docstring")  HomogeneousMagneticMaterial::createTransformedMaterial "const IMaterial * HomogeneousMagneticMaterial::createTransformedMaterial(const Transform3D &transform) const final
+%feature("docstring")  HomogeneousMaterial::magneticField "kvector_t HomogeneousMaterial::magneticField() const
 
-Create a new material that is transformed with respect to this one. 
+Get the magnetic field (in Tesla) 
 ";
 
+%feature("docstring")  HomogeneousMaterial::setMagneticField "void HomogeneousMaterial::setMagneticField(const kvector_t magnetic_field)
 
-// File: classHomogeneousMaterial.xml
-%feature("docstring") HomogeneousMaterial "
-
-An homogeneous material with a refractive index.
-
-C++ includes: HomogeneousMaterial.h
+Set the magnetic field (in Tesla) 
 ";
 
-%feature("docstring")  HomogeneousMaterial::HomogeneousMaterial "HomogeneousMaterial::HomogeneousMaterial(const std::string &name, const complex_t refractive_index)
-
-Constructs a material with  name and  refractive_index. 
+%feature("docstring")  HomogeneousMaterial::scalarSLD "complex_t HomogeneousMaterial::scalarSLD(const WavevectorInfo &wavevectors) const 
 ";
 
-%feature("docstring")  HomogeneousMaterial::HomogeneousMaterial "HomogeneousMaterial::HomogeneousMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta)
+%feature("docstring")  HomogeneousMaterial::scalarFresnel "complex_t HomogeneousMaterial::scalarFresnel(const kvector_t k, double n_ref) const
 
-Constructs a material with  name and refractive_index parameters delta and beta (n = 1 - delta + i*beta). 
-";
-
-%feature("docstring")  HomogeneousMaterial::~HomogeneousMaterial "HomogeneousMaterial::~HomogeneousMaterial()
+Return the potential term that is used in the one-dimensional Fresnel calculations. 
 ";
 
-%feature("docstring")  HomogeneousMaterial::clone "HomogeneousMaterial * HomogeneousMaterial::clone() const override
+%feature("docstring")  HomogeneousMaterial::polarizedSLD "Eigen::Matrix2cd HomogeneousMaterial::polarizedSLD(const WavevectorInfo &wavevectors) const 
 ";
 
-%feature("docstring")  HomogeneousMaterial::cloneInverted "HomogeneousMaterial * HomogeneousMaterial::cloneInverted() const override
-";
+%feature("docstring")  HomogeneousMaterial::polarizedSLDExperimental "Eigen::Matrix2cd HomogeneousMaterial::polarizedSLDExperimental(const WavevectorInfo &wavevectors) const
 
-%feature("docstring")  HomogeneousMaterial::refractiveIndex "complex_t HomogeneousMaterial::refractiveIndex() const override
+Get the scattering matrix for a material defined by its magnetization (experimental) 
 ";
 
-%feature("docstring")  HomogeneousMaterial::setRefractiveIndex "void HomogeneousMaterial::setRefractiveIndex(const complex_t refractive_index)
+%feature("docstring")  HomogeneousMaterial::polarizedFresnel "Eigen::Matrix2cd HomogeneousMaterial::polarizedFresnel(const kvector_t k, double n_ref) const 
 ";
 
-%feature("docstring")  HomogeneousMaterial::createTransformedMaterial "const IMaterial * HomogeneousMaterial::createTransformedMaterial(const Transform3D &transform) const override
-
-Create a new material that is transformed with respect to this one. 
+%feature("docstring")  HomogeneousMaterial::createTransformedMaterial "const HomogeneousMaterial * HomogeneousMaterial::createTransformedMaterial(const Transform3D &transform) const 
 ";
 
 
@@ -6332,7 +6307,7 @@ Returns a clone of this  ISample object.
 Creates a (possibly sliced) form factor with the given rotation and translation. 
 ";
 
-%feature("docstring")  IFormFactor::setAmbientMaterial "virtual void IFormFactor::setAmbientMaterial(const IMaterial &)=0
+%feature("docstring")  IFormFactor::setAmbientMaterial "virtual void IFormFactor::setAmbientMaterial(const HomogeneousMaterial &)=0
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -6394,7 +6369,7 @@ C++ includes: IFormFactorBorn.h
 Returns a clone of this  ISample object. 
 ";
 
-%feature("docstring")  IFormFactorBorn::setAmbientMaterial "void IFormFactorBorn::setAmbientMaterial(const IMaterial &) override
+%feature("docstring")  IFormFactorBorn::setAmbientMaterial "void IFormFactorBorn::setAmbientMaterial(const HomogeneousMaterial &) override
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -6451,7 +6426,7 @@ Returns a clone of this  ISample object.
 Calls the  INodeVisitor's visit method. 
 ";
 
-%feature("docstring")  IFormFactorDecorator::setAmbientMaterial "void IFormFactorDecorator::setAmbientMaterial(const IMaterial &material) override
+%feature("docstring")  IFormFactorDecorator::setAmbientMaterial "void IFormFactorDecorator::setAmbientMaterial(const HomogeneousMaterial &material) override
 
 Passes the refractive index of the ambient material in which this particle is embedded. 
 ";
@@ -7188,63 +7163,6 @@ Sets the used approximation for particles and interference functions.
 ";
 
 
-// File: classIMaterial.xml
-%feature("docstring") IMaterial "
-
-Interface to a named material.
-
-C++ includes: IMaterial.h
-";
-
-%feature("docstring")  IMaterial::IMaterial "IMaterial::IMaterial(const std::string &name)
-";
-
-%feature("docstring")  IMaterial::~IMaterial "virtual IMaterial::~IMaterial()
-";
-
-%feature("docstring")  IMaterial::clone "virtual IMaterial* IMaterial::clone() const =0
-";
-
-%feature("docstring")  IMaterial::cloneInverted "virtual IMaterial* IMaterial::cloneInverted() const =0
-";
-
-%feature("docstring")  IMaterial::isScalarMaterial "virtual bool IMaterial::isScalarMaterial() const
-
-Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally 
-";
-
-%feature("docstring")  IMaterial::isMagneticMaterial "bool IMaterial::isMagneticMaterial() const 
-";
-
-%feature("docstring")  IMaterial::refractiveIndex "virtual complex_t IMaterial::refractiveIndex() const 
-";
-
-%feature("docstring")  IMaterial::scalarSLD "complex_t IMaterial::scalarSLD(const WavevectorInfo &wavevectors) const
-
-Returns true if *this agrees with other in all parameters. 
-";
-
-%feature("docstring")  IMaterial::scalarFresnel "complex_t IMaterial::scalarFresnel(const kvector_t k, double n_ref) const
-
-Return the potential term that is used in the one-dimensional Fresnel calculations. 
-";
-
-%feature("docstring")  IMaterial::polarizedSLD "Eigen::Matrix2cd IMaterial::polarizedSLD(const WavevectorInfo &wavevectors) const
-
-Get the scattering matrix (~potential V) from the material. This matrix appears in the full three-dimensional Schroedinger equation. 
-";
-
-%feature("docstring")  IMaterial::polarizedFresnel "Eigen::Matrix2cd IMaterial::polarizedFresnel(const kvector_t k, double n_ref) const
-
-Return the potential term that is used in the one-dimensional Fresnel calculations. 
-";
-
-%feature("docstring")  IMaterial::createTransformedMaterial "virtual const IMaterial* IMaterial::createTransformedMaterial(const Transform3D &transform) const =0
-
-Create a new material that is transformed with respect to this one. 
-";
-
-
 // File: classIMultiLayerBuilder.xml
 %feature("docstring") IMultiLayerBuilder "
 
@@ -8751,17 +8669,17 @@ Returns a clone of this  ISample object.
 Returns a clone with inverted magnetic fields. 
 ";
 
-%feature("docstring")  ISample::material "virtual const IMaterial* ISample::material() const
+%feature("docstring")  ISample::material "virtual const HomogeneousMaterial* ISample::material() const
 
 Returns nullptr, unless overwritten to return a specific material. 
 ";
 
-%feature("docstring")  ISample::getAmbientMaterial "virtual const IMaterial* ISample::getAmbientMaterial() const
+%feature("docstring")  ISample::getAmbientMaterial "virtual const HomogeneousMaterial* ISample::getAmbientMaterial() const
 
 Returns nullptr, unless overwritten to return a specific material. 
 ";
 
-%feature("docstring")  ISample::containedMaterials "std::vector< const IMaterial * > ISample::containedMaterials() const
+%feature("docstring")  ISample::containedMaterials "std::vector< const HomogeneousMaterial * > ISample::containedMaterials() const
 
 Returns set of unique materials contained in this  ISample. 
 ";
@@ -9208,7 +9126,7 @@ A layer, with thickness (in nanometer) and material.
 C++ includes: Layer.h
 ";
 
-%feature("docstring")  Layer::Layer "Layer::Layer(const IMaterial &material, double thickness=0)
+%feature("docstring")  Layer::Layer "Layer::Layer(const HomogeneousMaterial &material, double thickness=0)
 ";
 
 %feature("docstring")  Layer::~Layer "Layer::~Layer() final
@@ -9237,12 +9155,12 @@ Sets layer thickness in nanometers.
 %feature("docstring")  Layer::thickness "double Layer::thickness() const 
 ";
 
-%feature("docstring")  Layer::setMaterial "void Layer::setMaterial(const IMaterial &material)
+%feature("docstring")  Layer::setMaterial "void Layer::setMaterial(const HomogeneousMaterial &material)
 
 Sets  material of the layer. 
 ";
 
-%feature("docstring")  Layer::material "const IMaterial* Layer::material() const
+%feature("docstring")  Layer::material "const HomogeneousMaterial* Layer::material() const
 
 Returns nullptr, unless overwritten to return a specific material. 
 ";
@@ -10663,13 +10581,13 @@ C++ includes: Particle.h
 %feature("docstring")  Particle::Particle "Particle::Particle()
 ";
 
-%feature("docstring")  Particle::Particle "Particle::Particle(const IMaterial &p_material)
+%feature("docstring")  Particle::Particle "Particle::Particle(const HomogeneousMaterial &p_material)
 ";
 
-%feature("docstring")  Particle::Particle "Particle::Particle(const IMaterial &p_material, const IFormFactor &form_factor)
+%feature("docstring")  Particle::Particle "Particle::Particle(const HomogeneousMaterial &p_material, const IFormFactor &form_factor)
 ";
 
-%feature("docstring")  Particle::Particle "Particle::Particle(const IMaterial &p_material, const IFormFactor &form_factor, const IRotation &rotation)
+%feature("docstring")  Particle::Particle "Particle::Particle(const HomogeneousMaterial &p_material, const IFormFactor &form_factor, const IRotation &rotation)
 ";
 
 %feature("docstring")  Particle::clone "Particle * Particle::clone() const overridefinal
@@ -10692,10 +10610,10 @@ Calls the  INodeVisitor's visit method.
 Create a sliced form factor for this particle. 
 ";
 
-%feature("docstring")  Particle::setMaterial "void Particle::setMaterial(const IMaterial &material)
+%feature("docstring")  Particle::setMaterial "void Particle::setMaterial(const HomogeneousMaterial &material)
 ";
 
-%feature("docstring")  Particle::material "const IMaterial* Particle::material() const overridefinal
+%feature("docstring")  Particle::material "const HomogeneousMaterial* Particle::material() const overridefinal
 
 Returns nullptr, unless overwritten to return a specific material. 
 ";
@@ -12028,7 +11946,7 @@ C++ includes: SampleLabelHandler.h
 %feature("docstring")  SampleLabelHandler::getLabelLayout "std::string SampleLabelHandler::getLabelLayout(const ILayout *sample)
 ";
 
-%feature("docstring")  SampleLabelHandler::getLabelMaterial "std::string SampleLabelHandler::getLabelMaterial(const IMaterial *sample)
+%feature("docstring")  SampleLabelHandler::getLabelMaterial "std::string SampleLabelHandler::getLabelMaterial(const HomogeneousMaterial *sample)
 ";
 
 %feature("docstring")  SampleLabelHandler::getLabelRotation "std::string SampleLabelHandler::getLabelRotation(const IRotation *sample)
@@ -12052,7 +11970,7 @@ C++ includes: SampleLabelHandler.h
 %feature("docstring")  SampleLabelHandler::getLabelParticleDistribution "std::string SampleLabelHandler::getLabelParticleDistribution(const ParticleDistribution *sample)
 ";
 
-%feature("docstring")  SampleLabelHandler::insertMaterial "void SampleLabelHandler::insertMaterial(const IMaterial *sample)
+%feature("docstring")  SampleLabelHandler::insertMaterial "void SampleLabelHandler::insertMaterial(const HomogeneousMaterial *sample)
 ";
 
 %feature("docstring")  SampleLabelHandler::insertFormFactor "void SampleLabelHandler::insertFormFactor(const IFormFactor *sample)
@@ -12672,7 +12590,7 @@ Represents a single slice, constructed from the division of a layer into (possib
 C++ includes: Slice.h
 ";
 
-%feature("docstring")  Slice::Slice "Slice::Slice(const IMaterial &material, double thickness, const LayerRoughness *top_roughness=nullptr)
+%feature("docstring")  Slice::Slice "Slice::Slice(const HomogeneousMaterial &material, double thickness, const LayerRoughness *top_roughness=nullptr)
 ";
 
 %feature("docstring")  Slice::~Slice "Slice::~Slice()
@@ -13519,22 +13437,22 @@ C++ includes: ZLimits.h
 // File: namespace_0D267.xml
 
 
-// File: namespace_0D279.xml
+// File: namespace_0D275.xml
 
 
-// File: namespace_0D309.xml
+// File: namespace_0D305.xml
 
 
-// File: namespace_0D311.xml
+// File: namespace_0D307.xml
 
 
-// File: namespace_0D324.xml
+// File: namespace_0D320.xml
 
 
-// File: namespace_0D363.xml
+// File: namespace_0D359.xml
 
 
-// File: namespace_0D473.xml
+// File: namespace_0D469.xml
 
 
 // File: namespace_0D60.xml
@@ -14906,22 +14824,21 @@ make Swappable
 // File: Rectangle_8h.xml
 
 
-// File: HomogeneousMagneticMaterial_8cpp.xml
-
-
-// File: HomogeneousMagneticMaterial_8h.xml
-
-
 // File: HomogeneousMaterial_8cpp.xml
+%feature("docstring")  Unit_Matrix "static const Eigen::Matrix2cd Unit_Matrix(Eigen::Matrix2cd::Identity())
+";
 
+%feature("docstring")  Pauli_X "static const Eigen::Matrix2cd Pauli_X((Eigen::Matrix2cd()<< 0, 1, 1, 0).finished())
+";
 
-// File: HomogeneousMaterial_8h.xml
-
+%feature("docstring")  Pauli_Y "static const Eigen::Matrix2cd Pauli_Y((Eigen::Matrix2cd()<< 0,-I, I, 0).finished())
+";
 
-// File: IMaterial_8cpp.xml
+%feature("docstring")  Pauli_Z "static const Eigen::Matrix2cd Pauli_Z((Eigen::Matrix2cd()<< 1, 0, 0,-1).finished())
+";
 
 
-// File: IMaterial_8h.xml
+// File: HomogeneousMaterial_8h.xml
 
 
 // File: DecouplingApproximationStrategy_8cpp.xml
diff --git a/auto/Wrap/libBornAgainCore.py b/auto/Wrap/libBornAgainCore.py
index 7942ae751c92118a6ceb7d4d3b0f307576dd5948..f784d3befbed3393c779c8fffa86995149a47854 100644
--- a/auto/Wrap/libBornAgainCore.py
+++ b/auto/Wrap/libBornAgainCore.py
@@ -4645,9 +4645,9 @@ class ISample(ICloneable, INode):
 
     def material(self):
         """
-        material(ISample self) -> IMaterial
+        material(ISample self) -> HomogeneousMaterial
 
-        virtual const IMaterial* ISample::material() const
+        virtual const HomogeneousMaterial* ISample::material() const
 
         Returns nullptr, unless overwritten to return a specific material. 
 
@@ -4657,9 +4657,9 @@ class ISample(ICloneable, INode):
 
     def getAmbientMaterial(self):
         """
-        getAmbientMaterial(ISample self) -> IMaterial
+        getAmbientMaterial(ISample self) -> HomogeneousMaterial
 
-        virtual const IMaterial* ISample::getAmbientMaterial() const
+        virtual const HomogeneousMaterial* ISample::getAmbientMaterial() const
 
         Returns nullptr, unless overwritten to return a specific material. 
 
@@ -4669,9 +4669,9 @@ class ISample(ICloneable, INode):
 
     def containedMaterials(self):
         """
-        containedMaterials(ISample self) -> std::vector< IMaterial const *,std::allocator< IMaterial const * > >
+        containedMaterials(ISample self) -> std::vector< HomogeneousMaterial const *,std::allocator< HomogeneousMaterial const * > >
 
-        std::vector< const IMaterial * > ISample::containedMaterials() const
+        std::vector< const HomogeneousMaterial * > ISample::containedMaterials() const
 
         Returns set of unique materials contained in this  ISample. 
 
@@ -10687,9 +10687,9 @@ class IFormFactor(ISample):
 
     def setAmbientMaterial(self, arg0):
         """
-        setAmbientMaterial(IFormFactor self, IMaterial arg0)
+        setAmbientMaterial(IFormFactor self, HomogeneousMaterial arg0)
 
-        virtual void IFormFactor::setAmbientMaterial(const IMaterial &)=0
+        virtual void IFormFactor::setAmbientMaterial(const HomogeneousMaterial &)=0
 
         Passes the refractive index of the ambient material in which this particle is embedded. 
 
@@ -11070,9 +11070,9 @@ class IFormFactorBorn(IFormFactor):
 
     def setAmbientMaterial(self, arg0):
         """
-        setAmbientMaterial(IFormFactorBorn self, IMaterial arg0)
+        setAmbientMaterial(IFormFactorBorn self, HomogeneousMaterial arg0)
 
-        void IFormFactorBorn::setAmbientMaterial(const IMaterial &) override
+        void IFormFactorBorn::setAmbientMaterial(const HomogeneousMaterial &) override
 
         Passes the refractive index of the ambient material in which this particle is embedded. 
 
@@ -11246,9 +11246,9 @@ class IFormFactorDecorator(IFormFactor):
 
     def setAmbientMaterial(self, material):
         """
-        setAmbientMaterial(IFormFactorDecorator self, IMaterial material)
+        setAmbientMaterial(IFormFactorDecorator self, HomogeneousMaterial material)
 
-        void IFormFactorDecorator::setAmbientMaterial(const IMaterial &material) override
+        void IFormFactorDecorator::setAmbientMaterial(const HomogeneousMaterial &material) override
 
         Passes the refractive index of the ambient material in which this particle is embedded. 
 
@@ -12396,9 +12396,9 @@ class FormFactorCrystal(IFormFactor):
 
     def setAmbientMaterial(self, material):
         """
-        setAmbientMaterial(FormFactorCrystal self, IMaterial material)
+        setAmbientMaterial(FormFactorCrystal self, HomogeneousMaterial material)
 
-        void FormFactorCrystal::setAmbientMaterial(const IMaterial &material) override
+        void FormFactorCrystal::setAmbientMaterial(const HomogeneousMaterial &material) override
 
         Passes the refractive index of the ambient material in which this particle is embedded. 
 
@@ -15792,9 +15792,9 @@ class FormFactorWeighted(IFormFactor):
 
     def setAmbientMaterial(self, material):
         """
-        setAmbientMaterial(FormFactorWeighted self, IMaterial material)
+        setAmbientMaterial(FormFactorWeighted self, HomogeneousMaterial material)
 
-        void FormFactorWeighted::setAmbientMaterial(const IMaterial &material) overridefinal
+        void FormFactorWeighted::setAmbientMaterial(const HomogeneousMaterial &material) overridefinal
 
         Passes the refractive index of the ambient material in which this particle is embedded. 
 
@@ -17420,152 +17420,34 @@ def Histogram2D_dynamicCast(pHistogram):
     """Histogram2D_dynamicCast(IHistogram pHistogram) -> Histogram2D"""
     return _libBornAgainCore.Histogram2D_dynamicCast(pHistogram)
 
-class IMaterial(INamed):
+class HomogeneousMaterial(INamed):
     """
 
 
-    Interface to a named material.
-
-    C++ includes: IMaterial.h
-
-    """
-
-    __swig_setmethods__ = {}
-    for _s in [INamed]:
-        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
-    __setattr__ = lambda self, name, value: _swig_setattr(self, IMaterial, name, value)
-    __swig_getmethods__ = {}
-    for _s in [INamed]:
-        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
-    __getattr__ = lambda self, name: _swig_getattr(self, IMaterial, name)
-
-    def __init__(self, *args, **kwargs):
-        raise AttributeError("No constructor defined - class is abstract")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _libBornAgainCore.delete_IMaterial
-    __del__ = lambda self: None
-
-    def clone(self):
-        """
-        clone(IMaterial self) -> IMaterial
-
-        virtual IMaterial* IMaterial::clone() const =0
-
-        """
-        return _libBornAgainCore.IMaterial_clone(self)
-
-
-    def cloneInverted(self):
-        """
-        cloneInverted(IMaterial self) -> IMaterial
-
-        virtual IMaterial* IMaterial::cloneInverted() const =0
-
-        """
-        return _libBornAgainCore.IMaterial_cloneInverted(self)
-
-
-    def isScalarMaterial(self):
-        """
-        isScalarMaterial(IMaterial self) -> bool
-
-        virtual bool IMaterial::isScalarMaterial() const
-
-        Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally 
-
-        """
-        return _libBornAgainCore.IMaterial_isScalarMaterial(self)
-
-
-    def isMagneticMaterial(self):
-        """
-        isMagneticMaterial(IMaterial self) -> bool
-
-        bool IMaterial::isMagneticMaterial() const 
-
-        """
-        return _libBornAgainCore.IMaterial_isMagneticMaterial(self)
-
-
-    def refractiveIndex(self):
-        """
-        refractiveIndex(IMaterial self) -> complex_t
-
-        virtual complex_t IMaterial::refractiveIndex() const 
-
-        """
-        return _libBornAgainCore.IMaterial_refractiveIndex(self)
-
-
-    def scalarSLD(self, wavevectors):
-        """
-        scalarSLD(IMaterial self, WavevectorInfo wavevectors) -> complex_t
-
-        complex_t IMaterial::scalarSLD(const WavevectorInfo &wavevectors) const
-
-        Returns true if *this agrees with other in all parameters. 
-
-        """
-        return _libBornAgainCore.IMaterial_scalarSLD(self, wavevectors)
-
-
-    def scalarFresnel(self, k, n_ref):
-        """
-        scalarFresnel(IMaterial self, kvector_t k, double n_ref) -> complex_t
-
-        complex_t IMaterial::scalarFresnel(const kvector_t k, double n_ref) const
-
-        Return the potential term that is used in the one-dimensional Fresnel calculations. 
-
-        """
-        return _libBornAgainCore.IMaterial_scalarFresnel(self, k, n_ref)
-
-
-    def createTransformedMaterial(self, transform):
-        """
-        createTransformedMaterial(IMaterial self, Transform3D const & transform) -> IMaterial
-
-        virtual const IMaterial* IMaterial::createTransformedMaterial(const Transform3D &transform) const =0
-
-        Create a new material that is transformed with respect to this one. 
-
-        """
-        return _libBornAgainCore.IMaterial_createTransformedMaterial(self, transform)
-
-
-    def __eq__(self, other):
-        """__eq__(IMaterial self, IMaterial other) -> bool"""
-        return _libBornAgainCore.IMaterial___eq__(self, other)
-
-IMaterial_swigregister = _libBornAgainCore.IMaterial_swigregister
-IMaterial_swigregister(IMaterial)
-
-class HomogeneousMaterial(IMaterial):
-    """
-
-
-    An homogeneous material with a refractive index.
+    An homogeneous material with a refractive index and (optionally) a magnetic field.
 
     C++ includes: HomogeneousMaterial.h
 
     """
 
     __swig_setmethods__ = {}
-    for _s in [IMaterial]:
+    for _s in [INamed]:
         __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
     __setattr__ = lambda self, name, value: _swig_setattr(self, HomogeneousMaterial, name, value)
     __swig_getmethods__ = {}
-    for _s in [IMaterial]:
+    for _s in [INamed]:
         __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
     __getattr__ = lambda self, name: _swig_getattr(self, HomogeneousMaterial, name)
     __repr__ = _swig_repr
 
     def __init__(self, *args):
         """
+        __init__(HomogeneousMaterial self, std::string const & name, complex_t const refractive_index, kvector_t magnetic_field) -> HomogeneousMaterial
         __init__(HomogeneousMaterial self, std::string const & name, complex_t const refractive_index) -> HomogeneousMaterial
+        __init__(HomogeneousMaterial self, std::string const & name, double refractive_index_delta, double refractive_index_beta, kvector_t magnetic_field) -> HomogeneousMaterial
         __init__(HomogeneousMaterial self, std::string const & name, double refractive_index_delta, double refractive_index_beta) -> HomogeneousMaterial
 
-        HomogeneousMaterial::HomogeneousMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta)
+        HomogeneousMaterial::HomogeneousMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta, const kvector_t magnetic_field=kvector_t())
 
         Constructs a material with  name and refractive_index parameters delta and beta (n = 1 - delta + i*beta). 
 
@@ -17582,7 +17464,7 @@ class HomogeneousMaterial(IMaterial):
         """
         clone(HomogeneousMaterial self) -> HomogeneousMaterial
 
-        HomogeneousMaterial * HomogeneousMaterial::clone() const override
+        HomogeneousMaterial * HomogeneousMaterial::clone() const 
 
         """
         return _libBornAgainCore.HomogeneousMaterial_clone(self)
@@ -17592,7 +17474,7 @@ class HomogeneousMaterial(IMaterial):
         """
         cloneInverted(HomogeneousMaterial self) -> HomogeneousMaterial
 
-        HomogeneousMaterial * HomogeneousMaterial::cloneInverted() const override
+        HomogeneousMaterial * HomogeneousMaterial::cloneInverted() const 
 
         """
         return _libBornAgainCore.HomogeneousMaterial_cloneInverted(self)
@@ -17602,7 +17484,7 @@ class HomogeneousMaterial(IMaterial):
         """
         refractiveIndex(HomogeneousMaterial self) -> complex_t
 
-        complex_t HomogeneousMaterial::refractiveIndex() const override
+        complex_t HomogeneousMaterial::refractiveIndex() const 
 
         """
         return _libBornAgainCore.HomogeneousMaterial_refractiveIndex(self)
@@ -17618,127 +17500,85 @@ class HomogeneousMaterial(IMaterial):
         return _libBornAgainCore.HomogeneousMaterial_setRefractiveIndex(self, refractive_index)
 
 
-    def createTransformedMaterial(self, transform):
+    def isScalarMaterial(self):
         """
-        createTransformedMaterial(HomogeneousMaterial self, Transform3D const & transform) -> IMaterial
+        isScalarMaterial(HomogeneousMaterial self) -> bool
 
-        const IMaterial * HomogeneousMaterial::createTransformedMaterial(const Transform3D &transform) const override
+        bool HomogeneousMaterial::isScalarMaterial() const
 
-        Create a new material that is transformed with respect to this one. 
+        Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally 
 
         """
-        return _libBornAgainCore.HomogeneousMaterial_createTransformedMaterial(self, transform)
-
-HomogeneousMaterial_swigregister = _libBornAgainCore.HomogeneousMaterial_swigregister
-HomogeneousMaterial_swigregister(HomogeneousMaterial)
-
-class HomogeneousMagneticMaterial(HomogeneousMaterial):
-    """
+        return _libBornAgainCore.HomogeneousMaterial_isScalarMaterial(self)
 
 
-    A homogeneous material with magnetization.
-
-    C++ includes: HomogeneousMagneticMaterial.h
-
-    """
-
-    __swig_setmethods__ = {}
-    for _s in [HomogeneousMaterial]:
-        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
-    __setattr__ = lambda self, name, value: _swig_setattr(self, HomogeneousMagneticMaterial, name, value)
-    __swig_getmethods__ = {}
-    for _s in [HomogeneousMaterial]:
-        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
-    __getattr__ = lambda self, name: _swig_getattr(self, HomogeneousMagneticMaterial, name)
-    __repr__ = _swig_repr
-
-    def __init__(self, *args):
+    def isMagneticMaterial(self):
         """
-        __init__(HomogeneousMagneticMaterial self, std::string const & name, complex_t const refractive_index, kvector_t magnetic_field) -> HomogeneousMagneticMaterial
-        __init__(HomogeneousMagneticMaterial self, std::string const & name, double refractive_index_delta, double refractive_index_beta, kvector_t magnetic_field) -> HomogeneousMagneticMaterial
-
-        HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta, const kvector_t magnetic_field)
+        isMagneticMaterial(HomogeneousMaterial self) -> bool
 
-        Constructs a material with  name, refractive_index parameters and  magnetic_field
+        bool HomogeneousMaterial::isMagneticMaterial() const 
 
         """
-        this = _libBornAgainCore.new_HomogeneousMagneticMaterial(*args)
-        try:
-            self.this.append(this)
-        except Exception:
-            self.this = this
+        return _libBornAgainCore.HomogeneousMaterial_isMagneticMaterial(self)
 
-    def clone(self):
-        """
-        clone(HomogeneousMagneticMaterial self) -> HomogeneousMagneticMaterial
-
-        HomogeneousMagneticMaterial * HomogeneousMagneticMaterial::clone() const final
 
+    def magneticField(self):
         """
-        return _libBornAgainCore.HomogeneousMagneticMaterial_clone(self)
+        magneticField(HomogeneousMaterial self) -> kvector_t
 
+        kvector_t HomogeneousMaterial::magneticField() const
 
-    def cloneInverted(self):
-        """
-        cloneInverted(HomogeneousMagneticMaterial self) -> HomogeneousMagneticMaterial
-
-        HomogeneousMagneticMaterial * HomogeneousMagneticMaterial::cloneInverted() const final
+        Get the magnetic field (in Tesla) 
 
         """
-        return _libBornAgainCore.HomogeneousMagneticMaterial_cloneInverted(self)
+        return _libBornAgainCore.HomogeneousMaterial_magneticField(self)
 
 
-    def magneticField(self):
+    def setMagneticField(self, magnetic_field):
         """
-        magneticField(HomogeneousMagneticMaterial self) -> kvector_t
+        setMagneticField(HomogeneousMaterial self, kvector_t magnetic_field)
 
-        kvector_t HomogeneousMagneticMaterial::magneticField() const
+        void HomogeneousMaterial::setMagneticField(const kvector_t magnetic_field)
 
-        Get the magnetic field (in Tesla) 
+        Set the magnetic field (in Tesla) 
 
         """
-        return _libBornAgainCore.HomogeneousMagneticMaterial_magneticField(self)
+        return _libBornAgainCore.HomogeneousMaterial_setMagneticField(self, magnetic_field)
 
 
-    def setMagneticField(self, magnetic_field):
+    def scalarSLD(self, wavevectors):
         """
-        setMagneticField(HomogeneousMagneticMaterial self, kvector_t magnetic_field)
-
-        void HomogeneousMagneticMaterial::setMagneticField(const kvector_t magnetic_field)
+        scalarSLD(HomogeneousMaterial self, WavevectorInfo wavevectors) -> complex_t
 
-        Set the magnetic field (in Tesla) 
+        complex_t HomogeneousMaterial::scalarSLD(const WavevectorInfo &wavevectors) const 
 
         """
-        return _libBornAgainCore.HomogeneousMagneticMaterial_setMagneticField(self, magnetic_field)
+        return _libBornAgainCore.HomogeneousMaterial_scalarSLD(self, wavevectors)
 
 
-    def isScalarMaterial(self):
+    def scalarFresnel(self, k, n_ref):
         """
-        isScalarMaterial(HomogeneousMagneticMaterial self) -> bool
+        scalarFresnel(HomogeneousMaterial self, kvector_t k, double n_ref) -> complex_t
 
-        bool HomogeneousMagneticMaterial::isScalarMaterial() const final
+        complex_t HomogeneousMaterial::scalarFresnel(const kvector_t k, double n_ref) const
 
-        Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally 
+        Return the potential term that is used in the one-dimensional Fresnel calculations. 
 
         """
-        return _libBornAgainCore.HomogeneousMagneticMaterial_isScalarMaterial(self)
+        return _libBornAgainCore.HomogeneousMaterial_scalarFresnel(self, k, n_ref)
 
 
     def createTransformedMaterial(self, transform):
         """
-        createTransformedMaterial(HomogeneousMagneticMaterial self, Transform3D const & transform) -> IMaterial
-
-        const IMaterial * HomogeneousMagneticMaterial::createTransformedMaterial(const Transform3D &transform) const final
+        createTransformedMaterial(HomogeneousMaterial self, Transform3D const & transform) -> HomogeneousMaterial
 
-        Create a new material that is transformed with respect to this one. 
+        const HomogeneousMaterial * HomogeneousMaterial::createTransformedMaterial(const Transform3D &transform) const 
 
         """
-        return _libBornAgainCore.HomogeneousMagneticMaterial_createTransformedMaterial(self, transform)
+        return _libBornAgainCore.HomogeneousMaterial_createTransformedMaterial(self, transform)
 
-    __swig_destroy__ = _libBornAgainCore.delete_HomogeneousMagneticMaterial
-    __del__ = lambda self: None
-HomogeneousMagneticMaterial_swigregister = _libBornAgainCore.HomogeneousMagneticMaterial_swigregister
-HomogeneousMagneticMaterial_swigregister(HomogeneousMagneticMaterial)
+HomogeneousMaterial_swigregister = _libBornAgainCore.HomogeneousMaterial_swigregister
+HomogeneousMaterial_swigregister(HomogeneousMaterial)
 
 class IDetector2D(ICloneable, INode):
     """
@@ -21652,10 +21492,10 @@ class Layer(ISample):
 
     def __init__(self, material, thickness=0):
         """
-        __init__(Layer self, IMaterial material, double thickness=0) -> Layer
-        __init__(Layer self, IMaterial material) -> Layer
+        __init__(Layer self, HomogeneousMaterial material, double thickness=0) -> Layer
+        __init__(Layer self, HomogeneousMaterial material) -> Layer
 
-        Layer::Layer(const IMaterial &material, double thickness=0)
+        Layer::Layer(const HomogeneousMaterial &material, double thickness=0)
 
         """
         this = _libBornAgainCore.new_Layer(material, thickness)
@@ -21726,9 +21566,9 @@ class Layer(ISample):
 
     def setMaterial(self, material):
         """
-        setMaterial(Layer self, IMaterial material)
+        setMaterial(Layer self, HomogeneousMaterial material)
 
-        void Layer::setMaterial(const IMaterial &material)
+        void Layer::setMaterial(const HomogeneousMaterial &material)
 
         Sets  material of the layer. 
 
@@ -21738,9 +21578,9 @@ class Layer(ISample):
 
     def material(self):
         """
-        material(Layer self) -> IMaterial
+        material(Layer self) -> HomogeneousMaterial
 
-        const IMaterial* Layer::material() const
+        const HomogeneousMaterial* Layer::material() const
 
         Returns nullptr, unless overwritten to return a specific material. 
 
@@ -23964,11 +23804,11 @@ class Particle(IParticle):
     def __init__(self, *args):
         """
         __init__(Particle self) -> Particle
-        __init__(Particle self, IMaterial p_material) -> Particle
-        __init__(Particle self, IMaterial p_material, IFormFactor form_factor) -> Particle
-        __init__(Particle self, IMaterial p_material, IFormFactor form_factor, IRotation rotation) -> Particle
+        __init__(Particle self, HomogeneousMaterial p_material) -> Particle
+        __init__(Particle self, HomogeneousMaterial p_material, IFormFactor form_factor) -> Particle
+        __init__(Particle self, HomogeneousMaterial p_material, IFormFactor form_factor, IRotation rotation) -> Particle
 
-        Particle::Particle(const IMaterial &p_material, const IFormFactor &form_factor, const IRotation &rotation)
+        Particle::Particle(const HomogeneousMaterial &p_material, const IFormFactor &form_factor, const IRotation &rotation)
 
         """
         this = _libBornAgainCore.new_Particle(*args)
@@ -24027,9 +23867,9 @@ class Particle(IParticle):
 
     def setMaterial(self, material):
         """
-        setMaterial(Particle self, IMaterial material)
+        setMaterial(Particle self, HomogeneousMaterial material)
 
-        void Particle::setMaterial(const IMaterial &material)
+        void Particle::setMaterial(const HomogeneousMaterial &material)
 
         """
         return _libBornAgainCore.Particle_setMaterial(self, material)
@@ -24037,9 +23877,9 @@ class Particle(IParticle):
 
     def material(self):
         """
-        material(Particle self) -> IMaterial
+        material(Particle self) -> HomogeneousMaterial
 
-        const IMaterial* Particle::material() const overridefinal
+        const HomogeneousMaterial* Particle::material() const overridefinal
 
         Returns nullptr, unless overwritten to return a specific material. 
 
diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp
index 7004bc9719ae5cba3c84afaa2d61e8b228db7cf8..c46b4351b11caaea6d85d456815ce0080b3a339a 100644
--- a/auto/Wrap/libBornAgainCore_wrap.cpp
+++ b/auto/Wrap/libBornAgainCore_wrap.cpp
@@ -3559,207 +3559,205 @@ namespace Swig {
 #define SWIGTYPE_p_HexagonalLattice swig_types[102]
 #define SWIGTYPE_p_Histogram1D swig_types[103]
 #define SWIGTYPE_p_Histogram2D swig_types[104]
-#define SWIGTYPE_p_HomogeneousMagneticMaterial swig_types[105]
-#define SWIGTYPE_p_HomogeneousMaterial swig_types[106]
-#define SWIGTYPE_p_HorizontalLine swig_types[107]
-#define SWIGTYPE_p_IAbstractParticle swig_types[108]
-#define SWIGTYPE_p_IAxis swig_types[109]
-#define SWIGTYPE_p_IChiSquaredModule swig_types[110]
-#define SWIGTYPE_p_ICloneable swig_types[111]
-#define SWIGTYPE_p_IClusteredParticles swig_types[112]
-#define SWIGTYPE_p_IDetector2D swig_types[113]
-#define SWIGTYPE_p_IDetectorResolution swig_types[114]
-#define SWIGTYPE_p_IDistribution1D swig_types[115]
-#define SWIGTYPE_p_IFTDecayFunction1D swig_types[116]
-#define SWIGTYPE_p_IFTDecayFunction2D swig_types[117]
-#define SWIGTYPE_p_IFTDistribution1D swig_types[118]
-#define SWIGTYPE_p_IFTDistribution2D swig_types[119]
-#define SWIGTYPE_p_IFactoryT_std__string_GISASSimulation_t swig_types[120]
-#define SWIGTYPE_p_IFactoryT_std__string_IMultiLayerBuilder_t swig_types[121]
-#define SWIGTYPE_p_IFitObserver swig_types[122]
-#define SWIGTYPE_p_IFitParameter swig_types[123]
-#define SWIGTYPE_p_IFitStrategy swig_types[124]
-#define SWIGTYPE_p_IFormFactor swig_types[125]
-#define SWIGTYPE_p_IFormFactorBorn swig_types[126]
-#define SWIGTYPE_p_IFormFactorDecorator swig_types[127]
-#define SWIGTYPE_p_IHistogram swig_types[128]
-#define SWIGTYPE_p_IIntensityFunction swig_types[129]
-#define SWIGTYPE_p_IIntensityNormalizer swig_types[130]
-#define SWIGTYPE_p_IInterferenceFunction swig_types[131]
-#define SWIGTYPE_p_ILayerRTCoefficients swig_types[132]
-#define SWIGTYPE_p_ILayout swig_types[133]
-#define SWIGTYPE_p_IMaterial swig_types[134]
-#define SWIGTYPE_p_IMinimizer swig_types[135]
-#define SWIGTYPE_p_IMultiLayerBuilder swig_types[136]
-#define SWIGTYPE_p_INamed swig_types[137]
-#define SWIGTYPE_p_INode swig_types[138]
-#define SWIGTYPE_p_INodeVisitor swig_types[139]
-#define SWIGTYPE_p_INoncopyable swig_types[140]
-#define SWIGTYPE_p_IObservable swig_types[141]
-#define SWIGTYPE_p_IObserver swig_types[142]
-#define SWIGTYPE_p_IParameterT_double_t swig_types[143]
-#define SWIGTYPE_p_IParameterized swig_types[144]
-#define SWIGTYPE_p_IParticle swig_types[145]
-#define SWIGTYPE_p_IPixel swig_types[146]
-#define SWIGTYPE_p_IResolutionFunction2D swig_types[147]
-#define SWIGTYPE_p_IRotation swig_types[148]
-#define SWIGTYPE_p_ISample swig_types[149]
-#define SWIGTYPE_p_ISelectionRule swig_types[150]
-#define SWIGTYPE_p_IShape2D swig_types[151]
-#define SWIGTYPE_p_ISquaredFunction swig_types[152]
-#define SWIGTYPE_p_Instrument swig_types[153]
-#define SWIGTYPE_p_IntensityDataIOFactory swig_types[154]
-#define SWIGTYPE_p_IntensityFunctionLog swig_types[155]
-#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[156]
-#define SWIGTYPE_p_IntensityNormalizer swig_types[157]
-#define SWIGTYPE_p_IntensityScaleAndShiftNormalizer swig_types[158]
-#define SWIGTYPE_p_InterferenceFunction1DLattice swig_types[159]
-#define SWIGTYPE_p_InterferenceFunction2DLattice swig_types[160]
-#define SWIGTYPE_p_InterferenceFunction2DParaCrystal swig_types[161]
-#define SWIGTYPE_p_InterferenceFunctionNone swig_types[162]
-#define SWIGTYPE_p_InterferenceFunctionRadialParaCrystal swig_types[163]
-#define SWIGTYPE_p_IsGISAXSDetector swig_types[164]
-#define SWIGTYPE_p_Lattice swig_types[165]
-#define SWIGTYPE_p_Lattice1DParameters swig_types[166]
-#define SWIGTYPE_p_Lattice2D swig_types[167]
-#define SWIGTYPE_p_Lattice2D__ReciprocalBases swig_types[168]
-#define SWIGTYPE_p_Layer swig_types[169]
-#define SWIGTYPE_p_LayerInterface swig_types[170]
-#define SWIGTYPE_p_LayerRTCoefficients_t swig_types[171]
-#define SWIGTYPE_p_LayerRoughness swig_types[172]
-#define SWIGTYPE_p_Line swig_types[173]
-#define SWIGTYPE_p_MesoCrystal swig_types[174]
-#define SWIGTYPE_p_MultiLayer swig_types[175]
-#define SWIGTYPE_p_MultiLayerRTCoefficients_t swig_types[176]
-#define SWIGTYPE_p_OffSpecSimulation swig_types[177]
-#define SWIGTYPE_p_OutputDataIteratorT_double_OutputDataT_double_t_t swig_types[178]
-#define SWIGTYPE_p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t swig_types[179]
-#define SWIGTYPE_p_OutputDataT_CumulativeValue_t swig_types[180]
-#define SWIGTYPE_p_OutputDataT_bool_t swig_types[181]
-#define SWIGTYPE_p_OutputDataT_double_t swig_types[182]
-#define SWIGTYPE_p_ParameterDistribution swig_types[183]
-#define SWIGTYPE_p_ParameterPool swig_types[184]
-#define SWIGTYPE_p_ParameterSample swig_types[185]
-#define SWIGTYPE_p_Particle swig_types[186]
-#define SWIGTYPE_p_ParticleComposition swig_types[187]
-#define SWIGTYPE_p_ParticleCoreShell swig_types[188]
-#define SWIGTYPE_p_ParticleDistribution swig_types[189]
-#define SWIGTYPE_p_ParticleLayout swig_types[190]
-#define SWIGTYPE_p_Polygon swig_types[191]
-#define SWIGTYPE_p_PolygonPrivate swig_types[192]
-#define SWIGTYPE_p_PolygonalTopology swig_types[193]
-#define SWIGTYPE_p_PolyhedralEdge swig_types[194]
-#define SWIGTYPE_p_PolyhedralFace swig_types[195]
-#define SWIGTYPE_p_PolyhedralTopology swig_types[196]
-#define SWIGTYPE_p_ProgressHandler__Callback_t swig_types[197]
-#define SWIGTYPE_p_RealLimits swig_types[198]
-#define SWIGTYPE_p_RealParameter swig_types[199]
-#define SWIGTYPE_p_Rectangle swig_types[200]
-#define SWIGTYPE_p_RectangularDetector swig_types[201]
-#define SWIGTYPE_p_RectangularPixel swig_types[202]
-#define SWIGTYPE_p_RegionOfInterest swig_types[203]
-#define SWIGTYPE_p_ResolutionFunction2DGaussian swig_types[204]
-#define SWIGTYPE_p_RotationEuler swig_types[205]
-#define SWIGTYPE_p_RotationX swig_types[206]
-#define SWIGTYPE_p_RotationY swig_types[207]
-#define SWIGTYPE_p_RotationZ swig_types[208]
-#define SWIGTYPE_p_SafePointerVectorT_FitObject_t__iterator swig_types[209]
-#define SWIGTYPE_p_SafePointerVectorT_IParticle_const_t swig_types[210]
-#define SWIGTYPE_p_SafePointerVectorT_IParticle_t swig_types[211]
-#define SWIGTYPE_p_SampleBuilderFactory swig_types[212]
-#define SWIGTYPE_p_SimpleSelectionRule swig_types[213]
-#define SWIGTYPE_p_Simulation swig_types[214]
-#define SWIGTYPE_p_SimulationFactory swig_types[215]
-#define SWIGTYPE_p_SimulationOptions swig_types[216]
-#define SWIGTYPE_p_SlicingEffects swig_types[217]
-#define SWIGTYPE_p_SpecularSimulation swig_types[218]
-#define SWIGTYPE_p_SphericalDetector swig_types[219]
-#define SWIGTYPE_p_SphericalPixel swig_types[220]
-#define SWIGTYPE_p_SquareLattice swig_types[221]
-#define SWIGTYPE_p_SquaredFunctionDefault swig_types[222]
-#define SWIGTYPE_p_SquaredFunctionGaussianError swig_types[223]
-#define SWIGTYPE_p_SquaredFunctionMeanSquaredError swig_types[224]
-#define SWIGTYPE_p_SquaredFunctionSimError swig_types[225]
-#define SWIGTYPE_p_SquaredFunctionSystematicError swig_types[226]
-#define SWIGTYPE_p_ThreadInfo swig_types[227]
-#define SWIGTYPE_p_Transform3D swig_types[228]
-#define SWIGTYPE_p_VariableBinAxis swig_types[229]
-#define SWIGTYPE_p_VerticalLine swig_types[230]
-#define SWIGTYPE_p_WavevectorInfo swig_types[231]
-#define SWIGTYPE_p_ZLimits swig_types[232]
-#define SWIGTYPE_p__object swig_types[233]
-#define SWIGTYPE_p_allocator_type swig_types[234]
-#define SWIGTYPE_p_bool swig_types[235]
-#define SWIGTYPE_p_char swig_types[236]
-#define SWIGTYPE_p_const_iterator swig_types[237]
-#define SWIGTYPE_p_const_reference swig_types[238]
-#define SWIGTYPE_p_difference_type swig_types[239]
-#define SWIGTYPE_p_double swig_types[240]
-#define SWIGTYPE_p_int swig_types[241]
-#define SWIGTYPE_p_iterator swig_types[242]
-#define SWIGTYPE_p_long_long swig_types[243]
-#define SWIGTYPE_p_observer_t swig_types[244]
-#define SWIGTYPE_p_observerlist_t swig_types[245]
-#define SWIGTYPE_p_p__object swig_types[246]
-#define SWIGTYPE_p_reference swig_types[247]
-#define SWIGTYPE_p_short swig_types[248]
-#define SWIGTYPE_p_signed_char swig_types[249]
-#define SWIGTYPE_p_size_type swig_types[250]
-#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_double_t_t swig_types[251]
-#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t swig_types[252]
-#define SWIGTYPE_p_std__allocatorT_IFormFactor_p_t swig_types[253]
-#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[254]
-#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[255]
-#define SWIGTYPE_p_std__allocatorT_ParameterSample_t swig_types[256]
-#define SWIGTYPE_p_std__allocatorT_double_t swig_types[257]
-#define SWIGTYPE_p_std__allocatorT_int_t swig_types[258]
-#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[259]
-#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[260]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[261]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[262]
-#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[263]
-#define SWIGTYPE_p_std__complexT_double_t swig_types[264]
-#define SWIGTYPE_p_std__functionT_GISASSimulation_pfF_t swig_types[265]
-#define SWIGTYPE_p_std__functionT_IMultiLayerBuilder_pfF_t swig_types[266]
-#define SWIGTYPE_p_std__functionT_void_fF_t swig_types[267]
-#define SWIGTYPE_p_std__invalid_argument swig_types[268]
-#define SWIGTYPE_p_std__mapT_std__string_std__string_t__const_iterator swig_types[269]
-#define SWIGTYPE_p_std__shared_ptrT_IFitObserver_t swig_types[270]
-#define SWIGTYPE_p_std__shared_ptrT_ILayerRTCoefficients_const_t swig_types[271]
-#define SWIGTYPE_p_std__shared_ptrT_IMultiLayerBuilder_t swig_types[272]
-#define SWIGTYPE_p_std__shared_ptrT_IObserver_t swig_types[273]
-#define SWIGTYPE_p_std__vectorT_BasicVector3DT_double_t_std__allocatorT_BasicVector3DT_double_t_t_t swig_types[274]
-#define SWIGTYPE_p_std__vectorT_BasicVector3DT_std__complexT_double_t_t_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t_t swig_types[275]
-#define SWIGTYPE_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t swig_types[276]
-#define SWIGTYPE_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator swig_types[277]
-#define SWIGTYPE_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator swig_types[278]
-#define SWIGTYPE_p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t swig_types[279]
-#define SWIGTYPE_p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t swig_types[280]
-#define SWIGTYPE_p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t swig_types[281]
-#define SWIGTYPE_p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t swig_types[282]
-#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[283]
-#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[284]
-#define SWIGTYPE_p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t swig_types[285]
-#define SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t swig_types[286]
-#define SWIGTYPE_p_std__vectorT_PolygonalTopology_std__allocatorT_PolygonalTopology_t_t swig_types[287]
-#define SWIGTYPE_p_std__vectorT_RealParameter_p_std__allocatorT_RealParameter_p_t_t swig_types[288]
-#define SWIGTYPE_p_std__vectorT_SimulationElement_std__allocatorT_SimulationElement_t_t swig_types[289]
-#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[290]
-#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[291]
-#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[292]
-#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[293]
-#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[294]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[295]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[296]
-#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[297]
-#define SWIGTYPE_p_swig__SwigPyIterator swig_types[298]
-#define SWIGTYPE_p_unsigned_char swig_types[299]
-#define SWIGTYPE_p_unsigned_int swig_types[300]
-#define SWIGTYPE_p_unsigned_long_long swig_types[301]
-#define SWIGTYPE_p_unsigned_short swig_types[302]
-#define SWIGTYPE_p_value_type swig_types[303]
-static swig_type_info *swig_types[305];
-static swig_module_info swig_module = {swig_types, 304, 0, 0, 0, 0};
+#define SWIGTYPE_p_HomogeneousMaterial swig_types[105]
+#define SWIGTYPE_p_HorizontalLine swig_types[106]
+#define SWIGTYPE_p_IAbstractParticle swig_types[107]
+#define SWIGTYPE_p_IAxis swig_types[108]
+#define SWIGTYPE_p_IChiSquaredModule swig_types[109]
+#define SWIGTYPE_p_ICloneable swig_types[110]
+#define SWIGTYPE_p_IClusteredParticles swig_types[111]
+#define SWIGTYPE_p_IDetector2D swig_types[112]
+#define SWIGTYPE_p_IDetectorResolution swig_types[113]
+#define SWIGTYPE_p_IDistribution1D swig_types[114]
+#define SWIGTYPE_p_IFTDecayFunction1D swig_types[115]
+#define SWIGTYPE_p_IFTDecayFunction2D swig_types[116]
+#define SWIGTYPE_p_IFTDistribution1D swig_types[117]
+#define SWIGTYPE_p_IFTDistribution2D swig_types[118]
+#define SWIGTYPE_p_IFactoryT_std__string_GISASSimulation_t swig_types[119]
+#define SWIGTYPE_p_IFactoryT_std__string_IMultiLayerBuilder_t swig_types[120]
+#define SWIGTYPE_p_IFitObserver swig_types[121]
+#define SWIGTYPE_p_IFitParameter swig_types[122]
+#define SWIGTYPE_p_IFitStrategy swig_types[123]
+#define SWIGTYPE_p_IFormFactor swig_types[124]
+#define SWIGTYPE_p_IFormFactorBorn swig_types[125]
+#define SWIGTYPE_p_IFormFactorDecorator swig_types[126]
+#define SWIGTYPE_p_IHistogram swig_types[127]
+#define SWIGTYPE_p_IIntensityFunction swig_types[128]
+#define SWIGTYPE_p_IIntensityNormalizer swig_types[129]
+#define SWIGTYPE_p_IInterferenceFunction swig_types[130]
+#define SWIGTYPE_p_ILayerRTCoefficients swig_types[131]
+#define SWIGTYPE_p_ILayout swig_types[132]
+#define SWIGTYPE_p_IMinimizer swig_types[133]
+#define SWIGTYPE_p_IMultiLayerBuilder swig_types[134]
+#define SWIGTYPE_p_INamed swig_types[135]
+#define SWIGTYPE_p_INode swig_types[136]
+#define SWIGTYPE_p_INodeVisitor swig_types[137]
+#define SWIGTYPE_p_INoncopyable swig_types[138]
+#define SWIGTYPE_p_IObservable swig_types[139]
+#define SWIGTYPE_p_IObserver swig_types[140]
+#define SWIGTYPE_p_IParameterT_double_t swig_types[141]
+#define SWIGTYPE_p_IParameterized swig_types[142]
+#define SWIGTYPE_p_IParticle swig_types[143]
+#define SWIGTYPE_p_IPixel swig_types[144]
+#define SWIGTYPE_p_IResolutionFunction2D swig_types[145]
+#define SWIGTYPE_p_IRotation swig_types[146]
+#define SWIGTYPE_p_ISample swig_types[147]
+#define SWIGTYPE_p_ISelectionRule swig_types[148]
+#define SWIGTYPE_p_IShape2D swig_types[149]
+#define SWIGTYPE_p_ISquaredFunction swig_types[150]
+#define SWIGTYPE_p_Instrument swig_types[151]
+#define SWIGTYPE_p_IntensityDataIOFactory swig_types[152]
+#define SWIGTYPE_p_IntensityFunctionLog swig_types[153]
+#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[154]
+#define SWIGTYPE_p_IntensityNormalizer swig_types[155]
+#define SWIGTYPE_p_IntensityScaleAndShiftNormalizer swig_types[156]
+#define SWIGTYPE_p_InterferenceFunction1DLattice swig_types[157]
+#define SWIGTYPE_p_InterferenceFunction2DLattice swig_types[158]
+#define SWIGTYPE_p_InterferenceFunction2DParaCrystal swig_types[159]
+#define SWIGTYPE_p_InterferenceFunctionNone swig_types[160]
+#define SWIGTYPE_p_InterferenceFunctionRadialParaCrystal swig_types[161]
+#define SWIGTYPE_p_IsGISAXSDetector swig_types[162]
+#define SWIGTYPE_p_Lattice swig_types[163]
+#define SWIGTYPE_p_Lattice1DParameters swig_types[164]
+#define SWIGTYPE_p_Lattice2D swig_types[165]
+#define SWIGTYPE_p_Lattice2D__ReciprocalBases swig_types[166]
+#define SWIGTYPE_p_Layer swig_types[167]
+#define SWIGTYPE_p_LayerInterface swig_types[168]
+#define SWIGTYPE_p_LayerRTCoefficients_t swig_types[169]
+#define SWIGTYPE_p_LayerRoughness swig_types[170]
+#define SWIGTYPE_p_Line swig_types[171]
+#define SWIGTYPE_p_MesoCrystal swig_types[172]
+#define SWIGTYPE_p_MultiLayer swig_types[173]
+#define SWIGTYPE_p_MultiLayerRTCoefficients_t swig_types[174]
+#define SWIGTYPE_p_OffSpecSimulation swig_types[175]
+#define SWIGTYPE_p_OutputDataIteratorT_double_OutputDataT_double_t_t swig_types[176]
+#define SWIGTYPE_p_OutputDataIteratorT_double_const_OutputDataT_double_t_const_t swig_types[177]
+#define SWIGTYPE_p_OutputDataT_CumulativeValue_t swig_types[178]
+#define SWIGTYPE_p_OutputDataT_bool_t swig_types[179]
+#define SWIGTYPE_p_OutputDataT_double_t swig_types[180]
+#define SWIGTYPE_p_ParameterDistribution swig_types[181]
+#define SWIGTYPE_p_ParameterPool swig_types[182]
+#define SWIGTYPE_p_ParameterSample swig_types[183]
+#define SWIGTYPE_p_Particle swig_types[184]
+#define SWIGTYPE_p_ParticleComposition swig_types[185]
+#define SWIGTYPE_p_ParticleCoreShell swig_types[186]
+#define SWIGTYPE_p_ParticleDistribution swig_types[187]
+#define SWIGTYPE_p_ParticleLayout swig_types[188]
+#define SWIGTYPE_p_Polygon swig_types[189]
+#define SWIGTYPE_p_PolygonPrivate swig_types[190]
+#define SWIGTYPE_p_PolygonalTopology swig_types[191]
+#define SWIGTYPE_p_PolyhedralEdge swig_types[192]
+#define SWIGTYPE_p_PolyhedralFace swig_types[193]
+#define SWIGTYPE_p_PolyhedralTopology swig_types[194]
+#define SWIGTYPE_p_ProgressHandler__Callback_t swig_types[195]
+#define SWIGTYPE_p_RealLimits swig_types[196]
+#define SWIGTYPE_p_RealParameter swig_types[197]
+#define SWIGTYPE_p_Rectangle swig_types[198]
+#define SWIGTYPE_p_RectangularDetector swig_types[199]
+#define SWIGTYPE_p_RectangularPixel swig_types[200]
+#define SWIGTYPE_p_RegionOfInterest swig_types[201]
+#define SWIGTYPE_p_ResolutionFunction2DGaussian swig_types[202]
+#define SWIGTYPE_p_RotationEuler swig_types[203]
+#define SWIGTYPE_p_RotationX swig_types[204]
+#define SWIGTYPE_p_RotationY swig_types[205]
+#define SWIGTYPE_p_RotationZ swig_types[206]
+#define SWIGTYPE_p_SafePointerVectorT_FitObject_t__iterator swig_types[207]
+#define SWIGTYPE_p_SafePointerVectorT_IParticle_const_t swig_types[208]
+#define SWIGTYPE_p_SafePointerVectorT_IParticle_t swig_types[209]
+#define SWIGTYPE_p_SampleBuilderFactory swig_types[210]
+#define SWIGTYPE_p_SimpleSelectionRule swig_types[211]
+#define SWIGTYPE_p_Simulation swig_types[212]
+#define SWIGTYPE_p_SimulationFactory swig_types[213]
+#define SWIGTYPE_p_SimulationOptions swig_types[214]
+#define SWIGTYPE_p_SlicingEffects swig_types[215]
+#define SWIGTYPE_p_SpecularSimulation swig_types[216]
+#define SWIGTYPE_p_SphericalDetector swig_types[217]
+#define SWIGTYPE_p_SphericalPixel swig_types[218]
+#define SWIGTYPE_p_SquareLattice swig_types[219]
+#define SWIGTYPE_p_SquaredFunctionDefault swig_types[220]
+#define SWIGTYPE_p_SquaredFunctionGaussianError swig_types[221]
+#define SWIGTYPE_p_SquaredFunctionMeanSquaredError swig_types[222]
+#define SWIGTYPE_p_SquaredFunctionSimError swig_types[223]
+#define SWIGTYPE_p_SquaredFunctionSystematicError swig_types[224]
+#define SWIGTYPE_p_ThreadInfo swig_types[225]
+#define SWIGTYPE_p_Transform3D swig_types[226]
+#define SWIGTYPE_p_VariableBinAxis swig_types[227]
+#define SWIGTYPE_p_VerticalLine swig_types[228]
+#define SWIGTYPE_p_WavevectorInfo swig_types[229]
+#define SWIGTYPE_p_ZLimits swig_types[230]
+#define SWIGTYPE_p__object swig_types[231]
+#define SWIGTYPE_p_allocator_type swig_types[232]
+#define SWIGTYPE_p_bool swig_types[233]
+#define SWIGTYPE_p_char swig_types[234]
+#define SWIGTYPE_p_const_iterator swig_types[235]
+#define SWIGTYPE_p_const_reference swig_types[236]
+#define SWIGTYPE_p_difference_type swig_types[237]
+#define SWIGTYPE_p_double swig_types[238]
+#define SWIGTYPE_p_int swig_types[239]
+#define SWIGTYPE_p_iterator swig_types[240]
+#define SWIGTYPE_p_long_long swig_types[241]
+#define SWIGTYPE_p_observer_t swig_types[242]
+#define SWIGTYPE_p_observerlist_t swig_types[243]
+#define SWIGTYPE_p_p__object swig_types[244]
+#define SWIGTYPE_p_reference swig_types[245]
+#define SWIGTYPE_p_short swig_types[246]
+#define SWIGTYPE_p_signed_char swig_types[247]
+#define SWIGTYPE_p_size_type swig_types[248]
+#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_double_t_t swig_types[249]
+#define SWIGTYPE_p_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t swig_types[250]
+#define SWIGTYPE_p_std__allocatorT_IFormFactor_p_t swig_types[251]
+#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[252]
+#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[253]
+#define SWIGTYPE_p_std__allocatorT_ParameterSample_t swig_types[254]
+#define SWIGTYPE_p_std__allocatorT_double_t swig_types[255]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[256]
+#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[257]
+#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[258]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[259]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[260]
+#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[261]
+#define SWIGTYPE_p_std__complexT_double_t swig_types[262]
+#define SWIGTYPE_p_std__functionT_GISASSimulation_pfF_t swig_types[263]
+#define SWIGTYPE_p_std__functionT_IMultiLayerBuilder_pfF_t swig_types[264]
+#define SWIGTYPE_p_std__functionT_void_fF_t swig_types[265]
+#define SWIGTYPE_p_std__invalid_argument swig_types[266]
+#define SWIGTYPE_p_std__mapT_std__string_std__string_t__const_iterator swig_types[267]
+#define SWIGTYPE_p_std__shared_ptrT_IFitObserver_t swig_types[268]
+#define SWIGTYPE_p_std__shared_ptrT_ILayerRTCoefficients_const_t swig_types[269]
+#define SWIGTYPE_p_std__shared_ptrT_IMultiLayerBuilder_t swig_types[270]
+#define SWIGTYPE_p_std__shared_ptrT_IObserver_t swig_types[271]
+#define SWIGTYPE_p_std__vectorT_BasicVector3DT_double_t_std__allocatorT_BasicVector3DT_double_t_t_t swig_types[272]
+#define SWIGTYPE_p_std__vectorT_BasicVector3DT_std__complexT_double_t_t_std__allocatorT_BasicVector3DT_std__complexT_double_t_t_t_t swig_types[273]
+#define SWIGTYPE_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t swig_types[274]
+#define SWIGTYPE_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator swig_types[275]
+#define SWIGTYPE_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator swig_types[276]
+#define SWIGTYPE_p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t swig_types[277]
+#define SWIGTYPE_p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t swig_types[278]
+#define SWIGTYPE_p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t swig_types[279]
+#define SWIGTYPE_p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t swig_types[280]
+#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[281]
+#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[282]
+#define SWIGTYPE_p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t swig_types[283]
+#define SWIGTYPE_p_std__vectorT_ParameterSample_std__allocatorT_ParameterSample_t_t swig_types[284]
+#define SWIGTYPE_p_std__vectorT_PolygonalTopology_std__allocatorT_PolygonalTopology_t_t swig_types[285]
+#define SWIGTYPE_p_std__vectorT_RealParameter_p_std__allocatorT_RealParameter_p_t_t swig_types[286]
+#define SWIGTYPE_p_std__vectorT_SimulationElement_std__allocatorT_SimulationElement_t_t swig_types[287]
+#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[288]
+#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[289]
+#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[290]
+#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[291]
+#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[292]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[293]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[294]
+#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[295]
+#define SWIGTYPE_p_swig__SwigPyIterator swig_types[296]
+#define SWIGTYPE_p_unsigned_char swig_types[297]
+#define SWIGTYPE_p_unsigned_int swig_types[298]
+#define SWIGTYPE_p_unsigned_long_long swig_types[299]
+#define SWIGTYPE_p_unsigned_short swig_types[300]
+#define SWIGTYPE_p_value_type swig_types[301]
+static swig_type_info *swig_types[303];
+static swig_module_info swig_module = {swig_types, 302, 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)
 
@@ -6511,7 +6509,6 @@ SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::st
 #include "GISASSimulation.h"
 #include "Histogram1D.h"
 #include "Histogram2D.h"
-#include "HomogeneousMagneticMaterial.h"
 #include "HomogeneousMaterial.h"
 #include "IAbstractParticle.h"
 #include "ICloneable.h"
@@ -6525,7 +6522,6 @@ SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::st
 #include "IIntensityFunction.h"
 #include "IInterferenceFunction.h"
 #include "ILayout.h"
-#include "IMaterial.h"
 #include "INamed.h"
 #include "INode.h"
 #include "INoncopyable.h"
@@ -7829,12 +7825,12 @@ ISample *SwigDirector_ISample::cloneInvertB() const {
 }
 
 
-IMaterial const *SwigDirector_ISample::material() const {
+HomogeneousMaterial const *SwigDirector_ISample::material() const {
   void *swig_argp ;
   int swig_res ;
   swig_owntype own ;
   
-  IMaterial *c_result;
+  HomogeneousMaterial *c_result;
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__.");
   }
@@ -7852,22 +7848,22 @@ IMaterial const *SwigDirector_ISample::material() const {
       Swig::DirectorMethodException::raise("Error detected when calling 'ISample.material'");
     }
   }
-  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_IMaterial,  0  | SWIG_POINTER_DISOWN, &own);
+  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_HomogeneousMaterial,  0  | SWIG_POINTER_DISOWN, &own);
   if (!SWIG_IsOK(swig_res)) {
-    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""IMaterial const *""'");
+    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""HomogeneousMaterial const *""'");
   }
-  c_result = reinterpret_cast< IMaterial * >(swig_argp);
+  c_result = reinterpret_cast< HomogeneousMaterial * >(swig_argp);
   swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */);
-  return (IMaterial const *) c_result;
+  return (HomogeneousMaterial const *) c_result;
 }
 
 
-IMaterial const *SwigDirector_ISample::getAmbientMaterial() const {
+HomogeneousMaterial const *SwigDirector_ISample::getAmbientMaterial() const {
   void *swig_argp ;
   int swig_res ;
   swig_owntype own ;
   
-  IMaterial *c_result;
+  HomogeneousMaterial *c_result;
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ISample.__init__.");
   }
@@ -7885,13 +7881,13 @@ IMaterial const *SwigDirector_ISample::getAmbientMaterial() const {
       Swig::DirectorMethodException::raise("Error detected when calling 'ISample.getAmbientMaterial'");
     }
   }
-  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_IMaterial,  0  | SWIG_POINTER_DISOWN, &own);
+  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_HomogeneousMaterial,  0  | SWIG_POINTER_DISOWN, &own);
   if (!SWIG_IsOK(swig_res)) {
-    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""IMaterial const *""'");
+    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""HomogeneousMaterial const *""'");
   }
-  c_result = reinterpret_cast< IMaterial * >(swig_argp);
+  c_result = reinterpret_cast< HomogeneousMaterial * >(swig_argp);
   swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */);
-  return (IMaterial const *) c_result;
+  return (HomogeneousMaterial const *) c_result;
 }
 
 
@@ -8419,12 +8415,12 @@ ISample *SwigDirector_IFormFactor::cloneInvertB() const {
 }
 
 
-IMaterial const *SwigDirector_IFormFactor::material() const {
+HomogeneousMaterial const *SwigDirector_IFormFactor::material() const {
   void *swig_argp ;
   int swig_res ;
   swig_owntype own ;
   
-  IMaterial *c_result;
+  HomogeneousMaterial *c_result;
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__.");
   }
@@ -8442,22 +8438,22 @@ IMaterial const *SwigDirector_IFormFactor::material() const {
       Swig::DirectorMethodException::raise("Error detected when calling 'IFormFactor.material'");
     }
   }
-  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_IMaterial,  0  | SWIG_POINTER_DISOWN, &own);
+  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_HomogeneousMaterial,  0  | SWIG_POINTER_DISOWN, &own);
   if (!SWIG_IsOK(swig_res)) {
-    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""IMaterial const *""'");
+    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""HomogeneousMaterial const *""'");
   }
-  c_result = reinterpret_cast< IMaterial * >(swig_argp);
+  c_result = reinterpret_cast< HomogeneousMaterial * >(swig_argp);
   swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */);
-  return (IMaterial const *) c_result;
+  return (HomogeneousMaterial const *) c_result;
 }
 
 
-IMaterial const *SwigDirector_IFormFactor::getAmbientMaterial() const {
+HomogeneousMaterial const *SwigDirector_IFormFactor::getAmbientMaterial() const {
   void *swig_argp ;
   int swig_res ;
   swig_owntype own ;
   
-  IMaterial *c_result;
+  HomogeneousMaterial *c_result;
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__.");
   }
@@ -8475,19 +8471,19 @@ IMaterial const *SwigDirector_IFormFactor::getAmbientMaterial() const {
       Swig::DirectorMethodException::raise("Error detected when calling 'IFormFactor.getAmbientMaterial'");
     }
   }
-  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_IMaterial,  0  | SWIG_POINTER_DISOWN, &own);
+  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_HomogeneousMaterial,  0  | SWIG_POINTER_DISOWN, &own);
   if (!SWIG_IsOK(swig_res)) {
-    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""IMaterial const *""'");
+    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""HomogeneousMaterial const *""'");
   }
-  c_result = reinterpret_cast< IMaterial * >(swig_argp);
+  c_result = reinterpret_cast< HomogeneousMaterial * >(swig_argp);
   swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */);
-  return (IMaterial const *) c_result;
+  return (HomogeneousMaterial const *) c_result;
 }
 
 
-void SwigDirector_IFormFactor::setAmbientMaterial(IMaterial const &arg0) {
+void SwigDirector_IFormFactor::setAmbientMaterial(HomogeneousMaterial const &arg0) {
   swig::SwigVar_PyObject obj0;
-  obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&arg0), SWIGTYPE_p_IMaterial,  0 );
+  obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&arg0), SWIGTYPE_p_HomogeneousMaterial,  0 );
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactor.__init__.");
   }
@@ -8992,12 +8988,12 @@ ISample *SwigDirector_IFormFactorBorn::cloneInvertB() const {
 }
 
 
-IMaterial const *SwigDirector_IFormFactorBorn::material() const {
+HomogeneousMaterial const *SwigDirector_IFormFactorBorn::material() const {
   void *swig_argp ;
   int swig_res ;
   swig_owntype own ;
   
-  IMaterial *c_result;
+  HomogeneousMaterial *c_result;
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__.");
   }
@@ -9015,22 +9011,22 @@ IMaterial const *SwigDirector_IFormFactorBorn::material() const {
       Swig::DirectorMethodException::raise("Error detected when calling 'IFormFactorBorn.material'");
     }
   }
-  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_IMaterial,  0  | SWIG_POINTER_DISOWN, &own);
+  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_HomogeneousMaterial,  0  | SWIG_POINTER_DISOWN, &own);
   if (!SWIG_IsOK(swig_res)) {
-    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""IMaterial const *""'");
+    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""HomogeneousMaterial const *""'");
   }
-  c_result = reinterpret_cast< IMaterial * >(swig_argp);
+  c_result = reinterpret_cast< HomogeneousMaterial * >(swig_argp);
   swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */);
-  return (IMaterial const *) c_result;
+  return (HomogeneousMaterial const *) c_result;
 }
 
 
-IMaterial const *SwigDirector_IFormFactorBorn::getAmbientMaterial() const {
+HomogeneousMaterial const *SwigDirector_IFormFactorBorn::getAmbientMaterial() const {
   void *swig_argp ;
   int swig_res ;
   swig_owntype own ;
   
-  IMaterial *c_result;
+  HomogeneousMaterial *c_result;
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__.");
   }
@@ -9048,19 +9044,19 @@ IMaterial const *SwigDirector_IFormFactorBorn::getAmbientMaterial() const {
       Swig::DirectorMethodException::raise("Error detected when calling 'IFormFactorBorn.getAmbientMaterial'");
     }
   }
-  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_IMaterial,  0  | SWIG_POINTER_DISOWN, &own);
+  swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_HomogeneousMaterial,  0  | SWIG_POINTER_DISOWN, &own);
   if (!SWIG_IsOK(swig_res)) {
-    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""IMaterial const *""'");
+    Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""HomogeneousMaterial const *""'");
   }
-  c_result = reinterpret_cast< IMaterial * >(swig_argp);
+  c_result = reinterpret_cast< HomogeneousMaterial * >(swig_argp);
   swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */);
-  return (IMaterial const *) c_result;
+  return (HomogeneousMaterial const *) c_result;
 }
 
 
-void SwigDirector_IFormFactorBorn::setAmbientMaterial(IMaterial const &arg0) {
+void SwigDirector_IFormFactorBorn::setAmbientMaterial(HomogeneousMaterial const &arg0) {
   swig::SwigVar_PyObject obj0;
-  obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&arg0), SWIGTYPE_p_IMaterial,  0 );
+  obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&arg0), SWIGTYPE_p_HomogeneousMaterial,  0 );
   if (!swig_get_self()) {
     Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call IFormFactorBorn.__init__.");
   }
@@ -37595,7 +37591,7 @@ SWIGINTERN PyObject *_wrap_ISample_material(PyObject *SWIGUNUSEDPARM(self), PyOb
   PyObject * obj0 = 0 ;
   Swig::Director *director = 0;
   bool upcall = false;
-  IMaterial *result = 0 ;
+  HomogeneousMaterial *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:ISample_material",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ISample, 0 |  0 );
@@ -37607,14 +37603,14 @@ SWIGINTERN PyObject *_wrap_ISample_material(PyObject *SWIGUNUSEDPARM(self), PyOb
   upcall = (director && (director->swig_get_self()==obj0));
   try {
     if (upcall) {
-      result = (IMaterial *)((ISample const *)arg1)->ISample::material();
+      result = (HomogeneousMaterial *)((ISample const *)arg1)->ISample::material();
     } else {
-      result = (IMaterial *)((ISample const *)arg1)->material();
+      result = (HomogeneousMaterial *)((ISample const *)arg1)->material();
     }
   } catch (Swig::DirectorException&) {
     SWIG_fail;
   }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (director) {
     SWIG_AcquirePtr(resultobj, director->swig_release_ownership(SWIG_as_voidptr(result)));
   }
@@ -37632,7 +37628,7 @@ SWIGINTERN PyObject *_wrap_ISample_getAmbientMaterial(PyObject *SWIGUNUSEDPARM(s
   PyObject * obj0 = 0 ;
   Swig::Director *director = 0;
   bool upcall = false;
-  IMaterial *result = 0 ;
+  HomogeneousMaterial *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:ISample_getAmbientMaterial",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ISample, 0 |  0 );
@@ -37644,14 +37640,14 @@ SWIGINTERN PyObject *_wrap_ISample_getAmbientMaterial(PyObject *SWIGUNUSEDPARM(s
   upcall = (director && (director->swig_get_self()==obj0));
   try {
     if (upcall) {
-      result = (IMaterial *)((ISample const *)arg1)->ISample::getAmbientMaterial();
+      result = (HomogeneousMaterial *)((ISample const *)arg1)->ISample::getAmbientMaterial();
     } else {
-      result = (IMaterial *)((ISample const *)arg1)->getAmbientMaterial();
+      result = (HomogeneousMaterial *)((ISample const *)arg1)->getAmbientMaterial();
     }
   } catch (Swig::DirectorException&) {
     SWIG_fail;
   }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (director) {
     SWIG_AcquirePtr(resultobj, director->swig_release_ownership(SWIG_as_voidptr(result)));
   }
@@ -37667,7 +37663,7 @@ SWIGINTERN PyObject *_wrap_ISample_containedMaterials(PyObject *SWIGUNUSEDPARM(s
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
-  SwigValueWrapper< std::vector< IMaterial const *,std::allocator< IMaterial const * > > > result;
+  SwigValueWrapper< std::vector< HomogeneousMaterial const *,std::allocator< HomogeneousMaterial const * > > > result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:ISample_containedMaterials",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ISample, 0 |  0 );
@@ -37676,7 +37672,7 @@ SWIGINTERN PyObject *_wrap_ISample_containedMaterials(PyObject *SWIGUNUSEDPARM(s
   }
   arg1 = reinterpret_cast< ISample * >(argp1);
   result = ((ISample const *)arg1)->containedMaterials();
-  resultobj = SWIG_NewPointerObj((new std::vector< IMaterial const *,std::allocator< IMaterial const * > >(static_cast< const std::vector< IMaterial const *,std::allocator< IMaterial const * > >& >(result))), SWIGTYPE_p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t, SWIG_POINTER_OWN |  0 );
+  resultobj = SWIG_NewPointerObj((new std::vector< HomogeneousMaterial const *,std::allocator< HomogeneousMaterial const * > >(static_cast< const std::vector< HomogeneousMaterial const *,std::allocator< HomogeneousMaterial const * > >& >(result))), SWIGTYPE_p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -61647,7 +61643,7 @@ fail:
 SWIGINTERN PyObject *_wrap_IFormFactor_setAmbientMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   IFormFactor *arg1 = (IFormFactor *) 0 ;
-  IMaterial *arg2 = 0 ;
+  HomogeneousMaterial *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -61663,21 +61659,21 @@ SWIGINTERN PyObject *_wrap_IFormFactor_setAmbientMaterial(PyObject *SWIGUNUSEDPA
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactor_setAmbientMaterial" "', argument " "1"" of type '" "IFormFactor *""'"); 
   }
   arg1 = reinterpret_cast< IFormFactor * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IFormFactor_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IFormFactor_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactor_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactor_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
+  arg2 = reinterpret_cast< HomogeneousMaterial * >(argp2);
   director = SWIG_DIRECTOR_CAST(arg1);
   upcall = (director && (director->swig_get_self()==obj0));
   try {
     if (upcall) {
       Swig::DirectorPureVirtualException::raise("IFormFactor::setAmbientMaterial");
     } else {
-      (arg1)->setAmbientMaterial((IMaterial const &)*arg2);
+      (arg1)->setAmbientMaterial((HomogeneousMaterial const &)*arg2);
     }
   } catch (Swig::DirectorException&) {
     SWIG_fail;
@@ -64237,7 +64233,7 @@ fail:
 SWIGINTERN PyObject *_wrap_IFormFactorBorn_setAmbientMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   IFormFactorBorn *arg1 = (IFormFactorBorn *) 0 ;
-  IMaterial *arg2 = 0 ;
+  HomogeneousMaterial *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -64253,21 +64249,21 @@ SWIGINTERN PyObject *_wrap_IFormFactorBorn_setAmbientMaterial(PyObject *SWIGUNUS
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactorBorn_setAmbientMaterial" "', argument " "1"" of type '" "IFormFactorBorn *""'"); 
   }
   arg1 = reinterpret_cast< IFormFactorBorn * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IFormFactorBorn_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IFormFactorBorn_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactorBorn_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactorBorn_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
+  arg2 = reinterpret_cast< HomogeneousMaterial * >(argp2);
   director = SWIG_DIRECTOR_CAST(arg1);
   upcall = (director && (director->swig_get_self()==obj0));
   try {
     if (upcall) {
-      (arg1)->IFormFactorBorn::setAmbientMaterial((IMaterial const &)*arg2);
+      (arg1)->IFormFactorBorn::setAmbientMaterial((HomogeneousMaterial const &)*arg2);
     } else {
-      (arg1)->setAmbientMaterial((IMaterial const &)*arg2);
+      (arg1)->setAmbientMaterial((HomogeneousMaterial const &)*arg2);
     }
   } catch (Swig::DirectorException&) {
     SWIG_fail;
@@ -64920,7 +64916,7 @@ fail:
 SWIGINTERN PyObject *_wrap_IFormFactorDecorator_setAmbientMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   IFormFactorDecorator *arg1 = (IFormFactorDecorator *) 0 ;
-  IMaterial *arg2 = 0 ;
+  HomogeneousMaterial *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -64934,15 +64930,15 @@ SWIGINTERN PyObject *_wrap_IFormFactorDecorator_setAmbientMaterial(PyObject *SWI
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IFormFactorDecorator_setAmbientMaterial" "', argument " "1"" of type '" "IFormFactorDecorator *""'"); 
   }
   arg1 = reinterpret_cast< IFormFactorDecorator * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IFormFactorDecorator_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IFormFactorDecorator_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactorDecorator_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IFormFactorDecorator_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
-  (arg1)->setAmbientMaterial((IMaterial const &)*arg2);
+  arg2 = reinterpret_cast< HomogeneousMaterial * >(argp2);
+  (arg1)->setAmbientMaterial((HomogeneousMaterial const &)*arg2);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -67530,7 +67526,7 @@ fail:
 SWIGINTERN PyObject *_wrap_FormFactorCrystal_setAmbientMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   FormFactorCrystal *arg1 = (FormFactorCrystal *) 0 ;
-  IMaterial *arg2 = 0 ;
+  HomogeneousMaterial *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -67544,15 +67540,15 @@ SWIGINTERN PyObject *_wrap_FormFactorCrystal_setAmbientMaterial(PyObject *SWIGUN
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FormFactorCrystal_setAmbientMaterial" "', argument " "1"" of type '" "FormFactorCrystal *""'"); 
   }
   arg1 = reinterpret_cast< FormFactorCrystal * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FormFactorCrystal_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FormFactorCrystal_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FormFactorCrystal_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FormFactorCrystal_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
-  (arg1)->setAmbientMaterial((IMaterial const &)*arg2);
+  arg2 = reinterpret_cast< HomogeneousMaterial * >(argp2);
+  (arg1)->setAmbientMaterial((HomogeneousMaterial const &)*arg2);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -74709,7 +74705,7 @@ fail:
 SWIGINTERN PyObject *_wrap_FormFactorWeighted_setAmbientMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   FormFactorWeighted *arg1 = (FormFactorWeighted *) 0 ;
-  IMaterial *arg2 = 0 ;
+  HomogeneousMaterial *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -74723,15 +74719,15 @@ SWIGINTERN PyObject *_wrap_FormFactorWeighted_setAmbientMaterial(PyObject *SWIGU
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FormFactorWeighted_setAmbientMaterial" "', argument " "1"" of type '" "FormFactorWeighted *""'"); 
   }
   arg1 = reinterpret_cast< FormFactorWeighted * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FormFactorWeighted_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FormFactorWeighted_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FormFactorWeighted_setAmbientMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FormFactorWeighted_setAmbientMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
-  (arg1)->setAmbientMaterial((IMaterial const &)*arg2);
+  arg2 = reinterpret_cast< HomogeneousMaterial * >(argp2);
+  (arg1)->setAmbientMaterial((HomogeneousMaterial const &)*arg2);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -80881,295 +80877,62 @@ SWIGINTERN PyObject *Histogram2D_swigregister(PyObject *SWIGUNUSEDPARM(self), Py
   return SWIG_Py_Void();
 }
 
-SWIGINTERN PyObject *_wrap_delete_IMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:delete_IMaterial",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IMaterial" "', argument " "1"" of type '" "IMaterial *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  delete arg1;
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  IMaterial *result = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:IMaterial_clone",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_clone" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  result = (IMaterial *)((IMaterial const *)arg1)->clone();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_cloneInverted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  IMaterial *result = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:IMaterial_cloneInverted",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_cloneInverted" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  result = (IMaterial *)((IMaterial const *)arg1)->cloneInverted();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_isScalarMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:IMaterial_isScalarMaterial",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_isScalarMaterial" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  result = (bool)((IMaterial const *)arg1)->isScalarMaterial();
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_isMagneticMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:IMaterial_isMagneticMaterial",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_isMagneticMaterial" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  result = (bool)((IMaterial const *)arg1)->isMagneticMaterial();
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_refractiveIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  complex_t result;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:IMaterial_refractiveIndex",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_refractiveIndex" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  result = ((IMaterial const *)arg1)->refractiveIndex();
-  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_scalarSLD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  WavevectorInfo *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  complex_t result;
-  
-  if (!PyArg_ParseTuple(args,(char *)"OO:IMaterial_scalarSLD",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_scalarSLD" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_WavevectorInfo,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IMaterial_scalarSLD" "', argument " "2"" of type '" "WavevectorInfo const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMaterial_scalarSLD" "', argument " "2"" of type '" "WavevectorInfo const &""'"); 
-  }
-  arg2 = reinterpret_cast< WavevectorInfo * >(argp2);
-  result = ((IMaterial const *)arg1)->scalarSLD((WavevectorInfo const &)*arg2);
-  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_scalarFresnel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  kvector_t arg2 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 ;
-  int res2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
+  std::string *arg1 = 0 ;
+  complex_t arg2 ;
+  kvector_t arg3 ;
+  int res1 = SWIG_OLDOBJ ;
+  std::complex< double > val2 ;
+  int ecode2 = 0 ;
+  void *argp3 ;
+  int res3 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
-  complex_t result;
+  HomogeneousMaterial *result = 0 ;
   
-  if (!PyArg_ParseTuple(args,(char *)"OOO:IMaterial_scalarFresnel",&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_scalarFresnel" "', argument " "1"" of type '" "IMaterial const *""'"); 
+  if (!PyArg_ParseTuple(args,(char *)"OOO:new_HomogeneousMaterial",&obj0,&obj1,&obj2)) SWIG_fail;
+  {
+    std::string *ptr = (std::string *)0;
+    res1 = SWIG_AsPtr_std_string(obj0, &ptr);
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HomogeneousMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
+    }
+    if (!ptr) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
+    }
+    arg1 = ptr;
   }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
+  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HomogeneousMaterial" "', argument " "2"" of type '" "complex_t""'");
+  } 
+  arg2 = static_cast< complex_t >(val2);
   {
-    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
-    if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IMaterial_scalarFresnel" "', argument " "2"" of type '" "kvector_t const""'"); 
+    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_HomogeneousMaterial" "', argument " "3"" of type '" "kvector_t const""'"); 
     }  
-    if (!argp2) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMaterial_scalarFresnel" "', argument " "2"" of type '" "kvector_t const""'");
+    if (!argp3) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMaterial" "', argument " "3"" of type '" "kvector_t const""'");
     } else {
-      kvector_t * temp = reinterpret_cast< kvector_t * >(argp2);
-      arg2 = *temp;
-      if (SWIG_IsNewObj(res2)) delete temp;
+      kvector_t * temp = reinterpret_cast< kvector_t * >(argp3);
+      arg3 = *temp;
+      if (SWIG_IsNewObj(res3)) delete temp;
     }
   }
-  ecode3 = SWIG_AsVal_double(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IMaterial_scalarFresnel" "', argument " "3"" of type '" "double""'");
-  } 
-  arg3 = static_cast< double >(val3);
-  result = ((IMaterial const *)arg1)->scalarFresnel(arg2,arg3);
-  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial_createTransformedMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  Transform3D *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  IMaterial *result = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"OO:IMaterial_createTransformedMaterial",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial_createTransformedMaterial" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Transform3D,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
-  }
-  arg2 = reinterpret_cast< Transform3D * >(argp2);
-  result = (IMaterial *)((IMaterial const *)arg1)->createTransformedMaterial((Transform3D const &)*arg2);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_IMaterial___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  IMaterial *arg1 = (IMaterial *) 0 ;
-  IMaterial *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if (!PyArg_ParseTuple(args,(char *)"OO:IMaterial___eq__",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMaterial___eq__" "', argument " "1"" of type '" "IMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IMaterial___eq__" "', argument " "2"" of type '" "IMaterial const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMaterial___eq__" "', argument " "2"" of type '" "IMaterial const &""'"); 
-  }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
-  result = (bool)((IMaterial const *)arg1)->operator ==((IMaterial const &)*arg2);
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
+  result = (HomogeneousMaterial *)new HomogeneousMaterial((std::string const &)*arg1,arg2,arg3);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, SWIG_POINTER_NEW |  0 );
+  if (SWIG_IsNewObj(res1)) delete arg1;
   return resultobj;
 fail:
+  if (SWIG_IsNewObj(res1)) delete arg1;
   return NULL;
 }
 
 
-SWIGINTERN PyObject *IMaterial_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_IMaterial, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   std::string *arg1 = 0 ;
   complex_t arg2 ;
@@ -81207,22 +80970,26 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   std::string *arg1 = 0 ;
   double arg2 ;
   double arg3 ;
+  kvector_t arg4 ;
   int res1 = SWIG_OLDOBJ ;
   double val2 ;
   int ecode2 = 0 ;
   double val3 ;
   int ecode3 = 0 ;
+  void *argp4 ;
+  int res4 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
+  PyObject * obj3 = 0 ;
   HomogeneousMaterial *result = 0 ;
   
-  if (!PyArg_ParseTuple(args,(char *)"OOO:new_HomogeneousMaterial",&obj0,&obj1,&obj2)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_HomogeneousMaterial",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   {
     std::string *ptr = (std::string *)0;
     res1 = SWIG_AsPtr_std_string(obj0, &ptr);
@@ -81244,277 +81011,21 @@ SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial__SWIG_1(PyObject *SWIGUNUSEDP
     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HomogeneousMaterial" "', argument " "3"" of type '" "double""'");
   } 
   arg3 = static_cast< double >(val3);
-  result = (HomogeneousMaterial *)new HomogeneousMaterial((std::string const &)*arg1,arg2,arg3);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, SWIG_POINTER_NEW |  0 );
-  if (SWIG_IsNewObj(res1)) delete arg1;
-  return resultobj;
-fail:
-  if (SWIG_IsNewObj(res1)) delete arg1;
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial(PyObject *self, PyObject *args) {
-  Py_ssize_t argc;
-  PyObject *argv[4] = {
-    0
-  };
-  Py_ssize_t ii;
-  
-  if (!PyTuple_Check(args)) SWIG_fail;
-  argc = args ? PyObject_Length(args) : 0;
-  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
-    argv[ii] = PyTuple_GET_ITEM(args,ii);
-  }
-  if (argc == 2) {
-    int _v;
-    int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_new_HomogeneousMaterial__SWIG_0(self, args);
-      }
-    }
-  }
-  if (argc == 3) {
-    int _v;
-    int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_double(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        {
-          int res = SWIG_AsVal_double(argv[2], NULL);
-          _v = SWIG_CheckState(res);
-        }
-        if (_v) {
-          return _wrap_new_HomogeneousMaterial__SWIG_1(self, args);
-        }
-      }
-    }
-  }
-  
-fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HomogeneousMaterial'.\n"
-    "  Possible C/C++ prototypes are:\n"
-    "    HomogeneousMaterial::HomogeneousMaterial(std::string const &,complex_t const)\n"
-    "    HomogeneousMaterial::HomogeneousMaterial(std::string const &,double,double)\n");
-  return 0;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_HomogeneousMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:delete_HomogeneousMaterial",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HomogeneousMaterial" "', argument " "1"" of type '" "HomogeneousMaterial *""'"); 
-  }
-  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
-  delete arg1;
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_HomogeneousMaterial_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  HomogeneousMaterial *result = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_clone",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_clone" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
-  result = (HomogeneousMaterial *)((HomogeneousMaterial const *)arg1)->clone();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_HomogeneousMaterial_cloneInverted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  HomogeneousMaterial *result = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_cloneInverted",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_cloneInverted" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
-  result = (HomogeneousMaterial *)((HomogeneousMaterial const *)arg1)->cloneInverted();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_HomogeneousMaterial_refractiveIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  complex_t result;
-  
-  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_refractiveIndex",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_refractiveIndex" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
-  result = ((HomogeneousMaterial const *)arg1)->refractiveIndex();
-  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_HomogeneousMaterial_setRefractiveIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
-  complex_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  std::complex< double > val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMaterial_setRefractiveIndex",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_setRefractiveIndex" "', argument " "1"" of type '" "HomogeneousMaterial *""'"); 
-  }
-  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
-  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HomogeneousMaterial_setRefractiveIndex" "', argument " "2"" of type '" "complex_t""'");
-  } 
-  arg2 = static_cast< complex_t >(val2);
-  (arg1)->setRefractiveIndex(arg2);
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_HomogeneousMaterial_createTransformedMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
-  Transform3D *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  IMaterial *result = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMaterial_createTransformedMaterial",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_createTransformedMaterial" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Transform3D,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HomogeneousMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HomogeneousMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
-  }
-  arg2 = reinterpret_cast< Transform3D * >(argp2);
-  result = (IMaterial *)((HomogeneousMaterial const *)arg1)->createTransformedMaterial((Transform3D const &)*arg2);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *HomogeneousMaterial_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_HomogeneousMaterial, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_new_HomogeneousMagneticMaterial__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  std::string *arg1 = 0 ;
-  complex_t arg2 ;
-  kvector_t arg3 ;
-  int res1 = SWIG_OLDOBJ ;
-  std::complex< double > val2 ;
-  int ecode2 = 0 ;
-  void *argp3 ;
-  int res3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  HomogeneousMagneticMaterial *result = 0 ;
-  
-  if (!PyArg_ParseTuple(args,(char *)"OOO:new_HomogeneousMagneticMaterial",&obj0,&obj1,&obj2)) SWIG_fail;
   {
-    std::string *ptr = (std::string *)0;
-    res1 = SWIG_AsPtr_std_string(obj0, &ptr);
-    if (!SWIG_IsOK(res1)) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HomogeneousMagneticMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
-    }
-    if (!ptr) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMagneticMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
-    }
-    arg1 = ptr;
-  }
-  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HomogeneousMagneticMaterial" "', argument " "2"" of type '" "complex_t""'");
-  } 
-  arg2 = static_cast< complex_t >(val2);
-  {
-    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
-    if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_HomogeneousMagneticMaterial" "', argument " "3"" of type '" "kvector_t const""'"); 
+    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
+    if (!SWIG_IsOK(res4)) {
+      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_HomogeneousMaterial" "', argument " "4"" of type '" "kvector_t const""'"); 
     }  
-    if (!argp3) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMagneticMaterial" "', argument " "3"" of type '" "kvector_t const""'");
+    if (!argp4) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMaterial" "', argument " "4"" of type '" "kvector_t const""'");
     } else {
-      kvector_t * temp = reinterpret_cast< kvector_t * >(argp3);
-      arg3 = *temp;
-      if (SWIG_IsNewObj(res3)) delete temp;
+      kvector_t * temp = reinterpret_cast< kvector_t * >(argp4);
+      arg4 = *temp;
+      if (SWIG_IsNewObj(res4)) delete temp;
     }
   }
-  result = (HomogeneousMagneticMaterial *)new HomogeneousMagneticMaterial((std::string const &)*arg1,arg2,arg3);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMagneticMaterial, SWIG_POINTER_NEW |  0 );
+  result = (HomogeneousMaterial *)new HomogeneousMaterial((std::string const &)*arg1,arg2,arg3,arg4);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, SWIG_POINTER_NEW |  0 );
   if (SWIG_IsNewObj(res1)) delete arg1;
   return resultobj;
 fail:
@@ -81523,62 +81034,45 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_new_HomogeneousMagneticMaterial__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   std::string *arg1 = 0 ;
   double arg2 ;
   double arg3 ;
-  kvector_t arg4 ;
   int res1 = SWIG_OLDOBJ ;
   double val2 ;
   int ecode2 = 0 ;
   double val3 ;
   int ecode3 = 0 ;
-  void *argp4 ;
-  int res4 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
-  PyObject * obj3 = 0 ;
-  HomogeneousMagneticMaterial *result = 0 ;
+  HomogeneousMaterial *result = 0 ;
   
-  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_HomogeneousMagneticMaterial",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
+  if (!PyArg_ParseTuple(args,(char *)"OOO:new_HomogeneousMaterial",&obj0,&obj1,&obj2)) SWIG_fail;
   {
     std::string *ptr = (std::string *)0;
     res1 = SWIG_AsPtr_std_string(obj0, &ptr);
     if (!SWIG_IsOK(res1)) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HomogeneousMagneticMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HomogeneousMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
     }
     if (!ptr) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMagneticMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMaterial" "', argument " "1"" of type '" "std::string const &""'"); 
     }
     arg1 = ptr;
   }
   ecode2 = SWIG_AsVal_double(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HomogeneousMagneticMaterial" "', argument " "2"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HomogeneousMaterial" "', argument " "2"" of type '" "double""'");
   } 
   arg2 = static_cast< double >(val2);
   ecode3 = SWIG_AsVal_double(obj2, &val3);
   if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HomogeneousMagneticMaterial" "', argument " "3"" of type '" "double""'");
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HomogeneousMaterial" "', argument " "3"" of type '" "double""'");
   } 
   arg3 = static_cast< double >(val3);
-  {
-    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
-    if (!SWIG_IsOK(res4)) {
-      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_HomogeneousMagneticMaterial" "', argument " "4"" of type '" "kvector_t const""'"); 
-    }  
-    if (!argp4) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HomogeneousMagneticMaterial" "', argument " "4"" of type '" "kvector_t const""'");
-    } else {
-      kvector_t * temp = reinterpret_cast< kvector_t * >(argp4);
-      arg4 = *temp;
-      if (SWIG_IsNewObj(res4)) delete temp;
-    }
-  }
-  result = (HomogeneousMagneticMaterial *)new HomogeneousMagneticMaterial((std::string const &)*arg1,arg2,arg3,arg4);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMagneticMaterial, SWIG_POINTER_NEW |  0 );
+  result = (HomogeneousMaterial *)new HomogeneousMaterial((std::string const &)*arg1,arg2,arg3);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, SWIG_POINTER_NEW |  0 );
   if (SWIG_IsNewObj(res1)) delete arg1;
   return resultobj;
 fail:
@@ -81587,7 +81081,7 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_new_HomogeneousMagneticMaterial(PyObject *self, PyObject *args) {
+SWIGINTERN PyObject *_wrap_new_HomogeneousMaterial(PyObject *self, PyObject *args) {
   Py_ssize_t argc;
   PyObject *argv[5] = {
     0
@@ -81599,6 +81093,40 @@ SWIGINTERN PyObject *_wrap_new_HomogeneousMagneticMaterial(PyObject *self, PyObj
   for (ii = 0; (ii < 4) && (ii < argc); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
+  if (argc == 2) {
+    int _v;
+    int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        return _wrap_new_HomogeneousMaterial__SWIG_1(self, args);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      {
+        int res = SWIG_AsVal_double(argv[1], NULL);
+        _v = SWIG_CheckState(res);
+      }
+      if (_v) {
+        {
+          int res = SWIG_AsVal_double(argv[2], NULL);
+          _v = SWIG_CheckState(res);
+        }
+        if (_v) {
+          return _wrap_new_HomogeneousMaterial__SWIG_3(self, args);
+        }
+      }
+    }
+  }
   if (argc == 3) {
     int _v;
     int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0));
@@ -81612,7 +81140,7 @@ SWIGINTERN PyObject *_wrap_new_HomogeneousMagneticMaterial(PyObject *self, PyObj
         int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_BasicVector3DT_double_t, 0);
         _v = SWIG_CheckState(res);
         if (_v) {
-          return _wrap_new_HomogeneousMagneticMaterial__SWIG_0(self, args);
+          return _wrap_new_HomogeneousMaterial__SWIG_0(self, args);
         }
       }
     }
@@ -81635,7 +81163,7 @@ SWIGINTERN PyObject *_wrap_new_HomogeneousMagneticMaterial(PyObject *self, PyObj
           int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_BasicVector3DT_double_t, 0);
           _v = SWIG_CheckState(res);
           if (_v) {
-            return _wrap_new_HomogeneousMagneticMaterial__SWIG_1(self, args);
+            return _wrap_new_HomogeneousMaterial__SWIG_2(self, args);
           }
         }
       }
@@ -81643,73 +81171,192 @@ SWIGINTERN PyObject *_wrap_new_HomogeneousMagneticMaterial(PyObject *self, PyObj
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HomogeneousMagneticMaterial'.\n"
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HomogeneousMaterial'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(std::string const &,complex_t const,kvector_t const)\n"
-    "    HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(std::string const &,double,double,kvector_t const)\n");
+    "    HomogeneousMaterial::HomogeneousMaterial(std::string const &,complex_t const,kvector_t const)\n"
+    "    HomogeneousMaterial::HomogeneousMaterial(std::string const &,complex_t const)\n"
+    "    HomogeneousMaterial::HomogeneousMaterial(std::string const &,double,double,kvector_t const)\n"
+    "    HomogeneousMaterial::HomogeneousMaterial(std::string const &,double,double)\n");
   return 0;
 }
 
 
-SWIGINTERN PyObject *_wrap_HomogeneousMagneticMaterial_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_delete_HomogeneousMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:delete_HomogeneousMaterial",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, SWIG_POINTER_DISOWN |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HomogeneousMaterial" "', argument " "1"" of type '" "HomogeneousMaterial *""'"); 
+  }
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  delete arg1;
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  HomogeneousMaterial *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_clone",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_clone" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
+  }
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = (HomogeneousMaterial *)((HomogeneousMaterial const *)arg1)->clone();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_cloneInverted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  HomogeneousMaterial *result = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_cloneInverted",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_cloneInverted" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
+  }
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = (HomogeneousMaterial *)((HomogeneousMaterial const *)arg1)->cloneInverted();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_refractiveIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  complex_t result;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_refractiveIndex",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_refractiveIndex" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
+  }
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = ((HomogeneousMaterial const *)arg1)->refractiveIndex();
+  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_setRefractiveIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  complex_t arg2 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  std::complex< double > val2 ;
+  int ecode2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMaterial_setRefractiveIndex",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_setRefractiveIndex" "', argument " "1"" of type '" "HomogeneousMaterial *""'"); 
+  }
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
+  if (!SWIG_IsOK(ecode2)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HomogeneousMaterial_setRefractiveIndex" "', argument " "2"" of type '" "complex_t""'");
+  } 
+  arg2 = static_cast< complex_t >(val2);
+  (arg1)->setRefractiveIndex(arg2);
+  resultobj = SWIG_Py_Void();
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_isScalarMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  HomogeneousMagneticMaterial *arg1 = (HomogeneousMagneticMaterial *) 0 ;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
-  HomogeneousMagneticMaterial *result = 0 ;
+  bool result;
   
-  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMagneticMaterial_clone",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_isScalarMaterial",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMagneticMaterial_clone" "', argument " "1"" of type '" "HomogeneousMagneticMaterial const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_isScalarMaterial" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
   }
-  arg1 = reinterpret_cast< HomogeneousMagneticMaterial * >(argp1);
-  result = (HomogeneousMagneticMaterial *)((HomogeneousMagneticMaterial const *)arg1)->clone();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = (bool)((HomogeneousMaterial const *)arg1)->isScalarMaterial();
+  resultobj = SWIG_From_bool(static_cast< bool >(result));
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_HomogeneousMagneticMaterial_cloneInverted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_isMagneticMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  HomogeneousMagneticMaterial *arg1 = (HomogeneousMagneticMaterial *) 0 ;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
-  HomogeneousMagneticMaterial *result = 0 ;
+  bool result;
   
-  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMagneticMaterial_cloneInverted",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_isMagneticMaterial",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMagneticMaterial_cloneInverted" "', argument " "1"" of type '" "HomogeneousMagneticMaterial const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_isMagneticMaterial" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
   }
-  arg1 = reinterpret_cast< HomogeneousMagneticMaterial * >(argp1);
-  result = (HomogeneousMagneticMaterial *)((HomogeneousMagneticMaterial const *)arg1)->cloneInverted();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = (bool)((HomogeneousMaterial const *)arg1)->isMagneticMaterial();
+  resultobj = SWIG_From_bool(static_cast< bool >(result));
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_HomogeneousMagneticMaterial_magneticField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_magneticField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  HomogeneousMagneticMaterial *arg1 = (HomogeneousMagneticMaterial *) 0 ;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
   kvector_t result;
   
-  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMagneticMaterial_magneticField",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMaterial_magneticField",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMagneticMaterial_magneticField" "', argument " "1"" of type '" "HomogeneousMagneticMaterial const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_magneticField" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
   }
-  arg1 = reinterpret_cast< HomogeneousMagneticMaterial * >(argp1);
-  result = ((HomogeneousMagneticMaterial const *)arg1)->magneticField();
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = ((HomogeneousMaterial const *)arg1)->magneticField();
   resultobj = SWIG_NewPointerObj((new kvector_t(static_cast< const kvector_t& >(result))), SWIGTYPE_p_BasicVector3DT_double_t, SWIG_POINTER_OWN |  0 );
   return resultobj;
 fail:
@@ -81717,9 +81364,9 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_HomogeneousMagneticMaterial_setMagneticField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_setMagneticField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  HomogeneousMagneticMaterial *arg1 = (HomogeneousMagneticMaterial *) 0 ;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
   kvector_t arg2 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -81728,19 +81375,19 @@ SWIGINTERN PyObject *_wrap_HomogeneousMagneticMaterial_setMagneticField(PyObject
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   
-  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMagneticMaterial_setMagneticField",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMaterial_setMagneticField",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMagneticMaterial_setMagneticField" "', argument " "1"" of type '" "HomogeneousMagneticMaterial *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_setMagneticField" "', argument " "1"" of type '" "HomogeneousMaterial *""'"); 
   }
-  arg1 = reinterpret_cast< HomogeneousMagneticMaterial * >(argp1);
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
   {
     res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HomogeneousMagneticMaterial_setMagneticField" "', argument " "2"" of type '" "kvector_t const""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HomogeneousMaterial_setMagneticField" "', argument " "2"" of type '" "kvector_t const""'"); 
     }  
     if (!argp2) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HomogeneousMagneticMaterial_setMagneticField" "', argument " "2"" of type '" "kvector_t const""'");
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HomogeneousMaterial_setMagneticField" "', argument " "2"" of type '" "kvector_t const""'");
     } else {
       kvector_t * temp = reinterpret_cast< kvector_t * >(argp2);
       arg2 = *temp;
@@ -81755,87 +81402,126 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_HomogeneousMagneticMaterial_isScalarMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_scalarSLD(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  HomogeneousMagneticMaterial *arg1 = (HomogeneousMagneticMaterial *) 0 ;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  WavevectorInfo *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
   PyObject * obj0 = 0 ;
-  bool result;
+  PyObject * obj1 = 0 ;
+  complex_t result;
   
-  if (!PyArg_ParseTuple(args,(char *)"O:HomogeneousMagneticMaterial_isScalarMaterial",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMaterial_scalarSLD",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMagneticMaterial_isScalarMaterial" "', argument " "1"" of type '" "HomogeneousMagneticMaterial const *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_scalarSLD" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
   }
-  arg1 = reinterpret_cast< HomogeneousMagneticMaterial * >(argp1);
-  result = (bool)((HomogeneousMagneticMaterial const *)arg1)->isScalarMaterial();
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_WavevectorInfo,  0  | 0);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HomogeneousMaterial_scalarSLD" "', argument " "2"" of type '" "WavevectorInfo const &""'"); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HomogeneousMaterial_scalarSLD" "', argument " "2"" of type '" "WavevectorInfo const &""'"); 
+  }
+  arg2 = reinterpret_cast< WavevectorInfo * >(argp2);
+  result = ((HomogeneousMaterial const *)arg1)->scalarSLD((WavevectorInfo const &)*arg2);
+  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_HomogeneousMagneticMaterial_createTransformedMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_scalarFresnel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  HomogeneousMagneticMaterial *arg1 = (HomogeneousMagneticMaterial *) 0 ;
-  Transform3D *arg2 = 0 ;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  kvector_t arg2 ;
+  double arg3 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  void *argp2 = 0 ;
+  void *argp2 ;
   int res2 = 0 ;
+  double val3 ;
+  int ecode3 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
-  IMaterial *result = 0 ;
+  PyObject * obj2 = 0 ;
+  complex_t result;
   
-  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMagneticMaterial_createTransformedMaterial",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMagneticMaterial, 0 |  0 );
+  if (!PyArg_ParseTuple(args,(char *)"OOO:HomogeneousMaterial_scalarFresnel",&obj0,&obj1,&obj2)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMagneticMaterial_createTransformedMaterial" "', argument " "1"" of type '" "HomogeneousMagneticMaterial const *""'"); 
-  }
-  arg1 = reinterpret_cast< HomogeneousMagneticMaterial * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Transform3D,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HomogeneousMagneticMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_scalarFresnel" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
   }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HomogeneousMagneticMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  {
+    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BasicVector3DT_double_t,  0  | 0);
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HomogeneousMaterial_scalarFresnel" "', argument " "2"" of type '" "kvector_t const""'"); 
+    }  
+    if (!argp2) {
+      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HomogeneousMaterial_scalarFresnel" "', argument " "2"" of type '" "kvector_t const""'");
+    } else {
+      kvector_t * temp = reinterpret_cast< kvector_t * >(argp2);
+      arg2 = *temp;
+      if (SWIG_IsNewObj(res2)) delete temp;
+    }
   }
-  arg2 = reinterpret_cast< Transform3D * >(argp2);
-  result = (IMaterial *)((HomogeneousMagneticMaterial const *)arg1)->createTransformedMaterial((Transform3D const &)*arg2);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
+  ecode3 = SWIG_AsVal_double(obj2, &val3);
+  if (!SWIG_IsOK(ecode3)) {
+    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HomogeneousMaterial_scalarFresnel" "', argument " "3"" of type '" "double""'");
+  } 
+  arg3 = static_cast< double >(val3);
+  result = ((HomogeneousMaterial const *)arg1)->scalarFresnel(arg2,arg3);
+  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *_wrap_delete_HomogeneousMagneticMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_HomogeneousMaterial_createTransformedMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  HomogeneousMagneticMaterial *arg1 = (HomogeneousMagneticMaterial *) 0 ;
+  HomogeneousMaterial *arg1 = (HomogeneousMaterial *) 0 ;
+  Transform3D *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
   PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  HomogeneousMaterial *result = 0 ;
   
-  if (!PyArg_ParseTuple(args,(char *)"O:delete_HomogeneousMagneticMaterial",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMagneticMaterial, SWIG_POINTER_DISOWN |  0 );
+  if (!PyArg_ParseTuple(args,(char *)"OO:HomogeneousMaterial_createTransformedMaterial",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HomogeneousMagneticMaterial" "', argument " "1"" of type '" "HomogeneousMagneticMaterial *""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HomogeneousMaterial_createTransformedMaterial" "', argument " "1"" of type '" "HomogeneousMaterial const *""'"); 
   }
-  arg1 = reinterpret_cast< HomogeneousMagneticMaterial * >(argp1);
-  delete arg1;
-  resultobj = SWIG_Py_Void();
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Transform3D,  0  | 0);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HomogeneousMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HomogeneousMaterial_createTransformedMaterial" "', argument " "2"" of type '" "Transform3D const &""'"); 
+  }
+  arg2 = reinterpret_cast< Transform3D * >(argp2);
+  result = (HomogeneousMaterial *)((HomogeneousMaterial const *)arg1)->createTransformedMaterial((Transform3D const &)*arg2);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   return resultobj;
 fail:
   return NULL;
 }
 
 
-SWIGINTERN PyObject *HomogeneousMagneticMaterial_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *HomogeneousMaterial_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_HomogeneousMagneticMaterial, SWIG_NewClientData(obj));
+  SWIG_TypeNewClientData(SWIGTYPE_p_HomogeneousMaterial, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
 
@@ -93555,7 +93241,7 @@ SWIGINTERN PyObject *HexagonalLattice_swigregister(PyObject *SWIGUNUSEDPARM(self
 
 SWIGINTERN PyObject *_wrap_new_Layer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IMaterial *arg1 = 0 ;
+  HomogeneousMaterial *arg1 = 0 ;
   double arg2 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -93566,20 +93252,20 @@ SWIGINTERN PyObject *_wrap_new_Layer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO
   Layer *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:new_Layer",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IMaterial,  0  | 0);
+  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Layer" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Layer" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Layer" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Layer" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
   ecode2 = SWIG_AsVal_double(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Layer" "', argument " "2"" of type '" "double""'");
   } 
   arg2 = static_cast< double >(val2);
-  result = (Layer *)new Layer((IMaterial const &)*arg1,arg2);
+  result = (Layer *)new Layer((HomogeneousMaterial const &)*arg1,arg2);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Layer, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -93589,22 +93275,22 @@ fail:
 
 SWIGINTERN PyObject *_wrap_new_Layer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IMaterial *arg1 = 0 ;
+  HomogeneousMaterial *arg1 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
   Layer *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:new_Layer",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IMaterial,  0  | 0);
+  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Layer" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Layer" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Layer" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Layer" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  result = (Layer *)new Layer((IMaterial const &)*arg1);
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = (Layer *)new Layer((HomogeneousMaterial const &)*arg1);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Layer, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -93626,7 +93312,7 @@ SWIGINTERN PyObject *_wrap_new_Layer(PyObject *self, PyObject *args) {
   }
   if (argc == 1) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IMaterial, 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_HomogeneousMaterial, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       return _wrap_new_Layer__SWIG_1(self, args);
@@ -93634,7 +93320,7 @@ SWIGINTERN PyObject *_wrap_new_Layer(PyObject *self, PyObject *args) {
   }
   if (argc == 2) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IMaterial, 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_HomogeneousMaterial, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       {
@@ -93650,8 +93336,8 @@ SWIGINTERN PyObject *_wrap_new_Layer(PyObject *self, PyObject *args) {
 fail:
   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Layer'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    Layer::Layer(IMaterial const &,double)\n"
-    "    Layer::Layer(IMaterial const &)\n");
+    "    Layer::Layer(HomogeneousMaterial const &,double)\n"
+    "    Layer::Layer(HomogeneousMaterial const &)\n");
   return 0;
 }
 
@@ -93806,7 +93492,7 @@ fail:
 SWIGINTERN PyObject *_wrap_Layer_setMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   Layer *arg1 = (Layer *) 0 ;
-  IMaterial *arg2 = 0 ;
+  HomogeneousMaterial *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -93820,15 +93506,15 @@ SWIGINTERN PyObject *_wrap_Layer_setMaterial(PyObject *SWIGUNUSEDPARM(self), PyO
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_setMaterial" "', argument " "1"" of type '" "Layer *""'"); 
   }
   arg1 = reinterpret_cast< Layer * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_setMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_setMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Layer_setMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Layer_setMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
-  (arg1)->setMaterial((IMaterial const &)*arg2);
+  arg2 = reinterpret_cast< HomogeneousMaterial * >(argp2);
+  (arg1)->setMaterial((HomogeneousMaterial const &)*arg2);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -93842,7 +93528,7 @@ SWIGINTERN PyObject *_wrap_Layer_material(PyObject *SWIGUNUSEDPARM(self), PyObje
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
-  IMaterial *result = 0 ;
+  HomogeneousMaterial *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:Layer_material",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Layer, 0 |  0 );
@@ -93850,8 +93536,8 @@ SWIGINTERN PyObject *_wrap_Layer_material(PyObject *SWIGUNUSEDPARM(self), PyObje
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_material" "', argument " "1"" of type '" "Layer const *""'"); 
   }
   arg1 = reinterpret_cast< Layer * >(argp1);
-  result = (IMaterial *)((Layer const *)arg1)->material();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
+  result = (HomogeneousMaterial *)((Layer const *)arg1)->material();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -102190,22 +101876,22 @@ fail:
 
 SWIGINTERN PyObject *_wrap_new_Particle__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IMaterial *arg1 = 0 ;
+  HomogeneousMaterial *arg1 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
   Particle *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:new_Particle",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IMaterial,  0  | 0);
+  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Particle" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Particle" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
-  result = (Particle *)new Particle((IMaterial const &)*arg1);
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
+  result = (Particle *)new Particle((HomogeneousMaterial const &)*arg1);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Particle, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -102215,7 +101901,7 @@ fail:
 
 SWIGINTERN PyObject *_wrap_new_Particle__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IMaterial *arg1 = 0 ;
+  HomogeneousMaterial *arg1 = 0 ;
   IFormFactor *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
@@ -102226,14 +101912,14 @@ SWIGINTERN PyObject *_wrap_new_Particle__SWIG_2(PyObject *SWIGUNUSEDPARM(self),
   Particle *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:new_Particle",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IMaterial,  0  | 0);
+  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Particle" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Particle" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
   res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IFormFactor,  0  | 0);
   if (!SWIG_IsOK(res2)) {
     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Particle" "', argument " "2"" of type '" "IFormFactor const &""'"); 
@@ -102242,7 +101928,7 @@ SWIGINTERN PyObject *_wrap_new_Particle__SWIG_2(PyObject *SWIGUNUSEDPARM(self),
     SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "2"" of type '" "IFormFactor const &""'"); 
   }
   arg2 = reinterpret_cast< IFormFactor * >(argp2);
-  result = (Particle *)new Particle((IMaterial const &)*arg1,(IFormFactor const &)*arg2);
+  result = (Particle *)new Particle((HomogeneousMaterial const &)*arg1,(IFormFactor const &)*arg2);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Particle, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -102252,7 +101938,7 @@ fail:
 
 SWIGINTERN PyObject *_wrap_new_Particle__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
-  IMaterial *arg1 = 0 ;
+  HomogeneousMaterial *arg1 = 0 ;
   IFormFactor *arg2 = 0 ;
   IRotation *arg3 = 0 ;
   void *argp1 = 0 ;
@@ -102267,14 +101953,14 @@ SWIGINTERN PyObject *_wrap_new_Particle__SWIG_3(PyObject *SWIGUNUSEDPARM(self),
   Particle *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OOO:new_Particle",&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IMaterial,  0  | 0);
+  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Particle" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Particle" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp1) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "1"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "1"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg1 = reinterpret_cast< IMaterial * >(argp1);
+  arg1 = reinterpret_cast< HomogeneousMaterial * >(argp1);
   res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IFormFactor,  0  | 0);
   if (!SWIG_IsOK(res2)) {
     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Particle" "', argument " "2"" of type '" "IFormFactor const &""'"); 
@@ -102291,7 +101977,7 @@ SWIGINTERN PyObject *_wrap_new_Particle__SWIG_3(PyObject *SWIGUNUSEDPARM(self),
     SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Particle" "', argument " "3"" of type '" "IRotation const &""'"); 
   }
   arg3 = reinterpret_cast< IRotation * >(argp3);
-  result = (Particle *)new Particle((IMaterial const &)*arg1,(IFormFactor const &)*arg2,(IRotation const &)*arg3);
+  result = (Particle *)new Particle((HomogeneousMaterial const &)*arg1,(IFormFactor const &)*arg2,(IRotation const &)*arg3);
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Particle, SWIG_POINTER_NEW |  0 );
   return resultobj;
 fail:
@@ -102316,7 +102002,7 @@ SWIGINTERN PyObject *_wrap_new_Particle(PyObject *self, PyObject *args) {
   }
   if (argc == 1) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IMaterial, 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_HomogeneousMaterial, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       return _wrap_new_Particle__SWIG_1(self, args);
@@ -102324,7 +102010,7 @@ SWIGINTERN PyObject *_wrap_new_Particle(PyObject *self, PyObject *args) {
   }
   if (argc == 2) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IMaterial, 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_HomogeneousMaterial, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IFormFactor, 0);
@@ -102336,7 +102022,7 @@ SWIGINTERN PyObject *_wrap_new_Particle(PyObject *self, PyObject *args) {
   }
   if (argc == 3) {
     int _v;
-    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IMaterial, 0);
+    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_HomogeneousMaterial, 0);
     _v = SWIG_CheckState(res);
     if (_v) {
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IFormFactor, 0);
@@ -102355,9 +102041,9 @@ fail:
   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Particle'.\n"
     "  Possible C/C++ prototypes are:\n"
     "    Particle::Particle()\n"
-    "    Particle::Particle(IMaterial const &)\n"
-    "    Particle::Particle(IMaterial const &,IFormFactor const &)\n"
-    "    Particle::Particle(IMaterial const &,IFormFactor const &,IRotation const &)\n");
+    "    Particle::Particle(HomogeneousMaterial const &)\n"
+    "    Particle::Particle(HomogeneousMaterial const &,IFormFactor const &)\n"
+    "    Particle::Particle(HomogeneousMaterial const &,IFormFactor const &,IRotation const &)\n");
   return 0;
 }
 
@@ -102485,7 +102171,7 @@ fail:
 SWIGINTERN PyObject *_wrap_Particle_setMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   Particle *arg1 = (Particle *) 0 ;
-  IMaterial *arg2 = 0 ;
+  HomogeneousMaterial *arg2 = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
@@ -102499,15 +102185,15 @@ SWIGINTERN PyObject *_wrap_Particle_setMaterial(PyObject *SWIGUNUSEDPARM(self),
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Particle_setMaterial" "', argument " "1"" of type '" "Particle *""'"); 
   }
   arg1 = reinterpret_cast< Particle * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IMaterial,  0  | 0);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_HomogeneousMaterial,  0  | 0);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Particle_setMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Particle_setMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
   if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Particle_setMaterial" "', argument " "2"" of type '" "IMaterial const &""'"); 
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Particle_setMaterial" "', argument " "2"" of type '" "HomogeneousMaterial const &""'"); 
   }
-  arg2 = reinterpret_cast< IMaterial * >(argp2);
-  (arg1)->setMaterial((IMaterial const &)*arg2);
+  arg2 = reinterpret_cast< HomogeneousMaterial * >(argp2);
+  (arg1)->setMaterial((HomogeneousMaterial const &)*arg2);
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -102521,7 +102207,7 @@ SWIGINTERN PyObject *_wrap_Particle_material(PyObject *SWIGUNUSEDPARM(self), PyO
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
-  IMaterial *result = 0 ;
+  HomogeneousMaterial *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:Particle_material",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Particle, 0 |  0 );
@@ -102529,8 +102215,8 @@ SWIGINTERN PyObject *_wrap_Particle_material(PyObject *SWIGUNUSEDPARM(self), PyO
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Particle_material" "', argument " "1"" of type '" "Particle const *""'"); 
   }
   arg1 = reinterpret_cast< Particle * >(argp1);
-  result = (IMaterial *)((Particle const *)arg1)->material();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMaterial, 0 |  0 );
+  result = (HomogeneousMaterial *)((Particle const *)arg1)->material();
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HomogeneousMaterial, 0 |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -111304,25 +110990,25 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"ISample_material", _wrap_ISample_material, METH_VARARGS, (char *)"\n"
-		"ISample_material(ISample self) -> IMaterial\n"
+		"ISample_material(ISample self) -> HomogeneousMaterial\n"
 		"\n"
-		"virtual const IMaterial* ISample::material() const\n"
+		"virtual const HomogeneousMaterial* ISample::material() const\n"
 		"\n"
 		"Returns nullptr, unless overwritten to return a specific material. \n"
 		"\n"
 		""},
 	 { (char *)"ISample_getAmbientMaterial", _wrap_ISample_getAmbientMaterial, METH_VARARGS, (char *)"\n"
-		"ISample_getAmbientMaterial(ISample self) -> IMaterial\n"
+		"ISample_getAmbientMaterial(ISample self) -> HomogeneousMaterial\n"
 		"\n"
-		"virtual const IMaterial* ISample::getAmbientMaterial() const\n"
+		"virtual const HomogeneousMaterial* ISample::getAmbientMaterial() const\n"
 		"\n"
 		"Returns nullptr, unless overwritten to return a specific material. \n"
 		"\n"
 		""},
 	 { (char *)"ISample_containedMaterials", _wrap_ISample_containedMaterials, METH_VARARGS, (char *)"\n"
-		"ISample_containedMaterials(ISample self) -> std::vector< IMaterial const *,std::allocator< IMaterial const * > >\n"
+		"ISample_containedMaterials(ISample self) -> std::vector< HomogeneousMaterial const *,std::allocator< HomogeneousMaterial const * > >\n"
 		"\n"
-		"std::vector< const IMaterial * > ISample::containedMaterials() const\n"
+		"std::vector< const HomogeneousMaterial * > ISample::containedMaterials() const\n"
 		"\n"
 		"Returns set of unique materials contained in this  ISample. \n"
 		"\n"
@@ -114482,9 +114168,9 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"IFormFactor_setAmbientMaterial", _wrap_IFormFactor_setAmbientMaterial, METH_VARARGS, (char *)"\n"
-		"IFormFactor_setAmbientMaterial(IFormFactor self, IMaterial arg0)\n"
+		"IFormFactor_setAmbientMaterial(IFormFactor self, HomogeneousMaterial arg0)\n"
 		"\n"
-		"virtual void IFormFactor::setAmbientMaterial(const IMaterial &)=0\n"
+		"virtual void IFormFactor::setAmbientMaterial(const HomogeneousMaterial &)=0\n"
 		"\n"
 		"Passes the refractive index of the ambient material in which this particle is embedded. \n"
 		"\n"
@@ -114642,9 +114328,9 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"IFormFactorBorn_setAmbientMaterial", _wrap_IFormFactorBorn_setAmbientMaterial, METH_VARARGS, (char *)"\n"
-		"IFormFactorBorn_setAmbientMaterial(IFormFactorBorn self, IMaterial arg0)\n"
+		"IFormFactorBorn_setAmbientMaterial(IFormFactorBorn self, HomogeneousMaterial arg0)\n"
 		"\n"
-		"void IFormFactorBorn::setAmbientMaterial(const IMaterial &) override\n"
+		"void IFormFactorBorn::setAmbientMaterial(const HomogeneousMaterial &) override\n"
 		"\n"
 		"Passes the refractive index of the ambient material in which this particle is embedded. \n"
 		"\n"
@@ -114726,9 +114412,9 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"IFormFactorDecorator_setAmbientMaterial", _wrap_IFormFactorDecorator_setAmbientMaterial, METH_VARARGS, (char *)"\n"
-		"IFormFactorDecorator_setAmbientMaterial(IFormFactorDecorator self, IMaterial material)\n"
+		"IFormFactorDecorator_setAmbientMaterial(IFormFactorDecorator self, HomogeneousMaterial material)\n"
 		"\n"
-		"void IFormFactorDecorator::setAmbientMaterial(const IMaterial &material) override\n"
+		"void IFormFactorDecorator::setAmbientMaterial(const HomogeneousMaterial &material) override\n"
 		"\n"
 		"Passes the refractive index of the ambient material in which this particle is embedded. \n"
 		"\n"
@@ -115310,9 +114996,9 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"FormFactorCrystal_setAmbientMaterial", _wrap_FormFactorCrystal_setAmbientMaterial, METH_VARARGS, (char *)"\n"
-		"FormFactorCrystal_setAmbientMaterial(FormFactorCrystal self, IMaterial material)\n"
+		"FormFactorCrystal_setAmbientMaterial(FormFactorCrystal self, HomogeneousMaterial material)\n"
 		"\n"
-		"void FormFactorCrystal::setAmbientMaterial(const IMaterial &material) override\n"
+		"void FormFactorCrystal::setAmbientMaterial(const HomogeneousMaterial &material) override\n"
 		"\n"
 		"Passes the refractive index of the ambient material in which this particle is embedded. \n"
 		"\n"
@@ -117095,9 +116781,9 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"FormFactorWeighted_setAmbientMaterial", _wrap_FormFactorWeighted_setAmbientMaterial, METH_VARARGS, (char *)"\n"
-		"FormFactorWeighted_setAmbientMaterial(FormFactorWeighted self, IMaterial material)\n"
+		"FormFactorWeighted_setAmbientMaterial(FormFactorWeighted self, HomogeneousMaterial material)\n"
 		"\n"
-		"void FormFactorWeighted::setAmbientMaterial(const IMaterial &material) overridefinal\n"
+		"void FormFactorWeighted::setAmbientMaterial(const HomogeneousMaterial &material) overridefinal\n"
 		"\n"
 		"Passes the refractive index of the ambient material in which this particle is embedded. \n"
 		"\n"
@@ -118086,75 +117772,13 @@ static PyMethodDef SwigMethods[] = {
 	 { (char *)"Histogram2D_dynamicCast", _wrap_Histogram2D_dynamicCast, METH_VARARGS, (char *)"Histogram2D_dynamicCast(IHistogram pHistogram) -> Histogram2D"},
 	 { (char *)"delete_Histogram2D", _wrap_delete_Histogram2D, METH_VARARGS, (char *)"delete_Histogram2D(Histogram2D self)"},
 	 { (char *)"Histogram2D_swigregister", Histogram2D_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_IMaterial", _wrap_delete_IMaterial, METH_VARARGS, (char *)"\n"
-		"delete_IMaterial(IMaterial self)\n"
-		"\n"
-		"virtual IMaterial::~IMaterial()\n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_clone", _wrap_IMaterial_clone, METH_VARARGS, (char *)"\n"
-		"IMaterial_clone(IMaterial self) -> IMaterial\n"
-		"\n"
-		"virtual IMaterial* IMaterial::clone() const =0\n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_cloneInverted", _wrap_IMaterial_cloneInverted, METH_VARARGS, (char *)"\n"
-		"IMaterial_cloneInverted(IMaterial self) -> IMaterial\n"
-		"\n"
-		"virtual IMaterial* IMaterial::cloneInverted() const =0\n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_isScalarMaterial", _wrap_IMaterial_isScalarMaterial, METH_VARARGS, (char *)"\n"
-		"IMaterial_isScalarMaterial(IMaterial self) -> bool\n"
-		"\n"
-		"virtual bool IMaterial::isScalarMaterial() const\n"
-		"\n"
-		"Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally \n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_isMagneticMaterial", _wrap_IMaterial_isMagneticMaterial, METH_VARARGS, (char *)"\n"
-		"IMaterial_isMagneticMaterial(IMaterial self) -> bool\n"
-		"\n"
-		"bool IMaterial::isMagneticMaterial() const \n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_refractiveIndex", _wrap_IMaterial_refractiveIndex, METH_VARARGS, (char *)"\n"
-		"IMaterial_refractiveIndex(IMaterial self) -> complex_t\n"
-		"\n"
-		"virtual complex_t IMaterial::refractiveIndex() const \n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_scalarSLD", _wrap_IMaterial_scalarSLD, METH_VARARGS, (char *)"\n"
-		"IMaterial_scalarSLD(IMaterial self, WavevectorInfo wavevectors) -> complex_t\n"
-		"\n"
-		"complex_t IMaterial::scalarSLD(const WavevectorInfo &wavevectors) const\n"
-		"\n"
-		"Returns true if *this agrees with other in all parameters. \n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_scalarFresnel", _wrap_IMaterial_scalarFresnel, METH_VARARGS, (char *)"\n"
-		"IMaterial_scalarFresnel(IMaterial self, kvector_t k, double n_ref) -> complex_t\n"
-		"\n"
-		"complex_t IMaterial::scalarFresnel(const kvector_t k, double n_ref) const\n"
-		"\n"
-		"Return the potential term that is used in the one-dimensional Fresnel calculations. \n"
-		"\n"
-		""},
-	 { (char *)"IMaterial_createTransformedMaterial", _wrap_IMaterial_createTransformedMaterial, METH_VARARGS, (char *)"\n"
-		"IMaterial_createTransformedMaterial(IMaterial self, Transform3D const & transform) -> IMaterial\n"
-		"\n"
-		"virtual const IMaterial* IMaterial::createTransformedMaterial(const Transform3D &transform) const =0\n"
-		"\n"
-		"Create a new material that is transformed with respect to this one. \n"
-		"\n"
-		""},
-	 { (char *)"IMaterial___eq__", _wrap_IMaterial___eq__, METH_VARARGS, (char *)"IMaterial___eq__(IMaterial self, IMaterial other) -> bool"},
-	 { (char *)"IMaterial_swigregister", IMaterial_swigregister, METH_VARARGS, NULL},
 	 { (char *)"new_HomogeneousMaterial", _wrap_new_HomogeneousMaterial, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial(std::string const & name, complex_t const refractive_index, kvector_t magnetic_field)\n"
 		"HomogeneousMaterial(std::string const & name, complex_t const refractive_index)\n"
+		"HomogeneousMaterial(std::string const & name, double refractive_index_delta, double refractive_index_beta, kvector_t magnetic_field)\n"
 		"new_HomogeneousMaterial(std::string const & name, double refractive_index_delta, double refractive_index_beta) -> HomogeneousMaterial\n"
 		"\n"
-		"HomogeneousMaterial::HomogeneousMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta)\n"
+		"HomogeneousMaterial::HomogeneousMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta, const kvector_t magnetic_field=kvector_t())\n"
 		"\n"
 		"Constructs a material with  name and refractive_index parameters delta and beta (n = 1 - delta + i*beta). \n"
 		"\n"
@@ -118168,19 +117792,19 @@ static PyMethodDef SwigMethods[] = {
 	 { (char *)"HomogeneousMaterial_clone", _wrap_HomogeneousMaterial_clone, METH_VARARGS, (char *)"\n"
 		"HomogeneousMaterial_clone(HomogeneousMaterial self) -> HomogeneousMaterial\n"
 		"\n"
-		"HomogeneousMaterial * HomogeneousMaterial::clone() const override\n"
+		"HomogeneousMaterial * HomogeneousMaterial::clone() const \n"
 		"\n"
 		""},
 	 { (char *)"HomogeneousMaterial_cloneInverted", _wrap_HomogeneousMaterial_cloneInverted, METH_VARARGS, (char *)"\n"
 		"HomogeneousMaterial_cloneInverted(HomogeneousMaterial self) -> HomogeneousMaterial\n"
 		"\n"
-		"HomogeneousMaterial * HomogeneousMaterial::cloneInverted() const override\n"
+		"HomogeneousMaterial * HomogeneousMaterial::cloneInverted() const \n"
 		"\n"
 		""},
 	 { (char *)"HomogeneousMaterial_refractiveIndex", _wrap_HomogeneousMaterial_refractiveIndex, METH_VARARGS, (char *)"\n"
 		"HomogeneousMaterial_refractiveIndex(HomogeneousMaterial self) -> complex_t\n"
 		"\n"
-		"complex_t HomogeneousMaterial::refractiveIndex() const override\n"
+		"complex_t HomogeneousMaterial::refractiveIndex() const \n"
 		"\n"
 		""},
 	 { (char *)"HomogeneousMaterial_setRefractiveIndex", _wrap_HomogeneousMaterial_setRefractiveIndex, METH_VARARGS, (char *)"\n"
@@ -118189,70 +117813,57 @@ static PyMethodDef SwigMethods[] = {
 		"void HomogeneousMaterial::setRefractiveIndex(const complex_t refractive_index)\n"
 		"\n"
 		""},
-	 { (char *)"HomogeneousMaterial_createTransformedMaterial", _wrap_HomogeneousMaterial_createTransformedMaterial, METH_VARARGS, (char *)"\n"
-		"HomogeneousMaterial_createTransformedMaterial(HomogeneousMaterial self, Transform3D const & transform) -> IMaterial\n"
+	 { (char *)"HomogeneousMaterial_isScalarMaterial", _wrap_HomogeneousMaterial_isScalarMaterial, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial_isScalarMaterial(HomogeneousMaterial self) -> bool\n"
 		"\n"
-		"const IMaterial * HomogeneousMaterial::createTransformedMaterial(const Transform3D &transform) const override\n"
+		"bool HomogeneousMaterial::isScalarMaterial() const\n"
 		"\n"
-		"Create a new material that is transformed with respect to this one. \n"
+		"Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally \n"
 		"\n"
 		""},
-	 { (char *)"HomogeneousMaterial_swigregister", HomogeneousMaterial_swigregister, METH_VARARGS, NULL},
-	 { (char *)"new_HomogeneousMagneticMaterial", _wrap_new_HomogeneousMagneticMaterial, METH_VARARGS, (char *)"\n"
-		"HomogeneousMagneticMaterial(std::string const & name, complex_t const refractive_index, kvector_t magnetic_field)\n"
-		"new_HomogeneousMagneticMaterial(std::string const & name, double refractive_index_delta, double refractive_index_beta, kvector_t magnetic_field) -> HomogeneousMagneticMaterial\n"
-		"\n"
-		"HomogeneousMagneticMaterial::HomogeneousMagneticMaterial(const std::string &name, double refractive_index_delta, double refractive_index_beta, const kvector_t magnetic_field)\n"
+	 { (char *)"HomogeneousMaterial_isMagneticMaterial", _wrap_HomogeneousMaterial_isMagneticMaterial, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial_isMagneticMaterial(HomogeneousMaterial self) -> bool\n"
 		"\n"
-		"Constructs a material with  name, refractive_index parameters and  magnetic_field\n"
+		"bool HomogeneousMaterial::isMagneticMaterial() const \n"
 		"\n"
 		""},
-	 { (char *)"HomogeneousMagneticMaterial_clone", _wrap_HomogeneousMagneticMaterial_clone, METH_VARARGS, (char *)"\n"
-		"HomogeneousMagneticMaterial_clone(HomogeneousMagneticMaterial self) -> HomogeneousMagneticMaterial\n"
+	 { (char *)"HomogeneousMaterial_magneticField", _wrap_HomogeneousMaterial_magneticField, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial_magneticField(HomogeneousMaterial self) -> kvector_t\n"
 		"\n"
-		"HomogeneousMagneticMaterial * HomogeneousMagneticMaterial::clone() const final\n"
+		"kvector_t HomogeneousMaterial::magneticField() const\n"
 		"\n"
-		""},
-	 { (char *)"HomogeneousMagneticMaterial_cloneInverted", _wrap_HomogeneousMagneticMaterial_cloneInverted, METH_VARARGS, (char *)"\n"
-		"HomogeneousMagneticMaterial_cloneInverted(HomogeneousMagneticMaterial self) -> HomogeneousMagneticMaterial\n"
-		"\n"
-		"HomogeneousMagneticMaterial * HomogeneousMagneticMaterial::cloneInverted() const final\n"
+		"Get the magnetic field (in Tesla) \n"
 		"\n"
 		""},
-	 { (char *)"HomogeneousMagneticMaterial_magneticField", _wrap_HomogeneousMagneticMaterial_magneticField, METH_VARARGS, (char *)"\n"
-		"HomogeneousMagneticMaterial_magneticField(HomogeneousMagneticMaterial self) -> kvector_t\n"
+	 { (char *)"HomogeneousMaterial_setMagneticField", _wrap_HomogeneousMaterial_setMagneticField, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial_setMagneticField(HomogeneousMaterial self, kvector_t magnetic_field)\n"
 		"\n"
-		"kvector_t HomogeneousMagneticMaterial::magneticField() const\n"
+		"void HomogeneousMaterial::setMagneticField(const kvector_t magnetic_field)\n"
 		"\n"
-		"Get the magnetic field (in Tesla) \n"
+		"Set the magnetic field (in Tesla) \n"
 		"\n"
 		""},
-	 { (char *)"HomogeneousMagneticMaterial_setMagneticField", _wrap_HomogeneousMagneticMaterial_setMagneticField, METH_VARARGS, (char *)"\n"
-		"HomogeneousMagneticMaterial_setMagneticField(HomogeneousMagneticMaterial self, kvector_t magnetic_field)\n"
+	 { (char *)"HomogeneousMaterial_scalarSLD", _wrap_HomogeneousMaterial_scalarSLD, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial_scalarSLD(HomogeneousMaterial self, WavevectorInfo wavevectors) -> complex_t\n"
 		"\n"
-		"void HomogeneousMagneticMaterial::setMagneticField(const kvector_t magnetic_field)\n"
-		"\n"
-		"Set the magnetic field (in Tesla) \n"
+		"complex_t HomogeneousMaterial::scalarSLD(const WavevectorInfo &wavevectors) const \n"
 		"\n"
 		""},
-	 { (char *)"HomogeneousMagneticMaterial_isScalarMaterial", _wrap_HomogeneousMagneticMaterial_isScalarMaterial, METH_VARARGS, (char *)"\n"
-		"HomogeneousMagneticMaterial_isScalarMaterial(HomogeneousMagneticMaterial self) -> bool\n"
+	 { (char *)"HomogeneousMaterial_scalarFresnel", _wrap_HomogeneousMaterial_scalarFresnel, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial_scalarFresnel(HomogeneousMaterial self, kvector_t k, double n_ref) -> complex_t\n"
 		"\n"
-		"bool HomogeneousMagneticMaterial::isScalarMaterial() const final\n"
+		"complex_t HomogeneousMaterial::scalarFresnel(const kvector_t k, double n_ref) const\n"
 		"\n"
-		"Indicates whether the interaction with the material is scalar. This means that different polarization states will be diffracted equally \n"
+		"Return the potential term that is used in the one-dimensional Fresnel calculations. \n"
 		"\n"
 		""},
-	 { (char *)"HomogeneousMagneticMaterial_createTransformedMaterial", _wrap_HomogeneousMagneticMaterial_createTransformedMaterial, METH_VARARGS, (char *)"\n"
-		"HomogeneousMagneticMaterial_createTransformedMaterial(HomogeneousMagneticMaterial self, Transform3D const & transform) -> IMaterial\n"
-		"\n"
-		"const IMaterial * HomogeneousMagneticMaterial::createTransformedMaterial(const Transform3D &transform) const final\n"
+	 { (char *)"HomogeneousMaterial_createTransformedMaterial", _wrap_HomogeneousMaterial_createTransformedMaterial, METH_VARARGS, (char *)"\n"
+		"HomogeneousMaterial_createTransformedMaterial(HomogeneousMaterial self, Transform3D const & transform) -> HomogeneousMaterial\n"
 		"\n"
-		"Create a new material that is transformed with respect to this one. \n"
+		"const HomogeneousMaterial * HomogeneousMaterial::createTransformedMaterial(const Transform3D &transform) const \n"
 		"\n"
 		""},
-	 { (char *)"delete_HomogeneousMagneticMaterial", _wrap_delete_HomogeneousMagneticMaterial, METH_VARARGS, (char *)"delete_HomogeneousMagneticMaterial(HomogeneousMagneticMaterial self)"},
-	 { (char *)"HomogeneousMagneticMaterial_swigregister", HomogeneousMagneticMaterial_swigregister, METH_VARARGS, NULL},
+	 { (char *)"HomogeneousMaterial_swigregister", HomogeneousMaterial_swigregister, METH_VARARGS, NULL},
 	 { (char *)"IDetector2D_clone", _wrap_IDetector2D_clone, METH_VARARGS, (char *)"\n"
 		"IDetector2D_clone(IDetector2D self) -> IDetector2D\n"
 		"\n"
@@ -120359,10 +119970,10 @@ static PyMethodDef SwigMethods[] = {
 	 { (char *)"delete_HexagonalLattice", _wrap_delete_HexagonalLattice, METH_VARARGS, (char *)"delete_HexagonalLattice(HexagonalLattice self)"},
 	 { (char *)"HexagonalLattice_swigregister", HexagonalLattice_swigregister, METH_VARARGS, NULL},
 	 { (char *)"new_Layer", _wrap_new_Layer, METH_VARARGS, (char *)"\n"
-		"Layer(IMaterial material, double thickness=0)\n"
-		"new_Layer(IMaterial material) -> Layer\n"
+		"Layer(HomogeneousMaterial material, double thickness=0)\n"
+		"new_Layer(HomogeneousMaterial material) -> Layer\n"
 		"\n"
-		"Layer::Layer(const IMaterial &material, double thickness=0)\n"
+		"Layer::Layer(const HomogeneousMaterial &material, double thickness=0)\n"
 		"\n"
 		""},
 	 { (char *)"delete_Layer", _wrap_delete_Layer, METH_VARARGS, (char *)"\n"
@@ -120410,17 +120021,17 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"Layer_setMaterial", _wrap_Layer_setMaterial, METH_VARARGS, (char *)"\n"
-		"Layer_setMaterial(Layer self, IMaterial material)\n"
+		"Layer_setMaterial(Layer self, HomogeneousMaterial material)\n"
 		"\n"
-		"void Layer::setMaterial(const IMaterial &material)\n"
+		"void Layer::setMaterial(const HomogeneousMaterial &material)\n"
 		"\n"
 		"Sets  material of the layer. \n"
 		"\n"
 		""},
 	 { (char *)"Layer_material", _wrap_Layer_material, METH_VARARGS, (char *)"\n"
-		"Layer_material(Layer self) -> IMaterial\n"
+		"Layer_material(Layer self) -> HomogeneousMaterial\n"
 		"\n"
-		"const IMaterial* Layer::material() const\n"
+		"const HomogeneousMaterial* Layer::material() const\n"
 		"\n"
 		"Returns nullptr, unless overwritten to return a specific material. \n"
 		"\n"
@@ -121673,11 +121284,11 @@ static PyMethodDef SwigMethods[] = {
 	 { (char *)"ParameterSampleVector_swigregister", ParameterSampleVector_swigregister, METH_VARARGS, NULL},
 	 { (char *)"new_Particle", _wrap_new_Particle, METH_VARARGS, (char *)"\n"
 		"Particle()\n"
-		"Particle(IMaterial p_material)\n"
-		"Particle(IMaterial p_material, IFormFactor form_factor)\n"
-		"new_Particle(IMaterial p_material, IFormFactor form_factor, IRotation rotation) -> Particle\n"
+		"Particle(HomogeneousMaterial p_material)\n"
+		"Particle(HomogeneousMaterial p_material, IFormFactor form_factor)\n"
+		"new_Particle(HomogeneousMaterial p_material, IFormFactor form_factor, IRotation rotation) -> Particle\n"
 		"\n"
-		"Particle::Particle(const IMaterial &p_material, const IFormFactor &form_factor, const IRotation &rotation)\n"
+		"Particle::Particle(const HomogeneousMaterial &p_material, const IFormFactor &form_factor, const IRotation &rotation)\n"
 		"\n"
 		""},
 	 { (char *)"Particle_clone", _wrap_Particle_clone, METH_VARARGS, (char *)"\n"
@@ -121713,15 +121324,15 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		""},
 	 { (char *)"Particle_setMaterial", _wrap_Particle_setMaterial, METH_VARARGS, (char *)"\n"
-		"Particle_setMaterial(Particle self, IMaterial material)\n"
+		"Particle_setMaterial(Particle self, HomogeneousMaterial material)\n"
 		"\n"
-		"void Particle::setMaterial(const IMaterial &material)\n"
+		"void Particle::setMaterial(const HomogeneousMaterial &material)\n"
 		"\n"
 		""},
 	 { (char *)"Particle_material", _wrap_Particle_material, METH_VARARGS, (char *)"\n"
-		"Particle_material(Particle self) -> IMaterial\n"
+		"Particle_material(Particle self) -> HomogeneousMaterial\n"
 		"\n"
-		"const IMaterial* Particle::material() const overridefinal\n"
+		"const HomogeneousMaterial* Particle::material() const overridefinal\n"
 		"\n"
 		"Returns nullptr, unless overwritten to return a specific material. \n"
 		"\n"
@@ -123790,15 +123401,6 @@ static void *_p_FTDistribution1DTriangleTo_p_ICloneable(void *x, int *SWIGUNUSED
 static void *_p_RotationEulerTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *) (ISample *)(IRotation *) ((RotationEuler *) x));
 }
-static void *_p_HomogeneousMaterialTo_p_IMaterial(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IMaterial *)  ((HomogeneousMaterial *) x));
-}
-static void *_p_HomogeneousMagneticMaterialTo_p_IMaterial(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((IMaterial *) (HomogeneousMaterial *) ((HomogeneousMagneticMaterial *) x));
-}
-static void *_p_HomogeneousMagneticMaterialTo_p_HomogeneousMaterial(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((HomogeneousMaterial *)  ((HomogeneousMagneticMaterial *) x));
-}
 static void *_p_FormFactorBoxTo_p_INamed(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INamed *) (IParameterized *)(INode *)(ISample *)(IFormFactor *)(IFormFactorBorn *) ((FormFactorBox *) x));
 }
@@ -124045,14 +123647,8 @@ static void *_p_LayerTo_p_INamed(void *x, int *SWIGUNUSEDPARM(newmemory)) {
 static void *_p_FormFactorRipple1To_p_INamed(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INamed *) (IParameterized *)(INode *)(ISample *)(IFormFactor *)(IFormFactorBorn *) ((FormFactorRipple1 *) x));
 }
-static void *_p_IMaterialTo_p_INamed(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((INamed *)  ((IMaterial *) x));
-}
 static void *_p_HomogeneousMaterialTo_p_INamed(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((INamed *) (IMaterial *) ((HomogeneousMaterial *) x));
-}
-static void *_p_HomogeneousMagneticMaterialTo_p_INamed(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((INamed *) (IMaterial *)(HomogeneousMaterial *) ((HomogeneousMagneticMaterial *) x));
+    return (void *)((INamed *)  ((HomogeneousMaterial *) x));
 }
 static void *_p_FormFactorAnisoPyramidTo_p_INamed(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((INamed *) (IParameterized *)(INode *)(ISample *)(IFormFactor *)(IFormFactorBorn *)(FormFactorPolyhedron *) ((FormFactorAnisoPyramid *) x));
@@ -125545,7 +125141,6 @@ static swig_type_info _swigt__p_GISASSimulation = {"_p_GISASSimulation", "GISASS
 static swig_type_info _swigt__p_HexagonalLattice = {"_p_HexagonalLattice", "HexagonalLattice *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Histogram1D = {"_p_Histogram1D", "Histogram1D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Histogram2D = {"_p_Histogram2D", "Histogram2D *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_HomogeneousMagneticMaterial = {"_p_HomogeneousMagneticMaterial", "HomogeneousMagneticMaterial *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_HomogeneousMaterial = {"_p_HomogeneousMaterial", "HomogeneousMaterial *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_HorizontalLine = {"_p_HorizontalLine", "HorizontalLine *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IAbstractParticle = {"_p_IAbstractParticle", "IAbstractParticle *", 0, 0, (void*)0, 0};
@@ -125574,7 +125169,6 @@ static swig_type_info _swigt__p_IIntensityNormalizer = {"_p_IIntensityNormalizer
 static swig_type_info _swigt__p_IInterferenceFunction = {"_p_IInterferenceFunction", "IInterferenceFunction *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_ILayerRTCoefficients = {"_p_ILayerRTCoefficients", "ILayerRTCoefficients *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_ILayout = {"_p_ILayout", "ILayout *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_IMaterial = {"_p_IMaterial", "IMaterial *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IMinimizer = {"_p_IMinimizer", "IMinimizer *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IMultiLayerBuilder = {"_p_IMultiLayerBuilder", "IMultiLayerBuilder *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_INamed = {"_p_INamed", "INamed *", 0, 0, (void*)0, 0};
@@ -125719,10 +125313,10 @@ static swig_type_info _swigt__p_std__vectorT_BasicVector3DT_std__complexT_double
 static swig_type_info _swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t = {"_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t", "std::vector< FitElement,std::allocator< FitElement > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator = {"_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator", "std::vector< FitElement,std::allocator< FitElement > >::const_iterator *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator = {"_p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator", "std::vector< FitElement,std::allocator< FitElement > >::iterator *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t = {"_p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t", "std::vector< HomogeneousMaterial const *,std::allocator< HomogeneousMaterial const * > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t = {"_p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t", "std::vector< IDetector2D::EAxesUnits,std::allocator< IDetector2D::EAxesUnits > > *|std::vector< enum IDetector2D::EAxesUnits,std::allocator< enum IDetector2D::EAxesUnits > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t = {"_p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t", "std::vector< IFTDistribution2D const *,std::allocator< IFTDistribution2D const * > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t = {"_p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t", "std::vector< IFormFactor *,std::allocator< IFormFactor * > > *|std::vector< IFormFactor * > *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t = {"_p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t", "std::vector< IMaterial const *,std::allocator< IMaterial const * > > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t = {"_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t", "std::vector< INode const *,std::allocator< INode const * > > *|std::vector< INode const * > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t = {"_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t", "std::vector< INode *,std::allocator< INode * > > *|std::vector< INode * > *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t = {"_p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t", "std::vector< IParticle const *,std::allocator< IParticle const * > > *", 0, 0, (void*)0, 0};
@@ -125851,7 +125445,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_HexagonalLattice,
   &_swigt__p_Histogram1D,
   &_swigt__p_Histogram2D,
-  &_swigt__p_HomogeneousMagneticMaterial,
   &_swigt__p_HomogeneousMaterial,
   &_swigt__p_HorizontalLine,
   &_swigt__p_IAbstractParticle,
@@ -125880,7 +125473,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_IInterferenceFunction,
   &_swigt__p_ILayerRTCoefficients,
   &_swigt__p_ILayout,
-  &_swigt__p_IMaterial,
   &_swigt__p_IMinimizer,
   &_swigt__p_IMultiLayerBuilder,
   &_swigt__p_INamed,
@@ -126025,10 +125617,10 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t,
   &_swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator,
   &_swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator,
+  &_swigt__p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t,
   &_swigt__p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t,
   &_swigt__p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t,
   &_swigt__p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t,
-  &_swigt__p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t,
   &_swigt__p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t,
   &_swigt__p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t,
   &_swigt__p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t,
@@ -126157,8 +125749,7 @@ static swig_cast_info _swigc__p_GISASSimulation[] = {  {&_swigt__p_GISASSimulati
 static swig_cast_info _swigc__p_HexagonalLattice[] = {  {&_swigt__p_HexagonalLattice, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Histogram1D[] = {  {&_swigt__p_Histogram1D, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_Histogram2D[] = {  {&_swigt__p_Histogram2D, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_HomogeneousMagneticMaterial[] = {  {&_swigt__p_HomogeneousMagneticMaterial, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_HomogeneousMaterial[] = {  {&_swigt__p_HomogeneousMaterial, 0, 0, 0},  {&_swigt__p_HomogeneousMagneticMaterial, _p_HomogeneousMagneticMaterialTo_p_HomogeneousMaterial, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_HomogeneousMaterial[] = {  {&_swigt__p_HomogeneousMaterial, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_HorizontalLine[] = {  {&_swigt__p_HorizontalLine, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IAbstractParticle[] = {  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_IAbstractParticle, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_IAbstractParticle, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_IAbstractParticle, 0, 0},  {&_swigt__p_IAbstractParticle, 0, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_IAbstractParticle, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_IAbstractParticle, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_IAbstractParticle, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IAxis[] = {  {&_swigt__p_IAxis, 0, 0, 0},  {&_swigt__p_VariableBinAxis, _p_VariableBinAxisTo_p_IAxis, 0, 0},  {&_swigt__p_ConstKBinAxis, _p_ConstKBinAxisTo_p_IAxis, 0, 0},  {&_swigt__p_CustomBinAxis, _p_CustomBinAxisTo_p_IAxis, 0, 0},  {&_swigt__p_FixedBinAxis, _p_FixedBinAxisTo_p_IAxis, 0, 0},{0, 0, 0, 0}};
@@ -126186,10 +125777,9 @@ static swig_cast_info _swigc__p_IIntensityNormalizer[] = {  {&_swigt__p_IIntensi
 static swig_cast_info _swigc__p_IInterferenceFunction[] = {  {&_swigt__p_IInterferenceFunction, 0, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_IInterferenceFunction, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_IInterferenceFunction, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_ILayerRTCoefficients[] = {  {&_swigt__p_ILayerRTCoefficients, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_ILayout[] = {  {&_swigt__p_ILayout, 0, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_ILayout, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_IMaterial[] = {  {&_swigt__p_IMaterial, 0, 0, 0},  {&_swigt__p_HomogeneousMaterial, _p_HomogeneousMaterialTo_p_IMaterial, 0, 0},  {&_swigt__p_HomogeneousMagneticMaterial, _p_HomogeneousMagneticMaterialTo_p_IMaterial, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IMinimizer[] = {  {&_swigt__p_IMinimizer, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IMultiLayerBuilder[] = {  {&_swigt__p_IMultiLayerBuilder, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_INamed[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_INamed, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INamed, 0, 0},  {&_swigt__p_ParameterDistribution, _p_ParameterDistributionTo_p_INamed, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_INamed, 0, 0},  {&_swigt__p_Polygon, _p_PolygonTo_p_INamed, 0, 0},  {&_swigt__p_IDetector2D, _p_IDetector2DTo_p_INamed, 0, 0},  {&_swigt__p_Ellipse, _p_EllipseTo_p_INamed, 0, 0},  {&_swigt__p_ILayout, _p_ILayoutTo_p_INamed, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_INamed, 0, 0},  {&_swigt__p_IntensityScaleAndShiftNormalizer, _p_IntensityScaleAndShiftNormalizerTo_p_INamed, 0, 0},  {&_swigt__p_IntensityNormalizer, _p_IntensityNormalizerTo_p_INamed, 0, 0},  {&_swigt__p_IIntensityNormalizer, _p_IIntensityNormalizerTo_p_INamed, 0, 0},  {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_INamed, 0, 0},  {&_swigt__p_IsGISAXSDetector, _p_IsGISAXSDetectorTo_p_INamed, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_INamed, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_INamed, 0, 0},  {&_swigt__p_INode, _p_INodeTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_INamed, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPolyhedron, _p_FormFactorPolyhedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_INamed, 0, 0},  {&_swigt__p_OffSpecSimulation, _p_OffSpecSimulationTo_p_INamed, 0, 0},  {&_swigt__p_GISASSimulation, _p_GISASSimulationTo_p_INamed, 0, 0},  {&_swigt__p_Simulation, _p_SimulationTo_p_INamed, 0, 0},  {&_swigt__p_SpecularSimulation, _p_SpecularSimulationTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_INamed, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_INamed, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_INamed, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPolygonalSurface, _p_FormFactorPolygonalSurfaceTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPolygonalPrism, _p_FormFactorPolygonalPrismTo_p_INamed, 0, 0},  {&_swigt__p_FitSuiteObjects, _p_FitSuiteObjectsTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_INamed, 0, 0},  {&_swigt__p_DistributionLogNormal, _p_DistributionLogNormalTo_p_INamed, 0, 0},  {&_swigt__p_Instrument, _p_InstrumentTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_INamed, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_INamed, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_INamed, 0, 0},  {&_swigt__p_IShape2D, _p_IShape2DTo_p_INamed, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_INamed, 0, 0},  {&_swigt__p_Rectangle, _p_RectangleTo_p_INamed, 0, 0},  {&_swigt__p_FitStrategyDefault, _p_FitStrategyDefaultTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorGauss, _p_FormFactorGaussTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple2Gauss, _p_FormFactorLongRipple2GaussTo_p_INamed, 0, 0},  {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_INamed, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_INamed, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_INamed, 0, 0},  {&_swigt__p_IClusteredParticles, _p_IClusteredParticlesTo_p_INamed, 0, 0},  {&_swigt__p_IMultiLayerBuilder, _p_IMultiLayerBuilderTo_p_INamed, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_INamed, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_INamed, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_INamed, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTrivial, _p_FormFactorTrivialTo_p_INamed, 0, 0},  {&_swigt__p_INamed, 0, 0, 0},  {&_swigt__p_DistributionGate, _p_DistributionGateTo_p_INamed, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_INamed, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_INamed, 0, 0},  {&_swigt__p_IDistribution1D, _p_IDistribution1DTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorRipple1, _p_FormFactorRipple1To_p_INamed, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_INamed, 0, 0},  {&_swigt__p_IMaterial, _p_IMaterialTo_p_INamed, 0, 0},  {&_swigt__p_HomogeneousMaterial, _p_HomogeneousMaterialTo_p_INamed, 0, 0},  {&_swigt__p_HomogeneousMagneticMaterial, _p_HomogeneousMagneticMaterialTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorDecoratorDebyeWaller, _p_FormFactorDecoratorDebyeWallerTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorRipple2, _p_FormFactorRipple2To_p_INamed, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_INamed, 0, 0},  {&_swigt__p_IParameterT_double_t, _p_IParameterT_double_tTo_p_INamed, 0, 0},  {&_swigt__p_DistributionGaussian, _p_DistributionGaussianTo_p_INamed, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_INamed, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_INamed, 0, 0},  {&_swigt__p_Line, _p_LineTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorSphereUniformRadius, _p_FormFactorSphereUniformRadiusTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_INamed, 0, 0},  {&_swigt__p_DistributionCosine, _p_DistributionCosineTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_INamed, 0, 0},  {&_swigt__p_FitObject, _p_FitObjectTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple1Gauss, _p_FormFactorLongRipple1GaussTo_p_INamed, 0, 0},  {&_swigt__p_Beam, _p_BeamTo_p_INamed, 0, 0},  {&_swigt__p_AdjustMinimizerStrategy, _p_AdjustMinimizerStrategyTo_p_INamed, 0, 0},  {&_swigt__p_IFitStrategy, _p_IFitStrategyTo_p_INamed, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_INamed, 0, 0},  {&_swigt__p_IParameterized, _p_IParameterizedTo_p_INamed, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INamed, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_INamed, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_INamed, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_INamed, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_INamed, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_INamed, 0, 0},  {&_swigt__p_RealParameter, _p_RealParameterTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLorentz, _p_FormFactorLorentzTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple2Lorentz, _p_FormFactorLongRipple2LorentzTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple1Lorentz, _p_FormFactorLongRipple1LorentzTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_INamed, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_INamed, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_INamed, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_INamed, 0, 0},  {&_swigt__p_DistributionLorentz, _p_DistributionLorentzTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_INamed, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INamed, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_INamed[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_INamed, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INamed, 0, 0},  {&_swigt__p_ParameterDistribution, _p_ParameterDistributionTo_p_INamed, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_INamed, 0, 0},  {&_swigt__p_Polygon, _p_PolygonTo_p_INamed, 0, 0},  {&_swigt__p_IDetector2D, _p_IDetector2DTo_p_INamed, 0, 0},  {&_swigt__p_Ellipse, _p_EllipseTo_p_INamed, 0, 0},  {&_swigt__p_ILayout, _p_ILayoutTo_p_INamed, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_INamed, 0, 0},  {&_swigt__p_IntensityScaleAndShiftNormalizer, _p_IntensityScaleAndShiftNormalizerTo_p_INamed, 0, 0},  {&_swigt__p_IntensityNormalizer, _p_IntensityNormalizerTo_p_INamed, 0, 0},  {&_swigt__p_IIntensityNormalizer, _p_IIntensityNormalizerTo_p_INamed, 0, 0},  {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_INamed, 0, 0},  {&_swigt__p_IsGISAXSDetector, _p_IsGISAXSDetectorTo_p_INamed, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_INamed, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_INamed, 0, 0},  {&_swigt__p_INode, _p_INodeTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_INamed, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPolyhedron, _p_FormFactorPolyhedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_INamed, 0, 0},  {&_swigt__p_OffSpecSimulation, _p_OffSpecSimulationTo_p_INamed, 0, 0},  {&_swigt__p_GISASSimulation, _p_GISASSimulationTo_p_INamed, 0, 0},  {&_swigt__p_Simulation, _p_SimulationTo_p_INamed, 0, 0},  {&_swigt__p_SpecularSimulation, _p_SpecularSimulationTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_INamed, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_INamed, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_INamed, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPolygonalSurface, _p_FormFactorPolygonalSurfaceTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPolygonalPrism, _p_FormFactorPolygonalPrismTo_p_INamed, 0, 0},  {&_swigt__p_FitSuiteObjects, _p_FitSuiteObjectsTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_INamed, 0, 0},  {&_swigt__p_DistributionLogNormal, _p_DistributionLogNormalTo_p_INamed, 0, 0},  {&_swigt__p_Instrument, _p_InstrumentTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_INamed, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_INamed, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_INamed, 0, 0},  {&_swigt__p_IShape2D, _p_IShape2DTo_p_INamed, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_INamed, 0, 0},  {&_swigt__p_Rectangle, _p_RectangleTo_p_INamed, 0, 0},  {&_swigt__p_FitStrategyDefault, _p_FitStrategyDefaultTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorGauss, _p_FormFactorGaussTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple2Gauss, _p_FormFactorLongRipple2GaussTo_p_INamed, 0, 0},  {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_INamed, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_INamed, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_INamed, 0, 0},  {&_swigt__p_IClusteredParticles, _p_IClusteredParticlesTo_p_INamed, 0, 0},  {&_swigt__p_IMultiLayerBuilder, _p_IMultiLayerBuilderTo_p_INamed, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_INamed, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_INamed, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_INamed, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorTrivial, _p_FormFactorTrivialTo_p_INamed, 0, 0},  {&_swigt__p_INamed, 0, 0, 0},  {&_swigt__p_DistributionGate, _p_DistributionGateTo_p_INamed, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_INamed, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_INamed, 0, 0},  {&_swigt__p_IDistribution1D, _p_IDistribution1DTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorRipple1, _p_FormFactorRipple1To_p_INamed, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_INamed, 0, 0},  {&_swigt__p_HomogeneousMaterial, _p_HomogeneousMaterialTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorDecoratorDebyeWaller, _p_FormFactorDecoratorDebyeWallerTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorRipple2, _p_FormFactorRipple2To_p_INamed, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_INamed, 0, 0},  {&_swigt__p_IParameterT_double_t, _p_IParameterT_double_tTo_p_INamed, 0, 0},  {&_swigt__p_DistributionGaussian, _p_DistributionGaussianTo_p_INamed, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_INamed, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_INamed, 0, 0},  {&_swigt__p_Line, _p_LineTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorSphereUniformRadius, _p_FormFactorSphereUniformRadiusTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_INamed, 0, 0},  {&_swigt__p_DistributionCosine, _p_DistributionCosineTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_INamed, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_INamed, 0, 0},  {&_swigt__p_FitObject, _p_FitObjectTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple1Gauss, _p_FormFactorLongRipple1GaussTo_p_INamed, 0, 0},  {&_swigt__p_Beam, _p_BeamTo_p_INamed, 0, 0},  {&_swigt__p_AdjustMinimizerStrategy, _p_AdjustMinimizerStrategyTo_p_INamed, 0, 0},  {&_swigt__p_IFitStrategy, _p_IFitStrategyTo_p_INamed, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_INamed, 0, 0},  {&_swigt__p_IParameterized, _p_IParameterizedTo_p_INamed, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INamed, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_INamed, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_INamed, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_INamed, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_INamed, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_INamed, 0, 0},  {&_swigt__p_RealParameter, _p_RealParameterTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLorentz, _p_FormFactorLorentzTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple2Lorentz, _p_FormFactorLongRipple2LorentzTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongRipple1Lorentz, _p_FormFactorLongRipple1LorentzTo_p_INamed, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_INamed, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_INamed, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_INamed, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_INamed, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_INamed, 0, 0},  {&_swigt__p_DistributionLorentz, _p_DistributionLorentzTo_p_INamed, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_INamed, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_INamed, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INamed, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_INode[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_INode, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INode, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_INode, 0, 0},  {&_swigt__p_IDetector2D, _p_IDetector2DTo_p_INode, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INode, 0, 0},  {&_swigt__p_ILayout, _p_ILayoutTo_p_INode, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_INode, 0, 0},  {&_swigt__p_IntensityScaleAndShiftNormalizer, _p_IntensityScaleAndShiftNormalizerTo_p_INode, 0, 0},  {&_swigt__p_IntensityNormalizer, _p_IntensityNormalizerTo_p_INode, 0, 0},  {&_swigt__p_IIntensityNormalizer, _p_IIntensityNormalizerTo_p_INode, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_INode, 0, 0},  {&_swigt__p_IsGISAXSDetector, _p_IsGISAXSDetectorTo_p_INode, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_INode, 0, 0},  {&_swigt__p_INode, 0, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_INode, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPolyhedron, _p_FormFactorPolyhedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_INode, 0, 0},  {&_swigt__p_Simulation, _p_SimulationTo_p_INode, 0, 0},  {&_swigt__p_GISASSimulation, _p_GISASSimulationTo_p_INode, 0, 0},  {&_swigt__p_OffSpecSimulation, _p_OffSpecSimulationTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_INode, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_INode, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_INode, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_INode, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPolygonalSurface, _p_FormFactorPolygonalSurfaceTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPolygonalPrism, _p_FormFactorPolygonalPrismTo_p_INode, 0, 0},  {&_swigt__p_FitSuiteObjects, _p_FitSuiteObjectsTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_INode, 0, 0},  {&_swigt__p_DistributionLogNormal, _p_DistributionLogNormalTo_p_INode, 0, 0},  {&_swigt__p_Instrument, _p_InstrumentTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_INode, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_INode, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_INode, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_INode, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_INode, 0, 0},  {&_swigt__p_FormFactorGauss, _p_FormFactorGaussTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongRipple2Gauss, _p_FormFactorLongRipple2GaussTo_p_INode, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_INode, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_INode, 0, 0},  {&_swigt__p_IClusteredParticles, _p_IClusteredParticlesTo_p_INode, 0, 0},  {&_swigt__p_IMultiLayerBuilder, _p_IMultiLayerBuilderTo_p_INode, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_INode, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_INode, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_INode, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorTrivial, _p_FormFactorTrivialTo_p_INode, 0, 0},  {&_swigt__p_DistributionGate, _p_DistributionGateTo_p_INode, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_INode, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_INode, 0, 0},  {&_swigt__p_IDistribution1D, _p_IDistribution1DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_INode, 0, 0},  {&_swigt__p_FormFactorRipple1, _p_FormFactorRipple1To_p_INode, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_INode, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_INode, 0, 0},  {&_swigt__p_FormFactorDecoratorDebyeWaller, _p_FormFactorDecoratorDebyeWallerTo_p_INode, 0, 0},  {&_swigt__p_FormFactorRipple2, _p_FormFactorRipple2To_p_INode, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_INode, 0, 0},  {&_swigt__p_DistributionGaussian, _p_DistributionGaussianTo_p_INode, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_INode, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_INode, 0, 0},  {&_swigt__p_FormFactorSphereUniformRadius, _p_FormFactorSphereUniformRadiusTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_INode, 0, 0},  {&_swigt__p_DistributionCosine, _p_DistributionCosineTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_INode, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_INode, 0, 0},  {&_swigt__p_FitObject, _p_FitObjectTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_INode, 0, 0},  {&_swigt__p_FormFactorLongRipple1Gauss, _p_FormFactorLongRipple1GaussTo_p_INode, 0, 0},  {&_swigt__p_Beam, _p_BeamTo_p_INode, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_INode, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INode, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_INode, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_INode, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_INode, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_INode, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_INode, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_INode, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLorentz, _p_FormFactorLorentzTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongRipple2Lorentz, _p_FormFactorLongRipple2LorentzTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongRipple1Lorentz, _p_FormFactorLongRipple1LorentzTo_p_INode, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_INode, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_INode, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_INode, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_INode, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_INode, 0, 0},  {&_swigt__p_DistributionLorentz, _p_DistributionLorentzTo_p_INode, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_INode, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_INode, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INode, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_INodeVisitor[] = {  {&_swigt__p_INodeVisitor, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_INoncopyable[] = {  {&_swigt__p_FormFactorBox, _p_FormFactorBoxTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorSphereGaussianRadius, _p_FormFactorSphereGaussianRadiusTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorSphereLogNormalRadius, _p_FormFactorSphereLogNormalRadiusTo_p_INoncopyable, 0, 0},  {&_swigt__p_MultiLayer, _p_MultiLayerTo_p_INoncopyable, 0, 0},  {&_swigt__p_ParticleDistribution, _p_ParticleDistributionTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDecayFunction1DGauss, _p_FTDecayFunction1DGaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution1DGauss, _p_FTDistribution1DGaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_InterferenceFunctionNone, _p_InterferenceFunctionNoneTo_p_INoncopyable, 0, 0},  {&_swigt__p_Polygon, _p_PolygonTo_p_INoncopyable, 0, 0},  {&_swigt__p_IDetector2D, _p_IDetector2DTo_p_INoncopyable, 0, 0},  {&_swigt__p_Ellipse, _p_EllipseTo_p_INoncopyable, 0, 0},  {&_swigt__p_ILayout, _p_ILayoutTo_p_INoncopyable, 0, 0},  {&_swigt__p_ParticleLayout, _p_ParticleLayoutTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorHemiEllipsoid, _p_FormFactorHemiEllipsoidTo_p_INoncopyable, 0, 0},  {&_swigt__p_IntensityScaleAndShiftNormalizer, _p_IntensityScaleAndShiftNormalizerTo_p_INoncopyable, 0, 0},  {&_swigt__p_IntensityNormalizer, _p_IntensityNormalizerTo_p_INoncopyable, 0, 0},  {&_swigt__p_IIntensityNormalizer, _p_IIntensityNormalizerTo_p_INoncopyable, 0, 0},  {&_swigt__p_ChiSquaredModule, _p_ChiSquaredModuleTo_p_INoncopyable, 0, 0},  {&_swigt__p_IChiSquaredModule, _p_IChiSquaredModuleTo_p_INoncopyable, 0, 0},  {&_swigt__p_HorizontalLine, _p_HorizontalLineTo_p_INoncopyable, 0, 0},  {&_swigt__p_RectangularDetector, _p_RectangularDetectorTo_p_INoncopyable, 0, 0},  {&_swigt__p_IsGISAXSDetector, _p_IsGISAXSDetectorTo_p_INoncopyable, 0, 0},  {&_swigt__p_SphericalDetector, _p_SphericalDetectorTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorPrism3, _p_FormFactorPrism3To_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorIcosahedron, _p_FormFactorIcosahedronTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorDodecahedron, _p_FormFactorDodecahedronTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorCuboctahedron, _p_FormFactorCuboctahedronTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorPolyhedron, _p_FormFactorPolyhedronTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorTetrahedron, _p_FormFactorTetrahedronTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorPrism6, _p_FormFactorPrism6To_p_INoncopyable, 0, 0},  {&_swigt__p_GISASSimulation, _p_GISASSimulationTo_p_INoncopyable, 0, 0},  {&_swigt__p_Simulation, _p_SimulationTo_p_INoncopyable, 0, 0},  {&_swigt__p_OffSpecSimulation, _p_OffSpecSimulationTo_p_INoncopyable, 0, 0},  {&_swigt__p_SpecularSimulation, _p_SpecularSimulationTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution2DCone, _p_FTDistribution2DConeTo_p_INoncopyable, 0, 0},  {&_swigt__p_ParticleCoreShell, _p_ParticleCoreShellTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorFullSphere, _p_FormFactorFullSphereTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorTruncatedSphere, _p_FormFactorTruncatedSphereTo_p_INoncopyable, 0, 0},  {&_swigt__p_IFormFactor, _p_IFormFactorTo_p_INoncopyable, 0, 0},  {&_swigt__p_ISample, _p_ISampleTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorPolygonalSurface, _p_FormFactorPolygonalSurfaceTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorLongBoxGauss, _p_FormFactorLongBoxGaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorPolygonalPrism, _p_FormFactorPolygonalPrismTo_p_INoncopyable, 0, 0},  {&_swigt__p_FitSuiteObjects, _p_FitSuiteObjectsTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution2DGate, _p_FTDistribution2DGateTo_p_INoncopyable, 0, 0},  {&_swigt__p_DistributionLogNormal, _p_DistributionLogNormalTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDecayFunction1DVoigt, _p_FTDecayFunction1DVoigtTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution1DVoigt, _p_FTDistribution1DVoigtTo_p_INoncopyable, 0, 0},  {&_swigt__p_IRotation, _p_IRotationTo_p_INoncopyable, 0, 0},  {&_swigt__p_RotationX, _p_RotationXTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorTruncatedSpheroid, _p_FormFactorTruncatedSpheroidTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorFullSpheroid, _p_FormFactorFullSpheroidTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorTruncatedCube, _p_FormFactorTruncatedCubeTo_p_INoncopyable, 0, 0},  {&_swigt__p_RotationY, _p_RotationYTo_p_INoncopyable, 0, 0},  {&_swigt__p_IShape2D, _p_IShape2DTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDecayFunction2DGauss, _p_FTDecayFunction2DGaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution2DGauss, _p_FTDistribution2DGaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_RotationZ, _p_RotationZTo_p_INoncopyable, 0, 0},  {&_swigt__p_Rectangle, _p_RectangleTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorGauss, _p_FormFactorGaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorLongRipple2Gauss, _p_FormFactorLongRipple2GaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_VerticalLine, _p_VerticalLineTo_p_INoncopyable, 0, 0},  {&_swigt__p_IFormFactorBorn, _p_IFormFactorBornTo_p_INoncopyable, 0, 0},  {&_swigt__p_IDetectorResolution, _p_IDetectorResolutionTo_p_INoncopyable, 0, 0},  {&_swigt__p_IClusteredParticles, _p_IClusteredParticlesTo_p_INoncopyable, 0, 0},  {&_swigt__p_Particle, _p_ParticleTo_p_INoncopyable, 0, 0},  {&_swigt__p_IParticle, _p_IParticleTo_p_INoncopyable, 0, 0},  {&_swigt__p_IAbstractParticle, _p_IAbstractParticleTo_p_INoncopyable, 0, 0},  {&_swigt__p_Lattice2D, _p_Lattice2DTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorTrivial, _p_FormFactorTrivialTo_p_INoncopyable, 0, 0},  {&_swigt__p_DistributionGate, _p_DistributionGateTo_p_INoncopyable, 0, 0},  {&_swigt__p_IDistribution1D, _p_IDistribution1DTo_p_INoncopyable, 0, 0},  {&_swigt__p_IFTDecayFunction1D, _p_IFTDecayFunction1DTo_p_INoncopyable, 0, 0},  {&_swigt__p_IFTDistribution1D, _p_IFTDistribution1DTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorCone, _p_FormFactorConeTo_p_INoncopyable, 0, 0},  {&_swigt__p_INoncopyable, 0, 0, 0},  {&_swigt__p_FormFactorRipple1, _p_FormFactorRipple1To_p_INoncopyable, 0, 0},  {&_swigt__p_Layer, _p_LayerTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorAnisoPyramid, _p_FormFactorAnisoPyramidTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorPyramid, _p_FormFactorPyramidTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorDecoratorDebyeWaller, _p_FormFactorDecoratorDebyeWallerTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorRipple2, _p_FormFactorRipple2To_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorEllipsoidalCylinder, _p_FormFactorEllipsoidalCylinderTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorCylinder, _p_FormFactorCylinderTo_p_INoncopyable, 0, 0},  {&_swigt__p_IParameterT_double_t, _p_IParameterT_double_tTo_p_INoncopyable, 0, 0},  {&_swigt__p_DistributionGaussian, _p_DistributionGaussianTo_p_INoncopyable, 0, 0},  {&_swigt__p_ResolutionFunction2DGaussian, _p_ResolutionFunction2DGaussianTo_p_INoncopyable, 0, 0},  {&_swigt__p_ParticleComposition, _p_ParticleCompositionTo_p_INoncopyable, 0, 0},  {&_swigt__p_Line, _p_LineTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorSphereUniformRadius, _p_FormFactorSphereUniformRadiusTo_p_INoncopyable, 0, 0},  {&_swigt__p_DistributionCosine, _p_DistributionCosineTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution1DCosine, _p_FTDistribution1DCosineTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution1DGate, _p_FTDistribution1DGateTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution2DVoigt, _p_FTDistribution2DVoigtTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDecayFunction2DVoigt, _p_FTDecayFunction2DVoigtTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDecayFunction1DCauchy, _p_FTDecayFunction1DCauchyTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution1DCauchy, _p_FTDistribution1DCauchyTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution2DCauchy, _p_FTDistribution2DCauchyTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDecayFunction2DCauchy, _p_FTDecayFunction2DCauchyTo_p_INoncopyable, 0, 0},  {&_swigt__p_IInterferenceFunction, _p_IInterferenceFunctionTo_p_INoncopyable, 0, 0},  {&_swigt__p_FitObject, _p_FitObjectTo_p_INoncopyable, 0, 0},  {&_swigt__p_ParameterPool, _p_ParameterPoolTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorCone6, _p_FormFactorCone6To_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorLongRipple1Gauss, _p_FormFactorLongRipple1GaussTo_p_INoncopyable, 0, 0},  {&_swigt__p_IFormFactorDecorator, _p_IFormFactorDecoratorTo_p_INoncopyable, 0, 0},  {&_swigt__p_LayerRoughness, _p_LayerRoughnessTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorCrystal, _p_FormFactorCrystalTo_p_INoncopyable, 0, 0},  {&_swigt__p_MesoCrystal, _p_MesoCrystalTo_p_INoncopyable, 0, 0},  {&_swigt__p_InterferenceFunction2DParaCrystal, _p_InterferenceFunction2DParaCrystalTo_p_INoncopyable, 0, 0},  {&_swigt__p_InterferenceFunctionRadialParaCrystal, _p_InterferenceFunctionRadialParaCrystalTo_p_INoncopyable, 0, 0},  {&_swigt__p_Crystal, _p_CrystalTo_p_INoncopyable, 0, 0},  {&_swigt__p_IFTDistribution2D, _p_IFTDistribution2DTo_p_INoncopyable, 0, 0},  {&_swigt__p_IFTDecayFunction2D, _p_IFTDecayFunction2DTo_p_INoncopyable, 0, 0},  {&_swigt__p_IResolutionFunction2D, _p_IResolutionFunction2DTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorWeighted, _p_FormFactorWeightedTo_p_INoncopyable, 0, 0},  {&_swigt__p_RealParameter, _p_RealParameterTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorLorentz, _p_FormFactorLorentzTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorLongRipple2Lorentz, _p_FormFactorLongRipple2LorentzTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorLongRipple1Lorentz, _p_FormFactorLongRipple1LorentzTo_p_INoncopyable, 0, 0},  {&_swigt__p_FormFactorLongBoxLorentz, _p_FormFactorLongBoxLorentzTo_p_INoncopyable, 0, 0},  {&_swigt__p_InterferenceFunction1DLattice, _p_InterferenceFunction1DLatticeTo_p_INoncopyable, 0, 0},  {&_swigt__p_InterferenceFunction2DLattice, _p_InterferenceFunction2DLatticeTo_p_INoncopyable, 0, 0},  {&_swigt__p_BasicLattice, _p_BasicLatticeTo_p_INoncopyable, 0, 0},  {&_swigt__p_SquareLattice, _p_SquareLatticeTo_p_INoncopyable, 0, 0},  {&_swigt__p_HexagonalLattice, _p_HexagonalLatticeTo_p_INoncopyable, 0, 0},  {&_swigt__p_DistributionLorentz, _p_DistributionLorentzTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDecayFunction1DTriangle, _p_FTDecayFunction1DTriangleTo_p_INoncopyable, 0, 0},  {&_swigt__p_FTDistribution1DTriangle, _p_FTDistribution1DTriangleTo_p_INoncopyable, 0, 0},  {&_swigt__p_RotationEuler, _p_RotationEulerTo_p_INoncopyable, 0, 0},  {&_swigt__p_ICloneable, _p_ICloneableTo_p_INoncopyable, 0, 0},{0, 0, 0, 0}};
@@ -126331,10 +125921,10 @@ static swig_cast_info _swigc__p_std__vectorT_BasicVector3DT_std__complexT_double
 static swig_cast_info _swigc__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t[] = {  {&_swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator[] = {  {&_swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator[] = {  {&_swigt__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t[] = {  {&_swigt__p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t[] = {  {&_swigt__p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t[] = {  {&_swigt__p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t[] = {  {&_swigt__p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t[] = {  {&_swigt__p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t[] = {  {&_swigt__p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t[] = {  {&_swigt__p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t[] = {  {&_swigt__p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -126463,7 +126053,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_HexagonalLattice,
   _swigc__p_Histogram1D,
   _swigc__p_Histogram2D,
-  _swigc__p_HomogeneousMagneticMaterial,
   _swigc__p_HomogeneousMaterial,
   _swigc__p_HorizontalLine,
   _swigc__p_IAbstractParticle,
@@ -126492,7 +126081,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_IInterferenceFunction,
   _swigc__p_ILayerRTCoefficients,
   _swigc__p_ILayout,
-  _swigc__p_IMaterial,
   _swigc__p_IMinimizer,
   _swigc__p_IMultiLayerBuilder,
   _swigc__p_INamed,
@@ -126637,10 +126225,10 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t,
   _swigc__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__const_iterator,
   _swigc__p_std__vectorT_FitElement_std__allocatorT_FitElement_t_t__iterator,
+  _swigc__p_std__vectorT_HomogeneousMaterial_const_p_std__allocatorT_HomogeneousMaterial_const_p_t_t,
   _swigc__p_std__vectorT_IDetector2D__EAxesUnits_std__allocatorT_IDetector2D__EAxesUnits_t_t,
   _swigc__p_std__vectorT_IFTDistribution2D_const_p_std__allocatorT_IFTDistribution2D_const_p_t_t,
   _swigc__p_std__vectorT_IFormFactor_p_std__allocatorT_IFormFactor_p_t_t,
-  _swigc__p_std__vectorT_IMaterial_const_p_std__allocatorT_IMaterial_const_p_t_t,
   _swigc__p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t,
   _swigc__p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t,
   _swigc__p_std__vectorT_IParticle_const_p_std__allocatorT_IParticle_const_p_t_t,
diff --git a/auto/Wrap/libBornAgainCore_wrap.h b/auto/Wrap/libBornAgainCore_wrap.h
index 2912917f6e48b4f48432602098b6b14f636a7b3e..8f23e91d8a5ca21a5cfc7f75973e426e7cc6844a 100644
--- a/auto/Wrap/libBornAgainCore_wrap.h
+++ b/auto/Wrap/libBornAgainCore_wrap.h
@@ -139,8 +139,8 @@ public:
     virtual std::string treeToString() const;
     virtual std::vector< INode const *,std::allocator< INode const * > > getChildren() const;
     virtual ISample *cloneInvertB() const;
-    virtual IMaterial const *material() const;
-    virtual IMaterial const *getAmbientMaterial() const;
+    virtual HomogeneousMaterial const *material() const;
+    virtual HomogeneousMaterial const *getAmbientMaterial() const;
 
 /* Internal director utilities */
 public:
@@ -323,9 +323,9 @@ public:
     virtual std::string treeToString() const;
     virtual std::vector< INode const *,std::allocator< INode const * > > getChildren() const;
     virtual ISample *cloneInvertB() const;
-    virtual IMaterial const *material() const;
-    virtual IMaterial const *getAmbientMaterial() const;
-    virtual void setAmbientMaterial(IMaterial const &arg0);
+    virtual HomogeneousMaterial const *material() const;
+    virtual HomogeneousMaterial const *getAmbientMaterial() const;
+    virtual void setAmbientMaterial(HomogeneousMaterial const &arg0);
     virtual complex_t evaluate(WavevectorInfo const &wavevectors) const;
     virtual double getVolume() const;
     virtual double getRadialExtension() const;
@@ -389,9 +389,9 @@ public:
     virtual std::string treeToString() const;
     virtual std::vector< INode const *,std::allocator< INode const * > > getChildren() const;
     virtual ISample *cloneInvertB() const;
-    virtual IMaterial const *material() const;
-    virtual IMaterial const *getAmbientMaterial() const;
-    virtual void setAmbientMaterial(IMaterial const &arg0);
+    virtual HomogeneousMaterial const *material() const;
+    virtual HomogeneousMaterial const *getAmbientMaterial() const;
+    virtual void setAmbientMaterial(HomogeneousMaterial const &arg0);
     virtual complex_t evaluate(WavevectorInfo const &wavevectors) const;
     virtual double getVolume() const;
     virtual double getRadialExtension() const;