//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      Resample/Refine/SubdivideLayers.h
//! @brief     Defines functions Refine::wrapLayers and subdivideLayers
//!
//! @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_SUBDIVIDELAYERS_H
#define BORNAGAIN_RESAMPLE_REFINE_SUBDIVIDELAYERS_H

#include <memory>
#include <vector>

class Layer;
class Slice;

namespace Refine {

//! Wraps layers with slice numbers and explicit z-spans, without subdivision.
std::vector<std::unique_ptr<Slice>> wrapLayers(const std::vector<const Layer*>& flat);

//! Subdivides layers around particle zones for material averaging.
std::vector<std::unique_ptr<Slice>> subdivideLayers(const std::vector<const Layer*>& flat);

} // namespace Refine

#endif // BORNAGAIN_RESAMPLE_REFINE_SUBDIVIDELAYERS_H
