 |
Shiokaze Framework
A research-oriented fluid solver for computer graphics
|
|
Go to the documentation of this file.
25 #ifndef SHKZ_ARRAY_EXTRAPOLATOR3_H
26 #define SHKZ_ARRAY_EXTRAPOLATOR3_H
47 template<
class T>
unsigned extrapolate_if (
array3<T> &array, std::function<
bool(
int i,
int j,
int k,
int thread_index )> func,
int count=1 ) {
52 array.
dilate([&](
int i,
int j,
int k,
auto &it,
int tn ) {
58 for(
int nq=0; nq<6; nq++ ) {
75 for(
const auto &e : counters ) sum += e;
87 return extrapolate_if(array,[&](
int i,
int j,
int k,
int tn){
return true; },count);
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 active(int i, int j, int k) const
Get if a position on grid is active.
Definition: array3.h:552
Structure that defines a three dimensional shape such as width, height and depth.
Definition: shape.h:478
int get_thread_num() const
Get the current number of threads for parallel processing on this grid.
Definition: array3.h:954
#define SHKZ_BEGIN_NAMESPACE
Name space beggining definition for shiokaze.
Definition: common.h:39
void dilate(std::function< void(int i, int j, int k, iterator &it, int thread_index)> func, int count=1)
Dilate cells.
Definition: array3.h:1661
Fixed sized vector structure.
Definition: vec.h:38
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44
shape3 shape() const
Get the shape of the array.
Definition: array3.h:218
Three dimensional array class designed to be defined as instance member in recursive_configurable cla...
Definition: array3.h:42