3 #include "../../types.hpp" 9 namespace wavepackets {
24 template<dim_t D,
class S>
37 return shape_.bbox(axis)+1;
40 template<
class MultiIndex>
43 int value = shape_.limit(index, axis);
49 for (
dim_t d = 0; d < D; d++) {
50 if (d != axis && index[d] != 0) {
52 MultiIndex prev_index = index; prev_index[d] -= 1;
54 value = std::max(value, shape_.limit(prev_index, axis) );
63 std::stringstream out;
64 out <<
"ExtendedShape<?>[" << shape_.description() <<
"]";
79 std::array<int,D> limits2;
80 for (
dim_t d = 0; d < D; d++)
81 limits2[d] = shape.
bbox(d)+2;
87 return expansion_.
bbox(axis);
90 template<
class MultiIndex>
93 return expansion_.template limit< MultiIndex >(index, axis);
98 return expansion_.description();
This class implements the hypercubic basis shape.
Definition: shape_hypercubic.hpp:30
std::string description() const
Definition: shape_extended.hpp:96
Definition: coefficients_file_parser.cpp:10
S shape_
Definition: shape_extended.hpp:28
int limit(const MultiIndex &index, dim_t axis) const
Definition: shape_extended.hpp:91
int bbox(dim_t axis) const
Definition: shape_extended.hpp:35
Defines the extension of a shape: For each lattice point add all its neighbours.
Definition: shape_extended.hpp:25
ExtendedShape(S shape)
Definition: shape_extended.hpp:31
int bbox(dim_t axis) const
Definition: shape_extended.hpp:85
ExtendedShape(HyperCubicShape< D > shape)
Definition: shape_extended.hpp:76
std::string description() const
Definition: shape_extended.hpp:61
HyperCubicShape< D > expansion_
Definition: shape_extended.hpp:73
virtual int bbox(dim_t axis) const override
Retrieves the length of the minimum bounding box in one direction.
Definition: shape_hypercubic.hpp:91
int dim_t
Definition: types.hpp:16
int limit(const MultiIndex &index, dim_t axis) const
Definition: shape_extended.hpp:41