![]() |
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_cdo_local.h"
#include "cs_cdovb_scaleq.h"
#include "cs_cdovcb_scaleq.h"
#include "cs_cdofb_scaleq.h"
#include "cs_hho_scaleq.h"
#include "cs_log.h"
#include "cs_equation_common.h"
Macros | |
#define | CS_EQUATION_COMMON_DBG 0 |
#define | CS_EQ_COMMON_VERTEX 0 |
#define | CS_EQ_COMMON_FACE 1 |
#define | CS_EQ_N_COMMONS 2 |
Functions | |
static cs_connect_index_t * | _get_v2v (const cs_cdo_connect_t *connect) |
Build a vertex -> vertices connectivity index. More... | |
static cs_connect_index_t * | _get_f2f (const cs_cdo_connect_t *connect) |
Build a face -> faces connectivity index. More... | |
static void | _build_matrix_assembler (cs_lnum_t n_elts, const cs_connect_index_t *x2x, const cs_range_set_t *rs, cs_matrix_assembler_t *ma) |
Define a cs_matrix_assembler_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_real_t * | cs_equation_compute_dirichlet_sv (const cs_mesh_t *mesh, const cs_param_bc_t *bc_param, 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... | |
void | cs_equation_assemble_v (const cs_cell_sys_t *csys, const cs_range_set_t *rset, cs_flag_t sys_flag, 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... | |
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_connect_index_t * | cs_equation_get_v2v_index (void) |
Get the connectivity vertex->vertices for the local rank. More... | |
const cs_connect_index_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... | |
cs_equation_monitor_t * | cs_equation_init_monitoring (void) |
Initialize a monitoring structure. More... | |
void | cs_equation_write_monitoring (const char *eqname, const cs_equation_monitor_t *monitor) |
Print a message in the performance output file related to the monitoring of equation. More... | |
Variables | |
static size_t | cs_equation_common_work_buffer_size = 0 |
static cs_real_t * | cs_equation_common_work_buffer = NULL |
static cs_matrix_assembler_t ** | cs_equation_common_ma = NULL |
static cs_matrix_structure_t ** | cs_equation_common_ms = NULL |
static cs_connect_index_t * | cs_connect_v2v = NULL |
static cs_connect_index_t * | cs_connect_f2f = NULL |
static const cs_cdo_quantities_t * | cs_shared_quant |
static const cs_cdo_connect_t * | cs_shared_connect |
static const cs_time_step_t * | cs_shared_time_step |
static cs_timer_counter_t | tca |
static cs_timer_counter_t | tcc |
#define CS_EQ_COMMON_FACE 1 |
#define CS_EQ_COMMON_VERTEX 0 |
#define CS_EQ_N_COMMONS 2 |
#define CS_EQUATION_COMMON_DBG 0 |
|
static |
Define a cs_matrix_assembler_t structure.
[in] | n_elts | number of elements |
[in] | x2x | pointer to a cs_connect_index_t struct. |
[in] | rs | pointer to a range set or NULL if sequential |
[in,out] | ma | pointer to the cs_matrix_assembler_t to update |
|
static |
Build a face -> faces connectivity index.
[in] | connect | pointer to a cs_cdo_connect_t structure |
|
static |
Build a vertex -> vertices connectivity index.
[in] | connect | pointer to a cs_cdo_connect_t structure |
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_v | ( | const cs_cell_sys_t * | csys, |
const cs_range_set_t * | rset, | ||
cs_flag_t | sys_flag, | ||
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] | sys_flag | flag associated to the current system builder |
[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_sv | ( | const cs_mesh_t * | mesh, |
const cs_param_bc_t * | bc_param, | ||
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.
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] | bc_param | pointer to a cs_param_bc_t structure |
[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_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 |
const cs_connect_index_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_connect_index_t* cs_equation_get_v2v_index | ( | void | ) |
Get the connectivity vertex->vertices for the local rank.
cs_equation_monitor_t* cs_equation_init_monitoring | ( | void | ) |
Initialize a monitoring structure.
void cs_equation_write_monitoring | ( | const char * | eqname, |
const cs_equation_monitor_t * | monitor | ||
) |
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] | monitor | monitoring structure |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |