![]() |
programmer's documentation
|
Build discrete Hodge operators. More...
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <limits.h>
#include <assert.h>
#include <bft_mem.h>
#include <bft_printf.h>
#include "cs_mesh.h"
#include "cs_mesh_quantities.h"
#include "cs_sort.h"
#include "cs_hodge.h"
Functions | |
static void | _compute_builder (const cs_real_33_t matval, const cs_qvect_t *pq, const cs_qvect_t *dq, cs_hodge_builder_t *hb) |
Compute quantities used for defining the entries of the discrete Hodge for COST algo. and edge/face quantities. More... | |
static void | _prepare_local_hodge_cost (int cid, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info, cs_toolbox_locmat_t *hloc, cs_hodge_builder_t *hb) |
Prepare the construction of the local hodge related to cell cid in the case of the COST algo. More... | |
static cs_sla_matrix_t * | _init_hodge_vertex (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) |
Allocate and initialize by default the matrix related to a discrete Hodge op. based on vertices Note: values are filled in a second step. More... | |
static cs_sla_matrix_t * | _init_hodge_edge (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) |
Allocate and initialize by default the matrix related to a discrete Hodge op. based on edges Note: values are filled in a second step. More... | |
static cs_sla_matrix_t * | _init_hodge_face (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant) |
Allocate and initialize by default the matrix related to a discrete Hodge op. based on faces Note: values are filled in a second step. More... | |
static void | _assemble_local_hodge (const cs_toolbox_locmat_t *hloc, cs_sla_matrix_t *h_mat) |
Assemble a local discrete Hodge operator. More... | |
cs_sla_matrix_t * | cs_hodge_init_matrix (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_type_t type) |
Allocate and initialize by default the matrix related to a discrete Hodge operator. More... | |
cs_hodge_builder_t * | cs_hodge_builder_init (int n_max_ent) |
Allocate and initialize a cs_hodge_builder_t structure. More... | |
cs_hodge_builder_t * | cs_hodge_builder_free (cs_hodge_builder_t *hb) |
Free a cs_hodge_builder_t structure. More... | |
void | cs_hodge_cost_build_local (int cid, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info, cs_toolbox_locmat_t *hl, cs_hodge_builder_t *hb) |
Build a local discrete Hodge operator using the generic COST algo. More... | |
cs_sla_matrix_t * | cs_hodge_cost_build (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info) |
Build a discrete Hodge operator using a generic reconstruction algorithm: Reconstruction with Consistent and Coercive part stabilized by Beta (COST) A call to cs_hodge_builder_init() should have been done before. More... | |
cs_sla_matrix_t * | cs_hodge_voronoi_build (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info) |
H is an operator from primal edges to dual faces. It mimics a Hodge operator from primal mesh to dual mesh. Use voronoi algorithm. More... | |
Build discrete Hodge operators.
|
static |
Assemble a local discrete Hodge operator.
[in] | hloc | pointer to a cs_toolbox_locmat_t struct. |
[in,out] | h_mat | pointer to a cs_sla_matrix_t |
|
static |
Compute quantities used for defining the entries of the discrete Hodge for COST algo. and edge/face quantities.
(end ignore by Doxygen)
[in] | matval | values of the tensor related to the material pty |
[in] | pq | pointer to the first set of quantities |
[in] | dq | pointer to the second set of quantities |
[in,out] | hb | pointer to a _hodge_builder_t struct. |
|
static |
Allocate and initialize by default the matrix related to a discrete Hodge op. based on edges Note: values are filled in a second step.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
|
static |
Allocate and initialize by default the matrix related to a discrete Hodge op. based on faces Note: values are filled in a second step.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
|
static |
Allocate and initialize by default the matrix related to a discrete Hodge op. based on vertices Note: values are filled in a second step.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
|
static |
Prepare the construction of the local hodge related to cell cid in the case of the COST algo.
[in] | cid | cell id |
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | quant | pointer to a cs_cdo_quantities_t struct. |
[in] | h_info | pointer to a cs_param_hodge_t struct. |
[in,out] | hloc | pointer to a cs_toolbox_locmat_t struct. to fill |
[in,out] | hb | pointer to a cs_hodge_builder_t struct. to fill |
cs_hodge_builder_t* cs_hodge_builder_free | ( | cs_hodge_builder_t * | hb | ) |
Free a cs_hodge_builder_t structure.
[in] | hb | pointer to the cs_hodge_builder_t struct. to free |
cs_hodge_builder_t* cs_hodge_builder_init | ( | int | n_max_ent | ) |
Allocate and initialize a cs_hodge_builder_t structure.
[in] | n_max_ent | max number of entities by primal cell |
cs_sla_matrix_t* cs_hodge_cost_build | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
const cs_param_hodge_t | h_info | ||
) |
Build a discrete Hodge operator using a generic reconstruction algorithm: Reconstruction with Consistent and Coercive part stabilized by Beta (COST) A call to cs_hodge_builder_init() should have been done before.
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | quant | pointer to a cs_cdo_quantities_t struct. |
[in] | h_info | pointer to a cs_param_hodge_t struct. |
void cs_hodge_cost_build_local | ( | int | cid, |
const cs_cdo_connect_t * | connect, | ||
const cs_cdo_quantities_t * | quant, | ||
const cs_param_hodge_t | h_info, | ||
cs_toolbox_locmat_t * | hl, | ||
cs_hodge_builder_t * | hb | ||
) |
Build a local discrete Hodge operator using the generic COST algo.
[in] | cid | cell id |
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | quant | pointer to a cs_cdo_quantities_t struct. |
[in] | h_info | pointer to a cs_param_hodge_t struct. |
[in,out] | hloc | pointer to a cs_toolbox_locmat_t struct. |
[in,out] | hb | pointer to a cs_hodge_builder_t struct. |
cs_sla_matrix_t* cs_hodge_init_matrix | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
const cs_param_hodge_type_t | type | ||
) |
Allocate and initialize by default the matrix related to a discrete Hodge operator.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | type | type of the discrete Hodge op. to initiliaze |
cs_sla_matrix_t* cs_hodge_voronoi_build | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
const cs_param_hodge_t | h_info | ||
) |
H is an operator from primal edges to dual faces. It mimics a Hodge operator from primal mesh to dual mesh. Use voronoi algorithm.
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | quant | pointer to a cs_cdo_quantities_t struct. |
[in] | h_info | pointer to a cs_param_hodge_t struct. |