45 #define CS_CDO_OFF -1 // CDO schemes are not used (no activation)
46 #define CS_CDO_WITH_FV 0 // CDO schemes are used as well as finite volume
47 #define CS_CDO_ONLY 1 // CDO schemes are exclusively used
50 #define CS_FLAG_BOUNDARY (1 << 0) // 1: cell with at least one border face
53 #define CS_FLAG_SYS_HLOC_CONF (1 << 0) // 1: build conforming Hodge op.
54 #define CS_FLAG_SYS_SYM (1 << 1) // 2: system matrix is symmetric
55 #define CS_FLAG_SYS_TIME_DIAG (1 << 2) // 4: lumping/diag by construction
56 #define CS_FLAG_SYS_SOURCES_HLOC (1 << 3) // 8: source terms need a hodge op.
57 #define CS_FLAG_SYS_DEBUG (1 << 4) // 16: activate debug mode
60 #define CS_FLAG_STATE_UNIFORM (1 << 0) // 1: uniform (in space)
61 #define CS_FLAG_STATE_CELLWISE (1 << 1) // 2: cellwise uniform
62 #define CS_FLAG_STATE_FACEWISE (1 << 2) // 4: uniform on each face
63 #define CS_FLAG_STATE_STEADY (1 << 3) // 8: steady
64 #define CS_FLAG_STATE_POTENTIAL (1 << 4) // 16: potential
65 #define CS_FLAG_STATE_CIRCULATION (1 << 5) // 32: circulation
66 #define CS_FLAG_STATE_FLUX (1 << 6) // 64: flux
67 #define CS_FLAG_STATE_DENSITY (1 << 7) // 128: density
68 #define CS_FLAG_STATE_OWNER (1 << 8) // 256: owner
72 #define CS_FLAG_PRIMAL (1 << 0) // 1: on primal mesh
73 #define CS_FLAG_DUAL (1 << 1) // 2: on dual mesh
74 #define CS_FLAG_VERTEX (1 << 2) // 4: on vertices
75 #define CS_FLAG_EDGE (1 << 3) // 8: on edges
76 #define CS_FLAG_FACE (1 << 4) // 16: on faces
77 #define CS_FLAG_CELL (1 << 5) // 32: on cells
78 #define CS_FLAG_BORDER (1 << 6) // 64: located on the boundary
79 #define CS_FLAG_SCALAR (1 << 7) // 128: scalar-valued (stride = 1)
80 #define CS_FLAG_VECTOR (1 << 8) // 256: vector-valued (stride = 3)
81 #define CS_FLAG_TENSOR (1 << 9) // 512: tensor-valued (stride = 9)
82 #define CS_FLAG_BY_CELL (1 << 10) // 1024: by cell (c2e, c2f, c2v)
83 #define CS_FLAG_FULL_LOC (1 << 11) // 2048: defined on the whole location
89 #define CS_SCHEME_FLAG_CDOVB (1 << 0) // 1: CDO vertex-based scheme
90 #define CS_SCHEME_FLAG_CDOVCB (1 << 1) // 2: CDO vertex+cell-based scheme
91 #define CS_SCHEME_FLAG_CDOFB (1 << 2) // 4: CDO face-based scheme
92 #define CS_SCHEME_FLAG_HHO (1 << 3) // 8: Hybrid-High Order scheme
93 #define CS_SCHEME_FLAG_SCALAR (1 << 4) // 16: scheme for scalar eq.
94 #define CS_SCHEME_FLAG_VECTOR (1 << 5) // 32: scheme for a vector eq.
95 #define CS_SCHEME_FLAG_POLY0 (1 << 6) // 64: lowest-order scheme
96 #define CS_SCHEME_FLAG_POLY1 (1 << 7) //128: approx. with linear polynomials
97 #define CS_SCHEME_FLAG_POLY2 (1 << 8) //256: approx. with quadratic poly.
102 #define CS_CDO_ASSEMBLE_BUF_SIZE 99
107 #define CS_CDO_N_MAX_REACTIONS 8 // Max number of reaction terms in an equation
110 #define CS_CDO_OMP_CHUNK_SIZE 128
111 #define CS_CDO_OMP_SCHEDULE schedule(static, CS_CDO_OMP_CHUNK_SIZE)
114 #define CS_N_FACE_DOFS_0TH 1
115 #define CS_N_FACE_DOFS_1ST 3
116 #define CS_N_FACE_DOFS_2ND 6
118 #define CS_N_CELL_DOFS_0TH 1
119 #define CS_N_CELL_DOFS_1ST 4
120 #define CS_N_CELL_DOFS_2ND 10
238 if ((flag_to_check & reference) == reference)
258 static inline const char *
280 cs_real_t magnitude = sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
282 qv->
meas = magnitude;
286 qv->
unitv[0] = inv * v[0];
287 qv->
unitv[1] = inv * v[1];
288 qv->
unitv[2] = inv * v[2];
296 #if defined(DEBUG) && !defined(NDEBUG)
309 cs_dump_array_to_listing(
const char *header,
326 cs_dump_integer_to_listing(
const char *header,
const cs_flag_t cs_cdo_dual_face_byc
Definition: cs_cdo.c:82
static void cs_nvec3(const cs_real_3_t v, cs_nvec3_t *qv)
Define a cs_nvec3_t structure from a cs_real_3_t.
Definition: cs_cdo.h:277
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
const cs_flag_t cs_cdo_primal_face
Definition: cs_cdo.c:77
unsigned char cs_mask_t
Definition: cs_cdo.h:126
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
static bool cs_test_flag(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 ...
Definition: cs_cdo.h:235
cs_space_scheme_t
Definition: cs_cdo.h:138
double meas
Definition: cs_cdo.h:132
const char lsepline[80]
Definition: cs_cdo.c:68
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:309
const cs_flag_t cs_cdo_primal_cell
Definition: cs_cdo.c:78
const cs_real_t cs_math_zero_threshold
const cs_flag_t cs_cdo_dual_cell
Definition: cs_cdo.c:81
double unitv[3]
Definition: cs_cdo.h:133
void( cs_analytic_func_t)(cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool compact, void *input, cs_real_t *retval)
Generic function pointer for an analytic function elt_ids is optional. If not NULL, it enables to access in coords at the right location and the same thing to fill retval if compact is set to false.
Definition: cs_cdo.h:169
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
static const char * cs_base_strtf(bool boolean)
Return a string "true" or "false" according to the boolean.
Definition: cs_cdo.h:259
const cs_flag_t cs_cdo_primal_vtx
Definition: cs_cdo.c:76
#define END_C_DECLS
Definition: cs_defs.h:454
const cs_flag_t cs_cdo_dual_face
Definition: cs_cdo.c:80
unsigned short int cs_flag_t
Definition: cs_defs.h:299
int cs_cdo_activation_mode
Definition: cs_cdo.c:65
cs_real_t( cs_timestep_func_t)(int time_iter, double time, void *input)
Function which defines the time step according to the number of iteration already done...
Definition: cs_cdo.h:192
const char ssepline[40]
Definition: cs_cdo.c:72
const char msepline[60]
Definition: cs_cdo.c:70
const cs_flag_t cs_cdo_dual_vtx
Definition: cs_cdo.c:79