t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Public Member Functions | Protected Attributes
t8_geometry Struct Referenceabstract

The base class for all geometries. More...

#include <t8_geometry_base.hxx>

Inheritance diagram for t8_geometry:
t8_geometry_analytic t8_geometry_extended t8_geometry_with_vertices t8_geometry_zero t8_geometry_cad t8_geometry_cubed_sphere t8_geometry_cubed_spherical_shell t8_geometry_lagrange t8_geometry_linear t8_geometry_linear_axis_aligned t8_geometry_prismed_spherical_shell t8_geometry_quadrangulated_disk t8_geometry_quadrangulated_spherical_surface t8_geometry_triangulated_spherical_surface

Public Member Functions

 t8_geometry (int dim, std::string name)
 
virtual ~t8_geometry ()
 The destructor. More...
 
virtual void t8_geom_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const =0
 Maps points in the reference space \( [0,1]^\mathrm{dim} \to \mathbb{R}^3 \). More...
 
virtual void t8_geom_evaluate_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const =0
 Compute the jacobian of the t8_geom_evaluate map at a point in the reference space \( [0,1]^\mathrm{dim} \). More...
 
virtual void t8_geom_load_tree_data (t8_cmesh_t cmesh, t8_gloidx_t gtreeid)=0
 Update a possible internal data buffer for per tree data. More...
 
virtual void t8_geom_point_batch_inside_element (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, const double *points, const int num_points, int *is_inside, const double tolerance) const
 Query whether a batch of points lies inside an element. More...
 
virtual bool t8_geom_tree_negative_volume () const
 Check if the currently active tree has a negative volume. More...
 
int t8_geom_get_dimension () const
 Get the dimension of this geometry. More...
 
const std::string t8_geom_get_name () const
 Get the name of this geometry. More...
 
const size_t t8_geom_get_hash () const
 
virtual t8_geometry_type_t t8_geom_get_type () const =0
 Get the type of this geometry. More...
 

Protected Attributes

int dimension
 The dimension of reference space for which this is a geometry.
 
std::string name
 The name of this geometry.
 
size_t hash
 The hash of the name of this geometry.
 

Detailed Description

The base class for all geometries.

This class provides a general template for all geometries. It is a pure virtual class and has to be inherited by a concrete geometry implementation.

Constructor & Destructor Documentation

◆ ~t8_geometry()

virtual t8_geometry::~t8_geometry ( )
inlinevirtual

The destructor.

It does nothing but has to be defined since we may want to delete geometry that is actually inherited and providing an implementation for the destructor ensures that the destructor of the child class will be executed.

Member Function Documentation

◆ t8_geom_evaluate()

virtual void t8_geometry::t8_geom_evaluate ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const double *  ref_coords,
const size_t  num_coords,
double *  out_coords 
) const
pure virtual

Maps points in the reference space \( [0,1]^\mathrm{dim} \to \mathbb{R}^3 \).

Parameters
[in]cmeshThe cmesh in which the point lies.
[in]gtreeidThe global tree (of the cmesh) in which the reference point is.
[in]ref_coordsArray of dimension x num_coords many entries, specifying points in \( [0,1]^\mathrm{dim} \).
[in]num_coordsAmount of points of /f$ \mathrm{dim} /f$ to map.
[out]out_coordsThe mapped coordinates in physical space of ref_coords. The length is num_coords * 3.

Implemented in t8_geometry_lagrange, t8_geometry_zero, t8_geometry_linear_axis_aligned, t8_geometry_linear, t8_geometry_cubed_sphere, t8_geometry_prismed_spherical_shell, t8_geometry_cubed_spherical_shell, t8_geometry_quadrangulated_spherical_surface, t8_geometry_triangulated_spherical_surface, t8_geometry_quadrangulated_disk, t8_geometry_cad, and t8_geometry_analytic.

◆ t8_geom_evaluate_jacobian()

virtual void t8_geometry::t8_geom_evaluate_jacobian ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const double *  ref_coords,
const size_t  num_coords,
double *  jacobian 
) const
pure virtual

Compute the jacobian of the t8_geom_evaluate map at a point in the reference space \( [0,1]^\mathrm{dim} \).

Parameters
[in]cmeshThe cmesh in which the point lies.
[in]glreeidThe global tree (of the cmesh) in which the reference point is.
[in]ref_coordsArray of dimension x num_coords many entries, specifying points in \( [0,1]^\mathrm{dim} \).
[in]num_coordsAmount of points of /f$ \mathrm{dim} /f$ to map.
[out]jacobianThe jacobian at ref_coords. Array of size num_coords x dimension x 3. Indices \( 3 \cdot i\) , \( 3 \cdot i+1 \) , \( 3 \cdot i+2 \) correspond to the \( i \)-th column of the jacobian (Entry \( 3 \cdot i + j \) is \( \frac{\partial f_j}{\partial x_i} \)).

Implemented in t8_geometry_lagrange, t8_geometry_zero, t8_geometry_linear_axis_aligned, t8_geometry_linear, t8_geometry_cubed_sphere, t8_geometry_prismed_spherical_shell, t8_geometry_cubed_spherical_shell, t8_geometry_quadrangulated_spherical_surface, t8_geometry_triangulated_spherical_surface, t8_geometry_quadrangulated_disk, t8_geometry_cad, and t8_geometry_analytic.

◆ t8_geom_get_dimension()

int t8_geometry::t8_geom_get_dimension ( ) const
inline

Get the dimension of this geometry.

Returns
The dimension.

◆ t8_geom_get_name()

const std::string t8_geometry::t8_geom_get_name ( ) const
inline

Get the name of this geometry.

Returns
The name.

◆ t8_geom_get_type()

virtual t8_geometry_type_t t8_geometry::t8_geom_get_type ( ) const
pure virtual

◆ t8_geom_load_tree_data()

virtual void t8_geometry::t8_geom_load_tree_data ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid 
)
pure virtual

Update a possible internal data buffer for per tree data.

This function is called before the first coordinates in a new tree are evaluated. You can use it for example to load the vertex coordinates of the tree into an internal buffer (as is done in the linear geometry).

Parameters
[in]cmeshThe cmesh.
[in]gtreeidThe global tree.

Implemented in t8_geometry_with_vertices, t8_geometry_zero, t8_geometry_lagrange, t8_geometry_cad, and t8_geometry_analytic.

◆ t8_geom_point_batch_inside_element()

virtual void t8_geometry::t8_geom_point_batch_inside_element ( t8_forest_t  forest,
t8_locidx_t  ltreeid,
const t8_element_t element,
const double *  points,
const int  num_points,
int *  is_inside,
const double  tolerance 
) const
inlinevirtual

Query whether a batch of points lies inside an element.

Parameters
[in]forestThe forest.
[in]ltree_idThe forest local id of the tree in which the element is.
[in]elementThe element.
[in]points3-dimensional coordinates of the points to check
[in]num_pointsThe number of points to check
[in,out]is_insideAn array of length num_points, filled with 0/1 on output. True (non-zero) if a point lies within an element, false otherwise. The return value is also true if the point lies on the element boundary. Thus, this function may return true for different leaf elements, if they are neighbors and the point lies on the common boundary.
[in]toleranceTolerance that we allow the point to not exactly match the element. If this value is larger we detect more points. If it is zero we probably do not detect points even if they are inside due to rounding errors.

Reimplemented in t8_geometry_linear_axis_aligned, and t8_geometry_linear.

◆ t8_geom_tree_negative_volume()

virtual bool t8_geometry::t8_geom_tree_negative_volume ( ) const
inlinevirtual

Check if the currently active tree has a negative volume.

Returns
True (non-zero) if the currently loaded tree has a negative volume. 0 otherwise.

Reimplemented in t8_geometry_with_vertices, t8_geometry_zero, t8_geometry_linear_axis_aligned, and t8_geometry_analytic.


The documentation for this struct was generated from the following file: