8.0
general documentation
cs_equation_priv.h File Reference
#include "cs_cdo_toolbox.h"
#include "cs_equation_param.h"
#include "cs_equation_builder.h"
#include "cs_field.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(bool cur2prev, 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_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 *context)
 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[])
 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 *context, 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_cdo_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_apply_sitffness_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context, const cs_property_t *property, const cs_real_t *pot, cs_flag_t loc_res, cs_real_t *res)
 Compute the cellwise stiffness matrix associated to the property given as a parameter and apply it to the pot array to define the resulting array associated to entities defined at loc_res. More...
 
typedef void() cs_equation_extra_op_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
 Generic prototype for extra-operations related to an equation. More...
 
typedef void() cs_equation_get_builders_t(cs_cell_sys_t **csys, cs_cell_builder_t **cb)
 Retrieve cellwise structure including work buffers used to build a CDO system cellwise. Generic prototype for all CDO schemes. More...
 
typedef cs_real_t *() cs_equation_get_values_t(void *scheme_context, bool previous)
 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_apply_sitffness_t

typedef void() cs_equation_apply_sitffness_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context, const cs_property_t *property, const cs_real_t *pot, cs_flag_t loc_res, cs_real_t *res)

Compute the cellwise stiffness matrix associated to the property given as a parameter and apply it to the pot array to define the resulting array associated to entities defined at loc_res.

Parameters
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]contextpointer to a scheme builder structure
[in]propertypointer to the property related to the stiffness op.
[in]potarray to multiply with the stiffness matrix
[in]loc_reslocation of entities in the resulting array
[in,out]resresulting array

◆ 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 *context)

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]contextpointer to a scheme context structure

◆ cs_equation_extra_op_t

typedef void() cs_equation_extra_op_t(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)

Generic prototype for extra-operations related to an equation.

Parameters
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]contextpointer 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 structure cast on-the-fly
Returns
a NULL pointer

◆ cs_equation_get_balance_t

typedef cs_cdo_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 context structure
Returns
a pointer to a cs_cdo_balance_t structure

◆ cs_equation_get_builders_t

typedef void() cs_equation_get_builders_t(cs_cell_sys_t **csys, cs_cell_builder_t **cb)

Retrieve cellwise structure including work buffers used to build a CDO system cellwise. Generic prototype for all CDO schemes.

Parameters
[out]csyspointer to a pointer on a cs_cell_sys_t structure
[out]cbpointer to a pointer on a cs_cell_builder_t structure

◆ cs_equation_get_values_t

typedef cs_real_t*() cs_equation_get_values_t(void *scheme_context, bool previous)

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
[in]previousretrieve the previous state (true/false)
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_prepare_solve_t

typedef void() cs_equation_prepare_solve_t(void *eq_to_cast, cs_real_t *p_x[])

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

◆ 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(bool cur2prev, 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]cur2prevtrue="current to previous" operation is performed
[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 *context, 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]contextpointer to a context structure
[in,out]field_valpointer to the current value of the field