8.1
general documentation
cs_meg_xdef_wrapper.h
Go to the documentation of this file.
1 #ifndef __CS_MEG_XDEF_WRAPPER_H__
2 #define __CS_MEG_XDEF_WRAPPER_H__
3 
4 /*============================================================================
5  * MEG (Mathematical Expression Generator) functions xdef wrapper
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2023 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  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_base.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*============================================================================
41  * Type definitions
42  *============================================================================*/
43 
46 typedef enum {
55 
58 
59 typedef struct {
60  /* type of meg function */
62 
63  /* cs_zone_t id */
64  int z_id;
65 
66  /* values stride size */
67  int stride;
68 
69  /* Input name used for function */
70  char name[512];
71 
72  /* boundary or source term data */
73  char additional_data[512];
74 
76 
77 /*============================================================================
78  * Public function prototypes
79  *============================================================================*/
80 
81 /*----------------------------------------------------------------------------*/
95 /*----------------------------------------------------------------------------*/
96 
99  const int z_id,
100  const int stride,
101  const char *name,
102  const char *additional_data);
103 
104 /*----------------------------------------------------------------------------*/
117 /*----------------------------------------------------------------------------*/
118 
119 void
121  cs_lnum_t n_elts,
122  const cs_lnum_t *elt_ids,
123  const cs_real_t *coords,
124  bool dense_output,
125  void *input,
126  cs_real_t *retval);
127 /*----------------------------------------------------------------------------*/
128 
130 
131 #endif
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_meg_function_type_t
Definition: cs_meg_xdef_wrapper.h:46
@ CS_MEG_BOUNDARY_FUNC
Definition: cs_meg_xdef_wrapper.h:47
@ CS_MEG_POST_ACTIVATE_FUNC
Definition: cs_meg_xdef_wrapper.h:53
@ CS_MEG_IBM_FUNC
Definition: cs_meg_xdef_wrapper.h:51
@ CS_MEG_VOLUME_FUNC
Definition: cs_meg_xdef_wrapper.h:48
@ CS_MEG_INITIALIZATION_FUNC
Definition: cs_meg_xdef_wrapper.h:49
@ CS_MEG_FSI_STRUCT_FUNC
Definition: cs_meg_xdef_wrapper.h:52
@ CS_MEG_N_FUNC_TYPES
Definition: cs_meg_xdef_wrapper.h:56
@ CS_MEG_POST_PROFILES_FUNC
Definition: cs_meg_xdef_wrapper.h:54
@ CS_MEG_SOURCE_TERM_FUNC
Definition: cs_meg_xdef_wrapper.h:50
cs_meg_xdef_input_t * cs_meg_xdef_wrapper_add_input(const cs_meg_function_type_t type, const int z_id, const int stride, const char *name, const char *additional_data)
Add a MEG function xdef wrapper input data. Allocated memory is deleted by cs_meg_xdef_wrapper_finali...
Definition: cs_meg_xdef_wrapper.c:92
void cs_meg_xdef_wrapper(cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool dense_output, void *input, cs_real_t *retval)
Wrapper function allowing to call MEG functions by xdef structres. This is done by using the cs_xdef_...
Definition: cs_meg_xdef_wrapper.c:147
Definition: cs_meg_xdef_wrapper.h:59
int stride
Definition: cs_meg_xdef_wrapper.h:67
cs_meg_function_type_t type
Definition: cs_meg_xdef_wrapper.h:61
int z_id
Definition: cs_meg_xdef_wrapper.h:64