t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_geometry_with_vertices.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) 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 
28 #ifndef T8_GEOMETRY_WITH_VERTICES_HXX
29 #define T8_GEOMETRY_WITH_VERTICES_HXX
30 
31 #include <t8_cmesh.h>
32 #include <t8_forest/t8_forest.h>
36 
37 T8_EXTERN_C_BEGIN ();
38 
40 {
41  public:
42  /* Basic constructor that sets the dimension, the name, and the name for the attribute. */
44  {
45  active_tree_vertices = NULL;
46  active_tree = -1;
47  }
48 
49  /* Base constructor with no arguments. We need this since it
50  * is called from derived class constructors.
51  * Sets dimension and name to invalid values. */
53  {
54  active_tree_vertices = NULL;
55  active_tree = -1;
56  }
57 
64  {
65  }
66 
75  virtual void
77 
82  virtual bool
84 
89  inline t8_geometry_type_t
91  {
93  };
94 
95  protected:
96  t8_gloidx_t active_tree; /*< The tree of which currently vertices are loaded. */
97  t8_eclass_t active_tree_class; /*< The class of the currently active tree. */
98  const double* active_tree_vertices; /*< The vertices of the currently active tree. */
99 };
100 
101 T8_EXTERN_C_END ();
102 
103 #endif /* !T8_GEOMETRY_WITH_VERTICES_HXX */
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
Definition: t8_geometry_with_vertices.hxx:40
t8_geometry_type_t t8_geom_get_type() const
Get the type of this geometry.
Definition: t8_geometry_with_vertices.hxx:90
virtual void t8_geom_load_tree_data(t8_cmesh_t cmesh, t8_gloidx_t gtreeid)
Update a possible internal data buffer for per tree data.
Definition: t8_geometry_with_vertices.cxx:33
virtual bool t8_geom_tree_negative_volume() const
Check if the currently active tree has a negative volume.
Definition: t8_geometry_with_vertices.cxx:56
virtual ~t8_geometry_with_vertices()
The destructor.
Definition: t8_geometry_with_vertices.hxx:63
The base class for all geometries.
Definition: t8_geometry_base.hxx:48
int dimension
The dimension of reference space for which this is a geometry.
Definition: t8_geometry_base.hxx:180
std::string name
The name of this geometry.
Definition: t8_geometry_base.hxx:183
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:100
We define the coarse mesh of trees in this file.
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.
Includes all headers based on previous t8_forest.h.
@ T8_GEOMETRY_TYPE_UNDEFINED
This is no geometry type but is used for every geometry, where no type is defined.
Definition: t8_geometry.h:51
enum t8_geometry_type t8_geometry_type_t
This enumeration contains all possible geometries.
This header file provides a C interface to the t8_geometry_c class.
Implements the base pure virtual struct t8_geometry which provides a general template for all geometr...
This header file provides a C interface for functions for the t8_geometry_with_vertices class.