Warning: Can't synchronize with repository "(default)" (/disks/svn_mcs/repos/neams-ibm does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 14 (modified by billings, 14 years ago) (diff)


iMesh CCA Component

The Interoperable Technologies For Advanced Petascale Simulations (ITAPS) Center has defined a common mesh interface, iMesh, for managing “a discrete mesh composed of sets of entities, such as nodes, edges, faces and volumes, modifications to these entities and tags and tag data associated sets of entities.” Detailed information is available at the ITAPS website.

A CCA-compliant iMesh component has been written for this project. The component is a direct mapping to the iMesh C language interface defined by ITAPS and the underlying library is MOAB. Tests and optimizations are ongoing.

Building the Component

Building the component should be as simple as creating a CCA port and using the iMeshC.iMeshPort.sidl file attached to this article. After a port is created, a component that provides this port can be implemented with the attached iMeshC_iMeshComponent_Impl.c file.

Design and Performance

The SIDL file for this component was developed from a previous SIDL wrapping included with MOAB. The most important difference is that this version does not use objects and, instead, passes an opaque pointer to the mesh with each function call. The component is implemented in C and is a direct 1-1 wrapping of the iMesh C interface.

There are some important memory considerations when wrapping a library with SIDL. In particular, SIDL defines its own array type and the efficient transfer of information to and from this type must be considered to avoid a performance hit. In this component, the following "tricks" are used:

  • Copying incoming arrays can be avoided if the stride of the SIDL array is equal to one. If this is true, then it is sufficient to pass the address of the first element.

  • Outgoing arrays can always be "borrowed," so long as the memory doesn't magically disappear.


The iMesh component has not been extensively tested.


  • Jay Billings, ORNL