Skip to content

Distinguish between vertices, edges, faces & cells in the discretization #45

Open
@jbigot

Description

See https://gitlab.maisondelasimulation.fr/gysela-developpers/voicexx/-/issues/34

Currently and according to Voice++#26 , we only discretize points (vertices).
I would like to introduce edges discretization also.

For example, in 3D, this could look like so:

using IDimX = ×DiscretizationOf<RDimX>;
using IDimY = ×DiscretizationOf<RDimY>;
using IDimZ = ×DiscretizationOf<RDimZ>;

using IVerticesSpace = DiscreteSpace<IDimX,        IDimY,        IDimZ>;
using IXEdgesSpace   = DiscreteSpace<IDimX::Edges, IDimY,        IDimZ>;
using IYEdgesSpace   = DiscreteSpace<IDimX,        IDimY::Edges, IDimZ>;
using IXFacesSpace   = DiscreteSpace<IDimX,        IDimY::Edges, IDimZ::Edges>;
using IYFacesSpace   = DiscreteSpace<IDimX::Edges, IDimY,        IDimZ::Edges>;
using ICellsSpace    = DiscreteSpace<IDimX::Edges, IDimY::Edges, IDimZ::Edges>;

The real type would be a tensor product that would combine either Point<RDim> or Interval<RDim>

using RVertex = VectorElement<Point<RDimX>,    Point<RDimY>,    Point<RDimZ>>;
using RXEdge  = VectorElement<Interval<RDimX>, Point<RDimY>,    Point<RDimZ>>;
using RYEdge  = VectorElement<Point<RDimX>,    Interval<RDimY>, Point<RDimZ>>;
using RXFace  = VectorElement<Point<RDimX>,    Interval<RDimY>, Interval<RDimZ>>;
using RYFace  = VectorElement<Interval<RDimX>, Point<RDimY>,    Interval<RDimZ>>;
using RCell   = VectorElement<Interval<RDimX>, Interval<RDimY>, Interval<RDimZ>>;

The to_real() function would yield a type that depends on the discrete space:

IVerticesSpace vertices_space = /*[...]*/;
ICellsSpace cell_space = /*[...]*/;
RVertex = vertices_space.to_real(/*[...]*/);
RCell = cell_space.to_real(/*[...]*/);

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions