[Fwd: **** iMesh.h and iBase.h changes ****]
Hi All, I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-) Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st. Thanks, Lori -------- Original Message -------- Subject: **** iMesh.h and iBase.h changes **** Date: Fri, 24 Oct 2008 18:13:11 -0500 From: Jason Kraftcheck <[email protected]> To: TSTT Interface <[email protected]> Here is the list of proposed changes to iMesh.h (yes, not just iMeshP.h) that were a) agreed upon during the latest telecon and b) may need to be completed by all implementations by SC'08. If you object to any of this, please speak out soon. I've attached copies of the interface definitions, updated as described below. 1) Version defines: Beginning with version 0.8 of iMesh.h, we will add the following C preprocessor macros. This will allow, going forward, applications to be compatible with more than one version of the interface*. #define IMESH_MAJOR_VERSION 0 #define IMESH_MINOR_VERSION 7 2) Zero set handle: All mention of passing 'zero' for a set handle in all iMesh.h documention should be replaced with the root set handle*. Implementations for which a) the root set handle is not zero and b) that actually followed the documentation in that they check for zero rather than the root set will need to be updated. 3) Handle types*: The current handle definitions: typedef void* iBase_Instance; typedef void* iBase_EntityHandle; typedef void* iBase_EntitySetHandle; typedef void* iBase_TagHandle; typedef void* iMesh_Instance; typedef void* iMesh_EntityIterator; typedef void* iMesh_EntityArrIterator; will be replaced with: typedef struct iBase_Instance_Private* iBase_Instance; typedef struct iBase_EntityHandle_Private* iBase_EntityHandle; typedef struct iBase_EntitySetHandle_Private* iBase_EntitySetHandle; typedef struct iBase_TagHandle_Private* iBase_TagHandle; typedef struct iMesh_Instance_Private* iMesh_Instance; typedef struct iMesh_EntityIterator_Private* iMesh_EntityIterator; typedef struct iMesh_EntityArrIterator_Private* iMesh_EntityArrIterator; 4) New Function: /**\brief Set geometric dimension of vertex coordinates * * Set the geometric dimension of the mesh. Notes: An application * should not expect this function to succeed unless the mesh database * is empty (no vertices created, no files read, etc.) *\param instance Mesh database from which to request change. *\param geom_dim Requested geometric dimension. */ void iMesh_setGeometricDimension( iMesh_Intance instance, /*in*/ int geom_dim, /*out*/ int* err ); 5) Changed Functions: There are several functions for which an entity set handle is treated as 'inout' where it should be 'in'*. These include: iMesh_addEntToSet iMesh_rmvEntFromSet iMesh_addEntArrToSet iMesh_rmvEntArrFromSet iMesh_addEntSet iMesh_rmvEntSet iMesh_addPrntChld iMesh_rmvPrntChld The argument shoudl be 'in' because the argument (the value of the handle) is not changed. NOTE: The changes described in 3) will ensure that this change results in compile-time errors. Without the changes in 3), changing the real type from void** to void* for the arguments would still compile, which could be disastrous. 6) The following two functions: iMesh_getAllVtxCoords iMesh_getVtxCoordIndex will be replaced with the new function below. NOTE: This is slightly different than what was discussed during the telecon. I a) noticed a deficiency in the usage (added the 'entity_handles' output list) and b) dropped the in_entity_set argument, for which no agreement was reached during the telecon. /**\brief Get indexed representation of mesh or subset of mesh * * Given an entity set and optionally a type or topology, return: * - The entities in the set of the specified type or topology * - The entities adjacent to those entities with a specified * type, as a list of unique handles. * - For each entity in the first list, the adjacent entities, * specified as indices into the second list. * *\param entity_set_handle The set of entities from which to query *\param entity_type_requestor If not iBase_ALL_TYPES, act only on * the subset of 'entity_set_handle' of the * specified type. *\param entity_topology_requestor If not iMesh_ALL_TOPOLOGIES, act only * on the subset of 'entity_set_handle' with * the specified topology. *\param entity_type_requested The type of the adjacent entities to * return. *\param entity_handles The handles of the (non-struct) subset of * the entity set indicated by * 'entity_set_handle' and the optional type * and topology filtering arguments. *\param adj_entity_handles The union of the entities of type * 'requested_entity_type' adjacent to each * entity in 'entity_handles'. *\param adj_entity_indices For each entity in 'entity_handles', the * adjacent entities of type * 'entity_type_requested', specified as * indices into 'adj_entity_handles'. The * values are concatenated into a single * array in the order of the entity handles * in 'entity_handles'. *\param offset For each entity in the corresponding * position in 'entity_handles', the position * in 'adj_entity_indices' at which values * for that entity are stored. */ void iMesh_getAdjEntIndices(iMesh_Instance instance, /*in*/ const iBase_EntityHandle entity_set_handle, /*in*/ const int entity_type_requestor, /*in*/ const int entity_topology_requestor, /*in*/ const int entity_type_requested, /*inout*/ iBase_EntityHandle** entity_handles, /*inout*/ int* entity_handles_allocated, /*out*/ int* entity_handles_size, /*inout*/ iBase_EntityHandle** adj_entity_handles, /*inout*/ int* adj_entity_handles_allocated, /*out*/ int* adj_entity_handles_size, /*inout*/ iBsae_EntityHandle** adj_entity_indices, /*inout*/ int* adj_entity_indices_allocated, /*out*/ int* adj_entity_indices_size, /*inout*/ int** offset, /*inout*/ int* offset_allocated, /*out*/ int* offset_size, /*out*/ int *err); The code below uses the old interface to retrieve a copy of a hexahedral mesh in a simple array form: MBEntityHandle *vertices = 0, *hexes = 0; int *hex_vertex_indices = 0, *hex_vertex_offsets = 0; double* coords; int num_vertices, num_hexes, junk, junk2, junk3, err, order; int *junk_array; junk = 0; iMesh_getEntities( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, &hexes, &junk, &num_hexes, &err ); junk = 0; iMesh_getEntities( instance, root_set, iBase_VERTEX, iMesh_ALL_TOPOLOGIES, &vertices, &junk, &num_vertices, &err ); junk = junk2 = 0; junk_array = NULL; order = iBase_INTERLEAVED; iMesh_getAllVtxCoords( instance, root_set, &coords, &junk, &junk, &junk_array, &junk2, &junk2, &order, &err); free(junk_array); junk = junk2 = junk3 = 0; junk_array = NULL; iMesh_getVtxCoordIndex( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, iBase_VERTEX, &hex_vertex_offsets, &junk, &junk, &hex_vertex_indices, &junk2, &junk2, &junk_array, &junk3, &junk3, &err ); free( junk_array ); The same code in the new API will be: MBEntityHandle *vertices = 0, *hexes = 0; int *hex_vertex_indices = 0, *hex_vertex_offsets = 0; double* coords; int num_vertices, num_hexes, junk, junk2, junk3, junk4, err; int order; junk = junk2 = junk3 = junk4 = 0; iMesh_getAdjEntIndices( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, iBase_VERTEX, &hexes, &junk, &num_hexes, &vertices, &junk2, &num_vertices, &hex_vertex_indices, &junk3, &junk3, &hex_vertex_offsets, &junk4, &junk4 ); junk = 0; order = iBase_INTERLEAVED; iMesh_getVtxArrCoords( instance, vertices, num_vertex, &order, &coords, &junk, &junk, &err ); 7) New Function: Array form of iMesh_isEntContained to replace containment flags no longer returned from iMesh_getVtxCoordIndex (and hopefully some day all the other functions with a similar argument). void iMesh_isEntArrContained( iMesh_Instance instance, /*in*/ iBase_EntitySetHandle containing_set, /*in*/ const iBase_EntityHandle* entity_handles, /*in*/ int num_entity_handles, /*inout*/ int** is_contained, /*inout*/ int* is_contained_allocated, /*out*/ int* is_contained_size, /*out*/ int* err ); 8) Replace some iBase_EntityHandle with iBase_EntitySetHandle where appropriate*: iMesh_getAdjEntIndices iMesh_getAdjEntities - jason * Similar changes should probably be made to iGeom.h, iMeshP.h, and iRel.h, but that was not discussed during the telecon. /** * Copyright 2006 Sandia Corporation. Under the terms of Contract * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government * retains certain rights in this software. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * */ //======================================================== // iBase PACKAGE -- // ITAPS UTITLIES COMMON ACROSS INTERFACES // ERRORS, TAGS //======================================================== package iBase version 0.7 { enum EntityType { VERTEX, EDGE, FACE, REGION, ALL_TYPES }; enum StorageOrder { BLOCKED, INTERLEAVED, UNDETERMINED }; enum CreationStatus { NEW, ALREADY_EXISTED, CREATED_DUPLICATE, CREATION_FAILED }; //==================================================== // ERROR FUNCTIONALITY //==================================================== enum ErrorActions { SILENT, // does nothing, not recommended WARN_ONLY, // prints something, but nothing else THROW_ERROR // throws an exception }; enum ErrorType { SUCCESS, DATA_ALREADY_LOADED, NO_DATA, FILE_NOT_FOUND, FILE_ACCESS_ERROR, NIL_ARRAY, // array was supposed to be initialized and have data BAD_ARRAY_SIZE, BAD_ARRAY_DIMENSION, // all tstt arrays should be 1D INVALID_ENTITY_HANDLE, INVALID_ENTITY_COUNT, INVALID_ENTITY_TYPE, INVALID_ENTITY_TOPOLOGY, BAD_TYPE_AND_TOPO, ENTITY_CREATION_ERROR, INVALID_TAG_HANDLE, TAG_NOT_FOUND, TAG_ALREADY_EXISTS, TAG_IN_USE, INVALID_ENTITYSET_HANDLE, INVALID_ITERATOR_HANDLE, INVALID_ARGUMENT, ARGUMENT_OUT_OF_RANGE, MEMORY_ALLOCATION_FAILED, NOT_SUPPORTED, ENTITY_IN_USE, FAILURE }; class Error extends sidl.SIDLException { void set(in ErrorType error, in string description); void getErrorType(out ErrorType err_type); void get(out ErrorType err, out string description); void getDescription(out string description); void echo(in string label); // prints label and then description string to stderr }; //==================================================== // TAGS //==================================================== enum TagValueType { INTEGER, DOUBLE, ENTITY_HANDLE, BYTES }; //==================================================== // BASIC TAG FUNCTIONALITY //==================================================== // be careful about size arguments // createTag takes number of values of type tag_type interface Tag { void createTag(in string tag_name, in int number_of_values, in TagValueType tag_type, out opaque tag_handle) throws iBase.Error; void destroyTag(in opaque tag_handle, in bool forced) throws iBase.Error; void getTagName(in opaque tag_handle, out string tag_name) throws iBase.Error; void getTagSizeValues(in opaque tag_handle, out int size_values) throws iBase.Error; // number of values void getTagSizeBytes(in opaque tag_handle, out int size_bytes) throws iBase.Error; // total number of bytes void getTagHandle(in string tag_name, out opaque tag_handle) throws iBase.Error; void getTagType(in opaque tag_handle, out TagValueType tag_data_type) throws iBase.Error; }; //==================================================== // ENTITY TAGS //==================================================== interface EntTag extends Tag { void getData( in opaque entity_handle, in opaque tag_handle, inout array<char> tag_value, out int tag_value_size) throws iBase.Error; // in bytes - number of things in the array void getIntData( in opaque entity_handle, in opaque tag_handle, out int int_data) throws iBase.Error; void getDblData( in opaque entity_handle, in opaque tag_handle, out double dbl_data) throws iBase.Error; void getEHData( in opaque entity_handle, in opaque tag_handle, out opaque eh_data) throws iBase.Error; void setData( in opaque entity_handle, in opaque tag_handle, in array<char> tag_value, in int tag_value_size) throws iBase.Error; void setIntData( in opaque entity_handle, in opaque tag_handle, in int tag_value) throws iBase.Error; void setDblData( in opaque entity_handle, in opaque tag_handle, in double tag_value) throws iBase.Error; void setEHData( in opaque entity_handle, in opaque tag_handle, in opaque tag_value) throws iBase.Error; void getAllTags( in opaque entity_handle, inout array<opaque> tag_handles, out int tag_handles_size) throws iBase.Error; void rmvTag( in opaque entity_handle, in opaque tag_handle) throws iBase.Error; }; //==================================================== // ENTITY ARRAY TAGS //==================================================== // the value_array_size is the total number of characters // value_array_size = number of entity_handles*size of each tag's value in bytes // = entity_handles_size * tag value size // in units of elements in the array - value_array_size // on array tags - if you request an int tag on 100 entities and not all of them // have the tag - the behavior is: throw an error; array contents are undefined // error is TAG_NOT_FOUND // on removing tags on array of entities - if the entity doesn't have the tag // just skip over it - do not throw an error and delete tags on the rest of the ents interface ArrTag extends Tag { void getArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, inout array<char> value_array, out int value_array_size) throws iBase.Error; void getIntArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, inout array<int> value_array, out int value_array_size) throws iBase.Error; void getDblArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, inout array<double> value_array, out int value_array_size) throws iBase.Error; void getEHArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, inout array<opaque> value_array, out int value_array_size) throws iBase.Error; void setArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, in array<char> value_array, in int value_array_size) throws iBase.Error; void setIntArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, in array<int> value_array, in int value_array_size) throws iBase.Error; void setDblArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, in array<double> value_array, in int value_array_size) throws iBase.Error; void setEHArrData( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle, in array<opaque> value_array, in int value_array_size) throws iBase.Error; void rmvArrTag( in array<opaque> entity_handles, in int entity_handles_size, in opaque tag_handle) throws iBase.Error; }; //=================================================== // ENTITY SET TAGS //=================================================== interface SetTag extends Tag { //tags void setEntSetData( in opaque entity_set, in opaque tag_handle, inout array<char> tag_value, in int tag_value_size) throws iBase.Error; void setEntSetIntData( in opaque entity_set, in opaque tag_handle, in int tag_value) throws iBase.Error; void setEntSetDblData( in opaque entity_set, in opaque tag_handle, in double tag_value) throws iBase.Error; void setEntSetEHData( in opaque entity_set, in opaque tag_handle, in opaque tag_value) throws iBase.Error; void getEntSetData( in opaque entity_set, in opaque tag_handle, inout array<char> tag_value, out int tag_value_size) throws iBase.Error; void getEntSetIntData( in opaque entity_set, in opaque tag_handle, out int int_data) throws iBase.Error; void getEntSetDblData( in opaque entity_set, in opaque tag_handle, out double dbl_data) throws iBase.Error; void getEntSetEHData( in opaque entity_set, in opaque tag_handle, out opaque eh_data) throws iBase.Error; void getAllEntSetTags( in opaque entity_set, inout array<opaque> tag_handles, out int tag_handles_size) throws iBase.Error; void rmvEntSetTag( in opaque entity_set, in opaque tag_handle) throws iBase.Error; }; interface EntSet { // create/destroy void createEntSet( in bool isList, out opaque entity_set) throws iBase.Error; void destroyEntSet( in opaque entity_set) throws iBase.Error; // is this set ordered? void isList(in opaque entity_set, out int is_list) throws iBase.Error; // get the entity sets // num_hops of >=0 is recurse down that many levels (=0 is that ESet only) // num_hops < 0 is recurse forever void getNumEntSets( in opaque entity_set, in int num_hops, out int num_sets) throws iBase.Error; void getEntSets ( in opaque entity_set, in int num_hops, inout array<opaque> contained_entset_handles, out int contained_entset_handles_size) throws iBase.Error; // add and remove entities void addEntToSet(in opaque entity_handle, in opaque entity_set) throws iBase.Error; // if the entity isn't in the set, don't throw an error void rmvEntFromSet( in opaque entity_handle, in opaque entity_set) throws iBase.Error; void addEntArrToSet( in array<opaque> entity_handles, in int entity_handles_size, in opaque entity_set) throws iBase.Error; // if the entity isn't in the set, don't throw an error void rmvEntArrFromSet( in array<opaque> entity_handles, in int entity_handles_size, in opaque entity_set) throws iBase.Error; // all entity sets are contained in root set // root set is contained in no other sets // root set cannot be removed - throw an error // can't remove anthing from root set - throw an error - use destroy // add/remove entity sets void addEntSet( in opaque entity_set_to_add, in opaque entity_set_handle) throws iBase.Error; // if the entity set isn't in the set, don't throw an error void rmvEntSet( in opaque entity_set_to_remove, in opaque entity_set_handle) throws iBase.Error; // check whether an entity is contained in the entity set void isEntContained(in opaque containing_entity_set, in opaque entity_handle, out int is_contained) throws iBase.Error; // check whether entities are contained in the entity set void isEntArrContained( in opaque containing_set, in array<opaque> entity_handles, inout array<int> is_contained, out is_contained_size ); // check whether an entity set is contained in another void isEntSetContained(in opaque containing_entity_set, in opaque contained_entity_set, out int is_contained) throws iBase.Error; }; interface SetRelation extends EntSet { // Root set cannot be a child or parent // don't throw error if parent/child already exists void addPrntChld( in opaque parent_entity_set, in opaque child_entity_set) throws iBase.Error; // don't throw error if parent/child link doesn't exist void rmvPrntChld( in opaque parent_entity_set, in opaque child_entity_set) throws iBase.Error; void isChildOf( in opaque parent_entity_set, in opaque child_entity_set, out int is_child) throws iBase.Error; void getNumChld( in opaque entity_set, in int num_hops, out int num_child) throws iBase.Error; void getNumPrnt( in opaque entity_set, in int num_hops, out int num_parent) throws iBase.Error; void getChldn( in opaque from_entity_set, in int num_hops, inout array<opaque> child_handles, out int child_handles_size) throws iBase.Error; void getPrnts( in opaque from_entity_set, in int num_hops, inout array<opaque> parent_handles, out int parent_handles_size) throws iBase.Error; }; interface SetBoolOps extends EntSet { // Having root set as entity_set_1 gives the complement of entity_set_2 // behavior for contained sets // explicitly lay out what happens when there are multiple copies of something void subtract( in opaque entity_set_1, in opaque entity_set_2, out opaque result_entity_set) throws iBase.Error; void intersect( in opaque entity_set_1, in opaque entity_set_2, out opaque result_entity_set) throws iBase.Error; void unite( in opaque entity_set_1, in opaque entity_set_2, out opaque result_entity_set) throws iBase.Error; }; } // END iBase //========================================================== // 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<opaque> entity_handles, out int entity_handles_size) throws iBase.Error; void getVtxArrCoords( in array<opaque> vertex_handles, in int vertex_handles_size, inout StorageOrder storage_order, inout array<double> 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<opaque> adj_entity_handles, out int adj_entity_handles_size, inout array<int> offset, out int offset_size, inout array<int> 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<opaque> entity_handles, out int entity_handles_size, inout array<opaque> adj_entity_handles, out int adj_entity_handles_size, inout array<int> adj_entity_indices, out int adj_entity_indices_size, inout array<int> 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<opaque> 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<opaque> 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<opaque> 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<opaque> entity_handles, in int entity_handles_size, inout array<EntityTopology> topology, out int topology_size) throws iBase.Error; void getEntArrType( in array<opaque> entity_handles, in int entity_handles_size, inout array<EntityType> type, out int type_size) throws iBase.Error; void getEntArrAdj( in array<opaque> entity_handles, in int entity_handles_size, in EntityType entity_type_requested, inout array<opaque> adj_entity_handles, out int adj_entity_handles_size, inout array<int> offset, out int offset_size) throws iBase.Error; void getEntArr2ndAdj( in array<opaque> entity_handles, in int entity_handles_size, in EntityType order_adjacent_key, in EntityType entity_type_requested, inout array<opaque> adj_entity_handles, out int adj_entity_handles_size, inout array<int> 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<opaque> 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<opaque> vertex_handles, in int vertex_handles_size, in StorageOrder storage_order, in array<double> new_coords, in int new_coords_size) throws iBase.Error; void createVtxArr( in int num_verts, in StorageOrder storage_order, in array<double> new_coords, in int new_coords_size, inout array<opaque> new_vertex_handles, out int new_vertex_handles_size) throws iBase.Error; void createEntArr( in EntityTopology new_entity_topology, in array<opaque> lower_order_entity_handles, in int lower_order_entity_handles_size, inout array<opaque> new_entity_handles, out int new_entity_handles_size, inout array<CreationStatus> status, out int status_size) throws iBase.Error; void deleteEntArr( in array<opaque> 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
Lori, I am traveling the first pair of days. Vitus On Mon, 2009-01-05 at 11:54 -0700, Lori A. Diachin wrote:
Hi All,
I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-)
Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st.
Thanks, Lori
-------- Original Message -------- Subject: **** iMesh.h and iBase.h changes **** Date: Fri, 24 Oct 2008 18:13:11 -0500 From: Jason Kraftcheck <[email protected]> To: TSTT Interface <[email protected]>
Here is the list of proposed changes to iMesh.h (yes, not just iMeshP.h) that were a) agreed upon during the latest telecon and b) may need to be completed by all implementations by SC'08. If you object to any of this, please speak out soon. I've attached copies of the interface definitions, updated as described below.
1) Version defines: Beginning with version 0.8 of iMesh.h, we will add the following C preprocessor macros. This will allow, going forward, applications to be compatible with more than one version of the interface*. #define IMESH_MAJOR_VERSION 0 #define IMESH_MINOR_VERSION 7
2) Zero set handle: All mention of passing 'zero' for a set handle in all iMesh.h documention should be replaced with the root set handle*. Implementations for which a) the root set handle is not zero and b) that actually followed the documentation in that they check for zero rather than the root set will need to be updated.
3) Handle types*: The current handle definitions: typedef void* iBase_Instance; typedef void* iBase_EntityHandle; typedef void* iBase_EntitySetHandle; typedef void* iBase_TagHandle;
typedef void* iMesh_Instance; typedef void* iMesh_EntityIterator; typedef void* iMesh_EntityArrIterator; will be replaced with: typedef struct iBase_Instance_Private* iBase_Instance; typedef struct iBase_EntityHandle_Private* iBase_EntityHandle; typedef struct iBase_EntitySetHandle_Private* iBase_EntitySetHandle; typedef struct iBase_TagHandle_Private* iBase_TagHandle;
typedef struct iMesh_Instance_Private* iMesh_Instance; typedef struct iMesh_EntityIterator_Private* iMesh_EntityIterator; typedef struct iMesh_EntityArrIterator_Private* iMesh_EntityArrIterator;
4) New Function: /**\brief Set geometric dimension of vertex coordinates * * Set the geometric dimension of the mesh. Notes: An application * should not expect this function to succeed unless the mesh database * is empty (no vertices created, no files read, etc.) *\param instance Mesh database from which to request change. *\param geom_dim Requested geometric dimension. */ void iMesh_setGeometricDimension( iMesh_Intance instance, /*in*/ int geom_dim, /*out*/ int* err );
5) Changed Functions: There are several functions for which an entity set handle is treated as 'inout' where it should be 'in'*. These include: iMesh_addEntToSet iMesh_rmvEntFromSet iMesh_addEntArrToSet iMesh_rmvEntArrFromSet iMesh_addEntSet iMesh_rmvEntSet iMesh_addPrntChld iMesh_rmvPrntChld The argument shoudl be 'in' because the argument (the value of the handle) is not changed. NOTE: The changes described in 3) will ensure that this change results in compile-time errors. Without the changes in 3), changing the real type from void** to void* for the arguments would still compile, which could be disastrous.
6) The following two functions: iMesh_getAllVtxCoords iMesh_getVtxCoordIndex will be replaced with the new function below. NOTE: This is slightly different than what was discussed during the telecon. I a) noticed a deficiency in the usage (added the 'entity_handles' output list) and b) dropped the in_entity_set argument, for which no agreement was reached during the telecon.
/**\brief Get indexed representation of mesh or subset of mesh * * Given an entity set and optionally a type or topology, return: * - The entities in the set of the specified type or topology * - The entities adjacent to those entities with a specified * type, as a list of unique handles. * - For each entity in the first list, the adjacent entities, * specified as indices into the second list. * *\param entity_set_handle The set of entities from which to query *\param entity_type_requestor If not iBase_ALL_TYPES, act only on * the subset of 'entity_set_handle' of the * specified type. *\param entity_topology_requestor If not iMesh_ALL_TOPOLOGIES, act only * on the subset of 'entity_set_handle' with * the specified topology. *\param entity_type_requested The type of the adjacent entities to * return. *\param entity_handles The handles of the (non-struct) subset of * the entity set indicated by * 'entity_set_handle' and the optional type * and topology filtering arguments. *\param adj_entity_handles The union of the entities of type * 'requested_entity_type' adjacent to each * entity in 'entity_handles'. *\param adj_entity_indices For each entity in 'entity_handles', the * adjacent entities of type * 'entity_type_requested', specified as * indices into 'adj_entity_handles'. The * values are concatenated into a single * array in the order of the entity handles * in 'entity_handles'. *\param offset For each entity in the corresponding * position in 'entity_handles', the position * in 'adj_entity_indices' at which values * for that entity are stored. */ void iMesh_getAdjEntIndices(iMesh_Instance instance, /*in*/ const iBase_EntityHandle entity_set_handle, /*in*/ const int entity_type_requestor, /*in*/ const int entity_topology_requestor, /*in*/ const int entity_type_requested, /*inout*/ iBase_EntityHandle** entity_handles, /*inout*/ int* entity_handles_allocated, /*out*/ int* entity_handles_size, /*inout*/ iBase_EntityHandle** adj_entity_handles, /*inout*/ int* adj_entity_handles_allocated, /*out*/ int* adj_entity_handles_size, /*inout*/ iBsae_EntityHandle** adj_entity_indices, /*inout*/ int* adj_entity_indices_allocated, /*out*/ int* adj_entity_indices_size, /*inout*/ int** offset, /*inout*/ int* offset_allocated, /*out*/ int* offset_size, /*out*/ int *err);
The code below uses the old interface to retrieve a copy of a hexahedral mesh in a simple array form: MBEntityHandle *vertices = 0, *hexes = 0; int *hex_vertex_indices = 0, *hex_vertex_offsets = 0; double* coords; int num_vertices, num_hexes, junk, junk2, junk3, err, order; int *junk_array; junk = 0; iMesh_getEntities( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, &hexes, &junk, &num_hexes, &err ); junk = 0; iMesh_getEntities( instance, root_set, iBase_VERTEX, iMesh_ALL_TOPOLOGIES, &vertices, &junk, &num_vertices, &err ); junk = junk2 = 0; junk_array = NULL; order = iBase_INTERLEAVED; iMesh_getAllVtxCoords( instance, root_set, &coords, &junk, &junk, &junk_array, &junk2, &junk2, &order, &err); free(junk_array); junk = junk2 = junk3 = 0; junk_array = NULL; iMesh_getVtxCoordIndex( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, iBase_VERTEX, &hex_vertex_offsets, &junk, &junk, &hex_vertex_indices, &junk2, &junk2, &junk_array, &junk3, &junk3, &err ); free( junk_array );
The same code in the new API will be: MBEntityHandle *vertices = 0, *hexes = 0; int *hex_vertex_indices = 0, *hex_vertex_offsets = 0; double* coords; int num_vertices, num_hexes, junk, junk2, junk3, junk4, err; int order; junk = junk2 = junk3 = junk4 = 0; iMesh_getAdjEntIndices( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, iBase_VERTEX, &hexes, &junk, &num_hexes, &vertices, &junk2, &num_vertices, &hex_vertex_indices, &junk3, &junk3, &hex_vertex_offsets, &junk4, &junk4 ); junk = 0; order = iBase_INTERLEAVED; iMesh_getVtxArrCoords( instance, vertices, num_vertex, &order, &coords, &junk, &junk, &err );
7) New Function: Array form of iMesh_isEntContained to replace containment flags no longer returned from iMesh_getVtxCoordIndex (and hopefully some day all the other functions with a similar argument).
void iMesh_isEntArrContained( iMesh_Instance instance, /*in*/ iBase_EntitySetHandle containing_set, /*in*/ const iBase_EntityHandle* entity_handles, /*in*/ int num_entity_handles, /*inout*/ int** is_contained, /*inout*/ int* is_contained_allocated, /*out*/ int* is_contained_size, /*out*/ int* err );
8) Replace some iBase_EntityHandle with iBase_EntitySetHandle where appropriate*: iMesh_getAdjEntIndices iMesh_getAdjEntities
- jason
* Similar changes should probably be made to iGeom.h, iMeshP.h, and iRel.h, but that was not discussed during the telecon.
Hi All, It looks like there is mutual exclusivity until Jan 21. Everyone who responded is available from 1-2 pm pacific on that day. Please be prepared to talk about your status in updating your implementations wrt to the iMesh.h and iBase.h changes Jason proposed and to discuss item 6. Carl, if there are any significant areas we should look at in the paper, please send it out in advance with pointers to the relevant areas of text. The LLNL number: 866-914-3976 The passcode is 662912# Lori
Hi All,
I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-)
Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st.
Thanks, Lori
Hi All, Karen just pointed out that I read her email backwards and she is not available on the 21st, so I'd like to go with the second best option which is Tuesday the 20th at 1 pm so everyone can participate for at least part of the time. It's also a bit better from the perspective of the paper. Sorry for the confusion. Date: Tuesday, Jan 20 Time: 1 pm PST Number: 866-914-3976 Passcode: 662912# Lori At 01:09 PM 1/8/2009, Lori A. Diachin wrote:
Hi All,
It looks like there is mutual exclusivity until Jan 21. Everyone who responded is available from 1-2 pm pacific on that day. Please be prepared to talk about your status in updating your implementations wrt to the iMesh.h and iBase.h changes Jason proposed and to discuss item 6.
Carl, if there are any significant areas we should look at in the paper, please send it out in advance with pointers to the relevant areas of text.
The LLNL number: 866-914-3976 The passcode is 662912#
Lori
Hi All,
I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-)
Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st.
Thanks, Lori
The time is fine with us. Xiaolin On Thu, 2009-01-08 at 13:50 -0800, Lori A. Diachin wrote:
Hi All,
Karen just pointed out that I read her email backwards and she is not available on the 21st, so I'd like to go with the second best option which is Tuesday the 20th at 1 pm so everyone can participate for at least part of the time. It's also a bit better from the perspective of the paper.
Sorry for the confusion.
Date: Tuesday, Jan 20 Time: 1 pm PST Number: 866-914-3976 Passcode: 662912#
Lori
At 01:09 PM 1/8/2009, Lori A. Diachin wrote:
Hi All,
It looks like there is mutual exclusivity until Jan 21. Everyone who responded is available from 1-2 pm pacific on that day. Please be prepared to talk about your status in updating your implementations wrt to the iMesh.h and iBase.h changes Jason proposed and to discuss item 6.
Carl, if there are any significant areas we should look at in the paper, please send it out in advance with pointers to the relevant areas of text.
The LLNL number: 866-914-3976 The passcode is 662912#
Lori
Hi All,
I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-)
Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st.
Thanks, Lori
Hi all, Did anybody realize this is exactly approximately when the inauguration happens? I'd *really* like to watch it... of course, since we seem to like to hold mtgs during important historical events (9/11)... - tim Lori A. Diachin wrote:
Hi All,
Karen just pointed out that I read her email backwards and she is not available on the 21st, so I'd like to go with the second best option which is Tuesday the 20th at 1 pm so everyone can participate for at least part of the time. It's also a bit better from the perspective of the paper.
Sorry for the confusion.
Date: Tuesday, Jan 20 Time: 1 pm PST Number: 866-914-3976 Passcode: 662912#
Lori
At 01:09 PM 1/8/2009, Lori A. Diachin wrote:
Hi All,
It looks like there is mutual exclusivity until Jan 21. Everyone who responded is available from 1-2 pm pacific on that day. Please be prepared to talk about your status in updating your implementations wrt to the iMesh.h and iBase.h changes Jason proposed and to discuss item 6.
Carl, if there are any significant areas we should look at in the paper, please send it out in advance with pointers to the relevant areas of text.
The LLNL number: 866-914-3976 The passcode is 662912#
Lori
Hi All,
I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-)
Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st.
Thanks, Lori
-- ================================================================ "You will keep in perfect peace him whose mind is steadfast, because he trusts in you." Isaiah 26:3 Tim Tautges Argonne National Laboratory ([email protected]) (telecommuting from UW-Madison) phone: (608) 263-8485 1500 Engineering Dr. fax: (608) 263-4499 Madison, WI 53706
I think the inauguration is at noon eastern (9am pacific). The parade begins at 2:30 eastern (11:30 pacific). So unless you scammed some tickets to a ball and didn't invite us to go with you, the fun will likely be over before our meeting. :) Karen On 1/20/09 9:50 AM, "Tim Tautges" <[email protected]> wrote:
Hi all, Did anybody realize this is exactly approximately when the inauguration happens? I'd *really* like to watch it... of course, since we seem to like to hold mtgs during important historical events (9/11)...
- tim
Lori A. Diachin wrote:
Hi All,
Karen just pointed out that I read her email backwards and she is not available on the 21st, so I'd like to go with the second best option which is Tuesday the 20th at 1 pm so everyone can participate for at least part of the time. It's also a bit better from the perspective of the paper.
Sorry for the confusion.
Date: Tuesday, Jan 20 Time: 1 pm PST Number: 866-914-3976 Passcode: 662912#
Lori
At 01:09 PM 1/8/2009, Lori A. Diachin wrote:
Hi All,
It looks like there is mutual exclusivity until Jan 21. Everyone who responded is available from 1-2 pm pacific on that day. Please be prepared to talk about your status in updating your implementations wrt to the iMesh.h and iBase.h changes Jason proposed and to discuss item 6.
Carl, if there are any significant areas we should look at in the paper, please send it out in advance with pointers to the relevant areas of text.
The LLNL number: 866-914-3976 The passcode is 662912#
Lori
Hi All,
I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-)
Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st.
Thanks, Lori
-- ================================================================ "You will keep in perfect peace him whose mind is steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory ([email protected]) (telecommuting from UW-Madison) phone: (608) 263-8485 1500 Engineering Dr. fax: (608) 263-4499 Madison, WI 53706
Sigh. I should get a row of clocks like you see in news rooms. - tim Devine, Karen D wrote:
I think the inauguration is at noon eastern (9am pacific). The parade begins at 2:30 eastern (11:30 pacific). So unless you scammed some tickets to a ball and didn't invite us to go with you, the fun will likely be over before our meeting. :)
Karen
On 1/20/09 9:50 AM, "Tim Tautges" <[email protected]> wrote:
Hi all, Did anybody realize this is exactly approximately when the inauguration happens? I'd *really* like to watch it... of course, since we seem to like to hold mtgs during important historical events (9/11)...
- tim
Lori A. Diachin wrote:
Hi All,
Karen just pointed out that I read her email backwards and she is not available on the 21st, so I'd like to go with the second best option which is Tuesday the 20th at 1 pm so everyone can participate for at least part of the time. It's also a bit better from the perspective of the paper.
Sorry for the confusion.
Date: Tuesday, Jan 20 Time: 1 pm PST Number: 866-914-3976 Passcode: 662912#
Lori
At 01:09 PM 1/8/2009, Lori A. Diachin wrote:
Hi All,
It looks like there is mutual exclusivity until Jan 21. Everyone who responded is available from 1-2 pm pacific on that day. Please be prepared to talk about your status in updating your implementations wrt to the iMesh.h and iBase.h changes Jason proposed and to discuss item 6.
Carl, if there are any significant areas we should look at in the paper, please send it out in advance with pointers to the relevant areas of text.
The LLNL number: 866-914-3976 The passcode is 662912#
Lori
Hi All,
I'd like to check in on the status of everyone's changes wrt to the iMesh.h and iBase.h files that Jason sent out back in October. We decided to defer these until after SC08 and gave ourselves an internal deadline of Dec 15... so, are we done yet? :-)
Seriously - it was my understanding that folks had agreed in principle to all of these changes; the one exception was what to do about item #6 below. It may very well be that we need a quick telecon to discuss this as well as get an update on status. Carl is planning to send out the iMesh paper by Jan 23, so we may want to touch base before then.. when are folks available for a telecon? To narrow it down a bit, please send me the times you are not available on Monday/Tuesday Jan 12th and 13th, or Tues/Wed the 20th and 21st.
Thanks, Lori
-- ================================================================ "You will keep in perfect peace him whose mind is steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory ([email protected]) (telecommuting from UW-Madison) phone: (608) 263-8485 1500 Engineering Dr. fax: (608) 263-4499 Madison, WI 53706
-- ================================================================ "You will keep in perfect peace him whose mind is steadfast, because he trusts in you." Isaiah 26:3 Tim Tautges Argonne National Laboratory ([email protected]) (telecommuting from UW-Madison) phone: (608) 263-8485 1500 Engineering Dr. fax: (608) 263-4499 Madison, WI 53706
Jason: If I'm understanding iMesh_getAdjEntIndices correctly, I think adj_entity_indices should be of type int**, not iBase_EntityHandle**. If you disagree, then I'm not understanding the arguments correctly; would you please explain that one again? Thanks. Karen
-------- Original Message -------- Subject: **** iMesh.h and iBase.h changes **** Date: Fri, 24 Oct 2008 18:13:11 -0500 From: Jason Kraftcheck <[email protected]> To: TSTT Interface <[email protected]>
Here is the list of proposed changes to iMesh.h (yes, not just iMeshP.h) that were a) agreed upon during the latest telecon and b) may need to be completed by all implementations by SC'08. If you object to any of this, please speak out soon. I've attached copies of the interface definitions, updated as described below.
1) Version defines: Beginning with version 0.8 of iMesh.h, we will add the following C preprocessor macros. This will allow, going forward, applications to be compatible with more than one version of the interface*. #define IMESH_MAJOR_VERSION 0 #define IMESH_MINOR_VERSION 7
2) Zero set handle: All mention of passing 'zero' for a set handle in all iMesh.h documention should be replaced with the root set handle*. Implementations for which a) the root set handle is not zero and b) that actually followed the documentation in that they check for zero rather than the root set will need to be updated.
3) Handle types*: The current handle definitions: typedef void* iBase_Instance; typedef void* iBase_EntityHandle; typedef void* iBase_EntitySetHandle; typedef void* iBase_TagHandle;
typedef void* iMesh_Instance; typedef void* iMesh_EntityIterator; typedef void* iMesh_EntityArrIterator; will be replaced with: typedef struct iBase_Instance_Private* iBase_Instance; typedef struct iBase_EntityHandle_Private* iBase_EntityHandle; typedef struct iBase_EntitySetHandle_Private* iBase_EntitySetHandle; typedef struct iBase_TagHandle_Private* iBase_TagHandle;
typedef struct iMesh_Instance_Private* iMesh_Instance; typedef struct iMesh_EntityIterator_Private* iMesh_EntityIterator; typedef struct iMesh_EntityArrIterator_Private* iMesh_EntityArrIterator;
4) New Function: /**\brief Set geometric dimension of vertex coordinates * * Set the geometric dimension of the mesh. Notes: An application * should not expect this function to succeed unless the mesh database * is empty (no vertices created, no files read, etc.) *\param instance Mesh database from which to request change. *\param geom_dim Requested geometric dimension. */ void iMesh_setGeometricDimension( iMesh_Intance instance, /*in*/ int geom_dim, /*out*/ int* err );
5) Changed Functions: There are several functions for which an entity set handle is treated as 'inout' where it should be 'in'*. These include: iMesh_addEntToSet iMesh_rmvEntFromSet iMesh_addEntArrToSet iMesh_rmvEntArrFromSet iMesh_addEntSet iMesh_rmvEntSet iMesh_addPrntChld iMesh_rmvPrntChld The argument shoudl be 'in' because the argument (the value of the handle) is not changed. NOTE: The changes described in 3) will ensure that this change results in compile-time errors. Without the changes in 3), changing the real type from void** to void* for the arguments would still compile, which could be disastrous.
6) The following two functions: iMesh_getAllVtxCoords iMesh_getVtxCoordIndex will be replaced with the new function below. NOTE: This is slightly different than what was discussed during the telecon. I a) noticed a deficiency in the usage (added the 'entity_handles' output list) and b) dropped the in_entity_set argument, for which no agreement was reached during the telecon.
/**\brief Get indexed representation of mesh or subset of mesh * * Given an entity set and optionally a type or topology, return: * - The entities in the set of the specified type or topology * - The entities adjacent to those entities with a specified * type, as a list of unique handles. * - For each entity in the first list, the adjacent entities, * specified as indices into the second list. * *\param entity_set_handle The set of entities from which to query *\param entity_type_requestor If not iBase_ALL_TYPES, act only on * the subset of 'entity_set_handle' of the * specified type. *\param entity_topology_requestor If not iMesh_ALL_TOPOLOGIES, act only * on the subset of 'entity_set_handle' with * the specified topology. *\param entity_type_requested The type of the adjacent entities to * return. *\param entity_handles The handles of the (non-struct) subset of * the entity set indicated by * 'entity_set_handle' and the optional type * and topology filtering arguments. *\param adj_entity_handles The union of the entities of type * 'requested_entity_type' adjacent to each * entity in 'entity_handles'. *\param adj_entity_indices For each entity in 'entity_handles', the * adjacent entities of type * 'entity_type_requested', specified as * indices into 'adj_entity_handles'. The * values are concatenated into a single * array in the order of the entity handles * in 'entity_handles'. *\param offset For each entity in the corresponding * position in 'entity_handles', the position * in 'adj_entity_indices' at which values * for that entity are stored. */ void iMesh_getAdjEntIndices(iMesh_Instance instance, /*in*/ const iBase_EntityHandle entity_set_handle, /*in*/ const int entity_type_requestor, /*in*/ const int entity_topology_requestor, /*in*/ const int entity_type_requested, /*inout*/ iBase_EntityHandle** entity_handles, /*inout*/ int* entity_handles_allocated, /*out*/ int* entity_handles_size, /*inout*/ iBase_EntityHandle** adj_entity_handles, /*inout*/ int* adj_entity_handles_allocated, /*out*/ int* adj_entity_handles_size, /*inout*/ iBsae_EntityHandle** adj_entity_indices, /*inout*/ int* adj_entity_indices_allocated, /*out*/ int* adj_entity_indices_size, /*inout*/ int** offset, /*inout*/ int* offset_allocated, /*out*/ int* offset_size, /*out*/ int *err);
The code below uses the old interface to retrieve a copy of a hexahedral mesh in a simple array form: MBEntityHandle *vertices = 0, *hexes = 0; int *hex_vertex_indices = 0, *hex_vertex_offsets = 0; double* coords; int num_vertices, num_hexes, junk, junk2, junk3, err, order; int *junk_array; junk = 0; iMesh_getEntities( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, &hexes, &junk, &num_hexes, &err ); junk = 0; iMesh_getEntities( instance, root_set, iBase_VERTEX, iMesh_ALL_TOPOLOGIES, &vertices, &junk, &num_vertices, &err ); junk = junk2 = 0; junk_array = NULL; order = iBase_INTERLEAVED; iMesh_getAllVtxCoords( instance, root_set, &coords, &junk, &junk, &junk_array, &junk2, &junk2, &order, &err); free(junk_array); junk = junk2 = junk3 = 0; junk_array = NULL; iMesh_getVtxCoordIndex( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, iBase_VERTEX, &hex_vertex_offsets, &junk, &junk, &hex_vertex_indices, &junk2, &junk2, &junk_array, &junk3, &junk3, &err ); free( junk_array );
The same code in the new API will be: MBEntityHandle *vertices = 0, *hexes = 0; int *hex_vertex_indices = 0, *hex_vertex_offsets = 0; double* coords; int num_vertices, num_hexes, junk, junk2, junk3, junk4, err; int order; junk = junk2 = junk3 = junk4 = 0; iMesh_getAdjEntIndices( instance, root_set, iBase_ALL_TYPES, iMesh_HEXAHEDRON, iBase_VERTEX, &hexes, &junk, &num_hexes, &vertices, &junk2, &num_vertices, &hex_vertex_indices, &junk3, &junk3, &hex_vertex_offsets, &junk4, &junk4 ); junk = 0; order = iBase_INTERLEAVED; iMesh_getVtxArrCoords( instance, vertices, num_vertex, &order, &coords, &junk, &junk, &err );
7) New Function: Array form of iMesh_isEntContained to replace containment flags no longer returned from iMesh_getVtxCoordIndex (and hopefully some day all the other functions with a similar argument).
void iMesh_isEntArrContained( iMesh_Instance instance, /*in*/ iBase_EntitySetHandle containing_set, /*in*/ const iBase_EntityHandle* entity_handles, /*in*/ int num_entity_handles, /*inout*/ int** is_contained, /*inout*/ int* is_contained_allocated, /*out*/ int* is_contained_size, /*out*/ int* err );
8) Replace some iBase_EntityHandle with iBase_EntitySetHandle where appropriate*: iMesh_getAdjEntIndices iMesh_getAdjEntities
- jason
* Similar changes should probably be made to iGeom.h, iMeshP.h, and iRel.h, but that was not discussed during the telecon.
Devine, Karen D wrote:
Jason:
If I'm understanding iMesh_getAdjEntIndices correctly, I think adj_entity_indices should be of type int**, not iBase_EntityHandle**. If you disagree, then I'm not understanding the arguments correctly; would you please explain that one again?
Yes, it should be int**. Thanks. - jason
participants (6)
-
Devine, Karen D -
Jason Kraftcheck -
Lori A. Diachin -
Tim Tautges -
Vitus Leung -
Xiaolin Li