My Project
programmer's documentation
Data Structures | Typedefs
cs_equation_priv.h File Reference
#include "cs_equation_param.h"
#include "cs_equation_common.h"
#include "cs_field.h"
#include "cs_param.h"
#include "cs_restart.h"
Include dependency graph for cs_equation_priv.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 Documentation

◆ cs_equation_build_system_t

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.

Parameters
[in]mpointer to a cs_mesh_t structure
[in]field_valpointer to the current value of the field
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]datapointer to a scheme builder structure
[in,out]rhsright-hand side to compute
[in,out]matrixpointer to cs_matrix_t structure to compute

◆ cs_equation_extra_op_t

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.

Parameters
[in]eqnamename of the equation
[in]fieldpointer to a field structure
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]datapointer to a generic data structure

◆ cs_equation_free_context_t

typedef void*() cs_equation_free_context_t(void *scheme_context)

Destroy a scheme data structure.

Parameters
[in,out]scheme_contextpointer to a builder structure
Returns
a NULL pointer

◆ cs_equation_get_balance_t

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.

Parameters
[in]eqppointer to a cs_equation_param_t
[in,out]eqbpointer to a cs_equation_builder_t
[in,out]contextpointer to a scheme builder structure
Returns
a pointer to a cs_equation_balance_t structure

◆ cs_equation_get_values_t

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.

Parameters
[in,out]scheme_contextpointer to a data structure cast on-the-fly
Returns
a pointer to an array of cs_real_t

◆ cs_equation_init_context_t

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.

Parameters
[in]eqppointer to a cs_equation_param_t structure
[in]var_idid of the variable field
[in]bflux_idid of the boundary flux field
[in,out]eqbpointer to a cs_equation_builder_t struct.
Returns
a pointer to a new allocated scheme context structure

◆ cs_equation_init_values_t

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.

Parameters
[in]t_evaltime at which one performs the evaluation
[in]field_idid related to the variable field of this equation
[in]meshpointer to a cs_mesh_t structure
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]contextpointer to the scheme context (cast on-the-fly)

◆ cs_equation_initialize_system_t

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.

Parameters
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]datapointer to generic data structure
[in,out]system_matrixpointer of pointer to a cs_matrix_t struct.
[in,out]system_rhspointer of pointer to an array of double

◆ cs_equation_prepare_solve_t

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.

Parameters
[in,out]eq_castpointer to generic builder structure
[in,out]p_xpointer of pointer to the solution array
[in,out]p_rhspointer of pointer to the RHS array

◆ cs_equation_restart_t

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.

Parameters
[in,out]restartpointer to cs_restart_t structure
[in]eqnamename of the related equation
[in,out]scheme_contextpointer to a data structure cast on-the-fly

◆ cs_equation_set_dir_bc_t

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.

Parameters
[in]t_evaltime at which one evaluates BCs
[in]meshpointer to a cs_mesh_t structure
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]contextpointer to the scheme context (cast on-the-fly)
[in,out]field_valpointer to the values of the variable field

◆ cs_equation_solve_t

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.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]field_idid related to the variable field of this equation
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]eqcpointer to a scheme context structure

◆ cs_equation_update_field_t

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)

Parameters
[in]solusolution array
[in]rhsrhs associated to this solution array
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]datapointer to a data structure
[in,out]field_valpointer to the current value of the field