Struct t8_geometry_linear_axis_aligned
Defined in File t8_geometry_linear_axis_aligned.hxx
Inheritance Relationships
Base Type
public t8_geometry_with_vertices(Struct t8_geometry_with_vertices)
Struct Documentation
-
struct t8_geometry_linear_axis_aligned : public t8_geometry_with_vertices
Linear and axis-aligned geometry for cartesian grids. Interpolates in the cartesian space opened by two points. Needs only two vertices per tree, regardless of the dimension. Only valid for line, quad and hex trees.
Public Functions
-
t8_geometry_linear_axis_aligned()
Constructor of the linear, axis-aligned geometry with a given dimension. The geometry is only viable for the line/quad/hex tree types and uses two vertices (min and max coords) per tree. The vertices are saved via the t8_cmesh_set_tree_vertices function. Sets the name to “t8_geom_linear_axis_aligned”
Check that the two points of the geometry are ordered correctly, that is p1_x <= p2_x, p1_y <= p2_y and p1_z <= p2_z
- Parameters:
tree_vertices – [in] The vertices of a tree
- Returns:
true if the points are ordered correctly
- Returns:
false ow
-
virtual ~t8_geometry_linear_axis_aligned()
The destructor.
-
inline virtual t8_geometry_type_t t8_geom_get_type() const
Get the type of this geometry.
- Returns:
The type.
-
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
Maps points in the reference space \( [0,1]^\mathrm{dim} \to \mathbb{R}^3 \).
- Parameters:
cmesh – [in] The cmesh in which the point lies.
gtreeid – [in] The global tree (of the cmesh) in which the reference point is.
ref_coords – [in] Array of tree dimension x num_coords many entries, specifying points in \( [0,1]^\mathrm{dim} \).
num_coords – [in] Amount of points of \( \mathrm{dim} \) to map.
out_coords – [out] The mapped coordinates in physical space of ref_coords. The length is num_coords * 3.
-
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
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space \( [0,1]^\mathrm{dim} \).
- Parameters:
cmesh – [in] The cmesh in which the point lies.
gtreeid – [in] The global tree (of the cmesh) in which the reference point is.
ref_coords – [in] Array of tree dimension x num_coords many entries, specifying points in \( [0,1]^\mathrm{dim} \).
num_coords – [in] Amount of points of \( \mathrm{dim} \) to map.
jacobian – [out] The 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} \)).
-
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
- Parameters:
forest – [in] The forest of the element.
ltreeid – [in] The local tree id of the element’s tree
element – [in] The element
points – [in] points to check
num_points – [in] Number of points to check
is_inside – [inout] Array to fill with flags whether the point is inside or not
tolerance – [in] Tolerance of the inside-check
-
virtual bool t8_geom_tree_negative_volume() const
Check if the currently active tree has a negative volume.
- Returns:
True if the currently loaded tree has a negative volume.
-
inline virtual bool t8_geom_check_tree_compatibility() const
Check for compatibility of the currently loaded tree with the geometry. Only line, quad and hex elements are supported by this geometry.
- Returns:
True if the geometry is compatible with the tree.
-
inline virtual bool get_tree_bounding_box([[maybe_unused]] const t8_cmesh_t cmesh, double bounds[6]) const
Compute the bounding box of the currently active tree.
- Parameters:
cmesh – [in] The cmesh to check compatibility with.
bounds – [inout] The bounding box of the cmesh.
- Returns:
True if the geometry is compatible with the cmesh, false otherwise.
-
t8_geometry_linear_axis_aligned()