p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
p4est_build.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 Written by Carsten Burstedde, Lucas C. Wilcox, and Tobin Isaac
8
9 p4est is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 p4est is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with p4est; if not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22*/
23
24#ifndef P4EST_BUILD_H
25#define P4EST_BUILD_H
26
27#include <p4est.h>
28
29SC_EXTERN_C_BEGIN;
30
43typedef struct p4est_build p4est_build_t;
44
58 size_t data_size,
59 p4est_init_t init_fn,
60 void *user_pointer);
61
69 p4est_init_t add_init_fn);
70
90 p4est_topidx_t which_tree,
91 p4est_quadrant_t * quadrant);
92
99
100SC_EXTERN_C_END;
101
102#endif /* ! P4EST_BUILD_H */
The top-level 2D p4est interface.
void(* p4est_init_t)(p4est_t *p4est, p4est_topidx_t which_tree, p4est_quadrant_t *quadrant)
Callback function prototype to initialize the quadrant's user data.
Definition: p4est.h:203
int32_t p4est_topidx_t
Typedef for counting topological entities (trees, tree vertices).
Definition: p4est_base.h:93
p4est_t * p4est_build_complete(p4est_build_t *build)
Finalize the construction of the new forest after adding quadrants.
struct p4est_build p4est_build_t
Context object for building a new p4est from individual quadrants.
Definition: p4est_build.h:43
int p4est_build_add(p4est_build_t *build, p4est_topidx_t which_tree, p4est_quadrant_t *quadrant)
This function is usable from a p4est_search_local_t callback.
void p4est_build_init_add(p4est_build_t *build, p4est_init_t add_init_fn)
Set a dedicated initialization callback for manually added quadrants.
p4est_build_t * p4est_build_new(p4est_t *from, size_t data_size, p4est_init_t init_fn, void *user_pointer)
Allocate a context for building a new forest.
The 2D quadrant datatype.
Definition: p4est.h:72
The p4est forest datatype.
Definition: p4est.h:136