9.0
general documentation
Loading...
Searching...
No Matches
cs_maxwell.cpp File Reference
#include "base/cs_defs.h"
#include <assert.h>
#include "bft/bft_error.h"
#include "bft/bft_mem.h"
#include "cdo/cs_hodge.h"
#include "base/cs_post.h"
#include "cdo/cs_maxwell.h"
Include dependency graph for cs_maxwell.cpp:

Macros

#define CS_MAXWELL_DBG   0

Functions

bool cs_maxwell_is_activated (void)
 Test if the computation of Maxwell equations is activated.
cs_maxwell_t * cs_maxwell_activate (cs_flag_t model, cs_flag_t options)
 Activate the future computation of the Maxwell equations.
cs_maxwell_t * cs_maxwell_destroy_all (void)
 Free the main structure related to the Maxwell module.
void cs_maxwell_init_setup (void)
 Setup equations/properties related to the Maxwell module.
void cs_maxwell_finalize_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
 Finalize the setup stage for equations related to the Maxwell module.
void cs_maxwell_log_setup (void)
 Log a summary of the Maxwell module.
void cs_maxwell_compute_steady_state (const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
 Solve if needed the steady-state equations related to the Maxwell module.
void cs_maxwell_compute (const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
 Solve equations related to the Maxwell module.
void cs_maxwell_update (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, bool cur2prev)
 Update/initialize the Maxwell module according to the settings.
void cs_maxwell_extra_op (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
 Predefined extra-operations for the Maxwell module.
void cs_maxwell_extra_post (void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step)
 Predefined post-processing output for the Maxwell module. Prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)

Macro Definition Documentation

◆ CS_MAXWELL_DBG

#define CS_MAXWELL_DBG   0

Function Documentation

◆ cs_maxwell_activate()

cs_maxwell_t * cs_maxwell_activate ( cs_flag_t model,
cs_flag_t options )

Activate the future computation of the Maxwell equations.

Parameters
[in]modeltype of modelling
[in]optionsflag to handle optional parameters
Returns
a pointer to a new allocated Maxwell structure

◆ cs_maxwell_compute()

void cs_maxwell_compute ( const cs_mesh_t * mesh,
const cs_time_step_t * time_step,
const cs_cdo_connect_t * connect,
const cs_cdo_quantities_t * quant )

Solve equations related to the Maxwell module.

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

◆ cs_maxwell_compute_steady_state()

void cs_maxwell_compute_steady_state ( const cs_mesh_t * mesh,
const cs_time_step_t * time_step,
const cs_cdo_connect_t * connect,
const cs_cdo_quantities_t * quant )

Solve if needed the steady-state equations related to the Maxwell module.

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

◆ cs_maxwell_destroy_all()

cs_maxwell_t * cs_maxwell_destroy_all ( void )

Free the main structure related to the Maxwell module.

Returns
a null pointer

◆ cs_maxwell_extra_op()

void cs_maxwell_extra_op ( const cs_cdo_connect_t * connect,
const cs_cdo_quantities_t * quant )

Predefined extra-operations for the Maxwell module.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure

◆ cs_maxwell_extra_post()

void cs_maxwell_extra_post ( void * input,
int mesh_id,
int cat_id,
int ent_flag[5],
cs_lnum_t n_cells,
cs_lnum_t n_i_faces,
cs_lnum_t n_b_faces,
const cs_lnum_t cell_ids[],
const cs_lnum_t i_face_ids[],
const cs_lnum_t b_face_ids[],
const cs_time_step_t * time_step )

Predefined post-processing output for the Maxwell module. Prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)

Parameters
[in,out]inputpointer to an optional structure (here a cs_gwf_t structure)
[in]mesh_idid of the output mesh for the current call
[in]cat_idcategory id of the output mesh for this call
[in]ent_flagindicate global presence of cells (ent_flag[0]), interior faces (ent_flag[1]), boundary faces (ent_flag[2]), particles (ent_flag[3]) or probes (ent_flag[4])
[in]n_cellslocal number of cells of post_mesh
[in]n_i_faceslocal number of interior faces of post_mesh
[in]n_b_faceslocal number of boundary faces of post_mesh
[in]cell_idslist of cells (0 to n-1)
[in]i_face_idslist of interior faces (0 to n-1)
[in]b_face_idslist of boundary faces (0 to n-1)
[in]time_steppointer to a cs_time_step_t struct.

◆ cs_maxwell_finalize_setup()

void cs_maxwell_finalize_setup ( const cs_cdo_connect_t * connect,
const cs_cdo_quantities_t * quant )

Finalize the setup stage for equations related to the Maxwell module.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure

◆ cs_maxwell_init_setup()

void cs_maxwell_init_setup ( void )

Setup equations/properties related to the Maxwell module.

◆ cs_maxwell_is_activated()

bool cs_maxwell_is_activated ( void )

Test if the computation of Maxwell equations is activated.

◆ cs_maxwell_log_setup()

void cs_maxwell_log_setup ( void )

Log a summary of the Maxwell module.

◆ cs_maxwell_update()

void cs_maxwell_update ( const cs_mesh_t * mesh,
const cs_cdo_connect_t * connect,
const cs_cdo_quantities_t * quant,
const cs_time_step_t * ts,
bool cur2prev )

Update/initialize the Maxwell module according to the settings.

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
[in]cur2prevtrue or false