[MOAB-dev] r5039 - in MOAB/trunk: examples src src/moab

iulian at mcs.anl.gov iulian at mcs.anl.gov
Mon Jun 27 16:38:09 CDT 2011


Author: iulian
Date: 2011-06-27 16:38:09 -0500 (Mon, 27 Jun 2011)
New Revision: 5039

Modified:
   MOAB/trunk/examples/README.FileReader
   MOAB/trunk/src/FBEngine.cpp
   MOAB/trunk/src/SmoothCurve.cpp
   MOAB/trunk/src/SmoothCurve.hpp
   MOAB/trunk/src/moab/FBEngine.hpp
Log:
in order to support variable mesh size along an edge, tangents at 
points are needed, for Newton-Raphson iteration.
The iteration finds a parameter u at which the current edge size 
is close to the target (variable) mesh size at that point.
So, expose the tangent for smooth edges.  


Modified: MOAB/trunk/examples/README.FileReader
===================================================================
--- MOAB/trunk/examples/README.FileReader	2011-06-24 22:37:53 UTC (rev 5038)
+++ MOAB/trunk/examples/README.FileReader	2011-06-27 21:38:09 UTC (rev 5039)
@@ -2,13 +2,11 @@
 Reading a mesh often involves importing large sets of data, for example coordinates of all the nodes in the mesh.  Normally, this process would involve reading data from the file into a temporary data buffer, then copying data from there into its destination in MOAB.  To avoid the expense of copying data, MOAB has implemented a reader/writer interface that provides direct access to blocks of memory used to represent mesh.
 The reader interface, declared in MBReadUtilIface, is used to request blocks of memory for storing coordinate positions and element connectivity.  The pointers returned from these functions point to the actual memory used to represent those data in MOAB.  Once data is written to that memory, no further copying is done.  This not only saves time, but it also eliminates the need to allocate a large memory buffer for intermediate storage of these data. 
 
-In this example, Triangle output files are read into MOAB. The database is saved into a file specified by the user, extension decides the type of the file.
+In this example, Triangle output files are read into MOAB. The database is saved into a file specified by the user, as the second argument
 
 usage 
-fread <triangle_file_base> <output_file>
+FileRead <triangle_file_base> <output_file>
 example provided
-$>  fread A.1 out.vtk
+$>  FileRead A.1 out.vtk
 
-It is assumed that the <>.node file and <>.ele files are existing.
-
-
+It is assumed that the <>.node file and <>.ele files are existing.  

Modified: MOAB/trunk/src/FBEngine.cpp
===================================================================
--- MOAB/trunk/src/FBEngine.cpp	2011-06-24 22:37:53 UTC (rev 5038)
+++ MOAB/trunk/src/FBEngine.cpp	2011-06-27 21:38:09 UTC (rev 5039)
@@ -1051,6 +1051,21 @@
   smoothCurve -> position_from_u(u, x, y, z);
   return MB_SUCCESS;
 }
+
+ErrorCode FBEngine::getEntTgntU( EntityHandle edge,
+                                    double u,
+                                    double& i, double& j, double& k )
+{
+  SmoothCurve * smoothCurve = _edges[edge];// this is a map
+  // now, call smoothCurve methods
+  double tg[3];
+  double x, y, z;
+  smoothCurve -> position_from_u(u, x, y, z, tg);
+  i = tg[0];
+  j = tg[1];
+  k = tg[2];
+  return MB_SUCCESS;
+}
 ErrorCode FBEngine::isEntAdj(EntityHandle entity1, EntityHandle entity2,
     bool& adjacent_out)
 {

Modified: MOAB/trunk/src/SmoothCurve.cpp


More information about the moab-dev mailing list