programmer's documentation
Macros | Functions | Variables
cs_param.c File Reference
#include "cs_defs.h"
#include <stdlib.h>
#include <stdio.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_param.h"
Include dependency graph for cs_param.c:

Macros

#define CS_PARAM_DBG   0
 

Functions

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...
 
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...
 
void cs_param_set_get (cs_param_var_type_t var_type, const char *val, cs_get_t *get)
 Set a cs_get_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...
 
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...
 
const char * cs_param_reaction_get_type_name (cs_param_reaction_type_t r_type)
 Get the name of the type of reaction term. 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...
 

Variables

static const char cs_param_def_type_name [CS_PARAM_N_DEF_TYPES][CS_BASE_STRING_LEN]
 
static const char cs_param_var_type_name [CS_PARAM_N_VAR_TYPES][CS_BASE_STRING_LEN]
 
static const char cs_param_bc_type_name [CS_PARAM_N_BC_TYPES][CS_BASE_STRING_LEN]
 
static const char cs_param_boundary_type_name [CS_PARAM_N_BOUNDARY_TYPES][CS_BASE_STRING_LEN]
 
static const char cs_param_hodge_type_desc [CS_PARAM_N_HODGE_TYPES][CS_BASE_STRING_LEN]
 
static const char cs_param_hodge_algo_desc [CS_PARAM_N_HODGE_ALGOS][CS_BASE_STRING_LEN]
 

Macro Definition Documentation

◆ CS_PARAM_DBG

#define CS_PARAM_DBG   0

Function Documentation

◆ cs_param_bc_create()

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_equation_param_t)

◆ cs_param_bc_def_set()

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)

◆ cs_param_get_bc_enforcement_name()

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]bc_enforcetype of enforcement of boundary conditions
Returns
the associated name

◆ cs_param_get_bc_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]bc_typetype of boundary condition
Returns
the associated bc name

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

◆ cs_param_get_precond_name()

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

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

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

◆ cs_param_hodge_get_algo_name()

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

◆ cs_param_hodge_get_type_name()

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

◆ cs_param_reaction_get_type_name()

const char* cs_param_reaction_get_type_name ( cs_param_reaction_type_t  r_type)

Get the name of the type of reaction term.

Parameters
[in]r_typetype of reaction term
Returns
the name associated with this type of reaction term

◆ cs_param_set_def()

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

◆ cs_param_set_get()

void cs_param_set_get ( cs_param_var_type_t  var_type,
const char *  val,
cs_get_t get 
)

Set a cs_get_t structure.

Parameters
[in]var_typetype of variables (scalar, vector, tensor...)
[in]valvalue to set
[in,out]getpointer to cs_get_t structure

Variable Documentation

◆ cs_param_bc_type_name

const char cs_param_bc_type_name[CS_PARAM_N_BC_TYPES][CS_BASE_STRING_LEN]
static
Initial value:
=
{ N_("Homogeneous Dirichlet"),
N_("Dirichlet"),
N_("Homogeneous Neumann"),
N_("Neumann"),
N_("Robin") }
#define N_(String)
Definition: cs_defs.h:56

◆ cs_param_boundary_type_name

const char cs_param_boundary_type_name[CS_PARAM_N_BOUNDARY_TYPES][CS_BASE_STRING_LEN]
static
Initial value:
=
{ N_("Wall"),
N_("Inlet"),
N_("Outlet"),
N_("Symmetry") }
#define N_(String)
Definition: cs_defs.h:56

◆ cs_param_def_type_name

const char cs_param_def_type_name[CS_PARAM_N_DEF_TYPES][CS_BASE_STRING_LEN]
static
Initial value:
=
{ N_("by analytic function"),
N_("by array"),
N_("by law (one argument)"),
N_("by law (two arguments)"),
N_("by law (two arguments: scalar+vector)"),
N_("quantity over a volume"),
N_("by time function"),
N_("by user function"),
N_("by value") }
#define N_(String)
Definition: cs_defs.h:56

◆ cs_param_hodge_algo_desc

const char cs_param_hodge_algo_desc[CS_PARAM_N_HODGE_ALGOS][CS_BASE_STRING_LEN]
static
Initial value:
=
{ "Voronoi",
"Whitney on the Barycentric Subdivision (WBS)",
"COnsistency-STabilization splitting (COST)" }

◆ cs_param_hodge_type_desc

const char cs_param_hodge_type_desc[CS_PARAM_N_HODGE_TYPES][CS_BASE_STRING_LEN]
static
Initial value:
=
{ "VpCd",
"EpFd",
"FpEd",
"EdFp",
"CpVd" }

◆ cs_param_var_type_name

const char cs_param_var_type_name[CS_PARAM_N_VAR_TYPES][CS_BASE_STRING_LEN]
static
Initial value:
=
{ N_("scalar"),
N_("vector"),
N_("tensor") }
#define N_(String)
Definition: cs_defs.h:56