Main Page | File List | Globals

iRel.h File Reference

#include "iGeom.h"
#include "iMesh.h"
#include "iRel_protos.h"

Go to the source code of this file.


Typedefs

typedef void *  iRel_Instance
  Type used to store iRel interface handle.

typedef void *  iRel_RelationHandle
  Type used to store references to relation pairs.


Enumerations

enum   IfaceType {
  iRel_IBASE_IFACE = 0, iRel_IGEOM_IFACE, iRel_IMESH_IFACE, iRel_IFIELD_IFACE,
  iRel_IREL_IFACE
}
  IfaceType Enumerator specifying interface types More...


Functions

void  iRel_dtor (iRel_Instance instance, int *ierr)
  iRel_dtor Destroy the interface object

void  iRel_createAssociation (iRel_Instance instance, iBase_Instance iface1, const int ent_or_set1, const int iface_type1, iBase_Instance iface2, const int ent_or_set2, const int iface_type2, iRel_RelationHandle *rel, int *ierr)
  Create a relation pair between two interfaces.

void  iRel_destroyAssociation (iRel_Instance instance, iRel_RelationHandle rel, int *ierr)
  Destroy a relation pair.

void  iRel_getAssociatedInterfaces (iRel_Instance instance, iBase_Instance iface, iBase_Instance **interfaces, int *interfaces_allocated, int *interfaces_size, int *ierr)
  Get interfaces related to specified interface.

void  iRel_setEntEntAssociation (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle ent1, int is_set1, iBase_EntityHandle ent2, int is_set2, int *ierr)
void  iRel_setEntArrAssociation (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle ent1, int is_set1, int switch_order, iBase_EntityHandle *ent_array_2, int num_entities, int is_set2, int *ierr)
  Set a relation between an entity and several entities.

void  iRel_setArrAssociation (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle *ent_array_1, int num_ent1, int is_set1, iBase_EntityHandle *ent_array_2, int num_ent2, int is_set2, int *ierr)
void  iRel_getEntEntAssociation (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle ent1, int is_set1, int switch_order, iBase_EntityHandle *ent2, int *is_set2, int *ierr)
  Get entity related to specified entity and relation handle.

void  iRel_getEntArrAssociation (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle ent1, int is_set1, int return_sets, int switch_order, iBase_EntityHandle **ent_array_2, int *ent_array_2_allocated, int *ent_array_2_size, int *ierr)
  Get entities related to specified entity and relation.

void  iRel_getArrAssociation (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle *ent_array_1, int ent_array_1_size, int is_set1, int return_sets, int switch_order, iBase_EntityHandle **ent_array_2, int *ent_array_2_allocated, int *ent_array_2_size, int **offset, int *offset_allocated, int *offset_size, int *ierr)
  Get entities related to those in specified array and relation, pairwise.

void  iRel_createVtxAndAssociate (iRel_Instance instance, double x, double y, double z, iBase_EntityHandle associatedGeomEnt, iBase_EntityHandle *new_entity_handle, int *ierr)
  Create a mesh vertex and relate to geometry entity.

void  iRel_createEntAndAssociate (iRel_Instance instance, int new_entity_topology, iBase_EntityHandle *lower_order_entity_handles, int lower_order_entity_handles_size, iBase_EntityHandle associatedGeomEnt, iBase_EntityHandle *new_entity_handle, int *creation_status, int *ierr)
  Create a mesh entity and relate to geometry entity.

void  iRel_createVtxArrAndAssociate (iRel_Instance instance, int num_verts, int storage_order, double *new_coords, int new_coords_size, iBase_EntityHandle *associatedGeomEnts, int num_geom_ents, iBase_EntityHandle **new_vertex_handles, int *new_vertex_handles_allocated, int *new_vertex_handles_size, int *ierr)
  Create an array of mesh vertices and relate to geometry entities.

void  iRel_createEntArrAndAssociate (iRel_Instance instance, int new_entity_topology, iBase_EntityHandle *lower_order_entity_handles, int lower_order_entity_handles_size, int *offsets, int offsets_size, iBase_EntityHandle *associatedGeomEnts, int num_geom_ents, iBase_EntityHandle **new_entity_handles, int *new_entity_handles_allocated, int *new_entity_handles_size, int **status, int *status_allocated, int *status_size, int *ierr)
  Create an array of mesh entities and relate to geometry entities.

void  iRel_inferAllAssociations (iRel_Instance instance, iRel_RelationHandle rel, int *ierr)
  Infer relations between entities in specified pair of interfaces.

void  iRel_inferEntAssociations (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle entity, int is_set, int iface_no, int *ierr)
  Infer relations corresponding to specified entity and relation pair.

void  iRel_inferArrAssociations (iRel_Instance instance, iRel_RelationHandle rel, iBase_EntityHandle *entities, int entities_size, int is_set, int iface_no, int *ierr)
  Infer relations corresponding to specified entities and relation pair.

void  iRel_moveTo (iRel_Instance instance, iGeom_Instance geom, iMesh_Instance mesh, iBase_EntityHandle geom_entity_handle, int *ierr)
void  iRel_newAssoc (const char *options, iRel_Instance *instance, int *ierr, const int options_len)
  Create a new iRel instance.


Variables

iBase_Error  iRel_LAST_ERROR

Typedef Documentation

typedef void* iRel_Instance
 

Type used to store iRel interface handle

typedef void* iRel_RelationHandle
 

Type used to store references to relation pairs


Enumeration Type Documentation

enum IfaceType
 

Enumerator specifying interface types. This enumeration is necessary because functions to get entities of a given dimension are part of the higher-level interfaces (e.g. iGeom, iMesh) instead of iBase.

Enumeration values:
iRel_IBASE_IFACE 
iRel_IGEOM_IFACE 
iRel_IMESH_IFACE 
iRel_IFIELD_IFACE 
iRel_IREL_IFACE 

Function Documentation

void iRel_createAssociation iRel_Instance  instance,
iBase_Instance  iface1,
const int  ent_or_set1,
const int  iface_type1,
iBase_Instance  iface2,
const int  ent_or_set2,
const int  iface_type2,
iRel_RelationHandle rel,
int *  ierr
 

Creates a relation pair between two interfaces, passing back a handle to the pair.

Parameters:
instance  Interface instance
iface1  1st interface object in the relation pair
ent_or_set1  This relation relates entities (=0) or sets (=1) or both (=2) from 1st interface object
iface_type1  Type of 1st interface (0=iBase, 1=iGeom, 2=iMesh, 3=iField, 4=iRel)
iface2  2nd interface object in the relation pair
ent_or_set2  This relation relates entities (=0) or sets (=1) or both (=2) from 2nd interface object
iface_type2  Type of 2nd interface (0=iBase, 1=iGeom, 2=iMesh, 3=iField, 4=iRel)
*rel  Pointer to relation handle, returned from function
*ierr  Pointer to error value, returned from function

void iRel_createEntAndAssociate iRel_Instance  instance,
int  new_entity_topology,
iBase_EntityHandle *  lower_order_entity_handles,
int  lower_order_entity_handles_size,
iBase_EntityHandle  associatedGeomEnt,
iBase_EntityHandle *  new_entity_handle,
int *  creation_status,
int *  ierr
 

Create a mesh entity and relate to geometry entity. Relation pair instance must be between geometry instance and mesh instance, and must have instances in that order (geometry, mesh).

Parameters:
instance  Interface instance
new_entity_topology  Topology type of new mesh entity (from iMesh Topology enum)
lower_order_entity_handles  Handles of lower dimension entities bounding new mesh entity
lower_order_entity_handles_size  Number of lower dimension entities in lower_order_entity_handles array
associatedGeomEnt  Geometry entity to be related to new vertex
*new_entity_handle  Pointer to new mesh entity handle
*creation_status  Creation status of new entity (from iBase CreationStatus enum)
*ierr  Pointer to error value, returned from function

void iRel_createEntArrAndAssociate iRel_Instance  instance,
int  new_entity_topology,
iBase_EntityHandle *  lower_order_entity_handles,
int  lower_order_entity_handles_size,
int *  offsets,
int  offsets_size,
iBase_EntityHandle *  associatedGeomEnts,
int  num_geom_ents,
iBase_EntityHandle **  new_entity_handles,
int *  new_entity_handles_allocated,
int *  new_entity_handles_size,
int **  status,
int *  status_allocated,
int *  status_size,
int *  ierr
 

Create an array of mesh entities and relate to one or more geometry entities. If only one geometry entity is input, entities are all related to that entity; otherwise the number of new entities and input geometric entities must be identical. Relation pair instance must be between geometry instance and mesh instance, and must have instances in that order (geometry, mesh).

Parameters:
instance  Interface instance
new_entity_topology  Topology type of new mesh entity (from iMesh Topology enum)
lower_order_entity_handles  Handles of lower dimension entities bounding new mesh entity
lower_order_entity_handles_size  Number of lower dimension entities in lower_order_entity_handles array
offsets  Offset array; offset[i] is index into lower_order_entity_handles for i'th new entity
offsets_size  Size of offset array, also equal to one more than number of new entities to be created
*associatedGeomEnts  Geometry entities to be related to new vertices
num_geom_ents  Number of geometry entities
*new_entity_handles  Pointer to array of returned entity handles
*new_entity_handles_allocated  Pointer to allocated size of new entity handle array
*new_entity_handles_size  Pointer to occupied size of new entity handle array
*status  Creation status of new entities (from iBase CreationStatus enum)
*status_allocated  Allocated size of status array
*status_size  Occupied size of status array
*ierr  Pointer to error value, returned from function

void iRel_createVtxAndAssociate iRel_Instance  instance,
double  x,
double  y,
double  z,
iBase_EntityHandle  associatedGeomEnt,
iBase_EntityHandle *  new_entity_handle,
int *  ierr
 

Create a mesh vertex and relate to geometry entity. Relation pair instance must be between geometry instance and mesh instance, and must have instances in that order (geometry, mesh).

Parameters:
instance  Interface instance
x  X position of new mesh vertex
y  Y position of new mesh vertex
z  Z position of new mesh vertex
associatedGeomEnt  Geometry entity to be related to new vertex
*new_entity_handle  Pointer to new mesh vertex handle
*ierr  Pointer to error value, returned from function

void iRel_createVtxArrAndAssociate iRel_Instance  instance,
int  num_verts,
int  storage_order,
double *  new_coords,
int  new_coords_size,
iBase_EntityHandle *  associatedGeomEnts,
int  num_geom_ents,
iBase_EntityHandle **  new_vertex_handles,
int *  new_vertex_handles_allocated,
int *  new_vertex_handles_size,
int *  ierr
 

Create an array of mesh vertices and relate to one or more geometry entities. If only one geometry entity is input, vertices are all related to that entity; otherwise the number of new vertices and input geometric entities must be identical. Relation pair instance must be between geometry instance and mesh instance, and must have instances in that order (geometry, mesh).

Parameters:
instance  Interface instance
num_verts  Number of new vertices to be created
storage_order  Storage order of coordinate array (from iBase StorageOrder enum, either iBase_BLOCKED or iBase_INTERLEAVED)
new_coords  Positions of new mesh vertices
new_coords_size  Number of position entries in new_coords
*associatedGeomEnts  Geometry entities to be related to new vertices
num_geom_ents  Number of geometry entities
*new_vertex_handles  Pointer to array of returned vertex handles
*new_vertex_handles_allocated  Pointer to allocated size of new vertex handle array
*new_vertex_handles_size  Pointer to occupied size of new vertex handle array
*ierr  Pointer to error value, returned from function

void iRel_destroyAssociation iRel_Instance  instance,
iRel_RelationHandle  rel,
int *  ierr
 

Destroy the relation pair corresponding to the handle input

Parameters:
instance  Interface instance
rel  Handle of relation pair to destroy
*ierr  Pointer to error value, returned from function

void iRel_dtor iRel_Instance  instance,
int *  ierr
 

Calls destructor on interface object

Parameters:
instance  Interface object handle to destroy
*ierr  Pointer to error value, returned from function

void iRel_getArrAssociation iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle *  ent_array_1,
int  ent_array_1_size,
int  is_set1,
int  return_sets,
int  switch_order,
iBase_EntityHandle **  ent_array_2,
int *  ent_array_2_allocated,
int *  ent_array_2_size,
int **  offset,
int *  offset_allocated,
int *  offset_size,
int *  ierr
 

Get entities related to those in specified array and relation, pairwise. Returns sets or entities, depending on relation type and entities in ent_array_1.

Parameters:
instance  Interface instance
rel  Relation handle being queried
ent_array_1  Array of entities whose relations are being queried
ent_array_1_size  Number of entities in ent_array_1
is_set1  ent_array_1 contains entities (=0) or sets (=1)
return_sets  If zero and target side of the relation is of type 'set' or 'both', return entities in related sets; if non-zero, return sets; if target is of type 'entity', disregard this argument
switch_order  Entities in ent_array_1 are associated with 1st (=0) or 2nd (=1) interface of this relation pair
*ent_array_2  Pointer to array of entity handles returned from function
*ent_array_2_allocated  Pointer to allocated size of ent_array_2
*ent_array_2_size  Pointer to occupied size of ent_array_2
*offset  Pointer to offset array; (*offset)[i] is index into (*ent_array_2) of 1st relation of ent_array_1[i]
*offset_allocated  Pointer to allocated size of offset
*offset_size  Pointer to occupied size of offset
*ierr  Pointer to error value, returned from function

void iRel_getAssociatedInterfaces iRel_Instance  instance,
iBase_Instance  iface,
iBase_Instance **  interfaces,
int *  interfaces_allocated,
int *  interfaces_size,
int *  ierr
 

Get interfaces related to the specified interface

Parameters:
instance  Interface instance
iface  Specified interface
interfaces  Pointer to array holding returned interfaces related to specified interface
interfaces_allocated  Pointer to allocated size of interfaces list
interfaces_size  Pointer to occupied size of interfaces list
*ierr  Pointer to error value, returned from function

void iRel_getEntArrAssociation iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle  ent1,
int  is_set1,
int  return_sets,
int  switch_order,
iBase_EntityHandle **  ent_array_2,
int *  ent_array_2_allocated,
int *  ent_array_2_size,
int *  ierr
 

Get entities related to specified entity and relation; returns entity sets or contained entities, depending on relation type (entity, set, or both) and return_sets argument

Parameters:
instance  Interface instance
rel  Relation handle being queried
ent1  1st entity of relation being queried
is_set1  ent1 is an entity (=0) or a set (=1)
return_sets  If zero and target side of the relation is of type 'set' or 'both', return entities in related set; if non-zero, return set; if target is of type 'entity', disregard this argument
switch_order  ent1 is associated with 1st (=0) or 2nd (=1) interface of this relation pair
*ent_array_2  Pointer to array of entity handles returned from function
*ent_array_2_allocated  Pointer to allocated size of ent_array_2
*ent_array_2_size  Pointer to occupied size of ent_array_2
*ierr  Pointer to error value, returned from function

void iRel_getEntEntAssociation iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle  ent1,
int  is_set1,
int  switch_order,
iBase_EntityHandle *  ent2,
int *  is_set2,
int *  ierr
 

Get entity related to specified entity and relation handle. Also returns whether the related entity is an entity or a set.

Parameters:
instance  Interface instance
rel  Relation handle being queried
ent1  1st entity of relation being queried
is_set1  1st entity is an entity (=0) or a set (=1)
switch_order  1st entity is related to 1st interface (=0) or 2nd interface (=1) of relation pair
*ent2  Pointer to entity related to ent1
*is_set2  Pointer to flag telling whether *ent2 is an entity (=0) or a set (=1)
*ierr  Pointer to error value, returned from function

void iRel_inferAllAssociations iRel_Instance  instance,
iRel_RelationHandle  rel,
int *  ierr
 

Infer relations between entities in specified pair of interfaces. The criteria used to infer these relations depends on the interfaces in the pair, the iRel implementation, and the source of the data in those interfaces.

Parameters:
instance  Interface instance
rel  Relation handle being queried
*ierr  Pointer to error value, returned from function

void iRel_inferArrAssociations iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle *  entities,
int  entities_size,
int  is_set,
int  iface_no,
int *  ierr
 

Infer relations corresponding to specified entities and relation pair. The criteria used to infer these relations depends on the interfaces in the pair, the iRel implementation, and the source of the data in those interfaces.

Parameters:
instance  Interface instance
rel  Relation handle being queried
entities  Array of entities whose relation are being inferred
entities_size  Number of entities in array
is_set  Entities are regular entities (=0) or sets (=1)
iface_no  Entities correspond to 1st (=0) or 2nd (=1) interface in relation pair
*ierr  Pointer to error value, returned from function

void iRel_inferEntAssociations iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle  entity,
int  is_set,
int  iface_no,
int *  ierr
 

Infer relations corresponding to specified entity and relation pair. The criteria used to infer these relations depends on the interfaces in the pair, the iRel implementation, and the source of the data in those interfaces.

Parameters:
instance  Interface instance
rel  Relation handle being queried
entity  Entity whose relations are being inferred
is_set  Entity is a regular entity (=0) or a set (=1)
iface_no  Entity corresponds to 1st (=0) or 2nd (=1) interface in relation pair
*ierr  Pointer to error value, returned from function

void iRel_moveTo iRel_Instance  instance,
iGeom_Instance  geom,
iMesh_Instance  mesh,
iBase_EntityHandle  geom_entity_handle,
int *  ierr
 

Move related mesh entities to the closest point on the specified geometry entity. There must exist a relation pair instance between the input geometry and mesh instances, with those instances in that order (geometry, mesh).

Parameters:
instance  Interface instance
geom  iGeom instance handle
mesh  iMesh instance handle
geom_entity_handle  Geometry entity whose related entities are being moved to it
*ierr  Pointer to error value, returned from function

void iRel_newAssoc const char *  options,
iRel_Instance instance,
int *  ierr,
const int  options_len
 

Create a new iRel instance. Currently no options are implemented.

Parameters:
options  Options for the implementation
*instance  Interface instance
*ierr  Pointer to error value, returned from function
options_len  Length of options string

void iRel_setArrAssociation iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle *  ent_array_1,
int  num_ent1,
int  is_set1,
iBase_EntityHandle *  ent_array_2,
int  num_ent2,
int  is_set2,
int *  ierr
 

Set relations between arrays of entities pairwise, ent_array_1[i]<->ent_array_2[i]. If either array contains sets and that side of the relation is 'both'-type, set relations for individual entities in those sets too.

Parameters:
instance  Interface instance
rel  Relation handle being queried
ent_array_1  1st array of entities of relation being set
num_ent1  Number of entities in 1st array
is_set1  1st array contains entities (=0) or sets (=1)
ent_array_2  2nd array of entities of relation being set
num_ent2  Number of entities in 2nd array
is_set2  2nd array contains entities (=0) or sets (=1)
*ierr  Pointer to error value, returned from function

void iRel_setEntArrAssociation iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle  ent1,
int  is_set1,
int  switch_order,
iBase_EntityHandle *  ent_array_2,
int  num_entities,
int  is_set2,
int *  ierr
 

Set a relation between an entity and several entities. If either is a set and that side of the relation is 'both'-type, set relations for individual entities in that set too.

Parameters:
instance  Interface instance
rel  Relation handle being queried
ent1  1st entity of relation being set
is_set1  ent1 is an entity (=0) or a set (=1)
switch_order  If non-zero, ent1 is associated with iface2 and ent_array_2 with iface1 of specified relation, otherwise vica versa
ent_array_2  Entity(ies) to be related to ent1
num_entities  Number of entities in ent_array_2
is_set2  Entities in ent_array_2 are entities (=0) or sets (=1)
*ierr  Pointer to error value, returned from function

void iRel_setEntEntAssociation iRel_Instance  instance,
iRel_RelationHandle  rel,
iBase_EntityHandle  ent1,
int  is_set1,
iBase_EntityHandle  ent2,
int  is_set2,
int *  ierr
 

Parameters:
instance  Interface instance
rel  Relation handle being queried
ent1  1st entity of relation being set
is_set1  ent1 is an entity (=0) or a set (=1)
ent2  2nd entity of relation being set
is_set2  ent2 is an entity (=0) or a set (=1)
*ierr  Pointer to error value, returned from function

Variable Documentation

struct iBase_Error iRel_LAST_ERROR
 


Generated on Tue Jun 26 11:09:21 2007 for iRel by doxygen 1.3.5