1
#ifndef __FVM_GROUP_H__
2
#define __FVM_GROUP_H__
4
/*============================================================================
5
* Definition of entity groups
6
*============================================================================*/
9
This file is part of Code_Saturne, a general-purpose CFD tool.
11
Copyright (C) 1998-2011 EDF S.A.
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
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
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.
28
/*----------------------------------------------------------------------------*/
30
/*----------------------------------------------------------------------------
32
*----------------------------------------------------------------------------*/
36
/*----------------------------------------------------------------------------*/
41
} /* Fake brace to force Emacs auto-indentation back to column 0 */
43
#endif /* __cplusplus */
45
/*=============================================================================
47
*============================================================================*/
49
/*============================================================================
51
*============================================================================*/
53
/*----------------------------------------------------------------------------
54
* Structure defining (equivalence) classes of groups
55
*----------------------------------------------------------------------------*/
58
Pointer to opaque group class and group class set objects.
59
The structure contents are private, and are defined in fvm_group.c
62
typedef struct _fvm_group_class_t fvm_group_class_t;
63
typedef struct _fvm_group_class_set_t fvm_group_class_set_t;
65
/*=============================================================================
66
* Static global variables
67
*============================================================================*/
69
/*=============================================================================
70
* Public function prototypes
71
*============================================================================*/
73
/*----------------------------------------------------------------------------
74
* Return the number of groups of a group class.
77
* this_group_class <-- pointer to group class structure
80
* number of groups in group class
81
*----------------------------------------------------------------------------*/
84
fvm_group_class_get_n_groups(const fvm_group_class_t *this_group_class);
86
/*----------------------------------------------------------------------------
87
* Return the array of group names of a group class.
90
* this_group_class <-- pointer to group class structure
93
* pointer to array of group names in group class
94
*----------------------------------------------------------------------------*/
97
fvm_group_class_get_group_names(const fvm_group_class_t *this_group_class);
99
/*----------------------------------------------------------------------------
100
* Creation of a group class set structure.
103
* pointer to created group class set structure
104
*----------------------------------------------------------------------------*/
106
fvm_group_class_set_t *
107
fvm_group_class_set_create(void);
109
/*----------------------------------------------------------------------------
110
* Add a group class to a set.
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
*----------------------------------------------------------------------------*/
119
fvm_group_class_set_add(fvm_group_class_set_t *this_group_class_set,
121
const char **group_names);
123
/*----------------------------------------------------------------------------
124
* Destruction of a group class set structure.
127
* this_class_set <-- pointer to structure which should be destroyed
131
*----------------------------------------------------------------------------*/
133
fvm_group_class_set_t *
134
fvm_group_class_set_destroy(fvm_group_class_set_t *this_class_set);
136
/*----------------------------------------------------------------------------
137
* Return number of classes in a group class set.
140
* this_group_class_set <-> pointer to group class set structure
143
* number of classes in a group class set
144
*----------------------------------------------------------------------------*/
147
fvm_group_class_set_size(const fvm_group_class_set_t *this_group_class_set);
149
/*----------------------------------------------------------------------------
150
* Return pointer to a given group class in a group class set.
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)
157
* pointer to group class structure
158
*----------------------------------------------------------------------------*/
160
const fvm_group_class_t *
161
fvm_group_class_set_get(const fvm_group_class_set_t *this_group_class_set,
164
/*----------------------------------------------------------------------------
165
* Copy a group class set, optionally with a renumbering array.
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
173
* pointer to new copy of group class set
174
*----------------------------------------------------------------------------*/
176
fvm_group_class_set_t *
177
fvm_group_class_set_copy(const fvm_group_class_set_t *this_group_class_set,
181
/*----------------------------------------------------------------------------
182
* Dump printout of a group class set
185
* this_class_set <-- pointer to group class set to be dumped
186
*----------------------------------------------------------------------------*/
189
fvm_group_class_set_dump(const fvm_group_class_set_t *this_group_class_set);
191
/*----------------------------------------------------------------------------*/
195
#endif /* __cplusplus */
197
#endif /* __FVM_GROUP_H__ */