1
/*============================================================================
2
* Définitions des fonctions de base
3
* réalisant les sorties pour post-traitement
4
*============================================================================*/
7
This file is part of Code_Saturne, a general-purpose CFD tool.
9
Copyright (C) 1998-2011 EDF S.A.
11
This program is free software; you can redistribute it and/or modify it under
12
the terms of the GNU General Public License as published by the Free Software
13
Foundation; either version 2 of the License, or (at your option) any later
16
This program is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21
You should have received a copy of the GNU General Public License along with
22
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
23
Street, Fifth Floor, Boston, MA 02110-1301, USA.
26
/*----------------------------------------------------------------------------*/
28
/*============================================================================
30
*============================================================================*/
32
#include "cs_config.h"
35
/*----------------------------------------------------------------------------
36
* Fichiers `include' librairie standard C
37
*----------------------------------------------------------------------------*/
43
/*----------------------------------------------------------------------------
44
* Fichiers `include' visibles du paquetage global "Utilitaire"
45
*----------------------------------------------------------------------------*/
51
/*----------------------------------------------------------------------------
52
* Fichier `include' du paquetage courant associe au fichier courant
53
*----------------------------------------------------------------------------*/
56
#include "ecs_post_ens.h"
57
#include "ecs_post_cgns.h"
58
#include "ecs_post_med.h"
61
/*============================================================================
63
*============================================================================*/
65
/*============================================================================
67
*============================================================================*/
69
/*----------------------------------------------------------------------------
70
* Fonction initialisant une structure `ecs_post_t`
71
*----------------------------------------------------------------------------*/
74
ecs_post__cree_cas(const char *nom_cas)
78
/*xxxxxxxxxxxxxxxxxxxxxxxxxxx Instructions xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
80
assert(nom_cas != NULL);
82
ECS_MALLOC(cas, 1, ecs_post_t);
84
ECS_MALLOC(cas->nom_cas, strlen(nom_cas) + 1, char);
85
strcpy(cas->nom_cas, nom_cas);
88
cas->opt_ens[ECS_POST_TYPE_VOLUME] = false;
89
cas->opt_ens[ECS_POST_TYPE_ERREUR] = false;
91
#if defined(HAVE_CGNS)
94
cas->opt_cgns[ECS_POST_TYPE_VOLUME] = false;
95
cas->opt_cgns[ECS_POST_TYPE_ERREUR] = false;
97
#endif /* HAVE_CGNS */
102
cas->opt_med[ECS_POST_TYPE_VOLUME] = false;
103
cas->opt_med[ECS_POST_TYPE_ERREUR] = false;
105
#endif /* HAVE_MED */
110
/*----------------------------------------------------------------------------
111
* Fonction détruisant une structure `ecs_post_t`
112
*----------------------------------------------------------------------------*/
115
ecs_post__detruit_cas(ecs_post_t *cas)
117
/*xxxxxxxxxxxxxxxxxxxxxxxxxxx Instructions xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
122
if (cas->cas_ens != NULL)
123
ecs_post_ens__detruit_cas(cas->cas_ens);
125
#if defined(HAVE_CGNS)
127
if (cas->cas_cgns != NULL)
128
ecs_post_cgns__detruit_cas(cas->cas_cgns);
132
#if defined(HAVE_MED)
134
if (cas->cas_med != NULL)
135
ecs_post_med__detruit_cas(cas->cas_med);
139
ECS_FREE(cas->nom_cas);
146
/*----------------------------------------------------------------------------*/