00001
00002
00008 #if !defined(__geom_mesh_iss_quality_h__)
00009 #define __geom_mesh_iss_quality_h__
00010
00011 #include "IndSimpSetIncAdj.h"
00012 #include "topology.h"
00013
00014 #include "../simplex/SimplexModMeanRatio.h"
00015 #include "../simplex/SimplexModCondNum.h"
00016
00017 BEGIN_NAMESPACE_GEOM
00018
00019
00024
00026
00030 template<int N, int M, bool A, typename T, typename V, typename IS>
00031 void
00032 countAdjacencies(const IndSimpSetIncAdj<N,M,A,T,V,IS>& iss,
00033 ads::FixedArray<M+2,int>* counts);
00034
00035
00036
00037
00038
00039
00041
00045 template<int M, typename SimpInIter, typename T>
00046 void
00047 computeEdgeLengthStatistics(SimpInIter simplicesBeginning,
00048 SimpInIter simplicesEnd,
00049 T* minimumLength,
00050 T* maximumLength);
00051
00052
00053
00055 template<int M, typename VertRAIter, typename ISInIter, typename T>
00056 void
00057 computeEdgeLengthStatistics(VertRAIter vertices,
00058 ISInIter indexedSimplicesBeginning,
00059 ISInIter indexedSimplicesEnd,
00060 T* minimumLength,
00061 T* maximumLength);
00062
00063
00064
00066 template<int N, bool A, typename T, typename V, typename IS>
00067 void
00068 computeEdgeLengthStatistics(const IndSimpSetIncAdj<N,2,A,T,V,IS>& mesh,
00069 T* minimumLength,
00070 T* maximumLength,
00071 T* meanLength);
00072
00073
00075 template<int M, typename T, typename SimpInIter>
00076 T
00077 computeMinimumEdgeLength(SimpInIter simplicesBeginning,
00078 SimpInIter simplicesEnd);
00079
00080
00081
00083
00084 template<int N, int M, bool A, typename T, typename V, typename IS>
00085 inline
00086 T
00087 computeMinimumEdgeLength(const IndSimpSet<N,M,A,T,V,IS>& mesh) {
00088 return computeMinimumEdgeLength<M,T>(mesh.getSimplicesBeginning(),
00089 mesh.getSimplicesEnd());
00090 }
00091
00092
00094 template<int M, typename T, typename SimpInIter>
00095 T
00096 computeMaximumEdgeLength(SimpInIter simplicesBeginning,
00097 SimpInIter simplicesEnd);
00098
00099
00101
00102 template<int N, int M, bool A, typename T, typename V, typename IS>
00103 inline
00104 T
00105 computeMaximumEdgeLength(const IndSimpSet<N,M,A,T,V,IS>& mesh) {
00106 return computeMaximumEdgeLength<M,T>(mesh.getSimplicesBeginning(),
00107 mesh.getSimplicesEnd());
00108 }
00109
00111
00112 template<int N, int M, bool A, typename T, typename V, typename IS>
00113 inline
00114 T
00115 computeMeanEdgeLength(const IndSimpSetIncAdj<N,M,A,T,V,IS>& mesh) {
00116 T minimumLength, maximumLength, meanLength;
00117 computeEdgeLengthStatistics(mesh, &minimumLength, &maximumLength,
00118 &meanLength);
00119 return meanLength;
00120 }
00121
00122
00124 template<int M, typename T, typename VertRAIter, typename ISInIter>
00125 T
00126 computeContent(VertRAIter vertices,
00127 ISInIter indexedSimplicesBeginning, ISInIter indexedSimplicesEnd);
00128
00130 template<int M, typename T, typename SimpInIter>
00131 T
00132 computeContent(SimpInIter simplicesBeginning, SimpInIter simplicesEnd);
00133
00135
00136 template<int N, int M, bool A, typename T, typename V, typename IS>
00137 T
00138 computeContent(const IndSimpSet<N,M,A,T,V,IS>& iss);
00139
00140
00142 template<int M, typename T, typename VertRAIter, typename ISInIter>
00143 void
00144 computeContentStatistics(VertRAIter vertices,
00145 ISInIter indexedSimplicesBeginning,
00146 ISInIter indexedSimplicesEnd,
00147 T* minimumContent,
00148 T* maximumContent,
00149 T* meanContent);
00150
00151
00153 template<int M, typename T, typename SimpInIter>
00154 void
00155 computeContentStatistics(SimpInIter simplicesBeginning,
00156 SimpInIter simplicesEnd,
00157 T* minimumContent,
00158 T* maximumContent,
00159 T* meanContent);
00160
00161
00163
00164 template<int N, int M, bool A, typename T, typename V, typename IS>
00165 void
00166 computeContentStatistics(const IndSimpSet<N,M,A,T,V,IS>& iss,
00167 T* minimumContent,
00168 T* maximumContent,
00169 T* meanContent);
00170
00171
00172
00174 template<int M, typename T, typename VertRAIter, typename ISInIter>
00175 void
00176 computeDeterminantStatistics(VertRAIter vertices,
00177 ISInIter indexedSimplicesBeginning,
00178 ISInIter indexedSimplicesEnd,
00179 T* minimumDeterminant,
00180 T* maximumDeterminant,
00181 T* meanDeterminant);
00182
00184 template<int M, typename T, typename SimpInIter>
00185 void
00186 computeDeterminantStatistics(SimpInIter simplicesBeginning,
00187 SimpInIter simplicesEnd,
00188 T* minimumDeterminant,
00189 T* maximumDeterminant,
00190 T* meanDeterminant);
00191
00193
00194 template<int N, int M, bool A, typename T, typename V, typename IS>
00195 void
00196 computeDeterminantStatistics(const IndSimpSet<N,M,A,T,V,IS>& iss,
00197 T* minimumDeterminant,
00198 T* maximumDeterminant,
00199 T* meanDeterminant);
00200
00201
00202
00203
00205 template<int M, typename T, typename VertRAIter, typename ISInIter>
00206 void
00207 computeModifiedMeanRatioStatistics(VertRAIter vertices,
00208 ISInIter indexedSimplicesBeginning,
00209 ISInIter indexedSimplicesEnd,
00210 T* minimumModMeanRatio,
00211 T* maximumModMeanRatio,
00212 T* meanModMeanRatio);
00213
00215 template<int M, typename T, typename SimpInIter>
00216 void
00217 computeModifiedMeanRatioStatistics(SimpInIter simplicesBeginning,
00218 SimpInIter simplicesEnd,
00219 T* minimumModMeanRatio,
00220 T* maximumModMeanRatio,
00221 T* meanModMeanRatio);
00222
00224
00225 template<int N, int M, bool A, typename T, typename V, typename IS>
00226 void
00227 computeModifiedMeanRatioStatistics(const IndSimpSet<N,M,A,T,V,IS>& iss,
00228 T* minimumModMeanRatio,
00229 T* maximumModMeanRatio,
00230 T* meanModMeanRatio);
00231
00232
00234 template<int M, typename T, typename VertRAIter, typename ISInIter>
00235 void
00236 computeModifiedConditionNumberStatistics(VertRAIter vertices,
00237 ISInIter indexedSimplicesBeginning,
00238 ISInIter indexedSimplicesEnd,
00239 T* minimumModCondNum,
00240 T* maximumModCondNum,
00241 T* meanModCondNum);
00242
00244 template<int M, typename T, typename SimpInIter>
00245 void
00246 computeModifiedConditionNumberStatistics(SimpInIter simplicesBeginning,
00247 SimpInIter simplicesEnd,
00248 T* minimumModCondNum,
00249 T* maximumModCondNum,
00250 T* meanModCondNum);
00251
00253
00254 template<int N, int M, bool A, typename T, typename V, typename IS>
00255 void
00256 computeModifiedConditionNumberStatistics(const IndSimpSet<N,M,A,T,V,IS>& iss,
00257 T* minimumModCondNum,
00258 T* maximumModCondNum,
00259 T* meanModCondNum);
00260
00261
00263 template<int M, typename T, typename VertRAIter, typename ISInIter>
00264 void
00265 computeQualityStatistics(VertRAIter vertices,
00266 ISInIter indexedSimplicesBeginning,
00267 ISInIter indexedSimplicesEnd,
00268 T* minimumContent,
00269 T* maximumContent,
00270 T* meanContent,
00271 T* minimumDeterminant,
00272 T* maximumDeterminant,
00273 T* meanDeterminant,
00274 T* minimumModMeanRatio,
00275 T* maximumModMeanRatio,
00276 T* meanModMeanRatio,
00277 T* minimumModCondNum,
00278 T* maximumModCondNum,
00279 T* meanModCondNum);
00280
00282 template<int M, typename T, typename SimpInIter>
00283 void
00284 computeQualityStatistics(SimpInIter simplicesBeginning,
00285 SimpInIter simplicesEnd,
00286 T* minimumContent,
00287 T* maximumContent,
00288 T* meanContent,
00289 T* minimumDeterminant,
00290 T* maximumDeterminant,
00291 T* meanDeterminant,
00292 T* minimumModMeanRatio,
00293 T* maximumModMeanRatio,
00294 T* meanModMeanRatio,
00295 T* minimumModCondNum,
00296 T* maximumModCondNum,
00297 T* meanModCondNum);
00298
00300
00301 template<int N, int M, bool A, typename T, typename V, typename IS>
00302 void
00303 computeQualityStatistics(const IndSimpSet<N,M,A,T,V,IS>& iss,
00304 T* minimumContent,
00305 T* maximumContent,
00306 T* meanContent,
00307 T* minimumDeterminant,
00308 T* maximumDeterminant,
00309 T* meanDeterminant,
00310 T* minimumModMeanRatio,
00311 T* maximumModMeanRatio,
00312 T* meanModMeanRatio,
00313 T* minimumModCondNum,
00314 T* maximumModCondNum,
00315 T* meanModCondNum);
00316
00317
00319 template<int N, int M, typename T, typename VertRAIter, typename ISInIter>
00320 void
00321 printQualityStatistics(std::ostream& out,
00322 VertRAIter verticesBeginning, VertRAIter verticesEnd,
00323 ISInIter indexedSimplicesBeginning,
00324 ISInIter indexedSimplicesEnd);
00325
00327 template<int N, int M, typename T, typename SimpInIter>
00328 void
00329 printQualityStatistics(std::ostream& out,
00330 SimpInIter simplicesBeginning, SimpInIter simplicesEnd);
00331
00333
00334 template<int N, int M, bool A, typename T, typename V, typename IS>
00335 void
00336 printQualityStatistics(std::ostream& out,
00337 const IndSimpSet<N,M,A,T,V,IS>& mesh);
00338
00340
00341 template<int N, int M, bool A, typename T, typename V, typename IS>
00342 void
00343 printInformation(std::ostream& out,
00344 const IndSimpSet<N,M,A,T,V,IS>& mesh);
00345
00347
00348 template<int N, int M, bool A, typename T, typename V, typename IS>
00349 void
00350 printInformation(std::ostream& out,
00351 const IndSimpSetIncAdj<N,M,A,T,V,IS>& mesh);
00352
00354
00355 END_NAMESPACE_GEOM
00356
00357 #define __geom_mesh_iss_quality_ipp__
00358 #include "quality.ipp"
00359 #undef __geom_mesh_iss_quality_ipp__
00360
00361 #endif