8.0
general documentation
cs_equation_builder.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <bft_mem.h>
#include "cs_log.h"
#include "cs_parall.h"
#include "cs_equation_builder.h"
+ Include dependency graph for cs_equation_builder.c:

Functions

cs_equation_builder_tcs_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_tcs_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_tcs_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_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...
 

Function Documentation

◆ cs_equation_builder_create()

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.

Parameters
[in]eqppointer to a cs_equation_param_t structure
[in]meshpointer to a cs_mesh_t structure
Returns
a pointer to a new allocated cs_equation_builder_t structure

◆ cs_equation_builder_enforce_block_dofs()

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

Parameters
[in]eqbpointer to a cs_equation_builder_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure storing the cell-wise system

◆ cs_equation_builder_enforce_dofs()

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

Parameters
[in]eqbpointer to a cs_equation_builder_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure storing the cell-wise system

◆ cs_equation_builder_free()

void cs_equation_builder_free ( cs_equation_builder_t **  p_builder)

Free a cs_equation_builder_t structure.

Parameters
[in,out]p_builderpointer of pointer to the cs_equation_builder_t structure to free

◆ cs_equation_builder_get_matrix()

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.

Parameters
[in,out]builderpointer to a cs_equation_builder_t
[in]block_idid of the block to consider
Returns
a pointer to a cs_matrix_t structure

◆ cs_equation_builder_get_range_set()

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.

Parameters
[in,out]builderpointer to a cs_equation_builder_t
[in]block_idid of the block to consider
Returns
a pointer to a cs_range_set structure

◆ cs_equation_builder_init_properties()

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.

Parameters
[in]eqppointer to a cs_equation_param_t structure
[in]eqbpointer to a cs_equation_builder_t structure
[in,out]diff_hodgepointer to the diffusion hodge structure
[in,out]cbpointer to a cs_cell_builder_t structure

◆ cs_equation_builder_log_performance()

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.

Parameters
[in]eqppointer to a set of equation parameters
[in]eqbpointer to an equation builder structure

◆ cs_equation_builder_reset()

void cs_equation_builder_reset ( cs_equation_builder_t eqb)

Free some members of a cs_equation_builder_t structure.

Parameters
[in,out]eqbpointer to the cs_equation_builder_t structure

◆ cs_equation_builder_set_reaction_pty_cw()

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.

Parameters
[in]eqppointer to a cs_equation_param_t structure
[in]eqbpointer to a cs_equation_builder_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
Returns
true if the reaction property is not equal to zero