[cgma-dev] r2179 - in cgm/trunk: . geom/virtual itaps

tautges at mcs.anl.gov tautges at mcs.anl.gov
Wed Oct 29 11:22:37 CDT 2008


Author: tautges
Date: 2008-10-29 11:22:36 -0500 (Wed, 29 Oct 2008)
New Revision: 2179

Added:
   cgm/trunk/itaps/iBase_f.h
   cgm/trunk/itaps/iGeom-Defs.inc.in
   cgm/trunk/itaps/iGeom_f.h
Modified:
   cgm/trunk/configure.in
   cgm/trunk/geom/virtual/HiddenEntitySet.cpp
   cgm/trunk/itaps/Makefile.am
   cgm/trunk/itaps/iGeom_protos.h
   cgm/trunk/itaps/testgeom.cc
Log:
- Adding C++ link libs similar to how this is done in MOAB, so a non-C++ application can link with cgm
- Adding fortran stuff for iGeom
- Coupla fixes for problems exposed by gcc4.3


Modified: cgm/trunk/configure.in
===================================================================
--- cgm/trunk/configure.in	2008-10-29 15:11:43 UTC (rev 2178)
+++ cgm/trunk/configure.in	2008-10-29 16:22:36 UTC (rev 2179)
@@ -26,6 +26,15 @@
 
 
 ################################################################################
+#                              Extract libtool config
+################################################################################
+ITAPS_LIBTOOL_VAR( [CXX], [compiler_lib_search_path], [CGM_CXX_LINKFLAGS])
+ITAPS_LIBTOOL_VAR( [CXX], [postdeps], [CGM_CXX_LIBS])
+AC_SUBST(CGM_CXX_LINKFLAGS)
+AC_SUBST(CGM_CXX_LIBS)
+
+
+################################################################################
 #                              MPI OPTIONS
 ################################################################################
 
@@ -391,6 +400,7 @@
            init/Makefile
            cgm.make
            itaps/Makefile
+           itaps/iGeom-Defs.inc
 	   itaps/SIDL/Makefile
            test/Makefile
            cgm_apps/Makefile

Modified: cgm/trunk/geom/virtual/HiddenEntitySet.cpp
===================================================================
--- cgm/trunk/geom/virtual/HiddenEntitySet.cpp	2008-10-29 15:11:43 UTC (rev 2178)
+++ cgm/trunk/geom/virtual/HiddenEntitySet.cpp	2008-10-29 16:22:36 UTC (rev 2179)
@@ -29,7 +29,9 @@
 #include "CompositeCoEdge.hpp"
 #include "CompositeSurface.hpp"
 
+#include <algorithm>
 
+
 HiddenEntitySet::~HiddenEntitySet()
 {
   std::vector<TopologyBridge*>::iterator iter;

Modified: cgm/trunk/itaps/Makefile.am
===================================================================
--- cgm/trunk/itaps/Makefile.am	2008-10-29 15:11:43 UTC (rev 2178)
+++ cgm/trunk/itaps/Makefile.am	2008-10-29 16:22:36 UTC (rev 2179)
@@ -40,7 +40,9 @@
 	iBase.h \
 	iGeom.h \
 	iBase_FCDefs.h \
-	iGeom_protos.h 
+	iGeom_protos.h \
+	iBase_f.h \
+	iGeom_f.h
 
 TESTS = testgeom
 
@@ -63,14 +65,14 @@
 # that the correct values are set (e.g. if someone does 
 # 'make prefix=/foo install', we don't know the correct install
 # directory until we're doing the install.
-iGeom-Defs.inc: Makefile.am
-	@echo "include $(cfgdir)/cgm.make"         > $@
-	@echo 'iGeom_LDFLAGS  = $$(CGM_LDFLAGS)'  >> $@
-	@echo 'iGeom_LTFLAGS  = $$(CGM_LTFLAGS)'  >> $@
-	@echo 'iGeom_LIBS     = $$(CGM_LIBS)'     >> $@
-	@echo 'iGeom_DEFINES  = $$(CGM_DEFINES)'  >> $@
-	@echo 'iGeom_INCLUDES = $$(CGM_INCLUDES)' >> $@
-	@echo 'iGeom_CPPFLAGS = $$(CGM_CPPFLAGS)' >> $@
+install-data-hook:
+	echo "include $(libdir)/cgm.make"        >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
+	echo 'IGEOM_LDFLAGS  = $$(CGM_LDFLAGS) $$(IGEOM_CXX_LDFLAGS)'  >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
+	echo 'IGEOM_LTFLAGS  = $$(CGM_LTFLAGS)'  >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
+	echo 'IGEOM_LIBS     = $$(CGM_LIBS) $$(IGEOM_CXX_LIBS)'     >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
+	echo 'IGEOM_DEFINES  = $$(CGM_DEFINES)'  >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
+	echo 'IGEOM_INCLUDES = $$(CGM_INCLUDES)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
+	echo 'IGEOM_CPPFLAGS = $$(CGM_CPPFLAGS)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
 
 EXTRA_DIST = testgeom.sat
 

Added: cgm/trunk/itaps/iBase_f.h
===================================================================
--- cgm/trunk/itaps/iBase_f.h	                        (rev 0)
+++ cgm/trunk/itaps/iBase_f.h	2008-10-29 16:22:36 UTC (rev 2179)
@@ -0,0 +1,113 @@
+#ifndef IBASE_F_H
+#define IBASE_F_H
+
+#define iBase_EntityHandle integer
+#define iBase_EntitySetHandle integer
+#define iBase_TagHandle integer
+
+#endif
+
+      integer iBase_VERTEX
+      integer iBase_EDGE
+      integer iBase_FACE
+      integer iBase_REGION
+      integer iBase_ALL_TYPES
+
+      parameter (iBase_VERTEX = 0) 
+      parameter (iBase_EDGE = 1) 
+      parameter (iBase_FACE = 2) 
+      parameter (iBase_REGION = 3)
+      parameter (iBase_ALL_TYPES = 4)
+
+
+
+      integer iBase_NEW
+      integer iBase_ALREADY_EXISTED
+      integer iBase_CREATED_DUPLICATE
+      integer iBase_CREATION_FAILED
+
+      parameter (iBase_NEW = 0)               
+      parameter (iBase_ALREADY_EXISTED = 1)   
+      parameter (iBase_CREATED_DUPLICATE = 2)
+      parameter (iBase_CREATION_FAILED = 3)
+
+
+      integer iBase_SILENT
+      integer iBase_WARN_ONLY
+      integer iBase_THROW_ERROR
+
+      parameter (iBase_SILENT = 0) 
+      parameter (iBase_WARN_ONLY = 1) 
+      parameter (iBase_THROW_ERROR = 4)
+
+
+      integer iBase_SUCCESS
+      integer iBase_MESH_ALREADY_LOADED
+      integer iBase_NO_MESH_DATA
+      integer iBase_FILE_NOT_FOUND
+      integer iBase_FILE_WRITE_ERROR
+      integer iBase_NIL_ARRAY
+      integer iBase_BAD_ARRAY_SIZE
+      integer iBase_BAD_ARRAY_DIMENSION
+      integer iBase_INVALID_ENTITY_HANDLE
+      integer iBase_INVALID_ENTITY_COUNT
+      integer iBase_INVALID_ENTITY_TYPE
+      integer iBase_INVALID_ENTITY_TOPOLOGY
+      integer iBase_BAD_TYPE_AND_TOPO
+      integer iBase_ENTITY_CREATION_ERROR
+      integer iBase_INVALID_TAG_HANDLE
+      integer iBase_TAG_NOT_FOUND
+      integer iBase_TAG_ALREADY_EXISTS
+      integer iBase_TAG_IN_USE
+      integer iBase_INVALID_ENTITYSET_HANDLE
+      integer iBase_INVALID_ITERATOR_HANDLE
+      integer iBase_INVALID_ARGUMENT
+      integer iBase_MEMORY_ALLOCATION_FAILED
+      integer iBase_NOT_SUPPORTED
+      integer iBase_FAILURE
+
+      parameter (iBase_SUCCESS = 0)
+      parameter (iBase_MESH_ALREADY_LOADED = 1)
+      parameter (iBase_NO_MESH_DATA = 2)
+      parameter (iBase_FILE_NOT_FOUND = 3)
+      parameter (iBase_FILE_WRITE_ERROR = 4)
+      parameter (iBase_NIL_ARRAY = 5)
+      parameter (iBase_BAD_ARRAY_SIZE = 6)
+      parameter (iBase_BAD_ARRAY_DIMENSION = 7)
+      parameter (iBase_INVALID_ENTITY_HANDLE = 8)
+      parameter (iBase_INVALID_ENTITY_COUNT = 9)
+      parameter (iBase_INVALID_ENTITY_TYPE = 10)
+      parameter (iBase_INVALID_ENTITY_TOPOLOGY = 11)
+      parameter (iBase_BAD_TYPE_AND_TOPO = 12)
+      parameter (iBase_ENTITY_CREATION_ERROR = 13)
+      parameter (iBase_INVALID_TAG_HANDLE = 14)
+      parameter (iBase_TAG_NOT_FOUND = 15)
+      parameter (iBase_TAG_ALREADY_EXISTS = 16)
+      parameter (iBase_TAG_IN_USE = 17)
+      parameter (iBase_INVALID_ENTITYSET_HANDLE = 18)
+      parameter (iBase_INVALID_ITERATOR_HANDLE = 19)
+      parameter (iBase_INVALID_ARGUMENT = 20)
+      parameter (iBase_MEMORY_ALLOCATION_FAILED = 21)
+      parameter (iBase_NOT_SUPPORTED = 22)
+      parameter (iBase_FAILURE = 23)
+
+
+      integer iBase_BLOCKED
+      integer iBase_INTERLEAVED
+      integer iBase_UNDETERMINED
+
+      parameter (iBase_BLOCKED = 0)
+      parameter (iBase_INTERLEAVED = 1)
+      parameter (iBase_UNDETERMINED = 2)
+
+
+      integer iBase_INTEGER
+      integer iBase_DOUBLE
+      integer iBase_ENTITY_HANDLE
+      integer iBase_BYTES
+
+      parameter (iBase_INTEGER = 0)
+      parameter (iBase_DOUBLE = 1)
+      parameter (iBase_ENTITY_HANDLE = 2)
+      parameter (iBase_BYTES = 3)
+

Added: cgm/trunk/itaps/iGeom-Defs.inc.in
===================================================================
--- cgm/trunk/itaps/iGeom-Defs.inc.in	                        (rev 0)
+++ cgm/trunk/itaps/iGeom-Defs.inc.in	2008-10-29 16:22:36 UTC (rev 2179)
@@ -0,0 +1,13 @@
+IGEOM_FC = @FC@
+IGEOM_FCFLAGS = @FCFLAGS@
+IGEOM_FCDEFS = @DEFS@
+IGEOM_CXX_LDFLAGS = @CGM_CXX_LINKFLAGS@
+IGEOM_CXX_LIBS = @CGM_CXX_LIBS@
+
+include @abs_builddir@/cgm.make
+IGEOM_LDFLAGS  = $(CGM_LDFLAGS) $(IGEOM_CXX_LDFLAGS)
+IGEOM_LTFLAGS  = $(CGM_LTFLAGS)
+IGEOM_LIBS     = $(CGM_LIBS) $(IGEOM_CXX_LIBS)
+IGEOM_DEFINES  = $(CGM_DEFINES)
+IGEOM_INCLUDES = $(CGM_INCLUDES)
+IGEOM_CPPFLAGS = $(CGM_CPPFLAGS)

Added: cgm/trunk/itaps/iGeom_f.h
===================================================================
--- cgm/trunk/itaps/iGeom_f.h	                        (rev 0)
+++ cgm/trunk/itaps/iGeom_f.h	2008-10-29 16:22:36 UTC (rev 2179)
@@ -0,0 +1,11 @@
+#ifndef IGEOM_F_H
+#define IGEOM_F_H
+
+#define iGeom_Instance integer
+#define iGeom_EntityIterator integer
+#define iGeom_EntityArrIterator integer
+
+#endif 
+
+#include "iBase_f.h"
+

Modified: cgm/trunk/itaps/iGeom_protos.h
===================================================================
--- cgm/trunk/itaps/iGeom_protos.h	2008-10-29 15:11:43 UTC (rev 2178)
+++ cgm/trunk/itaps/iGeom_protos.h	2008-10-29 16:22:36 UTC (rev 2179)
@@ -72,6 +72,8 @@
 #define iGeom_createTorus FC_FUNC_(igeom_createtorus, IGEOM_CREATETORUS)
 #define iGeom_createCylinder FC_FUNC_(igeom_createcylinder, IGEOM_CREATECYLINDER)
 #define iGeom_createBrick FC_FUNC_(igeom_createbrick, IGEOM_CREATEBRICK)
+#define iGeom_createSphere FC_FUNC_(igeom_createsphere, IGEOM_CREATESPHERE)
+#define iGeom_createPrism FC_FUNC_(igeom_createprism, IGEOM_CREATEPRISM)
 #define iGeom_deleteEnt FC_FUNC_(igeom_deleteent, IGEOM_DELETEENT)
 #define iGeom_sweepEntAboutAxis FC_FUNC_(igeom_sweepentaboutaxis, IGEOM_SWEEPENTABOUTAXIS)
 #define iGeom_copyEnt FC_FUNC_(igeom_copyent, IGEOM_COPYENT)

Modified: cgm/trunk/itaps/testgeom.cc
===================================================================
--- cgm/trunk/itaps/testgeom.cc	2008-10-29 15:11:43 UTC (rev 2178)
+++ cgm/trunk/itaps/testgeom.cc	2008-10-29 16:22:36 UTC (rev 2179)
@@ -18,6 +18,7 @@
 #include "iGeom.h"
 #include <iostream>
 #include <set>
+#include <algorithm>
 #include <vector>
 #include <iterator>
 #include <algorithm>
@@ -433,9 +434,9 @@
 bool gentityset_test(iGeom_Instance geom, bool /*multiset*/, bool /*ordered*/)
 {
   int num_type = 4;
+  iBase_EntitySetHandle ges_array[4];
+  int number_array[4];
   int num_all_gentities_super = 0;
-  iBase_EntitySetHandle ges_array[num_type];
-  int number_array[num_type];
   int ent_type = iBase_VERTEX;
 
   int err;




More information about the cgma-dev mailing list