Skip to content

Commit

Permalink
Geometry doc
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyBourne committed Nov 29, 2023
1 parent e6e6d4c commit 34ae315
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/geometryXVx/geometry/geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,22 +291,43 @@ using IndexFx = ddc::DiscreteElement<IDimFx>;
using IVectFx = ddc::DiscreteVector<IDimFx>;
using IDomainFx = ddc::DiscreteDomain<IDimFx>;

/**
* @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 <class T>
using velocity_dim_for = std::conditional_t<std::is_same_v<T, IDimX>, IDimVx, void>;

/**
* @brief A templated type giving the spatial discrete dimension type associated to a velocity discrete dimension type.
*/
template <class T>
using spatial_dim_for = std::conditional_t<std::is_same_v<T, IDimVx>, 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<DimSp, typename decltype(SpatialDDom), typename decltype(VelocityDDom)>(ddc::DiscreteDomain());
/**
* @brief An alias for the whole distribution function discrete domain type.
*/
using FdistribuDDom = IDomainSpXVx;
};
22 changes: 22 additions & 0 deletions src/geometryXYVxVy/geometry/geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,23 +314,45 @@ using IDomainFx = ddc::DiscreteDomain<IDimFx>;
using IDomainFy = ddc::DiscreteDomain<IDimFy>;
using IDomainFxFy = ddc::DiscreteDomain<IDimFx, IDimFy>;

/**
* @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 <class T>
using velocity_dim_for = std::conditional_t<
std::is_same_v<T, IDimX>,
IDimVx,
std::conditional_t<std::is_same_v<T, IDimY>, IDimVy, void>>;

/**
* @brief A templated type giving the spatial discrete dimension type associated to a velocity discrete dimension type.
*/
// template <class T>
// using spatial_dim_for = std::conditional_t<std::is_same_v<T, IDimVx>, IDimX, std::conditional_t<std::is_same_v<T, IDimVy>, 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;
};

0 comments on commit 34ae315

Please sign in to comment.