My Project
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_1d_wall_thermal.h"
#include "cs_ale.h"
#include "cs_base.h"
#include "cs_domain.h"
#include "cs_field.h"
#include "cs_field_pointer.h"
#include "cs_lagr.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_mesh_quantities.h"
#include "cs_parameters.h"
#include "cs_parall.h"
#include "cs_physical_constants.h"
#include "cs_physical_model.h"
#include "cs_rad_transfer.h"
#include "cs_restart_default.h"
#include "cs_thermal_model.h"
#include "cs_time_step.h"
#include "cs_turbomachinery.h"
#include "cs_turbulence_model.h"
#include "cs_stokes_model.h"
#include "cs_syr_coupling.h"
#include "cs_wall_functions.h"
#include "cs_convection_diffusion.h"
#include "cs_parameters_check.h"
Functions | |
void | cs_parameters_error (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *format,...) |
Print general parameters error or warning info. More... | |
void | cs_parameters_error_header (cs_parameter_error_behavior_t err_behavior, const char *section_desc) |
Print header for a given parameters error message type. More... | |
void | cs_parameters_error_footer (cs_parameter_error_behavior_t err_behavior) |
Print footer for a given parameters error message type. More... | |
void | cs_parameters_is_in_range_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int range_l, int range_u) |
Check that a given integer keyword has values in a specified range. More... | |
void | cs_parameters_is_not_in_range_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int range_l, int range_u) |
Check that a given integer keyword has not values in a specified range. More... | |
void | cs_parameters_is_in_list_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int enum_size, const int *enum_values, const char *enum_names[]) |
Check that a given integer keyword has values in a specified list. More... | |
void | cs_parameters_is_not_in_list_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int enum_size, const int *enum_values, const char *enum_names[]) |
Check that a given integer keyword does not have values in a specified list. More... | |
void | cs_parameters_is_equal_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int std_value) |
Check that a given integer keyword is equal to a specified value. More... | |
void | cs_parameters_is_not_equal_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int fbd_value) |
Check that a given integer keyword is not equal to a specified value. More... | |
void | cs_parameters_is_positive_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value) |
Check that a given integer keyword is strictly positive. More... | |
void | cs_parameters_is_greater_int (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, int param_value, int ib_value) |
Check that a given int keyword is greater than a specified value. More... | |
void | cs_parameters_is_in_range_double (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, double range_l, double range_u) |
Check that a given double keyword has values in a specified range. More... | |
void | cs_parameters_is_in_list_double (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, int enum_size, const double *enum_values, const char *enum_names[]) |
Check that a given double keyword has values in a specified list. More... | |
void | cs_parameters_is_equal_double (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, double std_value) |
Check that a given double keyword is equal to a specified value. More... | |
void | cs_parameters_is_greater_double (cs_parameter_error_behavior_t err_behavior, const char *section_desc, const char *param_name, double param_value, double ib_value) |
Check that a given double keyword is greater than a specified value. More... | |
void | cs_parameters_error_barrier (void) |
Abort if the the parameter errors count is nonzero. More... | |
void | cs_parameters_check (void) |
Check computation parameters after user modification. More... | |
Parameters and options management check.
void cs_parameters_check | ( | void | ) |
Check computation parameters after user modification.
void cs_parameters_error | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | format, | ||
... | |||
) |
Print general parameters error or warning info.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | format | format string, as printf() and family. |
[in] | ... | variable arguments based on format string. |
void cs_parameters_error_barrier | ( | void | ) |
Abort if the the parameter errors count is nonzero.
void cs_parameters_error_footer | ( | cs_parameter_error_behavior_t | err_behavior | ) |
Print footer for a given parameters error message type.
[in] | err_behavior | warn or abort ? |
void cs_parameters_error_header | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc | ||
) |
Print header for a given parameters error message type.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
void cs_parameters_is_equal_double | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
double | param_value, | ||
double | std_value | ||
) |
Check that a given double keyword is equal to a specified value.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | std_value | compulsory or recommended parameter's value |
void cs_parameters_is_equal_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value, | ||
int | std_value | ||
) |
Check that a given integer keyword is equal to a specified value.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | std_value | compulsory or recommended parameter's value |
void cs_parameters_is_greater_double | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
double | param_value, | ||
double | ib_value | ||
) |
Check that a given double keyword is greater than a specified value.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | ib_value | inferior bound value |
void cs_parameters_is_greater_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value, | ||
int | ib_value | ||
) |
Check that a given int keyword is greater than a specified value.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | ib_value | inferior bound value |
void cs_parameters_is_in_list_double | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
double | param_value, | ||
int | enum_size, | ||
const double * | enum_values, | ||
const char * | enum_names[] | ||
) |
Check that a given double keyword has values in a specified list.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | enum_size | size of possible enumeration |
[in] | enum_values | list of enumerated values |
[in] | enum_names | optional list of value names, or NULL |
void cs_parameters_is_in_list_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value, | ||
int | enum_size, | ||
const int * | enum_values, | ||
const char * | enum_names[] | ||
) |
Check that a given integer keyword has values in a specified list.
Check that a given integer keyword has values in a specified range.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | enum_size | size of possible enumeration |
[in] | enum_values | optional list of enumerated values, or NULL (in which case {0, ... enum_sizes-1} assumed |
[in] | enum_names | optional list of value names, or NULL |
void cs_parameters_is_in_range_double | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
double | param_value, | ||
double | range_l, | ||
double | range_u | ||
) |
Check that a given double keyword has values in a specified range.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | range_l | range lower bound (included) |
[in] | range_u | range upper bound (included) |
void cs_parameters_is_in_range_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value, | ||
int | range_l, | ||
int | range_u | ||
) |
Check that a given integer keyword has values in a specified range.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | range_l | range lower bound (included) |
[in] | range_u | range upper bound (excluded) |
void cs_parameters_is_not_equal_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value, | ||
int | fbd_value | ||
) |
Check that a given integer keyword is not equal to a specified value.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | fbd_value | forbidden value |
void cs_parameters_is_not_in_list_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value, | ||
int | enum_size, | ||
const int * | enum_values, | ||
const char * | enum_names[] | ||
) |
Check that a given integer keyword does not have values in a specified list.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | enum_size | size of possible enumeration |
[in] | enum_values | optional list of enumerated values, or NULL (in which case {0, ... enum_sizes-1} assumed |
[in] | enum_names | optional list of value names, or NULL |
void cs_parameters_is_not_in_range_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value, | ||
int | range_l, | ||
int | range_u | ||
) |
Check that a given integer keyword has not values in a specified range.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |
[in] | range_l | range lower bound (included) |
[in] | range_u | range upper bound (excluded) |
void cs_parameters_is_positive_int | ( | cs_parameter_error_behavior_t | err_behavior, |
const char * | section_desc, | ||
const char * | param_name, | ||
int | param_value | ||
) |
Check that a given integer keyword is strictly positive.
[in] | err_behavior | warn or abort ? |
[in] | section_desc | optional description of code section containing this parameter, or NULL |
[in] | param_name | name of parameter whose value we are checking |
[in] | param_value | parameter's current_value |