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

We use a p4est_quadrant_t object as storage for the T8 quadrant. More...

#include <p4est.h>
#include <t8_element.h>

Go to the source code of this file.

Macros

#define T8_QUAD_GET_TDIM(quad)   ((int) (quad)->pad8)
 Return the toplevel dimension.
 
#define T8_QUAD_GET_TNORMAL(quad)
 Return the direction of the third dimension. More...
 
#define T8_QUAD_GET_TCOORD(quad)
 Return the coordinate in the third dimension. More...
 
#define T8_QUAD_SET_TDIM(quad, dim)
 Set the toplevel dimension of a quadrilateral. More...
 
#define T8_QUAD_SET_TNORMAL(quad, normal)
 Set the direction of the third demension. More...
 
#define T8_QUAD_SET_TCOORD(quad, coord)    do { (quad)->p.user_long = (long) (coord); } while (0)
 Set the coordinate in the third dimension.
 

Typedefs

typedef p4est_quadrant_t t8_pquad_t
 The structure holding a quadrilateral element in the default scheme. More...
 

Functions

t8_eclass_scheme_t * t8_default_scheme_new_quad (void)
 Provide an implementation for the quadrilateral element class.
 

Detailed Description

We use a p4est_quadrant_t object as storage for the T8 quadrant.

To record if and if yes, how this quadrant is part of a 3D octant, we use the member pad8 for the surrounding toplevel dimension (2 or 3), pad16 for the direction of its normal relative to a toplevel octant (0, 1, or 2), and p.user_long for the p4est_qcoord_t coordinate in the normal direction.

Macro Definition Documentation

◆ T8_QUAD_GET_TCOORD

#define T8_QUAD_GET_TCOORD (   quad)
Value:
( T8_ASSERT (T8_QUAD_GET_TDIM(quad) == 3), \
((int) (quad)->p.user_long) )
#define T8_ASSERT(c)
Widely used assertion.
Definition: t8.h:75
#define T8_QUAD_GET_TDIM(quad)
Return the toplevel dimension.
Definition: t8_default_quad.h:44

Return the coordinate in the third dimension.

This is only valid to call if the toplevel dimension is three.

◆ T8_QUAD_GET_TNORMAL

#define T8_QUAD_GET_TNORMAL (   quad)
Value:
( T8_ASSERT (T8_QUAD_GET_TDIM(quad) == 3), \
((int) (quad)->pad16) )

Return the direction of the third dimension.

This is only valid to call if the toplevel dimension is three.

◆ T8_QUAD_SET_TDIM

#define T8_QUAD_SET_TDIM (   quad,
  dim 
)
Value:
do { T8_ASSERT ((dim) == 2 || (dim) == 3); \
(quad)->pad8 = (int8_t) (dim); } while (0)

Set the toplevel dimension of a quadrilateral.

◆ T8_QUAD_SET_TNORMAL

#define T8_QUAD_SET_TNORMAL (   quad,
  normal 
)
Value:
do { T8_ASSERT ((normal) >= 0 && (normal) < 3); \
(quad)->pad16 = (int16_t) (normal); } while (0)

Set the direction of the third demension.

Typedef Documentation

◆ t8_pquad_t

typedef p4est_quadrant_t t8_pquad_t

The structure holding a quadrilateral element in the default scheme.

We make this definition public for interoperability of element classes. We might want to put this into a private, scheme-specific header file.