From 1bbab1045e74145925cc2c80eb12af55a7b026f9 Mon Sep 17 00:00:00 2001 From: Giovanni La Mura Date: Fri, 13 Jun 2025 16:29:48 +0200 Subject: [PATCH] Prepare ParticleDescriptor interfaces to estimate size in memory --- src/include/Commons.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/include/Commons.h b/src/include/Commons.h index b7245d03..bc3775c0 100644 --- a/src/include/Commons.h +++ b/src/include/Commons.h @@ -452,6 +452,18 @@ public: */ std::string get_descriptor_type() override { return "cluster descriptor"; } + /*! \brief Function to calculate the descriptor size in bytes. + * + * \param gconf: `GeometryConfiguration *` Pointer to a GeometryConfiguration instance. + * \param gconf: `ScattererConfiguration *` Pointer to a ScattererConfiguration instance. + * \param li: `int` Maximum expansion order for internal fields (optional, default from `gconf`). + * \param le: `int` Maximum expansion order for external fields (optional, default from `gconf`). + * \return size: `long` The descriptor size in bytes. + */ + static long get_size( + GeometryConfiguration *gconf, ScattererConfiguration *sconf, int li=-1, int le=-1 + ) { return 0; } + /*! \brief Update the field expansion orders. * * \param inner_order: `int` The new inner expansion order to be set. @@ -502,6 +514,18 @@ public: */ std::string get_descriptor_type() override { return "inclusion descriptor"; } + /*! \brief Function to calculate the descriptor size in bytes. + * + * \param gconf: `GeometryConfiguration *` Pointer to a GeometryConfiguration instance. + * \param gconf: `ScattererConfiguration *` Pointer to a ScattererConfiguration instance. + * \param li: `int` Maximum expansion order for internal fields (optional, default from `gconf`). + * \param le: `int` Maximum expansion order for external fields (optional, default from `gconf`). + * \return size: `long` The descriptor size in bytes. + */ + static long get_size( + GeometryConfiguration *gconf, ScattererConfiguration *sconf, int li=-1, int le=-1 + ) { return 0; } + /*! \brief Update the field expansion orders. * * \param inner_order: `int` The new inner expansion order to be set. @@ -552,6 +576,17 @@ public: */ std::string get_descriptor_type() override { return "sphere descriptor"; } + /*! \brief Function to calculate the descriptor size in bytes. + * + * \param gconf: `GeometryConfiguration *` Pointer to a GeometryConfiguration instance. + * \param gconf: `ScattererConfiguration *` Pointer to a ScattererConfiguration instance. + * \param lm: `int` Maximum field expansion order (optional, default from `gconf`). + * \return size: `long` The descriptor size in bytes. + */ + static long get_size( + GeometryConfiguration *gconf, ScattererConfiguration *sconf, int lm=-1 + ) { return 0; } + /*! \brief Update the field expansion order. * * \param order: `int` The new field expansion order to be set. -- GitLab