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 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, 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_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, double dt_cur, 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 void() cs_equation_compute_source_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *builder)
 Compute the contribution of source terms for the current time. More...
 
typedef void() cs_equation_flux_plane_t(const cs_real_t normal[], const cs_real_t *pdi, int ml_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, double *d_flux, double *c_flux)
 Compute the diffusive and convective flux across a list of faces. More...
 
typedef void() cs_equation_cell_difflux_t(const cs_real_t *fvals, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_flag_t location, cs_real_t *d_flux)
 Cellwise computation of the diffusive flux across all faces. Primal or dual faces are considered according to the space scheme. 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 double *() cs_equation_get_extra_values_t(const void *scheme_context)
 Get the computed values at a different location than that of the field associated to this equation. 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, double dt_cur, 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]dt_curcurrent value of the time step
[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_cell_difflux_t

typedef void() cs_equation_cell_difflux_t(const cs_real_t *fvals, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_flag_t location, cs_real_t *d_flux)

Cellwise computation of the diffusive flux across all faces. Primal or dual faces are considered according to the space scheme.

Parameters
[in]fvalspointer to an array of field values
[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
[in,out]locationwhere the flux is defined
[in,out]diff_fluxpointer to the value of the diffusive flux

◆ cs_equation_compute_source_t

typedef void() cs_equation_compute_source_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *builder)

Compute the contribution of source terms for the current time.

Parameters
[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 data structure which is cast on-the-fly

◆ 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_flux_plane_t

typedef void() cs_equation_flux_plane_t(const cs_real_t normal[], const cs_real_t *pdi, int ml_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, double *d_flux, double *c_flux)

Compute the diffusive and convective flux across a list of faces.

Parameters
[in]normalindicate in which direction flux is > 0
[in]pdipointer to an array of field values
[in]ml_idid related to a cs_mesh_location_t struct.
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]datapointer to data specific for this scheme
[in,out]d_fluxpointer to the value of the diffusive flux
[in,out]c_fluxpointer to the value of the convective flux

◆ 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_extra_values_t

typedef double*() cs_equation_get_extra_values_t(const void *scheme_context)

Get the computed values at a different location than that of the field associated to this equation.

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

◆ cs_equation_init_context_t

typedef void*() cs_equation_init_context_t(const cs_equation_param_t *eqp, 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,out]eqbpointer to a cs_equation_builder_t structure
Returns
a pointer to a new allocated scheme builder structure

◆ 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_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