My Project
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 "cs_log.h"
#include "cs_math.h"
#include "cs_scheme_geometry.h"
#include "cs_hodge.h"
Functions | |
void | cs_hodge_fb_cost_get_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc Case of CDO face-based schemes. More... | |
void | cs_hodge_fb_voro_get_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the Voronoi algorithm The computed matrix is stored in cb->loc Case of CDO face-based schemes. More... | |
void | cs_hodge_vb_cost_get_iso_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the generic COST algo. Case of CDO vertex-based schemes and isotropic property. More... | |
void | cs_hodge_vb_cost_get_aniso_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the generic COST algo. Case of CDO vertex-based schemes. More... | |
void | cs_hodge_vb_cost_get_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the generic COST algo. Case of CDO vertex-based schemes. More... | |
void | cs_hodge_vb_voro_get_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the Voronoi algorithm The computed matrix is stored in cb->loc Case of CDO vertex-based schemes. More... | |
void | cs_hodge_vb_wbs_get_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the generic WBS algo. WBS standing for Whitney Barycentric Subdivision (WBS) algo. More... | |
void | cs_hodge_vcb_get_stiffness (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local stiffness matrix using the generic WBS algo. WBS standing for Whitney Barycentric Subdivision (WBS) algo. The computed matrix is stored in cb->loc. More... | |
void | cs_hodge_fb_get_mass (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator on a given cell which is equivalent of a mass matrix. It relies on a CO+ST algo. and is specific to CDO-Fb schemes. More... | |
void | cs_hodge_vcb_wbs_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using the WBS algo. This function is specific for vertex+cell-based schemes. More... | |
void | cs_hodge_vpcd_wbs_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using WBS algo. Hodge op. from primal vertices to dual cells. This function is specific for vertex-based schemes. More... | |
void | cs_hodge_vpcd_voro_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal vertices to dual cells. This function is specific for vertex-based schemes. More... | |
void | cs_hodge_epfd_voro_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal edges to dual faces. This function is specific for vertex-based schemes. More... | |
void | cs_hodge_epfd_cost_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from primal edges to dual faces. This function is specific for vertex-based schemes. More... | |
void | cs_hodge_fped_voro_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal faces to dual edges. This function is related to cell-based schemes. More... | |
void | cs_hodge_fped_cost_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from primal faces to dual edges. This function is related to cell-based schemes. More... | |
void | cs_hodge_edfp_voro_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from dual edges to primal faces. This function is related to face-based schemes. More... | |
void | cs_hodge_edfp_cost_get (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from dual edges to primal faces. This function is related to face-based schemes. More... | |
void | cs_hodge_edfp_cost_get_opt (const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from dual edges to primal faces. This function is related to face-based schemes. More... | |
void | cs_hodge_matvec (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info, const cs_property_t *pty, const double in_vals[], cs_real_t t_eval, double result[]) |
Compute cellwise a discrete hodge operator and multiple it with a vector. More... | |
void | cs_hodge_compute_wbs_surfacic (const cs_face_mesh_t *fm, cs_sdm_t *hf) |
Compute the hodge operator related to a face (i.e. a mass matrix with unity property) using a Whitney Barycentric Subdivision (WBS) algorithm. More... | |
Variables | |
static const double | cs_hodge_vc_coef = 3./20 |
Build discrete Hodge operators.
void cs_hodge_compute_wbs_surfacic | ( | const cs_face_mesh_t * | fm, |
cs_sdm_t * | hf | ||
) |
Compute the hodge operator related to a face (i.e. a mass matrix with unity property) using a Whitney Barycentric Subdivision (WBS) algorithm.
[in] | fm | pointer to a cs_face_mesh_t structure |
[in,out] | hf | pointer to a cs_sdm_t structure to define |
void cs_hodge_edfp_cost_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from dual edges to primal faces. This function is related to face-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_edfp_cost_get_opt | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from dual edges to primal faces. This function is related to face-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_edfp_voro_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from dual edges to primal faces. This function is related to face-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_epfd_cost_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from primal edges to dual faces. This function is specific for vertex-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_epfd_voro_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal edges to dual faces. This function is specific for vertex-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_fb_cost_get_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc Case of CDO face-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_fb_get_mass | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator on a given cell which is equivalent of a mass matrix. It relies on a CO+ST algo. and is specific to CDO-Fb schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_fb_voro_get_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the Voronoi algorithm The computed matrix is stored in cb->loc Case of CDO face-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_fped_cost_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from primal faces to dual edges. This function is related to cell-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_fped_voro_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal faces to dual edges. This function is related to cell-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_matvec | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
const cs_param_hodge_t | h_info, | ||
const cs_property_t * | pty, | ||
const double | in_vals[], | ||
cs_real_t | t_eval, | ||
double | result[] | ||
) |
Compute cellwise a discrete hodge operator and multiple it with a vector.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | h_info | cs_param_hodge_t structure |
[in] | pty | pointer to a cs_property_t structure or NULL |
[in] | in_vals | vector to multiply with the discrete Hodge op. |
[in] | t_eval | time at which one performs the evaluation |
[in,out] | result | array storing the resulting matrix-vector product |
void cs_hodge_vb_cost_get_aniso_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the generic COST algo. Case of CDO vertex-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vb_cost_get_iso_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the generic COST algo. Case of CDO vertex-based schemes and isotropic property.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vb_cost_get_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the generic COST algo. Case of CDO vertex-based schemes.
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc Case of CDO vertex-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vb_voro_get_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the Voronoi algorithm The computed matrix is stored in cb->loc Case of CDO vertex-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vb_wbs_get_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the generic WBS algo. WBS standing for Whitney Barycentric Subdivision (WBS) algo.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vcb_get_stiffness | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local stiffness matrix using the generic WBS algo. WBS standing for Whitney Barycentric Subdivision (WBS) algo. The computed matrix is stored in cb->loc.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vcb_wbs_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using the WBS algo. This function is specific for vertex+cell-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vpcd_voro_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal vertices to dual cells. This function is specific for vertex-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_hodge_vpcd_wbs_get | ( | const cs_param_hodge_t | h_info, |
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb | ||
) |
Build a local Hodge operator for a given cell using WBS algo. Hodge op. from primal vertices to dual cells. This function is specific for vertex-based schemes.
[in] | h_info | pointer to a cs_param_hodge_t structure |
[in] | cm | pointer to a cs_cell_mesh_t struct. |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
|
static |