25 #include "../lib3d/vec3.hpp"
46 grid(
unsigned int Nu,
unsigned int Nv);
55 void resize(
unsigned int Nu,
unsigned int Nv);
58 unsigned int size_u()
const;
60 unsigned int size_v()
const;
164 void write(
const std::string& filename);
166 static grid read(
const std::string& filename);
171 void assert_size(
unsigned int ku,
unsigned int kv)
const;
friend grid operator+(const grid &g, const vec3 &t)
translate the grid
Definition: grid.cpp:150
grid()
empty constructor
Definition: grid.cpp:31
void suppress_front_u()
suppress a line of grid in the u direction at the beginning
Definition: grid.cpp:327
grid operator-() const
negation positions of the grid
Definition: grid.cpp:176
void build_sphere()
build spherical distribution
Definition: grid.cpp:98
grid & operator-=(const vec3 &t)
translate the grid
Definition: grid.cpp:142
const vec3 & operator()(unsigned int ku, unsigned int kv) const
Accessor to the value (ku,kv)
Definition: grid.cpp:56
unsigned int size_u() const
return the size in u direction
Definition: grid.cpp:48
Definition: patch4.hpp:30
unsigned int internal_size_u
internal size u
Definition: grid.hpp:174
void add_front_u()
add a line of grid in the u direction at the beginning
Definition: grid.cpp:206
unsigned int size_v() const
return the size in v direction
Definition: grid.cpp:52
void add_front_v()
add a line of grid in the v direction at the beginning
Definition: grid.cpp:251
void suppress_front_v()
suppress a line of grid in the v direction at the beginning
Definition: grid.cpp:363
grid & operator+=(const vec3 &t)
translate the grid
Definition: grid.cpp:134
patch4 get_patch(unsigned int k_patch_u, unsigned int k_patch_v) const
get a 4x4 patch
Definition: grid.cpp:73
void duplicate_boundary()
duplicate positions at the boundaries
Definition: grid.cpp:273
void resize(unsigned int Nu, unsigned int Nv)
resize the grid
Definition: grid.cpp:41
void suppress_back_u()
suppress a line of grid in the u direction at the end
Definition: grid.cpp:309
void add_back_v()
add a line of grid in the v direction at the end
Definition: grid.cpp:228
unsigned int internal_size_v
internal size v
Definition: grid.hpp:176
friend grid operator*(float s, const grid &g)
scale the grid homogeneously by a scalar
Definition: grid.cpp:122
void build_meshgrid()
build Matlab meshgrid style from 1 to size
Definition: grid.cpp:84
static grid read(const std::string &filename)
Read grid from a file.
Definition: grid.cpp:401
grid & operator*=(float s)
scale the grid homogeneously by a scalar
Definition: grid.cpp:114
Vectors/Points 3D.
Definition: vec3.hpp:36
void write(const std::string &filename)
Write grid into a file.
Definition: grid.cpp:381
std::vector< vec3 > internal_data
Internal storage under the form: ku+Nu*kv.
Definition: grid.hpp:179
void add_back_u()
add a line of grid in the u direction at the end
Definition: grid.cpp:183
void assert_size(unsigned int ku, unsigned int kv) const
ensure (ku,kv) is coherent with the size of the grid
Definition: grid.cpp:66
void suppress_back_v()
suppress a line of grid in the v direction at the end
Definition: grid.cpp:345