35 #include "pteros/core/selection.h"
36 #include <unsupported/Eigen/CXX11/Tensor>
42 void add_point(
int ind, Vector3f_const_ref crd);
44 int get_index(
int i)
const {
return indexes[i];}
45 const std::vector<int>& get_indexes()
const {
return indexes;}
46 Eigen::Vector3f get_coord(
int i)
const {
return coords[i];}
47 size_t size()
const {
return indexes.size();}
49 Eigen::Vector3f get_average_coord();
52 std::vector<int> indexes;
53 std::vector<Eigen::Vector3f> coords;
77 Grid(
int X,
int Y,
int Z){ resize(X,Y,Z); }
81 void resize(
int X,
int Y,
int Z);
82 GridCell& cell(
int i,
int j,
int k){
return data(i,j,k); }
83 GridCell& cell(Vector3i_const_ref ind){
return data(ind(0),ind(1),ind(2)); }
84 const GridCell& cell(Vector3i_const_ref ind)
const {
return data(ind(0),ind(1),ind(2)); }
90 Vector3f_const_ref min,
91 Vector3f_const_ref max,
96 Vector3i_const_ref pbc_dims = fullPBC,
97 bool abs_index =
false);
101 Vector3i_const_ref pbc_dims = fullPBC,
102 bool abs_index =
false);
104 Eigen::Tensor<GridCell,3> data;