//========================================================== // iMesh PACKAGE - The ITAPS mesh interface // MESH QUERY, MODIFICATION //========================================================== // // Only import ITAPS if the iMesh package appears in a separate sidl file. -TLD // import iBase version 0.8; package iMesh version 0.8 { enum EntityTopology { POINT, /**< a general zero-dimensional entity */ LINE_SEGMENT, /**< a general one-dimensional entity */ POLYGON, /**< a general two-dimensional element */ TRIANGLE, /**< a three-sided, two-dimensional element */ QUADRILATERAL, /**< a four-sided, two-dimensional element */ POLYHEDRON, /**< a general three-dimensional element */ TETRAHEDRON, /**< a four-sided, three-dimensional element whose * faces are quadrilaterals */ HEXAHEDRON, /**< a six-sided, three-dimensional element whose * faces are quadrilaterals */ PRISM, /**< a five-sided, three-dimensional element which * has three quadrilateral faces and two * triangular faces */ PYRAMID, /**< a five-sided, three-dimensional element * which has one quadrilateral face and four * triangular faces */ SEPTAHEDRON, /**< a hexahedral entity with one collapsed edge * - a seven noded element with six faces */ ALL_TOPOLOGIES /**< allows the user to request information * about all the topology types */ }; /** single call, worst case scenario */ enum AdjacencyInfo { UNAVAILABLE, /**< Adjacency information not supported */ ALL_ORDER_1, /**< Stored or local traversal */ ALL_ORDER_LOGN, /**< Computation required, e.g., Tree search */ ALL_ORDER_N, /**< Computation required, e.g., Global search */ SOME_ORDER_1, /**< Some connectivity available, stored or local */ SOME_ORDER_LOGN, /**< Some connectivity available, log(n) computation */ SOME_ORDER_N /**< Some connectivity available, n computation */ }; //==================================================== // Core Mesh Interface //==================================================== interface Mesh { // this implies that you can get the root set before data is loaded // use tag conventions on the entity set to specify option behavior // - these are specific to implementations // - Tag convention names - iMesh_LOAD_OPTIONS, iMesh_SAVE_OPTIONS of type BYTE // implementation-defined sizes // - data gets read into root set in all cases and also into the entity_set if // it's not the root set // when you read in duplicate data, then duplicate data exists in the root set, // no attempt is made to merge the data at this stage // for those implementations that don't support duplicate data and/or multiple // - return an error // what gets saved will be file format and implementation dependent // input/output void load( in opaque entity_set_handle, in string name, in string options) throws iBase.Error; void save( in opaque entity_set_handle, in string name, in string options) throws iBase.Error; // global info void getRootSet(out opaque root_set) throws iBase.Error; void getGeometricDim(out int dim) throws iBase.Error; void getDfltStorage(out iBase.StorageOrder dflt_storage) throws iBase.Error; void getAdjTable( inout array< AdjacencyInfo > adjacency_table, out int adjacency_table_size) throws iBase.Error; // check the status of the invariance of the handles since the last time // the getHandleStatus function was called // returns true until the handles have changed // then it returns false until reset is true void areEHValid(in int reset, out int are_valid) throws iBase.Error; void getNumOfType( in opaque entity_set_handle, in EntityType entity_type, out int num_type) throws iBase.Error; void getNumOfTopo( in opaque entity_set_handle, in EntityTopology entity_topology, out int num_topo) throws iBase.Error; // entity arrays void getEntities( in opaque entity_set, in EntityType entity_type, in EntityTopology entity_topology, inout array entity_handles, out int entity_handles_size) throws iBase.Error; void getVtxArrCoords( in array vertex_handles, in int vertex_handles_size, inout StorageOrder storage_order, inout array coords, out int coords_size) throws iBase.Error; void getAdjEntities( in opaque entity_set, in EntityType entity_type_requestor, in EntityTopology entity_topology_requestor, in EntityType entity_type_requested, inout array adj_entity_handles, out int adj_entity_handles_size, inout array offset, out int offset_size, inout array in_entity_set, out int in_entity_set_size) throws iBase.Error; void getAdjEntIndices( in opaque entity_set_handle, in EntityType entity_type_requestor, in EntityTopology entity_topology_requestor, in EntityType entity_type_requested, inout array entity_handles, out int entity_handles_size, inout array adj_entity_handles, out int adj_entity_handles_size, inout array adj_entity_indices, out int adj_entity_indices_size, inout array offset, out int offset_size ) }; //==================================================== // SINGLE ENTITY TRAVERSAL, QUERY //==================================================== interface Entity extends Mesh { // traverse void initEntIter( in opaque entity_set_handle, in EntityType requested_entity_type, in EntityTopology requested_entity_topology, out opaque entity_iterator ) throws iBase.Error; // change the behavior to be false when there are no more handles and put // garbage in the handle spot (different from current which returns false // on the last valid handle) // note in the doc that it is possible to modify the mesh and muck with // the iterators in such a way that recovery (and the possibility thereof) // is implementation dependent - so buyer beware void getNextEntIter( in opaque entity_iterator, out opaque entity_handle, out int at_end) throws iBase.Error; void resetEntIter( in opaque entity_iterator) throws iBase.Error; void endEntIter( in opaque entity_iterator) throws iBase.Error; // query void getEntTopo( in opaque entity_handle, out EntityTopology ent_topo) throws iBase.Error; void getEntType( in opaque entity_handle, out EntityType ent_type) throws iBase.Error; void getVtxCoord( in opaque vertex_handle, out double x, out double y, out double z) throws iBase.Error; void getEntAdj( in opaque entity_handle, in EntityType entity_type_requested, inout array adj_entity_handles, out int adj_entity_handles_size) throws iBase.Error; void getEnt2ndAdj( in opaque entity_handle, in EntityType order_adjacent_key, in EntityType entity_type_requested, inout array adj_entity_handles, out int adj_entity_handles_size) throws iBase.Error; }; //==================================================== // ENTITY ARRAY TRAVERSAL, QUERY //==================================================== interface Arr extends Mesh { //traverse void initEntArrIter( in opaque entity_set_handle, in EntityType requested_entity_type, in EntityTopology requested_entity_topology, in int requested_array_size, out opaque entArr_iterator ) throws iBase.Error; // return true as long as ent handle size is nonzero and false otherwise // note in the doc that it is possible to modify the mesh and muck with // the iterators in such a way that recovery (and the possibility thereof) // is implementation dependent - so buyer beware void getNextEntArrIter( in opaque entArr_iterator, inout array entity_handles, out int entity_handles_size, out int at_end) throws iBase.Error; void resetEntArrIter( in opaque entArr_iterator) throws iBase.Error; void endEntArrIter( in opaque entArr_iterator) throws iBase.Error; //query void getEntArrTopo( in array entity_handles, in int entity_handles_size, inout array topology, out int topology_size) throws iBase.Error; void getEntArrType( in array entity_handles, in int entity_handles_size, inout array type, out int type_size) throws iBase.Error; void getEntArrAdj( in array entity_handles, in int entity_handles_size, in EntityType entity_type_requested, inout array adj_entity_handles, out int adj_entity_handles_size, inout array offset, out int offset_size) throws iBase.Error; void getEntArr2ndAdj( in array entity_handles, in int entity_handles_size, in EntityType order_adjacent_key, in EntityType entity_type_requested, inout array adj_entity_handles, out int adj_entity_handles_size, inout array offset, out int offset_size) throws iBase.Error; }; //============================================ // MODIFY INTERFACE //============================================ // Entity handle invariance - three levels // - get the same handle for the same entity always, even in the face of modification // - the handle may change, but only in the face of modfication // - the handles are not guaranteed to be invariant ever -- not allowed any more interface Modify extends Mesh { // single entities void setVtxCoords( in opaque vertex_handle, in double x, in double y, in double z) throws iBase.Error; void createVtx( in double x, in double y, in double z, out opaque new_vertex_handle) throws iBase.Error; void createEnt( in EntityTopology new_entity_topology, in array lower_order_entity_handles, in int lower_order_entity_handles_size, out opaque new_entity_handle, out CreationStatus status) throws iBase.Error; void deleteEnt( in opaque entity_handle) throws iBase.Error; }; interface ArrMod extends Mesh { // entity arrays void setVtxArrCoords( in array vertex_handles, in int vertex_handles_size, in StorageOrder storage_order, in array new_coords, in int new_coords_size) throws iBase.Error; void createVtxArr( in int num_verts, in StorageOrder storage_order, in array new_coords, in int new_coords_size, inout array new_vertex_handles, out int new_vertex_handles_size) throws iBase.Error; void createEntArr( in EntityTopology new_entity_topology, in array lower_order_entity_handles, in int lower_order_entity_handles_size, inout array new_entity_handles, out int new_entity_handles_size, inout array status, out int status_size) throws iBase.Error; void deleteEntArr( in array entity_handles, in int entity_handles_size) throws iBase.Error; }; class Factory { static void newMesh(in string option, out Mesh new_mesh) throws iBase.Error; }; } // END iMesh