My Project
programmer's documentation
|
#include "cs_equation_param.h"
#include "cs_equation_common.h"
#include "cs_field.h"
#include "cs_param.h"
#include "cs_restart.h"
Go to the source code of this file.
Data Structures | |
struct | cs_equation_t |
Typedefs | |
typedef void *() | cs_equation_init_context_t(const cs_equation_param_t *eqp, int var_id, int bflux_id, cs_equation_builder_t *eqb) |
Initialize a scheme data structure used during the building of the algebraic system. More... | |
typedef void *() | cs_equation_free_context_t(void *scheme_context) |
Destroy a scheme data structure. More... | |
typedef void() | cs_equation_init_values_t(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) |
Initialize the variable field values related to an equation. More... | |
typedef void() | cs_equation_solve_t(const cs_mesh_t *mesh, const int field_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *eqc) |
Build and solve a linear system within the CDO framework. More... | |
typedef void() | cs_equation_set_dir_bc_t(cs_real_t t_eval, const cs_mesh_t *mesh, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context, cs_real_t field_val[]) |
Set the Dirichlet boundary stemming from the settings. More... | |
typedef void() | cs_equation_initialize_system_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_matrix_t **system_matrix, cs_real_t **system_rhs) |
Create the matrix of the current algebraic system. Allocate and initialize the right-hand side associated to the given builder structure. More... | |
typedef void() | cs_equation_build_system_t(const cs_mesh_t *mesh, const cs_real_t *field_val, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_real_t *rhs, cs_matrix_t *matrix) |
Build a linear system within the CDO framework. More... | |
typedef void() | cs_equation_prepare_solve_t(void *eq_to_cast, cs_real_t *p_x[], cs_real_t *p_rhs[]) |
Carry out operations for allocating and/or initializing the solution array and the right hand side of the linear system to solve. Handle parallelism thanks to cs_range_set_t structure. More... | |
typedef void() | cs_equation_update_field_t(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 (for hybrid discretization) More... | |
typedef cs_equation_balance_t *() | cs_equation_get_balance_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context) |
Compute the balance for an equation over the full computational domain between time t_cur and t_cur + dt_cur. More... | |
typedef void() | cs_equation_extra_op_t(const char *eqname, const cs_field_t *field, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data) |
Extra-operation related to this equation. More... | |
typedef cs_real_t *() | cs_equation_get_values_t(void *scheme_context) |
Compute or retrieve an array of values at a given mesh location Currently, vertices, cells or faces are possible locations The lifecycle of this array is managed by the code. So one does not have to free the return pointer. More... | |
typedef void() | cs_equation_restart_t(cs_restart_t *restart, const char *eqname, void *scheme_context) |
Generic prototype dedicated to read or write additional arrays (not defined as fields) useful for the checkpoint/restart process. More... | |
typedef void() cs_equation_build_system_t(const cs_mesh_t *mesh, const cs_real_t *field_val, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_real_t *rhs, cs_matrix_t *matrix) |
Build a linear system within the CDO framework.
[in] | m | pointer to a cs_mesh_t structure |
[in] | field_val | pointer to the current value of the field |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | data | pointer to a scheme builder structure |
[in,out] | rhs | right-hand side to compute |
[in,out] | matrix | pointer to cs_matrix_t structure to compute |
typedef void() cs_equation_extra_op_t(const char *eqname, const cs_field_t *field, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data) |
Extra-operation related to this equation.
[in] | eqname | name of the equation |
[in] | field | pointer to a field structure |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | data | pointer to a generic data structure |
typedef void*() cs_equation_free_context_t(void *scheme_context) |
Destroy a scheme data structure.
[in,out] | scheme_context | pointer to a builder structure |
typedef cs_equation_balance_t*() cs_equation_get_balance_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context) |
Compute the balance for an equation over the full computational domain between time t_cur and t_cur + dt_cur.
[in] | eqp | pointer to a cs_equation_param_t |
[in,out] | eqb | pointer to a cs_equation_builder_t |
[in,out] | context | pointer to a scheme builder structure |
typedef cs_real_t*() cs_equation_get_values_t(void *scheme_context) |
Compute or retrieve an array of values at a given mesh location Currently, vertices, cells or faces are possible locations The lifecycle of this array is managed by the code. So one does not have to free the return pointer.
[in,out] | scheme_context | pointer to a data structure cast on-the-fly |
typedef void*() cs_equation_init_context_t(const cs_equation_param_t *eqp, int var_id, int bflux_id, cs_equation_builder_t *eqb) |
Initialize a scheme data structure used during the building of the algebraic system.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | var_id | id of the variable field |
[in] | bflux_id | id of the boundary flux field |
[in,out] | eqb | pointer to a cs_equation_builder_t struct. |
typedef void() cs_equation_init_values_t(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) |
Initialize the variable field values related to an equation.
[in] | t_eval | time at which one performs the evaluation |
[in] | field_id | id related to the variable field of this equation |
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | context | pointer to the scheme context (cast on-the-fly) |
typedef void() cs_equation_initialize_system_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_matrix_t **system_matrix, cs_real_t **system_rhs) |
Create the matrix of the current algebraic system. Allocate and initialize the right-hand side associated to the given builder structure.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | data | pointer to generic data structure |
[in,out] | system_matrix | pointer of pointer to a cs_matrix_t struct. |
[in,out] | system_rhs | pointer of pointer to an array of double |
Carry out operations for allocating and/or initializing the solution array and the right hand side of the linear system to solve. Handle parallelism thanks to cs_range_set_t structure.
[in,out] | eq_cast | pointer to generic builder structure |
[in,out] | p_x | pointer of pointer to the solution array |
[in,out] | p_rhs | pointer of pointer to the RHS array |
typedef void() cs_equation_restart_t(cs_restart_t *restart, const char *eqname, void *scheme_context) |
Generic prototype dedicated to read or write additional arrays (not defined as fields) useful for the checkpoint/restart process.
[in,out] | restart | pointer to cs_restart_t structure |
[in] | eqname | name of the related equation |
[in,out] | scheme_context | pointer to a data structure cast on-the-fly |
typedef void() cs_equation_set_dir_bc_t(cs_real_t t_eval, const cs_mesh_t *mesh, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context, cs_real_t field_val[]) |
Set the Dirichlet boundary stemming from the settings.
[in] | t_eval | time at which one evaluates BCs |
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | context | pointer to the scheme context (cast on-the-fly) |
[in,out] | field_val | pointer to the values of the variable field |
typedef void() cs_equation_solve_t(const cs_mesh_t *mesh, const int field_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *eqc) |
Build and solve a linear system within the CDO framework.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | field_id | id related to the variable field of this equation |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | eqc | pointer to a scheme context structure |
typedef void() cs_equation_update_field_t(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 (for hybrid discretization)
[in] | solu | solution array |
[in] | rhs | rhs associated to this solution array |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in,out] | eqb | pointer to a cs_equation_builder_t structure |
[in,out] | data | pointer to a data structure |
[in,out] | field_val | pointer to the current value of the field |