t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Public Member Functions
t8_geometry_occ Struct Reference
Inheritance diagram for t8_geometry_occ:
t8_geometry_with_vertices t8_geometry

Public Member Functions

 t8_geometry_occ (int dim, const char *fileprefix, const char *name)
 Constructor of the occ geometry with a given dimension. More...
 
 t8_geometry_occ (int dim, const TopoDS_Shape occ_shape, const char *name)
 Constructor of the occ geometry with a given dimension. More...
 
virtual ~t8_geometry_occ ()
 The destructor. More...
 
t8_geometry_type_t t8_geom_get_type () const
 Get the type of this geometry. 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
 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
 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)
 Update a possible internal data buffer for per tree data. More...
 
int t8_geom_is_line (const int curve_index) const
 Check if a occ_curve is a line. More...
 
int t8_geom_is_plane (const int surface_index) const
 Check if a occ_surface is a plane. More...
 
const gp_Pnt t8_geom_get_occ_point (const int index) const
 Get an occ point from the occ_shape. More...
 
const Handle_Geom_Curve t8_geom_get_occ_curve (const int index) const
 Get an occ curve from the occ_shape. More...
 
const Handle_Geom_Surface t8_geom_get_occ_surface (const int index) const
 Get an occ surface from the occ_shape. More...
 
const TopTools_IndexedMapOfShape t8_geom_get_occ_shape_vertex_map () const
 Get the occ_shape_vertex2edge_map. More...
 
const TopTools_IndexedMapOfShape t8_geom_get_occ_shape_edge_map () const
 Get the occ_shape_edge2face_map. More...
 
const TopTools_IndexedMapOfShape t8_geom_get_occ_shape_face_map () const
 Get the occ_shape_face_map. More...
 
int t8_geom_get_common_edge (const int vertex1_index, const int vertex2_index) const
 Check if two occ points share a common occ edge. More...
 
int t8_geom_get_common_face (const int edge1_index, const int edge2_index) const
 Check if two occ edges share a common occ face. More...
 
int t8_geom_is_vertex_on_edge (const int vertex_index, const int edge_index) const
 Check if a occ vertex lies on an occ edge. More...
 
int t8_geom_is_edge_on_face (const int edge_index, const int face_index) const
 Check if a occ vertex lies on an occ edge. More...
 
int t8_geom_is_vertex_on_face (const int vertex_index, const int face_index) const
 Check if a occ vertex lies on an occ face. More...
 
void t8_geom_get_parameter_of_vertex_on_edge (const int vertex_index, const int edge_index, double *edge_param) const
 Retrieves the parameter of an occ vertex on an occ edge. More...
 
void t8_geom_get_parameters_of_vertex_on_face (const int vertex_index, const int face_index, double *face_params) const
 Retrieves the parameters of an occ vertex on a occ face. More...
 
void t8_geom_edge_parameter_to_face_parameters (const int edge_index, const int face_index, const int num_face_nodes, const double edge_param, const double *surface_params, double *face_params) const
 Converts the parameters of an occ edge to the corresponding parameters on an occ face. More...
 
void t8_geom_get_face_parametric_bounds (const int surface_index, double *bounds) const
 Finds the parametric bounds of an occ face. More...
 
void t8_geom_get_edge_parametric_bounds (const int edge_index, double *bounds) const
 Finds the parametric bounds of an occ edge. More...
 
int t8_geom_is_edge_closed (int edge_index) const
 Checks if an edge is closed in its U parameter. More...
 
int t8_geom_is_surface_closed (int geometry_index, int parameter) const
 Checks if a surface is closed in its U parameter or V parameter. More...
 
- Public Member Functions inherited from t8_geometry_with_vertices
 t8_geometry_with_vertices (int dimension, const char *name, const char *attribute_name=NULL)
 
virtual ~t8_geometry_with_vertices ()
 The destructor. More...
 
- Public Member Functions inherited from t8_geometry
 t8_geometry (int dimension, const char *name, const char *attribute_name=NULL)
 
virtual ~t8_geometry ()
 The destructor. More...
 
int t8_geom_get_dimension () const
 Get the dimension of this geometry. More...
 
const char * t8_geom_get_name () const
 Get the name of this geometry. More...
 

Additional Inherited Members

- Protected Attributes inherited from t8_geometry_with_vertices
t8_gloidx_t active_tree
 
t8_eclass_t active_tree_class
 
const double * active_tree_vertices
 
- Protected Attributes inherited from t8_geometry
int dimension
 The dimension of reference space for which this is a geometry.
 
const char * name
 The name of this geometry.
 

Constructor & Destructor Documentation

◆ t8_geometry_occ() [1/2]

t8_geometry_occ::t8_geometry_occ ( int  dim,
const char *  fileprefix,
const char *  name 
)

Constructor of the occ geometry with a given dimension.

The geometry is currently viable with quad/hex and triangle trees. Tets will be supported soon. The geometry uses as many vertices as the tree type has, as well as additional geometry information, which is extracted from a .brep file. The vertices are saved via the t8_cmesh_set_tree_vertices function. Since the internals of this geometry are finely tuned to the .brep file it is recommended to only use it with the t8_cmesh_readmshfile function.

Parameters
[in]dimThe dimension of this geometry.
[in]fileprefixPrefix of a .brep file from which to extract an occ geometry.
[in]nameThe name to give this geometry.

◆ t8_geometry_occ() [2/2]

t8_geometry_occ::t8_geometry_occ ( int  dim,
const TopoDS_Shape  occ_shape,
const char *  name 
)

Constructor of the occ geometry with a given dimension.

The geometry is currently viable with quad/hex and triangle trees. Tets will be supported soon. The geometry uses as many vertices as the tree type has, as well as additional geometry information, which is given via the occ_shape. The vertices are saved via the t8_cmesh_set_tree_vertices function. This constructor can be used in short scripts or in combination with a mesh generator, to omit the file IO of the t8_geometry_occ (int dim, const char *fileprefix, const char *name) constructor.

Parameters
[in]dimThe dimension of this geometry.
[in]occ_shapeOcc shape geometry.
[in]nameThe name to give this geometry.

◆ ~t8_geometry_occ()

virtual t8_geometry_occ::~t8_geometry_occ ( )
inlinevirtual

The destructor.

Clears the allocated memory.

Member Function Documentation

◆ t8_geom_edge_parameter_to_face_parameters()

void t8_geometry_occ::t8_geom_edge_parameter_to_face_parameters ( const int  edge_index,
const int  face_index,
const int  num_face_nodes,
const double  edge_param,
const double *  surface_params,
double *  face_params 
) const

Converts the parameters of an occ edge to the corresponding parameters on an occ face.

The edge has to lie on the face. For the conversion of edge parameters of mesh elements to topological face parameters of a closed surface, it is additionally checked, whether the conversion was correct, to prevent disorted elements.

Parameters
[in]edge_indexThe index of the occ edge, which parameters should be converted to face parameters.
[in]face_indexThe index of the occ face, on to which the edge parameters should be converted.
[in]num_face_nodesThe number of the face nodes of the evaluated element. Only needed for closed surface check, otherwise NULL.
[in]edge_paramThe parameter on the edge.
[in]surface_paramThe parameters of the surface nodes. When provided, there are additional checks for closed geometries. If there are no surface parameter to pass in to the function, you can pass NULL.
[out]face_paramsThe corresponding parameters on the face.

◆ t8_geom_evaluate()

void t8_geometry_occ::t8_geom_evaluate ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const double *  ref_coords,
const size_t  num_coords,
double *  out_coords 
) const
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.

Implements t8_geometry.

◆ t8_geom_evaluate_jacobian()

void t8_geometry_occ::t8_geom_evaluate_jacobian ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const double *  ref_coords,
const size_t  num_coords,
double *  jacobian 
) const
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]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]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} \)).

Implements t8_geometry.

◆ t8_geom_get_common_edge()

int t8_geometry_occ::t8_geom_get_common_edge ( const int  vertex1_index,
const int  vertex2_index 
) const

Check if two occ points share a common occ edge.

Parameters
[in]vertex1_indexThe index of the first occ point.
[in]vertex2_indexThe index of the second occ point.
Returns
Index of the shared edge. 0 if there is no shared edge.

◆ t8_geom_get_common_face()

int t8_geometry_occ::t8_geom_get_common_face ( const int  edge1_index,
const int  edge2_index 
) const

Check if two occ edges share a common occ face.

Parameters
[in]edge1_indexThe index of the first occ edge.
[in]edge2_indexThe index of the second occ edge.
Returns
Index of the shared face. 0 if there is no shared face.

◆ t8_geom_get_edge_parametric_bounds()

void t8_geometry_occ::t8_geom_get_edge_parametric_bounds ( const int  edge_index,
double *  bounds 
) const

Finds the parametric bounds of an occ edge.

Parameters
[in]edge_indexThe index of the occ edge.
[out]boundsThe parametric bounds of the occ edge.

◆ t8_geom_get_face_parametric_bounds()

void t8_geometry_occ::t8_geom_get_face_parametric_bounds ( const int  surface_index,
double *  bounds 
) const

Finds the parametric bounds of an occ face.

Parameters
[in]face_indexThe index of the occ face.
[out]boundsThe parametric bounds of the occ face.

◆ t8_geom_get_occ_curve()

const Handle_Geom_Curve t8_geometry_occ::t8_geom_get_occ_curve ( const int  index) const

Get an occ curve from the occ_shape.

Parameters
[in]indexThe index of the curve in the occ_shape.
Returns
The occ curve.

◆ t8_geom_get_occ_point()

const gp_Pnt t8_geometry_occ::t8_geom_get_occ_point ( const int  index) const

Get an occ point from the occ_shape.

Parameters
[in]indexThe index of the point in the occ_shape.
Returns
The occ point.

◆ t8_geom_get_occ_shape_edge_map()

const TopTools_IndexedMapOfShape t8_geometry_occ::t8_geom_get_occ_shape_edge_map ( ) const

Get the occ_shape_edge2face_map.

Returns
The occ_shape_edge_map.

◆ t8_geom_get_occ_shape_face_map()

const TopTools_IndexedMapOfShape t8_geometry_occ::t8_geom_get_occ_shape_face_map ( ) const

Get the occ_shape_face_map.

Returns
The occ_shape_face_map.

◆ t8_geom_get_occ_shape_vertex_map()

const TopTools_IndexedMapOfShape t8_geometry_occ::t8_geom_get_occ_shape_vertex_map ( ) const

Get the occ_shape_vertex2edge_map.

Returns
The occ_shape_vertex_map.

◆ t8_geom_get_occ_surface()

const Handle_Geom_Surface t8_geometry_occ::t8_geom_get_occ_surface ( const int  index) const

Get an occ surface from the occ_shape.

Parameters
[in]indexThe index of the surface in the occ_shape.
Returns
The occ surface.

◆ t8_geom_get_parameter_of_vertex_on_edge()

void t8_geometry_occ::t8_geom_get_parameter_of_vertex_on_edge ( const int  vertex_index,
const int  edge_index,
double *  edge_param 
) const

Retrieves the parameter of an occ vertex on an occ edge.

The vertex has to lie on the edge.

Parameters
[in]vertex_indexThe index of the occ vertex.
[in]edge_indexThe index of the occ edge.
[out]edge_paramThe parameter of the vertex on the edge.

◆ t8_geom_get_parameters_of_vertex_on_face()

void t8_geometry_occ::t8_geom_get_parameters_of_vertex_on_face ( const int  vertex_index,
const int  face_index,
double *  face_params 
) const

Retrieves the parameters of an occ vertex on a occ face.

The vertex has to lie on the face.

Parameters
[in]vertex_indexThe index of the occ vertex.
[in]face_indexThe index of the occ face.
[out]face_paramsThe parameters of the vertex on the face.

◆ t8_geom_get_type()

t8_geometry_type_t t8_geometry_occ::t8_geom_get_type ( ) const
inlinevirtual

Get the type of this geometry.

Returns
The type.

Implements t8_geometry.

◆ t8_geom_is_edge_closed()

int t8_geometry_occ::t8_geom_is_edge_closed ( int  edge_index) const

Checks if an edge is closed in its U parameter.

Parameters
[in]edge_indexThe index of the closed edge.
Returns
1 if edge is closed in U. 0 if edge is not closed in U.

◆ t8_geom_is_edge_on_face()

int t8_geometry_occ::t8_geom_is_edge_on_face ( const int  edge_index,
const int  face_index 
) const

Check if a occ vertex lies on an occ edge.

Parameters
[in]edge_indexThe index of the occ vertex.
[in]face_indexThe index of the occ edge.
Returns
1 if vertex lies on edge, otherwise 0.

◆ t8_geom_is_line()

int t8_geometry_occ::t8_geom_is_line ( const int  curve_index) const

Check if a occ_curve is a line.

Parameters
[in]curve_indexThe index of the occ_curve.
Returns
1 if curve is a line, 0 if curve is not a line.

◆ t8_geom_is_plane()

int t8_geometry_occ::t8_geom_is_plane ( const int  surface_index) const

Check if a occ_surface is a plane.

Parameters
[in]surface_indexThe index of the occ_surface.
Returns
1 if surface is a plane linear, 0 if surface is not a plane.

◆ t8_geom_is_surface_closed()

int t8_geometry_occ::t8_geom_is_surface_closed ( int  geometry_index,
int  parameter 
) const

Checks if a surface is closed in its U parameter or V parameter.

Parameters
[in]geometry_indexThe index of the closed geometry.
[in]parameterThe parameter, which should be check for closeness. 0 stands for the U parameter and 1 for the V parameter.
Returns
1 if geometry is closed in U. 0 if geometry is not closed in U.

◆ t8_geom_is_vertex_on_edge()

int t8_geometry_occ::t8_geom_is_vertex_on_edge ( const int  vertex_index,
const int  edge_index 
) const

Check if a occ vertex lies on an occ edge.

Parameters
[in]vertex_indexThe index of the occ vertex.
[in]edge_indexThe index of the occ edge.
Returns
1 if vertex lies on edge, otherwise 0.

◆ t8_geom_is_vertex_on_face()

int t8_geometry_occ::t8_geom_is_vertex_on_face ( const int  vertex_index,
const int  face_index 
) const

Check if a occ vertex lies on an occ face.

Parameters
[in]vertex_indexThe index of the occ vertex.
[in]face_indexThe index of the occ face.
Returns
1 if vertex lies on face, otherwise 0.

◆ t8_geom_load_tree_data()

void t8_geometry_occ::t8_geom_load_tree_data ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid 
)
inlinevirtual

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.

Reimplemented from t8_geometry_with_vertices.


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