[MOAB-dev] r1485 - in MOAB/trunk: . cmake refiner

pebay at mcs.anl.gov pebay at mcs.anl.gov
Mon Dec 24 19:21:07 CST 2007


Author: pebay
Date: 2007-12-24 19:21:07 -0600 (Mon, 24 Dec 2007)
New Revision: 1485

Added:
   MOAB/trunk/refiner/CMakeLists.txt
   MOAB/trunk/refiner/MBEntityRefiner.cpp
   MOAB/trunk/refiner/MBEntityRefiner.hpp
   MOAB/trunk/refiner/MBMeshRefiner.cpp
   MOAB/trunk/refiner/MBMeshRefiner.hpp
   MOAB/trunk/refiner/MBSimplexTemplateRefiner.hpp
Modified:
   MOAB/trunk/CMakeLists.txt
   MOAB/trunk/cmake/FindNetCDF.cmake
   MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp
   MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp
Log:
COMP: updated CMakeLists to include MBSysUtil.cpp
ENH: refiner checkpoint
COMP: ignore Fortran NetCDF library when searching for NetCDF


Modified: MOAB/trunk/CMakeLists.txt
===================================================================
--- MOAB/trunk/CMakeLists.txt	2007-12-24 23:43:55 UTC (rev 1484)
+++ MOAB/trunk/CMakeLists.txt	2007-12-25 01:21:07 UTC (rev 1485)
@@ -120,8 +120,6 @@
     MBHandleUtils.cpp
     MBMatrix3.cpp
     MBCore.cpp
-    MBEdgeSizeEvaluator.cpp
-    MBEdgeSizeSimpleImplicit.cpp
     MBFactory.cpp
     MBGeomUtil.cpp
     MBMeshSet.cpp
@@ -132,6 +130,7 @@
     MBReadUtil.cpp
     MBReaderWriterSet.cpp
     MBSkinner.cpp
+    MBSysUtil.cpp
     MBUtil.cpp
     MBWriteUtil.cpp
     MeshSetSequence.cpp
@@ -221,6 +220,13 @@
   add_library( MOAB
     ${MOAB_LIB_SRCS}
   )
+
+  add_subdirectory( refiner )
+  include_directories( refiner )
+  target_link_libraries( MOAB
+    MOABrefiner
+  )
+
   if ( MOAB_USE_HDF AND HDF5_FOUND )
     target_link_libraries( MOAB
       mhdf

Modified: MOAB/trunk/cmake/FindNetCDF.cmake
===================================================================
--- MOAB/trunk/cmake/FindNetCDF.cmake	2007-12-24 23:43:55 UTC (rev 1484)
+++ MOAB/trunk/cmake/FindNetCDF.cmake	2007-12-25 01:21:07 UTC (rev 1485)
@@ -54,6 +54,9 @@
 set( NetCDF_LIBRARIES
   ${NetCDF_C_LIBRARY}
   ${NetCDF_CXX_LIBRARY}
+)
+
+set( NetCDF_FORTRAN_LIBRARIES
   ${NetCDF_FORTRAN_LIBRARY}
 )
 

Added: MOAB/trunk/refiner/CMakeLists.txt
===================================================================
--- MOAB/trunk/refiner/CMakeLists.txt	                        (rev 0)
+++ MOAB/trunk/refiner/CMakeLists.txt	2007-12-25 01:21:07 UTC (rev 1485)
@@ -0,0 +1,11 @@
+set ( MOAB_REFINER_SRCS 
+  MBEdgeSizeEvaluator.cpp
+  MBEdgeSizeSimpleImplicit.cpp
+  MBEntityRefiner.cpp
+  MBMeshRefiner.cpp
+  )
+
+add_library( MOABrefiner
+  ${MOAB_REFINER_SRCS}
+  )
+

Modified: MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp
===================================================================
--- MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp	2007-12-24 23:43:55 UTC (rev 1484)
+++ MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp	2007-12-25 01:21:07 UTC (rev 1485)
@@ -36,7 +36,7 @@
 {
 public:
   /// Construct an evaluator.
-  MBEdgeSizeEvaluator( MBInterface* parentMesh );
+  MBEdgeSizeEvaluator( MBInterface* );
   /// Destruction is virtual so subclasses may clean up after refinement.
   virtual ~MBEdgeSizeEvaluator();
 

Modified: MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp
===================================================================
--- MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp	2007-12-24 23:43:55 UTC (rev 1484)
+++ MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp	2007-12-25 01:21:07 UTC (rev 1485)
@@ -36,7 +36,7 @@
 {
 public:
   /// Construct an evaluator.
-  MBEdgeSizeSimpleImplicit( MBInterface* parentMesh );
+  MBEdgeSizeSimpleImplicit( MBInterface* );
   /// Destruction is virtual so subclasses may clean up after refinement.
   virtual ~MBEdgeSizeSimpleImplicit();
 

Added: MOAB/trunk/refiner/MBEntityRefiner.cpp
===================================================================
--- MOAB/trunk/refiner/MBEntityRefiner.cpp	                        (rev 0)
+++ MOAB/trunk/refiner/MBEntityRefiner.cpp	2007-12-25 01:21:07 UTC (rev 1485)
@@ -0,0 +1,24 @@
+#include "MBEntityRefiner.hpp"
+
+#include "MBInterface.hpp"
+
+MBEntityRefiner::MBEntityRefiner( MBInterface* parentMesh )
+{  
+  this->mesh = parentMesh;
+  this->edge_size_evaluator = 0;
+}
+
+MBEntityRefiner::~MBEntityRefiner()
+{
+}
+
+bool MBEntityRefiner::set_edge_size_evaluator( MBEdgeSizeEvaluator* ese )
+{
+  if ( ! ese ) return false;
+
+  this->edge_size_evaluator = ese;
+
+  return true;
+}
+
+

Added: MOAB/trunk/refiner/MBEntityRefiner.hpp
===================================================================
--- MOAB/trunk/refiner/MBEntityRefiner.hpp	                        (rev 0)
+++ MOAB/trunk/refiner/MBEntityRefiner.hpp	2007-12-25 01:21:07 UTC (rev 1485)
@@ -0,0 +1,55 @@
+/**
+ * MOAB, a Mesh-Oriented datABase, is a software component for creating,
+ * storing and accessing finite element mesh data.
+ * 
+ * Copyright 2007 Sandia Corporation.  Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
+ * retains certain rights in this software.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ */
+
+/** \class MBEntityRefiner
+  *
+  * This is an abstract class that contains the method used for per-entity
+  * refinement
+  * Subclasses must implement the pure virtual refine_entity() function.
+  *
+  * \author David Thompson
+  * \author Philippe Pebay
+  *
+  * \date 19 November 2007
+  */
+#ifndef MB_ENTITYREFINER_H
+#define MB_ENTITYREFINER_H
+
+#include "MBTypes.h" // for MB_DLL_EXPORT
+
+#include <vector>
+
+class MBInterface;
+class MBEdgeSizeEvaluator;
+
+class MB_DLL_EXPORT MBEntityRefiner
+{
+public:
+  /// Construct an entity refiner.
+  MBEntityRefiner( MBInterface* );
+  /// Destruction is virtual so subclasses may clean up after refinement.
+  virtual ~MBEntityRefiner();
+
+  virtual bool refine_entity( MBEntityHandle ) = 0;
+
+  bool set_edge_size_evaluator( MBEdgeSizeEvaluator* );
+  MBEdgeSizeEvaluator* get_edge_size_evaluator() { return this->edge_size_evaluator; };
+
+protected:
+  MBInterface* mesh;
+  MBEdgeSizeEvaluator* edge_size_evaluator;
+};
+
+#endif // MB_ENTITYREFINER_H

Added: MOAB/trunk/refiner/MBMeshRefiner.cpp
===================================================================
--- MOAB/trunk/refiner/MBMeshRefiner.cpp	                        (rev 0)
+++ MOAB/trunk/refiner/MBMeshRefiner.cpp	2007-12-25 01:21:07 UTC (rev 1485)
@@ -0,0 +1,28 @@
+#include "MBMeshRefiner.hpp"
+
+#include "MBInterface.hpp"
+
+MBMeshRefiner::MBMeshRefiner( MBInterface* parentMesh )
+{  
+  this->mesh = parentMesh;
+  this->entity_refiner = 0;
+}
+
+MBMeshRefiner::~MBMeshRefiner()
+{
+}
+
+bool MBMeshRefiner::set_entity_refiner( MBEntityRefiner* er )
+{
+  if ( ! er ) return false;
+
+  this->entity_refiner = er;
+
+  return true;
+}
+
+bool MBMeshRefiner::refine_mesh()
+{
+  return false;
+}
+

Added: MOAB/trunk/refiner/MBMeshRefiner.hpp
===================================================================
--- MOAB/trunk/refiner/MBMeshRefiner.hpp	                        (rev 0)
+++ MOAB/trunk/refiner/MBMeshRefiner.hpp	2007-12-25 01:21:07 UTC (rev 1485)
@@ -0,0 +1,52 @@
+/**
+ * MOAB, a Mesh-Oriented datABase, is a software component for creating,
+ * storing and accessing finite element mesh data.
+ * 
+ * Copyright 2007 Sandia Corporation.  Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
+ * retains certain rights in this software.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ */
+
+/** \class MBMeshRefiner
+  *
+  * This is an class that contains the method used for mesh refinement.
+  *
+  * \author Philippe Pebay
+  *
+  * \date 19 November 2007
+  */
+#ifndef MB_MESHREFINER_H
+#define MB_MESHREFINER_H
+
+#include "MBTypes.h" // for MB_DLL_EXPORT
+
+#include <vector>
+
+class MBInterface;
+class MBEntityRefiner;
+
+class MB_DLL_EXPORT MBMeshRefiner
+{
+public:
+  /// Construct a mesh refiner.
+  MBMeshRefiner( MBInterface* );
+  /// Destruction is virtual so subclasses may clean up after refinement.
+  virtual ~MBMeshRefiner();
+
+  virtual bool refine_mesh();
+
+  bool set_entity_refiner( MBEntityRefiner* );
+  MBEntityRefiner* get_entity_refiner() { return this->entity_refiner; };
+
+protected:
+  MBInterface* mesh;
+  MBEntityRefiner* entity_refiner;
+};
+
+#endif // MB_MESHREFINER_H

Added: MOAB/trunk/refiner/MBSimplexTemplateRefiner.hpp
===================================================================
--- MOAB/trunk/refiner/MBSimplexTemplateRefiner.hpp	                        (rev 0)
+++ MOAB/trunk/refiner/MBSimplexTemplateRefiner.hpp	2007-12-25 01:21:07 UTC (rev 1485)
@@ -0,0 +1,46 @@
+/**
+ * MOAB, a Mesh-Oriented datABase, is a software component for creating,
+ * storing and accessing finite element mesh data.
+ * 
+ * Copyright 2007 Sandia Corporation.  Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
+ * retains certain rights in this software.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ */
+
+/** \class MBSimplexTemplateRefiner
+  *
+  * This is a concrete subclass of MBEntityRefiner that implements
+  * refinement using templates applied to simplices.
+  *
+  * \author David Thompson
+  * \author Philippe Pebay
+  *
+  * \date 24 December 2007
+  */
+#ifndef MB_SIMPLEXTEMPLATEREFINER_H
+#define MB_SIMPLEXTEMPLATEREFINER_H
+
+#include "MBEntityRefiner.h"
+
+class MB_DLL_EXPORT MBSimplexTemplateRefiner : public MBEntityRefiner
+{
+public:
+  /// Construct a template refiner.
+  MBSimplexTemplateRefiner();
+  /// Destruction is virtual so subclasses may clean up after refinement.
+  virtual ~MBSimplexTemplateRefiner();
+
+  virtual bool refine_entity( MBEntityHandle );
+
+protected:
+  static int* template_index;
+  static int* templates;
+};
+#endif // MB_SIMPLEXTEMPLATEREFINER_H
+




More information about the moab-dev mailing list