vtf-logo

refine.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__geom_mesh_simplicial_refine_h__)
00009 #define __geom_mesh_simplicial_refine_h__
00010 
00011 #include "coarsen.h"
00012 #include "inc_opt.h"
00013 #include "insert.h"
00014 #include "set.h"
00015 
00016 #include "../iss/ISS_SignedDistance.h"
00017 #include "../iss/PointsOnManifold.h"
00018 
00019 #include "../../../ads/functor/constant.h"
00020 
00021 #include <set>
00022 
00023 // CONTINUE: I use the following for debugging.
00024 #if 0
00025 #include "file_io.h"
00026 #include <sstream>
00027 #include <iomanip>
00028 #endif
00029 
00030 BEGIN_NAMESPACE_GEOM
00031 
00032 // CONTINUE: Refining is really slow when the max edge length is relatively
00033 // small.  This is due to deep recursion.  Fix this problem.
00034 
00036 
00044 template<int N, int M, typename T,
00045          template<class> class Node,
00046          template<class> class Cell,
00047          template<class,class> class Cont,
00048          int MM, int SD,
00049          class MaxEdgeLength>
00050 int
00051 refine(SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh, 
00052        PointsOnManifold<N,MM,SD,T>* manifold,
00053        const MaxEdgeLength& f);
00054 
00055 
00056   
00058 
00068 template<int N, int M, typename T,
00069          template<class> class Node,
00070          template<class> class Cell,
00071          template<class,class> class Cont,
00072          class MaxEdgeLength>
00073 inline
00074 int
00075 refine(SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh, const MaxEdgeLength& f) {
00076   PointsOnManifold<N,M-1,1,T>* null = 0;
00077   // Call the above function with a null boundary manifold pointer.
00078   return refine(mesh, null, f);
00079 }
00080 
00081 
00082 
00083   
00085 
00093 template<int N, int M, typename T,
00094          template<class> class Node,
00095          template<class> class Cell,
00096          template<class,class> class Cont,
00097          int MM, int SD,
00098          typename IntInputIterator>
00099 int
00100 refine(SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh, 
00101        PointsOnManifold<N,MM,SD,T>* manifold,
00102        IntInputIterator begin, IntInputIterator end);
00103 
00104 
00105 
00107 
00117 template<int N, int M, typename T,
00118          template<class> class Node,
00119          template<class> class Cell,
00120          template<class,class> class Cont,
00121          typename IntInputIterator>
00122 inline
00123 int
00124 refine(SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh, 
00125        IntInputIterator begin, IntInputIterator end) {
00126   PointsOnManifold<N,M-1,1,T>* null = 0;
00127   // Call the above function with a null boundary manifold pointer.
00128   return refine(mesh, null, begin, end);
00129 }
00130 
00131 
00132 
00134 
00147 template<int N, int M, typename T,
00148          template<class> class Node,
00149          template<class> class Cell,
00150          template<class,class> class Cont,
00151          int MM, int SD,
00152          typename IntInputIterator,
00153          class MaxEdgeLength>
00154 int
00155 refine(SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh, 
00156        PointsOnManifold<N,MM,SD,T>* manifold,
00157        IntInputIterator begin, IntInputIterator end,
00158        const MaxEdgeLength& f);
00159 
00160 
00161 
00162 
00164 
00176 template<int N, int M, typename T,
00177          template<class> class Node,
00178          template<class> class Cell,
00179          template<class,class> class Cont,
00180          typename IntInputIterator,
00181          class MaxEdgeLength>
00182 inline
00183 int
00184 refine(SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh, 
00185        IntInputIterator begin, IntInputIterator end,
00186        const MaxEdgeLength& f) {
00187   PointsOnManifold<N,M-1,1,T>* null = 0;
00188   // Call the above function with a null boundary manifold pointer.
00189   return refine(mesh, null, begin, end, f);
00190 }
00191 
00192 
00193 
00194 
00195   
00197 
00200 template<typename T,
00201          template<class> class Node,
00202          template<class> class Cell,
00203          template<class,class> class Cont,
00204          class ISS>
00205 int
00206 refineBoundary(SimpMeshRed<2,2,T,Node,Cell,Cont>* x, 
00207                const ISS& boundary,
00208                T maxAngle, 
00209                T minEdgeLength,
00210                int maxSweeps = 10);
00211   
00212 
00214 
00217 template<typename T,
00218          template<class> class Node,
00219          template<class> class Cell,
00220          template<class,class> class Cont,
00221          class Distance,
00222          class ClosestPoint,
00223          class MaxAngle,
00224          class MinEdgeLength>
00225 int
00226 refineBoundary(SimpMeshRed<2,2,T,Node,Cell,Cont>* x, 
00227                const Distance& distance,
00228                const ClosestPoint& closestPoint,
00229                const MaxAngle& maxAngle,
00230                const MinEdgeLength& minEdgeLength,
00231                int maxSweeps = 10);
00232   
00233 
00235 
00245 template<typename T,
00246          template<class> class Node,
00247          template<class> class Cell,
00248          template<class,class> class Cont,
00249          class MaxEdgeLength>
00250 int
00251 refineAdjust(SimpMeshRed<2,2,T,Node,Cell,Cont>* mesh, const MaxEdgeLength& f);
00252   
00253 
00254 END_NAMESPACE_GEOM
00255 
00256 #define __geom_mesh_simplicial_refine2_ipp__
00257 #include "refine2.ipp"
00258 #undef __geom_mesh_simplicial_refine2_ipp__
00259 
00260 #define __geom_mesh_simplicial_refine3_ipp__
00261 #include "refine3.ipp"
00262 #undef __geom_mesh_simplicial_refine3_ipp__
00263 
00264 #define __geom_mesh_simplicial_refine_ipp__
00265 #include "refine.ipp"
00266 #undef __geom_mesh_simplicial_refine_ipp__
00267 
00268 #endif

Generated on Fri Aug 24 12:55:56 2007 for Computational Geometry Package by  doxygen 1.4.7