My Project
programmer's documentation
Macros | Functions | Variables
cs_equation.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_cdovb_scaleq.h"
#include "cs_cdovb_vecteq.h"
#include "cs_cdovcb_scaleq.h"
#include "cs_cdofb_scaleq.h"
#include "cs_cdofb_vecteq.h"
#include "cs_equation_bc.h"
#include "cs_equation_common.h"
#include "cs_equation_priv.h"
#include "cs_evaluate.h"
#include "cs_field_default.h"
#include "cs_hho_scaleq.h"
#include "cs_hho_vecteq.h"
#include "cs_log.h"
#include "cs_parall.h"
#include "cs_post.h"
#include "cs_prototypes.h"
#include "cs_range_set.h"
#include "cs_sles.h"
#include "cs_timer_stats.h"
#include "cs_equation.h"
Include dependency graph for cs_equation.c:

Macros

#define CS_EQUATION_DBG   0
 

Functions

int cs_equation_get_n_equations (void)
 Retrieve the number of equations. More...
 
cs_equation_tcs_equation_by_name (const char *eqname)
 Find the cs_equation_t structure with name eqname Return NULL if not find. More...
 
bool cs_equation_has_field_name (const cs_equation_t *eq, const char *fld_name)
 Check if the asociated field to a cs_equation_t structure has name equal to fld_name. More...
 
cs_equation_param_tcs_equation_param_by_name (const char *eqname)
 Return the cs_equation_param_t structure associated to a cs_equation_t structure thanks to the equation name. More...
 
cs_equation_param_tcs_equation_get_param (const cs_equation_t *eq)
 Return the cs_equation_param_t structure associated to a cs_equation_t structure. More...
 
cs_equation_tcs_equation_by_id (int eq_id)
 Find the cs_equation_t structure with id eq_id Return NULL if not find. More...
 
const char * cs_equation_get_name (const cs_equation_t *eq)
 Return the name related to the given cs_equation_t structure. More...
 
int cs_equation_get_id (const cs_equation_t *eq)
 Return the id number related to the given cs_equation_t structure. More...
 
cs_field_tcs_equation_get_field (const cs_equation_t *eq)
 Return the field structure associated to a cs_equation_t structure. More...
 
int cs_equation_get_field_id (const cs_equation_t *eq)
 Return the id related to the variable field structure associated to the cs_equation_t structure. More...
 
cs_field_tcs_equation_get_boundary_flux (const cs_equation_t *eq)
 Return the field structure for the (normal) boundary flux associated to a cs_equation_t structure. More...
 
cs_flag_t cs_equation_get_flag (const cs_equation_t *eq)
 Return the flag associated to an equation. More...
 
void cs_equation_set_flag (cs_equation_t *eq, cs_flag_t flag)
 Redefine the flag associated to an equation. More...
 
cs_equation_builder_tcs_equation_get_builder (const cs_equation_t *eq)
 Return the cs_equation_builder_t structure associated to a cs_equation_t structure. Only for an advanced usage. More...
 
void * cs_equation_get_scheme_context (const cs_equation_t *eq)
 Return a pointer to a structure useful to handle low-level operations for the given equation. More...
 
cs_property_tcs_equation_get_diffusion_property (const cs_equation_t *eq)
 Return a pointer to the cs_property_t structure associated to the diffusion term for this equation (NULL if not activated). More...
 
cs_property_tcs_equation_get_time_property (const cs_equation_t *eq)
 Return a pointer to the cs_property_t structure associated to the unsteady term for this equation (NULL if not activated). More...
 
cs_property_tcs_equation_get_reaction_property (const cs_equation_t *eq, const int reaction_id)
 Return a pointer to the cs_property_t structure associated to the reaction term with id equal to reaction_id and related to this equation. More...
 
cs_param_time_scheme_t cs_equation_get_time_scheme (const cs_equation_t *eq)
 Return the type of numerical scheme used for the discretization in time. More...
 
cs_real_t cs_equation_get_theta_time_val (const cs_equation_t *eq)
 Return the value of the theta parameter in theta time scheme discretization. More...
 
cs_param_space_scheme_t cs_equation_get_space_scheme (const cs_equation_t *eq)
 Return the type of numerical scheme used for the discretization in space. More...
 
int cs_equation_get_space_poly_degree (const cs_equation_t *eq)
 Return the max. degree used in the polynomial basis for the space discretization. More...
 
int cs_equation_get_var_dim (const cs_equation_t *eq)
 Return the dimension of the variable solved by this equation. More...
 
cs_equation_type_t cs_equation_get_type (const cs_equation_t *eq)
 Return the type of equation for the given equation structure. More...
 
bool cs_equation_is_steady (const cs_equation_t *eq)
 Return true is the given equation is steady otherwise false. More...
 
bool cs_equation_uses_new_mechanism (const cs_equation_t *eq)
 Return true is the given equation is steady otherwise false. More...
 
cs_equation_tcs_equation_add (const char *eqname, const char *varname, cs_equation_type_t eqtype, int dim, cs_param_bc_type_t default_bc)
 Add a new equation structure and set a first set of parameters. More...
 
cs_equation_tcs_equation_add_user (const char *eqname, const char *varname, int dim, cs_param_bc_type_t default_bc)
 Add a new user equation structure and set a first set of parameters. More...
 
void cs_equation_destroy_all (void)
 Destroy all cs_equation_t structures. More...
 
bool cs_equation_needs_steady_state_solve (void)
 Check if a steady-state computation is requested according to the setting. More...
 
void cs_equation_log_monitoring (void)
 Print a synthesis of the monitoring information in the performance file. More...
 
void cs_equation_get_count (int *n_equations, int *n_predef_equations, int *n_user_equations)
 Get the count of equations of each macro type. More...
 
void cs_equation_log_setup (void)
 Summarize all cs_equation_t structures. More...
 
void cs_equation_set_default_param (cs_equation_key_t key, const char *keyval)
 Set a parameter attached to a keyname for the default settigns. More...
 
void cs_equation_set_sles (void)
 Setup the linear algebra requirements. More...
 
void cs_equation_set_shared_structures (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, cs_flag_t vb_scheme_flag, cs_flag_t vcb_scheme_flag, cs_flag_t fb_scheme_flag, cs_flag_t hho_scheme_flag)
 Set shared structures among the activated class of discretization schemes. More...
 
void cs_equation_unset_shared_structures (cs_flag_t vb_scheme_flag, cs_flag_t vcb_scheme_flag, cs_flag_t fb_scheme_flag, cs_flag_t hho_scheme_flag)
 Release shared structures among the activated class of discretization schemes. More...
 
void cs_equation_set_range_set (const cs_cdo_connect_t *connect)
 Assign a cs_range_set_t structures for synchronization when computing in parallel mode. More...
 
bool cs_equation_set_functions (void)
 Assign a set of pointer functions for managing the cs_equation_t structure during the computation After this call, parameters related to an equation are set once for all. More...
 
void cs_equation_create_fields (void)
 Create a field structure related to all cs_equation_t structures. More...
 
void cs_equation_initialize (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts)
 Allocate and initialize the builder of the algebraic system. Set the initialize condition to all variable fields associated to each cs_equation_t structure. More...
 
void cs_equation_build_system (const cs_mesh_t *mesh, cs_equation_t *eq)
 Build the linear system for this equation. More...
 
void cs_equation_solve_deprecated (cs_equation_t *eq)
 Solve the linear system for this equation. More...
 
void cs_equation_solve_steady_state (const cs_mesh_t *mesh, cs_equation_t *eq)
 Build and then solve the linear system for this equation when the goal is to find the steady state. More...
 
void cs_equation_solve (const cs_mesh_t *mesh, cs_equation_t *eq)
 Build and then solve the linear system for an equation with an unsteady term. More...
 
cs_real_tcs_equation_get_face_values (const cs_equation_t *eq)
 For a given equation, retrieve an array of values related to each face of the mesh for the unknowns. More...
 
cs_real_tcs_equation_get_cell_values (const cs_equation_t *eq)
 For a given equation, retrieve an array of values related to each cell of the mesh for the unknowns. More...
 
cs_real_tcs_equation_get_vertex_values (const cs_equation_t *eq)
 For a given equation, retrieve an array of values related to each vertex of the mesh for the unknowns. More...
 
void cs_equation_compute_boundary_diff_flux (cs_real_t t_eval, const cs_equation_t *eq, cs_real_t *diff_flux)
 Compute the diffusive flux across all boundary faces According to the space discretization scheme, the size of the resulting array differs. For Vb and VCb schemes, this array relies on the bf2v adjacency. More...
 
void cs_equation_compute_flux_across_plane (const cs_equation_t *eq, const char *ml_name, const cs_real_3_t direction, cs_real_t *diff_flux, cs_real_t *conv_flux)
 Compute the diffusive and convective flux across a plane defined by a mesh location structure attached to the name ml_name. More...
 
void cs_equation_compute_diff_flux_cellwise (const cs_equation_t *eq, cs_flag_t location, cs_real_t t_eval, cs_real_t *diff_flux)
 Cellwise computation of the diffusive flux across all cell faces. Primal or dual faces are considered according to the space scheme. More...
 
void cs_equation_compute_vtx_field_gradient (const cs_equation_t *eq, cs_real_t *v_gradient)
 Cellwise computation of the discrete gradient at vertices. More...
 
void cs_equation_compute_peclet (const cs_equation_t *eq, const cs_time_step_t *ts, cs_real_t peclet[])
 Compute and post-process Peclet number if requested. More...
 
void cs_equation_read_extra_restart (cs_restart_t *restart)
 Write into the restart file additionnal arrays (not defined as fields) but useful for the checkpoint/restart process. More...
 
void cs_equation_write_extra_restart (cs_restart_t *restart)
 Write into the restart file additionnal arrays (not defined as fields) but useful for the checkpoint/restart process. More...
 
void cs_equation_post_balance (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_time_step_t *ts)
 Predefined extra-operations related to all equations. More...
 
void cs_equation_extra_post (void)
 Predefined extra-operations related to equations according to the type of numerical scheme (for the space discretization) More...
 

Variables

static int _n_equations = 0
 
static int _n_predef_equations = 0
 
static int _n_user_equations = 0
 
static cs_equation_t ** _equations = NULL
 

Macro Definition Documentation

◆ CS_EQUATION_DBG

#define CS_EQUATION_DBG   0

Function Documentation

◆ cs_equation_add()

cs_equation_t* cs_equation_add ( const char *  eqname,
const char *  varname,
cs_equation_type_t  eqtype,
int  dim,
cs_param_bc_type_t  default_bc 
)

Add a new equation structure and set a first set of parameters.

Parameters
[in]eqnamename of the equation
[in]varnamename of the variable associated to this equation
[in]eqtypetype of equation (user, predefined...)
[in]dimdimension of the unknow attached to this equation
[in]default_bctype of boundary condition set by default
Returns
a pointer to the new allocated cs_equation_t structure

◆ cs_equation_add_user()

cs_equation_t* cs_equation_add_user ( const char *  eqname,
const char *  varname,
int  dim,
cs_param_bc_type_t  default_bc 
)

Add a new user equation structure and set a first set of parameters.

Parameters
[in]eqnamename of the equation
[in]varnamename of the variable associated to this equation
[in]dimdimension of the unknow attached to this equation
[in]default_bctype of boundary condition set by default
Returns
a pointer to the new allocated cs_equation_t structure

◆ cs_equation_build_system()

void cs_equation_build_system ( const cs_mesh_t mesh,
cs_equation_t eq 
)

Build the linear system for this equation.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in,out]eqpointer to a cs_equation_t structure

◆ cs_equation_by_id()

cs_equation_t* cs_equation_by_id ( int  eq_id)

Find the cs_equation_t structure with id eq_id Return NULL if not find.

Parameters
[in]eq_idid of the equation to find
Returns
a pointer to a cs_equation_t structure or NULL if not found

◆ cs_equation_by_name()

cs_equation_t* cs_equation_by_name ( const char *  eqname)

Find the cs_equation_t structure with name eqname Return NULL if not find.

Parameters
[in]eqnamename of the equation to find
Returns
a pointer to a cs_equation_t structure or NULL if not found

◆ cs_equation_compute_boundary_diff_flux()

void cs_equation_compute_boundary_diff_flux ( cs_real_t  t_eval,
const cs_equation_t eq,
cs_real_t diff_flux 
)

Compute the diffusive flux across all boundary faces According to the space discretization scheme, the size of the resulting array differs. For Vb and VCb schemes, this array relies on the bf2v adjacency.

Parameters
[in]t_evaltime at which one performs the property evaluation
[in]eqpointer to a cs_equation_t structure
[in,out]diff_fluxvalue of the diffusive part of the flux

◆ cs_equation_compute_diff_flux_cellwise()

void cs_equation_compute_diff_flux_cellwise ( const cs_equation_t eq,
cs_flag_t  location,
cs_real_t  t_eval,
cs_real_t diff_flux 
)

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

Parameters
[in]eqpointer to a cs_equation_t structure
[in]locationindicate where the flux has to be computed
[in]t_evaltime at which one performs the evaluation
[in,out]diff_fluxvalue of the diffusive flux

◆ cs_equation_compute_flux_across_plane()

void cs_equation_compute_flux_across_plane ( const cs_equation_t eq,
const char *  ml_name,
const cs_real_3_t  direction,
cs_real_t diff_flux,
cs_real_t conv_flux 
)

Compute the diffusive and convective flux across a plane defined by a mesh location structure attached to the name ml_name.

Parameters
[in]eqpointer to a cs_equation_t structure
[in]ml_namename of the related mesh location
[in]directionvector indicating in which direction flux is > 0
[in,out]diff_fluxvalue of the diffusive part of the flux
[in,out]conv_fluxvalue of the convective part of the flux

◆ cs_equation_compute_peclet()

void cs_equation_compute_peclet ( const cs_equation_t eq,
const cs_time_step_t ts,
cs_real_t  peclet[] 
)

Compute and post-process Peclet number if requested.

Parameters
[in]eqpointer to a cs_equation_t structure
[in]tspointer to a cs_time_step_t struct.
[in,out]pecletpointer to an array storing the resulting Peclet number in each cell

◆ cs_equation_compute_vtx_field_gradient()

void cs_equation_compute_vtx_field_gradient ( const cs_equation_t eq,
cs_real_t v_gradient 
)

Cellwise computation of the discrete gradient at vertices.

Parameters
[in]eqpointer to a cs_equation_t structure
[in,out]v_gradientgradient at vertices

◆ cs_equation_create_fields()

void cs_equation_create_fields ( void  )

Create a field structure related to all cs_equation_t structures.

◆ cs_equation_destroy_all()

void cs_equation_destroy_all ( void  )

Destroy all cs_equation_t structures.

◆ cs_equation_extra_post()

void cs_equation_extra_post ( void  )

Predefined extra-operations related to equations according to the type of numerical scheme (for the space discretization)

◆ cs_equation_get_boundary_flux()

cs_field_t* cs_equation_get_boundary_flux ( const cs_equation_t eq)

Return the field structure for the (normal) boundary flux associated to a cs_equation_t structure.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a cs_field_t structure or NULL

◆ cs_equation_get_builder()

cs_equation_builder_t* cs_equation_get_builder ( const cs_equation_t eq)

Return the cs_equation_builder_t structure associated to a cs_equation_t structure. Only for an advanced usage.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a cs_equation_builder_t structure or NULL if not found

◆ cs_equation_get_cell_values()

cs_real_t* cs_equation_get_cell_values ( const cs_equation_t eq)

For a given equation, retrieve an array of values related to each cell of the mesh for the unknowns.

Get the values at each cell centers for the field unknowns related to this equation.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a pointer to an array of cell values

◆ cs_equation_get_count()

void cs_equation_get_count ( int *  n_equations,
int *  n_predef_equations,
int *  n_user_equations 
)

Get the count of equations of each macro type.

Parameters
[out]n_equationstotal number of equations
[out]n_predef_equationsnumber of predefined equations
[out]n_user_equationsnumber of user equations

◆ cs_equation_get_diffusion_property()

cs_property_t* cs_equation_get_diffusion_property ( const cs_equation_t eq)

Return a pointer to the cs_property_t structure associated to the diffusion term for this equation (NULL if not activated).

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a pointer to a cs_property_t structure

◆ cs_equation_get_face_values()

cs_real_t* cs_equation_get_face_values ( const cs_equation_t eq)

For a given equation, retrieve an array of values related to each face of the mesh for the unknowns.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a pointer to an array of face values

◆ cs_equation_get_field()

cs_field_t* cs_equation_get_field ( const cs_equation_t eq)

Return the field structure associated to a cs_equation_t structure.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a cs_field_t structure or NULL if not found

◆ cs_equation_get_field_id()

int cs_equation_get_field_id ( const cs_equation_t eq)

Return the id related to the variable field structure associated to the cs_equation_t structure.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
an integer (-1 if the field is not defined)

◆ cs_equation_get_flag()

cs_flag_t cs_equation_get_flag ( const cs_equation_t eq)

Return the flag associated to an equation.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a flag (cs_flag_t type)

◆ cs_equation_get_id()

int cs_equation_get_id ( const cs_equation_t eq)

Return the id number related to the given cs_equation_t structure.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
an id (0 ... n-1) or -1 if not found

◆ cs_equation_get_n_equations()

int cs_equation_get_n_equations ( void  )

Retrieve the number of equations.

Returns
the current number of cs_equation_t structure allocated

◆ cs_equation_get_name()

const char* cs_equation_get_name ( const cs_equation_t eq)

Return the name related to the given cs_equation_t structure.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a name or NULL if not found

◆ cs_equation_get_param()

cs_equation_param_t* cs_equation_get_param ( const cs_equation_t eq)

Return the cs_equation_param_t structure associated to a cs_equation_t structure.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a cs_equation_param_t structure or NULL if not found

◆ cs_equation_get_reaction_property()

cs_property_t* cs_equation_get_reaction_property ( const cs_equation_t eq,
const int  reaction_id 
)

Return a pointer to the cs_property_t structure associated to the reaction term with id equal to reaction_id and related to this equation.

Parameters
[in]eqpointer to a cs_equation_t structure
[in]reaction_idid related to this reaction term
Returns
a pointer to a cs_property_t structure or NULL if not found

◆ cs_equation_get_scheme_context()

void* cs_equation_get_scheme_context ( const cs_equation_t eq)

Return a pointer to a structure useful to handle low-level operations for the given equation.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a pointer to a structure to cast on-the-fly or NULL if not found

◆ cs_equation_get_space_poly_degree()

int cs_equation_get_space_poly_degree ( const cs_equation_t eq)

Return the max. degree used in the polynomial basis for the space discretization.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
the polynomial order

◆ cs_equation_get_space_scheme()

cs_param_space_scheme_t cs_equation_get_space_scheme ( const cs_equation_t eq)

Return the type of numerical scheme used for the discretization in space.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a cs_param_space_scheme_t variable

◆ cs_equation_get_theta_time_val()

cs_real_t cs_equation_get_theta_time_val ( const cs_equation_t eq)

Return the value of the theta parameter in theta time scheme discretization.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
the value of the theta coefficient. -1 if the time scheme is not a theta time scheme

◆ cs_equation_get_time_property()

cs_property_t* cs_equation_get_time_property ( const cs_equation_t eq)

Return a pointer to the cs_property_t structure associated to the unsteady term for this equation (NULL if not activated).

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a pointer to a cs_property_t structure

◆ cs_equation_get_time_scheme()

cs_param_time_scheme_t cs_equation_get_time_scheme ( const cs_equation_t eq)

Return the type of numerical scheme used for the discretization in time.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a cs_param_time_scheme_t variable

◆ cs_equation_get_type()

cs_equation_type_t cs_equation_get_type ( const cs_equation_t eq)

Return the type of equation for the given equation structure.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
the type of the given equation

◆ cs_equation_get_var_dim()

int cs_equation_get_var_dim ( const cs_equation_t eq)

Return the dimension of the variable solved by this equation.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
an integer corresponding to the dimension of the variable

◆ cs_equation_get_vertex_values()

cs_real_t* cs_equation_get_vertex_values ( const cs_equation_t eq)

For a given equation, retrieve an array of values related to each vertex of the mesh for the unknowns.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
a pointer to an array of vertex values

◆ cs_equation_has_field_name()

bool cs_equation_has_field_name ( const cs_equation_t eq,
const char *  fld_name 
)

Check if the asociated field to a cs_equation_t structure has name equal to fld_name.

Parameters
[in]eqpointer to a cs_equation_t structure to test
[in]fld_namename of the field
Returns
true if the cs_equation_t structure has an associated field named fld_name, otherwise false

◆ cs_equation_initialize()

void cs_equation_initialize ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t ts 
)

Allocate and initialize the builder of the algebraic system. Set the initialize condition to all variable fields associated to each cs_equation_t structure.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]tspointer to a cs_time_step_t structure

◆ cs_equation_is_steady()

bool cs_equation_is_steady ( const cs_equation_t eq)

Return true is the given equation is steady otherwise false.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
true or false

◆ cs_equation_log_monitoring()

void cs_equation_log_monitoring ( void  )

Print a synthesis of the monitoring information in the performance file.

◆ cs_equation_log_setup()

void cs_equation_log_setup ( void  )

Summarize all cs_equation_t structures.

◆ cs_equation_needs_steady_state_solve()

bool cs_equation_needs_steady_state_solve ( void  )

Check if a steady-state computation is requested according to the setting.

Returns
true or false

◆ cs_equation_param_by_name()

cs_equation_param_t* cs_equation_param_by_name ( const char *  eqname)

Return the cs_equation_param_t structure associated to a cs_equation_t structure thanks to the equation name.

Parameters
[in]eqnamename of the equation
Returns
a cs_equation_param_t structure or NULL if not found

◆ cs_equation_post_balance()

void cs_equation_post_balance ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq,
const cs_time_step_t ts 
)

Predefined extra-operations related to all equations.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]tspointer to a cs_time_step_t struct.

◆ cs_equation_read_extra_restart()

void cs_equation_read_extra_restart ( cs_restart_t restart)

Write into the restart file additionnal arrays (not defined as fields) but useful for the checkpoint/restart process.

Parameters
[in,out]restartpointer to a cs_restart_t structure

◆ cs_equation_set_default_param()

void cs_equation_set_default_param ( cs_equation_key_t  key,
const char *  keyval 
)

Set a parameter attached to a keyname for the default settigns.

Parameters
[in]keykey related to the member of eq to set
[in]keyvalaccessor to the value to set

◆ cs_equation_set_flag()

void cs_equation_set_flag ( cs_equation_t eq,
cs_flag_t  flag 
)

Redefine the flag associated to an equation.

Parameters
[in,out]eqpointer to a cs_equation_t structure
[in]flagnew flag to set

◆ cs_equation_set_functions()

bool cs_equation_set_functions ( void  )

Assign a set of pointer functions for managing the cs_equation_t structure during the computation After this call, parameters related to an equation are set once for all.

Returns
true if all equations are steady-state otherwise false

◆ cs_equation_set_range_set()

void cs_equation_set_range_set ( const cs_cdo_connect_t connect)

Assign a cs_range_set_t structures for synchronization when computing in parallel mode.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure

◆ cs_equation_set_shared_structures()

void cs_equation_set_shared_structures ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
cs_flag_t  vb_scheme_flag,
cs_flag_t  vcb_scheme_flag,
cs_flag_t  fb_scheme_flag,
cs_flag_t  hho_scheme_flag 
)

Set shared structures among the activated class of discretization schemes.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to additional mesh quantities struct.
[in]time_steppointer to a time step structure
[in]vb_scheme_flagmetadata for Vb schemes
[in]vcb_scheme_flagmetadata for V+C schemes
[in]fb_scheme_flagmetadata for Fb schemes
[in]hho_scheme_flagmetadata for HHO schemes

◆ cs_equation_set_sles()

void cs_equation_set_sles ( void  )

Setup the linear algebra requirements.

◆ cs_equation_solve()

void cs_equation_solve ( const cs_mesh_t mesh,
cs_equation_t eq 
)

Build and then solve the linear system for an equation with an unsteady term.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in,out]eqpointer to a cs_equation_t structure

◆ cs_equation_solve_deprecated()

void cs_equation_solve_deprecated ( cs_equation_t eq)

Solve the linear system for this equation.

Parameters
[in,out]eqpointer to a cs_equation_t structure

◆ cs_equation_solve_steady_state()

void cs_equation_solve_steady_state ( const cs_mesh_t mesh,
cs_equation_t eq 
)

Build and then solve the linear system for this equation when the goal is to find the steady state.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in,out]eqpointer to a cs_equation_t structure

◆ cs_equation_unset_shared_structures()

void cs_equation_unset_shared_structures ( cs_flag_t  vb_scheme_flag,
cs_flag_t  vcb_scheme_flag,
cs_flag_t  fb_scheme_flag,
cs_flag_t  hho_scheme_flag 
)

Release shared structures among the activated class of discretization schemes.

Parameters
[in]vb_scheme_flagmetadata for Vb schemes
[in]vcb_scheme_flagmetadata for V+C schemes
[in]fb_scheme_flagmetadata for Fb schemes
[in]hho_scheme_flagmetadata for HHO schemes

◆ cs_equation_uses_new_mechanism()

bool cs_equation_uses_new_mechanism ( const cs_equation_t eq)

Return true is the given equation is steady otherwise false.

Parameters
[in]eqpointer to a cs_equation_t structure
Returns
true or false

◆ cs_equation_write_extra_restart()

void cs_equation_write_extra_restart ( cs_restart_t restart)

Write into the restart file additionnal arrays (not defined as fields) but useful for the checkpoint/restart process.

Parameters
[in,out]restartpointer to a cs_restart_t structure

Variable Documentation

◆ _equations

cs_equation_t** _equations = NULL
static

◆ _n_equations

int _n_equations = 0
static

◆ _n_predef_equations

int _n_predef_equations = 0
static

◆ _n_user_equations

int _n_user_equations = 0
static