![]() |
programmer's documentation
|
#include "cs_cdo_bc.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
#include "cs_cdo_time.h"
#include "cs_equation_param.h"
#include "cs_matrix.h"
#include "cs_time_step.h"
#include "cs_timer.h"
#include "cs_source_term.h"
Go to the source code of this file.
Data Structures | |
struct | cs_equation_builder_t |
Functions | |
static cs_flag_t | cs_equation_get_cell_mesh_flag (cs_flag_t cell_flag, const cs_equation_builder_t *eqb) |
Retrieve the flag to give for building a cs_cell_mesh_t structure. More... | |
void | cs_equation_allocate_common_structures (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, cs_flag_t scheme_flag) |
Allocate a pointer to a buffer of size at least the 2*n_cells for managing temporary usage of memory when dealing with equations Call specific structure allocation related to a numerical scheme according the scheme flag The size of the temporary buffer can be bigger according to the numerical settings Set also shared pointers from the main domain members. More... | |
void | cs_equation_free_common_structures (cs_flag_t scheme_flag) |
Allocate a pointer to a buffer of size at least the 2*n_cells for managing temporary usage of memory when dealing with equations Call specific structure allocation related to a numerical scheme according the scheme flag The size of the temporary buffer can be bigger according to the numerical settings. More... | |
cs_equation_builder_t * | cs_equation_init_builder (const cs_equation_param_t *eqp, const cs_mesh_t *mesh) |
Allocate a new structure to handle the building of algebraic system related to an cs_equation_t structure. More... | |
void | cs_equation_free_builder (cs_equation_builder_t **p_builder) |
Free a cs_equation_builder_t structure. More... | |
void | cs_equation_write_monitoring (const char *eqname, const cs_equation_builder_t *eqb) |
Print a message in the performance output file related to the monitoring of equation. More... | |
void | cs_equation_init_properties (const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, double *tpty_val, double *rpty_vals, cs_cell_builder_t *cb) |
Initialize all properties for an algebraic system. More... | |
void | cs_equation_set_diffusion_property (const cs_equation_param_t *eqp, cs_lnum_t c_id, cs_flag_t c_flag, cs_cell_builder_t *cb) |
Set the diffusion property inside a cell and its related quantities. More... | |
void | cs_equation_set_diffusion_property_cw (const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_flag_t c_flag, cs_cell_builder_t *cb) |
Set the diffusion property inside a cell and its related quantities. Cellwise version using a cs_cell_mesh_t structure. More... | |
cs_real_t * | cs_equation_compute_dirichlet_sv (const cs_mesh_t *mesh, const cs_equation_param_t *eqp, const cs_cdo_bc_list_t *dir, cs_cell_builder_t *cb) |
Compute the values of the Dirichlet BCs when DoFs are scalar-valued and attached to vertices. More... | |
cs_real_t * | cs_equation_compute_dirichlet_sf (const cs_mesh_t *mesh, const cs_equation_param_t *eqp, const cs_cdo_bc_list_t *dir, cs_cell_builder_t *cb) |
Compute the values of the Dirichlet BCs when DoFs are scalar-valued and attached to faces. More... | |
short int * | cs_equation_tag_neumann_face (const cs_equation_param_t *eqp) |
Tag each face related to a Neumann BC with its definition id. Default tag is -1 (not a Neumann face) More... | |
void | cs_equation_compute_neumann_sv (short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_bc_t *cbc) |
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to vertices. Values in the cbc parameters are updated. More... | |
void | cs_equation_compute_neumann_sf (short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_bc_t *cbc) |
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to faces. Values in the cbc parameters are set. More... | |
void | cs_equation_assemble_v (const cs_cell_sys_t *csys, const cs_range_set_t *rset, const cs_equation_param_t *eqp, cs_real_t *rhs, cs_real_t *sources, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise system related to cell vertices into the global algebraic system. More... | |
void | cs_equation_assemble_f (const cs_cell_sys_t *csys, const cs_range_set_t *rset, const cs_equation_param_t *eqp, cs_real_t *rhs, cs_matrix_assembler_values_t *mav) |
Assemble a cellwise system related to cell faces into the global algebraic system. More... | |
const cs_matrix_structure_t * | cs_equation_get_matrix_structure (cs_space_scheme_t scheme) |
Retrieve a pointer to the associated cs_matrix_structure_t according to the space scheme. More... | |
const cs_matrix_assembler_t * | cs_equation_get_matrix_assembler (cs_space_scheme_t scheme) |
Retrieve a pointer to the associated cs_matrix_assembler_t according to the space scheme. More... | |
const cs_adjacency_t * | cs_equation_get_v2v_index (void) |
Get the connectivity vertex->vertices for the local rank. More... | |
const cs_adjacency_t * | cs_equation_get_f2f_index (void) |
Get the connectivity face->faces for the local rank. More... | |
cs_real_t * | cs_equation_get_tmpbuf (void) |
Retrieve a pointer to a buffer of size at least the 2*n_cells The size of the temporary buffer can be bigger according to the numerical settings. More... | |
size_t | cs_equation_get_tmpbuf_size (void) |
Get the allocation size of the temporary buffer. More... | |
void cs_equation_allocate_common_structures | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
const cs_time_step_t * | time_step, | ||
cs_flag_t | scheme_flag | ||
) |
Allocate a pointer to a buffer of size at least the 2*n_cells for managing temporary usage of memory when dealing with equations Call specific structure allocation related to a numerical scheme according the scheme flag The size of the temporary buffer can be bigger according to the numerical settings Set also shared pointers from the main domain members.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to additional mesh quantities struct. |
[in] | time_step | pointer to a time step structure |
[in] | scheme_flag | flag to identify which kind of numerical scheme is requested to solve the computational domain |
void cs_equation_assemble_f | ( | const cs_cell_sys_t * | csys, |
const cs_range_set_t * | rset, | ||
const cs_equation_param_t * | eqp, | ||
cs_real_t * | rhs, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise system related to cell faces into the global algebraic system.
[in] | csys | cellwise view of the algebraic system |
[in] | rset | pointer to a cs_range_set_t structure on vertices |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | rhs | array storing the right-hand side |
[in,out] | mav | pointer to a matrix assembler structure |
void cs_equation_assemble_v | ( | const cs_cell_sys_t * | csys, |
const cs_range_set_t * | rset, | ||
const cs_equation_param_t * | eqp, | ||
cs_real_t * | rhs, | ||
cs_real_t * | sources, | ||
cs_matrix_assembler_values_t * | mav | ||
) |
Assemble a cellwise system related to cell vertices into the global algebraic system.
[in] | csys | cellwise view of the algebraic system |
[in] | rset | pointer to a cs_range_set_t structure on vertices |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | rhs | array storing the right-hand side |
[in,out] | sources | array storing the contribution of source terms |
[in,out] | mav | pointer to a matrix assembler structure |
cs_real_t* cs_equation_compute_dirichlet_sf | ( | const cs_mesh_t * | mesh, |
const cs_equation_param_t * | eqp, | ||
const cs_cdo_bc_list_t * | dir, | ||
cs_cell_builder_t * | cb | ||
) |
Compute the values of the Dirichlet BCs when DoFs are scalar-valued and attached to faces.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | eqp | pointer to a cs_equation_param_t |
[in] | dir | pointer to a cs_cdo_bc_list_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
cs_real_t* cs_equation_compute_dirichlet_sv | ( | const cs_mesh_t * | mesh, |
const cs_equation_param_t * | eqp, | ||
const cs_cdo_bc_list_t * | dir, | ||
cs_cell_builder_t * | cb | ||
) |
Compute the values of the Dirichlet BCs when DoFs are scalar-valued and attached to vertices.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | eqp | pointer to a cs_equation_param_t |
[in] | dir | pointer to a cs_cdo_bc_list_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_equation_compute_neumann_sf | ( | short int | def_id, |
short int | f, | ||
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_bc_t * | cbc | ||
) |
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to faces. Values in the cbc parameters are set.
[in] | def_id | id of the definition for setting the Neumann BC |
[in] | f | local face number in the cs_cell_mesh_t |
[in] | eqp | pointer to a cs_equation_param_t |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cbc | pointer to a cs_cell_bc_t structure |
void cs_equation_compute_neumann_sv | ( | short int | def_id, |
short int | f, | ||
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_bc_t * | cbc | ||
) |
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to vertices. Values in the cbc parameters are updated.
[in] | def_id | id of the definition for setting the Neumann BC |
[in] | f | local face number in the cs_cell_mesh_t |
[in] | eqp | pointer to a cs_equation_param_t |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cbc | pointer to a cs_cell_bc_t structure |
void cs_equation_free_builder | ( | cs_equation_builder_t ** | p_builder | ) |
Free a cs_equation_builder_t structure.
[in,out] | p_builder | pointer of pointer to the cs_equation_builder_t structure to free |
void cs_equation_free_common_structures | ( | cs_flag_t | scheme_flag | ) |
Allocate a pointer to a buffer of size at least the 2*n_cells for managing temporary usage of memory when dealing with equations Call specific structure allocation related to a numerical scheme according the scheme flag The size of the temporary buffer can be bigger according to the numerical settings.
[in] | scheme_flag | flag to identify which kind of numerical scheme is requested to solve the computational domain |
|
inlinestatic |
Retrieve the flag to give for building a cs_cell_mesh_t structure.
[in] | cell_flag | flag related to the current cell |
[in] | eqb | pointer to a cs_equation_builder_t structure |
const cs_adjacency_t* cs_equation_get_f2f_index | ( | void | ) |
Get the connectivity face->faces for the local rank.
const cs_matrix_assembler_t* cs_equation_get_matrix_assembler | ( | cs_space_scheme_t | scheme | ) |
Retrieve a pointer to the associated cs_matrix_assembler_t according to the space scheme.
[in] | scheme | enum on the discretization scheme used |
const cs_matrix_structure_t* cs_equation_get_matrix_structure | ( | cs_space_scheme_t | scheme | ) |
Retrieve a pointer to the associated cs_matrix_structure_t according to the space scheme.
[in] | scheme | enum on the discretization scheme used |
cs_real_t* cs_equation_get_tmpbuf | ( | void | ) |
Retrieve a pointer to a buffer of size at least the 2*n_cells The size of the temporary buffer can be bigger according to the numerical settings.
size_t cs_equation_get_tmpbuf_size | ( | void | ) |
Get the allocation size of the temporary buffer.
const cs_adjacency_t* cs_equation_get_v2v_index | ( | void | ) |
Get the connectivity vertex->vertices for the local rank.
cs_equation_builder_t* cs_equation_init_builder | ( | const cs_equation_param_t * | eqp, |
const cs_mesh_t * | mesh | ||
) |
Allocate a new structure to handle the building of algebraic system related to an cs_equation_t structure.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | mesh | pointer to a cs_mesh_t structure |
void cs_equation_init_properties | ( | const cs_equation_param_t * | eqp, |
const cs_equation_builder_t * | eqb, | ||
double * | tpty_val, | ||
double * | rpty_vals, | ||
cs_cell_builder_t * | cb | ||
) |
Initialize all properties for an algebraic system.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | tpty_val | pointer to the value for the time property |
[in,out] | rpty_vals | pointer to the values for reaction properties |
[in,out] | cb | pointer to a cs_cell_builder_t structure (diffusion property is stored inside) |
void cs_equation_set_diffusion_property | ( | const cs_equation_param_t * | eqp, |
cs_lnum_t | c_id, | ||
cs_flag_t | c_flag, | ||
cs_cell_builder_t * | cb | ||
) |
Set the diffusion property inside a cell and its related quantities.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | c_id | id of the cell to deal with |
[in] | c_flag | flag related to this cell |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_equation_set_diffusion_property_cw | ( | const cs_equation_param_t * | eqp, |
const cs_cell_mesh_t * | cm, | ||
cs_flag_t | c_flag, | ||
cs_cell_builder_t * | cb | ||
) |
Set the diffusion property inside a cell and its related quantities. Cellwise version using a cs_cell_mesh_t structure.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | c_flag | flag related to this cell |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
short int* cs_equation_tag_neumann_face | ( | const cs_equation_param_t * | eqp | ) |
Tag each face related to a Neumann BC with its definition id. Default tag is -1 (not a Neumann face)
[in] | eqp | pointer to a cs_equation_param_t |
void cs_equation_write_monitoring | ( | const char * | eqname, |
const cs_equation_builder_t * | eqb | ||
) |
Print a message in the performance output file related to the monitoring of equation.
[in] | eqname | pointer to the name of the current equation |
[in] | eqb | pointer to a cs_equation_builder_t structure |