My Project
programmer's documentation
Macros | Functions
cs_mesh_bad_cells.h File Reference
#include "cs_base.h"
#include "cs_mesh.h"
#include "cs_mesh_quantities.h"
Include dependency graph for cs_mesh_bad_cells.h:

Go to the source code of this file.

Macros

#define CS_BAD_CELL_ORTHO_NORM   (1 << 0)
 
#define CS_BAD_CELL_OFFSET   (1 << 1)
 
#define CS_BAD_CELL_LSQ_GRAD   (1 << 2)
 
#define CS_BAD_CELL_RATIO   (1 << 3)
 
#define CS_BAD_CELL_GUILT   (1 << 4)
 
#define CS_BAD_CELL_USER   (1 << 5)
 
#define CS_BAD_CELL_TO_REGULARIZE   (1 << 6)
 

Functions

void cs_mesh_bad_cells_set_options (int type_flag_mask, int compute, int visualize)
 Define which cell quality indicators are used and when. More...
 
void cs_mesh_bad_cells_get_options (int compute[2], int visualize[2])
 Indicate which cell quality indicators are used and when. More...
 
void cs_mesh_bad_cells_detect (const cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities)
 Compute bad cell quality indicators. More...
 
void cs_mesh_bad_cells_postprocess (const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities)
 Post-process time-independent bad cell quality indicators. More...
 

Macro Definition Documentation

◆ CS_BAD_CELL_GUILT

#define CS_BAD_CELL_GUILT   (1 << 4)

◆ CS_BAD_CELL_LSQ_GRAD

#define CS_BAD_CELL_LSQ_GRAD   (1 << 2)

◆ CS_BAD_CELL_OFFSET

#define CS_BAD_CELL_OFFSET   (1 << 1)

◆ CS_BAD_CELL_ORTHO_NORM

#define CS_BAD_CELL_ORTHO_NORM   (1 << 0)

◆ CS_BAD_CELL_RATIO

#define CS_BAD_CELL_RATIO   (1 << 3)

◆ CS_BAD_CELL_TO_REGULARIZE

#define CS_BAD_CELL_TO_REGULARIZE   (1 << 6)

◆ CS_BAD_CELL_USER

#define CS_BAD_CELL_USER   (1 << 5)

Function Documentation

◆ cs_mesh_bad_cells_detect()

void cs_mesh_bad_cells_detect ( const cs_mesh_t mesh,
cs_mesh_quantities_t mesh_quantities 
)

Compute bad cell quality indicators.

Parameters
[in]meshpointer to associated mesh structure
[in,out]mesh_quantitiespointer to associated mesh quantities structure

◆ cs_mesh_bad_cells_get_options()

void cs_mesh_bad_cells_get_options ( int  compute[2],
int  visualize[2] 
)

Indicate which cell quality indicators are used and when.

Each array is optional, and returns 2 flags; the first flag is used at initialization, the second one at each time step.

A flag is a mask to be compared using an "and" (&) operation with a given criteria type mask (CS_BAD_CELL_ORTHO_NORM, CS_BAD_CELL_OFFSET, ...).

Parameters
[out]computecomputation mask (initialization, per time step), or NULL
[out]visualizevisualization mask (initialization, per time step), or NULL

◆ cs_mesh_bad_cells_postprocess()

void cs_mesh_bad_cells_postprocess ( const cs_mesh_t mesh,
const cs_mesh_quantities_t mesh_quantities 
)

Post-process time-independent bad cell quality indicators.

Parameters
[in]meshpointer to associated mesh structure
[in]mesh_quantitiespointer to associated mesh quantities structure

◆ cs_mesh_bad_cells_set_options()

void cs_mesh_bad_cells_set_options ( int  type_flag_mask,
int  compute,
int  visualize 
)

Define which cell quality indicators are used and when.

Note
We assume that if a given criterion is computed at each time step, it is also computed at initialization, but for visualization, it is either one or the other, as visualization formats and tools may not always accept both a fixed and time-varying instance of a given variable.
Parameters
[in]type_flag_maskcriterion type mask (0 for all)
[in]compute0: never compute; 1: compute at initialization; 2: compute at each time step
[in]visualize0: never visualize 1: visualize at initialization; 2: visualize at each time step