/* Routines that create example grids. */ /* Last edited on 2005-06-05 19:19:58 by stolfi */ #ifndef somegrids_H #define somegrids_H #include #include #include #include #include /* Max dimension of grid's domain: */ #define MAX_DDIM (3) /* Max dimension of grid's range space {(X,Y,F(X,Y))}: */ #define MAX_RDIM (5) /* Flatness tolerance (mm): */ #define TOL_MM (0.5) dg_tree_node_t *somegrid_adaptive(dg_dim_t d, dg_rank_t maxDp, bz_patch_t *b); /* Creates a finite dyadic grid of dimension {d} and maximum depth {maxDp}, with gradually varying resolution. Assumes that the root cell has shape {b}. */ dg_tree_node_t *somegrid_varied(dg_dim_t d, dg_rank_t splitDp, dg_rank_t maxDp, bz_patch_t *b); /* Creates a random finite dyadic grid of dimension {d} and maximum depth {maxDp}. Levels {0..splitDp-1} are completely split. Levels {splitDp..maxDp-1} are split with highly varied pattern; at least one cell in each level is left unsplit, and one of them is split. Assumes that the root cell has shape {b}. */ #endif