7.1
general documentation
cs_mesh_intersect.h File Reference
#include "cs_defs.h"
+ Include dependency graph for cs_mesh_intersect.h:

Go to the source code of this file.

Functions

void cs_mesh_intersect_segment_cell_select (void *input, cs_lnum_t *n_cells, cs_lnum_t **cell_ids)
 Select cells cut by a given segment. More...
 
void cs_mesh_intersect_polyline_cell_select (void *input, cs_lnum_t n_points, cs_lnum_t *n_cells, cs_lnum_t **cell_ids, cs_real_t **seg_c_len)
 Select cells cut by a line composed of segments. More...
 

Function Documentation

◆ cs_mesh_intersect_polyline_cell_select()

void cs_mesh_intersect_polyline_cell_select ( void *  input,
cs_lnum_t  n_points,
cs_lnum_t n_cells,
cs_lnum_t **  cell_ids,
cs_real_t **  seg_c_len 
)

Select cells cut by a line composed of segments.

This selection function may be used as an elements selection function for postprocessing.

In this case, the input points to a real array containing the segment's start and end coordinates.

Note: the input pointer must point to valid data when this selection function is called, so either:

  • that value or structure should not be temporary (i.e. local);
  • post-processing output must be ensured using cs_post_write_meshes() with a fixed-mesh writer before the data pointed to goes out of scope;

The caller is responsible for freeing the returned cell_ids array. When passed to postprocessing mesh or probe set definition functions, this is handled automatically.

Parameters
[in]inputpointer to segments starts and ends: [x0, y0, z0, x1, y1, z1]
[in]n_pointsnumber of vertices in the polyline
[out]n_cellsnumber of selected cells
[out]cell_idsarray of selected cell ids (0 to n-1 numbering)
[out]seg_c_lenarray of length of the segment in the selected cells

◆ cs_mesh_intersect_segment_cell_select()

void cs_mesh_intersect_segment_cell_select ( void *  input,
cs_lnum_t n_cells,
cs_lnum_t **  cell_ids 
)

Select cells cut by a given segment.

This selection function may be used as an elements selection function for postprocessing.

In this case, the input points to a real array containing the segment's start and end coordinates.

Note: the input pointer must point to valid data when this selection function is called, so either:

  • that value or structure should not be temporary (i.e. local);
  • post-processing output must be ensured using cs_post_write_meshes() with a fixed-mesh writer before the data pointed to goes out of scope;

The caller is responsible for freeing the returned cell_ids array. When passed to postprocessing mesh or probe set definition functions, this is handled automatically.

Parameters
[in]inputpointer to segment start and end: [x0, y0, z0, x1, y1, z1]
[out]n_cellsnumber of selected cells
[out]cell_idsarray of selected cell ids (0 to n-1 numbering)