[MOAB-dev] commit/MOAB: iulian07: remove dependency of mbcslam to mbcoupler

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Dec 2 10:26:32 CST 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/3442bdac533f/
Changeset:   3442bdac533f
Branch:      master
User:        iulian07
Date:        2013-12-02 17:23:01
Summary:     remove dependency of mbcslam to mbcoupler

it was used only for spec_visu_test, spectral element defined in
ElemUtil.hpp
imesh dependency will remain, because of fortran

Affected #:  4 files

diff --git a/tools/mbcslam/CslamUtils.cpp b/tools/mbcslam/CslamUtils.cpp
index 90a13e3..6cca02d 100644
--- a/tools/mbcslam/CslamUtils.cpp
+++ b/tools/mbcslam/CslamUtils.cpp
@@ -9,10 +9,10 @@
 #include <math.h>
 // this is from mbcoupler; maybe it should be moved somewhere in moab src
 // right now, add a dependency to mbcoupler
-#include "ElemUtil.hpp"
+// #include "ElemUtil.hpp"
 #include "moab/MergeMesh.hpp"
 #include "moab/ReadUtilIface.hpp"
-
+#include <iostream>
 // this is for sstream
 #include <sstream>
 
@@ -476,7 +476,8 @@ CartVect spherical_to_cart (SphereCoords & sc)
   res[2] = sc.R * sin(sc.lat);             // z
   return res;
 }
-
+// remove dependency to coupler now
+#if 0
 ErrorCode SpectralVisuMesh(Interface * mb, Range & input, int NP, EntityHandle & outputSet, double tolerance)
 {
   ErrorCode rval = MB_SUCCESS;
@@ -557,7 +558,8 @@ ErrorCode SpectralVisuMesh(Interface * mb, Range & input, int NP, EntityHandle &
 
   return rval;
 }
-
+// remove for the time being dependency on coupler
+#endif
 ErrorCode ProjectOnSphere(Interface * mb, EntityHandle set, double R)
 {
   Range ents;

diff --git a/tools/mbcslam/CslamUtils.hpp b/tools/mbcslam/CslamUtils.hpp
index bc1223d..05775df 100644
--- a/tools/mbcslam/CslamUtils.hpp
+++ b/tools/mbcslam/CslamUtils.hpp
@@ -89,7 +89,7 @@ CartVect spherical_to_cart (SphereCoords &) ;
  *   output: a set with refined elements; with proper input, it should be pretty
  *   similar to a Homme mesh read with ReadNC
  */
-ErrorCode SpectralVisuMesh(Interface * mb, Range & input, int NP, EntityHandle & outputSet, double tolerance);
+//ErrorCode SpectralVisuMesh(Interface * mb, Range & input, int NP, EntityHandle & outputSet, double tolerance);
 
 /*
  * given an entity set, get all nodes and project them on a sphere with given radius

diff --git a/tools/mbcslam/Makefile.am b/tools/mbcslam/Makefile.am
index b6b7b9d..9138c7a 100644
--- a/tools/mbcslam/Makefile.am
+++ b/tools/mbcslam/Makefile.am
@@ -18,10 +18,9 @@ AM_CPPFLAGS += -DSRCDIR=$(srcdir) \
                -I$(top_srcdir)/test 
 
 lib_LTLIBRARIES = libmbcslam.la
-libmbcslam_la_LIBADD = $(top_builddir)/src/libMOAB.la $(top_builddir)/itaps/imesh/libiMesh.la \
-         $(top_builddir)/tools/mbcoupler/libmbcoupler.la
+libmbcslam_la_LIBADD = $(top_builddir)/src/libMOAB.la $(top_builddir)/itaps/imesh/libiMesh.la 
          
-LDADD = $(top_builddir)/src/libMOAB.la libmbcslam.la $(top_builddir)/tools/mbcoupler/libmbcoupler.la
+LDADD = $(top_builddir)/src/libMOAB.la libmbcslam.la 
 
 libmbcslam_la_SOURCES = \
    Intx2Mesh.cpp Intx2Mesh.hpp Intx2MeshOnSphere.cpp Intx2MeshOnSphere.hpp \
@@ -38,7 +37,7 @@ libmbcslam_la_includedir = $(includedir)
 # check that only libraries are going in $(libdir)
 cfgdir = $(libdir)
 
-TESTS = intx_on_sphere_test  intx_in_plane_test  spec_visu_test spherical_area_test \
+TESTS = intx_on_sphere_test  intx_in_plane_test spherical_area_test \
          case1_test  intx_mpas
 noinst_PROGRAMS =  cslam_par_test diffusion proj1 
 
@@ -46,7 +45,7 @@ check_PROGRAMS = $(TESTS)
 intx_on_sphere_test_SOURCES = intx_on_sphere_test.cpp
 diffusion_SOURCES = diffusion.cpp
 intx_in_plane_test_SOURCES = intx_in_plane_test.cpp
-spec_visu_test_SOURCES = spec_visu_test.cpp
+# spec_visu_test_SOURCES = spec_visu_test.cpp
 spherical_area_test_SOURCES = spherical_area_test.cpp
 case1_test_SOURCES = case1_test.cpp
 intx_mpas_SOURCES = intx_mpas.cpp

diff --git a/tools/mbcslam/spec_visu_test.cpp b/tools/mbcslam/spec_visu_test.cpp
deleted file mode 100644
index 54c7e8f..0000000
--- a/tools/mbcslam/spec_visu_test.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * spec_visu_test.cpp
- * Will refine a quad mesh to a spectral visu mesh
- * It may even project on the sphere :)
- *
- *  Created on: Oct 21, 2012
- */
-
-#include <stdio.h>
-#include "moab/Core.hpp"
-#include "moab/Interface.hpp"
-#include "CslamUtils.hpp"
-
-#define STRINGIFY_(X) #X
-#define STRINGIFY(X) STRINGIFY_(X)
-
-using namespace moab;
-
-int main(int argc, char* argv[])
-{
-  // check command line arg
-  const char *filename_mesh = STRINGIFY(SRCDIR) "/eulerHomme.vtk";
-  const char *newFile = "spectral.vtk";
-  int NP = 4; // number of nodes in each direction
-  double tolerance = 0.0001;
-  double R = 6.; // should be input
-  if (argc == 6)
-  {
-    filename_mesh = argv[1];
-    NP = atoi(argv[2]);
-    newFile = argv[3];
-    R = atof(argv[4]);
-    tolerance = atof(argv[5]);
-  }
-  else
-  {
-    printf("Usage: %s <mesh_filename><NP><newFile><tolerance>\n", argv[0]);
-    if (argc != 1)
-      return 1;
-  }
-
-  printf("run:  %s  %d  %s %f %f\n",
-          filename_mesh, NP, newFile, R, tolerance);
-  // read input mesh in a set
-  ErrorCode rval = MB_SUCCESS;
-  Core moab;
-  Interface* mb = &moab;// global
-  EntityHandle sf;
-  rval = mb->create_meshset(MESHSET_SET, sf);
-  if (MB_SUCCESS != rval)
-    return 1;
-
-  rval=mb->load_file(filename_mesh, &sf);
-  if (MB_SUCCESS != rval)
-    return 1;
-
-  Range inputRange;
-  // get quads of interest
-  rval = mb->get_entities_by_type(sf, MBQUAD, inputRange);
-  if (MB_SUCCESS != rval)
-    return 1;
-
-  EntityHandle outputSet;
-  rval = mb->create_meshset(MESHSET_SET, outputSet);
-  if (MB_SUCCESS != rval)
-    return 1;
-
-  rval = SpectralVisuMesh( mb,  inputRange, NP, outputSet, tolerance);
-
-  if (MB_SUCCESS != rval)
-    return 1;
-
-  rval = ProjectOnSphere(mb, outputSet, R);
-  if (MB_SUCCESS != rval)
-    return 1;
-
-  rval = mb->write_mesh(newFile, &outputSet, 1);
-  if (MB_SUCCESS != rval)
-    return 1;
-  return 0;
-}
-

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