//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      Sample/Material/Vacuum.h
//! @brief     Defines class Vacuum.
//!
//! @homepage  http://www.bornagainproject.org
//! @license   GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
//  ************************************************************************************************

#ifndef BORNAGAIN_SAMPLE_MATERIAL_VACUUM_H
#define BORNAGAIN_SAMPLE_MATERIAL_VACUUM_H

#include "Sample/Material/Material.h"

//! The material with n=1.

class Vacuum : public Material {
public:
    Vacuum(const std::string& name = "Vacuum");
    ~Vacuum() override = default;

#ifndef SWIG
    //! Returns pointer to a copy of material
    Vacuum* clone() const override;

    bool hasNativeRefractiveIndex() const override { return true; }
    bool hasNativeSLD() const override { return true; }
    bool isVacuum() const override { return true; }

    //! Returns refractive index.
    complex_t refractiveIndex(double /* lambda0 */) const override { return 1; }

    //! Returns squared refractive index.
    complex_t squaredRefractiveIndex(double /* lambda0 */) const override { return 1; }

    //! Returns underlying refractive index value
    complex_t rawData() const override { return {0., 0.}; }

    //! Returns SLD in Å⁻² (always zero for vacuum)
    complex_t sld(double /*wavelength*/) const override { return {0., 0.}; }

    //! Returns π/λ² (SLD is zero for vacuum)
    complex_t plainSubtrSLD(double lambda0) const override;
#endif // SWIG
};

#endif // BORNAGAIN_SAMPLE_MATERIAL_VACUUM_H
