8.1
general documentation
cs_flag.h File Reference
#include "cs_defs.h"
+ Include dependency graph for cs_flag.h:

Go to the source code of this file.

Macros

Flags specifying the type of cell
#define CS_FLAG_BOUNDARY_CELL_BY_FACE   (1 << 0)
 (= 1) boundary cell with at least one border face More...
 
#define CS_FLAG_BOUNDARY_CELL_BY_VERTEX   (1 << 1)
 (= 2) boundary cell with at least one border vertex More...
 
#define CS_FLAG_BOUNDARY_CELL_BY_EDGE   (1 << 2)
 (= 4) boundary cell with at least one border edge More...
 
#define CS_FLAG_SOLID_CELL   (1 << 3)
 (= 8) cell attached to a solid zone during the calculation More...
 
Flags specifying the type of update to perform
#define CS_FLAG_CURRENT_TO_PREVIOUS   (1 << 0)
 (value = 1) perform a previous to current operation on fields during the update step More...
 
#define CS_FLAG_INITIALIZATION   (1 << 1)
 (value = 2) This is the first time that the update is called so it is also an initialization step More...
 
Flag related to the way a CDO system is built
#define CS_FLAG_SYS_MASS_MATRIX   (1 << 0)
 
#define CS_FLAG_SYS_SYM   (1 << 1)
 
#define CS_FLAG_SYS_TIME_DIAG   (1 << 2)
 
#define CS_FLAG_SYS_REAC_DIAG   (1 << 3)
 
#define CS_FLAG_SYS_SOURCES_HLOC   (1 << 4)
 
#define CS_FLAG_SYS_VECTOR   (1 << 5)
 
Flags use to identify the nature/status of an object

Apply this flag on a variable, a property or an advection field

#define CS_FLAG_STATE_UNIFORM   (1 << 0)
 
#define CS_FLAG_STATE_CELLWISE   (1 << 1)
 
#define CS_FLAG_STATE_FACEWISE   (1 << 2)
 
#define CS_FLAG_STATE_STEADY   (1 << 3)
 
#define CS_FLAG_STATE_POTENTIAL   (1 << 4)
 
#define CS_FLAG_STATE_CIRCULATION   (1 << 5)
 
#define CS_FLAG_STATE_FLUX   (1 << 6)
 
#define CS_FLAG_STATE_DENSITY   (1 << 7)
 
Flags use to identify metadata for a quantity

where is located this quantity and how to access to its values

#define CS_FLAG_FULL_LOC   (1 << 0)
 
#define CS_FLAG_SCALAR   (1 << 1)
 
#define CS_FLAG_VECTOR   (1 << 2)
 
#define CS_FLAG_TENSOR   (1 << 3)
 
#define CS_FLAG_VERTEX   (1 << 4)
 
#define CS_FLAG_EDGE   (1 << 5)
 
#define CS_FLAG_FACE   (1 << 6)
 
#define CS_FLAG_CELL   (1 << 7)
 
#define CS_FLAG_PRIMAL   (1 << 8)
 
#define CS_FLAG_DUAL   (1 << 9)
 
#define CS_FLAG_BORDER   (1 << 10)
 
#define CS_FLAG_BY_CELL   (1 << 11)
 
#define CS_FLAG_BY_FACE   (1 << 12)
 
Flags use to identify the type of equations requested.

There exists one flag for each type of space discretization. If this flag is activated, then at least one equation or system of this kind is discretized with this space discretization scheme.

#define CS_FLAG_SCHEME_SCALAR   (1 << 0)
 
#define CS_FLAG_SCHEME_VECTOR   (1 << 1)
 
#define CS_FLAG_SCHEME_NAVSTO   (1 << 2)
 
#define CS_FLAG_SCHEME_POLY0   (1 << 3)
 
#define CS_FLAG_SCHEME_POLY1   (1 << 4)
 
#define CS_FLAG_SCHEME_POLY2   (1 << 5)
 

Typedefs

typedef unsigned char cs_mask_t
 
typedef unsigned int cs_eflag_t
 

Enumerations

enum  cs_flag_comp_bits_t {
  CS_FLAG_COMP_PV = 1 << 0 , CS_FLAG_COMP_PVQ = 1 << 1 , CS_FLAG_COMP_PE = 1 << 2 , CS_FLAG_COMP_PEQ = 1 << 3 ,
  CS_FLAG_COMP_DFQ = 1 << 4 , CS_FLAG_COMP_PF = 1 << 5 , CS_FLAG_COMP_PFQ = 1 << 6 , CS_FLAG_COMP_DEQ = 1 << 7 ,
  CS_FLAG_COMP_EV = 1 << 8 , CS_FLAG_COMP_FE = 1 << 9 , CS_FLAG_COMP_FEQ = 1 << 10 , CS_FLAG_COMP_FV = 1 << 11 ,
  CS_FLAG_COMP_EF = 1 << 12 , CS_FLAG_COMP_SEF = 1 << 13 , CS_FLAG_COMP_HFQ = 1 << 14 , CS_FLAG_COMP_FES = 1 << 15 ,
  CS_FLAG_COMP_PFC = 1 << 16 , CS_FLAG_COMP_PEC = 1 << 17 , CS_FLAG_COMP_DIAM = 1 << 18
}
 
enum  cs_flag_location_t {
  CS_FLAG_LOCATION_PRIMAL_VTX = CS_FLAG_PRIMAL | CS_FLAG_VERTEX , CS_FLAG_LOCATION_PRIMAL_EDGE = CS_FLAG_PRIMAL | CS_FLAG_EDGE , CS_FLAG_LOCATION_PRIMAL_FACE = CS_FLAG_PRIMAL | CS_FLAG_FACE , CS_FLAG_LOCATION_PRIMAL_CELL = CS_FLAG_PRIMAL | CS_FLAG_CELL ,
  CS_FLAG_LOCATION_DUAL_VTX = CS_FLAG_DUAL | CS_FLAG_VERTEX , CS_FLAG_LOCATION_DUAL_EDGE = CS_FLAG_DUAL | CS_FLAG_EDGE , CS_FLAG_LOCATION_DUAL_FACE = CS_FLAG_DUAL | CS_FLAG_FACE , CS_FLAG_LOCATION_DUAL_CELL = CS_FLAG_DUAL | CS_FLAG_CELL ,
  CS_FLAG_N_LOCATIONS
}
 

Functions

static bool cs_flag_test (cs_flag_t flag_to_check, cs_flag_t reference)
 Check if a two flag share the same pattern Return true if the flag to check has at least the pattern of the reference flag. More...
 
static bool cs_flag_at_least (cs_flag_t flag_to_check, int n_masks, cs_flag_t masks[])
 Check if a flag has in common at least one of the given masks Return true if the test is satisfied. More...
 
static bool cs_eflag_test (cs_eflag_t flag_to_check, cs_eflag_t reference)
 Check if a two compute flag share the same pattern Return true if the computed flag to check has at least the pattern of the reference compute flag. Case of extended flags. More...
 
const char * cs_flag_str_location (cs_flag_t loc)
 Retrieve the label associated to a location flag. More...
 

Variables

const cs_flag_t cs_flag_primal_vtx
 
const cs_flag_t cs_flag_primal_edge
 
const cs_flag_t cs_flag_primal_face
 
const cs_flag_t cs_flag_primal_cell
 
const cs_flag_t cs_flag_vertex
 
const cs_flag_t cs_flag_cell
 
const cs_flag_t cs_flag_boundary_face
 
const cs_flag_t cs_flag_dual_vtx
 
const cs_flag_t cs_flag_dual_face
 
const cs_flag_t cs_flag_dual_cell
 
const cs_flag_t cs_flag_primal_edge_byc
 
const cs_flag_t cs_flag_dual_cell_byc
 
const cs_flag_t cs_flag_dual_face_byc
 
const cs_flag_t cs_flag_dual_closure_byf
 
const cs_eflag_t cs_flag_need_v
 
const cs_eflag_t cs_flag_need_e
 
const cs_eflag_t cs_flag_need_f
 
const cs_eflag_t cs_flag_need_fe
 
const cs_eflag_t cs_flag_need_ef
 
const cs_eflag_t cs_flag_need_peq
 
const cs_eflag_t cs_flag_need_dfq
 
const cs_eflag_t cs_flag_need_pfq
 
const cs_eflag_t cs_flag_need_deq
 
const cs_eflag_t cs_flag_need_pfc
 

Macro Definition Documentation

◆ CS_FLAG_BORDER

#define CS_FLAG_BORDER   (1 << 10)

1024: located on the boundary

◆ CS_FLAG_BOUNDARY_CELL_BY_EDGE

#define CS_FLAG_BOUNDARY_CELL_BY_EDGE   (1 << 2)

(= 4) boundary cell with at least one border edge

◆ CS_FLAG_BOUNDARY_CELL_BY_FACE

#define CS_FLAG_BOUNDARY_CELL_BY_FACE   (1 << 0)

(= 1) boundary cell with at least one border face

◆ CS_FLAG_BOUNDARY_CELL_BY_VERTEX

#define CS_FLAG_BOUNDARY_CELL_BY_VERTEX   (1 << 1)

(= 2) boundary cell with at least one border vertex

◆ CS_FLAG_BY_CELL

#define CS_FLAG_BY_CELL   (1 << 11)

2048: by cell (c2e, c2f, c2v)

◆ CS_FLAG_BY_FACE

#define CS_FLAG_BY_FACE   (1 << 12)

4096: by face (bf2v)

◆ CS_FLAG_CELL

#define CS_FLAG_CELL   (1 << 7)

128: on cells

◆ CS_FLAG_CURRENT_TO_PREVIOUS

#define CS_FLAG_CURRENT_TO_PREVIOUS   (1 << 0)

(value = 1) perform a previous to current operation on fields during the update step

◆ CS_FLAG_DUAL

#define CS_FLAG_DUAL   (1 << 9)

512: on dual mesh

◆ CS_FLAG_EDGE

#define CS_FLAG_EDGE   (1 << 5)

32: on edges

◆ CS_FLAG_FACE

#define CS_FLAG_FACE   (1 << 6)

64: on faces

◆ CS_FLAG_FULL_LOC

#define CS_FLAG_FULL_LOC   (1 << 0)

1: defined on the whole location

◆ CS_FLAG_INITIALIZATION

#define CS_FLAG_INITIALIZATION   (1 << 1)

(value = 2) This is the first time that the update is called so it is also an initialization step

◆ CS_FLAG_PRIMAL

#define CS_FLAG_PRIMAL   (1 << 8)

256: on primal mesh

◆ CS_FLAG_SCALAR

#define CS_FLAG_SCALAR   (1 << 1)

2: scalar-valued (stride = 1)

◆ CS_FLAG_SCHEME_NAVSTO

#define CS_FLAG_SCHEME_NAVSTO   (1 << 2)

4: Navier-Stokes system

◆ CS_FLAG_SCHEME_POLY0

#define CS_FLAG_SCHEME_POLY0   (1 << 3)

8: lowest-order scheme

◆ CS_FLAG_SCHEME_POLY1

#define CS_FLAG_SCHEME_POLY1   (1 << 4)

16: Linear gradient approx.

◆ CS_FLAG_SCHEME_POLY2

#define CS_FLAG_SCHEME_POLY2   (1 << 5)

32: Quadratic gradient approx.

◆ CS_FLAG_SCHEME_SCALAR

#define CS_FLAG_SCHEME_SCALAR   (1 << 0)

1: scheme for scalar eq.

◆ CS_FLAG_SCHEME_VECTOR

#define CS_FLAG_SCHEME_VECTOR   (1 << 1)

2: scheme for a vector eq.

◆ CS_FLAG_SOLID_CELL

#define CS_FLAG_SOLID_CELL   (1 << 3)

(= 8) cell attached to a solid zone during the calculation

◆ CS_FLAG_STATE_CELLWISE

#define CS_FLAG_STATE_CELLWISE   (1 << 1)

2: cellwise uniform

◆ CS_FLAG_STATE_CIRCULATION

#define CS_FLAG_STATE_CIRCULATION   (1 << 5)

32: circulation

◆ CS_FLAG_STATE_DENSITY

#define CS_FLAG_STATE_DENSITY   (1 << 7)

128: density

◆ CS_FLAG_STATE_FACEWISE

#define CS_FLAG_STATE_FACEWISE   (1 << 2)

4: uniform on each face

◆ CS_FLAG_STATE_FLUX

#define CS_FLAG_STATE_FLUX   (1 << 6)

64: flux

◆ CS_FLAG_STATE_POTENTIAL

#define CS_FLAG_STATE_POTENTIAL   (1 << 4)

16: potential

◆ CS_FLAG_STATE_STEADY

#define CS_FLAG_STATE_STEADY   (1 << 3)

8: steady

◆ CS_FLAG_STATE_UNIFORM

#define CS_FLAG_STATE_UNIFORM   (1 << 0)

1: uniform (in space)

◆ CS_FLAG_SYS_MASS_MATRIX

#define CS_FLAG_SYS_MASS_MATRIX   (1 << 0)

1: build a mass matrix

◆ CS_FLAG_SYS_REAC_DIAG

#define CS_FLAG_SYS_REAC_DIAG   (1 << 3)

8: lump the reaction term

◆ CS_FLAG_SYS_SOURCES_HLOC

#define CS_FLAG_SYS_SOURCES_HLOC   (1 << 4)

16: Hodge op. for source terms

◆ CS_FLAG_SYS_SYM

#define CS_FLAG_SYS_SYM   (1 << 1)

2: system matrix is symmetric

◆ CS_FLAG_SYS_TIME_DIAG

#define CS_FLAG_SYS_TIME_DIAG   (1 << 2)

4: lump the time term

◆ CS_FLAG_SYS_VECTOR

#define CS_FLAG_SYS_VECTOR   (1 << 5)

32: vector-valued variable

◆ CS_FLAG_TENSOR

#define CS_FLAG_TENSOR   (1 << 3)

8: tensor-valued (stride = 9)

◆ CS_FLAG_VECTOR

#define CS_FLAG_VECTOR   (1 << 2)

4: vector-valued (stride = 3)

◆ CS_FLAG_VERTEX

#define CS_FLAG_VERTEX   (1 << 4)

16: on vertices

Typedef Documentation

◆ cs_eflag_t

typedef unsigned int cs_eflag_t

◆ cs_mask_t

typedef unsigned char cs_mask_t

Enumeration Type Documentation

◆ cs_flag_comp_bits_t

Enumerator
CS_FLAG_COMP_PV 
CS_FLAG_COMP_PVQ 
CS_FLAG_COMP_PE 
CS_FLAG_COMP_PEQ 
CS_FLAG_COMP_DFQ 
CS_FLAG_COMP_PF 
CS_FLAG_COMP_PFQ 
CS_FLAG_COMP_DEQ 
CS_FLAG_COMP_EV 
CS_FLAG_COMP_FE 
CS_FLAG_COMP_FEQ 
CS_FLAG_COMP_FV 
CS_FLAG_COMP_EF 
CS_FLAG_COMP_SEF 
CS_FLAG_COMP_HFQ 
CS_FLAG_COMP_FES 
CS_FLAG_COMP_PFC 
CS_FLAG_COMP_PEC 
CS_FLAG_COMP_DIAM 

◆ cs_flag_location_t

Enumerator
CS_FLAG_LOCATION_PRIMAL_VTX 
CS_FLAG_LOCATION_PRIMAL_EDGE 
CS_FLAG_LOCATION_PRIMAL_FACE 
CS_FLAG_LOCATION_PRIMAL_CELL 
CS_FLAG_LOCATION_DUAL_VTX 
CS_FLAG_LOCATION_DUAL_EDGE 
CS_FLAG_LOCATION_DUAL_FACE 
CS_FLAG_LOCATION_DUAL_CELL 
CS_FLAG_N_LOCATIONS 

Function Documentation

◆ cs_eflag_test()

static bool cs_eflag_test ( cs_eflag_t  flag_to_check,
cs_eflag_t  reference 
)
inlinestatic

Check if a two compute flag share the same pattern Return true if the computed flag to check has at least the pattern of the reference compute flag. Case of extended flags.

Parameters
[in]flag_to_checkflag corresponding to the location to check
[in]referenceflag corresponding to the referenced support
Returns
true or false

◆ cs_flag_at_least()

static bool cs_flag_at_least ( cs_flag_t  flag_to_check,
int  n_masks,
cs_flag_t  masks[] 
)
inlinestatic

Check if a flag has in common at least one of the given masks Return true if the test is satisfied.

Parameters
[in]flag_to_checkflag corresponding to the location to check
[in]n_masksnumber of masks to check
[in]masksarray of masks
Returns
true or false

◆ cs_flag_str_location()

const char* cs_flag_str_location ( cs_flag_t  loc)

Retrieve the label associated to a location flag.

Returns
a string

◆ cs_flag_test()

static bool cs_flag_test ( cs_flag_t  flag_to_check,
cs_flag_t  reference 
)
inlinestatic

Check if a two flag share the same pattern Return true if the flag to check has at least the pattern of the reference flag.

Parameters
[in]flag_to_checkflag corresponding to the location to check
[in]referenceflag corresponding to the referenced support
Returns
true or false

Variable Documentation

◆ cs_flag_boundary_face

const cs_flag_t cs_flag_boundary_face
extern

◆ cs_flag_cell

const cs_flag_t cs_flag_cell
extern

◆ cs_flag_dual_cell

const cs_flag_t cs_flag_dual_cell
extern

◆ cs_flag_dual_cell_byc

const cs_flag_t cs_flag_dual_cell_byc
extern

◆ cs_flag_dual_closure_byf

const cs_flag_t cs_flag_dual_closure_byf
extern

◆ cs_flag_dual_face

const cs_flag_t cs_flag_dual_face
extern

◆ cs_flag_dual_face_byc

const cs_flag_t cs_flag_dual_face_byc
extern

◆ cs_flag_dual_vtx

const cs_flag_t cs_flag_dual_vtx
extern

◆ cs_flag_need_deq

const cs_eflag_t cs_flag_need_deq
extern

◆ cs_flag_need_dfq

const cs_eflag_t cs_flag_need_dfq
extern

◆ cs_flag_need_e

const cs_eflag_t cs_flag_need_e
extern

◆ cs_flag_need_ef

const cs_eflag_t cs_flag_need_ef
extern

◆ cs_flag_need_f

const cs_eflag_t cs_flag_need_f
extern

◆ cs_flag_need_fe

const cs_eflag_t cs_flag_need_fe
extern

◆ cs_flag_need_peq

const cs_eflag_t cs_flag_need_peq
extern

◆ cs_flag_need_pfc

const cs_eflag_t cs_flag_need_pfc
extern

◆ cs_flag_need_pfq

const cs_eflag_t cs_flag_need_pfq
extern

◆ cs_flag_need_v

const cs_eflag_t cs_flag_need_v
extern

◆ cs_flag_primal_cell

const cs_flag_t cs_flag_primal_cell
extern

◆ cs_flag_primal_edge

const cs_flag_t cs_flag_primal_edge
extern

◆ cs_flag_primal_edge_byc

const cs_flag_t cs_flag_primal_edge_byc
extern

◆ cs_flag_primal_face

const cs_flag_t cs_flag_primal_face
extern

◆ cs_flag_primal_vtx

const cs_flag_t cs_flag_primal_vtx
extern

◆ cs_flag_vertex

const cs_flag_t cs_flag_vertex
extern