![]() |
programmer's documentation
|
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <float.h>
#include <bft_mem.h>
#include <bft_printf.h>
#include "cs_mesh_location.h"
#include "cs_evaluate.h"
#include "cs_source_term.h"
Macros | |
#define | CS_SOURCE_TERM_DBG 0 |
Functions | |
void | cs_source_term_set_shared_pointers (const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step) |
Set shared pointers to main domain members. More... | |
cs_source_term_t * | cs_source_term_create (const char *name, int ml_id, cs_source_term_type_t st_type, cs_source_term_reduction_t red_type, cs_param_var_type_t var_type) |
Create and initialize a cs_source_term_t structure. More... | |
cs_source_term_t * | cs_source_term_free (cs_source_term_t *st) |
Destroy a cs_source_term_t structure. More... | |
void | cs_source_term_set_quadrature (cs_source_term_t *st, cs_quadra_type_t quad_type) |
Set advanced parameters which are defined by default in a source term structure. More... | |
void | cs_source_term_set_reduction (cs_source_term_t *st, cs_source_term_reduction_t red_type) |
Set advanced parameters which are defined by default in a source term structure. More... | |
const char * | cs_source_term_get_name (const cs_source_term_t *st) |
Get the name related to a cs_source_term_t structure. More... | |
cs_source_term_reduction_t | cs_source_term_get_reduction (const cs_source_term_t *st) |
Get the type of reduction applied to a cs_source_term_t structure. More... | |
void | cs_source_term_summary (const char *eqname, const cs_source_term_t *st) |
Summarize the content of a cs_source_term_t structure. More... | |
void | cs_source_term_def_by_value (cs_source_term_t *st, const char *val) |
Generic way to define the value of a cs_source_term_t structure. More... | |
void | cs_source_term_def_by_analytic (cs_source_term_t *st, cs_analytic_func_t *func) |
Define a cs_source_term_t structure thanks to an analytic function. More... | |
void | cs_source_term_def_by_array (cs_source_term_t *st, cs_desc_t desc, cs_real_t *array) |
Define a cs_source_term_t structure thanks to an array of values. More... | |
void | cs_source_term_compute (cs_desc_t dof_desc, const cs_source_term_t *source, double *p_values[]) |
Compute the contribution related to a source term. More... | |
Variables | |
static const char | _err_empty_st [] |
static const cs_cdo_quantities_t * | cs_cdo_quant |
static const cs_cdo_connect_t * | cs_cdo_connect |
static const cs_time_step_t * | cs_time_step |
#define CS_SOURCE_TERM_DBG 0 |
void cs_source_term_compute | ( | cs_desc_t | dof_desc, |
const cs_source_term_t * | source, | ||
double * | p_values[] | ||
) |
Compute the contribution related to a source term.
[in] | dof_desc | description of the associated DoF |
[in] | source | pointer to a cs_source_term_t structure |
[in,out] | p_values | pointer to the computed values (allocated if NULL) |
cs_source_term_t* cs_source_term_create | ( | const char * | name, |
int | ml_id, | ||
cs_source_term_type_t | st_type, | ||
cs_source_term_reduction_t | red_type, | ||
cs_param_var_type_t | var_type | ||
) |
Create and initialize a cs_source_term_t structure.
[in] | st_name | name of the related source term |
[in] | ml_id | id of the related mesh location |
[in] | st_type | type of source term to create |
[in] | red_type | type of reduction to apply |
[in] | var_type | type of variables (scalar, vector, tensor...) |
void cs_source_term_def_by_analytic | ( | cs_source_term_t * | st, |
cs_analytic_func_t * | func | ||
) |
Define a cs_source_term_t structure thanks to an analytic function.
[in,out] | st | pointer to a cs_source_term_t structure |
[in] | func | pointer to a function |
Define a cs_source_term_t structure thanks to an array of values.
[in,out] | st | pointer to a cs_source_term_t structure |
[in] | desc | description of the main feature of this array |
[in] | array | pointer to an array |
void cs_source_term_def_by_value | ( | cs_source_term_t * | st, |
const char * | val | ||
) |
Generic way to define the value of a cs_source_term_t structure.
[in,out] | pty | pointer to a cs_source_term_t structure |
[in] | val | accessor to the value to set |
cs_source_term_t* cs_source_term_free | ( | cs_source_term_t * | st | ) |
Destroy a cs_source_term_t structure.
[in] | st | pointer to a cs_source_term_t structure |
const char* cs_source_term_get_name | ( | const cs_source_term_t * | st | ) |
Get the name related to a cs_source_term_t structure.
[in] | st | pointer to a cs_source_term_t structure |
cs_source_term_reduction_t cs_source_term_get_reduction | ( | const cs_source_term_t * | st | ) |
Get the type of reduction applied to a cs_source_term_t structure.
[in] | st | pointer to a cs_source_term_t structure |
void cs_source_term_set_quadrature | ( | cs_source_term_t * | st, |
cs_quadra_type_t | quad_type | ||
) |
Set advanced parameters which are defined by default in a source term structure.
Set the type of quadrature to use for computing the source term.
[in,out] | st | pointer to a cs_source_term_t structure |
[in] | quad_type | type of quadrature to use |
void cs_source_term_set_reduction | ( | cs_source_term_t * | st, |
cs_source_term_reduction_t | red_type | ||
) |
Set advanced parameters which are defined by default in a source term structure.
Set where the reduction has to be applied forn defining source term.
[in,out] | st | pointer to a cs_source_term_t structure |
[in] | red_type | type of reduction to apply |
void cs_source_term_set_shared_pointers | ( | const cs_cdo_quantities_t * | quant, |
const cs_cdo_connect_t * | connect, | ||
const cs_time_step_t * | time_step | ||
) |
Set shared pointers to main domain members.
[in] | quant | additional mesh quantities struct. |
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | time_step | pointer to a time step structure |
void cs_source_term_summary | ( | const char * | eqname, |
const cs_source_term_t * | st | ||
) |
Summarize the content of a cs_source_term_t structure.
[in] | eqname | name of the related equation |
[in] | st | pointer to a cs_source_term_t structure |
|
static |
|
static |
|
static |
|
static |