WaveBlocksND
shape_base.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 
5 
6 namespace waveblocks {
7  namespace wavepackets {
8  namespace shapes {
33  template<dim_t D>
35  {
36  public:
37  virtual ~AbstractShape() { }
38 
50  virtual int bbox(dim_t axis) const = 0;
51 
72  virtual int limit(int const* base_node, dim_t axis) const = 0;
73 
79  virtual void print(std::ostream & out) const = 0;
80  };
81 
82  template<dim_t D>
83  std::ostream & operator<<(std::ostream & out, AbstractShape<D> const& shape)
84  {
85  shape.print(out);
86  return out;
87  }
88  }
89  }
90 }
virtual ~AbstractShape()
Definition: shape_base.hpp:37
Definition: coefficients_file_parser.cpp:10
virtual int bbox(dim_t axis) const =0
Retrieves the length of the minimum bounding box in one direction.
virtual int limit(int const *base_node, dim_t axis) const =0
Evaluates one surface function on a base node.
Subclasses provide a description of a basis shape.
Definition: shape_base.hpp:34
int dim_t
Definition: types.hpp:16
virtual void print(std::ostream &out) const =0
Prints a pretty description of the shape.