#ifndef dg_test_tools_H #define dg_test_tools_H /* Finite dyadic multigrids in arbitrary dimension */ /* Last edited on 2009-05-18 14:10:28 by stolfi */ #include #include #include #include "mdg_grid.h" #include "dg_tree.h" #include "mdg_grid.h" #include "dg_tree.h" #include "bool.h" #include "vec.h" #include "jsmath.h" #include "intheap.h" double dg_test_dist_canonical_torus(mdg_dim_t d, double x[], double y[]); /* Distance from {x} to {y} on the canonical torus with dimension {d}. */ double dg_test_local_tol(mdg_dim_t d, double x[], double eps); /* A sample function that returns the maximum box radius allowed near the point {x[0..d-1]}. This version retursn the distance from {x} to two point-like zeros and a hypersurface-like zero, all inside the canonical cell. The distance is cooked so that it is always {eps} or more. */ dg_tree_t dg_test_make_trivial_tree(void); /* Creates a trivial (single-node) dyadic grid. */ dg_tree_t dg_test_make_adaptive_grid ( mdg_dim_t d, mdg_rank_t minRank, mdg_rank_t maxRank, long int numCells ); /* Creates a finite dyadic grid of dimension {d}, with {numCells} cells, and all leaves in levels between {minRank} and {maxRank}. The patch {b} is subdivided along and stored in the tree nodes. */ #endif