p4est 2.8.7.456-de8c6
p4est is a software library for parallel adaptive mesh refinement.
Loading...
Searching...
No Matches
search/search_replicated3.c

This 3D example program replicates a set of random points on all processes and searches them in a forest locally as well as in its partition and checks the results for consistency.

This 3D example program replicates a set of random points on all processes and searches them in a forest locally as well as in its partition and checks the results for consistency. The query points are replicated on all processes. First, they are entered into the local search and the amount of queries found in the local part of the forest is stored for each process. Next, the queries are entered into the partition search and the amount of queries assigned to each process is compared to the results of the local search, to check for consistency.

The forest is a 2x2x2 brick covering the unit cube. First, it is refined uniformly to a user-specified level. Then, it is refined adaptively around two refinement center points a and b. The query points are created with a random distribution that clusters them around the refinement point b and another point c. As a result, both searches are tested for

The adaptive refinement of the forest can be controlled by its maxlevel and its level of uniform refinement. In particular, by choosing the maxlevel small enough, a uniform p4est can be enforced. Similarly, the query point creation can be controlled by the "clustering exponent" c. Setting c to 0 leads to a uniform distribution. Higher values of c lead to the query points increasingly clustering around point b and point c. To check the distribution, the vtk output of the uniform forest can be checked for the amount of queries found in each octant.

Usage: p8est_search_replicated with the following options:

*    -h | --help                  Print help message and exit cleanly
*    -l | --minlevel  <INT>       Level of uniform refinement
*    -L | --maxlevel  <INT>       Level of maximum refinement
*    -q | --num-queries <SIZE_T>  Number of queries created per process
*    -s | --seed      <INT>       Seed for random queries
*    -v | --write-vtk [0fFnN1tTyY] Activate vtk output
*    -c | --clustering-exponent <REAL> Clustering of queries 
/*
This file is part of p4est.
p4est is a C library to manage a collection (a forest) of multiple
connected adaptive quadtrees or octrees in parallel.
Copyright (C) 2010 The University of Texas System
Additional copyright (C) 2011 individual authors
Written by Carsten Burstedde, Lucas C. Wilcox, and Tobin Isaac
p4est is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
p4est is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with p4est; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <p4est_to_p8est.h>
#include "search_replicated2.c"