00001
00002
00008 #if !defined(__geom_mesh_simplicial_coarsen_h__)
00009 #define __geom_mesh_simplicial_coarsen_h__
00010
00011 #include "SimpMeshRed.h"
00012 #include "geometry.h"
00013 #include "topology.h"
00014 #include "build.h"
00015 #include "set.h"
00016
00017 #include "../iss/PointsOnManifold.h"
00018
00019 #include "../../../numerical/constants.h"
00020
00021
00022 #if 0
00023 #include "file_io.h"
00024 #include <sstream>
00025 #include <iomanip>
00026 #endif
00027
00028 BEGIN_NAMESPACE_GEOM
00029
00031
00053 template<class QualityMetric,
00054 typename T,
00055 template<class> class Node,
00056 template<class> class Cell,
00057 template<class,class> class Cont,
00058 int SD,
00059 class MinEdgeLength>
00060 int
00061 coarsen(SimpMeshRed<2,2,T,Node,Cell,Cont>* mesh,
00062 const MinEdgeLength& f,
00063 T minimumAllowedQuality, T qualityFactor,
00064 PointsOnManifold<2,1,SD,T>* manifold,
00065 int maxSweeps = 0);
00066
00067
00069
00085 template<class QualityMetric,
00086 typename T,
00087 template<class> class Node,
00088 template<class> class Cell,
00089 template<class,class> class Cont,
00090 class MinEdgeLength>
00091 int
00092 coarsen(SimpMeshRed<2,2,T,Node,Cell,Cont>* mesh, const MinEdgeLength& f,
00093 T minimumAllowedQuality, T qualityFactor,
00094 T cornerDeviation = -1, int maxSweeps = 0);
00095
00096
00097
00098
00099
00100
00102
00121 template<class QualityMetric,
00122 typename T,
00123 template<class> class Node,
00124 template<class> class Cell,
00125 template<class,class> class Cont,
00126 int SD,
00127 class MinEdgeLength>
00128 int
00129 coarsen(SimpMeshRed<3,2,T,Node,Cell,Cont>* mesh,
00130 const MinEdgeLength& f,
00131 T minimumAllowedQuality, T qualityFactor,
00132 PointsOnManifold<3,2,SD,T>* manifold,
00133 int maxSweeps = 0);
00134
00135
00137
00160 template<class QualityMetric,
00161 typename T,
00162 template<class> class Node,
00163 template<class> class Cell,
00164 template<class,class> class Cont,
00165 class MinEdgeLength>
00166 int
00167 coarsen(SimpMeshRed<3,2,T,Node,Cell,Cont>* mesh, const MinEdgeLength& f,
00168 T minimumAllowedQuality, T qualityFactor,
00169 T maxDihedralAngleDeviation = -1,
00170 T maxSolidAngleDeviation = -1,
00171 T maxBoundaryAngleDeviation = -1,
00172 int maxSweeps = 0);
00173
00174
00175
00176
00177
00178
00180
00199 template<class QualityMetric,
00200 typename T,
00201 template<class> class Node,
00202 template<class> class Cell,
00203 template<class,class> class Cont,
00204 int SD,
00205 class MinEdgeLength>
00206 int
00207 coarsen(SimpMeshRed<3,3,T,Node,Cell,Cont>* mesh,
00208 const MinEdgeLength& f,
00209 T minimumAllowedQuality, T qualityFactor,
00210 PointsOnManifold<3,2,SD,T>* manifold,
00211 int maxSweeps = 0);
00212
00213
00215
00239 template<class QualityMetric,
00240 typename T,
00241 template<class> class Node,
00242 template<class> class Cell,
00243 template<class,class> class Cont,
00244 class MinEdgeLength>
00245 int
00246 coarsen(SimpMeshRed<3,3,T,Node,Cell,Cont>* mesh, const MinEdgeLength& f,
00247 T minimumAllowedQuality, T qualityFactor,
00248 T maxDihedralAngleDeviation = -1,
00249 T maxSolidAngleDeviation = -1,
00250 T maxBoundaryAngleDeviation = -1,
00251 int maxSweeps = 0);
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00265
00272 template<int N, int M, typename T,
00273 template<class> class Node,
00274 template<class> class Cell,
00275 template<class,class> class Cont,
00276 typename IntInIter>
00277 int
00278 coarsen(SimpMeshRed<N,M,T,Node,Cell,Cont>* mesh,
00279 IntInIter begin, IntInIter end);
00280
00281
00282
00283
00284
00285
00286 END_NAMESPACE_GEOM
00287
00288 #define __geom_mesh_simplicial_coarsenN_ipp__
00289 #include "coarsenN.ipp"
00290 #undef __geom_mesh_simplicial_coarsenN_ipp__
00291
00292 #define __geom_mesh_simplicial_coarsen2_ipp__
00293 #include "coarsen2.ipp"
00294 #undef __geom_mesh_simplicial_coarsen2_ipp__
00295
00296 #define __geom_mesh_simplicial_coarsen3_ipp__
00297 #include "coarsen3.ipp"
00298 #undef __geom_mesh_simplicial_coarsen3_ipp__
00299
00300 #define __geom_mesh_simplicial_coarsen_ipp__
00301 #include "coarsen.ipp"
00302 #undef __geom_mesh_simplicial_coarsen_ipp__
00303
00304 #endif