![]() |
programmer's documentation
|
#include "cs_defs.h"
#include <string.h>
#include <assert.h>
#include <bft_mem.h>
#include <bft_printf.h>
#include "cs_mesh_location.h"
#include "cs_field.h"
#include "cs_cdo.h"
#include "cs_cdo_toolbox.h"
#include "cs_param.h"
Macros | |
#define | CS_PARAM_PTY_DBG 0 |
Functions | |
void | cs_param_pty_free_all (void) |
Destroy all structures related to properties. More... | |
cs_param_pty_t * | cs_param_pty_get (int pty_id) |
Retrieve a cs_param_pty_t structure from its id. More... | |
int | cs_param_pty_get_id_by_name (const char *ref_name) |
Find the id related to a property definition from its name. More... | |
void | cs_param_pty_set_default (void) |
Add by default several material properties. More... | |
void | cs_param_pty_add (const char *name, cs_param_pty_type_t type, int post_freq) |
Create and intialize a material property. More... | |
void | cs_param_pty_add_fields (void) |
Create a field related to a material property. More... | |
void | cs_param_pty_set_by_val (const char *name, cs_get_t matval) |
Define a material property by value. More... | |
void | cs_param_pty_set_by_analytic_func (const char *name, cs_analytic_func_t *analytic_func) |
Define a material property by an analytical function. More... | |
_Bool | cs_param_pty_is_uniform (int pty_id) |
Query to know if the material property is uniform. More... | |
const char * | cs_param_pty_get_name (int pty_id) |
Retrieve the name of a material property from its id. More... | |
void | cs_param_pty_get_val (int pty_id, cs_real_t tcur, cs_real_3_t xyz, _Bool invers, cs_real_33_t *matval) |
Retrieve the 3x3 matrix related to a general material property. This value is computed at location (x,y,z) and time t. More... | |
void | cs_param_pty_resume_all (void) |
Resume all the cs_param_pty_t structures. More... | |
void | cs_param_pty_finalize (void) |
Free structures dedicated to the definition of material properties. More... | |
cs_param_bc_t * | cs_param_bc_create (cs_param_bc_type_t default_bc, _Bool is_penalized) |
Allocate and initialize a new cs_param_bc_t structure. More... | |
void | cs_param_bc_def_set (cs_param_bc_def_t *bc_def, int loc_id, cs_param_bc_type_t bc_type, cs_param_def_type_t def_type, cs_def_t def_coef1, cs_def_t def_coef2) |
Set a cs_param_bc_def_t structure. More... | |
void | cs_param_source_term_add (cs_param_source_term_t *st, const char *st_name, int ml_id, cs_param_source_term_type_t type, cs_param_var_type_t var_type, cs_quadra_type_t quad_type, cs_param_def_type_t def_type, cs_def_t imp_def, cs_def_t exp_def) |
Define a source term. This source term is added to the list of source terms associated to an equation. More... | |
const char * | cs_param_source_term_get_name (const cs_param_source_term_t st_info) |
Get the name related to a source term. More... | |
const char * | cs_param_source_term_get_type_name (const cs_param_source_term_t st_info) |
Get the name related to a source term. More... | |
const char * | cs_param_get_var_type_name (const cs_param_var_type_t type) |
Get the name related to a type of variable. More... | |
const char * | cs_param_get_def_type_name (const cs_param_def_type_t type) |
Get the name related to a type of definition. More... | |
const char * | cs_param_hodge_get_algo_name (const cs_param_hodge_t h_info) |
Get the name of algorithm related to a discrete Hdoge operator. More... | |
const char * | cs_param_hodge_get_type_name (const cs_param_hodge_t h_info) |
Get the type of discrete Hodge operator. More... | |
const char * | cs_param_get_solver_name (cs_param_itsol_type_t solver) |
Get the name of the solver. More... | |
const char * | cs_param_get_precond_name (cs_param_precond_type_t precond) |
Get the name of the preconditionner. More... | |
Variables | |
static int | cs_param_n_properties = 0 |
static cs_param_pty_t * | cs_param_properties = NULL |
static const char | cs_param_def_type_name [CS_PARAM_N_DEF_TYPES][CS_CDO_LEN_NAME] |
static const char | cs_param_var_type_name [CS_PARAM_N_VAR_TYPES][CS_CDO_LEN_NAME] |
static const char | cs_param_pty_type_name [CS_PARAM_N_PTY_TYPES][CS_CDO_LEN_NAME] |
static const char | cs_param_bc_type_name [CS_PARAM_N_BC_TYPES][CS_CDO_LEN_NAME] |
static const char | cs_param_boundary_type_name [CS_PARAM_N_BOUNDARY_TYPES][CS_CDO_LEN_NAME] |
static const char | cs_param_hodge_type_desc [CS_PARAM_N_HODGE_TYPES][CS_CDO_LEN_NAME] |
static const char | cs_param_hodge_algo_desc [CS_PARAM_N_HODGE_ALGOS][CS_CDO_LEN_NAME] |
static const char | cs_param_source_term_type_name [CS_PARAM_N_SOURCE_TERM_TYPES][CS_CDO_LEN_NAME] |
#define CS_PARAM_PTY_DBG 0 |
cs_param_bc_t* cs_param_bc_create | ( | cs_param_bc_type_t | default_bc, |
_Bool | is_penalized | ||
) |
Allocate and initialize a new cs_param_bc_t structure.
[in] | default_bc | default boundary condition |
[in] | is_penalized | true/false |
void cs_param_bc_def_set | ( | cs_param_bc_def_t * | bc_def, |
int | loc_id, | ||
cs_param_bc_type_t | bc_type, | ||
cs_param_def_type_t | def_type, | ||
cs_def_t | def_coef1, | ||
cs_def_t | def_coef2 | ||
) |
Set a cs_param_bc_def_t structure.
[in,out] | bc_def | pointer to cs_param_bc_def_t struct. to set |
[in] | loc_id | id related to a cs_mesh_location_t |
[in] | bc_type | generic type of admissible boundary conditions |
[in] | def_type | by value, function... |
[in] | def_coef1 | access to the value of the first coef |
[in] | def_coef2 | access to the value of the second coef (optional) |
const char* cs_param_get_def_type_name | ( | const cs_param_def_type_t | type | ) |
Get the name related to a type of definition.
[in] | type | cs_param_def_type_t |
const char* cs_param_get_precond_name | ( | cs_param_precond_type_t | precond | ) |
Get the name of the preconditionner.
[in] | precond | type of preconditionner |
const char* cs_param_get_solver_name | ( | cs_param_itsol_type_t | solver | ) |
Get the name of the solver.
[in] | solver | type of iterative solver |
const char* cs_param_get_var_type_name | ( | const cs_param_var_type_t | type | ) |
Get the name related to a type of variable.
[in] | type | cs_param_var_type_t |
const char* cs_param_hodge_get_algo_name | ( | const cs_param_hodge_t | h_info | ) |
Get the name of algorithm related to a discrete Hdoge operator.
[in] | h_info | cs_param_hodge_t structure |
const char* cs_param_hodge_get_type_name | ( | const cs_param_hodge_t | h_info | ) |
Get the type of discrete Hodge operator.
[in] | h_info | cs_param_hodge_t structure |
void cs_param_pty_add | ( | const char * | name, |
cs_param_pty_type_t | type, | ||
int | post_freq | ||
) |
Create and intialize a material property.
[in] | name | name of the material property |
[in] | type | type of behavior of this material property |
[in] | post_freq | -1 (no post-processing), 0 (at the beginning) otherwise every post_freq iteration(s) |
void cs_param_pty_add_fields | ( | void | ) |
Create a field related to a material property.
void cs_param_pty_finalize | ( | void | ) |
Free structures dedicated to the definition of material properties.
void cs_param_pty_free_all | ( | void | ) |
Destroy all structures related to properties.
cs_param_pty_t* cs_param_pty_get | ( | int | pty_id | ) |
Retrieve a cs_param_pty_t structure from its id.
[in] | pty_id | id related to a property |
int cs_param_pty_get_id_by_name | ( | const char * | ref_name | ) |
Find the id related to a property definition from its name.
[in] | ref_name | name of the property to find |
const char* cs_param_pty_get_name | ( | int | pty_id | ) |
Retrieve the name of a material property from its id.
[in] | pty_id | id related to the material property to deal with |
void cs_param_pty_get_val | ( | int | pty_id, |
cs_real_t | tcur, | ||
cs_real_3_t | xyz, | ||
_Bool | invers, | ||
cs_real_33_t * | matval | ||
) |
Retrieve the 3x3 matrix related to a general material property. This value is computed at location (x,y,z) and time t.
[in] | pty_id | id related to the material property to deal with |
[in] | t | time at which we evaluate the material property |
[in] | xyz | location at which we evaluate the material property |
[in] | invers | true or false |
[in,out] | matval | pointer to the 3x3 matrix to return |
_Bool cs_param_pty_is_uniform | ( | int | pty_id | ) |
Query to know if the material property is uniform.
[in] | pty_id | id related to the material property to deal with |
void cs_param_pty_resume_all | ( | void | ) |
Resume all the cs_param_pty_t structures.
void cs_param_pty_set_by_analytic_func | ( | const char * | name, |
cs_analytic_func_t * | analytic_func | ||
) |
Define a material property by an analytical function.
[in] | name | name of the material property |
[in] | analytic | pointer to a cs_analytic_func_t |
void cs_param_pty_set_by_val | ( | const char * | name, |
cs_get_t | matval | ||
) |
Define a material property by value.
[in] | name | name of the material property |
[in] | matval | value to set |
void cs_param_pty_set_default | ( | void | ) |
Add by default several material properties.
void cs_param_source_term_add | ( | cs_param_source_term_t * | st, |
const char * | st_name, | ||
int | ml_id, | ||
cs_param_source_term_type_t | type, | ||
cs_param_var_type_t | var_type, | ||
cs_quadra_type_t | quad_type, | ||
cs_param_def_type_t | def_type, | ||
cs_def_t | imp_def, | ||
cs_def_t | exp_def | ||
) |
Define a source term. This source term is added to the list of source terms associated to an equation.
[in,out] | st | pointer to the cs_param_source_term_t struc. to set |
[in] | st_name | name of the source term (for log/post-processing) |
[in] | ml_id | id related to a cs_mesh_location_t |
[in] | type | type of source term |
[in] | var_type | type of variables (scalar, vector, tensor...) |
[in] | quad_type | type of quadrature rule to use |
[in] | def_type | type of definition (by value, function...) |
[in] | imp_def | access to the definition of the implicit part |
[in] | exp-def | access to the definition of the explicit part |
const char* cs_param_source_term_get_name | ( | const cs_param_source_term_t | st_info | ) |
Get the name related to a source term.
[in] | st_info | cs_param_source_term_t structure |
const char* cs_param_source_term_get_type_name | ( | const cs_param_source_term_t | st_info | ) |
Get the name related to a source term.
[in] | st_info | cs_param_source_term_t structure |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |