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

Go to the source code of this file.

Functions

cs_medcoupling_slice_t * cs_medcoupling_slice_by_id (int id)
 Get pointer to a slice based on id. More...
 
cs_medcoupling_slice_t * cs_medcoupling_slice_by_name (const char *name)
 Get pointer to slice based on name, raises an error if not found. More...
 
cs_medcoupling_slice_t * cs_medcoupling_slice_by_name_try (const char *name)
 Get pointer to slice based on name. Returns nullptr if not found. More...
 
void cs_medcoupling_postprocess_add_plane_slice (const char *name, const char *selection_criteria, const cs_real_t origin[], const cs_real_t normal[], const cs_real_t length1, const cs_real_t length2)
 Add a slice based on a plane. More...
 
void cs_medcoupling_postprocess_add_disc_slice (const char *name, const char *selection_criteria, const cs_real_t origin[], const cs_real_t normal[], const cs_real_t radius, const int n_sectors)
 Add a slice based on a disc. More...
 
void cs_medcoupling_postprocess_add_annulus_slice (const char *name, const char *selection_criteria, const cs_real_t origin[], const cs_real_t normal[], const cs_real_t radius1, const cs_real_t radius2, const int n_sectors)
 Add a slice based on an annulus. More...
 
cs_lnum_t cs_medcoupling_slice_get_n_elts (const char *name)
 Get number cells that may be intersected by the slice. More...
 
cs_lnum_tcs_medcoupling_slice_get_elt_ids (const char *name)
 Get list of ids of the elements which may be intersected. More...
 
cs_real_tcs_medcoupling_slice_get_surfaces (const char *name)
 Get list of intersection surfaces for each cell intersected. More...
 
cs_real_t cs_medcoupling_slice_get_total_surface (const char *name)
 Get total intersection surface between a slice and volume mesh. More...
 
void cs_medcoupling_slice_activate_postprocess (const char *name)
 Activate postprocessing of intersected cells. More...
 
cs_real_t cs_medcoupling_slice_scalar_integral (const char *name, const cs_real_t *scalar)
 Compute integral of a scalar over a slice. More...
 
cs_real_t cs_medcoupling_slice_scalar_mean (const char *name, const cs_real_t *scalar)
 Compute mean value of a scalar over a slice. More...
 
cs_real_t cs_medcoupling_slice_scalar_integral_weighted (const char *name, const cs_real_t *scalar, const cs_real_t *weight_s, const cs_real_3_t *weight_v)
 Compute integral of a scalar over a slice using a scalar and/or vectorial weights. If nullptr is provided for both weights, the non-weighted function is called. More...
 
cs_real_t cs_medcoupling_slice_scalar_mean_weighted (const char *name, const cs_real_t *scalar, const cs_real_t *weight_s, const cs_real_3_t *weight_v)
 Compute mean of a scalar over a slice using a scalar and/or vectorial weights. If nullptr is provided for both weights, the non-weighted function is called. More...
 
void cs_medcoupling_slice_destroy_all (void)
 Destroy all slices. More...
 

Function Documentation

◆ cs_medcoupling_postprocess_add_annulus_slice()

void cs_medcoupling_postprocess_add_annulus_slice ( const char *  name,
const char *  selection_criteria,
const cs_real_t  origin[],
const cs_real_t  normal[],
const cs_real_t  radius1,
const cs_real_t  radius2,
const int  n_sectors 
)

Add a slice based on an annulus.

Parameters
[in]namename of the slice
[in]selection_criteriaselection criteria for cells
[in]origincoordinates of slice's origin point
[in]normalnormal vector of the slice
[in]radius1inner disc's radius
[in]radius2outer disc's radius
[in]n_sectorsnumber of sectors for discretization. if negative, default value (36) is used.

◆ cs_medcoupling_postprocess_add_disc_slice()

void cs_medcoupling_postprocess_add_disc_slice ( const char *  name,
const char *  selection_criteria,
const cs_real_t  origin[],
const cs_real_t  normal[],
const cs_real_t  radius,
const int  n_sectors 
)

Add a slice based on a disc.

Parameters
[in]nameName of the slice
[in]selection_criteriaSelection criteria for cells to intersect
[in]originCoordinates of origin point of slice
[in]normalNormal vector of the slice
[in]radiusRadius of the disc
[in]n_sectorsNumber of sectors for discretization. If negative default value (36) is used.
Parameters
[in]namename of the slice
[in]selection_criteriaselection criteria for cells
[in]origincoordinates of slice's origin point
[in]normalnormal vector of the slice
[in]radiusdisc's radius
[in]n_sectorsnumber of sectors for discretization. if negative, default value (36) is used.

◆ cs_medcoupling_postprocess_add_plane_slice()

void cs_medcoupling_postprocess_add_plane_slice ( const char *  name,
const char *  selection_criteria,
const cs_real_t  origin[],
const cs_real_t  normal[],
const cs_real_t  length1,
const cs_real_t  length2 
)

Add a slice based on a plane.

Parameters
[in]namename of the slice
[in]selection_criteriaselection criteria for cells
[in]origincoordinates of slice's origin point
[in]normalnormal vector of the slice
[in]length1length along the plane's first axis
[in]length2length along the plane's second axis

◆ cs_medcoupling_slice_activate_postprocess()

void cs_medcoupling_slice_activate_postprocess ( const char *  name)

Activate postprocessing of intersected cells.

Parameters
[in]nameName of the slice

◆ cs_medcoupling_slice_by_id()

cs_medcoupling_slice_t * cs_medcoupling_slice_by_id ( int  id)

Get pointer to a slice based on id.

Returns
pointer to slice. Raises an error if index is out of bounds.
Parameters
[in]idindex of the slice

◆ cs_medcoupling_slice_by_name()

cs_medcoupling_slice_t * cs_medcoupling_slice_by_name ( const char *  name)

Get pointer to slice based on name, raises an error if not found.

Returns
pointer to slice, raises error if not found.
Parameters
[in]namename of the slice

◆ cs_medcoupling_slice_by_name_try()

cs_medcoupling_slice_t * cs_medcoupling_slice_by_name_try ( const char *  name)

Get pointer to slice based on name. Returns nullptr if not found.

Returns
pointer to slice, nullptr if not found.
Parameters
[in]namename of the slice

◆ cs_medcoupling_slice_destroy_all()

void cs_medcoupling_slice_destroy_all ( void  )

Destroy all slices.

◆ cs_medcoupling_slice_get_elt_ids()

cs_lnum_t * cs_medcoupling_slice_get_elt_ids ( const char *  name)

Get list of ids of the elements which may be intersected.

Returns
Pointer to list of ids (cs_lnum_t *). Do not deallocate!
Parameters
[in]namename of the slice

◆ cs_medcoupling_slice_get_n_elts()

cs_lnum_t cs_medcoupling_slice_get_n_elts ( const char *  name)

Get number cells that may be intersected by the slice.

Returns
Number of elements
Parameters
[in]namename of the slice

◆ cs_medcoupling_slice_get_surfaces()

cs_real_t * cs_medcoupling_slice_get_surfaces ( const char *  name)

Get list of intersection surfaces for each cell intersected.

Returns
Pointer to list of intersection surfaces (cs_real_t *)
Parameters
[in]namename of the slice

◆ cs_medcoupling_slice_get_total_surface()

cs_real_t cs_medcoupling_slice_get_total_surface ( const char *  name)

Get total intersection surface between a slice and volume mesh.

Returns
Value of total intersection surface
Parameters
[in]namename of the slice

◆ cs_medcoupling_slice_scalar_integral()

cs_real_t cs_medcoupling_slice_scalar_integral ( const char *  name,
const cs_real_t scalar 
)

Compute integral of a scalar over a slice.

Returns
Global integrated value. A cs_parall_sum is used.
Parameters
[in]namename of the slice
[in]scalararray of scalar values (size n_cells)

◆ cs_medcoupling_slice_scalar_integral_weighted()

cs_real_t cs_medcoupling_slice_scalar_integral_weighted ( const char *  name,
const cs_real_t scalar,
const cs_real_t weight_s,
const cs_real_3_t weight_v 
)

Compute integral of a scalar over a slice using a scalar and/or vectorial weights. If nullptr is provided for both weights, the non-weighted function is called.

Returns
Computed integral value over entire slice (parallel)
Parameters
[in]namename of the slice
[in]scalararray of scalar values (size n_cells)
[in]weight_sscalar weight array (n_cells)
[in]weight_vvectorial weight array (n_cells)

◆ cs_medcoupling_slice_scalar_mean()

cs_real_t cs_medcoupling_slice_scalar_mean ( const char *  name,
const cs_real_t scalar 
)

Compute mean value of a scalar over a slice.

Returns
Global integrated value. A cs_parall_sum is used.
Parameters
[in]namename of the slice
[in]scalararray of scalar values (size n_cells)

◆ cs_medcoupling_slice_scalar_mean_weighted()

cs_real_t cs_medcoupling_slice_scalar_mean_weighted ( const char *  name,
const cs_real_t scalar,
const cs_real_t weight_s,
const cs_real_3_t weight_v 
)

Compute mean of a scalar over a slice using a scalar and/or vectorial weights. If nullptr is provided for both weights, the non-weighted function is called.

Returns
Computed mean value over entire slice (parallel)
Parameters
[in]namename of the slice
[in]scalararray of scalar values (size n_cells)
[in]weight_sscalar weight array (n_cells)
[in]weight_vvectorial weight array (n_cells)