diff --git a/Resample/Specular/SpecularScalarNCStrategy.cpp b/Resample/Specular/SpecularScalarNCStrategy.cpp deleted file mode 100644 index d964b279ca3a15d0b25087969827231102352015..0000000000000000000000000000000000000000 --- a/Resample/Specular/SpecularScalarNCStrategy.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file Resample/Specular/SpecularScalarNCStrategy.cpp -//! @brief Implements class SpecularScalarNCStrategy. -//! -//! @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) -// -// ************************************************************************************************ - -#include "Resample/Specular/SpecularScalarNCStrategy.h" -#include <Eigen/Dense> - -std::pair<complex_t, complex_t> SpecularScalarNCStrategy::transition(complex_t kzi, complex_t kzi1, - double sigma) const -{ - complex_t roughness_diff = 1; - complex_t roughness_sum = 1; - if (sigma > 0.0) { - roughness_diff = std::exp(-(kzi1 - kzi) * (kzi1 - kzi) * sigma * sigma / 2.); - roughness_sum = std::exp(-(kzi1 + kzi) * (kzi1 + kzi) * sigma * sigma / 2.); - } - const complex_t kz_ratio = kzi1 / kzi; - - const complex_t a00 = 0.5 * (1. + kz_ratio) * roughness_diff; - const complex_t a01 = 0.5 * (1. - kz_ratio) * roughness_sum; - - return {a00, a01}; -} diff --git a/Resample/Specular/SpecularScalarNCStrategy.h b/Resample/Specular/SpecularScalarNCStrategy.h deleted file mode 100644 index faf5b72a9a998fbea8e37c1f535e0c08ba3532e6..0000000000000000000000000000000000000000 --- a/Resample/Specular/SpecularScalarNCStrategy.h +++ /dev/null @@ -1,41 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file Resample/Specular/SpecularScalarNCStrategy.h -//! @brief Defines class SpecularScalarNCStrategy. -//! -//! @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) -// -// ************************************************************************************************ - -#ifdef SWIG -#error no need to expose this header to Swig -#endif - -#ifndef USER_API -#ifndef BORNAGAIN_RESAMPLE_SPECULAR_SPECULARSCALARNCSTRATEGY_H -#define BORNAGAIN_RESAMPLE_SPECULAR_SPECULARSCALARNCSTRATEGY_H - -#include "Resample/Specular/SpecularScalarStrategy.h" - -//! Implements Nevot-Croce roughness for a scaler computation. -//! -//! Implements the transition function that includes Nevot-Croce roughness -//! in the computation of the coefficients for coherent wave propagation -//! in a multilayer by applying modified Fresnel coefficients. - -class SpecularScalarNCStrategy : public SpecularScalarStrategy { -private: - //! Roughness is modelled by a Gaussian profile, i.e. Nevot-Croce factors for the - //! reflection coefficients. - //! Implementation follows A. Gibaud and G. Vignaud, in X-ray and Neutron Reflectivity, edited - //! by J. Daillant and A. Gibaud, volume 770 of Lecture Notes in Physics (2009) - std::pair<complex_t, complex_t> transition(complex_t kzi, complex_t kzi1, double sigma) const; -}; - -#endif // BORNAGAIN_RESAMPLE_SPECULAR_SPECULARSCALARNCSTRATEGY_H -#endif // USER_API diff --git a/Resample/Specular/SpecularScalarTanhStrategy.cpp b/Resample/Specular/SpecularScalarTanhStrategy.cpp deleted file mode 100644 index 6552dbb5b66330b0f760df64bfd7657dcf6cf3ef..0000000000000000000000000000000000000000 --- a/Resample/Specular/SpecularScalarTanhStrategy.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file Resample/Specular/SpecularScalarTanhStrategy.cpp -//! @brief Implements class SpecularScalarTanhStrategy. -//! -//! @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) -// -// ************************************************************************************************ - -#include "Resample/Specular/SpecularScalarTanhStrategy.h" -#include "Base/Math/Constants.h" -#include "Base/Math/Functions.h" -#include <Eigen/Dense> - -std::pair<complex_t, complex_t> -SpecularScalarTanhStrategy::transition(complex_t kzi, complex_t kzi1, double sigma) const -{ - complex_t roughness = 1; - if (sigma > 0.0) { - const double sigeff = std::pow(M_PI_2, 1.5) * sigma; - roughness = std::sqrt(Math::tanhc(sigeff * kzi1) / Math::tanhc(sigeff * kzi)); - } - const complex_t inv_roughness = 1.0 / roughness; - const complex_t kz_ratio = kzi1 / kzi * roughness; - - const complex_t a00 = 0.5 * (inv_roughness + kz_ratio); - const complex_t a01 = 0.5 * (inv_roughness - kz_ratio); - - return {a00, a01}; -} diff --git a/Resample/Specular/SpecularScalarTanhStrategy.h b/Resample/Specular/SpecularScalarTanhStrategy.h deleted file mode 100644 index ddc7a832c7a05dbca1758553cc315d6972197f33..0000000000000000000000000000000000000000 --- a/Resample/Specular/SpecularScalarTanhStrategy.h +++ /dev/null @@ -1,38 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file Resample/Specular/SpecularScalarTanhStrategy.h -//! @brief Defines class SpecularScalarTanhStrategy. -//! -//! @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) -// -// ************************************************************************************************ - -#ifdef SWIG -#error no need to expose this header to Swig -#endif - -#ifndef USER_API -#ifndef BORNAGAIN_RESAMPLE_SPECULAR_SPECULARSCALARTANHSTRATEGY_H -#define BORNAGAIN_RESAMPLE_SPECULAR_SPECULARSCALARTANHSTRATEGY_H - -#include "Resample/Specular/SpecularScalarStrategy.h" - -//! Implements an tanh transition function to model roughness in a scaler computation. -//! -//! Implements the transition function that includes the analytical roughness model -//! of an tanh interface transition in the computation of the coefficients for -//! coherent wave propagation in a multilayer by applying modified Fresnel coefficients. -class SpecularScalarTanhStrategy : public SpecularScalarStrategy { -private: - //! Roughness is modelled by tanh profile - //! [e.g. Bahr, Press, et al, Phys. Rev. B, vol. 47 (8), p. 4385 (1993)]. - std::pair<complex_t, complex_t> transition(complex_t kzi, complex_t kzi1, double sigma) const; -}; - -#endif // BORNAGAIN_RESAMPLE_SPECULAR_SPECULARSCALARTANHSTRATEGY_H -#endif // USER_API