/* Routines that create example grids. */ /* Last edited on 2009-08-21 15:16:20 by stolfilocal */ #ifndef somegrids_H #define somegrids_H #include #include #include #include #include "mdg_grid.h" #include "dg_tree.h" #include "bz_patch.h" #include "dg_makegrid.h" #include "dg_test_tools.h" #include "affirm.h" #include "bool.h" #include "figtools.h" #include "interp_integ.h" /* 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(mdg_dim_t d, mdg_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(mdg_dim_t d, mdg_rank_t splitDp, mdg_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