Open
Description
The current way of initialising dimensions is verbose:
auto const [x_domain, ghosted_x_domain, x_pre_ghost, x_post_ghost]
= ddc::init_discrete_space<DDimX>(DDimX::init_ghosted<DDimX>(
ddc::Coordinate<X>(x_start),
ddc::Coordinate<X>(x_end),
ddc::DiscreteVector<DDimX>(nb_x_points),
gwx));
The name of the dimension can appear multiple times for no good reason.
I suggest to have a simpler API with only create_*
functions that will take care of calling ddc::init_discrete_space
. We would have
create_uniform_point_sampling<DDim>
create_uniform_point_sampling_ghosted<DDim>
create_non_uniform_point_sampling<DDim>
create_non_uniform_point_sampling_ghosted<DDim>
create_uniform_bsplines<DDim>
create_non_uniform_bsplines<DDim>
The function ddc::init_discrete_space
would remain a public function but would not be called directly by the user when initialising a dimension.
Metadata
Metadata
Assignees
Labels
No labels