1 #ifndef __CS_EQUATION_COMMON_H__ 2 #define __CS_EQUATION_COMMON_H__ cs_timer_counter_t tca
Definition: cs_equation_common.h:138
Store common elements used when building an algebraic system related to an equation.
Definition: cs_equation_common.h:61
time step descriptor
Definition: cs_time_step.h:51
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:286
cs_timer_counter_t tcd
Definition: cs_equation_common.h:136
void cs_equation_common_init(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, cs_flag_t vb_flag, cs_flag_t vcb_flag, cs_flag_t fb_flag, cs_flag_t hho_flag)
Allocate a pointer to a buffer of size at least the n_cells for managing temporary usage of memory wh...
Definition: cs_equation_common.c:115
bool inv_pty
Definition: cs_param_cdo.h:133
double dpty_val
Definition: cs_cdo_local.h:64
unsigned char cs_mask_t
Definition: cs_flag.h:152
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:148
cs_timer_counter_t tcr
Definition: cs_equation_common.h:140
void cs_equation_free_builder(cs_equation_builder_t **p_builder)
Free a cs_equation_builder_t structure.
Definition: cs_equation_common.c:325
static void cs_equation_set_diffusion_property_cw(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_real_t t_eval, const 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...
Definition: cs_equation_common.h:253
cs_real_t * boundary_term
Definition: cs_equation_common.h:169
cs_param_hodge_t diffusion_hodge
Definition: cs_equation_param.h:285
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
static void cs_equation_set_diffusion_property(const cs_equation_param_t *eqp, const cs_lnum_t c_id, const cs_real_t t_eval, const cs_flag_t c_flag, cs_cell_builder_t *cb)
Set the diffusion property inside a cell and its related quantities.
Definition: cs_equation_common.h:213
Definition: cs_param.h:347
cs_real_t * balance
Definition: cs_equation_common.h:161
cs_lnum_t size
Definition: cs_equation_common.h:160
Set of local quantities and connectivities related to a mesh cell This is a key structure for all cel...
Definition: cs_cdo_local.h:146
cs_equation_balance_t * cs_equation_balance_create(cs_flag_t location, cs_lnum_t size)
Allocate a cs_equation_balance_t structure.
Definition: cs_equation_common.c:773
cs_flag_t msh_flag
Definition: cs_equation_common.h:70
double eig_ratio
Definition: cs_cdo_local.h:59
cs_flag_t location
Definition: cs_equation_common.h:159
bool init_step
Definition: cs_equation_common.h:63
Definition: cs_cdo_connect.h:74
cs_cdo_bc_face_t * face_bc
Definition: cs_equation_common.h:122
cs_timer_counter_t tcb
Definition: cs_equation_common.h:134
void cs_property_tensor_in_cell(const cs_cell_mesh_t *cm, const cs_property_t *pty, cs_real_t t_eval, 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...
Definition: cs_property.c:1178
void cs_equation_enforced_internal_dofs(const cs_equation_param_t *eqp, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Take into account the enforcement of internal DoFs. Apply an algebraic manipulation.
Definition: cs_equation_common.c:588
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
Definition: cs_cdo_quantities.h:94
void matrix(const int *iconvp, const int *idiffp, const int *ndircp, const int *isym, const cs_real_t *thetap, const int *imucpp, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t da[], cs_real_t xa[])
Definition: cs_matrix_building.c:111
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition: cs_cdo_local.h:93
cs_real_t * advection_term
Definition: cs_equation_common.h:167
struct _cs_matrix_t cs_matrix_t
Definition: cs_matrix.h:90
bool time_pty_uniform
Definition: cs_equation_common.h:88
cs_flag_t bd_msh_flag
Definition: cs_equation_common.h:73
cs_real_t * source_term
Definition: cs_equation_common.h:168
double eig_max
Definition: cs_cdo_local.h:60
Definition: cs_equation_common.h:156
cs_flag_t st_msh_flag
Definition: cs_equation_common.h:76
void cs_equation_init_properties(const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const cs_real_t t_eval, cs_cell_builder_t *cb)
Initialize all properties for an algebraic system.
Definition: cs_equation_common.c:482
cs_real_t * reaction_term
Definition: cs_equation_common.h:165
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 struc...
Definition: cs_equation_common.c:243
cs_gnum_t cs_equation_prepare_system(int stride, cs_lnum_t x_size, const cs_matrix_t *matrix, cs_range_set_t *rset, cs_real_t *x, cs_real_t *b)
Prepare a linear system and synchronize buffers to handle parallelism. Transfer a mesh-based descript...
Definition: cs_equation_common.c:363
Definition: cs_cdo_bc.h:86
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...
Definition: cs_equation_common.c:742
cs_property_t * diffusion_property
Definition: cs_equation_param.h:286
Definition: cs_range_set.h:57
cs_timer_counter_t tce
Definition: cs_equation_common.h:144
void cs_equation_init_properties_cw(const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const cs_real_t t_eval, const cs_flag_t cell_flag, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Initialize all properties for a given cell when building the algebraic system. If the property is uni...
Definition: cs_equation_common.c:536
Set of local and temporary buffers useful for building the algebraic system with a cellwise process...
Definition: cs_cdo_local.h:56
cs_timer_counter_t tcs
Definition: cs_equation_common.h:142
void cs_equation_balance_reset(cs_equation_balance_t *b)
Reset a cs_equation_balance_t structure.
Definition: cs_equation_common.c:809
cs_flag_t sys_flag
Definition: cs_equation_common.h:79
#define CS_CDO_N_MAX_REACTIONS
Definition: cs_param_cdo.h:69
bool diff_pty_uniform
Definition: cs_equation_common.h:87
cs_param_bc_enforce_t default_enforcement
Definition: cs_equation_param.h:219
cs_real_t * diffusion_term
Definition: cs_equation_common.h:166
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.
Definition: cs_equation_common.c:444
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
void cs_equation_balance_sync(const cs_cdo_connect_t *connect, cs_equation_balance_t *b)
Synchronize balance terms if this is a parallel computation.
Definition: cs_equation_common.c:834
void cs_math_33_eigen(const cs_real_t m[3][3], cs_real_t *eig_ratio, cs_real_t *eig_max)
Compute max/min eigenvalues ratio and max. eigenvalue of a 3x3 symmetric matrix with non-symmetric st...
Definition: cs_math.c:303
#define END_C_DECLS
Definition: cs_defs.h:468
unsigned short int cs_flag_t
Definition: cs_defs.h:304
void cs_property_get_cell_tensor(cs_lnum_t c_id, cs_real_t t_eval, 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.
Definition: cs_property.c:1026
#define CS_N_MAX_SOURCE_TERMS
Definition: cs_source_term.h:49
cs_real_t * unsteady_term
Definition: cs_equation_common.h:164
static cs_flag_t cs_equation_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.
Definition: cs_equation_common.h:189
Definition: cs_param.h:348
cs_real_33_t dpty_mat
Definition: cs_cdo_local.h:63
size_t cs_equation_get_tmpbuf_size(void)
Get the allocation size of the temporary buffer.
Definition: cs_equation_common.c:756
static bool cs_property_is_isotropic(const cs_property_t *pty)
returns true if the property is isotropic, otherwise false
Definition: cs_property.h:276
cs_mask_t * source_mask
Definition: cs_equation_common.h:98
void cs_equation_balance_destroy(cs_equation_balance_t **p_balance)
Free a cs_equation_balance_t structure.
Definition: cs_equation_common.c:865
Structure and routines handling the specific settings related to a cs_equation_t structure.
void cs_equation_common_finalize(void)
Allocate a pointer to a buffer of size at least the 2*n_cells for managing temporary usage of memory ...
Definition: cs_equation_common.c:221
void cs_equation_enforced_internal_block_dofs(const cs_equation_param_t *eqp, 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.
Definition: cs_equation_common.c:653
void() cs_source_term_cellwise_t(const cs_xdef_t *source, const cs_cell_mesh_t *cm, cs_real_t time_eval, cs_cell_builder_t *cb, void *input, double *values)
Compute the contribution for a cell related to a source term and add it the given array of values...
Definition: cs_source_term.h:70
Definition: cs_timer.h:57
double precision, save b
Definition: cs_fuel_incl.f90:146
#define CS_FLAG_BOUNDARY_CELL_BY_FACE
Definition: cs_flag.h:49