|
My Project
programmer's documentation
|
Go to the documentation of this file. 1 #ifndef __CS_CDOFB_VECTEQ_H__
2 #define __CS_CDOFB_VECTEQ_H__
216 const cs_cdofb_vecteq_t *eqc,
262 const cs_cdofb_vecteq_t *eqc,
285 const cs_cdofb_vecteq_t *eqc,
329 const short int _off = 3*cm->
n_fc;
330 csys->
rhs[_off ] += coef * csys->
source[_off ];
331 csys->
rhs[_off + 1] += coef * csys->
source[_off + 1];
332 csys->
rhs[_off + 2] += coef * csys->
source[_off + 2];
376 const bool has_sourceterm,
377 cs_cdofb_vecteq_t *eqc,
384 const short int n_f_dofs = 3*cm->
n_fc;
387 eqc->assemble(csys, rs, eqa, mav);
390 # pragma omp critical
392 for (
short int f = 0; f < n_f_dofs; f++)
398 if (has_sourceterm) {
400 for (
int k = 0;
k < 3;
k++)
555 void *scheme_context);
571 void *scheme_context);
void cs_cdofb_vecteq_solve_theta(const cs_mesh_t *mesh, const int field_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Build and solve the linear system arising from a vector diffusion equation with a CDO-Fb scheme and a...
Definition: cs_cdofb_vecteq.c:1045
cs_mask_t * source_mask
Definition: cs_equation_common.h:98
cs_real_t * cs_cdofb_vecteq_get_face_values(void *context)
Retrieve an array of values at mesh faces for the current context. The lifecycle of this array is man...
Definition: cs_cdofb_vecteq.c:1888
static void cs_cdofb_vecteq_assembly(const cs_cell_sys_t *csys, const cs_range_set_t *rs, const cs_cell_mesh_t *cm, const bool has_sourceterm, cs_cdofb_vecteq_t *eqc, cs_equation_assemble_t *eqa, cs_matrix_assembler_values_t *mav, cs_real_t rhs[])
Perform the assembly stage for a vector-valued system obtained with CDO-Fb scheme.
Definition: cs_cdofb_vecteq.h:373
void cs_cdofb_vecteq_solve_steady_state(const cs_mesh_t *mesh, const int field_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Build and solve the linear system arising from a vector steady-state diffusion equation with a CDO-Fb...
Definition: cs_cdofb_vecteq.c:638
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:126
Definition: cs_field_pointer.h:134
void cs_cdofb_vecteq_finalize_common(void)
Free work buffer and general structure related to CDO face-based schemes.
Definition: cs_cdofb_vecteq.c:1415
struct _cs_matrix_structure_t cs_matrix_structure_t
Definition: cs_matrix.h:86
void cs_cdofb_vecteq_get(cs_cell_sys_t **csys, cs_cell_builder_t **cb)
Retrieve work buffers used for building a CDO system cellwise.
Definition: cs_cdofb_vecteq.c:1393
double precision, save b
Definition: cs_fuel_incl.f90:146
static void cs_cdofb_vecteq_sourceterm(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_real_t t_eval, const cs_real_t coef, cs_cell_builder_t *cb, cs_equation_builder_t *eqb, cs_cell_sys_t *csys)
Compute the term source for a vector-valued CDO-Fb scheme and add it to the local rhs.
Definition: cs_cdofb_vecteq.h:307
void cs_cdofb_vecteq_diffusion(double time_eval, const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const cs_cdofb_vecteq_t *eqc, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Build the local matrices arising from the diffusion, advection, reaction terms in CDO-Fb schemes.
Definition: cs_cdofb_vecteq.c:391
struct _cs_matrix_assembler_values_t cs_matrix_assembler_values_t
Definition: cs_matrix_assembler.h:65
Set of local quantities and connectivities related to a mesh face Structure used to get a better memo...
Definition: cs_cdo_local.h:212
#define END_C_DECLS
Definition: cs_defs.h:468
cs_source_term_cellwise_t * compute_source[CS_N_MAX_SOURCE_TERMS]
Definition: cs_equation_common.h:107
cs_lnum_t c_id
Definition: cs_cdo_local.h:157
cs_lnum_t * dof_ids
Definition: cs_cdo_local.h:100
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
struct _cs_equation_assemble_t cs_equation_assemble_t
Definition: cs_equation_assemble.h:52
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
void cs_cdofb_vecteq_init_cell_system(const cs_flag_t cell_flag, const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const cs_cdofb_vecteq_t *eqc, const cs_real_t dir_values[], const cs_real_t field_tn[], cs_real_t t_eval, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Initialize the local structure for the current cell.
Definition: cs_cdofb_vecteq.c:303
struct _cs_matrix_t cs_matrix_t
Definition: cs_matrix.h:90
void cs_cdofb_vecteq_update_field(const cs_real_t *solu, const cs_real_t *rhs, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_real_t *field_val)
Store solution(s) of the linear system into a field structure Update extra-field values if required (...
void cs_cdofb_vecteq_write_restart(cs_restart_t *restart, const char *eqname, void *scheme_context)
Write additional arrays (not defined as fields) but useful for the checkpoint/restart process.
Definition: cs_cdofb_vecteq.c:1991
cs_xdef_t ** source_terms
Definition: cs_equation_param.h:353
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:148
int cs_cdofb_vecteq_solve_system(cs_sles_t *sles, const cs_matrix_t *matrix, const cs_equation_param_t *eqp, cs_real_t *x, cs_real_t *b)
Solve a linear system arising from a scalar-valued CDO-Fb scheme.
Definition: cs_cdofb_vecteq.c:545
void cs_cdofb_vecteq_solve_implicit(const cs_mesh_t *mesh, const int field_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Build and solve the linear system arising from a vector diffusion equation with a CDO-Fb scheme and a...
Definition: cs_cdofb_vecteq.c:829
void cs_cdofb_vecteq_init_values(cs_real_t t_eval, const int field_id, const cs_mesh_t *mesh, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Set the initial values of the variable field taking into account the boundary conditions....
Definition: cs_cdofb_vecteq.c:1711
time step descriptor
Definition: cs_time_step.h:51
int n_dofs
Definition: cs_cdo_local.h:98
Definition: cs_cdo_quantities.h:94
void * cs_cdofb_vecteq_init_context(const cs_equation_param_t *eqp, int var_id, int bflux_id, cs_equation_builder_t *eqb)
Initialize a cs_cdofb_vecteq_t structure storing data useful for building and managing such a scheme.
Definition: cs_cdofb_vecteq.c:1451
cs_real_t * cs_cdofb_vecteq_get_cell_values(void *context)
Get the computed values at mesh cells from the inverse operation w.r.t. the static condensation (DoF ...
Definition: cs_cdofb_vecteq.c:1867
void * cs_cdofb_vecteq_free_context(void *data)
Destroy a cs_cdofb_vecteq_t structure.
Definition: cs_cdofb_vecteq.c:1677
struct _cs_restart_t cs_restart_t
Definition: cs_restart.h:87
Definition: cs_cdo_connect.h:74
Definition: cs_range_set.h:57
double * source
Definition: cs_cdo_local.h:105
Set of local and temporary buffers useful for building the algebraic system with a cellwise process....
Definition: cs_cdo_local.h:56
int n_source_terms
Definition: cs_equation_param.h:352
short int n_fc
Definition: cs_cdo_local.h:175
struct _cs_sles_t cs_sles_t
Definition: cs_sles.h:68
void cs_cdofb_vecteq_setup_bc(cs_real_t t_eval, const cs_mesh_t *mesh, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, cs_real_t *p_dir_values[])
Set the boundary conditions known from the settings.
Definition: cs_cdofb_vecteq.c:259
bool cs_cdofb_vecteq_is_initialized(void)
Check if the generic structures for building a CDO-Fb scheme are allocated.
Definition: cs_cdofb_vecteq.c:1296
Store common elements used when building an algebraic system related to an equation.
Definition: cs_equation_common.h:61
void cs_cdofb_vecteq_init_common(const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step, const cs_matrix_structure_t *ms)
Allocate work buffer and general structures related to CDO vector-valued face-based schemes....
Definition: cs_cdofb_vecteq.c:1318
void cs_cdofb_vecteq_read_restart(cs_restart_t *restart, const char *eqname, void *scheme_context)
Read additional arrays (not defined as fields) but useful for the checkpoint/restart process.
Definition: cs_cdofb_vecteq.c:1910
unsigned short int cs_flag_t
Definition: cs_defs.h:304
double precision, dimension(:,:), allocatable solu
Definition: atincl.f90:265
void cs_cdofb_vecteq_extra_op(const char *eqname, const cs_field_t *field, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data)
Predefined extra-operations related to this equation.
Definition: cs_cdofb_vecteq.c:1812
void cs_source_term_compute_cellwise(const int n_source_terms, cs_xdef_t *const *source_terms, const cs_cell_mesh_t *cm, const cs_mask_t *source_mask, cs_source_term_cellwise_t *compute_source[], cs_real_t time_eval, void *input, cs_cell_builder_t *cb, cs_real_t *result)
Compute the local contributions of source terms in a cell.
Definition: cs_source_term.c:799
Structure and routines handling the specific settings related to a cs_equation_t structure.
Definition: cs_cdofb_priv.h:51
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
const cs_matrix_structure_t * cs_cdofb_vecteq_matrix_structure(void)
Get the pointer to the related cs_matrix_structure_t.
Definition: cs_cdofb_vecteq.c:1378
Field descriptor.
Definition: cs_field.h:124
void cs_cdofb_vecteq_advection_diffusion(double time_eval, const cs_equation_param_t *eqp, const cs_cdofb_vecteq_t *eqc, const cs_cell_mesh_t *cm, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Build the local matrices arising from the diffusion, advection, reaction terms in CDO-Fb schemes.
Definition: cs_cdofb_vecteq.c:455
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
double * rhs
Definition: cs_cdo_local.h:104
Definition: cs_field_pointer.h:70