MOAB: Mesh Oriented datABase
(version 5.5.0)
iRel.h
Go to the documentation of this file.
1
#ifndef _ITAPS_iRel
2
#define _ITAPS_iRel
3
4
/***************************************************************************/
/**
5
* \ingroup
6
*VersionNumbers
7
* \brief Compile time
8
*version number
9
*digits
10
*
11
* iRel maintains a
12
*major, minor and
13
*patch digit in its
14
*version number.
15
* Technically
16
*speaking, there is
17
*not much practical
18
*value in patch digit
19
* for an interface
20
*specification. A
21
*patch release is
22
*typically only used
23
* for bug fix
24
*releases. Although
25
*it is rare,
26
*sometimes a bug fix
27
* necessitates an API
28
*change. So, we
29
*define a patch digit
30
*for iRel.
31
******************************************************************************/
32
#define IREL_VERSION_MAJOR 1
33
#define IREL_VERSION_MINOR 1
34
#define IREL_VERSION_PATCH 0
35
36
/***************************************************************************/
/**
37
* \ingroup
38
*VersionNumbers
39
* \brief Maintain
40
*backward
41
*compatibility with
42
*old version symbol
43
*names
44
******************************************************************************/
45
#define IREL_MAJOR_VERSION IREL_VERSION_MAJOR
46
#define IREL_MINOR_VERSION IREL_VERSION_MINOR
47
#define IREL_PATCH_VERSION IREL_VERSION_PATCH
48
49
/***************************************************************************/
/**
50
* \ingroup
51
*VersionNumbers
52
* \brief Version
53
*Comparison
54
*
55
* Evaluates to true
56
*at CPP time if the
57
*version of iRel
58
*currently being
59
* compiled is greater
60
*than or equal to the
61
*version specified.
62
******************************************************************************/
63
#define IREL_VERSION_GE( Maj, Min, Pat ) ITAPS_VERSION_GE( Maj, Min, Pat )
64
65
/***************************************************************************/
/**
66
* \ingroup
67
*VersionNumbers
68
* \brief Compose
69
*string represention
70
*of the iRel version
71
*number
72
******************************************************************************/
73
#define IREL_VERSION_STRING ITAPS_VERSION_STRING_( iRel )
74
75
/***************************************************************************/
/**
76
* \ingroup
77
*VersionNumbers
78
* \brief Compose a
79
*symbol name derived
80
*from the current
81
*iRel version number.
82
******************************************************************************/
83
#define IREL_VERSION_TAG ITAPS_VERSION_TAG_( iRel )
84
85
/***************************************************************************/
/**
86
* \ingroup
87
*VersionNumbers
88
* \brief Define
89
*iRel_create symbol
90
*such that it depends
91
*on version number.
92
*
93
* Note: We ran into
94
*problems with this
95
*as it influences or
96
*is influenced by
97
* fortran name
98
*mangling and so
99
*breaks fortran
100
*compilation. So,
101
*this is currently
102
*disabled.
103
******************************************************************************/
104
#define IREL_CREATE_NAME__( A, B, C ) A##_##B##_##C
105
#define IREL_CREATE_NAME_( A, B, C ) IREL_CREATE_NAME__( A, B, C )
106
#define IREL_CREATE_NAME( A ) IREL_CREATE_NAME_( A, IREL_VERSION_MAJOR, IREL_VERSION_MINOR )
107
/*
108
#undef iRel_create
109
#define iRel_create IREL_CREATE_NAME(iRel_create)
110
*/
111
112
#include "
iBase.h
"
113
#include "
iRel_protos.h
"
114
115
#ifdef __cplusplus
116
extern
"C"
{
117
#endif
118
119
typedef
void
*
iRel_Instance
;
120
typedef
struct
iRel_PairHandle_Private*
iRel_PairHandle
;
121
122
/***************************************************************************/
/**
123
* \brief \enum
124
*IfaceType Enumerator
125
*specifying interface
126
*types
127
*
128
* Enumerator
129
*specifying interface
130
*types. This
131
*enumeration is
132
* necessary because
133
*functions to get
134
*entities of a given
135
*dimension are part
136
*of the higher-level
137
*interfaces (e.g.
138
*iGeom, iMesh)
139
*instead of iBase.
140
******************************************************************************/
141
enum
iRel_IfaceType
142
{
143
iRel_IfaceType_MIN
= 0,
144
/**< facilitates iteration over all values */
145
iRel_IGEOM_IFACE
=
iRel_IfaceType_MIN
,
146
/**< description unavailable */
147
iRel_IMESH_IFACE
,
148
/**< description unavailable */
149
iRel_IFIELD_IFACE
,
150
/**< description unavailable */
151
iRel_IREL_IFACE
,
152
/**< description unavailable */
153
iRel_FBIGEOM_IFACE
,
154
/**< description unavailable */
155
iRel_IfaceType_MAX
=
iRel_FBIGEOM_IFACE
156
/**< facilitates iteration over all values */
157
};
158
159
/***************************************************************************/
/**
160
* \brief \enum
161
*RelationType
162
*Enumerator
163
*specifying relation
164
*types
165
*
166
* Enumerator
167
*specifying relation
168
*types. A relation
169
*has two types, one
170
* for each side of
171
*the relation.
172
******************************************************************************/
173
enum
iRel_RelationType
174
{
175
iRel_RelationType_MIN
= 0,
176
/**< facilitates iteration over all values */
177
iRel_ENTITY
=
iRel_RelationType_MIN
,
178
/**< description unavailable */
179
iRel_SET
,
180
/**< description unavailable */
181
iRel_BOTH
,
182
/**< description unavailable */
183
iRel_RelationType_MAX
=
iRel_BOTH
184
/**< facilitates iteration over all values */
185
};
186
187
/***************************************************************************/
/**
188
* \brief \enum
189
*RelationStatus
190
*Enumerator
191
*specifying relation
192
*status
193
*
194
* Enumerator
195
*specifying relation
196
*status. A relation
197
*has two statuses,
198
*one for each side of
199
*the relation.
200
*Allowed values of
201
*this enumeration
202
*are: It is an error
203
*to request relations
204
*from a side that
205
*does not have
206
* iRel_ACTIVE status.
207
******************************************************************************/
208
enum
iRel_RelationStatus
209
{
210
iRel_RelationStatus_MIN
= 0,
211
/**< facilitates iteration over all values */
212
iRel_ACTIVE
=
iRel_RelationType_MIN
,
213
/**< the relation on this side is active and up to date */
214
iRel_INACTIVE
,
215
/**< the relation on this side is inactive, and may be out of date */
216
iRel_NOTEXIST
,
217
/**< the relation on this side is not stored */
218
iRel_RelationStatus_MAX
=
iRel_NOTEXIST
219
/**< facilitates iteration over all values */
220
};
221
222
/***************************************************************************/
/**
223
* \brief Get the
224
*error type returned
225
*from the last iRel
226
*function
227
*
228
* Get the error type
229
*returned from the
230
*last iRel function.
231
*Value returned is a
232
*member of the
233
*iBase_ErrorType
234
*enumeration.
235
******************************************************************************/
236
void
iRel_getErrorType
(
iRel_Instance
instance,
237
/**< [in] iRel instance handle */
238
int
* error_type
239
/**< [out] Error type returned from last iRel function */
240
);
241
242
/***************************************************************************/
/**
243
* \brief Get a
244
*description of the
245
*error returned from
246
*the last iRel
247
*function
248
*
249
* Get a description
250
*of the error
251
*returned from the
252
*last iRel function
253
******************************************************************************/
254
void
iRel_getDescription
(
iRel_Instance
instance,
255
/**< [in] iRel instance handle */
256
char
* descr,
257
/**< [inout] Pointer to a character string to be filled with a
258
description of the error from the last iRel function */
259
int
descr_len
260
/**< [in] Length of the character string pointed to by descr */
261
);
262
263
/***************************************************************************/
/**
264
* \brief Create a new
265
*iRel instance
266
*
267
* Create a new iRel
268
*instance. Currently
269
*no options are
270
*implemented.
271
******************************************************************************/
272
void
iRel_create
(
const
char
* options,
273
/**< const Options for the implementation */
274
iRel_Instance
* instance,
275
/**< [in] iRel instance handle */
276
int
* err,
277
/**< [out] Returned Error status (see iBase_ErrorType) */
278
const
int
options_len
279
/**< [in] Length of options string */
280
);
281
282
/***************************************************************************/
/**
283
* \brief Destroy the
284
*interface object
285
*
286
* Calls destructor on
287
*interface object
288
******************************************************************************/
289
void
iRel_destroy
(
iRel_Instance
instance,
290
/**< [in] iRel instance handle */
291
int
* err
292
/**< [out] Returned Error status (see iBase_ErrorType) */
293
);
294
295
/***************************************************************************/
/**
296
* \brief Create a
297
*relation pair
298
*between two
299
*interfaces
300
*
301
* Creates a relation
302
*pair between two
303
*interfaces, passing
304
* back a handle to
305
*the pair. It is an
306
*error to create a
307
*relation pair having
308
*both sides
309
*iRel_NOTEXIST. If a
310
*relation pair has a
311
*side with status
312
* iRel_NOTEXIST, the
313
*relation for that
314
*side is never
315
*stored, and the
316
*status cannot change
317
*over the life of the
318
*relation pair.
319
******************************************************************************/
320
void
iRel_createPair
(
iRel_Instance
instance,
321
/**< [in] iRel instance handle */
322
iBase_Instance
iface1,
323
/**< [in] 1st interface object in the relation pair */
324
const
int
ent_or_set1,
325
/**< [in] This relation relates entities, sets, or both from 1st
326
interface object */
327
const
int
iface_type1,
328
/**< [in] Type of 1st interface */
329
const
int
irel_status1,
330
/**< [in] The status of 1st side */
331
iBase_Instance
iface2,
332
/**< [in] 2nd interface object in the relation pair */
333
const
int
ent_or_set2,
334
/**< [in] This relation relates entities, sets, or both from 2nd
335
interface object */
336
const
int
iface_type2,
337
/**< [in] Type of 2nd interface */
338
const
int
irel_status2,
339
/**< [in] The status of 2nd side */
340
iRel_PairHandle
* pair,
341
/**< [out] Pointer to relation pair handle, returned from function */
342
int
* err
343
/**< [out] Returned Error status (see iBase_ErrorType) */
344
);
345
346
/***************************************************************************/
/**
347
* \brief Get
348
*information for this
349
*relation handle
350
*
351
* Get information
352
*about the interfaces
353
*and relation type
354
*for this relation.
355
*Relation type for
356
*each side is passed
357
*back as integers,
358
* but values will be
359
*from RelationType
360
*enumeration.
361
******************************************************************************/
362
void
iRel_getPairInfo
(
iRel_Instance
instance,
363
/**< [in] iRel instance handle */
364
iRel_PairHandle
pair,
365
/**< [in] handle of relation pair being queried */
366
iBase_Instance
* iface1,
367
/**< [out] Side 1 instance for this relation */
368
int
* ent_or_set1,
369
/**< [out] relation type for side 1 of this relation */
370
int
* iface_type1,
371
/**< [out] Interface type for side 1 of this relation */
372
int
* irel_status1,
373
/**< [out] The status of the first side of this relation */
374
iBase_Instance
* iface2,
375
/**< [out] Side 2 instance for this relation */
376
int
* ent_or_set2,
377
/**< [out] Relation type for side 2 of this relation */
378
int
* iface_type2,
379
/**< [out] Interface type for side 2 of this relation */
380
int
* irel_status2,
381
/**< [out] Status of the 2nd side of this relation */
382
int
* err
383
/**< [out] Returned Error status (see iBase_ErrorType) */
384
);
385
386
/***************************************************************************/
/**
387
* \brief Change the
388
*relation type
389
*
390
* Change the type of
391
*one or both sides of
392
*a relation. Only
393
*changes that result
394
*in no lost
395
*information are
396
*allowed, e.g.
397
*changing a type from
398
*SET to BOTH or vice
399
*versa.
400
******************************************************************************/
401
void
iRel_changePairType
(
iRel_Instance
instance,
402
/**< [in] iRel instance handle */
403
iRel_PairHandle
pair,
404
/**< [in] Relation pair handle being changed */
405
int
ent_or_set1,
406
/**< [in] The new type of side 1 of this relation pair */
407
int
ent_or_set2,
408
/**< [in] The new type of side 2 of this relation pair */
409
int
* err
410
/**< [out] Returned Error status (see iBase_ErrorType) */
411
);
412
413
/***************************************************************************/
/**
414
* \brief Change the
415
*relation status
416
*
417
* Change the status
418
*of one or both sides
419
*of a relation. It
420
*is an error to
421
* change the status
422
*of both sides to
423
*iRel_NOTEXIST. If a
424
*side is changed to
425
* iRel_NOTEXIST, it
426
*will no longer be
427
*changeable back to
428
*iRel_ACTIVE or
429
* iRel_INACTIVE.
430
*Changing a side from
431
*iRel_INACTIVE to
432
*iRel_ACTIVE implies
433
*a traversal of all
434
*related entities on
435
*the other side, to
436
*recover the
437
*relations on the
438
*side being changed.
439
*Changing both sides
440
*from iRel_ACTIVE to
441
*something else is an
442
*error, since in that
443
*case neither will be
444
*able to be updated
445
*to iRel_ACTIVE.
446
******************************************************************************/
447
void
iRel_changePairStatus
(
iRel_Instance
instance,
448
/**< [in] iRel instance handle */
449
iRel_PairHandle
pair,
450
/**< [in] Relation pair handle being changed */
451
int
irel_status1,
452
/**< [in] The new status of side 1 of this relation pair */
453
int
irel_status2,
454
/**< [in] The new status of side 2 of this relation pair */
455
int
* err
456
/**< [out] Returned Error status (see iBase_ErrorType) */
457
);
458
459
/***************************************************************************/
/**
460
* \brief Destroy a
461
*relation pair
462
*
463
* Destroy the
464
*relation pair
465
*corresponding to the
466
*handle input
467
******************************************************************************/
468
void
iRel_destroyPair
(
iRel_Instance
instance,
469
/**< [in] iRel instance handle */
470
iRel_PairHandle
pair,
471
/**< [in] Handle of relation pair to destroy */
472
int
* err
473
/**< [out] Returned Error status (see iBase_ErrorType) */
474
);
475
476
/***************************************************************************/
/**
477
* \brief Get
478
*relations containing
479
*specified interface
480
*
481
* Get relations
482
*containing the
483
*specified interface
484
******************************************************************************/
485
void
iRel_findPairs
(
iRel_Instance
instance,
486
/**< [in] iRel instance handle */
487
iBase_Instance
iface
,
488
/**< [in] Specified interface */
489
iRel_PairHandle
** pairs,
490
/**< [inout] Pointer to array holding returned relation pairs
491
containing specified interface */
492
int
* pairs_allocated,
493
/**< [inout] Pointer to allocated size of relation pairs list */
494
int
* pairs_size,
495
/**< [out] Pointer to occupied size of relation pairs list */
496
int
* err
497
/**< [out] Returned Error status (see iBase_ErrorType) */
498
);
499
500
/***************************************************************************/
/**
501
* \brief Set a
502
*relation between two
503
*entities
504
*
505
* Set a relation
506
*between an entity
507
*and several
508
*entities. It is an
509
*error to set a
510
*relation on a pair
511
*with both sides not
512
*iRel_ACTIVE.
513
******************************************************************************/
514
void
iRel_setEntEntRelation
(
iRel_Instance
instance,
515
/**< [in] iRel instance handle */
516
iRel_PairHandle
pair,
517
/**< [in] Relation pair handle being queried */
518
iBase_EntityHandle
ent1,
519
/**< [in] 1st entity of relation being set */
520
iBase_EntityHandle
ent2,
521
/**< [in] 2nd entity of relation being set */
522
int
* err
523
/**< [out] Returned Error status (see iBase_ErrorType) */
524
);
525
526
/***************************************************************************/
/**
527
* \brief Set a
528
*relation between an
529
*entity and an entity
530
*set
531
*
532
* Description
533
*unavailable.
534
******************************************************************************/
535
void
iRel_setEntSetRelation
(
iRel_Instance
instance,
536
/**< [in] iRel instance handle */
537
iRel_PairHandle
pair,
538
/**< [in] Relation pair handle being queried */
539
iBase_EntityHandle
ent1,
540
/**< [in] entity of relation being set */
541
iBase_EntitySetHandle
entset2,
542
/**< [in] entity set of relation being set */
543
int
* err
544
/**< [out] Returned Error status (see iBase_ErrorType) */
545
);
546
547
/***************************************************************************/
/**
548
* \brief Set a
549
*relation between an
550
*entity set an an
551
*entity
552
*
553
* Description
554
*unavailable.
555
******************************************************************************/
556
void
iRel_setSetEntRelation
(
iRel_Instance
instance,
557
/**< [in] iRel instance handle */
558
iRel_PairHandle
pair,
559
/**< [in] Relation pair handle being queried */
560
iBase_EntitySetHandle
entset1,
561
/**< [in] entity set of relation being set */
562
iBase_EntityHandle
ent2,
563
/**< [in] entity of relation being set */
564
int
* err
565
/**< [out] Returned Error status (see iBase_ErrorType) */
566
);
567
568
/***************************************************************************/
/**
569
* \brief Set a
570
*relation between two
571
*entity sets
572
*
573
* Description
574
*unavailable. Set a
575
*relation between an
576
*entity and several
577
*entities. It is an
578
*error to set a
579
*relation on a pair
580
*with both sides not
581
*iRel_ACTIVE.
582
******************************************************************************/
583
void
iRel_setSetSetRelation
(
iRel_Instance
instance,
584
/**< [in] iRel instance handle */
585
iRel_PairHandle
pair,
586
/**< [in] Relation pair handle being queried */
587
iBase_EntitySetHandle
entset1,
588
/**< [in] 1st entity set of relation being set */
589
iBase_EntitySetHandle
entset2,
590
/**< [in] 2nd entity set of relation being set */
591
int
* err
592
/**< [out] Returned Error status (see iBase_ErrorType) */
593
);
594
595
/***************************************************************************/
/**
596
* \brief Set
597
*relations between
598
*arrays of entities
599
*pairwise,
600
* ent_array_1[i]<->ent_array_2[i]
601
*
602
* Set relations
603
*between arrays of
604
*entities pairwise,
605
* ent_array_1[i]<->ent_array_2[i].
606
*If either array
607
* contains sets and
608
*that side of the
609
*relation is
610
*'both'-type, set
611
*relations for
612
*individual entities
613
*in those sets too.
614
*It is an error to
615
* set a relation on a
616
*pair with both sides
617
*not iRel_ACTIVE.
618
******************************************************************************/
619
void
iRel_setEntArrEntArrRelation
(
iRel_Instance
instance,
620
/**< [in] iRel instance handle */
621
iRel_PairHandle
pair,
622
/**< [in] Relation pair handle being queried */
623
iBase_EntityHandle
* ent_array_1,
624
/**< [in] 1st array of entities of relation being set */
625
int
num_ent1,
626
/**< [in] Number of entities in 1st array */
627
iBase_EntityHandle
* ent_array_2,
628
/**< [in] 2nd array of entities of relation being set */
629
int
num_ent2,
630
/**< [in] Number of entities in 2nd array */
631
int
* err
632
/**< [out] Returned Error status (see iBase_ErrorType) */
633
);
634
635
/***************************************************************************/
/**
636
* \brief Set
637
*relations between
638
*arrays of entity
639
*sets and entities
640
*
641
* Description
642
*unavailable.
643
******************************************************************************/
644
void
iRel_setSetArrEntArrRelation
(
iRel_Instance
instance,
645
/**< [in] iRel instance handle */
646
iRel_PairHandle
pair,
647
/**< [in] Relation pair handle being queried */
648
iBase_EntitySetHandle
* entset_array_1,
649
/**< [in] 1st array of entities of relation being set */
650
int
num_set1,
651
/**< [in] Number of entity sets in 1st array */
652
iBase_EntityHandle
* ent_array_2,
653
/**< [in] 2nd array of entities of relation being set */
654
int
num_ent2,
655
/**< [in] Number of entities in 2nd array */
656
int
* err
657
/**< [out] Returned Error status (see iBase_ErrorType) */
658
);
659
660
/***************************************************************************/
/**
661
* \brief Set
662
*relations between
663
*arrays of entities
664
*and entity sets
665
*
666
* Description
667
*unavailable.
668
******************************************************************************/
669
void
iRel_setEntArrSetArrRelation
(
iRel_Instance
instance,
670
/**< [in] iRel instance handle */
671
iRel_PairHandle
pair,
672
/**< [in] Relation pair handle being queried */
673
iBase_EntityHandle
* ent_array_1,
674
/**< [in] 1st array of entities of relation being set */
675
int
num_ent1,
676
/**< [in] Number of entities in 1st array */
677
iBase_EntitySetHandle
* entset_array_2,
678
/**< [in] 2nd array of entities of relation being set */
679
int
num_set2,
680
/**< [in] Number of entity sets in 2nd array */
681
int
* err
682
/**< [out] Returned Error status (see iBase_ErrorType) */
683
);
684
685
/***************************************************************************/
/**
686
* \brief Set
687
*relations between
688
*arrays of entity
689
*sets pairwise,
690
* ent_array_1[i]<->ent_array_2[i]
691
*
692
* Set relations
693
*between arrays of
694
*entities pairwise,
695
* ent_array_1[i]<->ent_array_2[i].
696
*If either array
697
* contains sets and
698
*that side of the
699
*relation is
700
*'both'-type, set
701
*relations for
702
*individual entities
703
*in those sets too.
704
*It is an error to
705
* set a relation on a
706
*pair with both sides
707
*not iRel_ACTIVE.
708
******************************************************************************/
709
void
iRel_setSetArrSetArrRelation
(
iRel_Instance
instance,
710
/**< [in] iRel instance handle */
711
iRel_PairHandle
pair,
712
/**< [in] Relation pair handle being queried */
713
iBase_EntitySetHandle
* entset_array_1,
714
/**< [in] 1st array of entities of relation being set */
715
int
num_set1,
716
/**< [in] Number of entities in 1st array */
717
iBase_EntitySetHandle
* entset_array_2,
718
/**< [in] 2nd array of entities of relation being set */
719
int
num_set2,
720
/**< [in] Number of entities in 2nd array */
721
int
* err
722
/**< [out] Returned Error status (see iBase_ErrorType) */
723
);
724
725
/***************************************************************************/
/**
726
* \brief Get entity
727
*related to specified
728
*entity and relation
729
*handle
730
*
731
* Get entity related
732
*to specified entity
733
*and relation handle.
734
*Also returns whether
735
*the related entity
736
*is an entity or a
737
*set. It is an error
738
*to get a relation
739
*for a side with
740
*status
741
*iRel_NOTEXIST.
742
******************************************************************************/
743
void
iRel_getEntEntRelation
(
iRel_Instance
instance,
744
/**< [in] iRel instance handle */
745
iRel_PairHandle
pair,
746
/**< [in] Relation pair handle being queried */
747
iBase_EntityHandle
ent1,
748
/**< [in] 1st entity of relation being queried */
749
int
switch_order,
750
/**< [in] 1st entity is related to 1st interface (=0) or 2nd interface
751
(=1) of relation pair */
752
iBase_EntityHandle
* ent2,
753
/**< [out] Pointer to entity related to ent1 */
754
int
* err
755
/**< [out] Returned Error status (see iBase_ErrorType) */
756
);
757
758
/***************************************************************************/
/**
759
* \brief Get entity
760
*set related to
761
*specified entity and
762
*relation handle
763
*
764
* Description
765
*unavailable.
766
******************************************************************************/
767
void
iRel_getEntSetRelation
(
iRel_Instance
instance,
768
/**< [in] iRel instance handle */
769
iRel_PairHandle
pair,
770
/**< [in] Relation pair handle being queried */
771
iBase_EntityHandle
ent1,
772
/**< [in] entity of relation being queried */
773
int
switch_order,
774
/**< [in] 1st entity is related to 1st interface (=0) or 2nd interface
775
(=1) of relation pair */
776
iBase_EntitySetHandle
* entset2,
777
/**< [out] Pointer to entity set related to ent1 */
778
int
* err
779
/**< [out] Returned Error status (see iBase_ErrorType) */
780
);
781
782
/***************************************************************************/
/**
783
* \brief Get entity
784
*related to specified
785
*entity set and
786
*relation handle
787
*
788
* Description
789
*unavailable.
790
******************************************************************************/
791
void
iRel_getSetEntRelation
(
iRel_Instance
instance,
792
/**< [in] iRel instance handle */
793
iRel_PairHandle
pair,
794
/**< [in] Relation pair handle being queried */
795
iBase_EntitySetHandle
entset1,
796
/**< [in] entity set of relation being queried */
797
int
switch_order,
798
/**< [in] 1st entity is related to 1st interface (=0) or 2nd interface
799
(=1) of relation pair */
800
iBase_EntityHandle
* ent2,
801
/**< [out] Pointer to entity related to entset1 */
802
int
* err
803
/**< [out] Returned Error status (see iBase_ErrorType) */
804
);
805
806
/***************************************************************************/
/**
807
* \brief Get entity
808
*set related to
809
*specified entity set
810
*and relation handle
811
*
812
* Description
813
*unavailable.
814
******************************************************************************/
815
void
iRel_getSetSetRelation
(
iRel_Instance
instance,
816
/**< [in] iRel instance handle */
817
iRel_PairHandle
pair,
818
/**< [in] Relation pair handle being queried */
819
iBase_EntitySetHandle
entset1,
820
/**< [in] 1st entity set of relation being queried */
821
int
switch_order,
822
/**< [in] 1st entity is related to 1st interface (=0) or 2nd interface
823
(=1) of relation pair */
824
iBase_EntitySetHandle
* entset2,
825
/**< [out] Pointer to entity set related to entset1 */
826
int
* err
827
/**< [out] Returned Error status (see iBase_ErrorType) */
828
);
829
830
/***************************************************************************/
/**
831
* \brief Get entity
832
*iterator related to
833
*specified entity set
834
*and relation handle.
835
*
836
* Description
837
*unavailable.
838
******************************************************************************/
839
void
iRel_getEntSetIterRelation
(
iRel_Instance
instance,
840
/**< [in] iRel instance handle */
841
iRel_PairHandle
pair,
842
/**< [in] Relation pair handle being queried */
843
iBase_EntityHandle
ent1,
844
/**< [in] ent1 1st entity set of relation being queried */
845
int
switch_order,
846
/**< [in] 1st entity is related to 1st interface (=0) or 2nd interface
847
(=1) of relation pair */
848
iBase_EntityIterator
* entIter,
849
/**< [out] Returned entity iterator */
850
int
* err
851
/**< [out] Returned Error status (see iBase_ErrorType) */
852
);
853
854
/***************************************************************************/
/**
855
* \brief Get entities
856
*related to those in
857
*specified array and
858
*relation, pairwise
859
*
860
* Get entities
861
*related to those in
862
*specified array and
863
*relation, pairwise.
864
* Returns sets or
865
*entities, depending
866
*on relation type and
867
*entities in
868
* ent_array_1. It is
869
*an error to get a
870
*relation for a side
871
*with status
872
* iRel_NOTEXIST.
873
******************************************************************************/
874
void
iRel_getEntArrEntArrRelation
(
iRel_Instance
instance,
875
/**< [in] iRel instance handle */
876
iRel_PairHandle
pair,
877
/**< [in] Relation pair handle being queried */
878
iBase_EntityHandle
* ent_array_1,
879
/**< [in] Array of entities whose relations are being queried */
880
int
ent_array_1_size,
881
/**< [in] Number of entities in ent_array_1 */
882
int
switch_order,
883
/**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1)
884
interface of this relation pair */
885
iBase_EntityHandle
** ent_array_2,
886
/**< [inout] Pointer to array of entity handles returned from function */
887
int
* ent_array_2_allocated,
888
/**< [inout] Pointer to allocated size of ent_array_2 */
889
int
* ent_array_2_size,
890
/**< [out] Pointer to occupied size of ent_array_2 */
891
int
* err
892
/**< [out] Returned Error status (see iBase_ErrorType) */
893
);
894
895
/***************************************************************************/
/**
896
* \brief Get entity
897
*sets related to
898
*entities in
899
*specified array and
900
*relation, pairwise
901
*
902
* Description
903
*unavailable.
904
******************************************************************************/
905
void
iRel_getEntArrSetArrRelation
(
iRel_Instance
instance,
906
/**< [in] iRel instance handle */
907
iRel_PairHandle
pair,
908
/**< [in] Relation pair handle being queried */
909
iBase_EntityHandle
* ent_array_1,
910
/**< [in] Array of entities whose relations are being queried */
911
int
ent_array_1_size,
912
/**< [in] Number of entities in ent_array_1 */
913
int
switch_order,
914
/**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1)
915
interface of this relation pair */
916
iBase_EntitySetHandle
** entset_array_2,
917
/**< [inout] Pointer to array of entity set handles returned from function */
918
int
* entset_array_2_allocated,
919
/**< [inout] Pointer to allocated size of entset_array_2 */
920
int
* entset_array_2_size,
921
/**< [out] Pointer to occupied size of entset_array_2 */
922
int
* err
923
/**< [out] Returned Error status (see iBase_ErrorType) */
924
);
925
926
/***************************************************************************/
/**
927
* \brief Get entities
928
*related to entity
929
*sets in specified
930
*array and relation,
931
* pairwise
932
*
933
* Description
934
*unavailable.
935
******************************************************************************/
936
void
iRel_getSetArrEntArrRelation
(
iRel_Instance
instance,
937
/**< [in] iRel instance handle */
938
iRel_PairHandle
pair,
939
/**< [in] Relation pair handle being queried */
940
iBase_EntitySetHandle
* entset_array_1,
941
/**< [in] Array of entity sets whose relations are being queried */
942
int
entset_array_1_size,
943
/**< [in] Number of entity sets in entset_array_1 */
944
int
switch_order,
945
/**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1)
946
interface of this relation pair */
947
iBase_EntityHandle
** ent_array_2,
948
/**< [inout] Pointer to array of entity handles returned from function */
949
int
* ent_array_2_allocated,
950
/**< [inout] Pointer to allocated size of ent_array_2 */
951
int
* ent_array_2_size,
952
/**< [out] Pointer to occupied size of ent_array_2 */
953
int
* err
954
/**< [out] Returned Error status (see iBase_ErrorType) */
955
);
956
957
/***************************************************************************/
/**
958
* \brief Get entity
959
*sets related to
960
*entity sets in
961
*specified array and
962
*relation, pairwise
963
*
964
* Description
965
*unavailable.
966
******************************************************************************/
967
void
iRel_getSetArrSetArrRelation
(
iRel_Instance
instance,
968
/**< [in] iRel instance handle */
969
iRel_PairHandle
pair,
970
/**< [in] Relation pair handle being queried */
971
iBase_EntitySetHandle
* entset_array_1,
972
/**< [in] Array of entity sets whose relations are being queried */
973
int
entset_array_1_size,
974
/**< [in] Number of entity sets in entset_array_1 */
975
int
switch_order,
976
/**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1)
977
interface of this relation pair */
978
iBase_EntitySetHandle
** entset_array_2,
979
/**< [inout] Pointer to array of entity handles returned from function */
980
int
* entset_array_2_allocated,
981
/**< [inout] Pointer to allocated size of entset_array_2 */
982
int
* entset_array_2_size,
983
/**< [out] Pointer to occupied size of entset_array_2 */
984
int
* err
985
/**< [out] Returned Error status (see iBase_ErrorType) */
986
);
987
988
/***************************************************************************/
/**
989
* \brief Get entity
990
*iterators related to
991
*entity sets in
992
*specified array and
993
* relation.
994
*
995
* Description
996
*unavailable.
997
******************************************************************************/
998
void
iRel_getEntArrSetIterArrRelation
(
iRel_Instance
instance,
999
/**< [in] iRel instance handle */
1000
iRel_PairHandle
pair,
1001
/**< [in] Relation pair handle being queried */
1002
iBase_EntityHandle
* ent_array_1,
1003
/**< [in] Array of entities whose relations are being queried */
1004
int
ent_array_1_size,
1005
/**< [in] Number of entities in ent_array_1 */
1006
int
switch_order,
1007
/**< [in] Entities in ent_array_1 are related with 1st (=0) or 2nd (=1)
1008
interface of this relation pair */
1009
iBase_EntityIterator
** entiter,
1010
/**< [inout] Pointer to array of entity iterator handles returned from
1011
function */
1012
int
* entiter_allocated,
1013
/**< [inout] Pointer to allocated size of entiter */
1014
int
* entiter_size,
1015
/**< [out] Pointer to occupied size of entiter */
1016
int
* err
1017
/**< [out] Returned Error status (see iBase_ErrorType) */
1018
);
1019
1020
/***************************************************************************/
/**
1021
* \brief Remove a
1022
*relation from an
1023
*entity
1024
*
1025
* Remove a relation
1026
*from an entity
1027
******************************************************************************/
1028
void
iRel_rmvEntRelation
(
iRel_Instance
instance,
1029
/**< [in] iRel instance handle */
1030
iRel_PairHandle
pair,
1031
/**< [in] Relation pair handle being queried */
1032
iBase_EntityHandle
ent,
1033
/**< [in] entity of relation being removed */
1034
int
switch_order,
1035
/**< [in] entity is related to 1st interface (=0) or 2nd interface
1036
(=1) of relation pair */
1037
int
* err
1038
/**< [out] Returned Error status (see iBase_ErrorType) */
1039
);
1040
1041
/***************************************************************************/
/**
1042
* \brief Remove a
1043
*relation from an
1044
*entity set
1045
*
1046
* Remove a relation
1047
*from an entity set
1048
******************************************************************************/
1049
void
iRel_rmvSetRelation
(
iRel_Instance
instance,
1050
/**< [in] iRel instance handle */
1051
iRel_PairHandle
pair,
1052
/**< [in] Relation pair handle being queried */
1053
iBase_EntitySetHandle
set,
1054
/**< [in] entity set of relation being removed */
1055
int
switch_order,
1056
/**< [in] entity set is related to 1st interface (=0) or 2nd interface
1057
(=1) of relation pair */
1058
int
* err
1059
/**< [out] Returned Error status (see iBase_ErrorType) */
1060
);
1061
1062
/***************************************************************************/
/**
1063
* \brief Remove a
1064
*relation from an
1065
*array of entities
1066
*
1067
* Remove a relation
1068
*from an array of
1069
*entities
1070
******************************************************************************/
1071
void
iRel_rmvEntArrRelation
(
iRel_Instance
instance,
1072
/**< [in] iRel instance handle */
1073
iRel_PairHandle
pair,
1074
/**< [in] Relation pair handle being queried */
1075
iBase_EntityHandle
* ent_array_1,
1076
/**< [in] Array of entities of relation being removed */
1077
int
num_ent1,
1078
/**< [in] Number of entities in array */
1079
int
switch_order,
1080
/**< [in] entities are related to 1st interface (=0) or 2nd interface
1081
(=1) of relation pair */
1082
int
* err
1083
/**< [out] Returned Error status (see iBase_ErrorType) */
1084
);
1085
1086
/***************************************************************************/
/**
1087
* \brief Remove a
1088
*relation from an
1089
*array of entity sets
1090
*
1091
* Remove a relation
1092
*from an array of
1093
*entity sets
1094
******************************************************************************/
1095
void
iRel_rmvSetArrRelation
(
iRel_Instance
instance,
1096
/**< [in] iRel instance handle */
1097
iRel_PairHandle
pair,
1098
/**< [in] Relation pair handle being queried */
1099
iBase_EntitySetHandle
* entset_array_1,
1100
/**< [in] Array of entity sets of relation being removed */
1101
int
num_entset1,
1102
/**< [in] Number of entity sets in array */
1103
int
switch_order,
1104
/**< [in] entity sets are related to 1st interface (=0) or 2nd interface
1105
(=1) of relation pair */
1106
int
* err
1107
/**< [out] Returned Error status (see iBase_ErrorType) */
1108
);
1109
1110
/***************************************************************************/
/**
1111
* \brief Infer
1112
*relations between
1113
*entities in
1114
*specified pair of
1115
*interfaces
1116
*
1117
* Infer relations
1118
*between entities in
1119
*specified pair of
1120
*interfaces. The
1121
* criteria used to
1122
*infer these
1123
*relations depends on
1124
*the interfaces in
1125
* the pair, the iRel
1126
*implementation, and
1127
*the source of the
1128
*data in those
1129
* interfaces.
1130
******************************************************************************/
1131
void
iRel_inferAllRelations
(
iRel_Instance
instance,
1132
/**< [in] iRel instance handle */
1133
iRel_PairHandle
pair,
1134
/**< [in] Relation pair handle being queried */
1135
int
* err
1136
/**< [out] Returned Error status (see iBase_ErrorType) */
1137
);
1138
1139
/***************************************************************************/
/**
1140
* \brief Infer
1141
*relations and
1142
*relation type
1143
*between entities in
1144
*specified pair of
1145
*interfaces
1146
*
1147
* Infer relations
1148
*between entities in
1149
*specified pair of
1150
*interfaces, and the
1151
* relation type used
1152
*by this iRel
1153
*implementation. The
1154
*criteria used to
1155
* infer these
1156
*relations depends on
1157
*the interfaces in
1158
*the pair, the iRel
1159
* implementation, and
1160
*the source of the
1161
*data in those
1162
*interfaces.
1163
******************************************************************************/
1164
void
iRel_inferAllRelationsAndType
(
iRel_Instance
instance,
1165
/**< [in] iRel instance handle */
1166
iRel_PairHandle
* pair,
1167
/**< [in] Relation pair handle created by implementation */
1168
int
* err
1169
/**< [out] Returned Error status (see iBase_ErrorType) */
1170
);
1171
1172
/***************************************************************************/
/**
1173
* \brief Infer
1174
*relations
1175
*corresponding to
1176
*specified entity and
1177
*relation pair
1178
*
1179
* Infer relations
1180
*corresponding to
1181
*specified entity and
1182
*relation pair. The
1183
* criteria used to
1184
*infer these
1185
*relations depends on
1186
*the interfaces in
1187
* the pair, the iRel
1188
*implementation, and
1189
*the source of the
1190
*data in those
1191
* interfaces.
1192
******************************************************************************/
1193
void
iRel_inferEntRelations
(
iRel_Instance
instance,
1194
/**< [in] iRel instance handle */
1195
iRel_PairHandle
pair,
1196
/**< [in] Relation pair handle being queried */
1197
iBase_EntityHandle
entity,
1198
/**< [in] Entity whose relations are being inferred */
1199
int
iface_no,
1200
/**< [in] Entity corresponds to 1st (=0) or 2nd (=1) interface in
1201
relation pair */
1202
int
* err
1203
/**< [out] Returned Error status (see iBase_ErrorType) */
1204
);
1205
1206
/***************************************************************************/
/**
1207
* \brief Brief
1208
*unavailable
1209
*
1210
* Description
1211
*unavailable
1212
******************************************************************************/
1213
void
iRel_inferSetRelations
(
iRel_Instance
instance,
1214
/**< [in] iRel instance handle */
1215
iRel_PairHandle
pair,
1216
/**< [in] description unknown */
1217
iBase_EntitySetHandle
entity_set,
1218
/**< [in] description unknown */
1219
int
iface_no,
1220
/**< [in] description unknown */
1221
int
* err
1222
/**< [out] Returned Error status (see iBase_ErrorType) */
1223
);
1224
1225
/***************************************************************************/
/**
1226
* \brief Infer
1227
*relations
1228
*corresponding to
1229
*specified entities
1230
*and relation pair
1231
*
1232
* Infer relations
1233
*corresponding to
1234
*specified entities
1235
*and relation pair.
1236
* The criteria used
1237
*to infer these
1238
*relations depends on
1239
*the interfaces in
1240
* the pair, the iRel
1241
*implementation, and
1242
*the source of the
1243
*data in those
1244
* interfaces.
1245
******************************************************************************/
1246
void
iRel_inferEntArrRelations
(
iRel_Instance
instance,
1247
/**< [in] iRel instance handle */
1248
iRel_PairHandle
pair,
1249
/**< [in] Relation pair handle being queried */
1250
iBase_EntityHandle
*
entities
,
1251
/**< [in] Array of entities whose relation are being inferred */
1252
int
entities_size,
1253
/**< [in] Number of entities in array */
1254
int
iface_no,
1255
/**< [in] Entities correspond to 1st (=0) or 2nd (=1) interface in
1256
relation pair */
1257
int
* err
1258
/**< [out] Returned Error status (see iBase_ErrorType) */
1259
);
1260
1261
/***************************************************************************/
/**
1262
* \brief Brief
1263
*unavailable
1264
*
1265
* Description
1266
*unavailable
1267
******************************************************************************/
1268
void
iRel_inferSetArrRelations
(
iRel_Instance
instance,
1269
/**< [in] iRel instance handle */
1270
iRel_PairHandle
pair,
1271
/**< [in] description unknown */
1272
iBase_EntitySetHandle
* entity_sets,
1273
/**< [in] description unknown */
1274
int
entities_size,
1275
/**< [in] description unknown */
1276
int
iface_no,
1277
/**< [in] description unknown */
1278
int
* err
1279
/**< [out] Returned Error status (see iBase_ErrorType) */
1280
);
1281
1282
/** \mainpage The ITAPS Relations Interface iRel
1283
*
1284
* Each ITAPS interface encapsulates functionality that "belongs"
1285
* together, for example mesh or geometric model functionality. In
1286
* some cases, however, data in several of these interfaces need to
1287
* be related together. For example, a collection of mesh faces
1288
* should be related to the geometric model face which they
1289
* discretize. The ITAPS Relations interface accomplishes this in a
1290
* way which allows the lower-level interfaces to remain
1291
* independent.
1292
*
1293
* iRel defines relations as pairwise relations between entities
1294
* or entity sets. Related entities can be in the same or different
1295
* interfaces. A given relation is created for a given pair of
1296
* interfaces and returned in the form of a \em Relation \em Handle.
1297
* After a specific relation pair has been created, concrete
1298
* relations for that pair can be assigned and retrieved for
1299
* specific entities using set and get functions on the iRel
1300
* interface. A given interface instance can appear in one or many
1301
* relation pairs, each identified by the relation pair handle.
1302
*
1303
* \section Types Relation Types
1304
*
1305
* Relations are also distinguished by a pair of relation types.
1306
* For each interface in a relation pair, a corresponding type
1307
* indicates whether the relation applies to entities, entity sets,
1308
* or both entities and sets in the corresponding interface in the
1309
* pair. If only one of the interfaces in a given pair has a
1310
* 'both'-type, entities and entity sets in that
1311
* interface are each related to either entities or sets in the other
1312
* interface in the pair. If both of the sides of a relation are of
1313
* 'both'-type, entities and sets on one side of a relation point to
1314
* sets on the other side.
1315
*
1316
* \section Status Relation Status
1317
*
1318
* Relations are also distinguished by a pair of relation statuses.
1319
* For each interface in a relation pair, a corresponding status indicates
1320
* whether the relation on that side is kept up to date, or stored at all.
1321
* Allowable values for status are iRel_ACTIVE, iRel_INACTIVE, and iRel_NOTEXIST,
1322
* defined in the iRel_RelationStatus enumeration. Status for a given side
1323
* can be changed from iRel_ACTIVE to iRel_INACTIVE and vice versa, or from
1324
* either of those to iRel_NOTEXIST. However, once changed to iRel_NOTEXIST
1325
* (or created that way), a side cannot be changed back to the other two.
1326
* Changing a side to be iRel_INACTIVE can be used when frequent changes to
1327
* the underlying entities are being made, e.g. during adaptive mesh refinement.
1328
* Changing from iRel_INACTIVE to iRel_ACTIVE implies a traversal of all entities
1329
* on the iRel_ACTIVE side to recover which entities on the iRel_INACTIVE side
1330
* must have their relations updated.
1331
*
1332
* \section ArgOrder Argument Order
1333
*
1334
* Many functions in the iRel interface take as input two entities,
1335
* or two lists of entities, along with a relation pair handle. For
1336
* these functions, the entities or lists are assumed to be in the
1337
* same order as the interfaces used to create that relation pair.
1338
* For example, if a relation pair is created by calling:
1339
* \code
1340
* iRel_createRelation(instance, iface1, ent_or_set1, type1,
1341
* iface2, ent_or_set2, type2,
1342
* &relation_handle, &ierr)
1343
* \endcode
1344
* and relations set by calling
1345
* \code
1346
* iRel_setEntEntRelation(instance, relation_handle,
1347
* ent1, is_set1, ent2, is_set2, &ierr)
1348
* \endcode
1349
* it is assumed that ent1 is contained in iface1 and ent2 in
1350
* iface2.
1351
*
1352
* For functions taking only one entity or list as input, and
1353
* returning an entity or list, an additional argument indicates
1354
* whether the input entity or list belongs to the first or second
1355
* interface in that relation pair.
1356
*
1357
*/
1358
1359
#ifdef __cplusplus
1360
}
/* extern "C" */
1361
#endif
1362
1363
#endif
/* #ifndef _ITAPS_iRel */
itaps
irel
iRel.h
Generated on Wed Oct 4 2023 14:20:28 for MOAB: Mesh Oriented datABase by
1.9.1