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

#ifdef SWIG
#error no need to expose this header to Swig
#endif // SWIG
#ifndef BORNAGAIN_RESAMPLE_REFINE_REFINESTRUCTS_H
#define BORNAGAIN_RESAMPLE_REFINE_REFINESTRUCTS_H

#include <memory>
#include <vector>

class Layer;
class SimulationOptions;
class Slice;
class Struct;

namespace Refine {

//! Collects layouts from layers, with or without material averaging.
//! When options.useAvgMaterials() is true, particles are sliced across refined layer boundaries.
//! When false, particles remain in their original layers.
std::vector<std::unique_ptr<const Struct>>
refineStructs(const std::vector<const Layer*>& flat,
              const std::vector<std::unique_ptr<Slice>>& slices, const SimulationOptions& options);

} // namespace Refine

#endif // BORNAGAIN_RESAMPLE_REFINE_REFINESTRUCTS_H
