8.3
general documentation
cs_macfb_monolithic_sles.cpp File Reference

Functions dedicated to to the linear algebra settings and operations in case of CDO face-based schemes with a monolithic velocity-pressure coupling. More...

#include "cs_defs.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_array.h"
#include "cs_blas.h"
#include "cs_cdo_blas.h"
#include "cs_cdo_solve.h"
#include "cs_cdofb_monolithic_sles.h"
#include "cs_equation.h"
#include "cs_fp_exception.h"
#include "cs_matrix_default.h"
#include "cs_parall.h"
#include "cs_param_sles_setup.h"
#include "cs_saddle_solver_setup.h"
#include "cs_saddle_system.h"
#include "cs_timer.h"
#include "cs_macfb_monolithic_sles.h"
+ Include dependency graph for cs_macfb_monolithic_sles.cpp:

Functions

void cs_macfb_monolithic_sles_init_sharing (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
 Set pointers to shared structures. More...
 
void cs_macfb_monolithic_sles_init_system_helper (const cs_navsto_param_t *nsp, const cs_param_saddle_t *saddlep, cs_macfb_monolithic_t *sc)
 Define the system helper for a MAC-Fb scheme solving the Navier-Stokes equation using a monolithic approach for the velocity-pressure coupling. More...
 
void cs_macfb_monolithic_sles_init_solver (const cs_navsto_param_t *nsp, const cs_param_saddle_t *saddlep, cs_macfb_monolithic_t *sc)
 Define the saddle solver and its context for a MAC-Fb scheme solving the Navier-Stokes equation using a monolithic approach for the velocity-pressure coupling. More...
 
int cs_macfb_monolithic_sles_alu (const cs_navsto_param_t *nsp, cs_saddle_solver_t *solver, cs_real_t *u_f, cs_real_t *p_c)
 Solve a linear system arising from the discretization of the Navier-Stokes equation using a monolithic velocity-pressure coupling with a MAC face-based approach. Solve this system using the Augmented Lagrangian-Uzawa algorithm. More...
 
int cs_macfb_monolithic_sles_block_krylov (const cs_navsto_param_t *nsp, cs_saddle_solver_t *solver, cs_real_t *u_f, cs_real_t *p_c)
 Solve a linear system arising from the discretization of the Navier-Stokes equation with a MAC face-based approach. The system is split into a velocity block and the (unassembled) divergence operator Block preconditioning using a Schur approximation on a Krylov solver such as the GCR or MINRES is available. More...
 
int cs_macfb_monolithic_sles_gkb_inhouse (const cs_navsto_param_t *nsp, cs_saddle_solver_t *solver, cs_real_t *u_f, cs_real_t *p_c)
 Solve a linear system arising from the discretization of the Navier-Stokes equation using a monolithic velocity-pressure coupling with a MAC face-based approach. Solve this system using the Golub-Kahan Bidiagonalization algorithm. In-house implementation. The PETSc implementation is also available but appears less efficient in our tests. More...
 
int cs_macfb_monolithic_sles_uzawa_cg (const cs_navsto_param_t *nsp, cs_saddle_solver_t *solver, cs_real_t *u_f, cs_real_t *p_c)
 Solve a linear system arising from the discretization of the Navier-Stokes equation using a monolithic velocity-pressure coupling with a MAC face-based approach. Solve this system using the Uzawa-CG algorithm. More...
 

Detailed Description

Functions dedicated to to the linear algebra settings and operations in case of CDO face-based schemes with a monolithic velocity-pressure coupling.

Function Documentation

◆ cs_macfb_monolithic_sles_alu()

int cs_macfb_monolithic_sles_alu ( const cs_navsto_param_t nsp,
cs_saddle_solver_t solver,
cs_real_t u_f,
cs_real_t p_c 
)

Solve a linear system arising from the discretization of the Navier-Stokes equation using a monolithic velocity-pressure coupling with a MAC face-based approach. Solve this system using the Augmented Lagrangian-Uzawa algorithm.

Parameters
[in]nspset of parameters related to the Navier-Stokes eqs.
[in,out]solverpointer to a cs_saddle_solver_t structure
[in,out]u_fvalues of the velocity at faces (1 components)
[in,out]p_cvalues of the pressure in cells
Returns
the (cumulated) number of iterations of the solver

◆ cs_macfb_monolithic_sles_block_krylov()

int cs_macfb_monolithic_sles_block_krylov ( const cs_navsto_param_t nsp,
cs_saddle_solver_t solver,
cs_real_t u_f,
cs_real_t p_c 
)

Solve a linear system arising from the discretization of the Navier-Stokes equation with a MAC face-based approach. The system is split into a velocity block and the (unassembled) divergence operator Block preconditioning using a Schur approximation on a Krylov solver such as the GCR or MINRES is available.

Parameters
[in]nspset of parameters related to the Navier-Stokes eqs.
[in,out]solverpointer to a saddle-point solver
[in,out]u_fvalues of the velocity at faces
[in,out]p_cvalues of the pressure in cells
Returns
the (cumulated) number of iterations of the solver

◆ cs_macfb_monolithic_sles_gkb_inhouse()

int cs_macfb_monolithic_sles_gkb_inhouse ( const cs_navsto_param_t nsp,
cs_saddle_solver_t solver,
cs_real_t u_f,
cs_real_t p_c 
)

Solve a linear system arising from the discretization of the Navier-Stokes equation using a monolithic velocity-pressure coupling with a MAC face-based approach. Solve this system using the Golub-Kahan Bidiagonalization algorithm. In-house implementation. The PETSc implementation is also available but appears less efficient in our tests.

Parameters
[in]nspset of parameters related to the Navier-Stokes eqs.
[in,out]solverpointer to a cs_saddle_solver_t structure
[in,out]u_fvalues of the velocity at faces (1 components)
[in,out]p_cvalues of the pressure in cells
Returns
the (cumulated) number of iterations of the solver

◆ cs_macfb_monolithic_sles_init_sharing()

void cs_macfb_monolithic_sles_init_sharing ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant 
)

Set pointers to shared structures.

Parameters
[in]meshpointer to the mesh structure
[in]connectpointer to additional CDO connectivities
[in]quantpointer to additional CDO mesh quantities

◆ cs_macfb_monolithic_sles_init_solver()

void cs_macfb_monolithic_sles_init_solver ( const cs_navsto_param_t nsp,
const cs_param_saddle_t saddlep,
cs_macfb_monolithic_t sc 
)

Define the saddle solver and its context for a MAC-Fb scheme solving the Navier-Stokes equation using a monolithic approach for the velocity-pressure coupling.

Parameters
[in]nspset of parameters for the Navier-Stokes system
[in]saddlepparameters for solving a saddle-point problem
[in,out]scpointer to a context structure cast on-the-fly

◆ cs_macfb_monolithic_sles_init_system_helper()

void cs_macfb_monolithic_sles_init_system_helper ( const cs_navsto_param_t nsp,
const cs_param_saddle_t saddlep,
cs_macfb_monolithic_t sc 
)

Define the system helper for a MAC-Fb scheme solving the Navier-Stokes equation using a monolithic approach for the velocity-pressure coupling.

Parameters
[in]nspNavier-Stokes paremeters
[in]saddlepparameters for solving a saddle-point problem
[in,out]scpointer to a context structure cast on-the-fly

◆ cs_macfb_monolithic_sles_uzawa_cg()

int cs_macfb_monolithic_sles_uzawa_cg ( const cs_navsto_param_t nsp,
cs_saddle_solver_t solver,
cs_real_t u_f,
cs_real_t p_c 
)

Solve a linear system arising from the discretization of the Navier-Stokes equation using a monolithic velocity-pressure coupling with a MAC face-based approach. Solve this system using the Uzawa-CG algorithm.

Parameters
[in]nspset of parameters related to the Navier-Stokes eqs.
[in,out]solverpointer to a cs_saddle_solver_t structure
[in,out]u_fvalues of the velocity at faces (1 components)
[in,out]p_cvalues of the pressure in cells
Returns
the (cumulated) number of iterations of the solver