#ifndef dg_test_tools_H #define dg_test_tools_H /* Finite dyadic multigrids in arbitrary dimension */ /* Last edited on 2014-05-15 22:00:12 by stolfilocal */ #define _GNU_SOURCE #include #include #include #include #include #include double dg_test_dist_canonical_torus(dg_dim_t d, double x[], double y[]); /* Distance from {x} to {y} on the canonical torus with dimension {d}. */ double dg_test_local_tol(dg_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 ( dg_dim_t d, dg_rank_t minRank, dg_rank_t maxRank, int64_t 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