~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to src/gui/cs_gui_radiative_transfer.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-24 00:00:08 UTC
  • mfrom: (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20111124000008-2vo99e38267942q5
Tags: 2.1.0-3
Install a missing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*============================================================================
 
2
 * Management of the GUI parameters file: radiative transfer
 
3
 *============================================================================*/
 
4
 
 
5
/*
 
6
  This file is part of Code_Saturne, a general-purpose CFD tool.
 
7
 
 
8
  Copyright (C) 1998-2011 EDF S.A.
 
9
 
 
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
 
13
  version.
 
14
 
 
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
 
18
  details.
 
19
 
 
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.
 
23
*/
 
24
 
 
25
/*----------------------------------------------------------------------------*/
 
26
 
 
27
#if defined(HAVE_CONFIG_H)
 
28
#include "cs_config.h"
 
29
#endif
 
30
 
 
31
/*----------------------------------------------------------------------------
 
32
 * Standard C library headers
 
33
 *----------------------------------------------------------------------------*/
 
34
 
 
35
#include <stdio.h>
 
36
#include <stdlib.h>
 
37
#include <math.h>
 
38
#include <string.h>
 
39
#include <fcntl.h>
 
40
#include <unistd.h>
 
41
#include <assert.h>
 
42
 
 
43
/*----------------------------------------------------------------------------
 
44
 * BFT library headers
 
45
 *----------------------------------------------------------------------------*/
 
46
 
 
47
#include <bft_mem.h>
 
48
#include <bft_error.h>
 
49
#include <bft_printf.h>
 
50
 
 
51
/*----------------------------------------------------------------------------
 
52
 * FVM library headers
 
53
 *----------------------------------------------------------------------------*/
 
54
 
 
55
#include "fvm_selector.h"
 
56
 
 
57
/*----------------------------------------------------------------------------
 
58
 * Local headers
 
59
 *----------------------------------------------------------------------------*/
 
60
 
 
61
#include "cs_base.h"
 
62
#include "cs_gui_variables.h"
 
63
#include "cs_gui_util.h"
 
64
#include "cs_gui_boundary_conditions.h"
 
65
#include "cs_gui_specific_physics.h"
 
66
#include "cs_gui.h"
 
67
#include "cs_mesh.h"
 
68
 
 
69
/*----------------------------------------------------------------------------
 
70
 * Header for the current file
 
71
 *----------------------------------------------------------------------------*/
 
72
 
 
73
#include "cs_gui_radiative_transfer.h"
 
74
 
 
75
/*----------------------------------------------------------------------------*/
 
76
 
 
77
BEGIN_C_DECLS
 
78
 
 
79
/*=============================================================================
 
80
 * Local Macro Definitions
 
81
 *============================================================================*/
 
82
 
 
83
/* debugging switch */
 
84
#define _XML_DEBUG_ 0
 
85
 
 
86
/*============================================================================
 
87
 * Local Structure Definitions
 
88
 *============================================================================*/
 
89
 
 
90
/*----------------------------------------------------------------------------
 
91
 * Structure associated to boundary conditions definition
 
92
 *----------------------------------------------------------------------------*/
 
93
 
 
94
typedef struct {
 
95
  char     **label;                /* label for each boundary zone            */
 
96
  char     **nature;               /* nature for each boundary zone           */
 
97
  int      *output_zone;
 
98
  int      *type;
 
99
  double   *emissivity;
 
100
  double   *conductivity;
 
101
  double   *thickness;
 
102
  double   *thermal_conductivity;
 
103
  double   *external_temp;
 
104
  double   *internal_temp;
 
105
  double   *conduction_flux;
 
106
} cs_radiative_boundary_t;
 
107
 
 
108
/*----------------------------------------------------------------------------
 
109
 * Private global variables for boundary conditions
 
110
 *----------------------------------------------------------------------------*/
 
111
 
 
112
static cs_radiative_boundary_t *boundary = NULL;
 
113
 
 
114
/*----------------------------------------------------------------------------
 
115
 * Private global variables for the treatment
 
116
 * of NOMVAR. NOMVAR is a characters fortran array
 
117
 *----------------------------------------------------------------------------*/
 
118
 
 
119
static int      _cs_gui_max_vars = 0;
 
120
static int      _cs_gui_last_var = 0;
 
121
static char  ** _cs_gui_var_rayt = NULL;
 
122
 
 
123
 
 
124
/*============================================================================
 
125
 * Private function definitions
 
126
 *============================================================================*/
 
127
 
 
128
/*-----------------------------------------------------------------------------
 
129
 * Return integer parameters for radiation
 
130
 *
 
131
 *   parameters:
 
132
 *    param    -->   name of parameter
 
133
 *    keyword  <--   value of parameter
 
134
 *----------------------------------------------------------------------------*/
 
135
 
 
136
static void
 
137
_radiative_transfer_int(const char *const param,
 
138
                              int *const keyword)
 
139
{
 
140
  char *path;
 
141
  int value = 0;
 
142
 
 
143
  path = cs_xpath_init_path();
 
144
  cs_xpath_add_elements(&path, 3,
 
145
                        "thermophysical_models",
 
146
                        "radiative_transfer",
 
147
                        param);
 
148
  cs_xpath_add_function_text(&path);
 
149
 
 
150
  if (cs_gui_get_int(path, &value)) *keyword = value;
 
151
 
 
152
  BFT_FREE(path);
 
153
}
 
154
 
 
155
/*-----------------------------------------------------------------------------
 
156
 * Return float parameters for radiation
 
157
 *
 
158
 *   parameters:
 
159
 *    param    -->   name of parameter
 
160
 *    keyword  <--   value of parameter
 
161
 *----------------------------------------------------------------------------*/
 
162
 
 
163
static void
 
164
_radiative_transfer_double(const char   *const param,
 
165
                                 double *const keyword)
 
166
{
 
167
  char *path;
 
168
  double value;
 
169
 
 
170
  path = cs_xpath_init_path();
 
171
  cs_xpath_add_elements(&path, 3,
 
172
                        "thermophysical_models",
 
173
                        "radiative_transfer",
 
174
                        param);
 
175
  cs_xpath_add_function_text(&path);
 
176
 
 
177
  if (cs_gui_get_double(path, &value)) *keyword = value;
 
178
 
 
179
  BFT_FREE(path);
 
180
}
 
181
 
 
182
/*-----------------------------------------------------------------------------
 
183
 * Return value of the parameter of the character type for radiation
 
184
 *
 
185
 *   parameters:
 
186
 *    param    -->   name of parameter
 
187
 *    keyword  <--   value of parameter
 
188
 *----------------------------------------------------------------------------*/
 
189
 
 
190
static void
 
191
_radiative_transfer_char(const char *const param,
 
192
                               int  *const keyword)
 
193
{
 
194
  char *path;
 
195
  int result;
 
196
 
 
197
  path = cs_xpath_init_path();
 
198
  cs_xpath_add_elements(&path, 3,
 
199
                        "thermophysical_models",
 
200
                        "radiative_transfer",
 
201
                        param);
 
202
  cs_xpath_add_attribute(&path, "status");
 
203
 
 
204
  if(cs_gui_get_status(path, &result)) *keyword = result;
 
205
 
 
206
  BFT_FREE(path);
 
207
}
 
208
 
 
209
 
 
210
/*-----------------------------------------------------------------------------
 
211
 * Return status and label of the property for post treatment of radiation
 
212
 *
 
213
 *   parameters:
 
214
 *    name     -->   name of property
 
215
 *    value    <--   value of status
 
216
 *----------------------------------------------------------------------------*/
 
217
 
 
218
static char *
 
219
_radiative_transfer_char_post(const char *const name,
 
220
                                          int  *const list_value,
 
221
                                          int  *const record_value)
 
222
{
 
223
  char *path = NULL;
 
224
  char *path1 = NULL;
 
225
  char *path2 = NULL;
 
226
  char *label = NULL;
 
227
  int result;
 
228
 
 
229
  path = cs_xpath_init_path();
 
230
 
 
231
  cs_xpath_add_elements(&path, 3,
 
232
                        "thermophysical_models",
 
233
                        "radiative_transfer",
 
234
                        "property");
 
235
  cs_xpath_add_test_attribute(&path, "name", name);
 
236
 
 
237
  BFT_MALLOC(path1, strlen(path)+1, char);
 
238
  strcpy(path1, path);
 
239
  BFT_MALLOC(path2, strlen(path)+1, char);
 
240
  strcpy(path2, path);
 
241
 
 
242
  cs_xpath_add_attribute(&path, "label");
 
243
  label = cs_gui_get_attribute_value(path);
 
244
 
 
245
  cs_xpath_add_element(&path1, "listing_printing");
 
246
  cs_xpath_add_attribute(&path1, "status");
 
247
  if (cs_gui_get_status(path1, &result)) {
 
248
    *list_value = 1;
 
249
  }
 
250
 
 
251
  cs_xpath_add_element(&path2, "postprocessing_recording");
 
252
  cs_xpath_add_attribute(&path2, "status");
 
253
  if (cs_gui_get_status(path2, &result)) {
 
254
    *record_value = -1;
 
255
  }
 
256
 
 
257
  BFT_FREE(path);
 
258
  BFT_FREE(path1);
 
259
  BFT_FREE(path2);
 
260
 
 
261
  return label;
 
262
}
 
263
 
 
264
/*-----------------------------------------------------------------------------
 
265
 * Return value of the type of absorption coefficient for radiation
 
266
 *
 
267
 *   parameters:
 
268
 *    param    -->   name of parameter "absorption coefficient"
 
269
 *    keyword  <--   value of the type of the coefficent
 
270
 *----------------------------------------------------------------------------*/
 
271
 
 
272
static void
 
273
_radiative_transfer_type(const char *const param,
 
274
                                     int  *const keyword)
 
275
{
 
276
  char *path;
 
277
  char *type;
 
278
 
 
279
  path = cs_xpath_init_path();
 
280
 
 
281
  cs_xpath_add_elements(&path, 3,
 
282
                        "thermophysical_models",
 
283
                        "radiative_transfer",
 
284
                        param);
 
285
 
 
286
  cs_xpath_add_attribute(&path, "type");
 
287
 
 
288
  type = cs_gui_get_attribute_value(path);
 
289
 
 
290
  if (type != NULL) {
 
291
    if (cs_gui_strcmp(type, "constant"))
 
292
      *keyword = 0;
 
293
    else if (cs_gui_strcmp(type, "variable"))
 
294
      *keyword = 1;
 
295
    else if (cs_gui_strcmp(type, "formula"))
 
296
      *keyword = 2;
 
297
    else if (cs_gui_strcmp(type, "modak"))
 
298
      *keyword = 3;
 
299
    else {
 
300
      bft_error (__FILE__, __LINE__, 0,
 
301
                 _("unknow type %s\n"), type);
 
302
    }
 
303
    BFT_FREE(type);
 
304
  }
 
305
  BFT_FREE(path);
 
306
}
 
307
 
 
308
/*----------------------------------------------------------------------------
 
309
 *  Return value of radiative variable
 
310
 *
 
311
 *   parameters:
 
312
 *    label    -->   label of boundary nature
 
313
 *    param    -->   name of the  variable
 
314
 *    value    <--   value of the variable
 
315
 *----------------------------------------------------------------------------*/
 
316
 
 
317
static void
 
318
_radiative_boundary(const   char *const label,
 
319
                    const   char *const param,
 
320
                          double *const value)
 
321
{
 
322
  char *path = NULL;
 
323
  double res = 0.0;
 
324
 
 
325
  path = cs_xpath_init_path();
 
326
  cs_xpath_add_elements(&path, 2,
 
327
                        "boundary_conditions",
 
328
                        "wall");
 
329
  cs_xpath_add_test_attribute(&path, "label", label);
 
330
  cs_xpath_add_elements(&path, 2,
 
331
                        "radiative_data",
 
332
                        param);
 
333
  cs_xpath_add_function_text(&path);
 
334
 
 
335
  if (cs_gui_get_double(path, &res)) {
 
336
    if (res != *value)
 
337
      *value = res;
 
338
  }
 
339
 
 
340
  BFT_FREE(path);
 
341
}
 
342
 
 
343
/*----------------------------------------------------------------------------
 
344
 *  Return int value of the type of radiative condition
 
345
 *
 
346
 *   parameters:
 
347
 *    label    -->   label of boundary "wall"
 
348
 *    itpimp   <--   if wall faces with imposed temperature
 
349
 *    ipgrno   <--   if grey or black wall faces
 
350
 *    iprefl   <--   if reflecting wall faces
 
351
 *    ifgrno   <--   if grey or black wall faces and conduction flux imposed
 
352
 *    ifrefl   <--   if refecting wall faces and conduction flux imposed
 
353
 *----------------------------------------------------------------------------*/
 
354
 
 
355
static int
 
356
_radiative_boundary_type(const char *const label,
 
357
                                 const int itpimp,
 
358
                                 const int ipgrno,
 
359
                                 const int iprefl,
 
360
                                 const int ifgrno,
 
361
                                 const int ifrefl)
 
362
{
 
363
  char *path = NULL;
 
364
  char *type = NULL;
 
365
  int result = -999;
 
366
 
 
367
  path = cs_xpath_init_path();
 
368
  cs_xpath_add_elements(&path, 2,
 
369
                        "boundary_conditions",
 
370
                        "wall");
 
371
  cs_xpath_add_test_attribute(&path, "label", label);
 
372
 
 
373
  cs_xpath_add_element(&path, "radiative_data");
 
374
  cs_xpath_add_attribute(&path,"choice");
 
375
  type = cs_gui_get_attribute_value(path);
 
376
 
 
377
  if (cs_gui_strcmp(type, "itpimp"))
 
378
    result = itpimp;
 
379
  else if (cs_gui_strcmp(type, "ipgrno"))
 
380
    result = ipgrno;
 
381
  else if (cs_gui_strcmp(type, "iprefl"))
 
382
    result = iprefl;
 
383
  else if (cs_gui_strcmp(type, "ifgrno"))
 
384
    result = ifgrno;
 
385
  else if (cs_gui_strcmp(type, "ifrefl"))
 
386
    result = ifrefl;
 
387
 
 
388
  if (result == -999)
 
389
    bft_error (__FILE__, __LINE__, 0,
 
390
               _("Xpath request failed %s \n"), path);
 
391
 
 
392
  BFT_FREE(path);
 
393
  BFT_FREE(type);
 
394
 
 
395
  return result;
 
396
}
 
397
 
 
398
/*----------------------------------------------------------------------------
 
399
 *  Return maximum value of output zone
 
400
 *----------------------------------------------------------------------------*/
 
401
 
 
402
static int
 
403
_radiative_boundary_output_zone_max(void)
 
404
{
 
405
  char *path;
 
406
  int nb_zone, zone_max = 0;
 
407
 
 
408
  path = cs_xpath_init_path();
 
409
  cs_xpath_add_elements(&path, 4,
 
410
                        "boundary_conditions",
 
411
                        "wall",
 
412
                        "radiative_data",
 
413
                        "output_zone" );
 
414
 
 
415
  nb_zone = cs_gui_get_nb_element(path);
 
416
 
 
417
  if (nb_zone > 0) {
 
418
    cs_xpath_add_function_text(&path);
 
419
    zone_max = cs_gui_get_max_value(path);
 
420
  }
 
421
 
 
422
  BFT_FREE(path);
 
423
 
 
424
  return zone_max;
 
425
}
 
426
 
 
427
/*-----------------------------------------------------------------------------
 
428
 * Copy a variable name to private variable names array
 
429
 *
 
430
 * parameters:
 
431
 *   varname        -->  name or label of the variable/scalar/property
 
432
 *   ipp            -->  index from the fortran array associated to varname
 
433
 *----------------------------------------------------------------------------*/
 
434
 
 
435
static void
 
436
_cs_gui_copy_varname(const char *varname, int ipp)
 
437
{
 
438
  size_t  l;
 
439
 
 
440
  if (ipp < 1 || ipp > _cs_gui_last_var)
 
441
    bft_error(__FILE__, __LINE__, 0,
 
442
              _("Variable index %d out of bounds (1 to %d)"),
 
443
              ipp, _cs_gui_last_var);
 
444
 
 
445
  l = strlen(varname);
 
446
 
 
447
  if (_cs_gui_var_rayt[ipp-1] == NULL)
 
448
    BFT_MALLOC(_cs_gui_var_rayt[ipp-1], l + 1, char);
 
449
 
 
450
  else if (strlen(_cs_gui_var_rayt[ipp-1]) != l)
 
451
    BFT_REALLOC(_cs_gui_var_rayt[ipp-1], l + 1, char);
 
452
 
 
453
  strcpy(_cs_gui_var_rayt[ipp-1], varname);
 
454
}
 
455
 
 
456
/*============================================================================
 
457
 * Public Fortran function definitions
 
458
 *============================================================================*/
 
459
 
 
460
/*----------------------------------------------------------------------------
 
461
 *
 
462
 *----------------------------------------------------------------------------*/
 
463
 
 
464
void CS_PROCF (uiray1, UIRAY1) (int *const iirayo,
 
465
                                int *const isuird,
 
466
                                int *const ndirec,
 
467
                                int *const nfreqr,
 
468
                                int *const idiver,
 
469
                                int *const iimpar,
 
470
                                int *const iimlum)
 
471
{
 
472
    char *model = NULL;
 
473
 
 
474
    model = cs_gui_get_thermophysical_model("radiative_transfer");
 
475
 
 
476
    if (cs_gui_strcmp(model, "off"))
 
477
        *iirayo = 0;
 
478
    else if (cs_gui_strcmp(model, "dom"))
 
479
        *iirayo = 1;
 
480
    else if (cs_gui_strcmp(model, "p-1"))
 
481
        *iirayo = 2;
 
482
 
 
483
    if (*iirayo)
 
484
    {
 
485
        _radiative_transfer_char("restart", isuird);
 
486
        _radiative_transfer_int("directions_number", ndirec);
 
487
        _radiative_transfer_int("frequency", nfreqr);
 
488
        _radiative_transfer_int("thermal_radiative_source_term", idiver);
 
489
        _radiative_transfer_int("temperature_listing_printing", iimpar);
 
490
        _radiative_transfer_int("intensity_resolution_listing_printing", iimlum);
 
491
    }
 
492
#if _XML_DEBUG_
 
493
    bft_printf("==>UIRAY1\n");
 
494
    bft_printf("--rayonnement : %s  (iirayo = %i)\n", model, *iirayo);
 
495
    if (*iirayo)
 
496
    {
 
497
        bft_printf("--isuird = %d\n", *isuird);
 
498
        bft_printf("--ndirec = %d\n", *ndirec);
 
499
        bft_printf("--nfreqr = %d\n", *nfreqr);
 
500
        bft_printf("--idiver = %d\n", *idiver);
 
501
        bft_printf("--iimpar = %d\n", *iimpar);
 
502
        bft_printf("--iimlum = %d\n", *iimlum);
 
503
    }
 
504
#endif
 
505
    BFT_FREE(model);
 
506
}
 
507
 
 
508
/*----------------------------------------------------------------------------
 
509
 *
 
510
 *----------------------------------------------------------------------------*/
 
511
 
 
512
void CS_PROCF (uiray4, UIRAY4) (int *const nbrayf,
 
513
                                int *const iirayo,
 
514
                                int *const irayvf)
 
515
{
 
516
    int i;
 
517
    int list_ind, record_ind = 0;
 
518
    char *label = NULL;
 
519
 
 
520
    const char *const _cs_properties_name2[8] = {
 
521
        "wall_temp",
 
522
        "flux_incident",
 
523
        "thickness",
 
524
        "thermal_conductivity",
 
525
        "emissivity",
 
526
        "flux_net",
 
527
        "flux_convectif",
 
528
        "coeff_ech_conv"};
 
529
 
 
530
    if (*iirayo)
 
531
    {
 
532
        for (i=0 ; i < *nbrayf ; i++)
 
533
        {
 
534
            list_ind =  1;
 
535
            record_ind =  1;
 
536
            label = _radiative_transfer_char_post(_cs_properties_name2[i],  &list_ind, &record_ind);
 
537
            irayvf[i] = record_ind;
 
538
            if (label)
 
539
                _cs_gui_copy_varname(label, i + 1);
 
540
            BFT_FREE(label);
 
541
        }
 
542
    }
 
543
#if _XML_DEBUG_
 
544
    bft_printf("==>UIRAY4\n");
 
545
    if (*iirayo)
 
546
    {
 
547
        for (i=0 ; i < *nbrayf ; i++)
 
548
        {
 
549
            bft_printf(_("--output boundary faces: %s value %i \n"),
 
550
                       _cs_gui_var_rayt[i],
 
551
            irayvf[i]);
 
552
        }
 
553
    }
 
554
#endif
 
555
}
 
556
 
 
557
/*-----------------------------------------------------------------------------
 
558
 * Indirection between the solver numbering and the XML one
 
559
 * for physical properties of radiative transfer
 
560
 *----------------------------------------------------------------------------*/
 
561
 
 
562
void CS_PROCF (uirapr, UIRAPR) (const int *const nprayc,
 
563
                                const int *const nprayb,
 
564
                                const int *const nrphas,
 
565
                                const int *const ipppro,
 
566
                                const int *const ipproc,
 
567
                                const int *const ilumin,
 
568
                                const int *const iqx,
 
569
                                const int *const iqy,
 
570
                                const int *const iqz,
 
571
                                const int *const itsre,
 
572
                                const int *const itsri,
 
573
                                const int *const iabs,
 
574
                                const int *const iemi,
 
575
                                const int *const icak)
 
576
{
 
577
    int i = 0;
 
578
    int n;
 
579
    char *name = NULL;
 
580
    char *snumpp = NULL;
 
581
 
 
582
    cs_var_t *vars = cs_glob_var;
 
583
 
 
584
    n = vars->nprop;
 
585
    vars->nprop  += *nprayc;
 
586
    vars->nprayc  = *nprayc;
 
587
 
 
588
    BFT_REALLOC(vars->properties_ipp,  vars->nprop, int);
 
589
    BFT_REALLOC(vars->propce,          vars->nprop, int);
 
590
    BFT_REALLOC(vars->properties_name, vars->nprop, char*);
 
591
 
 
592
    /* ILUMIN */
 
593
    vars->properties_ipp[n] = ipppro[ ipproc[ *ilumin -1 ]-1 ];
 
594
    vars->propce[n] = *ilumin;
 
595
    BFT_MALLOC(vars->properties_name[n], strlen("intensity")+1, char);
 
596
    strcpy(vars->properties_name[n++], "intensity");
 
597
 
 
598
    /* IQX */
 
599
    vars->properties_ipp[n] = ipppro[ ipproc[ *iqx -1 ]-1 ];
 
600
    vars->propce[n] = *iqx;
 
601
    BFT_MALLOC(vars->properties_name[n], strlen("qrad_x")+1, char);
 
602
    strcpy(vars->properties_name[n++], "qrad_x");
 
603
 
 
604
    /* IQY */
 
605
    vars->properties_ipp[n] = ipppro[ ipproc[ *iqy -1 ]-1 ];
 
606
    vars->propce[n] = *iqy;
 
607
    BFT_MALLOC(vars->properties_name[n], strlen("qrad_y")+1, char);
 
608
    strcpy(vars->properties_name[n++], "qrad_y");
 
609
 
 
610
    /* IQZ */
 
611
    vars->properties_ipp[n] = ipppro[ ipproc[ *iqz -1 ]-1 ];
 
612
    vars->propce[n] = *iqz;
 
613
    BFT_MALLOC(vars->properties_name[n], strlen("qrad_z")+1, char);
 
614
    strcpy(vars->properties_name[n++], "qrad_z");
 
615
 
 
616
    /* ITSRE */
 
617
    vars->properties_ipp[n] = ipppro[ ipproc[ itsre[0] -1 ]-1 ];
 
618
    vars->propce[n] = itsre[0];
 
619
    BFT_MALLOC(vars->properties_name[n], strlen("radiative_source_term")+1, char);
 
620
    strcpy(vars->properties_name[n++], "radiative_source_term");
 
621
 
 
622
    /* ITSRE loop on classes */
 
623
    BFT_MALLOC(name, strlen("radiative_source_term_")+1 + 2, char);
 
624
    BFT_MALLOC(snumpp, 1 + 2, char);
 
625
    strcpy(name, "radiative_source_term_");
 
626
    for (i = 1; i < *nrphas; i++)
 
627
    {
 
628
        sprintf(snumpp, "%2.2i", i);
 
629
        strcat(name, snumpp);
 
630
 
 
631
        vars->properties_ipp[n] = ipppro[ ipproc[ itsre[i] -1 ]-1 ];
 
632
        vars->propce[n] = itsre[i];
 
633
        BFT_MALLOC(vars->properties_name[n], strlen(name)+1, char);
 
634
        strcpy(vars->properties_name[n++], name);
 
635
 
 
636
        strcpy(name, "radiative_source_term_");
 
637
    }
 
638
 
 
639
    /* ITSRI */
 
640
    vars->properties_ipp[n] = ipppro[ ipproc[ itsri[0] -1 ]-1 ];
 
641
    vars->propce[n] = itsri[0];
 
642
    BFT_MALLOC(vars->properties_name[n], strlen("implicit_source_term")+1, char);
 
643
    strcpy(vars->properties_name[n++], "implicit_source_term");
 
644
 
 
645
    /* ITSRI loop on classes */
 
646
    BFT_REALLOC(name, strlen("implicit_source_term_")+1 + 2, char);
 
647
    strcpy(name, "implicit_source_term_");
 
648
    for (i = 1; i < *nrphas; i++)
 
649
    {
 
650
        sprintf(snumpp, "%2.2i", i);
 
651
        strcat(name, snumpp);
 
652
 
 
653
        vars->properties_ipp[n] = ipppro[ ipproc[ itsri[i] -1 ]-1 ];
 
654
        vars->propce[n] = itsri[i];
 
655
        BFT_MALLOC(vars->properties_name[n], strlen(name)+1, char);
 
656
        strcpy(vars->properties_name[n++], name);
 
657
 
 
658
        strcpy(name, "implicit_source_term_");
 
659
    }
 
660
 
 
661
    /* IABS */
 
662
    vars->properties_ipp[n] = ipppro[ ipproc[ iabs[0] -1 ]-1 ];
 
663
    vars->propce[n] = iabs[0];
 
664
    BFT_MALLOC(vars->properties_name[n], strlen("absorption")+1, char);
 
665
    strcpy(vars->properties_name[n++], "absorption");
 
666
 
 
667
    /* IABS loop on classes */
 
668
    BFT_REALLOC(name, strlen("absorption_")+1 + 2, char);
 
669
    strcpy(name, "absorption_");
 
670
    for (i = 1; i < *nrphas; i++)
 
671
    {
 
672
        sprintf(snumpp, "%2.2i", i);
 
673
        strcat(name, snumpp);
 
674
 
 
675
        vars->properties_ipp[n] = ipppro[ ipproc[ iabs[i] -1 ]-1 ];
 
676
        vars->propce[n] = iabs[i];
 
677
        BFT_MALLOC(vars->properties_name[n], strlen(name)+1, char);
 
678
        strcpy(vars->properties_name[n++], name);
 
679
 
 
680
        strcpy(name, "absorption_");
 
681
    }
 
682
 
 
683
    /* IEMI */
 
684
    vars->properties_ipp[n] = ipppro[ ipproc[ iemi[0] -1 ]-1 ];
 
685
    vars->propce[n] = iemi[0];
 
686
    BFT_MALLOC(vars->properties_name[n], strlen("emission")+1, char);
 
687
    strcpy(vars->properties_name[n++], "emission");
 
688
 
 
689
    /* IEMI loop on classes */
 
690
    BFT_REALLOC(name, strlen("emission_")+1 + 2, char);
 
691
    strcpy(name, "emission_");
 
692
    for (i = 1; i < *nrphas; i++)
 
693
    {
 
694
        sprintf(snumpp, "%2.2i", i);
 
695
        strcat(name, snumpp);
 
696
 
 
697
        vars->properties_ipp[n] = ipppro[ ipproc[ iemi[i] -1 ]-1 ];
 
698
        vars->propce[n] = iemi[i];
 
699
        BFT_MALLOC(vars->properties_name[n], strlen(name)+1, char);
 
700
        strcpy(vars->properties_name[n++], name);
 
701
 
 
702
        strcpy(name, "emission_");
 
703
    }
 
704
 
 
705
    /* ICAK */
 
706
    vars->properties_ipp[n] = ipppro[ ipproc[ icak[0] -1 ]-1 ];
 
707
    vars->propce[n] = icak[0];
 
708
    BFT_MALLOC(vars->properties_name[n], strlen("absorption_coefficient")+1, char);
 
709
    strcpy(vars->properties_name[n++], "absorption_coefficient");
 
710
 
 
711
    /* ICAK loop on classes */
 
712
    BFT_REALLOC(name, strlen("absorption_coefficient_")+1 + 2, char);
 
713
    strcpy(name, "absorption_coefficient_");
 
714
    for (i = 1; i < *nrphas; i++)
 
715
    {
 
716
        sprintf(snumpp, "%2.2i", i);
 
717
        strcat(name, snumpp);
 
718
 
 
719
        vars->properties_ipp[n] = ipppro[ ipproc[ icak[i] -1 ]-1 ];
 
720
        vars->propce[n] = icak[i];
 
721
        BFT_MALLOC(vars->properties_name[n], strlen(name)+1, char);
 
722
        strcpy(vars->properties_name[n++], name);
 
723
 
 
724
        strcpy(name, "absorption_coefficient_");
 
725
    }
 
726
 
 
727
    BFT_FREE(name);
 
728
    BFT_FREE(snumpp);
 
729
 
 
730
    if (n != vars->nprop)
 
731
        bft_error(__FILE__, __LINE__, 0,
 
732
                  _("number of properties is not correct: %i instead of: %i\n"),
 
733
                    n, vars->nsalpp);
 
734
 
 
735
#if _XML_DEBUG_
 
736
    bft_printf("==>UIRAPR\n");
 
737
    bft_printf("-->nombre de proprietes = %i\n", vars->nprop);
 
738
    for (i=0 ; i<vars->nprop ; i++)
 
739
        bft_printf("-->properties_ipp[%i]: %i propce[%i]: %i "
 
740
                   "properties_name[%i]: %s\n",
 
741
                   i, vars->properties_ipp[i],
 
742
                   i, vars->propce[i],
 
743
                   i, vars->properties_name[i]);
 
744
#endif
 
745
}
 
746
 
 
747
/*----------------------------------------------------------------------------
 
748
 * Copy variable name from Fortran to C
 
749
 *----------------------------------------------------------------------------*/
 
750
 
 
751
void CS_PROCF(fcnmra, FCNMRA)
 
752
(
 
753
 const char          *const fstr,    /* --> Fortran string */
 
754
 int                 *const len,     /* --> String Length  */
 
755
 int                 *const var_id   /* --> Variable Id (1 to n) */
 
756
 CS_ARGF_SUPP_CHAINE
 
757
)
 
758
{
 
759
  int i, i1, i2, l;
 
760
  char *cstr = NULL;
 
761
 
 
762
  assert(*var_id > 0);
 
763
 
 
764
  /* Resize array if necessary */
 
765
 
 
766
  if (*var_id > _cs_gui_max_vars) {
 
767
 
 
768
    if (_cs_gui_max_vars == 0)
 
769
      _cs_gui_max_vars = 16;
 
770
 
 
771
    while (_cs_gui_max_vars <= *var_id)
 
772
      _cs_gui_max_vars *= 2;
 
773
 
 
774
    BFT_REALLOC(_cs_gui_var_rayt, _cs_gui_max_vars, char *);
 
775
    for (i = _cs_gui_last_var; i < _cs_gui_max_vars; i++)
 
776
      _cs_gui_var_rayt[i] = NULL;
 
777
  }
 
778
 
 
779
  /* Compute string length (removing start or end blanks) */
 
780
 
 
781
  for (i1 = 0;
 
782
       i1 < *len && (fstr[i1] == ' ' || fstr[i1] == '\t');
 
783
       i1++);
 
784
 
 
785
  for (i2 = *len - 1;
 
786
       i2 > i1 && (fstr[i2] == ' ' || fstr[i2] == '\t');
 
787
       i2--);
 
788
 
 
789
  l = i2 - i1 + 1;
 
790
 
 
791
  /* Should be called once per variable only */
 
792
  assert(_cs_gui_var_rayt[*var_id - 1] == NULL);
 
793
 
 
794
  if (l > 0) {
 
795
 
 
796
    /* Allocate and copy */
 
797
    BFT_MALLOC(cstr, l + 1, char);
 
798
 
 
799
  for (i = 0 ; i < l ; i++, i1++)
 
800
    cstr[i] = fstr[i1];
 
801
 
 
802
  cstr[l] = '\0';
 
803
 
 
804
    _cs_gui_var_rayt[*var_id - 1] = cstr;
 
805
 
 
806
  }
 
807
 
 
808
  /* Update variable counter */
 
809
  _cs_gui_last_var = *var_id;
 
810
 
 
811
}
 
812
 
 
813
/*----------------------------------------------------------------------------
 
814
 * Copy variable name from C to Fortran
 
815
 *----------------------------------------------------------------------------*/
 
816
 
 
817
void CS_PROCF(cfnmra, CFNMRA)
 
818
(
 
819
 char          *const fstr,    /* --> Fortran string */
 
820
 int           *const len,     /* --> String Length  */
 
821
 int           *const var_id   /* --> Variable Id (1 to n) */
 
822
 CS_ARGF_SUPP_CHAINE
 
823
)
 
824
{
 
825
  int i;
 
826
  int l = 0;
 
827
  char *cstr = NULL;
 
828
 
 
829
  /* Check that variable name was set */
 
830
 
 
831
  if (*var_id < 1 || *var_id > _cs_gui_last_var)
 
832
    bft_error(__FILE__, __LINE__, 0,
 
833
              _("Name of variable %i was never set.\n"), *var_id);
 
834
 
 
835
  /* Copy string */
 
836
 
 
837
  cstr = _cs_gui_var_rayt[*var_id - 1];
 
838
 
 
839
  if (cstr != NULL) {
 
840
 
 
841
  /* Compute string length (removing start or end blanks) */
 
842
 
 
843
  l = strlen(cstr);
 
844
  if (l > *len)
 
845
    l = *len;
 
846
 
 
847
    for (i = 0; i < l; i++)
 
848
      fstr[i] = cstr[i];
 
849
 
 
850
  }
 
851
 
 
852
  /* Pad with blanks if necessary */
 
853
 
 
854
  for (i = l; i < *len; i++)
 
855
    fstr[i] = ' ';
 
856
}
 
857
 
 
858
/*----------------------------------------------------------------------------
 
859
 *  Radiative transfer model usray2.F
 
860
 *----------------------------------------------------------------------------*/
 
861
 
 
862
void CS_PROCF (uiray2, UIRAY2)
 
863
(
 
864
 const    int *const itypfb,
 
865
 const    int *const iparoi,
 
866
 const    int *const iparug,
 
867
 const    int *const ivart,
 
868
          int *const izfrdp,
 
869
          int *const isothp,
 
870
 const    int *const itpimp,
 
871
 const    int *const ipgrno,
 
872
 const    int *const iprefl,
 
873
 const    int *const ifgrno,
 
874
 const    int *const ifrefl,
 
875
 const    int *const nozppm,
 
876
 const    int *const nfabor,
 
877
 const    int *const nvar,
 
878
       double *const epsp,
 
879
       double *const epap,
 
880
       double *const tintp,
 
881
       double *const textp,
 
882
       double *const xlamp,
 
883
       double *const rcodcl
 
884
)
 
885
{
 
886
  int zones = 0;
 
887
  int output_zone_max = 0;
 
888
  int izone;
 
889
  int ith_zone;
 
890
  int ifbr;
 
891
  int j, n;
 
892
  int *faces_list = NULL;
 
893
  int faces = 0;
 
894
  int iok = 0;
 
895
  double tmp = 0.;
 
896
  char *nature = NULL;
 
897
  char *label = NULL;
 
898
 
 
899
  zones   = cs_gui_boundary_zones_number();
 
900
  output_zone_max = _radiative_boundary_output_zone_max();
 
901
 
 
902
 /* Fisrt iteration only : memory allocation */
 
903
  if (boundary == NULL) {
 
904
 
 
905
    BFT_MALLOC(boundary,                           1, cs_radiative_boundary_t);
 
906
    BFT_MALLOC(boundary->label,                zones, char*                  );
 
907
    BFT_MALLOC(boundary->nature,               zones, char*                  );
 
908
    BFT_MALLOC(boundary->output_zone,          zones, int                    );
 
909
    BFT_MALLOC(boundary->type,                 zones, int                    );
 
910
    BFT_MALLOC(boundary->emissivity,           zones, double                 );
 
911
    BFT_MALLOC(boundary->thickness,            zones, double                 );
 
912
    BFT_MALLOC(boundary->thermal_conductivity, zones, double                 );
 
913
    BFT_MALLOC(boundary->external_temp,        zones, double                 );
 
914
    BFT_MALLOC(boundary->internal_temp,        zones, double                 );
 
915
    BFT_MALLOC(boundary->conduction_flux,      zones, double                 );
 
916
 
 
917
    for (izone = 0; izone < zones; izone++) {
 
918
 
 
919
    /* nature, label and description (color or group)
 
920
       of the ith initialization zone */
 
921
 
 
922
        ith_zone = izone + 1;
 
923
 
 
924
        nature = cs_gui_boundary_zone_nature(ith_zone);
 
925
 
 
926
        label = cs_gui_boundary_zone_label(ith_zone);
 
927
 
 
928
        BFT_MALLOC(boundary->label[izone], strlen(label)+1, char);
 
929
        strcpy(boundary->label[izone], label);
 
930
 
 
931
        BFT_MALLOC(boundary->nature[izone], strlen(nature)+1, char);
 
932
        strcpy(boundary->nature[izone], nature);
 
933
 
 
934
        faces_list = cs_gui_get_faces_list(izone,
 
935
                                           boundaries->label[izone],
 
936
                                           *nfabor, *nozppm, &faces);
 
937
 
 
938
        /* Default initialization: these values are the same that in raycli
 
939
           but given on each face in raycli whereas here one does not
 
940
           necessarily have boundary faces (parallism) -> duplication */
 
941
        boundary->type[izone] = -1;
 
942
        boundary->output_zone[izone] = -1;
 
943
        boundary->emissivity[izone] = -1.e12;
 
944
        boundary->thickness[izone] = -1.e12;
 
945
        boundary->thermal_conductivity[izone] = -1.e12;
 
946
        boundary->external_temp[izone] = -1.e12;
 
947
        boundary->internal_temp[izone] = -1.e12;
 
948
        boundary->conduction_flux[izone] = 1.e30;
 
949
 
 
950
        if (cs_gui_strcmp(nature, "wall")) {
 
951
          boundary->type[izone] = _radiative_boundary_type(label,
 
952
                                                           *itpimp, *ipgrno, *iprefl,
 
953
                                                           *ifgrno, *ifrefl);
 
954
          tmp = (double) boundary->output_zone[izone];
 
955
          _radiative_boundary(label, "output_zone", &tmp);
 
956
          boundary->output_zone[izone] = (int) tmp;
 
957
          _radiative_boundary(label, "emissivity", &boundary->emissivity[izone]);
 
958
          _radiative_boundary(label, "thickness", &boundary->thickness[izone]);
 
959
          _radiative_boundary(label, "thermal_conductivity", &boundary->thermal_conductivity[izone]);
 
960
          _radiative_boundary(label, "external_temperature_profile", &boundary->external_temp[izone]);
 
961
          _radiative_boundary(label, "internal_temperature_profile", &boundary->internal_temp[izone]);
 
962
          _radiative_boundary(label, "flux", &boundary->conduction_flux[izone]);
 
963
 
 
964
        } /* if (cs_gui_strcmp(nature, "wall")) */
 
965
 
 
966
        BFT_FREE(nature);
 
967
        BFT_FREE(label);
 
968
 
 
969
    }  /* for izones */
 
970
 
 
971
  }  /* if (boundaries == NULL)*/
 
972
 
 
973
  for (izone = 0; izone < zones; izone++) {
 
974
 
 
975
    /* list of faces building */
 
976
 
 
977
    /*
 
978
     description = cs_gui_boundary_zone_localization(boundary->label[izone]);
 
979
 
 
980
     fvm_selector_get_list(cs_glob_mesh->select_b_faces,
 
981
                           description,
 
982
                           &faces,
 
983
                           faces_list);
 
984
 
 
985
     BFT_FREE(description);
 
986
    */
 
987
 
 
988
    faces_list = cs_gui_get_faces_list(izone,
 
989
                                       boundaries->label[izone],
 
990
                                       *nfabor, *nozppm, &faces);
 
991
 
 
992
    if (cs_gui_strcmp(boundary->nature[izone], "wall"))
 
993
    {
 
994
      for (n = 0; n < faces; n++)
 
995
      {
 
996
        ifbr = faces_list[n]-1;
 
997
 
 
998
        if (itypfb[ifbr] != *iparoi && itypfb[ifbr] != *iparug)
 
999
          bft_error(__FILE__, __LINE__, 0,
 
1000
                    _("One tries to define radiative boundary conditions on boundary which is not a wall.\n"
 
1001
                      "The definition of the boundaries natures given in GUI (wall, inlet, outlet,...) \n"
 
1002
                      "is modified in a users subroutine (like USCLIM, USCPCL,...). \n"
 
1003
                      "The radiative boundary conditions given in GUI must be coherent \n"
 
1004
                      "with these new natures.\n"));
 
1005
 
 
1006
        izfrdp[ifbr] = boundary->output_zone[izone];
 
1007
        isothp[ifbr] = boundary->type[izone];
 
1008
        if (isothp[ifbr] == *itpimp)
 
1009
        {
 
1010
            epsp[ifbr] = boundary->emissivity[izone];
 
1011
            tintp[ifbr] = boundary->internal_temp[izone];
 
1012
        }
 
1013
        else if (isothp[ifbr] == *ipgrno)
 
1014
        {
 
1015
          xlamp[ifbr] = boundary->thermal_conductivity[izone];
 
1016
          epap[ifbr] = boundary->thickness[izone];
 
1017
          textp[ifbr] = boundary->external_temp[izone];
 
1018
          tintp[ifbr] = boundary->internal_temp[izone];
 
1019
          epsp[ifbr] = boundary->emissivity[izone];
 
1020
          if (boundary->emissivity[izone] == 0.)
 
1021
               isothp[ifbr] = *iprefl;
 
1022
        }
 
1023
        else if (isothp[ifbr] == *ifgrno)
 
1024
        {
 
1025
          rcodcl[2 * (*nfabor) * (*nvar) + (*ivart) * (*nfabor) + ifbr] = boundary->conduction_flux[izone];
 
1026
          tintp[ifbr] = boundary->internal_temp[izone];
 
1027
          epsp[ifbr] = boundary->emissivity[izone];
 
1028
          if (boundary->emissivity[izone] != 0.)
 
1029
               isothp[ifbr] = *ifrefl;
 
1030
        }
 
1031
      }
 
1032
 
 
1033
    } else {
 
1034
      j = output_zone_max++;
 
1035
      for (n = 0; n < faces; n++) {
 
1036
        ifbr = faces_list[n]-1;
 
1037
        izfrdp[ifbr] = j;
 
1038
      }
 
1039
    } /* if nature == "wall" */
 
1040
 
 
1041
  } /* for izone */
 
1042
 
 
1043
  BFT_FREE(faces_list);
 
1044
 
 
1045
  iok = 0;
 
1046
  for (n = 0; n < *nfabor; n++) {
 
1047
    if (izfrdp[n] == -1) iok = 1;
 
1048
  }
 
1049
  if (iok == 1) {
 
1050
    bft_printf("Warning: radiative boundary conditions in GUI are not totally defined \n");
 
1051
    if (zones)
 
1052
      bft_printf("These are radiative boundary conditions defined in GUI: \n");
 
1053
    for (izone = 0; izone < zones; izone++) {
 
1054
       bft_printf("  nature: %s label: %s\n", boundary->nature[izone], boundary->label[izone]);
 
1055
       if (cs_gui_strcmp(boundary->nature[izone], "wall")) {
 
1056
         bft_printf("    output_zone = %i\n", boundary->output_zone[izone]);
 
1057
         bft_printf("    type = %i\n", boundary->type[izone]);
 
1058
         bft_printf("    emissivity = %f\n", boundary->emissivity[izone]);
 
1059
         bft_printf("    thickness= %f\n", boundary->thickness[izone]);
 
1060
         bft_printf("    thermal_conductivity = %f\n", boundary->thermal_conductivity[izone]);
 
1061
         bft_printf("    external_temp = %f\n", boundary->external_temp[izone]);
 
1062
         bft_printf("    internal_temp = %f\n", boundary->internal_temp[izone]);
 
1063
         bft_printf("    conduction_flux= %f\n", boundary->conduction_flux[izone]);
 
1064
       }
 
1065
    }
 
1066
  }
 
1067
 
 
1068
#if _XML_DEBUG_
 
1069
  bft_printf("==>UIRAY2\n");
 
1070
  for (izone = 0; izone < zones; izone++) {
 
1071
     bft_printf("--label zone = %s\n", boundary->label[izone]);
 
1072
     if (cs_gui_strcmp(boundary->nature[izone], "wall")) {
 
1073
       bft_printf("----output_zone = %i\n", boundary->output_zone[izone]);
 
1074
       bft_printf("----type = %i\n", boundary->type[izone]);
 
1075
       bft_printf("----emissivity = %f\n", boundary->emissivity[izone]);
 
1076
       bft_printf("----thickness= %f\n", boundary->thickness[izone]);
 
1077
       bft_printf("----thermal_conductivity = %f\n", boundary->thermal_conductivity[izone]);
 
1078
       bft_printf("----external_temp = %f\n", boundary->external_temp[izone]);
 
1079
       bft_printf("----internal_temp = %f\n", boundary->internal_temp[izone]);
 
1080
       bft_printf("----conduction_flux= %f\n", boundary->conduction_flux[izone]);
 
1081
    }
 
1082
  }
 
1083
#endif
 
1084
}
 
1085
 
 
1086
/*----------------------------------------------------------------------------
 
1087
 *  Radiative transfer model usray3.F
 
1088
 *----------------------------------------------------------------------------*/
 
1089
 
 
1090
 
 
1091
void CS_PROCF (uiray3, UIRAY3) (      double *const ck,
 
1092
                                const    int *const ncel,
 
1093
                                         int *const imodak)
 
1094
{
 
1095
    double value = 0.;
 
1096
    int i, type = 0;
 
1097
 
 
1098
    if (!cs_gui_get_activ_thermophysical_model())
 
1099
    {
 
1100
        _radiative_transfer_type("absorption_coefficient", &type);
 
1101
        _radiative_transfer_double("absorption_coefficient", &value);
 
1102
 
 
1103
        if (type == 0)
 
1104
        {
 
1105
            for(i = 0; i < *ncel; i++)
 
1106
                ck[i] = value;
 
1107
        }
 
1108
        else if (type == 3)
 
1109
        {
 
1110
            *imodak = 1;
 
1111
        }
 
1112
#if _XML_DEBUG_
 
1113
    bft_printf("==>UIRAY3\n");
 
1114
    bft_printf("--absorption coefficient type: %d\n", type);
 
1115
    bft_printf("--absorption coefficient by modak: %i\n", imodak);
 
1116
    if (type == 0)
 
1117
        bft_printf("--absorption coefficient value = %f\n", value);
 
1118
#endif
 
1119
    }
 
1120
}
 
1121
 
 
1122
/*-----------------------------------------------------------------------------
 
1123
 * Free memory: clean global private variables.
 
1124
 *
 
1125
 * Fortran Interface:
 
1126
 *
 
1127
 * SUBROUTINE MEMUI2
 
1128
 * *****************
 
1129
 *
 
1130
 *----------------------------------------------------------------------------*/
 
1131
 
 
1132
void CS_PROCF (memui2, MEMUI2) (void)
 
1133
{
 
1134
  int zones = 0;
 
1135
  int i;
 
1136
 
 
1137
  if (boundary != NULL) {
 
1138
 
 
1139
  /* clean memory for global private structure boundaries */
 
1140
 
 
1141
    zones = cs_gui_boundary_zones_number();
 
1142
    for (i=0 ; i < zones ; i++) {
 
1143
      BFT_FREE(boundary->label[i]);
 
1144
      BFT_FREE(boundary->nature[i]);
 
1145
    }
 
1146
    BFT_FREE(boundary->label);
 
1147
    BFT_FREE(boundary->nature);
 
1148
    BFT_FREE(boundary->output_zone);
 
1149
    BFT_FREE(boundary->type);
 
1150
    BFT_FREE(boundary->emissivity);
 
1151
    BFT_FREE(boundary->thickness);
 
1152
    BFT_FREE(boundary->thermal_conductivity);
 
1153
    BFT_FREE(boundary->external_temp);
 
1154
    BFT_FREE(boundary->internal_temp);
 
1155
    BFT_FREE(boundary->conduction_flux);
 
1156
    BFT_FREE(boundary);
 
1157
  }
 
1158
 
 
1159
  /* clean memory for fortran name of variables */
 
1160
 
 
1161
  for (i = 0; i < _cs_gui_max_vars; i++)
 
1162
    BFT_FREE(_cs_gui_var_rayt[i]);
 
1163
  BFT_FREE(_cs_gui_var_rayt);
 
1164
 
 
1165
}
 
1166
 
 
1167
/*----------------------------------------------------------------------------*/
 
1168
 
 
1169
END_C_DECLS