programmer's documentation
Enumerations | Functions
cs_property.h File Reference
#include "cs_cdo.h"
#include "cs_param.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
#include "cs_time_step.h"
Include dependency graph for cs_property.h:

Go to the source code of this file.

Enumerations

enum  cs_property_type_t { CS_PROPERTY_ISO, CS_PROPERTY_ORTHO, CS_PROPERTY_ANISO, CS_PROPERTY_N_TYPES }
 

Functions

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 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...
 

Enumeration Type Documentation

Enumerator
CS_PROPERTY_ISO 
CS_PROPERTY_ORTHO 
CS_PROPERTY_ANISO 
CS_PROPERTY_N_TYPES 

Function Documentation

bool cs_property_check_name ( const cs_property_t *  pty,
const char *  ref_name 
)

Check if the given property has the name ref_name.

Parameters
[in]ptypointer to a cs_property_t structure to test
[in]ref_namename of the property to find
Returns
true if the name of the property is ref_name otherwise false
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.

Parameters
[in]namename of the property
[in]key_typekeyname of the type of property
[in]cdoqpointer to a cs_cdo_quantities_t struct.
[in]connectpointer to a cs_cdo_connect_t struct.
[in]time_steppointer to a cs_time_step_t struct.
Returns
a pointer to a new allocated cs_property_t structure
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.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]funcpointer 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.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]funcpointer 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.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]keyvalaccessor to the value to set
cs_property_t* cs_property_free ( cs_property_t *  pty)

Free a cs_property_t structure.

Parameters
[in,out]ptypointer to a cs_property_t structure to free
Returns
a NULL pointer
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.

Parameters
[in]c_idid of the current cell
[in]ptypointer to a cs_property_t structure
[in]do_inversiontrue or false
[in,out]tensor3x3 matrix
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.

Parameters
[in]c_idid of the current cell
[in]ptypointer to a cs_property_t structure
Returns
the value of the property for the given cell
const char* cs_property_get_name ( const cs_property_t *  pty)

Retrieve the name of a property.

Parameters
[in]ptypointer to a property
Returns
the name of the related property
bool cs_property_is_uniform ( const cs_property_t *  pty)

returns true if the property is uniform, otherwise false

Parameters
[in]ptypointer to a property to test
Returns
true or false
void cs_property_set_array ( cs_property_t *  pty,
cs_flag_t  array_flag,
const cs_real_t array 
)

Set members of a cs_property_t structure.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]array_flaginformation on the support of the array
[in]arraypointer to an array of values

Set members of a cs_property_t structure.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]array_flaginformation on the support of the array
[in]arraypointer 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.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]keynamename of key related to the member of pty to set
[in]keyvalaccessor 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.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]structurestructure 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.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]valpointer to an array of double
void cs_property_summary ( const cs_property_t *  pty)

Print a summary of a cs_property_t structure.

Parameters
[in]ptypointer to a cs_property_t structure to summarize