Helper functions dedicated to groundwater flows when using CDO schemes. More...
#include "cs_defs.h"#include <assert.h>#include <stdlib.h>#include <string.h>#include <bft_mem.h>#include "cs_advection_field.h"#include "cs_array.h"#include "cs_evaluate.h"#include "cs_parall.h"#include "cs_physical_constants.h"#include "cs_reco.h"#include "cs_gwf_priv.h"Macros | |
| #define | _dp3 cs_math_3_dot_product |
| #define | CS_GWF_PRIV_DBG 0 |
Functions | |
| void | cs_gwf_get_value_pointers (const cs_equation_t *eq, cs_real_t **p_dof_vals, cs_real_t **p_cell_vals) |
| Retrieve the values of (potential) fields needed for the update of the Darcy velocity/fluxes. | |
| cs_gwf_darcy_flux_t * | cs_gwf_darcy_flux_create (cs_flag_t loc_flag) |
| Allocate and initialize a cs_gwf_darcy_flux_t structure. | |
| void | cs_gwf_darcy_flux_free (cs_gwf_darcy_flux_t **p_darcy) |
| Free a cs_gwf_darcy_flux_t structure. | |
| void | cs_gwf_darcy_flux_log (cs_gwf_darcy_flux_t *darcy) |
| Log a cs_gwf_darcy_flux_t structure. | |
| void | cs_gwf_darcy_flux_define (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_param_space_scheme_t space_scheme, void *update_context, cs_gwf_darcy_update_t *update_func, cs_gwf_darcy_flux_t *darcy) |
| Set the definition of the advection field attached to a cs_gwf_darcy_flux_t structure If the function pointer is set to nullptr, then an automatic settings is done. | |
| void | cs_gwf_darcy_flux_balance (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp, cs_gwf_darcy_flux_t *darcy) |
| Operate the balance by zone (relying on the splitting arising from the boundary settings) for the advection field attached to a cs_gwf_darcy_flux_t structure. | |
| void | cs_gwf_darcy_flux_update_on_boundary (const cs_equation_t *eq, const cs_equation_param_t *eqp, const cs_property_t *diff_pty, const cs_real_t *dof_vals, const cs_real_t *cell_vals, cs_real_t t_eval, cs_adv_field_t *adv) |
| Compute the associated Darcy flux over the boundary of the domain for each vertex of a boundary face. | |
| void | cs_gwf_darcy_flux_update_on_boundary_wo_eq (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_real_t *cell_vel, cs_adv_field_t *adv) |
| Compute the associated Darcy flux over the boundary of the domain for each vertex of a boundary face without using an equation (i.e. there is no associated boundary condition). Case of a vertex-based discretization. | |
| void | cs_gwf_update_head (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_equation_t *richards, cs_flag_t option_flag, cs_field_t *pressure_head, cs_real_t head_in_law[], bool cur2prev) |
| Update head values (pressure head or head values for laws) Up to now, this is only used for single-phase flows in porous media (saturated or not case). | |
Helper functions dedicated to groundwater flows when using CDO schemes.
| #define _dp3 cs_math_3_dot_product |
| #define CS_GWF_PRIV_DBG 0 |
| void cs_gwf_darcy_flux_balance | ( | const cs_cdo_connect_t * | connect, |
| const cs_cdo_quantities_t * | quant, | ||
| const cs_equation_param_t * | eqp, | ||
| cs_gwf_darcy_flux_t * | darcy ) |
Operate the balance by zone (relying on the splitting arising from the boundary settings) for the advection field attached to a cs_gwf_darcy_flux_t structure.
| [in] | connect | pointer to a cs_cdo_connect_t structure |
| [in] | quant | pointer to a cs_cdo_quantities_t structure |
| [in] | eqp | pointer to the set of equation parameters |
| [in,out] | darcy | pointer to the darcy structure |
| cs_gwf_darcy_flux_t * cs_gwf_darcy_flux_create | ( | cs_flag_t | loc_flag | ) |
Allocate and initialize a cs_gwf_darcy_flux_t structure.
| [in] | loc_flag | flag to define where the flux is defined |
| void cs_gwf_darcy_flux_define | ( | const cs_cdo_connect_t * | connect, |
| const cs_cdo_quantities_t * | cdoq, | ||
| cs_param_space_scheme_t | space_scheme, | ||
| void * | update_context, | ||
| cs_gwf_darcy_update_t * | update_func, | ||
| cs_gwf_darcy_flux_t * | darcy ) |
Set the definition of the advection field attached to a cs_gwf_darcy_flux_t structure If the function pointer is set to nullptr, then an automatic settings is done.
Set the definition of the advection field attached to a cs_gwf_darcy_flux_t structure If the function pointer is set to null, then an automatic settings is done.
| [in] | connect | pointer to a cs_cdo_connect_t structure |
| [in] | cdoq | pointer to a cs_cdo_quantities_t structure |
| [in] | space_scheme | space discretization using this structure |
| [in] | update_context | pointer to the context for the update step |
| [in] | update_func | pointer to an update function or nullptr |
| [in,out] | darcy | pointer to the darcy structure |
| void cs_gwf_darcy_flux_free | ( | cs_gwf_darcy_flux_t ** | p_darcy | ) |
Free a cs_gwf_darcy_flux_t structure.
| [in,out] | p_darcy | pointer of pointer to the darcy structure |
| void cs_gwf_darcy_flux_log | ( | cs_gwf_darcy_flux_t * | darcy | ) |
Log a cs_gwf_darcy_flux_t structure.
| [in,out] | darcy | pointer to the darcy structure |
| void cs_gwf_darcy_flux_update_on_boundary | ( | const cs_equation_t * | eq, |
| const cs_equation_param_t * | eqp, | ||
| const cs_property_t * | diff_pty, | ||
| const cs_real_t * | dof_vals, | ||
| const cs_real_t * | cell_vals, | ||
| cs_real_t | t_eval, | ||
| cs_adv_field_t * | adv ) |
Compute the associated Darcy flux over the boundary of the domain for each vertex of a boundary face.
Case of a vertex-based discretization and single-phase flows in porous media (saturated or not).
| [in] | eq | pointer to the equation related to this Darcy flux |
| [in] | eqp | set of equation parameters to use or nullptr |
| [in] | diff_pty | diffusion property or nullptr |
| [in] | dof_vals | values at the location of the degrees of freedom |
| [in] | cell_vals | values at the cell centers or nullptr |
| [in] | t_eval | time at which one performs the evaluation |
| [in,out] | adv | pointer to the Darcy advection field |
| void cs_gwf_darcy_flux_update_on_boundary_wo_eq | ( | const cs_cdo_connect_t * | connect, |
| const cs_cdo_quantities_t * | cdoq, | ||
| cs_real_t * | cell_vel, | ||
| cs_adv_field_t * | adv ) |
Compute the associated Darcy flux over the boundary of the domain for each vertex of a boundary face without using an equation (i.e. there is no associated boundary condition). Case of a vertex-based discretization.
| [in] | connect | pointer to a cs_cdo_connect_t structure |
| [in] | cdoq | pointer to a cs_cdo_quantities_t structure |
| [in] | cell_vel | Darcy velocity in each cell |
| [in,out] | adv | pointer to the Darcy advection field to update |
| void cs_gwf_get_value_pointers | ( | const cs_equation_t * | eq, |
| cs_real_t ** | p_dof_vals, | ||
| cs_real_t ** | p_cell_vals ) |
Retrieve the values of (potential) fields needed for the update of the Darcy velocity/fluxes.
| [in] | eq | pointer to an equation structure |
| [out] | p_dof_vals | double pointer to the values (degrees of freedom) |
| [out] | p_cell_vals | double pointer to the values (cell values) |
| void cs_gwf_update_head | ( | const cs_cdo_connect_t * | connect, |
| const cs_cdo_quantities_t * | cdoq, | ||
| const cs_equation_t * | richards, | ||
| cs_flag_t | option_flag, | ||
| cs_field_t * | pressure_head, | ||
| cs_real_t | head_in_law[], | ||
| bool | cur2prev ) |
Update head values (pressure head or head values for laws) Up to now, this is only used for single-phase flows in porous media (saturated or not case).
| [in] | connect | pointer to a cs_cdo_connect_t structure |
| [in] | cdoq | pointer to a cs_cdo_quantities_t structure |
| [in] | richards | pointer to the Richards equation |
| [in] | option_flag | calculation option related to the GWF module |
| [in,out] | pressure_head | pressure head field |
| [in,out] | head_in_law | values of the head used in law |
| [in] | cur2prev | true or false |