From 34ae315936e8c635f8420f9899b23211b8a4ddc3 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Nov 2023 17:53:01 +0000 Subject: [PATCH] Geometry doc --- src/geometryXVx/geometry/geometry.hpp | 21 +++++++++++++++++++++ src/geometryXYVxVy/geometry/geometry.hpp | 22 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/src/geometryXVx/geometry/geometry.hpp b/src/geometryXVx/geometry/geometry.hpp index eed1a8e72..4d88f6e07 100644 --- a/src/geometryXVx/geometry/geometry.hpp +++ b/src/geometryXVx/geometry/geometry.hpp @@ -291,22 +291,43 @@ using IndexFx = ddc::DiscreteElement; using IVectFx = ddc::DiscreteVector; using IDomainFx = ddc::DiscreteDomain; +/** + * @brief A class providing aliases for useful subdomains of the geometry. It is used as template parameter for generic dimensionality-agnostic operators such as advections. + */ class GeometryXVx { public: + /** + * @brief A templated type giving the velocity discrete dimension type associated to a spatial discrete dimension type. + */ template using velocity_dim_for = std::conditional_t, IDimVx, void>; + /** + * @brief A templated type giving the spatial discrete dimension type associated to a velocity discrete dimension type. + */ template using spatial_dim_for = std::conditional_t, IDimX, void>; + /** + * @brief An alias for species "discrete dimension" type. + */ using DDimSp = IDimSp; + /** + * @brief An alias for the spatial discrete domain type. + */ using SpatialDDom = IDomainX; + /** + * @brief An alias for the velocity discrete domain type. + */ using VelocityDDom = IDomainVx; // using FdistribuDDom = DiscreteDomain(ddc::DiscreteDomain()); + /** + * @brief An alias for the whole distribution function discrete domain type. + */ using FdistribuDDom = IDomainSpXVx; }; diff --git a/src/geometryXYVxVy/geometry/geometry.hpp b/src/geometryXYVxVy/geometry/geometry.hpp index f143eb88b..59fcc27f3 100644 --- a/src/geometryXYVxVy/geometry/geometry.hpp +++ b/src/geometryXYVxVy/geometry/geometry.hpp @@ -314,23 +314,45 @@ using IDomainFx = ddc::DiscreteDomain; using IDomainFy = ddc::DiscreteDomain; using IDomainFxFy = ddc::DiscreteDomain; +/** + * @brief A class providing aliases for useful subdomains of the geometry. It is used as template parameter for generic dimensionality-agnostic operat +ors such as advections. + */ class GeometryXYVxVy { public: + /** + * @brief A templated type giving the velocity discrete dimension type associated to a spatial discrete dimension type. + */ template using velocity_dim_for = std::conditional_t< std::is_same_v, IDimVx, std::conditional_t, IDimVy, void>>; + /** + * @brief A templated type giving the spatial discrete dimension type associated to a velocity discrete dimension type. + */ // template // using spatial_dim_for = std::conditional_t, IDimX, std::conditional_t, IDimY, void>>; + /** + * @brief An alias for species "discrete dimension" type. + */ using DDimSp = IDimSp; + /** + * @brief An alias for the spatial discrete domain type. + */ using SpatialDDom = IDomainXY; + /** + * @brief An alias for the velocity discrete domain type. + */ using VelocityDDom = IDomainVxVy; + /** + * @brief An alias for the whole distribution function discrete domain type. + */ using FdistribuDDom = IDomainSpXYVxVy; };