[MOAB-dev] r1481 - in MOAB/trunk: . refiner
pebay at mcs.anl.gov
pebay at mcs.anl.gov
Mon Dec 24 13:48:35 CST 2007
Author: pebay
Date: 2007-12-24 13:48:35 -0600 (Mon, 24 Dec 2007)
New Revision: 1481
Added:
MOAB/trunk/refiner/MBEdgeSizeEvaluator.cpp
MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp
MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.cpp
MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp
Removed:
MOAB/trunk/MBEdgeSizeEvaluator.cpp
MOAB/trunk/MBEdgeSizeEvaluator.hpp
MOAB/trunk/MBEdgeSizeSimpleImplicit.cpp
MOAB/trunk/MBEdgeSizeSimpleImplicit.hpp
Log:
ENH: moving these files to the refiner directory
Deleted: MOAB/trunk/MBEdgeSizeEvaluator.cpp
===================================================================
--- MOAB/trunk/MBEdgeSizeEvaluator.cpp 2007-12-19 20:41:46 UTC (rev 1480)
+++ MOAB/trunk/MBEdgeSizeEvaluator.cpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -1,50 +0,0 @@
-#include "MBEdgeSizeEvaluator.hpp"
-
-#include "MBInterface.hpp"
-
-#include <assert.h>
-
-MBEdgeSizeEvaluator::MBEdgeSizeEvaluator( MBInterface* parentMesh )
-{
- assert( parentMesh );
-
- this->mesh = parentMesh;
- this->reset_vertex_tags();
-}
-
-MBEdgeSizeEvaluator::~MBEdgeSizeEvaluator()
-{
-}
-
-void MBEdgeSizeEvaluator::reset_vertex_tags()
-{
- this->vertexSize = 0;
- this->vertexTags.clear();
-}
-
-int MBEdgeSizeEvaluator::add_vertex_tag( MBTag tag_handle )
-{
- int offset = this->vertexSize; // old size is offset of tag being added
- int tagSize;
- MBTagType tagType;
- if ( this->mesh->tag_get_size( tag_handle, tagSize ) != MB_SUCCESS )
- return -1;
-
- if ( this->mesh->tag_get_type( tag_handle, tagType ) != MB_SUCCESS )
- return -1;
-
- if ( tagType == MB_TAG_BIT )
- {
- // Pad any bit tags to a size in full bytes.
- tagSize = ( tagSize % 8 ? 1 : 0 ) + ( tagSize / 8 );
- }
-
- // Now pad so that the next tag will be word-aligned:
- while ( tagSize % sizeof(int) )
- ++tagSize;
-
- this->vertexSize += tagSize;
-
- this->vertexTags.push_back( std::pair< MBTag, int >( tag_handle, offset ) );
- return offset;
-}
Deleted: MOAB/trunk/MBEdgeSizeEvaluator.hpp
===================================================================
--- MOAB/trunk/MBEdgeSizeEvaluator.hpp 2007-12-19 20:41:46 UTC (rev 1480)
+++ MOAB/trunk/MBEdgeSizeEvaluator.hpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -1,79 +0,0 @@
-/**
- * MOAB, a Mesh-Oriented datABase, is a software component for creating,
- * storing and accessing finite element mesh data.
- *
- * Copyright 2004 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 MBEdgeSizeEvaluator
- *
- * This is an abstract class that embodies the rule used during edge-based mesh
- * refinement to decide whether an edge should be subdivided or not.
- * Subclasses must implement the pure virtual evaluate_edge() function.
- *
- * \author David Thompson
- *
- * \date 19 November 2007
- */
-#ifndef MB_EDGESIZEEVALUATOR_H
-#define MB_EDGESIZEEVALUATOR_H
-
-#include "MBTypes.h" // for MB_DLL_EXPORT
-
-#include <vector>
-
-class MBInterface;
-
-class MB_DLL_EXPORT MBEdgeSizeEvaluator
-{
-public:
- /// Construct an evaluator.
- MBEdgeSizeEvaluator( MBInterface* parentMesh );
- /// Destruction is virtual so subclasses may clean up after refinement.
- virtual ~MBEdgeSizeEvaluator();
-
- /** \brief Returns true if the edge \a p0 - \a p2 should be subdivided, false otherwise.
- *
- * The arguments \a p0, \a p1, and \a p2 are all pointers to arrays of 6 doubles each
- * while the arguments \a t0, \a t1, and \a t2 are all pointers to arrays of tag data
- * defined at the corresponding point. While the endpoints \a p0 and \a p2 are
- * immutable, the mid-edge point coordinates \a p1 and tag data \a t1 may be altered by
- * evaluate_edge(). Altered values will be ignored if evaluate_edge() returns false.
- * Be careful to ensure that all calls to evaluate_edge() perform identical modifications
- * given identical input values!
- *
- * A list of tags passed in \a t0, \a t1, and \a t2 is stored in the vertexTags member.
- * The vertexSize member stores the total length of data associated with each pointer (in bytes).
- * Subclasses may access vertexTags and vertexSize directly; the refiner uses public methods to
- * populate vertexTags before evaluate_edge() is called.
- */
- virtual bool evaluate_edge(
- const double* p0, const void* t0,
- double* p1, void* t1,
- const double* p2, const void* t2 ) = 0;
-
- /// Clear the list of tag values that will appear past the vertex coordinates in \a p0, \a p1, and \a p2.
- void reset_vertex_tags();
- /** Add a tag to the list of tag values that will appear past the vertex coordinates.
- * The return value is the offset into each vertex coordinate pointer (\a p0, \a p1, \a p2) where the
- * tag value(s) will be stored.
- */
- int add_vertex_tag( MBTag tag_handle );
- /// Return the number of bytes to allocate for tag data per point.
- int get_vertex_tag_size() { return this->vertexSize; }
-
-protected:
- std::vector< std::pair< MBTag, int > > vertexTags;
- int vertexSize;
- MBInterface* mesh;
-};
-
-#endif // MB_EDGESIZEEVALUATOR_H
Deleted: MOAB/trunk/MBEdgeSizeSimpleImplicit.cpp
===================================================================
--- MOAB/trunk/MBEdgeSizeSimpleImplicit.cpp 2007-12-19 20:41:46 UTC (rev 1480)
+++ MOAB/trunk/MBEdgeSizeSimpleImplicit.cpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -1,78 +0,0 @@
-#include "MBEdgeSizeSimpleImplicit.hpp"
-
-MBEdgeSizeSimpleImplicit::MBEdgeSizeSimpleImplicit( MBInterface* parentMesh )
- : MBEdgeSizeEvaluator( parentMesh )
-{
- int i;
- // Default to the plane: x = 0.
- this->coeffC = 0.;
- for ( i = 0; i < 3; ++i )
- {
- this->coeffB[i] = this->coeffA[i] = this->coeffA[i+3] = 0.;
- }
- this->coeffB[0] = 1.;
- // Default to a scaling ratio of 1.
- this->ratio = 1.;
-}
-
-MBEdgeSizeSimpleImplicit::~MBEdgeSizeSimpleImplicit()
-{
-}
-
-bool MBEdgeSizeSimpleImplicit::evaluate_edge(
- const double* p0, const void* t0,
- double* p1, void* t1,
- const double* p2, const void* t2 )
-{
- double L2 = 0.;
- double delta;
- int i;
- for ( i = 0; i < 3; ++i )
- {
- delta = p2[i+3] - p0[i+3];
- L2 += delta * delta;
- }
- // parametric coords in p1[{0,1,2}]
- double x = p1[3];
- double y = p1[4];
- double z = p1[5];
- double F2 =
- this->coeffA[0] * x * x + 2. * this->coeffA[1] * x * y + 2. * this->coeffA[2] * x * z +
- this->coeffA[3] * y * y + 2. * this->coeffA[4] * y * z +
- this->coeffA[5] * z * z +
- this->coeffB[0] * x + this->coeffB[1] * y + this->coeffB[2] * z +
- this->coeffC;
- F2 = F2 * F2; // square it
- double r2 = this->ratio * this->ratio;
- if ( 4. * F2 / L2 < r2 )
- return true; // Midpoint is close to surface => split edge
-
- return false; // Don't split edge
-}
-
-void MBEdgeSizeSimpleImplicit::set_implicit_function( double* coeffs )
-{
- int i;
- // Default to the plane: x = 0.
- for ( i = 0; i < 3; ++i )
- {
- this->coeffA[i ] = coeffs[i];
- this->coeffA[i+3] = coeffs[i + 3];
- this->coeffB[i ] = coeffs[i + 6];
- }
- this->coeffC = coeffs[9];
-}
-
-void MBEdgeSizeSimpleImplicit::get_implicit_function( double*& coeffs )
-{
- int i;
- // Default to the plane: x = 0.
- for ( i = 0; i < 3; ++i )
- {
- coeffs[i] = this->coeffA[i ];
- coeffs[i + 3] = this->coeffA[i+3];
- coeffs[i + 6] = this->coeffB[i ];
- }
- coeffs[9] = this->coeffC;
-}
-
Deleted: MOAB/trunk/MBEdgeSizeSimpleImplicit.hpp
===================================================================
--- MOAB/trunk/MBEdgeSizeSimpleImplicit.hpp 2007-12-19 20:41:46 UTC (rev 1480)
+++ MOAB/trunk/MBEdgeSizeSimpleImplicit.hpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -1,67 +0,0 @@
-/**
- * MOAB, a Mesh-Oriented datABase, is a software component for creating,
- * storing and accessing finite element mesh data.
- *
- * Copyright 2004 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 MBEdgeSizeSimpleImplicit
- *
- * This is an simple example edge evaluator tha subdivides edges based
- * on their midpoint's distance to a simple, fixed-form implicit surface
- * written as \f$ x^T A x + B x + C \f$ where \f$x\f$ is a column vector of
- * holding the edge midpoint coordinates, \f$A\f$ is a symmetric 3x3 matrix,
- * \f$B\f$ is a 1x3 row vector, and \f$C\f$ is a scalar.
- * Whenever the implicit function divided by half of the edge length is smaller than
- * some minimum ratio (which defaults to 1), the edge is marked for subdivision.
- *
- * \author David Thompson
- *
- * \date 19 November 2007
- */
-#ifndef MB_EDGESIZESIMPLEIMPLICIT_H
-#define MB_EDGESIZESIMPLEIMPLICIT_H
-
-#include "MBEdgeSizeEvaluator.hpp"
-
-class MB_DLL_EXPORT MBEdgeSizeSimpleImplicit : public MBEdgeSizeEvaluator
-{
-public:
- /// Construct an evaluator.
- MBEdgeSizeSimpleImplicit( MBInterface* parentMesh );
- /// Destruction is virtual so subclasses may clean up after refinement.
- virtual ~MBEdgeSizeSimpleImplicit();
-
- /** \brief Given an edge of length L, true when edge midpoint is within $\alpha^2$ of $\left(\frac{2f(x,y,z)}{L}\right)^2$.
- */
- virtual bool evaluate_edge(
- const double* p0, const void* t0,
- double* p1, void* t1,
- const double* p2, const void* t2 );
-
- /// Set the 9 coefficients of the implicit function. The vector contains the entries of A, followed by B, followed by C.
- virtual void set_implicit_function( double* coeffs );
- /// Get the 9 coefficients of the implicit function. The vector contains the entries of A, followed by B, followed by C.
- void get_implicit_function( double*& coeffs );
-
- /// Set the threshold ratio of function value to half-edge length that triggers subdivision.
- virtual void set_ratio( double r ) { this->ratio = r; }
- /// Get the threshold ratio of function value to half-edge length that triggers subdivision.
- double get_ratio() { return this->ratio; }
-
-protected:
- double coeffA[6];
- double coeffB[3];
- double coeffC;
- double ratio;
-};
-
-#endif // MB_EDGESIZESIMPLEIMPLICIT_H
Copied: MOAB/trunk/refiner/MBEdgeSizeEvaluator.cpp (from rev 1480, MOAB/trunk/MBEdgeSizeEvaluator.cpp)
===================================================================
--- MOAB/trunk/refiner/MBEdgeSizeEvaluator.cpp (rev 0)
+++ MOAB/trunk/refiner/MBEdgeSizeEvaluator.cpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -0,0 +1,50 @@
+#include "MBEdgeSizeEvaluator.hpp"
+
+#include "MBInterface.hpp"
+
+#include <assert.h>
+
+MBEdgeSizeEvaluator::MBEdgeSizeEvaluator( MBInterface* parentMesh )
+{
+ assert( parentMesh );
+
+ this->mesh = parentMesh;
+ this->reset_vertex_tags();
+}
+
+MBEdgeSizeEvaluator::~MBEdgeSizeEvaluator()
+{
+}
+
+void MBEdgeSizeEvaluator::reset_vertex_tags()
+{
+ this->vertexSize = 0;
+ this->vertexTags.clear();
+}
+
+int MBEdgeSizeEvaluator::add_vertex_tag( MBTag tag_handle )
+{
+ int offset = this->vertexSize; // old size is offset of tag being added
+ int tagSize;
+ MBTagType tagType;
+ if ( this->mesh->tag_get_size( tag_handle, tagSize ) != MB_SUCCESS )
+ return -1;
+
+ if ( this->mesh->tag_get_type( tag_handle, tagType ) != MB_SUCCESS )
+ return -1;
+
+ if ( tagType == MB_TAG_BIT )
+ {
+ // Pad any bit tags to a size in full bytes.
+ tagSize = ( tagSize % 8 ? 1 : 0 ) + ( tagSize / 8 );
+ }
+
+ // Now pad so that the next tag will be word-aligned:
+ while ( tagSize % sizeof(int) )
+ ++tagSize;
+
+ this->vertexSize += tagSize;
+
+ this->vertexTags.push_back( std::pair< MBTag, int >( tag_handle, offset ) );
+ return offset;
+}
Copied: MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp (from rev 1480, MOAB/trunk/MBEdgeSizeEvaluator.hpp)
===================================================================
--- MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp (rev 0)
+++ MOAB/trunk/refiner/MBEdgeSizeEvaluator.hpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -0,0 +1,79 @@
+/**
+ * MOAB, a Mesh-Oriented datABase, is a software component for creating,
+ * storing and accessing finite element mesh data.
+ *
+ * Copyright 2004 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 MBEdgeSizeEvaluator
+ *
+ * This is an abstract class that embodies the rule used during edge-based mesh
+ * refinement to decide whether an edge should be subdivided or not.
+ * Subclasses must implement the pure virtual evaluate_edge() function.
+ *
+ * \author David Thompson
+ *
+ * \date 19 November 2007
+ */
+#ifndef MB_EDGESIZEEVALUATOR_H
+#define MB_EDGESIZEEVALUATOR_H
+
+#include "MBTypes.h" // for MB_DLL_EXPORT
+
+#include <vector>
+
+class MBInterface;
+
+class MB_DLL_EXPORT MBEdgeSizeEvaluator
+{
+public:
+ /// Construct an evaluator.
+ MBEdgeSizeEvaluator( MBInterface* parentMesh );
+ /// Destruction is virtual so subclasses may clean up after refinement.
+ virtual ~MBEdgeSizeEvaluator();
+
+ /** \brief Returns true if the edge \a p0 - \a p2 should be subdivided, false otherwise.
+ *
+ * The arguments \a p0, \a p1, and \a p2 are all pointers to arrays of 6 doubles each
+ * while the arguments \a t0, \a t1, and \a t2 are all pointers to arrays of tag data
+ * defined at the corresponding point. While the endpoints \a p0 and \a p2 are
+ * immutable, the mid-edge point coordinates \a p1 and tag data \a t1 may be altered by
+ * evaluate_edge(). Altered values will be ignored if evaluate_edge() returns false.
+ * Be careful to ensure that all calls to evaluate_edge() perform identical modifications
+ * given identical input values!
+ *
+ * A list of tags passed in \a t0, \a t1, and \a t2 is stored in the vertexTags member.
+ * The vertexSize member stores the total length of data associated with each pointer (in bytes).
+ * Subclasses may access vertexTags and vertexSize directly; the refiner uses public methods to
+ * populate vertexTags before evaluate_edge() is called.
+ */
+ virtual bool evaluate_edge(
+ const double* p0, const void* t0,
+ double* p1, void* t1,
+ const double* p2, const void* t2 ) = 0;
+
+ /// Clear the list of tag values that will appear past the vertex coordinates in \a p0, \a p1, and \a p2.
+ void reset_vertex_tags();
+ /** Add a tag to the list of tag values that will appear past the vertex coordinates.
+ * The return value is the offset into each vertex coordinate pointer (\a p0, \a p1, \a p2) where the
+ * tag value(s) will be stored.
+ */
+ int add_vertex_tag( MBTag tag_handle );
+ /// Return the number of bytes to allocate for tag data per point.
+ int get_vertex_tag_size() { return this->vertexSize; }
+
+protected:
+ std::vector< std::pair< MBTag, int > > vertexTags;
+ int vertexSize;
+ MBInterface* mesh;
+};
+
+#endif // MB_EDGESIZEEVALUATOR_H
Copied: MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.cpp (from rev 1480, MOAB/trunk/MBEdgeSizeSimpleImplicit.cpp)
===================================================================
--- MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.cpp (rev 0)
+++ MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.cpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -0,0 +1,78 @@
+#include "MBEdgeSizeSimpleImplicit.hpp"
+
+MBEdgeSizeSimpleImplicit::MBEdgeSizeSimpleImplicit( MBInterface* parentMesh )
+ : MBEdgeSizeEvaluator( parentMesh )
+{
+ int i;
+ // Default to the plane: x = 0.
+ this->coeffC = 0.;
+ for ( i = 0; i < 3; ++i )
+ {
+ this->coeffB[i] = this->coeffA[i] = this->coeffA[i+3] = 0.;
+ }
+ this->coeffB[0] = 1.;
+ // Default to a scaling ratio of 1.
+ this->ratio = 1.;
+}
+
+MBEdgeSizeSimpleImplicit::~MBEdgeSizeSimpleImplicit()
+{
+}
+
+bool MBEdgeSizeSimpleImplicit::evaluate_edge(
+ const double* p0, const void* t0,
+ double* p1, void* t1,
+ const double* p2, const void* t2 )
+{
+ double L2 = 0.;
+ double delta;
+ int i;
+ for ( i = 0; i < 3; ++i )
+ {
+ delta = p2[i+3] - p0[i+3];
+ L2 += delta * delta;
+ }
+ // parametric coords in p1[{0,1,2}]
+ double x = p1[3];
+ double y = p1[4];
+ double z = p1[5];
+ double F2 =
+ this->coeffA[0] * x * x + 2. * this->coeffA[1] * x * y + 2. * this->coeffA[2] * x * z +
+ this->coeffA[3] * y * y + 2. * this->coeffA[4] * y * z +
+ this->coeffA[5] * z * z +
+ this->coeffB[0] * x + this->coeffB[1] * y + this->coeffB[2] * z +
+ this->coeffC;
+ F2 = F2 * F2; // square it
+ double r2 = this->ratio * this->ratio;
+ if ( 4. * F2 / L2 < r2 )
+ return true; // Midpoint is close to surface => split edge
+
+ return false; // Don't split edge
+}
+
+void MBEdgeSizeSimpleImplicit::set_implicit_function( double* coeffs )
+{
+ int i;
+ // Default to the plane: x = 0.
+ for ( i = 0; i < 3; ++i )
+ {
+ this->coeffA[i ] = coeffs[i];
+ this->coeffA[i+3] = coeffs[i + 3];
+ this->coeffB[i ] = coeffs[i + 6];
+ }
+ this->coeffC = coeffs[9];
+}
+
+void MBEdgeSizeSimpleImplicit::get_implicit_function( double*& coeffs )
+{
+ int i;
+ // Default to the plane: x = 0.
+ for ( i = 0; i < 3; ++i )
+ {
+ coeffs[i] = this->coeffA[i ];
+ coeffs[i + 3] = this->coeffA[i+3];
+ coeffs[i + 6] = this->coeffB[i ];
+ }
+ coeffs[9] = this->coeffC;
+}
+
Copied: MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp (from rev 1480, MOAB/trunk/MBEdgeSizeSimpleImplicit.hpp)
===================================================================
--- MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp (rev 0)
+++ MOAB/trunk/refiner/MBEdgeSizeSimpleImplicit.hpp 2007-12-24 19:48:35 UTC (rev 1481)
@@ -0,0 +1,67 @@
+/**
+ * MOAB, a Mesh-Oriented datABase, is a software component for creating,
+ * storing and accessing finite element mesh data.
+ *
+ * Copyright 2004 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 MBEdgeSizeSimpleImplicit
+ *
+ * This is an simple example edge evaluator tha subdivides edges based
+ * on their midpoint's distance to a simple, fixed-form implicit surface
+ * written as \f$ x^T A x + B x + C \f$ where \f$x\f$ is a column vector of
+ * holding the edge midpoint coordinates, \f$A\f$ is a symmetric 3x3 matrix,
+ * \f$B\f$ is a 1x3 row vector, and \f$C\f$ is a scalar.
+ * Whenever the implicit function divided by half of the edge length is smaller than
+ * some minimum ratio (which defaults to 1), the edge is marked for subdivision.
+ *
+ * \author David Thompson
+ *
+ * \date 19 November 2007
+ */
+#ifndef MB_EDGESIZESIMPLEIMPLICIT_H
+#define MB_EDGESIZESIMPLEIMPLICIT_H
+
+#include "MBEdgeSizeEvaluator.hpp"
+
+class MB_DLL_EXPORT MBEdgeSizeSimpleImplicit : public MBEdgeSizeEvaluator
+{
+public:
+ /// Construct an evaluator.
+ MBEdgeSizeSimpleImplicit( MBInterface* parentMesh );
+ /// Destruction is virtual so subclasses may clean up after refinement.
+ virtual ~MBEdgeSizeSimpleImplicit();
+
+ /** \brief Given an edge of length L, true when edge midpoint is within $\alpha^2$ of $\left(\frac{2f(x,y,z)}{L}\right)^2$.
+ */
+ virtual bool evaluate_edge(
+ const double* p0, const void* t0,
+ double* p1, void* t1,
+ const double* p2, const void* t2 );
+
+ /// Set the 10 coefficients of the implicit function. The vector contains the entries of A, followed by B, followed by C.
+ virtual void set_implicit_function( double* coeffs );
+ /// Get the 10 coefficients of the implicit function. The vector contains the entries of A, followed by B, followed by C.
+ void get_implicit_function( double*& coeffs );
+
+ /// Set the threshold ratio of function value to half-edge length that triggers subdivision.
+ virtual void set_ratio( double r ) { this->ratio = r; }
+ /// Get the threshold ratio of function value to half-edge length that triggers subdivision.
+ double get_ratio() { return this->ratio; }
+
+protected:
+ double coeffA[6];
+ double coeffB[3];
+ double coeffC;
+ double ratio;
+};
+
+#endif // MB_EDGESIZESIMPLEIMPLICIT_H
More information about the moab-dev
mailing list