1
/*============================================================================
2
* Management of the GUI parameters file: conjugate heat transfer
3
*============================================================================*/
6
This file is part of Code_Saturne, a general-purpose CFD tool.
8
Copyright (C) 1998-2011 EDF S.A.
10
This program is free software; you can redistribute it and/or modify it under
11
the terms of the GNU General Public License as published by the Free Software
12
Foundation; either version 2 of the License, or (at your option) any later
15
This program is distributed in the hope that it will be useful, but WITHOUT
16
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
20
You should have received a copy of the GNU General Public License along with
21
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
22
Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
/*----------------------------------------------------------------------------*/
27
#if defined(HAVE_CONFIG_H)
28
#include "cs_config.h"
31
/*----------------------------------------------------------------------------
32
* Standard C library headers
33
*----------------------------------------------------------------------------*/
43
/*----------------------------------------------------------------------------
45
*----------------------------------------------------------------------------*/
48
#include <bft_error.h>
49
#include <bft_printf.h>
51
/*----------------------------------------------------------------------------
53
*----------------------------------------------------------------------------*/
55
#include "fvm_selector.h"
57
/*----------------------------------------------------------------------------
59
*----------------------------------------------------------------------------*/
61
#include "mei_evaluate.h"
63
/*----------------------------------------------------------------------------
65
*----------------------------------------------------------------------------*/
68
#include "cs_gui_util.h"
69
#include "cs_gui_variables.h"
70
#include "cs_gui_boundary_conditions.h"
72
#include "cs_prototypes.h"
73
#include "cs_syr_coupling.h"
75
/*----------------------------------------------------------------------------
76
* Header for the current file
77
*----------------------------------------------------------------------------*/
79
#include "cs_gui_conjugate_heat_transfer.h"
81
/*----------------------------------------------------------------------------*/
85
/*=============================================================================
86
* Local Macro Definitions
87
*============================================================================*/
89
/* debugging switch */
92
/*============================================================================
93
* Private function definitions
94
*============================================================================*/
96
/*-----------------------------------------------------------------------------
97
* Return the value to the asociated markup.
100
* keyword --> label of the markup
101
* number --> number of the syrthes coupling
102
*----------------------------------------------------------------------------*/
105
_get_syrthes_coupling(const char* keyword, const int number)
108
char *path = cs_xpath_init_path();
109
cs_xpath_add_elements(&path, 3, "thermophysical_models",
110
"conjugate_heat_transfer",
111
"external_coupling");
112
cs_xpath_add_element_num(&path, "syrthes", number);
113
cs_xpath_add_element(&path, keyword);
114
cs_xpath_add_function_text(&path);
115
value = cs_gui_get_text_value(path);
120
/*============================================================================
121
* Public Fortran function definitions
122
*============================================================================*/
124
/*-----------------------------------------------------------------------------
125
* Define new SYRTHES coupling.
127
* In the case of a single Code_Saturne and single SYRTHES instance, the
128
* syrthes_name argument is ignored.
130
* In case of multiple couplings, a coupling will be matched with available
131
* SYRTHES instances prioritarily based on the syrthes_name argument.
136
*----------------------------------------------------------------------------*/
138
void CS_PROCF (uisyrc, UISYRC) (void)
142
int visualization = 1;
143
char* syrthes_name = NULL;
144
char* syrthes_verbosity = NULL;
145
char* syrthes_visu = NULL;
146
char* projection_axis = NULL;
147
char* boundary_criteria = NULL;
148
char* volume_criteria = NULL;
151
cs_gui_get_tag_number("/conjugate_heat_transfer/external_coupling/syrthes",
154
for (izone=0 ; izone < coupling ; izone++)
156
syrthes_name = _get_syrthes_coupling("syrthes_name", izone+1);
157
syrthes_verbosity = _get_syrthes_coupling("verbosity", izone+1);
158
syrthes_visu = _get_syrthes_coupling("visualization", izone+1);
159
projection_axis = _get_syrthes_coupling("projection_axis", izone+1);
160
boundary_criteria = _get_syrthes_coupling("selection_criteria", izone+1);
162
if (syrthes_verbosity != NULL)
163
verbosity = atoi(syrthes_verbosity);
165
if (syrthes_visu != NULL)
166
visualization = atoi(syrthes_visu);
168
cs_syr_coupling_define(syrthes_name,
176
bft_printf("==>uisyrc\n");
177
bft_printf("--syrthes_name = %s\n", syrthes_name);
178
bft_printf("--syrthes_verbosity = %s\n", syrthes_verbosity);
179
bft_printf("--syrthes_visualization = %s\n", syrthes_visu);
180
bft_printf("--boundary_criteria = %s\n", boundary_criteria);
181
bft_printf("--projection_axis = %s\n", projection_axis);
183
BFT_FREE(syrthes_name);
184
BFT_FREE(syrthes_verbosity);
185
BFT_FREE(syrthes_visu);
186
BFT_FREE(projection_axis);
187
BFT_FREE(boundary_criteria);
192
/*----------------------------------------------------------------------------*/