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

Go to the source code of this file.

Data Structures

struct  cs_property_t
 

Macros

#define CS_PROPERTY_POST_FOURIER   (1 << 1)
 

Enumerations

enum  cs_property_type_t { CS_PROPERTY_ISO, CS_PROPERTY_ORTHO, CS_PROPERTY_ANISO, CS_PROPERTY_N_TYPES }
 
enum  cs_property_key_t { CS_PTYKEY_POST, CS_PTYKEY_N_KEYS }
 

Functions

void cs_property_set_shared_pointers (const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step)
 Set shared pointers to main domain members. More...
 
cs_property_tcs_property_create (const char *name, const char *key_type, int n_subdomains)
 Create and initialize a new property structure. More...
 
void cs_property_last_definition_stage (cs_property_t *pty)
 Last stage of the definition of a property based on several subdomains. More...
 
cs_property_tcs_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...
 
cs_property_type_t cs_property_get_type (const cs_property_t *pty)
 Retrieve the type 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_option (cs_property_t *pty, cs_property_key_t key, const char *keyval)
 Set optional parameters related to a cs_property_t structure. More...
 
void cs_property_def_by_value (cs_property_t *pty, const char *ml_name, const char *key_val)
 Define a cs_property_t structure by value for entities attached to the mesh location named ml_name. More...
 
void cs_property_iso_def_by_value (cs_property_t *pty, const char *ml_name, double val)
 Define an isotropic cs_property_t structure by value for entities attached to the mesh location named ml_name. More...
 
void cs_property_ortho_def_by_value (cs_property_t *pty, const char *ml_name, const double val[])
 Define orthotropic cs_property_t structure by value for entities attached to the mesh location named ml_name. More...
 
void cs_property_aniso_def_by_value (cs_property_t *pty, const char *ml_name, const double tens[3][3])
 Define an anisotropic cs_property_t structure by value for entities attached to the mesh location named ml_name. More...
 
void cs_property_def_by_analytic (cs_property_t *pty, const char *ml_name, cs_analytic_func_t *func)
 Define a cs_property_t structure thanks to an analytic function in a subdomain attached to the mesh location named ml_name. More...
 
void cs_property_def_by_onevar_law (cs_property_t *pty, const char *ml_name, const void *context, cs_onevar_law_func_t *func)
 Define a cs_property_t structure thanks to law depending on one scalar variable in a subdomain attached to the mesh location named ml_name. More...
 
void cs_property_def_by_twovar_law (cs_property_t *pty, const char *ml_name, const void *context, cs_twovar_law_func_t *func)
 Define a cs_property_t structure thanks to a law depending on two scalars variables in a subdomain attached to the mesh location named ml_name. More...
 
void cs_property_def_by_array (cs_property_t *pty, cs_desc_t desc, cs_real_t *array)
 Define a cs_property_t structure thanks to an array of values. More...
 
void cs_property_set_array (cs_property_t *pty, cs_desc_t desc, cs_real_t *array)
 Set the "array" member of a cs_property_t structure. More...
 
void cs_property_set_second_array (cs_property_t *pty, cs_desc_t desc, cs_real_t *array)
 Set the second "array" member of 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...
 
void cs_property_tensor_in_cell (const cs_cell_mesh_t *cm, 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 Version using a cs_cell_mesh_t structure. More...
 
cs_real_t cs_property_value_in_cell (const cs_cell_mesh_t *cm, const cs_property_t *pty)
 Compute the value of a property at the cell center Version using a cs_cell_mesh_t structure. More...
 
void cs_property_get_fourier (const cs_property_t *pty, double dt, cs_real_t fourier[])
 Compute the Fourier number in each cell. More...
 

Macro Definition Documentation

◆ CS_PROPERTY_POST_FOURIER

#define CS_PROPERTY_POST_FOURIER   (1 << 1)

Enumeration Type Documentation

◆ cs_property_key_t

Enumerator
CS_PTYKEY_POST 
CS_PTYKEY_N_KEYS 

◆ cs_property_type_t

Enumerator
CS_PROPERTY_ISO 
CS_PROPERTY_ORTHO 
CS_PROPERTY_ANISO 
CS_PROPERTY_N_TYPES 

Function Documentation

◆ cs_property_aniso_def_by_value()

void cs_property_aniso_def_by_value ( cs_property_t pty,
const char *  ml_name,
const double  tens[3][3] 
)

Define an anisotropic cs_property_t structure by value for entities attached to the mesh location named ml_name.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]ml_namename of the related mesh location
[in]tensvalues to set (3x3 tensor)

◆ cs_property_check_name()

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_create()

cs_property_t* cs_property_create ( const char *  name,
const char *  key_type,
int  n_subdomains 
)

Create and initialize a new property structure.

Parameters
[in]namename of the property
[in]key_typekeyname of the type of property
[in]n_subdomainspiecewise definition on n_subdomains
Returns
a pointer to a new allocated cs_property_t structure

◆ cs_property_def_by_analytic()

void cs_property_def_by_analytic ( cs_property_t pty,
const char *  ml_name,
cs_analytic_func_t func 
)

Define a cs_property_t structure thanks to an analytic function in a subdomain attached to the mesh location named ml_name.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]ml_namename of the related mesh location
[in]funcpointer to a cs_analytic_func_t function

◆ cs_property_def_by_array()

void cs_property_def_by_array ( cs_property_t pty,
cs_desc_t  desc,
cs_real_t array 
)

Define a cs_property_t structure thanks to an array of values.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]descinformation about this array
[in]arraypointer to an array

◆ cs_property_def_by_onevar_law()

void cs_property_def_by_onevar_law ( cs_property_t pty,
const char *  ml_name,
const void *  context,
cs_onevar_law_func_t func 
)

Define a cs_property_t structure thanks to law depending on one scalar variable in a subdomain attached to the mesh location named ml_name.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]ml_namename of the related mesh location
[in]contextpointer to a structure (may be NULL)
[in]funcpointer to a law function defined by subdomain

◆ cs_property_def_by_twovar_law()

void cs_property_def_by_twovar_law ( cs_property_t pty,
const char *  ml_name,
const void *  context,
cs_twovar_law_func_t func 
)

Define a cs_property_t structure thanks to a law depending on two scalars variables in a subdomain attached to the mesh location named ml_name.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]ml_namename of the related mesh location
[in]contextpointer to a structure (may be NULL)
[in]funcpointer to a function

◆ cs_property_def_by_value()

void cs_property_def_by_value ( cs_property_t pty,
const char *  ml_name,
const char *  key_val 
)

Define a cs_property_t structure by value for entities attached to the mesh location named ml_name.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]ml_namename of the related mesh location
[in]keyvalaccessor to the value to set

◆ cs_property_free()

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

◆ cs_property_get_cell_tensor()

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_property_get_cell_value()

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

◆ cs_property_get_fourier()

void cs_property_get_fourier ( const cs_property_t pty,
double  dt,
cs_real_t  fourier[] 
)

Compute the Fourier number in each cell.

Parameters
[in]ptypointer to the diffusive property struct.
[in]dtvalue of the current time step
[in,out]fourierpointer to an array storing Fourier numbers

◆ cs_property_get_name()

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

◆ cs_property_get_type()

cs_property_type_t cs_property_get_type ( const cs_property_t pty)

Retrieve the type of a property.

Parameters
[in]ptypointer to a property
Returns
the type of the related property

◆ cs_property_is_uniform()

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

◆ cs_property_iso_def_by_value()

void cs_property_iso_def_by_value ( cs_property_t pty,
const char *  ml_name,
double  val 
)

Define an isotropic cs_property_t structure by value for entities attached to the mesh location named ml_name.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]ml_namename of the related mesh location
[in]valvalue to set

◆ cs_property_last_definition_stage()

void cs_property_last_definition_stage ( cs_property_t pty)

Last stage of the definition of a property based on several subdomains.

Parameters
[in,out]ptypointer to cs_property_t structure

◆ cs_property_ortho_def_by_value()

void cs_property_ortho_def_by_value ( cs_property_t pty,
const char *  ml_name,
const double  val[] 
)

Define orthotropic cs_property_t structure by value for entities attached to the mesh location named ml_name.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]ml_namename of the related mesh location
[in]valvalues to set (vector of size 3)

◆ cs_property_set_array()

void cs_property_set_array ( cs_property_t pty,
cs_desc_t  desc,
cs_real_t array 
)

Set the "array" member of a cs_property_t structure.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]descinformation about this array
[in]arraypointer to an array of values

◆ cs_property_set_option()

void cs_property_set_option ( cs_property_t pty,
cs_property_key_t  key,
const char *  keyval 
)

Set optional parameters related to a cs_property_t structure.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]keykey related to the member of pty to set
[in]keyvalaccessor to the value to set

◆ cs_property_set_second_array()

void cs_property_set_second_array ( cs_property_t pty,
cs_desc_t  desc,
cs_real_t array 
)

Set the second "array" member of a cs_property_t structure.

Parameters
[in,out]ptypointer to a cs_property_t structure
[in]descinformation about this array
[in]arraypointer to an array of values

◆ cs_property_set_shared_pointers()

void cs_property_set_shared_pointers ( const cs_cdo_quantities_t quant,
const cs_cdo_connect_t connect,
const cs_time_step_t time_step 
)

Set shared pointers to main domain members.

Parameters
[in]quantadditional mesh quantities struct.
[in]connectpointer to a cs_cdo_connect_t struct.
[in]time_steppointer to a time step structure

◆ cs_property_summary()

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

◆ cs_property_tensor_in_cell()

void cs_property_tensor_in_cell ( const cs_cell_mesh_t cm,
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 Version using a cs_cell_mesh_t structure.

Parameters
[in]cmpointer to a cs_cell_mesh_t structure
[in]ptypointer to a cs_property_t structure
[in]do_inversiontrue or false
[in,out]tensor3x3 matrix

◆ cs_property_value_in_cell()

cs_real_t cs_property_value_in_cell ( const cs_cell_mesh_t cm,
const cs_property_t pty 
)

Compute the value of a property at the cell center Version using a cs_cell_mesh_t structure.

Parameters
[in]cmpointer to a cs_cell_mesh_t structure
[in]ptypointer to a cs_property_t structure
Returns
the value of the property for the given cell