My Project
programmer's documentation
Data Structures | Functions
cs_navsto_coupling.h File Reference

Routines to handle structures used as a context when solving the Navier-Stokes equations. Structures are cast on-the-fly according to the type of coupling. Routines to handle the settings of coupling algorithms. More...

#include "cs_equation.h"
#include "cs_field.h"
#include "cs_navsto_param.h"
#include "cs_param.h"
Include dependency graph for cs_navsto_coupling.h:

Go to the source code of this file.

Data Structures

struct  cs_navsto_ac_t
 Set of parameters specific for solving the Navier-Stokes system with the "artificial compressibility" algorithm. More...
 
struct  cs_navsto_ac_vpp_t
 Set of parameters specific for solving the Navier-Stokes system with the "artificial compressibility" solved by the VPP_eps algorithm. More...
 
struct  cs_navsto_monolithic_t
 Set of parameters specific for solving the Navier-Stokes system with a fully coupled monolithic algorithm. More...
 
struct  cs_navsto_projection_t
 Set of parameters specific for solving the Navier-Stokes system with an incremental projection algorithm. More...
 
struct  cs_navsto_uzawa_t
 Set of parameters specific for solving the Navier-Stokes system with a fully coupled algorithm using a Uzawa algorithm and an Augmented Lagrangian approach inside each sub-iteration. More...
 

Functions

void * cs_navsto_uzawa_create_context (cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
 Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Uzawa-Augmented Lagrangian approach. More...
 
void * cs_navsto_uzawa_free_context (const cs_navsto_param_t *nsp, void *context)
 Free the context structure related to an Uzawa-Augmented Lagrangian approach. More...
 
void cs_navsto_uzawa_init_setup (const cs_navsto_param_t *nsp, void *context)
 Start setting-up the Navier-Stokes equations when a Uzawa Augmented Lagrangian algorithm is used to coupled the system No mesh information is available at this stage. More...
 
void cs_navsto_uzawa_last_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
 Finalize the setup for the Navier-Stokes equations when an Uzawa Augmented Lagrangian algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage. More...
 
cs_equation_tcs_navsto_uzawa_get_momentum_eq (void *context)
 Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of Uzawa coupling. More...
 
void * cs_navsto_ac_create_context (cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
 Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artificial Compressibility approach. More...
 
void * cs_navsto_ac_free_context (const cs_navsto_param_t *nsp, void *context)
 Free the context structure related to an Artificial Compressibility approach. More...
 
void cs_navsto_ac_init_setup (const cs_navsto_param_t *nsp, void *context)
 Start setting-up the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. No mesh information is available at this stage. More...
 
void cs_navsto_ac_last_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
 Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage. More...
 
cs_equation_tcs_navsto_ac_get_momentum_eq (void *context)
 Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of artificial compressibility coupling. More...
 
void * cs_navsto_ac_vpp_create_context (cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
 Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artificial Compressibility - VPP approach. More...
 
void * cs_navsto_ac_vpp_free_context (const cs_navsto_param_t *nsp, void *context)
 Free the context structure related to an Artificial Compressibility with the VPP approach. More...
 
void cs_navsto_ac_vpp_init_setup (const cs_navsto_param_t *nsp, void *context)
 Start setting-up the Navier-Stokes equations when an Artificial Compressibility with VPP algorithm is used to coupled the system. No mesh information is available at this stage. More...
 
void cs_navsto_ac_vpp_last_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
 Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage. More...
 
cs_equation_tcs_navsto_ac_vpp_get_momentum_eq (void *context)
 Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of artificial compressibility coupling with the VPP extension. More...
 
void * cs_navsto_monolithic_create_context (cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
 Allocate and initialize a context structure when the Navier-Stokes system is coupled using a monolithic approach. More...
 
void * cs_navsto_monolithic_free_context (const cs_navsto_param_t *nsp, void *context)
 Free the context structure related to a monolithic approach. More...
 
void cs_navsto_monolithic_init_setup (const cs_navsto_param_t *nsp, void *context)
 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. More...
 
void cs_navsto_monolithic_last_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
 Finalize the setup for the Navier-Stokes equations when a monolithic algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage. More...
 
cs_equation_tcs_navsto_monolithic_get_momentum_eq (void *context)
 Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a monolithic coupling. More...
 
void * cs_navsto_projection_create_context (cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
 Allocate and initialize a context structure when the Navier-Stokes system is coupled using an incremental Projection approach in the the rotational form (see Minev & Guermond, 2006, JCP) More...
 
void * cs_navsto_projection_free_context (const cs_navsto_param_t *nsp, void *context)
 Free the context structure related to a Projection approach. More...
 
void cs_navsto_projection_init_setup (const cs_navsto_param_t *nsp, int loc_id, bool has_previous, void *context)
 Start setting-up the Navier-Stokes equations when a projection algorithm is used to coupled the system. No mesh information is available at this stage. More...
 
void cs_navsto_projection_last_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
 Finalize the setup for the Navier-Stokes equations when a projection algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage. More...
 
cs_equation_tcs_navsto_projection_get_momentum_eq (void *context)
 Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a projection coupling. More...
 

Detailed Description

Routines to handle structures used as a context when solving the Navier-Stokes equations. Structures are cast on-the-fly according to the type of coupling. Routines to handle the settings of coupling algorithms.

Function Documentation

◆ cs_navsto_ac_create_context()

void* cs_navsto_ac_create_context ( cs_navsto_param_t nsp,
cs_param_bc_type_t  bc 
)

Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artificial Compressibility approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]bcdefault cs_param_bc_type_t for the equation
Returns
a pointer to the context structure

◆ cs_navsto_ac_free_context()

void* cs_navsto_ac_free_context ( const cs_navsto_param_t nsp,
void *  context 
)

Free the context structure related to an Artificial Compressibility approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly
Returns
a NULL pointer

◆ cs_navsto_ac_get_momentum_eq()

cs_equation_t* cs_navsto_ac_get_momentum_eq ( void *  context)

Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of artificial compressibility coupling.

Parameters
[in]contextpointer to a context structure cast on-the-fly
Returns
a pointer to a cs_equation_t structure

◆ cs_navsto_ac_init_setup()

void cs_navsto_ac_init_setup ( const cs_navsto_param_t nsp,
void *  context 
)

Start setting-up the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. No mesh information is available at this stage.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_ac_last_setup()

void cs_navsto_ac_last_setup ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_navsto_param_t nsp,
void *  context 
)

Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_ac_vpp_create_context()

void* cs_navsto_ac_vpp_create_context ( cs_navsto_param_t nsp,
cs_param_bc_type_t  bc 
)

Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artificial Compressibility - VPP approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]bcdefault cs_param_bc_type_t for the equation
Returns
a pointer to the context structure

◆ cs_navsto_ac_vpp_free_context()

void* cs_navsto_ac_vpp_free_context ( const cs_navsto_param_t nsp,
void *  context 
)

Free the context structure related to an Artificial Compressibility with the VPP approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly
Returns
a NULL pointer

◆ cs_navsto_ac_vpp_get_momentum_eq()

cs_equation_t* cs_navsto_ac_vpp_get_momentum_eq ( void *  context)

Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of artificial compressibility coupling with the VPP extension.

Parameters
[in]contextpointer to a context structure cast on-the-fly
Returns
a pointer to a cs_equation_t structure

◆ cs_navsto_ac_vpp_init_setup()

void cs_navsto_ac_vpp_init_setup ( const cs_navsto_param_t nsp,
void *  context 
)

Start setting-up the Navier-Stokes equations when an Artificial Compressibility with VPP algorithm is used to coupled the system. No mesh information is available at this stage.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_ac_vpp_last_setup()

void cs_navsto_ac_vpp_last_setup ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_navsto_param_t nsp,
void *  context 
)

Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_monolithic_create_context()

void* cs_navsto_monolithic_create_context ( cs_navsto_param_t nsp,
cs_param_bc_type_t  bc 
)

Allocate and initialize a context structure when the Navier-Stokes system is coupled using a monolithic approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]bcdefault cs_param_bc_type_t for the equation
Returns
a pointer to the context structure

◆ cs_navsto_monolithic_free_context()

void* cs_navsto_monolithic_free_context ( const cs_navsto_param_t nsp,
void *  context 
)

Free the context structure related to a monolithic approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly
Returns
a NULL pointer

◆ cs_navsto_monolithic_get_momentum_eq()

cs_equation_t* cs_navsto_monolithic_get_momentum_eq ( void *  context)

Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a monolithic coupling.

Parameters
[in]contextpointer to a context structure cast on-the-fly
Returns
a pointer to a cs_equation_t structure

◆ cs_navsto_monolithic_init_setup()

void cs_navsto_monolithic_init_setup ( const cs_navsto_param_t nsp,
void *  context 
)

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.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_monolithic_last_setup()

void cs_navsto_monolithic_last_setup ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_navsto_param_t nsp,
void *  context 
)

Finalize the setup for the Navier-Stokes equations when a monolithic algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_projection_create_context()

void* cs_navsto_projection_create_context ( cs_navsto_param_t nsp,
cs_param_bc_type_t  bc 
)

Allocate and initialize a context structure when the Navier-Stokes system is coupled using an incremental Projection approach in the the rotational form (see Minev & Guermond, 2006, JCP)

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]bcdefault cs_param_bc_type_t for the equation
Returns
a pointer to the context structure

◆ cs_navsto_projection_free_context()

void* cs_navsto_projection_free_context ( const cs_navsto_param_t nsp,
void *  context 
)

Free the context structure related to a Projection approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly
Returns
a NULL pointer

◆ cs_navsto_projection_get_momentum_eq()

cs_equation_t* cs_navsto_projection_get_momentum_eq ( void *  context)

Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a projection coupling.

Parameters
[in]contextpointer to a context structure cast on-the-fly
Returns
a pointer to a cs_equation_t structure

◆ cs_navsto_projection_init_setup()

void cs_navsto_projection_init_setup ( const cs_navsto_param_t nsp,
int  loc_id,
bool  has_previous,
void *  context 
)

Start setting-up the Navier-Stokes equations when a projection algorithm is used to coupled the system. No mesh information is available at this stage.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]loc_idid related to a mesh location
[in]has_previousvalues at different time steps (true/false)
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_projection_last_setup()

void cs_navsto_projection_last_setup ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_navsto_param_t nsp,
void *  context 
)

Finalize the setup for the Navier-Stokes equations when a projection algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_uzawa_create_context()

void* cs_navsto_uzawa_create_context ( cs_navsto_param_t nsp,
cs_param_bc_type_t  bc 
)

Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Uzawa-Augmented Lagrangian approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]bcdefault cs_param_bc_type_t for the equation
Returns
a pointer to the context structure

◆ cs_navsto_uzawa_free_context()

void* cs_navsto_uzawa_free_context ( const cs_navsto_param_t nsp,
void *  context 
)

Free the context structure related to an Uzawa-Augmented Lagrangian approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly
Returns
a NULL pointer

◆ cs_navsto_uzawa_get_momentum_eq()

cs_equation_t* cs_navsto_uzawa_get_momentum_eq ( void *  context)

Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of Uzawa coupling.

Parameters
[in]contextpointer to a context structure cast on-the-fly
Returns
a pointer to a cs_equation_t structure

◆ cs_navsto_uzawa_init_setup()

void cs_navsto_uzawa_init_setup ( const cs_navsto_param_t nsp,
void *  context 
)

Start setting-up the Navier-Stokes equations when a Uzawa Augmented Lagrangian algorithm is used to coupled the system No mesh information is available at this stage.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly

◆ cs_navsto_uzawa_last_setup()

void cs_navsto_uzawa_last_setup ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_navsto_param_t nsp,
void *  context 
)

Finalize the setup for the Navier-Stokes equations when an Uzawa Augmented Lagrangian algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]nsppointer to a cs_navsto_param_t structure
[in,out]contextpointer to a context structure cast on-the-fly