7.0
general documentation
cs_volume_mass_injection.h File Reference
#include "cs_base.h"
+ Include dependency graph for cs_volume_mass_injection.h:

Go to the source code of this file.

Data Structures

struct  cs_volume_mass_injection_by_function_context_t
 Context structure associated to a mass injection inside a volume relying on a function. More...
 

Typedefs

typedef void() cs_volume_mass_injection_eval_t(void *input, const cs_zone_t *z, cs_field_t *f, cs_real_t *val)
 Function pointer to update cell values in a given zone for volume mass injection. More...
 

Functions

void cs_volume_mass_injection_flag_zones (void)
 Flag volume zones with the appropriate CS_VOLUME_ZONE_MASS_SOURCE_TERM flag when at least one volume mass injection on that zone is present. More...
 
void cs_volume_mass_injection_build_lists (cs_lnum_t n_cells, cs_lnum_t cell_num[], int cell_zone_id[])
 Build the list and zone ids of cells with volume mass injection. More...
 
void cs_volume_mass_injection_eval (int nvar, cs_lnum_t ncesmp, int itypsm[], cs_real_t smacel[])
 Evaluate contributions to volume mass injection. More...
 
void cs_volume_mass_injection_get_arrays (const cs_field_t *f, cs_lnum_t *ncesmp, cs_lnum_t **icetsm, int **itpsmp, cs_real_t **smcelp, cs_real_t **gamma)
 Return pointers to the mass source term arrays. More...
 

Typedef Documentation

◆ cs_volume_mass_injection_eval_t

typedef void() cs_volume_mass_injection_eval_t(void *input, const cs_zone_t *z, cs_field_t *f, cs_real_t *val)

Function pointer to update cell values in a given zone for volume mass injection.

Note
if the input pointer is non-NULL, it must point to valid data when the 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;
Parameters

Function Documentation

◆ cs_volume_mass_injection_build_lists()

void cs_volume_mass_injection_build_lists ( cs_lnum_t  n_cells,
cs_lnum_t  cell_num[],
int  cell_zone_id[] 
)

Build the list and zone ids of cells with volume mass injection.

Parameters
[in]n_cellsnumber of cells in mass source term zones
[out]cell_numnumbers (1-based) cells in mass source term zones
[out]cell_zone_idassociated zone ids

◆ cs_volume_mass_injection_eval()

void cs_volume_mass_injection_eval ( int  nvar,
cs_lnum_t  ncesmp,
int  itypsm[],
cs_real_t  smacel[] 
)

Evaluate contributions to volume mass injection.

Parameters
[in]nvartotal number of variables
[in]ncesmpnumber of cells with mass source term
[in]itypsmmass source type for the working variable size: [nvar][ncesmp]
[in]smacelvalues of the variables associated to the mass source (for the pressure variable, smacel is the mass flux) size: [nvar][ncesmp]

◆ cs_volume_mass_injection_flag_zones()

void cs_volume_mass_injection_flag_zones ( void  )

Flag volume zones with the appropriate CS_VOLUME_ZONE_MASS_SOURCE_TERM flag when at least one volume mass injection on that zone is present.

This is necessary for the reverse zone indexing required by the legacy code to function with defintions that are partially unrolled an not purely zone-based.

◆ cs_volume_mass_injection_get_arrays()

void cs_volume_mass_injection_get_arrays ( const cs_field_t f,
cs_lnum_t ncesmp,
cs_lnum_t **  icetsm,
int **  itpsmp,
cs_real_t **  smcelp,
cs_real_t **  gamma 
)

Return pointers to the mass source term arrays.

Parameters
[in]fpointer to associated field
[out]ncesmpnumber of cells with mass source terms
[out]icetsmpointet to source mass cells list (1-based numbering)
[out]itpsmpmass source type for the working variable (see cs_user_mass_source_terms)
[out]s_typemass source types (0: ambient value, 1: s_val value)
[out]smcelppointer to mass source values
[out]gammapointer to flow mass value