8.3
general documentation
cs_defs.h
Go to the documentation of this file.
1#ifndef __CS_DEFS_H__
2#define __CS_DEFS_H__
3
4/*============================================================================
5 * Base macro and typedef definitions for system portability
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------*/
29
30/*============================================================================
31 * Autoconf-defined macros
32 *============================================================================*/
33
34#if defined(HAVE_CONFIG_H)
35# include "cs_config.h"
36#endif
37
38#ifdef __cplusplus
39#include <type_traits>
40#endif
41
42/*============================================================================
43 * Internationalization
44 *============================================================================*/
45
46#ifdef __cplusplus
47extern "C" {
48#if 0
49} /* Fake brace to force Emacs auto-indentation back to column 0 */
50#endif
51#endif /* __cplusplus */
52
53#if defined(ENABLE_NLS) && defined(HAVE_GETTEXT)
54
55# include <libintl.h>
56# define _(String) dgettext(PACKAGE, String)
57# ifdef gettext_noop
58# define N_(String) gettext_noop(String)
59# else
60# define N_(String) String
61# endif /* gettext_noop */
62
63#else
64
65# define _LIBINTL_H /* Prevent inclusion of <libintl.h> by other files
66 with incorrect or missing checks;
67 TODO locate files causing issues to avoid
68 requiring this workaround */
70# define _(String) (String)
71# define N_(String) String
72# define textdomain(String) (String)
73# define gettext(String) (String)
74# define dgettext(Domain,String) (String)
75# define dcgettext(Domain,String,Type) (String)
76# define bindtextdomain(Domain, Directory) (Domain)
77
78#endif /* ENABLE_NLS && HAVE_GETTEXT */
79
80#ifdef __cplusplus
81}
82#endif /* __cplusplus */
83
84/*============================================================================
85 * Parallelism
86 *============================================================================*/
87
88#if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI)
89
90# include <mpi.h>
91
92# if !defined(MPI_VERSION) /* Defined in up-to-date MPI versions */
93# define MPI_VERSION 1
94# endif
96# if MPI_VERSION == 1
97# define MPI_Info int
98# define MPI_INFO_NULL 0
99# endif
100
101#endif
102
103#if defined(HAVE_OPENMP)
104
105# include <omp.h>
106
107#if _OPENMP >= 201307 /* simd construct available from OpenMP 4.0 */
108#undef HAVE_OPENMP_SIMD
109#define HAVE_OPENMP_SIMD 1
110#endif
111
112#endif
113
114/* Do we have accelerator support ? */
115
116#if defined(HAVE_CUDA)
117#define HAVE_ACCEL 1
118#elif defined(HAVE_SYCL)
119#define HAVE_ACCEL 1
120#elif defined(HAVE_OPENMP_TARGET)
121#define HAVE_ACCEL 1
122#endif
123
124/*============================================================================
125 * C99 Qualifiers
126 *============================================================================*/
127
128#ifndef __cplusplus /* C */
129
130/* inline provided by cs_config.h if necessary */
131
132#if !defined(__STDC_VERSION__)
133# define __STDC_VERSION__ 1989
134#endif
135
136/*
137 * Redefinition of "inline" et "restrict" qualifiers incompatible with
138 * some C89 compilers (standard in C99)
139 */
140
141#if (__STDC_VERSION__ < 199901L)
142
143# if defined(__GNUC__)
144# define inline __inline__
145# define restrict __restrict__
146# else
147# define inline
148# define restrict
149# endif
150
151#endif
152
153#else /* C++ */
154
155# if defined(__GNUC__) || defined(__clang__) || defined (__NVCC__)
156# define restrict __restrict__
157# elif defined(_MSC_VER)
158# define restrict __restrict
159# else
160# ifndef HAVE_RESTRICT /* Must be provided by caller */
161# define restrict
162# endif
163# endif
164
165#endif /* __cplusplus */
166
167/* Definition of a DEPRECATED decorator which may be called in the code */
168
169#if defined(__GNUC__) || defined(__clang__)
170# define DEPRECATED __attribute__((deprecated))
171#elif defined(_MSC_VER)
172# define DEPRECATED __declspec(deprecated)
173#else
174# define DEPRECATED
175#endif
176
177/*============================================================================
178 * Definitions that may not always be provided directly by the system
179 *============================================================================*/
180
181/*
182 * Obtain definitions such as that of size_t through stddef.h (C99 standard)
183 * if available (preferred method), or through stdlib.h (which defines
184 * malloc() and family and so must define size_t some way) otherwise.
185 */
186
187#if HAVE_STDDEF_H
188# include <stddef.h>
189#else
190# include <stdlib.h>
191#endif
192
193/*
194 * Usually stdint.h is included by inttypes.h, but only inttypes.h exists
195 * on certain systems, such as Tru64Unix.
196 */
197
198#if HAVE_STDINT_H
199# include <stdint.h>
200#elif HAVE_INTTYPES_H
201# include <inttypes.h>
202#endif
203
204/*
205 * Obtain the definition of off_t.
206 */
207
208#if defined(HAVE_SYS_TYPES_H)
209#include <sys/types.h>
210#endif
211
212/* C99 _Bool type */
213
214#if HAVE_STDBOOL_H
215# include <stdbool.h>
216#else
217# ifndef __cplusplus
218# ifndef HAVE__BOOL
219# define _Bool signed char;
220# endif
221# define bool _Bool
222# define false 0
223# define true 1
224# else
225# define _Bool bool;
226# endif
227# define __bool_true_false_are_defined 1
228#endif
229
230/* C++ assert necessary for template */
231#if defined(__cplusplus)
232#include <typeinfo>
233#include "assert.h"
234#endif
235
236/* int32_t type */
237
238#if !defined(HAVE_INT32_T)
239# if (SIZEOF_INT == 4)
240typedef int int32_t;
241# elif (SIZEOF_SHORT == 4)
242typedef short int32_t;
243# else
244# error
245# endif
246#endif
247
248/* int64_t type */
249
250#if !defined(HAVE_INT64_T)
251# if (SIZEOF_INT == 8)
252typedef int int64_t;
253# elif (SIZEOF_LONG == 8)
254typedef long int64_t;
255# elif (HAVE_LONG_LONG == 8) /* SIZEOF_LONG_LONG not generally available */
256typedef long long int64_t;
257# else
258# error
259# endif
260#endif
261
262/* uint32_t type */
263
264#if !defined(HAVE_UINT32_T)
265# if (SIZEOF_INT == 4)
266typedef unsigned uint32_t;
267# elif (SIZEOF_SHORT == 4)
268typedef unsigned short uint32_t;
269# else
270# error
271# endif
272#endif
273
274/* uint64_t type */
275
276#if !defined(HAVE_UINT64_T)
277# if (SIZEOF_INT == 8)
278typedef unsigned uint64_t;
279# elif (SIZEOF_LONG == 8)
280typedef unsigned long uint64_t;
281# elif (HAVE_LONG_LONG) /* SIZEOF_LONG_LONG not generally available */
282typedef unsigned long long uint64_t;
283# else
284# error
285# endif
286#endif
287
288/*============================================================================
289 * General types and macros used throughout code_saturne
290 *============================================================================*/
291
292#ifdef __cplusplus
293extern "C" {
294#if 0
295} /* Fake brace to force Emacs auto-indentation back to column 0 */
296#endif
297#endif /* __cplusplus */
298
299/*----------------------------------------------------------------------------
300 * Variable value type.
301 *----------------------------------------------------------------------------*/
303typedef enum {
305 CS_DATATYPE_NULL, /* empty datatype */
306 CS_CHAR, /* character values */
307 CS_FLOAT, /* 4-byte floating point values */
308 CS_DOUBLE, /* 8-byte floating point values */
309 CS_UINT16, /* 2-byte unsigned integer values */
310 CS_INT32, /* 4-byte signed integer values */
311 CS_INT64, /* 8-byte signed integer values */
312 CS_UINT32, /* 4-byte unsigned integer values */
313 CS_UINT64 /* 8-byte unsigned integer values */
314
316
317/*----------------------------------------------------------------------------
318 * Basic types used by code_saturne
319 * They may be modified here to better map to a given library, with the
320 * following constraints:
321 * - cs_lnum_t must be signed
322 * - cs_gnum_t may be signed or unsigned
323 *----------------------------------------------------------------------------*/
324
325/* Global integer index or number */
326
327#if defined(HAVE_LONG_GNUM)
328 typedef uint64_t cs_gnum_t;
329#else
330 typedef unsigned cs_gnum_t;
331#endif
332
333/* Local integer index or number */
334
335#if defined(HAVE_LONG_LNUM)
336 typedef int64_t cs_lnum_t;
337#else
338 typedef int cs_lnum_t;
339#endif
341/* Other types */
343typedef double cs_coord_t; /* Real number (coordinate value) */
345typedef double cs_real_t; /* Fortran double precision */
346typedef char cs_byte_t; /* Byte (untyped memory unit) */
347typedef unsigned short int cs_flag_t; /* Flag storing metadata */
349typedef double cs_nreal_t; /* Real number (normalized value) */
350typedef double cs_dreal_t; /* Local distance */
351typedef double cs_rreal_t; /* Reconstruction distance */
353/* Vector or array block types */
354
355typedef cs_lnum_t cs_lnum_2_t[2]; /* Vector of 2 local numbers */
356typedef cs_lnum_t cs_lnum_3_t[3]; /* Vector of 3 local numbers */
357
358typedef cs_coord_t cs_coord_3_t[3]; /* Vector of 3 real (coordinate)
359 values */
361typedef cs_real_t cs_real_2_t[2]; /* Vector of 2 real values */
362typedef cs_real_t cs_real_3_t[3]; /* Vector of 3 real values */
363typedef cs_real_t cs_real_4_t[4]; /* Vector of 4 real values */
364typedef cs_real_t cs_real_6_t[6]; /* Vector of 6 real values
365 (for symmetric tensor) */
366typedef cs_real_t cs_real_9_t[9]; /* Vector of 9 real values */
367typedef cs_real_t cs_real_10_t[10]; /* Vector of 10 real values */
369typedef cs_real_t cs_real_23_t[2][3]; /* Matrix of 2x3 real values */
371typedef cs_real_t cs_real_33_t[3][3]; /* Matrix of 3x3 real values */
372typedef cs_real_t cs_real_66_t[6][6]; /* Matrix of 6x6 real values */
373typedef cs_real_t cs_real_99_t[9][9]; /* Matrix of 9x9 real values */
375typedef cs_real_t cs_real_333_t[3][3][3]; /* tensor of 3x3x3 real values */
377typedef cs_real_t cs_real_34_t[3][4]; /* Matrix of 3x4 real values */
379typedef cs_real_t cs_real_63_t[6][3]; /* Matrix of 6x3 real values */
381typedef cs_real_t cs_real_69_t[6][9]; /* Matrix of 6x9 real values */
383typedef cs_real_33_t cs_real_332_t[2]; /* vector of 2 3x3 matrices
384 of real values */
385typedef cs_real_66_t cs_real_662_t[2]; /* vector of 2 6x6 matrices
386 of real values */
388typedef cs_nreal_t cs_nreal_3_t[3]; /* Vector of normalized real values
389 (i.e. unit vector) */
390typedef cs_dreal_t cs_dreal_3_t[3]; /* Vector joining 2 local coordinates */
391typedef cs_rreal_t cs_rreal_3_t[3]; /* Reconstruction distance Vector */
393typedef struct {
394
395 double val; /* Value */
396 int id; /* Id related to value */
397
399
400/* Vector-valued quantity stored using its measure (i.e. length) and
401 its direction given by a unitary vector */
403typedef struct {
404
405 double meas;
406 double unitv[3];
407
408} cs_nvec3_t;
409
410/* Mappings to MPI datatypes */
411/*---------------------------*/
413#if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI)
414
415# define CS_MPI_REAL MPI_DOUBLE /* If cs_real_t is a double */
416
417/* MPI type for cs_gnum_t integer type (depends on configuration) */
419# if defined(HAVE_LONG_GNUM)
420# if (SIZEOF_LONG == 8)
421# define CS_MPI_GNUM MPI_UNSIGNED_LONG
422# elif (SIZEOF_LONG_LONG == 8)
423# if defined(MPI_UNSIGNED_LONG_LONG)
424# define CS_MPI_GNUM MPI_UNSIGNED_LONG_LONG
425# elif defined(MPI_LONG_LONG)
426# define CS_MPI_GNUM MPI_LONG_LONG
427# endif
428# endif
429# if !defined(CS_MPI_GNUM)
430# error
431# endif
432# else
433# define CS_MPI_GNUM MPI_UNSIGNED
434# endif
435
436/* MPI type for cs_lnum_t type */
437
438# if defined(HAVE_LONG_LNUM)
439# define CS_MPI_LNUM MPI_LONG
440# else
441# define CS_MPI_LNUM MPI_INT
442# endif
444# define CS_MPI_EFLAG MPI_UNSIGNED /* MPI type for cs_mflag_t type */
445# define CS_MPI_FLAG MPI_UNSIGNED_SHORT /* MPI type for cs_flag_t type */
446# define CS_MPI_COORD MPI_DOUBLE /* MPI type for cs_coord_t type */
447
448#endif /* defined(HAVE_MPI) && !defined(CS_IGNORE_MPI) */
449
450/* Mappings to code_saturne datatypes */
451/*------------------------------------*/
452
453#if defined(HAVE_LONG_GNUM)
454# define CS_GNUM_TYPE CS_UINT64
455#elif (SIZEOF_INT == 8)
456# define CS_GNUM_TYPE CS_UINT64
457#else
458# define CS_GNUM_TYPE CS_UINT32
459#endif
460
461#if defined(HAVE_LONG_LNUM)
462# if (SIZEOF_LONG == 8)
463# define CS_LNUM_TYPE CS_INT64
464# else
465# define CS_LNUM_TYPE CS_INT32
466# endif
467#else
468# if (SIZEOF_INT == 8)
469# define CS_LNUM_TYPE CS_INT64
470# else
471# define CS_LNUM_TYPE CS_INT32
472# endif
473#endif
474
475#if (SIZEOF_INT == 8)
476# define CS_INT_TYPE CS_INT64
477#else
478# define CS_INT_TYPE CS_INT32
479#endif
480
481#if (SIZEOF_INT == 8)
482# define CS_UINT_TYPE CS_UINT64
483#else
484# define CS_UINT_TYPE CS_UINT32
485#endif
487#define CS_FLAG_TYPE CS_UINT16
488#define CS_EFLAG_TYPE CS_UINT_TYPE
489#define CS_REAL_TYPE CS_DOUBLE
490#define CS_COORD_TYPE CS_DOUBLE
491
492/* Minimum size for OpenMP loops
493 * (will need benchmarking and tuning for various systems)
494 *---------------------------------------------------------*/
495
496#define CS_THR_MIN 128
497
498/* Cache line size, or multiple thereof */
499/*--------------------------------------*/
500
501#define CS_CL_SIZE 64
502
503/*----------------------------------------------------------------------------
504 * Type independent min an max (caution: the argument is evaluated)
505 *----------------------------------------------------------------------------*/
507#define CS_ABS(a) ((a) < 0 ? -(a) : (a))
508#define CS_MIN(a,b) ((a) < (b) ? (a) : (b))
509#define CS_MAX(a,b) ((a) > (b) ? (a) : (b))
511/*----------------------------------------------------------------------------
512 * Variable interlace type:
513 * {x1, y1, z1, x2, y2, z2, ...,xn, yn, zn} if interlaced
514 * {x1, x2, ..., xn, y1, y2, ..., yn, z1, z2, ..., zn} if non interlaced
515 *----------------------------------------------------------------------------*/
517typedef enum {
518
519 CS_INTERLACE, /* Variable is interlaced */
520 CS_NO_INTERLACE /* Variable is not interlaced */
521
523
524/*----------------------------------------------------------------------------
525 * Macro used to silence "unused argument" warnings.
526 *
527 * This is useful when a function must match a given function pointer
528 * type, but does not use all possible arguments.
529 *----------------------------------------------------------------------------*/
530
531#define CS_UNUSED(x) (void)(x)
532#define CS_NO_WARN_IF_UNUSED(x) (void)(x)
533
534/*----------------------------------------------------------------------------
535 * Macros for compilation with a C++ compiler
536 *----------------------------------------------------------------------------*/
537
538#undef BEGIN_C_DECLS
539#undef END_C_DECLS
540
541#if defined(__cplusplus)
542# define BEGIN_C_DECLS extern "C" {
543# define END_C_DECLS }
544#else
545# define BEGIN_C_DECLS
546# define END_C_DECLS
547#endif
548
549/*----------------------------------------------------------------------------
550 * Macros for function type qualifiers
551 *----------------------------------------------------------------------------*/
552
553#ifdef __NVCC__
554
555#define CS_F_HOST __host__
556#define CS_F_DEVICE __device__
557#define CS_F_HOST_DEVICE __host__ __device__
558#define CS_V_CONSTANT __constant__
560#else
562#define CS_F_HOST
563#define CS_F_DEVICE
564#define CS_F_HOST_DEVICE
565#define CS_V_CONSTANT static const
566
567#endif
568
569/*----------------------------------------------------------------------------
570 * Macros for Fortran interoperability
571 *----------------------------------------------------------------------------*/
572
573/*
574 * Macro for handling of different symbol names (underscored or not,
575 * lowercase or uppercase) between C and Fortran, for link resolution.
576 */
577
578#if !defined (__hpux)
579#define CS_PROCF(x, y) x##_
580#else
581#define CS_PROCF(x, y) x
582#endif
583
584/*=============================================================================
585 * Global variables
586 *============================================================================*/
587
588/* Empty but non-null string */
589
590extern const char cs_empty_string[];
591
592/* Sizes and names associated with datatypes */
593
594extern const size_t cs_datatype_size[];
595extern const char *cs_datatype_name[];
596
597/* MPI Datatypes associated with code_saturne datatypes */
598
599#if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI)
600
601extern MPI_Datatype cs_datatype_to_mpi[];
602
603#endif
604
605/* Global variables indicating task state */
606
607extern int cs_glob_n_threads; /* Number of threads */
608
609extern int cs_glob_rank_id; /* Rank in main MPI communicator */
610extern int cs_glob_n_ranks; /* Size of main MPI communicator */
611
612extern int cs_glob_node_rank_id; /* Rank on node in main MPI communicator */
613extern int cs_glob_node_n_ranks; /* Number of ranks on node of main
614 MPI communicator */
615
616#if defined(HAVE_MPI) && !defined(CS_IGNORE_MPI)
617
618extern MPI_Comm cs_glob_mpi_comm; /* Main MPI intra-communicator */
619
620#endif
621
622/*----------------------------------------------------------------------------
623 * Function pointer types
624 *----------------------------------------------------------------------------*/
625
626/*----------------------------------------------------------------------------*/
634/*----------------------------------------------------------------------------*/
635
636typedef void *
637(cs_destructor_t)(void *s);
638
639/*=============================================================================
640 * Public functions
641 *============================================================================*/
642
643/*----------------------------------------------------------------------------*/
644/*
645 * \brief Given a base index i, return the next index aligned with a size m.
646 *
647 * \param[in] i base index
648 * \param[in] m block size to align with
649 *
650 * \return aligned index
651 */
652/*----------------------------------------------------------------------------*/
653
654inline static cs_lnum_t
656 cs_lnum_t m)
657{
658 return ((i > 0) ? ((i-1)/m+1)*m : 0);
659}
660
661/*----------------------------------------------------------------------------*/
668/*----------------------------------------------------------------------------*/
669
670inline static int
672{
673#if defined(HAVE_OPENMP)
674 return omp_get_thread_num();
675#else
676 return 0;
677#endif
678}
679
680/*----------------------------------------------------------------------------*/
681
682#ifdef __cplusplus
683}
684#endif /* __cplusplus */
685
686#ifdef __cplusplus
687
688/*=============================================================================
689 * Public C++ templates
690 *============================================================================*/
691
692/*----------------------------------------------------------------------------*/
698/*----------------------------------------------------------------------------*/
699
700template <typename T>
701struct dependent_false : std::false_type {};
702
703template <typename T>
704static inline cs_datatype_t
705cs_datatype_from_type()
706{
707 static_assert(dependent_false<T>::value, "Unknown datatype");
708 return CS_DATATYPE_NULL;
709}
710
711/*----------------------------------------------------------------------------*/
712/* Specialized versions of the templated function */
713/*----------------------------------------------------------------------------*/
714
715template <>
716constexpr inline cs_datatype_t
717cs_datatype_from_type<char>()
718{
719 return CS_CHAR;
720}
721
722/*----------------------------------------------------------------------------*/
723
724template <>
725constexpr inline cs_datatype_t
726cs_datatype_from_type<float>()
727{
728 return CS_FLOAT;
729}
730
731/*----------------------------------------------------------------------------*/
732
733template <>
734constexpr inline cs_datatype_t
735cs_datatype_from_type<double>()
736{
737 return CS_DOUBLE;
738}
739
740/*----------------------------------------------------------------------------*/
741
742template <>
743constexpr inline cs_datatype_t
744cs_datatype_from_type<uint16_t>()
745{
746 return CS_UINT16;
747}
748
749/*----------------------------------------------------------------------------*/
750
751template <>
752constexpr inline cs_datatype_t
753cs_datatype_from_type<uint32_t>()
754{
755 return CS_UINT32;
756}
757
758/*----------------------------------------------------------------------------*/
759
760template <>
761constexpr inline cs_datatype_t
762cs_datatype_from_type<uint64_t>()
763{
764 return CS_UINT64;
765}
766
767/*----------------------------------------------------------------------------*/
768
769template <>
770constexpr inline cs_datatype_t
771cs_datatype_from_type<int32_t>()
772{
773 return CS_INT32;
774}
775
776/*----------------------------------------------------------------------------*/
777
778template <>
779constexpr inline cs_datatype_t
780cs_datatype_from_type<int64_t>()
781{
782 return CS_INT64;
783}
784
785/*----------------------------------------------------------------------------*/
786
787#endif /* __cplusplus */
788
789/*----------------------------------------------------------------------------*/
790
791#endif /* __CS_DEFS_H__ */
int cs_glob_n_ranks
Definition: cs_defs.cpp:175
cs_datatype_t
Definition: cs_defs.h:300
@ CS_FLOAT
Definition: cs_defs.h:304
@ CS_CHAR
Definition: cs_defs.h:303
@ CS_UINT16
Definition: cs_defs.h:306
@ CS_INT64
Definition: cs_defs.h:308
@ CS_UINT64
Definition: cs_defs.h:310
@ CS_DOUBLE
Definition: cs_defs.h:305
@ CS_UINT32
Definition: cs_defs.h:309
@ CS_INT32
Definition: cs_defs.h:307
@ CS_DATATYPE_NULL
Definition: cs_defs.h:302
cs_lnum_t cs_lnum_3_t[3]
Definition: cs_defs.h:353
const char * cs_datatype_name[]
Definition: cs_defs.cpp:143
char cs_byte_t
Definition: cs_defs.h:343
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
void *() cs_destructor_t(void *s)
Destroy a given structure.
Definition: cs_defs.h:634
cs_rreal_t cs_rreal_3_t[3]
Definition: cs_defs.h:388
const size_t cs_datatype_size[]
Definition: cs_defs.cpp:133
cs_real_33_t cs_real_332_t[2]
vector of 2 3x3 matrices of floating-point values
Definition: cs_defs.h:380
int cs_glob_node_rank_id
Definition: cs_defs.cpp:177
cs_real_t cs_real_69_t[6][9]
Definition: cs_defs.h:378
cs_nreal_t cs_nreal_3_t[3]
Definition: cs_defs.h:385
const char cs_empty_string[]
Definition: cs_defs.cpp:129
int cs_glob_n_threads
Definition: cs_defs.cpp:172
cs_lnum_t cs_lnum_2_t[2]
vector of 2 local mesh-entity ids
Definition: cs_defs.h:352
static int cs_get_thread_id(void)
Retrieve the associated thread id (0 if no OpenMP or if outside an OpenMP region)
Definition: cs_defs.h:668
int cs_glob_node_n_ranks
Definition: cs_defs.cpp:178
cs_real_t cs_real_4_t[4]
vector of 4 floating-point values
Definition: cs_defs.h:360
MPI_Datatype cs_datatype_to_mpi[]
Definition: cs_defs.cpp:157
double cs_dreal_t
Definition: cs_defs.h:347
cs_real_t cs_real_10_t[10]
Definition: cs_defs.h:364
cs_real_t cs_real_99_t[9][9]
Definition: cs_defs.h:370
double cs_coord_t
Definition: cs_defs.h:340
cs_real_t cs_real_34_t[3][4]
Definition: cs_defs.h:374
cs_real_t cs_real_66_t[6][6]
6x6 matrix of floating-point values
Definition: cs_defs.h:369
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:359
cs_coord_t cs_coord_3_t[3]
Definition: cs_defs.h:355
cs_real_66_t cs_real_662_t[2]
Definition: cs_defs.h:382
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:358
uint64_t cs_gnum_t
global mesh entity number
Definition: cs_defs.h:325
cs_interlace_t
Definition: cs_defs.h:514
@ CS_INTERLACE
Definition: cs_defs.h:516
@ CS_NO_INTERLACE
Definition: cs_defs.h:517
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:361
static cs_lnum_t cs_align(cs_lnum_t i, cs_lnum_t m)
Given a base index i, return the next index aligned with a size m.
Definition: cs_defs.h:652
cs_dreal_t cs_dreal_3_t[3]
Definition: cs_defs.h:387
cs_real_t cs_real_333_t[3][3][3]
Definition: cs_defs.h:372
double cs_rreal_t
Definition: cs_defs.h:348
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:368
MPI_Comm cs_glob_mpi_comm
Definition: cs_defs.cpp:183
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
cs_real_t cs_real_63_t[6][3]
Definition: cs_defs.h:376
double cs_nreal_t
Definition: cs_defs.h:346
cs_real_t cs_real_9_t[9]
Definition: cs_defs.h:363
cs_real_t cs_real_23_t[2][3]
Definition: cs_defs.h:366
unsigned short int cs_flag_t
Definition: cs_defs.h:344
int cs_glob_rank_id
Definition: cs_defs.cpp:174
Definition: cs_defs.h:390
Definition: cs_defs.h:400