![]() |
programmer's documentation
|
#include "cs_cdo.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_local.h"
#include "cs_cdo_quantities.h"
#include "cs_mesh_location.h"
#include "cs_param.h"
#include "cs_property.h"
#include "cs_time_step.h"
Go to the source code of this file.
Data Structures | |
struct | cs_adv_field_t |
Macros | |
#define | CS_ADVECTION_FIELD_POST_FIELD (1 << 0) |
#define | CS_ADVECTION_FIELD_POST_COURANT (1 << 1) |
Enumerations | |
enum | cs_advection_field_key_t { CS_ADVKEY_DEFINE_AT, CS_ADVKEY_POST, CS_ADVKEY_N_KEYS } |
Functions | |
void | cs_advection_field_set_shared_pointers (const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step) |
Set shared pointers to main domain members. More... | |
cs_adv_field_t * | cs_advection_field_create (const char *name) |
Create and initialize a new advection field structure. More... | |
cs_adv_field_t * | cs_advection_field_free (cs_adv_field_t *adv) |
Free a cs_adv_field_t structure. More... | |
bool | cs_advection_field_check_name (const cs_adv_field_t *adv, const char *ref_name) |
Check if the given advection field has the name ref_name. More... | |
bool | cs_advection_field_is_uniform (const cs_adv_field_t *adv) |
returns true if the advection field is uniform, otherwise false More... | |
bool | cs_advection_field_is_cellwise (const cs_adv_field_t *adv) |
returns true if the advection field is uniform in each cell otherwise false More... | |
const char * | cs_advection_field_get_name (const cs_adv_field_t *adv) |
Retrieve the name of an advection field. More... | |
cs_param_def_type_t | cs_advection_field_get_deftype (const cs_adv_field_t *adv) |
Retrieve the type of definition used to set the current advection field structure. More... | |
void | cs_advection_field_summary (const cs_adv_field_t *adv) |
Print a summary of a cs_adv_field_t structure. More... | |
void | cs_advection_field_set_option (cs_adv_field_t *adv, cs_advection_field_key_t key, const char *keyval) |
Set optional parameters related to a cs_adv_field_t structure. More... | |
void | cs_advection_field_def_by_value (cs_adv_field_t *adv, const cs_real_t vector[3]) |
Define the value of a cs_adv_field_t structure. More... | |
void | cs_advection_field_def_by_analytic (cs_adv_field_t *adv, cs_analytic_func_t *func) |
Define a cs_adv_field_t structure thanks to an analytic function. More... | |
void | cs_advection_field_def_by_array (cs_adv_field_t *adv, cs_desc_t desc) |
Define a cs_adv_field_t structure thanks to an array of values. More... | |
void | cs_advection_field_set_array (cs_adv_field_t *adv, const cs_real_t *array) |
Set the array related to the definition of a cs_adv_field_t structure. More... | |
void | cs_advection_field_create_field (cs_adv_field_t *adv) |
Create a cs_field_t structure related to an advection field. More... | |
cs_field_t * | cs_advection_field_get_field (cs_adv_field_t *adv, cs_mesh_location_type_t ml_type) |
Get a cs_field_t structure related to an advection field and a mesh location. More... | |
void | cs_advection_field_in_cell (const cs_cell_mesh_t *cm, const cs_adv_field_t *adv, cs_nvec3_t *vect) |
Compute the value of the advection field at the cell center. More... | |
void | cs_advection_field_get_cell_vector (cs_lnum_t c_id, const cs_adv_field_t *adv, cs_nvec3_t *vect) |
Compute the value of the advection field at the cell center. More... | |
void | cs_advection_field_get_at_xyz (const cs_adv_field_t *adv, const cs_real_3_t xyz, cs_nvec3_t *vect) |
Compute the value of the advection field for a given face. More... | |
void | cs_advection_field_at_cells (const cs_adv_field_t *adv, cs_real_t *cell_values) |
Compute the value of the advection field at cell centers. More... | |
void | cs_advection_field_at_vertices (const cs_adv_field_t *adv, cs_real_t *vtx_values) |
Compute the value of the advection field at vertices. More... | |
double | cs_advection_field_get_cell_max (const cs_adv_field_t *adv) |
Compute the max. value of the advection field among cells. More... | |
void | cs_advection_field_get_flux_dfaces (const cs_cell_mesh_t *cm, const cs_param_advection_t a_info, const cs_adv_field_t *adv, cs_real_t *fluxes) |
Compute the value of the flux of the advection field across the the dual faces of a cell. More... | |
cs_real_t | cs_advection_field_get_flux_tef (const cs_adv_field_t *adv, const cs_param_advection_t a_info, const cs_cell_mesh_t *cm, cs_real_t tef_meas, short int f, short int e, short int v1, short int v2) |
Compute the value of the flux of the advection field across the triangle defined by the two vertices of an edge and the barycenter of a face. More... | |
cs_real_t | cs_advection_field_get_flux_svef (const cs_cell_mesh_t *cm, short int v, short int e, short int f, const cs_param_advection_t a_info, const cs_adv_field_t *adv) |
Compute the value of the flux of the advection field across the triangle defined by a vertex, the face and edge barycenters. More... | |
void | cs_advection_field_update (cs_adv_field_t *adv) |
Update the values of the related field(s) More... | |
void | cs_advection_get_peclet (const cs_adv_field_t *adv, const cs_property_t *diff, double peclet[]) |
Compute the Peclet number in each cell. More... | |
#define CS_ADVECTION_FIELD_POST_COURANT (1 << 1) |
#define CS_ADVECTION_FIELD_POST_FIELD (1 << 0) |
void cs_advection_field_at_cells | ( | const cs_adv_field_t * | adv, |
cs_real_t * | cell_values | ||
) |
Compute the value of the advection field at cell centers.
[in] | adv | pointer to a cs_adv_field_t structure |
[in,out] | cell_values | array of values at cell centers |
void cs_advection_field_at_vertices | ( | const cs_adv_field_t * | adv, |
cs_real_t * | vtx_values | ||
) |
Compute the value of the advection field at vertices.
[in] | adv | pointer to a cs_adv_field_t structure |
[in,out] | vtx_values | array storing the results |
bool cs_advection_field_check_name | ( | const cs_adv_field_t * | adv, |
const char * | ref_name | ||
) |
Check if the given advection field has the name ref_name.
[in] | adv | pointer to a cs_adv_field_t structure to test |
[in] | ref_name | name of the advection field to find |
cs_adv_field_t* cs_advection_field_create | ( | const char * | name | ) |
Create and initialize a new advection field structure.
[in] | name | name of the advection field |
void cs_advection_field_create_field | ( | cs_adv_field_t * | adv | ) |
Create a cs_field_t structure related to an advection field.
[in,out] | adv | pointer to a cs_adv_field_t structure |
void cs_advection_field_def_by_analytic | ( | cs_adv_field_t * | adv, |
cs_analytic_func_t * | func | ||
) |
Define a cs_adv_field_t structure thanks to an analytic function.
[in,out] | adv | pointer to a cs_adv_field_t structure |
[in] | func | pointer to a function |
void cs_advection_field_def_by_array | ( | cs_adv_field_t * | adv, |
cs_desc_t | desc | ||
) |
Define a cs_adv_field_t structure thanks to an array of values.
[in,out] | adv | pointer to a cs_adv_field_t structure |
[in] | desc | information about this array |
void cs_advection_field_def_by_value | ( | cs_adv_field_t * | adv, |
const cs_real_t | vector[3] | ||
) |
Define the value of a cs_adv_field_t structure.
[in,out] | adv | pointer to a cs_adv_field_t structure |
[in] | vector | values to set |
cs_adv_field_t* cs_advection_field_free | ( | cs_adv_field_t * | adv | ) |
Free a cs_adv_field_t structure.
[in,out] | adv | pointer to a cs_adv_field_t structure to free |
void cs_advection_field_get_at_xyz | ( | const cs_adv_field_t * | adv, |
const cs_real_3_t | xyz, | ||
cs_nvec3_t * | vect | ||
) |
Compute the value of the advection field for a given face.
[in] | adv | pointer to a cs_adv_field_t structure |
[in] | xyz | coordinates where to evaluate the advection field |
[in,out] | vect | pointer to a cs_nvec3_t structure (meas + unitv) |
double cs_advection_field_get_cell_max | ( | const cs_adv_field_t * | adv | ) |
Compute the max. value of the advection field among cells.
[in] | adv | pointer to a cs_adv_field_t structure |
void cs_advection_field_get_cell_vector | ( | cs_lnum_t | c_id, |
const cs_adv_field_t * | adv, | ||
cs_nvec3_t * | vect | ||
) |
Compute the value of the advection field at the cell center.
[in] | c_id | id of the current cell |
[in] | adv | pointer to a cs_adv_field_t structure |
[in,out] | vect | pointer to a cs_nvec3_t structure (meas + unitv) |
cs_param_def_type_t cs_advection_field_get_deftype | ( | const cs_adv_field_t * | adv | ) |
Retrieve the type of definition used to set the current advection field structure.
[in] | adv | pointer to an advection field structure |
cs_field_t* cs_advection_field_get_field | ( | cs_adv_field_t * | adv, |
cs_mesh_location_type_t | ml_type | ||
) |
Get a cs_field_t structure related to an advection field and a mesh location.
[in] | adv | pointer to a cs_adv_field_t structure |
[in] | ml_type | type of mesh location (cells or vertices) |
void cs_advection_field_get_flux_dfaces | ( | const cs_cell_mesh_t * | cm, |
const cs_param_advection_t | a_info, | ||
const cs_adv_field_t * | adv, | ||
cs_real_t * | fluxes | ||
) |
Compute the value of the flux of the advection field across the the dual faces of a cell.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | a_info | set of parameters for the advection operator |
[in] | adv | pointer to a cs_adv_field_t structure |
[in,out] | fluxes | array of values attached to dual faces of a cell |
cs_real_t cs_advection_field_get_flux_svef | ( | const cs_cell_mesh_t * | cm, |
const short int | v, | ||
const short int | e, | ||
const short int | f, | ||
const cs_param_advection_t | a_info, | ||
const cs_adv_field_t * | adv | ||
) |
Compute the value of the flux of the advection field across the triangle defined by a vertex, the face and edge barycenters.
[in] | v_id | id of the current vertex |
[in] | e_id | id of the current edge |
[in] | f_id | id of the current face |
[in] | a_info | set of parameters for the advection operator |
[in] | adv | pointer to a cs_adv_field_t structure |
cs_real_t cs_advection_field_get_flux_tef | ( | const cs_adv_field_t * | adv, |
const cs_param_advection_t | a_info, | ||
const cs_cell_mesh_t * | cm, | ||
const cs_real_t | tef_meas, | ||
short int | f, | ||
short int | e, | ||
short int | v1, | ||
short int | v2 | ||
) |
Compute the value of the flux of the advection field across the triangle defined by the two vertices of an edge and the barycenter of a face.
[in] | adv | pointer to a cs_adv_field_t structure |
[in] | a_info | set of parameters for the advection operator |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | tef_meas | area of the triangle tef |
[in] | f | id of the face in the current cell |
[in] | e | id of the edge in the current cell |
[in] | v1 | id of the first vertex in the current cell |
[in] | v2 | id of the second vertex in the current cell |
const char* cs_advection_field_get_name | ( | const cs_adv_field_t * | adv | ) |
Retrieve the name of an advection field.
[in] | adv | pointer to an advection field structure |
void cs_advection_field_in_cell | ( | const cs_cell_mesh_t * | cm, |
const cs_adv_field_t * | adv, | ||
cs_nvec3_t * | vect | ||
) |
Compute the value of the advection field at the cell center.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | adv | pointer to a cs_adv_field_t structure |
[in,out] | vect | pointer to a cs_nvec3_t structure (meas + unitv) |
bool cs_advection_field_is_cellwise | ( | const cs_adv_field_t * | adv | ) |
returns true if the advection field is uniform in each cell otherwise false
[in] | adv | pointer to a property to test |
bool cs_advection_field_is_uniform | ( | const cs_adv_field_t * | adv | ) |
returns true if the advection field is uniform, otherwise false
[in] | adv | pointer to a property to test |
void cs_advection_field_set_array | ( | cs_adv_field_t * | adv, |
const cs_real_t * | array | ||
) |
Set the array related to the definition of a cs_adv_field_t structure.
[in,out] | adv | pointer to a cs_adv_field_t structure |
[in] | array | pointer to an array |
void cs_advection_field_set_option | ( | cs_adv_field_t * | adv, |
cs_advection_field_key_t | key, | ||
const char * | keyval | ||
) |
Set optional parameters related to a cs_adv_field_t structure.
[in,out] | adv | pointer to a cs_adv_field_t structure |
[in] | key | key related to the member of adv to set |
[in] | keyval | accessor to the value to set |
void cs_advection_field_set_shared_pointers | ( | const cs_cdo_quantities_t * | quant, |
const cs_cdo_connect_t * | connect, | ||
const cs_time_step_t * | time_step | ||
) |
Set shared pointers to main domain members.
[in] | quant | additional mesh quantities struct. |
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | time_step | pointer to a time step structure |
void cs_advection_field_summary | ( | const cs_adv_field_t * | adv | ) |
Print a summary of a cs_adv_field_t structure.
[in] | adv | pointer to a cs_adv_field_t structure to summarize |
void cs_advection_field_update | ( | cs_adv_field_t * | adv | ) |
Update the values of the related field(s)
[in,out] | adv | pointer to a cs_adv_field_t structure |
void cs_advection_get_peclet | ( | const cs_adv_field_t * | adv, |
const cs_property_t * | diff, | ||
cs_real_t | peclet[] | ||
) |
Compute the Peclet number in each cell.
[in] | adv | pointer to the advection field struct. |
[in] | diff | pointer to the diffusion property struct. |
[in,out] | peclet | pointer to an array storing Peclet number |