8.3
general documentation
cs_cdo_connect.cpp File Reference

Build additional connectivities (or adjacencies) useful for building CDO or HHO schemes. More...

#include "cs_defs.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "fvm_io_num.h"
#include "cs_array.h"
#include "cs_flag.h"
#include "cs_log.h"
#include "cs_mesh_adjacencies.h"
#include "cs_order.h"
#include "cs_parall.h"
#include "cs_param_cdo.h"
#include "cs_param_types.h"
#include "cs_sort.h"
#include "cs_volume_zone.h"
#include "cs_cdo_connect.h"
+ Include dependency graph for cs_cdo_connect.cpp:

Functions

cs_cdo_connect_tcs_cdo_connect_build (cs_mesh_t *mesh, cs_flag_t eb_scheme_flag, cs_flag_t fb_scheme_flag, cs_flag_t cb_scheme_flag, cs_flag_t vb_scheme_flag, cs_flag_t vcb_scheme_flag, cs_flag_t hho_scheme_flag, cs_flag_t mac_scheme_flag)
 Allocate and define a new cs_cdo_connect_t structure Range sets and interface sets are allocated and defined according to the value of the different scheme flags. cs_range_set_t structure related to vertices is shared the cs_mesh_t structure (the global one) More...
 
cs_cdo_connect_tcs_cdo_connect_free (const cs_mesh_t *mesh, cs_cdo_connect_t *connect)
 Destroy a cs_cdo_connect_t structure. More...
 
void cs_cdo_connect_log_summary (const cs_cdo_connect_t *connect, cs_flag_t eb_scheme_flag, cs_flag_t vb_scheme_flag, cs_flag_t vcb_scheme_flag)
 Summary of the connectivity information. More...
 
void cs_cdo_connect_allocate_cw_buffer (const cs_cdo_connect_t *connect)
 Allocate and initialize the cell-wise buffer(s) More...
 
void cs_cdo_connect_free_cw_buffer (void)
 Free the cell-wise buffer(s) More...
 
double * cs_cdo_connect_get_cw_buffer (int thr_id)
 Retrieve the cell-wise buffer associated to the current thread. Use cs_get_thread_id when the thread id is not directly available. More...
 
long long cs_cdo_connect_get_time_perfo (void)
 Retrieve the time elapsed to build the cs_cdo_connect_t structure. More...
 
void cs_cdo_connect_assign_vtx_ifs_rs (const cs_mesh_t *mesh, int n_vtx_dofs, bool interlaced, cs_interface_set_t **p_ifs, cs_range_set_t **p_rs)
 Allocate and define a cs_range_set_t structure and a cs_interface_set_t structure for schemes with DoFs at vertices. More...
 
void cs_cdo_connect_discrete_curl (const cs_cdo_connect_t *connect, const cs_real_t *edge_values, cs_real_t **p_curl_values)
 Compute the discrete curl operator across each primal faces. From an edge-based array (seen as circulations) compute a face-based array (seen as fluxes) More...
 
void cs_cdo_connect_dump (const cs_cdo_connect_t *connect)
 Dump a cs_cdo_connect_t structure for debugging purpose. More...
 

Detailed Description

Build additional connectivities (or adjacencies) useful for building CDO or HHO schemes.

Function Documentation

◆ cs_cdo_connect_allocate_cw_buffer()

void cs_cdo_connect_allocate_cw_buffer ( const cs_cdo_connect_t connect)

Allocate and initialize the cell-wise buffer(s)

Parameters
[in]connectpointer to additional connectivities

◆ cs_cdo_connect_assign_vtx_ifs_rs()

void cs_cdo_connect_assign_vtx_ifs_rs ( const cs_mesh_t mesh,
int  n_vtx_dofs,
bool  interlaced,
cs_interface_set_t **  p_ifs,
cs_range_set_t **  p_rs 
)

Allocate and define a cs_range_set_t structure and a cs_interface_set_t structure for schemes with DoFs at vertices.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]n_vtx_dofsnumber of DoFs per vertex
[in]interlacedfalse means a block viewpoint
[in,out]p_ifspointer of pointer to a cs_interface_set_t
[in,out]p_rspointer of pointer to a cs_range_set_t

◆ cs_cdo_connect_build()

cs_cdo_connect_t * cs_cdo_connect_build ( cs_mesh_t mesh,
cs_flag_t  eb_scheme_flag,
cs_flag_t  fb_scheme_flag,
cs_flag_t  cb_scheme_flag,
cs_flag_t  vb_scheme_flag,
cs_flag_t  vcb_scheme_flag,
cs_flag_t  hho_scheme_flag,
cs_flag_t  mac_scheme_flag 
)

Allocate and define a new cs_cdo_connect_t structure Range sets and interface sets are allocated and defined according to the value of the different scheme flags. cs_range_set_t structure related to vertices is shared the cs_mesh_t structure (the global one)

DOXYGEN_SHOULD_SKIP_THIS

Parameters
[in,out]meshpointer to a cs_mesh_t structure
[in]eb_scheme_flagmetadata for Edge-based schemes
[in]fb_scheme_flagmetadata for Face-based schemes
[in]cb_scheme_flagmetadata for Cell-based schemes
[in]vb_scheme_flagmetadata for Vertex-based schemes
[in]vcb_scheme_flagmetadata for Vertex+Cell-based schemes
[in]hho_scheme_flagmetadata for HHO schemes
Returns
a pointer to a cs_cdo_connect_t structure

◆ cs_cdo_connect_discrete_curl()

void cs_cdo_connect_discrete_curl ( const cs_cdo_connect_t connect,
const cs_real_t edge_values,
cs_real_t **  p_curl_values 
)

Compute the discrete curl operator across each primal faces. From an edge-based array (seen as circulations) compute a face-based array (seen as fluxes)

Parameters
[in]connectpointer to a cs_cdo_connect_t struct.
[in]edge_valuesarray of values at edges
[in,out]p_curl_valuesarray storing the curl across faces. This array is allocated if necessary.

◆ cs_cdo_connect_dump()

void cs_cdo_connect_dump ( const cs_cdo_connect_t connect)

Dump a cs_cdo_connect_t structure for debugging purpose.

Parameters
[in]connectpointer to cs_cdo_connect_t structure

◆ cs_cdo_connect_free()

cs_cdo_connect_t * cs_cdo_connect_free ( const cs_mesh_t mesh,
cs_cdo_connect_t connect 
)

Destroy a cs_cdo_connect_t structure.

Parameters
[in]meshpointer to a mesh structure
[in,out]connectpointer to additional CDO connectivities
Returns
a null pointer

◆ cs_cdo_connect_free_cw_buffer()

void cs_cdo_connect_free_cw_buffer ( void  )

Free the cell-wise buffer(s)

◆ cs_cdo_connect_get_cw_buffer()

double * cs_cdo_connect_get_cw_buffer ( int  thr_id)

Retrieve the cell-wise buffer associated to the current thread. Use cs_get_thread_id when the thread id is not directly available.

Parameters
[in]thr_idthread_id (0 if no openMP)
Returns
a pointer to an allocated auxiliary cell-wise buffer

◆ cs_cdo_connect_get_time_perfo()

long long cs_cdo_connect_get_time_perfo ( void  )

Retrieve the time elapsed to build the cs_cdo_connect_t structure.

Returns
the value of the time elapsed in ns

◆ cs_cdo_connect_log_summary()

void cs_cdo_connect_log_summary ( const cs_cdo_connect_t connect,
cs_flag_t  eb_scheme_flag,
cs_flag_t  vb_scheme_flag,
cs_flag_t  vcb_scheme_flag 
)

Summary of the connectivity information.

Parameters
[in]connectpointer to cs_cdo_connect_t structure
[in]eb_scheme_flagmetadata for Edge-based schemes
[in]vb_scheme_flagmetadata for Vertex-based schemes
[in]vcb_scheme_flagmetadata for Vertex+Cell-based schemes