t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Data Structures | Typedefs | Functions
t8_element.h File Reference

This file defines basic operations on an element in a refinement tree. More...

#include <sc_refcount.h>
#include <t8_eclass.h>
#include <t8_element_shape.h>

Go to the source code of this file.

Data Structures

struct  t8_scheme_cxx
 The scheme holds implementations for one or more element classes. More...
 

Typedefs

typedef struct t8_element t8_element_t
 Opaque structure for a generic element, only used as pointer. More...
 
typedef struct t8_eclass_scheme t8_eclass_scheme_c
 This typedef holds virtual functions for a particular element class.
 
typedef struct t8_scheme_cxx t8_scheme_cxx_t
 

Functions

void t8_scheme_cxx_ref (t8_scheme_cxx_t *scheme)
 Increase the reference counter of a scheme. More...
 
void t8_scheme_cxx_unref (t8_scheme_cxx_t **pscheme)
 Decrease the reference counter of a scheme. More...
 
void t8_scheme_cxx_destroy (t8_scheme_cxx_t *s)
 

Detailed Description

This file defines basic operations on an element in a refinement tree.

All operations work for all element classes by providing a virtual function table. For each element class, one implementation of the type and virtual table is required.

Typedef Documentation

◆ t8_element_t

typedef struct t8_element t8_element_t

Opaque structure for a generic element, only used as pointer.

Implementations are free to cast it to their internal data structure.

Function Documentation

◆ t8_scheme_cxx_ref()

void t8_scheme_cxx_ref ( t8_scheme_cxx_t scheme)

Increase the reference counter of a scheme.

Parameters
[in,out]schemeOn input, this scheme must be alive, that is, exist with positive reference count.

◆ t8_scheme_cxx_unref()

void t8_scheme_cxx_unref ( t8_scheme_cxx_t **  pscheme)

Decrease the reference counter of a scheme.

If the counter reaches zero, this scheme is destroyed.

Parameters
[in,out]pschemeOn input, the scheme pointed to must exist with positive reference count. If the reference count reaches zero, the scheme is destroyed and this pointer set to NULL. Otherwise, the pointer is not changed and the scheme is not modified in other ways.