#include "cs_cdo_bc.h"#include "cs_cdo_connect.h"#include "cs_cdo_local.h"#include "cs_cdo_quantities.h"#include "cs_cdo_system.h"#include "cs_enforcement.h"#include "cs_equation_param.h"#include "cs_flag.h"#include "cs_matrix.h"#include "cs_source_term.h" Include dependency graph for cs_equation_builder.h:
 Include dependency graph for cs_equation_builder.h:Go to the source code of this file.
| Data Structures | |
| struct | cs_equation_builder_t | 
| Typedefs | |
| typedef void() | cs_equation_build_hook_t(const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const void *eqc, const cs_cell_mesh_t *cm, void *context, cs_hodge_t *mass_hodge, cs_hodge_t *diff_hodge, cs_cell_sys_t *csys, cs_cell_builder_t *cb) | 
| Generic function prototype for a hook during the cellwise building of the linear system Enable an advanced user to get a fine control of the discretization.  More... | |
| Functions | |
| static cs_eflag_t | cs_equation_builder_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_builder_update_default_flags (cs_eflag_t msh_flag, cs_eflag_t bdy_flag, cs_eflag_t src_flag) | 
| Update the default flags used to know which quantities have to be built by each cs_cell_mesh_t structure before building the linear system.  More... | |
| cs_equation_builder_t * | cs_equation_builder_create (const cs_equation_param_t *eqp, const cs_mesh_t *mesh) | 
| Allocate a new structure to handle the building of algebraic system related to a cs_equation_t structure.  More... | |
| const cs_matrix_t * | cs_equation_builder_get_matrix (const cs_equation_builder_t *builder, int block_id) | 
| Retrieve the range set structure associated to a builder structure for the block defined in block_id in the system helper structure.  More... | |
| const cs_range_set_t * | cs_equation_builder_get_range_set (const cs_equation_builder_t *builder, int block_id) | 
| Retrieve the range set structure associated to a builder structure for the block defined in block_id in the system helper structure.  More... | |
| void | cs_equation_builder_free (cs_equation_builder_t **p_builder) | 
| Free a cs_equation_builder_t structure.  More... | |
| void | cs_equation_builder_reset (cs_equation_builder_t *eqb) | 
| Free some members of a cs_equation_builder_t structure.  More... | |
| void | cs_equation_builder_apply_default_flags (cs_equation_builder_t *eqb) | 
| Update the flags with the default flags. These flags are used to know which quantities have to be built by each cs_cell_mesh_t structure before building the linear system.  More... | |
| void | cs_equation_builder_log_performance (const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb) | 
| Print a message in the performance output file related to the monitoring of equation.  More... | |
| bool | cs_equation_builder_set_reaction_pty_cw (const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) | 
| Initialize all reaction properties. This function is shared across all CDO schemes. The cs_cell_builder_t structure stores the computed property values. If the property is uniform, a first call to the function cs_equation_builder_init_properties has to be done before the loop on cells.  More... | |
| void | cs_equation_builder_init_properties (const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, cs_hodge_t *diff_hodge, cs_cell_builder_t *cb) | 
| Initialize all properties potentially useful to build the algebraic system. This function is shared across all CDO schemes. The cs_cell_builder_t structure stores property values related to the reaction term, unsteady term and grad-div term.  More... | |
| void | cs_equation_builder_enforce_dofs (const cs_equation_builder_t *eqb, cs_cell_builder_t *cb, cs_cell_sys_t *csys) | 
| Take into account the enforcement of internal DoFs. Apply an algebraic manipulation. Update members of the cs_cell_sys_t structure related to the internal enforcement.  More... | |
| void | cs_equation_builder_enforce_block_dofs (const cs_equation_builder_t *eqb, cs_cell_builder_t *cb, cs_cell_sys_t *csys) | 
| Take into account the enforcement of internal DoFs. Case of matrices defined by blocks. Apply an algebraic manipulation. Update members of the cs_cell_sys_t structure related to the internal enforcement.  More... | |
| typedef void() cs_equation_build_hook_t(const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const void *eqc, const cs_cell_mesh_t *cm, void *context, cs_hodge_t *mass_hodge, cs_hodge_t *diff_hodge, cs_cell_sys_t *csys, cs_cell_builder_t *cb) | 
Generic function prototype for a hook during the cellwise building of the linear system Enable an advanced user to get a fine control of the discretization.
| [in] | eqp | pointer to a cs_equation_param_t structure | 
| [in] | eqb | pointer to a cs_equation_builder_t structure | 
| [in] | eqc | context to cast for this discretization | 
| [in] | cm | pointer to a cellwise view of the mesh | 
| [in,out] | context | pointer to a context structure | 
| [in,out] | mass_hodge | pointer to a cs_hodge_t structure (mass matrix) | 
| [in,out] | diff_hodge | pointer to a cs_hodge_t structure (diffusion) | 
| [in,out] | csys | pointer to a cellwise view of the system | 
| [in,out] | cb | pointer to a cellwise builder | 
| void cs_equation_builder_apply_default_flags | ( | cs_equation_builder_t * | eqb | ) | 
Update the flags with the default flags. These flags are used to know which quantities have to be built by each cs_cell_mesh_t structure before building the linear system.
| [in] | eqb | pointer to an equation builer | 
| 
 | 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 | 
| cs_equation_builder_t* cs_equation_builder_create | ( | const cs_equation_param_t * | eqp, | 
| const cs_mesh_t * | mesh | ||
| ) | 
Allocate a new structure to handle the building of algebraic system related to a 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_builder_enforce_block_dofs | ( | const cs_equation_builder_t * | eqb, | 
| cs_cell_builder_t * | cb, | ||
| cs_cell_sys_t * | csys | ||
| ) | 
Take into account the enforcement of internal DoFs. Case of matrices defined by blocks. Apply an algebraic manipulation. Update members of the cs_cell_sys_t structure related to the internal enforcement.
| | | | | | | | | | | Aii | Aie | | Aii | 0 | |bi| |bi -Aid.x_enf| |---------—| --> |---------—| and |–| --> |----------—| | | | | | | | | | | | Aei | Aee | | 0 | Id | |be| | x_enf |
where x_enf is the value of the enforcement for the selected internal DoFs
| [in] | eqb | pointer to a cs_equation_builder_t structure | 
| [in,out] | cb | pointer to a cs_cell_builder_t structure | 
| [in,out] | csys | structure storing the cell-wise system | 
| void cs_equation_builder_enforce_dofs | ( | const cs_equation_builder_t * | eqb, | 
| cs_cell_builder_t * | cb, | ||
| cs_cell_sys_t * | csys | ||
| ) | 
Take into account the enforcement of internal DoFs. Apply an algebraic manipulation. Update members of the cs_cell_sys_t structure related to the internal enforcement.
| | | | | | | | | | | Aii | Aie | | Aii | 0 | |bi| |bi -Aid.x_enf| |---------—| --> |---------—| and |–| --> |----------—| | | | | | | | | | | | Aei | Aee | | 0 | Id | |be| | x_enf |
where x_enf is the value of the enforcement for the selected internal DoFs
| [in] | eqb | pointer to a cs_equation_builder_t structure | 
| [in,out] | cb | pointer to a cs_cell_builder_t structure | 
| [in,out] | csys | structure storing the cell-wise system | 
| void cs_equation_builder_free | ( | 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 | 
| const cs_matrix_t* cs_equation_builder_get_matrix | ( | const cs_equation_builder_t * | builder, | 
| int | block_id | ||
| ) | 
Retrieve the range set structure associated to a builder structure for the block defined in block_id in the system helper structure.
| [in,out] | builder | pointer to a cs_equation_builder_t | 
| [in] | block_id | id of the block to consider | 
| const cs_range_set_t* cs_equation_builder_get_range_set | ( | const cs_equation_builder_t * | builder, | 
| int | block_id | ||
| ) | 
Retrieve the range set structure associated to a builder structure for the block defined in block_id in the system helper structure.
| [in,out] | builder | pointer to a cs_equation_builder_t | 
| [in] | block_id | id of the block to consider | 
| void cs_equation_builder_init_properties | ( | const cs_equation_param_t * | eqp, | 
| const cs_equation_builder_t * | eqb, | ||
| cs_hodge_t * | diff_hodge, | ||
| cs_cell_builder_t * | cb | ||
| ) | 
Initialize all properties potentially useful to build the algebraic system. This function is shared across all CDO schemes. The cs_cell_builder_t structure stores property values related to the reaction term, unsteady term and grad-div term.
| [in] | eqp | pointer to a cs_equation_param_t structure | 
| [in] | eqb | pointer to a cs_equation_builder_t structure | 
| [in,out] | diff_hodge | pointer to the diffusion hodge structure | 
| [in,out] | cb | pointer to a cs_cell_builder_t structure | 
| void cs_equation_builder_log_performance | ( | const cs_equation_param_t * | eqp, | 
| const cs_equation_builder_t * | eqb | ||
| ) | 
Print a message in the performance output file related to the monitoring of equation.
| [in] | eqp | pointer to a set of equation parameters | 
| [in] | eqb | pointer to an equation builder structure | 
| void cs_equation_builder_reset | ( | cs_equation_builder_t * | eqb | ) | 
Free some members of a cs_equation_builder_t structure.
| [in,out] | eqb | pointer to the cs_equation_builder_t structure | 
| bool cs_equation_builder_set_reaction_pty_cw | ( | const cs_equation_param_t * | eqp, | 
| const cs_equation_builder_t * | eqb, | ||
| const cs_cell_mesh_t * | cm, | ||
| cs_cell_builder_t * | cb | ||
| ) | 
Initialize all reaction properties. This function is shared across all CDO schemes. The cs_cell_builder_t structure stores the computed property values. If the property is uniform, a first call to the function cs_equation_builder_init_properties has to be done before the loop on cells.
| [in] | eqp | pointer to a cs_equation_param_t structure | 
| [in] | eqb | pointer to a cs_equation_builder_t structure | 
| [in] | cm | pointer to a cs_cell_mesh_t structure | 
| [in,out] | cb | pointer to a cs_cell_builder_t structure | 
| void cs_equation_builder_update_default_flags | ( | cs_eflag_t | msh_flag, | 
| cs_eflag_t | bdy_flag, | ||
| cs_eflag_t | src_flag | ||
| ) | 
Update the default flags used to know which quantities have to be built by each cs_cell_mesh_t structure before building the linear system.
| [in] | msh_flag | flag for all cells | 
| [in] | bdy_flag | flag for all boundary cells | 
| [in] | src_flag | flag for cells with source terms |