My Project
programmer's documentation
Functions
cs_parameters.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "bft_printf.h"
#include "cs_convection_diffusion.h"
#include "cs_field.h"
#include "cs_log.h"
#include "cs_map.h"
#include "cs_post.h"
#include "cs_parall.h"
#include "cs_restart.h"
#include "cs_restart_default.h"
#include "cs_mesh_location.h"
#include "cs_tree.h"
#include "cs_parameters.h"
Include dependency graph for cs_parameters.c:

Functions

cs_space_disc_tcs_get_glob_space_disc (void)
 Provide access to cs_glob_space_disc. More...
 
cs_piso_tcs_get_glob_piso (void)
 Provide acces to cs_glob_piso. More...
 
void cs_parameters_set_n_buoyant_scalars (void)
 
void cs_parameters_define_field_keys (void)
 Define general field keys. More...
 
void cs_parameters_define_field_key_gas_mix (void)
 Define field key for condensation. More...
 
void cs_parameters_read_restart_info (void)
 Read general restart info. More...
 
void cs_parameters_add_variable (const char *name, int dim)
 Define a user variable. More...
 
void cs_parameters_add_variable_variance (const char *name, const char *variable_name)
 Define a user variable which is a variance of another variable. More...
 
void cs_parameters_add_property (const char *name, int dim, int location_id)
 Define a user property. More...
 
int cs_parameters_n_added_variables (void)
 Return the number of defined user variables not added yet. More...
 
int cs_parameters_n_added_properties (void)
 Return the number of defined user properties not added yet. More...
 
void cs_parameters_create_added_variables (void)
 Create previously added user variables. More...
 
void cs_parameters_create_added_properties (void)
 Create previously added user properties. More...
 
cs_field_tcs_parameters_add_boundary_values (cs_field_t *f)
 Define a boundary values field for a variable field. More...
 
cs_field_tcs_parameters_add_boundary_temperature (void)
 Define a boundary values field for temperature, if applicable. More...
 
cs_var_cal_opt_t cs_parameters_var_cal_opt_default (void)
 Return a local variable calculation options structure, with default options. More...
 
void cs_space_disc_log_setup (void)
 Print the space discretization structure to setup.log. More...
 

Detailed Description

General parameters and options management.

Function Documentation

◆ cs_get_glob_piso()

cs_piso_t* cs_get_glob_piso ( void  )

Provide acces to cs_glob_piso.

needed to initialize structure with GUI and user C functions.

Returns
piso information structure

◆ cs_get_glob_space_disc()

cs_space_disc_t* cs_get_glob_space_disc ( void  )

Provide access to cs_glob_space_disc.

needed to initialize structure in GUI and user C functions.

Returns
space discretization description structure

◆ cs_parameters_add_boundary_temperature()

cs_field_t* cs_parameters_add_boundary_temperature ( void  )

Define a boundary values field for temperature, if applicable.

Returns
pointer to boundary values field, or NULL if not applicable

◆ cs_parameters_add_boundary_values()

cs_field_t* cs_parameters_add_boundary_values ( cs_field_t f)

Define a boundary values field for a variable field.

Parameters
[in,out]fpointer to field structure
Returns
pointer to boundary values field, or NULL if not applicable

◆ cs_parameters_add_property()

void cs_parameters_add_property ( const char *  name,
int  dim,
int  location_id 
)

Define a user property.

Parameters
[in]namename of property and associated field
[in]dimproperty dimension
[in]location_idid of associated mesh location

◆ cs_parameters_add_variable()

void cs_parameters_add_variable ( const char *  name,
int  dim 
)

Define a user variable.

Solved variables are always defined on cells.

Solved variables are always defined on cells.

Parameters
[in]namename of variable and associated field
[in]dimvariable dimension

◆ cs_parameters_add_variable_variance()

void cs_parameters_add_variable_variance ( const char *  name,
const char *  variable_name 
)

Define a user variable which is a variance of another variable.

Only variances of thermal or user-defined variables are currently handled.

Parameters
[in]namename of variance and associated field
[in]variable_namename of associated variable

◆ cs_parameters_create_added_properties()

void cs_parameters_create_added_properties ( void  )

Create previously added user properties.

◆ cs_parameters_create_added_variables()

void cs_parameters_create_added_variables ( void  )

Create previously added user variables.

◆ cs_parameters_define_field_key_gas_mix()

void cs_parameters_define_field_key_gas_mix ( void  )

Define field key for condensation.

Note: this should be moved in the future to a condensation-specific file.

◆ cs_parameters_define_field_keys()

void cs_parameters_define_field_keys ( void  )

Define general field keys.

A recommended practice for different submodules would be to use "cs_<module>_key_init() functions to define keys specific to those modules.

Is the field time-extrapolated? -1: default automatic value 0: "standard" first-order: the value calculated at the beginning of the current time step (from the variables known at the end of the previous time step) is used 1: second-order: the physical property $\phi$ is extrapolated according to the formula $\phi^{n+\theta}=[(1+\theta)\phi^n-\theta \phi^{n-1}]$, $\theta$ being given by the value of 0.5 2: first-order: the physical property $\phi$ is extrapolated at $n+1$ according to the same formula as when = 1 but with $\theta$ = 1

◆ cs_parameters_n_added_properties()

int cs_parameters_n_added_properties ( void  )

Return the number of defined user properties not added yet.

Returns
number of defined user properties

◆ cs_parameters_n_added_variables()

int cs_parameters_n_added_variables ( void  )

Return the number of defined user variables not added yet.

This number is reset to 0 when cs_parameters_create_added_variables is called.

Returns
number of defined user variables

◆ cs_parameters_read_restart_info()

void cs_parameters_read_restart_info ( void  )

Read general restart info.

This updates the previous time step info.

◆ cs_parameters_set_n_buoyant_scalars()

void cs_parameters_set_n_buoyant_scalars ( void  )

◆ cs_parameters_var_cal_opt_default()

cs_var_cal_opt_t cs_parameters_var_cal_opt_default ( void  )

Return a local variable calculation options structure, with default options.

Returns
variable calculations options structure

◆ cs_space_disc_log_setup()

void cs_space_disc_log_setup ( void  )

Print the space discretization structure to setup.log.