![]() |
programmer's documentation
|
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_log.h"
#include "cs_search.h"
#include "cs_post.h"
#include "cs_quadrature.h"
#include "cs_evaluate.h"
#include "cs_cdo_bc.h"
#include "cs_hodge.h"
#include "cs_cdofb_scaleq.h"
Macros | |
#define | CDOFB_SCALEQ_DBG 0 |
Functions | |
static cs_sla_matrix_t * | _init_diffusion_matrix (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) |
Allocate and initialize the matrix related to the diffusion op. Note: values are filled in a second step. More... | |
static cs_sla_matrix_t * | _build_diffusion_system (const cs_mesh_t *m, cs_real_t *rhs, cs_cdofb_scaleq_t *builder) |
Define the final (reduced) matrix for diffusion and its right hand side (RHS). RHS is the sum of three contributions. More... | |
void | cs_cdofb_scaleq_init_buffer (const cs_cdo_connect_t *connect) |
Allocate work buffer related to cdo face-based schemes. More... | |
void | cs_cdofb_scaleq_free_buffer (void) |
Free work buffer related to cdo face-based schemes. More... | |
cs_real_t * | cs_cdofb_scaleq_get_tmpbuf (void) |
Retrieve a pointer to a temporary buffer related to scalar equations discretized with CDO face-based schemes. More... | |
void * | cs_cdofb_scaleq_init (const cs_equation_param_t *eqp, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step) |
Initialize a cs_cdofb_scaleq_t structure. More... | |
void * | cs_cdofb_scaleq_free (void *builder) |
Destroy a cs_cdofb_scaleq_t structure. More... | |
void | cs_cdofb_scaleq_compute_source (void *builder) |
Compute the contributions of source terms (store inside builder) More... | |
void | cs_cdofb_scaleq_build_system (const cs_mesh_t *mesh, const cs_real_t *field_val, double dt_cur, void *builder, cs_real_t **rhs, cs_sla_matrix_t **sla_mat) |
Build the linear system arising from a scalar convection/diffusion equation with a CDO face-based scheme. More... | |
void | cs_cdofb_scaleq_update_field (const cs_real_t *solu, void *builder, cs_real_t *field_val) |
Post-process the solution of a scalar convection/diffusion equation solved with a CDO face-based scheme. More... | |
void | cs_cdofb_scaleq_post (const char *eqname, const cs_field_t *field, void *builder) |
Post-processing related to this equation. More... | |
const double * | cs_cdofb_scaleq_get_face_values (const void *builder, const cs_field_t *field) |
Get the computed values at each face. More... | |
Variables | |
static size_t | _fbscal_work_size = 0 |
static cs_real_t * | _fbscal_work = NULL |
#define CDOFB_SCALEQ_DBG 0 |
|
static |
Define the final (reduced) matrix for diffusion and its right hand side (RHS). RHS is the sum of three contributions.
[in] | m | pointer to a cs_mesh_t structure |
[in,out] | rhs | right-hand side |
[in,out] | builder | pointer to a cs_cdofb_scaleq_t struct. |
|
static |
Allocate and initialize the matrix related to the diffusion op. Note: values are filled in a second step.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
void cs_cdofb_scaleq_build_system | ( | const cs_mesh_t * | mesh, |
const cs_real_t * | field_val, | ||
double | dt_cur, | ||
void * | builder, | ||
cs_real_t ** | rhs, | ||
cs_sla_matrix_t ** | sla_mat | ||
) |
Build the linear system arising from a scalar convection/diffusion equation with a CDO face-based scheme.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | field_val | pointer to the current value of the field |
[in] | dt_cur | current value of the time step |
[in,out] | builder | pointer to cs_cdofb_scaleq_t structure |
[in,out] | rhs | pointer to a right-hand side array pointer |
[in,out] | sla_mat | pointer to cs_sla_matrix_t structure pointer |
void cs_cdofb_scaleq_compute_source | ( | void * | builder | ) |
Compute the contributions of source terms (store inside builder)
[in,out] | builder | pointer to a cs_cdofb_scaleq_t structure |
void* cs_cdofb_scaleq_free | ( | void * | builder | ) |
Destroy a cs_cdofb_scaleq_t structure.
[in,out] | builder | pointer to a cs_cdovb_scaleq_t structure |
void cs_cdofb_scaleq_free_buffer | ( | void | ) |
Free work buffer related to cdo face-based schemes.
const double* cs_cdofb_scaleq_get_face_values | ( | const void * | builder, |
const cs_field_t * | field | ||
) |
Get the computed values at each face.
[in] | builder | pointer to a cs_cdofb_scaleq_t structure |
[in] | field | pointer to a cs_field_t structure |
cs_real_t* cs_cdofb_scaleq_get_tmpbuf | ( | void | ) |
Retrieve a pointer to a temporary buffer related to scalar equations discretized with CDO face-based schemes.
void* cs_cdofb_scaleq_init | ( | const cs_equation_param_t * | eqp, |
const cs_mesh_t * | mesh, | ||
const cs_cdo_connect_t * | connect, | ||
const cs_cdo_quantities_t * | quant, | ||
const cs_time_step_t * | time_step | ||
) |
Initialize a cs_cdofb_scaleq_t structure.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | time_step | time_step structure |
void cs_cdofb_scaleq_init_buffer | ( | const cs_cdo_connect_t * | connect | ) |
Allocate work buffer related to cdo face-based schemes.
[in] | connect | pointer to a cs_cdo_connect_t structure |
void cs_cdofb_scaleq_post | ( | const char * | eqname, |
const cs_field_t * | field, | ||
void * | builder | ||
) |
Post-processing related to this equation.
[in] | eqname | name of the equation |
[in] | field | pointer to a field strufcture |
[in,out] | builder | pointer to builder structure |
Post-process the solution of a scalar convection/diffusion equation solved with a CDO face-based scheme.
[in] | solu | solution array |
[in,out] | builder | pointer to cs_cdofb_scaleq_t structure |
[in,out] | field_val | pointer to the current value of the field |
|
static |
|
static |