Skip to content
Snippets Groups Projects
Commit 50d6fc8c authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

upd reference

parent e4541804
No related branches found
No related tags found
1 merge request!2712Move out {sigma, hurst, correlationLength} to autocorrelation model class
Pipeline #155522 passed
......@@ -102,8 +102,8 @@ std::unique_ptr<const double2d_t> layerRoughnessMap(const LayerItem& layerItem,
interlayer = roughItem->certainInterlayerModel()->createModel();
if (const auto* br = dynamic_cast<const BasicRoughnessItem*>(roughItem))
autocorrelation = std::make_unique<K_CorrelationModel>(br->sigma().dVal(), br->hurst().dVal(),
br->lateralCorrelationLength().dVal());
autocorrelation = std::make_unique<K_CorrelationModel>(
br->sigma().dVal(), br->hurst().dVal(), br->lateralCorrelationLength().dVal());
auto roughness = LayerRoughness(autocorrelation.get(), interlayer.get());
if (roughness.sigma() == 0)
......
......@@ -33,8 +33,9 @@ public:
#endif
};
//! Based on the article "X-ray reflection and transmission by rough surfaces"
//! by D. K. G. de Boer, Physical Review B 51, 5297 (1995)
//! The model is described e.g. in the article "Roughness spectrum and surface width of self-affine
//! fractal surfaces via the K-correlation model" by G. Palasantzas, Physical Review B 48,
//! 14472-14478 (1993)
class K_CorrelationModel : public AutocorrelationModel {
public:
K_CorrelationModel(double sigma = 0, double hurst = 0, double lateralCorrLength = 0);
......
......@@ -152,7 +152,8 @@ TEST_F(MultiLayerTest, WithRoughness)
const LayerRoughness* roughness1 = interface1->roughness();
EXPECT_TRUE(roughness0);
auto* roughness0_AC = dynamic_cast<const K_CorrelationModel*>(roughness0->autocorrelationModel());
auto* roughness0_AC =
dynamic_cast<const K_CorrelationModel*>(roughness0->autocorrelationModel());
EXPECT_TRUE(roughness0_AC);
EXPECT_EQ(1.1, roughness0->sigma());
......@@ -190,14 +191,16 @@ TEST_F(MultiLayerTest, CloneWithRoughness)
EXPECT_TRUE(roughness0);
EXPECT_TRUE(roughness1);
auto* roughness0_AC = dynamic_cast<const K_CorrelationModel*>(roughness0->autocorrelationModel());
auto* roughness0_AC =
dynamic_cast<const K_CorrelationModel*>(roughness0->autocorrelationModel());
EXPECT_TRUE(roughness0_AC);
EXPECT_EQ(2.1, roughness0->sigma());
EXPECT_EQ(.3, roughness0_AC->hurst());
EXPECT_EQ(12.1, roughness0_AC->lateralCorrLength());
auto* roughness1_AC = dynamic_cast<const K_CorrelationModel*>(roughness1->autocorrelationModel());
auto* roughness1_AC =
dynamic_cast<const K_CorrelationModel*>(roughness1->autocorrelationModel());
EXPECT_TRUE(roughness1_AC);
EXPECT_EQ(1.1, roughness1->sigma());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment