6 #include <initializer_list> 8 #include "../../types.hpp" 14 namespace wavepackets {
50 for (std::size_t d = 0; d < D; d++)
62 limits_[i++] = deflt = e;
71 : limits_(that.limits_)
80 virtual int limit(
int const* base_node,
dim_t axis)
const override 82 { (void)(base_node); }
84 for (
dim_t d = 0; d < D; d++) {
85 if (d != axis && base_node[d] >= limits_[d])
88 return limits_[axis]-1;
93 return limits_[axis]-1;
96 virtual void print(std::ostream & out)
const override 98 out <<
"HyperCubicShape{ limits (exclusive): [";
99 for (
dim_t i = 0; i < D-1; i++) {
100 out << limits_[i] <<
",";
102 out << limits_[D-1] <<
"]";
HyperCubicShape(const HyperCubicShape &that)
Definition: shape_hypercubic.hpp:70
This class implements the hypercubic basis shape.
Definition: shape_hypercubic.hpp:30
Definition: coefficients_file_parser.cpp:10
virtual int limit(int const *base_node, dim_t axis) const override
Evaluates one surface function on a base node.
Definition: shape_hypercubic.hpp:80
virtual void print(std::ostream &out) const override
Prints a pretty description of the shape.
Definition: shape_hypercubic.hpp:96
HyperCubicShape(std::initializer_list< int > list)
Definition: shape_hypercubic.hpp:57
HyperCubicShape & operator=(const HyperCubicShape &that)
Definition: shape_hypercubic.hpp:74
Subclasses provide a description of a basis shape.
Definition: shape_base.hpp:34
HyperCubicShape(int limit)
Set limits to .
Definition: shape_hypercubic.hpp:48
virtual int bbox(dim_t axis) const override
Retrieves the length of the minimum bounding box in one direction.
Definition: shape_hypercubic.hpp:91
HyperCubicShape(const std::array< int, D > &limits)
Definition: shape_hypercubic.hpp:39
int dim_t
Definition: types.hpp:16
std::array< int, D > limits_
Definition: shape_hypercubic.hpp:33