[MOAB-dev] Fortran interface to iMesh_CreateEntSet

Robert Jacob jacob at mcs.anl.gov
Mon Nov 21 01:19:11 CST 2011


Hi,

I'm trying to use the Fortran interface to iMesh.  I want to create a 
generic instance, define some vertex entities, and then put those in an 
entity set.  I can't figure out why the program below is giving a 
SISSEGV error after I add the call to CreateEntSet.  Any ideas?   System 
is ubuntu 10.04.3, Intel 11.1 and building off the trunk of MOAB.  (If 
you have an MCS account, its in ~jacob/MCTHead/examples/imesh/)

Thanks,
Rob
---------------------meshtry.F90------------------------
program meshtry


   implicit none

! declarations
#include "iMesh_f.h"
   integer,parameter :: mysize=20

   iBase_EntityHandle :: entarry
   iMesh_Instance ::  mesh
   iBase_EntitySetHandle :: sethand

   IBASE_HANDLE_T :: rpcoor,rpents

   real*8 coor_data(3*mysize)

   pointer(rpents,entarry(0:*))
   pointer (rpcoor, coor_data)

   integer ::  nhands,sizehand,ier,i
   integer :: geom_dim


   call iMesh_newMesh("MOAB", mesh, ier)


! try an imesh query function
   call iMesh_getGeometricDimension(%VAL(mesh), geom_dim, ier)
   write(0,*) "geom_dim", geom_dim,ier


! create vertices
   call iMesh_createVtxArr(%VAL(mesh), %VAL(mysize), 
%VAL(iBase_INTERLEAVED), &
     rpcoor,%VAL(3*mysize),rpents,nhands,sizehand,ier)
   write(0,*) "handles",nhands,sizehand,ier

   call iMesh_createEntSet(%VAL(mesh), %VAL(1), &
         sethand,ier)
   write(0,*) "createset",ier


end


More information about the moab-dev mailing list