00001
00002
00008 #if !defined(__geom_mesh_simplicial_topologicalOptimize_h__)
00009 #define __geom_mesh_simplicial_topologicalOptimize_h__
00010
00011 #include "SimpMeshRed.h"
00012 #include "EdgeRemoval.h"
00013 #include "FaceRemoval.h"
00014 #include "set.h"
00015
00016 #include "../iss/PointsOnManifold.h"
00017
00018 #include "../../../ads/algorithm/skipElements.h"
00019
00020 BEGIN_NAMESPACE_GEOM
00021
00022
00024
00037 template<class _QualityMetric,
00038 typename T,
00039 template<class> class Node,
00040 template<class> class Cell,
00041 template<class,class> class Cont,
00042 int SD>
00043 int
00044 topologicalOptimize
00045 (SimpMeshRed<3,3,T,Node,Cell,Cont>* mesh,
00046 const PointsOnManifold<3,2,SD,T>* manifold,
00047 std::multiset<std::pair<int,int> >* edgeRemovalOperations = 0,
00048 std::multiset<std::pair<int,int> >* faceRemovalOperations = 0,
00049 int maximumSteps = std::numeric_limits<int>::max());
00050
00051
00052
00054
00065 template<int N, int M, typename T,
00066 template<class> class Node,
00067 template<class> class Cell,
00068 template<class,class> class Cont,
00069 int MM, int SD>
00070 inline
00071 int
00072 topologicalOptimizeUsingMeanRatio
00073 (SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh,
00074 const PointsOnManifold<N,MM,SD,T>* manifold,
00075 std::multiset<std::pair<int,int> >* edgeRemovalOperations = 0,
00076 std::multiset<std::pair<int,int> >* faceRemovalOperations = 0,
00077 const int maximumSteps = std::numeric_limits<int>::max()) {
00078 return topologicalOptimize<SimplexModMeanRatio<N,T> >(mesh, manifold,
00079 edgeRemovalOperations,
00080 faceRemovalOperations,
00081 maximumSteps);
00082 }
00083
00084
00085
00087
00098 template<int N, int M, typename T,
00099 template<class> class Node,
00100 template<class> class Cell,
00101 template<class,class> class Cont,
00102 int MM, int SD>
00103 inline
00104 int
00105 topologicalOptimizeUsingConditionNumber
00106 (SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh,
00107 const PointsOnManifold<N,MM,SD,T>* manifold,
00108 std::multiset<std::pair<int,int> >* edgeRemovalOperations = 0,
00109 std::multiset<std::pair<int,int> >* faceRemovalOperations = 0,
00110 const int maximumSteps = std::numeric_limits<int>::max()) {
00111 return topologicalOptimize<SimplexModCondNum<N,T> >(mesh, manifold,
00112 edgeRemovalOperations,
00113 faceRemovalOperations,
00114 maximumSteps);
00115 }
00116
00117
00118 END_NAMESPACE_GEOM
00119
00120
00121 #define __geom_mesh_simplicial_topologicalOptimize3_ipp__
00122 #include "topologicalOptimize3.ipp"
00123 #undef __geom_mesh_simplicial_topologicalOptimize3_ipp__
00124
00125
00126 #endif