30 #ifndef P8EST_LNODES_H
31 #define P8EST_LNODES_H
163 sc_array_t shared_nodes;
228 int hanging_edge[12])
230 P4EST_ASSERT (face_code >= 0);
234 int16_t c = face_code & 0x0007;
238 int16_t work = face_code >> 3;
240 memset (hanging_face, -1, 6 *
sizeof (
int));
241 memset (hanging_edge, -1, 12 *
sizeof (
int));
244 for (i = 0; i < 3; ++i) {
248 for (j = 0; j < 4; j++) {
255 for (i = 0; i < 3; ++i) {
258 hanging_edge[e] = (hanging_edge[e] == -1) ? 0 : 2;
259 hanging_edge[e] += (int) (cwork & 0x0001);
304 int partition_for_coarsening);
311 int nodes_per_volume,
314 int nodes_per_corner,
316 partition_for_coarsening);
358 sc_array_t *requests;
359 sc_array_t *send_buffers;
360 sc_array_t *recv_buffers;
433 p8est_lnodes_rank_array_index_int (sc_array_t * array,
int it)
436 P4EST_ASSERT (it >= 0 && (
size_t) it < array->elem_count);
446 p8est_lnodes_rank_array_index (sc_array_t * array,
size_t it)
449 P4EST_ASSERT (it < array->elem_count);
461 P4EST_ASSERT (lidx >= 0 && lidx < lnodes->num_local_nodes);
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
const int p8est_corner_faces[8][3]
Store the face numbers 0..5 for each tree corner.
const int p8est_face_edges[6][4]
Store the edge numbers 0..12 for each tree face.
const int p8est_corner_face_corners[8][6]
Store the face corner numbers for the faces touching a tree corner.
const int p8est_corner_edges[8][3]
Store the edge numbers 0..11 for each tree corner.
Passing quadrants and data to neighboring processes.
int16_t p8est_lnodes_code_t
The face code encodes the configuration of a hanging quadrant.
Definition: p8est_lnodes.h:46
void p8est_lnodes_share_owned(sc_array_t *node_data, p8est_lnodes_t *lnodes)
Equivalent to calling p8est_lnodes_share_owned_end directly after p8est_lnodes_share_owned_begin.
void p8est_lnodes_destroy(p8est_lnodes_t *lnodes)
Free all memory in a previously constructed lnodes structure.
void p8est_ghost_support_lnodes(p8est_t *p8est, p8est_lnodes_t *lnodes, p8est_ghost_t *ghost)
Expand the ghost layer to include the support of all nodes supported on the local partition.
struct p8est_lnodes_rank p8est_lnodes_rank_t
The structure stored in the sharers array.
void p8est_partition_lnodes_detailed(p8est_t *p4est, p8est_ghost_t *ghost, int nodes_per_volume, int nodes_per_face, int nodes_per_edge, int nodes_per_corner, int partition_for_coarsening)
Partition using weights that are broken down by where they reside: in volumes, on faces,...
struct p8est_lnodes_buffer p8est_lnodes_buffer_t
p8est_lnodes_buffer_t handles the communication of data associated with nodes.
p8est_lnodes_buffer_t * p8est_lnodes_share_all_begin(sc_array_t *node_data, p8est_lnodes_t *lnodes)
p8est_lnodes_share_all_begin
p8est_lnodes_buffer_t * p8est_lnodes_share_all(sc_array_t *node_data, p8est_lnodes_t *lnodes)
Equivalend to calling p8est_lnodes_share_all_end directly after p8est_lnodes_share_all_begin.
void p8est_ghost_expand_by_lnodes(p8est_t *p8est, p8est_lnodes_t *lnodes, p8est_ghost_t *ghost)
Expand the ghost layer as in p8est_ghost_expand(), but use node support to define adjacency instead o...
struct p8est_lnodes p8est_lnodes_t
Store a parallel numbering of Lobatto points of a given degree > 0.
const int p8est_lnodes_corner_hanging[8]
For each corner, the direction of the hanging face/edge.
void p8est_partition_lnodes(p8est_t *p8est, p8est_ghost_t *ghost, int degree, int partition_for_coarsening)
Partition using weights based on the number of nodes assigned to each element in lnodes.
p8est_lnodes_t * p8est_lnodes_new(p8est_t *p8est, p8est_ghost_t *ghost_layer, int degree)
Create a tensor-product Lobatto node structure for a given degree.
p8est_lnodes_buffer_t * p8est_lnodes_share_owned_begin(sc_array_t *node_data, p8est_lnodes_t *lnodes)
p8est_lnodes_share_owned_begin
The p4est forest datatype.
Definition: p4est.h:150
Quadrants that neighbor the local domain.
Definition: p8est_ghost.h:46
p8est_lnodes_buffer_t handles the communication of data associated with nodes.
Definition: p8est_lnodes.h:357
The structure stored in the sharers array.
Definition: p8est_lnodes.h:161
Store a parallel numbering of Lobatto points of a given degree > 0.
Definition: p8est_lnodes.h:127
p4est_locidx_t * element_nodes
Flat list: element_nodes * vnodes.
Definition: p8est_lnodes.h:145
p4est_gloidx_t global_offset
Global number of first local node.
Definition: p8est_lnodes.h:131
p4est_locidx_t owned_count
Number of owned nodes of process.
Definition: p8est_lnodes.h:130
int vnodes
Number of nodes of each element.
Definition: p8est_lnodes.h:141
sc_array_t * sharers
Encoding of sharer processes' nodes.
Definition: p8est_lnodes.h:133
p4est_locidx_t num_local_nodes
Number of nodes known to process.
Definition: p8est_lnodes.h:129
int degree
Degree used in construction.
Definition: p8est_lnodes.h:138
sc_MPI_Comm mpicomm
Valid MPI communicator.
Definition: p8est_lnodes.h:128
p4est_locidx_t * global_owned_count
For each rank: owned count.
Definition: p8est_lnodes.h:136
p4est_locidx_t num_local_elements
Elements local to process.
Definition: p8est_lnodes.h:142
p4est_gloidx_t * nonlocal_nodes
For nonlocal nodes: global number.
Definition: p8est_lnodes.h:132
p8est_lnodes_code_t * face_code
One entry per local element encoding its hanging situation.
Definition: p8est_lnodes.h:143
The p8est forest datatype.
Definition: p8est.h:146