 |
Shiokaze Framework
A research-oriented fluid solver for computer graphics
|
|
Go to the documentation of this file.
25 #ifndef SHKZ_ARRAY_UPSAMPLER3_H
26 #define SHKZ_ARRAY_UPSAMPLER3_H
46 assert(doubled_array.
shape() == 2*array.
shape());
49 for(
int ii=0; ii<2; ++ii )
for(
int jj=0; jj<2; ++jj )
for(
int kk=0; kk<2; ++kk ) {
50 vec3i pi (2*i+ii,2*j+jj,2*k+kk);
52 doubled_array.
set(pi,0.0);
59 it.set(array_interpolator3::interpolate<T>(array,p));
81 for(
int ii=0; ii<2; ++ii )
for(
int jj=0; jj<2; ++jj )
for(
int kk=0; kk<2; ++kk ) {
82 vec3i pi (2*i+ii,2*j+jj,2*k+kk);
84 doubled_array.
set(pi,0.0);
91 it.set(array_interpolator3::interpolate<T>(array,p));
void flood_fill()
Perform flood fill. Grid should be set either level set of fillable beforehand.
Definition: array3.h:299
bool out_of_bounds(int i, int j, int k) const
Get if the position is outside of the index space of this shape.
Definition: shape.h:811
bool is_levelset() const
Return if the grid is set level set.
Definition: array3.h:292
void set(int i, int j, int k, const T &value)
Set value on grid.
Definition: array3.h:522
T get_background_value() const
Get the background value (alternatively, initial value) of the grid.
Definition: array3.h:477
Structure that defines a three dimensional shape such as width, height and depth.
Definition: shape.h:478
#define SHKZ_BEGIN_NAMESPACE
Name space beggining definition for shiokaze.
Definition: common.h:39
void const_serial_actives(std::function< void(const const_iterator &it)> func) const
Loop over all the active cells in serial order by read-only fashion.
Definition: array3.h:1420
void set_as_levelset(double bandwidth_half)
Set the grid as level set.
Definition: array3.h:242
Namesampe for upsampling grids.
Definition: array_upsampler3.h:35
void parallel_actives(std::function< void(iterator &it)> func)
Loop over all the active cells in parallel.
Definition: array3.h:1143
vec< Y, D > nodal() const
Compute the position of the nodal position from the index space.
Definition: vec.h:364
void upsample_to_double_nodal(const array3< T > &array, double dx, array3< T > &doubled_array)
Upsample a nodal grid to double sized.
Definition: array_upsampler3.h:76
Fixed sized vector structure.
Definition: vec.h:38
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44
void upsample_to_double_cell(const array3< T > &array, double dx, array3< T > &doubled_array)
Upsample a cell-centerd grid to double sized.
Definition: array_upsampler3.h:44
shape3 shape() const
Get the shape of the array.
Definition: array3.h:218
vec< Y, D > cell() const
Compute the position of the center of a cell from the index space.
Definition: vec.h:353
Three dimensional array class designed to be defined as instance member in recursive_configurable cla...
Definition: array3.h:42