94 #ifdef T8_ENABLE_DEBUG
316 const t8_gloidx_t *data,
const size_t data_count,
int data_persists);
392 t8_cmesh_reorder (
t8_cmesh_t cmesh, sc_MPI_Comm comm);
430 t8_cmesh_save (
t8_cmesh_t cmesh,
const char *fileprefix);
434 t8_cmesh_load (
const char *filename, sc_MPI_Comm comm);
440 t8_cmesh_load_and_distribute (
const char *fileprefix,
int num_files, sc_MPI_Comm comm,
t8_load_mode_t mode,
701 const t8_locidx_t ltree_id,
const size_t data_count);
734 int8_t *first_tree_shared);
772 t8_cmesh_new_testhybrid (sc_MPI_Comm comm);
783 t8_cmesh_coords_axb (
const double *coords_in,
double *coords_out,
int num_vertices,
double alpha,
const double b[3]);
798 double *attr_vertices,
const int num_vertices);
Definition: t8_cmesh_types.h:157
t8_eclass_t eclass
The eclass of this ghost.
Definition: t8_cmesh_types.h:159
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
This structure holds the data of a local tree including the information about face neighbors.
Definition: t8_cmesh_types.h:189
The base class for all geometries.
Definition: t8_geometry_base.hxx:48
The scheme holds implementations for one or more element classes.
Definition: t8_element.h:51
Shared memory array structure.
Definition: t8_shmem.c:35
This is the administrative header file for t8code.
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:100
int32_t t8_locidx_t
A type for processor-local indexing.
Definition: t8.h:89
t8_locidx_t t8_cmesh_get_local_id(t8_cmesh_t cmesh, t8_gloidx_t global_id)
Return the local id of a give global tree.
Definition: t8_cmesh.cxx:1030
void t8_cmesh_init(t8_cmesh_t *pcmesh)
Create a new cmesh with reference count one.
Definition: t8_cmesh.cxx:155
void t8_cmesh_set_attribute_string(t8_cmesh_t cmesh, t8_gloidx_t gtree_id, int package_id, int key, const char *string)
Store a string as an attribute at a tree in a cmesh.
Definition: t8_cmesh.cxx:367
void t8_cmesh_set_profiling(t8_cmesh_t cmesh, int set_profiling)
Enable or disable profiling for a cmesh.
Definition: t8_cmesh.cxx:609
int t8_cmesh_treeid_is_ghost(const t8_cmesh_t cmesh, const t8_locidx_t ltreeid)
Query whether a given t8_locidx_t belongs to a ghost of a cmesh.
Definition: t8_cmesh.cxx:301
t8_ctree_t t8_cmesh_get_tree(t8_cmesh_t cmesh, t8_locidx_t ltree_id)
Return a pointer to a given local tree.
Definition: t8_cmesh.cxx:322
double * t8_cmesh_get_tree_vertices(t8_cmesh_t cmesh, t8_locidx_t ltreeid)
Return a pointer to the vertex coordinates of a tree.
Definition: t8_cmesh.cxx:388
void t8_cmesh_debug_print_trees(const t8_cmesh_t cmesh, sc_MPI_Comm comm)
Definition: t8_cmesh.cxx:1322
void t8_cmesh_unref(t8_cmesh_t *pcmesh)
Decrease the reference counter of a cmesh.
Definition: t8_cmesh.cxx:1229
int t8_cmesh_is_initialized(t8_cmesh_t cmesh)
Check whether a cmesh is not NULL, initialized and not committed.
Definition: t8_cmesh.cxx:45
void t8_cmesh_register_geometry(t8_cmesh_t cmesh, t8_geometry_c **geometry)
Register a geometry in the cmesh.
Definition: t8_cmesh_geometry.cxx:36
t8_eclass_t t8_cmesh_get_ghost_class(t8_cmesh_t cmesh, t8_locidx_t lghost_id)
Return the eclass of a given local ghost.
Definition: t8_cmesh.cxx:1005
void t8_cmesh_new_translate_vertices_to_attributes(const t8_locidx_t *tvertices, const double *vertices, double *attr_vertices, const int num_vertices)
TODO: Add proper documentation.
Definition: t8_cmesh.cxx:1268
void t8_cmesh_set_partition_range(t8_cmesh_t cmesh, int set_face_knowledge, t8_gloidx_t first_local_tree, t8_gloidx_t last_local_tree)
Declare if the cmesh is understood as a partitioned cmesh and specify the processor local tree range.
Definition: t8_cmesh.cxx:216
void t8_cmesh_print_profile(t8_cmesh_t cmesh)
Print the collected statistics from a cmesh profile.
Definition: t8_cmesh.cxx:1138
t8_shmem_array_t t8_cmesh_get_partition_table(t8_cmesh_t cmesh)
Return the shared memory array storing the partition table of a partitioned cmesh.
Definition: t8_cmesh.cxx:416
int t8_cmesh_is_partitioned(t8_cmesh_t cmesh)
Query whether a committed cmesh is partitioned or replicated.
Definition: t8_cmesh.cxx:922
t8_gloidx_t * t8_cmesh_get_attribute_gloidx_array(const t8_cmesh_t cmesh, const int package_id, const int key, const t8_locidx_t ltree_id, const size_t data_count)
Return the attribute pointer of a tree for a gloidx_t array.
Definition: t8_cmesh.cxx:408
t8_locidx_t t8_cmesh_get_num_ghosts(t8_cmesh_t cmesh)
Return the number of ghost trees of a cmesh.
Definition: t8_cmesh.cxx:948
t8_locidx_t t8_cmesh_get_num_local_trees(t8_cmesh_t cmesh)
Return the number of local trees of a cmesh.
Definition: t8_cmesh.cxx:939
t8_cmesh_t t8_cmesh_bcast(t8_cmesh_t cmesh_in, int root, sc_MPI_Comm comm)
Broadcast a cmesh structure that exists only on one process to all processes in the cmesh's communica...
Definition: t8_cmesh.cxx:684
const t8_geometry_c * t8_cmesh_get_tree_geometry(t8_cmesh_t cmesh, t8_gloidx_t gtreeid)
Get the geometry of a tree.
Definition: t8_cmesh_geometry.cxx:56
void t8_cmesh_set_join(t8_cmesh_t cmesh, t8_gloidx_t gtree1, t8_gloidx_t gtree2, int face1, int face2, int orientation)
Insert a face-connection between two trees in a cmesh.
Definition: t8_cmesh.cxx:578
void t8_cmesh_set_refine(t8_cmesh_t cmesh, int level, t8_scheme_cxx_t *scheme)
Refine the cmesh to a given level.
void t8_cmesh_translate_coordinates(const double *coords_in, double *coords_out, int num_vertices, double translate[3])
Compute y = x + translate on an array of doubles, interpreting each 3 as one vector x.
Definition: t8_cmesh.cxx:1249
int t8_cmesh_validate_geometry(const t8_cmesh_t cmesh)
Check the geometry of the mesh for validity.
Definition: t8_cmesh.cxx:127
t8_ctree_t t8_cmesh_get_next_tree(t8_cmesh_t cmesh, t8_ctree_t tree)
Given a local tree in a cmesh return a pointer to the next local tree.
Definition: t8_cmesh.cxx:347
t8_gloidx_t t8_cmesh_get_global_id(t8_cmesh_t cmesh, t8_locidx_t local_id)
Return the global id of a given local tree or ghost.
Definition: t8_cmesh.cxx:1018
t8_ctree_t t8_cmesh_get_first_tree(t8_cmesh_t cmesh)
Return a pointer to the first local tree in a cmesh.
Definition: t8_cmesh.cxx:334
int t8_cmesh_tree_vertices_negative_volume(const t8_eclass_t eclass, const double *vertices, const int num_vertices)
Given a set of vertex coordinates for a tree of a given eclass.
Definition: t8_cmesh.cxx:471
void t8_cmesh_coords_axb(const double *coords_in, double *coords_out, int num_vertices, double alpha, const double b[3])
Compute y = ax + b on an array of doubles, interpreting each 3 as one vector x.
Definition: t8_cmesh.cxx:1282
t8_shmem_array_t t8_cmesh_alloc_offsets(int mpisize, sc_MPI_Comm comm)
Allocate a shared memory array to store the tree offsets of a cmesh.
Definition: t8_cmesh.cxx:200
int t8_cmesh_is_committed(const t8_cmesh_t cmesh)
Check whether a cmesh is not NULL, initialized and committed.
Definition: t8_cmesh.cxx:89
void t8_cmesh_ref(t8_cmesh_t cmesh)
Increase the reference counter of a cmesh.
Definition: t8_cmesh.cxx:1222
t8_locidx_t t8_cmesh_ltreeid_to_ghostid(const t8_cmesh_t cmesh, const t8_locidx_t ltreeid)
Given a local tree id that belongs to a ghost, return the index of the ghost.
Definition: t8_cmesh.cxx:311
int t8_cmesh_tree_face_is_boundary(t8_cmesh_t cmesh, t8_locidx_t ltree_id, int face)
Query whether a face of a local tree or ghost is at the domain boundary.
Definition: t8_cmesh.cxx:957
t8_locidx_t t8_cmesh_get_face_neighbor(const t8_cmesh_t cmesh, const t8_locidx_t ltreeid, const int face, int *dual_face, int *orientation)
Given a local tree id and a face number, get information about the face neighbor tree.
Definition: t8_cmesh.cxx:1068
t8_gloidx_t t8_cmesh_get_first_treeid(t8_cmesh_t cmesh)
Return the global index of the first local tree of a cmesh.
Definition: t8_cmesh.cxx:287
void t8_cmesh_commit(t8_cmesh_t cmesh, sc_MPI_Comm comm)
After allocating and adding properties to a cmesh, finish its construction.
Definition: t8_cmesh_commit.cxx:518
int t8_cmesh_no_negative_volume(t8_cmesh_t cmesh)
After a cmesh is committed, check whether all trees in a cmesh do have positive volume.
Definition: t8_cmesh.cxx:536
void t8_cmesh_destroy(t8_cmesh_t *pcmesh)
Verify that a coarse mesh has only one reference left and destroy it.
Definition: t8_cmesh.cxx:1241
t8_gloidx_t t8_cmesh_get_num_trees(t8_cmesh_t cmesh)
Return the global number of trees in a cmesh.
Definition: t8_cmesh.cxx:930
t8_eclass_t t8_cmesh_get_tree_class(t8_cmesh_t cmesh, t8_locidx_t ltree_id)
Return the eclass of a given local tree.
Definition: t8_cmesh.cxx:993
void t8_cmesh_uniform_bounds(t8_cmesh_t cmesh, int level, t8_scheme_cxx_t *ts, t8_gloidx_t *first_local_tree, t8_gloidx_t *child_in_tree_begin, t8_gloidx_t *last_local_tree, t8_gloidx_t *child_in_tree_end, int8_t *first_tree_shared)
Calculate the section of a uniform forest for the current rank.
Definition: t8_cmesh_cxx.cxx:35
void t8_cmesh_set_attribute_gloidx_array(t8_cmesh_t cmesh, t8_gloidx_t gtree_id, int package_id, int key, const t8_gloidx_t *data, const size_t data_count, int data_persists)
Store an array of t8_gloidx_t as an attribute at a tree in a cmesh.
Definition: t8_cmesh.cxx:378
void t8_cmesh_set_dimension(t8_cmesh_t cmesh, int dim)
Set the dimension of a cmesh.
Definition: t8_cmesh.cxx:429
void t8_cmesh_set_tree_class(t8_cmesh_t cmesh, t8_gloidx_t gtree_id, t8_eclass_t tree_class)
Set the class of a tree in the cmesh.
Definition: t8_cmesh.cxx:438
int t8_cmesh_is_empty(t8_cmesh_t cmesh)
Check whether a cmesh is empty on all processes.
Definition: t8_cmesh.cxx:678
int t8_cmesh_treeid_is_local_tree(const t8_cmesh_t cmesh, const t8_locidx_t ltreeid)
Query whether a given t8_locidx_t belongs to a local tree of a cmesh.
Definition: t8_cmesh.cxx:293
int t8_cmesh_comm_is_valid(t8_cmesh_t cmesh, sc_MPI_Comm comm)
Check whether a given MPI communicator assigns the same rank and mpisize as stored in a cmesh.
Definition: t8_cmesh.cxx:140
void t8_cmesh_set_partition_uniform(t8_cmesh_t cmesh, int element_level, t8_scheme_cxx_t *ts)
Declare if the cmesh is understood as a partitioned cmesh where the partition table is derived from a...
Definition: t8_cmesh.cxx:266
void t8_cmesh_set_derive(t8_cmesh_t cmesh, t8_cmesh_t set_from)
This function sets a cmesh to be derived from.
Definition: t8_cmesh.cxx:181
void t8_cmesh_set_partition_offsets(t8_cmesh_t cmesh, t8_shmem_array_t tree_offsets)
Declare if the cmesh is understood as a partitioned cmesh and specify the first local tree for each p...
Definition: t8_cmesh.cxx:245
int t8_cmesh_is_equal(t8_cmesh_t cmesh_a, t8_cmesh_t cmesh_b)
Check whether two given cmeshes carry the same information.
Definition: t8_cmesh.cxx:626
void t8_cmesh_set_tree_geometry(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const t8_geometry_c *geom)
Set the geometry for a tree, thus specify which geometry to use for this tree.
Definition: t8_cmesh_geometry.cxx:46
void * t8_cmesh_get_attribute(const t8_cmesh_t cmesh, const int package_id, const int key, const t8_locidx_t ltree_id)
Return the attribute pointer of a tree.
Definition: t8_cmesh.cxx:397
void t8_cmesh_set_attribute(t8_cmesh_t cmesh, t8_gloidx_t gtree_id, int package_id, int key, void *data, size_t data_size, int data_persists)
Store an attribute at a tree in a cmesh.
Definition: t8_cmesh.cxx:357
We define routines to save and load a cmesh to/from the file system.
enum t8_load_mode t8_load_mode_t
This enumeration contains all modes in which we can open a saved cmesh.
We define all possible element classes that occur in hybrid meshes.
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.
This file defines basic operations on an element in a refinement tree.
Typedef for the t8_geometry class in order to be usable as a pointer from .c files.
We define basic shared memory routines.