[MOAB-dev] r3687 - MOAB/trunk/examples/simple

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Mar 22 14:30:27 CDT 2010


Author: tautges
Date: 2010-03-22 14:30:27 -0500 (Mon, 22 Mar 2010)
New Revision: 3687

Modified:
   MOAB/trunk/examples/simple/GetEntities.cpp
   MOAB/trunk/examples/simple/makefile.in
Log:
Adding comments to makefile.in to guide more simple users.

Adding namespace stuff.



Modified: MOAB/trunk/examples/simple/GetEntities.cpp
===================================================================
--- MOAB/trunk/examples/simple/GetEntities.cpp	2010-03-22 14:55:20 UTC (rev 3686)
+++ MOAB/trunk/examples/simple/GetEntities.cpp	2010-03-22 19:30:27 UTC (rev 3687)
@@ -1,5 +1,5 @@
-#include "MBCore.hpp"
-#include "MBRange.hpp"
+#include "moab/Core.hpp"
+#include "moab/Range.hpp"
 #include <iostream>
 
 int main(int argc, char **argv) {
@@ -9,18 +9,18 @@
   }
 
     // instantiate & load a mesh from a file
-  MBCore *mb = new MBCore();
-  MBErrorCode rval = mb->load_mesh(argv[1]);
+  moab::Core *mb = new moab::Core();
+  moab::ErrorCode rval = mb->load_mesh(argv[1]);
 
-  MBRange ents;
+  moab::Range ents;
 
     // iterate over dimensions
   for (int d = 0; d <= 3; d++) {
     ents.clear();
     rval = mb->get_entities_by_dimension(0, d, ents);
     std::cout << "Found " << ents.size() << " " << d << "-dimensional entities:" << std::endl;
-    for (MBRange::iterator it = ents.begin(); it != ents.end(); it++) {
-      MBEntityHandle ent = *it;
+    for (moab::Range::iterator it = ents.begin(); it != ents.end(); it++) {
+      moab::EntityHandle ent = *it;
       std::cout << "Found d=" << d << " entity " 
                 << mb->id_from_handle(ent) << "." << std::endl;
     }

Modified: MOAB/trunk/examples/simple/makefile.in
===================================================================
--- MOAB/trunk/examples/simple/makefile.in	2010-03-22 14:55:20 UTC (rev 3686)
+++ MOAB/trunk/examples/simple/makefile.in	2010-03-22 19:30:27 UTC (rev 3687)
@@ -1,8 +1,16 @@
+#
+# The following few lines get the library install location for MOAB
+# and puts it in MOAB_LIB_DIR; if you just want
+# a simple application makefile, just comment out the next 3 lines and
+# substitute your own value for $(MOAB_LIB_DIR), or set an environment
+# variable pointing to the right place.
 exec_prefix = @exec_prefix@
 prefix = @prefix@
 libdir = @libdir@
-include $(libdir)/moab.make
+MOAB_LIB_DIR = $(libdir)
 
+include $(MOAB_LIB_DIR)/moab.make
+
 CPPFLAGS = ${MOAB_INCLUDES}
 CXXFLAGS = -g
 
@@ -12,3 +20,6 @@
 
 GetEntities: GetEntities.o
 	$(CXX) -o $@ $< $(MOAB_LIBS_LINK)
+
+GetEntities.o : GetEntities.cpp
+	$(CXX) -c $(MOAB_INCLUDES) $<



More information about the moab-dev mailing list