t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_cmesh.hxx
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) 2024 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 
27 #pragma once
28 
29 #include <t8_cmesh.h>
32 
41 template <typename geometry_type, typename... _args>
42 inline geometry_type *
43 t8_cmesh_register_geometry (t8_cmesh_t cmesh, _args &&...args)
44 {
45  if (cmesh->geometry_handler == NULL) {
46  /* The handler was not constructed, do it now. */
47  cmesh->geometry_handler = new t8_geometry_handler ();
48  }
49  return cmesh->geometry_handler->register_geometry<geometry_type> (std::forward<_args> (args)...);
50 }
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
t8_geometry_handler_c * geometry_handler
Handles all geometries that are used by trees in this cmesh.
Definition: t8_cmesh_types.h:138
Definition: t8_geometry_handler.hxx:37
geometry_type * register_geometry(_args &&...args)
Register a geometry with the geometry handler.
Definition: t8_geometry_handler.hxx:58
We define the coarse mesh of trees in this file.
geometry_type * t8_cmesh_register_geometry(t8_cmesh_t cmesh, _args &&...args)
Create and register a geometry with the coarse mesh.
Definition: t8_cmesh.hxx:43
We define here the datatypes needed for internal cmesh routines.
General geometry definitions.