programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
cs_cdo.h File Reference
#include "cs_base.h"
#include "cs_defs.h"
#include "cs_math.h"
Include dependency graph for cs_cdo.h:

Go to the source code of this file.

Data Structures

struct  cs_nvec3_t
 

Macros

#define CS_CDO_OFF   -1
 
#define CS_CDO_WITH_FV   0
 
#define CS_CDO_ONLY   1
 
#define CS_FLAG_BOUNDARY   (1 << 0)
 
#define CS_FLAG_SYS_HLOC_CONF   (1 << 0)
 
#define CS_FLAG_SYS_SYM   (1 << 1)
 
#define CS_FLAG_SYS_TIME_DIAG   (1 << 2)
 
#define CS_FLAG_SYS_SOURCES_HLOC   (1 << 3)
 
#define CS_FLAG_SYS_DEBUG   (1 << 4)
 
#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)
 
#define CS_FLAG_STATE_OWNER   (1 << 8)
 
#define CS_FLAG_PRIMAL   (1 << 0)
 
#define CS_FLAG_DUAL   (1 << 1)
 
#define CS_FLAG_VERTEX   (1 << 2)
 
#define CS_FLAG_EDGE   (1 << 3)
 
#define CS_FLAG_FACE   (1 << 4)
 
#define CS_FLAG_CELL   (1 << 5)
 
#define CS_FLAG_BORDER   (1 << 6)
 
#define CS_FLAG_SCALAR   (1 << 7)
 
#define CS_FLAG_VECTOR   (1 << 8)
 
#define CS_FLAG_TENSOR   (1 << 9)
 
#define CS_FLAG_BY_CELL   (1 << 10)
 
#define CS_FLAG_FULL_LOC   (1 << 11)
 
#define CS_SCHEME_FLAG_CDOVB   (1 << 0)
 
#define CS_SCHEME_FLAG_CDOVCB   (1 << 1)
 
#define CS_SCHEME_FLAG_CDOFB   (1 << 2)
 
#define CS_SCHEME_FLAG_HHO   (1 << 3)
 
#define CS_SCHEME_FLAG_SCALAR   (1 << 4)
 
#define CS_SCHEME_FLAG_VECTOR   (1 << 5)
 
#define CS_SCHEME_FLAG_POLY0   (1 << 6)
 
#define CS_SCHEME_FLAG_POLY1   (1 << 7)
 
#define CS_SCHEME_FLAG_POLY2   (1 << 8)
 
#define CS_CDO_ASSEMBLE_BUF_SIZE   99
 
#define CS_CDO_N_MAX_REACTIONS   8
 
#define CS_CDO_OMP_CHUNK_SIZE   128
 
#define CS_CDO_OMP_SCHEDULE   schedule(static, CS_CDO_OMP_CHUNK_SIZE)
 
#define CS_N_FACE_DOFS_0TH   1
 
#define CS_N_FACE_DOFS_1ST   3
 
#define CS_N_FACE_DOFS_2ND   6
 
#define CS_N_CELL_DOFS_0TH   1
 
#define CS_N_CELL_DOFS_1ST   4
 
#define CS_N_CELL_DOFS_2ND   10
 

Typedefs

typedef unsigned char cs_mask_t
 
typedef 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. More...
 
typedef cs_real_tcs_timestep_func_t )(int time_iter, double time, void *input)
 Function which defines the time step according to the number of iteration already done, the current time and any structure given as a parameter. More...
 

Enumerations

enum  cs_space_scheme_t {
  CS_SPACE_SCHEME_CDOVB, CS_SPACE_SCHEME_CDOVCB, CS_SPACE_SCHEME_CDOFB, CS_SPACE_SCHEME_HHO_P0,
  CS_SPACE_SCHEME_HHO_P1, CS_SPACE_SCHEME_HHO_P2, CS_SPACE_N_SCHEMES
}
 

Functions

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 of the reference flag. More...
 
static const char * cs_base_strtf (bool boolean)
 Return a string "true" or "false" according to the boolean. More...
 
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. More...
 

Variables

int cs_cdo_activation_mode
 
const char lsepline [80]
 
const char msepline [60]
 
const char ssepline [40]
 
const cs_flag_t cs_cdo_primal_vtx
 
const cs_flag_t cs_cdo_primal_face
 
const cs_flag_t cs_cdo_primal_cell
 
const cs_flag_t cs_cdo_dual_vtx
 
const cs_flag_t cs_cdo_dual_face
 
const cs_flag_t cs_cdo_dual_cell
 
const cs_flag_t cs_cdo_dual_face_byc
 

Macro Definition Documentation

#define CS_CDO_ASSEMBLE_BUF_SIZE   99
#define CS_CDO_N_MAX_REACTIONS   8
#define CS_CDO_OFF   -1
#define CS_CDO_OMP_CHUNK_SIZE   128
#define CS_CDO_OMP_SCHEDULE   schedule(static, CS_CDO_OMP_CHUNK_SIZE)
#define CS_CDO_ONLY   1
#define CS_CDO_WITH_FV   0
#define CS_FLAG_BORDER   (1 << 6)
#define CS_FLAG_BOUNDARY   (1 << 0)
#define CS_FLAG_BY_CELL   (1 << 10)
#define CS_FLAG_CELL   (1 << 5)
#define CS_FLAG_DUAL   (1 << 1)
#define CS_FLAG_EDGE   (1 << 3)
#define CS_FLAG_FACE   (1 << 4)
#define CS_FLAG_FULL_LOC   (1 << 11)
#define CS_FLAG_PRIMAL   (1 << 0)
#define CS_FLAG_SCALAR   (1 << 7)
#define CS_FLAG_STATE_CELLWISE   (1 << 1)
#define CS_FLAG_STATE_CIRCULATION   (1 << 5)
#define CS_FLAG_STATE_DENSITY   (1 << 7)
#define CS_FLAG_STATE_FACEWISE   (1 << 2)
#define CS_FLAG_STATE_FLUX   (1 << 6)
#define CS_FLAG_STATE_OWNER   (1 << 8)
#define CS_FLAG_STATE_POTENTIAL   (1 << 4)
#define CS_FLAG_STATE_STEADY   (1 << 3)
#define CS_FLAG_STATE_UNIFORM   (1 << 0)
#define CS_FLAG_SYS_DEBUG   (1 << 4)
#define CS_FLAG_SYS_HLOC_CONF   (1 << 0)
#define CS_FLAG_SYS_SOURCES_HLOC   (1 << 3)
#define CS_FLAG_SYS_SYM   (1 << 1)
#define CS_FLAG_SYS_TIME_DIAG   (1 << 2)
#define CS_FLAG_TENSOR   (1 << 9)
#define CS_FLAG_VECTOR   (1 << 8)
#define CS_FLAG_VERTEX   (1 << 2)
#define CS_N_CELL_DOFS_0TH   1
#define CS_N_CELL_DOFS_1ST   4
#define CS_N_CELL_DOFS_2ND   10
#define CS_N_FACE_DOFS_0TH   1
#define CS_N_FACE_DOFS_1ST   3
#define CS_N_FACE_DOFS_2ND   6
#define CS_SCHEME_FLAG_CDOFB   (1 << 2)
#define CS_SCHEME_FLAG_CDOVB   (1 << 0)
#define CS_SCHEME_FLAG_CDOVCB   (1 << 1)
#define CS_SCHEME_FLAG_HHO   (1 << 3)
#define CS_SCHEME_FLAG_POLY0   (1 << 6)
#define CS_SCHEME_FLAG_POLY1   (1 << 7)
#define CS_SCHEME_FLAG_POLY2   (1 << 8)
#define CS_SCHEME_FLAG_SCALAR   (1 << 4)
#define CS_SCHEME_FLAG_VECTOR   (1 << 5)

Typedef Documentation

typedef 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.

Parameters
[in]timewhen ?
[in]n_eltsnumber of elements to consider
[in]elt_idslist of elements ids (to access coords and fill)
[in]coordswhere ?
[in]compacttrue:no indirection, false:indirection for filling
[in]inputpointer to a structure cast on-the-fly (may be NULL)
[in,out]retvalresult of the function
typedef unsigned char cs_mask_t
typedef 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, the current time and any structure given as a parameter.

Parameters
[in]time_itercurrent number of iterations
[in]timevalue of the time at the end of the last iteration
[in]inputpointer to a structure cast on-the-fly
Returns
the value of the time step

Enumeration Type Documentation

Enumerator
CS_SPACE_SCHEME_CDOVB 
CS_SPACE_SCHEME_CDOVCB 
CS_SPACE_SCHEME_CDOFB 
CS_SPACE_SCHEME_HHO_P0 
CS_SPACE_SCHEME_HHO_P1 
CS_SPACE_SCHEME_HHO_P2 
CS_SPACE_N_SCHEMES 

Function Documentation

static const char* cs_base_strtf ( bool  boolean)
inlinestatic

Return a string "true" or "false" according to the boolean.

Parameters
[in]booleanbool type
Returns
a string "true" or "false"
static void cs_nvec3 ( const cs_real_3_t  v,
cs_nvec3_t qv 
)
inlinestatic

Define a cs_nvec3_t structure from a cs_real_3_t.

Parameters
[in]vvector of size 3
[out]qvpointer to a cs_nvec3_t structure
static bool cs_test_flag ( 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

int cs_cdo_activation_mode
const cs_flag_t cs_cdo_dual_cell
const cs_flag_t cs_cdo_dual_face
const cs_flag_t cs_cdo_dual_face_byc
const cs_flag_t cs_cdo_dual_vtx
const cs_flag_t cs_cdo_primal_cell
const cs_flag_t cs_cdo_primal_face
const cs_flag_t cs_cdo_primal_vtx
const char lsepline[80]
const char msepline[60]
const char ssepline[40]