9.0
general documentation
Loading...
Searching...
No Matches
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-2025 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 "base/cs_base.h"
36
37/*----------------------------------------------------------------------------*/
38
40
41/*============================================================================
42 * Type definitions
43 *============================================================================*/
44
46
60
61typedef struct {
62 /* type of meg function */
64
65 /* cs_zone_t id */
66 int z_id;
67
68 /* values stride size */
69 int stride;
70
71 /* Input name used for function */
72 char name[512];
73
74 /* boundary or source term data */
75 char additional_data[512];
76
77 /* LOCATION */
79
80 /* constant data */
82
84
85/*============================================================================
86 * Public function prototypes
87 *============================================================================*/
88
89/*----------------------------------------------------------------------------*/
103/*----------------------------------------------------------------------------*/
104
107 const int z_id,
108 const cs_mesh_location_type_t location,
109 const int stride,
110 const char *name,
111 const char *additional_data);
112
113/*----------------------------------------------------------------------------*/
126/*----------------------------------------------------------------------------*/
127
128void
130 cs_lnum_t n_elts,
131 const cs_lnum_t *elt_ids,
132 const cs_real_t *coords,
133 bool dense_output,
134 void *input,
135 cs_real_t *retval);
136/*----------------------------------------------------------------------------*/
137
139
140#endif
#define BEGIN_C_DECLS
Definition cs_defs.h:542
double cs_real_t
Floating-point value.
Definition cs_defs.h:342
#define END_C_DECLS
Definition cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:335
cs_meg_function_type_t
Definition cs_meg_xdef_wrapper.h:47
@ CS_MEG_BOUNDARY_FUNC
Definition cs_meg_xdef_wrapper.h:48
@ CS_MEG_POST_ACTIVATE_FUNC
Definition cs_meg_xdef_wrapper.h:54
@ CS_MEG_CALCULATOR_FUNC
Definition cs_meg_xdef_wrapper.h:56
@ CS_MEG_IBM_FUNC
Definition cs_meg_xdef_wrapper.h:52
@ CS_MEG_VOLUME_FUNC
Definition cs_meg_xdef_wrapper.h:49
@ CS_MEG_INITIALIZATION_FUNC
Definition cs_meg_xdef_wrapper.h:50
@ CS_MEG_FSI_STRUCT_FUNC
Definition cs_meg_xdef_wrapper.h:53
@ CS_MEG_N_FUNC_TYPES
Definition cs_meg_xdef_wrapper.h:58
@ CS_MEG_POST_PROFILES_FUNC
Definition cs_meg_xdef_wrapper.h:55
@ CS_MEG_SOURCE_TERM_FUNC
Definition cs_meg_xdef_wrapper.h:51
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.cxx:182
cs_meg_xdef_input_t * cs_meg_xdef_wrapper_add_input(const cs_meg_function_type_t type, const int z_id, const cs_mesh_location_type_t location, 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.cxx:125
cs_mesh_location_type_t
Definition cs_mesh_location.h:60
Definition cs_meg_xdef_wrapper.h:61
int stride
Definition cs_meg_xdef_wrapper.h:69
cs_real_t constant_value
Definition cs_meg_xdef_wrapper.h:81
cs_meg_function_type_t type
Definition cs_meg_xdef_wrapper.h:63
char name[512]
Definition cs_meg_xdef_wrapper.h:72
cs_mesh_location_type_t location
Definition cs_meg_xdef_wrapper.h:78
int z_id
Definition cs_meg_xdef_wrapper.h:66
char additional_data[512]
Definition cs_meg_xdef_wrapper.h:75