programmer's documentation
Data Structures | Macros | Typedefs | Enumerations | Functions
cs_param.h File Reference
#include "cs_mesh.h"
#include "cs_cdo.h"
#include "cs_quadrature.h"
Include dependency graph for cs_param.h:

Go to the source code of this file.

Data Structures

union  cs_def_t
 
struct  cs_param_hodge_t
 
struct  cs_param_time_t
 
struct  cs_param_advection_t
 
struct  cs_param_reaction_t
 
struct  cs_param_bc_def_t
 
struct  cs_param_bc_t
 
struct  cs_param_source_term_t
 
struct  cs_param_itsol_t
 

Macros

#define CS_PARAM_FLAG_UNIFORM   (1 << 0)
 
#define CS_PARAM_FLAG_CELLWISE   (1 << 1)
 
#define CS_PARAM_FLAG_UNSTEADY   (1 << 2)
 
#define CS_PARAM_FLAG_VERTEX   (1 << 3)
 
#define CS_PARAM_FLAG_EDGE   (1 << 4)
 
#define CS_PARAM_FLAG_FACE   (1 << 5)
 
#define CS_PARAM_FLAG_CELL   (1 << 6)
 
#define CS_PARAM_FLAG_PRIMAL   (1 << 7)
 
#define CS_PARAM_FLAG_DUAL   (1 << 8)
 
#define CS_PARAM_FLAG_BORDER   (1 << 9)
 
#define CS_PARAM_FLAG_SCAL   (1 << 10)
 
#define CS_PARAM_FLAG_VECT   (1 << 11)
 
#define CS_PARAM_FLAG_TENS   (1 << 12)
 
#define CS_PARAM_FLAG_BY_CELL   (1 << 13)
 

Typedefs

typedef void( cs_user_func_t) (const void *input1, const void *input2, cs_real_t tcur, const cs_real_3_t xyz, cs_get_t *output)
 

Enumerations

enum  cs_param_def_type_t {
  CS_PARAM_DEF_BY_ANALYTIC_FUNCTION, CS_PARAM_DEF_BY_ARRAY, CS_PARAM_DEF_BY_FIELD, CS_PARAM_DEF_BY_ONEVAR_LAW,
  CS_PARAM_DEF_BY_TIME_FUNCTION, CS_PARAM_DEF_BY_USER_FUNCTION, CS_PARAM_DEF_BY_VALUE, CS_PARAM_N_DEF_TYPES
}
 
enum  cs_param_var_type_t {
  CS_PARAM_VAR_SCAL, CS_PARAM_VAR_VECT, CS_PARAM_VAR_SYMTENS, CS_PARAM_VAR_TENS,
  CS_PARAM_N_VAR_TYPES
}
 
enum  cs_param_hodge_type_t {
  CS_PARAM_HODGE_TYPE_VPCD, CS_PARAM_HODGE_TYPE_EPFD, CS_PARAM_HODGE_TYPE_FPED, CS_PARAM_HODGE_TYPE_EDFP,
  CS_PARAM_HODGE_TYPE_CPVD, CS_PARAM_N_HODGE_TYPES
}
 
enum  cs_param_hodge_algo_t { CS_PARAM_HODGE_ALGO_VORONOI, CS_PARAM_HODGE_ALGO_WBS, CS_PARAM_HODGE_ALGO_COST, CS_PARAM_N_HODGE_ALGOS }
 
enum  cs_time_scheme_t {
  CS_TIME_SCHEME_IMPLICIT, CS_TIME_SCHEME_EXPLICIT, CS_TIME_SCHEME_CRANKNICO, CS_TIME_SCHEME_THETA,
  CS_TIME_N_SCHEMES
}
 
enum  cs_param_advection_form_t { CS_PARAM_ADVECTION_FORM_CONSERV, CS_PARAM_ADVECTION_FORM_NONCONS, CS_PARAM_N_ADVECTION_FORMULATIONS }
 
enum  cs_param_advection_weight_algo_t {
  CS_PARAM_ADVECTION_WEIGHT_ALGO_CENTERED, CS_PARAM_ADVECTION_WEIGHT_ALGO_UPWIND, CS_PARAM_ADVECTION_WEIGHT_ALGO_SAMARSKII, CS_PARAM_ADVECTION_WEIGHT_ALGO_SG,
  CS_PARAM_ADVECTION_WEIGHT_ALGO_D10G5, CS_PARAM_N_ADVECTION_WEIGHT_ALGOS
}
 
enum  cs_param_advection_weight_t { CS_PARAM_ADVECTION_WEIGHT_FLUX, CS_PARAM_ADVECTION_WEIGHT_XEXC, CS_PARAM_N_ADVECTION_WEIGHTS }
 
enum  cs_param_reaction_type_t { CS_PARAM_REACTION_TYPE_LINEAR, CS_PARAM_N_REACTION_TYPES }
 
enum  cs_param_boundary_type_t {
  CS_PARAM_BOUNDARY_WALL, CS_PARAM_BOUNDARY_INLET, CS_PARAM_BOUNDARY_OUTLET, CS_PARAM_BOUNDARY_SYMMETRY,
  CS_PARAM_N_BOUNDARY_TYPES
}
 
enum  cs_param_bc_type_t {
  CS_PARAM_BC_HMG_DIRICHLET, CS_PARAM_BC_DIRICHLET, CS_PARAM_BC_HMG_NEUMANN, CS_PARAM_BC_NEUMANN,
  CS_PARAM_BC_ROBIN, CS_PARAM_N_BC_TYPES
}
 
enum  cs_param_bc_enforce_t {
  CS_PARAM_BC_ENFORCE_STRONG, CS_PARAM_BC_ENFORCE_WEAK_PENA, CS_PARAM_BC_ENFORCE_WEAK_NITSCHE, CS_PARAM_BC_ENFORCE_WEAK_SYM,
  CS_PARAM_N_BC_ENFORCEMENTS
}
 
enum  cs_param_source_term_type_t { CS_PARAM_SOURCE_TERM_USER, CS_PARAM_SOURCE_TERM_MASS, CS_PARAM_SOURCE_TERM_HEADLOSS, CS_PARAM_N_SOURCE_TERM_TYPES }
 
enum  cs_param_precond_type_t {
  CS_PARAM_PRECOND_DIAG, CS_PARAM_PRECOND_POLY1, CS_PARAM_PRECOND_SSOR, CS_PARAM_PRECOND_ILU0,
  CS_PARAM_PRECOND_ICC0, CS_PARAM_PRECOND_AMG, CS_PARAM_PRECOND_AS, CS_PARAM_N_PRECOND_TYPES
}
 
enum  cs_param_itsol_type_t {
  CS_PARAM_ITSOL_CG, CS_PARAM_ITSOL_BICG, CS_PARAM_ITSOL_GMRES, CS_PARAM_ITSOL_AMG,
  CS_PARAM_N_ITSOL_TYPES
}
 

Functions

void cs_param_set_def (cs_param_def_type_t def_type, cs_param_var_type_t var_type, const void *val, cs_def_t *def)
 Set a cs_def_t structure. More...
 
cs_param_bc_tcs_param_bc_create (cs_param_bc_type_t default_bc)
 Allocate and initialize a new cs_param_bc_t structure. More...
 
void cs_param_bc_def_set (cs_param_bc_def_t *bcpd, int loc_id, cs_param_bc_type_t bc_type, cs_param_var_type_t var_type, cs_param_def_type_t def_type, const void *coef1, const void *coef2)
 Set a cs_param_bc_def_t structure. More...
 
void cs_param_reaction_add (cs_param_reaction_t *rp, const char *r_name, cs_param_hodge_type_t h_type, cs_param_hodge_algo_t h_algo, cs_param_source_term_type_t r_type)
 Define a new reaction term. The structure related to this reaction term has already been allocated among the list of reaction terms associated to an equation. More...
 
void cs_param_source_term_add (cs_param_source_term_t *stp, 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, const void *val)
 Define a source term. This source term is added to the list of source terms associated to an equation. More...
 
const char * cs_param_reaction_get_name (const cs_param_reaction_t r_info)
 Get the name related to a reaction term. More...
 
const char * cs_param_reaction_get_type_name (cs_param_reaction_t r_info)
 Get the name of the type of reaction term. 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 of type of a given source term structure. 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 preconditioner. More...
 
const char * cs_param_get_bc_name (cs_param_bc_type_t bc)
 Get the name of the type of boundary condition. More...
 
const char * cs_param_get_bc_enforcement_name (cs_param_bc_enforce_t type)
 Get the name of the type of enforcement of the boundary condition. More...
 

Macro Definition Documentation

#define CS_PARAM_FLAG_BORDER   (1 << 9)
#define CS_PARAM_FLAG_BY_CELL   (1 << 13)
#define CS_PARAM_FLAG_CELL   (1 << 6)
#define CS_PARAM_FLAG_CELLWISE   (1 << 1)
#define CS_PARAM_FLAG_DUAL   (1 << 8)
#define CS_PARAM_FLAG_EDGE   (1 << 4)
#define CS_PARAM_FLAG_FACE   (1 << 5)
#define CS_PARAM_FLAG_PRIMAL   (1 << 7)
#define CS_PARAM_FLAG_SCAL   (1 << 10)
#define CS_PARAM_FLAG_TENS   (1 << 12)
#define CS_PARAM_FLAG_UNIFORM   (1 << 0)
#define CS_PARAM_FLAG_UNSTEADY   (1 << 2)
#define CS_PARAM_FLAG_VECT   (1 << 11)
#define CS_PARAM_FLAG_VERTEX   (1 << 3)

Typedef Documentation

typedef void( cs_user_func_t) (const void *input1, const void *input2, cs_real_t tcur, const cs_real_3_t xyz, cs_get_t *output)

Enumeration Type Documentation

Enumerator
CS_PARAM_ADVECTION_FORM_CONSERV 
CS_PARAM_ADVECTION_FORM_NONCONS 
CS_PARAM_N_ADVECTION_FORMULATIONS 
Enumerator
CS_PARAM_ADVECTION_WEIGHT_ALGO_CENTERED 
CS_PARAM_ADVECTION_WEIGHT_ALGO_UPWIND 
CS_PARAM_ADVECTION_WEIGHT_ALGO_SAMARSKII 
CS_PARAM_ADVECTION_WEIGHT_ALGO_SG 
CS_PARAM_ADVECTION_WEIGHT_ALGO_D10G5 
CS_PARAM_N_ADVECTION_WEIGHT_ALGOS 
Enumerator
CS_PARAM_ADVECTION_WEIGHT_FLUX 
CS_PARAM_ADVECTION_WEIGHT_XEXC 
CS_PARAM_N_ADVECTION_WEIGHTS 
Enumerator
CS_PARAM_BC_ENFORCE_STRONG 
CS_PARAM_BC_ENFORCE_WEAK_PENA 
CS_PARAM_BC_ENFORCE_WEAK_NITSCHE 
CS_PARAM_BC_ENFORCE_WEAK_SYM 
CS_PARAM_N_BC_ENFORCEMENTS 
Enumerator
CS_PARAM_BC_HMG_DIRICHLET 
CS_PARAM_BC_DIRICHLET 
CS_PARAM_BC_HMG_NEUMANN 
CS_PARAM_BC_NEUMANN 
CS_PARAM_BC_ROBIN 
CS_PARAM_N_BC_TYPES 
Enumerator
CS_PARAM_BOUNDARY_WALL 
CS_PARAM_BOUNDARY_INLET 
CS_PARAM_BOUNDARY_OUTLET 
CS_PARAM_BOUNDARY_SYMMETRY 
CS_PARAM_N_BOUNDARY_TYPES 
Enumerator
CS_PARAM_DEF_BY_ANALYTIC_FUNCTION 
CS_PARAM_DEF_BY_ARRAY 
CS_PARAM_DEF_BY_FIELD 
CS_PARAM_DEF_BY_ONEVAR_LAW 
CS_PARAM_DEF_BY_TIME_FUNCTION 
CS_PARAM_DEF_BY_USER_FUNCTION 
CS_PARAM_DEF_BY_VALUE 
CS_PARAM_N_DEF_TYPES 
Enumerator
CS_PARAM_HODGE_ALGO_VORONOI 
CS_PARAM_HODGE_ALGO_WBS 
CS_PARAM_HODGE_ALGO_COST 
CS_PARAM_N_HODGE_ALGOS 
Enumerator
CS_PARAM_HODGE_TYPE_VPCD 
CS_PARAM_HODGE_TYPE_EPFD 
CS_PARAM_HODGE_TYPE_FPED 
CS_PARAM_HODGE_TYPE_EDFP 
CS_PARAM_HODGE_TYPE_CPVD 
CS_PARAM_N_HODGE_TYPES 
Enumerator
CS_PARAM_ITSOL_CG 
CS_PARAM_ITSOL_BICG 
CS_PARAM_ITSOL_GMRES 
CS_PARAM_ITSOL_AMG 
CS_PARAM_N_ITSOL_TYPES 
Enumerator
CS_PARAM_PRECOND_DIAG 
CS_PARAM_PRECOND_POLY1 
CS_PARAM_PRECOND_SSOR 
CS_PARAM_PRECOND_ILU0 
CS_PARAM_PRECOND_ICC0 
CS_PARAM_PRECOND_AMG 
CS_PARAM_PRECOND_AS 
CS_PARAM_N_PRECOND_TYPES 
Enumerator
CS_PARAM_REACTION_TYPE_LINEAR 
CS_PARAM_N_REACTION_TYPES 
Enumerator
CS_PARAM_SOURCE_TERM_USER 
CS_PARAM_SOURCE_TERM_MASS 
CS_PARAM_SOURCE_TERM_HEADLOSS 
CS_PARAM_N_SOURCE_TERM_TYPES 
Enumerator
CS_PARAM_VAR_SCAL 
CS_PARAM_VAR_VECT 
CS_PARAM_VAR_SYMTENS 
CS_PARAM_VAR_TENS 
CS_PARAM_N_VAR_TYPES 
Enumerator
CS_TIME_SCHEME_IMPLICIT 
CS_TIME_SCHEME_EXPLICIT 
CS_TIME_SCHEME_CRANKNICO 
CS_TIME_SCHEME_THETA 
CS_TIME_N_SCHEMES 

Function Documentation

cs_param_bc_t* cs_param_bc_create ( cs_param_bc_type_t  default_bc)

Allocate and initialize a new cs_param_bc_t structure.

Parameters
[in]default_bcdefault boundary condition
Returns
a pointer to the new structure (free with cs_param_eq_t)
Parameters
[in]default_bcdefault boundary condition
Returns
a pointer to the new structure (free with cs_equation_param_t)
void cs_param_bc_def_set ( cs_param_bc_def_t bcpd,
int  loc_id,
cs_param_bc_type_t  bc_type,
cs_param_var_type_t  var_type,
cs_param_def_type_t  def_type,
const void *  coef1,
const void *  coef2 
)

Set a cs_param_bc_def_t structure.

Parameters
[in,out]bcpdpointer to cs_param_bc_def_t struct. to set
[in]loc_idid related to a cs_mesh_location_t
[in]bc_typegeneric type of admissible boundary conditions
[in]var_typetype of variables (scalar, vector, tensor...)
[in]def_typeby value, function...
[in]coef1access to the value of the first coef
[in]coef2access to the value of the second coef (optional)
const char* cs_param_get_bc_enforcement_name ( cs_param_bc_enforce_t  type)

Get the name of the type of enforcement of the boundary condition.

Parameters
[in]typetype of enforcement of boundary conditions
Returns
the associated name
Parameters
[in]bc_enforcetype of enforcement of boundary conditions
Returns
the associated name
const char* cs_param_get_bc_name ( cs_param_bc_type_t  bc)

Get the name of the type of boundary condition.

Parameters
[in]bctype of boundary condition
Returns
the associated bc name
Parameters
[in]bc_typetype of boundary condition
Returns
the associated bc name
const char* cs_param_get_def_type_name ( const cs_param_def_type_t  type)

Get the name related to a type of definition.

Parameters
[in]typecs_param_def_type_t
Returns
the name associated to this type
const char* cs_param_get_precond_name ( cs_param_precond_type_t  precond)

Get the name of the preconditioner.

Parameters
[in]precondtype of preconditioner
Returns
the associated preconditioner name
const char* cs_param_get_solver_name ( cs_param_itsol_type_t  solver)

Get the name of the solver.

Parameters
[in]solvertype of iterative solver
Returns
the associated solver name
const char* cs_param_get_var_type_name ( const cs_param_var_type_t  type)

Get the name related to a type of variable.

Parameters
[in]typecs_param_var_type_t
Returns
the name associated to this type
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.

Parameters
[in]h_infocs_param_hodge_t structure
Returns
the name of the algorithm
const char* cs_param_hodge_get_type_name ( const cs_param_hodge_t  h_info)

Get the type of discrete Hodge operator.

Parameters
[in]h_infocs_param_hodge_t structure
Returns
the name of the type
void cs_param_reaction_add ( cs_param_reaction_t rp,
const char *  r_name,
cs_param_hodge_type_t  h_type,
cs_param_hodge_algo_t  h_algo,
cs_param_source_term_type_t  r_type 
)

Define a new reaction term. The structure related to this reaction term has already been allocated among the list of reaction terms associated to an equation.

Parameters
[in,out]rppointer to cs_param_reaction_t structure
[in]r_namename of the reaction term
[in]h_typetype of discrete Hodge op. associated to this term
[in]h_algoalgorithm used to build the discrete Hodge op.
[in]r_typetype of reaction term
const char* cs_param_reaction_get_name ( const cs_param_reaction_t  r_info)

Get the name related to a reaction term.

Parameters
[in]r_infocs_param_reaction_t structure
Returns
the name of the reaction term
const char* cs_param_reaction_get_type_name ( cs_param_reaction_t  r_info)

Get the name of the type of reaction term.

Parameters
[in]r_infoset of parameters related to a reaction term
Returns
the name associated with this type of reaction term
void cs_param_set_def ( cs_param_def_type_t  def_type,
cs_param_var_type_t  var_type,
const void *  val,
cs_def_t def 
)

Set a cs_def_t structure.

Parameters
[in]def_typetype of definition (by value, function...)
[in]var_typetype of variables (scalar, vector, tensor...)
[in]valvalue to set
[in,out]defpointer to cs_def_t structure
void cs_param_source_term_add ( cs_param_source_term_t stp,
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,
const void *  val 
)

Define a source term. This source term is added to the list of source terms associated to an equation.

Parameters
[in,out]stppointer to cs_param_source_term_t structure
[in]st_namename of the source term
[in]ml_idid of the related to a cs_mesh_location_t struct.
[in]typetype of source term
[in]var_typetype of variables (scalar, vector, tensor...)
[in]quad_typetype of quadrature rule to use
[in]def_typetype of definition (by value, function...)
[in]valaccess to the definition of the source term
const char* cs_param_source_term_get_name ( const cs_param_source_term_t  st_info)

Get the name related to a source term.

Parameters
[in]st_infocs_param_source_term_t structure
Returns
the name of the source term
const char* cs_param_source_term_get_type_name ( const cs_param_source_term_t  st_info)

Get the name of type of a given source term structure.

Parameters
[in]st_infocs_param_source_term_t structure
Returns
the name of the type