8.2
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-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  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_base.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*============================================================================
41  * Type definitions
42  *============================================================================*/
43 
46 typedef enum {
56 
59 
60 typedef struct {
61  /* type of meg function */
63 
64  /* cs_zone_t id */
65  int z_id;
66 
67  /* values stride size */
68  int stride;
69 
70  /* Input name used for function */
71  char name[512];
72 
73  /* boundary or source term data */
74  char additional_data[512];
75 
77 
78 /*============================================================================
79  * Public function prototypes
80  *============================================================================*/
81 
82 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 
100  const int z_id,
101  const int stride,
102  const char *name,
103  const char *additional_data);
104 
105 /*----------------------------------------------------------------------------*/
118 /*----------------------------------------------------------------------------*/
119 
120 void
122  cs_lnum_t n_elts,
123  const cs_lnum_t *elt_ids,
124  const cs_real_t *coords,
125  bool dense_output,
126  void *input,
127  cs_real_t *retval);
128 /*----------------------------------------------------------------------------*/
129 
131 
132 #endif
#define BEGIN_C_DECLS
Definition: cs_defs.h:528
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
#define END_C_DECLS
Definition: cs_defs.h:529
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
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_CALCULATOR_FUNC
Definition: cs_meg_xdef_wrapper.h:55
@ 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:57
@ 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:60
int stride
Definition: cs_meg_xdef_wrapper.h:68
cs_meg_function_type_t type
Definition: cs_meg_xdef_wrapper.h:62
int z_id
Definition: cs_meg_xdef_wrapper.h:65