7.1
general documentation
cs_ext_neighborhood.h File Reference
#include "cs_base.h"
#include "cs_mesh.h"
#include "cs_mesh_quantities.h"
+ Include dependency graph for cs_ext_neighborhood.h:

Go to the source code of this file.

Enumerations

enum  cs_ext_neighborhood_type_t { CS_EXT_NEIGHBORHOOD_NONE, CS_EXT_NEIGHBORHOOD_COMPLETE, CS_EXT_NEIGHBORHOOD_CELL_CENTER_OPPOSITE, CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX }
 Type of extended neighborhood associated with the mesh. More...
 

Functions

cs_ext_neighborhood_type_t cs_ext_neighborhood_get_type (void)
 Get the extended neighborhood type. More...
 
void cs_ext_neighborhood_set_type (cs_ext_neighborhood_type_t enh_type)
 Set the extended neighborhood type. More...
 
cs_real_t cs_ext_neighborhood_get_non_ortho_max (void)
 Get the non_orthogonality threshold (in degrees) associated with the CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX neighborhood type. More...
 
void cs_ext_neighborhood_set_non_ortho_max (cs_real_t non_ortho_max)
 Set the non_orthogonality threshold (in degrees) associated with the CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX neighborhood type. More...
 
void cs_ext_neighborhood_reduce (cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities)
 Reduce the "cell -> cells" connectivity for the extended neighborhood using a non-orthogonality criterion. More...
 
void cs_ext_neighborhood_define (cs_mesh_t *mesh)
 Create the "cell -> cells" connectivity. More...
 

Variables

const char * cs_ext_neighborhood_type_name []
 

Enumeration Type Documentation

◆ cs_ext_neighborhood_type_t

Type of extended neighborhood associated with the mesh.

Extended cell neighborhoods are based on cells adjacent through a shared vertex but with no shared face.

Enumerator
CS_EXT_NEIGHBORHOOD_NONE 

No extended neighborhood

ext_neighborhood_none.svg
No extended neighborhood
CS_EXT_NEIGHBORHOOD_COMPLETE 

Full extended neighborhood

ext_neighborhood_complete.svg
Full extended neighborhood

This option should lead to the smoothest gradient, as it uses information from all neighbors, but is quite costly. On average, a hexahedral mesh has about 21 vertex neighbors per cell, a tetrahedral mesh around 150 vertex neighbors.

CS_EXT_NEIGHBORHOOD_CELL_CENTER_OPPOSITE 

Cells with centers best aligned opposite to face-adjacent cell centers

ext_neighborhood_cell_center_opposite.svg
Opposite cell centers

Add cells whose centers are closest to the half-line prolonging the [face-adjacent cell-center, cell center segment]. The number of additional cells in the extended neighborhood is at most equal to the number of cell faces.

CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX 

Cells adjacent to faces whose non-orthogonality exceeds a given threshold (45 degrees by default)

ext_neighborhood_non_ortho_max.svg
Maximum non-orthogonality

Add cells adjacent to vertices of faces whose non-orthogonality exceeds a given threshold.

This is the legacy reduced extended neighborhood option.

Depending on the configuration, information may be heavily weighted to some sides of a cell and quite limited on other sides, which may explain why user feedback seems to dismiss this option.

Function Documentation

◆ cs_ext_neighborhood_define()

void cs_ext_neighborhood_define ( cs_mesh_t mesh)

Create the "cell -> cells" connectivity.

Parameters
[in,out]meshpointer to a mesh structure

◆ cs_ext_neighborhood_get_non_ortho_max()

cs_real_t cs_ext_neighborhood_get_non_ortho_max ( void  )

Get the non_orthogonality threshold (in degrees) associated with the CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX neighborhood type.

Returns
non-orthogonality threshold

◆ cs_ext_neighborhood_get_type()

cs_ext_neighborhood_type_t cs_ext_neighborhood_get_type ( void  )

Get the extended neighborhood type.

Returns
extended neighborhood type

◆ cs_ext_neighborhood_reduce()

void cs_ext_neighborhood_reduce ( cs_mesh_t mesh,
cs_mesh_quantities_t mesh_quantities 
)

Reduce the "cell -> cells" connectivity for the extended neighborhood using a non-orthogonality criterion.

Note: Only cells sharing only a vertex or vertices (not a face) belong to the "cell -> cells" connectivity.

Parameters
[in]meshpointer to mesh structure
[in]mesh_quantitiesassociated mesh quantities

◆ cs_ext_neighborhood_set_non_ortho_max()

void cs_ext_neighborhood_set_non_ortho_max ( cs_real_t  non_ortho_max)

Set the non_orthogonality threshold (in degrees) associated with the CS_EXT_NEIGHBORHOOD_NON_ORTHO_MAX neighborhood type.

Parameters
[in]non_ortho_maxnon-orthogonality threshold

◆ cs_ext_neighborhood_set_type()

void cs_ext_neighborhood_set_type ( cs_ext_neighborhood_type_t  enh_type)

Set the extended neighborhood type.

Parameters
[in]enh_typeextended neighborhood type

Variable Documentation

◆ cs_ext_neighborhood_type_name

const char* cs_ext_neighborhood_type_name[]