t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_element.h
Go to the documentation of this file.
1 /*
2  This file is part of t8code.
3  t8code is a C library to manage a collection (a forest) of multiple
4  connected adaptive space-trees of general element classes in parallel.
5 
6  Copyright (C) 2015 the developers
7 
8  t8code is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  t8code is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with t8code; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22 
30 #ifndef T8_ELEMENT_H
31 #define T8_ELEMENT_H
32 
33 #include <sc_refcount.h>
34 #include <t8_eclass.h>
35 #include <t8_element_shape.h>
36 
37 T8_EXTERN_C_BEGIN ();
38 
42 typedef struct t8_element t8_element_t;
43 
46 
47 typedef struct t8_scheme_cxx t8_scheme_cxx_t;
48 
51 {
53  sc_refcount_t rc;
54 
57 };
58 
63 void t8_scheme_cxx_ref (t8_scheme_cxx_t *scheme);
64 
74 void t8_scheme_cxx_unref (t8_scheme_cxx_t **pscheme);
75 
76 /* TODO: document, see t8_element_cxx.hxx */
77 extern void t8_scheme_cxx_destroy (t8_scheme_cxx_t *s);
78 
79 T8_EXTERN_C_END ();
80 
81 #endif /* !T8_ELEMENT_H */
This struct holds virtual functions for a particular element class.
Definition: t8_element_cxx.hxx:47
The scheme holds implementations for one or more element classes.
Definition: t8_element.h:51
sc_refcount_t rc
Reference counter for this scheme.
Definition: t8_element.h:53
t8_eclass_scheme_c * eclass_schemes[T8_ECLASS_COUNT]
This array holds one virtual table per element class.
Definition: t8_element.h:56
We define all possible element classes that occur in hybrid meshes.
@ T8_ECLASS_COUNT
This is no element class but can be used as the number of element classes.
Definition: t8_eclass.h:59
void t8_scheme_cxx_ref(t8_scheme_cxx_t *scheme)
Increase the reference counter of a scheme.
Definition: t8_element.c:26
struct t8_element t8_element_t
Opaque structure for a generic element, only used as pointer.
Definition: t8_element.h:42
void t8_scheme_cxx_unref(t8_scheme_cxx_t **pscheme)
Decrease the reference counter of a scheme.
Definition: t8_element.c:34
void t8_scheme_cxx_destroy(t8_scheme_cxx_t *s)
Destroy an implementation of a particular element class.
Definition: t8_element_cxx.cxx:31
TODO: comment.