p4est 2.8.7.456-de8c6
p4est is a software library for parallel adaptive mesh refinement.
Loading...
Searching...
No Matches
p6est_extended.h
Go to the documentation of this file.
1/*
2 This file is part of p4est.
3 p4est is a C library to manage a collection (a forest) of multiple
4 connected adaptive quadtrees or octrees in parallel.
5
6 Copyright (C) 2010 The University of Texas System
7 Additional copyright (C) 2011 individual authors
8 Written by Carsten Burstedde, Lucas C. Wilcox, and Tobin Isaac
9
10 p4est is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 p4est is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with p4est; if not, write to the Free Software Foundation, Inc.,
22 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23*/
24
25#ifndef P6EST_EXTENDED_H
26#define P6EST_EXTENDED_H
27
28/********************************************************************
29 * IMPORTANT NOTE *
30 * *
31 * These interfaces are intended for those who like finer control. *
32 * The API offers extended versions of some basic p6est functions. *
33 * The API may change without notice. *
34 ********************************************************************/
35
43#include <p6est.h>
44
45SC_EXTERN_C_BEGIN;
46
72p6est_t *p6est_new_ext (sc_MPI_Comm mpicomm,
73 p6est_connectivity_t * connectivity,
74 p4est_locidx_t min_quadrants,
75 int min_level, int min_zlevel,
76 int num_zroot,
77 int fill_uniform, size_t data_size,
78 p6est_init_t init_fn, void *user_pointer);
79
91p6est_t *p6est_copy_ext (p6est_t * input, int copy_data,
92 int duplicate_mpicomm);
93
113void p6est_save_ext (const char *filename, p6est_t * p6est,
114 int save_data, int save_partition);
115
139p6est_t *p6est_load_ext (const char *filename, sc_MPI_Comm mpicomm,
140 size_t data_size, int load_data,
141 int autopartition, int broadcasthead,
142 void *user_pointer,
143 p6est_connectivity_t ** connectivity);
144
168 int refine_recursive,
169 int maxlevel,
170 p6est_refine_column_t refine_fn,
171 p6est_init_t init_fn,
172 p6est_replace_t replace_fn);
173
197 int refine_recursive,
198 int maxlevel,
199 p6est_refine_layer_t refine_fn,
200 p6est_init_t init_fn,
201 p6est_replace_t replace_fn);
202
222 int coarsen_recursive,
223 int callback_orphans,
225 coarsen_fn,
226 p6est_init_t init_fn,
227 p6est_replace_t replace_fn);
228
248 int coarsen_recursive,
249 int callback_orphans,
251 coarsen_fn,
252 p6est_init_t init_fn,
253 p6est_replace_t replace_fn);
254
268 int partition_for_coarsening,
269 p6est_weight_t weight_fn);
270
288 int max_diff, int min_diff,
289 p6est_init_t init_fn,
290 p6est_replace_t replace_fn);
291
292SC_EXTERN_C_END;
293
294#endif
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition p4est_base.h:106
int64_t p4est_gloidx_t
Typedef for globally unique indexing of quadrants.
Definition p4est_base.h:118
A hybrid 2D+1D AMR extension.
int(* p6est_refine_column_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column)
Callback function prototype to decide whether to horizontally refine a column, i.e....
Definition p6est.h:251
void(* p6est_init_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layer)
Callback function prototype to initialize the layers's user data.
Definition p6est.h:203
int(* p6est_weight_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layer)
Callback function prototype to calculate weights for partitioning.
Definition p6est.h:285
int(* p6est_coarsen_column_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *columns[])
Callback function prototype to decide for horizontal coarsening.
Definition p6est.h:268
void(* p6est_replace_t)(p6est_t *p6est, p4est_topidx_t which_tree, int num_outcolumns, int num_outlayers, p4est_quadrant_t *outcolumns[], p2est_quadrant_t *outlayers[], int num_incolumns, int num_inlayers, p4est_quadrant_t *incolumns[], p2est_quadrant_t *inlayers[])
Callback function prototype to transfer information from outgoing layers to incoming layers.
Definition p6est.h:236
int(* p6est_refine_layer_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layer)
Callback function prototype to decide whether to vertically refine a layer.
Definition p6est.h:259
int(* p6est_coarsen_layer_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layers[])
Callback function prototype to decide for vertical coarsening.
Definition p6est.h:276
p6est_t * p6est_load_ext(const char *filename, sc_MPI_Comm mpicomm, size_t data_size, int load_data, int autopartition, int broadcasthead, void *user_pointer, p6est_connectivity_t **connectivity)
Load the complete connectivity/p6est structure from disk.
p4est_gloidx_t p6est_partition_ext(p6est_t *p6est, int partition_for_coarsening, p6est_weight_t weight_fn)
Repartition the forest.
void p6est_refine_layers_ext(p6est_t *p6est, int refine_recursive, int maxlevel, p6est_refine_layer_t refine_fn, p6est_init_t init_fn, p6est_replace_t replace_fn)
Vertically refine a forest with a bounded refinement level and a replace option.
void p6est_balance_ext(p6est_t *p6est, p8est_connect_type_t btype, int max_diff, int min_diff, p6est_init_t init_fn, p6est_replace_t replace_fn)
2:1 balance the size differences of neighboring elements in a forest.
void p6est_refine_columns_ext(p6est_t *p6est, int refine_recursive, int maxlevel, p6est_refine_column_t refine_fn, p6est_init_t init_fn, p6est_replace_t replace_fn)
Horizontally refine a forest with a bounded refinement level and a replace option.
void p6est_coarsen_layers_ext(p6est_t *p6est, int coarsen_recursive, int callback_orphans, p6est_coarsen_layer_t coarsen_fn, p6est_init_t init_fn, p6est_replace_t replace_fn)
Vertically coarsen a forest.
void p6est_save_ext(const char *filename, p6est_t *p6est, int save_data, int save_partition)
Save the complete connectivity/p6est data to disk.
p6est_t * p6est_copy_ext(p6est_t *input, int copy_data, int duplicate_mpicomm)
Make a deep copy of a p6est.
p6est_t * p6est_new_ext(sc_MPI_Comm mpicomm, p6est_connectivity_t *connectivity, p4est_locidx_t min_quadrants, int min_level, int min_zlevel, int num_zroot, int fill_uniform, size_t data_size, p6est_init_t init_fn, void *user_pointer)
Create a new forest.
void p6est_coarsen_columns_ext(p6est_t *p6est, int coarsen_recursive, int callback_orphans, p6est_coarsen_column_t coarsen_fn, p6est_init_t init_fn, p6est_replace_t replace_fn)
Horizontally coarsen a forest.
p8est_connect_type_t
Characterize a type of adjacency.
Definition p8est_connectivity.h:120
This structure holds the 2D+1D inter-tree connectivity information.
Definition p6est.h:65
The p6est forest datatype.
Definition p6est.h:167