#ifndef SUBDIVIDE_H #define SUBDIVIDE_H #include "Mask3D.h" #include "VectorField3D.h" #include "FlowSubdiv3D.h" #include #include #include int subdivide(int, int, float*, float*); int mem_size(int, int); //Returns the correct size for memory allocation for a vector field //with original dimensions sizeXsizeXsize, being refined num_times //0 is a valid value for num_times (e.g. to allocate space for coarse grid) inline int mem_size(int num_times, int size) { for (int i = 0; i < num_times; i++) size = (2 * size) - 1; return (size * size * size * 3) + 3; } #endif