programmer's documentation
Typedefs | Functions
cs_hodge.h File Reference
#include "cs_base.h"
#include "cs_cdo_toolbox.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
#include "cs_param.h"
#include "cs_sla.h"
Include dependency graph for cs_hodge.h:

Go to the source code of this file.

Typedefs

typedef struct _hodge_builder_t cs_hodge_builder_t
 

Functions

int cs_hodge_add (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_param_hodge_t param)
 Add or associate a discrete Hodge operator to a given setting. More...
 
cs_sla_matrix_tcs_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_tcs_hodge_builder_init (int n_max_ent)
 Allocate and initialize a cs_hodge_builder_t structure. More...
 
cs_hodge_builder_tcs_hodge_builder_free (cs_hodge_builder_t *hcq)
 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_tcs_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_tcs_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...
 

Typedef Documentation

typedef struct _hodge_builder_t cs_hodge_builder_t

Function Documentation

int cs_hodge_add ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
cs_param_hodge_t  param 
)

Add or associate a discrete Hodge operator to a given setting.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]paramset of parameters related a discrete Hodge operator
Returns
an id to the cs_hodge_t structure related to the given setting
cs_hodge_builder_t* cs_hodge_builder_free ( cs_hodge_builder_t hb)

Free a cs_hodge_builder_t structure.

Parameters
[in]hcqpointer to the cs_hodge_builder_t struct. to free
Returns
a NULL pointer
Parameters
[in]hbpointer to the cs_hodge_builder_t struct. to free
Returns
a NULL pointer
cs_hodge_builder_t* cs_hodge_builder_init ( int  n_max_ent)

Allocate and initialize a cs_hodge_builder_t structure.

Parameters
[in]n_max_entmax number of entities by primal cell
Returns
a new allocated cs_hodge_builder_t structure
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.

Parameters
[in]connectpointer to a cs_cdo_connect_t struct.
[in]quantpointer to a cs_cdo_quantities_t struct.
[in]h_infopointer to a cs_param_hodge_t struct.
Returns
a pointer to a cs_sla_matrix_t structure
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.

Parameters
[in]cidcell id
[in]connectpointer to a cs_cdo_connect_t struct.
[in]quantpointer to a cs_cdo_quantities_t struct.
[in]h_infopointer to a cs_param_hodge_t struct.
[in,out]hlocpointer to a cs_toolbox_locmat_t struct.
[in,out]hbpointer 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.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]typetype of the discrete Hodge op. to initiliaze
Returns
a pointer to a cs_sla_matrix_t structure
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.

Parameters
[in]connectpointer to a cs_cdo_connect_t struct.
[in]quantpointer to a cs_cdo_quantities_t struct.
[in]h_infopointer to a cs_param_hodge_t struct.
Returns
a pointer to a cs_sla_matrix_t structure