44 #define CS_FLAG_BOUNDARY (1 << 0) // 1: cell with at least one border face 47 #define CS_FLAG_SYS_DIFFUSION (1 << 0) // 1: Build the diffusion term 48 #define CS_FLAG_SYS_ADVECTION (1 << 1) // 2: Build the advection term 49 #define CS_FLAG_SYS_REACTION (1 << 2) // 4: Build the reaction term(s) 50 #define CS_FLAG_SYS_TIME (1 << 3) // 8: Build the unsteady term 51 #define CS_FLAG_SYS_SOURCETERM (1 << 4) // 16: Build the source term(s) 52 #define CS_FLAG_SYS_HLOC_CONF (1 << 5) // 32: build conforming Hodge op. 53 #define CS_FLAG_SYS_SYM (1 << 6) // 64: system matrix is symmetric 54 #define CS_FLAG_SYS_TIME_DIAG (1 << 7) // 128: lumping/diag by construction 55 #define CS_FLAG_SYS_SOURCES_HLOC (1 << 8) // 256: source terms need a hodge op. 56 #define CS_FLAG_SYS_DEBUG (1 << 9) // 512: activate debug mode 59 #define CS_FLAG_STATE_UNIFORM (1 << 0) // 1: uniform (in space) 60 #define CS_FLAG_STATE_CELLWISE (1 << 1) // 2: cellwise uniform 61 #define CS_FLAG_STATE_UNSTEADY (1 << 2) // 4: unsteady 62 #define CS_FLAG_STATE_POTENTIAL (1 << 3) // 8: potential 63 #define CS_FLAG_STATE_CIRCULATION (1 << 4) // 16: circulation 64 #define CS_FLAG_STATE_FLUX (1 << 5) // 32: flux 65 #define CS_FLAG_STATE_DENSITY (1 << 6) // 64: density 66 #define CS_FLAG_STATE_OWNER (1 << 7) // 128: owner 70 #define CS_FLAG_PRIMAL (1 << 0) // 1: on primal mesh 71 #define CS_FLAG_DUAL (1 << 1) // 2: on dual mesh 72 #define CS_FLAG_VERTEX (1 << 2) // 4: on vertices 73 #define CS_FLAG_EDGE (1 << 3) // 8: on edges 74 #define CS_FLAG_FACE (1 << 4) // 16: on faces 75 #define CS_FLAG_CELL (1 << 5) // 32: on cells 76 #define CS_FLAG_BORDER (1 << 6) // 64: located on the boundary 77 #define CS_FLAG_SCALAR (1 << 7) // 128: scalar-valued (stride = 1) 78 #define CS_FLAG_VECTOR (1 << 8) // 256: vector-valued (stride = 3) 79 #define CS_FLAG_TENSOR (1 << 9) // 512: tensor-valued (stride = 9) 80 #define CS_FLAG_BY_CELL (1 << 10) // 1024: by cell (c2e, c2f, c2v) 81 #define CS_FLAG_FULL_LOC (1 << 11) // 2048: defined on the whole location 87 #define CS_SCHEME_FLAG_CDOVB (1 << 0) // 1: CDO vertex-based scheme 88 #define CS_SCHEME_FLAG_CDOVCB (1 << 1) // 2: CDO vertex+cell-based scheme 89 #define CS_SCHEME_FLAG_CDOFB (1 << 2) // 4: CDO face-based scheme 90 #define CS_SCHEME_FLAG_HHO (1 << 3) // 8: Hybrid-High Order scheme 91 #define CS_SCHEME_FLAG_SCALAR (1 << 4) // 16: scheme for scalar eq. 92 #define CS_SCHEME_FLAG_VECTOR (1 << 5) // 32: scheme for a vector eq. 93 #define CS_SCHEME_FLAG_POLY0 (1 << 6) // 64: lowest-order scheme 94 #define CS_SCHEME_FLAG_POLY1 (1 << 7) //128: approx. with linear polynomials 95 #define CS_SCHEME_FLAG_POLY2 (1 << 8) //256: approx. with quadratic poly. 100 #define CS_CDO_ASSEMBLE_BUF_SIZE 96 105 #define CS_CDO_N_MAX_REACTIONS 8 // Max number of reaction terms in an equation 108 #define CS_CDO_OMP_CHUNK_SIZE 128 109 #define CS_CDO_OMP_SCHEDULE schedule(static, CS_CDO_OMP_CHUNK_SIZE) 112 #if defined(HAVE_OPENMP) && defined(__GNUC__) 114 #define CS_CDO_OMP_ASSERT(e) 116 #define CS_CDO_OMP_ASSERT(e) assert(e) 119 #define CS_CDO_OMP_ASSERT(e) assert(e) 210 const void *law_param,
232 const double var1_values[],
233 const double var2_values[],
234 const void *law_param,
279 if ((flag_to_check & reference) == reference)
void() cs_analytic_func_t(cs_real_t time, cs_lnum_t n_points, const cs_real_t *xyz, cs_real_t *retval)
Generic analytic function.
Definition: cs_cdo.h:170
const cs_flag_t cs_cdo_dual_face_byc
Definition: cs_cdo.c:81
#define BEGIN_C_DECLS
Definition: cs_defs.h:451
const cs_flag_t cs_cdo_primal_face
Definition: cs_cdo.c:76
unsigned char cs_mask_t
Definition: cs_cdo.h:126
cs_real_t() cs_timestep_func_t(int time_iter, double time)
Simple function to define the time step according to the number of iteration already done...
Definition: cs_cdo.h:188
void() cs_onevar_law_func_t(cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t var_values[], const void *law_param, cs_real_t res_array[])
Compute the value of a quantity according to a law depending only on one variable. This law is described by a set of parameters stored in a structure. result = law(var_value)
Definition: cs_cdo.h:207
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:276
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:114
cs_space_scheme_t
Definition: cs_cdo.h:148
cs_flag_t location
Definition: cs_cdo.h:133
const char * cs_base_strtf(bool boolean)
Return a string "true" or "false" according to the boolean.
Definition: cs_cdo.c:107
double meas
Definition: cs_cdo.h:142
const char lsepline[80]
Definition: cs_cdo.c:67
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:309
void() cs_twovar_law_func_t(cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const double var1_values[], const double var2_values[], const void *law_param, cs_real_t res_array[])
Compute the value of a quantity according to a law depending only on two variables. This law is described by a set of parameters stored in a structure. result = law(var1_value, var2_value)
Definition: cs_cdo.h:230
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.c:125
const cs_flag_t cs_cdo_primal_cell
Definition: cs_cdo.c:77
cs_flag_t state
Definition: cs_cdo.h:134
const cs_flag_t cs_cdo_dual_cell
Definition: cs_cdo.c:80
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
const cs_flag_t cs_cdo_primal_vtx
Definition: cs_cdo.c:75
#define END_C_DECLS
Definition: cs_defs.h:452
const cs_flag_t cs_cdo_dual_face
Definition: cs_cdo.c:79
unsigned short int cs_flag_t
Definition: cs_defs.h:299
const char ssepline[40]
Definition: cs_cdo.c:71
_Bool cs_cdo_is_activated
Definition: cs_cdo.c:64
const char msepline[60]
Definition: cs_cdo.c:69
const cs_flag_t cs_cdo_dual_vtx
Definition: cs_cdo.c:78