![]() |
programmer's documentation
|
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <math.h>
#include <bft_mem.h>
#include <bft_printf.h>
#include "cs_reco.h"
#include "cs_property.h"
Macros | |
#define | CS_PROPERTY_DBG 1 |
Enumerations | |
enum | ptykey_t { PTYKEY_POST_FREQ, PTYKEY_ERROR } |
Functions | |
static const char * | _print_ptykey (ptykey_t key) |
Print the name of the corresponding property key. More... | |
static ptykey_t | _get_ptykey (const char *keyname) |
Get the corresponding enum from the name of a property key. If not found, return a key error. More... | |
cs_property_t * | cs_property_create (const char *name, const char *key_type, const cs_cdo_quantities_t *cdoq, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step) |
Create and initialize a new property structure. More... | |
cs_property_t * | cs_property_free (cs_property_t *pty) |
Free a cs_property_t structure. More... | |
bool | cs_property_check_name (const cs_property_t *pty, const char *ref_name) |
Check if the given property has the name ref_name. More... | |
bool | cs_property_is_uniform (const cs_property_t *pty) |
returns true if the property is uniform, otherwise false More... | |
const char * | cs_property_get_name (const cs_property_t *pty) |
Retrieve the name of a property. More... | |
void | cs_property_summary (const cs_property_t *pty) |
Print a summary of a cs_property_t structure. More... | |
void | cs_property_set_value (cs_property_t *pty, const double val[]) |
Set the value of a property attached to a cs_property_t structure. More... | |
void | cs_property_def_by_value (cs_property_t *pty, const char *val) |
Define the value of a cs_property_t structure. More... | |
void | cs_property_def_by_analytic (cs_property_t *pty, cs_analytic_func_t *func) |
Define a cs_property_t structure thanks to an analytic function. More... | |
void | cs_property_def_by_law (cs_property_t *pty, cs_onevar_law_func_t *func) |
Define a cs_property_t structure thanks to a law function. More... | |
void | cs_property_set_array (cs_property_t *pty, cs_flag_t array_flag, const cs_real_t *array) |
Set "array" members of a cs_property_t structure. More... | |
void | cs_property_set_struct (cs_property_t *pty, const void *structure) |
Set "array" members of a cs_property_t structure. More... | |
void | cs_property_set_option (cs_property_t *pty, const char *keyname, const char *keyval) |
Set optional parameters related to a cs_property_t structure. More... | |
void | cs_property_get_cell_tensor (cs_lnum_t c_id, const cs_property_t *pty, bool do_inversion, cs_real_3_t *tensor) |
Compute the value of the tensor attached a property at the cell center. More... | |
cs_real_t | cs_property_get_cell_value (cs_lnum_t c_id, const cs_property_t *pty) |
Compute the value of a property at the cell center. More... | |
Variables | |
static const char | _err_empty_pty [] |
static const cs_flag_t | cs_var_support_pc |
static const cs_flag_t | cs_var_support_pv |
#define CS_PROPERTY_DBG 1 |
enum ptykey_t |
|
static |
Get the corresponding enum from the name of a property key. If not found, return a key error.
[in] | keyname | name of the key |
|
static |
Print the name of the corresponding property key.
[in] | key | name of the key |
bool cs_property_check_name | ( | const cs_property_t * | pty, |
const char * | ref_name | ||
) |
Check if the given property has the name ref_name.
[in] | pty | pointer to a cs_property_t structure to test |
[in] | ref_name | name of the property to find |
cs_property_t* cs_property_create | ( | const char * | name, |
const char * | key_type, | ||
const cs_cdo_quantities_t * | cdoq, | ||
const cs_cdo_connect_t * | connect, | ||
const cs_time_step_t * | time_step | ||
) |
Create and initialize a new property structure.
[in] | name | name of the property |
[in] | key_type | keyname of the type of property |
[in] | cdoq | pointer to a cs_cdo_quantities_t struct. |
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | time_step | pointer to a cs_time_step_t struct. |
void cs_property_def_by_analytic | ( | cs_property_t * | pty, |
cs_analytic_func_t * | func | ||
) |
Define a cs_property_t structure thanks to an analytic function.
[in,out] | pty | pointer to a cs_property_t structure |
[in] | func | pointer to a function |
void cs_property_def_by_law | ( | cs_property_t * | pty, |
cs_onevar_law_func_t * | func | ||
) |
Define a cs_property_t structure thanks to a law function.
[in,out] | pty | pointer to a cs_property_t structure |
[in] | func | pointer to a function |
void cs_property_def_by_value | ( | cs_property_t * | pty, |
const char * | val | ||
) |
Define the value of a cs_property_t structure.
[in,out] | pty | pointer to a cs_property_t structure |
[in] | keyval | accessor to the value to set |
cs_property_t* cs_property_free | ( | cs_property_t * | pty | ) |
Free a cs_property_t structure.
[in,out] | pty | pointer to a cs_property_t structure to free |
void cs_property_get_cell_tensor | ( | cs_lnum_t | c_id, |
const cs_property_t * | pty, | ||
bool | do_inversion, | ||
cs_real_3_t * | tensor | ||
) |
Compute the value of the tensor attached a property at the cell center.
[in] | c_id | id of the current cell |
[in] | pty | pointer to a cs_property_t structure |
[in] | do_inversion | true or false |
[in,out] | tensor | 3x3 matrix |
Compute the value of a property at the cell center.
[in] | c_id | id of the current cell |
[in] | pty | pointer to a cs_property_t structure |
const char* cs_property_get_name | ( | const cs_property_t * | pty | ) |
Retrieve the name of a property.
[in] | pty | pointer to a property |
bool cs_property_is_uniform | ( | const cs_property_t * | pty | ) |
returns true if the property is uniform, otherwise false
[in] | pty | pointer to a property to test |
Set "array" members of a cs_property_t structure.
Set members of a cs_property_t structure.
[in,out] | pty | pointer to a cs_property_t structure |
[in] | array_flag | information on the support of the array |
[in] | array | pointer to an array of values |
void cs_property_set_option | ( | cs_property_t * | pty, |
const char * | keyname, | ||
const char * | keyval | ||
) |
Set optional parameters related to a cs_property_t structure.
[in,out] | pty | pointer to a cs_property_t structure |
[in] | keyname | name of key related to the member of pty to set |
[in] | keyval | accessor to the value to set |
void cs_property_set_struct | ( | cs_property_t * | pty, |
const void * | structure | ||
) |
Set "array" members of a cs_property_t structure.
[in,out] | pty | pointer to a cs_property_t structure |
[in] | structure | structure to associate to this property |
void cs_property_set_value | ( | cs_property_t * | pty, |
const double | val[] | ||
) |
Set the value of a property attached to a cs_property_t structure.
[in,out] | pty | pointer to a cs_property_t structure |
[in] | val | pointer to an array of double |
void cs_property_summary | ( | const cs_property_t * | pty | ) |
Print a summary of a cs_property_t structure.
[in] | pty | pointer to a cs_property_t structure to summarize |
|
static |
|
static |
|
static |