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

« back to all changes in this revision

Viewing changes to src/fvm/fvm_group.h

  • 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
#ifndef __FVM_GROUP_H__
 
2
#define __FVM_GROUP_H__
 
3
 
 
4
/*============================================================================
 
5
 * Definition of entity groups
 
6
 *============================================================================*/
 
7
 
 
8
/*
 
9
  This file is part of Code_Saturne, a general-purpose CFD tool.
 
10
 
 
11
  Copyright (C) 1998-2011 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 "fvm_defs.h"
 
35
 
 
36
/*----------------------------------------------------------------------------*/
 
37
 
 
38
#ifdef __cplusplus
 
39
extern "C" {
 
40
#if 0
 
41
} /* Fake brace to force Emacs auto-indentation back to column 0 */
 
42
#endif
 
43
#endif /* __cplusplus */
 
44
 
 
45
/*=============================================================================
 
46
 * Macro definitions
 
47
 *============================================================================*/
 
48
 
 
49
/*============================================================================
 
50
 * Type definitions
 
51
 *============================================================================*/
 
52
 
 
53
/*----------------------------------------------------------------------------
 
54
 * Structure defining (equivalence) classes of groups
 
55
 *----------------------------------------------------------------------------*/
 
56
 
 
57
/*
 
58
  Pointer to opaque group class and group class set objects.
 
59
  The structure contents are private, and are defined in fvm_group.c
 
60
*/
 
61
 
 
62
typedef struct _fvm_group_class_t     fvm_group_class_t;
 
63
typedef struct _fvm_group_class_set_t fvm_group_class_set_t;
 
64
 
 
65
/*=============================================================================
 
66
 * Static global variables
 
67
 *============================================================================*/
 
68
 
 
69
/*=============================================================================
 
70
 * Public function prototypes
 
71
 *============================================================================*/
 
72
 
 
73
/*----------------------------------------------------------------------------
 
74
 * Return the number of groups of a group class.
 
75
 *
 
76
 * parameters:
 
77
 *   this_group_class <-- pointer to group class structure
 
78
 *
 
79
 * returns:
 
80
 *   number of groups in group class
 
81
 *----------------------------------------------------------------------------*/
 
82
 
 
83
int
 
84
fvm_group_class_get_n_groups(const fvm_group_class_t  *this_group_class);
 
85
 
 
86
/*----------------------------------------------------------------------------
 
87
 * Return the array of group names of a group class.
 
88
 *
 
89
 * parameters:
 
90
 *   this_group_class <-- pointer to group class structure
 
91
 *
 
92
 * returns:
 
93
 *   pointer to array of group names in group class
 
94
 *----------------------------------------------------------------------------*/
 
95
 
 
96
const char **
 
97
fvm_group_class_get_group_names(const fvm_group_class_t  *this_group_class);
 
98
 
 
99
/*----------------------------------------------------------------------------
 
100
 * Creation of a group class set structure.
 
101
 *
 
102
 * returns:
 
103
 *   pointer to created group class set structure
 
104
 *----------------------------------------------------------------------------*/
 
105
 
 
106
fvm_group_class_set_t *
 
107
fvm_group_class_set_create(void);
 
108
 
 
109
/*----------------------------------------------------------------------------
 
110
 * Add a group class to a set.
 
111
 *
 
112
 * parameters:
 
113
 *   this_group_class_set <-> pointer to group class set structure
 
114
 *   n_groups             <-- number of groups in class
 
115
 *   group_names          <-- array of group names
 
116
 *----------------------------------------------------------------------------*/
 
117
 
 
118
void
 
119
fvm_group_class_set_add(fvm_group_class_set_t   *this_group_class_set,
 
120
                        int                      n_groups,
 
121
                        const char             **group_names);
 
122
 
 
123
/*----------------------------------------------------------------------------
 
124
 * Destruction of a group class set structure.
 
125
 *
 
126
 * parameters:
 
127
 *   this_class_set <-- pointer to structure which should be destroyed
 
128
 *
 
129
 * returns:
 
130
 *   NULL pointer
 
131
 *----------------------------------------------------------------------------*/
 
132
 
 
133
fvm_group_class_set_t *
 
134
fvm_group_class_set_destroy(fvm_group_class_set_t  *this_class_set);
 
135
 
 
136
/*----------------------------------------------------------------------------
 
137
 * Return number of classes in a group class set.
 
138
 *
 
139
 * parameters:
 
140
 *   this_group_class_set <-> pointer to group class set structure
 
141
 *
 
142
 * returns:
 
143
 *   number of classes in a group class set
 
144
 *----------------------------------------------------------------------------*/
 
145
 
 
146
int
 
147
fvm_group_class_set_size(const fvm_group_class_set_t  *this_group_class_set);
 
148
 
 
149
/*----------------------------------------------------------------------------
 
150
 * Return pointer to a given group class in a group class set.
 
151
 *
 
152
 * parameters:
 
153
 *   this_group_class_set <-- pointer to group class set structure
 
154
 *   group_class_id       <-- index of group class in set (0 to n-1)
 
155
 *
 
156
 * returns:
 
157
 *   pointer to group class structure
 
158
 *----------------------------------------------------------------------------*/
 
159
 
 
160
const fvm_group_class_t *
 
161
fvm_group_class_set_get(const fvm_group_class_set_t  *this_group_class_set,
 
162
                        int                           group_class_id);
 
163
 
 
164
/*----------------------------------------------------------------------------
 
165
 * Copy a group class set, optionally with a renumbering array.
 
166
 *
 
167
 * parameters:
 
168
 *   this_class_set <-- pointer to group class set to be copied
 
169
 *   n_renums       <-- number of group classes
 
170
 *   renum          <-- group class renumbering (1 to n), or NULL
 
171
 *
 
172
 * returns:
 
173
 *   pointer to new copy of group class set
 
174
 *----------------------------------------------------------------------------*/
 
175
 
 
176
fvm_group_class_set_t  *
 
177
fvm_group_class_set_copy(const fvm_group_class_set_t  *this_group_class_set,
 
178
                         int                           n_renums,
 
179
                         int                           renum[]);
 
180
 
 
181
/*----------------------------------------------------------------------------
 
182
 * Dump printout of a group class set
 
183
 *
 
184
 * parameters:
 
185
 *   this_class_set      <-- pointer to group class set to be dumped
 
186
 *----------------------------------------------------------------------------*/
 
187
 
 
188
void
 
189
fvm_group_class_set_dump(const fvm_group_class_set_t  *this_group_class_set);
 
190
 
 
191
/*----------------------------------------------------------------------------*/
 
192
 
 
193
#ifdef __cplusplus
 
194
}
 
195
#endif /* __cplusplus */
 
196
 
 
197
#endif /* __FVM_GROUP_H__ */