|
programmer's documentation
|
Build an algebraic CDO face-based system for the Navier-Stokes equations and solved it with a monolithic approach. More...
#include "cs_defs.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <float.h>#include <assert.h>#include <string.h>#include <bft_mem.h>#include "cs_blas.h"#include "cs_cdo_bc.h"#include "cs_cdofb_priv.h"#include "cs_cdofb_scaleq.h"#include "cs_cdofb_vecteq.h"#include "cs_cdofb_navsto.h"#include "cs_dbg.h"#include "cs_equation_bc.h"#include "cs_equation_common.h"#include "cs_equation_priv.h"#include "cs_evaluate.h"#include "cs_fp_exception.h"#include "cs_log.h"#include "cs_math.h"#include "cs_navsto_coupling.h"#include "cs_param.h"#include "cs_post.h"#include "cs_sles.h"#include "cs_source_term.h"#include "cs_static_condensation.h"#include "cs_timer.h"#include "cs_cdofb_monolithic.h"
Functions | |
| static void | _build_shared_structures (void) |
| Define the cs_range_set_t, cs_interface_set_t, cs_matrix_assembler_t and cs_matrix_structure_t structures. More... | |
| static void | _apply_bc_partly (const cs_cdofb_monolithic_t *sc, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_boundary_type_t *bf_type, cs_cell_sys_t *csys, cs_cell_builder_t *cb) |
| Apply the boundary conditions to the local system when this should be done before the static condensation. More... | |
| static void | _apply_remaining_bc (const cs_cdofb_monolithic_t *sc, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_sys_t *csys, cs_cell_builder_t *cb, cs_cdofb_navsto_builder_t *nsb, cs_real_t *mass_rhs) |
| Apply the boundary conditions to the local system when this should be done after the static condensation. More... | |
| static void | _assemble (const cs_cell_sys_t *csys, const cs_cell_mesh_t *cm, const cs_real_t *div_op, const bool has_sourceterm, cs_matrix_assembler_values_t *mav, cs_real_t rhs[], cs_real_t eqc_st[]) |
| Perform the assembly stage for a vector-valued system obtained with CDO-Fb schemes Shares similarities with cs_equation_assemble_block_matrix() More... | |
| static void | _solve_system (cs_sles_t *sles, const cs_matrix_t *matrix, const cs_equation_param_t *eqp, cs_real_t *vel_f, cs_real_t *pre_c, cs_real_t *b_f, cs_real_t *b_c) |
| Solve a linear system arising from a scalar-valued CDO-Fb scheme. More... | |
| static void | _compute_and_update_fields (const cs_matrix_t *matrix, cs_cdofb_monolithic_t *sc, cs_equation_t *mom_eq, cs_real_t *mom_rhs, cs_real_t *mass_rhs) |
| Solve the linear system and update the velocity fields and the pressure field. More... | |
| void | cs_cdofb_monolithic_init_common (const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step) |
| Set shared pointers from the main domain members. More... | |
| void * | cs_cdofb_monolithic_init_scheme_context (const cs_navsto_param_t *nsp, cs_boundary_type_t *bf_type, void *nsc_input) |
| Initialize a cs_cdofb_monolithic_t structure. More... | |
| void * | cs_cdofb_monolithic_free_scheme_context (void *scheme_context) |
| Destroy a cs_cdofb_monolithic_t structure. More... | |
| void | cs_cdofb_monolithic_set_sles (const cs_navsto_param_t *nsp, void *context) |
| Start setting-up the Navier-Stokes equations when a monolithic algorithm is used to couple the system. No mesh information is available at this stage. More... | |
| void | cs_cdofb_monolithic_compute_steady (const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, void *scheme_context) |
| Solve the steady Navier-Stokes system with a CDO face-based scheme using a monolithic approach. More... | |
| void | cs_cdofb_monolithic_compute_implicit (const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, void *scheme_context) |
| Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a monolithic approach and an Euler time scheme. More... | |
| void | cs_cdofb_monolithic_compute_theta (const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, void *scheme_context) |
| Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a monolithic approach and a theta time scheme. More... | |
Build an algebraic CDO face-based system for the Navier-Stokes equations and solved it with a monolithic approach.
|
static |
Apply the boundary conditions to the local system when this should be done before the static condensation.
| [in] | sc | pointer to a cs_cdofb_monolithic_t structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in] | cm | pointer to a cellwise view of the mesh |
| [in] | bf_type | type of boundary for the boundary face |
| [in,out] | csys | pointer to a cellwise view of the system |
| [in,out] | cb | pointer to a cellwise builder |
|
static |
Apply the boundary conditions to the local system when this should be done after the static condensation.
| [in] | sc | pointer to a cs_cdofb_monolithic_t structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in] | cm | pointer to a cellwise view of the mesh |
| [in,out] | csys | pointer to a cellwise view of the system |
| [in,out] | cb | pointer to a cellwise builder |
| [in,out] | nsb | builder structure for the NavSto system |
| [in,out] | mass_rhs | pointer to the rhs for the mass eq. in this cell |
|
static |
Perform the assembly stage for a vector-valued system obtained with CDO-Fb schemes Shares similarities with cs_equation_assemble_block_matrix()
| [in] | csys | pointer to a cs_cell_sys_t structure |
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | div_op | array with the divergence op. values |
| [in] | has_sourceterm | has the equation a source term? |
| [in,out] | mav | pointer to cs_matrix_assembler_values_t |
| [in,out] | rhs | right-end side of the system |
| [in,out] | eqc_st | source term from the context view |
|
static |
Define the cs_range_set_t, cs_interface_set_t, cs_matrix_assembler_t and cs_matrix_structure_t structures.
|
static |
Solve the linear system and update the velocity fields and the pressure field.
| [in] | sc | scheme context |
| [in] | mom_eq | equation structure related to the momentum |
| [in] | matrix | pointer to a cs_matrix_t structure |
| [in,out] | mom_rhs | right-hand side for the momentum equation |
| [in,out] | mass_rhs | right_hand side for the mass equation |
|
static |
Solve a linear system arising from a scalar-valued CDO-Fb scheme.
| [in,out] | sles | pointer to a cs_sles_t structure |
| [in] | matrix | pointer to a cs_matrix_t structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in,out] | vel_f | initial velocity on faces |
| [in,out] | pre_c | initial pressure in cells |
| [in,out] | b_f | right-hand side (scatter/gather if needed) on faces |
| [in,out] | b_c | right_hand side on cells (mass equation) |
| void cs_cdofb_monolithic_compute_implicit | ( | const cs_mesh_t * | mesh, |
| const cs_navsto_param_t * | nsp, | ||
| void * | scheme_context | ||
| ) |
Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a monolithic approach and an Euler time scheme.
| [in] | mesh | pointer to a cs_mesh_t structure |
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in] | scheme_context | pointer to a structure cast on-the-fly |
| void cs_cdofb_monolithic_compute_steady | ( | const cs_mesh_t * | mesh, |
| const cs_navsto_param_t * | nsp, | ||
| void * | scheme_context | ||
| ) |
Solve the steady Navier-Stokes system with a CDO face-based scheme using a monolithic approach.
| [in] | mesh | pointer to a cs_mesh_t structure |
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in,out] | scheme_context | pointer to a structure cast on-the-fly |
| void cs_cdofb_monolithic_compute_theta | ( | const cs_mesh_t * | mesh, |
| const cs_navsto_param_t * | nsp, | ||
| void * | scheme_context | ||
| ) |
Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a monolithic approach and a theta time scheme.
| [in] | mesh | pointer to a cs_mesh_t structure |
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in] | scheme_context | pointer to a structure cast on-the-fly |
| void* cs_cdofb_monolithic_free_scheme_context | ( | void * | scheme_context | ) |
Destroy a cs_cdofb_monolithic_t structure.
| [in] | scheme_context | pointer to a scheme context structure to free |
| void cs_cdofb_monolithic_init_common | ( | const cs_mesh_t * | mesh, |
| const cs_cdo_quantities_t * | quant, | ||
| const cs_cdo_connect_t * | connect, | ||
| const cs_time_step_t * | time_step | ||
| ) |
Set shared pointers from the main domain members.
| [in] | mesh | pointer to a cs_mesh_t structure |
| [in] | quant | additional mesh quantities struct. |
| [in] | connect | pointer to a cs_cdo_connect_t struct. |
| [in] | time_step | pointer to a cs_time_step_t structure |
| void* cs_cdofb_monolithic_init_scheme_context | ( | const cs_navsto_param_t * | nsp, |
| cs_boundary_type_t * | bf_type, | ||
| void * | nsc_input | ||
| ) |
Initialize a cs_cdofb_monolithic_t structure.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in] | bf_type | type of boundary for each boundary face |
| [in] | nsc_input | pointer to a cs_navsto_ac_t structure |
| void cs_cdofb_monolithic_set_sles | ( | const cs_navsto_param_t * | nsp, |
| void * | context | ||
| ) |
Start setting-up the Navier-Stokes equations when a monolithic algorithm is used to couple the system. No mesh information is available at this stage.
Start setting-up the Navier-Stokes equations when a monolithic algorithm is used to coupled the system. No mesh information is available at this stage.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in,out] | context | pointer to a context structure cast on-the-fly |
1.8.13