 |
Shiokaze Framework
A research-oriented fluid solver for computer graphics
|
|
Go to the documentation of this file.
25 #ifndef SHKZ_ARRAY_UPSAMPLER2_H
26 #define SHKZ_ARRAY_UPSAMPLER2_H
46 assert(doubled_array.
shape() == 2*array.
shape());
49 for(
int ii=0; ii<2; ++ii )
for(
int jj=0; jj<2; ++jj ) {
50 vec2i pi (2*i+ii,2*j+jj);
52 doubled_array.
set(pi,0.0);
59 it.set(array_interpolator2::interpolate<T>(array,p));
81 for(
int ii=0; ii<2; ++ii )
for(
int jj=0; jj<2; ++jj ) {
82 vec2i pi (2*i+ii,2*j+jj);
84 doubled_array.
set(pi,0.0);
91 it.set(array_interpolator2::interpolate<T>(array,p));
void flood_fill()
Perform flood fill. Grid should be set either level set of fillable beforehand.
Definition: array2.h:299
void set(int i, int j, const T &value)
Set value on grid.
Definition: array2.h:518
void upsample_to_double_nodal(const array2< T > &array, double dx, array2< T > &doubled_array)
Upsample a nodal grid to double sized.
Definition: array_upsampler2.h:76
void parallel_actives(std::function< void(iterator &it)> func)
Loop over all the active cells in parallel.
Definition: array2.h:1123
Namesampe for upsampling grids.
Definition: array_upsampler2.h:35
bool is_levelset() const
Return if the grid is set level set.
Definition: array2.h:292
T get_background_value() const
Get the background value (alternatively, initial value) of the grid.
Definition: array2.h:475
void set_as_levelset(double bandwidth_half)
Set the grid as level set.
Definition: array2.h:242
bool out_of_bounds(int i, int j) const
Get if the position is outside of the index space of this shape.
Definition: shape.h:341
shape2 shape() const
Get the shape of the array.
Definition: array2.h:218
#define SHKZ_BEGIN_NAMESPACE
Name space beggining definition for shiokaze.
Definition: common.h:39
vec< Y, D > nodal() const
Compute the position of the nodal position from the index space.
Definition: vec.h:364
Fixed sized vector structure.
Definition: vec.h:38
Two dimensional array class designed to be defined as instance member in recursive_configurable class...
Definition: array2.h:42
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: array2.h:1400
Structure that defines shape such as width, height.
Definition: shape.h:42
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44
vec< Y, D > cell() const
Compute the position of the center of a cell from the index space.
Definition: vec.h:353
void upsample_to_double_cell(const array2< T > &array, double dx, array2< T > &doubled_array)
Upsample a cell-centerd grid to double sized.
Definition: array_upsampler2.h:44