8.1
general documentation
cs_interface.h
Go to the documentation of this file.
1 #ifndef __CS_INTERFACE_H__
2 #define __CS_INTERFACE_H__
3 
4 /*============================================================================
5  * Main structure for handling of interfaces associating mesh elements
6  * (such as inter-processor or periodic connectivity between cells, faces,
7  * or vertices);
8  *============================================================================*/
9 
10 /*
11  This file is part of code_saturne, a general-purpose CFD tool.
12 
13  Copyright (C) 1998-2023 EDF S.A.
14 
15  This program is free software; you can redistribute it and/or modify it under
16  the terms of the GNU General Public License as published by the Free Software
17  Foundation; either version 2 of the License, or (at your option) any later
18  version.
19 
20  This program is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23  details.
24 
25  You should have received a copy of the GNU General Public License along with
26  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
27  Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 */
29 
30 /*----------------------------------------------------------------------------*/
31 
32 /*----------------------------------------------------------------------------
33  * Local headers
34  *----------------------------------------------------------------------------*/
35 
36 #include "fvm_defs.h"
37 #include "fvm_periodicity.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
43 /*=============================================================================
44  * Macro definitions
45  *============================================================================*/
46 
47 /*============================================================================
48  * Type definitions
49  *============================================================================*/
50 
51 /*----------------------------------------------------------------------------
52  * Structure defining an I/O numbering scheme
53  *----------------------------------------------------------------------------*/
54 
55 /*
56  Pointer to structures representing an interface and a list of interfaces.
57  The structures themselves are private, and are defined in cs_interface.c
58 */
59 
60 typedef struct _cs_interface_t cs_interface_t;
61 typedef struct _cs_interface_set_t cs_interface_set_t;
62 
63 /*=============================================================================
64  * Static global variables
65  *============================================================================*/
66 
67 /*=============================================================================
68  * Public function prototypes
69  *============================================================================*/
70 
71 /*----------------------------------------------------------------------------*/
72 /*
73  * \brief Return process rank associated with an interface's distant elements.
74  *
75  * \param[in] itf pointer to interface structure
76  *
77  * \return process rank associated with the interface's distant elements
78  */
79 /*----------------------------------------------------------------------------*/
80 
81 int
83 
84 /*----------------------------------------------------------------------------*/
85 /*
86  * \brief Return number of local and distant elements defining an interface.
87  *
88  * \param[in] itf pointer to interface structure
89  *
90  * \return number of local and distant elements defining the interface
91  */
92 /*----------------------------------------------------------------------------*/
93 
96 
97 /*----------------------------------------------------------------------------*/
98 /*
99  * \brief Return pointer to array of local element ids defining an interface.
100  *
101  * The size of the array may be obtained by cs_interface_size().
102  * The array is owned by the interface structure, and is not copied
103  * (hence the constant qualifier for the return value).
104  *
105  * \param[in] itf pointer to interface structure
106  *
107  * \return pointer to array of local element ids (0 to n-1) defining
108  * the interface
109  */
110 /*----------------------------------------------------------------------------*/
111 
112 const cs_lnum_t *
114 
115 /*----------------------------------------------------------------------------*/
116 /*
117  * \brief Return pointer to array of matching element ids defining an interface.
118  *
119  * This array is only available if cs_interface_set_add_match_ids() has
120  * been called for the containing interface set.
121  *
122  * The size of the array may be obtained by cs_interface_size().
123  * The array is owned by the interface structure, and is not copied
124  * (hence the constant qualifier for the return value).
125  *
126  * \param[in] itf pointer to interface structure
127  *
128  * \return pointer to array of local element ids (0 to n-1) defining
129  * the interface
130  */
131 /*----------------------------------------------------------------------------*/
132 
133 const cs_lnum_t *
135 
136 /*----------------------------------------------------------------------------*/
137 /*
138  * \brief Return size of index of sub-sections for different transformations.
139  *
140  * The index is applicable to both local_num and distant_num arrays,
141  * with purely parallel equivalences appearing at position 0, and
142  * equivalences through periodic transform i at position i+1;
143  * Its size should thus be equal to 1 + number of periodic transforms + 1,
144  * In absence of periodicity, it may be 0, as the index is not needed.
145  *
146  * \param[in] itf pointer to interface structure
147  *
148  * \return transform index size for the interface
149  */
150 /*----------------------------------------------------------------------------*/
151 
152 cs_lnum_t
154 
155 /*----------------------------------------------------------------------------*/
156 /*
157  * \brief Return pointer to index of sub-sections for different transformations.
158  *
159  * The index is applicable to both local_num and distant_num arrays,
160  * with purely parallel equivalences appearing at position 0, and
161  * equivalences through periodic transform i at position i+1;
162  * In absence of periodicity, it may be NULL, as it is not needed.
163  *
164  * \param[in] itf pointer to interface structure
165  *
166  * \return pointer to transform index for the interface
167  */
168 /*----------------------------------------------------------------------------*/
169 
170 const cs_lnum_t *
172 
173 /*----------------------------------------------------------------------------*/
174 /*
175  * \brief Creation of a list of interfaces between elements of a same type.
176  *
177  * These interfaces may be used to identify equivalent vertices or faces using
178  * domain splitting, as well as periodic elements (on the same or on
179  * distant ranks).
180  *
181  * Note that periodicity information will be completed and made consistent
182  * based on the input, so that if a periodic couple is defined on a given rank,
183  * the reverse couple wil be defined, whether it is also defined on the same
184  * or a different rank.
185  *
186  * In addition, multiple periodicity interfaces will be built automatically
187  * if the periodicity structure provides for composed periodicities, so they
188  * need not be defined prior to this function being called.
189  *
190  * \param[in] n_elts number of local elements considered
191  * (size of parent_element_id[])
192  * \param[in] parent_element_id pointer to list of selected elements
193  * local ids (0 to n-1), or NULL if all
194  * first n_elts elements are used
195  * \param[in] global_number pointer to list of global (i.e. domain
196  * splitting independent) element numbers
197  * \param[in] periodicity periodicity information (NULL if none)
198  * \param[in] n_periodic_lists number of periodic lists (may be local)
199  * \param[in] periodicity_num periodicity number (1 to n) associated
200  * with each periodic list (primary
201  * periodicities only)
202  * \param[in] n_periodic_couples number of periodic couples associated
203  * with each periodic list
204  * \param[in] periodic_couples array indicating periodic couples
205  * (interlaced, using global numberings)
206  * for each list
207  *
208  * \return pointer to list of interfaces (possibly NULL in serial mode)
209  */
210 /*----------------------------------------------------------------------------*/
211 
214  const cs_lnum_t parent_element_id[],
215  const cs_gnum_t global_number[],
216  const fvm_periodicity_t *periodicity,
217  int n_periodic_lists,
218  const int periodicity_num[],
219  const cs_lnum_t n_periodic_couples[],
220  const cs_gnum_t *const periodic_couples[]);
221 
222 /*----------------------------------------------------------------------------*/
223 /*
224  * \brief Destruction of an interface set.
225  *
226  * \param[in, out] ifs pointer to pointer to structure to destroy
227  */
228 /*----------------------------------------------------------------------------*/
229 
230 void
232 
233 /*----------------------------------------------------------------------------*/
234 /*
235  * \brief Duplicate an interface set, applying an optional constant stride.
236  *
237  * \param[in, out] ifs pointer to interface set structure
238  * \param[in] stride if > 1, each element subdivided in stride elements
239  *
240  * \return pointer to new interface set
241  */
242 /*----------------------------------------------------------------------------*/
243 
246  cs_lnum_t stride);
247 
248 /*----------------------------------------------------------------------------*/
249 /*
250  * \brief Duplicate an interface set for coupled variable blocks.
251  *
252  * \param[in, out] ifs pointer to interface set structure
253  * \param[in] block_size local block size (number of elements)
254  * \param[in] n_blocks number of associated blocks
255  *
256  * \return pointer to new interface set
257  */
258 /*----------------------------------------------------------------------------*/
259 
262  cs_lnum_t block_size,
263  cs_lnum_t n_blocks);
264 
265 /*----------------------------------------------------------------------------*/
266 /*
267  * \brief Return number of interfaces associated with an interface set.
268  *
269  * \param[in] ifs pointer to interface set structure
270  *
271  * \return number of interfaces in set
272  */
273 /*----------------------------------------------------------------------------*/
274 
275 int
277 
278 /*----------------------------------------------------------------------------*/
279 /*
280  * \brief Return total number of elements in interface set.
281  *
282  * This is equal to the sum of cs_interface_size() on the cs_interface_size()
283  * interfaces of a set.
284  *
285  * \param[in] ifs pointer to interface set structure
286  *
287  * \return number of interfaces in set
288  */
289 /*----------------------------------------------------------------------------*/
290 
291 cs_lnum_t
293 
294 /*----------------------------------------------------------------------------*/
295 /*
296  * \brief Return pointer to a given interface in an interface set.
297  *
298  * \param[in] ifs pointer to interface set structure
299  * \param[in] interface_id index of interface in set (0 to n-1)
300  *
301  * \return pointer to interface structure
302  */
303 /*----------------------------------------------------------------------------*/
304 
305 const cs_interface_t *
307  int interface_id);
308 
309 /*----------------------------------------------------------------------------*/
310 /*
311  * \brief Return pointer to the periocicity structure associated of an
312  * interface set.
313  *
314  * \param[in] ifs pointer to interface set structure
315  *
316  * \return pointer to periodicity structure, or NULL
317  */
318 /*----------------------------------------------------------------------------*/
319 
320 const fvm_periodicity_t *
322 
323 /*----------------------------------------------------------------------------*/
324 /*
325  * \brief Apply renumbering of elements referenced by an interface set.
326  *
327  * For any given element i, a negative old_to_new[i] value means that that
328  * element does not appear anymore in the new numbering.
329  *
330  * \param[in, out] ifs pointer to interface set structure
331  * \param[in] old_to_new renumbering array (0 to n-1 numbering)
332  */
333 /*----------------------------------------------------------------------------*/
334 
335 void
337  const cs_lnum_t old_to_new[]);
338 
339 /*----------------------------------------------------------------------------*/
340 /*
341  * \brief Copy array from distant or matching interface elements to
342  * local elements.
343  *
344  * Source and destination arrays define values for all elements in the
345  * interface set (i.e. all elements listed by cs_interface_get_elt_ids()
346  * when looping over interfaces of a set.
347  *
348  * \param[in] ifs pointer to interface set structure
349  * \param[in] datatype type of data considered
350  * \param[in] stride number of values per entity (interlaced)
351  * \param[in] src_on_parent true if source array is defined on the elements
352  * defined by ifs->elt_ids, false if source array
353  * defined directly on cs_interface_set_n_elts(ifs)
354  * \param[in] src source array (size:
355  * cs_interface_set_n_elts(ifs)*stride
356  * or parent array size * stride)
357  * \param[out] dest destination array (size:
358  * cs_interface_set_n_elts(ifs)*stride)
359  */
360 /*----------------------------------------------------------------------------*/
361 
362 void
364  cs_datatype_t datatype,
365  int stride,
366  bool src_on_parent,
367  const void *src,
368  void *dest);
369 
370 /*----------------------------------------------------------------------------*/
371 /*
372  * \brief Copy indexed array from distant or matching interface elements to
373  * local elements.
374  *
375  * Source and destination arrays define values for all elements in the
376  * interface set (i.e. all elements listed by cs_interface_get_elt_ids()
377  * when looping over interfaces of a set.
378  *
379  * Note that when copying the same type of data to all matching elements,
380  * the source and destination index may be the same, if src_on_parent is true.
381  * To avoid requiring a separate destination index, the dest_index argument
382  * may be set to NULL, in which case it is assumed that source and destination
383  * are symmetric, and src_index is sufficient to determine sizes (whether
384  * src_on_parent is true or not).
385  *
386  * In some use cases, for example when copying values only in one direction,
387  * the copying is not symmetric, so both a source and destination buffer must
388  * be provided.
389  *
390  * \param[in] ifs pointer to interface set structure
391  * \param[in] datatype type of data considered
392  * \param[in] src_on_parent true if source array is defined on the elements
393  * defined by ifs->elt_ids, false if source array
394  * defined directly on cs_interface_set_n_elts(ifs)
395  * \param[in] src_index index for source array
396  * \param[in] dest_index index for destination array, or NULL
397  * \param[in] src source array (size:
398  * src_index[cs_interface_set_n_elts(ifs)]
399  * or parent array size)
400  * \param[out] dest destination array (size:
401  * src_index[cs_interface_set_n_elts(ifs)] or
402  * dest_index[cs_interface_set_n_elts(ifs)])
403  */
404 /*----------------------------------------------------------------------------*/
405 
406 void
408  cs_datatype_t datatype,
409  bool src_on_parent,
410  const cs_lnum_t src_index[],
411  const cs_lnum_t dest_index[],
412  const void *src,
413  void *dest);
414 
415 /*----------------------------------------------------------------------------*/
416 /*
417  * \brief Update values using the bitwise inclusive or operation for elements
418  * associated with an interface set.
419  *
420  * On input, the variable array should contain local contributions. On output,
421  * contributions from matching elements on parallel or periodic boundaries
422  * have been processed.
423  *
424  * Only the values of elements belonging to the interfaces are modified.
425  *
426  * \param[in] ifs pointer to a fvm_interface_set_t structure
427  * \param[in] n_elts number of elements in var buffer
428  * \param[in] stride number of values (non interlaced) by entity
429  * \param[in] interlace true if variable is interlaced (for stride > 1)
430  * \param[in] datatype type of data considered
431  * \param[in, out] var variable buffer
432  */
433 /*----------------------------------------------------------------------------*/
434 
435 void
437  cs_lnum_t n_elts,
438  cs_lnum_t stride,
439  bool interlace,
440  cs_datatype_t datatype,
441  void *var);
442 
443 /*----------------------------------------------------------------------------*/
444 /*
445  * \brief Update the sum of values for elements associated with an
446  * interface set.
447  *
448  * On input, the variable array should contain local contributions. On output,
449  * contributions from matching elements on parallel or periodic boundaries
450  * have been added.
451  *
452  * Only the values of elements belonging to the interfaces are modified.
453  *
454  * \param[in] ifs pointer to a fvm_interface_set_t structure
455  * \param[in] n_elts number of elements in var buffer
456  * \param[in] stride number of values (non interlaced) by entity
457  * \param[in] interlace true if variable is interlaced (for stride > 1)
458  * \param[in] datatype type of data considered
459  * \param[in, out] var variable buffer
460  */
461 /*----------------------------------------------------------------------------*/
462 
463 void
465  cs_lnum_t n_elts,
466  cs_lnum_t stride,
467  bool interlace,
468  cs_datatype_t datatype,
469  void *var);
470 
471 /*----------------------------------------------------------------------------*/
472 /*
473  * \brief Update the sum of values for elements associated with an
474  * interface set, allowing control over periodicity.
475  *
476  * On input, the variable array should contain local contributions. On output,
477  * contributions from matching elements on parallel or periodic boundaries
478  * have been added.
479  *
480  * Only the values of elements belonging to the interfaces are modified.
481  *
482  * \param[in] ifs pointer to a fvm_interface_set_t structure
483  * \param[in] n_elts number of elements in var buffer
484  * \param[in] stride number of values (non interlaced) by entity
485  * \param[in] interlace true if variable is interlaced (for stride > 1)
486  * \param[in] datatype type of data considered
487  * \param[in] tr_ignore if > 0, ignore periodicity with rotation;
488  * if > 1, ignore all periodic transforms
489  * \param[in, out] var variable buffer
490  */
491 /*----------------------------------------------------------------------------*/
492 
493 void
495  cs_lnum_t n_elts,
496  cs_lnum_t stride,
497  bool interlace,
498  cs_datatype_t datatype,
499  int tr_ignore,
500  void *var);
501 
502 /*----------------------------------------------------------------------------*/
503 /*
504  * \brief Update the minimum value of elements associated with an interface
505  * set.
506  *
507  * On input, the variable array should contain local contributions. On output,
508  * contributions from matching elements on parallel or periodic boundaries
509  * have been updated.
510  *
511  * Only the values of elements belonging to the interfaces are modified.
512  *
513  * \param[in] ifs pointer to a cs_interface_set_t structure
514  * \param[in] n_elts number of elements in var buffer
515  * \param[in] stride number of values (non interlaced) by entity
516  * \param[in] interlace true if variable is interlaced (for stride > 1)
517  * \param[in] datatype type of data considered
518  * \param[in, out] var variable buffer
519  */
520 /*----------------------------------------------------------------------------*/
521 
522 void
524  cs_lnum_t n_elts,
525  cs_lnum_t stride,
526  bool interlace,
527  cs_datatype_t datatype,
528  void *var);
529 
530 /*----------------------------------------------------------------------------*/
531 /*
532  * \brief Update the maximum value of elements associated with an interface
533  * set.
534  *
535  * On input, the variable array should contain local contributions. On output,
536  * contributions from matching elements on parallel or periodic boundaries
537  * have been updated.
538  *
539  * Only the values of elements belonging to the interfaces are modified.
540  *
541  * \param[in] ifs pointer to a cs_interface_set_t structure
542  * \param[in] n_elts number of elements in var buffer
543  * \param[in] stride number of values (non interlaced) by entity
544  * \param[in] interlace true if variable is interlaced (for stride > 1)
545  * \param[in] datatype type of data considered
546  * \param[in, out] var variable buffer
547  */
548 /*----------------------------------------------------------------------------*/
549 
550 void
552  cs_lnum_t n_elts,
553  cs_lnum_t stride,
554  bool interlace,
555  cs_datatype_t datatype,
556  void *var);
557 
558 /*----------------------------------------------------------------------------*/
559 /*
560  * \brief Update the maximum of values for elements associated with an
561  * interface set, allowing control over periodicity.
562  *
563  * On input, the variable array should contain local contributions. On output,
564  * contributions from matching elements on parallel or periodic boundaries
565  * have been added.
566  *
567  * Only the values of elements belonging to the interfaces are modified.
568  *
569  * \param[in] ifs pointer to a fvm_interface_set_t structure
570  * \param[in] n_elts number of elements in var buffer
571  * \param[in] stride number of values (non interlaced) by entity
572  * \param[in] interlace true if variable is interlaced (for stride > 1)
573  * \param[in] datatype type of data considered
574  * \param[in] tr_ignore if > 0, ignore periodicity with rotation;
575  * if > 1, ignore all periodic transforms
576  * \param[in, out] var variable buffer
577  */
578 /*----------------------------------------------------------------------------*/
579 
580 void
582  cs_lnum_t n_elts,
583  cs_lnum_t stride,
584  bool interlace,
585  cs_datatype_t datatype,
586  int tr_ignore,
587  void *var);
588 
589 /*----------------------------------------------------------------------------*/
590 /*
591  * \brief Add matching element id information to an interface set.
592  *
593  * This information is required by calls to cs_interface_get_match_ids(),
594  * and may be freed using cs_interface_set_free_match_ids().
595  *
596  * \param[in] ifs pointer to interface set structure
597  */
598 /*----------------------------------------------------------------------------*/
599 
600 void
602 
603 /*----------------------------------------------------------------------------*/
604 /*
605  * \brief Free matching element id information of an interface set.
606  *
607  * This information is used by calls to cs_interface_get_match_ids(),
608  * and may be defined using cs_interface_set_add_match_ids().
609  *
610  * \param[in] ifs pointer to interface set structure
611  */
612 /*----------------------------------------------------------------------------*/
613 
614 void
616 
617 /*----------------------------------------------------------------------------*/
618 /*
619  * \brief Tag mutiple elements of local interface with a given values.
620  *
621  * This is effective only on an interface matching the current rank,
622  * and when multiple (periodic) instances of a given element appear on that
623  * rank, al instances except the first are tagged with the chosen value.
624  *
625  * \param[in] itf pointer to interface structure
626  * \param[in] periodicity periodicity information (NULL if none)
627  * \param[in] tr_ignore if > 0, ignore periodicity with rotation;
628  * if > 1, ignore all periodic transforms
629  * \param[in] tag_value tag to assign
630  * \param[in, out] tag global tag array for elements
631  */
632 /*----------------------------------------------------------------------------*/
633 
634 void
636  const fvm_periodicity_t *periodicity,
637  int tr_ignore,
638  cs_gnum_t tag_value,
639  cs_gnum_t *tag);
640 /*----------------------------------------------------------------------------*/
641 /*
642  * \brief Dump printout of an interface list.
643  *
644  * \param[in] ifs pointer to structure that should be dumped
645  */
646 /*----------------------------------------------------------------------------*/
647 
648 void
650 
651 /*----------------------------------------------------------------------------*/
652 
654 
655 #endif /* __CS_INTERFACE_H__ */
cs_datatype_t
Definition: cs_defs.h:272
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:298
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
void cs_interface_tag_local_matches(const cs_interface_t *itf, const fvm_periodicity_t *periodicity, int tr_ignore, cs_gnum_t tag_value, cs_gnum_t *tag)
Tag mutiple elements of local interface with a given values.
Definition: cs_interface.c:6035
void cs_interface_set_copy_indexed(const cs_interface_set_t *ifs, cs_datatype_t datatype, bool src_on_parent, const cs_lnum_t src_index[], const cs_lnum_t dest_index[], const void *src, void *dest)
Copy indexed array from distant or matching interface elements to local elements.
Definition: cs_interface.c:4217
int cs_interface_set_size(const cs_interface_set_t *ifs)
Return number of interfaces associated with an interface set.
Definition: cs_interface.c:3849
void cs_interface_set_renumber(cs_interface_set_t *ifs, const cs_lnum_t old_to_new[])
Apply renumbering of elements referenced by an interface set.
Definition: cs_interface.c:3945
void cs_interface_set_sum(const cs_interface_set_t *ifs, cs_lnum_t n_elts, cs_lnum_t stride, bool interlace, cs_datatype_t datatype, void *var)
Update the sum of values for elements associated with an interface set.
Definition: cs_interface.c:4612
void cs_interface_set_max_tr(const cs_interface_set_t *ifs, cs_lnum_t n_elts, cs_lnum_t stride, bool interlace, cs_datatype_t datatype, int tr_ignore, void *var)
Update the maximum of values for elements associated with an interface set, allowing control over per...
Definition: cs_interface.c:5584
const fvm_periodicity_t * cs_interface_set_periodicity(const cs_interface_set_t *ifs)
Return pointer to the periocicity structure associated of an interface set.
Definition: cs_interface.c:3922
void cs_interface_set_inclusive_or(const cs_interface_set_t *ifs, cs_lnum_t n_elts, cs_lnum_t stride, bool interlace, cs_datatype_t datatype, void *var)
Update values using the bitwise inclusive or operation for elements associated with an interface set.
Definition: cs_interface.c:4410
const cs_lnum_t * cs_interface_get_elt_ids(const cs_interface_t *itf)
Return pointer to array of local element ids defining an interface.
Definition: cs_interface.c:3388
cs_interface_set_t * cs_interface_set_create(cs_lnum_t n_elts, const cs_lnum_t parent_element_id[], const cs_gnum_t global_number[], const fvm_periodicity_t *periodicity, int n_periodic_lists, const int periodicity_num[], const cs_lnum_t n_periodic_couples[], const cs_gnum_t *const periodic_couples[])
Creation of a list of interfaces between elements of a same type.
Definition: cs_interface.c:3520
void cs_interface_set_dump(const cs_interface_set_t *ifs)
Dump printout of an interface list.
Definition: cs_interface.c:6095
cs_lnum_t cs_interface_size(const cs_interface_t *itf)
Return number of local and distant elements defining an interface.
Definition: cs_interface.c:3362
cs_interface_set_t * cs_interface_set_dup_blocks(cs_interface_set_t *ifs, cs_lnum_t block_size, cs_lnum_t n_blocks)
Duplicate an interface set for coupled variable blocks.
Definition: cs_interface.c:3717
void cs_interface_set_destroy(cs_interface_set_t **ifs)
Destruction of an interface set.
Definition: cs_interface.c:3624
int cs_interface_rank(const cs_interface_t *itf)
Return process rank associated with an interface's distant elements.
Definition: cs_interface.c:3341
void cs_interface_set_free_match_ids(cs_interface_set_t *ifs)
Free matching element id information of an interface set.
Definition: cs_interface.c:6000
const cs_interface_t * cs_interface_set_get(const cs_interface_set_t *ifs, int interface_id)
Return pointer to a given interface in an interface set.
Definition: cs_interface.c:3897
void cs_interface_set_copy_array(const cs_interface_set_t *ifs, cs_datatype_t datatype, int stride, bool src_on_parent, const void *src, void *dest)
Copy array from distant or matching interface elements to local elements.
Definition: cs_interface.c:4050
struct _cs_interface_set_t cs_interface_set_t
Definition: cs_interface.h:61
void cs_interface_set_min(const cs_interface_set_t *ifs, cs_lnum_t n_elts, cs_lnum_t stride, bool interlace, cs_datatype_t datatype, void *var)
Update the minimum value of elements associated with an interface set.
Definition: cs_interface.c:5054
void cs_interface_set_add_match_ids(cs_interface_set_t *ifs)
Add matching element id information to an interface set.
Definition: cs_interface.c:5875
struct _cs_interface_t cs_interface_t
Definition: cs_interface.h:60
cs_lnum_t cs_interface_set_n_elts(const cs_interface_set_t *ifs)
Return total number of elements in interface set.
Definition: cs_interface.c:3873
const cs_lnum_t * cs_interface_get_tr_index(const cs_interface_t *itf)
Return pointer to index of sub-sections for different transformations.
Definition: cs_interface.c:3470
cs_interface_set_t * cs_interface_set_dup(const cs_interface_set_t *ifs, cs_lnum_t stride)
Duplicate an interface set, applying an optional constant stride.
Definition: cs_interface.c:3651
cs_lnum_t cs_interface_get_tr_index_size(const cs_interface_t *itf)
Return size of index of sub-sections for different transformations.
Definition: cs_interface.c:3444
void cs_interface_set_sum_tr(const cs_interface_set_t *ifs, cs_lnum_t n_elts, cs_lnum_t stride, bool interlace, cs_datatype_t datatype, int tr_ignore, void *var)
Update the sum of values for elements associated with an interface set, allowing control over periodi...
Definition: cs_interface.c:4862
void cs_interface_set_max(const cs_interface_set_t *ifs, cs_lnum_t n_elts, cs_lnum_t stride, bool interlace, cs_datatype_t datatype, void *var)
Update the maximum value of elements associated with an interface set.
Definition: cs_interface.c:5318
const cs_lnum_t * cs_interface_get_match_ids(const cs_interface_t *itf)
Return pointer to array of matching element ids defining an interface.
Definition: cs_interface.c:3417
struct _fvm_periodicity_t fvm_periodicity_t
Definition: fvm_periodicity.h:67