Skip to content
Snippets Groups Projects
Commit cd851b15 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm one more duplicate fct, rm file MultilayerUtil

parent 70eaead1
No related branches found
No related tags found
1 merge request!1667Hold roughness as a pointer, for simpler code and possibly to prepare for polymorphism
......@@ -32,7 +32,6 @@
#include "Sample/Material/RefractiveMaterialImpl.h"
#include "Sample/Multilayer/Layer.h"
#include "Sample/Multilayer/MultiLayer.h"
#include "Sample/Multilayer/MultilayerUtil.h"
#include "Sample/Particle/IParticle.h"
#include <iomanip>
#include <iostream>
......
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/Multilayer/MultilayerUtil.cpp
//! @brief Implements helper functions for MultiLayer objects.
//!
//! @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 "Sample/Multilayer/MultilayerUtil.h"
#include "Base/Util/Assert.h"
#include "Sample/Interface/LayerInterface.h"
#include "Sample/Multilayer/Layer.h"
#include "Sample/Multilayer/MultiLayer.h"
size_t SampleUtil::Multilayer::IndexOfLayer(const MultiLayer& sample, const Layer* p_layer)
{
for (size_t i = 0; i < sample.numberOfLayers(); ++i)
if (p_layer == sample.layer(i))
return i;
ASSERT(false);
}
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file Sample/Multilayer/MultilayerUtil.h
//! @brief Defines namespace SampleUtil::Multilayer.
//!
//! @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 // SWIG
#ifndef BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYERUTIL_H
#define BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYERUTIL_H
#include <cstddef>
class Layer;
class MultiLayer;
//! Helper functions for class MultiLayer.
namespace SampleUtil::Multilayer {
//! Returns the index of the given layer
size_t IndexOfLayer(const MultiLayer& sample, const Layer* p_layer);
} // namespace SampleUtil::Multilayer
#endif // BORNAGAIN_SAMPLE_MULTILAYER_MULTILAYERUTIL_H
#include "Sample/Multilayer/MultiLayer.h"
#include "Base/Const/Units.h"
#include <numbers>
using std::numbers::pi;
#include "Sample/Aggregate/ParticleLayout.h"
#include "Sample/Interface/LayerInterface.h"
#include "Sample/Interface/LayerRoughness.h"
#include "Sample/Material/MaterialFactoryFuncs.h"
#include "Sample/Multilayer/Layer.h"
#include "Sample/Multilayer/MultilayerUtil.h"
#include "Tests/GTestWrapper/google_test.h"
#include <numbers>
using std::numbers::pi;
class MultiLayerTest : public ::testing::Test {
protected:
......
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