#include "cs_defs.h"
#include <assert.h>
#include <bft_error.h>
#include <bft_mem.h>
#include "cs_hodge.h"
#include "cs_post.h"
#include "cs_maxwell.h"
Macros | |
#define | CS_MAXWELL_DBG 0 |
Functions | |
bool | cs_maxwell_is_activated (void) |
Test if the computation of Maxwell equations is activated. More... | |
cs_maxwell_t * | cs_maxwell_activate (cs_flag_t model, cs_flag_t options) |
Activate the future computation of the Maxwell equations. More... | |
cs_maxwell_t * | cs_maxwell_destroy_all (void) |
Free the main structure related to the Maxwell module. More... | |
void | cs_maxwell_init_setup (void) |
Setup equations/properties related to the Maxwell module. More... | |
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. More... | |
void | cs_maxwell_log_setup (void) |
Log a summary of the Maxwell module. More... | |
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. More... | |
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. More... | |
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. More... | |
void | cs_maxwell_extra_op (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) |
Predefined extra-operations for the Maxwell module. More... | |
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) More... | |
#define CS_MAXWELL_DBG 0 |
Activate the future computation of the Maxwell equations.
[in] | model | type of modelling |
[in] | options | flag to handle optional parameters |
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.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | time_step | pointer to a cs_time_step_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
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.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | time_step | pointer to a cs_time_step_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
cs_maxwell_t* cs_maxwell_destroy_all | ( | void | ) |
Free the main structure related to the Maxwell module.
void cs_maxwell_extra_op | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant | ||
) |
Predefined extra-operations for the Maxwell module.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
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)
[in,out] | input | pointer to an optional structure (here a cs_gwf_t structure) |
[in] | mesh_id | id of the output mesh for the current call |
[in] | cat_id | category id of the output mesh for this call |
[in] | ent_flag | indicate 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_cells | local number of cells of post_mesh |
[in] | n_i_faces | local number of interior faces of post_mesh |
[in] | n_b_faces | local number of boundary faces of post_mesh |
[in] | cell_ids | list of cells (0 to n-1) |
[in] | i_face_ids | list of interior faces (0 to n-1) |
[in] | b_face_ids | list of boundary faces (0 to n-1) |
[in] | time_step | pointer to a cs_time_step_t struct. |
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.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
void cs_maxwell_init_setup | ( | void | ) |
Setup equations/properties related to the Maxwell module.
bool cs_maxwell_is_activated | ( | void | ) |
Test if the computation of Maxwell equations is activated.
void cs_maxwell_log_setup | ( | void | ) |
Log a summary of 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.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | ts | pointer to a cs_time_step_t structure |
[in] | cur2prev | true or false |