248 if (fabs(h1_info.
coef - h2_info.
coef) > 0)
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
unsigned short int cs_flag_t
Definition: cs_defs.h:321
@ fm
Definition: cs_field_pointer.h:128
bool() cs_hodge_compute_t(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a discrete Hodge operator or a related operator (such as the stiffmess matrix) for a given cell...
Definition: cs_hodge.h:218
void cs_hodge_set_property_value(const cs_lnum_t c_id, const cs_real_t t_eval, const cs_flag_t c_flag, cs_hodge_t *hodge)
Set the property value (scalar- or tensor-valued) related to a discrete Hodge operator inside a cell ...
Definition: cs_hodge.c:1562
bool cs_hodge_vcb_wbs_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the WBS algo. This function is specific for verte...
Definition: cs_hodge.c:2970
cs_hodge_algo_t cs_hodge_set_mass_algo(const char *eqname, cs_hodge_algo_t reac_algo, cs_hodge_algo_t time_algo)
Check the consistency of the settings between terms related to a mass matrix and define the common al...
Definition: cs_hodge.c:1460
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...
Definition: cs_hodge.c:4474
void cs_hodge_copy_parameters(const cs_hodge_param_t *h_ref, cs_hodge_param_t *h_cpy)
Copy the set of parameters associated to a discrete Hodge operator to another one.
Definition: cs_hodge.c:1536
static bool cs_hodge_param_is_similar(const cs_hodge_param_t h1_info, const cs_hodge_param_t h2_info)
Check if two sets of parameters related to how build a discrete Hodge operator are similar.
Definition: cs_hodge.h:239
cs_hodge_t ** cs_hodge_init_context(const cs_cdo_connect_t *connect, const cs_property_t *property, const cs_hodge_param_t *hp, bool need_tensor, bool need_eigen)
Create and initialize an array of pointers to a cs_hodge_t structures. This array is of size the numb...
Definition: cs_hodge.c:1224
cs_hodge_compute_t * cs_hodge_get_func(const char *calling_func, const cs_hodge_param_t hp)
Retrieve a function pointer to compute a discrete Hodge operator.
Definition: cs_hodge.c:1322
void cs_hodge_set_property_value_cw(const cs_cell_mesh_t *cm, const cs_real_t t_eval, const cs_flag_t c_flag, cs_hodge_t *hodge)
Set the property value (scalar- or tensor-valued) related to a discrete Hodge operator inside a cell ...
Definition: cs_hodge.c:1644
bool cs_hodge_vb_bubble_get_aniso_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic Bubble algo. The computed matrix is stored in cb->lo...
Definition: cs_hodge.c:2122
bool cs_hodge_epfd_voro_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal edges to dual...
Definition: cs_hodge.c:3300
bool cs_hodge_fped_voro_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal faces to dual...
Definition: cs_hodge.c:3558
bool cs_hodge_edfp_cost_get_opt(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from dual edges to prima...
Definition: cs_hodge.c:3976
bool cs_hodge_fped_cost_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from primal faces to dua...
Definition: cs_hodge.c:3634
bool cs_hodge_edfp_bubble_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the Bubble algo. Hodge op. from dual edges to pri...
Definition: cs_hodge.c:4062
bool cs_hodge_vb_cost_get_iso_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc ...
Definition: cs_hodge.c:1935
bool cs_hodge_fped_bubble_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the Bubble algo. Hodge op. from primal faces to d...
Definition: cs_hodge.c:3725
bool cs_hodge_edfp_cost_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from dual edges to prima...
Definition: cs_hodge.c:3887
bool cs_hodge_vpcd_wbs_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using WBS algo. Hodge op. from primal vertices to dual ...
Definition: cs_hodge.c:3109
bool cs_hodge_fb_bubble_get_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic COST algo. with the usage of bubble stabilization....
Definition: cs_hodge.c:1796
bool cs_hodge_vcb_get_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic WBS algo. WBS means Whitney Barycentric Subdivision ...
Definition: cs_hodge.c:2652
bool cs_hodge_vcb_voro_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the Voronoi algo. This leads to a diagonal operat...
Definition: cs_hodge.c:2890
void cs_hodge_free_context(cs_hodge_t ***p_hodges)
Free a set of cs_hodge_t structures.
Definition: cs_hodge.c:1289
void cs_hodge_matvec(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_hodge_param_t hodgep, const cs_property_t *pty, const cs_real_t in_vals[], cs_real_t t_eval, cs_real_t result[])
Compute cellwise a discrete hodge operator and multiple it with a vector.
Definition: cs_hodge.c:4148
cs_hodge_algo_t
Type of algorithm to build a discrete Hodge operator.
Definition: cs_hodge.h:133
@ CS_HODGE_ALGO_WBS
Definition: cs_hodge.h:136
@ CS_HODGE_ALGO_AUTO
Definition: cs_hodge.h:139
@ CS_HODGE_ALGO_BUBBLE
Definition: cs_hodge.h:138
@ CS_HODGE_ALGO_VORONOI
Definition: cs_hodge.h:135
@ CS_HODGE_N_ALGOS
Definition: cs_hodge.h:141
@ CS_HODGE_ALGO_COST
Definition: cs_hodge.h:137
bool cs_hodge_vb_cost_get_aniso_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc ...
Definition: cs_hodge.c:1998
bool cs_hodge_fb_cost_get_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc ...
Definition: cs_hodge.c:1725
bool cs_hodge_fb_voro_get_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the Voronoi algorithm The computed matrix is stored in cb->loc a...
Definition: cs_hodge.c:1866
bool cs_hodge_epfd_bubble_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the COST algo. with a bubble stabilization....
Definition: cs_hodge.c:3474
void cs_hodge_circulation_from_flux(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t t_eval, const cs_hodge_param_t hodgep, const cs_property_t *pty, const cs_real_t flux[], cs_real_t circul[])
Compute cellwise a discrete hodge operator in order to define a circulation array from a flux array.
Definition: cs_hodge.c:4369
bool cs_hodge_vb_cost_get_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc ...
Definition: cs_hodge.c:2184
cs_hodge_t * cs_hodge_create(const cs_cdo_connect_t *connect, const cs_property_t *property, const cs_hodge_param_t *hp, bool need_tensor, bool need_eigen)
Create and initialize a pointer to a cs_hodge_t structure.
Definition: cs_hodge.c:1159
bool cs_hodge_epfd_cost_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from primal edges to dua...
Definition: cs_hodge.c:3382
bool cs_hodge_vb_wbs_get_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic WBS algo. WBS means for Whitney Barycentric Subdivis...
Definition: cs_hodge.c:2515
cs_hodge_type_t
Type of discrete Hodge operators.
Definition: cs_hodge.h:84
@ CS_HODGE_N_TYPES
Definition: cs_hodge.h:95
@ CS_HODGE_TYPE_VPCD
Definition: cs_hodge.h:86
@ CS_HODGE_TYPE_EDFP
Definition: cs_hodge.h:89
@ CS_HODGE_TYPE_VDCP
Definition: cs_hodge.h:91
@ CS_HODGE_TYPE_VC
Definition: cs_hodge.h:93
@ CS_HODGE_TYPE_FPED
Definition: cs_hodge.h:88
@ CS_HODGE_TYPE_CPVD
Definition: cs_hodge.h:90
@ CS_HODGE_TYPE_EPFD
Definition: cs_hodge.h:87
@ CS_HODGE_TYPE_FB
Definition: cs_hodge.h:92
bool cs_hodge_fb_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator on a given cell which is equivalent of a mass matrix....
Definition: cs_hodge.c:2804
bool cs_hodge_vpcd_voro_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal vertices to d...
Definition: cs_hodge.c:3238
void cs_hodge_free(cs_hodge_t **p_hodge)
Free a cs_hodge_t structure.
Definition: cs_hodge.c:1263
bool cs_hodge_edfp_voro_get(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from dual edges to primal...
Definition: cs_hodge.c:3811
bool cs_hodge_vb_voro_get_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the Voronoi algorithm The computed matrix is stored in cb->loc a...
Definition: cs_hodge.c:2409
void cs_hodge_param_log(const char *prefix, const cs_property_t *property, const cs_hodge_param_t hp)
Output the settings related to a cs_hodge_param_t structure.
Definition: cs_hodge.c:1500
bool cs_hodge_vb_bubble_get_iso_stiffness(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic Bubble algo. The computed matrix is stored in cb->lo...
Definition: cs_hodge.c:2060
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
Set of local and temporary buffers.
Definition: cs_cdo_local.h:60
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
Set of local quantities and connectivities related to a mesh face Structure used to get a better memo...
Definition: cs_cdo_local.h:279
Structure storing all metadata/parameters related to the usage of a discrete Hodge operator.
Definition: cs_hodge.h:151
double coef
Scaling coefficient value.
Definition: cs_hodge.h:165
cs_hodge_type_t type
Definition: cs_hodge.h:162
bool inv_pty
Inversion of the property evaluation or not.
Definition: cs_hodge.h:153
cs_hodge_algo_t algo
Definition: cs_hodge.h:163
Structure associated to a discrete Hodge operator *.
Definition: cs_hodge.h:183
cs_sdm_t * matrix
Definition: cs_hodge.h:195
const cs_hodge_param_t * param
Definition: cs_hodge.h:185
cs_property_data_t * pty_data
Data evaluation.
Definition: cs_hodge.h:187
Structure storing the evaluation of a property and its related data.
Definition: cs_property.h:211
Structure associated to the definition of a property relying on the cs_xdef_t structure.