My Project
programmer's documentation
fvm_group.h
Go to the documentation of this file.
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-2019 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 #include "cs_defs.h"
31 
32 /*----------------------------------------------------------------------------
33  * Local headers
34  *----------------------------------------------------------------------------*/
35 
36 #include "fvm_defs.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*=============================================================================
43  * Macro definitions
44  *============================================================================*/
45 
46 /*============================================================================
47  * Type definitions
48  *============================================================================*/
49 
50 /*----------------------------------------------------------------------------
51  * Structure defining (equivalence) classes of groups
52  *----------------------------------------------------------------------------*/
53 
54 /*
55  Pointer to opaque group class and group class set objects.
56  The structure contents are private, and are defined in fvm_group.c
57 */
58 
59 typedef struct _fvm_group_class_t fvm_group_class_t;
60 typedef struct _fvm_group_class_set_t fvm_group_class_set_t;
61 
62 /*=============================================================================
63  * Static global variables
64  *============================================================================*/
65 
66 /*=============================================================================
67  * Public function prototypes
68  *============================================================================*/
69 
70 /*----------------------------------------------------------------------------
71  * Return the number of groups of a group class.
72  *
73  * parameters:
74  * this_group_class <-- pointer to group class structure
75  *
76  * returns:
77  * number of groups in group class
78  *----------------------------------------------------------------------------*/
79 
80 int
81 fvm_group_class_get_n_groups(const fvm_group_class_t *this_group_class);
82 
83 /*----------------------------------------------------------------------------
84  * Return the array of group names of a group class.
85  *
86  * parameters:
87  * this_group_class <-- pointer to group class structure
88  *
89  * returns:
90  * pointer to array of group names in group class
91  *----------------------------------------------------------------------------*/
92 
93 const char **
94 fvm_group_class_get_group_names(const fvm_group_class_t *this_group_class);
95 
96 /*----------------------------------------------------------------------------
97  * Creation of a group class set structure.
98  *
99  * returns:
100  * pointer to created group class set structure
101  *----------------------------------------------------------------------------*/
102 
105 
106 /*----------------------------------------------------------------------------
107  * Add a group class to a set.
108  *
109  * parameters:
110  * this_group_class_set <-> pointer to group class set structure
111  * n_groups <-- number of groups in class
112  * group_names <-- array of group names
113  *----------------------------------------------------------------------------*/
114 
115 void
116 fvm_group_class_set_add(fvm_group_class_set_t *this_group_class_set,
117  int n_groups,
118  const char **group_names);
119 
120 /*----------------------------------------------------------------------------
121  * Destruction of a group class set structure.
122  *
123  * parameters:
124  * this_class_set <-- pointer to structure which should be destroyed
125  *
126  * returns:
127  * NULL pointer
128  *----------------------------------------------------------------------------*/
129 
132 
133 /*----------------------------------------------------------------------------
134  * Return number of classes in a group class set.
135  *
136  * parameters:
137  * this_group_class_set <-> pointer to group class set structure
138  *
139  * returns:
140  * number of classes in a group class set
141  *----------------------------------------------------------------------------*/
142 
143 int
144 fvm_group_class_set_size(const fvm_group_class_set_t *this_group_class_set);
145 
146 /*----------------------------------------------------------------------------
147  * Return pointer to a given group class in a group class set.
148  *
149  * parameters:
150  * this_group_class_set <-- pointer to group class set structure
151  * group_class_id <-- index of group class in set (0 to n-1)
152  *
153  * returns:
154  * pointer to group class structure
155  *----------------------------------------------------------------------------*/
156 
157 const fvm_group_class_t *
158 fvm_group_class_set_get(const fvm_group_class_set_t *this_group_class_set,
159  int group_class_id);
160 
161 /*----------------------------------------------------------------------------
162  * Copy a group class set, optionally with a renumbering array.
163  *
164  * parameters:
165  * this_class_set <-- pointer to group class set to be copied
166  * n_renums <-- number of group classes
167  * renum <-- group class renumbering (1 to n), or NULL
168  *
169  * returns:
170  * pointer to new copy of group class set
171  *----------------------------------------------------------------------------*/
172 
174 fvm_group_class_set_copy(const fvm_group_class_set_t *this_group_class_set,
175  int n_renums,
176  int renum[]);
177 
178 /*----------------------------------------------------------------------------
179  * Dump printout of a group class set
180  *
181  * parameters:
182  * this_class_set <-- pointer to group class set to be dumped
183  *----------------------------------------------------------------------------*/
184 
185 void
186 fvm_group_class_set_dump(const fvm_group_class_set_t *this_group_class_set);
187 
188 /*----------------------------------------------------------------------------*/
189 
191 
192 #endif /* __FVM_GROUP_H__ */
cs_defs.h
fvm_group_class_set_t
struct _fvm_group_class_set_t fvm_group_class_set_t
Definition: fvm_group.h:60
fvm_group_class_set_destroy
fvm_group_class_set_t * fvm_group_class_set_destroy(fvm_group_class_set_t *this_class_set)
Definition: fvm_group.c:442
fvm_group_class_set_copy
fvm_group_class_set_t * fvm_group_class_set_copy(const fvm_group_class_set_t *this_group_class_set, int n_renums, int renum[])
Definition: fvm_group.c:525
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
fvm_group_class_t
struct _fvm_group_class_t fvm_group_class_t
Definition: fvm_group.h:59
fvm_group_class_set_dump
void fvm_group_class_set_dump(const fvm_group_class_set_t *this_group_class_set)
Definition: fvm_group.c:563
fvm_group_class_get_group_names
const char ** fvm_group_class_get_group_names(const fvm_group_class_t *this_group_class)
Definition: fvm_group.c:350
fvm_group_class_set_add
void fvm_group_class_set_add(fvm_group_class_set_t *this_group_class_set, int n_groups, const char **group_names)
Definition: fvm_group.c:394
fvm_group_class_set_size
int fvm_group_class_set_size(const fvm_group_class_set_t *this_group_class_set)
Definition: fvm_group.c:477
fvm_defs.h
fvm_group_class_set_get
const fvm_group_class_t * fvm_group_class_set_get(const fvm_group_class_set_t *this_group_class_set, int group_class_id)
Definition: fvm_group.c:499
fvm_group_class_set_create
fvm_group_class_set_t * fvm_group_class_set_create(void)
Definition: fvm_group.c:369
fvm_group_class_get_n_groups
int fvm_group_class_get_n_groups(const fvm_group_class_t *this_group_class)
Definition: fvm_group.c:328