8.0
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 NULL 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...
 
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 NULL 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 NULL 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 to intersect
[in]originCoordinates of origin point of slice
[in]normalNormal vector of the slice
[in]radius1Inner radius of the annulus (hole)
[in]radius2Outer radius of the annulus
[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.
[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.

◆ 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 to intersect
[in]originCoordinates of origin point of slice
[in]normalNormal vector of the slice
[in]length1Length along the first axis of the plane
[in]length2Length along the second axis of the plane

◆ cs_medcoupling_slice_by_id()

cs_medcoupling_slice_t* cs_medcoupling_slice_by_id ( int  id)

Get pointer to a slice based on id.

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

◆ 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.

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

◆ 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 NULL if not found.

Parameters
[in]nameName of the slice structure
Returns
pointer to slice, NULL if not found.

◆ 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.

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

◆ 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.

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

◆ 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.

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

◆ 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.

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

◆ 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.

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

◆ 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 NULL is provided for both weights, the non-weighted function is called.

Parameters
[in]nameName of the slice
[in]scalarArray of scalar values (size n_cells)
[in]weight_sScalar weight array (size n_cells)
[in]weight_vVectorial weight array (size n_cells)
Returns
Computed integral value over entire slice (parallel)

◆ 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.

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

◆ 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 NULL is provided for both weights, the non-weighted function is called.

Parameters
[in]nameName of the slice
[in]scalarArray of scalar values (size n_cells)
[in]weight_sScalar weight array (size n_cells)
[in]weight_vVectorial weight array (size n_cells)
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 (size n_cells)
[in]weight_vVectorial weight array (size n_cells), cs_real_3_t pointer
Returns
Computed mean value over entire slice (parallel)