[MOAB-dev] commit/MOAB: iulian07: do not include Error.hpp in Coupler.hpp

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Sep 20 11:56:59 CDT 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/b4a866dde5ef/
Changeset:   b4a866dde5ef
Branch:      master
User:        iulian07
Date:        2013-09-20 18:55:49
Summary:     do not include Error.hpp in Coupler.hpp

it will cause compilation errors outside moab

Affected #:  2 files

diff --git a/tools/mbcoupler/Coupler.cpp b/tools/mbcoupler/Coupler.cpp
index 71231b8..f7f74b2 100644
--- a/tools/mbcoupler/Coupler.cpp
+++ b/tools/mbcoupler/Coupler.cpp
@@ -6,6 +6,7 @@
 #include "iMesh_extensions.h"
 #include "moab/gs.hpp"
 #include "moab/TupleList.hpp"
+#include "moab/Error.hpp"
 #include "iostream"
 #include <stdio.h>
 #include <algorithm>
@@ -518,6 +519,27 @@ ErrorCode Coupler::test_local_box(double *xyz,
   return MB_SUCCESS;
 }
 
+ErrorCode Coupler::interpolate(Coupler::Method method,
+                                      const std::string &interp_tag,
+                                      double *interp_vals,
+                                      TupleList *tl,
+                                      bool normalize)
+{
+  Tag tag;
+  ErrorCode result ;
+  if (_spectralSource)
+    result = mbImpl->tag_get_handle(interp_tag.c_str(), _ntot, MB_TYPE_DOUBLE, tag);
+  else
+    result = mbImpl->tag_get_handle(interp_tag.c_str(), 1, MB_TYPE_DOUBLE, tag);
+  if (MB_SUCCESS != result) {
+    std::ostringstream str;
+    str << "Failed to get handle for interpolation tag \"" << interp_tag << "\"";
+    mError->set_last_error(str.str());
+    return result;
+  }
+  return interpolate(method, tag, interp_vals, tl, normalize);
+}
+
 ErrorCode Coupler::interpolate(Coupler::Method *methods,
                                Tag *tags,
                                int *points_per_method,

diff --git a/tools/mbcoupler/Coupler.hpp b/tools/mbcoupler/Coupler.hpp
index 74170d5..705e2dc 100644
--- a/tools/mbcoupler/Coupler.hpp
+++ b/tools/mbcoupler/Coupler.hpp
@@ -29,7 +29,6 @@
 #include "moab/Interface.hpp"
 #include "moab/CartVect.hpp"
 #include "moab/TupleList.hpp"
-#include "moab/Error.hpp"
 
 #include <sstream>
 
@@ -41,6 +40,8 @@ class AdaptiveKDTree;
   
 class TupleList;
 
+class Error;
+
 class Coupler
 {
 public:
@@ -530,27 +531,6 @@ private:
     // error object used to set last error on interface
   Error *mError;
 };
-
-inline ErrorCode Coupler::interpolate(Coupler::Method method,
-                                      const std::string &interp_tag,
-                                      double *interp_vals,
-                                      TupleList *tl,
-                                      bool normalize)
-{
-  Tag tag;
-  ErrorCode result ;
-  if (_spectralSource)
-    result = mbImpl->tag_get_handle(interp_tag.c_str(), _ntot, MB_TYPE_DOUBLE, tag);
-  else
-    result = mbImpl->tag_get_handle(interp_tag.c_str(), 1, MB_TYPE_DOUBLE, tag);
-  if (MB_SUCCESS != result) {
-    std::ostringstream str;
-    str << "Failed to get handle for interpolation tag \"" << interp_tag << "\"";
-    mError->set_last_error(str.str());
-    return result;
-  }
-  return interpolate(method, tag, interp_vals, tl, normalize);
-}
   
 inline ErrorCode Coupler::interpolate(Coupler::Method method,
                                       Tag tag,

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list