From ae0bef6e2275beeec3e8c89e8a21735d5d2bf382 Mon Sep 17 00:00:00 2001 From: wme7 Date: Wed, 5 Feb 2014 17:32:41 -0500 Subject: [PATCH] move nudg to my research repo --- cpp/nudg++/README | 20 - cpp/nudg++/trunk/BlasLapack/Makefile | 162 - cpp/nudg++/trunk/BlasLapack/dasum.f | 43 - cpp/nudg++/trunk/BlasLapack/daxpy.f | 48 - cpp/nudg++/trunk/BlasLapack/dbdsqr.f | 733 -- cpp/nudg++/trunk/BlasLapack/dcabs1.f | 8 - cpp/nudg++/trunk/BlasLapack/dcopy.f | 50 - cpp/nudg++/trunk/BlasLapack/ddot.f | 49 - cpp/nudg++/trunk/BlasLapack/dgebak.f | 189 - cpp/nudg++/trunk/BlasLapack/dgebal.f | 323 - cpp/nudg++/trunk/BlasLapack/dgebd2.f | 238 - cpp/nudg++/trunk/BlasLapack/dgebrd.f | 269 - cpp/nudg++/trunk/BlasLapack/dgecon.f | 181 - cpp/nudg++/trunk/BlasLapack/dgeev.f | 409 -- cpp/nudg++/trunk/BlasLapack/dgehd2.f | 150 - cpp/nudg++/trunk/BlasLapack/dgehrd.f | 255 - cpp/nudg++/trunk/BlasLapack/dgelq2.f | 122 - cpp/nudg++/trunk/BlasLapack/dgelqf.f | 196 - cpp/nudg++/trunk/BlasLapack/dgelss.f | 613 -- cpp/nudg++/trunk/BlasLapack/dgemm.f | 313 - cpp/nudg++/trunk/BlasLapack/dgemv.f | 261 - cpp/nudg++/trunk/BlasLapack/dgeqr2.f | 122 - cpp/nudg++/trunk/BlasLapack/dgeqrf.f | 197 - cpp/nudg++/trunk/BlasLapack/dger.f | 157 - cpp/nudg++/trunk/BlasLapack/dgesv.f | 108 - cpp/nudg++/trunk/BlasLapack/dgesvd.f | 3417 --------- cpp/nudg++/trunk/BlasLapack/dgetf2.f | 135 - cpp/nudg++/trunk/BlasLapack/dgetrf.f | 160 - cpp/nudg++/trunk/BlasLapack/dgetrs.f | 150 - cpp/nudg++/trunk/BlasLapack/dhseqr.f | 467 -- cpp/nudg++/trunk/BlasLapack/dlabad.f | 56 - cpp/nudg++/trunk/BlasLapack/dlabrd.f | 291 - cpp/nudg++/trunk/BlasLapack/dlacon.f | 204 - cpp/nudg++/trunk/BlasLapack/dlacpy.f | 88 - cpp/nudg++/trunk/BlasLapack/dladiv.f | 63 - cpp/nudg++/trunk/BlasLapack/dlae2.f | 124 - cpp/nudg++/trunk/BlasLapack/dlaev2.f | 170 - cpp/nudg++/trunk/BlasLapack/dlahqr.f | 435 -- cpp/nudg++/trunk/BlasLapack/dlahrd.f | 206 - cpp/nudg++/trunk/BlasLapack/dlaln2.f | 508 -- cpp/nudg++/trunk/BlasLapack/dlamch.f | 857 --- cpp/nudg++/trunk/BlasLapack/dlange.f | 145 - cpp/nudg++/trunk/BlasLapack/dlanhs.f | 142 - cpp/nudg++/trunk/BlasLapack/dlanst.f | 125 - cpp/nudg++/trunk/BlasLapack/dlansy.f | 174 - cpp/nudg++/trunk/BlasLapack/dlanv2.f | 206 - cpp/nudg++/trunk/BlasLapack/dlapy2.f | 54 - cpp/nudg++/trunk/BlasLapack/dlarf.f | 116 - cpp/nudg++/trunk/BlasLapack/dlarfb.f | 588 -- cpp/nudg++/trunk/BlasLapack/dlarfg.f | 138 - cpp/nudg++/trunk/BlasLapack/dlarft.f | 218 - cpp/nudg++/trunk/BlasLapack/dlarfx.f | 639 -- cpp/nudg++/trunk/BlasLapack/dlartg.f | 143 - cpp/nudg++/trunk/BlasLapack/dlas2.f | 122 - cpp/nudg++/trunk/BlasLapack/dlascl.f | 268 - cpp/nudg++/trunk/BlasLapack/dlaset.f | 115 - cpp/nudg++/trunk/BlasLapack/dlasq1.f | 149 - cpp/nudg++/trunk/BlasLapack/dlasq2.f | 436 -- cpp/nudg++/trunk/BlasLapack/dlasq3.f | 298 - cpp/nudg++/trunk/BlasLapack/dlasq4.f | 330 - cpp/nudg++/trunk/BlasLapack/dlasq5.f | 196 - cpp/nudg++/trunk/BlasLapack/dlasq6.f | 176 - cpp/nudg++/trunk/BlasLapack/dlasr.f | 325 - cpp/nudg++/trunk/BlasLapack/dlasrt.f | 244 - cpp/nudg++/trunk/BlasLapack/dlassq.f | 89 - cpp/nudg++/trunk/BlasLapack/dlasv2.f | 250 - cpp/nudg++/trunk/BlasLapack/dlaswp.f | 120 - cpp/nudg++/trunk/BlasLapack/dlatrd.f | 259 - cpp/nudg++/trunk/BlasLapack/dlatrs.f | 702 -- cpp/nudg++/trunk/BlasLapack/dnrm2.f | 60 - cpp/nudg++/trunk/BlasLapack/dorg2l.f | 128 - cpp/nudg++/trunk/BlasLapack/dorg2r.f | 130 - cpp/nudg++/trunk/BlasLapack/dorgbr.f | 245 - cpp/nudg++/trunk/BlasLapack/dorghr.f | 165 - cpp/nudg++/trunk/BlasLapack/dorgl2.f | 134 - cpp/nudg++/trunk/BlasLapack/dorglq.f | 216 - cpp/nudg++/trunk/BlasLapack/dorgql.f | 214 - cpp/nudg++/trunk/BlasLapack/dorgqr.f | 217 - cpp/nudg++/trunk/BlasLapack/dorgtr.f | 184 - cpp/nudg++/trunk/BlasLapack/dorm2r.f | 198 - cpp/nudg++/trunk/BlasLapack/dormbr.f | 282 - cpp/nudg++/trunk/BlasLapack/dorml2.f | 198 - cpp/nudg++/trunk/BlasLapack/dormlq.f | 268 - cpp/nudg++/trunk/BlasLapack/dormqr.f | 261 - cpp/nudg++/trunk/BlasLapack/dpbtf2.f | 195 - cpp/nudg++/trunk/BlasLapack/dpbtrf.f | 365 - cpp/nudg++/trunk/BlasLapack/dpbtrs.f | 146 - cpp/nudg++/trunk/BlasLapack/dposv.f | 122 - cpp/nudg++/trunk/BlasLapack/dpotf2.f | 168 - cpp/nudg++/trunk/BlasLapack/dpotrf.f | 184 - cpp/nudg++/trunk/BlasLapack/dpotrs.f | 133 - cpp/nudg++/trunk/BlasLapack/drot.f | 37 - cpp/nudg++/trunk/BlasLapack/drscl.f | 115 - cpp/nudg++/trunk/BlasLapack/dscal.f | 43 - cpp/nudg++/trunk/BlasLapack/dsteqr.f | 501 -- cpp/nudg++/trunk/BlasLapack/dsterf.f | 365 - cpp/nudg++/trunk/BlasLapack/dstev.f | 165 - cpp/nudg++/trunk/BlasLapack/dswap.f | 56 - cpp/nudg++/trunk/BlasLapack/dsyev.f | 213 - cpp/nudg++/trunk/BlasLapack/dsymv.f | 262 - cpp/nudg++/trunk/BlasLapack/dsyr.f | 197 - cpp/nudg++/trunk/BlasLapack/dsyr2.f | 230 - cpp/nudg++/trunk/BlasLapack/dsyr2k.f | 327 - cpp/nudg++/trunk/BlasLapack/dsyrfs.f | 335 - cpp/nudg++/trunk/BlasLapack/dsyrk.f | 294 - cpp/nudg++/trunk/BlasLapack/dsytd2.f | 249 - cpp/nudg++/trunk/BlasLapack/dsytrd.f | 295 - cpp/nudg++/trunk/BlasLapack/dtbsv.f | 346 - cpp/nudg++/trunk/BlasLapack/dtrevc.f | 1005 --- cpp/nudg++/trunk/BlasLapack/dtrmm.f | 355 - cpp/nudg++/trunk/BlasLapack/dtrmv.f | 286 - cpp/nudg++/trunk/BlasLapack/dtrsm.f | 378 - cpp/nudg++/trunk/BlasLapack/dtrsv.f | 289 - cpp/nudg++/trunk/BlasLapack/dzasum.f | 34 - cpp/nudg++/trunk/BlasLapack/dzsum1.f | 82 - cpp/nudg++/trunk/BlasLapack/idamax.f | 39 - cpp/nudg++/trunk/BlasLapack/ieeeck.f | 148 - cpp/nudg++/trunk/BlasLapack/ilaenv.f | 547 -- cpp/nudg++/trunk/BlasLapack/izamax.f | 41 - cpp/nudg++/trunk/BlasLapack/izmax1.f | 96 - cpp/nudg++/trunk/BlasLapack/lsame.f | 87 - cpp/nudg++/trunk/BlasLapack/xerbla.f | 43 - cpp/nudg++/trunk/BlasLapack/zaxpy.f | 34 - cpp/nudg++/trunk/BlasLapack/zcopy.f | 33 - cpp/nudg++/trunk/BlasLapack/zdotc.f | 36 - cpp/nudg++/trunk/BlasLapack/zdotu.f | 36 - cpp/nudg++/trunk/BlasLapack/zdrscl.f | 115 - cpp/nudg++/trunk/BlasLapack/zdscal.f | 30 - cpp/nudg++/trunk/BlasLapack/zgecon.f | 189 - cpp/nudg++/trunk/BlasLapack/zgemm.f | 415 -- cpp/nudg++/trunk/BlasLapack/zgeru.f | 157 - cpp/nudg++/trunk/BlasLapack/zgetf2.f | 136 - cpp/nudg++/trunk/BlasLapack/zgetrf.f | 160 - cpp/nudg++/trunk/BlasLapack/zlacon.f | 211 - cpp/nudg++/trunk/BlasLapack/zladiv.f | 47 - cpp/nudg++/trunk/BlasLapack/zlaswp.f | 120 - cpp/nudg++/trunk/BlasLapack/zlatrs.f | 880 --- cpp/nudg++/trunk/BlasLapack/zscal.f | 29 - cpp/nudg++/trunk/BlasLapack/zswap.f | 36 - cpp/nudg++/trunk/BlasLapack/ztrsm.f | 414 -- cpp/nudg++/trunk/BlasLapack/ztrsv.f | 324 - cpp/nudg++/trunk/Grid/3D/F072.neu | 186 - cpp/nudg++/trunk/Grid/3D/F986.neu | 1685 ----- cpp/nudg++/trunk/Grid/3D/Sphere_1074.neu | 1456 ---- cpp/nudg++/trunk/Grid/3D/cube.neu | 2704 ------- cpp/nudg++/trunk/Grid/3D/cubeK268.neu | 565 -- cpp/nudg++/trunk/Grid/3D/cubeK5.neu | 31 - cpp/nudg++/trunk/Grid/3D/cubeK6.neu | 31 - cpp/nudg++/trunk/Grid/3D/cubeK6a.neu | 31 - cpp/nudg++/trunk/Grid/3D/cubeK86.neu | 151 - cpp/nudg++/trunk/Grid/3D/sphere.neu | 86 - cpp/nudg++/trunk/Grid/CFD/Volker_374.neu | 748 -- cpp/nudg++/trunk/Grid/CFD/cylinderA00075b.neu | 506 -- cpp/nudg++/trunk/Grid/CFD/cylinderDA001.neu | 638 -- cpp/nudg++/trunk/Grid/CNS2D/otboxA01.neu | 59 - .../trunk/Grid/Euler2D/Couette_K082.neu | 203 - .../trunk/Grid/Euler2D/Couette_K242.neu | 507 -- .../trunk/Grid/Euler2D/Couette_K856.neu | 1585 ----- cpp/nudg++/trunk/Grid/Euler2D/Euler005.neu | 3893 ---------- cpp/nudg++/trunk/Grid/Euler2D/Euler01.neu | 1066 --- cpp/nudg++/trunk/Grid/Euler2D/Euler02.neu | 337 - cpp/nudg++/trunk/Grid/Euler2D/Scram_0977.neu | 1894 ----- cpp/nudg++/trunk/Grid/Euler2D/fstepA001.neu | 744 -- cpp/nudg++/trunk/Grid/Euler2D/vortexA04.neu | 479 -- .../trunk/Grid/Maxwell2D/Maxwell00625.neu | 3778 ---------- .../trunk/Grid/Maxwell2D/Maxwell0125.neu | 959 --- .../trunk/Grid/Maxwell2D/Maxwell025.neu | 268 - cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell05.neu | 100 - cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell1.neu | 35 - cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell2.neu | 24 - cpp/nudg++/trunk/Grid/Maxwell2D/bar2.neu | 1740 ----- cpp/nudg++/trunk/Grid/Other/circA01.neu | 113 - cpp/nudg++/trunk/Include/ARBCplane2D.h | 98 - cpp/nudg++/trunk/Include/ArrayGen.h | 521 -- cpp/nudg++/trunk/Include/ArrayMacros.h | 262 - cpp/nudg++/trunk/Include/BlasLapack.h | 147 - cpp/nudg++/trunk/Include/Blas_ACML.h | 271 - cpp/nudg++/trunk/Include/CHOLMOD_solver.h | 49 - cpp/nudg++/trunk/Include/CS_SpReg2D.h | 488 -- cpp/nudg++/trunk/Include/CS_Type.h | 2905 -------- cpp/nudg++/trunk/Include/CS_Utils.h | 129 - cpp/nudg++/trunk/Include/CS_dp.h | 1 - cpp/nudg++/trunk/Include/Constants.h | 785 --- cpp/nudg++/trunk/Include/Cub2D.h | 64 - cpp/nudg++/trunk/Include/Cub3D.h | 67 - cpp/nudg++/trunk/Include/CubatureData2D.h | 39 - cpp/nudg++/trunk/Include/CurvedCNS2D.h | 86 - cpp/nudg++/trunk/Include/CurvedEuler2D.h | 96 - cpp/nudg++/trunk/Include/CurvedINS2D.h | 188 - cpp/nudg++/trunk/Include/Euler2D.h | 147 - cpp/nudg++/trunk/Include/Euler3D.h | 103 - cpp/nudg++/trunk/Include/EulerShock2D.h | 69 - cpp/nudg++/trunk/Include/ExprC_headers.h | 37 - cpp/nudg++/trunk/Include/F77Array_Type.h | 549 -- cpp/nudg++/trunk/Include/FaceData3D.h | 45 - cpp/nudg++/trunk/Include/GMRES_solver.h | 62 - cpp/nudg++/trunk/Include/Global_funcs.h | 327 - cpp/nudg++/trunk/Include/Globals2D.h | 75 - cpp/nudg++/trunk/Include/Globals3D.h | 75 - cpp/nudg++/trunk/Include/IMap.h | 205 - cpp/nudg++/trunk/Include/Index.h | 64 - cpp/nudg++/trunk/Include/IndexSort_Type.h | 1018 --- cpp/nudg++/trunk/Include/LOG.h | 52 - cpp/nudg++/trunk/Include/LOG_funcs.h | 29 - cpp/nudg++/trunk/Include/MappedRegion1D.h | 330 - cpp/nudg++/trunk/Include/MappedRegion2D.h | 645 -- cpp/nudg++/trunk/Include/MatObj_Type.h | 269 - cpp/nudg++/trunk/Include/Mat_COL.h | 6275 ----------------- cpp/nudg++/trunk/Include/Mat_DIAG.h | 1598 ----- cpp/nudg++/trunk/Include/Maxwell2D.h | 54 - cpp/nudg++/trunk/Include/Maxwell3D.h | 61 - cpp/nudg++/trunk/Include/MaxwellCurved2D.h | 53 - cpp/nudg++/trunk/Include/MaxwellNonCon2D.h | 102 - cpp/nudg++/trunk/Include/NDG2D.h | 337 - cpp/nudg++/trunk/Include/NDG3D.h | 233 - cpp/nudg++/trunk/Include/NDGLib_headers.h | 46 - cpp/nudg++/trunk/Include/NDG_headers.h | 23 - cpp/nudg++/trunk/Include/NonConInfo2D.h | 89 - cpp/nudg++/trunk/Include/OpStructs2D.h | 85 - cpp/nudg++/trunk/Include/Poly3D.h | 50 - cpp/nudg++/trunk/Include/RAND.h | 46 - cpp/nudg++/trunk/Include/ROHOP3D.h | 109 - cpp/nudg++/trunk/Include/Region1D.h | 456 -- cpp/nudg++/trunk/Include/Region2D.h | 596 -- cpp/nudg++/trunk/Include/Registry_Type.h | 819 --- cpp/nudg++/trunk/Include/Stopwatch.h | 63 - cpp/nudg++/trunk/Include/Strings.h | 12 - cpp/nudg++/trunk/Include/TestPoissonIPDG3D.h | 43 - cpp/nudg++/trunk/Include/Tokenizer.h | 34 - cpp/nudg++/trunk/Include/VecM_Type.h | 362 - cpp/nudg++/trunk/Include/VecObj_Type.h | 311 - cpp/nudg++/trunk/Include/VecSort_Type.h | 737 -- cpp/nudg++/trunk/Include/Vec_Type.h | 4410 ------------ cpp/nudg++/trunk/Include/acml.h | 2409 ------- cpp/nudg++/trunk/Makefile | 461 -- cpp/nudg++/trunk/Src/Arrays/ArrayMacros.cpp | 17 - cpp/nudg++/trunk/Src/Arrays/Mat_COL.cpp | 874 --- cpp/nudg++/trunk/Src/Arrays/Sort_Index.cpp | 103 - cpp/nudg++/trunk/Src/Codes1D/GradJacobiP.cpp | 23 - cpp/nudg++/trunk/Src/Codes1D/JacobiGL.cpp | 25 - cpp/nudg++/trunk/Src/Codes1D/JacobiGQ.cpp | 85 - cpp/nudg++/trunk/Src/Codes1D/JacobiP.cpp | 53 - .../trunk/Src/Codes1D/Vandermonde1D.cpp | 22 - .../trunk/Src/Codes2D/BuildBCMaps2D.cpp | 33 - .../trunk/Src/Codes2D/BuildCurvedOPS2D.cpp | 124 - cpp/nudg++/trunk/Src/Codes2D/BuildMaps2D.cpp | 78 - .../trunk/Src/Codes2D/BuildPeriodicMaps2D.cpp | 120 - .../trunk/Src/Codes2D/ConformingHrefine2D.cpp | 381 - cpp/nudg++/trunk/Src/Codes2D/Connect2D.cpp | 99 - cpp/nudg++/trunk/Src/Codes2D/Cub2D.cpp | 58 - cpp/nudg++/trunk/Src/Codes2D/Cubature2D.cpp | 120 - .../trunk/Src/Codes2D/CubatureData2D.cpp | 1836 ----- .../Src/Codes2D/CubatureVolumeMesh2D.cpp | 51 - cpp/nudg++/trunk/Src/Codes2D/Curl2D.cpp | 55 - .../trunk/Src/Codes2D/CurvedDGDiv2D.cpp | 65 - .../trunk/Src/Codes2D/CurvedDGGrad2D.cpp | 66 - .../trunk/Src/Codes2D/CurvedDGJump2D.cpp | 55 - .../trunk/Src/Codes2D/CurvedPoissonIPDG2D.cpp | 174 - .../Src/Codes2D/CurvedPoissonIPDGbc2D.cpp | 115 - .../trunk/Src/Codes2D/CutOffFilter2D.cpp | 43 - cpp/nudg++/trunk/Src/Codes2D/Div2D.cpp | 17 - cpp/nudg++/trunk/Src/Codes2D/Dmatrices2D.cpp | 55 - cpp/nudg++/trunk/Src/Codes2D/Filter2D.cpp | 33 - .../trunk/Src/Codes2D/FindLocalCoords2D.cpp | 45 - .../trunk/Src/Codes2D/GaussFaceMesh2D.cpp | 95 - .../trunk/Src/Codes2D/GeometricFactors2D.cpp | 79 - cpp/nudg++/trunk/Src/Codes2D/Globals2D.cpp | 92 - cpp/nudg++/trunk/Src/Codes2D/Grad2D.cpp | 23 - .../trunk/Src/Codes2D/GradSimplex2DP.cpp | 51 - .../trunk/Src/Codes2D/GradVandermonde2D.cpp | 39 - cpp/nudg++/trunk/Src/Codes2D/Hrefine2D.cpp | 98 - .../trunk/Src/Codes2D/InterpMatrix2D.cpp | 39 - cpp/nudg++/trunk/Src/Codes2D/Lift2D.cpp | 42 - .../trunk/Src/Codes2D/MakeCylinder2D.cpp | 128 - .../trunk/Src/Codes2D/MakeCylinder2D.new.cpp | 120 - cpp/nudg++/trunk/Src/Codes2D/NDG2D.cpp | 269 - cpp/nudg++/trunk/Src/Codes2D/NDG2DDriver.cpp | 91 - cpp/nudg++/trunk/Src/Codes2D/NDG2D_Output.cpp | 860 --- cpp/nudg++/trunk/Src/Codes2D/Nodes2D.cpp | 65 - cpp/nudg++/trunk/Src/Codes2D/Normals2D.cpp | 43 - .../trunk/Src/Codes2D/PhysDmatrices2D.cpp | 38 - cpp/nudg++/trunk/Src/Codes2D/Sample2D.cpp | 124 - cpp/nudg++/trunk/Src/Codes2D/Simplex2DP.cpp | 21 - cpp/nudg++/trunk/Src/Codes2D/StartUp2D.cpp | 73 - .../trunk/Src/Codes2D/Vandermonde2D.cpp | 32 - cpp/nudg++/trunk/Src/Codes2D/Warpfactor.cpp | 44 - cpp/nudg++/trunk/Src/Codes2D/dtscale2D.cpp | 42 - cpp/nudg++/trunk/Src/Codes2D/rstoab.cpp | 30 - cpp/nudg++/trunk/Src/Codes2D/tiConnect2D.cpp | 76 - cpp/nudg++/trunk/Src/Codes2D/xytors.cpp | 28 - .../trunk/Src/Codes3D/BuildBCMaps3D.cpp | 33 - cpp/nudg++/trunk/Src/Codes3D/BuildMaps3D.cpp | 86 - cpp/nudg++/trunk/Src/Codes3D/Cub3D.cpp | 71 - cpp/nudg++/trunk/Src/Codes3D/Cubature3D.cpp | 61 - .../Src/Codes3D/CubatureVolumeMesh3D.cpp | 58 - cpp/nudg++/trunk/Src/Codes3D/Curl3D.cpp | 43 - .../trunk/Src/Codes3D/CutOffFilter3D.cpp | 33 - cpp/nudg++/trunk/Src/Codes3D/Div3D.cpp | 38 - cpp/nudg++/trunk/Src/Codes3D/Dmatrices3D.cpp | 61 - cpp/nudg++/trunk/Src/Codes3D/EquiNodes3D.cpp | 33 - cpp/nudg++/trunk/Src/Codes3D/FaceData3D.cpp | 65 - cpp/nudg++/trunk/Src/Codes3D/Filter3D.cpp | 70 - .../trunk/Src/Codes3D/FindLocalCoords3D.cpp | 71 - .../trunk/Src/Codes3D/GeometricFactors3D.cpp | 151 - cpp/nudg++/trunk/Src/Codes3D/Globals3D.cpp | 93 - cpp/nudg++/trunk/Src/Codes3D/Grad3D.cpp | 29 - .../trunk/Src/Codes3D/GradSimplex3DP.cpp | 59 - .../trunk/Src/Codes3D/GradVandermonde3D.cpp | 43 - cpp/nudg++/trunk/Src/Codes3D/Hrefine3D.cpp | 249 - .../trunk/Src/Codes3D/InterpMatrix3D.cpp | 39 - .../trunk/Src/Codes3D/InterpNodeShapes3D.cpp | 28 - .../trunk/Src/Codes3D/IntersectTest3D.cpp | 99 - cpp/nudg++/trunk/Src/Codes3D/Lift3D.cpp | 40 - .../trunk/Src/Codes3D/Make3DCouetteGeom.cpp | 193 - cpp/nudg++/trunk/Src/Codes3D/NDG3D.cpp | 236 - cpp/nudg++/trunk/Src/Codes3D/NDG3DDriver.cpp | 50 - cpp/nudg++/trunk/Src/Codes3D/NDG3D_Output.cpp | 540 -- cpp/nudg++/trunk/Src/Codes3D/Nodes3D.cpp | 103 - cpp/nudg++/trunk/Src/Codes3D/Normals3D.cpp | 53 - .../trunk/Src/Codes3D/PartialLiftData3D.cpp | 75 - .../trunk/Src/Codes3D/PhysDmatrices3D.cpp | 44 - .../trunk/Src/Codes3D/PoissonIPDG3D.cpp | 207 - .../trunk/Src/Codes3D/PoissonIPDGbc3D.cpp | 92 - cpp/nudg++/trunk/Src/Codes3D/Poly3D.cpp | 367 - cpp/nudg++/trunk/Src/Codes3D/Sample3D.cpp | 144 - cpp/nudg++/trunk/Src/Codes3D/Simplex3DP.cpp | 28 - cpp/nudg++/trunk/Src/Codes3D/StartUp3D.cpp | 68 - cpp/nudg++/trunk/Src/Codes3D/TopTheta.cpp | 65 - .../trunk/Src/Codes3D/Vandermonde3D.cpp | 33 - .../trunk/Src/Codes3D/WarpShiftFace3D.cpp | 30 - cpp/nudg++/trunk/Src/Codes3D/dtscale3D.cpp | 18 - cpp/nudg++/trunk/Src/Codes3D/evalshift.cpp | 46 - cpp/nudg++/trunk/Src/Codes3D/evalwarp.cpp | 39 - cpp/nudg++/trunk/Src/Codes3D/rsttoabc.cpp | 38 - cpp/nudg++/trunk/Src/Codes3D/tiConnect3D.cpp | 80 - cpp/nudg++/trunk/Src/Codes3D/xyztorst.cpp | 41 - .../Examples2D/CurvedCNS2D/BoxFlowBC2D.cpp | 34 - .../Examples2D/CurvedCNS2D/BoxFlowIC2D.cpp | 56 - .../Examples2D/CurvedCNS2D/ChannelBC2D.cpp | 45 - .../Examples2D/CurvedCNS2D/ChannelIC2D.cpp | 43 - .../Examples2D/CurvedCNS2D/CouetteBC2D.cpp | 110 - .../Examples2D/CurvedCNS2D/CouetteIC2D.cpp | 48 - .../Examples2D/CurvedCNS2D/CurvedCNS2D.cpp | 322 - .../CurvedCNS2D/CurvedCNS2D_Driver.cpp | 105 - .../CurvedCNS2D/CurvedCNS2D_RHS.cpp | 168 - .../CurvedCNS2D/CurvedCNS2D_Run.cpp | 74 - .../Src/Examples2D/CurvedCNS2D/CylBC2D.cpp | 82 - .../Src/Examples2D/CurvedCNS2D/CylIC2D.cpp | 54 - .../Examples2D/CurvedEuler2D/ChannelBC2D.cpp | 46 - .../Examples2D/CurvedEuler2D/ChannelIC2D.cpp | 30 - .../Examples2D/CurvedEuler2D/CouetteBC2D.cpp | 50 - .../Examples2D/CurvedEuler2D/CouetteIC2D.cpp | 49 - .../CurvedEuler2D/CurvedEuler2D.cpp | 293 - .../CurvedEuler2D/CurvedEuler2D_Driver.cpp | 87 - .../CurvedEuler2D/CurvedEuler2D_Fluxes.cpp | 75 - .../CurvedEuler2D/CurvedEuler2D_RHS.cpp | 97 - .../CurvedEuler2D/CurvedEuler2D_Run.cpp | 55 - .../CurvedEuler2D/CurvedEuler2D_main.cpp | 42 - .../Examples2D/CurvedEuler2D/EulerHLL2D.cpp | 85 - .../Examples2D/CurvedEuler2D/EulerLF2D.cpp | 53 - .../Examples2D/CurvedEuler2D/EulerRoe2D.cpp | 102 - .../CurvedEuler2D/IsentropicVortexBC2D.cpp | 43 - .../CurvedEuler2D/IsentropicVortexIC2D.cpp | 51 - .../Examples2D/CurvedINS2D/BackdropBC2D.cpp | 46 - .../Examples2D/CurvedINS2D/BackdropIC2D.cpp | 28 - .../Examples2D/CurvedINS2D/CurvedINS2D.cpp | 364 - .../CurvedINS2D/CurvedINS2D_Driver.cpp | 103 - .../CurvedINS2D/CurvedINS2D_Run.cpp | 112 - .../CurvedINS2D/CurvedINS2D_main.cpp | 42 - .../CurvedINS2D/CurvedINSPressureSetUp2D.cpp | 76 - .../CurvedINS2D/CurvedINSViscous2D.cpp | 35 - .../CurvedINS2D/CurvedINSViscousSetUp2D.cpp | 77 - .../Examples2D/CurvedINS2D/INSAdvection2D.cpp | 67 - .../Examples2D/CurvedINS2D/INSLiftDrag2D.cpp | 84 - .../Examples2D/CurvedINS2D/INSPressure2D.cpp | 63 - .../Examples2D/CurvedINS2D/INS_IC_BC_TODO.cpp | 47 - .../Examples2D/CurvedINS2D/INScouetteBC2D.cpp | 66 - .../Examples2D/CurvedINS2D/INScouetteIC2D.cpp | 42 - .../CurvedINS2D/INScylinderBC2D.cpp | 65 - .../CurvedINS2D/INScylinderIC2D.cpp | 28 - .../Examples2D/CurvedINS2D/KovasznayBC2D.cpp | 79 - .../Examples2D/CurvedINS2D/KovasznayIC2D.cpp | 30 - .../CurvedINS2D/PearsonVortexBC2D.cpp | 66 - .../CurvedINS2D/PearsonVortexIC2D.cpp | 27 - .../EulerShock2D/EulerLimiter2D.cpp | 225 - .../Examples2D/EulerShock2D/EulerShock2D.cpp | 334 - .../EulerShock2D/EulerShock2D_Driver.cpp | 94 - .../EulerShock2D/EulerShock2D_Run.cpp | 71 - .../EulerShock2D/EulerShock2D_Run_Iter.cpp | 152 - .../EulerShock2D/ForwardStepBC2D.cpp | 72 - .../EulerShock2D/ForwardStepIC2D.cpp | 40 - .../Src/Examples2D/EulerShock2D/InletBC2D.cpp | 72 - .../Src/Examples2D/EulerShock2D/InletIC2D.cpp | 40 - .../Src/Examples2D/Maxwell2D/Maxwell2D.cpp | 165 - .../Examples2D/Maxwell2D/Maxwell2D_Driver.cpp | 44 - .../Examples2D/Maxwell2D/Maxwell2D_RHS.cpp | 45 - .../Examples2D/Maxwell2D/Maxwell2D_Run.cpp | 52 - .../Examples2D/Maxwell2D/Maxwell2D_main.cpp | 42 - .../MaxwellCurved2D/MaxwellCurved2D.cpp | 145 - .../MaxwellCurved2D_Driver.cpp | 34 - .../MaxwellCurved2D/MaxwellCurved2D_RHS.cpp | 91 - .../MaxwellCurved2D/MaxwellCurved2D_main.cpp | 42 - .../MaxwellNonCon2D/BuildHNonCon2D.cpp | 150 - .../MaxwellNonCon2D/BuildPNonCon2D.cpp | 250 - .../MaxwellNonCon2D/MaxwellNonCon2D.cpp | 564 -- .../MaxwellNonCon2D_Driver.cpp | 55 - .../MaxwellNonCon2D/MaxwellNonCon2D_RHS.cpp | 211 - .../MaxwellNonCon2D/MaxwellNonCon2D_Run.cpp | 70 - .../MaxwellNonCon2D_Test_H.cpp | 38 - .../MaxwellNonCon2D_Test_P.cpp | 51 - .../Src/Examples3D/Euler3D/CouetteBC3D.cpp | 59 - .../Src/Examples3D/Euler3D/CouetteIC3D.cpp | 74 - .../trunk/Src/Examples3D/Euler3D/Euler3D.cpp | 269 - .../Src/Examples3D/Euler3D/Euler3D_Driver.cpp | 65 - .../Src/Examples3D/Euler3D/Euler3D_Fluxes.cpp | 97 - .../Src/Examples3D/Euler3D/Euler3D_RHS.cpp | 76 - .../Src/Examples3D/Euler3D/Euler3D_Run.cpp | 92 - .../Euler3D/IsentropicVortexBC3D.cpp | 53 - .../Euler3D/IsentropicVortexIC3D.cpp | 54 - .../Src/Examples3D/Maxwell3D/Maxwell3D.cpp | 197 - .../Examples3D/Maxwell3D/Maxwell3D_Driver.cpp | 45 - .../Examples3D/Maxwell3D/Maxwell3D_RHS.cpp | 60 - .../Examples3D/Maxwell3D/Maxwell3D_Run.cpp | 77 - .../TestPoissonIPDG3D/TestPoissonIPDG3D.cpp | 175 - cpp/nudg++/trunk/Src/NDG_main.cpp | 55 - .../Src/ServiceRoutines/Global_funcs.cpp | 443 -- cpp/nudg++/trunk/Src/ServiceRoutines/INIT.cpp | 213 - cpp/nudg++/trunk/Src/ServiceRoutines/LOG.cpp | 515 -- .../ServiceRoutines/MeshReaderGambit2D.cpp | 321 - .../ServiceRoutines/MeshReaderGambit3D.cpp | 321 - .../trunk/Src/ServiceRoutines/Tokenizer.cpp | 71 - .../trunk/Src/Sparse/CHOLMOD_solver.cpp | 216 - cpp/nudg++/trunk/Src/Sparse/CS_Cholinc.cpp | 428 -- cpp/nudg++/trunk/Src/Sparse/CS_Solve.cpp | 814 --- cpp/nudg++/trunk/Src/Sparse/CS_Utils.cpp | 2116 ------ cpp/nudg++/trunk/System/system.mk.gnu | 60 - cpp/nudg++/trunk/System/system.mk.osx | 59 - cpp/nudg++/trunk/VC8/NDG.sln | 29 - cpp/nudg++/trunk/VC8/NDG/NDG.vcproj | 236 - cpp/nudg++/trunk/VC8/NDG/NDG_headers.h | 23 - cpp/nudg++/trunk/VC8/NDG/NDG_pragma.cpp | 170 - cpp/nudg++/trunk/VC8/NDG/NDG_prepro.cpp | 5 - cpp/nudg++/trunk/VC8/NDGLib/NDGLib.vcproj | 1251 ---- cpp/nudg++/trunk/VC8/NDGLib/NDGLib_prepro.cpp | 5 - cpp/nudg++/trunk/license.csparse | 20 - cpp/nudg++/trunk/license.lgpl | 165 - cpp/nudg++/trunk/license.nudg++ | 20 - cpp/nudg++/trunk/system.mk | 59 - 448 files changed, 118775 deletions(-) delete mode 100644 cpp/nudg++/README delete mode 100644 cpp/nudg++/trunk/BlasLapack/Makefile delete mode 100644 cpp/nudg++/trunk/BlasLapack/dasum.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/daxpy.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dbdsqr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dcabs1.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dcopy.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/ddot.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgebak.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgebal.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgebd2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgebrd.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgecon.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgeev.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgehd2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgehrd.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgelq2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgelqf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgelss.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgemm.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgemv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgeqr2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgeqrf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dger.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgesv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgesvd.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgetf2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgetrf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dgetrs.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dhseqr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlabad.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlabrd.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlacon.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlacpy.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dladiv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlae2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlaev2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlahqr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlahrd.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlaln2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlamch.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlange.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlanhs.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlanst.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlansy.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlanv2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlapy2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlarf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlarfb.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlarfg.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlarft.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlarfx.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlartg.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlas2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlascl.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlaset.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasq1.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasq2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasq3.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasq4.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasq5.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasq6.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasrt.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlassq.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlasv2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlaswp.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlatrd.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dlatrs.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dnrm2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorg2l.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorg2r.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorgbr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorghr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorgl2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorglq.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorgql.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorgqr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorgtr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorm2r.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dormbr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dorml2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dormlq.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dormqr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dpbtf2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dpbtrf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dpbtrs.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dposv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dpotf2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dpotrf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dpotrs.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/drot.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/drscl.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dscal.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsteqr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsterf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dstev.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dswap.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsyev.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsymv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsyr.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsyr2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsyr2k.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsyrfs.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsyrk.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsytd2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dsytrd.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dtbsv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dtrevc.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dtrmm.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dtrmv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dtrsm.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dtrsv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dzasum.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/dzsum1.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/idamax.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/ieeeck.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/ilaenv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/izamax.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/izmax1.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/lsame.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/xerbla.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zaxpy.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zcopy.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zdotc.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zdotu.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zdrscl.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zdscal.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zgecon.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zgemm.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zgeru.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zgetf2.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zgetrf.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zlacon.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zladiv.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zlaswp.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zlatrs.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zscal.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/zswap.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/ztrsm.f delete mode 100644 cpp/nudg++/trunk/BlasLapack/ztrsv.f delete mode 100644 cpp/nudg++/trunk/Grid/3D/F072.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/F986.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/Sphere_1074.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/cube.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/cubeK268.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/cubeK5.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/cubeK6.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/cubeK6a.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/cubeK86.neu delete mode 100644 cpp/nudg++/trunk/Grid/3D/sphere.neu delete mode 100644 cpp/nudg++/trunk/Grid/CFD/Volker_374.neu delete mode 100644 cpp/nudg++/trunk/Grid/CFD/cylinderA00075b.neu delete mode 100644 cpp/nudg++/trunk/Grid/CFD/cylinderDA001.neu delete mode 100644 cpp/nudg++/trunk/Grid/CNS2D/otboxA01.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/Couette_K082.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/Couette_K242.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/Couette_K856.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/Euler005.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/Euler01.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/Euler02.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/Scram_0977.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/fstepA001.neu delete mode 100644 cpp/nudg++/trunk/Grid/Euler2D/vortexA04.neu delete mode 100644 cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell00625.neu delete mode 100644 cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell0125.neu delete mode 100644 cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell025.neu delete mode 100644 cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell05.neu delete mode 100644 cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell1.neu delete mode 100644 cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell2.neu delete mode 100644 cpp/nudg++/trunk/Grid/Maxwell2D/bar2.neu delete mode 100644 cpp/nudg++/trunk/Grid/Other/circA01.neu delete mode 100644 cpp/nudg++/trunk/Include/ARBCplane2D.h delete mode 100644 cpp/nudg++/trunk/Include/ArrayGen.h delete mode 100644 cpp/nudg++/trunk/Include/ArrayMacros.h delete mode 100644 cpp/nudg++/trunk/Include/BlasLapack.h delete mode 100644 cpp/nudg++/trunk/Include/Blas_ACML.h delete mode 100644 cpp/nudg++/trunk/Include/CHOLMOD_solver.h delete mode 100644 cpp/nudg++/trunk/Include/CS_SpReg2D.h delete mode 100644 cpp/nudg++/trunk/Include/CS_Type.h delete mode 100644 cpp/nudg++/trunk/Include/CS_Utils.h delete mode 100644 cpp/nudg++/trunk/Include/CS_dp.h delete mode 100644 cpp/nudg++/trunk/Include/Constants.h delete mode 100644 cpp/nudg++/trunk/Include/Cub2D.h delete mode 100644 cpp/nudg++/trunk/Include/Cub3D.h delete mode 100644 cpp/nudg++/trunk/Include/CubatureData2D.h delete mode 100644 cpp/nudg++/trunk/Include/CurvedCNS2D.h delete mode 100644 cpp/nudg++/trunk/Include/CurvedEuler2D.h delete mode 100644 cpp/nudg++/trunk/Include/CurvedINS2D.h delete mode 100644 cpp/nudg++/trunk/Include/Euler2D.h delete mode 100644 cpp/nudg++/trunk/Include/Euler3D.h delete mode 100644 cpp/nudg++/trunk/Include/EulerShock2D.h delete mode 100644 cpp/nudg++/trunk/Include/ExprC_headers.h delete mode 100644 cpp/nudg++/trunk/Include/F77Array_Type.h delete mode 100644 cpp/nudg++/trunk/Include/FaceData3D.h delete mode 100644 cpp/nudg++/trunk/Include/GMRES_solver.h delete mode 100644 cpp/nudg++/trunk/Include/Global_funcs.h delete mode 100644 cpp/nudg++/trunk/Include/Globals2D.h delete mode 100644 cpp/nudg++/trunk/Include/Globals3D.h delete mode 100644 cpp/nudg++/trunk/Include/IMap.h delete mode 100644 cpp/nudg++/trunk/Include/Index.h delete mode 100644 cpp/nudg++/trunk/Include/IndexSort_Type.h delete mode 100644 cpp/nudg++/trunk/Include/LOG.h delete mode 100644 cpp/nudg++/trunk/Include/LOG_funcs.h delete mode 100644 cpp/nudg++/trunk/Include/MappedRegion1D.h delete mode 100644 cpp/nudg++/trunk/Include/MappedRegion2D.h delete mode 100644 cpp/nudg++/trunk/Include/MatObj_Type.h delete mode 100644 cpp/nudg++/trunk/Include/Mat_COL.h delete mode 100644 cpp/nudg++/trunk/Include/Mat_DIAG.h delete mode 100644 cpp/nudg++/trunk/Include/Maxwell2D.h delete mode 100644 cpp/nudg++/trunk/Include/Maxwell3D.h delete mode 100644 cpp/nudg++/trunk/Include/MaxwellCurved2D.h delete mode 100644 cpp/nudg++/trunk/Include/MaxwellNonCon2D.h delete mode 100644 cpp/nudg++/trunk/Include/NDG2D.h delete mode 100644 cpp/nudg++/trunk/Include/NDG3D.h delete mode 100644 cpp/nudg++/trunk/Include/NDGLib_headers.h delete mode 100644 cpp/nudg++/trunk/Include/NDG_headers.h delete mode 100644 cpp/nudg++/trunk/Include/NonConInfo2D.h delete mode 100644 cpp/nudg++/trunk/Include/OpStructs2D.h delete mode 100644 cpp/nudg++/trunk/Include/Poly3D.h delete mode 100644 cpp/nudg++/trunk/Include/RAND.h delete mode 100644 cpp/nudg++/trunk/Include/ROHOP3D.h delete mode 100644 cpp/nudg++/trunk/Include/Region1D.h delete mode 100644 cpp/nudg++/trunk/Include/Region2D.h delete mode 100644 cpp/nudg++/trunk/Include/Registry_Type.h delete mode 100644 cpp/nudg++/trunk/Include/Stopwatch.h delete mode 100644 cpp/nudg++/trunk/Include/Strings.h delete mode 100644 cpp/nudg++/trunk/Include/TestPoissonIPDG3D.h delete mode 100644 cpp/nudg++/trunk/Include/Tokenizer.h delete mode 100644 cpp/nudg++/trunk/Include/VecM_Type.h delete mode 100644 cpp/nudg++/trunk/Include/VecObj_Type.h delete mode 100644 cpp/nudg++/trunk/Include/VecSort_Type.h delete mode 100644 cpp/nudg++/trunk/Include/Vec_Type.h delete mode 100644 cpp/nudg++/trunk/Include/acml.h delete mode 100644 cpp/nudg++/trunk/Makefile delete mode 100644 cpp/nudg++/trunk/Src/Arrays/ArrayMacros.cpp delete mode 100644 cpp/nudg++/trunk/Src/Arrays/Mat_COL.cpp delete mode 100644 cpp/nudg++/trunk/Src/Arrays/Sort_Index.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes1D/GradJacobiP.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes1D/JacobiGL.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes1D/JacobiGQ.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes1D/JacobiP.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes1D/Vandermonde1D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/BuildBCMaps2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/BuildCurvedOPS2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/BuildMaps2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/BuildPeriodicMaps2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/ConformingHrefine2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Connect2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Cub2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Cubature2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CubatureData2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CubatureVolumeMesh2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Curl2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CurvedDGDiv2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CurvedDGGrad2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CurvedDGJump2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDG2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDGbc2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/CutOffFilter2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Div2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Dmatrices2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Filter2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/FindLocalCoords2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/GaussFaceMesh2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/GeometricFactors2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Globals2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Grad2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/GradSimplex2DP.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/GradVandermonde2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Hrefine2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/InterpMatrix2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Lift2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.new.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/NDG2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/NDG2DDriver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/NDG2D_Output.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Nodes2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Normals2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/PhysDmatrices2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Sample2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Simplex2DP.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/StartUp2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Vandermonde2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/Warpfactor.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/dtscale2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/rstoab.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/tiConnect2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes2D/xytors.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/BuildBCMaps3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/BuildMaps3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Cub3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Cubature3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/CubatureVolumeMesh3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Curl3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/CutOffFilter3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Div3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Dmatrices3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/EquiNodes3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/FaceData3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Filter3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/FindLocalCoords3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/GeometricFactors3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Globals3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Grad3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/GradSimplex3DP.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/GradVandermonde3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Hrefine3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/InterpMatrix3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/InterpNodeShapes3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/IntersectTest3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Lift3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Make3DCouetteGeom.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/NDG3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/NDG3DDriver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/NDG3D_Output.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Nodes3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Normals3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/PartialLiftData3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/PhysDmatrices3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/PoissonIPDG3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/PoissonIPDGbc3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Poly3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Sample3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Simplex3DP.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/StartUp3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/TopTheta.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/Vandermonde3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/WarpShiftFace3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/dtscale3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/evalshift.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/evalwarp.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/rsttoabc.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/tiConnect3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Codes3D/xyztorst.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_RHS.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Fluxes.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_RHS.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_main.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerHLL2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerLF2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerRoe2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_main.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSPressureSetUp2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscous2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscousSetUp2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSAdvection2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSLiftDrag2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSPressure2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INS_IC_BC_TODO.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerLimiter2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run_Iter.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletBC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletIC2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_RHS.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_main.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_RHS.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_main.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildHNonCon2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildPNonCon2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_RHS.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_H.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_P.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteBC3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteIC3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Fluxes.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_RHS.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexBC3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexIC3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Driver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_RHS.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Run.cpp delete mode 100644 cpp/nudg++/trunk/Src/Examples3D/TestPoissonIPDG3D/TestPoissonIPDG3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/NDG_main.cpp delete mode 100644 cpp/nudg++/trunk/Src/ServiceRoutines/Global_funcs.cpp delete mode 100644 cpp/nudg++/trunk/Src/ServiceRoutines/INIT.cpp delete mode 100644 cpp/nudg++/trunk/Src/ServiceRoutines/LOG.cpp delete mode 100644 cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit2D.cpp delete mode 100644 cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit3D.cpp delete mode 100644 cpp/nudg++/trunk/Src/ServiceRoutines/Tokenizer.cpp delete mode 100644 cpp/nudg++/trunk/Src/Sparse/CHOLMOD_solver.cpp delete mode 100644 cpp/nudg++/trunk/Src/Sparse/CS_Cholinc.cpp delete mode 100644 cpp/nudg++/trunk/Src/Sparse/CS_Solve.cpp delete mode 100644 cpp/nudg++/trunk/Src/Sparse/CS_Utils.cpp delete mode 100644 cpp/nudg++/trunk/System/system.mk.gnu delete mode 100644 cpp/nudg++/trunk/System/system.mk.osx delete mode 100644 cpp/nudg++/trunk/VC8/NDG.sln delete mode 100644 cpp/nudg++/trunk/VC8/NDG/NDG.vcproj delete mode 100644 cpp/nudg++/trunk/VC8/NDG/NDG_headers.h delete mode 100644 cpp/nudg++/trunk/VC8/NDG/NDG_pragma.cpp delete mode 100644 cpp/nudg++/trunk/VC8/NDG/NDG_prepro.cpp delete mode 100644 cpp/nudg++/trunk/VC8/NDGLib/NDGLib.vcproj delete mode 100644 cpp/nudg++/trunk/VC8/NDGLib/NDGLib_prepro.cpp delete mode 100644 cpp/nudg++/trunk/license.csparse delete mode 100644 cpp/nudg++/trunk/license.lgpl delete mode 100644 cpp/nudg++/trunk/license.nudg++ delete mode 100644 cpp/nudg++/trunk/system.mk diff --git a/cpp/nudg++/README b/cpp/nudg++/README deleted file mode 100644 index 6c50992..0000000 --- a/cpp/nudg++/README +++ /dev/null @@ -1,20 +0,0 @@ - -All files are in the trunk directory and its sub-directories. - -You may well have to customize the system.mk file to reflect the -compilers and lapack/blas libraries available on your system. The -default system.mk file works ok using the gnu compilers under OS X. - -To build and run an example application: - -cd trunk -make Maxwell2D -./bin/Maxwell2D - -The defaults used for this simulation are described in: -trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Driver.cpp - -The main function is in: -trunk/Src/Examples2D/Maxwell2D/Maxwell2D_main.cpp - -For other examples see options in Makefile. \ No newline at end of file diff --git a/cpp/nudg++/trunk/BlasLapack/Makefile b/cpp/nudg++/trunk/BlasLapack/Makefile deleted file mode 100644 index 3337048..0000000 --- a/cpp/nudg++/trunk/BlasLapack/Makefile +++ /dev/null @@ -1,162 +0,0 @@ -include ../system.mk - -INCLUDES = -I. - -.SUFFIXES: .f - -OBJS = \ -dasum.o \ -daxpy.o \ -dbdsqr.o \ -dcabs1.o \ -dcopy.o \ -ddot.o \ -dgebak.o \ -dgebal.o \ -dgebd2.o \ -dgebrd.o \ -dgecon.o \ -dgeev.o \ -dgehd2.o \ -dgehrd.o \ -dgelq2.o \ -dgelqf.o \ -dgelss.o \ -dgemm.o \ -dgemv.o \ -dgeqr2.o \ -dgeqrf.o \ -dger.o \ -dgesv.o \ -dgesvd.o \ -dgetf2.o \ -dgetrf.o \ -dgetrs.o \ -dhseqr.o \ -dlabad.o \ -dlabrd.o \ -dlacon.o \ -dlacpy.o \ -dladiv.o \ -dlae2.o \ -dlaev2.o \ -dlahqr.o \ -dlahrd.o \ -dlaln2.o \ -dlamch.o \ -dlange.o \ -dlanhs.o \ -dlanst.o \ -dlansy.o \ -dlanv2.o \ -dlapy2.o \ -dlarf.o \ -dlarfb.o \ -dlarfg.o \ -dlarft.o \ -dlarfx.o \ -dlartg.o \ -dlas2.o \ -dlascl.o \ -dlaset.o \ -dlasq1.o \ -dlasq2.o \ -dlasq3.o \ -dlasq4.o \ -dlasq5.o \ -dlasq6.o \ -dlasr.o \ -dlasrt.o \ -dlassq.o \ -dlasv2.o \ -dlaswp.o \ -dlatrd.o \ -dlatrs.o \ -dnrm2.o \ -dorg2l.o \ -dorg2r.o \ -dorgbr.o \ -dorghr.o \ -dorgl2.o \ -dorglq.o \ -dorgql.o \ -dorgqr.o \ -dorgtr.o \ -dorm2r.o \ -dormbr.o \ -dorml2.o \ -dormlq.o \ -dormqr.o \ -dpbtf2.o \ -dpbtrf.o \ -dpbtrs.o \ -dposv.o \ -dpotf2.o \ -dpotrf.o \ -dpotrs.o \ -drot.o \ -drscl.o \ -dscal.o \ -dsteqr.o \ -dsterf.o \ -dstev.o \ -dswap.o \ -dsyev.o \ -dsymv.o \ -dsyr.o \ -dsyr2.o \ -dsyr2k.o \ -dsyrfs.o \ -dsyrk.o \ -dsytd2.o \ -dsytrd.o \ -dtbsv.o \ -dtrevc.o \ -dtrmm.o \ -dtrmv.o \ -dtrsm.o \ -dtrsv.o \ -dzasum.o \ -dzsum1.o \ -idamax.o \ -ieeeck.o \ -ilaenv.o \ -izamax.o \ -izmax1.o \ -lsame.o \ -xerbla.o \ -zaxpy.o \ -zcopy.o \ -zdotc.o \ -zdotu.o \ -zdrscl.o \ -zdscal.o \ -zgecon.o \ -zgemm.o \ -zgeru.o \ -zgetf2.o \ -zgetrf.o \ -zlacon.o \ -zladiv.o \ -zlaswp.o \ -zlatrs.o \ -zscal.o \ -zswap.o \ -ztrsm.o \ -ztrsv.o - -FCFLAGS = $(FCOPTIONS) $(OPTFLAGS) - -.f.o: - $(FC) $(FCFLAGS) -c $*.f - -libBlasLapack.a: $(OBJS) - $(AR) $@ $(OBJS) - $(RANLIB) $@ - $(CP) $@ ../../Libraries - -clean: - rm -f $(OBJS) - -realclean: clean - rm -rf libBlasLapack.a $(COMPILERTEMPFILES) ../../Libraries/libBlasLapack.a diff --git a/cpp/nudg++/trunk/BlasLapack/dasum.f b/cpp/nudg++/trunk/BlasLapack/dasum.f deleted file mode 100644 index 28b128a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dasum.f +++ /dev/null @@ -1,43 +0,0 @@ - double precision function dasum(n,dx,incx) -c -c takes the sum of the absolute values. -c jack dongarra, linpack, 3/11/78. -c modified 3/93 to return if incx .le. 0. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision dx(*),dtemp - integer i,incx,m,mp1,n,nincx -c - dasum = 0.0d0 - dtemp = 0.0d0 - if( n.le.0 .or. incx.le.0 )return - if(incx.eq.1)go to 20 -c -c code for increment not equal to 1 -c - nincx = n*incx - do 10 i = 1,nincx,incx - dtemp = dtemp + dabs(dx(i)) - 10 continue - dasum = dtemp - return -c -c code for increment equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n,6) - if( m .eq. 0 ) go to 40 - do 30 i = 1,m - dtemp = dtemp + dabs(dx(i)) - 30 continue - if( n .lt. 6 ) go to 60 - 40 mp1 = m + 1 - do 50 i = mp1,n,6 - dtemp = dtemp + dabs(dx(i)) + dabs(dx(i + 1)) + dabs(dx(i + 2)) - * + dabs(dx(i + 3)) + dabs(dx(i + 4)) + dabs(dx(i + 5)) - 50 continue - 60 dasum = dtemp - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/daxpy.f b/cpp/nudg++/trunk/BlasLapack/daxpy.f deleted file mode 100644 index 91daa3c..0000000 --- a/cpp/nudg++/trunk/BlasLapack/daxpy.f +++ /dev/null @@ -1,48 +0,0 @@ - subroutine daxpy(n,da,dx,incx,dy,incy) -c -c constant times a vector plus a vector. -c uses unrolled loops for increments equal to one. -c jack dongarra, linpack, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision dx(*),dy(*),da - integer i,incx,incy,ix,iy,m,mp1,n -c - if(n.le.0)return - if (da .eq. 0.0d0) return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - dy(iy) = dy(iy) + da*dx(ix) - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n,4) - if( m .eq. 0 ) go to 40 - do 30 i = 1,m - dy(i) = dy(i) + da*dx(i) - 30 continue - if( n .lt. 4 ) return - 40 mp1 = m + 1 - do 50 i = mp1,n,4 - dy(i) = dy(i) + da*dx(i) - dy(i + 1) = dy(i + 1) + da*dx(i + 1) - dy(i + 2) = dy(i + 2) + da*dx(i + 2) - dy(i + 3) = dy(i + 3) + da*dx(i + 3) - 50 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/dbdsqr.f b/cpp/nudg++/trunk/BlasLapack/dbdsqr.f deleted file mode 100644 index 678a244..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dbdsqr.f +++ /dev/null @@ -1,733 +0,0 @@ - SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, - $ LDU, C, LDC, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1999 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU -* .. -* .. Array Arguments .. - DOUBLE PRECISION C( LDC, * ), D( * ), E( * ), U( LDU, * ), - $ VT( LDVT, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DBDSQR computes the singular value decomposition (SVD) of a real -* N-by-N (upper or lower) bidiagonal matrix B: B = Q * S * P' (P' -* denotes the transpose of P), where S is a diagonal matrix with -* non-negative diagonal elements (the singular values of B), and Q -* and P are orthogonal matrices. -* -* The routine computes S, and optionally computes U * Q, P' * VT, -* or Q' * C, for given real input matrices U, VT, and C. -* -* See "Computing Small Singular Values of Bidiagonal Matrices With -* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan, -* LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11, -* no. 5, pp. 873-912, Sept 1990) and -* "Accurate singular values and differential qd algorithms," by -* B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics -* Department, University of California at Berkeley, July 1992 -* for a detailed description of the algorithm. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': B is upper bidiagonal; -* = 'L': B is lower bidiagonal. -* -* N (input) INTEGER -* The order of the matrix B. N >= 0. -* -* NCVT (input) INTEGER -* The number of columns of the matrix VT. NCVT >= 0. -* -* NRU (input) INTEGER -* The number of rows of the matrix U. NRU >= 0. -* -* NCC (input) INTEGER -* The number of columns of the matrix C. NCC >= 0. -* -* D (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the n diagonal elements of the bidiagonal matrix B. -* On exit, if INFO=0, the singular values of B in decreasing -* order. -* -* E (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the elements of E contain the -* offdiagonal elements of the bidiagonal matrix whose SVD -* is desired. On normal exit (INFO = 0), E is destroyed. -* If the algorithm does not converge (INFO > 0), D and E -* will contain the diagonal and superdiagonal elements of a -* bidiagonal matrix orthogonally equivalent to the one given -* as input. E(N) is used for workspace. -* -* VT (input/output) DOUBLE PRECISION array, dimension (LDVT, NCVT) -* On entry, an N-by-NCVT matrix VT. -* On exit, VT is overwritten by P' * VT. -* VT is not referenced if NCVT = 0. -* -* LDVT (input) INTEGER -* The leading dimension of the array VT. -* LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0. -* -* U (input/output) DOUBLE PRECISION array, dimension (LDU, N) -* On entry, an NRU-by-N matrix U. -* On exit, U is overwritten by U * Q. -* U is not referenced if NRU = 0. -* -* LDU (input) INTEGER -* The leading dimension of the array U. LDU >= max(1,NRU). -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC, NCC) -* On entry, an N-by-NCC matrix C. -* On exit, C is overwritten by Q' * C. -* C is not referenced if NCC = 0. -* -* LDC (input) INTEGER -* The leading dimension of the array C. -* LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0. -* -* WORK (workspace) DOUBLE PRECISION array, dimension (4*N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: If INFO = -i, the i-th argument had an illegal value -* > 0: the algorithm did not converge; D and E contain the -* elements of a bidiagonal matrix which is orthogonally -* similar to the input matrix B; if INFO = i, i -* elements of E have not converged to zero. -* -* Internal Parameters -* =================== -* -* TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8))) -* TOLMUL controls the convergence criterion of the QR loop. -* If it is positive, TOLMUL*EPS is the desired relative -* precision in the computed singular values. -* If it is negative, abs(TOLMUL*EPS*sigma_max) is the -* desired absolute accuracy in the computed singular -* values (corresponds to relative accuracy -* abs(TOLMUL*EPS) in the largest singular value. -* abs(TOLMUL) should be between 1 and 1/EPS, and preferably -* between 10 (for fast convergence) and .1/EPS -* (for there to be some accuracy in the results). -* Default is to lose at either one eighth or 2 of the -* available decimal digits in each computed singular value -* (whichever is smaller). -* -* MAXITR INTEGER, default = 6 -* MAXITR controls the maximum number of passes of the -* algorithm through its inner loop. The algorithms stops -* (and so fails to converge) if the number of passes -* through the inner loop exceeds MAXITR*N**2. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D0 ) - DOUBLE PRECISION NEGONE - PARAMETER ( NEGONE = -1.0D0 ) - DOUBLE PRECISION HNDRTH - PARAMETER ( HNDRTH = 0.01D0 ) - DOUBLE PRECISION TEN - PARAMETER ( TEN = 10.0D0 ) - DOUBLE PRECISION HNDRD - PARAMETER ( HNDRD = 100.0D0 ) - DOUBLE PRECISION MEIGTH - PARAMETER ( MEIGTH = -0.125D0 ) - INTEGER MAXITR - PARAMETER ( MAXITR = 6 ) -* .. -* .. Local Scalars .. - LOGICAL LOWER, ROTATE - INTEGER I, IDIR, ISUB, ITER, J, LL, LLL, M, MAXIT, NM1, - $ NM12, NM13, OLDLL, OLDM - DOUBLE PRECISION ABSE, ABSS, COSL, COSR, CS, EPS, F, G, H, MU, - $ OLDCS, OLDSN, R, SHIFT, SIGMN, SIGMX, SINL, - $ SINR, SLL, SMAX, SMIN, SMINL, SMINLO, SMINOA, - $ SN, THRESH, TOL, TOLMUL, UNFL -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DLAMCH - EXTERNAL LSAME, DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DLARTG, DLAS2, DLASQ1, DLASR, DLASV2, DROT, - $ DSCAL, DSWAP, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, DBLE, MAX, MIN, SIGN, SQRT -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - LOWER = LSAME( UPLO, 'L' ) - IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LOWER ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( NCVT.LT.0 ) THEN - INFO = -3 - ELSE IF( NRU.LT.0 ) THEN - INFO = -4 - ELSE IF( NCC.LT.0 ) THEN - INFO = -5 - ELSE IF( ( NCVT.EQ.0 .AND. LDVT.LT.1 ) .OR. - $ ( NCVT.GT.0 .AND. LDVT.LT.MAX( 1, N ) ) ) THEN - INFO = -9 - ELSE IF( LDU.LT.MAX( 1, NRU ) ) THEN - INFO = -11 - ELSE IF( ( NCC.EQ.0 .AND. LDC.LT.1 ) .OR. - $ ( NCC.GT.0 .AND. LDC.LT.MAX( 1, N ) ) ) THEN - INFO = -13 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DBDSQR', -INFO ) - RETURN - END IF - IF( N.EQ.0 ) - $ RETURN - IF( N.EQ.1 ) - $ GO TO 160 -* -* ROTATE is true if any singular vectors desired, false otherwise -* - ROTATE = ( NCVT.GT.0 ) .OR. ( NRU.GT.0 ) .OR. ( NCC.GT.0 ) -* -* If no singular vectors desired, use qd algorithm -* - IF( .NOT.ROTATE ) THEN - CALL DLASQ1( N, D, E, WORK, INFO ) - RETURN - END IF -* - NM1 = N - 1 - NM12 = NM1 + NM1 - NM13 = NM12 + NM1 - IDIR = 0 -* -* Get machine constants -* - EPS = DLAMCH( 'Epsilon' ) - UNFL = DLAMCH( 'Safe minimum' ) -* -* If matrix lower bidiagonal, rotate to be upper bidiagonal -* by applying Givens rotations on the left -* - IF( LOWER ) THEN - DO 10 I = 1, N - 1 - CALL DLARTG( D( I ), E( I ), CS, SN, R ) - D( I ) = R - E( I ) = SN*D( I+1 ) - D( I+1 ) = CS*D( I+1 ) - WORK( I ) = CS - WORK( NM1+I ) = SN - 10 CONTINUE -* -* Update singular vectors if desired -* - IF( NRU.GT.0 ) - $ CALL DLASR( 'R', 'V', 'F', NRU, N, WORK( 1 ), WORK( N ), U, - $ LDU ) - IF( NCC.GT.0 ) - $ CALL DLASR( 'L', 'V', 'F', N, NCC, WORK( 1 ), WORK( N ), C, - $ LDC ) - END IF -* -* Compute singular values to relative accuracy TOL -* (By setting TOL to be negative, algorithm will compute -* singular values to absolute accuracy ABS(TOL)*norm(input matrix)) -* - TOLMUL = MAX( TEN, MIN( HNDRD, EPS**MEIGTH ) ) - TOL = TOLMUL*EPS -* -* Compute approximate maximum, minimum singular values -* - SMAX = ZERO - DO 20 I = 1, N - SMAX = MAX( SMAX, ABS( D( I ) ) ) - 20 CONTINUE - DO 30 I = 1, N - 1 - SMAX = MAX( SMAX, ABS( E( I ) ) ) - 30 CONTINUE - SMINL = ZERO - IF( TOL.GE.ZERO ) THEN -* -* Relative accuracy desired -* - SMINOA = ABS( D( 1 ) ) - IF( SMINOA.EQ.ZERO ) - $ GO TO 50 - MU = SMINOA - DO 40 I = 2, N - MU = ABS( D( I ) )*( MU / ( MU+ABS( E( I-1 ) ) ) ) - SMINOA = MIN( SMINOA, MU ) - IF( SMINOA.EQ.ZERO ) - $ GO TO 50 - 40 CONTINUE - 50 CONTINUE - SMINOA = SMINOA / SQRT( DBLE( N ) ) - THRESH = MAX( TOL*SMINOA, MAXITR*N*N*UNFL ) - ELSE -* -* Absolute accuracy desired -* - THRESH = MAX( ABS( TOL )*SMAX, MAXITR*N*N*UNFL ) - END IF -* -* Prepare for main iteration loop for the singular values -* (MAXIT is the maximum number of passes through the inner -* loop permitted before nonconvergence signalled.) -* - MAXIT = MAXITR*N*N - ITER = 0 - OLDLL = -1 - OLDM = -1 -* -* M points to last element of unconverged part of matrix -* - M = N -* -* Begin main iteration loop -* - 60 CONTINUE -* -* Check for convergence or exceeding iteration count -* - IF( M.LE.1 ) - $ GO TO 160 - IF( ITER.GT.MAXIT ) - $ GO TO 200 -* -* Find diagonal block of matrix to work on -* - IF( TOL.LT.ZERO .AND. ABS( D( M ) ).LE.THRESH ) - $ D( M ) = ZERO - SMAX = ABS( D( M ) ) - SMIN = SMAX - DO 70 LLL = 1, M - 1 - LL = M - LLL - ABSS = ABS( D( LL ) ) - ABSE = ABS( E( LL ) ) - IF( TOL.LT.ZERO .AND. ABSS.LE.THRESH ) - $ D( LL ) = ZERO - IF( ABSE.LE.THRESH ) - $ GO TO 80 - SMIN = MIN( SMIN, ABSS ) - SMAX = MAX( SMAX, ABSS, ABSE ) - 70 CONTINUE - LL = 0 - GO TO 90 - 80 CONTINUE - E( LL ) = ZERO -* -* Matrix splits since E(LL) = 0 -* - IF( LL.EQ.M-1 ) THEN -* -* Convergence of bottom singular value, return to top of loop -* - M = M - 1 - GO TO 60 - END IF - 90 CONTINUE - LL = LL + 1 -* -* E(LL) through E(M-1) are nonzero, E(LL-1) is zero -* - IF( LL.EQ.M-1 ) THEN -* -* 2 by 2 block, handle separately -* - CALL DLASV2( D( M-1 ), E( M-1 ), D( M ), SIGMN, SIGMX, SINR, - $ COSR, SINL, COSL ) - D( M-1 ) = SIGMX - E( M-1 ) = ZERO - D( M ) = SIGMN -* -* Compute singular vectors, if desired -* - IF( NCVT.GT.0 ) - $ CALL DROT( NCVT, VT( M-1, 1 ), LDVT, VT( M, 1 ), LDVT, COSR, - $ SINR ) - IF( NRU.GT.0 ) - $ CALL DROT( NRU, U( 1, M-1 ), 1, U( 1, M ), 1, COSL, SINL ) - IF( NCC.GT.0 ) - $ CALL DROT( NCC, C( M-1, 1 ), LDC, C( M, 1 ), LDC, COSL, - $ SINL ) - M = M - 2 - GO TO 60 - END IF -* -* If working on new submatrix, choose shift direction -* (from larger end diagonal element towards smaller) -* - IF( LL.GT.OLDM .OR. M.LT.OLDLL ) THEN - IF( ABS( D( LL ) ).GE.ABS( D( M ) ) ) THEN -* -* Chase bulge from top (big end) to bottom (small end) -* - IDIR = 1 - ELSE -* -* Chase bulge from bottom (big end) to top (small end) -* - IDIR = 2 - END IF - END IF -* -* Apply convergence tests -* - IF( IDIR.EQ.1 ) THEN -* -* Run convergence test in forward direction -* First apply standard test to bottom of matrix -* - IF( ABS( E( M-1 ) ).LE.ABS( TOL )*ABS( D( M ) ) .OR. - $ ( TOL.LT.ZERO .AND. ABS( E( M-1 ) ).LE.THRESH ) ) THEN - E( M-1 ) = ZERO - GO TO 60 - END IF -* - IF( TOL.GE.ZERO ) THEN -* -* If relative accuracy desired, -* apply convergence criterion forward -* - MU = ABS( D( LL ) ) - SMINL = MU - DO 100 LLL = LL, M - 1 - IF( ABS( E( LLL ) ).LE.TOL*MU ) THEN - E( LLL ) = ZERO - GO TO 60 - END IF - SMINLO = SMINL - MU = ABS( D( LLL+1 ) )*( MU / ( MU+ABS( E( LLL ) ) ) ) - SMINL = MIN( SMINL, MU ) - 100 CONTINUE - END IF -* - ELSE -* -* Run convergence test in backward direction -* First apply standard test to top of matrix -* - IF( ABS( E( LL ) ).LE.ABS( TOL )*ABS( D( LL ) ) .OR. - $ ( TOL.LT.ZERO .AND. ABS( E( LL ) ).LE.THRESH ) ) THEN - E( LL ) = ZERO - GO TO 60 - END IF -* - IF( TOL.GE.ZERO ) THEN -* -* If relative accuracy desired, -* apply convergence criterion backward -* - MU = ABS( D( M ) ) - SMINL = MU - DO 110 LLL = M - 1, LL, -1 - IF( ABS( E( LLL ) ).LE.TOL*MU ) THEN - E( LLL ) = ZERO - GO TO 60 - END IF - SMINLO = SMINL - MU = ABS( D( LLL ) )*( MU / ( MU+ABS( E( LLL ) ) ) ) - SMINL = MIN( SMINL, MU ) - 110 CONTINUE - END IF - END IF - OLDLL = LL - OLDM = M -* -* Compute shift. First, test if shifting would ruin relative -* accuracy, and if so set the shift to zero. -* - IF( TOL.GE.ZERO .AND. N*TOL*( SMINL / SMAX ).LE. - $ MAX( EPS, HNDRTH*TOL ) ) THEN -* -* Use a zero shift to avoid loss of relative accuracy -* - SHIFT = ZERO - ELSE -* -* Compute the shift from 2-by-2 block at end of matrix -* - IF( IDIR.EQ.1 ) THEN - SLL = ABS( D( LL ) ) - CALL DLAS2( D( M-1 ), E( M-1 ), D( M ), SHIFT, R ) - ELSE - SLL = ABS( D( M ) ) - CALL DLAS2( D( LL ), E( LL ), D( LL+1 ), SHIFT, R ) - END IF -* -* Test if shift negligible, and if so set to zero -* - IF( SLL.GT.ZERO ) THEN - IF( ( SHIFT / SLL )**2.LT.EPS ) - $ SHIFT = ZERO - END IF - END IF -* -* Increment iteration count -* - ITER = ITER + M - LL -* -* If SHIFT = 0, do simplified QR iteration -* - IF( SHIFT.EQ.ZERO ) THEN - IF( IDIR.EQ.1 ) THEN -* -* Chase bulge from top to bottom -* Save cosines and sines for later singular vector updates -* - CS = ONE - OLDCS = ONE - DO 120 I = LL, M - 1 - CALL DLARTG( D( I )*CS, E( I ), CS, SN, R ) - IF( I.GT.LL ) - $ E( I-1 ) = OLDSN*R - CALL DLARTG( OLDCS*R, D( I+1 )*SN, OLDCS, OLDSN, D( I ) ) - WORK( I-LL+1 ) = CS - WORK( I-LL+1+NM1 ) = SN - WORK( I-LL+1+NM12 ) = OLDCS - WORK( I-LL+1+NM13 ) = OLDSN - 120 CONTINUE - H = D( M )*CS - D( M ) = H*OLDCS - E( M-1 ) = H*OLDSN -* -* Update singular vectors -* - IF( NCVT.GT.0 ) - $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCVT, WORK( 1 ), - $ WORK( N ), VT( LL, 1 ), LDVT ) - IF( NRU.GT.0 ) - $ CALL DLASR( 'R', 'V', 'F', NRU, M-LL+1, WORK( NM12+1 ), - $ WORK( NM13+1 ), U( 1, LL ), LDU ) - IF( NCC.GT.0 ) - $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCC, WORK( NM12+1 ), - $ WORK( NM13+1 ), C( LL, 1 ), LDC ) -* -* Test convergence -* - IF( ABS( E( M-1 ) ).LE.THRESH ) - $ E( M-1 ) = ZERO -* - ELSE -* -* Chase bulge from bottom to top -* Save cosines and sines for later singular vector updates -* - CS = ONE - OLDCS = ONE - DO 130 I = M, LL + 1, -1 - CALL DLARTG( D( I )*CS, E( I-1 ), CS, SN, R ) - IF( I.LT.M ) - $ E( I ) = OLDSN*R - CALL DLARTG( OLDCS*R, D( I-1 )*SN, OLDCS, OLDSN, D( I ) ) - WORK( I-LL ) = CS - WORK( I-LL+NM1 ) = -SN - WORK( I-LL+NM12 ) = OLDCS - WORK( I-LL+NM13 ) = -OLDSN - 130 CONTINUE - H = D( LL )*CS - D( LL ) = H*OLDCS - E( LL ) = H*OLDSN -* -* Update singular vectors -* - IF( NCVT.GT.0 ) - $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCVT, WORK( NM12+1 ), - $ WORK( NM13+1 ), VT( LL, 1 ), LDVT ) - IF( NRU.GT.0 ) - $ CALL DLASR( 'R', 'V', 'B', NRU, M-LL+1, WORK( 1 ), - $ WORK( N ), U( 1, LL ), LDU ) - IF( NCC.GT.0 ) - $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCC, WORK( 1 ), - $ WORK( N ), C( LL, 1 ), LDC ) -* -* Test convergence -* - IF( ABS( E( LL ) ).LE.THRESH ) - $ E( LL ) = ZERO - END IF - ELSE -* -* Use nonzero shift -* - IF( IDIR.EQ.1 ) THEN -* -* Chase bulge from top to bottom -* Save cosines and sines for later singular vector updates -* - F = ( ABS( D( LL ) )-SHIFT )* - $ ( SIGN( ONE, D( LL ) )+SHIFT / D( LL ) ) - G = E( LL ) - DO 140 I = LL, M - 1 - CALL DLARTG( F, G, COSR, SINR, R ) - IF( I.GT.LL ) - $ E( I-1 ) = R - F = COSR*D( I ) + SINR*E( I ) - E( I ) = COSR*E( I ) - SINR*D( I ) - G = SINR*D( I+1 ) - D( I+1 ) = COSR*D( I+1 ) - CALL DLARTG( F, G, COSL, SINL, R ) - D( I ) = R - F = COSL*E( I ) + SINL*D( I+1 ) - D( I+1 ) = COSL*D( I+1 ) - SINL*E( I ) - IF( I.LT.M-1 ) THEN - G = SINL*E( I+1 ) - E( I+1 ) = COSL*E( I+1 ) - END IF - WORK( I-LL+1 ) = COSR - WORK( I-LL+1+NM1 ) = SINR - WORK( I-LL+1+NM12 ) = COSL - WORK( I-LL+1+NM13 ) = SINL - 140 CONTINUE - E( M-1 ) = F -* -* Update singular vectors -* - IF( NCVT.GT.0 ) - $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCVT, WORK( 1 ), - $ WORK( N ), VT( LL, 1 ), LDVT ) - IF( NRU.GT.0 ) - $ CALL DLASR( 'R', 'V', 'F', NRU, M-LL+1, WORK( NM12+1 ), - $ WORK( NM13+1 ), U( 1, LL ), LDU ) - IF( NCC.GT.0 ) - $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCC, WORK( NM12+1 ), - $ WORK( NM13+1 ), C( LL, 1 ), LDC ) -* -* Test convergence -* - IF( ABS( E( M-1 ) ).LE.THRESH ) - $ E( M-1 ) = ZERO -* - ELSE -* -* Chase bulge from bottom to top -* Save cosines and sines for later singular vector updates -* - F = ( ABS( D( M ) )-SHIFT )*( SIGN( ONE, D( M ) )+SHIFT / - $ D( M ) ) - G = E( M-1 ) - DO 150 I = M, LL + 1, -1 - CALL DLARTG( F, G, COSR, SINR, R ) - IF( I.LT.M ) - $ E( I ) = R - F = COSR*D( I ) + SINR*E( I-1 ) - E( I-1 ) = COSR*E( I-1 ) - SINR*D( I ) - G = SINR*D( I-1 ) - D( I-1 ) = COSR*D( I-1 ) - CALL DLARTG( F, G, COSL, SINL, R ) - D( I ) = R - F = COSL*E( I-1 ) + SINL*D( I-1 ) - D( I-1 ) = COSL*D( I-1 ) - SINL*E( I-1 ) - IF( I.GT.LL+1 ) THEN - G = SINL*E( I-2 ) - E( I-2 ) = COSL*E( I-2 ) - END IF - WORK( I-LL ) = COSR - WORK( I-LL+NM1 ) = -SINR - WORK( I-LL+NM12 ) = COSL - WORK( I-LL+NM13 ) = -SINL - 150 CONTINUE - E( LL ) = F -* -* Test convergence -* - IF( ABS( E( LL ) ).LE.THRESH ) - $ E( LL ) = ZERO -* -* Update singular vectors if desired -* - IF( NCVT.GT.0 ) - $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCVT, WORK( NM12+1 ), - $ WORK( NM13+1 ), VT( LL, 1 ), LDVT ) - IF( NRU.GT.0 ) - $ CALL DLASR( 'R', 'V', 'B', NRU, M-LL+1, WORK( 1 ), - $ WORK( N ), U( 1, LL ), LDU ) - IF( NCC.GT.0 ) - $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCC, WORK( 1 ), - $ WORK( N ), C( LL, 1 ), LDC ) - END IF - END IF -* -* QR iteration finished, go back and check convergence -* - GO TO 60 -* -* All singular values converged, so make them positive -* - 160 CONTINUE - DO 170 I = 1, N - IF( D( I ).LT.ZERO ) THEN - D( I ) = -D( I ) -* -* Change sign of singular vectors, if desired -* - IF( NCVT.GT.0 ) - $ CALL DSCAL( NCVT, NEGONE, VT( I, 1 ), LDVT ) - END IF - 170 CONTINUE -* -* Sort the singular values into decreasing order (insertion sort on -* singular values, but only one transposition per singular vector) -* - DO 190 I = 1, N - 1 -* -* Scan for smallest D(I) -* - ISUB = 1 - SMIN = D( 1 ) - DO 180 J = 2, N + 1 - I - IF( D( J ).LE.SMIN ) THEN - ISUB = J - SMIN = D( J ) - END IF - 180 CONTINUE - IF( ISUB.NE.N+1-I ) THEN -* -* Swap singular values and vectors -* - D( ISUB ) = D( N+1-I ) - D( N+1-I ) = SMIN - IF( NCVT.GT.0 ) - $ CALL DSWAP( NCVT, VT( ISUB, 1 ), LDVT, VT( N+1-I, 1 ), - $ LDVT ) - IF( NRU.GT.0 ) - $ CALL DSWAP( NRU, U( 1, ISUB ), 1, U( 1, N+1-I ), 1 ) - IF( NCC.GT.0 ) - $ CALL DSWAP( NCC, C( ISUB, 1 ), LDC, C( N+1-I, 1 ), LDC ) - END IF - 190 CONTINUE - GO TO 220 -* -* Maximum number of iterations exceeded, failure to converge -* - 200 CONTINUE - INFO = 0 - DO 210 I = 1, N - 1 - IF( E( I ).NE.ZERO ) - $ INFO = INFO + 1 - 210 CONTINUE - 220 CONTINUE - RETURN -* -* End of DBDSQR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dcabs1.f b/cpp/nudg++/trunk/BlasLapack/dcabs1.f deleted file mode 100644 index 385ea5e..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dcabs1.f +++ /dev/null @@ -1,8 +0,0 @@ - double precision function dcabs1(z) - double complex z,zz - double precision t(2) - equivalence (zz,t(1)) - zz = z - dcabs1 = dabs(t(1)) + dabs(t(2)) - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/dcopy.f b/cpp/nudg++/trunk/BlasLapack/dcopy.f deleted file mode 100644 index e168927..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dcopy.f +++ /dev/null @@ -1,50 +0,0 @@ - subroutine dcopy(n,dx,incx,dy,incy) -c -c copies a vector, x, to a vector, y. -c uses unrolled loops for increments equal to one. -c jack dongarra, linpack, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision dx(*),dy(*) - integer i,incx,incy,ix,iy,m,mp1,n -c - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - dy(iy) = dx(ix) - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n,7) - if( m .eq. 0 ) go to 40 - do 30 i = 1,m - dy(i) = dx(i) - 30 continue - if( n .lt. 7 ) return - 40 mp1 = m + 1 - do 50 i = mp1,n,7 - dy(i) = dx(i) - dy(i + 1) = dx(i + 1) - dy(i + 2) = dx(i + 2) - dy(i + 3) = dx(i + 3) - dy(i + 4) = dx(i + 4) - dy(i + 5) = dx(i + 5) - dy(i + 6) = dx(i + 6) - 50 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/ddot.f b/cpp/nudg++/trunk/BlasLapack/ddot.f deleted file mode 100644 index e04c7c2..0000000 --- a/cpp/nudg++/trunk/BlasLapack/ddot.f +++ /dev/null @@ -1,49 +0,0 @@ - double precision function ddot(n,dx,incx,dy,incy) -c -c forms the dot product of two vectors. -c uses unrolled loops for increments equal to one. -c jack dongarra, linpack, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision dx(*),dy(*),dtemp - integer i,incx,incy,ix,iy,m,mp1,n -c - ddot = 0.0d0 - dtemp = 0.0d0 - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - dtemp = dtemp + dx(ix)*dy(iy) - ix = ix + incx - iy = iy + incy - 10 continue - ddot = dtemp - return -c -c code for both increments equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n,5) - if( m .eq. 0 ) go to 40 - do 30 i = 1,m - dtemp = dtemp + dx(i)*dy(i) - 30 continue - if( n .lt. 5 ) go to 60 - 40 mp1 = m + 1 - do 50 i = mp1,n,5 - dtemp = dtemp + dx(i)*dy(i) + dx(i + 1)*dy(i + 1) + - * dx(i + 2)*dy(i + 2) + dx(i + 3)*dy(i + 3) + dx(i + 4)*dy(i + 4) - 50 continue - 60 ddot = dtemp - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/dgebak.f b/cpp/nudg++/trunk/BlasLapack/dgebak.f deleted file mode 100644 index 7604639..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgebak.f +++ /dev/null @@ -1,189 +0,0 @@ - SUBROUTINE DGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV, - $ INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - CHARACTER JOB, SIDE - INTEGER IHI, ILO, INFO, LDV, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION SCALE( * ), V( LDV, * ) -* .. -* -* Purpose -* ======= -* -* DGEBAK forms the right or left eigenvectors of a real general matrix -* by backward transformation on the computed eigenvectors of the -* balanced matrix output by DGEBAL. -* -* Arguments -* ========= -* -* JOB (input) CHARACTER*1 -* Specifies the type of backward transformation required: -* = 'N', do nothing, return immediately; -* = 'P', do backward transformation for permutation only; -* = 'S', do backward transformation for scaling only; -* = 'B', do backward transformations for both permutation and -* scaling. -* JOB must be the same as the argument JOB supplied to DGEBAL. -* -* SIDE (input) CHARACTER*1 -* = 'R': V contains right eigenvectors; -* = 'L': V contains left eigenvectors. -* -* N (input) INTEGER -* The number of rows of the matrix V. N >= 0. -* -* ILO (input) INTEGER -* IHI (input) INTEGER -* The integers ILO and IHI determined by DGEBAL. -* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. -* -* SCALE (input) DOUBLE PRECISION array, dimension (N) -* Details of the permutation and scaling factors, as returned -* by DGEBAL. -* -* M (input) INTEGER -* The number of columns of the matrix V. M >= 0. -* -* V (input/output) DOUBLE PRECISION array, dimension (LDV,M) -* On entry, the matrix of right or left eigenvectors to be -* transformed, as returned by DHSEIN or DTREVC. -* On exit, V is overwritten by the transformed eigenvectors. -* -* LDV (input) INTEGER -* The leading dimension of the array V. LDV >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LEFTV, RIGHTV - INTEGER I, II, K - DOUBLE PRECISION S -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DSCAL, DSWAP, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Decode and Test the input parameters -* - RIGHTV = LSAME( SIDE, 'R' ) - LEFTV = LSAME( SIDE, 'L' ) -* - INFO = 0 - IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. - $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN - INFO = -1 - ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN - INFO = -2 - ELSE IF( N.LT.0 ) THEN - INFO = -3 - ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN - INFO = -4 - ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN - INFO = -5 - ELSE IF( M.LT.0 ) THEN - INFO = -7 - ELSE IF( LDV.LT.MAX( 1, N ) ) THEN - INFO = -9 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGEBAK', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN - IF( M.EQ.0 ) - $ RETURN - IF( LSAME( JOB, 'N' ) ) - $ RETURN -* - IF( ILO.EQ.IHI ) - $ GO TO 30 -* -* Backward balance -* - IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN -* - IF( RIGHTV ) THEN - DO 10 I = ILO, IHI - S = SCALE( I ) - CALL DSCAL( M, S, V( I, 1 ), LDV ) - 10 CONTINUE - END IF -* - IF( LEFTV ) THEN - DO 20 I = ILO, IHI - S = ONE / SCALE( I ) - CALL DSCAL( M, S, V( I, 1 ), LDV ) - 20 CONTINUE - END IF -* - END IF -* -* Backward permutation -* -* For I = ILO-1 step -1 until 1, -* IHI+1 step 1 until N do -- -* - 30 CONTINUE - IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN - IF( RIGHTV ) THEN - DO 40 II = 1, N - I = II - IF( I.GE.ILO .AND. I.LE.IHI ) - $ GO TO 40 - IF( I.LT.ILO ) - $ I = ILO - II - K = SCALE( I ) - IF( K.EQ.I ) - $ GO TO 40 - CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) - 40 CONTINUE - END IF -* - IF( LEFTV ) THEN - DO 50 II = 1, N - I = II - IF( I.GE.ILO .AND. I.LE.IHI ) - $ GO TO 50 - IF( I.LT.ILO ) - $ I = ILO - II - K = SCALE( I ) - IF( K.EQ.I ) - $ GO TO 50 - CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) - 50 CONTINUE - END IF - END IF -* - RETURN -* -* End of DGEBAK -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgebal.f b/cpp/nudg++/trunk/BlasLapack/dgebal.f deleted file mode 100644 index 63e0d1d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgebal.f +++ /dev/null @@ -1,323 +0,0 @@ - SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER JOB - INTEGER IHI, ILO, INFO, LDA, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), SCALE( * ) -* .. -* -* Purpose -* ======= -* -* DGEBAL balances a general real matrix A. This involves, first, -* permuting A by a similarity transformation to isolate eigenvalues -* in the first 1 to ILO-1 and last IHI+1 to N elements on the -* diagonal; and second, applying a diagonal similarity transformation -* to rows and columns ILO to IHI to make the rows and columns as -* close in norm as possible. Both steps are optional. -* -* Balancing may reduce the 1-norm of the matrix, and improve the -* accuracy of the computed eigenvalues and/or eigenvectors. -* -* Arguments -* ========= -* -* JOB (input) CHARACTER*1 -* Specifies the operations to be performed on A: -* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0 -* for i = 1,...,N; -* = 'P': permute only; -* = 'S': scale only; -* = 'B': both permute and scale. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the input matrix A. -* On exit, A is overwritten by the balanced matrix. -* If JOB = 'N', A is not referenced. -* See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* ILO (output) INTEGER -* IHI (output) INTEGER -* ILO and IHI are set to integers such that on exit -* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N. -* If JOB = 'N' or 'S', ILO = 1 and IHI = N. -* -* SCALE (output) DOUBLE PRECISION array, dimension (N) -* Details of the permutations and scaling factors applied to -* A. If P(j) is the index of the row and column interchanged -* with row and column j and D(j) is the scaling factor -* applied to row and column j, then -* SCALE(j) = P(j) for j = 1,...,ILO-1 -* = D(j) for j = ILO,...,IHI -* = P(j) for j = IHI+1,...,N. -* The order in which the interchanges are made is N to IHI+1, -* then 1 to ILO-1. -* -* INFO (output) INTEGER -* = 0: successful exit. -* < 0: if INFO = -i, the i-th argument had an illegal value. -* -* Further Details -* =============== -* -* The permutations consist of row and column interchanges which put -* the matrix in the form -* -* ( T1 X Y ) -* P A P = ( 0 B Z ) -* ( 0 0 T2 ) -* -* where T1 and T2 are upper triangular matrices whose eigenvalues lie -* along the diagonal. The column indices ILO and IHI mark the starting -* and ending columns of the submatrix B. Balancing consists of applying -* a diagonal similarity transformation inv(D) * B * D to make the -* 1-norms of each row of B and its corresponding column nearly equal. -* The output matrix is -* -* ( T1 X*D Y ) -* ( 0 inv(D)*B*D inv(D)*Z ). -* ( 0 0 T2 ) -* -* Information about the permutations P and the diagonal matrix D is -* returned in the vector SCALE. -* -* This subroutine is based on the EISPACK routine BALANC. -* -* Modified by Tzu-Yi Chen, Computer Science Division, University of -* California at Berkeley, USA -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) - DOUBLE PRECISION SCLFAC - PARAMETER ( SCLFAC = 0.8D+1 ) - DOUBLE PRECISION FACTOR - PARAMETER ( FACTOR = 0.95D+0 ) -* .. -* .. Local Scalars .. - LOGICAL NOCONV - INTEGER I, ICA, IEXC, IRA, J, K, L, M - DOUBLE PRECISION C, CA, F, G, R, RA, S, SFMAX1, SFMAX2, SFMIN1, - $ SFMIN2 -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IDAMAX - DOUBLE PRECISION DLAMCH - EXTERNAL LSAME, IDAMAX, DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DSCAL, DSWAP, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. - $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGEBAL', -INFO ) - RETURN - END IF -* - K = 1 - L = N -* - IF( N.EQ.0 ) - $ GO TO 210 -* - IF( LSAME( JOB, 'N' ) ) THEN - DO 10 I = 1, N - SCALE( I ) = ONE - 10 CONTINUE - GO TO 210 - END IF -* - IF( LSAME( JOB, 'S' ) ) - $ GO TO 120 -* -* Permutation to isolate eigenvalues if possible -* - GO TO 50 -* -* Row and column exchange. -* - 20 CONTINUE - SCALE( M ) = J - IF( J.EQ.M ) - $ GO TO 30 -* - CALL DSWAP( L, A( 1, J ), 1, A( 1, M ), 1 ) - CALL DSWAP( N-K+1, A( J, K ), LDA, A( M, K ), LDA ) -* - 30 CONTINUE - GO TO ( 40, 80 )IEXC -* -* Search for rows isolating an eigenvalue and push them down. -* - 40 CONTINUE - IF( L.EQ.1 ) - $ GO TO 210 - L = L - 1 -* - 50 CONTINUE - DO 70 J = L, 1, -1 -* - DO 60 I = 1, L - IF( I.EQ.J ) - $ GO TO 60 - IF( A( J, I ).NE.ZERO ) - $ GO TO 70 - 60 CONTINUE -* - M = L - IEXC = 1 - GO TO 20 - 70 CONTINUE -* - GO TO 90 -* -* Search for columns isolating an eigenvalue and push them left. -* - 80 CONTINUE - K = K + 1 -* - 90 CONTINUE - DO 110 J = K, L -* - DO 100 I = K, L - IF( I.EQ.J ) - $ GO TO 100 - IF( A( I, J ).NE.ZERO ) - $ GO TO 110 - 100 CONTINUE -* - M = K - IEXC = 2 - GO TO 20 - 110 CONTINUE -* - 120 CONTINUE - DO 130 I = K, L - SCALE( I ) = ONE - 130 CONTINUE -* - IF( LSAME( JOB, 'P' ) ) - $ GO TO 210 -* -* Balance the submatrix in rows K to L. -* -* Iterative loop for norm reduction -* - SFMIN1 = DLAMCH( 'S' ) / DLAMCH( 'P' ) - SFMAX1 = ONE / SFMIN1 - SFMIN2 = SFMIN1*SCLFAC - SFMAX2 = ONE / SFMIN2 - 140 CONTINUE - NOCONV = .FALSE. -* - DO 200 I = K, L - C = ZERO - R = ZERO -* - DO 150 J = K, L - IF( J.EQ.I ) - $ GO TO 150 - C = C + ABS( A( J, I ) ) - R = R + ABS( A( I, J ) ) - 150 CONTINUE - ICA = IDAMAX( L, A( 1, I ), 1 ) - CA = ABS( A( ICA, I ) ) - IRA = IDAMAX( N-K+1, A( I, K ), LDA ) - RA = ABS( A( I, IRA+K-1 ) ) -* -* Guard against zero C or R due to underflow. -* - IF( C.EQ.ZERO .OR. R.EQ.ZERO ) - $ GO TO 200 - G = R / SCLFAC - F = ONE - S = C + R - 160 CONTINUE - IF( C.GE.G .OR. MAX( F, C, CA ).GE.SFMAX2 .OR. - $ MIN( R, G, RA ).LE.SFMIN2 )GO TO 170 - F = F*SCLFAC - C = C*SCLFAC - CA = CA*SCLFAC - R = R / SCLFAC - G = G / SCLFAC - RA = RA / SCLFAC - GO TO 160 -* - 170 CONTINUE - G = C / SCLFAC - 180 CONTINUE - IF( G.LT.R .OR. MAX( R, RA ).GE.SFMAX2 .OR. - $ MIN( F, C, G, CA ).LE.SFMIN2 )GO TO 190 - F = F / SCLFAC - C = C / SCLFAC - G = G / SCLFAC - CA = CA / SCLFAC - R = R*SCLFAC - RA = RA*SCLFAC - GO TO 180 -* -* Now balance. -* - 190 CONTINUE - IF( ( C+R ).GE.FACTOR*S ) - $ GO TO 200 - IF( F.LT.ONE .AND. SCALE( I ).LT.ONE ) THEN - IF( F*SCALE( I ).LE.SFMIN1 ) - $ GO TO 200 - END IF - IF( F.GT.ONE .AND. SCALE( I ).GT.ONE ) THEN - IF( SCALE( I ).GE.SFMAX1 / F ) - $ GO TO 200 - END IF - G = ONE / F - SCALE( I ) = SCALE( I )*F - NOCONV = .TRUE. -* - CALL DSCAL( N-K+1, G, A( I, K ), LDA ) - CALL DSCAL( L, F, A( 1, I ), 1 ) -* - 200 CONTINUE -* - IF( NOCONV ) - $ GO TO 140 -* - 210 CONTINUE - ILO = K - IHI = L -* - RETURN -* -* End of DGEBAL -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgebd2.f b/cpp/nudg++/trunk/BlasLapack/dgebd2.f deleted file mode 100644 index d4ed81f..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgebd2.f +++ /dev/null @@ -1,238 +0,0 @@ - SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ), - $ TAUQ( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGEBD2 reduces a real general m by n matrix A to upper or lower -* bidiagonal form B by an orthogonal transformation: Q' * A * P = B. -* -* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows in the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns in the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the m by n general matrix to be reduced. -* On exit, -* if m >= n, the diagonal and the first superdiagonal are -* overwritten with the upper bidiagonal matrix B; the -* elements below the diagonal, with the array TAUQ, represent -* the orthogonal matrix Q as a product of elementary -* reflectors, and the elements above the first superdiagonal, -* with the array TAUP, represent the orthogonal matrix P as -* a product of elementary reflectors; -* if m < n, the diagonal and the first subdiagonal are -* overwritten with the lower bidiagonal matrix B; the -* elements below the first subdiagonal, with the array TAUQ, -* represent the orthogonal matrix Q as a product of -* elementary reflectors, and the elements above the diagonal, -* with the array TAUP, represent the orthogonal matrix P as -* a product of elementary reflectors. -* See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* D (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The diagonal elements of the bidiagonal matrix B: -* D(i) = A(i,i). -* -* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1) -* The off-diagonal elements of the bidiagonal matrix B: -* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1; -* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1. -* -* TAUQ (output) DOUBLE PRECISION array dimension (min(M,N)) -* The scalar factors of the elementary reflectors which -* represent the orthogonal matrix Q. See Further Details. -* -* TAUP (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The scalar factors of the elementary reflectors which -* represent the orthogonal matrix P. See Further Details. -* -* WORK (workspace) DOUBLE PRECISION array, dimension (max(M,N)) -* -* INFO (output) INTEGER -* = 0: successful exit. -* < 0: if INFO = -i, the i-th argument had an illegal value. -* -* Further Details -* =============== -* -* The matrices Q and P are represented as products of elementary -* reflectors: -* -* If m >= n, -* -* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1) -* -* Each H(i) and G(i) has the form: -* -* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' -* -* where tauq and taup are real scalars, and v and u are real vectors; -* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i); -* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n); -* tauq is stored in TAUQ(i) and taup in TAUP(i). -* -* If m < n, -* -* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m) -* -* Each H(i) and G(i) has the form: -* -* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' -* -* where tauq and taup are real scalars, and v and u are real vectors; -* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i); -* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n); -* tauq is stored in TAUQ(i) and taup in TAUP(i). -* -* The contents of A on exit are illustrated by the following examples: -* -* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): -* -* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 ) -* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 ) -* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 ) -* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 ) -* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 ) -* ( v1 v2 v3 v4 v5 ) -* -* where d and e denote diagonal and off-diagonal elements of B, vi -* denotes an element of the vector defining H(i), and ui an element of -* the vector defining G(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I -* .. -* .. External Subroutines .. - EXTERNAL DLARF, DLARFG, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - END IF - IF( INFO.LT.0 ) THEN - CALL XERBLA( 'DGEBD2', -INFO ) - RETURN - END IF -* - IF( M.GE.N ) THEN -* -* Reduce to upper bidiagonal form -* - DO 10 I = 1, N -* -* Generate elementary reflector H(i) to annihilate A(i+1:m,i) -* - CALL DLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1, - $ TAUQ( I ) ) - D( I ) = A( I, I ) - A( I, I ) = ONE -* -* Apply H(i) to A(i:m,i+1:n) from the left -* - CALL DLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAUQ( I ), - $ A( I, I+1 ), LDA, WORK ) - A( I, I ) = D( I ) -* - IF( I.LT.N ) THEN -* -* Generate elementary reflector G(i) to annihilate -* A(i,i+2:n) -* - CALL DLARFG( N-I, A( I, I+1 ), A( I, MIN( I+2, N ) ), - $ LDA, TAUP( I ) ) - E( I ) = A( I, I+1 ) - A( I, I+1 ) = ONE -* -* Apply G(i) to A(i+1:m,i+1:n) from the right -* - CALL DLARF( 'Right', M-I, N-I, A( I, I+1 ), LDA, - $ TAUP( I ), A( I+1, I+1 ), LDA, WORK ) - A( I, I+1 ) = E( I ) - ELSE - TAUP( I ) = ZERO - END IF - 10 CONTINUE - ELSE -* -* Reduce to lower bidiagonal form -* - DO 20 I = 1, M -* -* Generate elementary reflector G(i) to annihilate A(i,i+1:n) -* - CALL DLARFG( N-I+1, A( I, I ), A( I, MIN( I+1, N ) ), LDA, - $ TAUP( I ) ) - D( I ) = A( I, I ) - A( I, I ) = ONE -* -* Apply G(i) to A(i+1:m,i:n) from the right -* - CALL DLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, TAUP( I ), - $ A( MIN( I+1, M ), I ), LDA, WORK ) - A( I, I ) = D( I ) -* - IF( I.LT.M ) THEN -* -* Generate elementary reflector H(i) to annihilate -* A(i+2:m,i) -* - CALL DLARFG( M-I, A( I+1, I ), A( MIN( I+2, M ), I ), 1, - $ TAUQ( I ) ) - E( I ) = A( I+1, I ) - A( I+1, I ) = ONE -* -* Apply H(i) to A(i+1:m,i+1:n) from the left -* - CALL DLARF( 'Left', M-I, N-I, A( I+1, I ), 1, TAUQ( I ), - $ A( I+1, I+1 ), LDA, WORK ) - A( I+1, I ) = E( I ) - ELSE - TAUQ( I ) = ZERO - END IF - 20 CONTINUE - END IF - RETURN -* -* End of DGEBD2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgebrd.f b/cpp/nudg++/trunk/BlasLapack/dgebrd.f deleted file mode 100644 index 75184b8..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgebrd.f +++ /dev/null @@ -1,269 +0,0 @@ - SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, - $ INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ), - $ TAUQ( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGEBRD reduces a general real M-by-N matrix A to upper or lower -* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B. -* -* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows in the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns in the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the M-by-N general matrix to be reduced. -* On exit, -* if m >= n, the diagonal and the first superdiagonal are -* overwritten with the upper bidiagonal matrix B; the -* elements below the diagonal, with the array TAUQ, represent -* the orthogonal matrix Q as a product of elementary -* reflectors, and the elements above the first superdiagonal, -* with the array TAUP, represent the orthogonal matrix P as -* a product of elementary reflectors; -* if m < n, the diagonal and the first subdiagonal are -* overwritten with the lower bidiagonal matrix B; the -* elements below the first subdiagonal, with the array TAUQ, -* represent the orthogonal matrix Q as a product of -* elementary reflectors, and the elements above the diagonal, -* with the array TAUP, represent the orthogonal matrix P as -* a product of elementary reflectors. -* See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* D (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The diagonal elements of the bidiagonal matrix B: -* D(i) = A(i,i). -* -* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1) -* The off-diagonal elements of the bidiagonal matrix B: -* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1; -* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1. -* -* TAUQ (output) DOUBLE PRECISION array dimension (min(M,N)) -* The scalar factors of the elementary reflectors which -* represent the orthogonal matrix Q. See Further Details. -* -* TAUP (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The scalar factors of the elementary reflectors which -* represent the orthogonal matrix P. See Further Details. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The length of the array WORK. LWORK >= max(1,M,N). -* For optimum performance LWORK >= (M+N)*NB, where NB -* is the optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value. -* -* Further Details -* =============== -* -* The matrices Q and P are represented as products of elementary -* reflectors: -* -* If m >= n, -* -* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1) -* -* Each H(i) and G(i) has the form: -* -* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' -* -* where tauq and taup are real scalars, and v and u are real vectors; -* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i); -* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n); -* tauq is stored in TAUQ(i) and taup in TAUP(i). -* -* If m < n, -* -* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m) -* -* Each H(i) and G(i) has the form: -* -* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' -* -* where tauq and taup are real scalars, and v and u are real vectors; -* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i); -* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n); -* tauq is stored in TAUQ(i) and taup in TAUP(i). -* -* The contents of A on exit are illustrated by the following examples: -* -* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): -* -* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 ) -* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 ) -* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 ) -* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 ) -* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 ) -* ( v1 v2 v3 v4 v5 ) -* -* where d and e denote diagonal and off-diagonal elements of B, vi -* denotes an element of the vector defining H(i), and ui an element of -* the vector defining G(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB, - $ NBMIN, NX - DOUBLE PRECISION WS -* .. -* .. External Subroutines .. - EXTERNAL DGEBD2, DGEMM, DLABRD, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC DBLE, MAX, MIN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - NB = MAX( 1, ILAENV( 1, 'DGEBRD', ' ', M, N, -1, -1 ) ) - LWKOPT = ( M+N )*NB - WORK( 1 ) = DBLE( LWKOPT ) - LQUERY = ( LWORK.EQ.-1 ) - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - ELSE IF( LWORK.LT.MAX( 1, M, N ) .AND. .NOT.LQUERY ) THEN - INFO = -10 - END IF - IF( INFO.LT.0 ) THEN - CALL XERBLA( 'DGEBRD', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - MINMN = MIN( M, N ) - IF( MINMN.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - WS = MAX( M, N ) - LDWRKX = M - LDWRKY = N -* - IF( NB.GT.1 .AND. NB.LT.MINMN ) THEN -* -* Set the crossover point NX. -* - NX = MAX( NB, ILAENV( 3, 'DGEBRD', ' ', M, N, -1, -1 ) ) -* -* Determine when to switch from blocked to unblocked code. -* - IF( NX.LT.MINMN ) THEN - WS = ( M+N )*NB - IF( LWORK.LT.WS ) THEN -* -* Not enough work space for the optimal NB, consider using -* a smaller block size. -* - NBMIN = ILAENV( 2, 'DGEBRD', ' ', M, N, -1, -1 ) - IF( LWORK.GE.( M+N )*NBMIN ) THEN - NB = LWORK / ( M+N ) - ELSE - NB = 1 - NX = MINMN - END IF - END IF - END IF - ELSE - NX = MINMN - END IF -* - DO 30 I = 1, MINMN - NX, NB -* -* Reduce rows and columns i:i+nb-1 to bidiagonal form and return -* the matrices X and Y which are needed to update the unreduced -* part of the matrix -* - CALL DLABRD( M-I+1, N-I+1, NB, A( I, I ), LDA, D( I ), E( I ), - $ TAUQ( I ), TAUP( I ), WORK, LDWRKX, - $ WORK( LDWRKX*NB+1 ), LDWRKY ) -* -* Update the trailing submatrix A(i+nb:m,i+nb:n), using an update -* of the form A := A - V*Y' - X*U' -* - CALL DGEMM( 'No transpose', 'Transpose', M-I-NB+1, N-I-NB+1, - $ NB, -ONE, A( I+NB, I ), LDA, - $ WORK( LDWRKX*NB+NB+1 ), LDWRKY, ONE, - $ A( I+NB, I+NB ), LDA ) - CALL DGEMM( 'No transpose', 'No transpose', M-I-NB+1, N-I-NB+1, - $ NB, -ONE, WORK( NB+1 ), LDWRKX, A( I, I+NB ), LDA, - $ ONE, A( I+NB, I+NB ), LDA ) -* -* Copy diagonal and off-diagonal elements of B back into A -* - IF( M.GE.N ) THEN - DO 10 J = I, I + NB - 1 - A( J, J ) = D( J ) - A( J, J+1 ) = E( J ) - 10 CONTINUE - ELSE - DO 20 J = I, I + NB - 1 - A( J, J ) = D( J ) - A( J+1, J ) = E( J ) - 20 CONTINUE - END IF - 30 CONTINUE -* -* Use unblocked code to reduce the remainder of the matrix -* - CALL DGEBD2( M-I+1, N-I+1, A( I, I ), LDA, D( I ), E( I ), - $ TAUQ( I ), TAUP( I ), WORK, IINFO ) - WORK( 1 ) = WS - RETURN -* -* End of DGEBRD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgecon.f b/cpp/nudg++/trunk/BlasLapack/dgecon.f deleted file mode 100644 index f6bd485..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgecon.f +++ /dev/null @@ -1,181 +0,0 @@ - SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK, - $ INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER NORM - INTEGER INFO, LDA, N - DOUBLE PRECISION ANORM, RCOND -* .. -* .. Array Arguments .. - INTEGER IWORK( * ) - DOUBLE PRECISION A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGECON estimates the reciprocal of the condition number of a general -* real matrix A, in either the 1-norm or the infinity-norm, using -* the LU factorization computed by DGETRF. -* -* An estimate is obtained for norm(inv(A)), and the reciprocal of the -* condition number is computed as -* RCOND = 1 / ( norm(A) * norm(inv(A)) ). -* -* Arguments -* ========= -* -* NORM (input) CHARACTER*1 -* Specifies whether the 1-norm condition number or the -* infinity-norm condition number is required: -* = '1' or 'O': 1-norm; -* = 'I': Infinity-norm. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The factors L and U from the factorization A = P*L*U -* as computed by DGETRF. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* ANORM (input) DOUBLE PRECISION -* If NORM = '1' or 'O', the 1-norm of the original matrix A. -* If NORM = 'I', the infinity-norm of the original matrix A. -* -* RCOND (output) DOUBLE PRECISION -* The reciprocal of the condition number of the matrix A, -* computed as RCOND = 1/(norm(A) * norm(inv(A))). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (4*N) -* -* IWORK (workspace) INTEGER array, dimension (N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL ONENRM - CHARACTER NORMIN - INTEGER IX, KASE, KASE1 - DOUBLE PRECISION AINVNM, SCALE, SL, SMLNUM, SU -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IDAMAX - DOUBLE PRECISION DLAMCH - EXTERNAL LSAME, IDAMAX, DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DLACON, DLATRS, DRSCL, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - ONENRM = NORM.EQ.'1' .OR. LSAME( NORM, 'O' ) - IF( .NOT.ONENRM .AND. .NOT.LSAME( NORM, 'I' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - ELSE IF( ANORM.LT.ZERO ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGECON', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - RCOND = ZERO - IF( N.EQ.0 ) THEN - RCOND = ONE - RETURN - ELSE IF( ANORM.EQ.ZERO ) THEN - RETURN - END IF -* - SMLNUM = DLAMCH( 'Safe minimum' ) -* -* Estimate the norm of inv(A). -* - AINVNM = ZERO - NORMIN = 'N' - IF( ONENRM ) THEN - KASE1 = 1 - ELSE - KASE1 = 2 - END IF - KASE = 0 - 10 CONTINUE - CALL DLACON( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE ) - IF( KASE.NE.0 ) THEN - IF( KASE.EQ.KASE1 ) THEN -* -* Multiply by inv(L). -* - CALL DLATRS( 'Lower', 'No transpose', 'Unit', NORMIN, N, A, - $ LDA, WORK, SL, WORK( 2*N+1 ), INFO ) -* -* Multiply by inv(U). -* - CALL DLATRS( 'Upper', 'No transpose', 'Non-unit', NORMIN, N, - $ A, LDA, WORK, SU, WORK( 3*N+1 ), INFO ) - ELSE -* -* Multiply by inv(U'). -* - CALL DLATRS( 'Upper', 'Transpose', 'Non-unit', NORMIN, N, A, - $ LDA, WORK, SU, WORK( 3*N+1 ), INFO ) -* -* Multiply by inv(L'). -* - CALL DLATRS( 'Lower', 'Transpose', 'Unit', NORMIN, N, A, - $ LDA, WORK, SL, WORK( 2*N+1 ), INFO ) - END IF -* -* Divide X by 1/(SL*SU) if doing so will not cause overflow. -* - SCALE = SL*SU - NORMIN = 'Y' - IF( SCALE.NE.ONE ) THEN - IX = IDAMAX( N, WORK, 1 ) - IF( SCALE.LT.ABS( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO ) - $ GO TO 20 - CALL DRSCL( N, SCALE, WORK, 1 ) - END IF - GO TO 10 - END IF -* -* Compute the estimate of the reciprocal condition number. -* - IF( AINVNM.NE.ZERO ) - $ RCOND = ( ONE / AINVNM ) / ANORM -* - 20 CONTINUE - RETURN -* -* End of DGECON -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgeev.f b/cpp/nudg++/trunk/BlasLapack/dgeev.f deleted file mode 100644 index cdd3d2d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgeev.f +++ /dev/null @@ -1,409 +0,0 @@ - SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, - $ LDVR, WORK, LWORK, INFO ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* December 8, 1999 -* -* .. Scalar Arguments .. - CHARACTER JOBVL, JOBVR - INTEGER INFO, LDA, LDVL, LDVR, LWORK, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), - $ WI( * ), WORK( * ), WR( * ) -* .. -* -* Purpose -* ======= -* -* DGEEV computes for an N-by-N real nonsymmetric matrix A, the -* eigenvalues and, optionally, the left and/or right eigenvectors. -* -* The right eigenvector v(j) of A satisfies -* A * v(j) = lambda(j) * v(j) -* where lambda(j) is its eigenvalue. -* The left eigenvector u(j) of A satisfies -* u(j)**H * A = lambda(j) * u(j)**H -* where u(j)**H denotes the conjugate transpose of u(j). -* -* The computed eigenvectors are normalized to have Euclidean norm -* equal to 1 and largest component real. -* -* Arguments -* ========= -* -* JOBVL (input) CHARACTER*1 -* = 'N': left eigenvectors of A are not computed; -* = 'V': left eigenvectors of A are computed. -* -* JOBVR (input) CHARACTER*1 -* = 'N': right eigenvectors of A are not computed; -* = 'V': right eigenvectors of A are computed. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the N-by-N matrix A. -* On exit, A has been overwritten. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* WR (output) DOUBLE PRECISION array, dimension (N) -* WI (output) DOUBLE PRECISION array, dimension (N) -* WR and WI contain the real and imaginary parts, -* respectively, of the computed eigenvalues. Complex -* conjugate pairs of eigenvalues appear consecutively -* with the eigenvalue having the positive imaginary part -* first. -* -* VL (output) DOUBLE PRECISION array, dimension (LDVL,N) -* If JOBVL = 'V', the left eigenvectors u(j) are stored one -* after another in the columns of VL, in the same order -* as their eigenvalues. -* If JOBVL = 'N', VL is not referenced. -* If the j-th eigenvalue is real, then u(j) = VL(:,j), -* the j-th column of VL. -* If the j-th and (j+1)-st eigenvalues form a complex -* conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and -* u(j+1) = VL(:,j) - i*VL(:,j+1). -* -* LDVL (input) INTEGER -* The leading dimension of the array VL. LDVL >= 1; if -* JOBVL = 'V', LDVL >= N. -* -* VR (output) DOUBLE PRECISION array, dimension (LDVR,N) -* If JOBVR = 'V', the right eigenvectors v(j) are stored one -* after another in the columns of VR, in the same order -* as their eigenvalues. -* If JOBVR = 'N', VR is not referenced. -* If the j-th eigenvalue is real, then v(j) = VR(:,j), -* the j-th column of VR. -* If the j-th and (j+1)-st eigenvalues form a complex -* conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and -* v(j+1) = VR(:,j) - i*VR(:,j+1). -* -* LDVR (input) INTEGER -* The leading dimension of the array VR. LDVR >= 1; if -* JOBVR = 'V', LDVR >= N. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,3*N), and -* if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good -* performance, LWORK must generally be larger. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value. -* > 0: if INFO = i, the QR algorithm failed to compute all the -* eigenvalues, and no eigenvectors have been computed; -* elements i+1:N of WR and WI contain eigenvalues which -* have converged. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY, SCALEA, WANTVL, WANTVR - CHARACTER SIDE - INTEGER HSWORK, I, IBAL, IERR, IHI, ILO, ITAU, IWRK, K, - $ MAXB, MAXWRK, MINWRK, NOUT - DOUBLE PRECISION ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM, - $ SN -* .. -* .. Local Arrays .. - LOGICAL SELECT( 1 ) - DOUBLE PRECISION DUM( 1 ) -* .. -* .. External Subroutines .. - EXTERNAL DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLACPY, DLARTG, - $ DLASCL, DORGHR, DROT, DSCAL, DTREVC, XERBLA -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IDAMAX, ILAENV - DOUBLE PRECISION DLAMCH, DLANGE, DLAPY2, DNRM2 - EXTERNAL LSAME, IDAMAX, ILAENV, DLAMCH, DLANGE, DLAPY2, - $ DNRM2 -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - LQUERY = ( LWORK.EQ.-1 ) - WANTVL = LSAME( JOBVL, 'V' ) - WANTVR = LSAME( JOBVR, 'V' ) - IF( ( .NOT.WANTVL ) .AND. ( .NOT.LSAME( JOBVL, 'N' ) ) ) THEN - INFO = -1 - ELSE IF( ( .NOT.WANTVR ) .AND. ( .NOT.LSAME( JOBVR, 'N' ) ) ) THEN - INFO = -2 - ELSE IF( N.LT.0 ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LDVL.LT.1 .OR. ( WANTVL .AND. LDVL.LT.N ) ) THEN - INFO = -9 - ELSE IF( LDVR.LT.1 .OR. ( WANTVR .AND. LDVR.LT.N ) ) THEN - INFO = -11 - END IF -* -* Compute workspace -* (Note: Comments in the code beginning "Workspace:" describe the -* minimal amount of workspace needed at that point in the code, -* as well as the preferred amount for good performance. -* NB refers to the optimal block size for the immediately -* following subroutine, as returned by ILAENV. -* HSWORK refers to the workspace preferred by DHSEQR, as -* calculated below. HSWORK is computed assuming ILO=1 and IHI=N, -* the worst case.) -* - MINWRK = 1 - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) ) THEN - MAXWRK = 2*N + N*ILAENV( 1, 'DGEHRD', ' ', N, 1, N, 0 ) - IF( ( .NOT.WANTVL ) .AND. ( .NOT.WANTVR ) ) THEN - MINWRK = MAX( 1, 3*N ) - MAXB = MAX( ILAENV( 8, 'DHSEQR', 'EN', N, 1, N, -1 ), 2 ) - K = MIN( MAXB, N, MAX( 2, ILAENV( 4, 'DHSEQR', 'EN', N, 1, - $ N, -1 ) ) ) - HSWORK = MAX( K*( K+2 ), 2*N ) - MAXWRK = MAX( MAXWRK, N+1, N+HSWORK ) - ELSE - MINWRK = MAX( 1, 4*N ) - MAXWRK = MAX( MAXWRK, 2*N+( N-1 )* - $ ILAENV( 1, 'DORGHR', ' ', N, 1, N, -1 ) ) - MAXB = MAX( ILAENV( 8, 'DHSEQR', 'SV', N, 1, N, -1 ), 2 ) - K = MIN( MAXB, N, MAX( 2, ILAENV( 4, 'DHSEQR', 'SV', N, 1, - $ N, -1 ) ) ) - HSWORK = MAX( K*( K+2 ), 2*N ) - MAXWRK = MAX( MAXWRK, N+1, N+HSWORK ) - MAXWRK = MAX( MAXWRK, 4*N ) - END IF - WORK( 1 ) = MAXWRK - END IF - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN - INFO = -13 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGEEV ', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Get machine constants -* - EPS = DLAMCH( 'P' ) - SMLNUM = DLAMCH( 'S' ) - BIGNUM = ONE / SMLNUM - CALL DLABAD( SMLNUM, BIGNUM ) - SMLNUM = SQRT( SMLNUM ) / EPS - BIGNUM = ONE / SMLNUM -* -* Scale A if max element outside range [SMLNUM,BIGNUM] -* - ANRM = DLANGE( 'M', N, N, A, LDA, DUM ) - SCALEA = .FALSE. - IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN - SCALEA = .TRUE. - CSCALE = SMLNUM - ELSE IF( ANRM.GT.BIGNUM ) THEN - SCALEA = .TRUE. - CSCALE = BIGNUM - END IF - IF( SCALEA ) - $ CALL DLASCL( 'G', 0, 0, ANRM, CSCALE, N, N, A, LDA, IERR ) -* -* Balance the matrix -* (Workspace: need N) -* - IBAL = 1 - CALL DGEBAL( 'B', N, A, LDA, ILO, IHI, WORK( IBAL ), IERR ) -* -* Reduce to upper Hessenberg form -* (Workspace: need 3*N, prefer 2*N+N*NB) -* - ITAU = IBAL + N - IWRK = ITAU + N - CALL DGEHRD( N, ILO, IHI, A, LDA, WORK( ITAU ), WORK( IWRK ), - $ LWORK-IWRK+1, IERR ) -* - IF( WANTVL ) THEN -* -* Want left eigenvectors -* Copy Householder vectors to VL -* - SIDE = 'L' - CALL DLACPY( 'L', N, N, A, LDA, VL, LDVL ) -* -* Generate orthogonal matrix in VL -* (Workspace: need 3*N-1, prefer 2*N+(N-1)*NB) -* - CALL DORGHR( N, ILO, IHI, VL, LDVL, WORK( ITAU ), WORK( IWRK ), - $ LWORK-IWRK+1, IERR ) -* -* Perform QR iteration, accumulating Schur vectors in VL -* (Workspace: need N+1, prefer N+HSWORK (see comments) ) -* - IWRK = ITAU - CALL DHSEQR( 'S', 'V', N, ILO, IHI, A, LDA, WR, WI, VL, LDVL, - $ WORK( IWRK ), LWORK-IWRK+1, INFO ) -* - IF( WANTVR ) THEN -* -* Want left and right eigenvectors -* Copy Schur vectors to VR -* - SIDE = 'B' - CALL DLACPY( 'F', N, N, VL, LDVL, VR, LDVR ) - END IF -* - ELSE IF( WANTVR ) THEN -* -* Want right eigenvectors -* Copy Householder vectors to VR -* - SIDE = 'R' - CALL DLACPY( 'L', N, N, A, LDA, VR, LDVR ) -* -* Generate orthogonal matrix in VR -* (Workspace: need 3*N-1, prefer 2*N+(N-1)*NB) -* - CALL DORGHR( N, ILO, IHI, VR, LDVR, WORK( ITAU ), WORK( IWRK ), - $ LWORK-IWRK+1, IERR ) -* -* Perform QR iteration, accumulating Schur vectors in VR -* (Workspace: need N+1, prefer N+HSWORK (see comments) ) -* - IWRK = ITAU - CALL DHSEQR( 'S', 'V', N, ILO, IHI, A, LDA, WR, WI, VR, LDVR, - $ WORK( IWRK ), LWORK-IWRK+1, INFO ) -* - ELSE -* -* Compute eigenvalues only -* (Workspace: need N+1, prefer N+HSWORK (see comments) ) -* - IWRK = ITAU - CALL DHSEQR( 'E', 'N', N, ILO, IHI, A, LDA, WR, WI, VR, LDVR, - $ WORK( IWRK ), LWORK-IWRK+1, INFO ) - END IF -* -* If INFO > 0 from DHSEQR, then quit -* - IF( INFO.GT.0 ) - $ GO TO 50 -* - IF( WANTVL .OR. WANTVR ) THEN -* -* Compute left and/or right eigenvectors -* (Workspace: need 4*N) -* - CALL DTREVC( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR, - $ N, NOUT, WORK( IWRK ), IERR ) - END IF -* - IF( WANTVL ) THEN -* -* Undo balancing of left eigenvectors -* (Workspace: need N) -* - CALL DGEBAK( 'B', 'L', N, ILO, IHI, WORK( IBAL ), N, VL, LDVL, - $ IERR ) -* -* Normalize left eigenvectors and make largest component real -* - DO 20 I = 1, N - IF( WI( I ).EQ.ZERO ) THEN - SCL = ONE / DNRM2( N, VL( 1, I ), 1 ) - CALL DSCAL( N, SCL, VL( 1, I ), 1 ) - ELSE IF( WI( I ).GT.ZERO ) THEN - SCL = ONE / DLAPY2( DNRM2( N, VL( 1, I ), 1 ), - $ DNRM2( N, VL( 1, I+1 ), 1 ) ) - CALL DSCAL( N, SCL, VL( 1, I ), 1 ) - CALL DSCAL( N, SCL, VL( 1, I+1 ), 1 ) - DO 10 K = 1, N - WORK( IWRK+K-1 ) = VL( K, I )**2 + VL( K, I+1 )**2 - 10 CONTINUE - K = IDAMAX( N, WORK( IWRK ), 1 ) - CALL DLARTG( VL( K, I ), VL( K, I+1 ), CS, SN, R ) - CALL DROT( N, VL( 1, I ), 1, VL( 1, I+1 ), 1, CS, SN ) - VL( K, I+1 ) = ZERO - END IF - 20 CONTINUE - END IF -* - IF( WANTVR ) THEN -* -* Undo balancing of right eigenvectors -* (Workspace: need N) -* - CALL DGEBAK( 'B', 'R', N, ILO, IHI, WORK( IBAL ), N, VR, LDVR, - $ IERR ) -* -* Normalize right eigenvectors and make largest component real -* - DO 40 I = 1, N - IF( WI( I ).EQ.ZERO ) THEN - SCL = ONE / DNRM2( N, VR( 1, I ), 1 ) - CALL DSCAL( N, SCL, VR( 1, I ), 1 ) - ELSE IF( WI( I ).GT.ZERO ) THEN - SCL = ONE / DLAPY2( DNRM2( N, VR( 1, I ), 1 ), - $ DNRM2( N, VR( 1, I+1 ), 1 ) ) - CALL DSCAL( N, SCL, VR( 1, I ), 1 ) - CALL DSCAL( N, SCL, VR( 1, I+1 ), 1 ) - DO 30 K = 1, N - WORK( IWRK+K-1 ) = VR( K, I )**2 + VR( K, I+1 )**2 - 30 CONTINUE - K = IDAMAX( N, WORK( IWRK ), 1 ) - CALL DLARTG( VR( K, I ), VR( K, I+1 ), CS, SN, R ) - CALL DROT( N, VR( 1, I ), 1, VR( 1, I+1 ), 1, CS, SN ) - VR( K, I+1 ) = ZERO - END IF - 40 CONTINUE - END IF -* -* Undo scaling if necessary -* - 50 CONTINUE - IF( SCALEA ) THEN - CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N-INFO, 1, WR( INFO+1 ), - $ MAX( N-INFO, 1 ), IERR ) - CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N-INFO, 1, WI( INFO+1 ), - $ MAX( N-INFO, 1 ), IERR ) - IF( INFO.GT.0 ) THEN - CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, ILO-1, 1, WR, N, - $ IERR ) - CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, ILO-1, 1, WI, N, - $ IERR ) - END IF - END IF -* - WORK( 1 ) = MAXWRK - RETURN -* -* End of DGEEV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgehd2.f b/cpp/nudg++/trunk/BlasLapack/dgehd2.f deleted file mode 100644 index b234571..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgehd2.f +++ /dev/null @@ -1,150 +0,0 @@ - SUBROUTINE DGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - INTEGER IHI, ILO, INFO, LDA, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGEHD2 reduces a real general matrix A to upper Hessenberg form H by -* an orthogonal similarity transformation: Q' * A * Q = H . -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* ILO (input) INTEGER -* IHI (input) INTEGER -* It is assumed that A is already upper triangular in rows -* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally -* set by a previous call to DGEBAL; otherwise they should be -* set to 1 and N respectively. See Further Details. -* 1 <= ILO <= IHI <= max(1,N). -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the n by n general matrix to be reduced. -* On exit, the upper triangle and the first subdiagonal of A -* are overwritten with the upper Hessenberg matrix H, and the -* elements below the first subdiagonal, with the array TAU, -* represent the orthogonal matrix Q as a product of elementary -* reflectors. See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* TAU (output) DOUBLE PRECISION array, dimension (N-1) -* The scalar factors of the elementary reflectors (see Further -* Details). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (N) -* -* INFO (output) INTEGER -* = 0: successful exit. -* < 0: if INFO = -i, the i-th argument had an illegal value. -* -* Further Details -* =============== -* -* The matrix Q is represented as a product of (ihi-ilo) elementary -* reflectors -* -* Q = H(ilo) H(ilo+1) . . . H(ihi-1). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on -* exit in A(i+2:ihi,i), and tau in TAU(i). -* -* The contents of A are illustrated by the following example, with -* n = 7, ilo = 2 and ihi = 6: -* -* on entry, on exit, -* -* ( a a a a a a a ) ( a a h h h h a ) -* ( a a a a a a ) ( a h h h h a ) -* ( a a a a a a ) ( h h h h h h ) -* ( a a a a a a ) ( v2 h h h h h ) -* ( a a a a a a ) ( v2 v3 h h h h ) -* ( a a a a a a ) ( v2 v3 v4 h h h ) -* ( a ) ( a ) -* -* where a denotes an element of the original matrix A, h denotes a -* modified element of the upper Hessenberg matrix H, and vi denotes an -* element of the vector defining H(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I - DOUBLE PRECISION AII -* .. -* .. External Subroutines .. - EXTERNAL DLARF, DLARFG, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN - INFO = -2 - ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGEHD2', -INFO ) - RETURN - END IF -* - DO 10 I = ILO, IHI - 1 -* -* Compute elementary reflector H(i) to annihilate A(i+2:ihi,i) -* - CALL DLARFG( IHI-I, A( I+1, I ), A( MIN( I+2, N ), I ), 1, - $ TAU( I ) ) - AII = A( I+1, I ) - A( I+1, I ) = ONE -* -* Apply H(i) to A(1:ihi,i+1:ihi) from the right -* - CALL DLARF( 'Right', IHI, IHI-I, A( I+1, I ), 1, TAU( I ), - $ A( 1, I+1 ), LDA, WORK ) -* -* Apply H(i) to A(i+1:ihi,i+1:n) from the left -* - CALL DLARF( 'Left', IHI-I, N-I, A( I+1, I ), 1, TAU( I ), - $ A( I+1, I+1 ), LDA, WORK ) -* - A( I+1, I ) = AII - 10 CONTINUE -* - RETURN -* -* End of DGEHD2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgehrd.f b/cpp/nudg++/trunk/BlasLapack/dgehrd.f deleted file mode 100644 index e9ffcfa..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgehrd.f +++ /dev/null @@ -1,255 +0,0 @@ - SUBROUTINE DGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER IHI, ILO, INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGEHRD reduces a real general matrix A to upper Hessenberg form H by -* an orthogonal similarity transformation: Q' * A * Q = H . -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* ILO (input) INTEGER -* IHI (input) INTEGER -* It is assumed that A is already upper triangular in rows -* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally -* set by a previous call to DGEBAL; otherwise they should be -* set to 1 and N respectively. See Further Details. -* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the N-by-N general matrix to be reduced. -* On exit, the upper triangle and the first subdiagonal of A -* are overwritten with the upper Hessenberg matrix H, and the -* elements below the first subdiagonal, with the array TAU, -* represent the orthogonal matrix Q as a product of elementary -* reflectors. See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* TAU (output) DOUBLE PRECISION array, dimension (N-1) -* The scalar factors of the elementary reflectors (see Further -* Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to -* zero. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The length of the array WORK. LWORK >= max(1,N). -* For optimum performance LWORK >= N*NB, where NB is the -* optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value. -* -* Further Details -* =============== -* -* The matrix Q is represented as a product of (ihi-ilo) elementary -* reflectors -* -* Q = H(ilo) H(ilo+1) . . . H(ihi-1). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on -* exit in A(i+2:ihi,i), and tau in TAU(i). -* -* The contents of A are illustrated by the following example, with -* n = 7, ilo = 2 and ihi = 6: -* -* on entry, on exit, -* -* ( a a a a a a a ) ( a a h h h h a ) -* ( a a a a a a ) ( a h h h h a ) -* ( a a a a a a ) ( h h h h h h ) -* ( a a a a a a ) ( v2 h h h h h ) -* ( a a a a a a ) ( v2 v3 h h h h ) -* ( a a a a a a ) ( v2 v3 v4 h h h ) -* ( a ) ( a ) -* -* where a denotes an element of the original matrix A, h denotes a -* modified element of the upper Hessenberg matrix H, and vi denotes an -* element of the vector defining H(i). -* -* ===================================================================== -* -* .. Parameters .. - INTEGER NBMAX, LDT - PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IB, IINFO, IWS, LDWORK, LWKOPT, NB, NBMIN, - $ NH, NX - DOUBLE PRECISION EI -* .. -* .. Local Arrays .. - DOUBLE PRECISION T( LDT, NBMAX ) -* .. -* .. External Subroutines .. - EXTERNAL DGEHD2, DGEMM, DLAHRD, DLARFB, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - NB = MIN( NBMAX, ILAENV( 1, 'DGEHRD', ' ', N, ILO, IHI, -1 ) ) - LWKOPT = N*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN - INFO = -2 - ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -8 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGEHRD', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Set elements 1:ILO-1 and IHI:N-1 of TAU to zero -* - DO 10 I = 1, ILO - 1 - TAU( I ) = ZERO - 10 CONTINUE - DO 20 I = MAX( 1, IHI ), N - 1 - TAU( I ) = ZERO - 20 CONTINUE -* -* Quick return if possible -* - NH = IHI - ILO + 1 - IF( NH.LE.1 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* -* Determine the block size. -* - NB = MIN( NBMAX, ILAENV( 1, 'DGEHRD', ' ', N, ILO, IHI, -1 ) ) - NBMIN = 2 - IWS = 1 - IF( NB.GT.1 .AND. NB.LT.NH ) THEN -* -* Determine when to cross over from blocked to unblocked code -* (last block is always handled by unblocked code). -* - NX = MAX( NB, ILAENV( 3, 'DGEHRD', ' ', N, ILO, IHI, -1 ) ) - IF( NX.LT.NH ) THEN -* -* Determine if workspace is large enough for blocked code. -* - IWS = N*NB - IF( LWORK.LT.IWS ) THEN -* -* Not enough workspace to use optimal NB: determine the -* minimum value of NB, and reduce NB or force use of -* unblocked code. -* - NBMIN = MAX( 2, ILAENV( 2, 'DGEHRD', ' ', N, ILO, IHI, - $ -1 ) ) - IF( LWORK.GE.N*NBMIN ) THEN - NB = LWORK / N - ELSE - NB = 1 - END IF - END IF - END IF - END IF - LDWORK = N -* - IF( NB.LT.NBMIN .OR. NB.GE.NH ) THEN -* -* Use unblocked code below -* - I = ILO -* - ELSE -* -* Use blocked code -* - DO 30 I = ILO, IHI - 1 - NX, NB - IB = MIN( NB, IHI-I ) -* -* Reduce columns i:i+ib-1 to Hessenberg form, returning the -* matrices V and T of the block reflector H = I - V*T*V' -* which performs the reduction, and also the matrix Y = A*V*T -* - CALL DLAHRD( IHI, I, IB, A( 1, I ), LDA, TAU( I ), T, LDT, - $ WORK, LDWORK ) -* -* Apply the block reflector H to A(1:ihi,i+ib:ihi) from the -* right, computing A := A - Y * V'. V(i+ib,ib-1) must be set -* to 1. -* - EI = A( I+IB, I+IB-1 ) - A( I+IB, I+IB-1 ) = ONE - CALL DGEMM( 'No transpose', 'Transpose', IHI, IHI-I-IB+1, - $ IB, -ONE, WORK, LDWORK, A( I+IB, I ), LDA, ONE, - $ A( 1, I+IB ), LDA ) - A( I+IB, I+IB-1 ) = EI -* -* Apply the block reflector H to A(i+1:ihi,i+ib:n) from the -* left -* - CALL DLARFB( 'Left', 'Transpose', 'Forward', 'Columnwise', - $ IHI-I, N-I-IB+1, IB, A( I+1, I ), LDA, T, LDT, - $ A( I+1, I+IB ), LDA, WORK, LDWORK ) - 30 CONTINUE - END IF -* -* Use unblocked code to reduce the rest of the matrix -* - CALL DGEHD2( N, I, IHI, A, LDA, TAU, WORK, IINFO ) - WORK( 1 ) = IWS -* - RETURN -* -* End of DGEHRD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgelq2.f b/cpp/nudg++/trunk/BlasLapack/dgelq2.f deleted file mode 100644 index a120487..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgelq2.f +++ /dev/null @@ -1,122 +0,0 @@ - SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGELQ2 computes an LQ factorization of a real m by n matrix A: -* A = L * Q. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the m by n matrix A. -* On exit, the elements on and below the diagonal of the array -* contain the m by min(m,n) lower trapezoidal matrix L (L is -* lower triangular if m <= n); the elements above the diagonal, -* with the array TAU, represent the orthogonal matrix Q as a -* product of elementary reflectors (see Further Details). -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The scalar factors of the elementary reflectors (see Further -* Details). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (M) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* Further Details -* =============== -* -* The matrix Q is represented as a product of elementary reflectors -* -* Q = H(k) . . . H(2) H(1), where k = min(m,n). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n), -* and tau in TAU(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, K - DOUBLE PRECISION AII -* .. -* .. External Subroutines .. - EXTERNAL DLARF, DLARFG, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGELQ2', -INFO ) - RETURN - END IF -* - K = MIN( M, N ) -* - DO 10 I = 1, K -* -* Generate elementary reflector H(i) to annihilate A(i,i+1:n) -* - CALL DLARFG( N-I+1, A( I, I ), A( I, MIN( I+1, N ) ), LDA, - $ TAU( I ) ) - IF( I.LT.M ) THEN -* -* Apply H(i) to A(i+1:m,i:n) from the right -* - AII = A( I, I ) - A( I, I ) = ONE - CALL DLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, TAU( I ), - $ A( I+1, I ), LDA, WORK ) - A( I, I ) = AII - END IF - 10 CONTINUE - RETURN -* -* End of DGELQ2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgelqf.f b/cpp/nudg++/trunk/BlasLapack/dgelqf.f deleted file mode 100644 index 13d2d2f..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgelqf.f +++ /dev/null @@ -1,196 +0,0 @@ - SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGELQF computes an LQ factorization of a real M-by-N matrix A: -* A = L * Q. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the M-by-N matrix A. -* On exit, the elements on and below the diagonal of the array -* contain the m-by-min(m,n) lower trapezoidal matrix L (L is -* lower triangular if m <= n); the elements above the diagonal, -* with the array TAU, represent the orthogonal matrix Q as a -* product of elementary reflectors (see Further Details). -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The scalar factors of the elementary reflectors (see Further -* Details). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,M). -* For optimum performance LWORK >= M*NB, where NB is the -* optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* Further Details -* =============== -* -* The matrix Q is represented as a product of elementary reflectors -* -* Q = H(k) . . . H(2) H(1), where k = min(m,n). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n), -* and tau in TAU(i). -* -* ===================================================================== -* -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB, - $ NBMIN, NX -* .. -* .. External Subroutines .. - EXTERNAL DGELQ2, DLARFB, DLARFT, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - NB = ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - LWKOPT = M*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN - INFO = -7 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGELQF', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - K = MIN( M, N ) - IF( K.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NBMIN = 2 - NX = 0 - IWS = M - IF( NB.GT.1 .AND. NB.LT.K ) THEN -* -* Determine when to cross over from blocked to unblocked code. -* - NX = MAX( 0, ILAENV( 3, 'DGELQF', ' ', M, N, -1, -1 ) ) - IF( NX.LT.K ) THEN -* -* Determine if workspace is large enough for blocked code. -* - LDWORK = M - IWS = LDWORK*NB - IF( LWORK.LT.IWS ) THEN -* -* Not enough workspace to use optimal NB: reduce NB and -* determine the minimum value of NB. -* - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DGELQF', ' ', M, N, -1, - $ -1 ) ) - END IF - END IF - END IF -* - IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN -* -* Use blocked code initially -* - DO 10 I = 1, K - NX, NB - IB = MIN( K-I+1, NB ) -* -* Compute the LQ factorization of the current block -* A(i:i+ib-1,i:n) -* - CALL DGELQ2( IB, N-I+1, A( I, I ), LDA, TAU( I ), WORK, - $ IINFO ) - IF( I+IB.LE.M ) THEN -* -* Form the triangular factor of the block reflector -* H = H(i) H(i+1) . . . H(i+ib-1) -* - CALL DLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ), - $ LDA, TAU( I ), WORK, LDWORK ) -* -* Apply H to A(i+ib:m,i:n) from the right -* - CALL DLARFB( 'Right', 'No transpose', 'Forward', - $ 'Rowwise', M-I-IB+1, N-I+1, IB, A( I, I ), - $ LDA, WORK, LDWORK, A( I+IB, I ), LDA, - $ WORK( IB+1 ), LDWORK ) - END IF - 10 CONTINUE - ELSE - I = 1 - END IF -* -* Use unblocked code to factor the last or only block. -* - IF( I.LE.K ) - $ CALL DGELQ2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK, - $ IINFO ) -* - WORK( 1 ) = IWS - RETURN -* -* End of DGELQF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgelss.f b/cpp/nudg++/trunk/BlasLapack/dgelss.f deleted file mode 100644 index a437767..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgelss.f +++ /dev/null @@ -1,613 +0,0 @@ - SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, - $ WORK, LWORK, INFO ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK - DOUBLE PRECISION RCOND -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGELSS computes the minimum norm solution to a real linear least -* squares problem: -* -* Minimize 2-norm(| b - A*x |). -* -* using the singular value decomposition (SVD) of A. A is an M-by-N -* matrix which may be rank-deficient. -* -* Several right hand side vectors b and solution vectors x can be -* handled in a single call; they are stored as the columns of the -* M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix -* X. -* -* The effective rank of A is determined by treating as zero those -* singular values which are less than RCOND times the largest singular -* value. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* NRHS (input) INTEGER -* The number of right hand sides, i.e., the number of columns -* of the matrices B and X. NRHS >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the M-by-N matrix A. -* On exit, the first min(m,n) rows of A are overwritten with -* its right singular vectors, stored rowwise. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) -* On entry, the M-by-NRHS right hand side matrix B. -* On exit, B is overwritten by the N-by-NRHS solution -* matrix X. If m >= n and RANK = n, the residual -* sum-of-squares for the solution in the i-th column is given -* by the sum of squares of elements n+1:m in that column. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,max(M,N)). -* -* S (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The singular values of A in decreasing order. -* The condition number of A in the 2-norm = S(1)/S(min(m,n)). -* -* RCOND (input) DOUBLE PRECISION -* RCOND is used to determine the effective rank of A. -* Singular values S(i) <= RCOND*S(1) are treated as zero. -* If RCOND < 0, machine precision is used instead. -* -* RANK (output) INTEGER -* The effective rank of A, i.e., the number of singular values -* which are greater than RCOND*S(1). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= 1, and also: -* LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS ) -* For good performance, LWORK should generally be larger. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value. -* > 0: the algorithm for computing the SVD failed to converge; -* if INFO = i, i off-diagonal elements of an intermediate -* bidiagonal form did not converge to zero. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER BDSPAC, BL, CHUNK, I, IASCL, IBSCL, IE, IL, - $ ITAU, ITAUP, ITAUQ, IWORK, LDWORK, MAXMN, - $ MAXWRK, MINMN, MINWRK, MM, MNTHR - DOUBLE PRECISION ANRM, BIGNUM, BNRM, EPS, SFMIN, SMLNUM, THR -* .. -* .. Local Arrays .. - DOUBLE PRECISION VDUM( 1 ) -* .. -* .. External Subroutines .. - EXTERNAL DBDSQR, DCOPY, DGEBRD, DGELQF, DGEMM, DGEMV, - $ DGEQRF, DLABAD, DLACPY, DLASCL, DLASET, DORGBR, - $ DORMBR, DORMLQ, DORMQR, DRSCL, XERBLA -* .. -* .. External Functions .. - INTEGER ILAENV - DOUBLE PRECISION DLAMCH, DLANGE - EXTERNAL ILAENV, DLAMCH, DLANGE -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - MINMN = MIN( M, N ) - MAXMN = MAX( M, N ) - MNTHR = ILAENV( 6, 'DGELSS', ' ', M, N, NRHS, -1 ) - LQUERY = ( LWORK.EQ.-1 ) - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( NRHS.LT.0 ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -5 - ELSE IF( LDB.LT.MAX( 1, MAXMN ) ) THEN - INFO = -7 - END IF -* -* Compute workspace -* (Note: Comments in the code beginning "Workspace:" describe the -* minimal amount of workspace needed at that point in the code, -* as well as the preferred amount for good performance. -* NB refers to the optimal block size for the immediately -* following subroutine, as returned by ILAENV.) -* - MINWRK = 1 - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) ) THEN - MAXWRK = 0 - MM = M - IF( M.GE.N .AND. M.GE.MNTHR ) THEN -* -* Path 1a - overdetermined, with many more rows than columns -* - MM = N - MAXWRK = MAX( MAXWRK, N+N*ILAENV( 1, 'DGEQRF', ' ', M, N, - $ -1, -1 ) ) - MAXWRK = MAX( MAXWRK, N+NRHS* - $ ILAENV( 1, 'DORMQR', 'LT', M, NRHS, N, -1 ) ) - END IF - IF( M.GE.N ) THEN -* -* Path 1 - overdetermined or exactly determined -* -* Compute workspace needed for DBDSQR -* - BDSPAC = MAX( 1, 5*N ) - MAXWRK = MAX( MAXWRK, 3*N+( MM+N )* - $ ILAENV( 1, 'DGEBRD', ' ', MM, N, -1, -1 ) ) - MAXWRK = MAX( MAXWRK, 3*N+NRHS* - $ ILAENV( 1, 'DORMBR', 'QLT', MM, NRHS, N, -1 ) ) - MAXWRK = MAX( MAXWRK, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - MAXWRK = MAX( MAXWRK, BDSPAC ) - MAXWRK = MAX( MAXWRK, N*NRHS ) - MINWRK = MAX( 3*N+MM, 3*N+NRHS, BDSPAC ) - MAXWRK = MAX( MINWRK, MAXWRK ) - END IF - IF( N.GT.M ) THEN -* -* Compute workspace needed for DBDSQR -* - BDSPAC = MAX( 1, 5*M ) - MINWRK = MAX( 3*M+NRHS, 3*M+N, BDSPAC ) - IF( N.GE.MNTHR ) THEN -* -* Path 2a - underdetermined, with many more columns -* than rows -* - MAXWRK = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - MAXWRK = MAX( MAXWRK, M*M+4*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - MAXWRK = MAX( MAXWRK, M*M+4*M+NRHS* - $ ILAENV( 1, 'DORMBR', 'QLT', M, NRHS, M, -1 ) ) - MAXWRK = MAX( MAXWRK, M*M+4*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - MAXWRK = MAX( MAXWRK, M*M+M+BDSPAC ) - IF( NRHS.GT.1 ) THEN - MAXWRK = MAX( MAXWRK, M*M+M+M*NRHS ) - ELSE - MAXWRK = MAX( MAXWRK, M*M+2*M ) - END IF - MAXWRK = MAX( MAXWRK, M+NRHS* - $ ILAENV( 1, 'DORMLQ', 'LT', N, NRHS, M, -1 ) ) - ELSE -* -* Path 2 - underdetermined -* - MAXWRK = 3*M + ( N+M )*ILAENV( 1, 'DGEBRD', ' ', M, N, - $ -1, -1 ) - MAXWRK = MAX( MAXWRK, 3*M+NRHS* - $ ILAENV( 1, 'DORMBR', 'QLT', M, NRHS, M, -1 ) ) - MAXWRK = MAX( MAXWRK, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'P', M, N, M, -1 ) ) - MAXWRK = MAX( MAXWRK, BDSPAC ) - MAXWRK = MAX( MAXWRK, N*NRHS ) - END IF - END IF - MAXWRK = MAX( MINWRK, MAXWRK ) - WORK( 1 ) = MAXWRK - END IF -* - MINWRK = MAX( MINWRK, 1 ) - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) - $ INFO = -12 - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGELSS', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 ) THEN - RANK = 0 - RETURN - END IF -* -* Get machine parameters -* - EPS = DLAMCH( 'P' ) - SFMIN = DLAMCH( 'S' ) - SMLNUM = SFMIN / EPS - BIGNUM = ONE / SMLNUM - CALL DLABAD( SMLNUM, BIGNUM ) -* -* Scale A if max element outside range [SMLNUM,BIGNUM] -* - ANRM = DLANGE( 'M', M, N, A, LDA, WORK ) - IASCL = 0 - IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN -* -* Scale matrix norm up to SMLNUM -* - CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO ) - IASCL = 1 - ELSE IF( ANRM.GT.BIGNUM ) THEN -* -* Scale matrix norm down to BIGNUM -* - CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO ) - IASCL = 2 - ELSE IF( ANRM.EQ.ZERO ) THEN -* -* Matrix all zero. Return zero solution. -* - CALL DLASET( 'F', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) - CALL DLASET( 'F', MINMN, 1, ZERO, ZERO, S, 1 ) - RANK = 0 - GO TO 70 - END IF -* -* Scale B if max element outside range [SMLNUM,BIGNUM] -* - BNRM = DLANGE( 'M', M, NRHS, B, LDB, WORK ) - IBSCL = 0 - IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN -* -* Scale matrix norm up to SMLNUM -* - CALL DLASCL( 'G', 0, 0, BNRM, SMLNUM, M, NRHS, B, LDB, INFO ) - IBSCL = 1 - ELSE IF( BNRM.GT.BIGNUM ) THEN -* -* Scale matrix norm down to BIGNUM -* - CALL DLASCL( 'G', 0, 0, BNRM, BIGNUM, M, NRHS, B, LDB, INFO ) - IBSCL = 2 - END IF -* -* Overdetermined case -* - IF( M.GE.N ) THEN -* -* Path 1 - overdetermined or exactly determined -* - MM = M - IF( M.GE.MNTHR ) THEN -* -* Path 1a - overdetermined, with many more rows than columns -* - MM = N - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), - $ LWORK-IWORK+1, INFO ) -* -* Multiply B by transpose(Q) -* (Workspace: need N+NRHS, prefer N+NRHS*NB) -* - CALL DORMQR( 'L', 'T', M, NRHS, N, A, LDA, WORK( ITAU ), B, - $ LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) -* -* Zero out below R -* - IF( N.GT.1 ) - $ CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), LDA ) - END IF -* - IE = 1 - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in A -* (Workspace: need 3*N+MM, prefer 3*N+(MM+N)*NB) -* - CALL DGEBRD( MM, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, - $ INFO ) -* -* Multiply B by transpose of left bidiagonalizing vectors of R -* (Workspace: need 3*N+NRHS, prefer 3*N+NRHS*NB) -* - CALL DORMBR( 'Q', 'L', 'T', MM, NRHS, N, A, LDA, WORK( ITAUQ ), - $ B, LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) -* -* Generate right bidiagonalizing vectors of R in A -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, INFO ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration -* multiply B by transpose of left singular vectors -* compute right singular vectors in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, N, 0, NRHS, S, WORK( IE ), A, LDA, VDUM, - $ 1, B, LDB, WORK( IWORK ), INFO ) - IF( INFO.NE.0 ) - $ GO TO 70 -* -* Multiply B by reciprocals of singular values -* - THR = MAX( RCOND*S( 1 ), SFMIN ) - IF( RCOND.LT.ZERO ) - $ THR = MAX( EPS*S( 1 ), SFMIN ) - RANK = 0 - DO 10 I = 1, N - IF( S( I ).GT.THR ) THEN - CALL DRSCL( NRHS, S( I ), B( I, 1 ), LDB ) - RANK = RANK + 1 - ELSE - CALL DLASET( 'F', 1, NRHS, ZERO, ZERO, B( I, 1 ), LDB ) - END IF - 10 CONTINUE -* -* Multiply B by right singular vectors -* (Workspace: need N, prefer N*NRHS) -* - IF( LWORK.GE.LDB*NRHS .AND. NRHS.GT.1 ) THEN - CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, A, LDA, B, LDB, ZERO, - $ WORK, LDB ) - CALL DLACPY( 'G', N, NRHS, WORK, LDB, B, LDB ) - ELSE IF( NRHS.GT.1 ) THEN - CHUNK = LWORK / N - DO 20 I = 1, NRHS, CHUNK - BL = MIN( NRHS-I+1, CHUNK ) - CALL DGEMM( 'T', 'N', N, BL, N, ONE, A, LDA, B( 1, I ), - $ LDB, ZERO, WORK, N ) - CALL DLACPY( 'G', N, BL, WORK, N, B( 1, I ), LDB ) - 20 CONTINUE - ELSE - CALL DGEMV( 'T', N, N, ONE, A, LDA, B, 1, ZERO, WORK, 1 ) - CALL DCOPY( N, WORK, 1, B, 1 ) - END IF -* - ELSE IF( N.GE.MNTHR .AND. LWORK.GE.4*M+M*M+ - $ MAX( M, 2*M-4, NRHS, N-3*M ) ) THEN -* -* Path 2a - underdetermined, with many more columns than rows -* and sufficient workspace for an efficient algorithm -* - LDWORK = M - IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M ), - $ M*LDA+M+M*NRHS ) )LDWORK = LDA - ITAU = 1 - IWORK = M + 1 -* -* Compute A=L*Q -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), - $ LWORK-IWORK+1, INFO ) - IL = IWORK -* -* Copy L to WORK(IL), zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWORK ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, WORK( IL+LDWORK ), - $ LDWORK ) - IE = IL + LDWORK*M - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IL) -* (Workspace: need M*M+5*M, prefer M*M+4*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IL ), LDWORK, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, INFO ) -* -* Multiply B by transpose of left bidiagonalizing vectors of L -* (Workspace: need M*M+4*M+NRHS, prefer M*M+4*M+NRHS*NB) -* - CALL DORMBR( 'Q', 'L', 'T', M, NRHS, M, WORK( IL ), LDWORK, - $ WORK( ITAUQ ), B, LDB, WORK( IWORK ), - $ LWORK-IWORK+1, INFO ) -* -* Generate right bidiagonalizing vectors of R in WORK(IL) -* (Workspace: need M*M+5*M-1, prefer M*M+4*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IL ), LDWORK, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, INFO ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, -* computing right singular vectors of L in WORK(IL) and -* multiplying B by transpose of left singular vectors -* (Workspace: need M*M+M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, 0, NRHS, S, WORK( IE ), WORK( IL ), - $ LDWORK, A, LDA, B, LDB, WORK( IWORK ), INFO ) - IF( INFO.NE.0 ) - $ GO TO 70 -* -* Multiply B by reciprocals of singular values -* - THR = MAX( RCOND*S( 1 ), SFMIN ) - IF( RCOND.LT.ZERO ) - $ THR = MAX( EPS*S( 1 ), SFMIN ) - RANK = 0 - DO 30 I = 1, M - IF( S( I ).GT.THR ) THEN - CALL DRSCL( NRHS, S( I ), B( I, 1 ), LDB ) - RANK = RANK + 1 - ELSE - CALL DLASET( 'F', 1, NRHS, ZERO, ZERO, B( I, 1 ), LDB ) - END IF - 30 CONTINUE - IWORK = IE -* -* Multiply B by right singular vectors of L in WORK(IL) -* (Workspace: need M*M+2*M, prefer M*M+M+M*NRHS) -* - IF( LWORK.GE.LDB*NRHS+IWORK-1 .AND. NRHS.GT.1 ) THEN - CALL DGEMM( 'T', 'N', M, NRHS, M, ONE, WORK( IL ), LDWORK, - $ B, LDB, ZERO, WORK( IWORK ), LDB ) - CALL DLACPY( 'G', M, NRHS, WORK( IWORK ), LDB, B, LDB ) - ELSE IF( NRHS.GT.1 ) THEN - CHUNK = ( LWORK-IWORK+1 ) / M - DO 40 I = 1, NRHS, CHUNK - BL = MIN( NRHS-I+1, CHUNK ) - CALL DGEMM( 'T', 'N', M, BL, M, ONE, WORK( IL ), LDWORK, - $ B( 1, I ), LDB, ZERO, WORK( IWORK ), N ) - CALL DLACPY( 'G', M, BL, WORK( IWORK ), N, B( 1, I ), - $ LDB ) - 40 CONTINUE - ELSE - CALL DGEMV( 'T', M, M, ONE, WORK( IL ), LDWORK, B( 1, 1 ), - $ 1, ZERO, WORK( IWORK ), 1 ) - CALL DCOPY( M, WORK( IWORK ), 1, B( 1, 1 ), 1 ) - END IF -* -* Zero out below first M rows of B -* - CALL DLASET( 'F', N-M, NRHS, ZERO, ZERO, B( M+1, 1 ), LDB ) - IWORK = ITAU + M -* -* Multiply transpose(Q) by B -* (Workspace: need M+NRHS, prefer M+NRHS*NB) -* - CALL DORMLQ( 'L', 'T', N, NRHS, M, A, LDA, WORK( ITAU ), B, - $ LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) -* - ELSE -* -* Path 2 - remaining underdetermined cases -* - IE = 1 - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize A -* (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB) -* - CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, - $ INFO ) -* -* Multiply B by transpose of left bidiagonalizing vectors -* (Workspace: need 3*M+NRHS, prefer 3*M+NRHS*NB) -* - CALL DORMBR( 'Q', 'L', 'T', M, NRHS, N, A, LDA, WORK( ITAUQ ), - $ B, LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) -* -* Generate right bidiagonalizing vectors in A -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, INFO ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, -* computing right singular vectors of A in A and -* multiplying B by transpose of left singular vectors -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'L', M, N, 0, NRHS, S, WORK( IE ), A, LDA, VDUM, - $ 1, B, LDB, WORK( IWORK ), INFO ) - IF( INFO.NE.0 ) - $ GO TO 70 -* -* Multiply B by reciprocals of singular values -* - THR = MAX( RCOND*S( 1 ), SFMIN ) - IF( RCOND.LT.ZERO ) - $ THR = MAX( EPS*S( 1 ), SFMIN ) - RANK = 0 - DO 50 I = 1, M - IF( S( I ).GT.THR ) THEN - CALL DRSCL( NRHS, S( I ), B( I, 1 ), LDB ) - RANK = RANK + 1 - ELSE - CALL DLASET( 'F', 1, NRHS, ZERO, ZERO, B( I, 1 ), LDB ) - END IF - 50 CONTINUE -* -* Multiply B by right singular vectors of A -* (Workspace: need N, prefer N*NRHS) -* - IF( LWORK.GE.LDB*NRHS .AND. NRHS.GT.1 ) THEN - CALL DGEMM( 'T', 'N', N, NRHS, M, ONE, A, LDA, B, LDB, ZERO, - $ WORK, LDB ) - CALL DLACPY( 'F', N, NRHS, WORK, LDB, B, LDB ) - ELSE IF( NRHS.GT.1 ) THEN - CHUNK = LWORK / N - DO 60 I = 1, NRHS, CHUNK - BL = MIN( NRHS-I+1, CHUNK ) - CALL DGEMM( 'T', 'N', N, BL, M, ONE, A, LDA, B( 1, I ), - $ LDB, ZERO, WORK, N ) - CALL DLACPY( 'F', N, BL, WORK, N, B( 1, I ), LDB ) - 60 CONTINUE - ELSE - CALL DGEMV( 'T', M, N, ONE, A, LDA, B, 1, ZERO, WORK, 1 ) - CALL DCOPY( N, WORK, 1, B, 1 ) - END IF - END IF -* -* Undo scaling -* - IF( IASCL.EQ.1 ) THEN - CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, N, NRHS, B, LDB, INFO ) - CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN, - $ INFO ) - ELSE IF( IASCL.EQ.2 ) THEN - CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, N, NRHS, B, LDB, INFO ) - CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN, - $ INFO ) - END IF - IF( IBSCL.EQ.1 ) THEN - CALL DLASCL( 'G', 0, 0, SMLNUM, BNRM, N, NRHS, B, LDB, INFO ) - ELSE IF( IBSCL.EQ.2 ) THEN - CALL DLASCL( 'G', 0, 0, BIGNUM, BNRM, N, NRHS, B, LDB, INFO ) - END IF -* - 70 CONTINUE - WORK( 1 ) = MAXWRK - RETURN -* -* End of DGELSS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgemm.f b/cpp/nudg++/trunk/BlasLapack/dgemm.f deleted file mode 100644 index baabe4c..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgemm.f +++ /dev/null @@ -1,313 +0,0 @@ - SUBROUTINE DGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, - $ BETA, C, LDC ) -* .. Scalar Arguments .. - CHARACTER*1 TRANSA, TRANSB - INTEGER M, N, K, LDA, LDB, LDC - DOUBLE PRECISION ALPHA, BETA -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) -* .. -* -* Purpose -* ======= -* -* DGEMM performs one of the matrix-matrix operations -* -* C := alpha*op( A )*op( B ) + beta*C, -* -* where op( X ) is one of -* -* op( X ) = X or op( X ) = X', -* -* alpha and beta are scalars, and A, B and C are matrices, with op( A ) -* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. -* -* Parameters -* ========== -* -* TRANSA - CHARACTER*1. -* On entry, TRANSA specifies the form of op( A ) to be used in -* the matrix multiplication as follows: -* -* TRANSA = 'N' or 'n', op( A ) = A. -* -* TRANSA = 'T' or 't', op( A ) = A'. -* -* TRANSA = 'C' or 'c', op( A ) = A'. -* -* Unchanged on exit. -* -* TRANSB - CHARACTER*1. -* On entry, TRANSB specifies the form of op( B ) to be used in -* the matrix multiplication as follows: -* -* TRANSB = 'N' or 'n', op( B ) = B. -* -* TRANSB = 'T' or 't', op( B ) = B'. -* -* TRANSB = 'C' or 'c', op( B ) = B'. -* -* Unchanged on exit. -* -* M - INTEGER. -* On entry, M specifies the number of rows of the matrix -* op( A ) and of the matrix C. M must be at least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of the matrix -* op( B ) and the number of columns of the matrix C. N must be -* at least zero. -* Unchanged on exit. -* -* K - INTEGER. -* On entry, K specifies the number of columns of the matrix -* op( A ) and the number of rows of the matrix op( B ). K must -* be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is -* k when TRANSA = 'N' or 'n', and is m otherwise. -* Before entry with TRANSA = 'N' or 'n', the leading m by k -* part of the array A must contain the matrix A, otherwise -* the leading k by m part of the array A must contain the -* matrix A. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. When TRANSA = 'N' or 'n' then -* LDA must be at least max( 1, m ), otherwise LDA must be at -* least max( 1, k ). -* Unchanged on exit. -* -* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is -* n when TRANSB = 'N' or 'n', and is k otherwise. -* Before entry with TRANSB = 'N' or 'n', the leading k by n -* part of the array B must contain the matrix B, otherwise -* the leading n by k part of the array B must contain the -* matrix B. -* Unchanged on exit. -* -* LDB - INTEGER. -* On entry, LDB specifies the first dimension of B as declared -* in the calling (sub) program. When TRANSB = 'N' or 'n' then -* LDB must be at least max( 1, k ), otherwise LDB must be at -* least max( 1, n ). -* Unchanged on exit. -* -* BETA - DOUBLE PRECISION. -* On entry, BETA specifies the scalar beta. When BETA is -* supplied as zero then C need not be set on input. -* Unchanged on exit. -* -* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). -* Before entry, the leading m by n part of the array C must -* contain the matrix C, except when beta is zero, in which -* case C need not be set on entry. -* On exit, the array C is overwritten by the m by n matrix -* ( alpha*op( A )*op( B ) + beta*C ). -* -* LDC - INTEGER. -* On entry, LDC specifies the first dimension of C as declared -* in the calling (sub) program. LDC must be at least -* max( 1, m ). -* Unchanged on exit. -* -* -* Level 3 Blas routine. -* -* -- Written on 8-February-1989. -* Jack Dongarra, Argonne National Laboratory. -* Iain Duff, AERE Harwell. -* Jeremy Du Croz, Numerical Algorithms Group Ltd. -* Sven Hammarling, Numerical Algorithms Group Ltd. -* -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. Local Scalars .. - LOGICAL NOTA, NOTB - INTEGER I, INFO, J, L, NCOLA, NROWA, NROWB - DOUBLE PRECISION TEMP -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Executable Statements .. -* -* Set NOTA and NOTB as true if A and B respectively are not -* transposed and set NROWA, NCOLA and NROWB as the number of rows -* and columns of A and the number of rows of B respectively. -* - NOTA = LSAME( TRANSA, 'N' ) - NOTB = LSAME( TRANSB, 'N' ) - IF( NOTA )THEN - NROWA = M - NCOLA = K - ELSE - NROWA = K - NCOLA = M - END IF - IF( NOTB )THEN - NROWB = K - ELSE - NROWB = N - END IF -* -* Test the input parameters. -* - INFO = 0 - IF( ( .NOT.NOTA ).AND. - $ ( .NOT.LSAME( TRANSA, 'C' ) ).AND. - $ ( .NOT.LSAME( TRANSA, 'T' ) ) )THEN - INFO = 1 - ELSE IF( ( .NOT.NOTB ).AND. - $ ( .NOT.LSAME( TRANSB, 'C' ) ).AND. - $ ( .NOT.LSAME( TRANSB, 'T' ) ) )THEN - INFO = 2 - ELSE IF( M .LT.0 )THEN - INFO = 3 - ELSE IF( N .LT.0 )THEN - INFO = 4 - ELSE IF( K .LT.0 )THEN - INFO = 5 - ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN - INFO = 8 - ELSE IF( LDB.LT.MAX( 1, NROWB ) )THEN - INFO = 10 - ELSE IF( LDC.LT.MAX( 1, M ) )THEN - INFO = 13 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DGEMM ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. - $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) - $ RETURN -* -* And if alpha.eq.zero. -* - IF( ALPHA.EQ.ZERO )THEN - IF( BETA.EQ.ZERO )THEN - DO 20, J = 1, N - DO 10, I = 1, M - C( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - ELSE - DO 40, J = 1, N - DO 30, I = 1, M - C( I, J ) = BETA*C( I, J ) - 30 CONTINUE - 40 CONTINUE - END IF - RETURN - END IF -* -* Start the operations. -* - IF( NOTB )THEN - IF( NOTA )THEN -* -* Form C := alpha*A*B + beta*C. -* - DO 90, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 50, I = 1, M - C( I, J ) = ZERO - 50 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 60, I = 1, M - C( I, J ) = BETA*C( I, J ) - 60 CONTINUE - END IF - DO 80, L = 1, K - IF( B( L, J ).NE.ZERO )THEN - TEMP = ALPHA*B( L, J ) - DO 70, I = 1, M - C( I, J ) = C( I, J ) + TEMP*A( I, L ) - 70 CONTINUE - END IF - 80 CONTINUE - 90 CONTINUE - ELSE -* -* Form C := alpha*A'*B + beta*C -* - DO 120, J = 1, N - DO 110, I = 1, M - TEMP = ZERO - DO 100, L = 1, K - TEMP = TEMP + A( L, I )*B( L, J ) - 100 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 110 CONTINUE - 120 CONTINUE - END IF - ELSE - IF( NOTA )THEN -* -* Form C := alpha*A*B' + beta*C -* - DO 170, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 130, I = 1, M - C( I, J ) = ZERO - 130 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 140, I = 1, M - C( I, J ) = BETA*C( I, J ) - 140 CONTINUE - END IF - DO 160, L = 1, K - IF( B( J, L ).NE.ZERO )THEN - TEMP = ALPHA*B( J, L ) - DO 150, I = 1, M - C( I, J ) = C( I, J ) + TEMP*A( I, L ) - 150 CONTINUE - END IF - 160 CONTINUE - 170 CONTINUE - ELSE -* -* Form C := alpha*A'*B' + beta*C -* - DO 200, J = 1, N - DO 190, I = 1, M - TEMP = ZERO - DO 180, L = 1, K - TEMP = TEMP + A( L, I )*B( J, L ) - 180 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 190 CONTINUE - 200 CONTINUE - END IF - END IF -* - RETURN -* -* End of DGEMM . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgemv.f b/cpp/nudg++/trunk/BlasLapack/dgemv.f deleted file mode 100644 index 8ef80b3..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgemv.f +++ /dev/null @@ -1,261 +0,0 @@ - SUBROUTINE DGEMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, - $ BETA, Y, INCY ) -* .. Scalar Arguments .. - DOUBLE PRECISION ALPHA, BETA - INTEGER INCX, INCY, LDA, M, N - CHARACTER*1 TRANS -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) -* .. -* -* Purpose -* ======= -* -* DGEMV performs one of the matrix-vector operations -* -* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, -* -* where alpha and beta are scalars, x and y are vectors and A is an -* m by n matrix. -* -* Parameters -* ========== -* -* TRANS - CHARACTER*1. -* On entry, TRANS specifies the operation to be performed as -* follows: -* -* TRANS = 'N' or 'n' y := alpha*A*x + beta*y. -* -* TRANS = 'T' or 't' y := alpha*A'*x + beta*y. -* -* TRANS = 'C' or 'c' y := alpha*A'*x + beta*y. -* -* Unchanged on exit. -* -* M - INTEGER. -* On entry, M specifies the number of rows of the matrix A. -* M must be at least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry, the leading m by n part of the array A must -* contain the matrix of coefficients. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, m ). -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of DIMENSION at least -* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' -* and at least -* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. -* Before entry, the incremented array X must contain the -* vector x. -* Unchanged on exit. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* BETA - DOUBLE PRECISION. -* On entry, BETA specifies the scalar beta. When BETA is -* supplied as zero then Y need not be set on input. -* Unchanged on exit. -* -* Y - DOUBLE PRECISION array of DIMENSION at least -* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' -* and at least -* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. -* Before entry with BETA non-zero, the incremented array Y -* must contain the vector y. On exit, Y is overwritten by the -* updated vector y. -* -* INCY - INTEGER. -* On entry, INCY specifies the increment for the elements of -* Y. INCY must not be zero. -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP - INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( TRANS, 'N' ).AND. - $ .NOT.LSAME( TRANS, 'T' ).AND. - $ .NOT.LSAME( TRANS, 'C' ) )THEN - INFO = 1 - ELSE IF( M.LT.0 )THEN - INFO = 2 - ELSE IF( N.LT.0 )THEN - INFO = 3 - ELSE IF( LDA.LT.MAX( 1, M ) )THEN - INFO = 6 - ELSE IF( INCX.EQ.0 )THEN - INFO = 8 - ELSE IF( INCY.EQ.0 )THEN - INFO = 11 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DGEMV ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. - $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) - $ RETURN -* -* Set LENX and LENY, the lengths of the vectors x and y, and set -* up the start points in X and Y. -* - IF( LSAME( TRANS, 'N' ) )THEN - LENX = N - LENY = M - ELSE - LENX = M - LENY = N - END IF - IF( INCX.GT.0 )THEN - KX = 1 - ELSE - KX = 1 - ( LENX - 1 )*INCX - END IF - IF( INCY.GT.0 )THEN - KY = 1 - ELSE - KY = 1 - ( LENY - 1 )*INCY - END IF -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through A. -* -* First form y := beta*y. -* - IF( BETA.NE.ONE )THEN - IF( INCY.EQ.1 )THEN - IF( BETA.EQ.ZERO )THEN - DO 10, I = 1, LENY - Y( I ) = ZERO - 10 CONTINUE - ELSE - DO 20, I = 1, LENY - Y( I ) = BETA*Y( I ) - 20 CONTINUE - END IF - ELSE - IY = KY - IF( BETA.EQ.ZERO )THEN - DO 30, I = 1, LENY - Y( IY ) = ZERO - IY = IY + INCY - 30 CONTINUE - ELSE - DO 40, I = 1, LENY - Y( IY ) = BETA*Y( IY ) - IY = IY + INCY - 40 CONTINUE - END IF - END IF - END IF - IF( ALPHA.EQ.ZERO ) - $ RETURN - IF( LSAME( TRANS, 'N' ) )THEN -* -* Form y := alpha*A*x + y. -* - JX = KX - IF( INCY.EQ.1 )THEN - DO 60, J = 1, N - IF( X( JX ).NE.ZERO )THEN - TEMP = ALPHA*X( JX ) - DO 50, I = 1, M - Y( I ) = Y( I ) + TEMP*A( I, J ) - 50 CONTINUE - END IF - JX = JX + INCX - 60 CONTINUE - ELSE - DO 80, J = 1, N - IF( X( JX ).NE.ZERO )THEN - TEMP = ALPHA*X( JX ) - IY = KY - DO 70, I = 1, M - Y( IY ) = Y( IY ) + TEMP*A( I, J ) - IY = IY + INCY - 70 CONTINUE - END IF - JX = JX + INCX - 80 CONTINUE - END IF - ELSE -* -* Form y := alpha*A'*x + y. -* - JY = KY - IF( INCX.EQ.1 )THEN - DO 100, J = 1, N - TEMP = ZERO - DO 90, I = 1, M - TEMP = TEMP + A( I, J )*X( I ) - 90 CONTINUE - Y( JY ) = Y( JY ) + ALPHA*TEMP - JY = JY + INCY - 100 CONTINUE - ELSE - DO 120, J = 1, N - TEMP = ZERO - IX = KX - DO 110, I = 1, M - TEMP = TEMP + A( I, J )*X( IX ) - IX = IX + INCX - 110 CONTINUE - Y( JY ) = Y( JY ) + ALPHA*TEMP - JY = JY + INCY - 120 CONTINUE - END IF - END IF -* - RETURN -* -* End of DGEMV . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgeqr2.f b/cpp/nudg++/trunk/BlasLapack/dgeqr2.f deleted file mode 100644 index b1ea515..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgeqr2.f +++ /dev/null @@ -1,122 +0,0 @@ - SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGEQR2 computes a QR factorization of a real m by n matrix A: -* A = Q * R. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the m by n matrix A. -* On exit, the elements on and above the diagonal of the array -* contain the min(m,n) by n upper trapezoidal matrix R (R is -* upper triangular if m >= n); the elements below the diagonal, -* with the array TAU, represent the orthogonal matrix Q as a -* product of elementary reflectors (see Further Details). -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The scalar factors of the elementary reflectors (see Further -* Details). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* Further Details -* =============== -* -* The matrix Q is represented as a product of elementary reflectors -* -* Q = H(1) H(2) . . . H(k), where k = min(m,n). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), -* and tau in TAU(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, K - DOUBLE PRECISION AII -* .. -* .. External Subroutines .. - EXTERNAL DLARF, DLARFG, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGEQR2', -INFO ) - RETURN - END IF -* - K = MIN( M, N ) -* - DO 10 I = 1, K -* -* Generate elementary reflector H(i) to annihilate A(i+1:m,i) -* - CALL DLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1, - $ TAU( I ) ) - IF( I.LT.N ) THEN -* -* Apply H(i) to A(i:m,i+1:n) from the left -* - AII = A( I, I ) - A( I, I ) = ONE - CALL DLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAU( I ), - $ A( I, I+1 ), LDA, WORK ) - A( I, I ) = AII - END IF - 10 CONTINUE - RETURN -* -* End of DGEQR2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgeqrf.f b/cpp/nudg++/trunk/BlasLapack/dgeqrf.f deleted file mode 100644 index 7a40b53..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgeqrf.f +++ /dev/null @@ -1,197 +0,0 @@ - SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGEQRF computes a QR factorization of a real M-by-N matrix A: -* A = Q * R. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the M-by-N matrix A. -* On exit, the elements on and above the diagonal of the array -* contain the min(M,N)-by-N upper trapezoidal matrix R (R is -* upper triangular if m >= n); the elements below the diagonal, -* with the array TAU, represent the orthogonal matrix Q as a -* product of min(m,n) elementary reflectors (see Further -* Details). -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The scalar factors of the elementary reflectors (see Further -* Details). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* For optimum performance LWORK >= N*NB, where NB is -* the optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* Further Details -* =============== -* -* The matrix Q is represented as a product of elementary reflectors -* -* Q = H(1) H(2) . . . H(k), where k = min(m,n). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), -* and tau in TAU(i). -* -* ===================================================================== -* -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB, - $ NBMIN, NX -* .. -* .. External Subroutines .. - EXTERNAL DGEQR2, DLARFB, DLARFT, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - NB = ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - LWKOPT = N*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -7 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGEQRF', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - K = MIN( M, N ) - IF( K.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NBMIN = 2 - NX = 0 - IWS = N - IF( NB.GT.1 .AND. NB.LT.K ) THEN -* -* Determine when to cross over from blocked to unblocked code. -* - NX = MAX( 0, ILAENV( 3, 'DGEQRF', ' ', M, N, -1, -1 ) ) - IF( NX.LT.K ) THEN -* -* Determine if workspace is large enough for blocked code. -* - LDWORK = N - IWS = LDWORK*NB - IF( LWORK.LT.IWS ) THEN -* -* Not enough workspace to use optimal NB: reduce NB and -* determine the minimum value of NB. -* - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DGEQRF', ' ', M, N, -1, - $ -1 ) ) - END IF - END IF - END IF -* - IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN -* -* Use blocked code initially -* - DO 10 I = 1, K - NX, NB - IB = MIN( K-I+1, NB ) -* -* Compute the QR factorization of the current block -* A(i:m,i:i+ib-1) -* - CALL DGEQR2( M-I+1, IB, A( I, I ), LDA, TAU( I ), WORK, - $ IINFO ) - IF( I+IB.LE.N ) THEN -* -* Form the triangular factor of the block reflector -* H = H(i) H(i+1) . . . H(i+ib-1) -* - CALL DLARFT( 'Forward', 'Columnwise', M-I+1, IB, - $ A( I, I ), LDA, TAU( I ), WORK, LDWORK ) -* -* Apply H' to A(i:m,i+ib:n) from the left -* - CALL DLARFB( 'Left', 'Transpose', 'Forward', - $ 'Columnwise', M-I+1, N-I-IB+1, IB, - $ A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ), - $ LDA, WORK( IB+1 ), LDWORK ) - END IF - 10 CONTINUE - ELSE - I = 1 - END IF -* -* Use unblocked code to factor the last or only block. -* - IF( I.LE.K ) - $ CALL DGEQR2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK, - $ IINFO ) -* - WORK( 1 ) = IWS - RETURN -* -* End of DGEQRF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dger.f b/cpp/nudg++/trunk/BlasLapack/dger.f deleted file mode 100644 index d316000..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dger.f +++ /dev/null @@ -1,157 +0,0 @@ - SUBROUTINE DGER ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) -* .. Scalar Arguments .. - DOUBLE PRECISION ALPHA - INTEGER INCX, INCY, LDA, M, N -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) -* .. -* -* Purpose -* ======= -* -* DGER performs the rank 1 operation -* -* A := alpha*x*y' + A, -* -* where alpha is a scalar, x is an m element vector, y is an n element -* vector and A is an m by n matrix. -* -* Parameters -* ========== -* -* M - INTEGER. -* On entry, M specifies the number of rows of the matrix A. -* M must be at least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of dimension at least -* ( 1 + ( m - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the m -* element vector x. -* Unchanged on exit. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* Y - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCY ) ). -* Before entry, the incremented array Y must contain the n -* element vector y. -* Unchanged on exit. -* -* INCY - INTEGER. -* On entry, INCY specifies the increment for the elements of -* Y. INCY must not be zero. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry, the leading m by n part of the array A must -* contain the matrix of coefficients. On exit, A is -* overwritten by the updated matrix. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, m ). -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP - INTEGER I, INFO, IX, J, JY, KX -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( M.LT.0 )THEN - INFO = 1 - ELSE IF( N.LT.0 )THEN - INFO = 2 - ELSE IF( INCX.EQ.0 )THEN - INFO = 5 - ELSE IF( INCY.EQ.0 )THEN - INFO = 7 - ELSE IF( LDA.LT.MAX( 1, M ) )THEN - INFO = 9 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DGER ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) - $ RETURN -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through A. -* - IF( INCY.GT.0 )THEN - JY = 1 - ELSE - JY = 1 - ( N - 1 )*INCY - END IF - IF( INCX.EQ.1 )THEN - DO 20, J = 1, N - IF( Y( JY ).NE.ZERO )THEN - TEMP = ALPHA*Y( JY ) - DO 10, I = 1, M - A( I, J ) = A( I, J ) + X( I )*TEMP - 10 CONTINUE - END IF - JY = JY + INCY - 20 CONTINUE - ELSE - IF( INCX.GT.0 )THEN - KX = 1 - ELSE - KX = 1 - ( M - 1 )*INCX - END IF - DO 40, J = 1, N - IF( Y( JY ).NE.ZERO )THEN - TEMP = ALPHA*Y( JY ) - IX = KX - DO 30, I = 1, M - A( I, J ) = A( I, J ) + X( IX )*TEMP - IX = IX + INCX - 30 CONTINUE - END IF - JY = JY + INCY - 40 CONTINUE - END IF -* - RETURN -* -* End of DGER . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgesv.f b/cpp/nudg++/trunk/BlasLapack/dgesv.f deleted file mode 100644 index 3dbd27f..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgesv.f +++ /dev/null @@ -1,108 +0,0 @@ - SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, LDB, N, NRHS -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - DOUBLE PRECISION A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DGESV computes the solution to a real system of linear equations -* A * X = B, -* where A is an N-by-N matrix and X and B are N-by-NRHS matrices. -* -* The LU decomposition with partial pivoting and row interchanges is -* used to factor A as -* A = P * L * U, -* where P is a permutation matrix, L is unit lower triangular, and U is -* upper triangular. The factored form of A is then used to solve the -* system of equations A * X = B. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of linear equations, i.e., the order of the -* matrix A. N >= 0. -* -* NRHS (input) INTEGER -* The number of right hand sides, i.e., the number of columns -* of the matrix B. NRHS >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the N-by-N coefficient matrix A. -* On exit, the factors L and U from the factorization -* A = P*L*U; the unit diagonal elements of L are not stored. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* IPIV (output) INTEGER array, dimension (N) -* The pivot indices that define the permutation matrix P; -* row i of the matrix was interchanged with row IPIV(i). -* -* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) -* On entry, the N-by-NRHS matrix of right hand side matrix B. -* On exit, if INFO = 0, the N-by-NRHS solution matrix X. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, U(i,i) is exactly zero. The factorization -* has been completed, but the factor U is exactly -* singular, so the solution could not be computed. -* -* ===================================================================== -* -* .. External Subroutines .. - EXTERNAL DGETRF, DGETRS, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( NRHS.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - ELSE IF( LDB.LT.MAX( 1, N ) ) THEN - INFO = -7 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGESV ', -INFO ) - RETURN - END IF -* -* Compute the LU factorization of A. -* - CALL DGETRF( N, N, A, LDA, IPIV, INFO ) - IF( INFO.EQ.0 ) THEN -* -* Solve the system A*X = B, overwriting B with X. -* - CALL DGETRS( 'No transpose', N, NRHS, A, LDA, IPIV, B, LDB, - $ INFO ) - END IF - RETURN -* -* End of DGESV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgesvd.f b/cpp/nudg++/trunk/BlasLapack/dgesvd.f deleted file mode 100644 index 95b9b3e..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgesvd.f +++ /dev/null @@ -1,3417 +0,0 @@ - SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, - $ WORK, LWORK, INFO ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1999 -* -* .. Scalar Arguments .. - CHARACTER JOBU, JOBVT - INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), S( * ), U( LDU, * ), - $ VT( LDVT, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DGESVD computes the singular value decomposition (SVD) of a real -* M-by-N matrix A, optionally computing the left and/or right singular -* vectors. The SVD is written -* -* A = U * SIGMA * transpose(V) -* -* where SIGMA is an M-by-N matrix which is zero except for its -* min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and -* V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA -* are the singular values of A; they are real and non-negative, and -* are returned in descending order. The first min(m,n) columns of -* U and V are the left and right singular vectors of A. -* -* Note that the routine returns V**T, not V. -* -* Arguments -* ========= -* -* JOBU (input) CHARACTER*1 -* Specifies options for computing all or part of the matrix U: -* = 'A': all M columns of U are returned in array U: -* = 'S': the first min(m,n) columns of U (the left singular -* vectors) are returned in the array U; -* = 'O': the first min(m,n) columns of U (the left singular -* vectors) are overwritten on the array A; -* = 'N': no columns of U (no left singular vectors) are -* computed. -* -* JOBVT (input) CHARACTER*1 -* Specifies options for computing all or part of the matrix -* V**T: -* = 'A': all N rows of V**T are returned in the array VT; -* = 'S': the first min(m,n) rows of V**T (the right singular -* vectors) are returned in the array VT; -* = 'O': the first min(m,n) rows of V**T (the right singular -* vectors) are overwritten on the array A; -* = 'N': no rows of V**T (no right singular vectors) are -* computed. -* -* JOBVT and JOBU cannot both be 'O'. -* -* M (input) INTEGER -* The number of rows of the input matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the input matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the M-by-N matrix A. -* On exit, -* if JOBU = 'O', A is overwritten with the first min(m,n) -* columns of U (the left singular vectors, -* stored columnwise); -* if JOBVT = 'O', A is overwritten with the first min(m,n) -* rows of V**T (the right singular vectors, -* stored rowwise); -* if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A -* are destroyed. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* S (output) DOUBLE PRECISION array, dimension (min(M,N)) -* The singular values of A, sorted so that S(i) >= S(i+1). -* -* U (output) DOUBLE PRECISION array, dimension (LDU,UCOL) -* (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'. -* If JOBU = 'A', U contains the M-by-M orthogonal matrix U; -* if JOBU = 'S', U contains the first min(m,n) columns of U -* (the left singular vectors, stored columnwise); -* if JOBU = 'N' or 'O', U is not referenced. -* -* LDU (input) INTEGER -* The leading dimension of the array U. LDU >= 1; if -* JOBU = 'S' or 'A', LDU >= M. -* -* VT (output) DOUBLE PRECISION array, dimension (LDVT,N) -* If JOBVT = 'A', VT contains the N-by-N orthogonal matrix -* V**T; -* if JOBVT = 'S', VT contains the first min(m,n) rows of -* V**T (the right singular vectors, stored rowwise); -* if JOBVT = 'N' or 'O', VT is not referenced. -* -* LDVT (input) INTEGER -* The leading dimension of the array VT. LDVT >= 1; if -* JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK; -* if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged -* superdiagonal elements of an upper bidiagonal matrix B -* whose diagonal is in S (not necessarily sorted). B -* satisfies A = U * B * VT, so it has the same singular values -* as A, and singular vectors related by U and VT. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= 1. -* LWORK >= MAX(3*MIN(M,N)+MAX(M,N),5*MIN(M,N)). -* For good performance, LWORK should generally be larger. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit. -* < 0: if INFO = -i, the i-th argument had an illegal value. -* > 0: if DBDSQR did not converge, INFO specifies how many -* superdiagonals of an intermediate bidiagonal form B -* did not converge to zero. See the description of WORK -* above for details. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY, WNTUA, WNTUAS, WNTUN, WNTUO, WNTUS, - $ WNTVA, WNTVAS, WNTVN, WNTVO, WNTVS - INTEGER BDSPAC, BLK, CHUNK, I, IE, IERR, IR, ISCL, - $ ITAU, ITAUP, ITAUQ, IU, IWORK, LDWRKR, LDWRKU, - $ MAXWRK, MINMN, MINWRK, MNTHR, NCU, NCVT, NRU, - $ NRVT, WRKBL - DOUBLE PRECISION ANRM, BIGNUM, EPS, SMLNUM -* .. -* .. Local Arrays .. - DOUBLE PRECISION DUM( 1 ) -* .. -* .. External Subroutines .. - EXTERNAL DBDSQR, DGEBRD, DGELQF, DGEMM, DGEQRF, DLACPY, - $ DLASCL, DLASET, DORGBR, DORGLQ, DORGQR, DORMBR, - $ XERBLA -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - DOUBLE PRECISION DLAMCH, DLANGE - EXTERNAL LSAME, ILAENV, DLAMCH, DLANGE -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - MINMN = MIN( M, N ) - MNTHR = ILAENV( 6, 'DGESVD', JOBU // JOBVT, M, N, 0, 0 ) - WNTUA = LSAME( JOBU, 'A' ) - WNTUS = LSAME( JOBU, 'S' ) - WNTUAS = WNTUA .OR. WNTUS - WNTUO = LSAME( JOBU, 'O' ) - WNTUN = LSAME( JOBU, 'N' ) - WNTVA = LSAME( JOBVT, 'A' ) - WNTVS = LSAME( JOBVT, 'S' ) - WNTVAS = WNTVA .OR. WNTVS - WNTVO = LSAME( JOBVT, 'O' ) - WNTVN = LSAME( JOBVT, 'N' ) - MINWRK = 1 - LQUERY = ( LWORK.EQ.-1 ) -* - IF( .NOT.( WNTUA .OR. WNTUS .OR. WNTUO .OR. WNTUN ) ) THEN - INFO = -1 - ELSE IF( .NOT.( WNTVA .OR. WNTVS .OR. WNTVO .OR. WNTVN ) .OR. - $ ( WNTVO .AND. WNTUO ) ) THEN - INFO = -2 - ELSE IF( M.LT.0 ) THEN - INFO = -3 - ELSE IF( N.LT.0 ) THEN - INFO = -4 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -6 - ELSE IF( LDU.LT.1 .OR. ( WNTUAS .AND. LDU.LT.M ) ) THEN - INFO = -9 - ELSE IF( LDVT.LT.1 .OR. ( WNTVA .AND. LDVT.LT.N ) .OR. - $ ( WNTVS .AND. LDVT.LT.MINMN ) ) THEN - INFO = -11 - END IF -* -* Compute workspace -* (Note: Comments in the code beginning "Workspace:" describe the -* minimal amount of workspace needed at that point in the code, -* as well as the preferred amount for good performance. -* NB refers to the optimal block size for the immediately -* following subroutine, as returned by ILAENV.) -* - IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) .AND. M.GT.0 .AND. - $ N.GT.0 ) THEN - IF( M.GE.N ) THEN -* -* Compute space needed for DBDSQR -* - BDSPAC = 5*N - IF( M.GE.MNTHR ) THEN - IF( WNTUN ) THEN -* -* Path 1 (M much larger than N, JOBU='N') -* - MAXWRK = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, - $ -1 ) - MAXWRK = MAX( MAXWRK, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - IF( WNTVO .OR. WNTVAS ) - $ MAXWRK = MAX( MAXWRK, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - MAXWRK = MAX( MAXWRK, BDSPAC ) - MINWRK = MAX( 4*N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUO .AND. WNTVN ) THEN -* -* Path 2 (M much larger than N, JOBU='O', JOBVT='N') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, - $ N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = MAX( N*N+WRKBL, N*N+M*N+N ) - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUO .AND. WNTVAS ) THEN -* -* Path 3 (M much larger than N, JOBU='O', JOBVT='S' or -* 'A') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, - $ N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = MAX( N*N+WRKBL, N*N+M*N+N ) - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUS .AND. WNTVN ) THEN -* -* Path 4 (M much larger than N, JOBU='S', JOBVT='N') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, - $ N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = N*N + WRKBL - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUS .AND. WNTVO ) THEN -* -* Path 5 (M much larger than N, JOBU='S', JOBVT='O') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, - $ N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = 2*N*N + WRKBL - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUS .AND. WNTVAS ) THEN -* -* Path 6 (M much larger than N, JOBU='S', JOBVT='S' or -* 'A') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, - $ N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = N*N + WRKBL - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUA .AND. WNTVN ) THEN -* -* Path 7 (M much larger than N, JOBU='A', JOBVT='N') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'DORGQR', ' ', M, - $ M, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = N*N + WRKBL - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUA .AND. WNTVO ) THEN -* -* Path 8 (M much larger than N, JOBU='A', JOBVT='O') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'DORGQR', ' ', M, - $ M, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = 2*N*N + WRKBL - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTUA .AND. WNTVAS ) THEN -* -* Path 9 (M much larger than N, JOBU='A', JOBVT='S' or -* 'A') -* - WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'DORGQR', ' ', M, - $ M, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+2*N* - $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = N*N + WRKBL - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - END IF - ELSE -* -* Path 10 (M at least N, but not much larger) -* - MAXWRK = 3*N + ( M+N )*ILAENV( 1, 'DGEBRD', ' ', M, N, - $ -1, -1 ) - IF( WNTUS .OR. WNTUO ) - $ MAXWRK = MAX( MAXWRK, 3*N+N* - $ ILAENV( 1, 'DORGBR', 'Q', M, N, N, -1 ) ) - IF( WNTUA ) - $ MAXWRK = MAX( MAXWRK, 3*N+M* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, N, -1 ) ) - IF( .NOT.WNTVN ) - $ MAXWRK = MAX( MAXWRK, 3*N+( N-1 )* - $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) - MAXWRK = MAX( MAXWRK, BDSPAC ) - MINWRK = MAX( 3*N+M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - END IF - ELSE -* -* Compute space needed for DBDSQR -* - BDSPAC = 5*M - IF( N.GE.MNTHR ) THEN - IF( WNTVN ) THEN -* -* Path 1t(N much larger than M, JOBVT='N') -* - MAXWRK = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, - $ -1 ) - MAXWRK = MAX( MAXWRK, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - IF( WNTUO .OR. WNTUAS ) - $ MAXWRK = MAX( MAXWRK, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) - MAXWRK = MAX( MAXWRK, BDSPAC ) - MINWRK = MAX( 4*M, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVO .AND. WNTUN ) THEN -* -* Path 2t(N much larger than M, JOBU='N', JOBVT='O') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = MAX( M*M+WRKBL, M*M+M*N+M ) - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVO .AND. WNTUAS ) THEN -* -* Path 3t(N much larger than M, JOBU='S' or 'A', -* JOBVT='O') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = MAX( M*M+WRKBL, M*M+M*N+M ) - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVS .AND. WNTUN ) THEN -* -* Path 4t(N much larger than M, JOBU='N', JOBVT='S') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = M*M + WRKBL - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVS .AND. WNTUO ) THEN -* -* Path 5t(N much larger than M, JOBU='O', JOBVT='S') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = 2*M*M + WRKBL - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVS .AND. WNTUAS ) THEN -* -* Path 6t(N much larger than M, JOBU='S' or 'A', -* JOBVT='S') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = M*M + WRKBL - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVA .AND. WNTUN ) THEN -* -* Path 7t(N much larger than M, JOBU='N', JOBVT='A') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'DORGLQ', ' ', N, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = M*M + WRKBL - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVA .AND. WNTUO ) THEN -* -* Path 8t(N much larger than M, JOBU='O', JOBVT='A') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'DORGLQ', ' ', N, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = 2*M*M + WRKBL - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - ELSE IF( WNTVA .AND. WNTUAS ) THEN -* -* Path 9t(N much larger than M, JOBU='S' or 'A', -* JOBVT='A') -* - WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) - WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'DORGLQ', ' ', N, - $ N, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+2*M* - $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) - WRKBL = MAX( WRKBL, BDSPAC ) - MAXWRK = M*M + WRKBL - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - END IF - ELSE -* -* Path 10t(N greater than M, but not much larger) -* - MAXWRK = 3*M + ( M+N )*ILAENV( 1, 'DGEBRD', ' ', M, N, - $ -1, -1 ) - IF( WNTVS .OR. WNTVO ) - $ MAXWRK = MAX( MAXWRK, 3*M+M* - $ ILAENV( 1, 'DORGBR', 'P', M, N, M, -1 ) ) - IF( WNTVA ) - $ MAXWRK = MAX( MAXWRK, 3*M+N* - $ ILAENV( 1, 'DORGBR', 'P', N, N, M, -1 ) ) - IF( .NOT.WNTUN ) - $ MAXWRK = MAX( MAXWRK, 3*M+( M-1 )* - $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) - MAXWRK = MAX( MAXWRK, BDSPAC ) - MINWRK = MAX( 3*M+N, BDSPAC ) - MAXWRK = MAX( MAXWRK, MINWRK ) - END IF - END IF - WORK( 1 ) = MAXWRK - END IF -* - IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN - INFO = -13 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGESVD', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 ) THEN - IF( LWORK.GE.1 ) - $ WORK( 1 ) = ONE - RETURN - END IF -* -* Get machine constants -* - EPS = DLAMCH( 'P' ) - SMLNUM = SQRT( DLAMCH( 'S' ) ) / EPS - BIGNUM = ONE / SMLNUM -* -* Scale A if max element outside range [SMLNUM,BIGNUM] -* - ANRM = DLANGE( 'M', M, N, A, LDA, DUM ) - ISCL = 0 - IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN - ISCL = 1 - CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, IERR ) - ELSE IF( ANRM.GT.BIGNUM ) THEN - ISCL = 1 - CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, IERR ) - END IF -* - IF( M.GE.N ) THEN -* -* A has at least as many rows as columns. If A has sufficiently -* more rows than columns, first reduce using the QR -* decomposition (if sufficient workspace available) -* - IF( M.GE.MNTHR ) THEN -* - IF( WNTUN ) THEN -* -* Path 1 (M much larger than N, JOBU='N') -* No left singular vectors to be computed -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Zero out below R -* - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), LDA ) - IE = 1 - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in A -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, - $ IERR ) - NCVT = 0 - IF( WNTVO .OR. WNTVAS ) THEN -* -* If right singular vectors desired, generate P'. -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - NCVT = N - END IF - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing right -* singular vectors of A in A if desired -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, NCVT, 0, 0, S, WORK( IE ), A, LDA, - $ DUM, 1, DUM, 1, WORK( IWORK ), INFO ) -* -* If right singular vectors desired in VT, copy them there -* - IF( WNTVAS ) - $ CALL DLACPY( 'F', N, N, A, LDA, VT, LDVT ) -* - ELSE IF( WNTUO .AND. WNTVN ) THEN -* -* Path 2 (M much larger than N, JOBU='O', JOBVT='N') -* N left singular vectors to be overwritten on A and -* no right singular vectors to be computed -* - IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+LDA*N ) THEN -* -* WORK(IU) is LDA by N, WORK(IR) is LDA by N -* - LDWRKU = LDA - LDWRKR = LDA - ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+N*N ) THEN -* -* WORK(IU) is LDA by N, WORK(IR) is N by N -* - LDWRKU = LDA - LDWRKR = N - ELSE -* -* WORK(IU) is LDWRKU by N, WORK(IR) is N by N -* - LDWRKU = ( LWORK-N*N-N ) / N - LDWRKR = N - END IF - ITAU = IR + LDWRKR*N - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to WORK(IR) and zero out below it -* - CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, WORK( IR+1 ), - $ LDWRKR ) -* -* Generate Q in A -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in WORK(IR) -* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate left vectors bidiagonalizing R -* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IR) -* (Workspace: need N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM, 1, - $ WORK( IR ), LDWRKR, DUM, 1, - $ WORK( IWORK ), INFO ) - IU = IE + N -* -* Multiply Q in A by left singular vectors of R in -* WORK(IR), storing result in WORK(IU) and copying to A -* (Workspace: need N*N+2*N, prefer N*N+M*N+N) -* - DO 10 I = 1, M, LDWRKU - CHUNK = MIN( M-I+1, LDWRKU ) - CALL DGEMM( 'N', 'N', CHUNK, N, N, ONE, A( I, 1 ), - $ LDA, WORK( IR ), LDWRKR, ZERO, - $ WORK( IU ), LDWRKU ) - CALL DLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU, - $ A( I, 1 ), LDA ) - 10 CONTINUE -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - IE = 1 - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize A -* (Workspace: need 3*N+M, prefer 3*N+(M+N)*NB) -* - CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate left vectors bidiagonalizing A -* (Workspace: need 4*N, prefer 3*N+N*NB) -* - CALL DORGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, 0, M, 0, S, WORK( IE ), DUM, 1, - $ A, LDA, DUM, 1, WORK( IWORK ), INFO ) -* - END IF -* - ELSE IF( WNTUO .AND. WNTVAS ) THEN -* -* Path 3 (M much larger than N, JOBU='O', JOBVT='S' or 'A') -* N left singular vectors to be overwritten on A and -* N right singular vectors to be computed in VT -* - IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+LDA*N ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is LDA by N -* - LDWRKU = LDA - LDWRKR = LDA - ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+N*N ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is N by N -* - LDWRKU = LDA - LDWRKR = N - ELSE -* -* WORK(IU) is LDWRKU by N and WORK(IR) is N by N -* - LDWRKU = ( LWORK-N*N-N ) / N - LDWRKR = N - END IF - ITAU = IR + LDWRKR*N - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to VT, zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, VT( 2, 1 ), - $ LDVT ) -* -* Generate Q in A -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in VT, copying result to WORK(IR) -* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', N, N, VT, LDVT, WORK( IR ), LDWRKR ) -* -* Generate left vectors bidiagonalizing R in WORK(IR) -* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right vectors bidiagonalizing R in VT -* (Workspace: need N*N+4*N-1, prefer N*N+3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IR) and computing right -* singular vectors of R in VT -* (Workspace: need N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT, LDVT, - $ WORK( IR ), LDWRKR, DUM, 1, - $ WORK( IWORK ), INFO ) - IU = IE + N -* -* Multiply Q in A by left singular vectors of R in -* WORK(IR), storing result in WORK(IU) and copying to A -* (Workspace: need N*N+2*N, prefer N*N+M*N+N) -* - DO 20 I = 1, M, LDWRKU - CHUNK = MIN( M-I+1, LDWRKU ) - CALL DGEMM( 'N', 'N', CHUNK, N, N, ONE, A( I, 1 ), - $ LDA, WORK( IR ), LDWRKR, ZERO, - $ WORK( IU ), LDWRKU ) - CALL DLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU, - $ A( I, 1 ), LDA ) - 20 CONTINUE -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to VT, zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, VT( 2, 1 ), - $ LDVT ) -* -* Generate Q in A -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in VT -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply Q in A by left vectors bidiagonalizing R -* (Workspace: need 3*N+M, prefer 3*N+M*NB) -* - CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, - $ WORK( ITAUQ ), A, LDA, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right vectors bidiagonalizing R in VT -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in A and computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), VT, LDVT, - $ A, LDA, DUM, 1, WORK( IWORK ), INFO ) -* - END IF -* - ELSE IF( WNTUS ) THEN -* - IF( WNTVN ) THEN -* -* Path 4 (M much larger than N, JOBU='S', JOBVT='N') -* N left singular vectors to be computed in U and -* no right singular vectors to be computed -* - IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.WRKBL+LDA*N ) THEN -* -* WORK(IR) is LDA by N -* - LDWRKR = LDA - ELSE -* -* WORK(IR) is N by N -* - LDWRKR = N - END IF - ITAU = IR + LDWRKR*N - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to WORK(IR), zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), - $ LDWRKR ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, - $ WORK( IR+1 ), LDWRKR ) -* -* Generate Q in A -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in WORK(IR) -* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left vectors bidiagonalizing R in WORK(IR) -* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IR) -* (Workspace: need N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM, - $ 1, WORK( IR ), LDWRKR, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply Q in A by left singular vectors of R in -* WORK(IR), storing result in U -* (Workspace: need N*N) -* - CALL DGEMM( 'N', 'N', M, N, N, ONE, A, LDA, - $ WORK( IR ), LDWRKR, ZERO, U, LDU ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Zero out below R in A -* - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), - $ LDA ) -* -* Bidiagonalize R in A -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply Q in U by left vectors bidiagonalizing R -* (Workspace: need 3*N+M, prefer 3*N+M*NB) -* - CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, - $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, 0, M, 0, S, WORK( IE ), DUM, - $ 1, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTVO ) THEN -* -* Path 5 (M much larger than N, JOBU='S', JOBVT='O') -* N left singular vectors to be computed in U and -* N right singular vectors to be overwritten on A -* - IF( LWORK.GE.2*N*N+MAX( 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+2*LDA*N ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is LDA by N -* - LDWRKU = LDA - IR = IU + LDWRKU*N - LDWRKR = LDA - ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is N by N -* - LDWRKU = LDA - IR = IU + LDWRKU*N - LDWRKR = N - ELSE -* -* WORK(IU) is N by N and WORK(IR) is N by N -* - LDWRKU = N - IR = IU + LDWRKU*N - LDWRKR = N - END IF - ITAU = IR + LDWRKR*N - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to WORK(IU), zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, - $ WORK( IU+1 ), LDWRKU ) -* -* Generate Q in A -* (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) -* - CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in WORK(IU), copying result to -* WORK(IR) -* (Workspace: need 2*N*N+4*N, -* prefer 2*N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, - $ WORK( IR ), LDWRKR ) -* -* Generate left bidiagonalizing vectors in WORK(IU) -* (Workspace: need 2*N*N+4*N, prefer 2*N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in WORK(IR) -* (Workspace: need 2*N*N+4*N-1, -* prefer 2*N*N+3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, WORK( IR ), LDWRKR, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IU) and computing -* right singular vectors of R in WORK(IR) -* (Workspace: need 2*N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), - $ WORK( IR ), LDWRKR, WORK( IU ), - $ LDWRKU, DUM, 1, WORK( IWORK ), INFO ) -* -* Multiply Q in A by left singular vectors of R in -* WORK(IU), storing result in U -* (Workspace: need N*N) -* - CALL DGEMM( 'N', 'N', M, N, N, ONE, A, LDA, - $ WORK( IU ), LDWRKU, ZERO, U, LDU ) -* -* Copy right singular vectors of R to A -* (Workspace: need N*N) -* - CALL DLACPY( 'F', N, N, WORK( IR ), LDWRKR, A, - $ LDA ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Zero out below R in A -* - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), - $ LDA ) -* -* Bidiagonalize R in A -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply Q in U by left vectors bidiagonalizing R -* (Workspace: need 3*N+M, prefer 3*N+M*NB) -* - CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, - $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right vectors bidiagonalizing R in A -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U and computing right -* singular vectors of A in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), A, - $ LDA, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTVAS ) THEN -* -* Path 6 (M much larger than N, JOBU='S', JOBVT='S' -* or 'A') -* N left singular vectors to be computed in U and -* N right singular vectors to be computed in VT -* - IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+LDA*N ) THEN -* -* WORK(IU) is LDA by N -* - LDWRKU = LDA - ELSE -* -* WORK(IU) is N by N -* - LDWRKU = N - END IF - ITAU = IU + LDWRKU*N - IWORK = ITAU + N -* -* Compute A=Q*R -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to WORK(IU), zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, - $ WORK( IU+1 ), LDWRKU ) -* -* Generate Q in A -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in WORK(IU), copying result to VT -* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT, - $ LDVT ) -* -* Generate left bidiagonalizing vectors in WORK(IU) -* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in VT -* (Workspace: need N*N+4*N-1, -* prefer N*N+3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IU) and computing -* right singular vectors of R in VT -* (Workspace: need N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT, - $ LDVT, WORK( IU ), LDWRKU, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply Q in A by left singular vectors of R in -* WORK(IU), storing result in U -* (Workspace: need N*N) -* - CALL DGEMM( 'N', 'N', M, N, N, ONE, A, LDA, - $ WORK( IU ), LDWRKU, ZERO, U, LDU ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to VT, zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, VT( 2, 1 ), - $ LDVT ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in VT -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply Q in U by left bidiagonalizing vectors -* in VT -* (Workspace: need 3*N+M, prefer 3*N+M*NB) -* - CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, - $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in VT -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U and computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), VT, - $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - END IF -* - ELSE IF( WNTUA ) THEN -* - IF( WNTVN ) THEN -* -* Path 7 (M much larger than N, JOBU='A', JOBVT='N') -* M left singular vectors to be computed in U and -* no right singular vectors to be computed -* - IF( LWORK.GE.N*N+MAX( N+M, 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.WRKBL+LDA*N ) THEN -* -* WORK(IR) is LDA by N -* - LDWRKR = LDA - ELSE -* -* WORK(IR) is N by N -* - LDWRKR = N - END IF - ITAU = IR + LDWRKR*N - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Copy R to WORK(IR), zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), - $ LDWRKR ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, - $ WORK( IR+1 ), LDWRKR ) -* -* Generate Q in U -* (Workspace: need N*N+N+M, prefer N*N+N+M*NB) -* - CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in WORK(IR) -* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in WORK(IR) -* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IR) -* (Workspace: need N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM, - $ 1, WORK( IR ), LDWRKR, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply Q in U by left singular vectors of R in -* WORK(IR), storing result in A -* (Workspace: need N*N) -* - CALL DGEMM( 'N', 'N', M, N, N, ONE, U, LDU, - $ WORK( IR ), LDWRKR, ZERO, A, LDA ) -* -* Copy left singular vectors of A from A to U -* - CALL DLACPY( 'F', M, N, A, LDA, U, LDU ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need N+M, prefer N+M*NB) -* - CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Zero out below R in A -* - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), - $ LDA ) -* -* Bidiagonalize R in A -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply Q in U by left bidiagonalizing vectors -* in A -* (Workspace: need 3*N+M, prefer 3*N+M*NB) -* - CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, - $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, 0, M, 0, S, WORK( IE ), DUM, - $ 1, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTVO ) THEN -* -* Path 8 (M much larger than N, JOBU='A', JOBVT='O') -* M left singular vectors to be computed in U and -* N right singular vectors to be overwritten on A -* - IF( LWORK.GE.2*N*N+MAX( N+M, 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+2*LDA*N ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is LDA by N -* - LDWRKU = LDA - IR = IU + LDWRKU*N - LDWRKR = LDA - ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is N by N -* - LDWRKU = LDA - IR = IU + LDWRKU*N - LDWRKR = N - ELSE -* -* WORK(IU) is N by N and WORK(IR) is N by N -* - LDWRKU = N - IR = IU + LDWRKU*N - LDWRKR = N - END IF - ITAU = IR + LDWRKR*N - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need 2*N*N+N+M, prefer 2*N*N+N+M*NB) -* - CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to WORK(IU), zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, - $ WORK( IU+1 ), LDWRKU ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in WORK(IU), copying result to -* WORK(IR) -* (Workspace: need 2*N*N+4*N, -* prefer 2*N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, - $ WORK( IR ), LDWRKR ) -* -* Generate left bidiagonalizing vectors in WORK(IU) -* (Workspace: need 2*N*N+4*N, prefer 2*N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in WORK(IR) -* (Workspace: need 2*N*N+4*N-1, -* prefer 2*N*N+3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, WORK( IR ), LDWRKR, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IU) and computing -* right singular vectors of R in WORK(IR) -* (Workspace: need 2*N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), - $ WORK( IR ), LDWRKR, WORK( IU ), - $ LDWRKU, DUM, 1, WORK( IWORK ), INFO ) -* -* Multiply Q in U by left singular vectors of R in -* WORK(IU), storing result in A -* (Workspace: need N*N) -* - CALL DGEMM( 'N', 'N', M, N, N, ONE, U, LDU, - $ WORK( IU ), LDWRKU, ZERO, A, LDA ) -* -* Copy left singular vectors of A from A to U -* - CALL DLACPY( 'F', M, N, A, LDA, U, LDU ) -* -* Copy right singular vectors of R from WORK(IR) to A -* - CALL DLACPY( 'F', N, N, WORK( IR ), LDWRKR, A, - $ LDA ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need N+M, prefer N+M*NB) -* - CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Zero out below R in A -* - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), - $ LDA ) -* -* Bidiagonalize R in A -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply Q in U by left bidiagonalizing vectors -* in A -* (Workspace: need 3*N+M, prefer 3*N+M*NB) -* - CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, - $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in A -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U and computing right -* singular vectors of A in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), A, - $ LDA, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTVAS ) THEN -* -* Path 9 (M much larger than N, JOBU='A', JOBVT='S' -* or 'A') -* M left singular vectors to be computed in U and -* N right singular vectors to be computed in VT -* - IF( LWORK.GE.N*N+MAX( N+M, 4*N, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+LDA*N ) THEN -* -* WORK(IU) is LDA by N -* - LDWRKU = LDA - ELSE -* -* WORK(IU) is N by N -* - LDWRKU = N - END IF - ITAU = IU + LDWRKU*N - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need N*N+N+M, prefer N*N+N+M*NB) -* - CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R to WORK(IU), zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, - $ WORK( IU+1 ), LDWRKU ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in WORK(IU), copying result to VT -* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) -* - CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT, - $ LDVT ) -* -* Generate left bidiagonalizing vectors in WORK(IU) -* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) -* - CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in VT -* (Workspace: need N*N+4*N-1, -* prefer N*N+3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of R in WORK(IU) and computing -* right singular vectors of R in VT -* (Workspace: need N*N+BDSPAC) -* - CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT, - $ LDVT, WORK( IU ), LDWRKU, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply Q in U by left singular vectors of R in -* WORK(IU), storing result in A -* (Workspace: need N*N) -* - CALL DGEMM( 'N', 'N', M, N, N, ONE, U, LDU, - $ WORK( IU ), LDWRKU, ZERO, A, LDA ) -* -* Copy left singular vectors of A from A to U -* - CALL DLACPY( 'F', M, N, A, LDA, U, LDU ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + N -* -* Compute A=Q*R, copying result to U -* (Workspace: need 2*N, prefer N+N*NB) -* - CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) -* -* Generate Q in U -* (Workspace: need N+M, prefer N+M*NB) -* - CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy R from A to VT, zeroing out below it -* - CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) - CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, VT( 2, 1 ), - $ LDVT ) - IE = ITAU - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize R in VT -* (Workspace: need 4*N, prefer 3*N+2*N*NB) -* - CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply Q in U by left bidiagonalizing vectors -* in VT -* (Workspace: need 3*N+M, prefer 3*N+M*NB) -* - CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, - $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in VT -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + N -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U and computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), VT, - $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - END IF -* - END IF -* - ELSE -* -* M .LT. MNTHR -* -* Path 10 (M at least N, but not much larger) -* Reduce to bidiagonal form without QR decomposition -* - IE = 1 - ITAUQ = IE + N - ITAUP = ITAUQ + N - IWORK = ITAUP + N -* -* Bidiagonalize A -* (Workspace: need 3*N+M, prefer 3*N+(M+N)*NB) -* - CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, - $ IERR ) - IF( WNTUAS ) THEN -* -* If left singular vectors desired in U, copy result to U -* and generate left bidiagonalizing vectors in U -* (Workspace: need 3*N+NCU, prefer 3*N+NCU*NB) -* - CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) - IF( WNTUS ) - $ NCU = N - IF( WNTUA ) - $ NCU = M - CALL DORGBR( 'Q', M, NCU, N, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IF( WNTVAS ) THEN -* -* If right singular vectors desired in VT, copy result to -* VT and generate right bidiagonalizing vectors in VT -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) - CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IF( WNTUO ) THEN -* -* If left singular vectors desired in A, generate left -* bidiagonalizing vectors in A -* (Workspace: need 4*N, prefer 3*N+N*NB) -* - CALL DORGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IF( WNTVO ) THEN -* -* If right singular vectors desired in A, generate right -* bidiagonalizing vectors in A -* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) -* - CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IWORK = IE + N - IF( WNTUAS .OR. WNTUO ) - $ NRU = M - IF( WNTUN ) - $ NRU = 0 - IF( WNTVAS .OR. WNTVO ) - $ NCVT = N - IF( WNTVN ) - $ NCVT = 0 - IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN -* -* Perform bidiagonal QR iteration, if desired, computing -* left singular vectors in U and computing right singular -* vectors in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, NCVT, NRU, 0, S, WORK( IE ), VT, - $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), INFO ) - ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN -* -* Perform bidiagonal QR iteration, if desired, computing -* left singular vectors in U and computing right singular -* vectors in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, NCVT, NRU, 0, S, WORK( IE ), A, LDA, - $ U, LDU, DUM, 1, WORK( IWORK ), INFO ) - ELSE -* -* Perform bidiagonal QR iteration, if desired, computing -* left singular vectors in A and computing right singular -* vectors in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', N, NCVT, NRU, 0, S, WORK( IE ), VT, - $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), INFO ) - END IF -* - END IF -* - ELSE -* -* A has more columns than rows. If A has sufficiently more -* columns than rows, first reduce using the LQ decomposition (if -* sufficient workspace available) -* - IF( N.GE.MNTHR ) THEN -* - IF( WNTVN ) THEN -* -* Path 1t(N much larger than M, JOBVT='N') -* No right singular vectors to be computed -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Zero out above L -* - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), LDA ) - IE = 1 - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in A -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, - $ IERR ) - IF( WNTUO .OR. WNTUAS ) THEN -* -* If left singular vectors desired, generate Q -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IWORK = IE + M - NRU = 0 - IF( WNTUO .OR. WNTUAS ) - $ NRU = M -* -* Perform bidiagonal QR iteration, computing left singular -* vectors of A in A if desired -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, 0, NRU, 0, S, WORK( IE ), DUM, 1, A, - $ LDA, DUM, 1, WORK( IWORK ), INFO ) -* -* If left singular vectors desired in U, copy them there -* - IF( WNTUAS ) - $ CALL DLACPY( 'F', M, M, A, LDA, U, LDU ) -* - ELSE IF( WNTVO .AND. WNTUN ) THEN -* -* Path 2t(N much larger than M, JOBU='N', JOBVT='O') -* M right singular vectors to be overwritten on A and -* no left singular vectors to be computed -* - IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+LDA*M ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is LDA by M -* - LDWRKU = LDA - CHUNK = N - LDWRKR = LDA - ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+M*M ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is M by M -* - LDWRKU = LDA - CHUNK = N - LDWRKR = M - ELSE -* -* WORK(IU) is M by CHUNK and WORK(IR) is M by M -* - LDWRKU = M - CHUNK = ( LWORK-M*M-M ) / M - LDWRKR = M - END IF - ITAU = IR + LDWRKR*M - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to WORK(IR) and zero out above it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IR ), LDWRKR ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, - $ WORK( IR+LDWRKR ), LDWRKR ) -* -* Generate Q in A -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IR) -* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate right vectors bidiagonalizing L -* (Workspace: need M*M+4*M-1, prefer M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing right -* singular vectors of L in WORK(IR) -* (Workspace: need M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ), - $ WORK( IR ), LDWRKR, DUM, 1, DUM, 1, - $ WORK( IWORK ), INFO ) - IU = IE + M -* -* Multiply right singular vectors of L in WORK(IR) by Q -* in A, storing result in WORK(IU) and copying to A -* (Workspace: need M*M+2*M, prefer M*M+M*N+M) -* - DO 30 I = 1, N, CHUNK - BLK = MIN( N-I+1, CHUNK ) - CALL DGEMM( 'N', 'N', M, BLK, M, ONE, WORK( IR ), - $ LDWRKR, A( 1, I ), LDA, ZERO, - $ WORK( IU ), LDWRKU ) - CALL DLACPY( 'F', M, BLK, WORK( IU ), LDWRKU, - $ A( 1, I ), LDA ) - 30 CONTINUE -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - IE = 1 - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize A -* (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB) -* - CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate right vectors bidiagonalizing A -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing right -* singular vectors of A in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'L', M, N, 0, 0, S, WORK( IE ), A, LDA, - $ DUM, 1, DUM, 1, WORK( IWORK ), INFO ) -* - END IF -* - ELSE IF( WNTVO .AND. WNTUAS ) THEN -* -* Path 3t(N much larger than M, JOBU='S' or 'A', JOBVT='O') -* M right singular vectors to be overwritten on A and -* M left singular vectors to be computed in U -* - IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+LDA*M ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is LDA by M -* - LDWRKU = LDA - CHUNK = N - LDWRKR = LDA - ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+M*M ) THEN -* -* WORK(IU) is LDA by N and WORK(IR) is M by M -* - LDWRKU = LDA - CHUNK = N - LDWRKR = M - ELSE -* -* WORK(IU) is M by CHUNK and WORK(IR) is M by M -* - LDWRKU = M - CHUNK = ( LWORK-M*M-M ) / M - LDWRKR = M - END IF - ITAU = IR + LDWRKR*M - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to U, zeroing about above it -* - CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), - $ LDU ) -* -* Generate Q in A -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in U, copying result to WORK(IR) -* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, M, U, LDU, WORK( IR ), LDWRKR ) -* -* Generate right vectors bidiagonalizing L in WORK(IR) -* (Workspace: need M*M+4*M-1, prefer M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left vectors bidiagonalizing L in U -* (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of L in U, and computing right -* singular vectors of L in WORK(IR) -* (Workspace: need M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), - $ WORK( IR ), LDWRKR, U, LDU, DUM, 1, - $ WORK( IWORK ), INFO ) - IU = IE + M -* -* Multiply right singular vectors of L in WORK(IR) by Q -* in A, storing result in WORK(IU) and copying to A -* (Workspace: need M*M+2*M, prefer M*M+M*N+M)) -* - DO 40 I = 1, N, CHUNK - BLK = MIN( N-I+1, CHUNK ) - CALL DGEMM( 'N', 'N', M, BLK, M, ONE, WORK( IR ), - $ LDWRKR, A( 1, I ), LDA, ZERO, - $ WORK( IU ), LDWRKU ) - CALL DLACPY( 'F', M, BLK, WORK( IU ), LDWRKU, - $ A( 1, I ), LDA ) - 40 CONTINUE -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to U, zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), - $ LDU ) -* -* Generate Q in A -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in U -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply right vectors bidiagonalizing L by Q in A -* (Workspace: need 3*M+N, prefer 3*M+N*NB) -* - CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU, - $ WORK( ITAUP ), A, LDA, WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left vectors bidiagonalizing L in U -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U and computing right -* singular vectors of A in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), A, LDA, - $ U, LDU, DUM, 1, WORK( IWORK ), INFO ) -* - END IF -* - ELSE IF( WNTVS ) THEN -* - IF( WNTUN ) THEN -* -* Path 4t(N much larger than M, JOBU='N', JOBVT='S') -* M right singular vectors to be computed in VT and -* no left singular vectors to be computed -* - IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.WRKBL+LDA*M ) THEN -* -* WORK(IR) is LDA by M -* - LDWRKR = LDA - ELSE -* -* WORK(IR) is M by M -* - LDWRKR = M - END IF - ITAU = IR + LDWRKR*M - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to WORK(IR), zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IR ), - $ LDWRKR ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, - $ WORK( IR+LDWRKR ), LDWRKR ) -* -* Generate Q in A -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IR) -* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right vectors bidiagonalizing L in -* WORK(IR) -* (Workspace: need M*M+4*M, prefer M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing right -* singular vectors of L in WORK(IR) -* (Workspace: need M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ), - $ WORK( IR ), LDWRKR, DUM, 1, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply right singular vectors of L in WORK(IR) by -* Q in A, storing result in VT -* (Workspace: need M*M) -* - CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IR ), - $ LDWRKR, A, LDA, ZERO, VT, LDVT ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy result to VT -* - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Zero out above L in A -* - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), - $ LDA ) -* -* Bidiagonalize L in A -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply right vectors bidiagonalizing L by Q in VT -* (Workspace: need 3*M+N, prefer 3*M+N*NB) -* - CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, - $ WORK( ITAUP ), VT, LDVT, - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, N, 0, 0, S, WORK( IE ), VT, - $ LDVT, DUM, 1, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTUO ) THEN -* -* Path 5t(N much larger than M, JOBU='O', JOBVT='S') -* M right singular vectors to be computed in VT and -* M left singular vectors to be overwritten on A -* - IF( LWORK.GE.2*M*M+MAX( 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+2*LDA*M ) THEN -* -* WORK(IU) is LDA by M and WORK(IR) is LDA by M -* - LDWRKU = LDA - IR = IU + LDWRKU*M - LDWRKR = LDA - ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN -* -* WORK(IU) is LDA by M and WORK(IR) is M by M -* - LDWRKU = LDA - IR = IU + LDWRKU*M - LDWRKR = M - ELSE -* -* WORK(IU) is M by M and WORK(IR) is M by M -* - LDWRKU = M - IR = IU + LDWRKU*M - LDWRKR = M - END IF - ITAU = IR + LDWRKR*M - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to WORK(IU), zeroing out below it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, - $ WORK( IU+LDWRKU ), LDWRKU ) -* -* Generate Q in A -* (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) -* - CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IU), copying result to -* WORK(IR) -* (Workspace: need 2*M*M+4*M, -* prefer 2*M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, - $ WORK( IR ), LDWRKR ) -* -* Generate right bidiagonalizing vectors in WORK(IU) -* (Workspace: need 2*M*M+4*M-1, -* prefer 2*M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in WORK(IR) -* (Workspace: need 2*M*M+4*M, prefer 2*M*M+3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, WORK( IR ), LDWRKR, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of L in WORK(IR) and computing -* right singular vectors of L in WORK(IU) -* (Workspace: need 2*M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), - $ WORK( IU ), LDWRKU, WORK( IR ), - $ LDWRKR, DUM, 1, WORK( IWORK ), INFO ) -* -* Multiply right singular vectors of L in WORK(IU) by -* Q in A, storing result in VT -* (Workspace: need M*M) -* - CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), - $ LDWRKU, A, LDA, ZERO, VT, LDVT ) -* -* Copy left singular vectors of L to A -* (Workspace: need M*M) -* - CALL DLACPY( 'F', M, M, WORK( IR ), LDWRKR, A, - $ LDA ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Zero out above L in A -* - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), - $ LDA ) -* -* Bidiagonalize L in A -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply right vectors bidiagonalizing L by Q in VT -* (Workspace: need 3*M+N, prefer 3*M+N*NB) -* - CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, - $ WORK( ITAUP ), VT, LDVT, - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors of L in A -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, compute left -* singular vectors of A in A and compute right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, - $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTUAS ) THEN -* -* Path 6t(N much larger than M, JOBU='S' or 'A', -* JOBVT='S') -* M right singular vectors to be computed in VT and -* M left singular vectors to be computed in U -* - IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+LDA*M ) THEN -* -* WORK(IU) is LDA by N -* - LDWRKU = LDA - ELSE -* -* WORK(IU) is LDA by M -* - LDWRKU = M - END IF - ITAU = IU + LDWRKU*M - IWORK = ITAU + M -* -* Compute A=L*Q -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to WORK(IU), zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, - $ WORK( IU+LDWRKU ), LDWRKU ) -* -* Generate Q in A -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IU), copying result to U -* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, U, - $ LDU ) -* -* Generate right bidiagonalizing vectors in WORK(IU) -* (Workspace: need M*M+4*M-1, -* prefer M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in U -* (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of L in U and computing right -* singular vectors of L in WORK(IU) -* (Workspace: need M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), - $ WORK( IU ), LDWRKU, U, LDU, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply right singular vectors of L in WORK(IU) by -* Q in A, storing result in VT -* (Workspace: need M*M) -* - CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), - $ LDWRKU, A, LDA, ZERO, VT, LDVT ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to U, zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), - $ LDU ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in U -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply right bidiagonalizing vectors in U by Q -* in VT -* (Workspace: need 3*M+N, prefer 3*M+N*NB) -* - CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU, - $ WORK( ITAUP ), VT, LDVT, - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in U -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U and computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, - $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - END IF -* - ELSE IF( WNTVA ) THEN -* - IF( WNTUN ) THEN -* -* Path 7t(N much larger than M, JOBU='N', JOBVT='A') -* N right singular vectors to be computed in VT and -* no left singular vectors to be computed -* - IF( LWORK.GE.M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IR = 1 - IF( LWORK.GE.WRKBL+LDA*M ) THEN -* -* WORK(IR) is LDA by M -* - LDWRKR = LDA - ELSE -* -* WORK(IR) is M by M -* - LDWRKR = M - END IF - ITAU = IR + LDWRKR*M - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Copy L to WORK(IR), zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IR ), - $ LDWRKR ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, - $ WORK( IR+LDWRKR ), LDWRKR ) -* -* Generate Q in VT -* (Workspace: need M*M+M+N, prefer M*M+M+N*NB) -* - CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IR) -* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate right bidiagonalizing vectors in WORK(IR) -* (Workspace: need M*M+4*M-1, -* prefer M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing right -* singular vectors of L in WORK(IR) -* (Workspace: need M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ), - $ WORK( IR ), LDWRKR, DUM, 1, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply right singular vectors of L in WORK(IR) by -* Q in VT, storing result in A -* (Workspace: need M*M) -* - CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IR ), - $ LDWRKR, VT, LDVT, ZERO, A, LDA ) -* -* Copy right singular vectors of A from A to VT -* - CALL DLACPY( 'F', M, N, A, LDA, VT, LDVT ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need M+N, prefer M+N*NB) -* - CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Zero out above L in A -* - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), - $ LDA ) -* -* Bidiagonalize L in A -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply right bidiagonalizing vectors in A by Q -* in VT -* (Workspace: need 3*M+N, prefer 3*M+N*NB) -* - CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, - $ WORK( ITAUP ), VT, LDVT, - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, N, 0, 0, S, WORK( IE ), VT, - $ LDVT, DUM, 1, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTUO ) THEN -* -* Path 8t(N much larger than M, JOBU='O', JOBVT='A') -* N right singular vectors to be computed in VT and -* M left singular vectors to be overwritten on A -* - IF( LWORK.GE.2*M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+2*LDA*M ) THEN -* -* WORK(IU) is LDA by M and WORK(IR) is LDA by M -* - LDWRKU = LDA - IR = IU + LDWRKU*M - LDWRKR = LDA - ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN -* -* WORK(IU) is LDA by M and WORK(IR) is M by M -* - LDWRKU = LDA - IR = IU + LDWRKU*M - LDWRKR = M - ELSE -* -* WORK(IU) is M by M and WORK(IR) is M by M -* - LDWRKU = M - IR = IU + LDWRKU*M - LDWRKR = M - END IF - ITAU = IR + LDWRKR*M - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need 2*M*M+M+N, prefer 2*M*M+M+N*NB) -* - CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to WORK(IU), zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, - $ WORK( IU+LDWRKU ), LDWRKU ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IU), copying result to -* WORK(IR) -* (Workspace: need 2*M*M+4*M, -* prefer 2*M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, - $ WORK( IR ), LDWRKR ) -* -* Generate right bidiagonalizing vectors in WORK(IU) -* (Workspace: need 2*M*M+4*M-1, -* prefer 2*M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in WORK(IR) -* (Workspace: need 2*M*M+4*M, prefer 2*M*M+3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, WORK( IR ), LDWRKR, - $ WORK( ITAUQ ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of L in WORK(IR) and computing -* right singular vectors of L in WORK(IU) -* (Workspace: need 2*M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), - $ WORK( IU ), LDWRKU, WORK( IR ), - $ LDWRKR, DUM, 1, WORK( IWORK ), INFO ) -* -* Multiply right singular vectors of L in WORK(IU) by -* Q in VT, storing result in A -* (Workspace: need M*M) -* - CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), - $ LDWRKU, VT, LDVT, ZERO, A, LDA ) -* -* Copy right singular vectors of A from A to VT -* - CALL DLACPY( 'F', M, N, A, LDA, VT, LDVT ) -* -* Copy left singular vectors of A from WORK(IR) to A -* - CALL DLACPY( 'F', M, M, WORK( IR ), LDWRKR, A, - $ LDA ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need M+N, prefer M+N*NB) -* - CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Zero out above L in A -* - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), - $ LDA ) -* -* Bidiagonalize L in A -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply right bidiagonalizing vectors in A by Q -* in VT -* (Workspace: need 3*M+N, prefer 3*M+N*NB) -* - CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, - $ WORK( ITAUP ), VT, LDVT, - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in A -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in A and computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, - $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - ELSE IF( WNTUAS ) THEN -* -* Path 9t(N much larger than M, JOBU='S' or 'A', -* JOBVT='A') -* N right singular vectors to be computed in VT and -* M left singular vectors to be computed in U -* - IF( LWORK.GE.M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN -* -* Sufficient workspace for a fast algorithm -* - IU = 1 - IF( LWORK.GE.WRKBL+LDA*M ) THEN -* -* WORK(IU) is LDA by M -* - LDWRKU = LDA - ELSE -* -* WORK(IU) is M by M -* - LDWRKU = M - END IF - ITAU = IU + LDWRKU*M - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need M*M+M+N, prefer M*M+M+N*NB) -* - CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to WORK(IU), zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), - $ LDWRKU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, - $ WORK( IU+LDWRKU ), LDWRKU ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in WORK(IU), copying result to U -* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) -* - CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, - $ WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) - CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, U, - $ LDU ) -* -* Generate right bidiagonalizing vectors in WORK(IU) -* (Workspace: need M*M+4*M, prefer M*M+3*M+(M-1)*NB) -* - CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, - $ WORK( ITAUP ), WORK( IWORK ), - $ LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in U -* (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of L in U and computing right -* singular vectors of L in WORK(IU) -* (Workspace: need M*M+BDSPAC) -* - CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), - $ WORK( IU ), LDWRKU, U, LDU, DUM, 1, - $ WORK( IWORK ), INFO ) -* -* Multiply right singular vectors of L in WORK(IU) by -* Q in VT, storing result in A -* (Workspace: need M*M) -* - CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), - $ LDWRKU, VT, LDVT, ZERO, A, LDA ) -* -* Copy right singular vectors of A from A to VT -* - CALL DLACPY( 'F', M, N, A, LDA, VT, LDVT ) -* - ELSE -* -* Insufficient workspace for a fast algorithm -* - ITAU = 1 - IWORK = ITAU + M -* -* Compute A=L*Q, copying result to VT -* (Workspace: need 2*M, prefer M+M*NB) -* - CALL DGELQF( M, N, A, LDA, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) -* -* Generate Q in VT -* (Workspace: need M+N, prefer M+N*NB) -* - CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Copy L to U, zeroing out above it -* - CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) - CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), - $ LDU ) - IE = ITAU - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize L in U -* (Workspace: need 4*M, prefer 3*M+2*M*NB) -* - CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), - $ WORK( ITAUQ ), WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Multiply right bidiagonalizing vectors in U by Q -* in VT -* (Workspace: need 3*M+N, prefer 3*M+N*NB) -* - CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU, - $ WORK( ITAUP ), VT, LDVT, - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) -* -* Generate left bidiagonalizing vectors in U -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - IWORK = IE + M -* -* Perform bidiagonal QR iteration, computing left -* singular vectors of A in U and computing right -* singular vectors of A in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, - $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), - $ INFO ) -* - END IF -* - END IF -* - END IF -* - ELSE -* -* N .LT. MNTHR -* -* Path 10t(N greater than M, but not much larger) -* Reduce to bidiagonal form without LQ decomposition -* - IE = 1 - ITAUQ = IE + M - ITAUP = ITAUQ + M - IWORK = ITAUP + M -* -* Bidiagonalize A -* (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB) -* - CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), - $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, - $ IERR ) - IF( WNTUAS ) THEN -* -* If left singular vectors desired in U, copy result to U -* and generate left bidiagonalizing vectors in U -* (Workspace: need 4*M-1, prefer 3*M+(M-1)*NB) -* - CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) - CALL DORGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IF( WNTVAS ) THEN -* -* If right singular vectors desired in VT, copy result to -* VT and generate right bidiagonalizing vectors in VT -* (Workspace: need 3*M+NRVT, prefer 3*M+NRVT*NB) -* - CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) - IF( WNTVA ) - $ NRVT = N - IF( WNTVS ) - $ NRVT = M - CALL DORGBR( 'P', NRVT, N, M, VT, LDVT, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IF( WNTUO ) THEN -* -* If left singular vectors desired in A, generate left -* bidiagonalizing vectors in A -* (Workspace: need 4*M-1, prefer 3*M+(M-1)*NB) -* - CALL DORGBR( 'Q', M, M, N, A, LDA, WORK( ITAUQ ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IF( WNTVO ) THEN -* -* If right singular vectors desired in A, generate right -* bidiagonalizing vectors in A -* (Workspace: need 4*M, prefer 3*M+M*NB) -* - CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), - $ WORK( IWORK ), LWORK-IWORK+1, IERR ) - END IF - IWORK = IE + M - IF( WNTUAS .OR. WNTUO ) - $ NRU = M - IF( WNTUN ) - $ NRU = 0 - IF( WNTVAS .OR. WNTVO ) - $ NCVT = N - IF( WNTVN ) - $ NCVT = 0 - IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN -* -* Perform bidiagonal QR iteration, if desired, computing -* left singular vectors in U and computing right singular -* vectors in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'L', M, NCVT, NRU, 0, S, WORK( IE ), VT, - $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), INFO ) - ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN -* -* Perform bidiagonal QR iteration, if desired, computing -* left singular vectors in U and computing right singular -* vectors in A -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'L', M, NCVT, NRU, 0, S, WORK( IE ), A, LDA, - $ U, LDU, DUM, 1, WORK( IWORK ), INFO ) - ELSE -* -* Perform bidiagonal QR iteration, if desired, computing -* left singular vectors in A and computing right singular -* vectors in VT -* (Workspace: need BDSPAC) -* - CALL DBDSQR( 'L', M, NCVT, NRU, 0, S, WORK( IE ), VT, - $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), INFO ) - END IF -* - END IF -* - END IF -* -* If DBDSQR failed to converge, copy unconverged superdiagonals -* to WORK( 2:MINMN ) -* - IF( INFO.NE.0 ) THEN - IF( IE.GT.2 ) THEN - DO 50 I = 1, MINMN - 1 - WORK( I+1 ) = WORK( I+IE-1 ) - 50 CONTINUE - END IF - IF( IE.LT.2 ) THEN - DO 60 I = MINMN - 1, 1, -1 - WORK( I+1 ) = WORK( I+IE-1 ) - 60 CONTINUE - END IF - END IF -* -* Undo scaling if necessary -* - IF( ISCL.EQ.1 ) THEN - IF( ANRM.GT.BIGNUM ) - $ CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN, - $ IERR ) - IF( INFO.NE.0 .AND. ANRM.GT.BIGNUM ) - $ CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN-1, 1, WORK( 2 ), - $ MINMN, IERR ) - IF( ANRM.LT.SMLNUM ) - $ CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN, - $ IERR ) - IF( INFO.NE.0 .AND. ANRM.LT.SMLNUM ) - $ CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN-1, 1, WORK( 2 ), - $ MINMN, IERR ) - END IF -* -* Return optimal workspace in WORK(1) -* - WORK( 1 ) = MAXWRK -* - RETURN -* -* End of DGESVD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgetf2.f b/cpp/nudg++/trunk/BlasLapack/dgetf2.f deleted file mode 100644 index e7d9b03..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgetf2.f +++ /dev/null @@ -1,135 +0,0 @@ - SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1992 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, M, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - DOUBLE PRECISION A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* DGETF2 computes an LU factorization of a general m-by-n matrix A -* using partial pivoting with row interchanges. -* -* The factorization has the form -* A = P * L * U -* where P is a permutation matrix, L is lower triangular with unit -* diagonal elements (lower trapezoidal if m > n), and U is upper -* triangular (upper trapezoidal if m < n). -* -* This is the right-looking Level 2 BLAS version of the algorithm. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the m by n matrix to be factored. -* On exit, the factors L and U from the factorization -* A = P*L*U; the unit diagonal elements of L are not stored. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* IPIV (output) INTEGER array, dimension (min(M,N)) -* The pivot indices; for 1 <= i <= min(M,N), row i of the -* matrix was interchanged with row IPIV(i). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -k, the k-th argument had an illegal value -* > 0: if INFO = k, U(k,k) is exactly zero. The factorization -* has been completed, but the factor U is exactly -* singular, and division by zero will occur if it is used -* to solve a system of equations. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER J, JP -* .. -* .. External Functions .. - INTEGER IDAMAX - EXTERNAL IDAMAX -* .. -* .. External Subroutines .. - EXTERNAL DGER, DSCAL, DSWAP, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGETF2', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 ) - $ RETURN -* - DO 10 J = 1, MIN( M, N ) -* -* Find pivot and test for singularity. -* - JP = J - 1 + IDAMAX( M-J+1, A( J, J ), 1 ) - IPIV( J ) = JP - IF( A( JP, J ).NE.ZERO ) THEN -* -* Apply the interchange to columns 1:N. -* - IF( JP.NE.J ) - $ CALL DSWAP( N, A( J, 1 ), LDA, A( JP, 1 ), LDA ) -* -* Compute elements J+1:M of J-th column. -* - IF( J.LT.M ) - $ CALL DSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 ) -* - ELSE IF( INFO.EQ.0 ) THEN -* - INFO = J - END IF -* - IF( J.LT.MIN( M, N ) ) THEN -* -* Update trailing submatrix. -* - CALL DGER( M-J, N-J, -ONE, A( J+1, J ), 1, A( J, J+1 ), LDA, - $ A( J+1, J+1 ), LDA ) - END IF - 10 CONTINUE - RETURN -* -* End of DGETF2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgetrf.f b/cpp/nudg++/trunk/BlasLapack/dgetrf.f deleted file mode 100644 index 2e0a4c4..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgetrf.f +++ /dev/null @@ -1,160 +0,0 @@ - SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, M, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - DOUBLE PRECISION A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* DGETRF computes an LU factorization of a general M-by-N matrix A -* using partial pivoting with row interchanges. -* -* The factorization has the form -* A = P * L * U -* where P is a permutation matrix, L is lower triangular with unit -* diagonal elements (lower trapezoidal if m > n), and U is upper -* triangular (upper trapezoidal if m < n). -* -* This is the right-looking Level 3 BLAS version of the algorithm. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the M-by-N matrix to be factored. -* On exit, the factors L and U from the factorization -* A = P*L*U; the unit diagonal elements of L are not stored. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* IPIV (output) INTEGER array, dimension (min(M,N)) -* The pivot indices; for 1 <= i <= min(M,N), row i of the -* matrix was interchanged with row IPIV(i). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, U(i,i) is exactly zero. The factorization -* has been completed, but the factor U is exactly -* singular, and division by zero will occur if it is used -* to solve a system of equations. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, IINFO, J, JB, NB -* .. -* .. External Subroutines .. - EXTERNAL DGEMM, DGETF2, DLASWP, DTRSM, XERBLA -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGETRF', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 ) - $ RETURN -* -* Determine the block size for this environment. -* - NB = ILAENV( 1, 'DGETRF', ' ', M, N, -1, -1 ) - IF( NB.LE.1 .OR. NB.GE.MIN( M, N ) ) THEN -* -* Use unblocked code. -* - CALL DGETF2( M, N, A, LDA, IPIV, INFO ) - ELSE -* -* Use blocked code. -* - DO 20 J = 1, MIN( M, N ), NB - JB = MIN( MIN( M, N )-J+1, NB ) -* -* Factor diagonal and subdiagonal blocks and test for exact -* singularity. -* - CALL DGETF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO ) -* -* Adjust INFO and the pivot indices. -* - IF( INFO.EQ.0 .AND. IINFO.GT.0 ) - $ INFO = IINFO + J - 1 - DO 10 I = J, MIN( M, J+JB-1 ) - IPIV( I ) = J - 1 + IPIV( I ) - 10 CONTINUE -* -* Apply interchanges to columns 1:J-1. -* - CALL DLASWP( J-1, A, LDA, J, J+JB-1, IPIV, 1 ) -* - IF( J+JB.LE.N ) THEN -* -* Apply interchanges to columns J+JB:N. -* - CALL DLASWP( N-J-JB+1, A( 1, J+JB ), LDA, J, J+JB-1, - $ IPIV, 1 ) -* -* Compute block row of U. -* - CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Unit', JB, - $ N-J-JB+1, ONE, A( J, J ), LDA, A( J, J+JB ), - $ LDA ) - IF( J+JB.LE.M ) THEN -* -* Update trailing submatrix. -* - CALL DGEMM( 'No transpose', 'No transpose', M-J-JB+1, - $ N-J-JB+1, JB, -ONE, A( J+JB, J ), LDA, - $ A( J, J+JB ), LDA, ONE, A( J+JB, J+JB ), - $ LDA ) - END IF - END IF - 20 CONTINUE - END IF - RETURN -* -* End of DGETRF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dgetrs.f b/cpp/nudg++/trunk/BlasLapack/dgetrs.f deleted file mode 100644 index 6522576..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dgetrs.f +++ /dev/null @@ -1,150 +0,0 @@ - SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - CHARACTER TRANS - INTEGER INFO, LDA, LDB, N, NRHS -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - DOUBLE PRECISION A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DGETRS solves a system of linear equations -* A * X = B or A' * X = B -* with a general N-by-N matrix A using the LU factorization computed -* by DGETRF. -* -* Arguments -* ========= -* -* TRANS (input) CHARACTER*1 -* Specifies the form of the system of equations: -* = 'N': A * X = B (No transpose) -* = 'T': A'* X = B (Transpose) -* = 'C': A'* X = B (Conjugate transpose = Transpose) -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* NRHS (input) INTEGER -* The number of right hand sides, i.e., the number of columns -* of the matrix B. NRHS >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The factors L and U from the factorization A = P*L*U -* as computed by DGETRF. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* IPIV (input) INTEGER array, dimension (N) -* The pivot indices from DGETRF; for 1<=i<=N, row i of the -* matrix was interchanged with row IPIV(i). -* -* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) -* On entry, the right hand side matrix B. -* On exit, the solution matrix X. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL NOTRAN -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DLASWP, DTRSM, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - NOTRAN = LSAME( TRANS, 'N' ) - IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. - $ LSAME( TRANS, 'C' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( NRHS.LT.0 ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LDB.LT.MAX( 1, N ) ) THEN - INFO = -8 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DGETRS', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 .OR. NRHS.EQ.0 ) - $ RETURN -* - IF( NOTRAN ) THEN -* -* Solve A * X = B. -* -* Apply row interchanges to the right hand sides. -* - CALL DLASWP( NRHS, B, LDB, 1, N, IPIV, 1 ) -* -* Solve L*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Unit', N, NRHS, - $ ONE, A, LDA, B, LDB ) -* -* Solve U*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', N, - $ NRHS, ONE, A, LDA, B, LDB ) - ELSE -* -* Solve A' * X = B. -* -* Solve U'*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Upper', 'Transpose', 'Non-unit', N, NRHS, - $ ONE, A, LDA, B, LDB ) -* -* Solve L'*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Lower', 'Transpose', 'Unit', N, NRHS, ONE, - $ A, LDA, B, LDB ) -* -* Apply row interchanges to the solution vectors. -* - CALL DLASWP( NRHS, B, LDB, 1, N, IPIV, -1 ) - END IF -* - RETURN -* -* End of DGETRS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dhseqr.f b/cpp/nudg++/trunk/BlasLapack/dhseqr.f deleted file mode 100644 index 48dbada..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dhseqr.f +++ /dev/null @@ -1,467 +0,0 @@ - SUBROUTINE DHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z, - $ LDZ, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER COMPZ, JOB - INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ), - $ Z( LDZ, * ) -* .. -* -* Purpose -* ======= -* -* DHSEQR computes the eigenvalues of a real upper Hessenberg matrix H -* and, optionally, the matrices T and Z from the Schur decomposition -* H = Z T Z**T, where T is an upper quasi-triangular matrix (the Schur -* form), and Z is the orthogonal matrix of Schur vectors. -* -* Optionally Z may be postmultiplied into an input orthogonal matrix Q, -* so that this routine can give the Schur factorization of a matrix A -* which has been reduced to the Hessenberg form H by the orthogonal -* matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T. -* -* Arguments -* ========= -* -* JOB (input) CHARACTER*1 -* = 'E': compute eigenvalues only; -* = 'S': compute eigenvalues and the Schur form T. -* -* COMPZ (input) CHARACTER*1 -* = 'N': no Schur vectors are computed; -* = 'I': Z is initialized to the unit matrix and the matrix Z -* of Schur vectors of H is returned; -* = 'V': Z must contain an orthogonal matrix Q on entry, and -* the product Q*Z is returned. -* -* N (input) INTEGER -* The order of the matrix H. N >= 0. -* -* ILO (input) INTEGER -* IHI (input) INTEGER -* It is assumed that H is already upper triangular in rows -* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally -* set by a previous call to DGEBAL, and then passed to SGEHRD -* when the matrix output by DGEBAL is reduced to Hessenberg -* form. Otherwise ILO and IHI should be set to 1 and N -* respectively. -* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. -* -* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) -* On entry, the upper Hessenberg matrix H. -* On exit, if JOB = 'S', H contains the upper quasi-triangular -* matrix T from the Schur decomposition (the Schur form); -* 2-by-2 diagonal blocks (corresponding to complex conjugate -* pairs of eigenvalues) are returned in standard form, with -* H(i,i) = H(i+1,i+1) and H(i+1,i)*H(i,i+1) < 0. If JOB = 'E', -* the contents of H are unspecified on exit. -* -* LDH (input) INTEGER -* The leading dimension of the array H. LDH >= max(1,N). -* -* WR (output) DOUBLE PRECISION array, dimension (N) -* WI (output) DOUBLE PRECISION array, dimension (N) -* The real and imaginary parts, respectively, of the computed -* eigenvalues. If two eigenvalues are computed as a complex -* conjugate pair, they are stored in consecutive elements of -* WR and WI, say the i-th and (i+1)th, with WI(i) > 0 and -* WI(i+1) < 0. If JOB = 'S', the eigenvalues are stored in the -* same order as on the diagonal of the Schur form returned in -* H, with WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 -* diagonal block, WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and -* WI(i+1) = -WI(i). -* -* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N) -* If COMPZ = 'N': Z is not referenced. -* If COMPZ = 'I': on entry, Z need not be set, and on exit, Z -* contains the orthogonal matrix Z of the Schur vectors of H. -* If COMPZ = 'V': on entry Z must contain an N-by-N matrix Q, -* which is assumed to be equal to the unit matrix except for -* the submatrix Z(ILO:IHI,ILO:IHI); on exit Z contains Q*Z. -* Normally Q is the orthogonal matrix generated by DORGHR after -* the call to DGEHRD which formed the Hessenberg matrix H. -* -* LDZ (input) INTEGER -* The leading dimension of the array Z. -* LDZ >= max(1,N) if COMPZ = 'I' or 'V'; LDZ >= 1 otherwise. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, DHSEQR failed to compute all of the -* eigenvalues in a total of 30*(IHI-ILO+1) iterations; -* elements 1:ilo-1 and i+1:n of WR and WI contain those -* eigenvalues which have been successfully computed. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE, TWO - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 ) - DOUBLE PRECISION CONST - PARAMETER ( CONST = 1.5D+0 ) - INTEGER NSMAX, LDS - PARAMETER ( NSMAX = 15, LDS = NSMAX ) -* .. -* .. Local Scalars .. - LOGICAL INITZ, LQUERY, WANTT, WANTZ - INTEGER I, I1, I2, IERR, II, ITEMP, ITN, ITS, J, K, L, - $ MAXB, NH, NR, NS, NV - DOUBLE PRECISION ABSW, OVFL, SMLNUM, TAU, TEMP, TST1, ULP, UNFL -* .. -* .. Local Arrays .. - DOUBLE PRECISION S( LDS, NSMAX ), V( NSMAX+1 ), VV( NSMAX+1 ) -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IDAMAX, ILAENV - DOUBLE PRECISION DLAMCH, DLANHS, DLAPY2 - EXTERNAL LSAME, IDAMAX, ILAENV, DLAMCH, DLANHS, DLAPY2 -* .. -* .. External Subroutines .. - EXTERNAL DCOPY, DGEMV, DLACPY, DLAHQR, DLARFG, DLARFX, - $ DLASET, DSCAL, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN -* .. -* .. Executable Statements .. -* -* Decode and test the input parameters -* - WANTT = LSAME( JOB, 'S' ) - INITZ = LSAME( COMPZ, 'I' ) - WANTZ = INITZ .OR. LSAME( COMPZ, 'V' ) -* - INFO = 0 - WORK( 1 ) = MAX( 1, N ) - LQUERY = ( LWORK.EQ.-1 ) - IF( .NOT.LSAME( JOB, 'E' ) .AND. .NOT.WANTT ) THEN - INFO = -1 - ELSE IF( .NOT.LSAME( COMPZ, 'N' ) .AND. .NOT.WANTZ ) THEN - INFO = -2 - ELSE IF( N.LT.0 ) THEN - INFO = -3 - ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN - INFO = -4 - ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN - INFO = -5 - ELSE IF( LDH.LT.MAX( 1, N ) ) THEN - INFO = -7 - ELSE IF( LDZ.LT.1 .OR. WANTZ .AND. LDZ.LT.MAX( 1, N ) ) THEN - INFO = -11 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -13 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DHSEQR', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Initialize Z, if necessary -* - IF( INITZ ) - $ CALL DLASET( 'Full', N, N, ZERO, ONE, Z, LDZ ) -* -* Store the eigenvalues isolated by DGEBAL. -* - DO 10 I = 1, ILO - 1 - WR( I ) = H( I, I ) - WI( I ) = ZERO - 10 CONTINUE - DO 20 I = IHI + 1, N - WR( I ) = H( I, I ) - WI( I ) = ZERO - 20 CONTINUE -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN - IF( ILO.EQ.IHI ) THEN - WR( ILO ) = H( ILO, ILO ) - WI( ILO ) = ZERO - RETURN - END IF -* -* Set rows and columns ILO to IHI to zero below the first -* subdiagonal. -* - DO 40 J = ILO, IHI - 2 - DO 30 I = J + 2, N - H( I, J ) = ZERO - 30 CONTINUE - 40 CONTINUE - NH = IHI - ILO + 1 -* -* Determine the order of the multi-shift QR algorithm to be used. -* - NS = ILAENV( 4, 'DHSEQR', JOB // COMPZ, N, ILO, IHI, -1 ) - MAXB = ILAENV( 8, 'DHSEQR', JOB // COMPZ, N, ILO, IHI, -1 ) - IF( NS.LE.2 .OR. NS.GT.NH .OR. MAXB.GE.NH ) THEN -* -* Use the standard double-shift algorithm -* - CALL DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, ILO, - $ IHI, Z, LDZ, INFO ) - RETURN - END IF - MAXB = MAX( 3, MAXB ) - NS = MIN( NS, MAXB, NSMAX ) -* -* Now 2 < NS <= MAXB < NH. -* -* Set machine-dependent constants for the stopping criterion. -* If norm(H) <= sqrt(OVFL), overflow should not occur. -* - UNFL = DLAMCH( 'Safe minimum' ) - OVFL = ONE / UNFL - CALL DLABAD( UNFL, OVFL ) - ULP = DLAMCH( 'Precision' ) - SMLNUM = UNFL*( NH / ULP ) -* -* I1 and I2 are the indices of the first row and last column of H -* to which transformations must be applied. If eigenvalues only are -* being computed, I1 and I2 are set inside the main loop. -* - IF( WANTT ) THEN - I1 = 1 - I2 = N - END IF -* -* ITN is the total number of multiple-shift QR iterations allowed. -* - ITN = 30*NH -* -* The main loop begins here. I is the loop index and decreases from -* IHI to ILO in steps of at most MAXB. Each iteration of the loop -* works with the active submatrix in rows and columns L to I. -* Eigenvalues I+1 to IHI have already converged. Either L = ILO or -* H(L,L-1) is negligible so that the matrix splits. -* - I = IHI - 50 CONTINUE - L = ILO - IF( I.LT.ILO ) - $ GO TO 170 -* -* Perform multiple-shift QR iterations on rows and columns ILO to I -* until a submatrix of order at most MAXB splits off at the bottom -* because a subdiagonal element has become negligible. -* - DO 150 ITS = 0, ITN -* -* Look for a single small subdiagonal element. -* - DO 60 K = I, L + 1, -1 - TST1 = ABS( H( K-1, K-1 ) ) + ABS( H( K, K ) ) - IF( TST1.EQ.ZERO ) - $ TST1 = DLANHS( '1', I-L+1, H( L, L ), LDH, WORK ) - IF( ABS( H( K, K-1 ) ).LE.MAX( ULP*TST1, SMLNUM ) ) - $ GO TO 70 - 60 CONTINUE - 70 CONTINUE - L = K - IF( L.GT.ILO ) THEN -* -* H(L,L-1) is negligible. -* - H( L, L-1 ) = ZERO - END IF -* -* Exit from loop if a submatrix of order <= MAXB has split off. -* - IF( L.GE.I-MAXB+1 ) - $ GO TO 160 -* -* Now the active submatrix is in rows and columns L to I. If -* eigenvalues only are being computed, only the active submatrix -* need be transformed. -* - IF( .NOT.WANTT ) THEN - I1 = L - I2 = I - END IF -* - IF( ITS.EQ.20 .OR. ITS.EQ.30 ) THEN -* -* Exceptional shifts. -* - DO 80 II = I - NS + 1, I - WR( II ) = CONST*( ABS( H( II, II-1 ) )+ - $ ABS( H( II, II ) ) ) - WI( II ) = ZERO - 80 CONTINUE - ELSE -* -* Use eigenvalues of trailing submatrix of order NS as shifts. -* - CALL DLACPY( 'Full', NS, NS, H( I-NS+1, I-NS+1 ), LDH, S, - $ LDS ) - CALL DLAHQR( .FALSE., .FALSE., NS, 1, NS, S, LDS, - $ WR( I-NS+1 ), WI( I-NS+1 ), 1, NS, Z, LDZ, - $ IERR ) - IF( IERR.GT.0 ) THEN -* -* If DLAHQR failed to compute all NS eigenvalues, use the -* unconverged diagonal elements as the remaining shifts. -* - DO 90 II = 1, IERR - WR( I-NS+II ) = S( II, II ) - WI( I-NS+II ) = ZERO - 90 CONTINUE - END IF - END IF -* -* Form the first column of (G-w(1)) (G-w(2)) . . . (G-w(ns)) -* where G is the Hessenberg submatrix H(L:I,L:I) and w is -* the vector of shifts (stored in WR and WI). The result is -* stored in the local array V. -* - V( 1 ) = ONE - DO 100 II = 2, NS + 1 - V( II ) = ZERO - 100 CONTINUE - NV = 1 - DO 120 J = I - NS + 1, I - IF( WI( J ).GE.ZERO ) THEN - IF( WI( J ).EQ.ZERO ) THEN -* -* real shift -* - CALL DCOPY( NV+1, V, 1, VV, 1 ) - CALL DGEMV( 'No transpose', NV+1, NV, ONE, H( L, L ), - $ LDH, VV, 1, -WR( J ), V, 1 ) - NV = NV + 1 - ELSE IF( WI( J ).GT.ZERO ) THEN -* -* complex conjugate pair of shifts -* - CALL DCOPY( NV+1, V, 1, VV, 1 ) - CALL DGEMV( 'No transpose', NV+1, NV, ONE, H( L, L ), - $ LDH, V, 1, -TWO*WR( J ), VV, 1 ) - ITEMP = IDAMAX( NV+1, VV, 1 ) - TEMP = ONE / MAX( ABS( VV( ITEMP ) ), SMLNUM ) - CALL DSCAL( NV+1, TEMP, VV, 1 ) - ABSW = DLAPY2( WR( J ), WI( J ) ) - TEMP = ( TEMP*ABSW )*ABSW - CALL DGEMV( 'No transpose', NV+2, NV+1, ONE, - $ H( L, L ), LDH, VV, 1, TEMP, V, 1 ) - NV = NV + 2 - END IF -* -* Scale V(1:NV) so that max(abs(V(i))) = 1. If V is zero, -* reset it to the unit vector. -* - ITEMP = IDAMAX( NV, V, 1 ) - TEMP = ABS( V( ITEMP ) ) - IF( TEMP.EQ.ZERO ) THEN - V( 1 ) = ONE - DO 110 II = 2, NV - V( II ) = ZERO - 110 CONTINUE - ELSE - TEMP = MAX( TEMP, SMLNUM ) - CALL DSCAL( NV, ONE / TEMP, V, 1 ) - END IF - END IF - 120 CONTINUE -* -* Multiple-shift QR step -* - DO 140 K = L, I - 1 -* -* The first iteration of this loop determines a reflection G -* from the vector V and applies it from left and right to H, -* thus creating a nonzero bulge below the subdiagonal. -* -* Each subsequent iteration determines a reflection G to -* restore the Hessenberg form in the (K-1)th column, and thus -* chases the bulge one step toward the bottom of the active -* submatrix. NR is the order of G. -* - NR = MIN( NS+1, I-K+1 ) - IF( K.GT.L ) - $ CALL DCOPY( NR, H( K, K-1 ), 1, V, 1 ) - CALL DLARFG( NR, V( 1 ), V( 2 ), 1, TAU ) - IF( K.GT.L ) THEN - H( K, K-1 ) = V( 1 ) - DO 130 II = K + 1, I - H( II, K-1 ) = ZERO - 130 CONTINUE - END IF - V( 1 ) = ONE -* -* Apply G from the left to transform the rows of the matrix in -* columns K to I2. -* - CALL DLARFX( 'Left', NR, I2-K+1, V, TAU, H( K, K ), LDH, - $ WORK ) -* -* Apply G from the right to transform the columns of the -* matrix in rows I1 to min(K+NR,I). -* - CALL DLARFX( 'Right', MIN( K+NR, I )-I1+1, NR, V, TAU, - $ H( I1, K ), LDH, WORK ) -* - IF( WANTZ ) THEN -* -* Accumulate transformations in the matrix Z -* - CALL DLARFX( 'Right', NH, NR, V, TAU, Z( ILO, K ), LDZ, - $ WORK ) - END IF - 140 CONTINUE -* - 150 CONTINUE -* -* Failure to converge in remaining number of iterations -* - INFO = I - RETURN -* - 160 CONTINUE -* -* A submatrix of order <= MAXB in rows and columns L to I has split -* off. Use the double-shift QR algorithm to handle it. -* - CALL DLAHQR( WANTT, WANTZ, N, L, I, H, LDH, WR, WI, ILO, IHI, Z, - $ LDZ, INFO ) - IF( INFO.GT.0 ) - $ RETURN -* -* Decrement number of remaining iterations, and return to start of -* the main loop with a new value of I. -* - ITN = ITN - ITS - I = L - 1 - GO TO 50 -* - 170 CONTINUE - WORK( 1 ) = MAX( 1, N ) - RETURN -* -* End of DHSEQR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlabad.f b/cpp/nudg++/trunk/BlasLapack/dlabad.f deleted file mode 100644 index 2a80925..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlabad.f +++ /dev/null @@ -1,56 +0,0 @@ - SUBROUTINE DLABAD( SMALL, LARGE ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - DOUBLE PRECISION LARGE, SMALL -* .. -* -* Purpose -* ======= -* -* DLABAD takes as input the values computed by DLAMCH for underflow and -* overflow, and returns the square root of each of these values if the -* log of LARGE is sufficiently large. This subroutine is intended to -* identify machines with a large exponent range, such as the Crays, and -* redefine the underflow and overflow limits to be the square roots of -* the values computed by DLAMCH. This subroutine is needed because -* DLAMCH does not compensate for poor arithmetic in the upper half of -* the exponent range, as is found on a Cray. -* -* Arguments -* ========= -* -* SMALL (input/output) DOUBLE PRECISION -* On entry, the underflow threshold as computed by DLAMCH. -* On exit, if LOG10(LARGE) is sufficiently large, the square -* root of SMALL, otherwise unchanged. -* -* LARGE (input/output) DOUBLE PRECISION -* On entry, the overflow threshold as computed by DLAMCH. -* On exit, if LOG10(LARGE) is sufficiently large, the square -* root of LARGE, otherwise unchanged. -* -* ===================================================================== -* -* .. Intrinsic Functions .. - INTRINSIC LOG10, SQRT -* .. -* .. Executable Statements .. -* -* If it looks like we're on a Cray, take the square root of -* SMALL and LARGE to avoid overflow and underflow problems. -* - IF( LOG10( LARGE ).GT.2000.D0 ) THEN - SMALL = SQRT( SMALL ) - LARGE = SQRT( LARGE ) - END IF -* - RETURN -* -* End of DLABAD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlabrd.f b/cpp/nudg++/trunk/BlasLapack/dlabrd.f deleted file mode 100644 index bea251b..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlabrd.f +++ /dev/null @@ -1,291 +0,0 @@ - SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, - $ LDY ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - INTEGER LDA, LDX, LDY, M, N, NB -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ), - $ TAUQ( * ), X( LDX, * ), Y( LDY, * ) -* .. -* -* Purpose -* ======= -* -* DLABRD reduces the first NB rows and columns of a real general -* m by n matrix A to upper or lower bidiagonal form by an orthogonal -* transformation Q' * A * P, and returns the matrices X and Y which -* are needed to apply the transformation to the unreduced part of A. -* -* If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower -* bidiagonal form. -* -* This is an auxiliary routine called by DGEBRD -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows in the matrix A. -* -* N (input) INTEGER -* The number of columns in the matrix A. -* -* NB (input) INTEGER -* The number of leading rows and columns of A to be reduced. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the m by n general matrix to be reduced. -* On exit, the first NB rows and columns of the matrix are -* overwritten; the rest of the array is unchanged. -* If m >= n, elements on and below the diagonal in the first NB -* columns, with the array TAUQ, represent the orthogonal -* matrix Q as a product of elementary reflectors; and -* elements above the diagonal in the first NB rows, with the -* array TAUP, represent the orthogonal matrix P as a product -* of elementary reflectors. -* If m < n, elements below the diagonal in the first NB -* columns, with the array TAUQ, represent the orthogonal -* matrix Q as a product of elementary reflectors, and -* elements on and above the diagonal in the first NB rows, -* with the array TAUP, represent the orthogonal matrix P as -* a product of elementary reflectors. -* See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* D (output) DOUBLE PRECISION array, dimension (NB) -* The diagonal elements of the first NB rows and columns of -* the reduced matrix. D(i) = A(i,i). -* -* E (output) DOUBLE PRECISION array, dimension (NB) -* The off-diagonal elements of the first NB rows and columns of -* the reduced matrix. -* -* TAUQ (output) DOUBLE PRECISION array dimension (NB) -* The scalar factors of the elementary reflectors which -* represent the orthogonal matrix Q. See Further Details. -* -* TAUP (output) DOUBLE PRECISION array, dimension (NB) -* The scalar factors of the elementary reflectors which -* represent the orthogonal matrix P. See Further Details. -* -* X (output) DOUBLE PRECISION array, dimension (LDX,NB) -* The m-by-nb matrix X required to update the unreduced part -* of A. -* -* LDX (input) INTEGER -* The leading dimension of the array X. LDX >= M. -* -* Y (output) DOUBLE PRECISION array, dimension (LDY,NB) -* The n-by-nb matrix Y required to update the unreduced part -* of A. -* -* LDY (output) INTEGER -* The leading dimension of the array Y. LDY >= N. -* -* Further Details -* =============== -* -* The matrices Q and P are represented as products of elementary -* reflectors: -* -* Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb) -* -* Each H(i) and G(i) has the form: -* -* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' -* -* where tauq and taup are real scalars, and v and u are real vectors. -* -* If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in -* A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in -* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i). -* -* If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in -* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in -* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i). -* -* The elements of the vectors v and u together form the m-by-nb matrix -* V and the nb-by-n matrix U' which are needed, with X and Y, to apply -* the transformation to the unreduced part of the matrix, using a block -* update of the form: A := A - V*Y' - X*U'. -* -* The contents of A on exit are illustrated by the following examples -* with nb = 2: -* -* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): -* -* ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 ) -* ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 ) -* ( v1 v2 a a a ) ( v1 1 a a a a ) -* ( v1 v2 a a a ) ( v1 v2 a a a a ) -* ( v1 v2 a a a ) ( v1 v2 a a a a ) -* ( v1 v2 a a a ) -* -* where a denotes an element of the original matrix which is unchanged, -* vi denotes an element of the vector defining H(i), and ui an element -* of the vector defining G(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - INTEGER I -* .. -* .. External Subroutines .. - EXTERNAL DGEMV, DLARFG, DSCAL -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* -* Quick return if possible -* - IF( M.LE.0 .OR. N.LE.0 ) - $ RETURN -* - IF( M.GE.N ) THEN -* -* Reduce to upper bidiagonal form -* - DO 10 I = 1, NB -* -* Update A(i:m,i) -* - CALL DGEMV( 'No transpose', M-I+1, I-1, -ONE, A( I, 1 ), - $ LDA, Y( I, 1 ), LDY, ONE, A( I, I ), 1 ) - CALL DGEMV( 'No transpose', M-I+1, I-1, -ONE, X( I, 1 ), - $ LDX, A( 1, I ), 1, ONE, A( I, I ), 1 ) -* -* Generate reflection Q(i) to annihilate A(i+1:m,i) -* - CALL DLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1, - $ TAUQ( I ) ) - D( I ) = A( I, I ) - IF( I.LT.N ) THEN - A( I, I ) = ONE -* -* Compute Y(i+1:n,i) -* - CALL DGEMV( 'Transpose', M-I+1, N-I, ONE, A( I, I+1 ), - $ LDA, A( I, I ), 1, ZERO, Y( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', M-I+1, I-1, ONE, A( I, 1 ), LDA, - $ A( I, I ), 1, ZERO, Y( 1, I ), 1 ) - CALL DGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ), - $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', M-I+1, I-1, ONE, X( I, 1 ), LDX, - $ A( I, I ), 1, ZERO, Y( 1, I ), 1 ) - CALL DGEMV( 'Transpose', I-1, N-I, -ONE, A( 1, I+1 ), - $ LDA, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) - CALL DSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 ) -* -* Update A(i,i+1:n) -* - CALL DGEMV( 'No transpose', N-I, I, -ONE, Y( I+1, 1 ), - $ LDY, A( I, 1 ), LDA, ONE, A( I, I+1 ), LDA ) - CALL DGEMV( 'Transpose', I-1, N-I, -ONE, A( 1, I+1 ), - $ LDA, X( I, 1 ), LDX, ONE, A( I, I+1 ), LDA ) -* -* Generate reflection P(i) to annihilate A(i,i+2:n) -* - CALL DLARFG( N-I, A( I, I+1 ), A( I, MIN( I+2, N ) ), - $ LDA, TAUP( I ) ) - E( I ) = A( I, I+1 ) - A( I, I+1 ) = ONE -* -* Compute X(i+1:m,i) -* - CALL DGEMV( 'No transpose', M-I, N-I, ONE, A( I+1, I+1 ), - $ LDA, A( I, I+1 ), LDA, ZERO, X( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', N-I, I, ONE, Y( I+1, 1 ), LDY, - $ A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 ) - CALL DGEMV( 'No transpose', M-I, I, -ONE, A( I+1, 1 ), - $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) - CALL DGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ), - $ LDA, A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 ) - CALL DGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ), - $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) - CALL DSCAL( M-I, TAUP( I ), X( I+1, I ), 1 ) - END IF - 10 CONTINUE - ELSE -* -* Reduce to lower bidiagonal form -* - DO 20 I = 1, NB -* -* Update A(i,i:n) -* - CALL DGEMV( 'No transpose', N-I+1, I-1, -ONE, Y( I, 1 ), - $ LDY, A( I, 1 ), LDA, ONE, A( I, I ), LDA ) - CALL DGEMV( 'Transpose', I-1, N-I+1, -ONE, A( 1, I ), LDA, - $ X( I, 1 ), LDX, ONE, A( I, I ), LDA ) -* -* Generate reflection P(i) to annihilate A(i,i+1:n) -* - CALL DLARFG( N-I+1, A( I, I ), A( I, MIN( I+1, N ) ), LDA, - $ TAUP( I ) ) - D( I ) = A( I, I ) - IF( I.LT.M ) THEN - A( I, I ) = ONE -* -* Compute X(i+1:m,i) -* - CALL DGEMV( 'No transpose', M-I, N-I+1, ONE, A( I+1, I ), - $ LDA, A( I, I ), LDA, ZERO, X( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', N-I+1, I-1, ONE, Y( I, 1 ), LDY, - $ A( I, I ), LDA, ZERO, X( 1, I ), 1 ) - CALL DGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ), - $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) - CALL DGEMV( 'No transpose', I-1, N-I+1, ONE, A( 1, I ), - $ LDA, A( I, I ), LDA, ZERO, X( 1, I ), 1 ) - CALL DGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ), - $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) - CALL DSCAL( M-I, TAUP( I ), X( I+1, I ), 1 ) -* -* Update A(i+1:m,i) -* - CALL DGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ), - $ LDA, Y( I, 1 ), LDY, ONE, A( I+1, I ), 1 ) - CALL DGEMV( 'No transpose', M-I, I, -ONE, X( I+1, 1 ), - $ LDX, A( 1, I ), 1, ONE, A( I+1, I ), 1 ) -* -* Generate reflection Q(i) to annihilate A(i+2:m,i) -* - CALL DLARFG( M-I, A( I+1, I ), A( MIN( I+2, M ), I ), 1, - $ TAUQ( I ) ) - E( I ) = A( I+1, I ) - A( I+1, I ) = ONE -* -* Compute Y(i+1:n,i) -* - CALL DGEMV( 'Transpose', M-I, N-I, ONE, A( I+1, I+1 ), - $ LDA, A( I+1, I ), 1, ZERO, Y( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', M-I, I-1, ONE, A( I+1, 1 ), LDA, - $ A( I+1, I ), 1, ZERO, Y( 1, I ), 1 ) - CALL DGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ), - $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', M-I, I, ONE, X( I+1, 1 ), LDX, - $ A( I+1, I ), 1, ZERO, Y( 1, I ), 1 ) - CALL DGEMV( 'Transpose', I, N-I, -ONE, A( 1, I+1 ), LDA, - $ Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) - CALL DSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 ) - END IF - 20 CONTINUE - END IF - RETURN -* -* End of DLABRD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlacon.f b/cpp/nudg++/trunk/BlasLapack/dlacon.f deleted file mode 100644 index 4efa0e8..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlacon.f +++ /dev/null @@ -1,204 +0,0 @@ - SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - INTEGER KASE, N - DOUBLE PRECISION EST -* .. -* .. Array Arguments .. - INTEGER ISGN( * ) - DOUBLE PRECISION V( * ), X( * ) -* .. -* -* Purpose -* ======= -* -* DLACON estimates the 1-norm of a square, real matrix A. -* Reverse communication is used for evaluating matrix-vector products. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix. N >= 1. -* -* V (workspace) DOUBLE PRECISION array, dimension (N) -* On the final return, V = A*W, where EST = norm(V)/norm(W) -* (W is not returned). -* -* X (input/output) DOUBLE PRECISION array, dimension (N) -* On an intermediate return, X should be overwritten by -* A * X, if KASE=1, -* A' * X, if KASE=2, -* and DLACON must be re-called with all the other parameters -* unchanged. -* -* ISGN (workspace) INTEGER array, dimension (N) -* -* EST (output) DOUBLE PRECISION -* An estimate (a lower bound) for norm(A). -* -* KASE (input/output) INTEGER -* On the initial call to DLACON, KASE should be 0. -* On an intermediate return, KASE will be 1 or 2, indicating -* whether X should be overwritten by A * X or A' * X. -* On the final return from DLACON, KASE will again be 0. -* -* Further Details -* ======= ======= -* -* Contributed by Nick Higham, University of Manchester. -* Originally named SONEST, dated March 16, 1988. -* -* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of -* a real or complex matrix, with applications to condition estimation", -* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. -* -* ===================================================================== -* -* .. Parameters .. - INTEGER ITMAX - PARAMETER ( ITMAX = 5 ) - DOUBLE PRECISION ZERO, ONE, TWO - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, ITER, J, JLAST, JUMP - DOUBLE PRECISION ALTSGN, ESTOLD, TEMP -* .. -* .. External Functions .. - INTEGER IDAMAX - DOUBLE PRECISION DASUM - EXTERNAL IDAMAX, DASUM -* .. -* .. External Subroutines .. - EXTERNAL DCOPY -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, DBLE, NINT, SIGN -* .. -* .. Save statement .. - SAVE -* .. -* .. Executable Statements .. -* - IF( KASE.EQ.0 ) THEN - DO 10 I = 1, N - X( I ) = ONE / DBLE( N ) - 10 CONTINUE - KASE = 1 - JUMP = 1 - RETURN - END IF -* - GO TO ( 20, 40, 70, 110, 140 )JUMP -* -* ................ ENTRY (JUMP = 1) -* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. -* - 20 CONTINUE - IF( N.EQ.1 ) THEN - V( 1 ) = X( 1 ) - EST = ABS( V( 1 ) ) -* ... QUIT - GO TO 150 - END IF - EST = DASUM( N, X, 1 ) -* - DO 30 I = 1, N - X( I ) = SIGN( ONE, X( I ) ) - ISGN( I ) = NINT( X( I ) ) - 30 CONTINUE - KASE = 2 - JUMP = 2 - RETURN -* -* ................ ENTRY (JUMP = 2) -* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. -* - 40 CONTINUE - J = IDAMAX( N, X, 1 ) - ITER = 2 -* -* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. -* - 50 CONTINUE - DO 60 I = 1, N - X( I ) = ZERO - 60 CONTINUE - X( J ) = ONE - KASE = 1 - JUMP = 3 - RETURN -* -* ................ ENTRY (JUMP = 3) -* X HAS BEEN OVERWRITTEN BY A*X. -* - 70 CONTINUE - CALL DCOPY( N, X, 1, V, 1 ) - ESTOLD = EST - EST = DASUM( N, V, 1 ) - DO 80 I = 1, N - IF( NINT( SIGN( ONE, X( I ) ) ).NE.ISGN( I ) ) - $ GO TO 90 - 80 CONTINUE -* REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED. - GO TO 120 -* - 90 CONTINUE -* TEST FOR CYCLING. - IF( EST.LE.ESTOLD ) - $ GO TO 120 -* - DO 100 I = 1, N - X( I ) = SIGN( ONE, X( I ) ) - ISGN( I ) = NINT( X( I ) ) - 100 CONTINUE - KASE = 2 - JUMP = 4 - RETURN -* -* ................ ENTRY (JUMP = 4) -* X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. -* - 110 CONTINUE - JLAST = J - J = IDAMAX( N, X, 1 ) - IF( ( X( JLAST ).NE.ABS( X( J ) ) ) .AND. ( ITER.LT.ITMAX ) ) THEN - ITER = ITER + 1 - GO TO 50 - END IF -* -* ITERATION COMPLETE. FINAL STAGE. -* - 120 CONTINUE - ALTSGN = ONE - DO 130 I = 1, N - X( I ) = ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) - ALTSGN = -ALTSGN - 130 CONTINUE - KASE = 1 - JUMP = 5 - RETURN -* -* ................ ENTRY (JUMP = 5) -* X HAS BEEN OVERWRITTEN BY A*X. -* - 140 CONTINUE - TEMP = TWO*( DASUM( N, X, 1 ) / DBLE( 3*N ) ) - IF( TEMP.GT.EST ) THEN - CALL DCOPY( N, X, 1, V, 1 ) - EST = TEMP - END IF -* - 150 CONTINUE - KASE = 0 - RETURN -* -* End of DLACON -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlacpy.f b/cpp/nudg++/trunk/BlasLapack/dlacpy.f deleted file mode 100644 index afec371..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlacpy.f +++ /dev/null @@ -1,88 +0,0 @@ - SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER LDA, LDB, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DLACPY copies all or part of a two-dimensional matrix A to another -* matrix B. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* Specifies the part of the matrix A to be copied to B. -* = 'U': Upper triangular part -* = 'L': Lower triangular part -* Otherwise: All of the matrix A -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The m by n matrix A. If UPLO = 'U', only the upper triangle -* or trapezoid is accessed; if UPLO = 'L', only the lower -* triangle or trapezoid is accessed. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* B (output) DOUBLE PRECISION array, dimension (LDB,N) -* On exit, B = A in the locations specified by UPLO. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,M). -* -* ===================================================================== -* -* .. Local Scalars .. - INTEGER I, J -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* - IF( LSAME( UPLO, 'U' ) ) THEN - DO 20 J = 1, N - DO 10 I = 1, MIN( J, M ) - B( I, J ) = A( I, J ) - 10 CONTINUE - 20 CONTINUE - ELSE IF( LSAME( UPLO, 'L' ) ) THEN - DO 40 J = 1, N - DO 30 I = J, M - B( I, J ) = A( I, J ) - 30 CONTINUE - 40 CONTINUE - ELSE - DO 60 J = 1, N - DO 50 I = 1, M - B( I, J ) = A( I, J ) - 50 CONTINUE - 60 CONTINUE - END IF - RETURN -* -* End of DLACPY -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dladiv.f b/cpp/nudg++/trunk/BlasLapack/dladiv.f deleted file mode 100644 index 2057162..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dladiv.f +++ /dev/null @@ -1,63 +0,0 @@ - SUBROUTINE DLADIV( A, B, C, D, P, Q ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - DOUBLE PRECISION A, B, C, D, P, Q -* .. -* -* Purpose -* ======= -* -* DLADIV performs complex division in real arithmetic -* -* a + i*b -* p + i*q = --------- -* c + i*d -* -* The algorithm is due to Robert L. Smith and can be found -* in D. Knuth, The art of Computer Programming, Vol.2, p.195 -* -* Arguments -* ========= -* -* A (input) DOUBLE PRECISION -* B (input) DOUBLE PRECISION -* C (input) DOUBLE PRECISION -* D (input) DOUBLE PRECISION -* The scalars a, b, c, and d in the above expression. -* -* P (output) DOUBLE PRECISION -* Q (output) DOUBLE PRECISION -* The scalars p and q in the above expression. -* -* ===================================================================== -* -* .. Local Scalars .. - DOUBLE PRECISION E, F -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS -* .. -* .. Executable Statements .. -* - IF( ABS( D ).LT.ABS( C ) ) THEN - E = D / C - F = C + D*E - P = ( A+B*E ) / F - Q = ( B-A*E ) / F - ELSE - E = C / D - F = D + C*E - P = ( B+A*E ) / F - Q = ( -A+B*E ) / F - END IF -* - RETURN -* -* End of DLADIV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlae2.f b/cpp/nudg++/trunk/BlasLapack/dlae2.f deleted file mode 100644 index 57c69b6..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlae2.f +++ /dev/null @@ -1,124 +0,0 @@ - SUBROUTINE DLAE2( A, B, C, RT1, RT2 ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - DOUBLE PRECISION A, B, C, RT1, RT2 -* .. -* -* Purpose -* ======= -* -* DLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix -* [ A B ] -* [ B C ]. -* On return, RT1 is the eigenvalue of larger absolute value, and RT2 -* is the eigenvalue of smaller absolute value. -* -* Arguments -* ========= -* -* A (input) DOUBLE PRECISION -* The (1,1) element of the 2-by-2 matrix. -* -* B (input) DOUBLE PRECISION -* The (1,2) and (2,1) elements of the 2-by-2 matrix. -* -* C (input) DOUBLE PRECISION -* The (2,2) element of the 2-by-2 matrix. -* -* RT1 (output) DOUBLE PRECISION -* The eigenvalue of larger absolute value. -* -* RT2 (output) DOUBLE PRECISION -* The eigenvalue of smaller absolute value. -* -* Further Details -* =============== -* -* RT1 is accurate to a few ulps barring over/underflow. -* -* RT2 may be inaccurate if there is massive cancellation in the -* determinant A*C-B*B; higher precision or correctly rounded or -* correctly truncated arithmetic would be needed to compute RT2 -* accurately in all cases. -* -* Overflow is possible only if RT1 is within a factor of 5 of overflow. -* Underflow is harmless if the input data is 0 or exceeds -* underflow_threshold / macheps. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D0 ) - DOUBLE PRECISION TWO - PARAMETER ( TWO = 2.0D0 ) - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) - DOUBLE PRECISION HALF - PARAMETER ( HALF = 0.5D0 ) -* .. -* .. Local Scalars .. - DOUBLE PRECISION AB, ACMN, ACMX, ADF, DF, RT, SM, TB -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, SQRT -* .. -* .. Executable Statements .. -* -* Compute the eigenvalues -* - SM = A + C - DF = A - C - ADF = ABS( DF ) - TB = B + B - AB = ABS( TB ) - IF( ABS( A ).GT.ABS( C ) ) THEN - ACMX = A - ACMN = C - ELSE - ACMX = C - ACMN = A - END IF - IF( ADF.GT.AB ) THEN - RT = ADF*SQRT( ONE+( AB / ADF )**2 ) - ELSE IF( ADF.LT.AB ) THEN - RT = AB*SQRT( ONE+( ADF / AB )**2 ) - ELSE -* -* Includes case AB=ADF=0 -* - RT = AB*SQRT( TWO ) - END IF - IF( SM.LT.ZERO ) THEN - RT1 = HALF*( SM-RT ) -* -* Order of execution important. -* To get fully accurate smaller eigenvalue, -* next line needs to be executed in higher precision. -* - RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B - ELSE IF( SM.GT.ZERO ) THEN - RT1 = HALF*( SM+RT ) -* -* Order of execution important. -* To get fully accurate smaller eigenvalue, -* next line needs to be executed in higher precision. -* - RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B - ELSE -* -* Includes case RT1 = RT2 = 0 -* - RT1 = HALF*RT - RT2 = -HALF*RT - END IF - RETURN -* -* End of DLAE2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlaev2.f b/cpp/nudg++/trunk/BlasLapack/dlaev2.f deleted file mode 100644 index 7d7219d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlaev2.f +++ /dev/null @@ -1,170 +0,0 @@ - SUBROUTINE DLAEV2( A, B, C, RT1, RT2, CS1, SN1 ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - DOUBLE PRECISION A, B, C, CS1, RT1, RT2, SN1 -* .. -* -* Purpose -* ======= -* -* DLAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix -* [ A B ] -* [ B C ]. -* On return, RT1 is the eigenvalue of larger absolute value, RT2 is the -* eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right -* eigenvector for RT1, giving the decomposition -* -* [ CS1 SN1 ] [ A B ] [ CS1 -SN1 ] = [ RT1 0 ] -* [-SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ]. -* -* Arguments -* ========= -* -* A (input) DOUBLE PRECISION -* The (1,1) element of the 2-by-2 matrix. -* -* B (input) DOUBLE PRECISION -* The (1,2) element and the conjugate of the (2,1) element of -* the 2-by-2 matrix. -* -* C (input) DOUBLE PRECISION -* The (2,2) element of the 2-by-2 matrix. -* -* RT1 (output) DOUBLE PRECISION -* The eigenvalue of larger absolute value. -* -* RT2 (output) DOUBLE PRECISION -* The eigenvalue of smaller absolute value. -* -* CS1 (output) DOUBLE PRECISION -* SN1 (output) DOUBLE PRECISION -* The vector (CS1, SN1) is a unit right eigenvector for RT1. -* -* Further Details -* =============== -* -* RT1 is accurate to a few ulps barring over/underflow. -* -* RT2 may be inaccurate if there is massive cancellation in the -* determinant A*C-B*B; higher precision or correctly rounded or -* correctly truncated arithmetic would be needed to compute RT2 -* accurately in all cases. -* -* CS1 and SN1 are accurate to a few ulps barring over/underflow. -* -* Overflow is possible only if RT1 is within a factor of 5 of overflow. -* Underflow is harmless if the input data is 0 or exceeds -* underflow_threshold / macheps. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D0 ) - DOUBLE PRECISION TWO - PARAMETER ( TWO = 2.0D0 ) - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) - DOUBLE PRECISION HALF - PARAMETER ( HALF = 0.5D0 ) -* .. -* .. Local Scalars .. - INTEGER SGN1, SGN2 - DOUBLE PRECISION AB, ACMN, ACMX, ACS, ADF, CS, CT, DF, RT, SM, - $ TB, TN -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, SQRT -* .. -* .. Executable Statements .. -* -* Compute the eigenvalues -* - SM = A + C - DF = A - C - ADF = ABS( DF ) - TB = B + B - AB = ABS( TB ) - IF( ABS( A ).GT.ABS( C ) ) THEN - ACMX = A - ACMN = C - ELSE - ACMX = C - ACMN = A - END IF - IF( ADF.GT.AB ) THEN - RT = ADF*SQRT( ONE+( AB / ADF )**2 ) - ELSE IF( ADF.LT.AB ) THEN - RT = AB*SQRT( ONE+( ADF / AB )**2 ) - ELSE -* -* Includes case AB=ADF=0 -* - RT = AB*SQRT( TWO ) - END IF - IF( SM.LT.ZERO ) THEN - RT1 = HALF*( SM-RT ) - SGN1 = -1 -* -* Order of execution important. -* To get fully accurate smaller eigenvalue, -* next line needs to be executed in higher precision. -* - RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B - ELSE IF( SM.GT.ZERO ) THEN - RT1 = HALF*( SM+RT ) - SGN1 = 1 -* -* Order of execution important. -* To get fully accurate smaller eigenvalue, -* next line needs to be executed in higher precision. -* - RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B - ELSE -* -* Includes case RT1 = RT2 = 0 -* - RT1 = HALF*RT - RT2 = -HALF*RT - SGN1 = 1 - END IF -* -* Compute the eigenvector -* - IF( DF.GE.ZERO ) THEN - CS = DF + RT - SGN2 = 1 - ELSE - CS = DF - RT - SGN2 = -1 - END IF - ACS = ABS( CS ) - IF( ACS.GT.AB ) THEN - CT = -TB / CS - SN1 = ONE / SQRT( ONE+CT*CT ) - CS1 = CT*SN1 - ELSE - IF( AB.EQ.ZERO ) THEN - CS1 = ONE - SN1 = ZERO - ELSE - TN = -CS / TB - CS1 = ONE / SQRT( ONE+TN*TN ) - SN1 = TN*CS1 - END IF - END IF - IF( SGN1.EQ.SGN2 ) THEN - TN = CS1 - CS1 = -SN1 - SN1 = TN - END IF - RETURN -* -* End of DLAEV2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlahqr.f b/cpp/nudg++/trunk/BlasLapack/dlahqr.f deleted file mode 100644 index 2e2f25b..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlahqr.f +++ /dev/null @@ -1,435 +0,0 @@ - SUBROUTINE DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, - $ ILOZ, IHIZ, Z, LDZ, INFO ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - LOGICAL WANTT, WANTZ - INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION H( LDH, * ), WI( * ), WR( * ), Z( LDZ, * ) -* .. -* -* Purpose -* ======= -* -* DLAHQR is an auxiliary routine called by DHSEQR to update the -* eigenvalues and Schur decomposition already computed by DHSEQR, by -* dealing with the Hessenberg submatrix in rows and columns ILO to IHI. -* -* Arguments -* ========= -* -* WANTT (input) LOGICAL -* = .TRUE. : the full Schur form T is required; -* = .FALSE.: only eigenvalues are required. -* -* WANTZ (input) LOGICAL -* = .TRUE. : the matrix of Schur vectors Z is required; -* = .FALSE.: Schur vectors are not required. -* -* N (input) INTEGER -* The order of the matrix H. N >= 0. -* -* ILO (input) INTEGER -* IHI (input) INTEGER -* It is assumed that H is already upper quasi-triangular in -* rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless -* ILO = 1). DLAHQR works primarily with the Hessenberg -* submatrix in rows and columns ILO to IHI, but applies -* transformations to all of H if WANTT is .TRUE.. -* 1 <= ILO <= max(1,IHI); IHI <= N. -* -* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) -* On entry, the upper Hessenberg matrix H. -* On exit, if WANTT is .TRUE., H is upper quasi-triangular in -* rows and columns ILO:IHI, with any 2-by-2 diagonal blocks in -* standard form. If WANTT is .FALSE., the contents of H are -* unspecified on exit. -* -* LDH (input) INTEGER -* The leading dimension of the array H. LDH >= max(1,N). -* -* WR (output) DOUBLE PRECISION array, dimension (N) -* WI (output) DOUBLE PRECISION array, dimension (N) -* The real and imaginary parts, respectively, of the computed -* eigenvalues ILO to IHI are stored in the corresponding -* elements of WR and WI. If two eigenvalues are computed as a -* complex conjugate pair, they are stored in consecutive -* elements of WR and WI, say the i-th and (i+1)th, with -* WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the -* eigenvalues are stored in the same order as on the diagonal -* of the Schur form returned in H, with WR(i) = H(i,i), and, if -* H(i:i+1,i:i+1) is a 2-by-2 diagonal block, -* WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i). -* -* ILOZ (input) INTEGER -* IHIZ (input) INTEGER -* Specify the rows of Z to which transformations must be -* applied if WANTZ is .TRUE.. -* 1 <= ILOZ <= ILO; IHI <= IHIZ <= N. -* -* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N) -* If WANTZ is .TRUE., on entry Z must contain the current -* matrix Z of transformations accumulated by DHSEQR, and on -* exit Z has been updated; transformations are applied only to -* the submatrix Z(ILOZ:IHIZ,ILO:IHI). -* If WANTZ is .FALSE., Z is not referenced. -* -* LDZ (input) INTEGER -* The leading dimension of the array Z. LDZ >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* > 0: DLAHQR failed to compute all the eigenvalues ILO to IHI -* in a total of 30*(IHI-ILO+1) iterations; if INFO = i, -* elements i+1:ihi of WR and WI contain those eigenvalues -* which have been successfully computed. -* -* Further Details -* =============== -* -* 2-96 Based on modifications by -* David Day, Sandia National Laboratory, USA -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE, HALF - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, HALF = 0.5D0 ) - DOUBLE PRECISION DAT1, DAT2 - PARAMETER ( DAT1 = 0.75D+0, DAT2 = -0.4375D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, I1, I2, ITN, ITS, J, K, L, M, NH, NR, NZ - DOUBLE PRECISION AVE, CS, DISC, H00, H10, H11, H12, H21, H22, - $ H33, H33S, H43H34, H44, H44S, OVFL, S, SMLNUM, - $ SN, SUM, T1, T2, T3, TST1, ULP, UNFL, V1, V2, - $ V3 -* .. -* .. Local Arrays .. - DOUBLE PRECISION V( 3 ), WORK( 1 ) -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH, DLANHS - EXTERNAL DLAMCH, DLANHS -* .. -* .. External Subroutines .. - EXTERNAL DCOPY, DLANV2, DLARFG, DROT -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN, SIGN, SQRT -* .. -* .. Executable Statements .. -* - INFO = 0 -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN - IF( ILO.EQ.IHI ) THEN - WR( ILO ) = H( ILO, ILO ) - WI( ILO ) = ZERO - RETURN - END IF -* - NH = IHI - ILO + 1 - NZ = IHIZ - ILOZ + 1 -* -* Set machine-dependent constants for the stopping criterion. -* If norm(H) <= sqrt(OVFL), overflow should not occur. -* - UNFL = DLAMCH( 'Safe minimum' ) - OVFL = ONE / UNFL - CALL DLABAD( UNFL, OVFL ) - ULP = DLAMCH( 'Precision' ) - SMLNUM = UNFL*( NH / ULP ) -* -* I1 and I2 are the indices of the first row and last column of H -* to which transformations must be applied. If eigenvalues only are -* being computed, I1 and I2 are set inside the main loop. -* - IF( WANTT ) THEN - I1 = 1 - I2 = N - END IF -* -* ITN is the total number of QR iterations allowed. -* - ITN = 30*NH -* -* The main loop begins here. I is the loop index and decreases from -* IHI to ILO in steps of 1 or 2. Each iteration of the loop works -* with the active submatrix in rows and columns L to I. -* Eigenvalues I+1 to IHI have already converged. Either L = ILO or -* H(L,L-1) is negligible so that the matrix splits. -* - I = IHI - 10 CONTINUE - L = ILO - IF( I.LT.ILO ) - $ GO TO 150 -* -* Perform QR iterations on rows and columns ILO to I until a -* submatrix of order 1 or 2 splits off at the bottom because a -* subdiagonal element has become negligible. -* - DO 130 ITS = 0, ITN -* -* Look for a single small subdiagonal element. -* - DO 20 K = I, L + 1, -1 - TST1 = ABS( H( K-1, K-1 ) ) + ABS( H( K, K ) ) - IF( TST1.EQ.ZERO ) - $ TST1 = DLANHS( '1', I-L+1, H( L, L ), LDH, WORK ) - IF( ABS( H( K, K-1 ) ).LE.MAX( ULP*TST1, SMLNUM ) ) - $ GO TO 30 - 20 CONTINUE - 30 CONTINUE - L = K - IF( L.GT.ILO ) THEN -* -* H(L,L-1) is negligible -* - H( L, L-1 ) = ZERO - END IF -* -* Exit from loop if a submatrix of order 1 or 2 has split off. -* - IF( L.GE.I-1 ) - $ GO TO 140 -* -* Now the active submatrix is in rows and columns L to I. If -* eigenvalues only are being computed, only the active submatrix -* need be transformed. -* - IF( .NOT.WANTT ) THEN - I1 = L - I2 = I - END IF -* - IF( ITS.EQ.10 .OR. ITS.EQ.20 ) THEN -* -* Exceptional shift. -* - S = ABS( H( I, I-1 ) ) + ABS( H( I-1, I-2 ) ) - H44 = DAT1*S + H( I, I ) - H33 = H44 - H43H34 = DAT2*S*S - ELSE -* -* Prepare to use Francis' double shift -* (i.e. 2nd degree generalized Rayleigh quotient) -* - H44 = H( I, I ) - H33 = H( I-1, I-1 ) - H43H34 = H( I, I-1 )*H( I-1, I ) - S = H( I-1, I-2 )*H( I-1, I-2 ) - DISC = ( H33-H44 )*HALF - DISC = DISC*DISC + H43H34 - IF( DISC.GT.ZERO ) THEN -* -* Real roots: use Wilkinson's shift twice -* - DISC = SQRT( DISC ) - AVE = HALF*( H33+H44 ) - IF( ABS( H33 )-ABS( H44 ).GT.ZERO ) THEN - H33 = H33*H44 - H43H34 - H44 = H33 / ( SIGN( DISC, AVE )+AVE ) - ELSE - H44 = SIGN( DISC, AVE ) + AVE - END IF - H33 = H44 - H43H34 = ZERO - END IF - END IF -* -* Look for two consecutive small subdiagonal elements. -* - DO 40 M = I - 2, L, -1 -* Determine the effect of starting the double-shift QR -* iteration at row M, and see if this would make H(M,M-1) -* negligible. -* - H11 = H( M, M ) - H22 = H( M+1, M+1 ) - H21 = H( M+1, M ) - H12 = H( M, M+1 ) - H44S = H44 - H11 - H33S = H33 - H11 - V1 = ( H33S*H44S-H43H34 ) / H21 + H12 - V2 = H22 - H11 - H33S - H44S - V3 = H( M+2, M+1 ) - S = ABS( V1 ) + ABS( V2 ) + ABS( V3 ) - V1 = V1 / S - V2 = V2 / S - V3 = V3 / S - V( 1 ) = V1 - V( 2 ) = V2 - V( 3 ) = V3 - IF( M.EQ.L ) - $ GO TO 50 - H00 = H( M-1, M-1 ) - H10 = H( M, M-1 ) - TST1 = ABS( V1 )*( ABS( H00 )+ABS( H11 )+ABS( H22 ) ) - IF( ABS( H10 )*( ABS( V2 )+ABS( V3 ) ).LE.ULP*TST1 ) - $ GO TO 50 - 40 CONTINUE - 50 CONTINUE -* -* Double-shift QR step -* - DO 120 K = M, I - 1 -* -* The first iteration of this loop determines a reflection G -* from the vector V and applies it from left and right to H, -* thus creating a nonzero bulge below the subdiagonal. -* -* Each subsequent iteration determines a reflection G to -* restore the Hessenberg form in the (K-1)th column, and thus -* chases the bulge one step toward the bottom of the active -* submatrix. NR is the order of G. -* - NR = MIN( 3, I-K+1 ) - IF( K.GT.M ) - $ CALL DCOPY( NR, H( K, K-1 ), 1, V, 1 ) - CALL DLARFG( NR, V( 1 ), V( 2 ), 1, T1 ) - IF( K.GT.M ) THEN - H( K, K-1 ) = V( 1 ) - H( K+1, K-1 ) = ZERO - IF( K.LT.I-1 ) - $ H( K+2, K-1 ) = ZERO - ELSE IF( M.GT.L ) THEN - H( K, K-1 ) = -H( K, K-1 ) - END IF - V2 = V( 2 ) - T2 = T1*V2 - IF( NR.EQ.3 ) THEN - V3 = V( 3 ) - T3 = T1*V3 -* -* Apply G from the left to transform the rows of the matrix -* in columns K to I2. -* - DO 60 J = K, I2 - SUM = H( K, J ) + V2*H( K+1, J ) + V3*H( K+2, J ) - H( K, J ) = H( K, J ) - SUM*T1 - H( K+1, J ) = H( K+1, J ) - SUM*T2 - H( K+2, J ) = H( K+2, J ) - SUM*T3 - 60 CONTINUE -* -* Apply G from the right to transform the columns of the -* matrix in rows I1 to min(K+3,I). -* - DO 70 J = I1, MIN( K+3, I ) - SUM = H( J, K ) + V2*H( J, K+1 ) + V3*H( J, K+2 ) - H( J, K ) = H( J, K ) - SUM*T1 - H( J, K+1 ) = H( J, K+1 ) - SUM*T2 - H( J, K+2 ) = H( J, K+2 ) - SUM*T3 - 70 CONTINUE -* - IF( WANTZ ) THEN -* -* Accumulate transformations in the matrix Z -* - DO 80 J = ILOZ, IHIZ - SUM = Z( J, K ) + V2*Z( J, K+1 ) + V3*Z( J, K+2 ) - Z( J, K ) = Z( J, K ) - SUM*T1 - Z( J, K+1 ) = Z( J, K+1 ) - SUM*T2 - Z( J, K+2 ) = Z( J, K+2 ) - SUM*T3 - 80 CONTINUE - END IF - ELSE IF( NR.EQ.2 ) THEN -* -* Apply G from the left to transform the rows of the matrix -* in columns K to I2. -* - DO 90 J = K, I2 - SUM = H( K, J ) + V2*H( K+1, J ) - H( K, J ) = H( K, J ) - SUM*T1 - H( K+1, J ) = H( K+1, J ) - SUM*T2 - 90 CONTINUE -* -* Apply G from the right to transform the columns of the -* matrix in rows I1 to min(K+3,I). -* - DO 100 J = I1, I - SUM = H( J, K ) + V2*H( J, K+1 ) - H( J, K ) = H( J, K ) - SUM*T1 - H( J, K+1 ) = H( J, K+1 ) - SUM*T2 - 100 CONTINUE -* - IF( WANTZ ) THEN -* -* Accumulate transformations in the matrix Z -* - DO 110 J = ILOZ, IHIZ - SUM = Z( J, K ) + V2*Z( J, K+1 ) - Z( J, K ) = Z( J, K ) - SUM*T1 - Z( J, K+1 ) = Z( J, K+1 ) - SUM*T2 - 110 CONTINUE - END IF - END IF - 120 CONTINUE -* - 130 CONTINUE -* -* Failure to converge in remaining number of iterations -* - INFO = I - RETURN -* - 140 CONTINUE -* - IF( L.EQ.I ) THEN -* -* H(I,I-1) is negligible: one eigenvalue has converged. -* - WR( I ) = H( I, I ) - WI( I ) = ZERO - ELSE IF( L.EQ.I-1 ) THEN -* -* H(I-1,I-2) is negligible: a pair of eigenvalues have converged. -* -* Transform the 2-by-2 submatrix to standard Schur form, -* and compute and store the eigenvalues. -* - CALL DLANV2( H( I-1, I-1 ), H( I-1, I ), H( I, I-1 ), - $ H( I, I ), WR( I-1 ), WI( I-1 ), WR( I ), WI( I ), - $ CS, SN ) -* - IF( WANTT ) THEN -* -* Apply the transformation to the rest of H. -* - IF( I2.GT.I ) - $ CALL DROT( I2-I, H( I-1, I+1 ), LDH, H( I, I+1 ), LDH, - $ CS, SN ) - CALL DROT( I-I1-1, H( I1, I-1 ), 1, H( I1, I ), 1, CS, SN ) - END IF - IF( WANTZ ) THEN -* -* Apply the transformation to Z. -* - CALL DROT( NZ, Z( ILOZ, I-1 ), 1, Z( ILOZ, I ), 1, CS, SN ) - END IF - END IF -* -* Decrement number of remaining iterations, and return to start of -* the main loop with new value of I. -* - ITN = ITN - ITS - I = L - 1 - GO TO 10 -* - 150 CONTINUE - RETURN -* -* End of DLAHQR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlahrd.f b/cpp/nudg++/trunk/BlasLapack/dlahrd.f deleted file mode 100644 index 9d47335..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlahrd.f +++ /dev/null @@ -1,206 +0,0 @@ - SUBROUTINE DLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER K, LDA, LDT, LDY, N, NB -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ), - $ Y( LDY, NB ) -* .. -* -* Purpose -* ======= -* -* DLAHRD reduces the first NB columns of a real general n-by-(n-k+1) -* matrix A so that elements below the k-th subdiagonal are zero. The -* reduction is performed by an orthogonal similarity transformation -* Q' * A * Q. The routine returns the matrices V and T which determine -* Q as a block reflector I - V*T*V', and also the matrix Y = A * V * T. -* -* This is an auxiliary routine called by DGEHRD. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix A. -* -* K (input) INTEGER -* The offset for the reduction. Elements below the k-th -* subdiagonal in the first NB columns are reduced to zero. -* -* NB (input) INTEGER -* The number of columns to be reduced. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N-K+1) -* On entry, the n-by-(n-k+1) general matrix A. -* On exit, the elements on and above the k-th subdiagonal in -* the first NB columns are overwritten with the corresponding -* elements of the reduced matrix; the elements below the k-th -* subdiagonal, with the array TAU, represent the matrix Q as a -* product of elementary reflectors. The other columns of A are -* unchanged. See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* TAU (output) DOUBLE PRECISION array, dimension (NB) -* The scalar factors of the elementary reflectors. See Further -* Details. -* -* T (output) DOUBLE PRECISION array, dimension (LDT,NB) -* The upper triangular matrix T. -* -* LDT (input) INTEGER -* The leading dimension of the array T. LDT >= NB. -* -* Y (output) DOUBLE PRECISION array, dimension (LDY,NB) -* The n-by-nb matrix Y. -* -* LDY (input) INTEGER -* The leading dimension of the array Y. LDY >= N. -* -* Further Details -* =============== -* -* The matrix Q is represented as a product of nb elementary reflectors -* -* Q = H(1) H(2) . . . H(nb). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in -* A(i+k+1:n,i), and tau in TAU(i). -* -* The elements of the vectors v together form the (n-k+1)-by-nb matrix -* V which is needed, with T and Y, to apply the transformation to the -* unreduced part of the matrix, using an update of the form: -* A := (I - V*T*V') * (A - Y*V'). -* -* The contents of A on exit are illustrated by the following example -* with n = 7, k = 3 and nb = 2: -* -* ( a h a a a ) -* ( a h a a a ) -* ( a h a a a ) -* ( h h a a a ) -* ( v1 h a a a ) -* ( v1 v2 a a a ) -* ( v1 v2 a a a ) -* -* where a denotes an element of the original matrix A, h denotes a -* modified element of the upper Hessenberg matrix H, and vi denotes an -* element of the vector defining H(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I - DOUBLE PRECISION EI -* .. -* .. External Subroutines .. - EXTERNAL DAXPY, DCOPY, DGEMV, DLARFG, DSCAL, DTRMV -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* -* Quick return if possible -* - IF( N.LE.1 ) - $ RETURN -* - DO 10 I = 1, NB - IF( I.GT.1 ) THEN -* -* Update A(1:n,i) -* -* Compute i-th column of A - Y * V' -* - CALL DGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, - $ A( K+I-1, 1 ), LDA, ONE, A( 1, I ), 1 ) -* -* Apply I - V * T' * V' to this column (call it b) from the -* left, using the last column of T as workspace -* -* Let V = ( V1 ) and b = ( b1 ) (first I-1 rows) -* ( V2 ) ( b2 ) -* -* where V1 is unit lower triangular -* -* w := V1' * b1 -* - CALL DCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 ) - CALL DTRMV( 'Lower', 'Transpose', 'Unit', I-1, A( K+1, 1 ), - $ LDA, T( 1, NB ), 1 ) -* -* w := w + V2'*b2 -* - CALL DGEMV( 'Transpose', N-K-I+1, I-1, ONE, A( K+I, 1 ), - $ LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 ) -* -* w := T'*w -* - CALL DTRMV( 'Upper', 'Transpose', 'Non-unit', I-1, T, LDT, - $ T( 1, NB ), 1 ) -* -* b2 := b2 - V2*w -* - CALL DGEMV( 'No transpose', N-K-I+1, I-1, -ONE, A( K+I, 1 ), - $ LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 ) -* -* b1 := b1 - V1*w -* - CALL DTRMV( 'Lower', 'No transpose', 'Unit', I-1, - $ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) - CALL DAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 ) -* - A( K+I-1, I-1 ) = EI - END IF -* -* Generate the elementary reflector H(i) to annihilate -* A(k+i+1:n,i) -* - CALL DLARFG( N-K-I+1, A( K+I, I ), A( MIN( K+I+1, N ), I ), 1, - $ TAU( I ) ) - EI = A( K+I, I ) - A( K+I, I ) = ONE -* -* Compute Y(1:n,i) -* - CALL DGEMV( 'No transpose', N, N-K-I+1, ONE, A( 1, I+1 ), LDA, - $ A( K+I, I ), 1, ZERO, Y( 1, I ), 1 ) - CALL DGEMV( 'Transpose', N-K-I+1, I-1, ONE, A( K+I, 1 ), LDA, - $ A( K+I, I ), 1, ZERO, T( 1, I ), 1 ) - CALL DGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, T( 1, I ), 1, - $ ONE, Y( 1, I ), 1 ) - CALL DSCAL( N, TAU( I ), Y( 1, I ), 1 ) -* -* Compute T(1:i,i) -* - CALL DSCAL( I-1, -TAU( I ), T( 1, I ), 1 ) - CALL DTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, LDT, - $ T( 1, I ), 1 ) - T( I, I ) = TAU( I ) -* - 10 CONTINUE - A( K+NB, NB ) = EI -* - RETURN -* -* End of DLAHRD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlaln2.f b/cpp/nudg++/trunk/BlasLapack/dlaln2.f deleted file mode 100644 index e594b5a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlaln2.f +++ /dev/null @@ -1,508 +0,0 @@ - SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B, - $ LDB, WR, WI, X, LDX, SCALE, XNORM, INFO ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - LOGICAL LTRANS - INTEGER INFO, LDA, LDB, LDX, NA, NW - DOUBLE PRECISION CA, D1, D2, SCALE, SMIN, WI, WR, XNORM -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * ) -* .. -* -* Purpose -* ======= -* -* DLALN2 solves a system of the form (ca A - w D ) X = s B -* or (ca A' - w D) X = s B with possible scaling ("s") and -* perturbation of A. (A' means A-transpose.) -* -* A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA -* real diagonal matrix, w is a real or complex value, and X and B are -* NA x 1 matrices -- real if w is real, complex if w is complex. NA -* may be 1 or 2. -* -* If w is complex, X and B are represented as NA x 2 matrices, -* the first column of each being the real part and the second -* being the imaginary part. -* -* "s" is a scaling factor (.LE. 1), computed by DLALN2, which is -* so chosen that X can be computed without overflow. X is further -* scaled if necessary to assure that norm(ca A - w D)*norm(X) is less -* than overflow. -* -* If both singular values of (ca A - w D) are less than SMIN, -* SMIN*identity will be used instead of (ca A - w D). If only one -* singular value is less than SMIN, one element of (ca A - w D) will be -* perturbed enough to make the smallest singular value roughly SMIN. -* If both singular values are at least SMIN, (ca A - w D) will not be -* perturbed. In any case, the perturbation will be at most some small -* multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values -* are computed by infinity-norm approximations, and thus will only be -* correct to a factor of 2 or so. -* -* Note: all input quantities are assumed to be smaller than overflow -* by a reasonable factor. (See BIGNUM.) -* -* Arguments -* ========== -* -* LTRANS (input) LOGICAL -* =.TRUE.: A-transpose will be used. -* =.FALSE.: A will be used (not transposed.) -* -* NA (input) INTEGER -* The size of the matrix A. It may (only) be 1 or 2. -* -* NW (input) INTEGER -* 1 if "w" is real, 2 if "w" is complex. It may only be 1 -* or 2. -* -* SMIN (input) DOUBLE PRECISION -* The desired lower bound on the singular values of A. This -* should be a safe distance away from underflow or overflow, -* say, between (underflow/machine precision) and (machine -* precision * overflow ). (See BIGNUM and ULP.) -* -* CA (input) DOUBLE PRECISION -* The coefficient c, which A is multiplied by. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,NA) -* The NA x NA matrix A. -* -* LDA (input) INTEGER -* The leading dimension of A. It must be at least NA. -* -* D1 (input) DOUBLE PRECISION -* The 1,1 element in the diagonal matrix D. -* -* D2 (input) DOUBLE PRECISION -* The 2,2 element in the diagonal matrix D. Not used if NW=1. -* -* B (input) DOUBLE PRECISION array, dimension (LDB,NW) -* The NA x NW matrix B (right-hand side). If NW=2 ("w" is -* complex), column 1 contains the real part of B and column 2 -* contains the imaginary part. -* -* LDB (input) INTEGER -* The leading dimension of B. It must be at least NA. -* -* WR (input) DOUBLE PRECISION -* The real part of the scalar "w". -* -* WI (input) DOUBLE PRECISION -* The imaginary part of the scalar "w". Not used if NW=1. -* -* X (output) DOUBLE PRECISION array, dimension (LDX,NW) -* The NA x NW matrix X (unknowns), as computed by DLALN2. -* If NW=2 ("w" is complex), on exit, column 1 will contain -* the real part of X and column 2 will contain the imaginary -* part. -* -* LDX (input) INTEGER -* The leading dimension of X. It must be at least NA. -* -* SCALE (output) DOUBLE PRECISION -* The scale factor that B must be multiplied by to insure -* that overflow does not occur when computing X. Thus, -* (ca A - w D) X will be SCALE*B, not B (ignoring -* perturbations of A.) It will be at most 1. -* -* XNORM (output) DOUBLE PRECISION -* The infinity-norm of X, when X is regarded as an NA x NW -* real matrix. -* -* INFO (output) INTEGER -* An error flag. It will be set to zero if no error occurs, -* a negative number if an argument is in error, or a positive -* number if ca A - w D had to be perturbed. -* The possible values are: -* = 0: No error occurred, and (ca A - w D) did not have to be -* perturbed. -* = 1: (ca A - w D) had to be perturbed to make its smallest -* (or only) singular value greater than SMIN. -* NOTE: In the interests of speed, this routine does not -* check the inputs for errors. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) - DOUBLE PRECISION TWO - PARAMETER ( TWO = 2.0D0 ) -* .. -* .. Local Scalars .. - INTEGER ICMAX, J - DOUBLE PRECISION BBND, BI1, BI2, BIGNUM, BNORM, BR1, BR2, CI21, - $ CI22, CMAX, CNORM, CR21, CR22, CSI, CSR, LI21, - $ LR21, SMINI, SMLNUM, TEMP, U22ABS, UI11, UI11R, - $ UI12, UI12S, UI22, UR11, UR11R, UR12, UR12S, - $ UR22, XI1, XI2, XR1, XR2 -* .. -* .. Local Arrays .. - LOGICAL RSWAP( 4 ), ZSWAP( 4 ) - INTEGER IPIVOT( 4, 4 ) - DOUBLE PRECISION CI( 2, 2 ), CIV( 4 ), CR( 2, 2 ), CRV( 4 ) -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DLADIV -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX -* .. -* .. Equivalences .. - EQUIVALENCE ( CI( 1, 1 ), CIV( 1 ) ), - $ ( CR( 1, 1 ), CRV( 1 ) ) -* .. -* .. Data statements .. - DATA ZSWAP / .FALSE., .FALSE., .TRUE., .TRUE. / - DATA RSWAP / .FALSE., .TRUE., .FALSE., .TRUE. / - DATA IPIVOT / 1, 2, 3, 4, 2, 1, 4, 3, 3, 4, 1, 2, 4, - $ 3, 2, 1 / -* .. -* .. Executable Statements .. -* -* Compute BIGNUM -* - SMLNUM = TWO*DLAMCH( 'Safe minimum' ) - BIGNUM = ONE / SMLNUM - SMINI = MAX( SMIN, SMLNUM ) -* -* Don't check for input errors -* - INFO = 0 -* -* Standard Initializations -* - SCALE = ONE -* - IF( NA.EQ.1 ) THEN -* -* 1 x 1 (i.e., scalar) system C X = B -* - IF( NW.EQ.1 ) THEN -* -* Real 1x1 system. -* -* C = ca A - w D -* - CSR = CA*A( 1, 1 ) - WR*D1 - CNORM = ABS( CSR ) -* -* If | C | < SMINI, use C = SMINI -* - IF( CNORM.LT.SMINI ) THEN - CSR = SMINI - CNORM = SMINI - INFO = 1 - END IF -* -* Check scaling for X = B / C -* - BNORM = ABS( B( 1, 1 ) ) - IF( CNORM.LT.ONE .AND. BNORM.GT.ONE ) THEN - IF( BNORM.GT.BIGNUM*CNORM ) - $ SCALE = ONE / BNORM - END IF -* -* Compute X -* - X( 1, 1 ) = ( B( 1, 1 )*SCALE ) / CSR - XNORM = ABS( X( 1, 1 ) ) - ELSE -* -* Complex 1x1 system (w is complex) -* -* C = ca A - w D -* - CSR = CA*A( 1, 1 ) - WR*D1 - CSI = -WI*D1 - CNORM = ABS( CSR ) + ABS( CSI ) -* -* If | C | < SMINI, use C = SMINI -* - IF( CNORM.LT.SMINI ) THEN - CSR = SMINI - CSI = ZERO - CNORM = SMINI - INFO = 1 - END IF -* -* Check scaling for X = B / C -* - BNORM = ABS( B( 1, 1 ) ) + ABS( B( 1, 2 ) ) - IF( CNORM.LT.ONE .AND. BNORM.GT.ONE ) THEN - IF( BNORM.GT.BIGNUM*CNORM ) - $ SCALE = ONE / BNORM - END IF -* -* Compute X -* - CALL DLADIV( SCALE*B( 1, 1 ), SCALE*B( 1, 2 ), CSR, CSI, - $ X( 1, 1 ), X( 1, 2 ) ) - XNORM = ABS( X( 1, 1 ) ) + ABS( X( 1, 2 ) ) - END IF -* - ELSE -* -* 2x2 System -* -* Compute the real part of C = ca A - w D (or ca A' - w D ) -* - CR( 1, 1 ) = CA*A( 1, 1 ) - WR*D1 - CR( 2, 2 ) = CA*A( 2, 2 ) - WR*D2 - IF( LTRANS ) THEN - CR( 1, 2 ) = CA*A( 2, 1 ) - CR( 2, 1 ) = CA*A( 1, 2 ) - ELSE - CR( 2, 1 ) = CA*A( 2, 1 ) - CR( 1, 2 ) = CA*A( 1, 2 ) - END IF -* - IF( NW.EQ.1 ) THEN -* -* Real 2x2 system (w is real) -* -* Find the largest element in C -* - CMAX = ZERO - ICMAX = 0 -* - DO 10 J = 1, 4 - IF( ABS( CRV( J ) ).GT.CMAX ) THEN - CMAX = ABS( CRV( J ) ) - ICMAX = J - END IF - 10 CONTINUE -* -* If norm(C) < SMINI, use SMINI*identity. -* - IF( CMAX.LT.SMINI ) THEN - BNORM = MAX( ABS( B( 1, 1 ) ), ABS( B( 2, 1 ) ) ) - IF( SMINI.LT.ONE .AND. BNORM.GT.ONE ) THEN - IF( BNORM.GT.BIGNUM*SMINI ) - $ SCALE = ONE / BNORM - END IF - TEMP = SCALE / SMINI - X( 1, 1 ) = TEMP*B( 1, 1 ) - X( 2, 1 ) = TEMP*B( 2, 1 ) - XNORM = TEMP*BNORM - INFO = 1 - RETURN - END IF -* -* Gaussian elimination with complete pivoting. -* - UR11 = CRV( ICMAX ) - CR21 = CRV( IPIVOT( 2, ICMAX ) ) - UR12 = CRV( IPIVOT( 3, ICMAX ) ) - CR22 = CRV( IPIVOT( 4, ICMAX ) ) - UR11R = ONE / UR11 - LR21 = UR11R*CR21 - UR22 = CR22 - UR12*LR21 -* -* If smaller pivot < SMINI, use SMINI -* - IF( ABS( UR22 ).LT.SMINI ) THEN - UR22 = SMINI - INFO = 1 - END IF - IF( RSWAP( ICMAX ) ) THEN - BR1 = B( 2, 1 ) - BR2 = B( 1, 1 ) - ELSE - BR1 = B( 1, 1 ) - BR2 = B( 2, 1 ) - END IF - BR2 = BR2 - LR21*BR1 - BBND = MAX( ABS( BR1*( UR22*UR11R ) ), ABS( BR2 ) ) - IF( BBND.GT.ONE .AND. ABS( UR22 ).LT.ONE ) THEN - IF( BBND.GE.BIGNUM*ABS( UR22 ) ) - $ SCALE = ONE / BBND - END IF -* - XR2 = ( BR2*SCALE ) / UR22 - XR1 = ( SCALE*BR1 )*UR11R - XR2*( UR11R*UR12 ) - IF( ZSWAP( ICMAX ) ) THEN - X( 1, 1 ) = XR2 - X( 2, 1 ) = XR1 - ELSE - X( 1, 1 ) = XR1 - X( 2, 1 ) = XR2 - END IF - XNORM = MAX( ABS( XR1 ), ABS( XR2 ) ) -* -* Further scaling if norm(A) norm(X) > overflow -* - IF( XNORM.GT.ONE .AND. CMAX.GT.ONE ) THEN - IF( XNORM.GT.BIGNUM / CMAX ) THEN - TEMP = CMAX / BIGNUM - X( 1, 1 ) = TEMP*X( 1, 1 ) - X( 2, 1 ) = TEMP*X( 2, 1 ) - XNORM = TEMP*XNORM - SCALE = TEMP*SCALE - END IF - END IF - ELSE -* -* Complex 2x2 system (w is complex) -* -* Find the largest element in C -* - CI( 1, 1 ) = -WI*D1 - CI( 2, 1 ) = ZERO - CI( 1, 2 ) = ZERO - CI( 2, 2 ) = -WI*D2 - CMAX = ZERO - ICMAX = 0 -* - DO 20 J = 1, 4 - IF( ABS( CRV( J ) )+ABS( CIV( J ) ).GT.CMAX ) THEN - CMAX = ABS( CRV( J ) ) + ABS( CIV( J ) ) - ICMAX = J - END IF - 20 CONTINUE -* -* If norm(C) < SMINI, use SMINI*identity. -* - IF( CMAX.LT.SMINI ) THEN - BNORM = MAX( ABS( B( 1, 1 ) )+ABS( B( 1, 2 ) ), - $ ABS( B( 2, 1 ) )+ABS( B( 2, 2 ) ) ) - IF( SMINI.LT.ONE .AND. BNORM.GT.ONE ) THEN - IF( BNORM.GT.BIGNUM*SMINI ) - $ SCALE = ONE / BNORM - END IF - TEMP = SCALE / SMINI - X( 1, 1 ) = TEMP*B( 1, 1 ) - X( 2, 1 ) = TEMP*B( 2, 1 ) - X( 1, 2 ) = TEMP*B( 1, 2 ) - X( 2, 2 ) = TEMP*B( 2, 2 ) - XNORM = TEMP*BNORM - INFO = 1 - RETURN - END IF -* -* Gaussian elimination with complete pivoting. -* - UR11 = CRV( ICMAX ) - UI11 = CIV( ICMAX ) - CR21 = CRV( IPIVOT( 2, ICMAX ) ) - CI21 = CIV( IPIVOT( 2, ICMAX ) ) - UR12 = CRV( IPIVOT( 3, ICMAX ) ) - UI12 = CIV( IPIVOT( 3, ICMAX ) ) - CR22 = CRV( IPIVOT( 4, ICMAX ) ) - CI22 = CIV( IPIVOT( 4, ICMAX ) ) - IF( ICMAX.EQ.1 .OR. ICMAX.EQ.4 ) THEN -* -* Code when off-diagonals of pivoted C are real -* - IF( ABS( UR11 ).GT.ABS( UI11 ) ) THEN - TEMP = UI11 / UR11 - UR11R = ONE / ( UR11*( ONE+TEMP**2 ) ) - UI11R = -TEMP*UR11R - ELSE - TEMP = UR11 / UI11 - UI11R = -ONE / ( UI11*( ONE+TEMP**2 ) ) - UR11R = -TEMP*UI11R - END IF - LR21 = CR21*UR11R - LI21 = CR21*UI11R - UR12S = UR12*UR11R - UI12S = UR12*UI11R - UR22 = CR22 - UR12*LR21 - UI22 = CI22 - UR12*LI21 - ELSE -* -* Code when diagonals of pivoted C are real -* - UR11R = ONE / UR11 - UI11R = ZERO - LR21 = CR21*UR11R - LI21 = CI21*UR11R - UR12S = UR12*UR11R - UI12S = UI12*UR11R - UR22 = CR22 - UR12*LR21 + UI12*LI21 - UI22 = -UR12*LI21 - UI12*LR21 - END IF - U22ABS = ABS( UR22 ) + ABS( UI22 ) -* -* If smaller pivot < SMINI, use SMINI -* - IF( U22ABS.LT.SMINI ) THEN - UR22 = SMINI - UI22 = ZERO - INFO = 1 - END IF - IF( RSWAP( ICMAX ) ) THEN - BR2 = B( 1, 1 ) - BR1 = B( 2, 1 ) - BI2 = B( 1, 2 ) - BI1 = B( 2, 2 ) - ELSE - BR1 = B( 1, 1 ) - BR2 = B( 2, 1 ) - BI1 = B( 1, 2 ) - BI2 = B( 2, 2 ) - END IF - BR2 = BR2 - LR21*BR1 + LI21*BI1 - BI2 = BI2 - LI21*BR1 - LR21*BI1 - BBND = MAX( ( ABS( BR1 )+ABS( BI1 ) )* - $ ( U22ABS*( ABS( UR11R )+ABS( UI11R ) ) ), - $ ABS( BR2 )+ABS( BI2 ) ) - IF( BBND.GT.ONE .AND. U22ABS.LT.ONE ) THEN - IF( BBND.GE.BIGNUM*U22ABS ) THEN - SCALE = ONE / BBND - BR1 = SCALE*BR1 - BI1 = SCALE*BI1 - BR2 = SCALE*BR2 - BI2 = SCALE*BI2 - END IF - END IF -* - CALL DLADIV( BR2, BI2, UR22, UI22, XR2, XI2 ) - XR1 = UR11R*BR1 - UI11R*BI1 - UR12S*XR2 + UI12S*XI2 - XI1 = UI11R*BR1 + UR11R*BI1 - UI12S*XR2 - UR12S*XI2 - IF( ZSWAP( ICMAX ) ) THEN - X( 1, 1 ) = XR2 - X( 2, 1 ) = XR1 - X( 1, 2 ) = XI2 - X( 2, 2 ) = XI1 - ELSE - X( 1, 1 ) = XR1 - X( 2, 1 ) = XR2 - X( 1, 2 ) = XI1 - X( 2, 2 ) = XI2 - END IF - XNORM = MAX( ABS( XR1 )+ABS( XI1 ), ABS( XR2 )+ABS( XI2 ) ) -* -* Further scaling if norm(A) norm(X) > overflow -* - IF( XNORM.GT.ONE .AND. CMAX.GT.ONE ) THEN - IF( XNORM.GT.BIGNUM / CMAX ) THEN - TEMP = CMAX / BIGNUM - X( 1, 1 ) = TEMP*X( 1, 1 ) - X( 2, 1 ) = TEMP*X( 2, 1 ) - X( 1, 2 ) = TEMP*X( 1, 2 ) - X( 2, 2 ) = TEMP*X( 2, 2 ) - XNORM = TEMP*XNORM - SCALE = TEMP*SCALE - END IF - END IF - END IF - END IF -* - RETURN -* -* End of DLALN2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlamch.f b/cpp/nudg++/trunk/BlasLapack/dlamch.f deleted file mode 100644 index a905e5a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlamch.f +++ /dev/null @@ -1,857 +0,0 @@ - DOUBLE PRECISION FUNCTION DLAMCH( CMACH ) -* -* -- LAPACK auxiliary routine (version 1.1) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER CMACH -* .. -* -* Purpose -* ======= -* -* DLAMCH determines double precision machine parameters. -* -* Arguments -* ========= -* -* CMACH (input) CHARACTER*1 -* Specifies the value to be returned by DLAMCH: -* = 'E' or 'e', DLAMCH := eps -* = 'S' or 's , DLAMCH := sfmin -* = 'B' or 'b', DLAMCH := base -* = 'P' or 'p', DLAMCH := eps*base -* = 'N' or 'n', DLAMCH := t -* = 'R' or 'r', DLAMCH := rnd -* = 'M' or 'm', DLAMCH := emin -* = 'U' or 'u', DLAMCH := rmin -* = 'L' or 'l', DLAMCH := emax -* = 'O' or 'o', DLAMCH := rmax -* -* where -* -* eps = relative machine precision -* sfmin = safe minimum, such that 1/sfmin does not overflow -* base = base of the machine -* prec = eps*base -* t = number of (base) digits in the mantissa -* rnd = 1.0 when rounding occurs in addition, 0.0 otherwise -* emin = minimum exponent before (gradual) underflow -* rmin = underflow threshold - base**(emin-1) -* emax = largest exponent before overflow -* rmax = overflow threshold - (base**emax)*(1-eps) -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL FIRST, LRND - INTEGER BETA, IMAX, IMIN, IT - DOUBLE PRECISION BASE, EMAX, EMIN, EPS, PREC, RMACH, RMAX, RMIN, - $ RND, SFMIN, SMALL, T -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DLAMC2 -* .. -* .. Save statement .. - SAVE FIRST, EPS, SFMIN, BASE, T, RND, EMIN, RMIN, - $ EMAX, RMAX, PREC -* .. -* .. Data statements .. - DATA FIRST / .TRUE. / -* .. -* .. Executable Statements .. -* - IF( FIRST ) THEN - FIRST = .FALSE. - CALL DLAMC2( BETA, IT, LRND, EPS, IMIN, RMIN, IMAX, RMAX ) - BASE = BETA - T = IT - IF( LRND ) THEN - RND = ONE - EPS = ( BASE**( 1-IT ) ) / 2 - ELSE - RND = ZERO - EPS = BASE**( 1-IT ) - END IF - PREC = EPS*BASE - EMIN = IMIN - EMAX = IMAX - SFMIN = RMIN - SMALL = ONE / RMAX - IF( SMALL.GE.SFMIN ) THEN -* -* Use SMALL plus a bit, to avoid the possibility of rounding -* causing overflow when computing 1/sfmin. -* - SFMIN = SMALL*( ONE+EPS ) - END IF - END IF -* - IF( LSAME( CMACH, 'E' ) ) THEN - RMACH = EPS - ELSE IF( LSAME( CMACH, 'S' ) ) THEN - RMACH = SFMIN - ELSE IF( LSAME( CMACH, 'B' ) ) THEN - RMACH = BASE - ELSE IF( LSAME( CMACH, 'P' ) ) THEN - RMACH = PREC - ELSE IF( LSAME( CMACH, 'N' ) ) THEN - RMACH = T - ELSE IF( LSAME( CMACH, 'R' ) ) THEN - RMACH = RND - ELSE IF( LSAME( CMACH, 'M' ) ) THEN - RMACH = EMIN - ELSE IF( LSAME( CMACH, 'U' ) ) THEN - RMACH = RMIN - ELSE IF( LSAME( CMACH, 'L' ) ) THEN - RMACH = EMAX - ELSE IF( LSAME( CMACH, 'O' ) ) THEN - RMACH = RMAX - END IF -* - DLAMCH = RMACH - RETURN -* -* End of DLAMCH -* - END -* -************************************************************************ -* - SUBROUTINE DLAMC1( BETA, T, RND, IEEE1 ) -* -* -- LAPACK auxiliary routine (version 1.1) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - LOGICAL IEEE1, RND - INTEGER BETA, T -* .. -* -* Purpose -* ======= -* -* DLAMC1 determines the machine parameters given by BETA, T, RND, and -* IEEE1. -* -* Arguments -* ========= -* -* BETA (output) INTEGER -* The base of the machine. -* -* T (output) INTEGER -* The number of ( BETA ) digits in the mantissa. -* -* RND (output) LOGICAL -* Specifies whether proper rounding ( RND = .TRUE. ) or -* chopping ( RND = .FALSE. ) occurs in addition. This may not -* be a reliable guide to the way in which the machine performs -* its arithmetic. -* -* IEEE1 (output) LOGICAL -* Specifies whether rounding appears to be done in the IEEE -* 'round to nearest' style. -* -* Further Details -* =============== -* -* The routine is based on the routine ENVRON by Malcolm and -* incorporates suggestions by Gentleman and Marovich. See -* -* Malcolm M. A. (1972) Algorithms to reveal properties of -* floating-point arithmetic. Comms. of the ACM, 15, 949-951. -* -* Gentleman W. M. and Marovich S. B. (1974) More on algorithms -* that reveal properties of floating point arithmetic units. -* Comms. of the ACM, 17, 276-277. -* -* ===================================================================== -* -* .. Local Scalars .. - LOGICAL FIRST, LIEEE1, LRND - INTEGER LBETA, LT - DOUBLE PRECISION A, B, C, F, ONE, QTR, SAVEC, T1, T2 -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMC3 - EXTERNAL DLAMC3 -* .. -* .. Save statement .. - SAVE FIRST, LIEEE1, LBETA, LRND, LT -* .. -* .. Data statements .. - DATA FIRST / .TRUE. / -* .. -* .. Executable Statements .. -* - IF( FIRST ) THEN - FIRST = .FALSE. - ONE = 1 -* -* LBETA, LIEEE1, LT and LRND are the local values of BETA, -* IEEE1, T and RND. -* -* Throughout this routine we use the function DLAMC3 to ensure -* that relevant values are stored and not held in registers, or -* are not affected by optimizers. -* -* Compute a = 2.0**m with the smallest positive integer m such -* that -* -* fl( a + 1.0 ) = a. -* - A = 1 - C = 1 -* -*+ WHILE( C.EQ.ONE )LOOP - 10 CONTINUE - IF( C.EQ.ONE ) THEN - A = 2*A - C = DLAMC3( A, ONE ) - C = DLAMC3( C, -A ) - GO TO 10 - END IF -*+ END WHILE -* -* Now compute b = 2.0**m with the smallest positive integer m -* such that -* -* fl( a + b ) .gt. a. -* - B = 1 - C = DLAMC3( A, B ) -* -*+ WHILE( C.EQ.A )LOOP - 20 CONTINUE - IF( C.EQ.A ) THEN - B = 2*B - C = DLAMC3( A, B ) - GO TO 20 - END IF -*+ END WHILE -* -* Now compute the base. a and c are neighbouring floating point -* numbers in the interval ( beta**t, beta**( t + 1 ) ) and so -* their difference is beta. Adding 0.25 to c is to ensure that it -* is truncated to beta and not ( beta - 1 ). -* - QTR = ONE / 4 - SAVEC = C - C = DLAMC3( C, -A ) - LBETA = C + QTR -* -* Now determine whether rounding or chopping occurs, by adding a -* bit less than beta/2 and a bit more than beta/2 to a. -* - B = LBETA - F = DLAMC3( B / 2, -B / 100 ) - C = DLAMC3( F, A ) - IF( C.EQ.A ) THEN - LRND = .TRUE. - ELSE - LRND = .FALSE. - END IF - F = DLAMC3( B / 2, B / 100 ) - C = DLAMC3( F, A ) - IF( ( LRND ) .AND. ( C.EQ.A ) ) - $ LRND = .FALSE. -* -* Try and decide whether rounding is done in the IEEE 'round to -* nearest' style. B/2 is half a unit in the last place of the two -* numbers A and SAVEC. Furthermore, A is even, i.e. has last bit -* zero, and SAVEC is odd. Thus adding B/2 to A should not change -* A, but adding B/2 to SAVEC should change SAVEC. -* - T1 = DLAMC3( B / 2, A ) - T2 = DLAMC3( B / 2, SAVEC ) - LIEEE1 = ( T1.EQ.A ) .AND. ( T2.GT.SAVEC ) .AND. LRND -* -* Now find the mantissa, t. It should be the integer part of -* log to the base beta of a, however it is safer to determine t -* by powering. So we find t as the smallest positive integer for -* which -* -* fl( beta**t + 1.0 ) = 1.0. -* - LT = 0 - A = 1 - C = 1 -* -*+ WHILE( C.EQ.ONE )LOOP - 30 CONTINUE - IF( C.EQ.ONE ) THEN - LT = LT + 1 - A = A*LBETA - C = DLAMC3( A, ONE ) - C = DLAMC3( C, -A ) - GO TO 30 - END IF -*+ END WHILE -* - END IF -* - BETA = LBETA - T = LT - RND = LRND - IEEE1 = LIEEE1 - RETURN -* -* End of DLAMC1 -* - END -* -************************************************************************ -* - SUBROUTINE DLAMC2( BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX ) -* -* -- LAPACK auxiliary routine (version 1.1) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - LOGICAL RND - INTEGER BETA, EMAX, EMIN, T - DOUBLE PRECISION EPS, RMAX, RMIN -* .. -* -* Purpose -* ======= -* -* DLAMC2 determines the machine parameters specified in its argument -* list. -* -* Arguments -* ========= -* -* BETA (output) INTEGER -* The base of the machine. -* -* T (output) INTEGER -* The number of ( BETA ) digits in the mantissa. -* -* RND (output) LOGICAL -* Specifies whether proper rounding ( RND = .TRUE. ) or -* chopping ( RND = .FALSE. ) occurs in addition. This may not -* be a reliable guide to the way in which the machine performs -* its arithmetic. -* -* EPS (output) DOUBLE PRECISION -* The smallest positive number such that -* -* fl( 1.0 - EPS ) .LT. 1.0, -* -* where fl denotes the computed value. -* -* EMIN (output) INTEGER -* The minimum exponent before (gradual) underflow occurs. -* -* RMIN (output) DOUBLE PRECISION -* The smallest normalized number for the machine, given by -* BASE**( EMIN - 1 ), where BASE is the floating point value -* of BETA. -* -* EMAX (output) INTEGER -* The maximum exponent before overflow occurs. -* -* RMAX (output) DOUBLE PRECISION -* The largest positive number for the machine, given by -* BASE**EMAX * ( 1 - EPS ), where BASE is the floating point -* value of BETA. -* -* Further Details -* =============== -* -* The computation of EPS is based on a routine PARANOIA by -* W. Kahan of the University of California at Berkeley. -* -* ===================================================================== -* -* .. Local Scalars .. - LOGICAL FIRST, IEEE, IWARN, LIEEE1, LRND - INTEGER GNMIN, GPMIN, I, LBETA, LEMAX, LEMIN, LT, - $ NGNMIN, NGPMIN - DOUBLE PRECISION A, B, C, HALF, LEPS, LRMAX, LRMIN, ONE, RBASE, - $ SIXTH, SMALL, THIRD, TWO, ZERO -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMC3 - EXTERNAL DLAMC3 -* .. -* .. External Subroutines .. - EXTERNAL DLAMC1, DLAMC4, DLAMC5 -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN -* .. -* .. Save statement .. - SAVE FIRST, IWARN, LBETA, LEMAX, LEMIN, LEPS, LRMAX, - $ LRMIN, LT -* .. -* .. Data statements .. - DATA FIRST / .TRUE. / , IWARN / .FALSE. / -* .. -* .. Executable Statements .. -* - IF( FIRST ) THEN - FIRST = .FALSE. - ZERO = 0 - ONE = 1 - TWO = 2 -* -* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values of -* BETA, T, RND, EPS, EMIN and RMIN. -* -* Throughout this routine we use the function DLAMC3 to ensure -* that relevant values are stored and not held in registers, or -* are not affected by optimizers. -* -* DLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1. -* - CALL DLAMC1( LBETA, LT, LRND, LIEEE1 ) -* -* Start to find EPS. -* - B = LBETA - A = B**( -LT ) - LEPS = A -* -* Try some tricks to see whether or not this is the correct EPS. -* - B = TWO / 3 - HALF = ONE / 2 - SIXTH = DLAMC3( B, -HALF ) - THIRD = DLAMC3( SIXTH, SIXTH ) - B = DLAMC3( THIRD, -HALF ) - B = DLAMC3( B, SIXTH ) - B = ABS( B ) - IF( B.LT.LEPS ) - $ B = LEPS -* - LEPS = 1 -* -*+ WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP - 10 CONTINUE - IF( ( LEPS.GT.B ) .AND. ( B.GT.ZERO ) ) THEN - LEPS = B - C = DLAMC3( HALF*LEPS, ( TWO**5 )*( LEPS**2 ) ) - C = DLAMC3( HALF, -C ) - B = DLAMC3( HALF, C ) - C = DLAMC3( HALF, -B ) - B = DLAMC3( HALF, C ) - GO TO 10 - END IF -*+ END WHILE -* - IF( A.LT.LEPS ) - $ LEPS = A -* -* Computation of EPS complete. -* -* Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3)). -* Keep dividing A by BETA until (gradual) underflow occurs. This -* is detected when we cannot recover the previous A. -* - RBASE = ONE / LBETA - SMALL = ONE - DO 20 I = 1, 3 - SMALL = DLAMC3( SMALL*RBASE, ZERO ) - 20 CONTINUE - A = DLAMC3( ONE, SMALL ) - CALL DLAMC4( NGPMIN, ONE, LBETA ) - CALL DLAMC4( NGNMIN, -ONE, LBETA ) - CALL DLAMC4( GPMIN, A, LBETA ) - CALL DLAMC4( GNMIN, -A, LBETA ) - IEEE = .FALSE. -* - IF( ( NGPMIN.EQ.NGNMIN ) .AND. ( GPMIN.EQ.GNMIN ) ) THEN - IF( NGPMIN.EQ.GPMIN ) THEN - LEMIN = NGPMIN -* ( Non twos-complement machines, no gradual underflow; -* e.g., VAX ) - ELSE IF( ( GPMIN-NGPMIN ).EQ.3 ) THEN - LEMIN = NGPMIN - 1 + LT - IEEE = .TRUE. -* ( Non twos-complement machines, with gradual underflow; -* e.g., IEEE standard followers ) - ELSE - LEMIN = MIN( NGPMIN, GPMIN ) -* ( A guess; no known machine ) - IWARN = .TRUE. - END IF -* - ELSE IF( ( NGPMIN.EQ.GPMIN ) .AND. ( NGNMIN.EQ.GNMIN ) ) THEN - IF( ABS( NGPMIN-NGNMIN ).EQ.1 ) THEN - LEMIN = MAX( NGPMIN, NGNMIN ) -* ( Twos-complement machines, no gradual underflow; -* e.g., CYBER 205 ) - ELSE - LEMIN = MIN( NGPMIN, NGNMIN ) -* ( A guess; no known machine ) - IWARN = .TRUE. - END IF -* - ELSE IF( ( ABS( NGPMIN-NGNMIN ).EQ.1 ) .AND. - $ ( GPMIN.EQ.GNMIN ) ) THEN - IF( ( GPMIN-MIN( NGPMIN, NGNMIN ) ).EQ.3 ) THEN - LEMIN = MAX( NGPMIN, NGNMIN ) - 1 + LT -* ( Twos-complement machines with gradual underflow; -* no known machine ) - ELSE - LEMIN = MIN( NGPMIN, NGNMIN ) -* ( A guess; no known machine ) - IWARN = .TRUE. - END IF -* - ELSE - LEMIN = MIN( NGPMIN, NGNMIN, GPMIN, GNMIN ) -* ( A guess; no known machine ) - IWARN = .TRUE. - END IF -*** -* Comment out this if block if EMIN is ok - IF( IWARN ) THEN - FIRST = .TRUE. - WRITE( 6, FMT = 9999 )LEMIN - END IF -*** -* -* Assume IEEE arithmetic if we found denormalised numbers above, -* or if arithmetic seems to round in the IEEE style, determined -* in routine DLAMC1. A true IEEE machine should have both things -* true; however, faulty machines may have one or the other. -* - IEEE = IEEE .OR. LIEEE1 -* -* Compute RMIN by successive division by BETA. We could compute -* RMIN as BASE**( EMIN - 1 ), but some machines underflow during -* this computation. -* - LRMIN = 1 - DO 30 I = 1, 1 - LEMIN - LRMIN = DLAMC3( LRMIN*RBASE, ZERO ) - 30 CONTINUE -* -* Finally, call DLAMC5 to compute EMAX and RMAX. -* - CALL DLAMC5( LBETA, LT, LEMIN, IEEE, LEMAX, LRMAX ) - END IF -* - BETA = LBETA - T = LT - RND = LRND - EPS = LEPS - EMIN = LEMIN - RMIN = LRMIN - EMAX = LEMAX - RMAX = LRMAX -* - RETURN -* - 9999 FORMAT( / / ' WARNING. The value EMIN may be incorrect:-', - $ ' EMIN = ', I8, / - $ ' If, after inspection, the value EMIN looks', - $ ' acceptable please comment out ', - $ / ' the IF block as marked within the code of routine', - $ ' DLAMC2,', / ' otherwise supply EMIN explicitly.', / ) -* -* End of DLAMC2 -* - END -* -************************************************************************ -* - DOUBLE PRECISION FUNCTION DLAMC3( A, B ) -* -* -- LAPACK auxiliary routine (version 1.1) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - DOUBLE PRECISION A, B -* .. -* -* Purpose -* ======= -* -* DLAMC3 is intended to force A and B to be stored prior to doing -* the addition of A and B , for use in situations where optimizers -* might hold one of these in a register. -* -* Arguments -* ========= -* -* A, B (input) DOUBLE PRECISION -* The values A and B. -* -* ===================================================================== -* -* .. Executable Statements .. -* - DLAMC3 = A + B -* - RETURN -* -* End of DLAMC3 -* - END -* -************************************************************************ -* - SUBROUTINE DLAMC4( EMIN, START, BASE ) -* -* -- LAPACK auxiliary routine (version 1.1) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - INTEGER BASE, EMIN - DOUBLE PRECISION START -* .. -* -* Purpose -* ======= -* -* DLAMC4 is a service routine for DLAMC2. -* -* Arguments -* ========= -* -* EMIN (output) EMIN -* The minimum exponent before (gradual) underflow, computed by -* setting A = START and dividing by BASE until the previous A -* can not be recovered. -* -* START (input) DOUBLE PRECISION -* The starting point for determining EMIN. -* -* BASE (input) INTEGER -* The base of the machine. -* -* ===================================================================== -* -* .. Local Scalars .. - INTEGER I - DOUBLE PRECISION A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMC3 - EXTERNAL DLAMC3 -* .. -* .. Executable Statements .. -* - A = START - ONE = 1 - RBASE = ONE / BASE - ZERO = 0 - EMIN = 1 - B1 = DLAMC3( A*RBASE, ZERO ) - C1 = A - C2 = A - D1 = A - D2 = A -*+ WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND. -* $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP - 10 CONTINUE - IF( ( C1.EQ.A ) .AND. ( C2.EQ.A ) .AND. ( D1.EQ.A ) .AND. - $ ( D2.EQ.A ) ) THEN - EMIN = EMIN - 1 - A = B1 - B1 = DLAMC3( A / BASE, ZERO ) - C1 = DLAMC3( B1*BASE, ZERO ) - D1 = ZERO - DO 20 I = 1, BASE - D1 = D1 + B1 - 20 CONTINUE - B2 = DLAMC3( A*RBASE, ZERO ) - C2 = DLAMC3( B2 / RBASE, ZERO ) - D2 = ZERO - DO 30 I = 1, BASE - D2 = D2 + B2 - 30 CONTINUE - GO TO 10 - END IF -*+ END WHILE -* - RETURN -* -* End of DLAMC4 -* - END -* -************************************************************************ -* - SUBROUTINE DLAMC5( BETA, P, EMIN, IEEE, EMAX, RMAX ) -* -* -- LAPACK auxiliary routine (version 1.1) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - LOGICAL IEEE - INTEGER BETA, EMAX, EMIN, P - DOUBLE PRECISION RMAX -* .. -* -* Purpose -* ======= -* -* DLAMC5 attempts to compute RMAX, the largest machine floating-point -* number, without overflow. It assumes that EMAX + abs(EMIN) sum -* approximately to a power of 2. It will fail on machines where this -* assumption does not hold, for example, the Cyber 205 (EMIN = -28625, -* EMAX = 28718). It will also fail if the value supplied for EMIN is -* too large (i.e. too close to zero), probably with overflow. -* -* Arguments -* ========= -* -* BETA (input) INTEGER -* The base of floating-point arithmetic. -* -* P (input) INTEGER -* The number of base BETA digits in the mantissa of a -* floating-point value. -* -* EMIN (input) INTEGER -* The minimum exponent before (gradual) underflow. -* -* IEEE (input) LOGICAL -* A logical flag specifying whether or not the arithmetic -* system is thought to comply with the IEEE standard. -* -* EMAX (output) INTEGER -* The largest exponent before overflow -* -* RMAX (output) DOUBLE PRECISION -* The largest machine floating-point number. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - INTEGER EXBITS, EXPSUM, I, LEXP, NBITS, TRY, UEXP - DOUBLE PRECISION OLDY, RECBAS, Y, Z -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMC3 - EXTERNAL DLAMC3 -* .. -* .. Intrinsic Functions .. - INTRINSIC MOD -* .. -* .. Executable Statements .. -* -* First compute LEXP and UEXP, two powers of 2 that bound -* abs(EMIN). We then assume that EMAX + abs(EMIN) will sum -* approximately to the bound that is closest to abs(EMIN). -* (EMAX is the exponent of the required number RMAX). -* - LEXP = 1 - EXBITS = 1 - 10 CONTINUE - TRY = LEXP*2 - IF( TRY.LE.( -EMIN ) ) THEN - LEXP = TRY - EXBITS = EXBITS + 1 - GO TO 10 - END IF - IF( LEXP.EQ.-EMIN ) THEN - UEXP = LEXP - ELSE - UEXP = TRY - EXBITS = EXBITS + 1 - END IF -* -* Now -LEXP is less than or equal to EMIN, and -UEXP is greater -* than or equal to EMIN. EXBITS is the number of bits needed to -* store the exponent. -* - IF( ( UEXP+EMIN ).GT.( -LEXP-EMIN ) ) THEN - EXPSUM = 2*LEXP - ELSE - EXPSUM = 2*UEXP - END IF -* -* EXPSUM is the exponent range, approximately equal to -* EMAX - EMIN + 1 . -* - EMAX = EXPSUM + EMIN - 1 - NBITS = 1 + EXBITS + P -* -* NBITS is the total number of bits needed to store a -* floating-point number. -* - IF( ( MOD( NBITS, 2 ).EQ.1 ) .AND. ( BETA.EQ.2 ) ) THEN -* -* Either there are an odd number of bits used to store a -* floating-point number, which is unlikely, or some bits are -* not used in the representation of numbers, which is possible, -* (e.g. Cray machines) or the mantissa has an implicit bit, -* (e.g. IEEE machines, Dec Vax machines), which is perhaps the -* most likely. We have to assume the last alternative. -* If this is true, then we need to reduce EMAX by one because -* there must be some way of representing zero in an implicit-bit -* system. On machines like Cray, we are reducing EMAX by one -* unnecessarily. -* - EMAX = EMAX - 1 - END IF -* - IF( IEEE ) THEN -* -* Assume we are on an IEEE machine which reserves one exponent -* for infinity and NaN. -* - EMAX = EMAX - 1 - END IF -* -* Now create RMAX, the largest machine number, which should -* be equal to (1.0 - BETA**(-P)) * BETA**EMAX . -* -* First compute 1.0 - BETA**(-P), being careful that the -* result is less than 1.0 . -* - RECBAS = ONE / BETA - Z = BETA - ONE - Y = ZERO - DO 20 I = 1, P - Z = Z*RECBAS - IF( Y.LT.ONE ) - $ OLDY = Y - Y = DLAMC3( Y, Z ) - 20 CONTINUE - IF( Y.GE.ONE ) - $ Y = OLDY -* -* Now multiply by BETA**EMAX to get RMAX. -* - DO 30 I = 1, EMAX - Y = DLAMC3( Y*BETA, ZERO ) - 30 CONTINUE -* - RMAX = Y - RETURN -* -* End of DLAMC5 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlange.f b/cpp/nudg++/trunk/BlasLapack/dlange.f deleted file mode 100644 index 202ba60..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlange.f +++ /dev/null @@ -1,145 +0,0 @@ - DOUBLE PRECISION FUNCTION DLANGE( NORM, M, N, A, LDA, WORK ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER NORM - INTEGER LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DLANGE returns the value of the one norm, or the Frobenius norm, or -* the infinity norm, or the element of largest absolute value of a -* real matrix A. -* -* Description -* =========== -* -* DLANGE returns the value -* -* DLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm' -* ( -* ( norm1(A), NORM = '1', 'O' or 'o' -* ( -* ( normI(A), NORM = 'I' or 'i' -* ( -* ( normF(A), NORM = 'F', 'f', 'E' or 'e' -* -* where norm1 denotes the one norm of a matrix (maximum column sum), -* normI denotes the infinity norm of a matrix (maximum row sum) and -* normF denotes the Frobenius norm of a matrix (square root of sum of -* squares). Note that max(abs(A(i,j))) is not a matrix norm. -* -* Arguments -* ========= -* -* NORM (input) CHARACTER*1 -* Specifies the value to be returned in DLANGE as described -* above. -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. When M = 0, -* DLANGE is set to zero. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. When N = 0, -* DLANGE is set to zero. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The m by n matrix A. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(M,1). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK), -* where LWORK >= M when NORM = 'I'; otherwise, WORK is not -* referenced. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, J - DOUBLE PRECISION SCALE, SUM, VALUE -* .. -* .. External Subroutines .. - EXTERNAL DLASSQ -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* - IF( MIN( M, N ).EQ.0 ) THEN - VALUE = ZERO - ELSE IF( LSAME( NORM, 'M' ) ) THEN -* -* Find max(abs(A(i,j))). -* - VALUE = ZERO - DO 20 J = 1, N - DO 10 I = 1, M - VALUE = MAX( VALUE, ABS( A( I, J ) ) ) - 10 CONTINUE - 20 CONTINUE - ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN -* -* Find norm1(A). -* - VALUE = ZERO - DO 40 J = 1, N - SUM = ZERO - DO 30 I = 1, M - SUM = SUM + ABS( A( I, J ) ) - 30 CONTINUE - VALUE = MAX( VALUE, SUM ) - 40 CONTINUE - ELSE IF( LSAME( NORM, 'I' ) ) THEN -* -* Find normI(A). -* - DO 50 I = 1, M - WORK( I ) = ZERO - 50 CONTINUE - DO 70 J = 1, N - DO 60 I = 1, M - WORK( I ) = WORK( I ) + ABS( A( I, J ) ) - 60 CONTINUE - 70 CONTINUE - VALUE = ZERO - DO 80 I = 1, M - VALUE = MAX( VALUE, WORK( I ) ) - 80 CONTINUE - ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN -* -* Find normF(A). -* - SCALE = ZERO - SUM = ONE - DO 90 J = 1, N - CALL DLASSQ( M, A( 1, J ), 1, SCALE, SUM ) - 90 CONTINUE - VALUE = SCALE*SQRT( SUM ) - END IF -* - DLANGE = VALUE - RETURN -* -* End of DLANGE -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlanhs.f b/cpp/nudg++/trunk/BlasLapack/dlanhs.f deleted file mode 100644 index 45939f0..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlanhs.f +++ /dev/null @@ -1,142 +0,0 @@ - DOUBLE PRECISION FUNCTION DLANHS( NORM, N, A, LDA, WORK ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER NORM - INTEGER LDA, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DLANHS returns the value of the one norm, or the Frobenius norm, or -* the infinity norm, or the element of largest absolute value of a -* Hessenberg matrix A. -* -* Description -* =========== -* -* DLANHS returns the value -* -* DLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm' -* ( -* ( norm1(A), NORM = '1', 'O' or 'o' -* ( -* ( normI(A), NORM = 'I' or 'i' -* ( -* ( normF(A), NORM = 'F', 'f', 'E' or 'e' -* -* where norm1 denotes the one norm of a matrix (maximum column sum), -* normI denotes the infinity norm of a matrix (maximum row sum) and -* normF denotes the Frobenius norm of a matrix (square root of sum of -* squares). Note that max(abs(A(i,j))) is not a matrix norm. -* -* Arguments -* ========= -* -* NORM (input) CHARACTER*1 -* Specifies the value to be returned in DLANHS as described -* above. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. When N = 0, DLANHS is -* set to zero. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The n by n upper Hessenberg matrix A; the part of A below the -* first sub-diagonal is not referenced. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(N,1). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK), -* where LWORK >= N when NORM = 'I'; otherwise, WORK is not -* referenced. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, J - DOUBLE PRECISION SCALE, SUM, VALUE -* .. -* .. External Subroutines .. - EXTERNAL DLASSQ -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* - IF( N.EQ.0 ) THEN - VALUE = ZERO - ELSE IF( LSAME( NORM, 'M' ) ) THEN -* -* Find max(abs(A(i,j))). -* - VALUE = ZERO - DO 20 J = 1, N - DO 10 I = 1, MIN( N, J+1 ) - VALUE = MAX( VALUE, ABS( A( I, J ) ) ) - 10 CONTINUE - 20 CONTINUE - ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN -* -* Find norm1(A). -* - VALUE = ZERO - DO 40 J = 1, N - SUM = ZERO - DO 30 I = 1, MIN( N, J+1 ) - SUM = SUM + ABS( A( I, J ) ) - 30 CONTINUE - VALUE = MAX( VALUE, SUM ) - 40 CONTINUE - ELSE IF( LSAME( NORM, 'I' ) ) THEN -* -* Find normI(A). -* - DO 50 I = 1, N - WORK( I ) = ZERO - 50 CONTINUE - DO 70 J = 1, N - DO 60 I = 1, MIN( N, J+1 ) - WORK( I ) = WORK( I ) + ABS( A( I, J ) ) - 60 CONTINUE - 70 CONTINUE - VALUE = ZERO - DO 80 I = 1, N - VALUE = MAX( VALUE, WORK( I ) ) - 80 CONTINUE - ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN -* -* Find normF(A). -* - SCALE = ZERO - SUM = ONE - DO 90 J = 1, N - CALL DLASSQ( MIN( N, J+1 ), A( 1, J ), 1, SCALE, SUM ) - 90 CONTINUE - VALUE = SCALE*SQRT( SUM ) - END IF -* - DLANHS = VALUE - RETURN -* -* End of DLANHS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlanst.f b/cpp/nudg++/trunk/BlasLapack/dlanst.f deleted file mode 100644 index e604348..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlanst.f +++ /dev/null @@ -1,125 +0,0 @@ - DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER NORM - INTEGER N -* .. -* .. Array Arguments .. - DOUBLE PRECISION D( * ), E( * ) -* .. -* -* Purpose -* ======= -* -* DLANST returns the value of the one norm, or the Frobenius norm, or -* the infinity norm, or the element of largest absolute value of a -* real symmetric tridiagonal matrix A. -* -* Description -* =========== -* -* DLANST returns the value -* -* DLANST = ( max(abs(A(i,j))), NORM = 'M' or 'm' -* ( -* ( norm1(A), NORM = '1', 'O' or 'o' -* ( -* ( normI(A), NORM = 'I' or 'i' -* ( -* ( normF(A), NORM = 'F', 'f', 'E' or 'e' -* -* where norm1 denotes the one norm of a matrix (maximum column sum), -* normI denotes the infinity norm of a matrix (maximum row sum) and -* normF denotes the Frobenius norm of a matrix (square root of sum of -* squares). Note that max(abs(A(i,j))) is not a matrix norm. -* -* Arguments -* ========= -* -* NORM (input) CHARACTER*1 -* Specifies the value to be returned in DLANST as described -* above. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. When N = 0, DLANST is -* set to zero. -* -* D (input) DOUBLE PRECISION array, dimension (N) -* The diagonal elements of A. -* -* E (input) DOUBLE PRECISION array, dimension (N-1) -* The (n-1) sub-diagonal or super-diagonal elements of A. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I - DOUBLE PRECISION ANORM, SCALE, SUM -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DLASSQ -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, SQRT -* .. -* .. Executable Statements .. -* - IF( N.LE.0 ) THEN - ANORM = ZERO - ELSE IF( LSAME( NORM, 'M' ) ) THEN -* -* Find max(abs(A(i,j))). -* - ANORM = ABS( D( N ) ) - DO 10 I = 1, N - 1 - ANORM = MAX( ANORM, ABS( D( I ) ) ) - ANORM = MAX( ANORM, ABS( E( I ) ) ) - 10 CONTINUE - ELSE IF( LSAME( NORM, 'O' ) .OR. NORM.EQ.'1' .OR. - $ LSAME( NORM, 'I' ) ) THEN -* -* Find norm1(A). -* - IF( N.EQ.1 ) THEN - ANORM = ABS( D( 1 ) ) - ELSE - ANORM = MAX( ABS( D( 1 ) )+ABS( E( 1 ) ), - $ ABS( E( N-1 ) )+ABS( D( N ) ) ) - DO 20 I = 2, N - 1 - ANORM = MAX( ANORM, ABS( D( I ) )+ABS( E( I ) )+ - $ ABS( E( I-1 ) ) ) - 20 CONTINUE - END IF - ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN -* -* Find normF(A). -* - SCALE = ZERO - SUM = ONE - IF( N.GT.1 ) THEN - CALL DLASSQ( N-1, E, 1, SCALE, SUM ) - SUM = 2*SUM - END IF - CALL DLASSQ( N, D, 1, SCALE, SUM ) - ANORM = SCALE*SQRT( SUM ) - END IF -* - DLANST = ANORM - RETURN -* -* End of DLANST -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlansy.f b/cpp/nudg++/trunk/BlasLapack/dlansy.f deleted file mode 100644 index 73d2ab7..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlansy.f +++ /dev/null @@ -1,174 +0,0 @@ - DOUBLE PRECISION FUNCTION DLANSY( NORM, UPLO, N, A, LDA, WORK ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER NORM, UPLO - INTEGER LDA, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DLANSY returns the value of the one norm, or the Frobenius norm, or -* the infinity norm, or the element of largest absolute value of a -* real symmetric matrix A. -* -* Description -* =========== -* -* DLANSY returns the value -* -* DLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm' -* ( -* ( norm1(A), NORM = '1', 'O' or 'o' -* ( -* ( normI(A), NORM = 'I' or 'i' -* ( -* ( normF(A), NORM = 'F', 'f', 'E' or 'e' -* -* where norm1 denotes the one norm of a matrix (maximum column sum), -* normI denotes the infinity norm of a matrix (maximum row sum) and -* normF denotes the Frobenius norm of a matrix (square root of sum of -* squares). Note that max(abs(A(i,j))) is not a matrix norm. -* -* Arguments -* ========= -* -* NORM (input) CHARACTER*1 -* Specifies the value to be returned in DLANSY as described -* above. -* -* UPLO (input) CHARACTER*1 -* Specifies whether the upper or lower triangular part of the -* symmetric matrix A is to be referenced. -* = 'U': Upper triangular part of A is referenced -* = 'L': Lower triangular part of A is referenced -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. When N = 0, DLANSY is -* set to zero. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The symmetric matrix A. If UPLO = 'U', the leading n by n -* upper triangular part of A contains the upper triangular part -* of the matrix A, and the strictly lower triangular part of A -* is not referenced. If UPLO = 'L', the leading n by n lower -* triangular part of A contains the lower triangular part of -* the matrix A, and the strictly upper triangular part of A is -* not referenced. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(N,1). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK), -* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise, -* WORK is not referenced. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, J - DOUBLE PRECISION ABSA, SCALE, SUM, VALUE -* .. -* .. External Subroutines .. - EXTERNAL DLASSQ -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, SQRT -* .. -* .. Executable Statements .. -* - IF( N.EQ.0 ) THEN - VALUE = ZERO - ELSE IF( LSAME( NORM, 'M' ) ) THEN -* -* Find max(abs(A(i,j))). -* - VALUE = ZERO - IF( LSAME( UPLO, 'U' ) ) THEN - DO 20 J = 1, N - DO 10 I = 1, J - VALUE = MAX( VALUE, ABS( A( I, J ) ) ) - 10 CONTINUE - 20 CONTINUE - ELSE - DO 40 J = 1, N - DO 30 I = J, N - VALUE = MAX( VALUE, ABS( A( I, J ) ) ) - 30 CONTINUE - 40 CONTINUE - END IF - ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR. - $ ( NORM.EQ.'1' ) ) THEN -* -* Find normI(A) ( = norm1(A), since A is symmetric). -* - VALUE = ZERO - IF( LSAME( UPLO, 'U' ) ) THEN - DO 60 J = 1, N - SUM = ZERO - DO 50 I = 1, J - 1 - ABSA = ABS( A( I, J ) ) - SUM = SUM + ABSA - WORK( I ) = WORK( I ) + ABSA - 50 CONTINUE - WORK( J ) = SUM + ABS( A( J, J ) ) - 60 CONTINUE - DO 70 I = 1, N - VALUE = MAX( VALUE, WORK( I ) ) - 70 CONTINUE - ELSE - DO 80 I = 1, N - WORK( I ) = ZERO - 80 CONTINUE - DO 100 J = 1, N - SUM = WORK( J ) + ABS( A( J, J ) ) - DO 90 I = J + 1, N - ABSA = ABS( A( I, J ) ) - SUM = SUM + ABSA - WORK( I ) = WORK( I ) + ABSA - 90 CONTINUE - VALUE = MAX( VALUE, SUM ) - 100 CONTINUE - END IF - ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN -* -* Find normF(A). -* - SCALE = ZERO - SUM = ONE - IF( LSAME( UPLO, 'U' ) ) THEN - DO 110 J = 2, N - CALL DLASSQ( J-1, A( 1, J ), 1, SCALE, SUM ) - 110 CONTINUE - ELSE - DO 120 J = 1, N - 1 - CALL DLASSQ( N-J, A( J+1, J ), 1, SCALE, SUM ) - 120 CONTINUE - END IF - SUM = 2*SUM - CALL DLASSQ( N, A, LDA+1, SCALE, SUM ) - VALUE = SCALE*SQRT( SUM ) - END IF -* - DLANSY = VALUE - RETURN -* -* End of DLANSY -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlanv2.f b/cpp/nudg++/trunk/BlasLapack/dlanv2.f deleted file mode 100644 index ccc6ef6..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlanv2.f +++ /dev/null @@ -1,206 +0,0 @@ - SUBROUTINE DLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - DOUBLE PRECISION A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN -* .. -* -* Purpose -* ======= -* -* DLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric -* matrix in standard form: -* -* [ A B ] = [ CS -SN ] [ AA BB ] [ CS SN ] -* [ C D ] [ SN CS ] [ CC DD ] [-SN CS ] -* -* where either -* 1) CC = 0 so that AA and DD are real eigenvalues of the matrix, or -* 2) AA = DD and BB*CC < 0, so that AA + or - sqrt(BB*CC) are complex -* conjugate eigenvalues. -* -* Arguments -* ========= -* -* A (input/output) DOUBLE PRECISION -* B (input/output) DOUBLE PRECISION -* C (input/output) DOUBLE PRECISION -* D (input/output) DOUBLE PRECISION -* On entry, the elements of the input matrix. -* On exit, they are overwritten by the elements of the -* standardised Schur form. -* -* RT1R (output) DOUBLE PRECISION -* RT1I (output) DOUBLE PRECISION -* RT2R (output) DOUBLE PRECISION -* RT2I (output) DOUBLE PRECISION -* The real and imaginary parts of the eigenvalues. If the -* eigenvalues are a complex conjugate pair, RT1I > 0. -* -* CS (output) DOUBLE PRECISION -* SN (output) DOUBLE PRECISION -* Parameters of the rotation matrix. -* -* Further Details -* =============== -* -* Modified by V. Sima, Research Institute for Informatics, Bucharest, -* Romania, to reduce the risk of cancellation errors, -* when computing real eigenvalues, and to ensure, if possible, that -* abs(RT1R) >= abs(RT2R). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, HALF, ONE - PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 ) - DOUBLE PRECISION MULTPL - PARAMETER ( MULTPL = 4.0D+0 ) -* .. -* .. Local Scalars .. - DOUBLE PRECISION AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB, - $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH, DLAPY2 - EXTERNAL DLAMCH, DLAPY2 -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN, SIGN, SQRT -* .. -* .. Executable Statements .. -* - EPS = DLAMCH( 'P' ) - IF( C.EQ.ZERO ) THEN - CS = ONE - SN = ZERO - GO TO 10 -* - ELSE IF( B.EQ.ZERO ) THEN -* -* Swap rows and columns -* - CS = ZERO - SN = ONE - TEMP = D - D = A - A = TEMP - B = -C - C = ZERO - GO TO 10 - ELSE IF( ( A-D ).EQ.ZERO .AND. SIGN( ONE, B ).NE.SIGN( ONE, C ) ) - $ THEN - CS = ONE - SN = ZERO - GO TO 10 - ELSE -* - TEMP = A - D - P = HALF*TEMP - BCMAX = MAX( ABS( B ), ABS( C ) ) - BCMIS = MIN( ABS( B ), ABS( C ) )*SIGN( ONE, B )*SIGN( ONE, C ) - SCALE = MAX( ABS( P ), BCMAX ) - Z = ( P / SCALE )*P + ( BCMAX / SCALE )*BCMIS -* -* If Z is of the order of the machine accuracy, postpone the -* decision on the nature of eigenvalues -* - IF( Z.GE.MULTPL*EPS ) THEN -* -* Real eigenvalues. Compute A and D. -* - Z = P + SIGN( SQRT( SCALE )*SQRT( Z ), P ) - A = D + Z - D = D - ( BCMAX / Z )*BCMIS -* -* Compute B and the rotation matrix -* - TAU = DLAPY2( C, Z ) - CS = Z / TAU - SN = C / TAU - B = B - C - C = ZERO - ELSE -* -* Complex eigenvalues, or real (almost) equal eigenvalues. -* Make diagonal elements equal. -* - SIGMA = B + C - TAU = DLAPY2( SIGMA, TEMP ) - CS = SQRT( HALF*( ONE+ABS( SIGMA ) / TAU ) ) - SN = -( P / ( TAU*CS ) )*SIGN( ONE, SIGMA ) -* -* Compute [ AA BB ] = [ A B ] [ CS -SN ] -* [ CC DD ] [ C D ] [ SN CS ] -* - AA = A*CS + B*SN - BB = -A*SN + B*CS - CC = C*CS + D*SN - DD = -C*SN + D*CS -* -* Compute [ A B ] = [ CS SN ] [ AA BB ] -* [ C D ] [-SN CS ] [ CC DD ] -* - A = AA*CS + CC*SN - B = BB*CS + DD*SN - C = -AA*SN + CC*CS - D = -BB*SN + DD*CS -* - TEMP = HALF*( A+D ) - A = TEMP - D = TEMP -* - IF( C.NE.ZERO ) THEN - IF( B.NE.ZERO ) THEN - IF( SIGN( ONE, B ).EQ.SIGN( ONE, C ) ) THEN -* -* Real eigenvalues: reduce to upper triangular form -* - SAB = SQRT( ABS( B ) ) - SAC = SQRT( ABS( C ) ) - P = SIGN( SAB*SAC, C ) - TAU = ONE / SQRT( ABS( B+C ) ) - A = TEMP + P - D = TEMP - P - B = B - C - C = ZERO - CS1 = SAB*TAU - SN1 = SAC*TAU - TEMP = CS*CS1 - SN*SN1 - SN = CS*SN1 + SN*CS1 - CS = TEMP - END IF - ELSE - B = -C - C = ZERO - TEMP = CS - CS = -SN - SN = TEMP - END IF - END IF - END IF -* - END IF -* - 10 CONTINUE -* -* Store eigenvalues in (RT1R,RT1I) and (RT2R,RT2I). -* - RT1R = A - RT2R = D - IF( C.EQ.ZERO ) THEN - RT1I = ZERO - RT2I = ZERO - ELSE - RT1I = SQRT( ABS( B ) )*SQRT( ABS( C ) ) - RT2I = -RT1I - END IF - RETURN -* -* End of DLANV2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlapy2.f b/cpp/nudg++/trunk/BlasLapack/dlapy2.f deleted file mode 100644 index f3d732d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlapy2.f +++ /dev/null @@ -1,54 +0,0 @@ - DOUBLE PRECISION FUNCTION DLAPY2( X, Y ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - DOUBLE PRECISION X, Y -* .. -* -* Purpose -* ======= -* -* DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary -* overflow. -* -* Arguments -* ========= -* -* X (input) DOUBLE PRECISION -* Y (input) DOUBLE PRECISION -* X and Y specify the values x and y. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - DOUBLE PRECISION W, XABS, YABS, Z -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* - XABS = ABS( X ) - YABS = ABS( Y ) - W = MAX( XABS, YABS ) - Z = MIN( XABS, YABS ) - IF( Z.EQ.ZERO ) THEN - DLAPY2 = W - ELSE - DLAPY2 = W*SQRT( ONE+( Z / W )**2 ) - END IF - RETURN -* -* End of DLAPY2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlarf.f b/cpp/nudg++/trunk/BlasLapack/dlarf.f deleted file mode 100644 index e81b609..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlarf.f +++ /dev/null @@ -1,116 +0,0 @@ - SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER SIDE - INTEGER INCV, LDC, M, N - DOUBLE PRECISION TAU -* .. -* .. Array Arguments .. - DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DLARF applies a real elementary reflector H to a real m by n matrix -* C, from either the left or the right. H is represented in the form -* -* H = I - tau * v * v' -* -* where tau is a real scalar and v is a real vector. -* -* If tau = 0, then H is taken to be the unit matrix. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'L': form H * C -* = 'R': form C * H -* -* M (input) INTEGER -* The number of rows of the matrix C. -* -* N (input) INTEGER -* The number of columns of the matrix C. -* -* V (input) DOUBLE PRECISION array, dimension -* (1 + (M-1)*abs(INCV)) if SIDE = 'L' -* or (1 + (N-1)*abs(INCV)) if SIDE = 'R' -* The vector v in the representation of H. V is not used if -* TAU = 0. -* -* INCV (input) INTEGER -* The increment between elements of v. INCV <> 0. -* -* TAU (input) DOUBLE PRECISION -* The value tau in the representation of H. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the m by n matrix C. -* On exit, C is overwritten by the matrix H * C if SIDE = 'L', -* or C * H if SIDE = 'R'. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDC >= max(1,M). -* -* WORK (workspace) DOUBLE PRECISION array, dimension -* (N) if SIDE = 'L' -* or (M) if SIDE = 'R' -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. External Subroutines .. - EXTERNAL DGEMV, DGER -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. Executable Statements .. -* - IF( LSAME( SIDE, 'L' ) ) THEN -* -* Form H * C -* - IF( TAU.NE.ZERO ) THEN -* -* w := C' * v -* - CALL DGEMV( 'Transpose', M, N, ONE, C, LDC, V, INCV, ZERO, - $ WORK, 1 ) -* -* C := C - v * w' -* - CALL DGER( M, N, -TAU, V, INCV, WORK, 1, C, LDC ) - END IF - ELSE -* -* Form C * H -* - IF( TAU.NE.ZERO ) THEN -* -* w := C * v -* - CALL DGEMV( 'No transpose', M, N, ONE, C, LDC, V, INCV, - $ ZERO, WORK, 1 ) -* -* C := C - w * v' -* - CALL DGER( M, N, -TAU, WORK, 1, V, INCV, C, LDC ) - END IF - END IF - RETURN -* -* End of DLARF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlarfb.f b/cpp/nudg++/trunk/BlasLapack/dlarfb.f deleted file mode 100644 index e36a7fd..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlarfb.f +++ /dev/null @@ -1,588 +0,0 @@ - SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, - $ T, LDT, C, LDC, WORK, LDWORK ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER DIRECT, SIDE, STOREV, TRANS - INTEGER K, LDC, LDT, LDV, LDWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ), - $ WORK( LDWORK, * ) -* .. -* -* Purpose -* ======= -* -* DLARFB applies a real block reflector H or its transpose H' to a -* real m by n matrix C, from either the left or the right. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'L': apply H or H' from the Left -* = 'R': apply H or H' from the Right -* -* TRANS (input) CHARACTER*1 -* = 'N': apply H (No transpose) -* = 'T': apply H' (Transpose) -* -* DIRECT (input) CHARACTER*1 -* Indicates how H is formed from a product of elementary -* reflectors -* = 'F': H = H(1) H(2) . . . H(k) (Forward) -* = 'B': H = H(k) . . . H(2) H(1) (Backward) -* -* STOREV (input) CHARACTER*1 -* Indicates how the vectors which define the elementary -* reflectors are stored: -* = 'C': Columnwise -* = 'R': Rowwise -* -* M (input) INTEGER -* The number of rows of the matrix C. -* -* N (input) INTEGER -* The number of columns of the matrix C. -* -* K (input) INTEGER -* The order of the matrix T (= the number of elementary -* reflectors whose product defines the block reflector). -* -* V (input) DOUBLE PRECISION array, dimension -* (LDV,K) if STOREV = 'C' -* (LDV,M) if STOREV = 'R' and SIDE = 'L' -* (LDV,N) if STOREV = 'R' and SIDE = 'R' -* The matrix V. See further details. -* -* LDV (input) INTEGER -* The leading dimension of the array V. -* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M); -* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N); -* if STOREV = 'R', LDV >= K. -* -* T (input) DOUBLE PRECISION array, dimension (LDT,K) -* The triangular k by k matrix T in the representation of the -* block reflector. -* -* LDT (input) INTEGER -* The leading dimension of the array T. LDT >= K. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the m by n matrix C. -* On exit, C is overwritten by H*C or H'*C or C*H or C*H'. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDA >= max(1,M). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,K) -* -* LDWORK (input) INTEGER -* The leading dimension of the array WORK. -* If SIDE = 'L', LDWORK >= max(1,N); -* if SIDE = 'R', LDWORK >= max(1,M). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - CHARACTER TRANST - INTEGER I, J -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DCOPY, DGEMM, DTRMM -* .. -* .. Executable Statements .. -* -* Quick return if possible -* - IF( M.LE.0 .OR. N.LE.0 ) - $ RETURN -* - IF( LSAME( TRANS, 'N' ) ) THEN - TRANST = 'T' - ELSE - TRANST = 'N' - END IF -* - IF( LSAME( STOREV, 'C' ) ) THEN -* - IF( LSAME( DIRECT, 'F' ) ) THEN -* -* Let V = ( V1 ) (first K rows) -* ( V2 ) -* where V1 is unit lower triangular. -* - IF( LSAME( SIDE, 'L' ) ) THEN -* -* Form H * C or H' * C where C = ( C1 ) -* ( C2 ) -* -* W := C' * V = (C1'*V1 + C2'*V2) (stored in WORK) -* -* W := C1' -* - DO 10 J = 1, K - CALL DCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) - 10 CONTINUE -* -* W := W * V1 -* - CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N, - $ K, ONE, V, LDV, WORK, LDWORK ) - IF( M.GT.K ) THEN -* -* W := W + C2'*V2 -* - CALL DGEMM( 'Transpose', 'No transpose', N, K, M-K, - $ ONE, C( K+1, 1 ), LDC, V( K+1, 1 ), LDV, - $ ONE, WORK, LDWORK ) - END IF -* -* W := W * T' or W * T -* - CALL DTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - V * W' -* - IF( M.GT.K ) THEN -* -* C2 := C2 - V2 * W' -* - CALL DGEMM( 'No transpose', 'Transpose', M-K, N, K, - $ -ONE, V( K+1, 1 ), LDV, WORK, LDWORK, ONE, - $ C( K+1, 1 ), LDC ) - END IF -* -* W := W * V1' -* - CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', N, K, - $ ONE, V, LDV, WORK, LDWORK ) -* -* C1 := C1 - W' -* - DO 30 J = 1, K - DO 20 I = 1, N - C( J, I ) = C( J, I ) - WORK( I, J ) - 20 CONTINUE - 30 CONTINUE -* - ELSE IF( LSAME( SIDE, 'R' ) ) THEN -* -* Form C * H or C * H' where C = ( C1 C2 ) -* -* W := C * V = (C1*V1 + C2*V2) (stored in WORK) -* -* W := C1 -* - DO 40 J = 1, K - CALL DCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) - 40 CONTINUE -* -* W := W * V1 -* - CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M, - $ K, ONE, V, LDV, WORK, LDWORK ) - IF( N.GT.K ) THEN -* -* W := W + C2 * V2 -* - CALL DGEMM( 'No transpose', 'No transpose', M, K, N-K, - $ ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV, - $ ONE, WORK, LDWORK ) - END IF -* -* W := W * T or W * T' -* - CALL DTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - W * V' -* - IF( N.GT.K ) THEN -* -* C2 := C2 - W * V2' -* - CALL DGEMM( 'No transpose', 'Transpose', M, N-K, K, - $ -ONE, WORK, LDWORK, V( K+1, 1 ), LDV, ONE, - $ C( 1, K+1 ), LDC ) - END IF -* -* W := W * V1' -* - CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', M, K, - $ ONE, V, LDV, WORK, LDWORK ) -* -* C1 := C1 - W -* - DO 60 J = 1, K - DO 50 I = 1, M - C( I, J ) = C( I, J ) - WORK( I, J ) - 50 CONTINUE - 60 CONTINUE - END IF -* - ELSE -* -* Let V = ( V1 ) -* ( V2 ) (last K rows) -* where V2 is unit upper triangular. -* - IF( LSAME( SIDE, 'L' ) ) THEN -* -* Form H * C or H' * C where C = ( C1 ) -* ( C2 ) -* -* W := C' * V = (C1'*V1 + C2'*V2) (stored in WORK) -* -* W := C2' -* - DO 70 J = 1, K - CALL DCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 ) - 70 CONTINUE -* -* W := W * V2 -* - CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N, - $ K, ONE, V( M-K+1, 1 ), LDV, WORK, LDWORK ) - IF( M.GT.K ) THEN -* -* W := W + C1'*V1 -* - CALL DGEMM( 'Transpose', 'No transpose', N, K, M-K, - $ ONE, C, LDC, V, LDV, ONE, WORK, LDWORK ) - END IF -* -* W := W * T' or W * T -* - CALL DTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - V * W' -* - IF( M.GT.K ) THEN -* -* C1 := C1 - V1 * W' -* - CALL DGEMM( 'No transpose', 'Transpose', M-K, N, K, - $ -ONE, V, LDV, WORK, LDWORK, ONE, C, LDC ) - END IF -* -* W := W * V2' -* - CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', N, K, - $ ONE, V( M-K+1, 1 ), LDV, WORK, LDWORK ) -* -* C2 := C2 - W' -* - DO 90 J = 1, K - DO 80 I = 1, N - C( M-K+J, I ) = C( M-K+J, I ) - WORK( I, J ) - 80 CONTINUE - 90 CONTINUE -* - ELSE IF( LSAME( SIDE, 'R' ) ) THEN -* -* Form C * H or C * H' where C = ( C1 C2 ) -* -* W := C * V = (C1*V1 + C2*V2) (stored in WORK) -* -* W := C2 -* - DO 100 J = 1, K - CALL DCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 ) - 100 CONTINUE -* -* W := W * V2 -* - CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M, - $ K, ONE, V( N-K+1, 1 ), LDV, WORK, LDWORK ) - IF( N.GT.K ) THEN -* -* W := W + C1 * V1 -* - CALL DGEMM( 'No transpose', 'No transpose', M, K, N-K, - $ ONE, C, LDC, V, LDV, ONE, WORK, LDWORK ) - END IF -* -* W := W * T or W * T' -* - CALL DTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - W * V' -* - IF( N.GT.K ) THEN -* -* C1 := C1 - W * V1' -* - CALL DGEMM( 'No transpose', 'Transpose', M, N-K, K, - $ -ONE, WORK, LDWORK, V, LDV, ONE, C, LDC ) - END IF -* -* W := W * V2' -* - CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', M, K, - $ ONE, V( N-K+1, 1 ), LDV, WORK, LDWORK ) -* -* C2 := C2 - W -* - DO 120 J = 1, K - DO 110 I = 1, M - C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J ) - 110 CONTINUE - 120 CONTINUE - END IF - END IF -* - ELSE IF( LSAME( STOREV, 'R' ) ) THEN -* - IF( LSAME( DIRECT, 'F' ) ) THEN -* -* Let V = ( V1 V2 ) (V1: first K columns) -* where V1 is unit upper triangular. -* - IF( LSAME( SIDE, 'L' ) ) THEN -* -* Form H * C or H' * C where C = ( C1 ) -* ( C2 ) -* -* W := C' * V' = (C1'*V1' + C2'*V2') (stored in WORK) -* -* W := C1' -* - DO 130 J = 1, K - CALL DCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) - 130 CONTINUE -* -* W := W * V1' -* - CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', N, K, - $ ONE, V, LDV, WORK, LDWORK ) - IF( M.GT.K ) THEN -* -* W := W + C2'*V2' -* - CALL DGEMM( 'Transpose', 'Transpose', N, K, M-K, ONE, - $ C( K+1, 1 ), LDC, V( 1, K+1 ), LDV, ONE, - $ WORK, LDWORK ) - END IF -* -* W := W * T' or W * T -* - CALL DTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - V' * W' -* - IF( M.GT.K ) THEN -* -* C2 := C2 - V2' * W' -* - CALL DGEMM( 'Transpose', 'Transpose', M-K, N, K, -ONE, - $ V( 1, K+1 ), LDV, WORK, LDWORK, ONE, - $ C( K+1, 1 ), LDC ) - END IF -* -* W := W * V1 -* - CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N, - $ K, ONE, V, LDV, WORK, LDWORK ) -* -* C1 := C1 - W' -* - DO 150 J = 1, K - DO 140 I = 1, N - C( J, I ) = C( J, I ) - WORK( I, J ) - 140 CONTINUE - 150 CONTINUE -* - ELSE IF( LSAME( SIDE, 'R' ) ) THEN -* -* Form C * H or C * H' where C = ( C1 C2 ) -* -* W := C * V' = (C1*V1' + C2*V2') (stored in WORK) -* -* W := C1 -* - DO 160 J = 1, K - CALL DCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) - 160 CONTINUE -* -* W := W * V1' -* - CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', M, K, - $ ONE, V, LDV, WORK, LDWORK ) - IF( N.GT.K ) THEN -* -* W := W + C2 * V2' -* - CALL DGEMM( 'No transpose', 'Transpose', M, K, N-K, - $ ONE, C( 1, K+1 ), LDC, V( 1, K+1 ), LDV, - $ ONE, WORK, LDWORK ) - END IF -* -* W := W * T or W * T' -* - CALL DTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - W * V -* - IF( N.GT.K ) THEN -* -* C2 := C2 - W * V2 -* - CALL DGEMM( 'No transpose', 'No transpose', M, N-K, K, - $ -ONE, WORK, LDWORK, V( 1, K+1 ), LDV, ONE, - $ C( 1, K+1 ), LDC ) - END IF -* -* W := W * V1 -* - CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M, - $ K, ONE, V, LDV, WORK, LDWORK ) -* -* C1 := C1 - W -* - DO 180 J = 1, K - DO 170 I = 1, M - C( I, J ) = C( I, J ) - WORK( I, J ) - 170 CONTINUE - 180 CONTINUE -* - END IF -* - ELSE -* -* Let V = ( V1 V2 ) (V2: last K columns) -* where V2 is unit lower triangular. -* - IF( LSAME( SIDE, 'L' ) ) THEN -* -* Form H * C or H' * C where C = ( C1 ) -* ( C2 ) -* -* W := C' * V' = (C1'*V1' + C2'*V2') (stored in WORK) -* -* W := C2' -* - DO 190 J = 1, K - CALL DCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 ) - 190 CONTINUE -* -* W := W * V2' -* - CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', N, K, - $ ONE, V( 1, M-K+1 ), LDV, WORK, LDWORK ) - IF( M.GT.K ) THEN -* -* W := W + C1'*V1' -* - CALL DGEMM( 'Transpose', 'Transpose', N, K, M-K, ONE, - $ C, LDC, V, LDV, ONE, WORK, LDWORK ) - END IF -* -* W := W * T' or W * T -* - CALL DTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - V' * W' -* - IF( M.GT.K ) THEN -* -* C1 := C1 - V1' * W' -* - CALL DGEMM( 'Transpose', 'Transpose', M-K, N, K, -ONE, - $ V, LDV, WORK, LDWORK, ONE, C, LDC ) - END IF -* -* W := W * V2 -* - CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N, - $ K, ONE, V( 1, M-K+1 ), LDV, WORK, LDWORK ) -* -* C2 := C2 - W' -* - DO 210 J = 1, K - DO 200 I = 1, N - C( M-K+J, I ) = C( M-K+J, I ) - WORK( I, J ) - 200 CONTINUE - 210 CONTINUE -* - ELSE IF( LSAME( SIDE, 'R' ) ) THEN -* -* Form C * H or C * H' where C = ( C1 C2 ) -* -* W := C * V' = (C1*V1' + C2*V2') (stored in WORK) -* -* W := C2 -* - DO 220 J = 1, K - CALL DCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 ) - 220 CONTINUE -* -* W := W * V2' -* - CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', M, K, - $ ONE, V( 1, N-K+1 ), LDV, WORK, LDWORK ) - IF( N.GT.K ) THEN -* -* W := W + C1 * V1' -* - CALL DGEMM( 'No transpose', 'Transpose', M, K, N-K, - $ ONE, C, LDC, V, LDV, ONE, WORK, LDWORK ) - END IF -* -* W := W * T or W * T' -* - CALL DTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, - $ ONE, T, LDT, WORK, LDWORK ) -* -* C := C - W * V -* - IF( N.GT.K ) THEN -* -* C1 := C1 - W * V1 -* - CALL DGEMM( 'No transpose', 'No transpose', M, N-K, K, - $ -ONE, WORK, LDWORK, V, LDV, ONE, C, LDC ) - END IF -* -* W := W * V2 -* - CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M, - $ K, ONE, V( 1, N-K+1 ), LDV, WORK, LDWORK ) -* -* C1 := C1 - W -* - DO 240 J = 1, K - DO 230 I = 1, M - C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J ) - 230 CONTINUE - 240 CONTINUE -* - END IF -* - END IF - END IF -* - RETURN -* -* End of DLARFB -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlarfg.f b/cpp/nudg++/trunk/BlasLapack/dlarfg.f deleted file mode 100644 index 0e67a7e..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlarfg.f +++ /dev/null @@ -1,138 +0,0 @@ - SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - INTEGER INCX, N - DOUBLE PRECISION ALPHA, TAU -* .. -* .. Array Arguments .. - DOUBLE PRECISION X( * ) -* .. -* -* Purpose -* ======= -* -* DLARFG generates a real elementary reflector H of order n, such -* that -* -* H * ( alpha ) = ( beta ), H' * H = I. -* ( x ) ( 0 ) -* -* where alpha and beta are scalars, and x is an (n-1)-element real -* vector. H is represented in the form -* -* H = I - tau * ( 1 ) * ( 1 v' ) , -* ( v ) -* -* where tau is a real scalar and v is a real (n-1)-element -* vector. -* -* If the elements of x are all zero, then tau = 0 and H is taken to be -* the unit matrix. -* -* Otherwise 1 <= tau <= 2. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the elementary reflector. -* -* ALPHA (input/output) DOUBLE PRECISION -* On entry, the value alpha. -* On exit, it is overwritten with the value beta. -* -* X (input/output) DOUBLE PRECISION array, dimension -* (1+(N-2)*abs(INCX)) -* On entry, the vector x. -* On exit, it is overwritten with the vector v. -* -* INCX (input) INTEGER -* The increment between elements of X. INCX > 0. -* -* TAU (output) DOUBLE PRECISION -* The value tau. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER J, KNT - DOUBLE PRECISION BETA, RSAFMN, SAFMIN, XNORM -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH, DLAPY2, DNRM2 - EXTERNAL DLAMCH, DLAPY2, DNRM2 -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, SIGN -* .. -* .. External Subroutines .. - EXTERNAL DSCAL -* .. -* .. Executable Statements .. -* - IF( N.LE.1 ) THEN - TAU = ZERO - RETURN - END IF -* - XNORM = DNRM2( N-1, X, INCX ) -* - IF( XNORM.EQ.ZERO ) THEN -* -* H = I -* - TAU = ZERO - ELSE -* -* general case -* - BETA = -SIGN( DLAPY2( ALPHA, XNORM ), ALPHA ) - SAFMIN = DLAMCH( 'S' ) / DLAMCH( 'E' ) - IF( ABS( BETA ).LT.SAFMIN ) THEN -* -* XNORM, BETA may be inaccurate; scale X and recompute them -* - RSAFMN = ONE / SAFMIN - KNT = 0 - 10 CONTINUE - KNT = KNT + 1 - CALL DSCAL( N-1, RSAFMN, X, INCX ) - BETA = BETA*RSAFMN - ALPHA = ALPHA*RSAFMN - IF( ABS( BETA ).LT.SAFMIN ) - $ GO TO 10 -* -* New BETA is at most 1, at least SAFMIN -* - XNORM = DNRM2( N-1, X, INCX ) - BETA = -SIGN( DLAPY2( ALPHA, XNORM ), ALPHA ) - TAU = ( BETA-ALPHA ) / BETA - CALL DSCAL( N-1, ONE / ( ALPHA-BETA ), X, INCX ) -* -* If ALPHA is subnormal, it may lose relative accuracy -* - ALPHA = BETA - DO 20 J = 1, KNT - ALPHA = ALPHA*SAFMIN - 20 CONTINUE - ELSE - TAU = ( BETA-ALPHA ) / BETA - CALL DSCAL( N-1, ONE / ( ALPHA-BETA ), X, INCX ) - ALPHA = BETA - END IF - END IF -* - RETURN -* -* End of DLARFG -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlarft.f b/cpp/nudg++/trunk/BlasLapack/dlarft.f deleted file mode 100644 index 147b22d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlarft.f +++ /dev/null @@ -1,218 +0,0 @@ - SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER DIRECT, STOREV - INTEGER K, LDT, LDV, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * ) -* .. -* -* Purpose -* ======= -* -* DLARFT forms the triangular factor T of a real block reflector H -* of order n, which is defined as a product of k elementary reflectors. -* -* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular; -* -* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular. -* -* If STOREV = 'C', the vector which defines the elementary reflector -* H(i) is stored in the i-th column of the array V, and -* -* H = I - V * T * V' -* -* If STOREV = 'R', the vector which defines the elementary reflector -* H(i) is stored in the i-th row of the array V, and -* -* H = I - V' * T * V -* -* Arguments -* ========= -* -* DIRECT (input) CHARACTER*1 -* Specifies the order in which the elementary reflectors are -* multiplied to form the block reflector: -* = 'F': H = H(1) H(2) . . . H(k) (Forward) -* = 'B': H = H(k) . . . H(2) H(1) (Backward) -* -* STOREV (input) CHARACTER*1 -* Specifies how the vectors which define the elementary -* reflectors are stored (see also Further Details): -* = 'C': columnwise -* = 'R': rowwise -* -* N (input) INTEGER -* The order of the block reflector H. N >= 0. -* -* K (input) INTEGER -* The order of the triangular factor T (= the number of -* elementary reflectors). K >= 1. -* -* V (input/output) DOUBLE PRECISION array, dimension -* (LDV,K) if STOREV = 'C' -* (LDV,N) if STOREV = 'R' -* The matrix V. See further details. -* -* LDV (input) INTEGER -* The leading dimension of the array V. -* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i). -* -* T (output) DOUBLE PRECISION array, dimension (LDT,K) -* The k by k triangular factor T of the block reflector. -* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is -* lower triangular. The rest of the array is not used. -* -* LDT (input) INTEGER -* The leading dimension of the array T. LDT >= K. -* -* Further Details -* =============== -* -* The shape of the matrix V and the storage of the vectors which define -* the H(i) is best illustrated by the following example with n = 5 and -* k = 3. The elements equal to 1 are not stored; the corresponding -* array elements are modified but restored on exit. The rest of the -* array is not used. -* -* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R': -* -* V = ( 1 ) V = ( 1 v1 v1 v1 v1 ) -* ( v1 1 ) ( 1 v2 v2 v2 ) -* ( v1 v2 1 ) ( 1 v3 v3 ) -* ( v1 v2 v3 ) -* ( v1 v2 v3 ) -* -* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R': -* -* V = ( v1 v2 v3 ) V = ( v1 v1 1 ) -* ( v1 v2 v3 ) ( v2 v2 v2 1 ) -* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 ) -* ( 1 v3 ) -* ( 1 ) -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, J - DOUBLE PRECISION VII -* .. -* .. External Subroutines .. - EXTERNAL DGEMV, DTRMV -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. Executable Statements .. -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* - IF( LSAME( DIRECT, 'F' ) ) THEN - DO 20 I = 1, K - IF( TAU( I ).EQ.ZERO ) THEN -* -* H(i) = I -* - DO 10 J = 1, I - T( J, I ) = ZERO - 10 CONTINUE - ELSE -* -* general case -* - VII = V( I, I ) - V( I, I ) = ONE - IF( LSAME( STOREV, 'C' ) ) THEN -* -* T(1:i-1,i) := - tau(i) * V(i:n,1:i-1)' * V(i:n,i) -* - CALL DGEMV( 'Transpose', N-I+1, I-1, -TAU( I ), - $ V( I, 1 ), LDV, V( I, I ), 1, ZERO, - $ T( 1, I ), 1 ) - ELSE -* -* T(1:i-1,i) := - tau(i) * V(1:i-1,i:n) * V(i,i:n)' -* - CALL DGEMV( 'No transpose', I-1, N-I+1, -TAU( I ), - $ V( 1, I ), LDV, V( I, I ), LDV, ZERO, - $ T( 1, I ), 1 ) - END IF - V( I, I ) = VII -* -* T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i) -* - CALL DTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, - $ LDT, T( 1, I ), 1 ) - T( I, I ) = TAU( I ) - END IF - 20 CONTINUE - ELSE - DO 40 I = K, 1, -1 - IF( TAU( I ).EQ.ZERO ) THEN -* -* H(i) = I -* - DO 30 J = I, K - T( J, I ) = ZERO - 30 CONTINUE - ELSE -* -* general case -* - IF( I.LT.K ) THEN - IF( LSAME( STOREV, 'C' ) ) THEN - VII = V( N-K+I, I ) - V( N-K+I, I ) = ONE -* -* T(i+1:k,i) := -* - tau(i) * V(1:n-k+i,i+1:k)' * V(1:n-k+i,i) -* - CALL DGEMV( 'Transpose', N-K+I, K-I, -TAU( I ), - $ V( 1, I+1 ), LDV, V( 1, I ), 1, ZERO, - $ T( I+1, I ), 1 ) - V( N-K+I, I ) = VII - ELSE - VII = V( I, N-K+I ) - V( I, N-K+I ) = ONE -* -* T(i+1:k,i) := -* - tau(i) * V(i+1:k,1:n-k+i) * V(i,1:n-k+i)' -* - CALL DGEMV( 'No transpose', K-I, N-K+I, -TAU( I ), - $ V( I+1, 1 ), LDV, V( I, 1 ), LDV, ZERO, - $ T( I+1, I ), 1 ) - V( I, N-K+I ) = VII - END IF -* -* T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i) -* - CALL DTRMV( 'Lower', 'No transpose', 'Non-unit', K-I, - $ T( I+1, I+1 ), LDT, T( I+1, I ), 1 ) - END IF - T( I, I ) = TAU( I ) - END IF - 40 CONTINUE - END IF - RETURN -* -* End of DLARFT -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlarfx.f b/cpp/nudg++/trunk/BlasLapack/dlarfx.f deleted file mode 100644 index 178a20a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlarfx.f +++ /dev/null @@ -1,639 +0,0 @@ - SUBROUTINE DLARFX( SIDE, M, N, V, TAU, C, LDC, WORK ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER SIDE - INTEGER LDC, M, N - DOUBLE PRECISION TAU -* .. -* .. Array Arguments .. - DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DLARFX applies a real elementary reflector H to a real m by n -* matrix C, from either the left or the right. H is represented in the -* form -* -* H = I - tau * v * v' -* -* where tau is a real scalar and v is a real vector. -* -* If tau = 0, then H is taken to be the unit matrix -* -* This version uses inline code if H has order < 11. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'L': form H * C -* = 'R': form C * H -* -* M (input) INTEGER -* The number of rows of the matrix C. -* -* N (input) INTEGER -* The number of columns of the matrix C. -* -* V (input) DOUBLE PRECISION array, dimension (M) if SIDE = 'L' -* or (N) if SIDE = 'R' -* The vector v in the representation of H. -* -* TAU (input) DOUBLE PRECISION -* The value tau in the representation of H. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the m by n matrix C. -* On exit, C is overwritten by the matrix H * C if SIDE = 'L', -* or C * H if SIDE = 'R'. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDA >= (1,M). -* -* WORK (workspace) DOUBLE PRECISION array, dimension -* (N) if SIDE = 'L' -* or (M) if SIDE = 'R' -* WORK is not referenced if H has order < 11. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER J - DOUBLE PRECISION SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9, - $ V1, V10, V2, V3, V4, V5, V6, V7, V8, V9 -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DGEMV, DGER -* .. -* .. Executable Statements .. -* - IF( TAU.EQ.ZERO ) - $ RETURN - IF( LSAME( SIDE, 'L' ) ) THEN -* -* Form H * C, where H has order m. -* - GO TO ( 10, 30, 50, 70, 90, 110, 130, 150, - $ 170, 190 )M -* -* Code for general M -* -* w := C'*v -* - CALL DGEMV( 'Transpose', M, N, ONE, C, LDC, V, 1, ZERO, WORK, - $ 1 ) -* -* C := C - tau * v * w' -* - CALL DGER( M, N, -TAU, V, 1, WORK, 1, C, LDC ) - GO TO 410 - 10 CONTINUE -* -* Special code for 1 x 1 Householder -* - T1 = ONE - TAU*V( 1 )*V( 1 ) - DO 20 J = 1, N - C( 1, J ) = T1*C( 1, J ) - 20 CONTINUE - GO TO 410 - 30 CONTINUE -* -* Special code for 2 x 2 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - DO 40 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - 40 CONTINUE - GO TO 410 - 50 CONTINUE -* -* Special code for 3 x 3 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - DO 60 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - 60 CONTINUE - GO TO 410 - 70 CONTINUE -* -* Special code for 4 x 4 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - DO 80 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + - $ V4*C( 4, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - C( 4, J ) = C( 4, J ) - SUM*T4 - 80 CONTINUE - GO TO 410 - 90 CONTINUE -* -* Special code for 5 x 5 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - DO 100 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + - $ V4*C( 4, J ) + V5*C( 5, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - C( 4, J ) = C( 4, J ) - SUM*T4 - C( 5, J ) = C( 5, J ) - SUM*T5 - 100 CONTINUE - GO TO 410 - 110 CONTINUE -* -* Special code for 6 x 6 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - DO 120 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + - $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - C( 4, J ) = C( 4, J ) - SUM*T4 - C( 5, J ) = C( 5, J ) - SUM*T5 - C( 6, J ) = C( 6, J ) - SUM*T6 - 120 CONTINUE - GO TO 410 - 130 CONTINUE -* -* Special code for 7 x 7 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - DO 140 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + - $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + - $ V7*C( 7, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - C( 4, J ) = C( 4, J ) - SUM*T4 - C( 5, J ) = C( 5, J ) - SUM*T5 - C( 6, J ) = C( 6, J ) - SUM*T6 - C( 7, J ) = C( 7, J ) - SUM*T7 - 140 CONTINUE - GO TO 410 - 150 CONTINUE -* -* Special code for 8 x 8 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - V8 = V( 8 ) - T8 = TAU*V8 - DO 160 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + - $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + - $ V7*C( 7, J ) + V8*C( 8, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - C( 4, J ) = C( 4, J ) - SUM*T4 - C( 5, J ) = C( 5, J ) - SUM*T5 - C( 6, J ) = C( 6, J ) - SUM*T6 - C( 7, J ) = C( 7, J ) - SUM*T7 - C( 8, J ) = C( 8, J ) - SUM*T8 - 160 CONTINUE - GO TO 410 - 170 CONTINUE -* -* Special code for 9 x 9 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - V8 = V( 8 ) - T8 = TAU*V8 - V9 = V( 9 ) - T9 = TAU*V9 - DO 180 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + - $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + - $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - C( 4, J ) = C( 4, J ) - SUM*T4 - C( 5, J ) = C( 5, J ) - SUM*T5 - C( 6, J ) = C( 6, J ) - SUM*T6 - C( 7, J ) = C( 7, J ) - SUM*T7 - C( 8, J ) = C( 8, J ) - SUM*T8 - C( 9, J ) = C( 9, J ) - SUM*T9 - 180 CONTINUE - GO TO 410 - 190 CONTINUE -* -* Special code for 10 x 10 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - V8 = V( 8 ) - T8 = TAU*V8 - V9 = V( 9 ) - T9 = TAU*V9 - V10 = V( 10 ) - T10 = TAU*V10 - DO 200 J = 1, N - SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + - $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + - $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) + - $ V10*C( 10, J ) - C( 1, J ) = C( 1, J ) - SUM*T1 - C( 2, J ) = C( 2, J ) - SUM*T2 - C( 3, J ) = C( 3, J ) - SUM*T3 - C( 4, J ) = C( 4, J ) - SUM*T4 - C( 5, J ) = C( 5, J ) - SUM*T5 - C( 6, J ) = C( 6, J ) - SUM*T6 - C( 7, J ) = C( 7, J ) - SUM*T7 - C( 8, J ) = C( 8, J ) - SUM*T8 - C( 9, J ) = C( 9, J ) - SUM*T9 - C( 10, J ) = C( 10, J ) - SUM*T10 - 200 CONTINUE - GO TO 410 - ELSE -* -* Form C * H, where H has order n. -* - GO TO ( 210, 230, 250, 270, 290, 310, 330, 350, - $ 370, 390 )N -* -* Code for general N -* -* w := C * v -* - CALL DGEMV( 'No transpose', M, N, ONE, C, LDC, V, 1, ZERO, - $ WORK, 1 ) -* -* C := C - tau * w * v' -* - CALL DGER( M, N, -TAU, WORK, 1, V, 1, C, LDC ) - GO TO 410 - 210 CONTINUE -* -* Special code for 1 x 1 Householder -* - T1 = ONE - TAU*V( 1 )*V( 1 ) - DO 220 J = 1, M - C( J, 1 ) = T1*C( J, 1 ) - 220 CONTINUE - GO TO 410 - 230 CONTINUE -* -* Special code for 2 x 2 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - DO 240 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - 240 CONTINUE - GO TO 410 - 250 CONTINUE -* -* Special code for 3 x 3 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - DO 260 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - 260 CONTINUE - GO TO 410 - 270 CONTINUE -* -* Special code for 4 x 4 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - DO 280 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + - $ V4*C( J, 4 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - C( J, 4 ) = C( J, 4 ) - SUM*T4 - 280 CONTINUE - GO TO 410 - 290 CONTINUE -* -* Special code for 5 x 5 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - DO 300 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + - $ V4*C( J, 4 ) + V5*C( J, 5 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - C( J, 4 ) = C( J, 4 ) - SUM*T4 - C( J, 5 ) = C( J, 5 ) - SUM*T5 - 300 CONTINUE - GO TO 410 - 310 CONTINUE -* -* Special code for 6 x 6 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - DO 320 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + - $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - C( J, 4 ) = C( J, 4 ) - SUM*T4 - C( J, 5 ) = C( J, 5 ) - SUM*T5 - C( J, 6 ) = C( J, 6 ) - SUM*T6 - 320 CONTINUE - GO TO 410 - 330 CONTINUE -* -* Special code for 7 x 7 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - DO 340 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + - $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + - $ V7*C( J, 7 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - C( J, 4 ) = C( J, 4 ) - SUM*T4 - C( J, 5 ) = C( J, 5 ) - SUM*T5 - C( J, 6 ) = C( J, 6 ) - SUM*T6 - C( J, 7 ) = C( J, 7 ) - SUM*T7 - 340 CONTINUE - GO TO 410 - 350 CONTINUE -* -* Special code for 8 x 8 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - V8 = V( 8 ) - T8 = TAU*V8 - DO 360 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + - $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + - $ V7*C( J, 7 ) + V8*C( J, 8 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - C( J, 4 ) = C( J, 4 ) - SUM*T4 - C( J, 5 ) = C( J, 5 ) - SUM*T5 - C( J, 6 ) = C( J, 6 ) - SUM*T6 - C( J, 7 ) = C( J, 7 ) - SUM*T7 - C( J, 8 ) = C( J, 8 ) - SUM*T8 - 360 CONTINUE - GO TO 410 - 370 CONTINUE -* -* Special code for 9 x 9 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - V8 = V( 8 ) - T8 = TAU*V8 - V9 = V( 9 ) - T9 = TAU*V9 - DO 380 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + - $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + - $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - C( J, 4 ) = C( J, 4 ) - SUM*T4 - C( J, 5 ) = C( J, 5 ) - SUM*T5 - C( J, 6 ) = C( J, 6 ) - SUM*T6 - C( J, 7 ) = C( J, 7 ) - SUM*T7 - C( J, 8 ) = C( J, 8 ) - SUM*T8 - C( J, 9 ) = C( J, 9 ) - SUM*T9 - 380 CONTINUE - GO TO 410 - 390 CONTINUE -* -* Special code for 10 x 10 Householder -* - V1 = V( 1 ) - T1 = TAU*V1 - V2 = V( 2 ) - T2 = TAU*V2 - V3 = V( 3 ) - T3 = TAU*V3 - V4 = V( 4 ) - T4 = TAU*V4 - V5 = V( 5 ) - T5 = TAU*V5 - V6 = V( 6 ) - T6 = TAU*V6 - V7 = V( 7 ) - T7 = TAU*V7 - V8 = V( 8 ) - T8 = TAU*V8 - V9 = V( 9 ) - T9 = TAU*V9 - V10 = V( 10 ) - T10 = TAU*V10 - DO 400 J = 1, M - SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + - $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + - $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) + - $ V10*C( J, 10 ) - C( J, 1 ) = C( J, 1 ) - SUM*T1 - C( J, 2 ) = C( J, 2 ) - SUM*T2 - C( J, 3 ) = C( J, 3 ) - SUM*T3 - C( J, 4 ) = C( J, 4 ) - SUM*T4 - C( J, 5 ) = C( J, 5 ) - SUM*T5 - C( J, 6 ) = C( J, 6 ) - SUM*T6 - C( J, 7 ) = C( J, 7 ) - SUM*T7 - C( J, 8 ) = C( J, 8 ) - SUM*T8 - C( J, 9 ) = C( J, 9 ) - SUM*T9 - C( J, 10 ) = C( J, 10 ) - SUM*T10 - 400 CONTINUE - GO TO 410 - END IF - 410 CONTINUE - RETURN -* -* End of DLARFX -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlartg.f b/cpp/nudg++/trunk/BlasLapack/dlartg.f deleted file mode 100644 index c0cd3d1..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlartg.f +++ /dev/null @@ -1,143 +0,0 @@ - SUBROUTINE DLARTG( F, G, CS, SN, R ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - DOUBLE PRECISION CS, F, G, R, SN -* .. -* -* Purpose -* ======= -* -* DLARTG generate a plane rotation so that -* -* [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1. -* [ -SN CS ] [ G ] [ 0 ] -* -* This is a slower, more accurate version of the BLAS1 routine DROTG, -* with the following other differences: -* F and G are unchanged on return. -* If G=0, then CS=1 and SN=0. -* If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any -* floating point operations (saves work in DBDSQR when -* there are zeros on the diagonal). -* -* If F exceeds G in magnitude, CS will be positive. -* -* Arguments -* ========= -* -* F (input) DOUBLE PRECISION -* The first component of vector to be rotated. -* -* G (input) DOUBLE PRECISION -* The second component of vector to be rotated. -* -* CS (output) DOUBLE PRECISION -* The cosine of the rotation. -* -* SN (output) DOUBLE PRECISION -* The sine of the rotation. -* -* R (output) DOUBLE PRECISION -* The nonzero component of the rotated vector. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D0 ) - DOUBLE PRECISION TWO - PARAMETER ( TWO = 2.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL FIRST - INTEGER COUNT, I - DOUBLE PRECISION EPS, F1, G1, SAFMIN, SAFMN2, SAFMX2, SCALE -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, INT, LOG, MAX, SQRT -* .. -* .. Save statement .. - SAVE FIRST, SAFMX2, SAFMIN, SAFMN2 -* .. -* .. Data statements .. - DATA FIRST / .TRUE. / -* .. -* .. Executable Statements .. -* - IF( FIRST ) THEN - FIRST = .FALSE. - SAFMIN = DLAMCH( 'S' ) - EPS = DLAMCH( 'E' ) - SAFMN2 = DLAMCH( 'B' )**INT( LOG( SAFMIN / EPS ) / - $ LOG( DLAMCH( 'B' ) ) / TWO ) - SAFMX2 = ONE / SAFMN2 - END IF - IF( G.EQ.ZERO ) THEN - CS = ONE - SN = ZERO - R = F - ELSE IF( F.EQ.ZERO ) THEN - CS = ZERO - SN = ONE - R = G - ELSE - F1 = F - G1 = G - SCALE = MAX( ABS( F1 ), ABS( G1 ) ) - IF( SCALE.GE.SAFMX2 ) THEN - COUNT = 0 - 10 CONTINUE - COUNT = COUNT + 1 - F1 = F1*SAFMN2 - G1 = G1*SAFMN2 - SCALE = MAX( ABS( F1 ), ABS( G1 ) ) - IF( SCALE.GE.SAFMX2 ) - $ GO TO 10 - R = SQRT( F1**2+G1**2 ) - CS = F1 / R - SN = G1 / R - DO 20 I = 1, COUNT - R = R*SAFMX2 - 20 CONTINUE - ELSE IF( SCALE.LE.SAFMN2 ) THEN - COUNT = 0 - 30 CONTINUE - COUNT = COUNT + 1 - F1 = F1*SAFMX2 - G1 = G1*SAFMX2 - SCALE = MAX( ABS( F1 ), ABS( G1 ) ) - IF( SCALE.LE.SAFMN2 ) - $ GO TO 30 - R = SQRT( F1**2+G1**2 ) - CS = F1 / R - SN = G1 / R - DO 40 I = 1, COUNT - R = R*SAFMN2 - 40 CONTINUE - ELSE - R = SQRT( F1**2+G1**2 ) - CS = F1 / R - SN = G1 / R - END IF - IF( ABS( F ).GT.ABS( G ) .AND. CS.LT.ZERO ) THEN - CS = -CS - SN = -SN - R = -R - END IF - END IF - RETURN -* -* End of DLARTG -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlas2.f b/cpp/nudg++/trunk/BlasLapack/dlas2.f deleted file mode 100644 index 55652c0..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlas2.f +++ /dev/null @@ -1,122 +0,0 @@ - SUBROUTINE DLAS2( F, G, H, SSMIN, SSMAX ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - DOUBLE PRECISION F, G, H, SSMAX, SSMIN -* .. -* -* Purpose -* ======= -* -* DLAS2 computes the singular values of the 2-by-2 matrix -* [ F G ] -* [ 0 H ]. -* On return, SSMIN is the smaller singular value and SSMAX is the -* larger singular value. -* -* Arguments -* ========= -* -* F (input) DOUBLE PRECISION -* The (1,1) element of the 2-by-2 matrix. -* -* G (input) DOUBLE PRECISION -* The (1,2) element of the 2-by-2 matrix. -* -* H (input) DOUBLE PRECISION -* The (2,2) element of the 2-by-2 matrix. -* -* SSMIN (output) DOUBLE PRECISION -* The smaller singular value. -* -* SSMAX (output) DOUBLE PRECISION -* The larger singular value. -* -* Further Details -* =============== -* -* Barring over/underflow, all output quantities are correct to within -* a few units in the last place (ulps), even in the absence of a guard -* digit in addition/subtraction. -* -* In IEEE arithmetic, the code works correctly if one matrix element is -* infinite. -* -* Overflow will not occur unless the largest singular value itself -* overflows, or is within a few ulps of overflow. (On machines with -* partial overflow, like the Cray, overflow may occur if the largest -* singular value is within a factor of 2 of overflow.) -* -* Underflow is harmless if underflow is gradual. Otherwise, results -* may correspond to a matrix modified by perturbations of size near -* the underflow threshold. -* -* ==================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D0 ) - DOUBLE PRECISION TWO - PARAMETER ( TWO = 2.0D0 ) -* .. -* .. Local Scalars .. - DOUBLE PRECISION AS, AT, AU, C, FA, FHMN, FHMX, GA, HA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* - FA = ABS( F ) - GA = ABS( G ) - HA = ABS( H ) - FHMN = MIN( FA, HA ) - FHMX = MAX( FA, HA ) - IF( FHMN.EQ.ZERO ) THEN - SSMIN = ZERO - IF( FHMX.EQ.ZERO ) THEN - SSMAX = GA - ELSE - SSMAX = MAX( FHMX, GA )*SQRT( ONE+ - $ ( MIN( FHMX, GA ) / MAX( FHMX, GA ) )**2 ) - END IF - ELSE - IF( GA.LT.FHMX ) THEN - AS = ONE + FHMN / FHMX - AT = ( FHMX-FHMN ) / FHMX - AU = ( GA / FHMX )**2 - C = TWO / ( SQRT( AS*AS+AU )+SQRT( AT*AT+AU ) ) - SSMIN = FHMN*C - SSMAX = FHMX / C - ELSE - AU = FHMX / GA - IF( AU.EQ.ZERO ) THEN -* -* Avoid possible harmful underflow if exponent range -* asymmetric (true SSMIN may not underflow even if -* AU underflows) -* - SSMIN = ( FHMN*FHMX ) / GA - SSMAX = GA - ELSE - AS = ONE + FHMN / FHMX - AT = ( FHMX-FHMN ) / FHMX - C = ONE / ( SQRT( ONE+( AS*AU )**2 )+ - $ SQRT( ONE+( AT*AU )**2 ) ) - SSMIN = ( FHMN*C )*AU - SSMIN = SSMIN + SSMIN - SSMAX = GA / ( C+C ) - END IF - END IF - END IF - RETURN -* -* End of DLAS2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlascl.f b/cpp/nudg++/trunk/BlasLapack/dlascl.f deleted file mode 100644 index 4c05d4d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlascl.f +++ /dev/null @@ -1,268 +0,0 @@ - SUBROUTINE DLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER TYPE - INTEGER INFO, KL, KU, LDA, M, N - DOUBLE PRECISION CFROM, CTO -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* DLASCL multiplies the M by N real matrix A by the real scalar -* CTO/CFROM. This is done without over/underflow as long as the final -* result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that -* A may be full, upper triangular, lower triangular, upper Hessenberg, -* or banded. -* -* Arguments -* ========= -* -* TYPE (input) CHARACTER*1 -* TYPE indices the storage type of the input matrix. -* = 'G': A is a full matrix. -* = 'L': A is a lower triangular matrix. -* = 'U': A is an upper triangular matrix. -* = 'H': A is an upper Hessenberg matrix. -* = 'B': A is a symmetric band matrix with lower bandwidth KL -* and upper bandwidth KU and with the only the lower -* half stored. -* = 'Q': A is a symmetric band matrix with lower bandwidth KL -* and upper bandwidth KU and with the only the upper -* half stored. -* = 'Z': A is a band matrix with lower bandwidth KL and upper -* bandwidth KU. -* -* KL (input) INTEGER -* The lower bandwidth of A. Referenced only if TYPE = 'B', -* 'Q' or 'Z'. -* -* KU (input) INTEGER -* The upper bandwidth of A. Referenced only if TYPE = 'B', -* 'Q' or 'Z'. -* -* CFROM (input) DOUBLE PRECISION -* CTO (input) DOUBLE PRECISION -* The matrix A is multiplied by CTO/CFROM. A(I,J) is computed -* without over/underflow if the final result CTO*A(I,J)/CFROM -* can be represented without over/underflow. CFROM must be -* nonzero. -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,M) -* The matrix to be multiplied by CTO/CFROM. See TYPE for the -* storage type. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* INFO (output) INTEGER -* 0 - successful exit -* <0 - if INFO = -i, the i-th argument had an illegal value. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL DONE - INTEGER I, ITYPE, J, K1, K2, K3, K4 - DOUBLE PRECISION BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DLAMCH - EXTERNAL LSAME, DLAMCH -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN -* .. -* .. External Subroutines .. - EXTERNAL XERBLA -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 -* - IF( LSAME( TYPE, 'G' ) ) THEN - ITYPE = 0 - ELSE IF( LSAME( TYPE, 'L' ) ) THEN - ITYPE = 1 - ELSE IF( LSAME( TYPE, 'U' ) ) THEN - ITYPE = 2 - ELSE IF( LSAME( TYPE, 'H' ) ) THEN - ITYPE = 3 - ELSE IF( LSAME( TYPE, 'B' ) ) THEN - ITYPE = 4 - ELSE IF( LSAME( TYPE, 'Q' ) ) THEN - ITYPE = 5 - ELSE IF( LSAME( TYPE, 'Z' ) ) THEN - ITYPE = 6 - ELSE - ITYPE = -1 - END IF -* - IF( ITYPE.EQ.-1 ) THEN - INFO = -1 - ELSE IF( CFROM.EQ.ZERO ) THEN - INFO = -4 - ELSE IF( M.LT.0 ) THEN - INFO = -6 - ELSE IF( N.LT.0 .OR. ( ITYPE.EQ.4 .AND. N.NE.M ) .OR. - $ ( ITYPE.EQ.5 .AND. N.NE.M ) ) THEN - INFO = -7 - ELSE IF( ITYPE.LE.3 .AND. LDA.LT.MAX( 1, M ) ) THEN - INFO = -9 - ELSE IF( ITYPE.GE.4 ) THEN - IF( KL.LT.0 .OR. KL.GT.MAX( M-1, 0 ) ) THEN - INFO = -2 - ELSE IF( KU.LT.0 .OR. KU.GT.MAX( N-1, 0 ) .OR. - $ ( ( ITYPE.EQ.4 .OR. ITYPE.EQ.5 ) .AND. KL.NE.KU ) ) - $ THEN - INFO = -3 - ELSE IF( ( ITYPE.EQ.4 .AND. LDA.LT.KL+1 ) .OR. - $ ( ITYPE.EQ.5 .AND. LDA.LT.KU+1 ) .OR. - $ ( ITYPE.EQ.6 .AND. LDA.LT.2*KL+KU+1 ) ) THEN - INFO = -9 - END IF - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DLASCL', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 .OR. M.EQ.0 ) - $ RETURN -* -* Get machine parameters -* - SMLNUM = DLAMCH( 'S' ) - BIGNUM = ONE / SMLNUM -* - CFROMC = CFROM - CTOC = CTO -* - 10 CONTINUE - CFROM1 = CFROMC*SMLNUM - CTO1 = CTOC / BIGNUM - IF( ABS( CFROM1 ).GT.ABS( CTOC ) .AND. CTOC.NE.ZERO ) THEN - MUL = SMLNUM - DONE = .FALSE. - CFROMC = CFROM1 - ELSE IF( ABS( CTO1 ).GT.ABS( CFROMC ) ) THEN - MUL = BIGNUM - DONE = .FALSE. - CTOC = CTO1 - ELSE - MUL = CTOC / CFROMC - DONE = .TRUE. - END IF -* - IF( ITYPE.EQ.0 ) THEN -* -* Full matrix -* - DO 30 J = 1, N - DO 20 I = 1, M - A( I, J ) = A( I, J )*MUL - 20 CONTINUE - 30 CONTINUE -* - ELSE IF( ITYPE.EQ.1 ) THEN -* -* Lower triangular matrix -* - DO 50 J = 1, N - DO 40 I = J, M - A( I, J ) = A( I, J )*MUL - 40 CONTINUE - 50 CONTINUE -* - ELSE IF( ITYPE.EQ.2 ) THEN -* -* Upper triangular matrix -* - DO 70 J = 1, N - DO 60 I = 1, MIN( J, M ) - A( I, J ) = A( I, J )*MUL - 60 CONTINUE - 70 CONTINUE -* - ELSE IF( ITYPE.EQ.3 ) THEN -* -* Upper Hessenberg matrix -* - DO 90 J = 1, N - DO 80 I = 1, MIN( J+1, M ) - A( I, J ) = A( I, J )*MUL - 80 CONTINUE - 90 CONTINUE -* - ELSE IF( ITYPE.EQ.4 ) THEN -* -* Lower half of a symmetric band matrix -* - K3 = KL + 1 - K4 = N + 1 - DO 110 J = 1, N - DO 100 I = 1, MIN( K3, K4-J ) - A( I, J ) = A( I, J )*MUL - 100 CONTINUE - 110 CONTINUE -* - ELSE IF( ITYPE.EQ.5 ) THEN -* -* Upper half of a symmetric band matrix -* - K1 = KU + 2 - K3 = KU + 1 - DO 130 J = 1, N - DO 120 I = MAX( K1-J, 1 ), K3 - A( I, J ) = A( I, J )*MUL - 120 CONTINUE - 130 CONTINUE -* - ELSE IF( ITYPE.EQ.6 ) THEN -* -* Band matrix -* - K1 = KL + KU + 2 - K2 = KL + 1 - K3 = 2*KL + KU + 1 - K4 = KL + KU + 1 + M - DO 150 J = 1, N - DO 140 I = MAX( K1-J, K2 ), MIN( K3, K4-J ) - A( I, J ) = A( I, J )*MUL - 140 CONTINUE - 150 CONTINUE -* - END IF -* - IF( .NOT.DONE ) - $ GO TO 10 -* - RETURN -* -* End of DLASCL -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlaset.f b/cpp/nudg++/trunk/BlasLapack/dlaset.f deleted file mode 100644 index 14af572..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlaset.f +++ /dev/null @@ -1,115 +0,0 @@ - SUBROUTINE DLASET( UPLO, M, N, ALPHA, BETA, A, LDA ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER LDA, M, N - DOUBLE PRECISION ALPHA, BETA -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* DLASET initializes an m-by-n matrix A to BETA on the diagonal and -* ALPHA on the offdiagonals. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* Specifies the part of the matrix A to be set. -* = 'U': Upper triangular part is set; the strictly lower -* triangular part of A is not changed. -* = 'L': Lower triangular part is set; the strictly upper -* triangular part of A is not changed. -* Otherwise: All of the matrix A is set. -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* ALPHA (input) DOUBLE PRECISION -* The constant to which the offdiagonal elements are to be set. -* -* BETA (input) DOUBLE PRECISION -* The constant to which the diagonal elements are to be set. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On exit, the leading m-by-n submatrix of A is set as follows: -* -* if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n, -* if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n, -* otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j, -* -* and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n). -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* ===================================================================== -* -* .. Local Scalars .. - INTEGER I, J -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* - IF( LSAME( UPLO, 'U' ) ) THEN -* -* Set the strictly upper triangular or trapezoidal part of the -* array to ALPHA. -* - DO 20 J = 2, N - DO 10 I = 1, MIN( J-1, M ) - A( I, J ) = ALPHA - 10 CONTINUE - 20 CONTINUE -* - ELSE IF( LSAME( UPLO, 'L' ) ) THEN -* -* Set the strictly lower triangular or trapezoidal part of the -* array to ALPHA. -* - DO 40 J = 1, MIN( M, N ) - DO 30 I = J + 1, M - A( I, J ) = ALPHA - 30 CONTINUE - 40 CONTINUE -* - ELSE -* -* Set the leading m-by-n submatrix to ALPHA. -* - DO 60 J = 1, N - DO 50 I = 1, M - A( I, J ) = ALPHA - 50 CONTINUE - 60 CONTINUE - END IF -* -* Set the first min(M,N) diagonal elements to BETA. -* - DO 70 I = 1, MIN( M, N ) - A( I, I ) = BETA - 70 CONTINUE -* - RETURN -* -* End of DLASET -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasq1.f b/cpp/nudg++/trunk/BlasLapack/dlasq1.f deleted file mode 100644 index 0bbe3f0..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasq1.f +++ /dev/null @@ -1,149 +0,0 @@ - SUBROUTINE DLASQ1( N, D, E, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION D( * ), E( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DLASQ1 computes the singular values of a real N-by-N bidiagonal -* matrix with diagonal D and off-diagonal E. The singular values -* are computed to high relative accuracy, in the absence of -* denormalization, underflow and overflow. The algorithm was first -* presented in -* -* "Accurate singular values and differential qd algorithms" by K. V. -* Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230, -* 1994, -* -* and the present implementation is described in "An implementation of -* the dqds Algorithm (Positive Case)", LAPACK Working Note. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of rows and columns in the matrix. N >= 0. -* -* D (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, D contains the diagonal elements of the -* bidiagonal matrix whose SVD is desired. On normal exit, -* D contains the singular values in decreasing order. -* -* E (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, elements E(1:N-1) contain the off-diagonal elements -* of the bidiagonal matrix whose SVD is desired. -* On exit, E is overwritten. -* -* WORK (workspace) DOUBLE PRECISION array, dimension (4*N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: the algorithm failed -* = 1, a split was marked by a positive value in E -* = 2, current block of Z not diagonalized after 30*N -* iterations (in inner while loop) -* = 3, termination criterion of outer while loop not met -* (program created more than N unreduced blocks) -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) -* .. -* .. Local Scalars .. - INTEGER I, IINFO - DOUBLE PRECISION EPS, SCALE, SAFMIN, SIGMN, SIGMX -* .. -* .. External Subroutines .. - EXTERNAL DLAS2, DLASQ2, DLASRT, XERBLA -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, SQRT -* .. -* .. Executable Statements .. -* - INFO = 0 - IF( N.LT.0 ) THEN - INFO = -2 - CALL XERBLA( 'DLASQ1', -INFO ) - RETURN - ELSE IF( N.EQ.0 ) THEN - RETURN - ELSE IF( N.EQ.1 ) THEN - D( 1 ) = ABS( D( 1 ) ) - RETURN - ELSE IF( N.EQ.2 ) THEN - CALL DLAS2( D( 1 ), E( 1 ), D( 2 ), SIGMN, SIGMX ) - D( 1 ) = SIGMX - D( 2 ) = SIGMN - RETURN - END IF -* -* Estimate the largest singular value. -* - SIGMX = ZERO - DO 10 I = 1, N - 1 - D( I ) = ABS( D( I ) ) - SIGMX = MAX( SIGMX, ABS( E( I ) ) ) - 10 CONTINUE - D( N ) = ABS( D( N ) ) -* -* Early return if SIGMX is zero (matrix is already diagonal). -* - IF( SIGMX.EQ.ZERO ) THEN - CALL DLASRT( 'D', N, D, IINFO ) - RETURN - END IF -* - DO 20 I = 1, N - SIGMX = MAX( SIGMX, D( I ) ) - 20 CONTINUE -* -* Copy D and E into WORK (in the Z format) and scale (squaring the -* input data makes scaling by a power of the radix pointless). -* - EPS = DLAMCH( 'Precision' ) - SAFMIN = DLAMCH( 'Safe minimum' ) - SCALE = SQRT( EPS / SAFMIN ) - CALL DCOPY( N, D, 1, WORK( 1 ), 2 ) - CALL DCOPY( N-1, E, 1, WORK( 2 ), 2 ) - CALL DLASCL( 'G', 0, 0, SIGMX, SCALE, 2*N-1, 1, WORK, 2*N-1, - $ IINFO ) -* -* Compute the q's and e's. -* - DO 30 I = 1, 2*N - 1 - WORK( I ) = WORK( I )**2 - 30 CONTINUE - WORK( 2*N ) = ZERO -* - CALL DLASQ2( N, WORK, INFO ) -* - IF( INFO.EQ.0 ) THEN - DO 40 I = 1, N - D( I ) = SQRT( WORK( I ) ) - 40 CONTINUE - CALL DLASCL( 'G', 0, 0, SCALE, SIGMX, N, 1, D, N, IINFO ) - END IF -* - RETURN -* -* End of DLASQ1 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasq2.f b/cpp/nudg++/trunk/BlasLapack/dlasq2.f deleted file mode 100644 index 271111a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasq2.f +++ /dev/null @@ -1,436 +0,0 @@ - SUBROUTINE DLASQ2( N, Z, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION Z( * ) -* .. -* -* Purpose -* ======= -* -* DLASQ2 computes all the eigenvalues of the symmetric positive -* definite tridiagonal matrix associated with the qd array Z to high -* relative accuracy are computed to high relative accuracy, in the -* absence of denormalization, underflow and overflow. -* -* To see the relation of Z to the tridiagonal matrix, let L be a -* unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and -* let U be an upper bidiagonal matrix with 1's above and diagonal -* Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the -* symmetric tridiagonal to which it is similar. -* -* Note : DLASQ2 defines a logical variable, IEEE, which is true -* on machines which follow ieee-754 floating-point standard in their -* handling of infinities and NaNs, and false otherwise. This variable -* is passed to DLASQ3. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of rows and columns in the matrix. N >= 0. -* -* Z (workspace) DOUBLE PRECISION array, dimension ( 4*N ) -* On entry Z holds the qd array. On exit, entries 1 to N hold -* the eigenvalues in decreasing order, Z( 2*N+1 ) holds the -* trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If -* N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 ) -* holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of -* shifts that failed. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if the i-th argument is a scalar and had an illegal -* value, then INFO = -i, if the i-th argument is an -* array and the j-entry had an illegal value, then -* INFO = -(i*100+j) -* > 0: the algorithm failed -* = 1, a split was marked by a positive value in E -* = 2, current block of Z not diagonalized after 30*N -* iterations (in inner while loop) -* = 3, termination criterion of outer while loop not met -* (program created more than N unreduced blocks) -* -* Further Details -* =============== -* Local Variables: I0:N0 defines a current unreduced segment of Z. -* The shifts are accumulated in SIGMA. Iteration count is in ITER. -* Ping-pong is controlled by PP (alternates between 0 and 1). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION CBIAS - PARAMETER ( CBIAS = 1.50D0 ) - DOUBLE PRECISION ZERO, HALF, ONE, TWO, FOUR, HUNDRD - PARAMETER ( ZERO = 0.0D0, HALF = 0.5D0, ONE = 1.0D0, - $ TWO = 2.0D0, FOUR = 4.0D0, HUNDRD = 100.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL IEEE - INTEGER I0, I4, IINFO, IPN4, ITER, IWHILA, IWHILB, K, - $ N0, NBIG, NDIV, NFAIL, PP, SPLT - DOUBLE PRECISION D, DESIG, DMIN, E, EMAX, EMIN, EPS, OLDEMN, - $ QMAX, QMIN, S, SAFMIN, SIGMA, T, TEMP, TOL, - $ TOL2, TRACE, ZMAX -* .. -* .. External Subroutines .. - EXTERNAL DLASQ3, DLASRT, XERBLA -* .. -* .. External Functions .. - INTEGER ILAENV - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH, ILAENV -* .. -* .. Intrinsic Functions .. - INTRINSIC DBLE, MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* -* Test the input arguments. -* (in case DLASQ2 is not called by DLASQ1) -* - INFO = 0 - EPS = DLAMCH( 'Precision' ) - SAFMIN = DLAMCH( 'Safe minimum' ) - TOL = EPS*HUNDRD - TOL2 = TOL**2 -* - IF( N.LT.0 ) THEN - INFO = -1 - CALL XERBLA( 'DLASQ2', 1 ) - RETURN - ELSE IF( N.EQ.0 ) THEN - RETURN - ELSE IF( N.EQ.1 ) THEN -* -* 1-by-1 case. -* - IF( Z( 1 ).LT.ZERO ) THEN - INFO = -201 - CALL XERBLA( 'DLASQ2', 2 ) - END IF - RETURN - ELSE IF( N.EQ.2 ) THEN -* -* 2-by-2 case. -* - IF( Z( 2 ).LT.ZERO .OR. Z( 3 ).LT.ZERO ) THEN - INFO = -2 - CALL XERBLA( 'DLASQ2', 2 ) - RETURN - ELSE IF( Z( 3 ).GT.Z( 1 ) ) THEN - D = Z( 3 ) - Z( 3 ) = Z( 1 ) - Z( 1 ) = D - END IF - Z( 5 ) = Z( 1 ) + Z( 2 ) + Z( 3 ) - IF( Z( 2 ).GT.Z( 3 )*TOL2 ) THEN - T = HALF*( ( Z( 1 )-Z( 3 ) )+Z( 2 ) ) - S = Z( 3 )*( Z( 2 ) / T ) - IF( S.LE.T ) THEN - S = Z( 3 )*( Z( 2 ) / ( T*( ONE+SQRT( ONE+S / T ) ) ) ) - ELSE - S = Z( 3 )*( Z( 2 ) / ( T+SQRT( T )*SQRT( T+S ) ) ) - END IF - T = Z( 1 ) + ( S+Z( 2 ) ) - Z( 3 ) = Z( 3 )*( Z( 1 ) / T ) - Z( 1 ) = T - END IF - Z( 2 ) = Z( 3 ) - Z( 6 ) = Z( 2 ) + Z( 1 ) - RETURN - END IF -* -* Check for negative data and compute sums of q's and e's. -* - Z( 2*N ) = ZERO - EMIN = Z( 2 ) - QMAX = ZERO - ZMAX = ZERO - D = ZERO - E = ZERO -* - DO 10 K = 1, 2*( N-1 ), 2 - IF( Z( K ).LT.ZERO ) THEN - INFO = -( 200+K ) - CALL XERBLA( 'DLASQ2', 2 ) - RETURN - ELSE IF( Z( K+1 ).LT.ZERO ) THEN - INFO = -( 200+K+1 ) - CALL XERBLA( 'DLASQ2', 2 ) - RETURN - END IF - D = D + Z( K ) - E = E + Z( K+1 ) - QMAX = MAX( QMAX, Z( K ) ) - EMIN = MIN( EMIN, Z( K+1 ) ) - ZMAX = MAX( QMAX, ZMAX, Z( K+1 ) ) - 10 CONTINUE - IF( Z( 2*N-1 ).LT.ZERO ) THEN - INFO = -( 200+2*N-1 ) - CALL XERBLA( 'DLASQ2', 2 ) - RETURN - END IF - D = D + Z( 2*N-1 ) - QMAX = MAX( QMAX, Z( 2*N-1 ) ) - ZMAX = MAX( QMAX, ZMAX ) -* -* Check for diagonality. -* - IF( E.EQ.ZERO ) THEN - DO 20 K = 2, N - Z( K ) = Z( 2*K-1 ) - 20 CONTINUE - CALL DLASRT( 'D', N, Z, IINFO ) - Z( 2*N-1 ) = D - RETURN - END IF -* - TRACE = D + E -* -* Check for zero data. -* - IF( TRACE.EQ.ZERO ) THEN - Z( 2*N-1 ) = ZERO - RETURN - END IF -* -* Check whether the machine is IEEE conformable. -* - IEEE = ILAENV( 10, 'DLASQ2', 'N', 1, 2, 3, 4 ).EQ.1 .AND. - $ ILAENV( 11, 'DLASQ2', 'N', 1, 2, 3, 4 ).EQ.1 -* -* Rearrange data for locality: Z=(q1,qq1,e1,ee1,q2,qq2,e2,ee2,...). -* - DO 30 K = 2*N, 2, -2 - Z( 2*K ) = ZERO - Z( 2*K-1 ) = Z( K ) - Z( 2*K-2 ) = ZERO - Z( 2*K-3 ) = Z( K-1 ) - 30 CONTINUE -* - I0 = 1 - N0 = N -* -* Reverse the qd-array, if warranted. -* - IF( CBIAS*Z( 4*I0-3 ).LT.Z( 4*N0-3 ) ) THEN - IPN4 = 4*( I0+N0 ) - DO 40 I4 = 4*I0, 2*( I0+N0-1 ), 4 - TEMP = Z( I4-3 ) - Z( I4-3 ) = Z( IPN4-I4-3 ) - Z( IPN4-I4-3 ) = TEMP - TEMP = Z( I4-1 ) - Z( I4-1 ) = Z( IPN4-I4-5 ) - Z( IPN4-I4-5 ) = TEMP - 40 CONTINUE - END IF -* -* Initial split checking via dqd and Li's test. -* - PP = 0 -* - DO 80 K = 1, 2 -* - D = Z( 4*N0+PP-3 ) - DO 50 I4 = 4*( N0-1 ) + PP, 4*I0 + PP, -4 - IF( Z( I4-1 ).LE.TOL2*D ) THEN - Z( I4-1 ) = -ZERO - D = Z( I4-3 ) - ELSE - D = Z( I4-3 )*( D / ( D+Z( I4-1 ) ) ) - END IF - 50 CONTINUE -* -* dqd maps Z to ZZ plus Li's test. -* - EMIN = Z( 4*I0+PP+1 ) - D = Z( 4*I0+PP-3 ) - DO 60 I4 = 4*I0 + PP, 4*( N0-1 ) + PP, 4 - Z( I4-2*PP-2 ) = D + Z( I4-1 ) - IF( Z( I4-1 ).LE.TOL2*D ) THEN - Z( I4-1 ) = -ZERO - Z( I4-2*PP-2 ) = D - Z( I4-2*PP ) = ZERO - D = Z( I4+1 ) - ELSE IF( SAFMIN*Z( I4+1 ).LT.Z( I4-2*PP-2 ) .AND. - $ SAFMIN*Z( I4-2*PP-2 ).LT.Z( I4+1 ) ) THEN - TEMP = Z( I4+1 ) / Z( I4-2*PP-2 ) - Z( I4-2*PP ) = Z( I4-1 )*TEMP - D = D*TEMP - ELSE - Z( I4-2*PP ) = Z( I4+1 )*( Z( I4-1 ) / Z( I4-2*PP-2 ) ) - D = Z( I4+1 )*( D / Z( I4-2*PP-2 ) ) - END IF - EMIN = MIN( EMIN, Z( I4-2*PP ) ) - 60 CONTINUE - Z( 4*N0-PP-2 ) = D -* -* Now find qmax. -* - QMAX = Z( 4*I0-PP-2 ) - DO 70 I4 = 4*I0 - PP + 2, 4*N0 - PP - 2, 4 - QMAX = MAX( QMAX, Z( I4 ) ) - 70 CONTINUE -* -* Prepare for the next iteration on K. -* - PP = 1 - PP - 80 CONTINUE -* - ITER = 2 - NFAIL = 0 - NDIV = 2*( N0-I0 ) -* - DO 140 IWHILA = 1, N + 1 - IF( N0.LT.1 ) - $ GO TO 150 -* -* While array unfinished do -* -* E(N0) holds the value of SIGMA when submatrix in I0:N0 -* splits from the rest of the array, but is negated. -* - DESIG = ZERO - IF( N0.EQ.N ) THEN - SIGMA = ZERO - ELSE - SIGMA = -Z( 4*N0-1 ) - END IF - IF( SIGMA.LT.ZERO ) THEN - INFO = 1 - RETURN - END IF -* -* Find last unreduced submatrix's top index I0, find QMAX and -* EMIN. Find Gershgorin-type bound if Q's much greater than E's. -* - EMAX = ZERO - IF( N0.GT.I0 ) THEN - EMIN = ABS( Z( 4*N0-5 ) ) - ELSE - EMIN = ZERO - END IF - QMIN = Z( 4*N0-3 ) - QMAX = QMIN - DO 90 I4 = 4*N0, 8, -4 - IF( Z( I4-5 ).LE.ZERO ) - $ GO TO 100 - IF( QMIN.GE.FOUR*EMAX ) THEN - QMIN = MIN( QMIN, Z( I4-3 ) ) - EMAX = MAX( EMAX, Z( I4-5 ) ) - END IF - QMAX = MAX( QMAX, Z( I4-7 )+Z( I4-5 ) ) - EMIN = MIN( EMIN, Z( I4-5 ) ) - 90 CONTINUE - I4 = 4 -* - 100 CONTINUE - I0 = I4 / 4 -* -* Store EMIN for passing to DLASQ3. -* - Z( 4*N0-1 ) = EMIN -* -* Put -(initial shift) into DMIN. -* - DMIN = -MAX( ZERO, QMIN-TWO*SQRT( QMIN )*SQRT( EMAX ) ) -* -* Now I0:N0 is unreduced. PP = 0 for ping, PP = 1 for pong. -* - PP = 0 -* - NBIG = 30*( N0-I0+1 ) - DO 120 IWHILB = 1, NBIG - IF( I0.GT.N0 ) - $ GO TO 130 -* -* While submatrix unfinished take a good dqds step. -* - CALL DLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL, - $ ITER, NDIV, IEEE ) -* - PP = 1 - PP -* -* When EMIN is very small check for splits. -* - IF( PP.EQ.0 .AND. N0-I0.GE.3 ) THEN - IF( Z( 4*N0 ).LE.TOL2*QMAX .OR. - $ Z( 4*N0-1 ).LE.TOL2*SIGMA ) THEN - SPLT = I0 - 1 - QMAX = Z( 4*I0-3 ) - EMIN = Z( 4*I0-1 ) - OLDEMN = Z( 4*I0 ) - DO 110 I4 = 4*I0, 4*( N0-3 ), 4 - IF( Z( I4 ).LE.TOL2*Z( I4-3 ) .OR. - $ Z( I4-1 ).LE.TOL2*SIGMA ) THEN - Z( I4-1 ) = -SIGMA - SPLT = I4 / 4 - QMAX = ZERO - EMIN = Z( I4+3 ) - OLDEMN = Z( I4+4 ) - ELSE - QMAX = MAX( QMAX, Z( I4+1 ) ) - EMIN = MIN( EMIN, Z( I4-1 ) ) - OLDEMN = MIN( OLDEMN, Z( I4 ) ) - END IF - 110 CONTINUE - Z( 4*N0-1 ) = EMIN - Z( 4*N0 ) = OLDEMN - I0 = SPLT + 1 - END IF - END IF -* - 120 CONTINUE -* - INFO = 2 - RETURN -* -* end IWHILB -* - 130 CONTINUE -* - 140 CONTINUE -* - INFO = 3 - RETURN -* -* end IWHILA -* - 150 CONTINUE -* -* Move q's to the front. -* - DO 160 K = 2, N - Z( K ) = Z( 4*K-3 ) - 160 CONTINUE -* -* Sort and compute sum of eigenvalues. -* - CALL DLASRT( 'D', N, Z, IINFO ) -* - E = ZERO - DO 170 K = N, 1, -1 - E = E + Z( K ) - 170 CONTINUE -* -* Store trace, sum(eigenvalues) and information on performance. -* - Z( 2*N+1 ) = TRACE - Z( 2*N+2 ) = E - Z( 2*N+3 ) = DBLE( ITER ) - Z( 2*N+4 ) = DBLE( NDIV ) / DBLE( N**2 ) - Z( 2*N+5 ) = HUNDRD*NFAIL / DBLE( ITER ) - RETURN -* -* End of DLASQ2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasq3.f b/cpp/nudg++/trunk/BlasLapack/dlasq3.f deleted file mode 100644 index dd78361..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasq3.f +++ /dev/null @@ -1,298 +0,0 @@ - SUBROUTINE DLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL, - $ ITER, NDIV, IEEE ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* May 17, 2000 -* -* .. Scalar Arguments .. - LOGICAL IEEE - INTEGER I0, ITER, N0, NDIV, NFAIL, PP - DOUBLE PRECISION DESIG, DMIN, QMAX, SIGMA -* .. -* .. Array Arguments .. - DOUBLE PRECISION Z( * ) -* .. -* -* Purpose -* ======= -* -* DLASQ3 checks for deflation, computes a shift (TAU) and calls dqds. -* In case of failure it changes shifts, and tries again until output -* is positive. -* -* Arguments -* ========= -* -* I0 (input) INTEGER -* First index. -* -* N0 (input) INTEGER -* Last index. -* -* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) -* Z holds the qd array. -* -* PP (input) INTEGER -* PP=0 for ping, PP=1 for pong. -* -* DMIN (output) DOUBLE PRECISION -* Minimum value of d. -* -* SIGMA (output) DOUBLE PRECISION -* Sum of shifts used in current segment. -* -* DESIG (input/output) DOUBLE PRECISION -* Lower order part of SIGMA -* -* QMAX (input) DOUBLE PRECISION -* Maximum value of q. -* -* NFAIL (output) INTEGER -* Number of times shift was too big. -* -* ITER (output) INTEGER -* Number of iterations. -* -* NDIV (output) INTEGER -* Number of divisions. -* -* TTYPE (output) INTEGER -* Shift type. -* -* IEEE (input) LOGICAL -* Flag for IEEE or non IEEE arithmetic (passed to DLASQ5). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION CBIAS - PARAMETER ( CBIAS = 1.50D0 ) - DOUBLE PRECISION ZERO, QURTR, HALF, ONE, TWO, HUNDRD - PARAMETER ( ZERO = 0.0D0, QURTR = 0.250D0, HALF = 0.5D0, - $ ONE = 1.0D0, TWO = 2.0D0, HUNDRD = 100.0D0 ) -* .. -* .. Local Scalars .. - INTEGER IPN4, J4, N0IN, NN, TTYPE - DOUBLE PRECISION DMIN1, DMIN2, DN, DN1, DN2, EPS, S, SAFMIN, T, - $ TAU, TEMP, TOL, TOL2 -* .. -* .. External Subroutines .. - EXTERNAL DLASQ4, DLASQ5, DLASQ6 -* .. -* .. External Function .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MIN, SQRT -* .. -* .. Save statement .. - SAVE TTYPE - SAVE DMIN1, DMIN2, DN, DN1, DN2, TAU -* .. -* .. Data statement .. - DATA TTYPE / 0 / - DATA DMIN1 / ZERO /, DMIN2 / ZERO /, DN / ZERO /, - $ DN1 / ZERO /, DN2 / ZERO /, TAU / ZERO / -* .. -* .. Executable Statements .. -* - N0IN = N0 - EPS = DLAMCH( 'Precision' ) - SAFMIN = DLAMCH( 'Safe minimum' ) - TOL = EPS*HUNDRD - TOL2 = TOL**2 -* -* Check for deflation. -* - 10 CONTINUE -* - IF( N0.LT.I0 ) - $ RETURN - IF( N0.EQ.I0 ) - $ GO TO 20 - NN = 4*N0 + PP - IF( N0.EQ.( I0+1 ) ) - $ GO TO 40 -* -* Check whether E(N0-1) is negligible, 1 eigenvalue. -* - IF( Z( NN-5 ).GT.TOL2*( SIGMA+Z( NN-3 ) ) .AND. - $ Z( NN-2*PP-4 ).GT.TOL2*Z( NN-7 ) ) - $ GO TO 30 -* - 20 CONTINUE -* - Z( 4*N0-3 ) = Z( 4*N0+PP-3 ) + SIGMA - N0 = N0 - 1 - GO TO 10 -* -* Check whether E(N0-2) is negligible, 2 eigenvalues. -* - 30 CONTINUE -* - IF( Z( NN-9 ).GT.TOL2*SIGMA .AND. - $ Z( NN-2*PP-8 ).GT.TOL2*Z( NN-11 ) ) - $ GO TO 50 -* - 40 CONTINUE -* - IF( Z( NN-3 ).GT.Z( NN-7 ) ) THEN - S = Z( NN-3 ) - Z( NN-3 ) = Z( NN-7 ) - Z( NN-7 ) = S - END IF - IF( Z( NN-5 ).GT.Z( NN-3 )*TOL2 ) THEN - T = HALF*( ( Z( NN-7 )-Z( NN-3 ) )+Z( NN-5 ) ) - S = Z( NN-3 )*( Z( NN-5 ) / T ) - IF( S.LE.T ) THEN - S = Z( NN-3 )*( Z( NN-5 ) / - $ ( T*( ONE+SQRT( ONE+S / T ) ) ) ) - ELSE - S = Z( NN-3 )*( Z( NN-5 ) / ( T+SQRT( T )*SQRT( T+S ) ) ) - END IF - T = Z( NN-7 ) + ( S+Z( NN-5 ) ) - Z( NN-3 ) = Z( NN-3 )*( Z( NN-7 ) / T ) - Z( NN-7 ) = T - END IF - Z( 4*N0-7 ) = Z( NN-7 ) + SIGMA - Z( 4*N0-3 ) = Z( NN-3 ) + SIGMA - N0 = N0 - 2 - GO TO 10 -* - 50 CONTINUE -* -* Reverse the qd-array, if warranted. -* - IF( DMIN.LE.ZERO .OR. N0.LT.N0IN ) THEN - IF( CBIAS*Z( 4*I0+PP-3 ).LT.Z( 4*N0+PP-3 ) ) THEN - IPN4 = 4*( I0+N0 ) - DO 60 J4 = 4*I0, 2*( I0+N0-1 ), 4 - TEMP = Z( J4-3 ) - Z( J4-3 ) = Z( IPN4-J4-3 ) - Z( IPN4-J4-3 ) = TEMP - TEMP = Z( J4-2 ) - Z( J4-2 ) = Z( IPN4-J4-2 ) - Z( IPN4-J4-2 ) = TEMP - TEMP = Z( J4-1 ) - Z( J4-1 ) = Z( IPN4-J4-5 ) - Z( IPN4-J4-5 ) = TEMP - TEMP = Z( J4 ) - Z( J4 ) = Z( IPN4-J4-4 ) - Z( IPN4-J4-4 ) = TEMP - 60 CONTINUE - IF( N0-I0.LE.4 ) THEN - Z( 4*N0+PP-1 ) = Z( 4*I0+PP-1 ) - Z( 4*N0-PP ) = Z( 4*I0-PP ) - END IF - DMIN2 = MIN( DMIN2, Z( 4*N0+PP-1 ) ) - Z( 4*N0+PP-1 ) = MIN( Z( 4*N0+PP-1 ), Z( 4*I0+PP-1 ), - $ Z( 4*I0+PP+3 ) ) - Z( 4*N0-PP ) = MIN( Z( 4*N0-PP ), Z( 4*I0-PP ), - $ Z( 4*I0-PP+4 ) ) - QMAX = MAX( QMAX, Z( 4*I0+PP-3 ), Z( 4*I0+PP+1 ) ) - DMIN = -ZERO - END IF - END IF -* - 70 CONTINUE -* - IF( DMIN.LT.ZERO .OR. SAFMIN*QMAX.LT.MIN( Z( 4*N0+PP-1 ), - $ Z( 4*N0+PP-9 ), DMIN2+Z( 4*N0-PP ) ) ) THEN -* -* Choose a shift. -* - CALL DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, DN1, - $ DN2, TAU, TTYPE ) -* -* Call dqds until DMIN > 0. -* - 80 CONTINUE -* - CALL DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN, - $ DN1, DN2, IEEE ) -* - NDIV = NDIV + ( N0-I0+2 ) - ITER = ITER + 1 -* -* Check status. -* - IF( DMIN.GE.ZERO .AND. DMIN1.GT.ZERO ) THEN -* -* Success. -* - GO TO 100 -* - ELSE IF( DMIN.LT.ZERO .AND. DMIN1.GT.ZERO .AND. - $ Z( 4*( N0-1 )-PP ).LT.TOL*( SIGMA+DN1 ) .AND. - $ ABS( DN ).LT.TOL*SIGMA ) THEN -* -* Convergence hidden by negative DN. -* - Z( 4*( N0-1 )-PP+2 ) = ZERO - DMIN = ZERO - GO TO 100 - ELSE IF( DMIN.LT.ZERO ) THEN -* -* TAU too big. Select new TAU and try again. -* - NFAIL = NFAIL + 1 - IF( TTYPE.LT.-22 ) THEN -* -* Failed twice. Play it safe. -* - TAU = ZERO - ELSE IF( DMIN1.GT.ZERO ) THEN -* -* Late failure. Gives excellent shift. -* - TAU = ( TAU+DMIN )*( ONE-TWO*EPS ) - TTYPE = TTYPE - 11 - ELSE -* -* Early failure. Divide by 4. -* - TAU = QURTR*TAU - TTYPE = TTYPE - 12 - END IF - GO TO 80 - ELSE IF( DMIN.NE.DMIN ) THEN -* -* NaN. -* - TAU = ZERO - GO TO 80 - ELSE -* -* Possible underflow. Play it safe. -* - GO TO 90 - END IF - END IF -* -* Risk of underflow. -* - 90 CONTINUE - CALL DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN, DN1, DN2 ) - NDIV = NDIV + ( N0-I0+2 ) - ITER = ITER + 1 - TAU = ZERO -* - 100 CONTINUE - IF( TAU.LT.SIGMA ) THEN - DESIG = DESIG + TAU - T = SIGMA + DESIG - DESIG = DESIG - ( T-SIGMA ) - ELSE - T = SIGMA + TAU - DESIG = SIGMA - ( T-TAU ) + DESIG - END IF - SIGMA = T -* - RETURN -* -* End of DLASQ3 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasq4.f b/cpp/nudg++/trunk/BlasLapack/dlasq4.f deleted file mode 100644 index 5702b8a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasq4.f +++ /dev/null @@ -1,330 +0,0 @@ - SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, - $ DN1, DN2, TAU, TTYPE ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1999 -* -* .. Scalar Arguments .. - INTEGER I0, N0, N0IN, PP, TTYPE - DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DN1, DN2, TAU -* .. -* .. Array Arguments .. - DOUBLE PRECISION Z( * ) -* .. -* -* Purpose -* ======= -* -* DLASQ4 computes an approximation TAU to the smallest eigenvalue -* using values of d from the previous transform. -* -* I0 (input) INTEGER -* First index. -* -* N0 (input) INTEGER -* Last index. -* -* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) -* Z holds the qd array. -* -* PP (input) INTEGER -* PP=0 for ping, PP=1 for pong. -* -* NOIN (input) INTEGER -* The value of N0 at start of EIGTEST. -* -* DMIN (input) DOUBLE PRECISION -* Minimum value of d. -* -* DMIN1 (input) DOUBLE PRECISION -* Minimum value of d, excluding D( N0 ). -* -* DMIN2 (input) DOUBLE PRECISION -* Minimum value of d, excluding D( N0 ) and D( N0-1 ). -* -* DN (input) DOUBLE PRECISION -* d(N) -* -* DN1 (input) DOUBLE PRECISION -* d(N-1) -* -* DN2 (input) DOUBLE PRECISION -* d(N-2) -* -* TAU (output) DOUBLE PRECISION -* This is the shift. -* -* TTYPE (output) INTEGER -* Shift type. -* -* Further Details -* =============== -* CNST1 = 9/16 -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION CNST1, CNST2, CNST3 - PARAMETER ( CNST1 = 0.5630D0, CNST2 = 1.010D0, - $ CNST3 = 1.050D0 ) - DOUBLE PRECISION QURTR, THIRD, HALF, ZERO, ONE, TWO, HUNDRD - PARAMETER ( QURTR = 0.250D0, THIRD = 0.3330D0, - $ HALF = 0.50D0, ZERO = 0.0D0, ONE = 1.0D0, - $ TWO = 2.0D0, HUNDRD = 100.0D0 ) -* .. -* .. Local Scalars .. - INTEGER I4, NN, NP - DOUBLE PRECISION A2, B1, B2, G, GAM, GAP1, GAP2, S -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN, SQRT -* .. -* .. Save statement .. - SAVE G -* .. -* .. Data statement .. - DATA G / ZERO / -* .. -* .. Executable Statements .. -* -* A negative DMIN forces the shift to take that absolute value -* TTYPE records the type of shift. -* - IF( DMIN.LE.ZERO ) THEN - TAU = -DMIN - TTYPE = -1 - RETURN - END IF -* - NN = 4*N0 + PP - IF( N0IN.EQ.N0 ) THEN -* -* No eigenvalues deflated. -* - IF( DMIN.EQ.DN .OR. DMIN.EQ.DN1 ) THEN -* - B1 = SQRT( Z( NN-3 ) )*SQRT( Z( NN-5 ) ) - B2 = SQRT( Z( NN-7 ) )*SQRT( Z( NN-9 ) ) - A2 = Z( NN-7 ) + Z( NN-5 ) -* -* Cases 2 and 3. -* - IF( DMIN.EQ.DN .AND. DMIN1.EQ.DN1 ) THEN - GAP2 = DMIN2 - A2 - DMIN2*QURTR - IF( GAP2.GT.ZERO .AND. GAP2.GT.B2 ) THEN - GAP1 = A2 - DN - ( B2 / GAP2 )*B2 - ELSE - GAP1 = A2 - DN - ( B1+B2 ) - END IF - IF( GAP1.GT.ZERO .AND. GAP1.GT.B1 ) THEN - S = MAX( DN-( B1 / GAP1 )*B1, HALF*DMIN ) - TTYPE = -2 - ELSE - S = ZERO - IF( DN.GT.B1 ) - $ S = DN - B1 - IF( A2.GT.( B1+B2 ) ) - $ S = MIN( S, A2-( B1+B2 ) ) - S = MAX( S, THIRD*DMIN ) - TTYPE = -3 - END IF - ELSE -* -* Case 4. -* - TTYPE = -4 - S = QURTR*DMIN - IF( DMIN.EQ.DN ) THEN - GAM = DN - A2 = ZERO - IF( Z( NN-5 ) .GT. Z( NN-7 ) ) - $ RETURN - B2 = Z( NN-5 ) / Z( NN-7 ) - NP = NN - 9 - ELSE - NP = NN - 2*PP - B2 = Z( NP-2 ) - GAM = DN1 - IF( Z( NP-4 ) .GT. Z( NP-2 ) ) - $ RETURN - A2 = Z( NP-4 ) / Z( NP-2 ) - IF( Z( NN-9 ) .GT. Z( NN-11 ) ) - $ RETURN - B2 = Z( NN-9 ) / Z( NN-11 ) - NP = NN - 13 - END IF -* -* Approximate contribution to norm squared from I < NN-1. -* - A2 = A2 + B2 - DO 10 I4 = NP, 4*I0 - 1 + PP, -4 - IF( B2.EQ.ZERO ) - $ GO TO 20 - B1 = B2 - IF( Z( I4 ) .GT. Z( I4-2 ) ) - $ RETURN - B2 = B2*( Z( I4 ) / Z( I4-2 ) ) - A2 = A2 + B2 - IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) - $ GO TO 20 - 10 CONTINUE - 20 CONTINUE - A2 = CNST3*A2 -* -* Rayleigh quotient residual bound. -* - IF( A2.LT.CNST1 ) - $ S = GAM*( ONE-SQRT( A2 ) ) / ( ONE+A2 ) - END IF - ELSE IF( DMIN.EQ.DN2 ) THEN -* -* Case 5. -* - TTYPE = -5 - S = QURTR*DMIN -* -* Compute contribution to norm squared from I > NN-2. -* - NP = NN - 2*PP - B1 = Z( NP-2 ) - B2 = Z( NP-6 ) - GAM = DN2 - IF( Z( NP-8 ).GT.B2 .OR. Z( NP-4 ).GT.B1 ) - $ RETURN - A2 = ( Z( NP-8 ) / B2 )*( ONE+Z( NP-4 ) / B1 ) -* -* Approximate contribution to norm squared from I < NN-2. -* - IF( N0-I0.GT.2 ) THEN - B2 = Z( NN-13 ) / Z( NN-15 ) - A2 = A2 + B2 - DO 30 I4 = NN - 17, 4*I0 - 1 + PP, -4 - IF( B2.EQ.ZERO ) - $ GO TO 40 - B1 = B2 - IF( Z( I4 ) .GT. Z( I4-2 ) ) - $ RETURN - B2 = B2*( Z( I4 ) / Z( I4-2 ) ) - A2 = A2 + B2 - IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) - $ GO TO 40 - 30 CONTINUE - 40 CONTINUE - A2 = CNST3*A2 - END IF -* - IF( A2.LT.CNST1 ) - $ S = GAM*( ONE-SQRT( A2 ) ) / ( ONE+A2 ) - ELSE -* -* Case 6, no information to guide us. -* - IF( TTYPE.EQ.-6 ) THEN - G = G + THIRD*( ONE-G ) - ELSE IF( TTYPE.EQ.-18 ) THEN - G = QURTR*THIRD - ELSE - G = QURTR - END IF - S = G*DMIN - TTYPE = -6 - END IF -* - ELSE IF( N0IN.EQ.( N0+1 ) ) THEN -* -* One eigenvalue just deflated. Use DMIN1, DN1 for DMIN and DN. -* - IF( DMIN1.EQ.DN1 .AND. DMIN2.EQ.DN2 ) THEN -* -* Cases 7 and 8. -* - TTYPE = -7 - S = THIRD*DMIN1 - IF( Z( NN-5 ).GT.Z( NN-7 ) ) - $ RETURN - B1 = Z( NN-5 ) / Z( NN-7 ) - B2 = B1 - IF( B2.EQ.ZERO ) - $ GO TO 60 - DO 50 I4 = 4*N0 - 9 + PP, 4*I0 - 1 + PP, -4 - A2 = B1 - IF( Z( I4 ).GT.Z( I4-2 ) ) - $ RETURN - B1 = B1*( Z( I4 ) / Z( I4-2 ) ) - B2 = B2 + B1 - IF( HUNDRD*MAX( B1, A2 ).LT.B2 ) - $ GO TO 60 - 50 CONTINUE - 60 CONTINUE - B2 = SQRT( CNST3*B2 ) - A2 = DMIN1 / ( ONE+B2**2 ) - GAP2 = HALF*DMIN2 - A2 - IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN - S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) ) - ELSE - S = MAX( S, A2*( ONE-CNST2*B2 ) ) - TTYPE = -8 - END IF - ELSE -* -* Case 9. -* - S = QURTR*DMIN1 - IF( DMIN1.EQ.DN1 ) - $ S = HALF*DMIN1 - TTYPE = -9 - END IF -* - ELSE IF( N0IN.EQ.( N0+2 ) ) THEN -* -* Two eigenvalues deflated. Use DMIN2, DN2 for DMIN and DN. -* -* Cases 10 and 11. -* - IF( DMIN2.EQ.DN2 .AND. TWO*Z( NN-5 ).LT.Z( NN-7 ) ) THEN - TTYPE = -10 - S = THIRD*DMIN2 - IF( Z( NN-5 ).GT.Z( NN-7 ) ) - $ RETURN - B1 = Z( NN-5 ) / Z( NN-7 ) - B2 = B1 - IF( B2.EQ.ZERO ) - $ GO TO 80 - DO 70 I4 = 4*N0 - 9 + PP, 4*I0 - 1 + PP, -4 - IF( Z( I4 ).GT.Z( I4-2 ) ) - $ RETURN - B1 = B1*( Z( I4 ) / Z( I4-2 ) ) - B2 = B2 + B1 - IF( HUNDRD*B1.LT.B2 ) - $ GO TO 80 - 70 CONTINUE - 80 CONTINUE - B2 = SQRT( CNST3*B2 ) - A2 = DMIN2 / ( ONE+B2**2 ) - GAP2 = Z( NN-7 ) + Z( NN-9 ) - - $ SQRT( Z( NN-11 ) )*SQRT( Z( NN-9 ) ) - A2 - IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN - S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) ) - ELSE - S = MAX( S, A2*( ONE-CNST2*B2 ) ) - END IF - ELSE - S = QURTR*DMIN2 - TTYPE = -11 - END IF - ELSE IF( N0IN.GT.( N0+2 ) ) THEN -* -* Case 12, more than two eigenvalues deflated. No information. -* - S = ZERO - TTYPE = -12 - END IF -* - TAU = S - RETURN -* -* End of DLASQ4 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasq5.f b/cpp/nudg++/trunk/BlasLapack/dlasq5.f deleted file mode 100644 index 068b897..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasq5.f +++ /dev/null @@ -1,196 +0,0 @@ - SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN, - $ DNM1, DNM2, IEEE ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* May 17, 2000 -* -* .. Scalar Arguments .. - LOGICAL IEEE - INTEGER I0, N0, PP - DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2, TAU -* .. -* .. Array Arguments .. - DOUBLE PRECISION Z( * ) -* .. -* -* Purpose -* ======= -* -* DLASQ5 computes one dqds transform in ping-pong form, one -* version for IEEE machines another for non IEEE machines. -* -* Arguments -* ========= -* -* I0 (input) INTEGER -* First index. -* -* N0 (input) INTEGER -* Last index. -* -* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) -* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid -* an extra argument. -* -* PP (input) INTEGER -* PP=0 for ping, PP=1 for pong. -* -* TAU (input) DOUBLE PRECISION -* This is the shift. -* -* DMIN (output) DOUBLE PRECISION -* Minimum value of d. -* -* DMIN1 (output) DOUBLE PRECISION -* Minimum value of d, excluding D( N0 ). -* -* DMIN2 (output) DOUBLE PRECISION -* Minimum value of d, excluding D( N0 ) and D( N0-1 ). -* -* DN (output) DOUBLE PRECISION -* d(N0), the last value of d. -* -* DNM1 (output) DOUBLE PRECISION -* d(N0-1). -* -* DNM2 (output) DOUBLE PRECISION -* d(N0-2). -* -* IEEE (input) LOGICAL -* Flag for IEEE or non IEEE arithmetic. -* -* ===================================================================== -* -* .. Parameter .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) -* .. -* .. Local Scalars .. - INTEGER J4, J4P2 - DOUBLE PRECISION D, EMIN, TEMP -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* - IF( ( N0-I0-1 ).LE.0 ) - $ RETURN -* - J4 = 4*I0 + PP - 3 - EMIN = Z( J4+4 ) - D = Z( J4 ) - TAU - DMIN = D - DMIN1 = -Z( J4 ) -* - IF( IEEE ) THEN -* -* Code for IEEE arithmetic. -* - IF( PP.EQ.0 ) THEN - DO 10 J4 = 4*I0, 4*( N0-3 ), 4 - Z( J4-2 ) = D + Z( J4-1 ) - TEMP = Z( J4+1 ) / Z( J4-2 ) - D = D*TEMP - TAU - DMIN = MIN( DMIN, D ) - Z( J4 ) = Z( J4-1 )*TEMP - EMIN = MIN( Z( J4 ), EMIN ) - 10 CONTINUE - ELSE - DO 20 J4 = 4*I0, 4*( N0-3 ), 4 - Z( J4-3 ) = D + Z( J4 ) - TEMP = Z( J4+2 ) / Z( J4-3 ) - D = D*TEMP - TAU - DMIN = MIN( DMIN, D ) - Z( J4-1 ) = Z( J4 )*TEMP - EMIN = MIN( Z( J4-1 ), EMIN ) - 20 CONTINUE - END IF -* -* Unroll last two steps. -* - DNM2 = D - DMIN2 = DMIN - J4 = 4*( N0-2 ) - PP - J4P2 = J4 + 2*PP - 1 - Z( J4-2 ) = DNM2 + Z( J4P2 ) - Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) - DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) - TAU - DMIN = MIN( DMIN, DNM1 ) -* - DMIN1 = DMIN - J4 = J4 + 4 - J4P2 = J4 + 2*PP - 1 - Z( J4-2 ) = DNM1 + Z( J4P2 ) - Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) - DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) - TAU - DMIN = MIN( DMIN, DN ) -* - ELSE -* -* Code for non IEEE arithmetic. -* - IF( PP.EQ.0 ) THEN - DO 30 J4 = 4*I0, 4*( N0-3 ), 4 - Z( J4-2 ) = D + Z( J4-1 ) - IF( D.LT.ZERO ) THEN - RETURN - ELSE - Z( J4 ) = Z( J4+1 )*( Z( J4-1 ) / Z( J4-2 ) ) - D = Z( J4+1 )*( D / Z( J4-2 ) ) - TAU - END IF - DMIN = MIN( DMIN, D ) - EMIN = MIN( EMIN, Z( J4 ) ) - 30 CONTINUE - ELSE - DO 40 J4 = 4*I0, 4*( N0-3 ), 4 - Z( J4-3 ) = D + Z( J4 ) - IF( D.LT.ZERO ) THEN - RETURN - ELSE - Z( J4-1 ) = Z( J4+2 )*( Z( J4 ) / Z( J4-3 ) ) - D = Z( J4+2 )*( D / Z( J4-3 ) ) - TAU - END IF - DMIN = MIN( DMIN, D ) - EMIN = MIN( EMIN, Z( J4-1 ) ) - 40 CONTINUE - END IF -* -* Unroll last two steps. -* - DNM2 = D - DMIN2 = DMIN - J4 = 4*( N0-2 ) - PP - J4P2 = J4 + 2*PP - 1 - Z( J4-2 ) = DNM2 + Z( J4P2 ) - IF( DNM2.LT.ZERO ) THEN - RETURN - ELSE - Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) - DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) - TAU - END IF - DMIN = MIN( DMIN, DNM1 ) -* - DMIN1 = DMIN - J4 = J4 + 4 - J4P2 = J4 + 2*PP - 1 - Z( J4-2 ) = DNM1 + Z( J4P2 ) - IF( DNM1.LT.ZERO ) THEN - RETURN - ELSE - Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) - DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) - TAU - END IF - DMIN = MIN( DMIN, DN ) -* - END IF -* - Z( J4+2 ) = DN - Z( 4*N0-PP ) = EMIN - RETURN -* -* End of DLASQ5 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasq6.f b/cpp/nudg++/trunk/BlasLapack/dlasq6.f deleted file mode 100644 index 480157c..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasq6.f +++ /dev/null @@ -1,176 +0,0 @@ - SUBROUTINE DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN, - $ DNM1, DNM2 ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1999 -* -* .. Scalar Arguments .. - INTEGER I0, N0, PP - DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2 -* .. -* .. Array Arguments .. - DOUBLE PRECISION Z( * ) -* .. -* -* Purpose -* ======= -* -* DLASQ6 computes one dqd (shift equal to zero) transform in -* ping-pong form, with protection against underflow and overflow. -* -* Arguments -* ========= -* -* I0 (input) INTEGER -* First index. -* -* N0 (input) INTEGER -* Last index. -* -* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) -* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid -* an extra argument. -* -* PP (input) INTEGER -* PP=0 for ping, PP=1 for pong. -* -* DMIN (output) DOUBLE PRECISION -* Minimum value of d. -* -* DMIN1 (output) DOUBLE PRECISION -* Minimum value of d, excluding D( N0 ). -* -* DMIN2 (output) DOUBLE PRECISION -* Minimum value of d, excluding D( N0 ) and D( N0-1 ). -* -* DN (output) DOUBLE PRECISION -* d(N0), the last value of d. -* -* DNM1 (output) DOUBLE PRECISION -* d(N0-1). -* -* DNM2 (output) DOUBLE PRECISION -* d(N0-2). -* -* ===================================================================== -* -* .. Parameter .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) -* .. -* .. Local Scalars .. - INTEGER J4, J4P2 - DOUBLE PRECISION D, EMIN, SAFMIN, TEMP -* .. -* .. External Function .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* - IF( ( N0-I0-1 ).LE.0 ) - $ RETURN -* - SAFMIN = DLAMCH( 'Safe minimum' ) - J4 = 4*I0 + PP - 3 - EMIN = Z( J4+4 ) - D = Z( J4 ) - DMIN = D -* - IF( PP.EQ.0 ) THEN - DO 10 J4 = 4*I0, 4*( N0-3 ), 4 - Z( J4-2 ) = D + Z( J4-1 ) - IF( Z( J4-2 ).EQ.ZERO ) THEN - Z( J4 ) = ZERO - D = Z( J4+1 ) - DMIN = D - EMIN = ZERO - ELSE IF( SAFMIN*Z( J4+1 ).LT.Z( J4-2 ) .AND. - $ SAFMIN*Z( J4-2 ).LT.Z( J4+1 ) ) THEN - TEMP = Z( J4+1 ) / Z( J4-2 ) - Z( J4 ) = Z( J4-1 )*TEMP - D = D*TEMP - ELSE - Z( J4 ) = Z( J4+1 )*( Z( J4-1 ) / Z( J4-2 ) ) - D = Z( J4+1 )*( D / Z( J4-2 ) ) - END IF - DMIN = MIN( DMIN, D ) - EMIN = MIN( EMIN, Z( J4 ) ) - 10 CONTINUE - ELSE - DO 20 J4 = 4*I0, 4*( N0-3 ), 4 - Z( J4-3 ) = D + Z( J4 ) - IF( Z( J4-3 ).EQ.ZERO ) THEN - Z( J4-1 ) = ZERO - D = Z( J4+2 ) - DMIN = D - EMIN = ZERO - ELSE IF( SAFMIN*Z( J4+2 ).LT.Z( J4-3 ) .AND. - $ SAFMIN*Z( J4-3 ).LT.Z( J4+2 ) ) THEN - TEMP = Z( J4+2 ) / Z( J4-3 ) - Z( J4-1 ) = Z( J4 )*TEMP - D = D*TEMP - ELSE - Z( J4-1 ) = Z( J4+2 )*( Z( J4 ) / Z( J4-3 ) ) - D = Z( J4+2 )*( D / Z( J4-3 ) ) - END IF - DMIN = MIN( DMIN, D ) - EMIN = MIN( EMIN, Z( J4-1 ) ) - 20 CONTINUE - END IF -* -* Unroll last two steps. -* - DNM2 = D - DMIN2 = DMIN - J4 = 4*( N0-2 ) - PP - J4P2 = J4 + 2*PP - 1 - Z( J4-2 ) = DNM2 + Z( J4P2 ) - IF( Z( J4-2 ).EQ.ZERO ) THEN - Z( J4 ) = ZERO - DNM1 = Z( J4P2+2 ) - DMIN = DNM1 - EMIN = ZERO - ELSE IF( SAFMIN*Z( J4P2+2 ).LT.Z( J4-2 ) .AND. - $ SAFMIN*Z( J4-2 ).LT.Z( J4P2+2 ) ) THEN - TEMP = Z( J4P2+2 ) / Z( J4-2 ) - Z( J4 ) = Z( J4P2 )*TEMP - DNM1 = DNM2*TEMP - ELSE - Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) - DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) - END IF - DMIN = MIN( DMIN, DNM1 ) -* - DMIN1 = DMIN - J4 = J4 + 4 - J4P2 = J4 + 2*PP - 1 - Z( J4-2 ) = DNM1 + Z( J4P2 ) - IF( Z( J4-2 ).EQ.ZERO ) THEN - Z( J4 ) = ZERO - DN = Z( J4P2+2 ) - DMIN = DN - EMIN = ZERO - ELSE IF( SAFMIN*Z( J4P2+2 ).LT.Z( J4-2 ) .AND. - $ SAFMIN*Z( J4-2 ).LT.Z( J4P2+2 ) ) THEN - TEMP = Z( J4P2+2 ) / Z( J4-2 ) - Z( J4 ) = Z( J4P2 )*TEMP - DN = DNM1*TEMP - ELSE - Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) - DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) - END IF - DMIN = MIN( DMIN, DN ) -* - Z( J4+2 ) = DN - Z( 4*N0-PP ) = EMIN - RETURN -* -* End of DLASQ6 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasr.f b/cpp/nudg++/trunk/BlasLapack/dlasr.f deleted file mode 100644 index 4b2cab7..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasr.f +++ /dev/null @@ -1,325 +0,0 @@ - SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER DIRECT, PIVOT, SIDE - INTEGER LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), C( * ), S( * ) -* .. -* -* Purpose -* ======= -* -* DLASR performs the transformation -* -* A := P*A, when SIDE = 'L' or 'l' ( Left-hand side ) -* -* A := A*P', when SIDE = 'R' or 'r' ( Right-hand side ) -* -* where A is an m by n real matrix and P is an orthogonal matrix, -* consisting of a sequence of plane rotations determined by the -* parameters PIVOT and DIRECT as follows ( z = m when SIDE = 'L' or 'l' -* and z = n when SIDE = 'R' or 'r' ): -* -* When DIRECT = 'F' or 'f' ( Forward sequence ) then -* -* P = P( z - 1 )*...*P( 2 )*P( 1 ), -* -* and when DIRECT = 'B' or 'b' ( Backward sequence ) then -* -* P = P( 1 )*P( 2 )*...*P( z - 1 ), -* -* where P( k ) is a plane rotation matrix for the following planes: -* -* when PIVOT = 'V' or 'v' ( Variable pivot ), -* the plane ( k, k + 1 ) -* -* when PIVOT = 'T' or 't' ( Top pivot ), -* the plane ( 1, k + 1 ) -* -* when PIVOT = 'B' or 'b' ( Bottom pivot ), -* the plane ( k, z ) -* -* c( k ) and s( k ) must contain the cosine and sine that define the -* matrix P( k ). The two by two plane rotation part of the matrix -* P( k ), R( k ), is assumed to be of the form -* -* R( k ) = ( c( k ) s( k ) ). -* ( -s( k ) c( k ) ) -* -* This version vectorises across rows of the array A when SIDE = 'L'. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* Specifies whether the plane rotation matrix P is applied to -* A on the left or the right. -* = 'L': Left, compute A := P*A -* = 'R': Right, compute A:= A*P' -* -* DIRECT (input) CHARACTER*1 -* Specifies whether P is a forward or backward sequence of -* plane rotations. -* = 'F': Forward, P = P( z - 1 )*...*P( 2 )*P( 1 ) -* = 'B': Backward, P = P( 1 )*P( 2 )*...*P( z - 1 ) -* -* PIVOT (input) CHARACTER*1 -* Specifies the plane for which P(k) is a plane rotation -* matrix. -* = 'V': Variable pivot, the plane (k,k+1) -* = 'T': Top pivot, the plane (1,k+1) -* = 'B': Bottom pivot, the plane (k,z) -* -* M (input) INTEGER -* The number of rows of the matrix A. If m <= 1, an immediate -* return is effected. -* -* N (input) INTEGER -* The number of columns of the matrix A. If n <= 1, an -* immediate return is effected. -* -* C, S (input) DOUBLE PRECISION arrays, dimension -* (M-1) if SIDE = 'L' -* (N-1) if SIDE = 'R' -* c(k) and s(k) contain the cosine and sine that define the -* matrix P(k). The two by two plane rotation part of the -* matrix P(k), R(k), is assumed to be of the form -* R( k ) = ( c( k ) s( k ) ). -* ( -s( k ) c( k ) ) -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* The m by n matrix A. On exit, A is overwritten by P*A if -* SIDE = 'R' or by A*P' if SIDE = 'L'. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, INFO, J - DOUBLE PRECISION CTEMP, STEMP, TEMP -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - IF( .NOT.( LSAME( SIDE, 'L' ) .OR. LSAME( SIDE, 'R' ) ) ) THEN - INFO = 1 - ELSE IF( .NOT.( LSAME( PIVOT, 'V' ) .OR. LSAME( PIVOT, - $ 'T' ) .OR. LSAME( PIVOT, 'B' ) ) ) THEN - INFO = 2 - ELSE IF( .NOT.( LSAME( DIRECT, 'F' ) .OR. LSAME( DIRECT, 'B' ) ) ) - $ THEN - INFO = 3 - ELSE IF( M.LT.0 ) THEN - INFO = 4 - ELSE IF( N.LT.0 ) THEN - INFO = 5 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = 9 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DLASR ', INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) ) - $ RETURN - IF( LSAME( SIDE, 'L' ) ) THEN -* -* Form P * A -* - IF( LSAME( PIVOT, 'V' ) ) THEN - IF( LSAME( DIRECT, 'F' ) ) THEN - DO 20 J = 1, M - 1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 10 I = 1, N - TEMP = A( J+1, I ) - A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I ) - A( J, I ) = STEMP*TEMP + CTEMP*A( J, I ) - 10 CONTINUE - END IF - 20 CONTINUE - ELSE IF( LSAME( DIRECT, 'B' ) ) THEN - DO 40 J = M - 1, 1, -1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 30 I = 1, N - TEMP = A( J+1, I ) - A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I ) - A( J, I ) = STEMP*TEMP + CTEMP*A( J, I ) - 30 CONTINUE - END IF - 40 CONTINUE - END IF - ELSE IF( LSAME( PIVOT, 'T' ) ) THEN - IF( LSAME( DIRECT, 'F' ) ) THEN - DO 60 J = 2, M - CTEMP = C( J-1 ) - STEMP = S( J-1 ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 50 I = 1, N - TEMP = A( J, I ) - A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I ) - A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I ) - 50 CONTINUE - END IF - 60 CONTINUE - ELSE IF( LSAME( DIRECT, 'B' ) ) THEN - DO 80 J = M, 2, -1 - CTEMP = C( J-1 ) - STEMP = S( J-1 ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 70 I = 1, N - TEMP = A( J, I ) - A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I ) - A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I ) - 70 CONTINUE - END IF - 80 CONTINUE - END IF - ELSE IF( LSAME( PIVOT, 'B' ) ) THEN - IF( LSAME( DIRECT, 'F' ) ) THEN - DO 100 J = 1, M - 1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 90 I = 1, N - TEMP = A( J, I ) - A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP - A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP - 90 CONTINUE - END IF - 100 CONTINUE - ELSE IF( LSAME( DIRECT, 'B' ) ) THEN - DO 120 J = M - 1, 1, -1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 110 I = 1, N - TEMP = A( J, I ) - A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP - A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP - 110 CONTINUE - END IF - 120 CONTINUE - END IF - END IF - ELSE IF( LSAME( SIDE, 'R' ) ) THEN -* -* Form A * P' -* - IF( LSAME( PIVOT, 'V' ) ) THEN - IF( LSAME( DIRECT, 'F' ) ) THEN - DO 140 J = 1, N - 1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 130 I = 1, M - TEMP = A( I, J+1 ) - A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J ) - A( I, J ) = STEMP*TEMP + CTEMP*A( I, J ) - 130 CONTINUE - END IF - 140 CONTINUE - ELSE IF( LSAME( DIRECT, 'B' ) ) THEN - DO 160 J = N - 1, 1, -1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 150 I = 1, M - TEMP = A( I, J+1 ) - A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J ) - A( I, J ) = STEMP*TEMP + CTEMP*A( I, J ) - 150 CONTINUE - END IF - 160 CONTINUE - END IF - ELSE IF( LSAME( PIVOT, 'T' ) ) THEN - IF( LSAME( DIRECT, 'F' ) ) THEN - DO 180 J = 2, N - CTEMP = C( J-1 ) - STEMP = S( J-1 ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 170 I = 1, M - TEMP = A( I, J ) - A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 ) - A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 ) - 170 CONTINUE - END IF - 180 CONTINUE - ELSE IF( LSAME( DIRECT, 'B' ) ) THEN - DO 200 J = N, 2, -1 - CTEMP = C( J-1 ) - STEMP = S( J-1 ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 190 I = 1, M - TEMP = A( I, J ) - A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 ) - A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 ) - 190 CONTINUE - END IF - 200 CONTINUE - END IF - ELSE IF( LSAME( PIVOT, 'B' ) ) THEN - IF( LSAME( DIRECT, 'F' ) ) THEN - DO 220 J = 1, N - 1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 210 I = 1, M - TEMP = A( I, J ) - A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP - A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP - 210 CONTINUE - END IF - 220 CONTINUE - ELSE IF( LSAME( DIRECT, 'B' ) ) THEN - DO 240 J = N - 1, 1, -1 - CTEMP = C( J ) - STEMP = S( J ) - IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN - DO 230 I = 1, M - TEMP = A( I, J ) - A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP - A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP - 230 CONTINUE - END IF - 240 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of DLASR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasrt.f b/cpp/nudg++/trunk/BlasLapack/dlasrt.f deleted file mode 100644 index e776034..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasrt.f +++ /dev/null @@ -1,244 +0,0 @@ - SUBROUTINE DLASRT( ID, N, D, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - CHARACTER ID - INTEGER INFO, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION D( * ) -* .. -* -* Purpose -* ======= -* -* Sort the numbers in D in increasing order (if ID = 'I') or -* in decreasing order (if ID = 'D' ). -* -* Use Quick Sort, reverting to Insertion sort on arrays of -* size <= 20. Dimension of STACK limits N to about 2**32. -* -* Arguments -* ========= -* -* ID (input) CHARACTER*1 -* = 'I': sort D in increasing order; -* = 'D': sort D in decreasing order. -* -* N (input) INTEGER -* The length of the array D. -* -* D (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the array to be sorted. -* On exit, D has been sorted into increasing order -* (D(1) <= ... <= D(N) ) or into decreasing order -* (D(1) >= ... >= D(N) ), depending on ID. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - INTEGER SELECT - PARAMETER ( SELECT = 20 ) -* .. -* .. Local Scalars .. - INTEGER DIR, ENDD, I, J, START, STKPNT - DOUBLE PRECISION D1, D2, D3, DMNMX, TMP -* .. -* .. Local Arrays .. - INTEGER STACK( 2, 32 ) -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL XERBLA -* .. -* .. Executable Statements .. -* -* Test the input paramters. -* - INFO = 0 - DIR = -1 - IF( LSAME( ID, 'D' ) ) THEN - DIR = 0 - ELSE IF( LSAME( ID, 'I' ) ) THEN - DIR = 1 - END IF - IF( DIR.EQ.-1 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DLASRT', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.LE.1 ) - $ RETURN -* - STKPNT = 1 - STACK( 1, 1 ) = 1 - STACK( 2, 1 ) = N - 10 CONTINUE - START = STACK( 1, STKPNT ) - ENDD = STACK( 2, STKPNT ) - STKPNT = STKPNT - 1 - IF( ENDD-START.LE.SELECT .AND. ENDD-START.GT.0 ) THEN -* -* Do Insertion sort on D( START:ENDD ) -* - IF( DIR.EQ.0 ) THEN -* -* Sort into decreasing order -* - DO 30 I = START + 1, ENDD - DO 20 J = I, START + 1, -1 - IF( D( J ).GT.D( J-1 ) ) THEN - DMNMX = D( J ) - D( J ) = D( J-1 ) - D( J-1 ) = DMNMX - ELSE - GO TO 30 - END IF - 20 CONTINUE - 30 CONTINUE -* - ELSE -* -* Sort into increasing order -* - DO 50 I = START + 1, ENDD - DO 40 J = I, START + 1, -1 - IF( D( J ).LT.D( J-1 ) ) THEN - DMNMX = D( J ) - D( J ) = D( J-1 ) - D( J-1 ) = DMNMX - ELSE - GO TO 50 - END IF - 40 CONTINUE - 50 CONTINUE -* - END IF -* - ELSE IF( ENDD-START.GT.SELECT ) THEN -* -* Partition D( START:ENDD ) and stack parts, largest one first -* -* Choose partition entry as median of 3 -* - D1 = D( START ) - D2 = D( ENDD ) - I = ( START+ENDD ) / 2 - D3 = D( I ) - IF( D1.LT.D2 ) THEN - IF( D3.LT.D1 ) THEN - DMNMX = D1 - ELSE IF( D3.LT.D2 ) THEN - DMNMX = D3 - ELSE - DMNMX = D2 - END IF - ELSE - IF( D3.LT.D2 ) THEN - DMNMX = D2 - ELSE IF( D3.LT.D1 ) THEN - DMNMX = D3 - ELSE - DMNMX = D1 - END IF - END IF -* - IF( DIR.EQ.0 ) THEN -* -* Sort into decreasing order -* - I = START - 1 - J = ENDD + 1 - 60 CONTINUE - 70 CONTINUE - J = J - 1 - IF( D( J ).LT.DMNMX ) - $ GO TO 70 - 80 CONTINUE - I = I + 1 - IF( D( I ).GT.DMNMX ) - $ GO TO 80 - IF( I.LT.J ) THEN - TMP = D( I ) - D( I ) = D( J ) - D( J ) = TMP - GO TO 60 - END IF - IF( J-START.GT.ENDD-J-1 ) THEN - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = START - STACK( 2, STKPNT ) = J - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = J + 1 - STACK( 2, STKPNT ) = ENDD - ELSE - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = J + 1 - STACK( 2, STKPNT ) = ENDD - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = START - STACK( 2, STKPNT ) = J - END IF - ELSE -* -* Sort into increasing order -* - I = START - 1 - J = ENDD + 1 - 90 CONTINUE - 100 CONTINUE - J = J - 1 - IF( D( J ).GT.DMNMX ) - $ GO TO 100 - 110 CONTINUE - I = I + 1 - IF( D( I ).LT.DMNMX ) - $ GO TO 110 - IF( I.LT.J ) THEN - TMP = D( I ) - D( I ) = D( J ) - D( J ) = TMP - GO TO 90 - END IF - IF( J-START.GT.ENDD-J-1 ) THEN - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = START - STACK( 2, STKPNT ) = J - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = J + 1 - STACK( 2, STKPNT ) = ENDD - ELSE - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = J + 1 - STACK( 2, STKPNT ) = ENDD - STKPNT = STKPNT + 1 - STACK( 1, STKPNT ) = START - STACK( 2, STKPNT ) = J - END IF - END IF - END IF - IF( STKPNT.GT.0 ) - $ GO TO 10 - RETURN -* -* End of DLASRT -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlassq.f b/cpp/nudg++/trunk/BlasLapack/dlassq.f deleted file mode 100644 index b378c06..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlassq.f +++ /dev/null @@ -1,89 +0,0 @@ - SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INCX, N - DOUBLE PRECISION SCALE, SUMSQ -* .. -* .. Array Arguments .. - DOUBLE PRECISION X( * ) -* .. -* -* Purpose -* ======= -* -* DLASSQ returns the values scl and smsq such that -* -* ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq, -* -* where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is -* assumed to be non-negative and scl returns the value -* -* scl = max( scale, abs( x( i ) ) ). -* -* scale and sumsq must be supplied in SCALE and SUMSQ and -* scl and smsq are overwritten on SCALE and SUMSQ respectively. -* -* The routine makes only one pass through the vector x. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of elements to be used from the vector X. -* -* X (input) DOUBLE PRECISION array, dimension (N) -* The vector for which a scaled sum of squares is computed. -* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n. -* -* INCX (input) INTEGER -* The increment between successive values of the vector X. -* INCX > 0. -* -* SCALE (input/output) DOUBLE PRECISION -* On entry, the value scale in the equation above. -* On exit, SCALE is overwritten with scl , the scaling factor -* for the sum of squares. -* -* SUMSQ (input/output) DOUBLE PRECISION -* On entry, the value sumsq in the equation above. -* On exit, SUMSQ is overwritten with smsq , the basic sum of -* squares from which scl has been factored out. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER IX - DOUBLE PRECISION ABSXI -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS -* .. -* .. Executable Statements .. -* - IF( N.GT.0 ) THEN - DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX - IF( X( IX ).NE.ZERO ) THEN - ABSXI = ABS( X( IX ) ) - IF( SCALE.LT.ABSXI ) THEN - SUMSQ = 1 + SUMSQ*( SCALE / ABSXI )**2 - SCALE = ABSXI - ELSE - SUMSQ = SUMSQ + ( ABSXI / SCALE )**2 - END IF - END IF - 10 CONTINUE - END IF - RETURN -* -* End of DLASSQ -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlasv2.f b/cpp/nudg++/trunk/BlasLapack/dlasv2.f deleted file mode 100644 index 5d93686..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlasv2.f +++ /dev/null @@ -1,250 +0,0 @@ - SUBROUTINE DLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - DOUBLE PRECISION CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN -* .. -* -* Purpose -* ======= -* -* DLASV2 computes the singular value decomposition of a 2-by-2 -* triangular matrix -* [ F G ] -* [ 0 H ]. -* On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the -* smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and -* right singular vectors for abs(SSMAX), giving the decomposition -* -* [ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ] -* [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ]. -* -* Arguments -* ========= -* -* F (input) DOUBLE PRECISION -* The (1,1) element of the 2-by-2 matrix. -* -* G (input) DOUBLE PRECISION -* The (1,2) element of the 2-by-2 matrix. -* -* H (input) DOUBLE PRECISION -* The (2,2) element of the 2-by-2 matrix. -* -* SSMIN (output) DOUBLE PRECISION -* abs(SSMIN) is the smaller singular value. -* -* SSMAX (output) DOUBLE PRECISION -* abs(SSMAX) is the larger singular value. -* -* SNL (output) DOUBLE PRECISION -* CSL (output) DOUBLE PRECISION -* The vector (CSL, SNL) is a unit left singular vector for the -* singular value abs(SSMAX). -* -* SNR (output) DOUBLE PRECISION -* CSR (output) DOUBLE PRECISION -* The vector (CSR, SNR) is a unit right singular vector for the -* singular value abs(SSMAX). -* -* Further Details -* =============== -* -* Any input parameter may be aliased with any output parameter. -* -* Barring over/underflow and assuming a guard digit in subtraction, all -* output quantities are correct to within a few units in the last -* place (ulps). -* -* In IEEE arithmetic, the code works correctly if one matrix element is -* infinite. -* -* Overflow will not occur unless the largest singular value itself -* overflows or is within a few ulps of overflow. (On machines with -* partial overflow, like the Cray, overflow may occur if the largest -* singular value is within a factor of 2 of overflow.) -* -* Underflow is harmless if underflow is gradual. Otherwise, results -* may correspond to a matrix modified by perturbations of size near -* the underflow threshold. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D0 ) - DOUBLE PRECISION HALF - PARAMETER ( HALF = 0.5D0 ) - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D0 ) - DOUBLE PRECISION TWO - PARAMETER ( TWO = 2.0D0 ) - DOUBLE PRECISION FOUR - PARAMETER ( FOUR = 4.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL GASMAL, SWAP - INTEGER PMAX - DOUBLE PRECISION A, CLT, CRT, D, FA, FT, GA, GT, HA, HT, L, M, - $ MM, R, S, SLT, SRT, T, TEMP, TSIGN, TT -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, SIGN, SQRT -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. Executable Statements .. -* - FT = F - FA = ABS( FT ) - HT = H - HA = ABS( H ) -* -* PMAX points to the maximum absolute element of matrix -* PMAX = 1 if F largest in absolute values -* PMAX = 2 if G largest in absolute values -* PMAX = 3 if H largest in absolute values -* - PMAX = 1 - SWAP = ( HA.GT.FA ) - IF( SWAP ) THEN - PMAX = 3 - TEMP = FT - FT = HT - HT = TEMP - TEMP = FA - FA = HA - HA = TEMP -* -* Now FA .ge. HA -* - END IF - GT = G - GA = ABS( GT ) - IF( GA.EQ.ZERO ) THEN -* -* Diagonal matrix -* - SSMIN = HA - SSMAX = FA - CLT = ONE - CRT = ONE - SLT = ZERO - SRT = ZERO - ELSE - GASMAL = .TRUE. - IF( GA.GT.FA ) THEN - PMAX = 2 - IF( ( FA / GA ).LT.DLAMCH( 'EPS' ) ) THEN -* -* Case of very large GA -* - GASMAL = .FALSE. - SSMAX = GA - IF( HA.GT.ONE ) THEN - SSMIN = FA / ( GA / HA ) - ELSE - SSMIN = ( FA / GA )*HA - END IF - CLT = ONE - SLT = HT / GT - SRT = ONE - CRT = FT / GT - END IF - END IF - IF( GASMAL ) THEN -* -* Normal case -* - D = FA - HA - IF( D.EQ.FA ) THEN -* -* Copes with infinite F or H -* - L = ONE - ELSE - L = D / FA - END IF -* -* Note that 0 .le. L .le. 1 -* - M = GT / FT -* -* Note that abs(M) .le. 1/macheps -* - T = TWO - L -* -* Note that T .ge. 1 -* - MM = M*M - TT = T*T - S = SQRT( TT+MM ) -* -* Note that 1 .le. S .le. 1 + 1/macheps -* - IF( L.EQ.ZERO ) THEN - R = ABS( M ) - ELSE - R = SQRT( L*L+MM ) - END IF -* -* Note that 0 .le. R .le. 1 + 1/macheps -* - A = HALF*( S+R ) -* -* Note that 1 .le. A .le. 1 + abs(M) -* - SSMIN = HA / A - SSMAX = FA*A - IF( MM.EQ.ZERO ) THEN -* -* Note that M is very tiny -* - IF( L.EQ.ZERO ) THEN - T = SIGN( TWO, FT )*SIGN( ONE, GT ) - ELSE - T = GT / SIGN( D, FT ) + M / T - END IF - ELSE - T = ( M / ( S+T )+M / ( R+L ) )*( ONE+A ) - END IF - L = SQRT( T*T+FOUR ) - CRT = TWO / L - SRT = T / L - CLT = ( CRT+SRT*M ) / A - SLT = ( HT / FT )*SRT / A - END IF - END IF - IF( SWAP ) THEN - CSL = SRT - SNL = CRT - CSR = SLT - SNR = CLT - ELSE - CSL = CLT - SNL = SLT - CSR = CRT - SNR = SRT - END IF -* -* Correct signs of SSMAX and SSMIN -* - IF( PMAX.EQ.1 ) - $ TSIGN = SIGN( ONE, CSR )*SIGN( ONE, CSL )*SIGN( ONE, F ) - IF( PMAX.EQ.2 ) - $ TSIGN = SIGN( ONE, SNR )*SIGN( ONE, CSL )*SIGN( ONE, G ) - IF( PMAX.EQ.3 ) - $ TSIGN = SIGN( ONE, SNR )*SIGN( ONE, SNL )*SIGN( ONE, H ) - SSMAX = SIGN( SSMAX, TSIGN ) - SSMIN = SIGN( SSMIN, TSIGN*SIGN( ONE, F )*SIGN( ONE, H ) ) - RETURN -* -* End of DLASV2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlaswp.f b/cpp/nudg++/trunk/BlasLapack/dlaswp.f deleted file mode 100644 index 99c0dda..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlaswp.f +++ /dev/null @@ -1,120 +0,0 @@ - SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INCX, K1, K2, LDA, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - DOUBLE PRECISION A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* DLASWP performs a series of row interchanges on the matrix A. -* One row interchange is initiated for each of rows K1 through K2 of A. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of columns of the matrix A. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the matrix of column dimension N to which the row -* interchanges will be applied. -* On exit, the permuted matrix. -* -* LDA (input) INTEGER -* The leading dimension of the array A. -* -* K1 (input) INTEGER -* The first element of IPIV for which a row interchange will -* be done. -* -* K2 (input) INTEGER -* The last element of IPIV for which a row interchange will -* be done. -* -* IPIV (input) INTEGER array, dimension (M*abs(INCX)) -* The vector of pivot indices. Only the elements in positions -* K1 through K2 of IPIV are accessed. -* IPIV(K) = L implies rows K and L are to be interchanged. -* -* INCX (input) INTEGER -* The increment between successive values of IPIV. If IPIV -* is negative, the pivots are applied in reverse order. -* -* Further Details -* =============== -* -* Modified by -* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA -* -* ===================================================================== -* -* .. Local Scalars .. - INTEGER I, I1, I2, INC, IP, IX, IX0, J, K, N32 - DOUBLE PRECISION TEMP -* .. -* .. Executable Statements .. -* -* Interchange row I with row IPIV(I) for each of rows K1 through K2. -* - IF( INCX.GT.0 ) THEN - IX0 = K1 - I1 = K1 - I2 = K2 - INC = 1 - ELSE IF( INCX.LT.0 ) THEN - IX0 = 1 + ( 1-K2 )*INCX - I1 = K2 - I2 = K1 - INC = -1 - ELSE - RETURN - END IF -* - N32 = ( N / 32 )*32 - IF( N32.NE.0 ) THEN - DO 30 J = 1, N32, 32 - IX = IX0 - DO 20 I = I1, I2, INC - IP = IPIV( IX ) - IF( IP.NE.I ) THEN - DO 10 K = J, J + 31 - TEMP = A( I, K ) - A( I, K ) = A( IP, K ) - A( IP, K ) = TEMP - 10 CONTINUE - END IF - IX = IX + INCX - 20 CONTINUE - 30 CONTINUE - END IF - IF( N32.NE.N ) THEN - N32 = N32 + 1 - IX = IX0 - DO 50 I = I1, I2, INC - IP = IPIV( IX ) - IF( IP.NE.I ) THEN - DO 40 K = N32, N - TEMP = A( I, K ) - A( I, K ) = A( IP, K ) - A( IP, K ) = TEMP - 40 CONTINUE - END IF - IX = IX + INCX - 50 CONTINUE - END IF -* - RETURN -* -* End of DLASWP -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlatrd.f b/cpp/nudg++/trunk/BlasLapack/dlatrd.f deleted file mode 100644 index bf613b5..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlatrd.f +++ /dev/null @@ -1,259 +0,0 @@ - SUBROUTINE DLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER LDA, LDW, N, NB -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), E( * ), TAU( * ), W( LDW, * ) -* .. -* -* Purpose -* ======= -* -* DLATRD reduces NB rows and columns of a real symmetric matrix A to -* symmetric tridiagonal form by an orthogonal similarity -* transformation Q' * A * Q, and returns the matrices V and W which are -* needed to apply the transformation to the unreduced part of A. -* -* If UPLO = 'U', DLATRD reduces the last NB rows and columns of a -* matrix, of which the upper triangle is supplied; -* if UPLO = 'L', DLATRD reduces the first NB rows and columns of a -* matrix, of which the lower triangle is supplied. -* -* This is an auxiliary routine called by DSYTRD. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER -* Specifies whether the upper or lower triangular part of the -* symmetric matrix A is stored: -* = 'U': Upper triangular -* = 'L': Lower triangular -* -* N (input) INTEGER -* The order of the matrix A. -* -* NB (input) INTEGER -* The number of rows and columns to be reduced. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the symmetric matrix A. If UPLO = 'U', the leading -* n-by-n upper triangular part of A contains the upper -* triangular part of the matrix A, and the strictly lower -* triangular part of A is not referenced. If UPLO = 'L', the -* leading n-by-n lower triangular part of A contains the lower -* triangular part of the matrix A, and the strictly upper -* triangular part of A is not referenced. -* On exit: -* if UPLO = 'U', the last NB columns have been reduced to -* tridiagonal form, with the diagonal elements overwriting -* the diagonal elements of A; the elements above the diagonal -* with the array TAU, represent the orthogonal matrix Q as a -* product of elementary reflectors; -* if UPLO = 'L', the first NB columns have been reduced to -* tridiagonal form, with the diagonal elements overwriting -* the diagonal elements of A; the elements below the diagonal -* with the array TAU, represent the orthogonal matrix Q as a -* product of elementary reflectors. -* See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= (1,N). -* -* E (output) DOUBLE PRECISION array, dimension (N-1) -* If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal -* elements of the last NB columns of the reduced matrix; -* if UPLO = 'L', E(1:nb) contains the subdiagonal elements of -* the first NB columns of the reduced matrix. -* -* TAU (output) DOUBLE PRECISION array, dimension (N-1) -* The scalar factors of the elementary reflectors, stored in -* TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'. -* See Further Details. -* -* W (output) DOUBLE PRECISION array, dimension (LDW,NB) -* The n-by-nb matrix W required to update the unreduced part -* of A. -* -* LDW (input) INTEGER -* The leading dimension of the array W. LDW >= max(1,N). -* -* Further Details -* =============== -* -* If UPLO = 'U', the matrix Q is represented as a product of elementary -* reflectors -* -* Q = H(n) H(n-1) . . . H(n-nb+1). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), -* and tau in TAU(i-1). -* -* If UPLO = 'L', the matrix Q is represented as a product of elementary -* reflectors -* -* Q = H(1) H(2) . . . H(nb). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i), -* and tau in TAU(i). -* -* The elements of the vectors v together form the n-by-nb matrix V -* which is needed, with W, to apply the transformation to the unreduced -* part of the matrix, using a symmetric rank-2k update of the form: -* A := A - V*W' - W*V'. -* -* The contents of A on exit are illustrated by the following examples -* with n = 5 and nb = 2: -* -* if UPLO = 'U': if UPLO = 'L': -* -* ( a a a v4 v5 ) ( d ) -* ( a a v4 v5 ) ( 1 d ) -* ( a 1 v5 ) ( v1 1 a ) -* ( d 1 ) ( v1 v2 a a ) -* ( d ) ( v1 v2 a a a ) -* -* where d denotes a diagonal element of the reduced matrix, a denotes -* an element of the original matrix that is unchanged, and vi denotes -* an element of the vector defining H(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE, HALF - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, HALF = 0.5D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, IW - DOUBLE PRECISION ALPHA -* .. -* .. External Subroutines .. - EXTERNAL DAXPY, DGEMV, DLARFG, DSCAL, DSYMV -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DDOT - EXTERNAL LSAME, DDOT -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* -* Quick return if possible -* - IF( N.LE.0 ) - $ RETURN -* - IF( LSAME( UPLO, 'U' ) ) THEN -* -* Reduce last NB columns of upper triangle -* - DO 10 I = N, N - NB + 1, -1 - IW = I - N + NB - IF( I.LT.N ) THEN -* -* Update A(1:i,i) -* - CALL DGEMV( 'No transpose', I, N-I, -ONE, A( 1, I+1 ), - $ LDA, W( I, IW+1 ), LDW, ONE, A( 1, I ), 1 ) - CALL DGEMV( 'No transpose', I, N-I, -ONE, W( 1, IW+1 ), - $ LDW, A( I, I+1 ), LDA, ONE, A( 1, I ), 1 ) - END IF - IF( I.GT.1 ) THEN -* -* Generate elementary reflector H(i) to annihilate -* A(1:i-2,i) -* - CALL DLARFG( I-1, A( I-1, I ), A( 1, I ), 1, TAU( I-1 ) ) - E( I-1 ) = A( I-1, I ) - A( I-1, I ) = ONE -* -* Compute W(1:i-1,i) -* - CALL DSYMV( 'Upper', I-1, ONE, A, LDA, A( 1, I ), 1, - $ ZERO, W( 1, IW ), 1 ) - IF( I.LT.N ) THEN - CALL DGEMV( 'Transpose', I-1, N-I, ONE, W( 1, IW+1 ), - $ LDW, A( 1, I ), 1, ZERO, W( I+1, IW ), 1 ) - CALL DGEMV( 'No transpose', I-1, N-I, -ONE, - $ A( 1, I+1 ), LDA, W( I+1, IW ), 1, ONE, - $ W( 1, IW ), 1 ) - CALL DGEMV( 'Transpose', I-1, N-I, ONE, A( 1, I+1 ), - $ LDA, A( 1, I ), 1, ZERO, W( I+1, IW ), 1 ) - CALL DGEMV( 'No transpose', I-1, N-I, -ONE, - $ W( 1, IW+1 ), LDW, W( I+1, IW ), 1, ONE, - $ W( 1, IW ), 1 ) - END IF - CALL DSCAL( I-1, TAU( I-1 ), W( 1, IW ), 1 ) - ALPHA = -HALF*TAU( I-1 )*DDOT( I-1, W( 1, IW ), 1, - $ A( 1, I ), 1 ) - CALL DAXPY( I-1, ALPHA, A( 1, I ), 1, W( 1, IW ), 1 ) - END IF -* - 10 CONTINUE - ELSE -* -* Reduce first NB columns of lower triangle -* - DO 20 I = 1, NB -* -* Update A(i:n,i) -* - CALL DGEMV( 'No transpose', N-I+1, I-1, -ONE, A( I, 1 ), - $ LDA, W( I, 1 ), LDW, ONE, A( I, I ), 1 ) - CALL DGEMV( 'No transpose', N-I+1, I-1, -ONE, W( I, 1 ), - $ LDW, A( I, 1 ), LDA, ONE, A( I, I ), 1 ) - IF( I.LT.N ) THEN -* -* Generate elementary reflector H(i) to annihilate -* A(i+2:n,i) -* - CALL DLARFG( N-I, A( I+1, I ), A( MIN( I+2, N ), I ), 1, - $ TAU( I ) ) - E( I ) = A( I+1, I ) - A( I+1, I ) = ONE -* -* Compute W(i+1:n,i) -* - CALL DSYMV( 'Lower', N-I, ONE, A( I+1, I+1 ), LDA, - $ A( I+1, I ), 1, ZERO, W( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', N-I, I-1, ONE, W( I+1, 1 ), LDW, - $ A( I+1, I ), 1, ZERO, W( 1, I ), 1 ) - CALL DGEMV( 'No transpose', N-I, I-1, -ONE, A( I+1, 1 ), - $ LDA, W( 1, I ), 1, ONE, W( I+1, I ), 1 ) - CALL DGEMV( 'Transpose', N-I, I-1, ONE, A( I+1, 1 ), LDA, - $ A( I+1, I ), 1, ZERO, W( 1, I ), 1 ) - CALL DGEMV( 'No transpose', N-I, I-1, -ONE, W( I+1, 1 ), - $ LDW, W( 1, I ), 1, ONE, W( I+1, I ), 1 ) - CALL DSCAL( N-I, TAU( I ), W( I+1, I ), 1 ) - ALPHA = -HALF*TAU( I )*DDOT( N-I, W( I+1, I ), 1, - $ A( I+1, I ), 1 ) - CALL DAXPY( N-I, ALPHA, A( I+1, I ), 1, W( I+1, I ), 1 ) - END IF -* - 20 CONTINUE - END IF -* - RETURN -* -* End of DLATRD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dlatrs.f b/cpp/nudg++/trunk/BlasLapack/dlatrs.f deleted file mode 100644 index 591c966..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dlatrs.f +++ /dev/null @@ -1,702 +0,0 @@ - SUBROUTINE DLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE, - $ CNORM, INFO ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1992 -* -* .. Scalar Arguments .. - CHARACTER DIAG, NORMIN, TRANS, UPLO - INTEGER INFO, LDA, N - DOUBLE PRECISION SCALE -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), CNORM( * ), X( * ) -* .. -* -* Purpose -* ======= -* -* DLATRS solves one of the triangular systems -* -* A *x = s*b or A'*x = s*b -* -* with scaling to prevent overflow. Here A is an upper or lower -* triangular matrix, A' denotes the transpose of A, x and b are -* n-element vectors, and s is a scaling factor, usually less than -* or equal to 1, chosen so that the components of x will be less than -* the overflow threshold. If the unscaled problem will not cause -* overflow, the Level 2 BLAS routine DTRSV is called. If the matrix A -* is singular (A(j,j) = 0 for some j), then s is set to 0 and a -* non-trivial solution to A*x = 0 is returned. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* Specifies whether the matrix A is upper or lower triangular. -* = 'U': Upper triangular -* = 'L': Lower triangular -* -* TRANS (input) CHARACTER*1 -* Specifies the operation applied to A. -* = 'N': Solve A * x = s*b (No transpose) -* = 'T': Solve A'* x = s*b (Transpose) -* = 'C': Solve A'* x = s*b (Conjugate transpose = Transpose) -* -* DIAG (input) CHARACTER*1 -* Specifies whether or not the matrix A is unit triangular. -* = 'N': Non-unit triangular -* = 'U': Unit triangular -* -* NORMIN (input) CHARACTER*1 -* Specifies whether CNORM has been set or not. -* = 'Y': CNORM contains the column norms on entry -* = 'N': CNORM is not set on entry. On exit, the norms will -* be computed and stored in CNORM. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The triangular matrix A. If UPLO = 'U', the leading n by n -* upper triangular part of the array A contains the upper -* triangular matrix, and the strictly lower triangular part of -* A is not referenced. If UPLO = 'L', the leading n by n lower -* triangular part of the array A contains the lower triangular -* matrix, and the strictly upper triangular part of A is not -* referenced. If DIAG = 'U', the diagonal elements of A are -* also not referenced and are assumed to be 1. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max (1,N). -* -* X (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the right hand side b of the triangular system. -* On exit, X is overwritten by the solution vector x. -* -* SCALE (output) DOUBLE PRECISION -* The scaling factor s for the triangular system -* A * x = s*b or A'* x = s*b. -* If SCALE = 0, the matrix A is singular or badly scaled, and -* the vector x is an exact or approximate solution to A*x = 0. -* -* CNORM (input or output) DOUBLE PRECISION array, dimension (N) -* -* If NORMIN = 'Y', CNORM is an input argument and CNORM(j) -* contains the norm of the off-diagonal part of the j-th column -* of A. If TRANS = 'N', CNORM(j) must be greater than or equal -* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) -* must be greater than or equal to the 1-norm. -* -* If NORMIN = 'N', CNORM is an output argument and CNORM(j) -* returns the 1-norm of the offdiagonal part of the j-th column -* of A. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -k, the k-th argument had an illegal value -* -* Further Details -* ======= ======= -* -* A rough bound on x is computed; if that is less than overflow, DTRSV -* is called, otherwise, specific code is used which checks for possible -* overflow or divide-by-zero at every operation. -* -* A columnwise scheme is used for solving A*x = b. The basic algorithm -* if A is lower triangular is -* -* x[1:n] := b[1:n] -* for j = 1, ..., n -* x(j) := x(j) / A(j,j) -* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j] -* end -* -* Define bounds on the components of x after j iterations of the loop: -* M(j) = bound on x[1:j] -* G(j) = bound on x[j+1:n] -* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}. -* -* Then for iteration j+1 we have -* M(j+1) <= G(j) / | A(j+1,j+1) | -* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] | -* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | ) -* -* where CNORM(j+1) is greater than or equal to the infinity-norm of -* column j+1 of A, not counting the diagonal. Hence -* -* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | ) -* 1<=i<=j -* and -* -* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| ) -* 1<=i< j -* -* Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTRSV if the -* reciprocal of the largest M(j), j=1,..,n, is larger than -* max(underflow, 1/overflow). -* -* The bound on x(j) is also used to determine when a step in the -* columnwise method can be performed without fear of overflow. If -* the computed bound is greater than a large constant, x is scaled to -* prevent overflow, but if the bound overflows, x is set to 0, x(j) to -* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found. -* -* Similarly, a row-wise scheme is used to solve A'*x = b. The basic -* algorithm for A upper triangular is -* -* for j = 1, ..., n -* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j) -* end -* -* We simultaneously compute two bounds -* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j -* M(j) = bound on x(i), 1<=i<=j -* -* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we -* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1. -* Then the bound on x(j) is -* -* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) | -* -* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| ) -* 1<=i<=j -* -* and we can safely call DTRSV if 1/M(n) and 1/G(n) are both greater -* than max(underflow, 1/overflow). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, HALF, ONE - PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL NOTRAN, NOUNIT, UPPER - INTEGER I, IMAX, J, JFIRST, JINC, JLAST - DOUBLE PRECISION BIGNUM, GROW, REC, SMLNUM, SUMJ, TJJ, TJJS, - $ TMAX, TSCAL, USCAL, XBND, XJ, XMAX -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IDAMAX - DOUBLE PRECISION DASUM, DDOT, DLAMCH - EXTERNAL LSAME, IDAMAX, DASUM, DDOT, DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DAXPY, DSCAL, DTRSV, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, MIN -* .. -* .. Executable Statements .. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - NOTRAN = LSAME( TRANS, 'N' ) - NOUNIT = LSAME( DIAG, 'N' ) -* -* Test the input parameters. -* - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. - $ LSAME( TRANS, 'C' ) ) THEN - INFO = -2 - ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN - INFO = -3 - ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT. - $ LSAME( NORMIN, 'N' ) ) THEN - INFO = -4 - ELSE IF( N.LT.0 ) THEN - INFO = -5 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -7 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DLATRS', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Determine machine dependent parameters to control overflow. -* - SMLNUM = DLAMCH( 'Safe minimum' ) / DLAMCH( 'Precision' ) - BIGNUM = ONE / SMLNUM - SCALE = ONE -* - IF( LSAME( NORMIN, 'N' ) ) THEN -* -* Compute the 1-norm of each column, not including the diagonal. -* - IF( UPPER ) THEN -* -* A is upper triangular. -* - DO 10 J = 1, N - CNORM( J ) = DASUM( J-1, A( 1, J ), 1 ) - 10 CONTINUE - ELSE -* -* A is lower triangular. -* - DO 20 J = 1, N - 1 - CNORM( J ) = DASUM( N-J, A( J+1, J ), 1 ) - 20 CONTINUE - CNORM( N ) = ZERO - END IF - END IF -* -* Scale the column norms by TSCAL if the maximum element in CNORM is -* greater than BIGNUM. -* - IMAX = IDAMAX( N, CNORM, 1 ) - TMAX = CNORM( IMAX ) - IF( TMAX.LE.BIGNUM ) THEN - TSCAL = ONE - ELSE - TSCAL = ONE / ( SMLNUM*TMAX ) - CALL DSCAL( N, TSCAL, CNORM, 1 ) - END IF -* -* Compute a bound on the computed solution vector to see if the -* Level 2 BLAS routine DTRSV can be used. -* - J = IDAMAX( N, X, 1 ) - XMAX = ABS( X( J ) ) - XBND = XMAX - IF( NOTRAN ) THEN -* -* Compute the growth in A * x = b. -* - IF( UPPER ) THEN - JFIRST = N - JLAST = 1 - JINC = -1 - ELSE - JFIRST = 1 - JLAST = N - JINC = 1 - END IF -* - IF( TSCAL.NE.ONE ) THEN - GROW = ZERO - GO TO 50 - END IF -* - IF( NOUNIT ) THEN -* -* A is non-unit triangular. -* -* Compute GROW = 1/G(j) and XBND = 1/M(j). -* Initially, G(0) = max{x(i), i=1,...,n}. -* - GROW = ONE / MAX( XBND, SMLNUM ) - XBND = GROW - DO 30 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 50 -* -* M(j) = G(j-1) / abs(A(j,j)) -* - TJJ = ABS( A( J, J ) ) - XBND = MIN( XBND, MIN( ONE, TJJ )*GROW ) - IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN -* -* G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) ) -* - GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) ) - ELSE -* -* G(j) could overflow, set GROW to 0. -* - GROW = ZERO - END IF - 30 CONTINUE - GROW = XBND - ELSE -* -* A is unit triangular. -* -* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. -* - GROW = MIN( ONE, ONE / MAX( XBND, SMLNUM ) ) - DO 40 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 50 -* -* G(j) = G(j-1)*( 1 + CNORM(j) ) -* - GROW = GROW*( ONE / ( ONE+CNORM( J ) ) ) - 40 CONTINUE - END IF - 50 CONTINUE -* - ELSE -* -* Compute the growth in A' * x = b. -* - IF( UPPER ) THEN - JFIRST = 1 - JLAST = N - JINC = 1 - ELSE - JFIRST = N - JLAST = 1 - JINC = -1 - END IF -* - IF( TSCAL.NE.ONE ) THEN - GROW = ZERO - GO TO 80 - END IF -* - IF( NOUNIT ) THEN -* -* A is non-unit triangular. -* -* Compute GROW = 1/G(j) and XBND = 1/M(j). -* Initially, M(0) = max{x(i), i=1,...,n}. -* - GROW = ONE / MAX( XBND, SMLNUM ) - XBND = GROW - DO 60 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 80 -* -* G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) ) -* - XJ = ONE + CNORM( J ) - GROW = MIN( GROW, XBND / XJ ) -* -* M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j)) -* - TJJ = ABS( A( J, J ) ) - IF( XJ.GT.TJJ ) - $ XBND = XBND*( TJJ / XJ ) - 60 CONTINUE - GROW = MIN( GROW, XBND ) - ELSE -* -* A is unit triangular. -* -* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. -* - GROW = MIN( ONE, ONE / MAX( XBND, SMLNUM ) ) - DO 70 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 80 -* -* G(j) = ( 1 + CNORM(j) )*G(j-1) -* - XJ = ONE + CNORM( J ) - GROW = GROW / XJ - 70 CONTINUE - END IF - 80 CONTINUE - END IF -* - IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN -* -* Use the Level 2 BLAS solve if the reciprocal of the bound on -* elements of X is not too small. -* - CALL DTRSV( UPLO, TRANS, DIAG, N, A, LDA, X, 1 ) - ELSE -* -* Use a Level 1 BLAS solve, scaling intermediate results. -* - IF( XMAX.GT.BIGNUM ) THEN -* -* Scale X so that its components are less than or equal to -* BIGNUM in absolute value. -* - SCALE = BIGNUM / XMAX - CALL DSCAL( N, SCALE, X, 1 ) - XMAX = BIGNUM - END IF -* - IF( NOTRAN ) THEN -* -* Solve A * x = b -* - DO 110 J = JFIRST, JLAST, JINC -* -* Compute x(j) = b(j) / A(j,j), scaling x if necessary. -* - XJ = ABS( X( J ) ) - IF( NOUNIT ) THEN - TJJS = A( J, J )*TSCAL - ELSE - TJJS = TSCAL - IF( TSCAL.EQ.ONE ) - $ GO TO 100 - END IF - TJJ = ABS( TJJS ) - IF( TJJ.GT.SMLNUM ) THEN -* -* abs(A(j,j)) > SMLNUM: -* - IF( TJJ.LT.ONE ) THEN - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale x by 1/b(j). -* - REC = ONE / XJ - CALL DSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF - X( J ) = X( J ) / TJJS - XJ = ABS( X( J ) ) - ELSE IF( TJJ.GT.ZERO ) THEN -* -* 0 < abs(A(j,j)) <= SMLNUM: -* - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM -* to avoid overflow when dividing by A(j,j). -* - REC = ( TJJ*BIGNUM ) / XJ - IF( CNORM( J ).GT.ONE ) THEN -* -* Scale by 1/CNORM(j) to avoid overflow when -* multiplying x(j) times column j. -* - REC = REC / CNORM( J ) - END IF - CALL DSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - X( J ) = X( J ) / TJJS - XJ = ABS( X( J ) ) - ELSE -* -* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and -* scale = 0, and compute a solution to A*x = 0. -* - DO 90 I = 1, N - X( I ) = ZERO - 90 CONTINUE - X( J ) = ONE - XJ = ONE - SCALE = ZERO - XMAX = ZERO - END IF - 100 CONTINUE -* -* Scale x if necessary to avoid overflow when adding a -* multiple of column j of A. -* - IF( XJ.GT.ONE ) THEN - REC = ONE / XJ - IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN -* -* Scale x by 1/(2*abs(x(j))). -* - REC = REC*HALF - CALL DSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - END IF - ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN -* -* Scale x by 1/2. -* - CALL DSCAL( N, HALF, X, 1 ) - SCALE = SCALE*HALF - END IF -* - IF( UPPER ) THEN - IF( J.GT.1 ) THEN -* -* Compute the update -* x(1:j-1) := x(1:j-1) - x(j) * A(1:j-1,j) -* - CALL DAXPY( J-1, -X( J )*TSCAL, A( 1, J ), 1, X, - $ 1 ) - I = IDAMAX( J-1, X, 1 ) - XMAX = ABS( X( I ) ) - END IF - ELSE - IF( J.LT.N ) THEN -* -* Compute the update -* x(j+1:n) := x(j+1:n) - x(j) * A(j+1:n,j) -* - CALL DAXPY( N-J, -X( J )*TSCAL, A( J+1, J ), 1, - $ X( J+1 ), 1 ) - I = J + IDAMAX( N-J, X( J+1 ), 1 ) - XMAX = ABS( X( I ) ) - END IF - END IF - 110 CONTINUE -* - ELSE -* -* Solve A' * x = b -* - DO 160 J = JFIRST, JLAST, JINC -* -* Compute x(j) = b(j) - sum A(k,j)*x(k). -* k<>j -* - XJ = ABS( X( J ) ) - USCAL = TSCAL - REC = ONE / MAX( XMAX, ONE ) - IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN -* -* If x(j) could overflow, scale x by 1/(2*XMAX). -* - REC = REC*HALF - IF( NOUNIT ) THEN - TJJS = A( J, J )*TSCAL - ELSE - TJJS = TSCAL - END IF - TJJ = ABS( TJJS ) - IF( TJJ.GT.ONE ) THEN -* -* Divide by A(j,j) when scaling x if A(j,j) > 1. -* - REC = MIN( ONE, REC*TJJ ) - USCAL = USCAL / TJJS - END IF - IF( REC.LT.ONE ) THEN - CALL DSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF -* - SUMJ = ZERO - IF( USCAL.EQ.ONE ) THEN -* -* If the scaling needed for A in the dot product is 1, -* call DDOT to perform the dot product. -* - IF( UPPER ) THEN - SUMJ = DDOT( J-1, A( 1, J ), 1, X, 1 ) - ELSE IF( J.LT.N ) THEN - SUMJ = DDOT( N-J, A( J+1, J ), 1, X( J+1 ), 1 ) - END IF - ELSE -* -* Otherwise, use in-line code for the dot product. -* - IF( UPPER ) THEN - DO 120 I = 1, J - 1 - SUMJ = SUMJ + ( A( I, J )*USCAL )*X( I ) - 120 CONTINUE - ELSE IF( J.LT.N ) THEN - DO 130 I = J + 1, N - SUMJ = SUMJ + ( A( I, J )*USCAL )*X( I ) - 130 CONTINUE - END IF - END IF -* - IF( USCAL.EQ.TSCAL ) THEN -* -* Compute x(j) := ( x(j) - sumj ) / A(j,j) if 1/A(j,j) -* was not used to scale the dotproduct. -* - X( J ) = X( J ) - SUMJ - XJ = ABS( X( J ) ) - IF( NOUNIT ) THEN - TJJS = A( J, J )*TSCAL - ELSE - TJJS = TSCAL - IF( TSCAL.EQ.ONE ) - $ GO TO 150 - END IF -* -* Compute x(j) = x(j) / A(j,j), scaling if necessary. -* - TJJ = ABS( TJJS ) - IF( TJJ.GT.SMLNUM ) THEN -* -* abs(A(j,j)) > SMLNUM: -* - IF( TJJ.LT.ONE ) THEN - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale X by 1/abs(x(j)). -* - REC = ONE / XJ - CALL DSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF - X( J ) = X( J ) / TJJS - ELSE IF( TJJ.GT.ZERO ) THEN -* -* 0 < abs(A(j,j)) <= SMLNUM: -* - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM. -* - REC = ( TJJ*BIGNUM ) / XJ - CALL DSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - X( J ) = X( J ) / TJJS - ELSE -* -* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and -* scale = 0, and compute a solution to A'*x = 0. -* - DO 140 I = 1, N - X( I ) = ZERO - 140 CONTINUE - X( J ) = ONE - SCALE = ZERO - XMAX = ZERO - END IF - 150 CONTINUE - ELSE -* -* Compute x(j) := x(j) / A(j,j) - sumj if the dot -* product has already been divided by 1/A(j,j). -* - X( J ) = X( J ) / TJJS - SUMJ - END IF - XMAX = MAX( XMAX, ABS( X( J ) ) ) - 160 CONTINUE - END IF - SCALE = SCALE / TSCAL - END IF -* -* Scale the column norms by 1/TSCAL for return. -* - IF( TSCAL.NE.ONE ) THEN - CALL DSCAL( N, ONE / TSCAL, CNORM, 1 ) - END IF -* - RETURN -* -* End of DLATRS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dnrm2.f b/cpp/nudg++/trunk/BlasLapack/dnrm2.f deleted file mode 100644 index 119d047..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dnrm2.f +++ /dev/null @@ -1,60 +0,0 @@ - DOUBLE PRECISION FUNCTION DNRM2 ( N, X, INCX ) -* .. Scalar Arguments .. - INTEGER INCX, N -* .. Array Arguments .. - DOUBLE PRECISION X( * ) -* .. -* -* DNRM2 returns the euclidean norm of a vector via the function -* name, so that -* -* DNRM2 := sqrt( x'*x ) -* -* -* -* -- This version written on 25-October-1982. -* Modified on 14-October-1993 to inline the call to DLASSQ. -* Sven Hammarling, Nag Ltd. -* -* -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. Local Scalars .. - INTEGER IX - DOUBLE PRECISION ABSXI, NORM, SCALE, SSQ -* .. Intrinsic Functions .. - INTRINSIC ABS, SQRT -* .. -* .. Executable Statements .. - IF( N.LT.1 .OR. INCX.LT.1 )THEN - NORM = ZERO - ELSE IF( N.EQ.1 )THEN - NORM = ABS( X( 1 ) ) - ELSE - SCALE = ZERO - SSQ = ONE -* The following loop is equivalent to this call to the LAPACK -* auxiliary routine: -* CALL DLASSQ( N, X, INCX, SCALE, SSQ ) -* - DO 10, IX = 1, 1 + ( N - 1 )*INCX, INCX - IF( X( IX ).NE.ZERO )THEN - ABSXI = ABS( X( IX ) ) - IF( SCALE.LT.ABSXI )THEN - SSQ = ONE + SSQ*( SCALE/ABSXI )**2 - SCALE = ABSXI - ELSE - SSQ = SSQ + ( ABSXI/SCALE )**2 - END IF - END IF - 10 CONTINUE - NORM = SCALE * SQRT( SSQ ) - END IF -* - DNRM2 = NORM - RETURN -* -* End of DNRM2. -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorg2l.f b/cpp/nudg++/trunk/BlasLapack/dorg2l.f deleted file mode 100644 index 5b86f67..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorg2l.f +++ /dev/null @@ -1,128 +0,0 @@ - SUBROUTINE DORG2L( M, N, K, A, LDA, TAU, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - INTEGER INFO, K, LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORG2L generates an m by n real matrix Q with orthonormal columns, -* which is defined as the last n columns of a product of k elementary -* reflectors of order m -* -* Q = H(k) . . . H(2) H(1) -* -* as returned by DGEQLF. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix Q. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix Q. M >= N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines the -* matrix Q. N >= K >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the (n-k+i)-th column must contain the vector which -* defines the elementary reflector H(i), for i = 1,2,...,k, as -* returned by DGEQLF in the last k columns of its array -* argument A. -* On exit, the m by n matrix Q. -* -* LDA (input) INTEGER -* The first dimension of the array A. LDA >= max(1,M). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGEQLF. -* -* WORK (workspace) DOUBLE PRECISION array, dimension (N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument has an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, II, J, L -* .. -* .. External Subroutines .. - EXTERNAL DLARF, DSCAL, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 .OR. N.GT.M ) THEN - INFO = -2 - ELSE IF( K.LT.0 .OR. K.GT.N ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORG2L', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.LE.0 ) - $ RETURN -* -* Initialise columns 1:n-k to columns of the unit matrix -* - DO 20 J = 1, N - K - DO 10 L = 1, M - A( L, J ) = ZERO - 10 CONTINUE - A( M-N+J, J ) = ONE - 20 CONTINUE -* - DO 40 I = 1, K - II = N - K + I -* -* Apply H(i) to A(1:m-k+i,1:n-k+i) from the left -* - A( M-N+II, II ) = ONE - CALL DLARF( 'Left', M-N+II, II-1, A( 1, II ), 1, TAU( I ), A, - $ LDA, WORK ) - CALL DSCAL( M-N+II-1, -TAU( I ), A( 1, II ), 1 ) - A( M-N+II, II ) = ONE - TAU( I ) -* -* Set A(m-k+i+1:m,n-k+i) to zero -* - DO 30 L = M - N + II + 1, M - A( L, II ) = ZERO - 30 CONTINUE - 40 CONTINUE - RETURN -* -* End of DORG2L -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorg2r.f b/cpp/nudg++/trunk/BlasLapack/dorg2r.f deleted file mode 100644 index c15982e..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorg2r.f +++ /dev/null @@ -1,130 +0,0 @@ - SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - INTEGER INFO, K, LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORG2R generates an m by n real matrix Q with orthonormal columns, -* which is defined as the first n columns of a product of k elementary -* reflectors of order m -* -* Q = H(1) H(2) . . . H(k) -* -* as returned by DGEQRF. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix Q. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix Q. M >= N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines the -* matrix Q. N >= K >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the i-th column must contain the vector which -* defines the elementary reflector H(i), for i = 1,2,...,k, as -* returned by DGEQRF in the first k columns of its array -* argument A. -* On exit, the m-by-n matrix Q. -* -* LDA (input) INTEGER -* The first dimension of the array A. LDA >= max(1,M). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGEQRF. -* -* WORK (workspace) DOUBLE PRECISION array, dimension (N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument has an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, J, L -* .. -* .. External Subroutines .. - EXTERNAL DLARF, DSCAL, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 .OR. N.GT.M ) THEN - INFO = -2 - ELSE IF( K.LT.0 .OR. K.GT.N ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORG2R', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.LE.0 ) - $ RETURN -* -* Initialise columns k+1:n to columns of the unit matrix -* - DO 20 J = K + 1, N - DO 10 L = 1, M - A( L, J ) = ZERO - 10 CONTINUE - A( J, J ) = ONE - 20 CONTINUE -* - DO 40 I = K, 1, -1 -* -* Apply H(i) to A(i:m,i:n) from the left -* - IF( I.LT.N ) THEN - A( I, I ) = ONE - CALL DLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAU( I ), - $ A( I, I+1 ), LDA, WORK ) - END IF - IF( I.LT.M ) - $ CALL DSCAL( M-I, -TAU( I ), A( I+1, I ), 1 ) - A( I, I ) = ONE - TAU( I ) -* -* Set A(1:i-1,i) to zero -* - DO 30 L = 1, I - 1 - A( L, I ) = ZERO - 30 CONTINUE - 40 CONTINUE - RETURN -* -* End of DORG2R -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorgbr.f b/cpp/nudg++/trunk/BlasLapack/dorgbr.f deleted file mode 100644 index 84dbe17..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorgbr.f +++ /dev/null @@ -1,245 +0,0 @@ - SUBROUTINE DORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER VECT - INTEGER INFO, K, LDA, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORGBR generates one of the real orthogonal matrices Q or P**T -* determined by DGEBRD when reducing a real matrix A to bidiagonal -* form: A = Q * B * P**T. Q and P**T are defined as products of -* elementary reflectors H(i) or G(i) respectively. -* -* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q -* is of order M: -* if m >= k, Q = H(1) H(2) . . . H(k) and DORGBR returns the first n -* columns of Q, where m >= n >= k; -* if m < k, Q = H(1) H(2) . . . H(m-1) and DORGBR returns Q as an -* M-by-M matrix. -* -* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**T -* is of order N: -* if k < n, P**T = G(k) . . . G(2) G(1) and DORGBR returns the first m -* rows of P**T, where n >= m >= k; -* if k >= n, P**T = G(n-1) . . . G(2) G(1) and DORGBR returns P**T as -* an N-by-N matrix. -* -* Arguments -* ========= -* -* VECT (input) CHARACTER*1 -* Specifies whether the matrix Q or the matrix P**T is -* required, as defined in the transformation applied by DGEBRD: -* = 'Q': generate Q; -* = 'P': generate P**T. -* -* M (input) INTEGER -* The number of rows of the matrix Q or P**T to be returned. -* M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix Q or P**T to be returned. -* N >= 0. -* If VECT = 'Q', M >= N >= min(M,K); -* if VECT = 'P', N >= M >= min(N,K). -* -* K (input) INTEGER -* If VECT = 'Q', the number of columns in the original M-by-K -* matrix reduced by DGEBRD. -* If VECT = 'P', the number of rows in the original K-by-N -* matrix reduced by DGEBRD. -* K >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the vectors which define the elementary reflectors, -* as returned by DGEBRD. -* On exit, the M-by-N matrix Q or P**T. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* TAU (input) DOUBLE PRECISION array, dimension -* (min(M,K)) if VECT = 'Q' -* (min(N,K)) if VECT = 'P' -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i) or G(i), which determines Q or P**T, as -* returned by DGEBRD in its array argument TAUQ or TAUP. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,min(M,N)). -* For optimum performance LWORK >= min(M,N)*NB, where NB -* is the optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY, WANTQ - INTEGER I, IINFO, J, LWKOPT, MN, NB -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DORGLQ, DORGQR, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - WANTQ = LSAME( VECT, 'Q' ) - MN = MIN( M, N ) - LQUERY = ( LWORK.EQ.-1 ) - IF( .NOT.WANTQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN - INFO = -1 - ELSE IF( M.LT.0 ) THEN - INFO = -2 - ELSE IF( N.LT.0 .OR. ( WANTQ .AND. ( N.GT.M .OR. N.LT.MIN( M, - $ K ) ) ) .OR. ( .NOT.WANTQ .AND. ( M.GT.N .OR. M.LT. - $ MIN( N, K ) ) ) ) THEN - INFO = -3 - ELSE IF( K.LT.0 ) THEN - INFO = -4 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -6 - ELSE IF( LWORK.LT.MAX( 1, MN ) .AND. .NOT.LQUERY ) THEN - INFO = -9 - END IF -* - IF( INFO.EQ.0 ) THEN - IF( WANTQ ) THEN - NB = ILAENV( 1, 'DORGQR', ' ', M, N, K, -1 ) - ELSE - NB = ILAENV( 1, 'DORGLQ', ' ', M, N, K, -1 ) - END IF - LWKOPT = MAX( 1, MN )*NB - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORGBR', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - IF( WANTQ ) THEN -* -* Form Q, determined by a call to DGEBRD to reduce an m-by-k -* matrix -* - IF( M.GE.K ) THEN -* -* If m >= k, assume m >= n >= k -* - CALL DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO ) -* - ELSE -* -* If m < k, assume m = n -* -* Shift the vectors which define the elementary reflectors one -* column to the right, and set the first row and column of Q -* to those of the unit matrix -* - DO 20 J = M, 2, -1 - A( 1, J ) = ZERO - DO 10 I = J + 1, M - A( I, J ) = A( I, J-1 ) - 10 CONTINUE - 20 CONTINUE - A( 1, 1 ) = ONE - DO 30 I = 2, M - A( I, 1 ) = ZERO - 30 CONTINUE - IF( M.GT.1 ) THEN -* -* Form Q(2:m,2:m) -* - CALL DORGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK, - $ LWORK, IINFO ) - END IF - END IF - ELSE -* -* Form P', determined by a call to DGEBRD to reduce a k-by-n -* matrix -* - IF( K.LT.N ) THEN -* -* If k < n, assume k <= m <= n -* - CALL DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO ) -* - ELSE -* -* If k >= n, assume m = n -* -* Shift the vectors which define the elementary reflectors one -* row downward, and set the first row and column of P' to -* those of the unit matrix -* - A( 1, 1 ) = ONE - DO 40 I = 2, N - A( I, 1 ) = ZERO - 40 CONTINUE - DO 60 J = 2, N - DO 50 I = J - 1, 2, -1 - A( I, J ) = A( I-1, J ) - 50 CONTINUE - A( 1, J ) = ZERO - 60 CONTINUE - IF( N.GT.1 ) THEN -* -* Form P'(2:n,2:n) -* - CALL DORGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK, - $ LWORK, IINFO ) - END IF - END IF - END IF - WORK( 1 ) = LWKOPT - RETURN -* -* End of DORGBR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorghr.f b/cpp/nudg++/trunk/BlasLapack/dorghr.f deleted file mode 100644 index 5d68818..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorghr.f +++ /dev/null @@ -1,165 +0,0 @@ - SUBROUTINE DORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER IHI, ILO, INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORGHR generates a real orthogonal matrix Q which is defined as the -* product of IHI-ILO elementary reflectors of order N, as returned by -* DGEHRD: -* -* Q = H(ilo) H(ilo+1) . . . H(ihi-1). -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix Q. N >= 0. -* -* ILO (input) INTEGER -* IHI (input) INTEGER -* ILO and IHI must have the same values as in the previous call -* of DGEHRD. Q is equal to the unit matrix except in the -* submatrix Q(ilo+1:ihi,ilo+1:ihi). -* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the vectors which define the elementary reflectors, -* as returned by DGEHRD. -* On exit, the N-by-N orthogonal matrix Q. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* TAU (input) DOUBLE PRECISION array, dimension (N-1) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGEHRD. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= IHI-ILO. -* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is -* the optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IINFO, J, LWKOPT, NB, NH -* .. -* .. External Subroutines .. - EXTERNAL DORGQR, XERBLA -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - NH = IHI - ILO - LQUERY = ( LWORK.EQ.-1 ) - IF( N.LT.0 ) THEN - INFO = -1 - ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN - INFO = -2 - ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LWORK.LT.MAX( 1, NH ) .AND. .NOT.LQUERY ) THEN - INFO = -8 - END IF -* - IF( INFO.EQ.0 ) THEN - NB = ILAENV( 1, 'DORGQR', ' ', NH, NH, NH, -1 ) - LWKOPT = MAX( 1, NH )*NB - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORGHR', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* -* Shift the vectors which define the elementary reflectors one -* column to the right, and set the first ilo and the last n-ihi -* rows and columns to those of the unit matrix -* - DO 40 J = IHI, ILO + 1, -1 - DO 10 I = 1, J - 1 - A( I, J ) = ZERO - 10 CONTINUE - DO 20 I = J + 1, IHI - A( I, J ) = A( I, J-1 ) - 20 CONTINUE - DO 30 I = IHI + 1, N - A( I, J ) = ZERO - 30 CONTINUE - 40 CONTINUE - DO 60 J = 1, ILO - DO 50 I = 1, N - A( I, J ) = ZERO - 50 CONTINUE - A( J, J ) = ONE - 60 CONTINUE - DO 80 J = IHI + 1, N - DO 70 I = 1, N - A( I, J ) = ZERO - 70 CONTINUE - A( J, J ) = ONE - 80 CONTINUE -* - IF( NH.GT.0 ) THEN -* -* Generate Q(ilo+1:ihi,ilo+1:ihi) -* - CALL DORGQR( NH, NH, NH, A( ILO+1, ILO+1 ), LDA, TAU( ILO ), - $ WORK, LWORK, IINFO ) - END IF - WORK( 1 ) = LWKOPT - RETURN -* -* End of DORGHR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorgl2.f b/cpp/nudg++/trunk/BlasLapack/dorgl2.f deleted file mode 100644 index 3dab19c..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorgl2.f +++ /dev/null @@ -1,134 +0,0 @@ - SUBROUTINE DORGL2( M, N, K, A, LDA, TAU, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, K, LDA, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORGL2 generates an m by n real matrix Q with orthonormal rows, -* which is defined as the first m rows of a product of k elementary -* reflectors of order n -* -* Q = H(k) . . . H(2) H(1) -* -* as returned by DGELQF. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix Q. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix Q. N >= M. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines the -* matrix Q. M >= K >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the i-th row must contain the vector which defines -* the elementary reflector H(i), for i = 1,2,...,k, as returned -* by DGELQF in the first k rows of its array argument A. -* On exit, the m-by-n matrix Q. -* -* LDA (input) INTEGER -* The first dimension of the array A. LDA >= max(1,M). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGELQF. -* -* WORK (workspace) DOUBLE PRECISION array, dimension (M) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument has an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - INTEGER I, J, L -* .. -* .. External Subroutines .. - EXTERNAL DLARF, DSCAL, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.M ) THEN - INFO = -2 - ELSE IF( K.LT.0 .OR. K.GT.M ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORGL2', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( M.LE.0 ) - $ RETURN -* - IF( K.LT.M ) THEN -* -* Initialise rows k+1:m to rows of the unit matrix -* - DO 20 J = 1, N - DO 10 L = K + 1, M - A( L, J ) = ZERO - 10 CONTINUE - IF( J.GT.K .AND. J.LE.M ) - $ A( J, J ) = ONE - 20 CONTINUE - END IF -* - DO 40 I = K, 1, -1 -* -* Apply H(i) to A(i:m,i:n) from the right -* - IF( I.LT.N ) THEN - IF( I.LT.M ) THEN - A( I, I ) = ONE - CALL DLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, - $ TAU( I ), A( I+1, I ), LDA, WORK ) - END IF - CALL DSCAL( N-I, -TAU( I ), A( I, I+1 ), LDA ) - END IF - A( I, I ) = ONE - TAU( I ) -* -* Set A(i,1:i-1) to zero -* - DO 30 L = 1, I - 1 - A( I, L ) = ZERO - 30 CONTINUE - 40 CONTINUE - RETURN -* -* End of DORGL2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorglq.f b/cpp/nudg++/trunk/BlasLapack/dorglq.f deleted file mode 100644 index b40018b..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorglq.f +++ /dev/null @@ -1,216 +0,0 @@ - SUBROUTINE DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, K, LDA, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORGLQ generates an M-by-N real matrix Q with orthonormal rows, -* which is defined as the first M rows of a product of K elementary -* reflectors of order N -* -* Q = H(k) . . . H(2) H(1) -* -* as returned by DGELQF. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix Q. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix Q. N >= M. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines the -* matrix Q. M >= K >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the i-th row must contain the vector which defines -* the elementary reflector H(i), for i = 1,2,...,k, as returned -* by DGELQF in the first k rows of its array argument A. -* On exit, the M-by-N matrix Q. -* -* LDA (input) INTEGER -* The first dimension of the array A. LDA >= max(1,M). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGELQF. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,M). -* For optimum performance LWORK >= M*NB, where NB is -* the optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument has an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK, - $ LWKOPT, NB, NBMIN, NX -* .. -* .. External Subroutines .. - EXTERNAL DLARFB, DLARFT, DORGL2, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - NB = ILAENV( 1, 'DORGLQ', ' ', M, N, K, -1 ) - LWKOPT = MAX( 1, M )*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.M ) THEN - INFO = -2 - ELSE IF( K.LT.0 .OR. K.GT.M ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -5 - ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN - INFO = -8 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORGLQ', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( M.LE.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NBMIN = 2 - NX = 0 - IWS = M - IF( NB.GT.1 .AND. NB.LT.K ) THEN -* -* Determine when to cross over from blocked to unblocked code. -* - NX = MAX( 0, ILAENV( 3, 'DORGLQ', ' ', M, N, K, -1 ) ) - IF( NX.LT.K ) THEN -* -* Determine if workspace is large enough for blocked code. -* - LDWORK = M - IWS = LDWORK*NB - IF( LWORK.LT.IWS ) THEN -* -* Not enough workspace to use optimal NB: reduce NB and -* determine the minimum value of NB. -* - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DORGLQ', ' ', M, N, K, -1 ) ) - END IF - END IF - END IF -* - IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN -* -* Use blocked code after the last block. -* The first kk rows are handled by the block method. -* - KI = ( ( K-NX-1 ) / NB )*NB - KK = MIN( K, KI+NB ) -* -* Set A(kk+1:m,1:kk) to zero. -* - DO 20 J = 1, KK - DO 10 I = KK + 1, M - A( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - ELSE - KK = 0 - END IF -* -* Use unblocked code for the last or only block. -* - IF( KK.LT.M ) - $ CALL DORGL2( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA, - $ TAU( KK+1 ), WORK, IINFO ) -* - IF( KK.GT.0 ) THEN -* -* Use blocked code -* - DO 50 I = KI + 1, 1, -NB - IB = MIN( NB, K-I+1 ) - IF( I+IB.LE.M ) THEN -* -* Form the triangular factor of the block reflector -* H = H(i) H(i+1) . . . H(i+ib-1) -* - CALL DLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ), - $ LDA, TAU( I ), WORK, LDWORK ) -* -* Apply H' to A(i+ib:m,i:n) from the right -* - CALL DLARFB( 'Right', 'Transpose', 'Forward', 'Rowwise', - $ M-I-IB+1, N-I+1, IB, A( I, I ), LDA, WORK, - $ LDWORK, A( I+IB, I ), LDA, WORK( IB+1 ), - $ LDWORK ) - END IF -* -* Apply H' to columns i:n of current block -* - CALL DORGL2( IB, N-I+1, IB, A( I, I ), LDA, TAU( I ), WORK, - $ IINFO ) -* -* Set columns 1:i-1 of current block to zero -* - DO 40 J = 1, I - 1 - DO 30 L = I, I + IB - 1 - A( L, J ) = ZERO - 30 CONTINUE - 40 CONTINUE - 50 CONTINUE - END IF -* - WORK( 1 ) = IWS - RETURN -* -* End of DORGLQ -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorgql.f b/cpp/nudg++/trunk/BlasLapack/dorgql.f deleted file mode 100644 index 6a997c9..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorgql.f +++ /dev/null @@ -1,214 +0,0 @@ - SUBROUTINE DORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, K, LDA, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORGQL generates an M-by-N real matrix Q with orthonormal columns, -* which is defined as the last N columns of a product of K elementary -* reflectors of order M -* -* Q = H(k) . . . H(2) H(1) -* -* as returned by DGEQLF. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix Q. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix Q. M >= N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines the -* matrix Q. N >= K >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the (n-k+i)-th column must contain the vector which -* defines the elementary reflector H(i), for i = 1,2,...,k, as -* returned by DGEQLF in the last k columns of its array -* argument A. -* On exit, the M-by-N matrix Q. -* -* LDA (input) INTEGER -* The first dimension of the array A. LDA >= max(1,M). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGEQLF. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* For optimum performance LWORK >= N*NB, where NB is the -* optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument has an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT, - $ NB, NBMIN, NX -* .. -* .. External Subroutines .. - EXTERNAL DLARFB, DLARFT, DORG2L, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - NB = ILAENV( 1, 'DORGQL', ' ', M, N, K, -1 ) - LWKOPT = MAX( 1, N )*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 .OR. N.GT.M ) THEN - INFO = -2 - ELSE IF( K.LT.0 .OR. K.GT.N ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -5 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -8 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORGQL', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.LE.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NBMIN = 2 - NX = 0 - IWS = N - IF( NB.GT.1 .AND. NB.LT.K ) THEN -* -* Determine when to cross over from blocked to unblocked code. -* - NX = MAX( 0, ILAENV( 3, 'DORGQL', ' ', M, N, K, -1 ) ) - IF( NX.LT.K ) THEN -* -* Determine if workspace is large enough for blocked code. -* - LDWORK = N - IWS = LDWORK*NB - IF( LWORK.LT.IWS ) THEN -* -* Not enough workspace to use optimal NB: reduce NB and -* determine the minimum value of NB. -* - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DORGQL', ' ', M, N, K, -1 ) ) - END IF - END IF - END IF -* - IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN -* -* Use blocked code after the first block. -* The last kk columns are handled by the block method. -* - KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB ) -* -* Set A(m-kk+1:m,1:n-kk) to zero. -* - DO 20 J = 1, N - KK - DO 10 I = M - KK + 1, M - A( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - ELSE - KK = 0 - END IF -* -* Use unblocked code for the first or only block. -* - CALL DORG2L( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO ) -* - IF( KK.GT.0 ) THEN -* -* Use blocked code -* - DO 50 I = K - KK + 1, K, NB - IB = MIN( NB, K-I+1 ) - IF( N-K+I.GT.1 ) THEN -* -* Form the triangular factor of the block reflector -* H = H(i+ib-1) . . . H(i+1) H(i) -* - CALL DLARFT( 'Backward', 'Columnwise', M-K+I+IB-1, IB, - $ A( 1, N-K+I ), LDA, TAU( I ), WORK, LDWORK ) -* -* Apply H to A(1:m-k+i+ib-1,1:n-k+i-1) from the left -* - CALL DLARFB( 'Left', 'No transpose', 'Backward', - $ 'Columnwise', M-K+I+IB-1, N-K+I-1, IB, - $ A( 1, N-K+I ), LDA, WORK, LDWORK, A, LDA, - $ WORK( IB+1 ), LDWORK ) - END IF -* -* Apply H to rows 1:m-k+i+ib-1 of current block -* - CALL DORG2L( M-K+I+IB-1, IB, IB, A( 1, N-K+I ), LDA, - $ TAU( I ), WORK, IINFO ) -* -* Set rows m-k+i+ib:m of current block to zero -* - DO 40 J = N - K + I, N - K + I + IB - 1 - DO 30 L = M - K + I + IB, M - A( L, J ) = ZERO - 30 CONTINUE - 40 CONTINUE - 50 CONTINUE - END IF -* - WORK( 1 ) = IWS - RETURN -* -* End of DORGQL -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorgqr.f b/cpp/nudg++/trunk/BlasLapack/dorgqr.f deleted file mode 100644 index 171dfb5..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorgqr.f +++ /dev/null @@ -1,217 +0,0 @@ - SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, K, LDA, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORGQR generates an M-by-N real matrix Q with orthonormal columns, -* which is defined as the first N columns of a product of K elementary -* reflectors of order M -* -* Q = H(1) H(2) . . . H(k) -* -* as returned by DGEQRF. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix Q. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix Q. M >= N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines the -* matrix Q. N >= K >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the i-th column must contain the vector which -* defines the elementary reflector H(i), for i = 1,2,...,k, as -* returned by DGEQRF in the first k columns of its array -* argument A. -* On exit, the M-by-N matrix Q. -* -* LDA (input) INTEGER -* The first dimension of the array A. LDA >= max(1,M). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGEQRF. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N). -* For optimum performance LWORK >= N*NB, where NB is the -* optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument has an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY - INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK, - $ LWKOPT, NB, NBMIN, NX -* .. -* .. External Subroutines .. - EXTERNAL DLARFB, DLARFT, DORG2R, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - NB = ILAENV( 1, 'DORGQR', ' ', M, N, K, -1 ) - LWKOPT = MAX( 1, N )*NB - WORK( 1 ) = LWKOPT - LQUERY = ( LWORK.EQ.-1 ) - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 .OR. N.GT.M ) THEN - INFO = -2 - ELSE IF( K.LT.0 .OR. K.GT.N ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -5 - ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN - INFO = -8 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORGQR', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.LE.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NBMIN = 2 - NX = 0 - IWS = N - IF( NB.GT.1 .AND. NB.LT.K ) THEN -* -* Determine when to cross over from blocked to unblocked code. -* - NX = MAX( 0, ILAENV( 3, 'DORGQR', ' ', M, N, K, -1 ) ) - IF( NX.LT.K ) THEN -* -* Determine if workspace is large enough for blocked code. -* - LDWORK = N - IWS = LDWORK*NB - IF( LWORK.LT.IWS ) THEN -* -* Not enough workspace to use optimal NB: reduce NB and -* determine the minimum value of NB. -* - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DORGQR', ' ', M, N, K, -1 ) ) - END IF - END IF - END IF -* - IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN -* -* Use blocked code after the last block. -* The first kk columns are handled by the block method. -* - KI = ( ( K-NX-1 ) / NB )*NB - KK = MIN( K, KI+NB ) -* -* Set A(1:kk,kk+1:n) to zero. -* - DO 20 J = KK + 1, N - DO 10 I = 1, KK - A( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - ELSE - KK = 0 - END IF -* -* Use unblocked code for the last or only block. -* - IF( KK.LT.N ) - $ CALL DORG2R( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA, - $ TAU( KK+1 ), WORK, IINFO ) -* - IF( KK.GT.0 ) THEN -* -* Use blocked code -* - DO 50 I = KI + 1, 1, -NB - IB = MIN( NB, K-I+1 ) - IF( I+IB.LE.N ) THEN -* -* Form the triangular factor of the block reflector -* H = H(i) H(i+1) . . . H(i+ib-1) -* - CALL DLARFT( 'Forward', 'Columnwise', M-I+1, IB, - $ A( I, I ), LDA, TAU( I ), WORK, LDWORK ) -* -* Apply H to A(i:m,i+ib:n) from the left -* - CALL DLARFB( 'Left', 'No transpose', 'Forward', - $ 'Columnwise', M-I+1, N-I-IB+1, IB, - $ A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ), - $ LDA, WORK( IB+1 ), LDWORK ) - END IF -* -* Apply H to rows i:m of current block -* - CALL DORG2R( M-I+1, IB, IB, A( I, I ), LDA, TAU( I ), WORK, - $ IINFO ) -* -* Set rows 1:i-1 of current block to zero -* - DO 40 J = I, I + IB - 1 - DO 30 L = 1, I - 1 - A( L, J ) = ZERO - 30 CONTINUE - 40 CONTINUE - 50 CONTINUE - END IF -* - WORK( 1 ) = IWS - RETURN -* -* End of DORGQR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorgtr.f b/cpp/nudg++/trunk/BlasLapack/dorgtr.f deleted file mode 100644 index 8723e01..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorgtr.f +++ /dev/null @@ -1,184 +0,0 @@ - SUBROUTINE DORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORGTR generates a real orthogonal matrix Q which is defined as the -* product of n-1 elementary reflectors of order N, as returned by -* DSYTRD: -* -* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1), -* -* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1). -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A contains elementary reflectors -* from DSYTRD; -* = 'L': Lower triangle of A contains elementary reflectors -* from DSYTRD. -* -* N (input) INTEGER -* The order of the matrix Q. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the vectors which define the elementary reflectors, -* as returned by DSYTRD. -* On exit, the N-by-N orthogonal matrix Q. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* TAU (input) DOUBLE PRECISION array, dimension (N-1) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DSYTRD. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= max(1,N-1). -* For optimum performance LWORK >= (N-1)*NB, where NB is -* the optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY, UPPER - INTEGER I, IINFO, J, LWKOPT, NB -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DORGQL, DORGQR, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - LQUERY = ( LWORK.EQ.-1 ) - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - ELSE IF( LWORK.LT.MAX( 1, N-1 ) .AND. .NOT.LQUERY ) THEN - INFO = -7 - END IF -* - IF( INFO.EQ.0 ) THEN - IF( UPPER ) THEN - NB = ILAENV( 1, 'DORGQL', ' ', N-1, N-1, N-1, -1 ) - ELSE - NB = ILAENV( 1, 'DORGQR', ' ', N-1, N-1, N-1, -1 ) - END IF - LWKOPT = MAX( 1, N-1 )*NB - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORGTR', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - IF( UPPER ) THEN -* -* Q was determined by a call to DSYTRD with UPLO = 'U' -* -* Shift the vectors which define the elementary reflectors one -* column to the left, and set the last row and column of Q to -* those of the unit matrix -* - DO 20 J = 1, N - 1 - DO 10 I = 1, J - 1 - A( I, J ) = A( I, J+1 ) - 10 CONTINUE - A( N, J ) = ZERO - 20 CONTINUE - DO 30 I = 1, N - 1 - A( I, N ) = ZERO - 30 CONTINUE - A( N, N ) = ONE -* -* Generate Q(1:n-1,1:n-1) -* - CALL DORGQL( N-1, N-1, N-1, A, LDA, TAU, WORK, LWORK, IINFO ) -* - ELSE -* -* Q was determined by a call to DSYTRD with UPLO = 'L'. -* -* Shift the vectors which define the elementary reflectors one -* column to the right, and set the first row and column of Q to -* those of the unit matrix -* - DO 50 J = N, 2, -1 - A( 1, J ) = ZERO - DO 40 I = J + 1, N - A( I, J ) = A( I, J-1 ) - 40 CONTINUE - 50 CONTINUE - A( 1, 1 ) = ONE - DO 60 I = 2, N - A( I, 1 ) = ZERO - 60 CONTINUE - IF( N.GT.1 ) THEN -* -* Generate Q(2:n,2:n) -* - CALL DORGQR( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK, - $ LWORK, IINFO ) - END IF - END IF - WORK( 1 ) = LWKOPT - RETURN -* -* End of DORGTR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorm2r.f b/cpp/nudg++/trunk/BlasLapack/dorm2r.f deleted file mode 100644 index d5531bc..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorm2r.f +++ /dev/null @@ -1,198 +0,0 @@ - SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, - $ WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER SIDE, TRANS - INTEGER INFO, K, LDA, LDC, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORM2R overwrites the general real m by n matrix C with -* -* Q * C if SIDE = 'L' and TRANS = 'N', or -* -* Q'* C if SIDE = 'L' and TRANS = 'T', or -* -* C * Q if SIDE = 'R' and TRANS = 'N', or -* -* C * Q' if SIDE = 'R' and TRANS = 'T', -* -* where Q is a real orthogonal matrix defined as the product of k -* elementary reflectors -* -* Q = H(1) H(2) . . . H(k) -* -* as returned by DGEQRF. Q is of order m if SIDE = 'L' and of order n -* if SIDE = 'R'. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'L': apply Q or Q' from the Left -* = 'R': apply Q or Q' from the Right -* -* TRANS (input) CHARACTER*1 -* = 'N': apply Q (No transpose) -* = 'T': apply Q' (Transpose) -* -* M (input) INTEGER -* The number of rows of the matrix C. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix C. N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines -* the matrix Q. -* If SIDE = 'L', M >= K >= 0; -* if SIDE = 'R', N >= K >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,K) -* The i-th column must contain the vector which defines the -* elementary reflector H(i), for i = 1,2,...,k, as returned by -* DGEQRF in the first k columns of its array argument A. -* A is modified by the routine but restored on exit. -* -* LDA (input) INTEGER -* The leading dimension of the array A. -* If SIDE = 'L', LDA >= max(1,M); -* if SIDE = 'R', LDA >= max(1,N). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGEQRF. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the m by n matrix C. -* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDC >= max(1,M). -* -* WORK (workspace) DOUBLE PRECISION array, dimension -* (N) if SIDE = 'L', -* (M) if SIDE = 'R' -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LEFT, NOTRAN - INTEGER I, I1, I2, I3, IC, JC, MI, NI, NQ - DOUBLE PRECISION AII -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DLARF, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - LEFT = LSAME( SIDE, 'L' ) - NOTRAN = LSAME( TRANS, 'N' ) -* -* NQ is the order of Q -* - IF( LEFT ) THEN - NQ = M - ELSE - NQ = N - END IF - IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN - INFO = -1 - ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN - INFO = -2 - ELSE IF( M.LT.0 ) THEN - INFO = -3 - ELSE IF( N.LT.0 ) THEN - INFO = -4 - ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN - INFO = -5 - ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN - INFO = -7 - ELSE IF( LDC.LT.MAX( 1, M ) ) THEN - INFO = -10 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORM2R', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) - $ RETURN -* - IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. ( .NOT.LEFT .AND. NOTRAN ) ) - $ THEN - I1 = 1 - I2 = K - I3 = 1 - ELSE - I1 = K - I2 = 1 - I3 = -1 - END IF -* - IF( LEFT ) THEN - NI = N - JC = 1 - ELSE - MI = M - IC = 1 - END IF -* - DO 10 I = I1, I2, I3 - IF( LEFT ) THEN -* -* H(i) is applied to C(i:m,1:n) -* - MI = M - I + 1 - IC = I - ELSE -* -* H(i) is applied to C(1:m,i:n) -* - NI = N - I + 1 - JC = I - END IF -* -* Apply H(i) -* - AII = A( I, I ) - A( I, I ) = ONE - CALL DLARF( SIDE, MI, NI, A( I, I ), 1, TAU( I ), C( IC, JC ), - $ LDC, WORK ) - A( I, I ) = AII - 10 CONTINUE - RETURN -* -* End of DORM2R -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dormbr.f b/cpp/nudg++/trunk/BlasLapack/dormbr.f deleted file mode 100644 index 40ffe48..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dormbr.f +++ /dev/null @@ -1,282 +0,0 @@ - SUBROUTINE DORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C, - $ LDC, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER SIDE, TRANS, VECT - INTEGER INFO, K, LDA, LDC, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* If VECT = 'Q', DORMBR overwrites the general real M-by-N matrix C -* with -* SIDE = 'L' SIDE = 'R' -* TRANS = 'N': Q * C C * Q -* TRANS = 'T': Q**T * C C * Q**T -* -* If VECT = 'P', DORMBR overwrites the general real M-by-N matrix C -* with -* SIDE = 'L' SIDE = 'R' -* TRANS = 'N': P * C C * P -* TRANS = 'T': P**T * C C * P**T -* -* Here Q and P**T are the orthogonal matrices determined by DGEBRD when -* reducing a real matrix A to bidiagonal form: A = Q * B * P**T. Q and -* P**T are defined as products of elementary reflectors H(i) and G(i) -* respectively. -* -* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the -* order of the orthogonal matrix Q or P**T that is applied. -* -* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix: -* if nq >= k, Q = H(1) H(2) . . . H(k); -* if nq < k, Q = H(1) H(2) . . . H(nq-1). -* -* If VECT = 'P', A is assumed to have been a K-by-NQ matrix: -* if k < nq, P = G(1) G(2) . . . G(k); -* if k >= nq, P = G(1) G(2) . . . G(nq-1). -* -* Arguments -* ========= -* -* VECT (input) CHARACTER*1 -* = 'Q': apply Q or Q**T; -* = 'P': apply P or P**T. -* -* SIDE (input) CHARACTER*1 -* = 'L': apply Q, Q**T, P or P**T from the Left; -* = 'R': apply Q, Q**T, P or P**T from the Right. -* -* TRANS (input) CHARACTER*1 -* = 'N': No transpose, apply Q or P; -* = 'T': Transpose, apply Q**T or P**T. -* -* M (input) INTEGER -* The number of rows of the matrix C. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix C. N >= 0. -* -* K (input) INTEGER -* If VECT = 'Q', the number of columns in the original -* matrix reduced by DGEBRD. -* If VECT = 'P', the number of rows in the original -* matrix reduced by DGEBRD. -* K >= 0. -* -* A (input) DOUBLE PRECISION array, dimension -* (LDA,min(nq,K)) if VECT = 'Q' -* (LDA,nq) if VECT = 'P' -* The vectors which define the elementary reflectors H(i) and -* G(i), whose products determine the matrices Q and P, as -* returned by DGEBRD. -* -* LDA (input) INTEGER -* The leading dimension of the array A. -* If VECT = 'Q', LDA >= max(1,nq); -* if VECT = 'P', LDA >= max(1,min(nq,K)). -* -* TAU (input) DOUBLE PRECISION array, dimension (min(nq,K)) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i) or G(i) which determines Q or P, as returned -* by DGEBRD in the array argument TAUQ or TAUP. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the M-by-N matrix C. -* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q -* or P*C or P**T*C or C*P or C*P**T. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDC >= max(1,M). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. -* If SIDE = 'L', LWORK >= max(1,N); -* if SIDE = 'R', LWORK >= max(1,M). -* For optimum performance LWORK >= N*NB if SIDE = 'L', and -* LWORK >= M*NB if SIDE = 'R', where NB is the optimal -* blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Local Scalars .. - LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN - CHARACTER TRANST - INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DORMLQ, DORMQR, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - APPLYQ = LSAME( VECT, 'Q' ) - LEFT = LSAME( SIDE, 'L' ) - NOTRAN = LSAME( TRANS, 'N' ) - LQUERY = ( LWORK.EQ.-1 ) -* -* NQ is the order of Q or P and NW is the minimum dimension of WORK -* - IF( LEFT ) THEN - NQ = M - NW = N - ELSE - NQ = N - NW = M - END IF - IF( .NOT.APPLYQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN - INFO = -1 - ELSE IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN - INFO = -2 - ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN - INFO = -3 - ELSE IF( M.LT.0 ) THEN - INFO = -4 - ELSE IF( N.LT.0 ) THEN - INFO = -5 - ELSE IF( K.LT.0 ) THEN - INFO = -6 - ELSE IF( ( APPLYQ .AND. LDA.LT.MAX( 1, NQ ) ) .OR. - $ ( .NOT.APPLYQ .AND. LDA.LT.MAX( 1, MIN( NQ, K ) ) ) ) - $ THEN - INFO = -8 - ELSE IF( LDC.LT.MAX( 1, M ) ) THEN - INFO = -11 - ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN - INFO = -13 - END IF -* - IF( INFO.EQ.0 ) THEN - IF( APPLYQ ) THEN - IF( LEFT ) THEN - NB = ILAENV( 1, 'DORMQR', SIDE // TRANS, M-1, N, M-1, - $ -1 ) - ELSE - NB = ILAENV( 1, 'DORMQR', SIDE // TRANS, M, N-1, N-1, - $ -1 ) - END IF - ELSE - IF( LEFT ) THEN - NB = ILAENV( 1, 'DORMLQ', SIDE // TRANS, M-1, N, M-1, - $ -1 ) - ELSE - NB = ILAENV( 1, 'DORMLQ', SIDE // TRANS, M, N-1, N-1, - $ -1 ) - END IF - END IF - LWKOPT = MAX( 1, NW )*NB - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORMBR', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - WORK( 1 ) = 1 - IF( M.EQ.0 .OR. N.EQ.0 ) - $ RETURN -* - IF( APPLYQ ) THEN -* -* Apply Q -* - IF( NQ.GE.K ) THEN -* -* Q was determined by a call to DGEBRD with nq >= k -* - CALL DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, - $ WORK, LWORK, IINFO ) - ELSE IF( NQ.GT.1 ) THEN -* -* Q was determined by a call to DGEBRD with nq < k -* - IF( LEFT ) THEN - MI = M - 1 - NI = N - I1 = 2 - I2 = 1 - ELSE - MI = M - NI = N - 1 - I1 = 1 - I2 = 2 - END IF - CALL DORMQR( SIDE, TRANS, MI, NI, NQ-1, A( 2, 1 ), LDA, TAU, - $ C( I1, I2 ), LDC, WORK, LWORK, IINFO ) - END IF - ELSE -* -* Apply P -* - IF( NOTRAN ) THEN - TRANST = 'T' - ELSE - TRANST = 'N' - END IF - IF( NQ.GT.K ) THEN -* -* P was determined by a call to DGEBRD with nq > k -* - CALL DORMLQ( SIDE, TRANST, M, N, K, A, LDA, TAU, C, LDC, - $ WORK, LWORK, IINFO ) - ELSE IF( NQ.GT.1 ) THEN -* -* P was determined by a call to DGEBRD with nq <= k -* - IF( LEFT ) THEN - MI = M - 1 - NI = N - I1 = 2 - I2 = 1 - ELSE - MI = M - NI = N - 1 - I1 = 1 - I2 = 2 - END IF - CALL DORMLQ( SIDE, TRANST, MI, NI, NQ-1, A( 1, 2 ), LDA, - $ TAU, C( I1, I2 ), LDC, WORK, LWORK, IINFO ) - END IF - END IF - WORK( 1 ) = LWKOPT - RETURN -* -* End of DORMBR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dorml2.f b/cpp/nudg++/trunk/BlasLapack/dorml2.f deleted file mode 100644 index d07f31b..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dorml2.f +++ /dev/null @@ -1,198 +0,0 @@ - SUBROUTINE DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, - $ WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER SIDE, TRANS - INTEGER INFO, K, LDA, LDC, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORML2 overwrites the general real m by n matrix C with -* -* Q * C if SIDE = 'L' and TRANS = 'N', or -* -* Q'* C if SIDE = 'L' and TRANS = 'T', or -* -* C * Q if SIDE = 'R' and TRANS = 'N', or -* -* C * Q' if SIDE = 'R' and TRANS = 'T', -* -* where Q is a real orthogonal matrix defined as the product of k -* elementary reflectors -* -* Q = H(k) . . . H(2) H(1) -* -* as returned by DGELQF. Q is of order m if SIDE = 'L' and of order n -* if SIDE = 'R'. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'L': apply Q or Q' from the Left -* = 'R': apply Q or Q' from the Right -* -* TRANS (input) CHARACTER*1 -* = 'N': apply Q (No transpose) -* = 'T': apply Q' (Transpose) -* -* M (input) INTEGER -* The number of rows of the matrix C. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix C. N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines -* the matrix Q. -* If SIDE = 'L', M >= K >= 0; -* if SIDE = 'R', N >= K >= 0. -* -* A (input) DOUBLE PRECISION array, dimension -* (LDA,M) if SIDE = 'L', -* (LDA,N) if SIDE = 'R' -* The i-th row must contain the vector which defines the -* elementary reflector H(i), for i = 1,2,...,k, as returned by -* DGELQF in the first k rows of its array argument A. -* A is modified by the routine but restored on exit. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,K). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGELQF. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the m by n matrix C. -* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDC >= max(1,M). -* -* WORK (workspace) DOUBLE PRECISION array, dimension -* (N) if SIDE = 'L', -* (M) if SIDE = 'R' -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LEFT, NOTRAN - INTEGER I, I1, I2, I3, IC, JC, MI, NI, NQ - DOUBLE PRECISION AII -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DLARF, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - LEFT = LSAME( SIDE, 'L' ) - NOTRAN = LSAME( TRANS, 'N' ) -* -* NQ is the order of Q -* - IF( LEFT ) THEN - NQ = M - ELSE - NQ = N - END IF - IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN - INFO = -1 - ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN - INFO = -2 - ELSE IF( M.LT.0 ) THEN - INFO = -3 - ELSE IF( N.LT.0 ) THEN - INFO = -4 - ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN - INFO = -5 - ELSE IF( LDA.LT.MAX( 1, K ) ) THEN - INFO = -7 - ELSE IF( LDC.LT.MAX( 1, M ) ) THEN - INFO = -10 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORML2', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) - $ RETURN -* - IF( ( LEFT .AND. NOTRAN ) .OR. ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) - $ THEN - I1 = 1 - I2 = K - I3 = 1 - ELSE - I1 = K - I2 = 1 - I3 = -1 - END IF -* - IF( LEFT ) THEN - NI = N - JC = 1 - ELSE - MI = M - IC = 1 - END IF -* - DO 10 I = I1, I2, I3 - IF( LEFT ) THEN -* -* H(i) is applied to C(i:m,1:n) -* - MI = M - I + 1 - IC = I - ELSE -* -* H(i) is applied to C(1:m,i:n) -* - NI = N - I + 1 - JC = I - END IF -* -* Apply H(i) -* - AII = A( I, I ) - A( I, I ) = ONE - CALL DLARF( SIDE, MI, NI, A( I, I ), LDA, TAU( I ), - $ C( IC, JC ), LDC, WORK ) - A( I, I ) = AII - 10 CONTINUE - RETURN -* -* End of DORML2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dormlq.f b/cpp/nudg++/trunk/BlasLapack/dormlq.f deleted file mode 100644 index e5242a5..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dormlq.f +++ /dev/null @@ -1,268 +0,0 @@ - SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, - $ WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER SIDE, TRANS - INTEGER INFO, K, LDA, LDC, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORMLQ overwrites the general real M-by-N matrix C with -* -* SIDE = 'L' SIDE = 'R' -* TRANS = 'N': Q * C C * Q -* TRANS = 'T': Q**T * C C * Q**T -* -* where Q is a real orthogonal matrix defined as the product of k -* elementary reflectors -* -* Q = H(k) . . . H(2) H(1) -* -* as returned by DGELQF. Q is of order M if SIDE = 'L' and of order N -* if SIDE = 'R'. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'L': apply Q or Q**T from the Left; -* = 'R': apply Q or Q**T from the Right. -* -* TRANS (input) CHARACTER*1 -* = 'N': No transpose, apply Q; -* = 'T': Transpose, apply Q**T. -* -* M (input) INTEGER -* The number of rows of the matrix C. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix C. N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines -* the matrix Q. -* If SIDE = 'L', M >= K >= 0; -* if SIDE = 'R', N >= K >= 0. -* -* A (input) DOUBLE PRECISION array, dimension -* (LDA,M) if SIDE = 'L', -* (LDA,N) if SIDE = 'R' -* The i-th row must contain the vector which defines the -* elementary reflector H(i), for i = 1,2,...,k, as returned by -* DGELQF in the first k rows of its array argument A. -* A is modified by the routine but restored on exit. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,K). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGELQF. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the M-by-N matrix C. -* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDC >= max(1,M). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. -* If SIDE = 'L', LWORK >= max(1,N); -* if SIDE = 'R', LWORK >= max(1,M). -* For optimum performance LWORK >= N*NB if SIDE = 'L', and -* LWORK >= M*NB if SIDE = 'R', where NB is the optimal -* blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - INTEGER NBMAX, LDT - PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) -* .. -* .. Local Scalars .. - LOGICAL LEFT, LQUERY, NOTRAN - CHARACTER TRANST - INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK, - $ LWKOPT, MI, NB, NBMIN, NI, NQ, NW -* .. -* .. Local Arrays .. - DOUBLE PRECISION T( LDT, NBMAX ) -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DLARFB, DLARFT, DORML2, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - LEFT = LSAME( SIDE, 'L' ) - NOTRAN = LSAME( TRANS, 'N' ) - LQUERY = ( LWORK.EQ.-1 ) -* -* NQ is the order of Q and NW is the minimum dimension of WORK -* - IF( LEFT ) THEN - NQ = M - NW = N - ELSE - NQ = N - NW = M - END IF - IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN - INFO = -1 - ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN - INFO = -2 - ELSE IF( M.LT.0 ) THEN - INFO = -3 - ELSE IF( N.LT.0 ) THEN - INFO = -4 - ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN - INFO = -5 - ELSE IF( LDA.LT.MAX( 1, K ) ) THEN - INFO = -7 - ELSE IF( LDC.LT.MAX( 1, M ) ) THEN - INFO = -10 - ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN - INFO = -12 - END IF -* - IF( INFO.EQ.0 ) THEN -* -* Determine the block size. NB may be at most NBMAX, where NBMAX -* is used to define the local array T. -* - NB = MIN( NBMAX, ILAENV( 1, 'DORMLQ', SIDE // TRANS, M, N, K, - $ -1 ) ) - LWKOPT = MAX( 1, NW )*NB - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORMLQ', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NBMIN = 2 - LDWORK = NW - IF( NB.GT.1 .AND. NB.LT.K ) THEN - IWS = NW*NB - IF( LWORK.LT.IWS ) THEN - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DORMLQ', SIDE // TRANS, M, N, K, - $ -1 ) ) - END IF - ELSE - IWS = NW - END IF -* - IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN -* -* Use unblocked code -* - CALL DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, - $ IINFO ) - ELSE -* -* Use blocked code -* - IF( ( LEFT .AND. NOTRAN ) .OR. - $ ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN - I1 = 1 - I2 = K - I3 = NB - ELSE - I1 = ( ( K-1 ) / NB )*NB + 1 - I2 = 1 - I3 = -NB - END IF -* - IF( LEFT ) THEN - NI = N - JC = 1 - ELSE - MI = M - IC = 1 - END IF -* - IF( NOTRAN ) THEN - TRANST = 'T' - ELSE - TRANST = 'N' - END IF -* - DO 10 I = I1, I2, I3 - IB = MIN( NB, K-I+1 ) -* -* Form the triangular factor of the block reflector -* H = H(i) H(i+1) . . . H(i+ib-1) -* - CALL DLARFT( 'Forward', 'Rowwise', NQ-I+1, IB, A( I, I ), - $ LDA, TAU( I ), T, LDT ) - IF( LEFT ) THEN -* -* H or H' is applied to C(i:m,1:n) -* - MI = M - I + 1 - IC = I - ELSE -* -* H or H' is applied to C(1:m,i:n) -* - NI = N - I + 1 - JC = I - END IF -* -* Apply H or H' -* - CALL DLARFB( SIDE, TRANST, 'Forward', 'Rowwise', MI, NI, IB, - $ A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, WORK, - $ LDWORK ) - 10 CONTINUE - END IF - WORK( 1 ) = LWKOPT - RETURN -* -* End of DORMLQ -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dormqr.f b/cpp/nudg++/trunk/BlasLapack/dormqr.f deleted file mode 100644 index 57315ae..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dormqr.f +++ /dev/null @@ -1,261 +0,0 @@ - SUBROUTINE DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, - $ WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER SIDE, TRANS - INTEGER INFO, K, LDA, LDC, LWORK, M, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DORMQR overwrites the general real M-by-N matrix C with -* -* SIDE = 'L' SIDE = 'R' -* TRANS = 'N': Q * C C * Q -* TRANS = 'T': Q**T * C C * Q**T -* -* where Q is a real orthogonal matrix defined as the product of k -* elementary reflectors -* -* Q = H(1) H(2) . . . H(k) -* -* as returned by DGEQRF. Q is of order M if SIDE = 'L' and of order N -* if SIDE = 'R'. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'L': apply Q or Q**T from the Left; -* = 'R': apply Q or Q**T from the Right. -* -* TRANS (input) CHARACTER*1 -* = 'N': No transpose, apply Q; -* = 'T': Transpose, apply Q**T. -* -* M (input) INTEGER -* The number of rows of the matrix C. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix C. N >= 0. -* -* K (input) INTEGER -* The number of elementary reflectors whose product defines -* the matrix Q. -* If SIDE = 'L', M >= K >= 0; -* if SIDE = 'R', N >= K >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,K) -* The i-th column must contain the vector which defines the -* elementary reflector H(i), for i = 1,2,...,k, as returned by -* DGEQRF in the first k columns of its array argument A. -* A is modified by the routine but restored on exit. -* -* LDA (input) INTEGER -* The leading dimension of the array A. -* If SIDE = 'L', LDA >= max(1,M); -* if SIDE = 'R', LDA >= max(1,N). -* -* TAU (input) DOUBLE PRECISION array, dimension (K) -* TAU(i) must contain the scalar factor of the elementary -* reflector H(i), as returned by DGEQRF. -* -* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) -* On entry, the M-by-N matrix C. -* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. -* -* LDC (input) INTEGER -* The leading dimension of the array C. LDC >= max(1,M). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. -* If SIDE = 'L', LWORK >= max(1,N); -* if SIDE = 'R', LWORK >= max(1,M). -* For optimum performance LWORK >= N*NB if SIDE = 'L', and -* LWORK >= M*NB if SIDE = 'R', where NB is the optimal -* blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - INTEGER NBMAX, LDT - PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) -* .. -* .. Local Scalars .. - LOGICAL LEFT, LQUERY, NOTRAN - INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK, - $ LWKOPT, MI, NB, NBMIN, NI, NQ, NW -* .. -* .. Local Arrays .. - DOUBLE PRECISION T( LDT, NBMAX ) -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DLARFB, DLARFT, DORM2R, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input arguments -* - INFO = 0 - LEFT = LSAME( SIDE, 'L' ) - NOTRAN = LSAME( TRANS, 'N' ) - LQUERY = ( LWORK.EQ.-1 ) -* -* NQ is the order of Q and NW is the minimum dimension of WORK -* - IF( LEFT ) THEN - NQ = M - NW = N - ELSE - NQ = N - NW = M - END IF - IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN - INFO = -1 - ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN - INFO = -2 - ELSE IF( M.LT.0 ) THEN - INFO = -3 - ELSE IF( N.LT.0 ) THEN - INFO = -4 - ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN - INFO = -5 - ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN - INFO = -7 - ELSE IF( LDC.LT.MAX( 1, M ) ) THEN - INFO = -10 - ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN - INFO = -12 - END IF -* - IF( INFO.EQ.0 ) THEN -* -* Determine the block size. NB may be at most NBMAX, where NBMAX -* is used to define the local array T. -* - NB = MIN( NBMAX, ILAENV( 1, 'DORMQR', SIDE // TRANS, M, N, K, - $ -1 ) ) - LWKOPT = MAX( 1, NW )*NB - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DORMQR', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NBMIN = 2 - LDWORK = NW - IF( NB.GT.1 .AND. NB.LT.K ) THEN - IWS = NW*NB - IF( LWORK.LT.IWS ) THEN - NB = LWORK / LDWORK - NBMIN = MAX( 2, ILAENV( 2, 'DORMQR', SIDE // TRANS, M, N, K, - $ -1 ) ) - END IF - ELSE - IWS = NW - END IF -* - IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN -* -* Use unblocked code -* - CALL DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, - $ IINFO ) - ELSE -* -* Use blocked code -* - IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. - $ ( .NOT.LEFT .AND. NOTRAN ) ) THEN - I1 = 1 - I2 = K - I3 = NB - ELSE - I1 = ( ( K-1 ) / NB )*NB + 1 - I2 = 1 - I3 = -NB - END IF -* - IF( LEFT ) THEN - NI = N - JC = 1 - ELSE - MI = M - IC = 1 - END IF -* - DO 10 I = I1, I2, I3 - IB = MIN( NB, K-I+1 ) -* -* Form the triangular factor of the block reflector -* H = H(i) H(i+1) . . . H(i+ib-1) -* - CALL DLARFT( 'Forward', 'Columnwise', NQ-I+1, IB, A( I, I ), - $ LDA, TAU( I ), T, LDT ) - IF( LEFT ) THEN -* -* H or H' is applied to C(i:m,1:n) -* - MI = M - I + 1 - IC = I - ELSE -* -* H or H' is applied to C(1:m,i:n) -* - NI = N - I + 1 - JC = I - END IF -* -* Apply H or H' -* - CALL DLARFB( SIDE, TRANS, 'Forward', 'Columnwise', MI, NI, - $ IB, A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, - $ WORK, LDWORK ) - 10 CONTINUE - END IF - WORK( 1 ) = LWKOPT - RETURN -* -* End of DORMQR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dpbtf2.f b/cpp/nudg++/trunk/BlasLapack/dpbtf2.f deleted file mode 100644 index 6f211f3..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dpbtf2.f +++ /dev/null @@ -1,195 +0,0 @@ - SUBROUTINE DPBTF2( UPLO, N, KD, AB, LDAB, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, KD, LDAB, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION AB( LDAB, * ) -* .. -* -* Purpose -* ======= -* -* DPBTF2 computes the Cholesky factorization of a real symmetric -* positive definite band matrix A. -* -* The factorization has the form -* A = U' * U , if UPLO = 'U', or -* A = L * L', if UPLO = 'L', -* where U is an upper triangular matrix, U' is the transpose of U, and -* L is lower triangular. -* -* This is the unblocked version of the algorithm, calling Level 2 BLAS. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* Specifies whether the upper or lower triangular part of the -* symmetric matrix A is stored: -* = 'U': Upper triangular -* = 'L': Lower triangular -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* KD (input) INTEGER -* The number of super-diagonals of the matrix A if UPLO = 'U', -* or the number of sub-diagonals if UPLO = 'L'. KD >= 0. -* -* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N) -* On entry, the upper or lower triangle of the symmetric band -* matrix A, stored in the first KD+1 rows of the array. The -* j-th column of A is stored in the j-th column of the array AB -* as follows: -* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; -* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). -* -* On exit, if INFO = 0, the triangular factor U or L from the -* Cholesky factorization A = U'*U or A = L*L' of the band -* matrix A, in the same storage format as A. -* -* LDAB (input) INTEGER -* The leading dimension of the array AB. LDAB >= KD+1. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -k, the k-th argument had an illegal value -* > 0: if INFO = k, the leading minor of order k is not -* positive definite, and the factorization could not be -* completed. -* -* Further Details -* =============== -* -* The band storage scheme is illustrated by the following example, when -* N = 6, KD = 2, and UPLO = 'U': -* -* On entry: On exit: -* -* * * a13 a24 a35 a46 * * u13 u24 u35 u46 -* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 -* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 -* -* Similarly, if UPLO = 'L' the format of A is as follows: -* -* On entry: On exit: -* -* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 -* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * -* a31 a42 a53 a64 * * l31 l42 l53 l64 * * -* -* Array elements marked * are not used by the routine. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL UPPER - INTEGER J, KLD, KN - DOUBLE PRECISION AJJ -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DSCAL, DSYR, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN, SQRT -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( KD.LT.0 ) THEN - INFO = -3 - ELSE IF( LDAB.LT.KD+1 ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DPBTF2', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* - KLD = MAX( 1, LDAB-1 ) -* - IF( UPPER ) THEN -* -* Compute the Cholesky factorization A = U'*U. -* - DO 10 J = 1, N -* -* Compute U(J,J) and test for non-positive-definiteness. -* - AJJ = AB( KD+1, J ) - IF( AJJ.LE.ZERO ) - $ GO TO 30 - AJJ = SQRT( AJJ ) - AB( KD+1, J ) = AJJ -* -* Compute elements J+1:J+KN of row J and update the -* trailing submatrix within the band. -* - KN = MIN( KD, N-J ) - IF( KN.GT.0 ) THEN - CALL DSCAL( KN, ONE / AJJ, AB( KD, J+1 ), KLD ) - CALL DSYR( 'Upper', KN, -ONE, AB( KD, J+1 ), KLD, - $ AB( KD+1, J+1 ), KLD ) - END IF - 10 CONTINUE - ELSE -* -* Compute the Cholesky factorization A = L*L'. -* - DO 20 J = 1, N -* -* Compute L(J,J) and test for non-positive-definiteness. -* - AJJ = AB( 1, J ) - IF( AJJ.LE.ZERO ) - $ GO TO 30 - AJJ = SQRT( AJJ ) - AB( 1, J ) = AJJ -* -* Compute elements J+1:J+KN of column J and update the -* trailing submatrix within the band. -* - KN = MIN( KD, N-J ) - IF( KN.GT.0 ) THEN - CALL DSCAL( KN, ONE / AJJ, AB( 2, J ), 1 ) - CALL DSYR( 'Lower', KN, -ONE, AB( 2, J ), 1, - $ AB( 1, J+1 ), KLD ) - END IF - 20 CONTINUE - END IF - RETURN -* - 30 CONTINUE - INFO = J - RETURN -* -* End of DPBTF2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dpbtrf.f b/cpp/nudg++/trunk/BlasLapack/dpbtrf.f deleted file mode 100644 index 6974eb7..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dpbtrf.f +++ /dev/null @@ -1,365 +0,0 @@ - SUBROUTINE DPBTRF( UPLO, N, KD, AB, LDAB, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, KD, LDAB, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION AB( LDAB, * ) -* .. -* -* Purpose -* ======= -* -* DPBTRF computes the Cholesky factorization of a real symmetric -* positive definite band matrix A. -* -* The factorization has the form -* A = U**T * U, if UPLO = 'U', or -* A = L * L**T, if UPLO = 'L', -* where U is an upper triangular matrix and L is lower triangular. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A is stored; -* = 'L': Lower triangle of A is stored. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* KD (input) INTEGER -* The number of superdiagonals of the matrix A if UPLO = 'U', -* or the number of subdiagonals if UPLO = 'L'. KD >= 0. -* -* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N) -* On entry, the upper or lower triangle of the symmetric band -* matrix A, stored in the first KD+1 rows of the array. The -* j-th column of A is stored in the j-th column of the array AB -* as follows: -* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; -* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). -* -* On exit, if INFO = 0, the triangular factor U or L from the -* Cholesky factorization A = U**T*U or A = L*L**T of the band -* matrix A, in the same storage format as A. -* -* LDAB (input) INTEGER -* The leading dimension of the array AB. LDAB >= KD+1. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, the leading minor of order i is not -* positive definite, and the factorization could not be -* completed. -* -* Further Details -* =============== -* -* The band storage scheme is illustrated by the following example, when -* N = 6, KD = 2, and UPLO = 'U': -* -* On entry: On exit: -* -* * * a13 a24 a35 a46 * * u13 u24 u35 u46 -* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 -* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 -* -* Similarly, if UPLO = 'L' the format of A is as follows: -* -* On entry: On exit: -* -* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 -* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * -* a31 a42 a53 a64 * * l31 l42 l53 l64 * * -* -* Array elements marked * are not used by the routine. -* -* Contributed by -* Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989 -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) - INTEGER NBMAX, LDWORK - PARAMETER ( NBMAX = 32, LDWORK = NBMAX+1 ) -* .. -* .. Local Scalars .. - INTEGER I, I2, I3, IB, II, J, JJ, NB -* .. -* .. Local Arrays .. - DOUBLE PRECISION WORK( LDWORK, NBMAX ) -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DGEMM, DPBTF2, DPOTF2, DSYRK, DTRSM, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF( ( .NOT.LSAME( UPLO, 'U' ) ) .AND. - $ ( .NOT.LSAME( UPLO, 'L' ) ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( KD.LT.0 ) THEN - INFO = -3 - ELSE IF( LDAB.LT.KD+1 ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DPBTRF', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Determine the block size for this environment -* - NB = ILAENV( 1, 'DPBTRF', UPLO, N, KD, -1, -1 ) -* -* The block size must not exceed the semi-bandwidth KD, and must not -* exceed the limit set by the size of the local array WORK. -* - NB = MIN( NB, NBMAX ) -* - IF( NB.LE.1 .OR. NB.GT.KD ) THEN -* -* Use unblocked code -* - CALL DPBTF2( UPLO, N, KD, AB, LDAB, INFO ) - ELSE -* -* Use blocked code -* - IF( LSAME( UPLO, 'U' ) ) THEN -* -* Compute the Cholesky factorization of a symmetric band -* matrix, given the upper triangle of the matrix in band -* storage. -* -* Zero the upper triangle of the work array. -* - DO 20 J = 1, NB - DO 10 I = 1, J - 1 - WORK( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE -* -* Process the band matrix one diagonal block at a time. -* - DO 70 I = 1, N, NB - IB = MIN( NB, N-I+1 ) -* -* Factorize the diagonal block -* - CALL DPOTF2( UPLO, IB, AB( KD+1, I ), LDAB-1, II ) - IF( II.NE.0 ) THEN - INFO = I + II - 1 - GO TO 150 - END IF - IF( I+IB.LE.N ) THEN -* -* Update the relevant part of the trailing submatrix. -* If A11 denotes the diagonal block which has just been -* factorized, then we need to update the remaining -* blocks in the diagram: -* -* A11 A12 A13 -* A22 A23 -* A33 -* -* The numbers of rows and columns in the partitioning -* are IB, I2, I3 respectively. The blocks A12, A22 and -* A23 are empty if IB = KD. The upper triangle of A13 -* lies outside the band. -* - I2 = MIN( KD-IB, N-I-IB+1 ) - I3 = MIN( IB, N-I-KD+1 ) -* - IF( I2.GT.0 ) THEN -* -* Update A12 -* - CALL DTRSM( 'Left', 'Upper', 'Transpose', - $ 'Non-unit', IB, I2, ONE, AB( KD+1, I ), - $ LDAB-1, AB( KD+1-IB, I+IB ), LDAB-1 ) -* -* Update A22 -* - CALL DSYRK( 'Upper', 'Transpose', I2, IB, -ONE, - $ AB( KD+1-IB, I+IB ), LDAB-1, ONE, - $ AB( KD+1, I+IB ), LDAB-1 ) - END IF -* - IF( I3.GT.0 ) THEN -* -* Copy the lower triangle of A13 into the work array. -* - DO 40 JJ = 1, I3 - DO 30 II = JJ, IB - WORK( II, JJ ) = AB( II-JJ+1, JJ+I+KD-1 ) - 30 CONTINUE - 40 CONTINUE -* -* Update A13 (in the work array). -* - CALL DTRSM( 'Left', 'Upper', 'Transpose', - $ 'Non-unit', IB, I3, ONE, AB( KD+1, I ), - $ LDAB-1, WORK, LDWORK ) -* -* Update A23 -* - IF( I2.GT.0 ) - $ CALL DGEMM( 'Transpose', 'No Transpose', I2, I3, - $ IB, -ONE, AB( KD+1-IB, I+IB ), - $ LDAB-1, WORK, LDWORK, ONE, - $ AB( 1+IB, I+KD ), LDAB-1 ) -* -* Update A33 -* - CALL DSYRK( 'Upper', 'Transpose', I3, IB, -ONE, - $ WORK, LDWORK, ONE, AB( KD+1, I+KD ), - $ LDAB-1 ) -* -* Copy the lower triangle of A13 back into place. -* - DO 60 JJ = 1, I3 - DO 50 II = JJ, IB - AB( II-JJ+1, JJ+I+KD-1 ) = WORK( II, JJ ) - 50 CONTINUE - 60 CONTINUE - END IF - END IF - 70 CONTINUE - ELSE -* -* Compute the Cholesky factorization of a symmetric band -* matrix, given the lower triangle of the matrix in band -* storage. -* -* Zero the lower triangle of the work array. -* - DO 90 J = 1, NB - DO 80 I = J + 1, NB - WORK( I, J ) = ZERO - 80 CONTINUE - 90 CONTINUE -* -* Process the band matrix one diagonal block at a time. -* - DO 140 I = 1, N, NB - IB = MIN( NB, N-I+1 ) -* -* Factorize the diagonal block -* - CALL DPOTF2( UPLO, IB, AB( 1, I ), LDAB-1, II ) - IF( II.NE.0 ) THEN - INFO = I + II - 1 - GO TO 150 - END IF - IF( I+IB.LE.N ) THEN -* -* Update the relevant part of the trailing submatrix. -* If A11 denotes the diagonal block which has just been -* factorized, then we need to update the remaining -* blocks in the diagram: -* -* A11 -* A21 A22 -* A31 A32 A33 -* -* The numbers of rows and columns in the partitioning -* are IB, I2, I3 respectively. The blocks A21, A22 and -* A32 are empty if IB = KD. The lower triangle of A31 -* lies outside the band. -* - I2 = MIN( KD-IB, N-I-IB+1 ) - I3 = MIN( IB, N-I-KD+1 ) -* - IF( I2.GT.0 ) THEN -* -* Update A21 -* - CALL DTRSM( 'Right', 'Lower', 'Transpose', - $ 'Non-unit', I2, IB, ONE, AB( 1, I ), - $ LDAB-1, AB( 1+IB, I ), LDAB-1 ) -* -* Update A22 -* - CALL DSYRK( 'Lower', 'No Transpose', I2, IB, -ONE, - $ AB( 1+IB, I ), LDAB-1, ONE, - $ AB( 1, I+IB ), LDAB-1 ) - END IF -* - IF( I3.GT.0 ) THEN -* -* Copy the upper triangle of A31 into the work array. -* - DO 110 JJ = 1, IB - DO 100 II = 1, MIN( JJ, I3 ) - WORK( II, JJ ) = AB( KD+1-JJ+II, JJ+I-1 ) - 100 CONTINUE - 110 CONTINUE -* -* Update A31 (in the work array). -* - CALL DTRSM( 'Right', 'Lower', 'Transpose', - $ 'Non-unit', I3, IB, ONE, AB( 1, I ), - $ LDAB-1, WORK, LDWORK ) -* -* Update A32 -* - IF( I2.GT.0 ) - $ CALL DGEMM( 'No transpose', 'Transpose', I3, I2, - $ IB, -ONE, WORK, LDWORK, - $ AB( 1+IB, I ), LDAB-1, ONE, - $ AB( 1+KD-IB, I+IB ), LDAB-1 ) -* -* Update A33 -* - CALL DSYRK( 'Lower', 'No Transpose', I3, IB, -ONE, - $ WORK, LDWORK, ONE, AB( 1, I+KD ), - $ LDAB-1 ) -* -* Copy the upper triangle of A31 back into place. -* - DO 130 JJ = 1, IB - DO 120 II = 1, MIN( JJ, I3 ) - AB( KD+1-JJ+II, JJ+I-1 ) = WORK( II, JJ ) - 120 CONTINUE - 130 CONTINUE - END IF - END IF - 140 CONTINUE - END IF - END IF - RETURN -* - 150 CONTINUE - RETURN -* -* End of DPBTRF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dpbtrs.f b/cpp/nudg++/trunk/BlasLapack/dpbtrs.f deleted file mode 100644 index d8bedd2..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dpbtrs.f +++ /dev/null @@ -1,146 +0,0 @@ - SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, KD, LDAB, LDB, N, NRHS -* .. -* .. Array Arguments .. - DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DPBTRS solves a system of linear equations A*X = B with a symmetric -* positive definite band matrix A using the Cholesky factorization -* A = U**T*U or A = L*L**T computed by DPBTRF. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangular factor stored in AB; -* = 'L': Lower triangular factor stored in AB. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* KD (input) INTEGER -* The number of superdiagonals of the matrix A if UPLO = 'U', -* or the number of subdiagonals if UPLO = 'L'. KD >= 0. -* -* NRHS (input) INTEGER -* The number of right hand sides, i.e., the number of columns -* of the matrix B. NRHS >= 0. -* -* AB (input) DOUBLE PRECISION array, dimension (LDAB,N) -* The triangular factor U or L from the Cholesky factorization -* A = U**T*U or A = L*L**T of the band matrix A, stored in the -* first KD+1 rows of the array. The j-th column of U or L is -* stored in the j-th column of the array AB as follows: -* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j; -* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd). -* -* LDAB (input) INTEGER -* The leading dimension of the array AB. LDAB >= KD+1. -* -* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) -* On entry, the right hand side matrix B. -* On exit, the solution matrix X. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Local Scalars .. - LOGICAL UPPER - INTEGER J -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DTBSV, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( KD.LT.0 ) THEN - INFO = -3 - ELSE IF( NRHS.LT.0 ) THEN - INFO = -4 - ELSE IF( LDAB.LT.KD+1 ) THEN - INFO = -6 - ELSE IF( LDB.LT.MAX( 1, N ) ) THEN - INFO = -8 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DPBTRS', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 .OR. NRHS.EQ.0 ) - $ RETURN -* - IF( UPPER ) THEN -* -* Solve A*X = B where A = U'*U. -* - DO 10 J = 1, NRHS -* -* Solve U'*X = B, overwriting B with X. -* - CALL DTBSV( 'Upper', 'Transpose', 'Non-unit', N, KD, AB, - $ LDAB, B( 1, J ), 1 ) -* -* Solve U*X = B, overwriting B with X. -* - CALL DTBSV( 'Upper', 'No transpose', 'Non-unit', N, KD, AB, - $ LDAB, B( 1, J ), 1 ) - 10 CONTINUE - ELSE -* -* Solve A*X = B where A = L*L'. -* - DO 20 J = 1, NRHS -* -* Solve L*X = B, overwriting B with X. -* - CALL DTBSV( 'Lower', 'No transpose', 'Non-unit', N, KD, AB, - $ LDAB, B( 1, J ), 1 ) -* -* Solve L'*X = B, overwriting B with X. -* - CALL DTBSV( 'Lower', 'Transpose', 'Non-unit', N, KD, AB, - $ LDAB, B( 1, J ), 1 ) - 20 CONTINUE - END IF -* - RETURN -* -* End of DPBTRS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dposv.f b/cpp/nudg++/trunk/BlasLapack/dposv.f deleted file mode 100644 index c3b59c8..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dposv.f +++ /dev/null @@ -1,122 +0,0 @@ - SUBROUTINE DPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, LDB, N, NRHS -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DPOSV computes the solution to a real system of linear equations -* A * X = B, -* where A is an N-by-N symmetric positive definite matrix and X and B -* are N-by-NRHS matrices. -* -* The Cholesky decomposition is used to factor A as -* A = U**T* U, if UPLO = 'U', or -* A = L * L**T, if UPLO = 'L', -* where U is an upper triangular matrix and L is a lower triangular -* matrix. The factored form of A is then used to solve the system of -* equations A * X = B. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A is stored; -* = 'L': Lower triangle of A is stored. -* -* N (input) INTEGER -* The number of linear equations, i.e., the order of the -* matrix A. N >= 0. -* -* NRHS (input) INTEGER -* The number of right hand sides, i.e., the number of columns -* of the matrix B. NRHS >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the symmetric matrix A. If UPLO = 'U', the leading -* N-by-N upper triangular part of A contains the upper -* triangular part of the matrix A, and the strictly lower -* triangular part of A is not referenced. If UPLO = 'L', the -* leading N-by-N lower triangular part of A contains the lower -* triangular part of the matrix A, and the strictly upper -* triangular part of A is not referenced. -* -* On exit, if INFO = 0, the factor U or L from the Cholesky -* factorization A = U**T*U or A = L*L**T. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) -* On entry, the N-by-NRHS right hand side matrix B. -* On exit, if INFO = 0, the N-by-NRHS solution matrix X. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, the leading minor of order i of A is not -* positive definite, so the factorization could not be -* completed, and the solution has not been computed. -* -* ===================================================================== -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DPOTRF, DPOTRS, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( NRHS.LT.0 ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LDB.LT.MAX( 1, N ) ) THEN - INFO = -7 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DPOSV ', -INFO ) - RETURN - END IF -* -* Compute the Cholesky factorization A = U'*U or A = L*L'. -* - CALL DPOTRF( UPLO, N, A, LDA, INFO ) - IF( INFO.EQ.0 ) THEN -* -* Solve the system A*X = B, overwriting B with X. -* - CALL DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO ) -* - END IF - RETURN -* -* End of DPOSV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dpotf2.f b/cpp/nudg++/trunk/BlasLapack/dpotf2.f deleted file mode 100644 index f9e0de0..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dpotf2.f +++ /dev/null @@ -1,168 +0,0 @@ - SUBROUTINE DPOTF2( UPLO, N, A, LDA, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* DPOTF2 computes the Cholesky factorization of a real symmetric -* positive definite matrix A. -* -* The factorization has the form -* A = U' * U , if UPLO = 'U', or -* A = L * L', if UPLO = 'L', -* where U is an upper triangular matrix and L is lower triangular. -* -* This is the unblocked version of the algorithm, calling Level 2 BLAS. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* Specifies whether the upper or lower triangular part of the -* symmetric matrix A is stored. -* = 'U': Upper triangular -* = 'L': Lower triangular -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the symmetric matrix A. If UPLO = 'U', the leading -* n by n upper triangular part of A contains the upper -* triangular part of the matrix A, and the strictly lower -* triangular part of A is not referenced. If UPLO = 'L', the -* leading n by n lower triangular part of A contains the lower -* triangular part of the matrix A, and the strictly upper -* triangular part of A is not referenced. -* -* On exit, if INFO = 0, the factor U or L from the Cholesky -* factorization A = U'*U or A = L*L'. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -k, the k-th argument had an illegal value -* > 0: if INFO = k, the leading minor of order k is not -* positive definite, and the factorization could not be -* completed. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL UPPER - INTEGER J - DOUBLE PRECISION AJJ -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DDOT - EXTERNAL LSAME, DDOT -* .. -* .. External Subroutines .. - EXTERNAL DGEMV, DSCAL, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, SQRT -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DPOTF2', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* - IF( UPPER ) THEN -* -* Compute the Cholesky factorization A = U'*U. -* - DO 10 J = 1, N -* -* Compute U(J,J) and test for non-positive-definiteness. -* - AJJ = A( J, J ) - DDOT( J-1, A( 1, J ), 1, A( 1, J ), 1 ) - IF( AJJ.LE.ZERO ) THEN - A( J, J ) = AJJ - GO TO 30 - END IF - AJJ = SQRT( AJJ ) - A( J, J ) = AJJ -* -* Compute elements J+1:N of row J. -* - IF( J.LT.N ) THEN - CALL DGEMV( 'Transpose', J-1, N-J, -ONE, A( 1, J+1 ), - $ LDA, A( 1, J ), 1, ONE, A( J, J+1 ), LDA ) - CALL DSCAL( N-J, ONE / AJJ, A( J, J+1 ), LDA ) - END IF - 10 CONTINUE - ELSE -* -* Compute the Cholesky factorization A = L*L'. -* - DO 20 J = 1, N -* -* Compute L(J,J) and test for non-positive-definiteness. -* - AJJ = A( J, J ) - DDOT( J-1, A( J, 1 ), LDA, A( J, 1 ), - $ LDA ) - IF( AJJ.LE.ZERO ) THEN - A( J, J ) = AJJ - GO TO 30 - END IF - AJJ = SQRT( AJJ ) - A( J, J ) = AJJ -* -* Compute elements J+1:N of column J. -* - IF( J.LT.N ) THEN - CALL DGEMV( 'No transpose', N-J, J-1, -ONE, A( J+1, 1 ), - $ LDA, A( J, 1 ), LDA, ONE, A( J+1, J ), 1 ) - CALL DSCAL( N-J, ONE / AJJ, A( J+1, J ), 1 ) - END IF - 20 CONTINUE - END IF - GO TO 40 -* - 30 CONTINUE - INFO = J -* - 40 CONTINUE - RETURN -* -* End of DPOTF2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dpotrf.f b/cpp/nudg++/trunk/BlasLapack/dpotrf.f deleted file mode 100644 index c4b0cb4..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dpotrf.f +++ /dev/null @@ -1,184 +0,0 @@ - SUBROUTINE DPOTRF( UPLO, N, A, LDA, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* DPOTRF computes the Cholesky factorization of a real symmetric -* positive definite matrix A. -* -* The factorization has the form -* A = U**T * U, if UPLO = 'U', or -* A = L * L**T, if UPLO = 'L', -* where U is an upper triangular matrix and L is lower triangular. -* -* This is the block version of the algorithm, calling Level 3 BLAS. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A is stored; -* = 'L': Lower triangle of A is stored. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the symmetric matrix A. If UPLO = 'U', the leading -* N-by-N upper triangular part of A contains the upper -* triangular part of the matrix A, and the strictly lower -* triangular part of A is not referenced. If UPLO = 'L', the -* leading N-by-N lower triangular part of A contains the lower -* triangular part of the matrix A, and the strictly upper -* triangular part of A is not referenced. -* -* On exit, if INFO = 0, the factor U or L from the Cholesky -* factorization A = U**T*U or A = L*L**T. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, the leading minor of order i is not -* positive definite, and the factorization could not be -* completed. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL UPPER - INTEGER J, JB, NB -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. External Subroutines .. - EXTERNAL DGEMM, DPOTF2, DSYRK, DTRSM, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DPOTRF', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Determine the block size for this environment. -* - NB = ILAENV( 1, 'DPOTRF', UPLO, N, -1, -1, -1 ) - IF( NB.LE.1 .OR. NB.GE.N ) THEN -* -* Use unblocked code. -* - CALL DPOTF2( UPLO, N, A, LDA, INFO ) - ELSE -* -* Use blocked code. -* - IF( UPPER ) THEN -* -* Compute the Cholesky factorization A = U'*U. -* - DO 10 J = 1, N, NB -* -* Update and factorize the current diagonal block and test -* for non-positive-definiteness. -* - JB = MIN( NB, N-J+1 ) - CALL DSYRK( 'Upper', 'Transpose', JB, J-1, -ONE, - $ A( 1, J ), LDA, ONE, A( J, J ), LDA ) - CALL DPOTF2( 'Upper', JB, A( J, J ), LDA, INFO ) - IF( INFO.NE.0 ) - $ GO TO 30 - IF( J+JB.LE.N ) THEN -* -* Compute the current block row. -* - CALL DGEMM( 'Transpose', 'No transpose', JB, N-J-JB+1, - $ J-1, -ONE, A( 1, J ), LDA, A( 1, J+JB ), - $ LDA, ONE, A( J, J+JB ), LDA ) - CALL DTRSM( 'Left', 'Upper', 'Transpose', 'Non-unit', - $ JB, N-J-JB+1, ONE, A( J, J ), LDA, - $ A( J, J+JB ), LDA ) - END IF - 10 CONTINUE -* - ELSE -* -* Compute the Cholesky factorization A = L*L'. -* - DO 20 J = 1, N, NB -* -* Update and factorize the current diagonal block and test -* for non-positive-definiteness. -* - JB = MIN( NB, N-J+1 ) - CALL DSYRK( 'Lower', 'No transpose', JB, J-1, -ONE, - $ A( J, 1 ), LDA, ONE, A( J, J ), LDA ) - CALL DPOTF2( 'Lower', JB, A( J, J ), LDA, INFO ) - IF( INFO.NE.0 ) - $ GO TO 30 - IF( J+JB.LE.N ) THEN -* -* Compute the current block column. -* - CALL DGEMM( 'No transpose', 'Transpose', N-J-JB+1, JB, - $ J-1, -ONE, A( J+JB, 1 ), LDA, A( J, 1 ), - $ LDA, ONE, A( J+JB, J ), LDA ) - CALL DTRSM( 'Right', 'Lower', 'Transpose', 'Non-unit', - $ N-J-JB+1, JB, ONE, A( J, J ), LDA, - $ A( J+JB, J ), LDA ) - END IF - 20 CONTINUE - END IF - END IF - GO TO 40 -* - 30 CONTINUE - INFO = INFO + J - 1 -* - 40 CONTINUE - RETURN -* -* End of DPOTRF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dpotrs.f b/cpp/nudg++/trunk/BlasLapack/dpotrs.f deleted file mode 100644 index ae3ab2f..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dpotrs.f +++ /dev/null @@ -1,133 +0,0 @@ - SUBROUTINE DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, LDB, N, NRHS -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DPOTRS solves a system of linear equations A*X = B with a symmetric -* positive definite matrix A using the Cholesky factorization -* A = U**T*U or A = L*L**T computed by DPOTRF. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A is stored; -* = 'L': Lower triangle of A is stored. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* NRHS (input) INTEGER -* The number of right hand sides, i.e., the number of columns -* of the matrix B. NRHS >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The triangular factor U or L from the Cholesky factorization -* A = U**T*U or A = L*L**T, as computed by DPOTRF. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) -* On entry, the right hand side matrix B. -* On exit, the solution matrix X. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,N). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL UPPER -* .. -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. -* .. External Subroutines .. - EXTERNAL DTRSM, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( NRHS.LT.0 ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LDB.LT.MAX( 1, N ) ) THEN - INFO = -7 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DPOTRS', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 .OR. NRHS.EQ.0 ) - $ RETURN -* - IF( UPPER ) THEN -* -* Solve A*X = B where A = U'*U. -* -* Solve U'*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Upper', 'Transpose', 'Non-unit', N, NRHS, - $ ONE, A, LDA, B, LDB ) -* -* Solve U*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', N, - $ NRHS, ONE, A, LDA, B, LDB ) - ELSE -* -* Solve A*X = B where A = L*L'. -* -* Solve L*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Non-unit', N, - $ NRHS, ONE, A, LDA, B, LDB ) -* -* Solve L'*X = B, overwriting B with X. -* - CALL DTRSM( 'Left', 'Lower', 'Transpose', 'Non-unit', N, NRHS, - $ ONE, A, LDA, B, LDB ) - END IF -* - RETURN -* -* End of DPOTRS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/drot.f b/cpp/nudg++/trunk/BlasLapack/drot.f deleted file mode 100644 index b9ea3bd..0000000 --- a/cpp/nudg++/trunk/BlasLapack/drot.f +++ /dev/null @@ -1,37 +0,0 @@ - subroutine drot (n,dx,incx,dy,incy,c,s) -c -c applies a plane rotation. -c jack dongarra, linpack, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision dx(*),dy(*),dtemp,c,s - integer i,incx,incy,ix,iy,n -c - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments not equal -c to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - dtemp = c*dx(ix) + s*dy(iy) - dy(iy) = c*dy(iy) - s*dx(ix) - dx(ix) = dtemp - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c - 20 do 30 i = 1,n - dtemp = c*dx(i) + s*dy(i) - dy(i) = c*dy(i) - s*dx(i) - dx(i) = dtemp - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/drscl.f b/cpp/nudg++/trunk/BlasLapack/drscl.f deleted file mode 100644 index d268c23..0000000 --- a/cpp/nudg++/trunk/BlasLapack/drscl.f +++ /dev/null @@ -1,115 +0,0 @@ - SUBROUTINE DRSCL( N, SA, SX, INCX ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - INTEGER INCX, N - DOUBLE PRECISION SA -* .. -* .. Array Arguments .. - DOUBLE PRECISION SX( * ) -* .. -* -* Purpose -* ======= -* -* DRSCL multiplies an n-element real vector x by the real scalar 1/a. -* This is done without overflow or underflow as long as -* the final result x/a does not overflow or underflow. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of components of the vector x. -* -* SA (input) DOUBLE PRECISION -* The scalar a which is used to divide each component of x. -* SA must be >= 0, or the subroutine will divide by zero. -* -* SX (input/output) DOUBLE PRECISION array, dimension -* (1+(N-1)*abs(INCX)) -* The n-element vector x. -* -* INCX (input) INTEGER -* The increment between successive values of the vector SX. -* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL DONE - DOUBLE PRECISION BIGNUM, CDEN, CDEN1, CNUM, CNUM1, MUL, SMLNUM -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DSCAL -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS -* .. -* .. Executable Statements .. -* -* Quick return if possible -* - IF( N.LE.0 ) - $ RETURN -* -* Get machine parameters -* - SMLNUM = DLAMCH( 'S' ) - BIGNUM = ONE / SMLNUM - CALL DLABAD( SMLNUM, BIGNUM ) -* -* Initialize the denominator to SA and the numerator to 1. -* - CDEN = SA - CNUM = ONE -* - 10 CONTINUE - CDEN1 = CDEN*SMLNUM - CNUM1 = CNUM / BIGNUM - IF( ABS( CDEN1 ).GT.ABS( CNUM ) .AND. CNUM.NE.ZERO ) THEN -* -* Pre-multiply X by SMLNUM if CDEN is large compared to CNUM. -* - MUL = SMLNUM - DONE = .FALSE. - CDEN = CDEN1 - ELSE IF( ABS( CNUM1 ).GT.ABS( CDEN ) ) THEN -* -* Pre-multiply X by BIGNUM if CDEN is small compared to CNUM. -* - MUL = BIGNUM - DONE = .FALSE. - CNUM = CNUM1 - ELSE -* -* Multiply X by CNUM / CDEN and return. -* - MUL = CNUM / CDEN - DONE = .TRUE. - END IF -* -* Scale the vector X by MUL -* - CALL DSCAL( N, MUL, SX, INCX ) -* - IF( .NOT.DONE ) - $ GO TO 10 -* - RETURN -* -* End of DRSCL -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dscal.f b/cpp/nudg++/trunk/BlasLapack/dscal.f deleted file mode 100644 index e1467fa..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dscal.f +++ /dev/null @@ -1,43 +0,0 @@ - subroutine dscal(n,da,dx,incx) -c -c scales a vector by a constant. -c uses unrolled loops for increment equal to one. -c jack dongarra, linpack, 3/11/78. -c modified 3/93 to return if incx .le. 0. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision da,dx(*) - integer i,incx,m,mp1,n,nincx -c - if( n.le.0 .or. incx.le.0 )return - if(incx.eq.1)go to 20 -c -c code for increment not equal to 1 -c - nincx = n*incx - do 10 i = 1,nincx,incx - dx(i) = da*dx(i) - 10 continue - return -c -c code for increment equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n,5) - if( m .eq. 0 ) go to 40 - do 30 i = 1,m - dx(i) = da*dx(i) - 30 continue - if( n .lt. 5 ) return - 40 mp1 = m + 1 - do 50 i = mp1,n,5 - dx(i) = da*dx(i) - dx(i + 1) = da*dx(i + 1) - dx(i + 2) = da*dx(i + 2) - dx(i + 3) = da*dx(i + 3) - dx(i + 4) = da*dx(i + 4) - 50 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/dsteqr.f b/cpp/nudg++/trunk/BlasLapack/dsteqr.f deleted file mode 100644 index 20faca1..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsteqr.f +++ /dev/null @@ -1,501 +0,0 @@ - SUBROUTINE DSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - CHARACTER COMPZ - INTEGER INFO, LDZ, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * ) -* .. -* -* Purpose -* ======= -* -* DSTEQR computes all eigenvalues and, optionally, eigenvectors of a -* symmetric tridiagonal matrix using the implicit QL or QR method. -* The eigenvectors of a full or band symmetric matrix can also be found -* if DSYTRD or DSPTRD or DSBTRD has been used to reduce this matrix to -* tridiagonal form. -* -* Arguments -* ========= -* -* COMPZ (input) CHARACTER*1 -* = 'N': Compute eigenvalues only. -* = 'V': Compute eigenvalues and eigenvectors of the original -* symmetric matrix. On entry, Z must contain the -* orthogonal matrix used to reduce the original matrix -* to tridiagonal form. -* = 'I': Compute eigenvalues and eigenvectors of the -* tridiagonal matrix. Z is initialized to the identity -* matrix. -* -* N (input) INTEGER -* The order of the matrix. N >= 0. -* -* D (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the diagonal elements of the tridiagonal matrix. -* On exit, if INFO = 0, the eigenvalues in ascending order. -* -* E (input/output) DOUBLE PRECISION array, dimension (N-1) -* On entry, the (n-1) subdiagonal elements of the tridiagonal -* matrix. -* On exit, E has been destroyed. -* -* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N) -* On entry, if COMPZ = 'V', then Z contains the orthogonal -* matrix used in the reduction to tridiagonal form. -* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the -* orthonormal eigenvectors of the original symmetric matrix, -* and if COMPZ = 'I', Z contains the orthonormal eigenvectors -* of the symmetric tridiagonal matrix. -* If COMPZ = 'N', then Z is not referenced. -* -* LDZ (input) INTEGER -* The leading dimension of the array Z. LDZ >= 1, and if -* eigenvectors are desired, then LDZ >= max(1,N). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2)) -* If COMPZ = 'N', then WORK is not referenced. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: the algorithm has failed to find all the eigenvalues in -* a total of 30*N iterations; if INFO = i, then i -* elements of E have not converged to zero; on exit, D -* and E contain the elements of a symmetric tridiagonal -* matrix which is orthogonally similar to the original -* matrix. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE, TWO, THREE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0, - $ THREE = 3.0D0 ) - INTEGER MAXIT - PARAMETER ( MAXIT = 30 ) -* .. -* .. Local Scalars .. - INTEGER I, ICOMPZ, II, ISCALE, J, JTOT, K, L, L1, LEND, - $ LENDM1, LENDP1, LENDSV, LM1, LSV, M, MM, MM1, - $ NM1, NMAXIT - DOUBLE PRECISION ANORM, B, C, EPS, EPS2, F, G, P, R, RT1, RT2, - $ S, SAFMAX, SAFMIN, SSFMAX, SSFMIN, TST -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DLAMCH, DLANST, DLAPY2 - EXTERNAL LSAME, DLAMCH, DLANST, DLAPY2 -* .. -* .. External Subroutines .. - EXTERNAL DLAE2, DLAEV2, DLARTG, DLASCL, DLASET, DLASR, - $ DLASRT, DSWAP, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, SIGN, SQRT -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 -* - IF( LSAME( COMPZ, 'N' ) ) THEN - ICOMPZ = 0 - ELSE IF( LSAME( COMPZ, 'V' ) ) THEN - ICOMPZ = 1 - ELSE IF( LSAME( COMPZ, 'I' ) ) THEN - ICOMPZ = 2 - ELSE - ICOMPZ = -1 - END IF - IF( ICOMPZ.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( ( LDZ.LT.1 ) .OR. ( ICOMPZ.GT.0 .AND. LDZ.LT.MAX( 1, - $ N ) ) ) THEN - INFO = -6 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DSTEQR', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* - IF( N.EQ.1 ) THEN - IF( ICOMPZ.EQ.2 ) - $ Z( 1, 1 ) = ONE - RETURN - END IF -* -* Determine the unit roundoff and over/underflow thresholds. -* - EPS = DLAMCH( 'E' ) - EPS2 = EPS**2 - SAFMIN = DLAMCH( 'S' ) - SAFMAX = ONE / SAFMIN - SSFMAX = SQRT( SAFMAX ) / THREE - SSFMIN = SQRT( SAFMIN ) / EPS2 -* -* Compute the eigenvalues and eigenvectors of the tridiagonal -* matrix. -* - IF( ICOMPZ.EQ.2 ) - $ CALL DLASET( 'Full', N, N, ZERO, ONE, Z, LDZ ) -* - NMAXIT = N*MAXIT - JTOT = 0 -* -* Determine where the matrix splits and choose QL or QR iteration -* for each block, according to whether top or bottom diagonal -* element is smaller. -* - L1 = 1 - NM1 = N - 1 -* - 10 CONTINUE - IF( L1.GT.N ) - $ GO TO 160 - IF( L1.GT.1 ) - $ E( L1-1 ) = ZERO - IF( L1.LE.NM1 ) THEN - DO 20 M = L1, NM1 - TST = ABS( E( M ) ) - IF( TST.EQ.ZERO ) - $ GO TO 30 - IF( TST.LE.( SQRT( ABS( D( M ) ) )*SQRT( ABS( D( M+ - $ 1 ) ) ) )*EPS ) THEN - E( M ) = ZERO - GO TO 30 - END IF - 20 CONTINUE - END IF - M = N -* - 30 CONTINUE - L = L1 - LSV = L - LEND = M - LENDSV = LEND - L1 = M + 1 - IF( LEND.EQ.L ) - $ GO TO 10 -* -* Scale submatrix in rows and columns L to LEND -* - ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) ) - ISCALE = 0 - IF( ANORM.EQ.ZERO ) - $ GO TO 10 - IF( ANORM.GT.SSFMAX ) THEN - ISCALE = 1 - CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N, - $ INFO ) - CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L, 1, E( L ), N, - $ INFO ) - ELSE IF( ANORM.LT.SSFMIN ) THEN - ISCALE = 2 - CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L+1, 1, D( L ), N, - $ INFO ) - CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N, - $ INFO ) - END IF -* -* Choose between QL and QR iteration -* - IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN - LEND = LSV - L = LENDSV - END IF -* - IF( LEND.GT.L ) THEN -* -* QL Iteration -* -* Look for small subdiagonal element. -* - 40 CONTINUE - IF( L.NE.LEND ) THEN - LENDM1 = LEND - 1 - DO 50 M = L, LENDM1 - TST = ABS( E( M ) )**2 - IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M+1 ) )+ - $ SAFMIN )GO TO 60 - 50 CONTINUE - END IF -* - M = LEND -* - 60 CONTINUE - IF( M.LT.LEND ) - $ E( M ) = ZERO - P = D( L ) - IF( M.EQ.L ) - $ GO TO 80 -* -* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 -* to compute its eigensystem. -* - IF( M.EQ.L+1 ) THEN - IF( ICOMPZ.GT.0 ) THEN - CALL DLAEV2( D( L ), E( L ), D( L+1 ), RT1, RT2, C, S ) - WORK( L ) = C - WORK( N-1+L ) = S - CALL DLASR( 'R', 'V', 'B', N, 2, WORK( L ), - $ WORK( N-1+L ), Z( 1, L ), LDZ ) - ELSE - CALL DLAE2( D( L ), E( L ), D( L+1 ), RT1, RT2 ) - END IF - D( L ) = RT1 - D( L+1 ) = RT2 - E( L ) = ZERO - L = L + 2 - IF( L.LE.LEND ) - $ GO TO 40 - GO TO 140 - END IF -* - IF( JTOT.EQ.NMAXIT ) - $ GO TO 140 - JTOT = JTOT + 1 -* -* Form shift. -* - G = ( D( L+1 )-P ) / ( TWO*E( L ) ) - R = DLAPY2( G, ONE ) - G = D( M ) - P + ( E( L ) / ( G+SIGN( R, G ) ) ) -* - S = ONE - C = ONE - P = ZERO -* -* Inner loop -* - MM1 = M - 1 - DO 70 I = MM1, L, -1 - F = S*E( I ) - B = C*E( I ) - CALL DLARTG( G, F, C, S, R ) - IF( I.NE.M-1 ) - $ E( I+1 ) = R - G = D( I+1 ) - P - R = ( D( I )-G )*S + TWO*C*B - P = S*R - D( I+1 ) = G + P - G = C*R - B -* -* If eigenvectors are desired, then save rotations. -* - IF( ICOMPZ.GT.0 ) THEN - WORK( I ) = C - WORK( N-1+I ) = -S - END IF -* - 70 CONTINUE -* -* If eigenvectors are desired, then apply saved rotations. -* - IF( ICOMPZ.GT.0 ) THEN - MM = M - L + 1 - CALL DLASR( 'R', 'V', 'B', N, MM, WORK( L ), WORK( N-1+L ), - $ Z( 1, L ), LDZ ) - END IF -* - D( L ) = D( L ) - P - E( L ) = G - GO TO 40 -* -* Eigenvalue found. -* - 80 CONTINUE - D( L ) = P -* - L = L + 1 - IF( L.LE.LEND ) - $ GO TO 40 - GO TO 140 -* - ELSE -* -* QR Iteration -* -* Look for small superdiagonal element. -* - 90 CONTINUE - IF( L.NE.LEND ) THEN - LENDP1 = LEND + 1 - DO 100 M = L, LENDP1, -1 - TST = ABS( E( M-1 ) )**2 - IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M-1 ) )+ - $ SAFMIN )GO TO 110 - 100 CONTINUE - END IF -* - M = LEND -* - 110 CONTINUE - IF( M.GT.LEND ) - $ E( M-1 ) = ZERO - P = D( L ) - IF( M.EQ.L ) - $ GO TO 130 -* -* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 -* to compute its eigensystem. -* - IF( M.EQ.L-1 ) THEN - IF( ICOMPZ.GT.0 ) THEN - CALL DLAEV2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2, C, S ) - WORK( M ) = C - WORK( N-1+M ) = S - CALL DLASR( 'R', 'V', 'F', N, 2, WORK( M ), - $ WORK( N-1+M ), Z( 1, L-1 ), LDZ ) - ELSE - CALL DLAE2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2 ) - END IF - D( L-1 ) = RT1 - D( L ) = RT2 - E( L-1 ) = ZERO - L = L - 2 - IF( L.GE.LEND ) - $ GO TO 90 - GO TO 140 - END IF -* - IF( JTOT.EQ.NMAXIT ) - $ GO TO 140 - JTOT = JTOT + 1 -* -* Form shift. -* - G = ( D( L-1 )-P ) / ( TWO*E( L-1 ) ) - R = DLAPY2( G, ONE ) - G = D( M ) - P + ( E( L-1 ) / ( G+SIGN( R, G ) ) ) -* - S = ONE - C = ONE - P = ZERO -* -* Inner loop -* - LM1 = L - 1 - DO 120 I = M, LM1 - F = S*E( I ) - B = C*E( I ) - CALL DLARTG( G, F, C, S, R ) - IF( I.NE.M ) - $ E( I-1 ) = R - G = D( I ) - P - R = ( D( I+1 )-G )*S + TWO*C*B - P = S*R - D( I ) = G + P - G = C*R - B -* -* If eigenvectors are desired, then save rotations. -* - IF( ICOMPZ.GT.0 ) THEN - WORK( I ) = C - WORK( N-1+I ) = S - END IF -* - 120 CONTINUE -* -* If eigenvectors are desired, then apply saved rotations. -* - IF( ICOMPZ.GT.0 ) THEN - MM = L - M + 1 - CALL DLASR( 'R', 'V', 'F', N, MM, WORK( M ), WORK( N-1+M ), - $ Z( 1, M ), LDZ ) - END IF -* - D( L ) = D( L ) - P - E( LM1 ) = G - GO TO 90 -* -* Eigenvalue found. -* - 130 CONTINUE - D( L ) = P -* - L = L - 1 - IF( L.GE.LEND ) - $ GO TO 90 - GO TO 140 -* - END IF -* -* Undo scaling if necessary -* - 140 CONTINUE - IF( ISCALE.EQ.1 ) THEN - CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1, - $ D( LSV ), N, INFO ) - CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV, 1, E( LSV ), - $ N, INFO ) - ELSE IF( ISCALE.EQ.2 ) THEN - CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1, - $ D( LSV ), N, INFO ) - CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV, 1, E( LSV ), - $ N, INFO ) - END IF -* -* Check for no convergence to an eigenvalue after a total -* of N*MAXIT iterations. -* - IF( JTOT.LT.NMAXIT ) - $ GO TO 10 - DO 150 I = 1, N - 1 - IF( E( I ).NE.ZERO ) - $ INFO = INFO + 1 - 150 CONTINUE - GO TO 190 -* -* Order eigenvalues and eigenvectors. -* - 160 CONTINUE - IF( ICOMPZ.EQ.0 ) THEN -* -* Use Quick Sort -* - CALL DLASRT( 'I', N, D, INFO ) -* - ELSE -* -* Use Selection Sort to minimize swaps of eigenvectors -* - DO 180 II = 2, N - I = II - 1 - K = I - P = D( I ) - DO 170 J = II, N - IF( D( J ).LT.P ) THEN - K = J - P = D( J ) - END IF - 170 CONTINUE - IF( K.NE.I ) THEN - D( K ) = D( I ) - D( I ) = P - CALL DSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 ) - END IF - 180 CONTINUE - END IF -* - 190 CONTINUE - RETURN -* -* End of DSTEQR -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsterf.f b/cpp/nudg++/trunk/BlasLapack/dsterf.f deleted file mode 100644 index 91a32bd..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsterf.f +++ /dev/null @@ -1,365 +0,0 @@ - SUBROUTINE DSTERF( N, D, E, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INFO, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION D( * ), E( * ) -* .. -* -* Purpose -* ======= -* -* DSTERF computes all eigenvalues of a symmetric tridiagonal matrix -* using the Pal-Walker-Kahan variant of the QL or QR algorithm. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix. N >= 0. -* -* D (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the n diagonal elements of the tridiagonal matrix. -* On exit, if INFO = 0, the eigenvalues in ascending order. -* -* E (input/output) DOUBLE PRECISION array, dimension (N-1) -* On entry, the (n-1) subdiagonal elements of the tridiagonal -* matrix. -* On exit, E has been destroyed. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: the algorithm failed to find all of the eigenvalues in -* a total of 30*N iterations; if INFO = i, then i -* elements of E have not converged to zero. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE, TWO, THREE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0, - $ THREE = 3.0D0 ) - INTEGER MAXIT - PARAMETER ( MAXIT = 30 ) -* .. -* .. Local Scalars .. - INTEGER I, ISCALE, JTOT, L, L1, LEND, LENDSV, LSV, M, - $ NMAXIT - DOUBLE PRECISION ALPHA, ANORM, BB, C, EPS, EPS2, GAMMA, OLDC, - $ OLDGAM, P, R, RT1, RT2, RTE, S, SAFMAX, SAFMIN, - $ SIGMA, SSFMAX, SSFMIN -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH, DLANST, DLAPY2 - EXTERNAL DLAMCH, DLANST, DLAPY2 -* .. -* .. External Subroutines .. - EXTERNAL DLAE2, DLASCL, DLASRT, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, SIGN, SQRT -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 -* -* Quick return if possible -* - IF( N.LT.0 ) THEN - INFO = -1 - CALL XERBLA( 'DSTERF', -INFO ) - RETURN - END IF - IF( N.LE.1 ) - $ RETURN -* -* Determine the unit roundoff for this environment. -* - EPS = DLAMCH( 'E' ) - EPS2 = EPS**2 - SAFMIN = DLAMCH( 'S' ) - SAFMAX = ONE / SAFMIN - SSFMAX = SQRT( SAFMAX ) / THREE - SSFMIN = SQRT( SAFMIN ) / EPS2 -* -* Compute the eigenvalues of the tridiagonal matrix. -* - NMAXIT = N*MAXIT - SIGMA = ZERO - JTOT = 0 -* -* Determine where the matrix splits and choose QL or QR iteration -* for each block, according to whether top or bottom diagonal -* element is smaller. -* - L1 = 1 -* - 10 CONTINUE - IF( L1.GT.N ) - $ GO TO 170 - IF( L1.GT.1 ) - $ E( L1-1 ) = ZERO - DO 20 M = L1, N - 1 - IF( ABS( E( M ) ).LE.( SQRT( ABS( D( M ) ) )*SQRT( ABS( D( M+ - $ 1 ) ) ) )*EPS ) THEN - E( M ) = ZERO - GO TO 30 - END IF - 20 CONTINUE - M = N -* - 30 CONTINUE - L = L1 - LSV = L - LEND = M - LENDSV = LEND - L1 = M + 1 - IF( LEND.EQ.L ) - $ GO TO 10 -* -* Scale submatrix in rows and columns L to LEND -* - ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) ) - ISCALE = 0 - IF( ANORM.GT.SSFMAX ) THEN - ISCALE = 1 - CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N, - $ INFO ) - CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L, 1, E( L ), N, - $ INFO ) - ELSE IF( ANORM.LT.SSFMIN ) THEN - ISCALE = 2 - CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L+1, 1, D( L ), N, - $ INFO ) - CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N, - $ INFO ) - END IF -* - DO 40 I = L, LEND - 1 - E( I ) = E( I )**2 - 40 CONTINUE -* -* Choose between QL and QR iteration -* - IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN - LEND = LSV - L = LENDSV - END IF -* - IF( LEND.GE.L ) THEN -* -* QL Iteration -* -* Look for small subdiagonal element. -* - 50 CONTINUE - IF( L.NE.LEND ) THEN - DO 60 M = L, LEND - 1 - IF( ABS( E( M ) ).LE.EPS2*ABS( D( M )*D( M+1 ) ) ) - $ GO TO 70 - 60 CONTINUE - END IF - M = LEND -* - 70 CONTINUE - IF( M.LT.LEND ) - $ E( M ) = ZERO - P = D( L ) - IF( M.EQ.L ) - $ GO TO 90 -* -* If remaining matrix is 2 by 2, use DLAE2 to compute its -* eigenvalues. -* - IF( M.EQ.L+1 ) THEN - RTE = SQRT( E( L ) ) - CALL DLAE2( D( L ), RTE, D( L+1 ), RT1, RT2 ) - D( L ) = RT1 - D( L+1 ) = RT2 - E( L ) = ZERO - L = L + 2 - IF( L.LE.LEND ) - $ GO TO 50 - GO TO 150 - END IF -* - IF( JTOT.EQ.NMAXIT ) - $ GO TO 150 - JTOT = JTOT + 1 -* -* Form shift. -* - RTE = SQRT( E( L ) ) - SIGMA = ( D( L+1 )-P ) / ( TWO*RTE ) - R = DLAPY2( SIGMA, ONE ) - SIGMA = P - ( RTE / ( SIGMA+SIGN( R, SIGMA ) ) ) -* - C = ONE - S = ZERO - GAMMA = D( M ) - SIGMA - P = GAMMA*GAMMA -* -* Inner loop -* - DO 80 I = M - 1, L, -1 - BB = E( I ) - R = P + BB - IF( I.NE.M-1 ) - $ E( I+1 ) = S*R - OLDC = C - C = P / R - S = BB / R - OLDGAM = GAMMA - ALPHA = D( I ) - GAMMA = C*( ALPHA-SIGMA ) - S*OLDGAM - D( I+1 ) = OLDGAM + ( ALPHA-GAMMA ) - IF( C.NE.ZERO ) THEN - P = ( GAMMA*GAMMA ) / C - ELSE - P = OLDC*BB - END IF - 80 CONTINUE -* - E( L ) = S*P - D( L ) = SIGMA + GAMMA - GO TO 50 -* -* Eigenvalue found. -* - 90 CONTINUE - D( L ) = P -* - L = L + 1 - IF( L.LE.LEND ) - $ GO TO 50 - GO TO 150 -* - ELSE -* -* QR Iteration -* -* Look for small superdiagonal element. -* - 100 CONTINUE - DO 110 M = L, LEND + 1, -1 - IF( ABS( E( M-1 ) ).LE.EPS2*ABS( D( M )*D( M-1 ) ) ) - $ GO TO 120 - 110 CONTINUE - M = LEND -* - 120 CONTINUE - IF( M.GT.LEND ) - $ E( M-1 ) = ZERO - P = D( L ) - IF( M.EQ.L ) - $ GO TO 140 -* -* If remaining matrix is 2 by 2, use DLAE2 to compute its -* eigenvalues. -* - IF( M.EQ.L-1 ) THEN - RTE = SQRT( E( L-1 ) ) - CALL DLAE2( D( L ), RTE, D( L-1 ), RT1, RT2 ) - D( L ) = RT1 - D( L-1 ) = RT2 - E( L-1 ) = ZERO - L = L - 2 - IF( L.GE.LEND ) - $ GO TO 100 - GO TO 150 - END IF -* - IF( JTOT.EQ.NMAXIT ) - $ GO TO 150 - JTOT = JTOT + 1 -* -* Form shift. -* - RTE = SQRT( E( L-1 ) ) - SIGMA = ( D( L-1 )-P ) / ( TWO*RTE ) - R = DLAPY2( SIGMA, ONE ) - SIGMA = P - ( RTE / ( SIGMA+SIGN( R, SIGMA ) ) ) -* - C = ONE - S = ZERO - GAMMA = D( M ) - SIGMA - P = GAMMA*GAMMA -* -* Inner loop -* - DO 130 I = M, L - 1 - BB = E( I ) - R = P + BB - IF( I.NE.M ) - $ E( I-1 ) = S*R - OLDC = C - C = P / R - S = BB / R - OLDGAM = GAMMA - ALPHA = D( I+1 ) - GAMMA = C*( ALPHA-SIGMA ) - S*OLDGAM - D( I ) = OLDGAM + ( ALPHA-GAMMA ) - IF( C.NE.ZERO ) THEN - P = ( GAMMA*GAMMA ) / C - ELSE - P = OLDC*BB - END IF - 130 CONTINUE -* - E( L-1 ) = S*P - D( L ) = SIGMA + GAMMA - GO TO 100 -* -* Eigenvalue found. -* - 140 CONTINUE - D( L ) = P -* - L = L - 1 - IF( L.GE.LEND ) - $ GO TO 100 - GO TO 150 -* - END IF -* -* Undo scaling if necessary -* - 150 CONTINUE - IF( ISCALE.EQ.1 ) - $ CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1, - $ D( LSV ), N, INFO ) - IF( ISCALE.EQ.2 ) - $ CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1, - $ D( LSV ), N, INFO ) -* -* Check for no convergence to an eigenvalue after a total -* of N*MAXIT iterations. -* - IF( JTOT.LT.NMAXIT ) - $ GO TO 10 - DO 160 I = 1, N - 1 - IF( E( I ).NE.ZERO ) - $ INFO = INFO + 1 - 160 CONTINUE - GO TO 180 -* -* Sort eigenvalues in increasing order. -* - 170 CONTINUE - CALL DLASRT( 'I', N, D, INFO ) -* - 180 CONTINUE - RETURN -* -* End of DSTERF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dstev.f b/cpp/nudg++/trunk/BlasLapack/dstev.f deleted file mode 100644 index 5b7ed86..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dstev.f +++ /dev/null @@ -1,165 +0,0 @@ - SUBROUTINE DSTEV( JOBZ, N, D, E, Z, LDZ, WORK, INFO ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - CHARACTER JOBZ - INTEGER INFO, LDZ, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * ) -* .. -* -* Purpose -* ======= -* -* DSTEV computes all eigenvalues and, optionally, eigenvectors of a -* real symmetric tridiagonal matrix A. -* -* Arguments -* ========= -* -* JOBZ (input) CHARACTER*1 -* = 'N': Compute eigenvalues only; -* = 'V': Compute eigenvalues and eigenvectors. -* -* N (input) INTEGER -* The order of the matrix. N >= 0. -* -* D (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the n diagonal elements of the tridiagonal matrix -* A. -* On exit, if INFO = 0, the eigenvalues in ascending order. -* -* E (input/output) DOUBLE PRECISION array, dimension (N) -* On entry, the (n-1) subdiagonal elements of the tridiagonal -* matrix A, stored in elements 1 to N-1 of E; E(N) need not -* be set, but is used by the routine. -* On exit, the contents of E are destroyed. -* -* Z (output) DOUBLE PRECISION array, dimension (LDZ, N) -* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal -* eigenvectors of the matrix A, with the i-th column of Z -* holding the eigenvector associated with D(i). -* If JOBZ = 'N', then Z is not referenced. -* -* LDZ (input) INTEGER -* The leading dimension of the array Z. LDZ >= 1, and if -* JOBZ = 'V', LDZ >= max(1,N). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2)) -* If JOBZ = 'N', WORK is not referenced. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, the algorithm failed to converge; i -* off-diagonal elements of E did not converge to zero. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL WANTZ - INTEGER IMAX, ISCALE - DOUBLE PRECISION BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, SMLNUM, - $ TNRM -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DLAMCH, DLANST - EXTERNAL LSAME, DLAMCH, DLANST -* .. -* .. External Subroutines .. - EXTERNAL DSCAL, DSTEQR, DSTERF, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC SQRT -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - WANTZ = LSAME( JOBZ, 'V' ) -* - INFO = 0 - IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.N ) ) THEN - INFO = -6 - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DSTEV ', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* - IF( N.EQ.1 ) THEN - IF( WANTZ ) - $ Z( 1, 1 ) = ONE - RETURN - END IF -* -* Get machine constants. -* - SAFMIN = DLAMCH( 'Safe minimum' ) - EPS = DLAMCH( 'Precision' ) - SMLNUM = SAFMIN / EPS - BIGNUM = ONE / SMLNUM - RMIN = SQRT( SMLNUM ) - RMAX = SQRT( BIGNUM ) -* -* Scale matrix to allowable range, if necessary. -* - ISCALE = 0 - TNRM = DLANST( 'M', N, D, E ) - IF( TNRM.GT.ZERO .AND. TNRM.LT.RMIN ) THEN - ISCALE = 1 - SIGMA = RMIN / TNRM - ELSE IF( TNRM.GT.RMAX ) THEN - ISCALE = 1 - SIGMA = RMAX / TNRM - END IF - IF( ISCALE.EQ.1 ) THEN - CALL DSCAL( N, SIGMA, D, 1 ) - CALL DSCAL( N-1, SIGMA, E( 1 ), 1 ) - END IF -* -* For eigenvalues only, call DSTERF. For eigenvalues and -* eigenvectors, call DSTEQR. -* - IF( .NOT.WANTZ ) THEN - CALL DSTERF( N, D, E, INFO ) - ELSE - CALL DSTEQR( 'I', N, D, E, Z, LDZ, WORK, INFO ) - END IF -* -* If matrix was scaled, then rescale eigenvalues appropriately. -* - IF( ISCALE.EQ.1 ) THEN - IF( INFO.EQ.0 ) THEN - IMAX = N - ELSE - IMAX = INFO - 1 - END IF - CALL DSCAL( IMAX, ONE / SIGMA, D, 1 ) - END IF -* - RETURN -* -* End of DSTEV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dswap.f b/cpp/nudg++/trunk/BlasLapack/dswap.f deleted file mode 100644 index 7f7d1fb..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dswap.f +++ /dev/null @@ -1,56 +0,0 @@ - subroutine dswap (n,dx,incx,dy,incy) -c -c interchanges two vectors. -c uses unrolled loops for increments equal one. -c jack dongarra, linpack, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision dx(*),dy(*),dtemp - integer i,incx,incy,ix,iy,m,mp1,n -c - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments not equal -c to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - dtemp = dx(ix) - dx(ix) = dy(iy) - dy(iy) = dtemp - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c -c -c clean-up loop -c - 20 m = mod(n,3) - if( m .eq. 0 ) go to 40 - do 30 i = 1,m - dtemp = dx(i) - dx(i) = dy(i) - dy(i) = dtemp - 30 continue - if( n .lt. 3 ) return - 40 mp1 = m + 1 - do 50 i = mp1,n,3 - dtemp = dx(i) - dx(i) = dy(i) - dy(i) = dtemp - dtemp = dx(i + 1) - dx(i + 1) = dy(i + 1) - dy(i + 1) = dtemp - dtemp = dx(i + 2) - dx(i + 2) = dy(i + 2) - dy(i + 2) = dtemp - 50 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/dsyev.f b/cpp/nudg++/trunk/BlasLapack/dsyev.f deleted file mode 100644 index acdb440..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsyev.f +++ /dev/null @@ -1,213 +0,0 @@ - SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO ) -* -* -- LAPACK driver routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER JOBZ, UPLO - INTEGER INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* DSYEV computes all eigenvalues and, optionally, eigenvectors of a -* real symmetric matrix A. -* -* Arguments -* ========= -* -* JOBZ (input) CHARACTER*1 -* = 'N': Compute eigenvalues only; -* = 'V': Compute eigenvalues and eigenvectors. -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A is stored; -* = 'L': Lower triangle of A is stored. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) -* On entry, the symmetric matrix A. If UPLO = 'U', the -* leading N-by-N upper triangular part of A contains the -* upper triangular part of the matrix A. If UPLO = 'L', -* the leading N-by-N lower triangular part of A contains -* the lower triangular part of the matrix A. -* On exit, if JOBZ = 'V', then if INFO = 0, A contains the -* orthonormal eigenvectors of the matrix A. -* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L') -* or the upper triangle (if UPLO='U') of A, including the -* diagonal, is destroyed. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* W (output) DOUBLE PRECISION array, dimension (N) -* If INFO = 0, the eigenvalues in ascending order. -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The length of the array WORK. LWORK >= max(1,3*N-1). -* For optimal efficiency, LWORK >= (NB+2)*N, -* where NB is the blocksize for DSYTRD returned by ILAENV. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, the algorithm failed to converge; i -* off-diagonal elements of an intermediate tridiagonal -* form did not converge to zero. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL LOWER, LQUERY, WANTZ - INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE, - $ LLWORK, LOPT, LWKOPT, NB - DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, - $ SMLNUM -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - DOUBLE PRECISION DLAMCH, DLANSY - EXTERNAL LSAME, ILAENV, DLAMCH, DLANSY -* .. -* .. External Subroutines .. - EXTERNAL DLASCL, DORGTR, DSCAL, DSTEQR, DSTERF, DSYTRD, - $ XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, SQRT -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - WANTZ = LSAME( JOBZ, 'V' ) - LOWER = LSAME( UPLO, 'L' ) - LQUERY = ( LWORK.EQ.-1 ) -* - INFO = 0 - IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN - INFO = -1 - ELSE IF( .NOT.( LOWER .OR. LSAME( UPLO, 'U' ) ) ) THEN - INFO = -2 - ELSE IF( N.LT.0 ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LWORK.LT.MAX( 1, 3*N-1 ) .AND. .NOT.LQUERY ) THEN - INFO = -8 - END IF -* - IF( INFO.EQ.0 ) THEN - NB = ILAENV( 1, 'DSYTRD', UPLO, N, -1, -1, -1 ) - LWKOPT = MAX( 1, ( NB+2 )*N ) - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DSYEV ', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - IF( N.EQ.1 ) THEN - W( 1 ) = A( 1, 1 ) - WORK( 1 ) = 3 - IF( WANTZ ) - $ A( 1, 1 ) = ONE - RETURN - END IF -* -* Get machine constants. -* - SAFMIN = DLAMCH( 'Safe minimum' ) - EPS = DLAMCH( 'Precision' ) - SMLNUM = SAFMIN / EPS - BIGNUM = ONE / SMLNUM - RMIN = SQRT( SMLNUM ) - RMAX = SQRT( BIGNUM ) -* -* Scale matrix to allowable range, if necessary. -* - ANRM = DLANSY( 'M', UPLO, N, A, LDA, WORK ) - ISCALE = 0 - IF( ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN - ISCALE = 1 - SIGMA = RMIN / ANRM - ELSE IF( ANRM.GT.RMAX ) THEN - ISCALE = 1 - SIGMA = RMAX / ANRM - END IF - IF( ISCALE.EQ.1 ) - $ CALL DLASCL( UPLO, 0, 0, ONE, SIGMA, N, N, A, LDA, INFO ) -* -* Call DSYTRD to reduce symmetric matrix to tridiagonal form. -* - INDE = 1 - INDTAU = INDE + N - INDWRK = INDTAU + N - LLWORK = LWORK - INDWRK + 1 - CALL DSYTRD( UPLO, N, A, LDA, W, WORK( INDE ), WORK( INDTAU ), - $ WORK( INDWRK ), LLWORK, IINFO ) - LOPT = 2*N + WORK( INDWRK ) -* -* For eigenvalues only, call DSTERF. For eigenvectors, first call -* DORGTR to generate the orthogonal matrix, then call DSTEQR. -* - IF( .NOT.WANTZ ) THEN - CALL DSTERF( N, W, WORK( INDE ), INFO ) - ELSE - CALL DORGTR( UPLO, N, A, LDA, WORK( INDTAU ), WORK( INDWRK ), - $ LLWORK, IINFO ) - CALL DSTEQR( JOBZ, N, W, WORK( INDE ), A, LDA, WORK( INDTAU ), - $ INFO ) - END IF -* -* If matrix was scaled, then rescale eigenvalues appropriately. -* - IF( ISCALE.EQ.1 ) THEN - IF( INFO.EQ.0 ) THEN - IMAX = N - ELSE - IMAX = INFO - 1 - END IF - CALL DSCAL( IMAX, ONE / SIGMA, W, 1 ) - END IF -* -* Set WORK(1) to optimal workspace size. -* - WORK( 1 ) = LWKOPT -* - RETURN -* -* End of DSYEV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsymv.f b/cpp/nudg++/trunk/BlasLapack/dsymv.f deleted file mode 100644 index 7592d15..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsymv.f +++ /dev/null @@ -1,262 +0,0 @@ - SUBROUTINE DSYMV ( UPLO, N, ALPHA, A, LDA, X, INCX, - $ BETA, Y, INCY ) -* .. Scalar Arguments .. - DOUBLE PRECISION ALPHA, BETA - INTEGER INCX, INCY, LDA, N - CHARACTER*1 UPLO -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) -* .. -* -* Purpose -* ======= -* -* DSYMV performs the matrix-vector operation -* -* y := alpha*A*x + beta*y, -* -* where alpha and beta are scalars, x and y are n element vectors and -* A is an n by n symmetric matrix. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the upper or lower -* triangular part of the array A is to be referenced as -* follows: -* -* UPLO = 'U' or 'u' Only the upper triangular part of A -* is to be referenced. -* -* UPLO = 'L' or 'l' Only the lower triangular part of A -* is to be referenced. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array A must contain the upper -* triangular part of the symmetric matrix and the strictly -* lower triangular part of A is not referenced. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array A must contain the lower -* triangular part of the symmetric matrix and the strictly -* upper triangular part of A is not referenced. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, n ). -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the n -* element vector x. -* Unchanged on exit. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* BETA - DOUBLE PRECISION. -* On entry, BETA specifies the scalar beta. When BETA is -* supplied as zero then Y need not be set on input. -* Unchanged on exit. -* -* Y - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCY ) ). -* Before entry, the incremented array Y must contain the n -* element vector y. On exit, Y is overwritten by the updated -* vector y. -* -* INCY - INTEGER. -* On entry, INCY specifies the increment for the elements of -* Y. INCY must not be zero. -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP1, TEMP2 - INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( UPLO, 'U' ).AND. - $ .NOT.LSAME( UPLO, 'L' ) )THEN - INFO = 1 - ELSE IF( N.LT.0 )THEN - INFO = 2 - ELSE IF( LDA.LT.MAX( 1, N ) )THEN - INFO = 5 - ELSE IF( INCX.EQ.0 )THEN - INFO = 7 - ELSE IF( INCY.EQ.0 )THEN - INFO = 10 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DSYMV ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) - $ RETURN -* -* Set up the start points in X and Y. -* - IF( INCX.GT.0 )THEN - KX = 1 - ELSE - KX = 1 - ( N - 1 )*INCX - END IF - IF( INCY.GT.0 )THEN - KY = 1 - ELSE - KY = 1 - ( N - 1 )*INCY - END IF -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through the triangular part -* of A. -* -* First form y := beta*y. -* - IF( BETA.NE.ONE )THEN - IF( INCY.EQ.1 )THEN - IF( BETA.EQ.ZERO )THEN - DO 10, I = 1, N - Y( I ) = ZERO - 10 CONTINUE - ELSE - DO 20, I = 1, N - Y( I ) = BETA*Y( I ) - 20 CONTINUE - END IF - ELSE - IY = KY - IF( BETA.EQ.ZERO )THEN - DO 30, I = 1, N - Y( IY ) = ZERO - IY = IY + INCY - 30 CONTINUE - ELSE - DO 40, I = 1, N - Y( IY ) = BETA*Y( IY ) - IY = IY + INCY - 40 CONTINUE - END IF - END IF - END IF - IF( ALPHA.EQ.ZERO ) - $ RETURN - IF( LSAME( UPLO, 'U' ) )THEN -* -* Form y when A is stored in upper triangle. -* - IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN - DO 60, J = 1, N - TEMP1 = ALPHA*X( J ) - TEMP2 = ZERO - DO 50, I = 1, J - 1 - Y( I ) = Y( I ) + TEMP1*A( I, J ) - TEMP2 = TEMP2 + A( I, J )*X( I ) - 50 CONTINUE - Y( J ) = Y( J ) + TEMP1*A( J, J ) + ALPHA*TEMP2 - 60 CONTINUE - ELSE - JX = KX - JY = KY - DO 80, J = 1, N - TEMP1 = ALPHA*X( JX ) - TEMP2 = ZERO - IX = KX - IY = KY - DO 70, I = 1, J - 1 - Y( IY ) = Y( IY ) + TEMP1*A( I, J ) - TEMP2 = TEMP2 + A( I, J )*X( IX ) - IX = IX + INCX - IY = IY + INCY - 70 CONTINUE - Y( JY ) = Y( JY ) + TEMP1*A( J, J ) + ALPHA*TEMP2 - JX = JX + INCX - JY = JY + INCY - 80 CONTINUE - END IF - ELSE -* -* Form y when A is stored in lower triangle. -* - IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN - DO 100, J = 1, N - TEMP1 = ALPHA*X( J ) - TEMP2 = ZERO - Y( J ) = Y( J ) + TEMP1*A( J, J ) - DO 90, I = J + 1, N - Y( I ) = Y( I ) + TEMP1*A( I, J ) - TEMP2 = TEMP2 + A( I, J )*X( I ) - 90 CONTINUE - Y( J ) = Y( J ) + ALPHA*TEMP2 - 100 CONTINUE - ELSE - JX = KX - JY = KY - DO 120, J = 1, N - TEMP1 = ALPHA*X( JX ) - TEMP2 = ZERO - Y( JY ) = Y( JY ) + TEMP1*A( J, J ) - IX = JX - IY = JY - DO 110, I = J + 1, N - IX = IX + INCX - IY = IY + INCY - Y( IY ) = Y( IY ) + TEMP1*A( I, J ) - TEMP2 = TEMP2 + A( I, J )*X( IX ) - 110 CONTINUE - Y( JY ) = Y( JY ) + ALPHA*TEMP2 - JX = JX + INCX - JY = JY + INCY - 120 CONTINUE - END IF - END IF -* - RETURN -* -* End of DSYMV . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsyr.f b/cpp/nudg++/trunk/BlasLapack/dsyr.f deleted file mode 100644 index 8737719..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsyr.f +++ /dev/null @@ -1,197 +0,0 @@ - SUBROUTINE DSYR ( UPLO, N, ALPHA, X, INCX, A, LDA ) -* .. Scalar Arguments .. - DOUBLE PRECISION ALPHA - INTEGER INCX, LDA, N - CHARACTER*1 UPLO -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ) -* .. -* -* Purpose -* ======= -* -* DSYR performs the symmetric rank 1 operation -* -* A := alpha*x*x' + A, -* -* where alpha is a real scalar, x is an n element vector and A is an -* n by n symmetric matrix. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the upper or lower -* triangular part of the array A is to be referenced as -* follows: -* -* UPLO = 'U' or 'u' Only the upper triangular part of A -* is to be referenced. -* -* UPLO = 'L' or 'l' Only the lower triangular part of A -* is to be referenced. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the n -* element vector x. -* Unchanged on exit. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array A must contain the upper -* triangular part of the symmetric matrix and the strictly -* lower triangular part of A is not referenced. On exit, the -* upper triangular part of the array A is overwritten by the -* upper triangular part of the updated matrix. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array A must contain the lower -* triangular part of the symmetric matrix and the strictly -* upper triangular part of A is not referenced. On exit, the -* lower triangular part of the array A is overwritten by the -* lower triangular part of the updated matrix. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, n ). -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP - INTEGER I, INFO, IX, J, JX, KX -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( UPLO, 'U' ).AND. - $ .NOT.LSAME( UPLO, 'L' ) )THEN - INFO = 1 - ELSE IF( N.LT.0 )THEN - INFO = 2 - ELSE IF( INCX.EQ.0 )THEN - INFO = 5 - ELSE IF( LDA.LT.MAX( 1, N ) )THEN - INFO = 7 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DSYR ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) - $ RETURN -* -* Set the start point in X if the increment is not unity. -* - IF( INCX.LE.0 )THEN - KX = 1 - ( N - 1 )*INCX - ELSE IF( INCX.NE.1 )THEN - KX = 1 - END IF -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through the triangular part -* of A. -* - IF( LSAME( UPLO, 'U' ) )THEN -* -* Form A when A is stored in upper triangle. -* - IF( INCX.EQ.1 )THEN - DO 20, J = 1, N - IF( X( J ).NE.ZERO )THEN - TEMP = ALPHA*X( J ) - DO 10, I = 1, J - A( I, J ) = A( I, J ) + X( I )*TEMP - 10 CONTINUE - END IF - 20 CONTINUE - ELSE - JX = KX - DO 40, J = 1, N - IF( X( JX ).NE.ZERO )THEN - TEMP = ALPHA*X( JX ) - IX = KX - DO 30, I = 1, J - A( I, J ) = A( I, J ) + X( IX )*TEMP - IX = IX + INCX - 30 CONTINUE - END IF - JX = JX + INCX - 40 CONTINUE - END IF - ELSE -* -* Form A when A is stored in lower triangle. -* - IF( INCX.EQ.1 )THEN - DO 60, J = 1, N - IF( X( J ).NE.ZERO )THEN - TEMP = ALPHA*X( J ) - DO 50, I = J, N - A( I, J ) = A( I, J ) + X( I )*TEMP - 50 CONTINUE - END IF - 60 CONTINUE - ELSE - JX = KX - DO 80, J = 1, N - IF( X( JX ).NE.ZERO )THEN - TEMP = ALPHA*X( JX ) - IX = JX - DO 70, I = J, N - A( I, J ) = A( I, J ) + X( IX )*TEMP - IX = IX + INCX - 70 CONTINUE - END IF - JX = JX + INCX - 80 CONTINUE - END IF - END IF -* - RETURN -* -* End of DSYR . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsyr2.f b/cpp/nudg++/trunk/BlasLapack/dsyr2.f deleted file mode 100644 index 918ad8a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsyr2.f +++ /dev/null @@ -1,230 +0,0 @@ - SUBROUTINE DSYR2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA ) -* .. Scalar Arguments .. - DOUBLE PRECISION ALPHA - INTEGER INCX, INCY, LDA, N - CHARACTER*1 UPLO -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) -* .. -* -* Purpose -* ======= -* -* DSYR2 performs the symmetric rank 2 operation -* -* A := alpha*x*y' + alpha*y*x' + A, -* -* where alpha is a scalar, x and y are n element vectors and A is an n -* by n symmetric matrix. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the upper or lower -* triangular part of the array A is to be referenced as -* follows: -* -* UPLO = 'U' or 'u' Only the upper triangular part of A -* is to be referenced. -* -* UPLO = 'L' or 'l' Only the lower triangular part of A -* is to be referenced. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the n -* element vector x. -* Unchanged on exit. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* Y - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCY ) ). -* Before entry, the incremented array Y must contain the n -* element vector y. -* Unchanged on exit. -* -* INCY - INTEGER. -* On entry, INCY specifies the increment for the elements of -* Y. INCY must not be zero. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array A must contain the upper -* triangular part of the symmetric matrix and the strictly -* lower triangular part of A is not referenced. On exit, the -* upper triangular part of the array A is overwritten by the -* upper triangular part of the updated matrix. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array A must contain the lower -* triangular part of the symmetric matrix and the strictly -* upper triangular part of A is not referenced. On exit, the -* lower triangular part of the array A is overwritten by the -* lower triangular part of the updated matrix. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, n ). -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP1, TEMP2 - INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( UPLO, 'U' ).AND. - $ .NOT.LSAME( UPLO, 'L' ) )THEN - INFO = 1 - ELSE IF( N.LT.0 )THEN - INFO = 2 - ELSE IF( INCX.EQ.0 )THEN - INFO = 5 - ELSE IF( INCY.EQ.0 )THEN - INFO = 7 - ELSE IF( LDA.LT.MAX( 1, N ) )THEN - INFO = 9 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DSYR2 ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) - $ RETURN -* -* Set up the start points in X and Y if the increments are not both -* unity. -* - IF( ( INCX.NE.1 ).OR.( INCY.NE.1 ) )THEN - IF( INCX.GT.0 )THEN - KX = 1 - ELSE - KX = 1 - ( N - 1 )*INCX - END IF - IF( INCY.GT.0 )THEN - KY = 1 - ELSE - KY = 1 - ( N - 1 )*INCY - END IF - JX = KX - JY = KY - END IF -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through the triangular part -* of A. -* - IF( LSAME( UPLO, 'U' ) )THEN -* -* Form A when A is stored in the upper triangle. -* - IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN - DO 20, J = 1, N - IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN - TEMP1 = ALPHA*Y( J ) - TEMP2 = ALPHA*X( J ) - DO 10, I = 1, J - A( I, J ) = A( I, J ) + X( I )*TEMP1 + Y( I )*TEMP2 - 10 CONTINUE - END IF - 20 CONTINUE - ELSE - DO 40, J = 1, N - IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN - TEMP1 = ALPHA*Y( JY ) - TEMP2 = ALPHA*X( JX ) - IX = KX - IY = KY - DO 30, I = 1, J - A( I, J ) = A( I, J ) + X( IX )*TEMP1 - $ + Y( IY )*TEMP2 - IX = IX + INCX - IY = IY + INCY - 30 CONTINUE - END IF - JX = JX + INCX - JY = JY + INCY - 40 CONTINUE - END IF - ELSE -* -* Form A when A is stored in the lower triangle. -* - IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN - DO 60, J = 1, N - IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN - TEMP1 = ALPHA*Y( J ) - TEMP2 = ALPHA*X( J ) - DO 50, I = J, N - A( I, J ) = A( I, J ) + X( I )*TEMP1 + Y( I )*TEMP2 - 50 CONTINUE - END IF - 60 CONTINUE - ELSE - DO 80, J = 1, N - IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN - TEMP1 = ALPHA*Y( JY ) - TEMP2 = ALPHA*X( JX ) - IX = JX - IY = JY - DO 70, I = J, N - A( I, J ) = A( I, J ) + X( IX )*TEMP1 - $ + Y( IY )*TEMP2 - IX = IX + INCX - IY = IY + INCY - 70 CONTINUE - END IF - JX = JX + INCX - JY = JY + INCY - 80 CONTINUE - END IF - END IF -* - RETURN -* -* End of DSYR2 . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsyr2k.f b/cpp/nudg++/trunk/BlasLapack/dsyr2k.f deleted file mode 100644 index ac7d97d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsyr2k.f +++ /dev/null @@ -1,327 +0,0 @@ - SUBROUTINE DSYR2K( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, - $ BETA, C, LDC ) -* .. Scalar Arguments .. - CHARACTER*1 UPLO, TRANS - INTEGER N, K, LDA, LDB, LDC - DOUBLE PRECISION ALPHA, BETA -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) -* .. -* -* Purpose -* ======= -* -* DSYR2K performs one of the symmetric rank 2k operations -* -* C := alpha*A*B' + alpha*B*A' + beta*C, -* -* or -* -* C := alpha*A'*B + alpha*B'*A + beta*C, -* -* where alpha and beta are scalars, C is an n by n symmetric matrix -* and A and B are n by k matrices in the first case and k by n -* matrices in the second case. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the upper or lower -* triangular part of the array C is to be referenced as -* follows: -* -* UPLO = 'U' or 'u' Only the upper triangular part of C -* is to be referenced. -* -* UPLO = 'L' or 'l' Only the lower triangular part of C -* is to be referenced. -* -* Unchanged on exit. -* -* TRANS - CHARACTER*1. -* On entry, TRANS specifies the operation to be performed as -* follows: -* -* TRANS = 'N' or 'n' C := alpha*A*B' + alpha*B*A' + -* beta*C. -* -* TRANS = 'T' or 't' C := alpha*A'*B + alpha*B'*A + -* beta*C. -* -* TRANS = 'C' or 'c' C := alpha*A'*B + alpha*B'*A + -* beta*C. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix C. N must be -* at least zero. -* Unchanged on exit. -* -* K - INTEGER. -* On entry with TRANS = 'N' or 'n', K specifies the number -* of columns of the matrices A and B, and on entry with -* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number -* of rows of the matrices A and B. K must be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is -* k when TRANS = 'N' or 'n', and is n otherwise. -* Before entry with TRANS = 'N' or 'n', the leading n by k -* part of the array A must contain the matrix A, otherwise -* the leading k by n part of the array A must contain the -* matrix A. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. When TRANS = 'N' or 'n' -* then LDA must be at least max( 1, n ), otherwise LDA must -* be at least max( 1, k ). -* Unchanged on exit. -* -* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is -* k when TRANS = 'N' or 'n', and is n otherwise. -* Before entry with TRANS = 'N' or 'n', the leading n by k -* part of the array B must contain the matrix B, otherwise -* the leading k by n part of the array B must contain the -* matrix B. -* Unchanged on exit. -* -* LDB - INTEGER. -* On entry, LDB specifies the first dimension of B as declared -* in the calling (sub) program. When TRANS = 'N' or 'n' -* then LDB must be at least max( 1, n ), otherwise LDB must -* be at least max( 1, k ). -* Unchanged on exit. -* -* BETA - DOUBLE PRECISION. -* On entry, BETA specifies the scalar beta. -* Unchanged on exit. -* -* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array C must contain the upper -* triangular part of the symmetric matrix and the strictly -* lower triangular part of C is not referenced. On exit, the -* upper triangular part of the array C is overwritten by the -* upper triangular part of the updated matrix. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array C must contain the lower -* triangular part of the symmetric matrix and the strictly -* upper triangular part of C is not referenced. On exit, the -* lower triangular part of the array C is overwritten by the -* lower triangular part of the updated matrix. -* -* LDC - INTEGER. -* On entry, LDC specifies the first dimension of C as declared -* in the calling (sub) program. LDC must be at least -* max( 1, n ). -* Unchanged on exit. -* -* -* Level 3 Blas routine. -* -* -* -- Written on 8-February-1989. -* Jack Dongarra, Argonne National Laboratory. -* Iain Duff, AERE Harwell. -* Jeremy Du Croz, Numerical Algorithms Group Ltd. -* Sven Hammarling, Numerical Algorithms Group Ltd. -* -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. Local Scalars .. - LOGICAL UPPER - INTEGER I, INFO, J, L, NROWA - DOUBLE PRECISION TEMP1, TEMP2 -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - IF( LSAME( TRANS, 'N' ) )THEN - NROWA = N - ELSE - NROWA = K - END IF - UPPER = LSAME( UPLO, 'U' ) -* - INFO = 0 - IF( ( .NOT.UPPER ).AND. - $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN - INFO = 1 - ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. - $ ( .NOT.LSAME( TRANS, 'T' ) ).AND. - $ ( .NOT.LSAME( TRANS, 'C' ) ) )THEN - INFO = 2 - ELSE IF( N .LT.0 )THEN - INFO = 3 - ELSE IF( K .LT.0 )THEN - INFO = 4 - ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN - INFO = 7 - ELSE IF( LDB.LT.MAX( 1, NROWA ) )THEN - INFO = 9 - ELSE IF( LDC.LT.MAX( 1, N ) )THEN - INFO = 12 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DSYR2K', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( N.EQ.0 ).OR. - $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) - $ RETURN -* -* And when alpha.eq.zero. -* - IF( ALPHA.EQ.ZERO )THEN - IF( UPPER )THEN - IF( BETA.EQ.ZERO )THEN - DO 20, J = 1, N - DO 10, I = 1, J - C( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - ELSE - DO 40, J = 1, N - DO 30, I = 1, J - C( I, J ) = BETA*C( I, J ) - 30 CONTINUE - 40 CONTINUE - END IF - ELSE - IF( BETA.EQ.ZERO )THEN - DO 60, J = 1, N - DO 50, I = J, N - C( I, J ) = ZERO - 50 CONTINUE - 60 CONTINUE - ELSE - DO 80, J = 1, N - DO 70, I = J, N - C( I, J ) = BETA*C( I, J ) - 70 CONTINUE - 80 CONTINUE - END IF - END IF - RETURN - END IF -* -* Start the operations. -* - IF( LSAME( TRANS, 'N' ) )THEN -* -* Form C := alpha*A*B' + alpha*B*A' + C. -* - IF( UPPER )THEN - DO 130, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 90, I = 1, J - C( I, J ) = ZERO - 90 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 100, I = 1, J - C( I, J ) = BETA*C( I, J ) - 100 CONTINUE - END IF - DO 120, L = 1, K - IF( ( A( J, L ).NE.ZERO ).OR. - $ ( B( J, L ).NE.ZERO ) )THEN - TEMP1 = ALPHA*B( J, L ) - TEMP2 = ALPHA*A( J, L ) - DO 110, I = 1, J - C( I, J ) = C( I, J ) + - $ A( I, L )*TEMP1 + B( I, L )*TEMP2 - 110 CONTINUE - END IF - 120 CONTINUE - 130 CONTINUE - ELSE - DO 180, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 140, I = J, N - C( I, J ) = ZERO - 140 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 150, I = J, N - C( I, J ) = BETA*C( I, J ) - 150 CONTINUE - END IF - DO 170, L = 1, K - IF( ( A( J, L ).NE.ZERO ).OR. - $ ( B( J, L ).NE.ZERO ) )THEN - TEMP1 = ALPHA*B( J, L ) - TEMP2 = ALPHA*A( J, L ) - DO 160, I = J, N - C( I, J ) = C( I, J ) + - $ A( I, L )*TEMP1 + B( I, L )*TEMP2 - 160 CONTINUE - END IF - 170 CONTINUE - 180 CONTINUE - END IF - ELSE -* -* Form C := alpha*A'*B + alpha*B'*A + C. -* - IF( UPPER )THEN - DO 210, J = 1, N - DO 200, I = 1, J - TEMP1 = ZERO - TEMP2 = ZERO - DO 190, L = 1, K - TEMP1 = TEMP1 + A( L, I )*B( L, J ) - TEMP2 = TEMP2 + B( L, I )*A( L, J ) - 190 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 - ELSE - C( I, J ) = BETA *C( I, J ) + - $ ALPHA*TEMP1 + ALPHA*TEMP2 - END IF - 200 CONTINUE - 210 CONTINUE - ELSE - DO 240, J = 1, N - DO 230, I = J, N - TEMP1 = ZERO - TEMP2 = ZERO - DO 220, L = 1, K - TEMP1 = TEMP1 + A( L, I )*B( L, J ) - TEMP2 = TEMP2 + B( L, I )*A( L, J ) - 220 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 - ELSE - C( I, J ) = BETA *C( I, J ) + - $ ALPHA*TEMP1 + ALPHA*TEMP2 - END IF - 230 CONTINUE - 240 CONTINUE - END IF - END IF -* - RETURN -* -* End of DSYR2K. -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsyrfs.f b/cpp/nudg++/trunk/BlasLapack/dsyrfs.f deleted file mode 100644 index 64c7455..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsyrfs.f +++ /dev/null @@ -1,335 +0,0 @@ - SUBROUTINE DSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, - $ X, LDX, FERR, BERR, WORK, IWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS -* .. -* .. Array Arguments .. - INTEGER IPIV( * ), IWORK( * ) - DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ), - $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * ) -* .. -* -* Purpose -* ======= -* -* DSYRFS improves the computed solution to a system of linear -* equations when the coefficient matrix is symmetric indefinite, and -* provides error bounds and backward error estimates for the solution. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A is stored; -* = 'L': Lower triangle of A is stored. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* NRHS (input) INTEGER -* The number of right hand sides, i.e., the number of columns -* of the matrices B and X. NRHS >= 0. -* -* A (input) DOUBLE PRECISION array, dimension (LDA,N) -* The symmetric matrix A. If UPLO = 'U', the leading N-by-N -* upper triangular part of A contains the upper triangular part -* of the matrix A, and the strictly lower triangular part of A -* is not referenced. If UPLO = 'L', the leading N-by-N lower -* triangular part of A contains the lower triangular part of -* the matrix A, and the strictly upper triangular part of A is -* not referenced. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* AF (input) DOUBLE PRECISION array, dimension (LDAF,N) -* The factored form of the matrix A. AF contains the block -* diagonal matrix D and the multipliers used to obtain the -* factor U or L from the factorization A = U*D*U**T or -* A = L*D*L**T as computed by DSYTRF. -* -* LDAF (input) INTEGER -* The leading dimension of the array AF. LDAF >= max(1,N). -* -* IPIV (input) INTEGER array, dimension (N) -* Details of the interchanges and the block structure of D -* as determined by DSYTRF. -* -* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS) -* The right hand side matrix B. -* -* LDB (input) INTEGER -* The leading dimension of the array B. LDB >= max(1,N). -* -* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS) -* On entry, the solution matrix X, as computed by DSYTRS. -* On exit, the improved solution matrix X. -* -* LDX (input) INTEGER -* The leading dimension of the array X. LDX >= max(1,N). -* -* FERR (output) DOUBLE PRECISION array, dimension (NRHS) -* The estimated forward error bound for each solution vector -* X(j) (the j-th column of the solution matrix X). -* If XTRUE is the true solution corresponding to X(j), FERR(j) -* is an estimated upper bound for the magnitude of the largest -* element in (X(j) - XTRUE) divided by the magnitude of the -* largest element in X(j). The estimate is as reliable as -* the estimate for RCOND, and is almost always a slight -* overestimate of the true error. -* -* BERR (output) DOUBLE PRECISION array, dimension (NRHS) -* The componentwise relative backward error of each solution -* vector X(j) (i.e., the smallest relative change in -* any element of A or B that makes X(j) an exact solution). -* -* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) -* -* IWORK (workspace) INTEGER array, dimension (N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* Internal Parameters -* =================== -* -* ITMAX is the maximum number of steps of iterative refinement. -* -* ===================================================================== -* -* .. Parameters .. - INTEGER ITMAX - PARAMETER ( ITMAX = 5 ) - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) - DOUBLE PRECISION TWO - PARAMETER ( TWO = 2.0D+0 ) - DOUBLE PRECISION THREE - PARAMETER ( THREE = 3.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL UPPER - INTEGER COUNT, I, J, K, KASE, NZ - DOUBLE PRECISION EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK -* .. -* .. External Subroutines .. - EXTERNAL DAXPY, DCOPY, DLACON, DSYMV, DSYTRS, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DLAMCH - EXTERNAL LSAME, DLAMCH -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( NRHS.LT.0 ) THEN - INFO = -3 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -5 - ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN - INFO = -7 - ELSE IF( LDB.LT.MAX( 1, N ) ) THEN - INFO = -10 - ELSE IF( LDX.LT.MAX( 1, N ) ) THEN - INFO = -12 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DSYRFS', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 .OR. NRHS.EQ.0 ) THEN - DO 10 J = 1, NRHS - FERR( J ) = ZERO - BERR( J ) = ZERO - 10 CONTINUE - RETURN - END IF -* -* NZ = maximum number of nonzero elements in each row of A, plus 1 -* - NZ = N + 1 - EPS = DLAMCH( 'Epsilon' ) - SAFMIN = DLAMCH( 'Safe minimum' ) - SAFE1 = NZ*SAFMIN - SAFE2 = SAFE1 / EPS -* -* Do for each right hand side -* - DO 140 J = 1, NRHS -* - COUNT = 1 - LSTRES = THREE - 20 CONTINUE -* -* Loop until stopping criterion is satisfied. -* -* Compute residual R = B - A * X -* - CALL DCOPY( N, B( 1, J ), 1, WORK( N+1 ), 1 ) - CALL DSYMV( UPLO, N, -ONE, A, LDA, X( 1, J ), 1, ONE, - $ WORK( N+1 ), 1 ) -* -* Compute componentwise relative backward error from formula -* -* max(i) ( abs(R(i)) / ( abs(A)*abs(X) + abs(B) )(i) ) -* -* where abs(Z) is the componentwise absolute value of the matrix -* or vector Z. If the i-th component of the denominator is less -* than SAFE2, then SAFE1 is added to the i-th components of the -* numerator and denominator before dividing. -* - DO 30 I = 1, N - WORK( I ) = ABS( B( I, J ) ) - 30 CONTINUE -* -* Compute abs(A)*abs(X) + abs(B). -* - IF( UPPER ) THEN - DO 50 K = 1, N - S = ZERO - XK = ABS( X( K, J ) ) - DO 40 I = 1, K - 1 - WORK( I ) = WORK( I ) + ABS( A( I, K ) )*XK - S = S + ABS( A( I, K ) )*ABS( X( I, J ) ) - 40 CONTINUE - WORK( K ) = WORK( K ) + ABS( A( K, K ) )*XK + S - 50 CONTINUE - ELSE - DO 70 K = 1, N - S = ZERO - XK = ABS( X( K, J ) ) - WORK( K ) = WORK( K ) + ABS( A( K, K ) )*XK - DO 60 I = K + 1, N - WORK( I ) = WORK( I ) + ABS( A( I, K ) )*XK - S = S + ABS( A( I, K ) )*ABS( X( I, J ) ) - 60 CONTINUE - WORK( K ) = WORK( K ) + S - 70 CONTINUE - END IF - S = ZERO - DO 80 I = 1, N - IF( WORK( I ).GT.SAFE2 ) THEN - S = MAX( S, ABS( WORK( N+I ) ) / WORK( I ) ) - ELSE - S = MAX( S, ( ABS( WORK( N+I ) )+SAFE1 ) / - $ ( WORK( I )+SAFE1 ) ) - END IF - 80 CONTINUE - BERR( J ) = S -* -* Test stopping criterion. Continue iterating if -* 1) The residual BERR(J) is larger than machine epsilon, and -* 2) BERR(J) decreased by at least a factor of 2 during the -* last iteration, and -* 3) At most ITMAX iterations tried. -* - IF( BERR( J ).GT.EPS .AND. TWO*BERR( J ).LE.LSTRES .AND. - $ COUNT.LE.ITMAX ) THEN -* -* Update solution and try again. -* - CALL DSYTRS( UPLO, N, 1, AF, LDAF, IPIV, WORK( N+1 ), N, - $ INFO ) - CALL DAXPY( N, ONE, WORK( N+1 ), 1, X( 1, J ), 1 ) - LSTRES = BERR( J ) - COUNT = COUNT + 1 - GO TO 20 - END IF -* -* Bound error from formula -* -* norm(X - XTRUE) / norm(X) .le. FERR = -* norm( abs(inv(A))* -* ( abs(R) + NZ*EPS*( abs(A)*abs(X)+abs(B) ))) / norm(X) -* -* where -* norm(Z) is the magnitude of the largest component of Z -* inv(A) is the inverse of A -* abs(Z) is the componentwise absolute value of the matrix or -* vector Z -* NZ is the maximum number of nonzeros in any row of A, plus 1 -* EPS is machine epsilon -* -* The i-th component of abs(R)+NZ*EPS*(abs(A)*abs(X)+abs(B)) -* is incremented by SAFE1 if the i-th component of -* abs(A)*abs(X) + abs(B) is less than SAFE2. -* -* Use DLACON to estimate the infinity-norm of the matrix -* inv(A) * diag(W), -* where W = abs(R) + NZ*EPS*( abs(A)*abs(X)+abs(B) ))) -* - DO 90 I = 1, N - IF( WORK( I ).GT.SAFE2 ) THEN - WORK( I ) = ABS( WORK( N+I ) ) + NZ*EPS*WORK( I ) - ELSE - WORK( I ) = ABS( WORK( N+I ) ) + NZ*EPS*WORK( I ) + SAFE1 - END IF - 90 CONTINUE -* - KASE = 0 - 100 CONTINUE - CALL DLACON( N, WORK( 2*N+1 ), WORK( N+1 ), IWORK, FERR( J ), - $ KASE ) - IF( KASE.NE.0 ) THEN - IF( KASE.EQ.1 ) THEN -* -* Multiply by diag(W)*inv(A'). -* - CALL DSYTRS( UPLO, N, 1, AF, LDAF, IPIV, WORK( N+1 ), N, - $ INFO ) - DO 110 I = 1, N - WORK( N+I ) = WORK( I )*WORK( N+I ) - 110 CONTINUE - ELSE IF( KASE.EQ.2 ) THEN -* -* Multiply by inv(A)*diag(W). -* - DO 120 I = 1, N - WORK( N+I ) = WORK( I )*WORK( N+I ) - 120 CONTINUE - CALL DSYTRS( UPLO, N, 1, AF, LDAF, IPIV, WORK( N+1 ), N, - $ INFO ) - END IF - GO TO 100 - END IF -* -* Normalize error. -* - LSTRES = ZERO - DO 130 I = 1, N - LSTRES = MAX( LSTRES, ABS( X( I, J ) ) ) - 130 CONTINUE - IF( LSTRES.NE.ZERO ) - $ FERR( J ) = FERR( J ) / LSTRES -* - 140 CONTINUE -* - RETURN -* -* End of DSYRFS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsyrk.f b/cpp/nudg++/trunk/BlasLapack/dsyrk.f deleted file mode 100644 index b618b29..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsyrk.f +++ /dev/null @@ -1,294 +0,0 @@ - SUBROUTINE DSYRK ( UPLO, TRANS, N, K, ALPHA, A, LDA, - $ BETA, C, LDC ) -* .. Scalar Arguments .. - CHARACTER*1 UPLO, TRANS - INTEGER N, K, LDA, LDC - DOUBLE PRECISION ALPHA, BETA -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), C( LDC, * ) -* .. -* -* Purpose -* ======= -* -* DSYRK performs one of the symmetric rank k operations -* -* C := alpha*A*A' + beta*C, -* -* or -* -* C := alpha*A'*A + beta*C, -* -* where alpha and beta are scalars, C is an n by n symmetric matrix -* and A is an n by k matrix in the first case and a k by n matrix -* in the second case. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the upper or lower -* triangular part of the array C is to be referenced as -* follows: -* -* UPLO = 'U' or 'u' Only the upper triangular part of C -* is to be referenced. -* -* UPLO = 'L' or 'l' Only the lower triangular part of C -* is to be referenced. -* -* Unchanged on exit. -* -* TRANS - CHARACTER*1. -* On entry, TRANS specifies the operation to be performed as -* follows: -* -* TRANS = 'N' or 'n' C := alpha*A*A' + beta*C. -* -* TRANS = 'T' or 't' C := alpha*A'*A + beta*C. -* -* TRANS = 'C' or 'c' C := alpha*A'*A + beta*C. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix C. N must be -* at least zero. -* Unchanged on exit. -* -* K - INTEGER. -* On entry with TRANS = 'N' or 'n', K specifies the number -* of columns of the matrix A, and on entry with -* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number -* of rows of the matrix A. K must be at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is -* k when TRANS = 'N' or 'n', and is n otherwise. -* Before entry with TRANS = 'N' or 'n', the leading n by k -* part of the array A must contain the matrix A, otherwise -* the leading k by n part of the array A must contain the -* matrix A. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. When TRANS = 'N' or 'n' -* then LDA must be at least max( 1, n ), otherwise LDA must -* be at least max( 1, k ). -* Unchanged on exit. -* -* BETA - DOUBLE PRECISION. -* On entry, BETA specifies the scalar beta. -* Unchanged on exit. -* -* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array C must contain the upper -* triangular part of the symmetric matrix and the strictly -* lower triangular part of C is not referenced. On exit, the -* upper triangular part of the array C is overwritten by the -* upper triangular part of the updated matrix. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array C must contain the lower -* triangular part of the symmetric matrix and the strictly -* upper triangular part of C is not referenced. On exit, the -* lower triangular part of the array C is overwritten by the -* lower triangular part of the updated matrix. -* -* LDC - INTEGER. -* On entry, LDC specifies the first dimension of C as declared -* in the calling (sub) program. LDC must be at least -* max( 1, n ). -* Unchanged on exit. -* -* -* Level 3 Blas routine. -* -* -- Written on 8-February-1989. -* Jack Dongarra, Argonne National Laboratory. -* Iain Duff, AERE Harwell. -* Jeremy Du Croz, Numerical Algorithms Group Ltd. -* Sven Hammarling, Numerical Algorithms Group Ltd. -* -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. Local Scalars .. - LOGICAL UPPER - INTEGER I, INFO, J, L, NROWA - DOUBLE PRECISION TEMP -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - IF( LSAME( TRANS, 'N' ) )THEN - NROWA = N - ELSE - NROWA = K - END IF - UPPER = LSAME( UPLO, 'U' ) -* - INFO = 0 - IF( ( .NOT.UPPER ).AND. - $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN - INFO = 1 - ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. - $ ( .NOT.LSAME( TRANS, 'T' ) ).AND. - $ ( .NOT.LSAME( TRANS, 'C' ) ) )THEN - INFO = 2 - ELSE IF( N .LT.0 )THEN - INFO = 3 - ELSE IF( K .LT.0 )THEN - INFO = 4 - ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN - INFO = 7 - ELSE IF( LDC.LT.MAX( 1, N ) )THEN - INFO = 10 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DSYRK ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( N.EQ.0 ).OR. - $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) - $ RETURN -* -* And when alpha.eq.zero. -* - IF( ALPHA.EQ.ZERO )THEN - IF( UPPER )THEN - IF( BETA.EQ.ZERO )THEN - DO 20, J = 1, N - DO 10, I = 1, J - C( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - ELSE - DO 40, J = 1, N - DO 30, I = 1, J - C( I, J ) = BETA*C( I, J ) - 30 CONTINUE - 40 CONTINUE - END IF - ELSE - IF( BETA.EQ.ZERO )THEN - DO 60, J = 1, N - DO 50, I = J, N - C( I, J ) = ZERO - 50 CONTINUE - 60 CONTINUE - ELSE - DO 80, J = 1, N - DO 70, I = J, N - C( I, J ) = BETA*C( I, J ) - 70 CONTINUE - 80 CONTINUE - END IF - END IF - RETURN - END IF -* -* Start the operations. -* - IF( LSAME( TRANS, 'N' ) )THEN -* -* Form C := alpha*A*A' + beta*C. -* - IF( UPPER )THEN - DO 130, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 90, I = 1, J - C( I, J ) = ZERO - 90 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 100, I = 1, J - C( I, J ) = BETA*C( I, J ) - 100 CONTINUE - END IF - DO 120, L = 1, K - IF( A( J, L ).NE.ZERO )THEN - TEMP = ALPHA*A( J, L ) - DO 110, I = 1, J - C( I, J ) = C( I, J ) + TEMP*A( I, L ) - 110 CONTINUE - END IF - 120 CONTINUE - 130 CONTINUE - ELSE - DO 180, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 140, I = J, N - C( I, J ) = ZERO - 140 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 150, I = J, N - C( I, J ) = BETA*C( I, J ) - 150 CONTINUE - END IF - DO 170, L = 1, K - IF( A( J, L ).NE.ZERO )THEN - TEMP = ALPHA*A( J, L ) - DO 160, I = J, N - C( I, J ) = C( I, J ) + TEMP*A( I, L ) - 160 CONTINUE - END IF - 170 CONTINUE - 180 CONTINUE - END IF - ELSE -* -* Form C := alpha*A'*A + beta*C. -* - IF( UPPER )THEN - DO 210, J = 1, N - DO 200, I = 1, J - TEMP = ZERO - DO 190, L = 1, K - TEMP = TEMP + A( L, I )*A( L, J ) - 190 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 200 CONTINUE - 210 CONTINUE - ELSE - DO 240, J = 1, N - DO 230, I = J, N - TEMP = ZERO - DO 220, L = 1, K - TEMP = TEMP + A( L, I )*A( L, J ) - 220 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 230 CONTINUE - 240 CONTINUE - END IF - END IF -* - RETURN -* -* End of DSYRK . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsytd2.f b/cpp/nudg++/trunk/BlasLapack/dsytd2.f deleted file mode 100644 index a0a0861..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsytd2.f +++ /dev/null @@ -1,249 +0,0 @@ - SUBROUTINE DSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * ) -* .. -* -* Purpose -* ======= -* -* DSYTD2 reduces a real symmetric matrix A to symmetric tridiagonal -* form T by an orthogonal similarity transformation: Q' * A * Q = T. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* Specifies whether the upper or lower triangular part of the -* symmetric matrix A is stored: -* = 'U': Upper triangular -* = 'L': Lower triangular -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the symmetric matrix A. If UPLO = 'U', the leading -* n-by-n upper triangular part of A contains the upper -* triangular part of the matrix A, and the strictly lower -* triangular part of A is not referenced. If UPLO = 'L', the -* leading n-by-n lower triangular part of A contains the lower -* triangular part of the matrix A, and the strictly upper -* triangular part of A is not referenced. -* On exit, if UPLO = 'U', the diagonal and first superdiagonal -* of A are overwritten by the corresponding elements of the -* tridiagonal matrix T, and the elements above the first -* superdiagonal, with the array TAU, represent the orthogonal -* matrix Q as a product of elementary reflectors; if UPLO -* = 'L', the diagonal and first subdiagonal of A are over- -* written by the corresponding elements of the tridiagonal -* matrix T, and the elements below the first subdiagonal, with -* the array TAU, represent the orthogonal matrix Q as a product -* of elementary reflectors. See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* D (output) DOUBLE PRECISION array, dimension (N) -* The diagonal elements of the tridiagonal matrix T: -* D(i) = A(i,i). -* -* E (output) DOUBLE PRECISION array, dimension (N-1) -* The off-diagonal elements of the tridiagonal matrix T: -* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'. -* -* TAU (output) DOUBLE PRECISION array, dimension (N-1) -* The scalar factors of the elementary reflectors (see Further -* Details). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value. -* -* Further Details -* =============== -* -* If UPLO = 'U', the matrix Q is represented as a product of elementary -* reflectors -* -* Q = H(n-1) . . . H(2) H(1). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in -* A(1:i-1,i+1), and tau in TAU(i). -* -* If UPLO = 'L', the matrix Q is represented as a product of elementary -* reflectors -* -* Q = H(1) H(2) . . . H(n-1). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i), -* and tau in TAU(i). -* -* The contents of A on exit are illustrated by the following examples -* with n = 5: -* -* if UPLO = 'U': if UPLO = 'L': -* -* ( d e v2 v3 v4 ) ( d ) -* ( d e v3 v4 ) ( e d ) -* ( d e v4 ) ( v1 e d ) -* ( d e ) ( v1 v2 e d ) -* ( d ) ( v1 v2 v3 e d ) -* -* where d and e denote diagonal and off-diagonal elements of T, and vi -* denotes an element of the vector defining H(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO, HALF - PARAMETER ( ONE = 1.0D0, ZERO = 0.0D0, - $ HALF = 1.0D0 / 2.0D0 ) -* .. -* .. Local Scalars .. - LOGICAL UPPER - INTEGER I - DOUBLE PRECISION ALPHA, TAUI -* .. -* .. External Subroutines .. - EXTERNAL DAXPY, DLARFG, DSYMV, DSYR2, XERBLA -* .. -* .. External Functions .. - LOGICAL LSAME - DOUBLE PRECISION DDOT - EXTERNAL LSAME, DDOT -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DSYTD2', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.LE.0 ) - $ RETURN -* - IF( UPPER ) THEN -* -* Reduce the upper triangle of A -* - DO 10 I = N - 1, 1, -1 -* -* Generate elementary reflector H(i) = I - tau * v * v' -* to annihilate A(1:i-1,i+1) -* - CALL DLARFG( I, A( I, I+1 ), A( 1, I+1 ), 1, TAUI ) - E( I ) = A( I, I+1 ) -* - IF( TAUI.NE.ZERO ) THEN -* -* Apply H(i) from both sides to A(1:i,1:i) -* - A( I, I+1 ) = ONE -* -* Compute x := tau * A * v storing x in TAU(1:i) -* - CALL DSYMV( UPLO, I, TAUI, A, LDA, A( 1, I+1 ), 1, ZERO, - $ TAU, 1 ) -* -* Compute w := x - 1/2 * tau * (x'*v) * v -* - ALPHA = -HALF*TAUI*DDOT( I, TAU, 1, A( 1, I+1 ), 1 ) - CALL DAXPY( I, ALPHA, A( 1, I+1 ), 1, TAU, 1 ) -* -* Apply the transformation as a rank-2 update: -* A := A - v * w' - w * v' -* - CALL DSYR2( UPLO, I, -ONE, A( 1, I+1 ), 1, TAU, 1, A, - $ LDA ) -* - A( I, I+1 ) = E( I ) - END IF - D( I+1 ) = A( I+1, I+1 ) - TAU( I ) = TAUI - 10 CONTINUE - D( 1 ) = A( 1, 1 ) - ELSE -* -* Reduce the lower triangle of A -* - DO 20 I = 1, N - 1 -* -* Generate elementary reflector H(i) = I - tau * v * v' -* to annihilate A(i+2:n,i) -* - CALL DLARFG( N-I, A( I+1, I ), A( MIN( I+2, N ), I ), 1, - $ TAUI ) - E( I ) = A( I+1, I ) -* - IF( TAUI.NE.ZERO ) THEN -* -* Apply H(i) from both sides to A(i+1:n,i+1:n) -* - A( I+1, I ) = ONE -* -* Compute x := tau * A * v storing y in TAU(i:n-1) -* - CALL DSYMV( UPLO, N-I, TAUI, A( I+1, I+1 ), LDA, - $ A( I+1, I ), 1, ZERO, TAU( I ), 1 ) -* -* Compute w := x - 1/2 * tau * (x'*v) * v -* - ALPHA = -HALF*TAUI*DDOT( N-I, TAU( I ), 1, A( I+1, I ), - $ 1 ) - CALL DAXPY( N-I, ALPHA, A( I+1, I ), 1, TAU( I ), 1 ) -* -* Apply the transformation as a rank-2 update: -* A := A - v * w' - w * v' -* - CALL DSYR2( UPLO, N-I, -ONE, A( I+1, I ), 1, TAU( I ), 1, - $ A( I+1, I+1 ), LDA ) -* - A( I+1, I ) = E( I ) - END IF - D( I ) = A( I, I ) - TAU( I ) = TAUI - 20 CONTINUE - D( N ) = A( N, N ) - END IF -* - RETURN -* -* End of DSYTD2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dsytrd.f b/cpp/nudg++/trunk/BlasLapack/dsytrd.f deleted file mode 100644 index 583675c..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dsytrd.f +++ /dev/null @@ -1,295 +0,0 @@ - SUBROUTINE DSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER UPLO - INTEGER INFO, LDA, LWORK, N -* .. -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * ), - $ WORK( * ) -* .. -* -* Purpose -* ======= -* -* DSYTRD reduces a real symmetric matrix A to real symmetric -* tridiagonal form T by an orthogonal similarity transformation: -* Q**T * A * Q = T. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* = 'U': Upper triangle of A is stored; -* = 'L': Lower triangle of A is stored. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) -* On entry, the symmetric matrix A. If UPLO = 'U', the leading -* N-by-N upper triangular part of A contains the upper -* triangular part of the matrix A, and the strictly lower -* triangular part of A is not referenced. If UPLO = 'L', the -* leading N-by-N lower triangular part of A contains the lower -* triangular part of the matrix A, and the strictly upper -* triangular part of A is not referenced. -* On exit, if UPLO = 'U', the diagonal and first superdiagonal -* of A are overwritten by the corresponding elements of the -* tridiagonal matrix T, and the elements above the first -* superdiagonal, with the array TAU, represent the orthogonal -* matrix Q as a product of elementary reflectors; if UPLO -* = 'L', the diagonal and first subdiagonal of A are over- -* written by the corresponding elements of the tridiagonal -* matrix T, and the elements below the first subdiagonal, with -* the array TAU, represent the orthogonal matrix Q as a product -* of elementary reflectors. See Further Details. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* D (output) DOUBLE PRECISION array, dimension (N) -* The diagonal elements of the tridiagonal matrix T: -* D(i) = A(i,i). -* -* E (output) DOUBLE PRECISION array, dimension (N-1) -* The off-diagonal elements of the tridiagonal matrix T: -* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'. -* -* TAU (output) DOUBLE PRECISION array, dimension (N-1) -* The scalar factors of the elementary reflectors (see Further -* Details). -* -* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) -* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. -* -* LWORK (input) INTEGER -* The dimension of the array WORK. LWORK >= 1. -* For optimum performance LWORK >= N*NB, where NB is the -* optimal blocksize. -* -* If LWORK = -1, then a workspace query is assumed; the routine -* only calculates the optimal size of the WORK array, returns -* this value as the first entry of the WORK array, and no error -* message related to LWORK is issued by XERBLA. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* Further Details -* =============== -* -* If UPLO = 'U', the matrix Q is represented as a product of elementary -* reflectors -* -* Q = H(n-1) . . . H(2) H(1). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in -* A(1:i-1,i+1), and tau in TAU(i). -* -* If UPLO = 'L', the matrix Q is represented as a product of elementary -* reflectors -* -* Q = H(1) H(2) . . . H(n-1). -* -* Each H(i) has the form -* -* H(i) = I - tau * v * v' -* -* where tau is a real scalar, and v is a real vector with -* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i), -* and tau in TAU(i). -* -* The contents of A on exit are illustrated by the following examples -* with n = 5: -* -* if UPLO = 'U': if UPLO = 'L': -* -* ( d e v2 v3 v4 ) ( d ) -* ( d e v3 v4 ) ( e d ) -* ( d e v4 ) ( v1 e d ) -* ( d e ) ( v1 v2 e d ) -* ( d ) ( v1 v2 v3 e d ) -* -* where d and e denote diagonal and off-diagonal elements of T, and vi -* denotes an element of the vector defining H(i). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE - PARAMETER ( ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL LQUERY, UPPER - INTEGER I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB, - $ NBMIN, NX -* .. -* .. External Subroutines .. - EXTERNAL DLATRD, DSYR2K, DSYTD2, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER ILAENV - EXTERNAL LSAME, ILAENV -* .. -* .. Executable Statements .. -* -* Test the input parameters -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - LQUERY = ( LWORK.EQ.-1 ) - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN - INFO = -9 - END IF -* - IF( INFO.EQ.0 ) THEN -* -* Determine the block size. -* - NB = ILAENV( 1, 'DSYTRD', UPLO, N, -1, -1, -1 ) - LWKOPT = N*NB - WORK( 1 ) = LWKOPT - END IF -* - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DSYTRD', -INFO ) - RETURN - ELSE IF( LQUERY ) THEN - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) THEN - WORK( 1 ) = 1 - RETURN - END IF -* - NX = N - IWS = 1 - IF( NB.GT.1 .AND. NB.LT.N ) THEN -* -* Determine when to cross over from blocked to unblocked code -* (last block is always handled by unblocked code). -* - NX = MAX( NB, ILAENV( 3, 'DSYTRD', UPLO, N, -1, -1, -1 ) ) - IF( NX.LT.N ) THEN -* -* Determine if workspace is large enough for blocked code. -* - LDWORK = N - IWS = LDWORK*NB - IF( LWORK.LT.IWS ) THEN -* -* Not enough workspace to use optimal NB: determine the -* minimum value of NB, and reduce NB or force use of -* unblocked code by setting NX = N. -* - NB = MAX( LWORK / LDWORK, 1 ) - NBMIN = ILAENV( 2, 'DSYTRD', UPLO, N, -1, -1, -1 ) - IF( NB.LT.NBMIN ) - $ NX = N - END IF - ELSE - NX = N - END IF - ELSE - NB = 1 - END IF -* - IF( UPPER ) THEN -* -* Reduce the upper triangle of A. -* Columns 1:kk are handled by the unblocked method. -* - KK = N - ( ( N-NX+NB-1 ) / NB )*NB - DO 20 I = N - NB + 1, KK + 1, -NB -* -* Reduce columns i:i+nb-1 to tridiagonal form and form the -* matrix W which is needed to update the unreduced part of -* the matrix -* - CALL DLATRD( UPLO, I+NB-1, NB, A, LDA, E, TAU, WORK, - $ LDWORK ) -* -* Update the unreduced submatrix A(1:i-1,1:i-1), using an -* update of the form: A := A - V*W' - W*V' -* - CALL DSYR2K( UPLO, 'No transpose', I-1, NB, -ONE, A( 1, I ), - $ LDA, WORK, LDWORK, ONE, A, LDA ) -* -* Copy superdiagonal elements back into A, and diagonal -* elements into D -* - DO 10 J = I, I + NB - 1 - A( J-1, J ) = E( J-1 ) - D( J ) = A( J, J ) - 10 CONTINUE - 20 CONTINUE -* -* Use unblocked code to reduce the last or only block -* - CALL DSYTD2( UPLO, KK, A, LDA, D, E, TAU, IINFO ) - ELSE -* -* Reduce the lower triangle of A -* - DO 40 I = 1, N - NX, NB -* -* Reduce columns i:i+nb-1 to tridiagonal form and form the -* matrix W which is needed to update the unreduced part of -* the matrix -* - CALL DLATRD( UPLO, N-I+1, NB, A( I, I ), LDA, E( I ), - $ TAU( I ), WORK, LDWORK ) -* -* Update the unreduced submatrix A(i+ib:n,i+ib:n), using -* an update of the form: A := A - V*W' - W*V' -* - CALL DSYR2K( UPLO, 'No transpose', N-I-NB+1, NB, -ONE, - $ A( I+NB, I ), LDA, WORK( NB+1 ), LDWORK, ONE, - $ A( I+NB, I+NB ), LDA ) -* -* Copy subdiagonal elements back into A, and diagonal -* elements into D -* - DO 30 J = I, I + NB - 1 - A( J+1, J ) = E( J ) - D( J ) = A( J, J ) - 30 CONTINUE - 40 CONTINUE -* -* Use unblocked code to reduce the last or only block -* - CALL DSYTD2( UPLO, N-I+1, A( I, I ), LDA, D( I ), E( I ), - $ TAU( I ), IINFO ) - END IF -* - WORK( 1 ) = LWKOPT - RETURN -* -* End of DSYTRD -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dtbsv.f b/cpp/nudg++/trunk/BlasLapack/dtbsv.f deleted file mode 100644 index d87ed82..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dtbsv.f +++ /dev/null @@ -1,346 +0,0 @@ - SUBROUTINE DTBSV ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) -* .. Scalar Arguments .. - INTEGER INCX, K, LDA, N - CHARACTER*1 DIAG, TRANS, UPLO -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ) -* .. -* -* Purpose -* ======= -* -* DTBSV solves one of the systems of equations -* -* A*x = b, or A'*x = b, -* -* where b and x are n element vectors and A is an n by n unit, or -* non-unit, upper or lower triangular band matrix, with ( k + 1 ) -* diagonals. -* -* No test for singularity or near-singularity is included in this -* routine. Such tests must be performed before calling this routine. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the matrix is an upper or -* lower triangular matrix as follows: -* -* UPLO = 'U' or 'u' A is an upper triangular matrix. -* -* UPLO = 'L' or 'l' A is a lower triangular matrix. -* -* Unchanged on exit. -* -* TRANS - CHARACTER*1. -* On entry, TRANS specifies the equations to be solved as -* follows: -* -* TRANS = 'N' or 'n' A*x = b. -* -* TRANS = 'T' or 't' A'*x = b. -* -* TRANS = 'C' or 'c' A'*x = b. -* -* Unchanged on exit. -* -* DIAG - CHARACTER*1. -* On entry, DIAG specifies whether or not A is unit -* triangular as follows: -* -* DIAG = 'U' or 'u' A is assumed to be unit triangular. -* -* DIAG = 'N' or 'n' A is not assumed to be unit -* triangular. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* K - INTEGER. -* On entry with UPLO = 'U' or 'u', K specifies the number of -* super-diagonals of the matrix A. -* On entry with UPLO = 'L' or 'l', K specifies the number of -* sub-diagonals of the matrix A. -* K must satisfy 0 .le. K. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) -* by n part of the array A must contain the upper triangular -* band part of the matrix of coefficients, supplied column by -* column, with the leading diagonal of the matrix in row -* ( k + 1 ) of the array, the first super-diagonal starting at -* position 2 in row k, and so on. The top left k by k triangle -* of the array A is not referenced. -* The following program segment will transfer an upper -* triangular band matrix from conventional full matrix storage -* to band storage: -* -* DO 20, J = 1, N -* M = K + 1 - J -* DO 10, I = MAX( 1, J - K ), J -* A( M + I, J ) = matrix( I, J ) -* 10 CONTINUE -* 20 CONTINUE -* -* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) -* by n part of the array A must contain the lower triangular -* band part of the matrix of coefficients, supplied column by -* column, with the leading diagonal of the matrix in row 1 of -* the array, the first sub-diagonal starting at position 1 in -* row 2, and so on. The bottom right k by k triangle of the -* array A is not referenced. -* The following program segment will transfer a lower -* triangular band matrix from conventional full matrix storage -* to band storage: -* -* DO 20, J = 1, N -* M = 1 - J -* DO 10, I = J, MIN( N, J + K ) -* A( M + I, J ) = matrix( I, J ) -* 10 CONTINUE -* 20 CONTINUE -* -* Note that when DIAG = 'U' or 'u' the elements of the array A -* corresponding to the diagonal elements of the matrix are not -* referenced, but are assumed to be unity. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* ( k + 1 ). -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the n -* element right-hand side vector b. On exit, X is overwritten -* with the solution vector x. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP - INTEGER I, INFO, IX, J, JX, KPLUS1, KX, L - LOGICAL NOUNIT -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( UPLO , 'U' ).AND. - $ .NOT.LSAME( UPLO , 'L' ) )THEN - INFO = 1 - ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. - $ .NOT.LSAME( TRANS, 'T' ).AND. - $ .NOT.LSAME( TRANS, 'C' ) )THEN - INFO = 2 - ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. - $ .NOT.LSAME( DIAG , 'N' ) )THEN - INFO = 3 - ELSE IF( N.LT.0 )THEN - INFO = 4 - ELSE IF( K.LT.0 )THEN - INFO = 5 - ELSE IF( LDA.LT.( K + 1 ) )THEN - INFO = 7 - ELSE IF( INCX.EQ.0 )THEN - INFO = 9 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DTBSV ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* - NOUNIT = LSAME( DIAG, 'N' ) -* -* Set up the start point in X if the increment is not unity. This -* will be ( N - 1 )*INCX too small for descending loops. -* - IF( INCX.LE.0 )THEN - KX = 1 - ( N - 1 )*INCX - ELSE IF( INCX.NE.1 )THEN - KX = 1 - END IF -* -* Start the operations. In this version the elements of A are -* accessed by sequentially with one pass through A. -* - IF( LSAME( TRANS, 'N' ) )THEN -* -* Form x := inv( A )*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - KPLUS1 = K + 1 - IF( INCX.EQ.1 )THEN - DO 20, J = N, 1, -1 - IF( X( J ).NE.ZERO )THEN - L = KPLUS1 - J - IF( NOUNIT ) - $ X( J ) = X( J )/A( KPLUS1, J ) - TEMP = X( J ) - DO 10, I = J - 1, MAX( 1, J - K ), -1 - X( I ) = X( I ) - TEMP*A( L + I, J ) - 10 CONTINUE - END IF - 20 CONTINUE - ELSE - KX = KX + ( N - 1 )*INCX - JX = KX - DO 40, J = N, 1, -1 - KX = KX - INCX - IF( X( JX ).NE.ZERO )THEN - IX = KX - L = KPLUS1 - J - IF( NOUNIT ) - $ X( JX ) = X( JX )/A( KPLUS1, J ) - TEMP = X( JX ) - DO 30, I = J - 1, MAX( 1, J - K ), -1 - X( IX ) = X( IX ) - TEMP*A( L + I, J ) - IX = IX - INCX - 30 CONTINUE - END IF - JX = JX - INCX - 40 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 60, J = 1, N - IF( X( J ).NE.ZERO )THEN - L = 1 - J - IF( NOUNIT ) - $ X( J ) = X( J )/A( 1, J ) - TEMP = X( J ) - DO 50, I = J + 1, MIN( N, J + K ) - X( I ) = X( I ) - TEMP*A( L + I, J ) - 50 CONTINUE - END IF - 60 CONTINUE - ELSE - JX = KX - DO 80, J = 1, N - KX = KX + INCX - IF( X( JX ).NE.ZERO )THEN - IX = KX - L = 1 - J - IF( NOUNIT ) - $ X( JX ) = X( JX )/A( 1, J ) - TEMP = X( JX ) - DO 70, I = J + 1, MIN( N, J + K ) - X( IX ) = X( IX ) - TEMP*A( L + I, J ) - IX = IX + INCX - 70 CONTINUE - END IF - JX = JX + INCX - 80 CONTINUE - END IF - END IF - ELSE -* -* Form x := inv( A')*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - KPLUS1 = K + 1 - IF( INCX.EQ.1 )THEN - DO 100, J = 1, N - TEMP = X( J ) - L = KPLUS1 - J - DO 90, I = MAX( 1, J - K ), J - 1 - TEMP = TEMP - A( L + I, J )*X( I ) - 90 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( KPLUS1, J ) - X( J ) = TEMP - 100 CONTINUE - ELSE - JX = KX - DO 120, J = 1, N - TEMP = X( JX ) - IX = KX - L = KPLUS1 - J - DO 110, I = MAX( 1, J - K ), J - 1 - TEMP = TEMP - A( L + I, J )*X( IX ) - IX = IX + INCX - 110 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( KPLUS1, J ) - X( JX ) = TEMP - JX = JX + INCX - IF( J.GT.K ) - $ KX = KX + INCX - 120 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 140, J = N, 1, -1 - TEMP = X( J ) - L = 1 - J - DO 130, I = MIN( N, J + K ), J + 1, -1 - TEMP = TEMP - A( L + I, J )*X( I ) - 130 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( 1, J ) - X( J ) = TEMP - 140 CONTINUE - ELSE - KX = KX + ( N - 1 )*INCX - JX = KX - DO 160, J = N, 1, -1 - TEMP = X( JX ) - IX = KX - L = 1 - J - DO 150, I = MIN( N, J + K ), J + 1, -1 - TEMP = TEMP - A( L + I, J )*X( IX ) - IX = IX - INCX - 150 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( 1, J ) - X( JX ) = TEMP - JX = JX - INCX - IF( ( N - J ).GE.K ) - $ KX = KX - INCX - 160 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of DTBSV . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dtrevc.f b/cpp/nudg++/trunk/BlasLapack/dtrevc.f deleted file mode 100644 index b30f1aa..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dtrevc.f +++ /dev/null @@ -1,1005 +0,0 @@ - SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, - $ LDVR, MM, M, WORK, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER HOWMNY, SIDE - INTEGER INFO, LDT, LDVL, LDVR, M, MM, N -* .. -* .. Array Arguments .. - LOGICAL SELECT( * ) - DOUBLE PRECISION T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ), - $ WORK( * ) -* .. -* -* Purpose -* ======= -* -* DTREVC computes some or all of the right and/or left eigenvectors of -* a real upper quasi-triangular matrix T. -* -* The right eigenvector x and the left eigenvector y of T corresponding -* to an eigenvalue w are defined by: -* -* T*x = w*x, y'*T = w*y' -* -* where y' denotes the conjugate transpose of the vector y. -* -* If all eigenvectors are requested, the routine may either return the -* matrices X and/or Y of right or left eigenvectors of T, or the -* products Q*X and/or Q*Y, where Q is an input orthogonal -* matrix. If T was obtained from the real-Schur factorization of an -* original matrix A = Q*T*Q', then Q*X and Q*Y are the matrices of -* right or left eigenvectors of A. -* -* T must be in Schur canonical form (as returned by DHSEQR), that is, -* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each -* 2-by-2 diagonal block has its diagonal elements equal and its -* off-diagonal elements of opposite sign. Corresponding to each 2-by-2 -* diagonal block is a complex conjugate pair of eigenvalues and -* eigenvectors; only one eigenvector of the pair is computed, namely -* the one corresponding to the eigenvalue with positive imaginary part. -* -* Arguments -* ========= -* -* SIDE (input) CHARACTER*1 -* = 'R': compute right eigenvectors only; -* = 'L': compute left eigenvectors only; -* = 'B': compute both right and left eigenvectors. -* -* HOWMNY (input) CHARACTER*1 -* = 'A': compute all right and/or left eigenvectors; -* = 'B': compute all right and/or left eigenvectors, -* and backtransform them using the input matrices -* supplied in VR and/or VL; -* = 'S': compute selected right and/or left eigenvectors, -* specified by the logical array SELECT. -* -* SELECT (input/output) LOGICAL array, dimension (N) -* If HOWMNY = 'S', SELECT specifies the eigenvectors to be -* computed. -* If HOWMNY = 'A' or 'B', SELECT is not referenced. -* To select the real eigenvector corresponding to a real -* eigenvalue w(j), SELECT(j) must be set to .TRUE.. To select -* the complex eigenvector corresponding to a complex conjugate -* pair w(j) and w(j+1), either SELECT(j) or SELECT(j+1) must be -* set to .TRUE.; then on exit SELECT(j) is .TRUE. and -* SELECT(j+1) is .FALSE.. -* -* N (input) INTEGER -* The order of the matrix T. N >= 0. -* -* T (input) DOUBLE PRECISION array, dimension (LDT,N) -* The upper quasi-triangular matrix T in Schur canonical form. -* -* LDT (input) INTEGER -* The leading dimension of the array T. LDT >= max(1,N). -* -* VL (input/output) DOUBLE PRECISION array, dimension (LDVL,MM) -* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must -* contain an N-by-N matrix Q (usually the orthogonal matrix Q -* of Schur vectors returned by DHSEQR). -* On exit, if SIDE = 'L' or 'B', VL contains: -* if HOWMNY = 'A', the matrix Y of left eigenvectors of T; -* VL has the same quasi-lower triangular form -* as T'. If T(i,i) is a real eigenvalue, then -* the i-th column VL(i) of VL is its -* corresponding eigenvector. If T(i:i+1,i:i+1) -* is a 2-by-2 block whose eigenvalues are -* complex-conjugate eigenvalues of T, then -* VL(i)+sqrt(-1)*VL(i+1) is the complex -* eigenvector corresponding to the eigenvalue -* with positive real part. -* if HOWMNY = 'B', the matrix Q*Y; -* if HOWMNY = 'S', the left eigenvectors of T specified by -* SELECT, stored consecutively in the columns -* of VL, in the same order as their -* eigenvalues. -* A complex eigenvector corresponding to a complex eigenvalue -* is stored in two consecutive columns, the first holding the -* real part, and the second the imaginary part. -* If SIDE = 'R', VL is not referenced. -* -* LDVL (input) INTEGER -* The leading dimension of the array VL. LDVL >= max(1,N) if -* SIDE = 'L' or 'B'; LDVL >= 1 otherwise. -* -* VR (input/output) DOUBLE PRECISION array, dimension (LDVR,MM) -* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must -* contain an N-by-N matrix Q (usually the orthogonal matrix Q -* of Schur vectors returned by DHSEQR). -* On exit, if SIDE = 'R' or 'B', VR contains: -* if HOWMNY = 'A', the matrix X of right eigenvectors of T; -* VR has the same quasi-upper triangular form -* as T. If T(i,i) is a real eigenvalue, then -* the i-th column VR(i) of VR is its -* corresponding eigenvector. If T(i:i+1,i:i+1) -* is a 2-by-2 block whose eigenvalues are -* complex-conjugate eigenvalues of T, then -* VR(i)+sqrt(-1)*VR(i+1) is the complex -* eigenvector corresponding to the eigenvalue -* with positive real part. -* if HOWMNY = 'B', the matrix Q*X; -* if HOWMNY = 'S', the right eigenvectors of T specified by -* SELECT, stored consecutively in the columns -* of VR, in the same order as their -* eigenvalues. -* A complex eigenvector corresponding to a complex eigenvalue -* is stored in two consecutive columns, the first holding the -* real part and the second the imaginary part. -* If SIDE = 'L', VR is not referenced. -* -* LDVR (input) INTEGER -* The leading dimension of the array VR. LDVR >= max(1,N) if -* SIDE = 'R' or 'B'; LDVR >= 1 otherwise. -* -* MM (input) INTEGER -* The number of columns in the arrays VL and/or VR. MM >= M. -* -* M (output) INTEGER -* The number of columns in the arrays VL and/or VR actually -* used to store the eigenvectors. -* If HOWMNY = 'A' or 'B', M is set to N. -* Each selected real eigenvector occupies one column and each -* selected complex eigenvector occupies two columns. -* -* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* Further Details -* =============== -* -* The algorithm used in this program is basically backward (forward) -* substitution, with scaling to make the the code robust against -* possible overflow. -* -* Each eigenvector is normalized so that the element of largest -* magnitude has magnitude 1; here the magnitude of a complex number -* (x,y) is taken to be |x| + |y|. -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL ALLV, BOTHV, LEFTV, OVER, PAIR, RIGHTV, SOMEV - INTEGER I, IERR, II, IP, IS, J, J1, J2, JNXT, K, KI, N2 - DOUBLE PRECISION BETA, BIGNUM, EMAX, OVFL, REC, REMAX, SCALE, - $ SMIN, SMLNUM, ULP, UNFL, VCRIT, VMAX, WI, WR, - $ XNORM -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IDAMAX - DOUBLE PRECISION DDOT, DLAMCH - EXTERNAL LSAME, IDAMAX, DDOT, DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, MAX, SQRT -* .. -* .. Local Arrays .. - DOUBLE PRECISION X( 2, 2 ) -* .. -* .. Executable Statements .. -* -* Decode and test the input parameters -* - BOTHV = LSAME( SIDE, 'B' ) - RIGHTV = LSAME( SIDE, 'R' ) .OR. BOTHV - LEFTV = LSAME( SIDE, 'L' ) .OR. BOTHV -* - ALLV = LSAME( HOWMNY, 'A' ) - OVER = LSAME( HOWMNY, 'B' ) - SOMEV = LSAME( HOWMNY, 'S' ) -* - INFO = 0 - IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN - INFO = -1 - ELSE IF( .NOT.ALLV .AND. .NOT.OVER .AND. .NOT.SOMEV ) THEN - INFO = -2 - ELSE IF( N.LT.0 ) THEN - INFO = -4 - ELSE IF( LDT.LT.MAX( 1, N ) ) THEN - INFO = -6 - ELSE IF( LDVL.LT.1 .OR. ( LEFTV .AND. LDVL.LT.N ) ) THEN - INFO = -8 - ELSE IF( LDVR.LT.1 .OR. ( RIGHTV .AND. LDVR.LT.N ) ) THEN - INFO = -10 - ELSE -* -* Set M to the number of columns required to store the selected -* eigenvectors, standardize the array SELECT if necessary, and -* test MM. -* - IF( SOMEV ) THEN - M = 0 - PAIR = .FALSE. - DO 10 J = 1, N - IF( PAIR ) THEN - PAIR = .FALSE. - SELECT( J ) = .FALSE. - ELSE - IF( J.LT.N ) THEN - IF( T( J+1, J ).EQ.ZERO ) THEN - IF( SELECT( J ) ) - $ M = M + 1 - ELSE - PAIR = .TRUE. - IF( SELECT( J ) .OR. SELECT( J+1 ) ) THEN - SELECT( J ) = .TRUE. - M = M + 2 - END IF - END IF - ELSE - IF( SELECT( N ) ) - $ M = M + 1 - END IF - END IF - 10 CONTINUE - ELSE - M = N - END IF -* - IF( MM.LT.M ) THEN - INFO = -11 - END IF - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'DTREVC', -INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* -* Set the constants to control overflow. -* - UNFL = DLAMCH( 'Safe minimum' ) - OVFL = ONE / UNFL - CALL DLABAD( UNFL, OVFL ) - ULP = DLAMCH( 'Precision' ) - SMLNUM = UNFL*( N / ULP ) - BIGNUM = ( ONE-ULP ) / SMLNUM -* -* Compute 1-norm of each column of strictly upper triangular -* part of T to control overflow in triangular solver. -* - WORK( 1 ) = ZERO - DO 30 J = 2, N - WORK( J ) = ZERO - DO 20 I = 1, J - 1 - WORK( J ) = WORK( J ) + ABS( T( I, J ) ) - 20 CONTINUE - 30 CONTINUE -* -* Index IP is used to specify the real or complex eigenvalue: -* IP = 0, real eigenvalue, -* 1, first of conjugate complex pair: (wr,wi) -* -1, second of conjugate complex pair: (wr,wi) -* - N2 = 2*N -* - IF( RIGHTV ) THEN -* -* Compute right eigenvectors. -* - IP = 0 - IS = M - DO 140 KI = N, 1, -1 -* - IF( IP.EQ.1 ) - $ GO TO 130 - IF( KI.EQ.1 ) - $ GO TO 40 - IF( T( KI, KI-1 ).EQ.ZERO ) - $ GO TO 40 - IP = -1 -* - 40 CONTINUE - IF( SOMEV ) THEN - IF( IP.EQ.0 ) THEN - IF( .NOT.SELECT( KI ) ) - $ GO TO 130 - ELSE - IF( .NOT.SELECT( KI-1 ) ) - $ GO TO 130 - END IF - END IF -* -* Compute the KI-th eigenvalue (WR,WI). -* - WR = T( KI, KI ) - WI = ZERO - IF( IP.NE.0 ) - $ WI = SQRT( ABS( T( KI, KI-1 ) ) )* - $ SQRT( ABS( T( KI-1, KI ) ) ) - SMIN = MAX( ULP*( ABS( WR )+ABS( WI ) ), SMLNUM ) -* - IF( IP.EQ.0 ) THEN -* -* Real right eigenvector -* - WORK( KI+N ) = ONE -* -* Form right-hand side -* - DO 50 K = 1, KI - 1 - WORK( K+N ) = -T( K, KI ) - 50 CONTINUE -* -* Solve the upper quasi-triangular system: -* (T(1:KI-1,1:KI-1) - WR)*X = SCALE*WORK. -* - JNXT = KI - 1 - DO 60 J = KI - 1, 1, -1 - IF( J.GT.JNXT ) - $ GO TO 60 - J1 = J - J2 = J - JNXT = J - 1 - IF( J.GT.1 ) THEN - IF( T( J, J-1 ).NE.ZERO ) THEN - J1 = J - 1 - JNXT = J - 2 - END IF - END IF -* - IF( J1.EQ.J2 ) THEN -* -* 1-by-1 diagonal block -* - CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ), - $ LDT, ONE, ONE, WORK( J+N ), N, WR, - $ ZERO, X, 2, SCALE, XNORM, IERR ) -* -* Scale X(1,1) to avoid overflow when updating -* the right-hand side. -* - IF( XNORM.GT.ONE ) THEN - IF( WORK( J ).GT.BIGNUM / XNORM ) THEN - X( 1, 1 ) = X( 1, 1 ) / XNORM - SCALE = SCALE / XNORM - END IF - END IF -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) - $ CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) - WORK( J+N ) = X( 1, 1 ) -* -* Update right-hand side -* - CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1, - $ WORK( 1+N ), 1 ) -* - ELSE -* -* 2-by-2 diagonal block -* - CALL DLALN2( .FALSE., 2, 1, SMIN, ONE, - $ T( J-1, J-1 ), LDT, ONE, ONE, - $ WORK( J-1+N ), N, WR, ZERO, X, 2, - $ SCALE, XNORM, IERR ) -* -* Scale X(1,1) and X(2,1) to avoid overflow when -* updating the right-hand side. -* - IF( XNORM.GT.ONE ) THEN - BETA = MAX( WORK( J-1 ), WORK( J ) ) - IF( BETA.GT.BIGNUM / XNORM ) THEN - X( 1, 1 ) = X( 1, 1 ) / XNORM - X( 2, 1 ) = X( 2, 1 ) / XNORM - SCALE = SCALE / XNORM - END IF - END IF -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) - $ CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) - WORK( J-1+N ) = X( 1, 1 ) - WORK( J+N ) = X( 2, 1 ) -* -* Update right-hand side -* - CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1, - $ WORK( 1+N ), 1 ) - CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1, - $ WORK( 1+N ), 1 ) - END IF - 60 CONTINUE -* -* Copy the vector x or Q*x to VR and normalize. -* - IF( .NOT.OVER ) THEN - CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS ), 1 ) -* - II = IDAMAX( KI, VR( 1, IS ), 1 ) - REMAX = ONE / ABS( VR( II, IS ) ) - CALL DSCAL( KI, REMAX, VR( 1, IS ), 1 ) -* - DO 70 K = KI + 1, N - VR( K, IS ) = ZERO - 70 CONTINUE - ELSE - IF( KI.GT.1 ) - $ CALL DGEMV( 'N', N, KI-1, ONE, VR, LDVR, - $ WORK( 1+N ), 1, WORK( KI+N ), - $ VR( 1, KI ), 1 ) -* - II = IDAMAX( N, VR( 1, KI ), 1 ) - REMAX = ONE / ABS( VR( II, KI ) ) - CALL DSCAL( N, REMAX, VR( 1, KI ), 1 ) - END IF -* - ELSE -* -* Complex right eigenvector. -* -* Initial solve -* [ (T(KI-1,KI-1) T(KI-1,KI) ) - (WR + I* WI)]*X = 0. -* [ (T(KI,KI-1) T(KI,KI) ) ] -* - IF( ABS( T( KI-1, KI ) ).GE.ABS( T( KI, KI-1 ) ) ) THEN - WORK( KI-1+N ) = ONE - WORK( KI+N2 ) = WI / T( KI-1, KI ) - ELSE - WORK( KI-1+N ) = -WI / T( KI, KI-1 ) - WORK( KI+N2 ) = ONE - END IF - WORK( KI+N ) = ZERO - WORK( KI-1+N2 ) = ZERO -* -* Form right-hand side -* - DO 80 K = 1, KI - 2 - WORK( K+N ) = -WORK( KI-1+N )*T( K, KI-1 ) - WORK( K+N2 ) = -WORK( KI+N2 )*T( K, KI ) - 80 CONTINUE -* -* Solve upper quasi-triangular system: -* (T(1:KI-2,1:KI-2) - (WR+i*WI))*X = SCALE*(WORK+i*WORK2) -* - JNXT = KI - 2 - DO 90 J = KI - 2, 1, -1 - IF( J.GT.JNXT ) - $ GO TO 90 - J1 = J - J2 = J - JNXT = J - 1 - IF( J.GT.1 ) THEN - IF( T( J, J-1 ).NE.ZERO ) THEN - J1 = J - 1 - JNXT = J - 2 - END IF - END IF -* - IF( J1.EQ.J2 ) THEN -* -* 1-by-1 diagonal block -* - CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ), - $ LDT, ONE, ONE, WORK( J+N ), N, WR, WI, - $ X, 2, SCALE, XNORM, IERR ) -* -* Scale X(1,1) and X(1,2) to avoid overflow when -* updating the right-hand side. -* - IF( XNORM.GT.ONE ) THEN - IF( WORK( J ).GT.BIGNUM / XNORM ) THEN - X( 1, 1 ) = X( 1, 1 ) / XNORM - X( 1, 2 ) = X( 1, 2 ) / XNORM - SCALE = SCALE / XNORM - END IF - END IF -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) THEN - CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) - CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 ) - END IF - WORK( J+N ) = X( 1, 1 ) - WORK( J+N2 ) = X( 1, 2 ) -* -* Update the right-hand side -* - CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1, - $ WORK( 1+N ), 1 ) - CALL DAXPY( J-1, -X( 1, 2 ), T( 1, J ), 1, - $ WORK( 1+N2 ), 1 ) -* - ELSE -* -* 2-by-2 diagonal block -* - CALL DLALN2( .FALSE., 2, 2, SMIN, ONE, - $ T( J-1, J-1 ), LDT, ONE, ONE, - $ WORK( J-1+N ), N, WR, WI, X, 2, SCALE, - $ XNORM, IERR ) -* -* Scale X to avoid overflow when updating -* the right-hand side. -* - IF( XNORM.GT.ONE ) THEN - BETA = MAX( WORK( J-1 ), WORK( J ) ) - IF( BETA.GT.BIGNUM / XNORM ) THEN - REC = ONE / XNORM - X( 1, 1 ) = X( 1, 1 )*REC - X( 1, 2 ) = X( 1, 2 )*REC - X( 2, 1 ) = X( 2, 1 )*REC - X( 2, 2 ) = X( 2, 2 )*REC - SCALE = SCALE*REC - END IF - END IF -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) THEN - CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) - CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 ) - END IF - WORK( J-1+N ) = X( 1, 1 ) - WORK( J+N ) = X( 2, 1 ) - WORK( J-1+N2 ) = X( 1, 2 ) - WORK( J+N2 ) = X( 2, 2 ) -* -* Update the right-hand side -* - CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1, - $ WORK( 1+N ), 1 ) - CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1, - $ WORK( 1+N ), 1 ) - CALL DAXPY( J-2, -X( 1, 2 ), T( 1, J-1 ), 1, - $ WORK( 1+N2 ), 1 ) - CALL DAXPY( J-2, -X( 2, 2 ), T( 1, J ), 1, - $ WORK( 1+N2 ), 1 ) - END IF - 90 CONTINUE -* -* Copy the vector x or Q*x to VR and normalize. -* - IF( .NOT.OVER ) THEN - CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS-1 ), 1 ) - CALL DCOPY( KI, WORK( 1+N2 ), 1, VR( 1, IS ), 1 ) -* - EMAX = ZERO - DO 100 K = 1, KI - EMAX = MAX( EMAX, ABS( VR( K, IS-1 ) )+ - $ ABS( VR( K, IS ) ) ) - 100 CONTINUE -* - REMAX = ONE / EMAX - CALL DSCAL( KI, REMAX, VR( 1, IS-1 ), 1 ) - CALL DSCAL( KI, REMAX, VR( 1, IS ), 1 ) -* - DO 110 K = KI + 1, N - VR( K, IS-1 ) = ZERO - VR( K, IS ) = ZERO - 110 CONTINUE -* - ELSE -* - IF( KI.GT.2 ) THEN - CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR, - $ WORK( 1+N ), 1, WORK( KI-1+N ), - $ VR( 1, KI-1 ), 1 ) - CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR, - $ WORK( 1+N2 ), 1, WORK( KI+N2 ), - $ VR( 1, KI ), 1 ) - ELSE - CALL DSCAL( N, WORK( KI-1+N ), VR( 1, KI-1 ), 1 ) - CALL DSCAL( N, WORK( KI+N2 ), VR( 1, KI ), 1 ) - END IF -* - EMAX = ZERO - DO 120 K = 1, N - EMAX = MAX( EMAX, ABS( VR( K, KI-1 ) )+ - $ ABS( VR( K, KI ) ) ) - 120 CONTINUE - REMAX = ONE / EMAX - CALL DSCAL( N, REMAX, VR( 1, KI-1 ), 1 ) - CALL DSCAL( N, REMAX, VR( 1, KI ), 1 ) - END IF - END IF -* - IS = IS - 1 - IF( IP.NE.0 ) - $ IS = IS - 1 - 130 CONTINUE - IF( IP.EQ.1 ) - $ IP = 0 - IF( IP.EQ.-1 ) - $ IP = 1 - 140 CONTINUE - END IF -* - IF( LEFTV ) THEN -* -* Compute left eigenvectors. -* - IP = 0 - IS = 1 - DO 260 KI = 1, N -* - IF( IP.EQ.-1 ) - $ GO TO 250 - IF( KI.EQ.N ) - $ GO TO 150 - IF( T( KI+1, KI ).EQ.ZERO ) - $ GO TO 150 - IP = 1 -* - 150 CONTINUE - IF( SOMEV ) THEN - IF( .NOT.SELECT( KI ) ) - $ GO TO 250 - END IF -* -* Compute the KI-th eigenvalue (WR,WI). -* - WR = T( KI, KI ) - WI = ZERO - IF( IP.NE.0 ) - $ WI = SQRT( ABS( T( KI, KI+1 ) ) )* - $ SQRT( ABS( T( KI+1, KI ) ) ) - SMIN = MAX( ULP*( ABS( WR )+ABS( WI ) ), SMLNUM ) -* - IF( IP.EQ.0 ) THEN -* -* Real left eigenvector. -* - WORK( KI+N ) = ONE -* -* Form right-hand side -* - DO 160 K = KI + 1, N - WORK( K+N ) = -T( KI, K ) - 160 CONTINUE -* -* Solve the quasi-triangular system: -* (T(KI+1:N,KI+1:N) - WR)'*X = SCALE*WORK -* - VMAX = ONE - VCRIT = BIGNUM -* - JNXT = KI + 1 - DO 170 J = KI + 1, N - IF( J.LT.JNXT ) - $ GO TO 170 - J1 = J - J2 = J - JNXT = J + 1 - IF( J.LT.N ) THEN - IF( T( J+1, J ).NE.ZERO ) THEN - J2 = J + 1 - JNXT = J + 2 - END IF - END IF -* - IF( J1.EQ.J2 ) THEN -* -* 1-by-1 diagonal block -* -* Scale if necessary to avoid overflow when forming -* the right-hand side. -* - IF( WORK( J ).GT.VCRIT ) THEN - REC = ONE / VMAX - CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) - VMAX = ONE - VCRIT = BIGNUM - END IF -* - WORK( J+N ) = WORK( J+N ) - - $ DDOT( J-KI-1, T( KI+1, J ), 1, - $ WORK( KI+1+N ), 1 ) -* -* Solve (T(J,J)-WR)'*X = WORK -* - CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ), - $ LDT, ONE, ONE, WORK( J+N ), N, WR, - $ ZERO, X, 2, SCALE, XNORM, IERR ) -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) - $ CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) - WORK( J+N ) = X( 1, 1 ) - VMAX = MAX( ABS( WORK( J+N ) ), VMAX ) - VCRIT = BIGNUM / VMAX -* - ELSE -* -* 2-by-2 diagonal block -* -* Scale if necessary to avoid overflow when forming -* the right-hand side. -* - BETA = MAX( WORK( J ), WORK( J+1 ) ) - IF( BETA.GT.VCRIT ) THEN - REC = ONE / VMAX - CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) - VMAX = ONE - VCRIT = BIGNUM - END IF -* - WORK( J+N ) = WORK( J+N ) - - $ DDOT( J-KI-1, T( KI+1, J ), 1, - $ WORK( KI+1+N ), 1 ) -* - WORK( J+1+N ) = WORK( J+1+N ) - - $ DDOT( J-KI-1, T( KI+1, J+1 ), 1, - $ WORK( KI+1+N ), 1 ) -* -* Solve -* [T(J,J)-WR T(J,J+1) ]'* X = SCALE*( WORK1 ) -* [T(J+1,J) T(J+1,J+1)-WR] ( WORK2 ) -* - CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, T( J, J ), - $ LDT, ONE, ONE, WORK( J+N ), N, WR, - $ ZERO, X, 2, SCALE, XNORM, IERR ) -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) - $ CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) - WORK( J+N ) = X( 1, 1 ) - WORK( J+1+N ) = X( 2, 1 ) -* - VMAX = MAX( ABS( WORK( J+N ) ), - $ ABS( WORK( J+1+N ) ), VMAX ) - VCRIT = BIGNUM / VMAX -* - END IF - 170 CONTINUE -* -* Copy the vector x or Q*x to VL and normalize. -* - IF( .NOT.OVER ) THEN - CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 ) -* - II = IDAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1 - REMAX = ONE / ABS( VL( II, IS ) ) - CALL DSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 ) -* - DO 180 K = 1, KI - 1 - VL( K, IS ) = ZERO - 180 CONTINUE -* - ELSE -* - IF( KI.LT.N ) - $ CALL DGEMV( 'N', N, N-KI, ONE, VL( 1, KI+1 ), LDVL, - $ WORK( KI+1+N ), 1, WORK( KI+N ), - $ VL( 1, KI ), 1 ) -* - II = IDAMAX( N, VL( 1, KI ), 1 ) - REMAX = ONE / ABS( VL( II, KI ) ) - CALL DSCAL( N, REMAX, VL( 1, KI ), 1 ) -* - END IF -* - ELSE -* -* Complex left eigenvector. -* -* Initial solve: -* ((T(KI,KI) T(KI,KI+1) )' - (WR - I* WI))*X = 0. -* ((T(KI+1,KI) T(KI+1,KI+1)) ) -* - IF( ABS( T( KI, KI+1 ) ).GE.ABS( T( KI+1, KI ) ) ) THEN - WORK( KI+N ) = WI / T( KI, KI+1 ) - WORK( KI+1+N2 ) = ONE - ELSE - WORK( KI+N ) = ONE - WORK( KI+1+N2 ) = -WI / T( KI+1, KI ) - END IF - WORK( KI+1+N ) = ZERO - WORK( KI+N2 ) = ZERO -* -* Form right-hand side -* - DO 190 K = KI + 2, N - WORK( K+N ) = -WORK( KI+N )*T( KI, K ) - WORK( K+N2 ) = -WORK( KI+1+N2 )*T( KI+1, K ) - 190 CONTINUE -* -* Solve complex quasi-triangular system: -* ( T(KI+2,N:KI+2,N) - (WR-i*WI) )*X = WORK1+i*WORK2 -* - VMAX = ONE - VCRIT = BIGNUM -* - JNXT = KI + 2 - DO 200 J = KI + 2, N - IF( J.LT.JNXT ) - $ GO TO 200 - J1 = J - J2 = J - JNXT = J + 1 - IF( J.LT.N ) THEN - IF( T( J+1, J ).NE.ZERO ) THEN - J2 = J + 1 - JNXT = J + 2 - END IF - END IF -* - IF( J1.EQ.J2 ) THEN -* -* 1-by-1 diagonal block -* -* Scale if necessary to avoid overflow when -* forming the right-hand side elements. -* - IF( WORK( J ).GT.VCRIT ) THEN - REC = ONE / VMAX - CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) - CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 ) - VMAX = ONE - VCRIT = BIGNUM - END IF -* - WORK( J+N ) = WORK( J+N ) - - $ DDOT( J-KI-2, T( KI+2, J ), 1, - $ WORK( KI+2+N ), 1 ) - WORK( J+N2 ) = WORK( J+N2 ) - - $ DDOT( J-KI-2, T( KI+2, J ), 1, - $ WORK( KI+2+N2 ), 1 ) -* -* Solve (T(J,J)-(WR-i*WI))*(X11+i*X12)= WK+I*WK2 -* - CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ), - $ LDT, ONE, ONE, WORK( J+N ), N, WR, - $ -WI, X, 2, SCALE, XNORM, IERR ) -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) THEN - CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) - CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 ) - END IF - WORK( J+N ) = X( 1, 1 ) - WORK( J+N2 ) = X( 1, 2 ) - VMAX = MAX( ABS( WORK( J+N ) ), - $ ABS( WORK( J+N2 ) ), VMAX ) - VCRIT = BIGNUM / VMAX -* - ELSE -* -* 2-by-2 diagonal block -* -* Scale if necessary to avoid overflow when forming -* the right-hand side elements. -* - BETA = MAX( WORK( J ), WORK( J+1 ) ) - IF( BETA.GT.VCRIT ) THEN - REC = ONE / VMAX - CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) - CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 ) - VMAX = ONE - VCRIT = BIGNUM - END IF -* - WORK( J+N ) = WORK( J+N ) - - $ DDOT( J-KI-2, T( KI+2, J ), 1, - $ WORK( KI+2+N ), 1 ) -* - WORK( J+N2 ) = WORK( J+N2 ) - - $ DDOT( J-KI-2, T( KI+2, J ), 1, - $ WORK( KI+2+N2 ), 1 ) -* - WORK( J+1+N ) = WORK( J+1+N ) - - $ DDOT( J-KI-2, T( KI+2, J+1 ), 1, - $ WORK( KI+2+N ), 1 ) -* - WORK( J+1+N2 ) = WORK( J+1+N2 ) - - $ DDOT( J-KI-2, T( KI+2, J+1 ), 1, - $ WORK( KI+2+N2 ), 1 ) -* -* Solve 2-by-2 complex linear equation -* ([T(j,j) T(j,j+1) ]'-(wr-i*wi)*I)*X = SCALE*B -* ([T(j+1,j) T(j+1,j+1)] ) -* - CALL DLALN2( .TRUE., 2, 2, SMIN, ONE, T( J, J ), - $ LDT, ONE, ONE, WORK( J+N ), N, WR, - $ -WI, X, 2, SCALE, XNORM, IERR ) -* -* Scale if necessary -* - IF( SCALE.NE.ONE ) THEN - CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) - CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 ) - END IF - WORK( J+N ) = X( 1, 1 ) - WORK( J+N2 ) = X( 1, 2 ) - WORK( J+1+N ) = X( 2, 1 ) - WORK( J+1+N2 ) = X( 2, 2 ) - VMAX = MAX( ABS( X( 1, 1 ) ), ABS( X( 1, 2 ) ), - $ ABS( X( 2, 1 ) ), ABS( X( 2, 2 ) ), VMAX ) - VCRIT = BIGNUM / VMAX -* - END IF - 200 CONTINUE -* -* Copy the vector x or Q*x to VL and normalize. -* - 210 CONTINUE - IF( .NOT.OVER ) THEN - CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 ) - CALL DCOPY( N-KI+1, WORK( KI+N2 ), 1, VL( KI, IS+1 ), - $ 1 ) -* - EMAX = ZERO - DO 220 K = KI, N - EMAX = MAX( EMAX, ABS( VL( K, IS ) )+ - $ ABS( VL( K, IS+1 ) ) ) - 220 CONTINUE - REMAX = ONE / EMAX - CALL DSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 ) - CALL DSCAL( N-KI+1, REMAX, VL( KI, IS+1 ), 1 ) -* - DO 230 K = 1, KI - 1 - VL( K, IS ) = ZERO - VL( K, IS+1 ) = ZERO - 230 CONTINUE - ELSE - IF( KI.LT.N-1 ) THEN - CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ), - $ LDVL, WORK( KI+2+N ), 1, WORK( KI+N ), - $ VL( 1, KI ), 1 ) - CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ), - $ LDVL, WORK( KI+2+N2 ), 1, - $ WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 ) - ELSE - CALL DSCAL( N, WORK( KI+N ), VL( 1, KI ), 1 ) - CALL DSCAL( N, WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 ) - END IF -* - EMAX = ZERO - DO 240 K = 1, N - EMAX = MAX( EMAX, ABS( VL( K, KI ) )+ - $ ABS( VL( K, KI+1 ) ) ) - 240 CONTINUE - REMAX = ONE / EMAX - CALL DSCAL( N, REMAX, VL( 1, KI ), 1 ) - CALL DSCAL( N, REMAX, VL( 1, KI+1 ), 1 ) -* - END IF -* - END IF -* - IS = IS + 1 - IF( IP.NE.0 ) - $ IS = IS + 1 - 250 CONTINUE - IF( IP.EQ.-1 ) - $ IP = 0 - IF( IP.EQ.1 ) - $ IP = -1 -* - 260 CONTINUE -* - END IF -* - RETURN -* -* End of DTREVC -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dtrmm.f b/cpp/nudg++/trunk/BlasLapack/dtrmm.f deleted file mode 100644 index 40c7740..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dtrmm.f +++ /dev/null @@ -1,355 +0,0 @@ - SUBROUTINE DTRMM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, - $ B, LDB ) -* .. Scalar Arguments .. - CHARACTER*1 SIDE, UPLO, TRANSA, DIAG - INTEGER M, N, LDA, LDB - DOUBLE PRECISION ALPHA -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DTRMM performs one of the matrix-matrix operations -* -* B := alpha*op( A )*B, or B := alpha*B*op( A ), -* -* where alpha is a scalar, B is an m by n matrix, A is a unit, or -* non-unit, upper or lower triangular matrix and op( A ) is one of -* -* op( A ) = A or op( A ) = A'. -* -* Parameters -* ========== -* -* SIDE - CHARACTER*1. -* On entry, SIDE specifies whether op( A ) multiplies B from -* the left or right as follows: -* -* SIDE = 'L' or 'l' B := alpha*op( A )*B. -* -* SIDE = 'R' or 'r' B := alpha*B*op( A ). -* -* Unchanged on exit. -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the matrix A is an upper or -* lower triangular matrix as follows: -* -* UPLO = 'U' or 'u' A is an upper triangular matrix. -* -* UPLO = 'L' or 'l' A is a lower triangular matrix. -* -* Unchanged on exit. -* -* TRANSA - CHARACTER*1. -* On entry, TRANSA specifies the form of op( A ) to be used in -* the matrix multiplication as follows: -* -* TRANSA = 'N' or 'n' op( A ) = A. -* -* TRANSA = 'T' or 't' op( A ) = A'. -* -* TRANSA = 'C' or 'c' op( A ) = A'. -* -* Unchanged on exit. -* -* DIAG - CHARACTER*1. -* On entry, DIAG specifies whether or not A is unit triangular -* as follows: -* -* DIAG = 'U' or 'u' A is assumed to be unit triangular. -* -* DIAG = 'N' or 'n' A is not assumed to be unit -* triangular. -* -* Unchanged on exit. -* -* M - INTEGER. -* On entry, M specifies the number of rows of B. M must be at -* least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of B. N must be -* at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. When alpha is -* zero then A is not referenced and B need not be set before -* entry. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m -* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. -* Before entry with UPLO = 'U' or 'u', the leading k by k -* upper triangular part of the array A must contain the upper -* triangular matrix and the strictly lower triangular part of -* A is not referenced. -* Before entry with UPLO = 'L' or 'l', the leading k by k -* lower triangular part of the array A must contain the lower -* triangular matrix and the strictly upper triangular part of -* A is not referenced. -* Note that when DIAG = 'U' or 'u', the diagonal elements of -* A are not referenced either, but are assumed to be unity. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. When SIDE = 'L' or 'l' then -* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' -* then LDA must be at least max( 1, n ). -* Unchanged on exit. -* -* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). -* Before entry, the leading m by n part of the array B must -* contain the matrix B, and on exit is overwritten by the -* transformed matrix. -* -* LDB - INTEGER. -* On entry, LDB specifies the first dimension of B as declared -* in the calling (sub) program. LDB must be at least -* max( 1, m ). -* Unchanged on exit. -* -* -* Level 3 Blas routine. -* -* -- Written on 8-February-1989. -* Jack Dongarra, Argonne National Laboratory. -* Iain Duff, AERE Harwell. -* Jeremy Du Croz, Numerical Algorithms Group Ltd. -* Sven Hammarling, Numerical Algorithms Group Ltd. -* -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. Local Scalars .. - LOGICAL LSIDE, NOUNIT, UPPER - INTEGER I, INFO, J, K, NROWA - DOUBLE PRECISION TEMP -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - LSIDE = LSAME( SIDE , 'L' ) - IF( LSIDE )THEN - NROWA = M - ELSE - NROWA = N - END IF - NOUNIT = LSAME( DIAG , 'N' ) - UPPER = LSAME( UPLO , 'U' ) -* - INFO = 0 - IF( ( .NOT.LSIDE ).AND. - $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN - INFO = 1 - ELSE IF( ( .NOT.UPPER ).AND. - $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN - INFO = 2 - ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. - $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. - $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN - INFO = 3 - ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. - $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN - INFO = 4 - ELSE IF( M .LT.0 )THEN - INFO = 5 - ELSE IF( N .LT.0 )THEN - INFO = 6 - ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN - INFO = 9 - ELSE IF( LDB.LT.MAX( 1, M ) )THEN - INFO = 11 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DTRMM ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* -* And when alpha.eq.zero. -* - IF( ALPHA.EQ.ZERO )THEN - DO 20, J = 1, N - DO 10, I = 1, M - B( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - RETURN - END IF -* -* Start the operations. -* - IF( LSIDE )THEN - IF( LSAME( TRANSA, 'N' ) )THEN -* -* Form B := alpha*A*B. -* - IF( UPPER )THEN - DO 50, J = 1, N - DO 40, K = 1, M - IF( B( K, J ).NE.ZERO )THEN - TEMP = ALPHA*B( K, J ) - DO 30, I = 1, K - 1 - B( I, J ) = B( I, J ) + TEMP*A( I, K ) - 30 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP*A( K, K ) - B( K, J ) = TEMP - END IF - 40 CONTINUE - 50 CONTINUE - ELSE - DO 80, J = 1, N - DO 70 K = M, 1, -1 - IF( B( K, J ).NE.ZERO )THEN - TEMP = ALPHA*B( K, J ) - B( K, J ) = TEMP - IF( NOUNIT ) - $ B( K, J ) = B( K, J )*A( K, K ) - DO 60, I = K + 1, M - B( I, J ) = B( I, J ) + TEMP*A( I, K ) - 60 CONTINUE - END IF - 70 CONTINUE - 80 CONTINUE - END IF - ELSE -* -* Form B := alpha*A'*B. -* - IF( UPPER )THEN - DO 110, J = 1, N - DO 100, I = M, 1, -1 - TEMP = B( I, J ) - IF( NOUNIT ) - $ TEMP = TEMP*A( I, I ) - DO 90, K = 1, I - 1 - TEMP = TEMP + A( K, I )*B( K, J ) - 90 CONTINUE - B( I, J ) = ALPHA*TEMP - 100 CONTINUE - 110 CONTINUE - ELSE - DO 140, J = 1, N - DO 130, I = 1, M - TEMP = B( I, J ) - IF( NOUNIT ) - $ TEMP = TEMP*A( I, I ) - DO 120, K = I + 1, M - TEMP = TEMP + A( K, I )*B( K, J ) - 120 CONTINUE - B( I, J ) = ALPHA*TEMP - 130 CONTINUE - 140 CONTINUE - END IF - END IF - ELSE - IF( LSAME( TRANSA, 'N' ) )THEN -* -* Form B := alpha*B*A. -* - IF( UPPER )THEN - DO 180, J = N, 1, -1 - TEMP = ALPHA - IF( NOUNIT ) - $ TEMP = TEMP*A( J, J ) - DO 150, I = 1, M - B( I, J ) = TEMP*B( I, J ) - 150 CONTINUE - DO 170, K = 1, J - 1 - IF( A( K, J ).NE.ZERO )THEN - TEMP = ALPHA*A( K, J ) - DO 160, I = 1, M - B( I, J ) = B( I, J ) + TEMP*B( I, K ) - 160 CONTINUE - END IF - 170 CONTINUE - 180 CONTINUE - ELSE - DO 220, J = 1, N - TEMP = ALPHA - IF( NOUNIT ) - $ TEMP = TEMP*A( J, J ) - DO 190, I = 1, M - B( I, J ) = TEMP*B( I, J ) - 190 CONTINUE - DO 210, K = J + 1, N - IF( A( K, J ).NE.ZERO )THEN - TEMP = ALPHA*A( K, J ) - DO 200, I = 1, M - B( I, J ) = B( I, J ) + TEMP*B( I, K ) - 200 CONTINUE - END IF - 210 CONTINUE - 220 CONTINUE - END IF - ELSE -* -* Form B := alpha*B*A'. -* - IF( UPPER )THEN - DO 260, K = 1, N - DO 240, J = 1, K - 1 - IF( A( J, K ).NE.ZERO )THEN - TEMP = ALPHA*A( J, K ) - DO 230, I = 1, M - B( I, J ) = B( I, J ) + TEMP*B( I, K ) - 230 CONTINUE - END IF - 240 CONTINUE - TEMP = ALPHA - IF( NOUNIT ) - $ TEMP = TEMP*A( K, K ) - IF( TEMP.NE.ONE )THEN - DO 250, I = 1, M - B( I, K ) = TEMP*B( I, K ) - 250 CONTINUE - END IF - 260 CONTINUE - ELSE - DO 300, K = N, 1, -1 - DO 280, J = K + 1, N - IF( A( J, K ).NE.ZERO )THEN - TEMP = ALPHA*A( J, K ) - DO 270, I = 1, M - B( I, J ) = B( I, J ) + TEMP*B( I, K ) - 270 CONTINUE - END IF - 280 CONTINUE - TEMP = ALPHA - IF( NOUNIT ) - $ TEMP = TEMP*A( K, K ) - IF( TEMP.NE.ONE )THEN - DO 290, I = 1, M - B( I, K ) = TEMP*B( I, K ) - 290 CONTINUE - END IF - 300 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of DTRMM . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dtrmv.f b/cpp/nudg++/trunk/BlasLapack/dtrmv.f deleted file mode 100644 index 3d5c61b..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dtrmv.f +++ /dev/null @@ -1,286 +0,0 @@ - SUBROUTINE DTRMV ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) -* .. Scalar Arguments .. - INTEGER INCX, LDA, N - CHARACTER*1 DIAG, TRANS, UPLO -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ) -* .. -* -* Purpose -* ======= -* -* DTRMV performs one of the matrix-vector operations -* -* x := A*x, or x := A'*x, -* -* where x is an n element vector and A is an n by n unit, or non-unit, -* upper or lower triangular matrix. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the matrix is an upper or -* lower triangular matrix as follows: -* -* UPLO = 'U' or 'u' A is an upper triangular matrix. -* -* UPLO = 'L' or 'l' A is a lower triangular matrix. -* -* Unchanged on exit. -* -* TRANS - CHARACTER*1. -* On entry, TRANS specifies the operation to be performed as -* follows: -* -* TRANS = 'N' or 'n' x := A*x. -* -* TRANS = 'T' or 't' x := A'*x. -* -* TRANS = 'C' or 'c' x := A'*x. -* -* Unchanged on exit. -* -* DIAG - CHARACTER*1. -* On entry, DIAG specifies whether or not A is unit -* triangular as follows: -* -* DIAG = 'U' or 'u' A is assumed to be unit triangular. -* -* DIAG = 'N' or 'n' A is not assumed to be unit -* triangular. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array A must contain the upper -* triangular matrix and the strictly lower triangular part of -* A is not referenced. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array A must contain the lower -* triangular matrix and the strictly upper triangular part of -* A is not referenced. -* Note that when DIAG = 'U' or 'u', the diagonal elements of -* A are not referenced either, but are assumed to be unity. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, n ). -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the n -* element vector x. On exit, X is overwritten with the -* tranformed vector x. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP - INTEGER I, INFO, IX, J, JX, KX - LOGICAL NOUNIT -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( UPLO , 'U' ).AND. - $ .NOT.LSAME( UPLO , 'L' ) )THEN - INFO = 1 - ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. - $ .NOT.LSAME( TRANS, 'T' ).AND. - $ .NOT.LSAME( TRANS, 'C' ) )THEN - INFO = 2 - ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. - $ .NOT.LSAME( DIAG , 'N' ) )THEN - INFO = 3 - ELSE IF( N.LT.0 )THEN - INFO = 4 - ELSE IF( LDA.LT.MAX( 1, N ) )THEN - INFO = 6 - ELSE IF( INCX.EQ.0 )THEN - INFO = 8 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DTRMV ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* - NOUNIT = LSAME( DIAG, 'N' ) -* -* Set up the start point in X if the increment is not unity. This -* will be ( N - 1 )*INCX too small for descending loops. -* - IF( INCX.LE.0 )THEN - KX = 1 - ( N - 1 )*INCX - ELSE IF( INCX.NE.1 )THEN - KX = 1 - END IF -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through A. -* - IF( LSAME( TRANS, 'N' ) )THEN -* -* Form x := A*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - IF( INCX.EQ.1 )THEN - DO 20, J = 1, N - IF( X( J ).NE.ZERO )THEN - TEMP = X( J ) - DO 10, I = 1, J - 1 - X( I ) = X( I ) + TEMP*A( I, J ) - 10 CONTINUE - IF( NOUNIT ) - $ X( J ) = X( J )*A( J, J ) - END IF - 20 CONTINUE - ELSE - JX = KX - DO 40, J = 1, N - IF( X( JX ).NE.ZERO )THEN - TEMP = X( JX ) - IX = KX - DO 30, I = 1, J - 1 - X( IX ) = X( IX ) + TEMP*A( I, J ) - IX = IX + INCX - 30 CONTINUE - IF( NOUNIT ) - $ X( JX ) = X( JX )*A( J, J ) - END IF - JX = JX + INCX - 40 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 60, J = N, 1, -1 - IF( X( J ).NE.ZERO )THEN - TEMP = X( J ) - DO 50, I = N, J + 1, -1 - X( I ) = X( I ) + TEMP*A( I, J ) - 50 CONTINUE - IF( NOUNIT ) - $ X( J ) = X( J )*A( J, J ) - END IF - 60 CONTINUE - ELSE - KX = KX + ( N - 1 )*INCX - JX = KX - DO 80, J = N, 1, -1 - IF( X( JX ).NE.ZERO )THEN - TEMP = X( JX ) - IX = KX - DO 70, I = N, J + 1, -1 - X( IX ) = X( IX ) + TEMP*A( I, J ) - IX = IX - INCX - 70 CONTINUE - IF( NOUNIT ) - $ X( JX ) = X( JX )*A( J, J ) - END IF - JX = JX - INCX - 80 CONTINUE - END IF - END IF - ELSE -* -* Form x := A'*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - IF( INCX.EQ.1 )THEN - DO 100, J = N, 1, -1 - TEMP = X( J ) - IF( NOUNIT ) - $ TEMP = TEMP*A( J, J ) - DO 90, I = J - 1, 1, -1 - TEMP = TEMP + A( I, J )*X( I ) - 90 CONTINUE - X( J ) = TEMP - 100 CONTINUE - ELSE - JX = KX + ( N - 1 )*INCX - DO 120, J = N, 1, -1 - TEMP = X( JX ) - IX = JX - IF( NOUNIT ) - $ TEMP = TEMP*A( J, J ) - DO 110, I = J - 1, 1, -1 - IX = IX - INCX - TEMP = TEMP + A( I, J )*X( IX ) - 110 CONTINUE - X( JX ) = TEMP - JX = JX - INCX - 120 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 140, J = 1, N - TEMP = X( J ) - IF( NOUNIT ) - $ TEMP = TEMP*A( J, J ) - DO 130, I = J + 1, N - TEMP = TEMP + A( I, J )*X( I ) - 130 CONTINUE - X( J ) = TEMP - 140 CONTINUE - ELSE - JX = KX - DO 160, J = 1, N - TEMP = X( JX ) - IX = JX - IF( NOUNIT ) - $ TEMP = TEMP*A( J, J ) - DO 150, I = J + 1, N - IX = IX + INCX - TEMP = TEMP + A( I, J )*X( IX ) - 150 CONTINUE - X( JX ) = TEMP - JX = JX + INCX - 160 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of DTRMV . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dtrsm.f b/cpp/nudg++/trunk/BlasLapack/dtrsm.f deleted file mode 100644 index e842514..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dtrsm.f +++ /dev/null @@ -1,378 +0,0 @@ - SUBROUTINE DTRSM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, - $ B, LDB ) -* .. Scalar Arguments .. - CHARACTER*1 SIDE, UPLO, TRANSA, DIAG - INTEGER M, N, LDA, LDB - DOUBLE PRECISION ALPHA -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* DTRSM solves one of the matrix equations -* -* op( A )*X = alpha*B, or X*op( A ) = alpha*B, -* -* where alpha is a scalar, X and B are m by n matrices, A is a unit, or -* non-unit, upper or lower triangular matrix and op( A ) is one of -* -* op( A ) = A or op( A ) = A'. -* -* The matrix X is overwritten on B. -* -* Parameters -* ========== -* -* SIDE - CHARACTER*1. -* On entry, SIDE specifies whether op( A ) appears on the left -* or right of X as follows: -* -* SIDE = 'L' or 'l' op( A )*X = alpha*B. -* -* SIDE = 'R' or 'r' X*op( A ) = alpha*B. -* -* Unchanged on exit. -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the matrix A is an upper or -* lower triangular matrix as follows: -* -* UPLO = 'U' or 'u' A is an upper triangular matrix. -* -* UPLO = 'L' or 'l' A is a lower triangular matrix. -* -* Unchanged on exit. -* -* TRANSA - CHARACTER*1. -* On entry, TRANSA specifies the form of op( A ) to be used in -* the matrix multiplication as follows: -* -* TRANSA = 'N' or 'n' op( A ) = A. -* -* TRANSA = 'T' or 't' op( A ) = A'. -* -* TRANSA = 'C' or 'c' op( A ) = A'. -* -* Unchanged on exit. -* -* DIAG - CHARACTER*1. -* On entry, DIAG specifies whether or not A is unit triangular -* as follows: -* -* DIAG = 'U' or 'u' A is assumed to be unit triangular. -* -* DIAG = 'N' or 'n' A is not assumed to be unit -* triangular. -* -* Unchanged on exit. -* -* M - INTEGER. -* On entry, M specifies the number of rows of B. M must be at -* least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of B. N must be -* at least zero. -* Unchanged on exit. -* -* ALPHA - DOUBLE PRECISION. -* On entry, ALPHA specifies the scalar alpha. When alpha is -* zero then A is not referenced and B need not be set before -* entry. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m -* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. -* Before entry with UPLO = 'U' or 'u', the leading k by k -* upper triangular part of the array A must contain the upper -* triangular matrix and the strictly lower triangular part of -* A is not referenced. -* Before entry with UPLO = 'L' or 'l', the leading k by k -* lower triangular part of the array A must contain the lower -* triangular matrix and the strictly upper triangular part of -* A is not referenced. -* Note that when DIAG = 'U' or 'u', the diagonal elements of -* A are not referenced either, but are assumed to be unity. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. When SIDE = 'L' or 'l' then -* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' -* then LDA must be at least max( 1, n ). -* Unchanged on exit. -* -* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). -* Before entry, the leading m by n part of the array B must -* contain the right-hand side matrix B, and on exit is -* overwritten by the solution matrix X. -* -* LDB - INTEGER. -* On entry, LDB specifies the first dimension of B as declared -* in the calling (sub) program. LDB must be at least -* max( 1, m ). -* Unchanged on exit. -* -* -* Level 3 Blas routine. -* -* -* -- Written on 8-February-1989. -* Jack Dongarra, Argonne National Laboratory. -* Iain Duff, AERE Harwell. -* Jeremy Du Croz, Numerical Algorithms Group Ltd. -* Sven Hammarling, Numerical Algorithms Group Ltd. -* -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. Local Scalars .. - LOGICAL LSIDE, NOUNIT, UPPER - INTEGER I, INFO, J, K, NROWA - DOUBLE PRECISION TEMP -* .. Parameters .. - DOUBLE PRECISION ONE , ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - LSIDE = LSAME( SIDE , 'L' ) - IF( LSIDE )THEN - NROWA = M - ELSE - NROWA = N - END IF - NOUNIT = LSAME( DIAG , 'N' ) - UPPER = LSAME( UPLO , 'U' ) -* - INFO = 0 - IF( ( .NOT.LSIDE ).AND. - $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN - INFO = 1 - ELSE IF( ( .NOT.UPPER ).AND. - $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN - INFO = 2 - ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. - $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. - $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN - INFO = 3 - ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. - $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN - INFO = 4 - ELSE IF( M .LT.0 )THEN - INFO = 5 - ELSE IF( N .LT.0 )THEN - INFO = 6 - ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN - INFO = 9 - ELSE IF( LDB.LT.MAX( 1, M ) )THEN - INFO = 11 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DTRSM ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* -* And when alpha.eq.zero. -* - IF( ALPHA.EQ.ZERO )THEN - DO 20, J = 1, N - DO 10, I = 1, M - B( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - RETURN - END IF -* -* Start the operations. -* - IF( LSIDE )THEN - IF( LSAME( TRANSA, 'N' ) )THEN -* -* Form B := alpha*inv( A )*B. -* - IF( UPPER )THEN - DO 60, J = 1, N - IF( ALPHA.NE.ONE )THEN - DO 30, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 30 CONTINUE - END IF - DO 50, K = M, 1, -1 - IF( B( K, J ).NE.ZERO )THEN - IF( NOUNIT ) - $ B( K, J ) = B( K, J )/A( K, K ) - DO 40, I = 1, K - 1 - B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) - 40 CONTINUE - END IF - 50 CONTINUE - 60 CONTINUE - ELSE - DO 100, J = 1, N - IF( ALPHA.NE.ONE )THEN - DO 70, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 70 CONTINUE - END IF - DO 90 K = 1, M - IF( B( K, J ).NE.ZERO )THEN - IF( NOUNIT ) - $ B( K, J ) = B( K, J )/A( K, K ) - DO 80, I = K + 1, M - B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) - 80 CONTINUE - END IF - 90 CONTINUE - 100 CONTINUE - END IF - ELSE -* -* Form B := alpha*inv( A' )*B. -* - IF( UPPER )THEN - DO 130, J = 1, N - DO 120, I = 1, M - TEMP = ALPHA*B( I, J ) - DO 110, K = 1, I - 1 - TEMP = TEMP - A( K, I )*B( K, J ) - 110 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( I, I ) - B( I, J ) = TEMP - 120 CONTINUE - 130 CONTINUE - ELSE - DO 160, J = 1, N - DO 150, I = M, 1, -1 - TEMP = ALPHA*B( I, J ) - DO 140, K = I + 1, M - TEMP = TEMP - A( K, I )*B( K, J ) - 140 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( I, I ) - B( I, J ) = TEMP - 150 CONTINUE - 160 CONTINUE - END IF - END IF - ELSE - IF( LSAME( TRANSA, 'N' ) )THEN -* -* Form B := alpha*B*inv( A ). -* - IF( UPPER )THEN - DO 210, J = 1, N - IF( ALPHA.NE.ONE )THEN - DO 170, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 170 CONTINUE - END IF - DO 190, K = 1, J - 1 - IF( A( K, J ).NE.ZERO )THEN - DO 180, I = 1, M - B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) - 180 CONTINUE - END IF - 190 CONTINUE - IF( NOUNIT )THEN - TEMP = ONE/A( J, J ) - DO 200, I = 1, M - B( I, J ) = TEMP*B( I, J ) - 200 CONTINUE - END IF - 210 CONTINUE - ELSE - DO 260, J = N, 1, -1 - IF( ALPHA.NE.ONE )THEN - DO 220, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 220 CONTINUE - END IF - DO 240, K = J + 1, N - IF( A( K, J ).NE.ZERO )THEN - DO 230, I = 1, M - B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) - 230 CONTINUE - END IF - 240 CONTINUE - IF( NOUNIT )THEN - TEMP = ONE/A( J, J ) - DO 250, I = 1, M - B( I, J ) = TEMP*B( I, J ) - 250 CONTINUE - END IF - 260 CONTINUE - END IF - ELSE -* -* Form B := alpha*B*inv( A' ). -* - IF( UPPER )THEN - DO 310, K = N, 1, -1 - IF( NOUNIT )THEN - TEMP = ONE/A( K, K ) - DO 270, I = 1, M - B( I, K ) = TEMP*B( I, K ) - 270 CONTINUE - END IF - DO 290, J = 1, K - 1 - IF( A( J, K ).NE.ZERO )THEN - TEMP = A( J, K ) - DO 280, I = 1, M - B( I, J ) = B( I, J ) - TEMP*B( I, K ) - 280 CONTINUE - END IF - 290 CONTINUE - IF( ALPHA.NE.ONE )THEN - DO 300, I = 1, M - B( I, K ) = ALPHA*B( I, K ) - 300 CONTINUE - END IF - 310 CONTINUE - ELSE - DO 360, K = 1, N - IF( NOUNIT )THEN - TEMP = ONE/A( K, K ) - DO 320, I = 1, M - B( I, K ) = TEMP*B( I, K ) - 320 CONTINUE - END IF - DO 340, J = K + 1, N - IF( A( J, K ).NE.ZERO )THEN - TEMP = A( J, K ) - DO 330, I = 1, M - B( I, J ) = B( I, J ) - TEMP*B( I, K ) - 330 CONTINUE - END IF - 340 CONTINUE - IF( ALPHA.NE.ONE )THEN - DO 350, I = 1, M - B( I, K ) = ALPHA*B( I, K ) - 350 CONTINUE - END IF - 360 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of DTRSM . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dtrsv.f b/cpp/nudg++/trunk/BlasLapack/dtrsv.f deleted file mode 100644 index 9c3e90a..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dtrsv.f +++ /dev/null @@ -1,289 +0,0 @@ - SUBROUTINE DTRSV ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) -* .. Scalar Arguments .. - INTEGER INCX, LDA, N - CHARACTER*1 DIAG, TRANS, UPLO -* .. Array Arguments .. - DOUBLE PRECISION A( LDA, * ), X( * ) -* .. -* -* Purpose -* ======= -* -* DTRSV solves one of the systems of equations -* -* A*x = b, or A'*x = b, -* -* where b and x are n element vectors and A is an n by n unit, or -* non-unit, upper or lower triangular matrix. -* -* No test for singularity or near-singularity is included in this -* routine. Such tests must be performed before calling this routine. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the matrix is an upper or -* lower triangular matrix as follows: -* -* UPLO = 'U' or 'u' A is an upper triangular matrix. -* -* UPLO = 'L' or 'l' A is a lower triangular matrix. -* -* Unchanged on exit. -* -* TRANS - CHARACTER*1. -* On entry, TRANS specifies the equations to be solved as -* follows: -* -* TRANS = 'N' or 'n' A*x = b. -* -* TRANS = 'T' or 't' A'*x = b. -* -* TRANS = 'C' or 'c' A'*x = b. -* -* Unchanged on exit. -* -* DIAG - CHARACTER*1. -* On entry, DIAG specifies whether or not A is unit -* triangular as follows: -* -* DIAG = 'U' or 'u' A is assumed to be unit triangular. -* -* DIAG = 'N' or 'n' A is not assumed to be unit -* triangular. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array A must contain the upper -* triangular matrix and the strictly lower triangular part of -* A is not referenced. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array A must contain the lower -* triangular matrix and the strictly upper triangular part of -* A is not referenced. -* Note that when DIAG = 'U' or 'u', the diagonal elements of -* A are not referenced either, but are assumed to be unity. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, n ). -* Unchanged on exit. -* -* X - DOUBLE PRECISION array of dimension at least -* ( 1 + ( n - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the n -* element right-hand side vector b. On exit, X is overwritten -* with the solution vector x. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - DOUBLE PRECISION ZERO - PARAMETER ( ZERO = 0.0D+0 ) -* .. Local Scalars .. - DOUBLE PRECISION TEMP - INTEGER I, INFO, IX, J, JX, KX - LOGICAL NOUNIT -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( UPLO , 'U' ).AND. - $ .NOT.LSAME( UPLO , 'L' ) )THEN - INFO = 1 - ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. - $ .NOT.LSAME( TRANS, 'T' ).AND. - $ .NOT.LSAME( TRANS, 'C' ) )THEN - INFO = 2 - ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. - $ .NOT.LSAME( DIAG , 'N' ) )THEN - INFO = 3 - ELSE IF( N.LT.0 )THEN - INFO = 4 - ELSE IF( LDA.LT.MAX( 1, N ) )THEN - INFO = 6 - ELSE IF( INCX.EQ.0 )THEN - INFO = 8 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'DTRSV ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* - NOUNIT = LSAME( DIAG, 'N' ) -* -* Set up the start point in X if the increment is not unity. This -* will be ( N - 1 )*INCX too small for descending loops. -* - IF( INCX.LE.0 )THEN - KX = 1 - ( N - 1 )*INCX - ELSE IF( INCX.NE.1 )THEN - KX = 1 - END IF -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through A. -* - IF( LSAME( TRANS, 'N' ) )THEN -* -* Form x := inv( A )*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - IF( INCX.EQ.1 )THEN - DO 20, J = N, 1, -1 - IF( X( J ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( J ) = X( J )/A( J, J ) - TEMP = X( J ) - DO 10, I = J - 1, 1, -1 - X( I ) = X( I ) - TEMP*A( I, J ) - 10 CONTINUE - END IF - 20 CONTINUE - ELSE - JX = KX + ( N - 1 )*INCX - DO 40, J = N, 1, -1 - IF( X( JX ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( JX ) = X( JX )/A( J, J ) - TEMP = X( JX ) - IX = JX - DO 30, I = J - 1, 1, -1 - IX = IX - INCX - X( IX ) = X( IX ) - TEMP*A( I, J ) - 30 CONTINUE - END IF - JX = JX - INCX - 40 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 60, J = 1, N - IF( X( J ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( J ) = X( J )/A( J, J ) - TEMP = X( J ) - DO 50, I = J + 1, N - X( I ) = X( I ) - TEMP*A( I, J ) - 50 CONTINUE - END IF - 60 CONTINUE - ELSE - JX = KX - DO 80, J = 1, N - IF( X( JX ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( JX ) = X( JX )/A( J, J ) - TEMP = X( JX ) - IX = JX - DO 70, I = J + 1, N - IX = IX + INCX - X( IX ) = X( IX ) - TEMP*A( I, J ) - 70 CONTINUE - END IF - JX = JX + INCX - 80 CONTINUE - END IF - END IF - ELSE -* -* Form x := inv( A' )*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - IF( INCX.EQ.1 )THEN - DO 100, J = 1, N - TEMP = X( J ) - DO 90, I = 1, J - 1 - TEMP = TEMP - A( I, J )*X( I ) - 90 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - X( J ) = TEMP - 100 CONTINUE - ELSE - JX = KX - DO 120, J = 1, N - TEMP = X( JX ) - IX = KX - DO 110, I = 1, J - 1 - TEMP = TEMP - A( I, J )*X( IX ) - IX = IX + INCX - 110 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - X( JX ) = TEMP - JX = JX + INCX - 120 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 140, J = N, 1, -1 - TEMP = X( J ) - DO 130, I = N, J + 1, -1 - TEMP = TEMP - A( I, J )*X( I ) - 130 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - X( J ) = TEMP - 140 CONTINUE - ELSE - KX = KX + ( N - 1 )*INCX - JX = KX - DO 160, J = N, 1, -1 - TEMP = X( JX ) - IX = KX - DO 150, I = N, J + 1, -1 - TEMP = TEMP - A( I, J )*X( IX ) - IX = IX - INCX - 150 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - X( JX ) = TEMP - JX = JX - INCX - 160 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of DTRSV . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/dzasum.f b/cpp/nudg++/trunk/BlasLapack/dzasum.f deleted file mode 100644 index d21c1ff..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dzasum.f +++ /dev/null @@ -1,34 +0,0 @@ - double precision function dzasum(n,zx,incx) -c -c takes the sum of the absolute values. -c jack dongarra, 3/11/78. -c modified 3/93 to return if incx .le. 0. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*) - double precision stemp,dcabs1 - integer i,incx,ix,n -c - dzasum = 0.0d0 - stemp = 0.0d0 - if( n.le.0 .or. incx.le.0 )return - if(incx.eq.1)go to 20 -c -c code for increment not equal to 1 -c - ix = 1 - do 10 i = 1,n - stemp = stemp + dcabs1(zx(ix)) - ix = ix + incx - 10 continue - dzasum = stemp - return -c -c code for increment equal to 1 -c - 20 do 30 i = 1,n - stemp = stemp + dcabs1(zx(i)) - 30 continue - dzasum = stemp - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/dzsum1.f b/cpp/nudg++/trunk/BlasLapack/dzsum1.f deleted file mode 100644 index 341165c..0000000 --- a/cpp/nudg++/trunk/BlasLapack/dzsum1.f +++ /dev/null @@ -1,82 +0,0 @@ - DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - INTEGER INCX, N -* .. -* .. Array Arguments .. - COMPLEX*16 CX( * ) -* .. -* -* Purpose -* ======= -* -* DZSUM1 takes the sum of the absolute values of a complex -* vector and returns a double precision result. -* -* Based on DZASUM from the Level 1 BLAS. -* The change is to use the 'genuine' absolute value. -* -* Contributed by Nick Higham for use with ZLACON. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of elements in the vector CX. -* -* CX (input) COMPLEX*16 array, dimension (N) -* The vector whose elements will be summed. -* -* INCX (input) INTEGER -* The spacing between successive values of CX. INCX > 0. -* -* ===================================================================== -* -* .. Local Scalars .. - INTEGER I, NINCX - DOUBLE PRECISION STEMP -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS -* .. -* .. Executable Statements .. -* - DZSUM1 = 0.0D0 - STEMP = 0.0D0 - IF( N.LE.0 ) - $ RETURN - IF( INCX.EQ.1 ) - $ GO TO 20 -* -* CODE FOR INCREMENT NOT EQUAL TO 1 -* - NINCX = N*INCX - DO 10 I = 1, NINCX, INCX -* -* NEXT LINE MODIFIED. -* - STEMP = STEMP + ABS( CX( I ) ) - 10 CONTINUE - DZSUM1 = STEMP - RETURN -* -* CODE FOR INCREMENT EQUAL TO 1 -* - 20 CONTINUE - DO 30 I = 1, N -* -* NEXT LINE MODIFIED. -* - STEMP = STEMP + ABS( CX( I ) ) - 30 CONTINUE - DZSUM1 = STEMP - RETURN -* -* End of DZSUM1 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/idamax.f b/cpp/nudg++/trunk/BlasLapack/idamax.f deleted file mode 100644 index 59d80dc..0000000 --- a/cpp/nudg++/trunk/BlasLapack/idamax.f +++ /dev/null @@ -1,39 +0,0 @@ - integer function idamax(n,dx,incx) -c -c finds the index of element having max. absolute value. -c jack dongarra, linpack, 3/11/78. -c modified 3/93 to return if incx .le. 0. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double precision dx(*),dmax - integer i,incx,ix,n -c - idamax = 0 - if( n.lt.1 .or. incx.le.0 ) return - idamax = 1 - if(n.eq.1)return - if(incx.eq.1)go to 20 -c -c code for increment not equal to 1 -c - ix = 1 - dmax = dabs(dx(1)) - ix = ix + incx - do 10 i = 2,n - if(dabs(dx(ix)).le.dmax) go to 5 - idamax = i - dmax = dabs(dx(ix)) - 5 ix = ix + incx - 10 continue - return -c -c code for increment equal to 1 -c - 20 dmax = dabs(dx(1)) - do 30 i = 2,n - if(dabs(dx(i)).le.dmax) go to 30 - idamax = i - dmax = dabs(dx(i)) - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/ieeeck.f b/cpp/nudg++/trunk/BlasLapack/ieeeck.f deleted file mode 100644 index 3c09fe9..0000000 --- a/cpp/nudg++/trunk/BlasLapack/ieeeck.f +++ /dev/null @@ -1,148 +0,0 @@ - INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1998 -* -* .. Scalar Arguments .. - INTEGER ISPEC - REAL ONE, ZERO -* .. -* -* Purpose -* ======= -* -* IEEECK is called from the ILAENV to verify that Infinity and -* possibly NaN arithmetic is safe (i.e. will not trap). -* -* Arguments -* ========= -* -* ISPEC (input) INTEGER -* Specifies whether to test just for inifinity arithmetic -* or whether to test for infinity and NaN arithmetic. -* = 0: Verify infinity arithmetic only. -* = 1: Verify infinity and NaN arithmetic. -* -* ZERO (input) REAL -* Must contain the value 0.0 -* This is passed to prevent the compiler from optimizing -* away this code. -* -* ONE (input) REAL -* Must contain the value 1.0 -* This is passed to prevent the compiler from optimizing -* away this code. -* -* RETURN VALUE: INTEGER -* = 0: Arithmetic failed to produce the correct answers -* = 1: Arithmetic produced the correct answers -* -* .. Local Scalars .. - REAL NAN1, NAN2, NAN3, NAN4, NAN5, NAN6, NEGINF, - $ NEGZRO, NEWZRO, POSINF -* .. -* .. Executable Statements .. - IEEECK = 1 -* - POSINF = ONE / ZERO - IF( POSINF.LE.ONE ) THEN - IEEECK = 0 - RETURN - END IF -* - NEGINF = -ONE / ZERO - IF( NEGINF.GE.ZERO ) THEN - IEEECK = 0 - RETURN - END IF -* - NEGZRO = ONE / ( NEGINF+ONE ) - IF( NEGZRO.NE.ZERO ) THEN - IEEECK = 0 - RETURN - END IF -* - NEGINF = ONE / NEGZRO - IF( NEGINF.GE.ZERO ) THEN - IEEECK = 0 - RETURN - END IF -* - NEWZRO = NEGZRO + ZERO - IF( NEWZRO.NE.ZERO ) THEN - IEEECK = 0 - RETURN - END IF -* - POSINF = ONE / NEWZRO - IF( POSINF.LE.ONE ) THEN - IEEECK = 0 - RETURN - END IF -* - NEGINF = NEGINF*POSINF - IF( NEGINF.GE.ZERO ) THEN - IEEECK = 0 - RETURN - END IF -* - POSINF = POSINF*POSINF - IF( POSINF.LE.ONE ) THEN - IEEECK = 0 - RETURN - END IF -* -* -* -* -* Return if we were only asked to check infinity arithmetic -* - IF( ISPEC.EQ.0 ) - $ RETURN -* - NAN1 = POSINF + NEGINF -* - NAN2 = POSINF / NEGINF -* - NAN3 = POSINF / POSINF -* - NAN4 = POSINF*ZERO -* - NAN5 = NEGINF*NEGZRO -* - NAN6 = NAN5*0.0 -* - IF( NAN1.EQ.NAN1 ) THEN - IEEECK = 0 - RETURN - END IF -* - IF( NAN2.EQ.NAN2 ) THEN - IEEECK = 0 - RETURN - END IF -* - IF( NAN3.EQ.NAN3 ) THEN - IEEECK = 0 - RETURN - END IF -* - IF( NAN4.EQ.NAN4 ) THEN - IEEECK = 0 - RETURN - END IF -* - IF( NAN5.EQ.NAN5 ) THEN - IEEECK = 0 - RETURN - END IF -* - IF( NAN6.EQ.NAN6 ) THEN - IEEECK = 0 - RETURN - END IF -* - RETURN - END diff --git a/cpp/nudg++/trunk/BlasLapack/ilaenv.f b/cpp/nudg++/trunk/BlasLapack/ilaenv.f deleted file mode 100644 index 7263d60..0000000 --- a/cpp/nudg++/trunk/BlasLapack/ilaenv.f +++ /dev/null @@ -1,547 +0,0 @@ - INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, - $ N4 ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - CHARACTER*( * ) NAME, OPTS - INTEGER ISPEC, N1, N2, N3, N4 -* .. -* -* Purpose -* ======= -* -* ILAENV is called from the LAPACK routines to choose problem-dependent -* parameters for the local environment. See ISPEC for a description of -* the parameters. -* -* This version provides a set of parameters which should give good, -* but not optimal, performance on many of the currently available -* computers. Users are encouraged to modify this subroutine to set -* the tuning parameters for their particular machine using the option -* and problem size information in the arguments. -* -* This routine will not function correctly if it is converted to all -* lower case. Converting it to all upper case is allowed. -* -* Arguments -* ========= -* -* ISPEC (input) INTEGER -* Specifies the parameter to be returned as the value of -* ILAENV. -* = 1: the optimal blocksize; if this value is 1, an unblocked -* algorithm will give the best performance. -* = 2: the minimum block size for which the block routine -* should be used; if the usable block size is less than -* this value, an unblocked routine should be used. -* = 3: the crossover point (in a block routine, for N less -* than this value, an unblocked routine should be used) -* = 4: the number of shifts, used in the nonsymmetric -* eigenvalue routines -* = 5: the minimum column dimension for blocking to be used; -* rectangular blocks must have dimension at least k by m, -* where k is given by ILAENV(2,...) and m by ILAENV(5,...) -* = 6: the crossover point for the SVD (when reducing an m by n -* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds -* this value, a QR factorization is used first to reduce -* the matrix to a triangular form.) -* = 7: the number of processors -* = 8: the crossover point for the multishift QR and QZ methods -* for nonsymmetric eigenvalue problems. -* = 9: maximum size of the subproblems at the bottom of the -* computation tree in the divide-and-conquer algorithm -* (used by xGELSD and xGESDD) -* =10: ieee NaN arithmetic can be trusted not to trap -* =11: infinity arithmetic can be trusted not to trap -* -* NAME (input) CHARACTER*(*) -* The name of the calling subroutine, in either upper case or -* lower case. -* -* OPTS (input) CHARACTER*(*) -* The character options to the subroutine NAME, concatenated -* into a single character string. For example, UPLO = 'U', -* TRANS = 'T', and DIAG = 'N' for a triangular routine would -* be specified as OPTS = 'UTN'. -* -* N1 (input) INTEGER -* N2 (input) INTEGER -* N3 (input) INTEGER -* N4 (input) INTEGER -* Problem dimensions for the subroutine NAME; these may not all -* be required. -* -* (ILAENV) (output) INTEGER -* >= 0: the value of the parameter specified by ISPEC -* < 0: if ILAENV = -k, the k-th argument had an illegal value. -* -* Further Details -* =============== -* -* The following conventions have been used when calling ILAENV from the -* LAPACK routines: -* 1) OPTS is a concatenation of all of the character options to -* subroutine NAME, in the same order that they appear in the -* argument list for NAME, even if they are not used in determining -* the value of the parameter specified by ISPEC. -* 2) The problem dimensions N1, N2, N3, N4 are specified in the order -* that they appear in the argument list for NAME. N1 is used -* first, N2 second, and so on, and unused problem dimensions are -* passed a value of -1. -* 3) The parameter value returned by ILAENV is checked for validity in -* the calling subroutine. For example, ILAENV is used to retrieve -* the optimal blocksize for STRTRI as follows: -* -* NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) -* IF( NB.LE.1 ) NB = MAX( 1, N ) -* -* ===================================================================== -* -* .. Local Scalars .. - LOGICAL CNAME, SNAME - CHARACTER*1 C1 - CHARACTER*2 C2, C4 - CHARACTER*3 C3 - CHARACTER*6 SUBNAM - INTEGER I, IC, IZ, NB, NBMIN, NX -* .. -* .. Intrinsic Functions .. - INTRINSIC CHAR, ICHAR, INT, MIN, REAL -* .. -* .. External Functions .. - INTEGER IEEECK - EXTERNAL IEEECK -* .. -* .. Executable Statements .. -* - GO TO ( 100, 100, 100, 400, 500, 600, 700, 800, 900, 1000, - $ 1100 ) ISPEC -* -* Invalid value for ISPEC -* - ILAENV = -1 - RETURN -* - 100 CONTINUE -* -* Convert NAME to upper case if the first character is lower case. -* - ILAENV = 1 - SUBNAM = NAME - IC = ICHAR( SUBNAM( 1:1 ) ) - IZ = ICHAR( 'Z' ) - IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN -* -* ASCII character set -* - IF( IC.GE.97 .AND. IC.LE.122 ) THEN - SUBNAM( 1:1 ) = CHAR( IC-32 ) - DO 10 I = 2, 6 - IC = ICHAR( SUBNAM( I:I ) ) - IF( IC.GE.97 .AND. IC.LE.122 ) - $ SUBNAM( I:I ) = CHAR( IC-32 ) - 10 CONTINUE - END IF -* - ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN -* -* EBCDIC character set -* - IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR. - $ ( IC.GE.145 .AND. IC.LE.153 ) .OR. - $ ( IC.GE.162 .AND. IC.LE.169 ) ) THEN - SUBNAM( 1:1 ) = CHAR( IC+64 ) - DO 20 I = 2, 6 - IC = ICHAR( SUBNAM( I:I ) ) - IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR. - $ ( IC.GE.145 .AND. IC.LE.153 ) .OR. - $ ( IC.GE.162 .AND. IC.LE.169 ) ) - $ SUBNAM( I:I ) = CHAR( IC+64 ) - 20 CONTINUE - END IF -* - ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN -* -* Prime machines: ASCII+128 -* - IF( IC.GE.225 .AND. IC.LE.250 ) THEN - SUBNAM( 1:1 ) = CHAR( IC-32 ) - DO 30 I = 2, 6 - IC = ICHAR( SUBNAM( I:I ) ) - IF( IC.GE.225 .AND. IC.LE.250 ) - $ SUBNAM( I:I ) = CHAR( IC-32 ) - 30 CONTINUE - END IF - END IF -* - C1 = SUBNAM( 1:1 ) - SNAME = C1.EQ.'S' .OR. C1.EQ.'D' - CNAME = C1.EQ.'C' .OR. C1.EQ.'Z' - IF( .NOT.( CNAME .OR. SNAME ) ) - $ RETURN - C2 = SUBNAM( 2:3 ) - C3 = SUBNAM( 4:6 ) - C4 = C3( 2:3 ) -* - GO TO ( 110, 200, 300 ) ISPEC -* - 110 CONTINUE -* -* ISPEC = 1: block size -* -* In these examples, separate code is provided for setting NB for -* real and complex. We assume that NB will take the same value in -* single or double precision. -* - NB = 1 -* - IF( C2.EQ.'GE' ) THEN - IF( C3.EQ.'TRF' ) THEN - IF( SNAME ) THEN - NB = 64 - ELSE - NB = 64 - END IF - ELSE IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. - $ C3.EQ.'QLF' ) THEN - IF( SNAME ) THEN - NB = 32 - ELSE - NB = 32 - END IF - ELSE IF( C3.EQ.'HRD' ) THEN - IF( SNAME ) THEN - NB = 32 - ELSE - NB = 32 - END IF - ELSE IF( C3.EQ.'BRD' ) THEN - IF( SNAME ) THEN - NB = 32 - ELSE - NB = 32 - END IF - ELSE IF( C3.EQ.'TRI' ) THEN - IF( SNAME ) THEN - NB = 64 - ELSE - NB = 64 - END IF - END IF - ELSE IF( C2.EQ.'PO' ) THEN - IF( C3.EQ.'TRF' ) THEN - IF( SNAME ) THEN - NB = 64 - ELSE - NB = 64 - END IF - END IF - ELSE IF( C2.EQ.'SY' ) THEN - IF( C3.EQ.'TRF' ) THEN - IF( SNAME ) THEN - NB = 64 - ELSE - NB = 64 - END IF - ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN - NB = 32 - ELSE IF( SNAME .AND. C3.EQ.'GST' ) THEN - NB = 64 - END IF - ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN - IF( C3.EQ.'TRF' ) THEN - NB = 64 - ELSE IF( C3.EQ.'TRD' ) THEN - NB = 32 - ELSE IF( C3.EQ.'GST' ) THEN - NB = 64 - END IF - ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN - IF( C3( 1:1 ).EQ.'G' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NB = 32 - END IF - ELSE IF( C3( 1:1 ).EQ.'M' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NB = 32 - END IF - END IF - ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN - IF( C3( 1:1 ).EQ.'G' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NB = 32 - END IF - ELSE IF( C3( 1:1 ).EQ.'M' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NB = 32 - END IF - END IF - ELSE IF( C2.EQ.'GB' ) THEN - IF( C3.EQ.'TRF' ) THEN - IF( SNAME ) THEN - IF( N4.LE.64 ) THEN - NB = 1 - ELSE - NB = 32 - END IF - ELSE - IF( N4.LE.64 ) THEN - NB = 1 - ELSE - NB = 32 - END IF - END IF - END IF - ELSE IF( C2.EQ.'PB' ) THEN - IF( C3.EQ.'TRF' ) THEN - IF( SNAME ) THEN - IF( N2.LE.64 ) THEN - NB = 1 - ELSE - NB = 32 - END IF - ELSE - IF( N2.LE.64 ) THEN - NB = 1 - ELSE - NB = 32 - END IF - END IF - END IF - ELSE IF( C2.EQ.'TR' ) THEN - IF( C3.EQ.'TRI' ) THEN - IF( SNAME ) THEN - NB = 64 - ELSE - NB = 64 - END IF - END IF - ELSE IF( C2.EQ.'LA' ) THEN - IF( C3.EQ.'UUM' ) THEN - IF( SNAME ) THEN - NB = 64 - ELSE - NB = 64 - END IF - END IF - ELSE IF( SNAME .AND. C2.EQ.'ST' ) THEN - IF( C3.EQ.'EBZ' ) THEN - NB = 1 - END IF - END IF - ILAENV = NB - RETURN -* - 200 CONTINUE -* -* ISPEC = 2: minimum block size -* - NBMIN = 2 - IF( C2.EQ.'GE' ) THEN - IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. - $ C3.EQ.'QLF' ) THEN - IF( SNAME ) THEN - NBMIN = 2 - ELSE - NBMIN = 2 - END IF - ELSE IF( C3.EQ.'HRD' ) THEN - IF( SNAME ) THEN - NBMIN = 2 - ELSE - NBMIN = 2 - END IF - ELSE IF( C3.EQ.'BRD' ) THEN - IF( SNAME ) THEN - NBMIN = 2 - ELSE - NBMIN = 2 - END IF - ELSE IF( C3.EQ.'TRI' ) THEN - IF( SNAME ) THEN - NBMIN = 2 - ELSE - NBMIN = 2 - END IF - END IF - ELSE IF( C2.EQ.'SY' ) THEN - IF( C3.EQ.'TRF' ) THEN - IF( SNAME ) THEN - NBMIN = 8 - ELSE - NBMIN = 8 - END IF - ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN - NBMIN = 2 - END IF - ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN - IF( C3.EQ.'TRD' ) THEN - NBMIN = 2 - END IF - ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN - IF( C3( 1:1 ).EQ.'G' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NBMIN = 2 - END IF - ELSE IF( C3( 1:1 ).EQ.'M' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NBMIN = 2 - END IF - END IF - ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN - IF( C3( 1:1 ).EQ.'G' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NBMIN = 2 - END IF - ELSE IF( C3( 1:1 ).EQ.'M' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NBMIN = 2 - END IF - END IF - END IF - ILAENV = NBMIN - RETURN -* - 300 CONTINUE -* -* ISPEC = 3: crossover point -* - NX = 0 - IF( C2.EQ.'GE' ) THEN - IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. - $ C3.EQ.'QLF' ) THEN - IF( SNAME ) THEN - NX = 128 - ELSE - NX = 128 - END IF - ELSE IF( C3.EQ.'HRD' ) THEN - IF( SNAME ) THEN - NX = 128 - ELSE - NX = 128 - END IF - ELSE IF( C3.EQ.'BRD' ) THEN - IF( SNAME ) THEN - NX = 128 - ELSE - NX = 128 - END IF - END IF - ELSE IF( C2.EQ.'SY' ) THEN - IF( SNAME .AND. C3.EQ.'TRD' ) THEN - NX = 32 - END IF - ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN - IF( C3.EQ.'TRD' ) THEN - NX = 32 - END IF - ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN - IF( C3( 1:1 ).EQ.'G' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NX = 128 - END IF - END IF - ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN - IF( C3( 1:1 ).EQ.'G' ) THEN - IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. - $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. - $ C4.EQ.'BR' ) THEN - NX = 128 - END IF - END IF - END IF - ILAENV = NX - RETURN -* - 400 CONTINUE -* -* ISPEC = 4: number of shifts (used by xHSEQR) -* - ILAENV = 6 - RETURN -* - 500 CONTINUE -* -* ISPEC = 5: minimum column dimension (not used) -* - ILAENV = 2 - RETURN -* - 600 CONTINUE -* -* ISPEC = 6: crossover point for SVD (used by xGELSS and xGESVD) -* - ILAENV = INT( REAL( MIN( N1, N2 ) )*1.6E0 ) - RETURN -* - 700 CONTINUE -* -* ISPEC = 7: number of processors (not used) -* - ILAENV = 1 - RETURN -* - 800 CONTINUE -* -* ISPEC = 8: crossover point for multishift (used by xHSEQR) -* - ILAENV = 50 - RETURN -* - 900 CONTINUE -* -* ISPEC = 9: maximum size of the subproblems at the bottom of the -* computation tree in the divide-and-conquer algorithm -* (used by xGELSD and xGESDD) -* - ILAENV = 25 - RETURN -* - 1000 CONTINUE -* -* ISPEC = 10: ieee NaN arithmetic can be trusted not to trap -* -C ILAENV = 0 - ILAENV = 1 - IF( ILAENV.EQ.1 ) THEN - ILAENV = IEEECK( 0, 0.0, 1.0 ) - END IF - RETURN -* - 1100 CONTINUE -* -* ISPEC = 11: infinity arithmetic can be trusted not to trap -* -C ILAENV = 0 - ILAENV = 1 - IF( ILAENV.EQ.1 ) THEN - ILAENV = IEEECK( 1, 0.0, 1.0 ) - END IF - RETURN -* -* End of ILAENV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/izamax.f b/cpp/nudg++/trunk/BlasLapack/izamax.f deleted file mode 100644 index ec14f82..0000000 --- a/cpp/nudg++/trunk/BlasLapack/izamax.f +++ /dev/null @@ -1,41 +0,0 @@ - integer function izamax(n,zx,incx) -c -c finds the index of element having max. absolute value. -c jack dongarra, 1/15/85. -c modified 3/93 to return if incx .le. 0. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*) - double precision smax - integer i,incx,ix,n - double precision dcabs1 -c - izamax = 0 - if( n.lt.1 .or. incx.le.0 )return - izamax = 1 - if(n.eq.1)return - if(incx.eq.1)go to 20 -c -c code for increment not equal to 1 -c - ix = 1 - smax = dcabs1(zx(1)) - ix = ix + incx - do 10 i = 2,n - if(dcabs1(zx(ix)).le.smax) go to 5 - izamax = i - smax = dcabs1(zx(ix)) - 5 ix = ix + incx - 10 continue - return -c -c code for increment equal to 1 -c - 20 smax = dcabs1(zx(1)) - do 30 i = 2,n - if(dcabs1(zx(i)).le.smax) go to 30 - izamax = i - smax = dcabs1(zx(i)) - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/izmax1.f b/cpp/nudg++/trunk/BlasLapack/izmax1.f deleted file mode 100644 index 7374257..0000000 --- a/cpp/nudg++/trunk/BlasLapack/izmax1.f +++ /dev/null @@ -1,96 +0,0 @@ - INTEGER FUNCTION IZMAX1( N, CX, INCX ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - INTEGER INCX, N -* .. -* .. Array Arguments .. - COMPLEX*16 CX( * ) -* .. -* -* Purpose -* ======= -* -* IZMAX1 finds the index of the element whose real part has maximum -* absolute value. -* -* Based on IZAMAX from Level 1 BLAS. -* The change is to use the 'genuine' absolute value. -* -* Contributed by Nick Higham for use with ZLACON. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of elements in the vector CX. -* -* CX (input) COMPLEX*16 array, dimension (N) -* The vector whose elements will be summed. -* -* INCX (input) INTEGER -* The spacing between successive values of CX. INCX >= 1. -* -* ===================================================================== -* -* .. Local Scalars .. - INTEGER I, IX - DOUBLE PRECISION SMAX - COMPLEX*16 ZDUM -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, DBLE -* .. -* .. Statement Functions .. - DOUBLE PRECISION CABS1 -* .. -* .. Statement Function definitions .. -* -* NEXT LINE IS THE ONLY MODIFICATION. - CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) -* .. -* .. Executable Statements .. -* - IZMAX1 = 0 - IF( N.LT.1 ) - $ RETURN - IZMAX1 = 1 - IF( N.EQ.1 ) - $ RETURN - IF( INCX.EQ.1 ) - $ GO TO 30 -* -* CODE FOR INCREMENT NOT EQUAL TO 1 -* - IX = 1 - SMAX = CABS1( CX( 1 ) ) - IX = IX + INCX - DO 20 I = 2, N - IF( CABS1( CX( IX ) ).LE.SMAX ) - $ GO TO 10 - IZMAX1 = I - SMAX = CABS1( CX( IX ) ) - 10 CONTINUE - IX = IX + INCX - 20 CONTINUE - RETURN -* -* CODE FOR INCREMENT EQUAL TO 1 -* - 30 CONTINUE - SMAX = CABS1( CX( 1 ) ) - DO 40 I = 2, N - IF( CABS1( CX( I ) ).LE.SMAX ) - $ GO TO 40 - IZMAX1 = I - SMAX = CABS1( CX( I ) ) - 40 CONTINUE - RETURN -* -* End of IZMAX1 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/lsame.f b/cpp/nudg++/trunk/BlasLapack/lsame.f deleted file mode 100644 index f895174..0000000 --- a/cpp/nudg++/trunk/BlasLapack/lsame.f +++ /dev/null @@ -1,87 +0,0 @@ - LOGICAL FUNCTION LSAME( CA, CB ) -* -* -- LAPACK auxiliary routine (version 2.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* January 31, 1994 -* -* .. Scalar Arguments .. - CHARACTER CA, CB -* .. -* -* Purpose -* ======= -* -* LSAME returns .TRUE. if CA is the same letter as CB regardless of -* case. -* -* Arguments -* ========= -* -* CA (input) CHARACTER*1 -* CB (input) CHARACTER*1 -* CA and CB specify the single characters to be compared. -* -* ===================================================================== -* -* .. Intrinsic Functions .. - INTRINSIC ICHAR -* .. -* .. Local Scalars .. - INTEGER INTA, INTB, ZCODE -* .. -* .. Executable Statements .. -* -* Test if the characters are equal -* - LSAME = CA.EQ.CB - IF( LSAME ) - $ RETURN -* -* Now test for equivalence if both characters are alphabetic. -* - ZCODE = ICHAR( 'Z' ) -* -* Use 'Z' rather than 'A' so that ASCII can be detected on Prime -* machines, on which ICHAR returns a value with bit 8 set. -* ICHAR('A') on Prime machines returns 193 which is the same as -* ICHAR('A') on an EBCDIC machine. -* - INTA = ICHAR( CA ) - INTB = ICHAR( CB ) -* - IF( ZCODE.EQ.90 .OR. ZCODE.EQ.122 ) THEN -* -* ASCII is assumed - ZCODE is the ASCII code of either lower or -* upper case 'Z'. -* - IF( INTA.GE.97 .AND. INTA.LE.122 ) INTA = INTA - 32 - IF( INTB.GE.97 .AND. INTB.LE.122 ) INTB = INTB - 32 -* - ELSE IF( ZCODE.EQ.233 .OR. ZCODE.EQ.169 ) THEN -* -* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or -* upper case 'Z'. -* - IF( INTA.GE.129 .AND. INTA.LE.137 .OR. - $ INTA.GE.145 .AND. INTA.LE.153 .OR. - $ INTA.GE.162 .AND. INTA.LE.169 ) INTA = INTA + 64 - IF( INTB.GE.129 .AND. INTB.LE.137 .OR. - $ INTB.GE.145 .AND. INTB.LE.153 .OR. - $ INTB.GE.162 .AND. INTB.LE.169 ) INTB = INTB + 64 -* - ELSE IF( ZCODE.EQ.218 .OR. ZCODE.EQ.250 ) THEN -* -* ASCII is assumed, on Prime machines - ZCODE is the ASCII code -* plus 128 of either lower or upper case 'Z'. -* - IF( INTA.GE.225 .AND. INTA.LE.250 ) INTA = INTA - 32 - IF( INTB.GE.225 .AND. INTB.LE.250 ) INTB = INTB - 32 - END IF - LSAME = INTA.EQ.INTB -* -* RETURN -* -* End of LSAME -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/xerbla.f b/cpp/nudg++/trunk/BlasLapack/xerbla.f deleted file mode 100644 index 1810008..0000000 --- a/cpp/nudg++/trunk/BlasLapack/xerbla.f +++ /dev/null @@ -1,43 +0,0 @@ - SUBROUTINE XERBLA( SRNAME, INFO ) -* -* -- LAPACK auxiliary routine (preliminary version) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* February 29, 1992 -* -* .. Scalar Arguments .. - CHARACTER*6 SRNAME - INTEGER INFO -* .. -* -* Purpose -* ======= -* -* XERBLA is an error handler for the LAPACK routines. -* It is called by an LAPACK routine if an input parameter has an -* invalid value. A message is printed and execution stops. -* -* Installers may consider modifying the STOP statement in order to -* call system-specific exception-handling facilities. -* -* Arguments -* ========= -* -* SRNAME (input) CHARACTER*6 -* The name of the routine which called XERBLA. -* -* INFO (input) INTEGER -* The position of the invalid parameter in the parameter list -* of the calling routine. -* -* - WRITE( *, FMT = 9999 )SRNAME, INFO -* - STOP -* - 9999 FORMAT( ' ** On entry to ', A6, ' parameter number ', I2, ' had ', - $ 'an illegal value' ) -* -* End of XERBLA -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zaxpy.f b/cpp/nudg++/trunk/BlasLapack/zaxpy.f deleted file mode 100644 index 4fa3b1e..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zaxpy.f +++ /dev/null @@ -1,34 +0,0 @@ - subroutine zaxpy(n,za,zx,incx,zy,incy) -c -c constant times a vector plus a vector. -c jack dongarra, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*),zy(*),za - integer i,incx,incy,ix,iy,n - double precision dcabs1 - if(n.le.0)return - if (dcabs1(za) .eq. 0.0d0) return - if (incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - zy(iy) = zy(iy) + za*zx(ix) - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c - 20 do 30 i = 1,n - zy(i) = zy(i) + za*zx(i) - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/zcopy.f b/cpp/nudg++/trunk/BlasLapack/zcopy.f deleted file mode 100644 index 9ccfa88..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zcopy.f +++ /dev/null @@ -1,33 +0,0 @@ - subroutine zcopy(n,zx,incx,zy,incy) -c -c copies a vector, x, to a vector, y. -c jack dongarra, linpack, 4/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*),zy(*) - integer i,incx,incy,ix,iy,n -c - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - zy(iy) = zx(ix) - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 -c - 20 do 30 i = 1,n - zy(i) = zx(i) - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/zdotc.f b/cpp/nudg++/trunk/BlasLapack/zdotc.f deleted file mode 100644 index d6ac685..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zdotc.f +++ /dev/null @@ -1,36 +0,0 @@ - double complex function zdotc(n,zx,incx,zy,incy) -c -c forms the dot product of a vector. -c jack dongarra, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*),zy(*),ztemp - integer i,incx,incy,ix,iy,n - ztemp = (0.0d0,0.0d0) - zdotc = (0.0d0,0.0d0) - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - ztemp = ztemp + dconjg(zx(ix))*zy(iy) - ix = ix + incx - iy = iy + incy - 10 continue - zdotc = ztemp - return -c -c code for both increments equal to 1 -c - 20 do 30 i = 1,n - ztemp = ztemp + dconjg(zx(i))*zy(i) - 30 continue - zdotc = ztemp - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/zdotu.f b/cpp/nudg++/trunk/BlasLapack/zdotu.f deleted file mode 100644 index 329e988..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zdotu.f +++ /dev/null @@ -1,36 +0,0 @@ - double complex function zdotu(n,zx,incx,zy,incy) -c -c forms the dot product of two vectors. -c jack dongarra, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*),zy(*),ztemp - integer i,incx,incy,ix,iy,n - ztemp = (0.0d0,0.0d0) - zdotu = (0.0d0,0.0d0) - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments -c not equal to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - ztemp = ztemp + zx(ix)*zy(iy) - ix = ix + incx - iy = iy + incy - 10 continue - zdotu = ztemp - return -c -c code for both increments equal to 1 -c - 20 do 30 i = 1,n - ztemp = ztemp + zx(i)*zy(i) - 30 continue - zdotu = ztemp - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/zdrscl.f b/cpp/nudg++/trunk/BlasLapack/zdrscl.f deleted file mode 100644 index c44e96d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zdrscl.f +++ /dev/null @@ -1,115 +0,0 @@ - SUBROUTINE ZDRSCL( N, SA, SX, INCX ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - INTEGER INCX, N - DOUBLE PRECISION SA -* .. -* .. Array Arguments .. - COMPLEX*16 SX( * ) -* .. -* -* Purpose -* ======= -* -* ZDRSCL multiplies an n-element complex vector x by the real scalar -* 1/a. This is done without overflow or underflow as long as -* the final result x/a does not overflow or underflow. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of components of the vector x. -* -* SA (input) DOUBLE PRECISION -* The scalar a which is used to divide each component of x. -* SA must be >= 0, or the subroutine will divide by zero. -* -* SX (input/output) COMPLEX*16 array, dimension -* (1+(N-1)*abs(INCX)) -* The n-element vector x. -* -* INCX (input) INTEGER -* The increment between successive values of the vector SX. -* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL DONE - DOUBLE PRECISION BIGNUM, CDEN, CDEN1, CNUM, CNUM1, MUL, SMLNUM -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH - EXTERNAL DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL DLABAD, ZDSCAL -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS -* .. -* .. Executable Statements .. -* -* Quick return if possible -* - IF( N.LE.0 ) - $ RETURN -* -* Get machine parameters -* - SMLNUM = DLAMCH( 'S' ) - BIGNUM = ONE / SMLNUM - CALL DLABAD( SMLNUM, BIGNUM ) -* -* Initialize the denominator to SA and the numerator to 1. -* - CDEN = SA - CNUM = ONE -* - 10 CONTINUE - CDEN1 = CDEN*SMLNUM - CNUM1 = CNUM / BIGNUM - IF( ABS( CDEN1 ).GT.ABS( CNUM ) .AND. CNUM.NE.ZERO ) THEN -* -* Pre-multiply X by SMLNUM if CDEN is large compared to CNUM. -* - MUL = SMLNUM - DONE = .FALSE. - CDEN = CDEN1 - ELSE IF( ABS( CNUM1 ).GT.ABS( CDEN ) ) THEN -* -* Pre-multiply X by BIGNUM if CDEN is small compared to CNUM. -* - MUL = BIGNUM - DONE = .FALSE. - CNUM = CNUM1 - ELSE -* -* Multiply X by CNUM / CDEN and return. -* - MUL = CNUM / CDEN - DONE = .TRUE. - END IF -* -* Scale the vector X by MUL -* - CALL ZDSCAL( N, MUL, SX, INCX ) -* - IF( .NOT.DONE ) - $ GO TO 10 -* - RETURN -* -* End of ZDRSCL -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zdscal.f b/cpp/nudg++/trunk/BlasLapack/zdscal.f deleted file mode 100644 index 8123424..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zdscal.f +++ /dev/null @@ -1,30 +0,0 @@ - subroutine zdscal(n,da,zx,incx) -c -c scales a vector by a constant. -c jack dongarra, 3/11/78. -c modified 3/93 to return if incx .le. 0. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*) - double precision da - integer i,incx,ix,n -c - if( n.le.0 .or. incx.le.0 )return - if(incx.eq.1)go to 20 -c -c code for increment not equal to 1 -c - ix = 1 - do 10 i = 1,n - zx(ix) = dcmplx(da,0.0d0)*zx(ix) - ix = ix + incx - 10 continue - return -c -c code for increment equal to 1 -c - 20 do 30 i = 1,n - zx(i) = dcmplx(da,0.0d0)*zx(i) - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/zgecon.f b/cpp/nudg++/trunk/BlasLapack/zgecon.f deleted file mode 100644 index 0a09b0b..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zgecon.f +++ /dev/null @@ -1,189 +0,0 @@ - SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK, - $ INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* March 31, 1993 -* -* .. Scalar Arguments .. - CHARACTER NORM - INTEGER INFO, LDA, N - DOUBLE PRECISION ANORM, RCOND -* .. -* .. Array Arguments .. - DOUBLE PRECISION RWORK( * ) - COMPLEX*16 A( LDA, * ), WORK( * ) -* .. -* -* Purpose -* ======= -* -* ZGECON estimates the reciprocal of the condition number of a general -* complex matrix A, in either the 1-norm or the infinity-norm, using -* the LU factorization computed by ZGETRF. -* -* An estimate is obtained for norm(inv(A)), and the reciprocal of the -* condition number is computed as -* RCOND = 1 / ( norm(A) * norm(inv(A)) ). -* -* Arguments -* ========= -* -* NORM (input) CHARACTER*1 -* Specifies whether the 1-norm condition number or the -* infinity-norm condition number is required: -* = '1' or 'O': 1-norm; -* = 'I': Infinity-norm. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input) COMPLEX*16 array, dimension (LDA,N) -* The factors L and U from the factorization A = P*L*U -* as computed by ZGETRF. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,N). -* -* ANORM (input) DOUBLE PRECISION -* If NORM = '1' or 'O', the 1-norm of the original matrix A. -* If NORM = 'I', the infinity-norm of the original matrix A. -* -* RCOND (output) DOUBLE PRECISION -* The reciprocal of the condition number of the matrix A, -* computed as RCOND = 1/(norm(A) * norm(inv(A))). -* -* WORK (workspace) COMPLEX*16 array, dimension (2*N) -* -* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ONE, ZERO - PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL ONENRM - CHARACTER NORMIN - INTEGER IX, KASE, KASE1 - DOUBLE PRECISION AINVNM, SCALE, SL, SMLNUM, SU - COMPLEX*16 ZDUM -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IZAMAX - DOUBLE PRECISION DLAMCH - EXTERNAL LSAME, IZAMAX, DLAMCH -* .. -* .. External Subroutines .. - EXTERNAL XERBLA, ZDRSCL, ZLACON, ZLATRS -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, DBLE, DIMAG, MAX -* .. -* .. Statement Functions .. - DOUBLE PRECISION CABS1 -* .. -* .. Statement Function definitions .. - CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) ) -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - ONENRM = NORM.EQ.'1' .OR. LSAME( NORM, 'O' ) - IF( .NOT.ONENRM .AND. .NOT.LSAME( NORM, 'I' ) ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -4 - ELSE IF( ANORM.LT.ZERO ) THEN - INFO = -5 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'ZGECON', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - RCOND = ZERO - IF( N.EQ.0 ) THEN - RCOND = ONE - RETURN - ELSE IF( ANORM.EQ.ZERO ) THEN - RETURN - END IF -* - SMLNUM = DLAMCH( 'Safe minimum' ) -* -* Estimate the norm of inv(A). -* - AINVNM = ZERO - NORMIN = 'N' - IF( ONENRM ) THEN - KASE1 = 1 - ELSE - KASE1 = 2 - END IF - KASE = 0 - 10 CONTINUE - CALL ZLACON( N, WORK( N+1 ), WORK, AINVNM, KASE ) - IF( KASE.NE.0 ) THEN - IF( KASE.EQ.KASE1 ) THEN -* -* Multiply by inv(L). -* - CALL ZLATRS( 'Lower', 'No transpose', 'Unit', NORMIN, N, A, - $ LDA, WORK, SL, RWORK, INFO ) -* -* Multiply by inv(U). -* - CALL ZLATRS( 'Upper', 'No transpose', 'Non-unit', NORMIN, N, - $ A, LDA, WORK, SU, RWORK( N+1 ), INFO ) - ELSE -* -* Multiply by inv(U'). -* - CALL ZLATRS( 'Upper', 'Conjugate transpose', 'Non-unit', - $ NORMIN, N, A, LDA, WORK, SU, RWORK( N+1 ), - $ INFO ) -* -* Multiply by inv(L'). -* - CALL ZLATRS( 'Lower', 'Conjugate transpose', 'Unit', NORMIN, - $ N, A, LDA, WORK, SL, RWORK, INFO ) - END IF -* -* Divide X by 1/(SL*SU) if doing so will not cause overflow. -* - SCALE = SL*SU - NORMIN = 'Y' - IF( SCALE.NE.ONE ) THEN - IX = IZAMAX( N, WORK, 1 ) - IF( SCALE.LT.CABS1( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO ) - $ GO TO 20 - CALL ZDRSCL( N, SCALE, WORK, 1 ) - END IF - GO TO 10 - END IF -* -* Compute the estimate of the reciprocal condition number. -* - IF( AINVNM.NE.ZERO ) - $ RCOND = ( ONE / AINVNM ) / ANORM -* - 20 CONTINUE - RETURN -* -* End of ZGECON -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zgemm.f b/cpp/nudg++/trunk/BlasLapack/zgemm.f deleted file mode 100644 index 09cd151..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zgemm.f +++ /dev/null @@ -1,415 +0,0 @@ - SUBROUTINE ZGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, - $ BETA, C, LDC ) -* .. Scalar Arguments .. - CHARACTER*1 TRANSA, TRANSB - INTEGER M, N, K, LDA, LDB, LDC - COMPLEX*16 ALPHA, BETA -* .. Array Arguments .. - COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ) -* .. -* -* Purpose -* ======= -* -* ZGEMM performs one of the matrix-matrix operations -* -* C := alpha*op( A )*op( B ) + beta*C, -* -* where op( X ) is one of -* -* op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ), -* -* alpha and beta are scalars, and A, B and C are matrices, with op( A ) -* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. -* -* Parameters -* ========== -* -* TRANSA - CHARACTER*1. -* On entry, TRANSA specifies the form of op( A ) to be used in -* the matrix multiplication as follows: -* -* TRANSA = 'N' or 'n', op( A ) = A. -* -* TRANSA = 'T' or 't', op( A ) = A'. -* -* TRANSA = 'C' or 'c', op( A ) = conjg( A' ). -* -* Unchanged on exit. -* -* TRANSB - CHARACTER*1. -* On entry, TRANSB specifies the form of op( B ) to be used in -* the matrix multiplication as follows: -* -* TRANSB = 'N' or 'n', op( B ) = B. -* -* TRANSB = 'T' or 't', op( B ) = B'. -* -* TRANSB = 'C' or 'c', op( B ) = conjg( B' ). -* -* Unchanged on exit. -* -* M - INTEGER. -* On entry, M specifies the number of rows of the matrix -* op( A ) and of the matrix C. M must be at least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of the matrix -* op( B ) and the number of columns of the matrix C. N must be -* at least zero. -* Unchanged on exit. -* -* K - INTEGER. -* On entry, K specifies the number of columns of the matrix -* op( A ) and the number of rows of the matrix op( B ). K must -* be at least zero. -* Unchanged on exit. -* -* ALPHA - COMPLEX*16 . -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is -* k when TRANSA = 'N' or 'n', and is m otherwise. -* Before entry with TRANSA = 'N' or 'n', the leading m by k -* part of the array A must contain the matrix A, otherwise -* the leading k by m part of the array A must contain the -* matrix A. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. When TRANSA = 'N' or 'n' then -* LDA must be at least max( 1, m ), otherwise LDA must be at -* least max( 1, k ). -* Unchanged on exit. -* -* B - COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is -* n when TRANSB = 'N' or 'n', and is k otherwise. -* Before entry with TRANSB = 'N' or 'n', the leading k by n -* part of the array B must contain the matrix B, otherwise -* the leading n by k part of the array B must contain the -* matrix B. -* Unchanged on exit. -* -* LDB - INTEGER. -* On entry, LDB specifies the first dimension of B as declared -* in the calling (sub) program. When TRANSB = 'N' or 'n' then -* LDB must be at least max( 1, k ), otherwise LDB must be at -* least max( 1, n ). -* Unchanged on exit. -* -* BETA - COMPLEX*16 . -* On entry, BETA specifies the scalar beta. When BETA is -* supplied as zero then C need not be set on input. -* Unchanged on exit. -* -* C - COMPLEX*16 array of DIMENSION ( LDC, n ). -* Before entry, the leading m by n part of the array C must -* contain the matrix C, except when beta is zero, in which -* case C need not be set on entry. -* On exit, the array C is overwritten by the m by n matrix -* ( alpha*op( A )*op( B ) + beta*C ). -* -* LDC - INTEGER. -* On entry, LDC specifies the first dimension of C as declared -* in the calling (sub) program. LDC must be at least -* max( 1, m ). -* Unchanged on exit. -* -* -* Level 3 Blas routine. -* -* -- Written on 8-February-1989. -* Jack Dongarra, Argonne National Laboratory. -* Iain Duff, AERE Harwell. -* Jeremy Du Croz, Numerical Algorithms Group Ltd. -* Sven Hammarling, Numerical Algorithms Group Ltd. -* -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC DCONJG, MAX -* .. Local Scalars .. - LOGICAL CONJA, CONJB, NOTA, NOTB - INTEGER I, INFO, J, L, NCOLA, NROWA, NROWB - COMPLEX*16 TEMP -* .. Parameters .. - COMPLEX*16 ONE - PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) - COMPLEX*16 ZERO - PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) -* .. -* .. Executable Statements .. -* -* Set NOTA and NOTB as true if A and B respectively are not -* conjugated or transposed, set CONJA and CONJB as true if A and -* B respectively are to be transposed but not conjugated and set -* NROWA, NCOLA and NROWB as the number of rows and columns of A -* and the number of rows of B respectively. -* - NOTA = LSAME( TRANSA, 'N' ) - NOTB = LSAME( TRANSB, 'N' ) - CONJA = LSAME( TRANSA, 'C' ) - CONJB = LSAME( TRANSB, 'C' ) - IF( NOTA )THEN - NROWA = M - NCOLA = K - ELSE - NROWA = K - NCOLA = M - END IF - IF( NOTB )THEN - NROWB = K - ELSE - NROWB = N - END IF -* -* Test the input parameters. -* - INFO = 0 - IF( ( .NOT.NOTA ).AND. - $ ( .NOT.CONJA ).AND. - $ ( .NOT.LSAME( TRANSA, 'T' ) ) )THEN - INFO = 1 - ELSE IF( ( .NOT.NOTB ).AND. - $ ( .NOT.CONJB ).AND. - $ ( .NOT.LSAME( TRANSB, 'T' ) ) )THEN - INFO = 2 - ELSE IF( M .LT.0 )THEN - INFO = 3 - ELSE IF( N .LT.0 )THEN - INFO = 4 - ELSE IF( K .LT.0 )THEN - INFO = 5 - ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN - INFO = 8 - ELSE IF( LDB.LT.MAX( 1, NROWB ) )THEN - INFO = 10 - ELSE IF( LDC.LT.MAX( 1, M ) )THEN - INFO = 13 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'ZGEMM ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. - $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) - $ RETURN -* -* And when alpha.eq.zero. -* - IF( ALPHA.EQ.ZERO )THEN - IF( BETA.EQ.ZERO )THEN - DO 20, J = 1, N - DO 10, I = 1, M - C( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - ELSE - DO 40, J = 1, N - DO 30, I = 1, M - C( I, J ) = BETA*C( I, J ) - 30 CONTINUE - 40 CONTINUE - END IF - RETURN - END IF -* -* Start the operations. -* - IF( NOTB )THEN - IF( NOTA )THEN -* -* Form C := alpha*A*B + beta*C. -* - DO 90, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 50, I = 1, M - C( I, J ) = ZERO - 50 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 60, I = 1, M - C( I, J ) = BETA*C( I, J ) - 60 CONTINUE - END IF - DO 80, L = 1, K - IF( B( L, J ).NE.ZERO )THEN - TEMP = ALPHA*B( L, J ) - DO 70, I = 1, M - C( I, J ) = C( I, J ) + TEMP*A( I, L ) - 70 CONTINUE - END IF - 80 CONTINUE - 90 CONTINUE - ELSE IF( CONJA )THEN -* -* Form C := alpha*conjg( A' )*B + beta*C. -* - DO 120, J = 1, N - DO 110, I = 1, M - TEMP = ZERO - DO 100, L = 1, K - TEMP = TEMP + DCONJG( A( L, I ) )*B( L, J ) - 100 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 110 CONTINUE - 120 CONTINUE - ELSE -* -* Form C := alpha*A'*B + beta*C -* - DO 150, J = 1, N - DO 140, I = 1, M - TEMP = ZERO - DO 130, L = 1, K - TEMP = TEMP + A( L, I )*B( L, J ) - 130 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 140 CONTINUE - 150 CONTINUE - END IF - ELSE IF( NOTA )THEN - IF( CONJB )THEN -* -* Form C := alpha*A*conjg( B' ) + beta*C. -* - DO 200, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 160, I = 1, M - C( I, J ) = ZERO - 160 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 170, I = 1, M - C( I, J ) = BETA*C( I, J ) - 170 CONTINUE - END IF - DO 190, L = 1, K - IF( B( J, L ).NE.ZERO )THEN - TEMP = ALPHA*DCONJG( B( J, L ) ) - DO 180, I = 1, M - C( I, J ) = C( I, J ) + TEMP*A( I, L ) - 180 CONTINUE - END IF - 190 CONTINUE - 200 CONTINUE - ELSE -* -* Form C := alpha*A*B' + beta*C -* - DO 250, J = 1, N - IF( BETA.EQ.ZERO )THEN - DO 210, I = 1, M - C( I, J ) = ZERO - 210 CONTINUE - ELSE IF( BETA.NE.ONE )THEN - DO 220, I = 1, M - C( I, J ) = BETA*C( I, J ) - 220 CONTINUE - END IF - DO 240, L = 1, K - IF( B( J, L ).NE.ZERO )THEN - TEMP = ALPHA*B( J, L ) - DO 230, I = 1, M - C( I, J ) = C( I, J ) + TEMP*A( I, L ) - 230 CONTINUE - END IF - 240 CONTINUE - 250 CONTINUE - END IF - ELSE IF( CONJA )THEN - IF( CONJB )THEN -* -* Form C := alpha*conjg( A' )*conjg( B' ) + beta*C. -* - DO 280, J = 1, N - DO 270, I = 1, M - TEMP = ZERO - DO 260, L = 1, K - TEMP = TEMP + - $ DCONJG( A( L, I ) )*DCONJG( B( J, L ) ) - 260 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 270 CONTINUE - 280 CONTINUE - ELSE -* -* Form C := alpha*conjg( A' )*B' + beta*C -* - DO 310, J = 1, N - DO 300, I = 1, M - TEMP = ZERO - DO 290, L = 1, K - TEMP = TEMP + DCONJG( A( L, I ) )*B( J, L ) - 290 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 300 CONTINUE - 310 CONTINUE - END IF - ELSE - IF( CONJB )THEN -* -* Form C := alpha*A'*conjg( B' ) + beta*C -* - DO 340, J = 1, N - DO 330, I = 1, M - TEMP = ZERO - DO 320, L = 1, K - TEMP = TEMP + A( L, I )*DCONJG( B( J, L ) ) - 320 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 330 CONTINUE - 340 CONTINUE - ELSE -* -* Form C := alpha*A'*B' + beta*C -* - DO 370, J = 1, N - DO 360, I = 1, M - TEMP = ZERO - DO 350, L = 1, K - TEMP = TEMP + A( L, I )*B( J, L ) - 350 CONTINUE - IF( BETA.EQ.ZERO )THEN - C( I, J ) = ALPHA*TEMP - ELSE - C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) - END IF - 360 CONTINUE - 370 CONTINUE - END IF - END IF -* - RETURN -* -* End of ZGEMM . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zgeru.f b/cpp/nudg++/trunk/BlasLapack/zgeru.f deleted file mode 100644 index 5283af6..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zgeru.f +++ /dev/null @@ -1,157 +0,0 @@ - SUBROUTINE ZGERU ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) -* .. Scalar Arguments .. - COMPLEX*16 ALPHA - INTEGER INCX, INCY, LDA, M, N -* .. Array Arguments .. - COMPLEX*16 A( LDA, * ), X( * ), Y( * ) -* .. -* -* Purpose -* ======= -* -* ZGERU performs the rank 1 operation -* -* A := alpha*x*y' + A, -* -* where alpha is a scalar, x is an m element vector, y is an n element -* vector and A is an m by n matrix. -* -* Parameters -* ========== -* -* M - INTEGER. -* On entry, M specifies the number of rows of the matrix A. -* M must be at least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* ALPHA - COMPLEX*16 . -* On entry, ALPHA specifies the scalar alpha. -* Unchanged on exit. -* -* X - COMPLEX*16 array of dimension at least -* ( 1 + ( m - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the m -* element vector x. -* Unchanged on exit. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* Y - COMPLEX*16 array of dimension at least -* ( 1 + ( n - 1 )*abs( INCY ) ). -* Before entry, the incremented array Y must contain the n -* element vector y. -* Unchanged on exit. -* -* INCY - INTEGER. -* On entry, INCY specifies the increment for the elements of -* Y. INCY must not be zero. -* Unchanged on exit. -* -* A - COMPLEX*16 array of DIMENSION ( LDA, n ). -* Before entry, the leading m by n part of the array A must -* contain the matrix of coefficients. On exit, A is -* overwritten by the updated matrix. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, m ). -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - COMPLEX*16 ZERO - PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) -* .. Local Scalars .. - COMPLEX*16 TEMP - INTEGER I, INFO, IX, J, JY, KX -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( M.LT.0 )THEN - INFO = 1 - ELSE IF( N.LT.0 )THEN - INFO = 2 - ELSE IF( INCX.EQ.0 )THEN - INFO = 5 - ELSE IF( INCY.EQ.0 )THEN - INFO = 7 - ELSE IF( LDA.LT.MAX( 1, M ) )THEN - INFO = 9 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'ZGERU ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) - $ RETURN -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through A. -* - IF( INCY.GT.0 )THEN - JY = 1 - ELSE - JY = 1 - ( N - 1 )*INCY - END IF - IF( INCX.EQ.1 )THEN - DO 20, J = 1, N - IF( Y( JY ).NE.ZERO )THEN - TEMP = ALPHA*Y( JY ) - DO 10, I = 1, M - A( I, J ) = A( I, J ) + X( I )*TEMP - 10 CONTINUE - END IF - JY = JY + INCY - 20 CONTINUE - ELSE - IF( INCX.GT.0 )THEN - KX = 1 - ELSE - KX = 1 - ( M - 1 )*INCX - END IF - DO 40, J = 1, N - IF( Y( JY ).NE.ZERO )THEN - TEMP = ALPHA*Y( JY ) - IX = KX - DO 30, I = 1, M - A( I, J ) = A( I, J ) + X( IX )*TEMP - IX = IX + INCX - 30 CONTINUE - END IF - JY = JY + INCY - 40 CONTINUE - END IF -* - RETURN -* -* End of ZGERU . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zgetf2.f b/cpp/nudg++/trunk/BlasLapack/zgetf2.f deleted file mode 100644 index 4cbdb44..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zgetf2.f +++ /dev/null @@ -1,136 +0,0 @@ - SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, M, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - COMPLEX*16 A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* ZGETF2 computes an LU factorization of a general m-by-n matrix A -* using partial pivoting with row interchanges. -* -* The factorization has the form -* A = P * L * U -* where P is a permutation matrix, L is lower triangular with unit -* diagonal elements (lower trapezoidal if m > n), and U is upper -* triangular (upper trapezoidal if m < n). -* -* This is the right-looking Level 2 BLAS version of the algorithm. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) COMPLEX*16 array, dimension (LDA,N) -* On entry, the m by n matrix to be factored. -* On exit, the factors L and U from the factorization -* A = P*L*U; the unit diagonal elements of L are not stored. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* IPIV (output) INTEGER array, dimension (min(M,N)) -* The pivot indices; for 1 <= i <= min(M,N), row i of the -* matrix was interchanged with row IPIV(i). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -k, the k-th argument had an illegal value -* > 0: if INFO = k, U(k,k) is exactly zero. The factorization -* has been completed, but the factor U is exactly -* singular, and division by zero will occur if it is used -* to solve a system of equations. -* -* ===================================================================== -* -* .. Parameters .. - COMPLEX*16 ONE, ZERO - PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), - $ ZERO = ( 0.0D+0, 0.0D+0 ) ) -* .. -* .. Local Scalars .. - INTEGER J, JP -* .. -* .. External Functions .. - INTEGER IZAMAX - EXTERNAL IZAMAX -* .. -* .. External Subroutines .. - EXTERNAL XERBLA, ZGERU, ZSCAL, ZSWAP -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'ZGETF2', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 ) - $ RETURN -* - DO 10 J = 1, MIN( M, N ) -* -* Find pivot and test for singularity. -* - JP = J - 1 + IZAMAX( M-J+1, A( J, J ), 1 ) - IPIV( J ) = JP - IF( A( JP, J ).NE.ZERO ) THEN -* -* Apply the interchange to columns 1:N. -* - IF( JP.NE.J ) - $ CALL ZSWAP( N, A( J, 1 ), LDA, A( JP, 1 ), LDA ) -* -* Compute elements J+1:M of J-th column. -* - IF( J.LT.M ) - $ CALL ZSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 ) -* - ELSE IF( INFO.EQ.0 ) THEN -* - INFO = J - END IF -* - IF( J.LT.MIN( M, N ) ) THEN -* -* Update trailing submatrix. -* - CALL ZGERU( M-J, N-J, -ONE, A( J+1, J ), 1, A( J, J+1 ), - $ LDA, A( J+1, J+1 ), LDA ) - END IF - 10 CONTINUE - RETURN -* -* End of ZGETF2 -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zgetrf.f b/cpp/nudg++/trunk/BlasLapack/zgetrf.f deleted file mode 100644 index 6f48c8d..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zgetrf.f +++ /dev/null @@ -1,160 +0,0 @@ - SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO ) -* -* -- LAPACK routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* September 30, 1994 -* -* .. Scalar Arguments .. - INTEGER INFO, LDA, M, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - COMPLEX*16 A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* ZGETRF computes an LU factorization of a general M-by-N matrix A -* using partial pivoting with row interchanges. -* -* The factorization has the form -* A = P * L * U -* where P is a permutation matrix, L is lower triangular with unit -* diagonal elements (lower trapezoidal if m > n), and U is upper -* triangular (upper trapezoidal if m < n). -* -* This is the right-looking Level 3 BLAS version of the algorithm. -* -* Arguments -* ========= -* -* M (input) INTEGER -* The number of rows of the matrix A. M >= 0. -* -* N (input) INTEGER -* The number of columns of the matrix A. N >= 0. -* -* A (input/output) COMPLEX*16 array, dimension (LDA,N) -* On entry, the M-by-N matrix to be factored. -* On exit, the factors L and U from the factorization -* A = P*L*U; the unit diagonal elements of L are not stored. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max(1,M). -* -* IPIV (output) INTEGER array, dimension (min(M,N)) -* The pivot indices; for 1 <= i <= min(M,N), row i of the -* matrix was interchanged with row IPIV(i). -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -i, the i-th argument had an illegal value -* > 0: if INFO = i, U(i,i) is exactly zero. The factorization -* has been completed, but the factor U is exactly -* singular, and division by zero will occur if it is used -* to solve a system of equations. -* -* ===================================================================== -* -* .. Parameters .. - COMPLEX*16 ONE - PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) -* .. -* .. Local Scalars .. - INTEGER I, IINFO, J, JB, NB -* .. -* .. External Subroutines .. - EXTERNAL XERBLA, ZGEMM, ZGETF2, ZLASWP, ZTRSM -* .. -* .. External Functions .. - INTEGER ILAENV - EXTERNAL ILAENV -* .. -* .. Intrinsic Functions .. - INTRINSIC MAX, MIN -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF( M.LT.0 ) THEN - INFO = -1 - ELSE IF( N.LT.0 ) THEN - INFO = -2 - ELSE IF( LDA.LT.MAX( 1, M ) ) THEN - INFO = -4 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'ZGETRF', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( M.EQ.0 .OR. N.EQ.0 ) - $ RETURN -* -* Determine the block size for this environment. -* - NB = ILAENV( 1, 'ZGETRF', ' ', M, N, -1, -1 ) - IF( NB.LE.1 .OR. NB.GE.MIN( M, N ) ) THEN -* -* Use unblocked code. -* - CALL ZGETF2( M, N, A, LDA, IPIV, INFO ) - ELSE -* -* Use blocked code. -* - DO 20 J = 1, MIN( M, N ), NB - JB = MIN( MIN( M, N )-J+1, NB ) -* -* Factor diagonal and subdiagonal blocks and test for exact -* singularity. -* - CALL ZGETF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO ) -* -* Adjust INFO and the pivot indices. -* - IF( INFO.EQ.0 .AND. IINFO.GT.0 ) - $ INFO = IINFO + J - 1 - DO 10 I = J, MIN( M, J+JB-1 ) - IPIV( I ) = J - 1 + IPIV( I ) - 10 CONTINUE -* -* Apply interchanges to columns 1:J-1. -* - CALL ZLASWP( J-1, A, LDA, J, J+JB-1, IPIV, 1 ) -* - IF( J+JB.LE.N ) THEN -* -* Apply interchanges to columns J+JB:N. -* - CALL ZLASWP( N-J-JB+1, A( 1, J+JB ), LDA, J, J+JB-1, - $ IPIV, 1 ) -* -* Compute block row of U. -* - CALL ZTRSM( 'Left', 'Lower', 'No transpose', 'Unit', JB, - $ N-J-JB+1, ONE, A( J, J ), LDA, A( J, J+JB ), - $ LDA ) - IF( J+JB.LE.M ) THEN -* -* Update trailing submatrix. -* - CALL ZGEMM( 'No transpose', 'No transpose', M-J-JB+1, - $ N-J-JB+1, JB, -ONE, A( J+JB, J ), LDA, - $ A( J, J+JB ), LDA, ONE, A( J+JB, J+JB ), - $ LDA ) - END IF - END IF - 20 CONTINUE - END IF - RETURN -* -* End of ZGETRF -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zlacon.f b/cpp/nudg++/trunk/BlasLapack/zlacon.f deleted file mode 100644 index 32c3c67..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zlacon.f +++ /dev/null @@ -1,211 +0,0 @@ - SUBROUTINE ZLACON( N, V, X, EST, KASE ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER KASE, N - DOUBLE PRECISION EST -* .. -* .. Array Arguments .. - COMPLEX*16 V( N ), X( N ) -* .. -* -* Purpose -* ======= -* -* ZLACON estimates the 1-norm of a square, complex matrix A. -* Reverse communication is used for evaluating matrix-vector products. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The order of the matrix. N >= 1. -* -* V (workspace) COMPLEX*16 array, dimension (N) -* On the final return, V = A*W, where EST = norm(V)/norm(W) -* (W is not returned). -* -* X (input/output) COMPLEX*16 array, dimension (N) -* On an intermediate return, X should be overwritten by -* A * X, if KASE=1, -* A' * X, if KASE=2, -* where A' is the conjugate transpose of A, and ZLACON must be -* re-called with all the other parameters unchanged. -* -* EST (output) DOUBLE PRECISION -* An estimate (a lower bound) for norm(A). -* -* KASE (input/output) INTEGER -* On the initial call to ZLACON, KASE should be 0. -* On an intermediate return, KASE will be 1 or 2, indicating -* whether X should be overwritten by A * X or A' * X. -* On the final return from ZLACON, KASE will again be 0. -* -* Further Details -* ======= ======= -* -* Contributed by Nick Higham, University of Manchester. -* Originally named CONEST, dated March 16, 1988. -* -* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of -* a real or complex matrix, with applications to condition estimation", -* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. -* -* Last modified: April, 1999 -* -* ===================================================================== -* -* .. Parameters .. - INTEGER ITMAX - PARAMETER ( ITMAX = 5 ) - DOUBLE PRECISION ONE, TWO - PARAMETER ( ONE = 1.0D0, TWO = 2.0D0 ) - COMPLEX*16 CZERO, CONE - PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), - $ CONE = ( 1.0D0, 0.0D0 ) ) -* .. -* .. Local Scalars .. - INTEGER I, ITER, J, JLAST, JUMP - DOUBLE PRECISION ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP -* .. -* .. External Functions .. - INTEGER IZMAX1 - DOUBLE PRECISION DLAMCH, DZSUM1 - EXTERNAL IZMAX1, DLAMCH, DZSUM1 -* .. -* .. External Subroutines .. - EXTERNAL ZCOPY -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, DBLE, DCMPLX, DIMAG -* .. -* .. Save statement .. - SAVE -* .. -* .. Executable Statements .. -* - SAFMIN = DLAMCH( 'Safe minimum' ) - IF( KASE.EQ.0 ) THEN - DO 10 I = 1, N - X( I ) = DCMPLX( ONE / DBLE( N ) ) - 10 CONTINUE - KASE = 1 - JUMP = 1 - RETURN - END IF -* - GO TO ( 20, 40, 70, 90, 120 )JUMP -* -* ................ ENTRY (JUMP = 1) -* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. -* - 20 CONTINUE - IF( N.EQ.1 ) THEN - V( 1 ) = X( 1 ) - EST = ABS( V( 1 ) ) -* ... QUIT - GO TO 130 - END IF - EST = DZSUM1( N, X, 1 ) -* - DO 30 I = 1, N - ABSXI = ABS( X( I ) ) - IF( ABSXI.GT.SAFMIN ) THEN - X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI, - $ DIMAG( X( I ) ) / ABSXI ) - ELSE - X( I ) = CONE - END IF - 30 CONTINUE - KASE = 2 - JUMP = 2 - RETURN -* -* ................ ENTRY (JUMP = 2) -* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY ZTRANS(A)*X. -* - 40 CONTINUE - J = IZMAX1( N, X, 1 ) - ITER = 2 -* -* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. -* - 50 CONTINUE - DO 60 I = 1, N - X( I ) = CZERO - 60 CONTINUE - X( J ) = CONE - KASE = 1 - JUMP = 3 - RETURN -* -* ................ ENTRY (JUMP = 3) -* X HAS BEEN OVERWRITTEN BY A*X. -* - 70 CONTINUE - CALL ZCOPY( N, X, 1, V, 1 ) - ESTOLD = EST - EST = DZSUM1( N, V, 1 ) -* -* TEST FOR CYCLING. - IF( EST.LE.ESTOLD ) - $ GO TO 100 -* - DO 80 I = 1, N - ABSXI = ABS( X( I ) ) - IF( ABSXI.GT.SAFMIN ) THEN - X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI, - $ DIMAG( X( I ) ) / ABSXI ) - ELSE - X( I ) = CONE - END IF - 80 CONTINUE - KASE = 2 - JUMP = 4 - RETURN -* -* ................ ENTRY (JUMP = 4) -* X HAS BEEN OVERWRITTEN BY ZTRANS(A)*X. -* - 90 CONTINUE - JLAST = J - J = IZMAX1( N, X, 1 ) - IF( ( ABS( X( JLAST ) ).NE.ABS( X( J ) ) ) .AND. - $ ( ITER.LT.ITMAX ) ) THEN - ITER = ITER + 1 - GO TO 50 - END IF -* -* ITERATION COMPLETE. FINAL STAGE. -* - 100 CONTINUE - ALTSGN = ONE - DO 110 I = 1, N - X( I ) = DCMPLX( ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) ) - ALTSGN = -ALTSGN - 110 CONTINUE - KASE = 1 - JUMP = 5 - RETURN -* -* ................ ENTRY (JUMP = 5) -* X HAS BEEN OVERWRITTEN BY A*X. -* - 120 CONTINUE - TEMP = TWO*( DZSUM1( N, X, 1 ) / DBLE( 3*N ) ) - IF( TEMP.GT.EST ) THEN - CALL ZCOPY( N, X, 1, V, 1 ) - EST = TEMP - END IF -* - 130 CONTINUE - KASE = 0 - RETURN -* -* End of ZLACON -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zladiv.f b/cpp/nudg++/trunk/BlasLapack/zladiv.f deleted file mode 100644 index 31f3aac..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zladiv.f +++ /dev/null @@ -1,47 +0,0 @@ - DOUBLE COMPLEX FUNCTION ZLADIV( X, Y ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* October 31, 1992 -* -* .. Scalar Arguments .. - COMPLEX*16 X, Y -* .. -* -* Purpose -* ======= -* -* ZLADIV := X / Y, where X and Y are complex. The computation of X / Y -* will not overflow on an intermediary step unless the results -* overflows. -* -* Arguments -* ========= -* -* X (input) COMPLEX*16 -* Y (input) COMPLEX*16 -* The complex scalars X and Y. -* -* ===================================================================== -* -* .. Local Scalars .. - DOUBLE PRECISION ZI, ZR -* .. -* .. External Subroutines .. - EXTERNAL DLADIV -* .. -* .. Intrinsic Functions .. - INTRINSIC DBLE, DCMPLX, DIMAG -* .. -* .. Executable Statements .. -* - CALL DLADIV( DBLE( X ), DIMAG( X ), DBLE( Y ), DIMAG( Y ), ZR, - $ ZI ) - ZLADIV = DCMPLX( ZR, ZI ) -* - RETURN -* -* End of ZLADIV -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zlaswp.f b/cpp/nudg++/trunk/BlasLapack/zlaswp.f deleted file mode 100644 index 0749250..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zlaswp.f +++ /dev/null @@ -1,120 +0,0 @@ - SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1999 -* -* .. Scalar Arguments .. - INTEGER INCX, K1, K2, LDA, N -* .. -* .. Array Arguments .. - INTEGER IPIV( * ) - COMPLEX*16 A( LDA, * ) -* .. -* -* Purpose -* ======= -* -* ZLASWP performs a series of row interchanges on the matrix A. -* One row interchange is initiated for each of rows K1 through K2 of A. -* -* Arguments -* ========= -* -* N (input) INTEGER -* The number of columns of the matrix A. -* -* A (input/output) COMPLEX*16 array, dimension (LDA,N) -* On entry, the matrix of column dimension N to which the row -* interchanges will be applied. -* On exit, the permuted matrix. -* -* LDA (input) INTEGER -* The leading dimension of the array A. -* -* K1 (input) INTEGER -* The first element of IPIV for which a row interchange will -* be done. -* -* K2 (input) INTEGER -* The last element of IPIV for which a row interchange will -* be done. -* -* IPIV (input) INTEGER array, dimension (M*abs(INCX)) -* The vector of pivot indices. Only the elements in positions -* K1 through K2 of IPIV are accessed. -* IPIV(K) = L implies rows K and L are to be interchanged. -* -* INCX (input) INTEGER -* The increment between successive values of IPIV. If IPIV -* is negative, the pivots are applied in reverse order. -* -* Further Details -* =============== -* -* Modified by -* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA -* -* ===================================================================== -* -* .. Local Scalars .. - INTEGER I, I1, I2, INC, IP, IX, IX0, J, K, N32 - COMPLEX*16 TEMP -* .. -* .. Executable Statements .. -* -* Interchange row I with row IPIV(I) for each of rows K1 through K2. -* - IF( INCX.GT.0 ) THEN - IX0 = K1 - I1 = K1 - I2 = K2 - INC = 1 - ELSE IF( INCX.LT.0 ) THEN - IX0 = 1 + ( 1-K2 )*INCX - I1 = K2 - I2 = K1 - INC = -1 - ELSE - RETURN - END IF -* - N32 = ( N / 32 )*32 - IF( N32.NE.0 ) THEN - DO 30 J = 1, N32, 32 - IX = IX0 - DO 20 I = I1, I2, INC - IP = IPIV( IX ) - IF( IP.NE.I ) THEN - DO 10 K = J, J + 31 - TEMP = A( I, K ) - A( I, K ) = A( IP, K ) - A( IP, K ) = TEMP - 10 CONTINUE - END IF - IX = IX + INCX - 20 CONTINUE - 30 CONTINUE - END IF - IF( N32.NE.N ) THEN - N32 = N32 + 1 - IX = IX0 - DO 50 I = I1, I2, INC - IP = IPIV( IX ) - IF( IP.NE.I ) THEN - DO 40 K = N32, N - TEMP = A( I, K ) - A( I, K ) = A( IP, K ) - A( IP, K ) = TEMP - 40 CONTINUE - END IF - IX = IX + INCX - 50 CONTINUE - END IF -* - RETURN -* -* End of ZLASWP -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zlatrs.f b/cpp/nudg++/trunk/BlasLapack/zlatrs.f deleted file mode 100644 index 4ae3972..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zlatrs.f +++ /dev/null @@ -1,880 +0,0 @@ - SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE, - $ CNORM, INFO ) -* -* -- LAPACK auxiliary routine (version 3.0) -- -* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., -* Courant Institute, Argonne National Lab, and Rice University -* June 30, 1992 -* -* .. Scalar Arguments .. - CHARACTER DIAG, NORMIN, TRANS, UPLO - INTEGER INFO, LDA, N - DOUBLE PRECISION SCALE -* .. -* .. Array Arguments .. - DOUBLE PRECISION CNORM( * ) - COMPLEX*16 A( LDA, * ), X( * ) -* .. -* -* Purpose -* ======= -* -* ZLATRS solves one of the triangular systems -* -* A * x = s*b, A**T * x = s*b, or A**H * x = s*b, -* -* with scaling to prevent overflow. Here A is an upper or lower -* triangular matrix, A**T denotes the transpose of A, A**H denotes the -* conjugate transpose of A, x and b are n-element vectors, and s is a -* scaling factor, usually less than or equal to 1, chosen so that the -* components of x will be less than the overflow threshold. If the -* unscaled problem will not cause overflow, the Level 2 BLAS routine -* ZTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j), -* then s is set to 0 and a non-trivial solution to A*x = 0 is returned. -* -* Arguments -* ========= -* -* UPLO (input) CHARACTER*1 -* Specifies whether the matrix A is upper or lower triangular. -* = 'U': Upper triangular -* = 'L': Lower triangular -* -* TRANS (input) CHARACTER*1 -* Specifies the operation applied to A. -* = 'N': Solve A * x = s*b (No transpose) -* = 'T': Solve A**T * x = s*b (Transpose) -* = 'C': Solve A**H * x = s*b (Conjugate transpose) -* -* DIAG (input) CHARACTER*1 -* Specifies whether or not the matrix A is unit triangular. -* = 'N': Non-unit triangular -* = 'U': Unit triangular -* -* NORMIN (input) CHARACTER*1 -* Specifies whether CNORM has been set or not. -* = 'Y': CNORM contains the column norms on entry -* = 'N': CNORM is not set on entry. On exit, the norms will -* be computed and stored in CNORM. -* -* N (input) INTEGER -* The order of the matrix A. N >= 0. -* -* A (input) COMPLEX*16 array, dimension (LDA,N) -* The triangular matrix A. If UPLO = 'U', the leading n by n -* upper triangular part of the array A contains the upper -* triangular matrix, and the strictly lower triangular part of -* A is not referenced. If UPLO = 'L', the leading n by n lower -* triangular part of the array A contains the lower triangular -* matrix, and the strictly upper triangular part of A is not -* referenced. If DIAG = 'U', the diagonal elements of A are -* also not referenced and are assumed to be 1. -* -* LDA (input) INTEGER -* The leading dimension of the array A. LDA >= max (1,N). -* -* X (input/output) COMPLEX*16 array, dimension (N) -* On entry, the right hand side b of the triangular system. -* On exit, X is overwritten by the solution vector x. -* -* SCALE (output) DOUBLE PRECISION -* The scaling factor s for the triangular system -* A * x = s*b, A**T * x = s*b, or A**H * x = s*b. -* If SCALE = 0, the matrix A is singular or badly scaled, and -* the vector x is an exact or approximate solution to A*x = 0. -* -* CNORM (input or output) DOUBLE PRECISION array, dimension (N) -* -* If NORMIN = 'Y', CNORM is an input argument and CNORM(j) -* contains the norm of the off-diagonal part of the j-th column -* of A. If TRANS = 'N', CNORM(j) must be greater than or equal -* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) -* must be greater than or equal to the 1-norm. -* -* If NORMIN = 'N', CNORM is an output argument and CNORM(j) -* returns the 1-norm of the offdiagonal part of the j-th column -* of A. -* -* INFO (output) INTEGER -* = 0: successful exit -* < 0: if INFO = -k, the k-th argument had an illegal value -* -* Further Details -* ======= ======= -* -* A rough bound on x is computed; if that is less than overflow, ZTRSV -* is called, otherwise, specific code is used which checks for possible -* overflow or divide-by-zero at every operation. -* -* A columnwise scheme is used for solving A*x = b. The basic algorithm -* if A is lower triangular is -* -* x[1:n] := b[1:n] -* for j = 1, ..., n -* x(j) := x(j) / A(j,j) -* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j] -* end -* -* Define bounds on the components of x after j iterations of the loop: -* M(j) = bound on x[1:j] -* G(j) = bound on x[j+1:n] -* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}. -* -* Then for iteration j+1 we have -* M(j+1) <= G(j) / | A(j+1,j+1) | -* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] | -* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | ) -* -* where CNORM(j+1) is greater than or equal to the infinity-norm of -* column j+1 of A, not counting the diagonal. Hence -* -* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | ) -* 1<=i<=j -* and -* -* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| ) -* 1<=i< j -* -* Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTRSV if the -* reciprocal of the largest M(j), j=1,..,n, is larger than -* max(underflow, 1/overflow). -* -* The bound on x(j) is also used to determine when a step in the -* columnwise method can be performed without fear of overflow. If -* the computed bound is greater than a large constant, x is scaled to -* prevent overflow, but if the bound overflows, x is set to 0, x(j) to -* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found. -* -* Similarly, a row-wise scheme is used to solve A**T *x = b or -* A**H *x = b. The basic algorithm for A upper triangular is -* -* for j = 1, ..., n -* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j) -* end -* -* We simultaneously compute two bounds -* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j -* M(j) = bound on x(i), 1<=i<=j -* -* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we -* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1. -* Then the bound on x(j) is -* -* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) | -* -* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| ) -* 1<=i<=j -* -* and we can safely call ZTRSV if 1/M(n) and 1/G(n) are both greater -* than max(underflow, 1/overflow). -* -* ===================================================================== -* -* .. Parameters .. - DOUBLE PRECISION ZERO, HALF, ONE, TWO - PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0, - $ TWO = 2.0D+0 ) -* .. -* .. Local Scalars .. - LOGICAL NOTRAN, NOUNIT, UPPER - INTEGER I, IMAX, J, JFIRST, JINC, JLAST - DOUBLE PRECISION BIGNUM, GROW, REC, SMLNUM, TJJ, TMAX, TSCAL, - $ XBND, XJ, XMAX - COMPLEX*16 CSUMJ, TJJS, USCAL, ZDUM -* .. -* .. External Functions .. - LOGICAL LSAME - INTEGER IDAMAX, IZAMAX - DOUBLE PRECISION DLAMCH, DZASUM - COMPLEX*16 ZDOTC, ZDOTU, ZLADIV - EXTERNAL LSAME, IDAMAX, IZAMAX, DLAMCH, DZASUM, ZDOTC, - $ ZDOTU, ZLADIV -* .. -* .. External Subroutines .. - EXTERNAL DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV -* .. -* .. Intrinsic Functions .. - INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN -* .. -* .. Statement Functions .. - DOUBLE PRECISION CABS1, CABS2 -* .. -* .. Statement Function definitions .. - CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) ) - CABS2( ZDUM ) = ABS( DBLE( ZDUM ) / 2.D0 ) + - $ ABS( DIMAG( ZDUM ) / 2.D0 ) -* .. -* .. Executable Statements .. -* - INFO = 0 - UPPER = LSAME( UPLO, 'U' ) - NOTRAN = LSAME( TRANS, 'N' ) - NOUNIT = LSAME( DIAG, 'N' ) -* -* Test the input parameters. -* - IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN - INFO = -1 - ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. - $ LSAME( TRANS, 'C' ) ) THEN - INFO = -2 - ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN - INFO = -3 - ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT. - $ LSAME( NORMIN, 'N' ) ) THEN - INFO = -4 - ELSE IF( N.LT.0 ) THEN - INFO = -5 - ELSE IF( LDA.LT.MAX( 1, N ) ) THEN - INFO = -7 - END IF - IF( INFO.NE.0 ) THEN - CALL XERBLA( 'ZLATRS', -INFO ) - RETURN - END IF -* -* Quick return if possible -* - IF( N.EQ.0 ) - $ RETURN -* -* Determine machine dependent parameters to control overflow. -* - SMLNUM = DLAMCH( 'Safe minimum' ) - BIGNUM = ONE / SMLNUM - CALL DLABAD( SMLNUM, BIGNUM ) - SMLNUM = SMLNUM / DLAMCH( 'Precision' ) - BIGNUM = ONE / SMLNUM - SCALE = ONE -* - IF( LSAME( NORMIN, 'N' ) ) THEN -* -* Compute the 1-norm of each column, not including the diagonal. -* - IF( UPPER ) THEN -* -* A is upper triangular. -* - DO 10 J = 1, N - CNORM( J ) = DZASUM( J-1, A( 1, J ), 1 ) - 10 CONTINUE - ELSE -* -* A is lower triangular. -* - DO 20 J = 1, N - 1 - CNORM( J ) = DZASUM( N-J, A( J+1, J ), 1 ) - 20 CONTINUE - CNORM( N ) = ZERO - END IF - END IF -* -* Scale the column norms by TSCAL if the maximum element in CNORM is -* greater than BIGNUM/2. -* - IMAX = IDAMAX( N, CNORM, 1 ) - TMAX = CNORM( IMAX ) - IF( TMAX.LE.BIGNUM*HALF ) THEN - TSCAL = ONE - ELSE - TSCAL = HALF / ( SMLNUM*TMAX ) - CALL DSCAL( N, TSCAL, CNORM, 1 ) - END IF -* -* Compute a bound on the computed solution vector to see if the -* Level 2 BLAS routine ZTRSV can be used. -* - XMAX = ZERO - DO 30 J = 1, N - XMAX = MAX( XMAX, CABS2( X( J ) ) ) - 30 CONTINUE - XBND = XMAX -* - IF( NOTRAN ) THEN -* -* Compute the growth in A * x = b. -* - IF( UPPER ) THEN - JFIRST = N - JLAST = 1 - JINC = -1 - ELSE - JFIRST = 1 - JLAST = N - JINC = 1 - END IF -* - IF( TSCAL.NE.ONE ) THEN - GROW = ZERO - GO TO 60 - END IF -* - IF( NOUNIT ) THEN -* -* A is non-unit triangular. -* -* Compute GROW = 1/G(j) and XBND = 1/M(j). -* Initially, G(0) = max{x(i), i=1,...,n}. -* - GROW = HALF / MAX( XBND, SMLNUM ) - XBND = GROW - DO 40 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 60 -* - TJJS = A( J, J ) - TJJ = CABS1( TJJS ) -* - IF( TJJ.GE.SMLNUM ) THEN -* -* M(j) = G(j-1) / abs(A(j,j)) -* - XBND = MIN( XBND, MIN( ONE, TJJ )*GROW ) - ELSE -* -* M(j) could overflow, set XBND to 0. -* - XBND = ZERO - END IF -* - IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN -* -* G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) ) -* - GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) ) - ELSE -* -* G(j) could overflow, set GROW to 0. -* - GROW = ZERO - END IF - 40 CONTINUE - GROW = XBND - ELSE -* -* A is unit triangular. -* -* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. -* - GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) ) - DO 50 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 60 -* -* G(j) = G(j-1)*( 1 + CNORM(j) ) -* - GROW = GROW*( ONE / ( ONE+CNORM( J ) ) ) - 50 CONTINUE - END IF - 60 CONTINUE -* - ELSE -* -* Compute the growth in A**T * x = b or A**H * x = b. -* - IF( UPPER ) THEN - JFIRST = 1 - JLAST = N - JINC = 1 - ELSE - JFIRST = N - JLAST = 1 - JINC = -1 - END IF -* - IF( TSCAL.NE.ONE ) THEN - GROW = ZERO - GO TO 90 - END IF -* - IF( NOUNIT ) THEN -* -* A is non-unit triangular. -* -* Compute GROW = 1/G(j) and XBND = 1/M(j). -* Initially, M(0) = max{x(i), i=1,...,n}. -* - GROW = HALF / MAX( XBND, SMLNUM ) - XBND = GROW - DO 70 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 90 -* -* G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) ) -* - XJ = ONE + CNORM( J ) - GROW = MIN( GROW, XBND / XJ ) -* - TJJS = A( J, J ) - TJJ = CABS1( TJJS ) -* - IF( TJJ.GE.SMLNUM ) THEN -* -* M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j)) -* - IF( XJ.GT.TJJ ) - $ XBND = XBND*( TJJ / XJ ) - ELSE -* -* M(j) could overflow, set XBND to 0. -* - XBND = ZERO - END IF - 70 CONTINUE - GROW = MIN( GROW, XBND ) - ELSE -* -* A is unit triangular. -* -* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. -* - GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) ) - DO 80 J = JFIRST, JLAST, JINC -* -* Exit the loop if the growth factor is too small. -* - IF( GROW.LE.SMLNUM ) - $ GO TO 90 -* -* G(j) = ( 1 + CNORM(j) )*G(j-1) -* - XJ = ONE + CNORM( J ) - GROW = GROW / XJ - 80 CONTINUE - END IF - 90 CONTINUE - END IF -* - IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN -* -* Use the Level 2 BLAS solve if the reciprocal of the bound on -* elements of X is not too small. -* - CALL ZTRSV( UPLO, TRANS, DIAG, N, A, LDA, X, 1 ) - ELSE -* -* Use a Level 1 BLAS solve, scaling intermediate results. -* - IF( XMAX.GT.BIGNUM*HALF ) THEN -* -* Scale X so that its components are less than or equal to -* BIGNUM in absolute value. -* - SCALE = ( BIGNUM*HALF ) / XMAX - CALL ZDSCAL( N, SCALE, X, 1 ) - XMAX = BIGNUM - ELSE - XMAX = XMAX*TWO - END IF -* - IF( NOTRAN ) THEN -* -* Solve A * x = b -* - DO 120 J = JFIRST, JLAST, JINC -* -* Compute x(j) = b(j) / A(j,j), scaling x if necessary. -* - XJ = CABS1( X( J ) ) - IF( NOUNIT ) THEN - TJJS = A( J, J )*TSCAL - ELSE - TJJS = TSCAL - IF( TSCAL.EQ.ONE ) - $ GO TO 110 - END IF - TJJ = CABS1( TJJS ) - IF( TJJ.GT.SMLNUM ) THEN -* -* abs(A(j,j)) > SMLNUM: -* - IF( TJJ.LT.ONE ) THEN - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale x by 1/b(j). -* - REC = ONE / XJ - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF - X( J ) = ZLADIV( X( J ), TJJS ) - XJ = CABS1( X( J ) ) - ELSE IF( TJJ.GT.ZERO ) THEN -* -* 0 < abs(A(j,j)) <= SMLNUM: -* - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM -* to avoid overflow when dividing by A(j,j). -* - REC = ( TJJ*BIGNUM ) / XJ - IF( CNORM( J ).GT.ONE ) THEN -* -* Scale by 1/CNORM(j) to avoid overflow when -* multiplying x(j) times column j. -* - REC = REC / CNORM( J ) - END IF - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - X( J ) = ZLADIV( X( J ), TJJS ) - XJ = CABS1( X( J ) ) - ELSE -* -* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and -* scale = 0, and compute a solution to A*x = 0. -* - DO 100 I = 1, N - X( I ) = ZERO - 100 CONTINUE - X( J ) = ONE - XJ = ONE - SCALE = ZERO - XMAX = ZERO - END IF - 110 CONTINUE -* -* Scale x if necessary to avoid overflow when adding a -* multiple of column j of A. -* - IF( XJ.GT.ONE ) THEN - REC = ONE / XJ - IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN -* -* Scale x by 1/(2*abs(x(j))). -* - REC = REC*HALF - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - END IF - ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN -* -* Scale x by 1/2. -* - CALL ZDSCAL( N, HALF, X, 1 ) - SCALE = SCALE*HALF - END IF -* - IF( UPPER ) THEN - IF( J.GT.1 ) THEN -* -* Compute the update -* x(1:j-1) := x(1:j-1) - x(j) * A(1:j-1,j) -* - CALL ZAXPY( J-1, -X( J )*TSCAL, A( 1, J ), 1, X, - $ 1 ) - I = IZAMAX( J-1, X, 1 ) - XMAX = CABS1( X( I ) ) - END IF - ELSE - IF( J.LT.N ) THEN -* -* Compute the update -* x(j+1:n) := x(j+1:n) - x(j) * A(j+1:n,j) -* - CALL ZAXPY( N-J, -X( J )*TSCAL, A( J+1, J ), 1, - $ X( J+1 ), 1 ) - I = J + IZAMAX( N-J, X( J+1 ), 1 ) - XMAX = CABS1( X( I ) ) - END IF - END IF - 120 CONTINUE -* - ELSE IF( LSAME( TRANS, 'T' ) ) THEN -* -* Solve A**T * x = b -* - DO 170 J = JFIRST, JLAST, JINC -* -* Compute x(j) = b(j) - sum A(k,j)*x(k). -* k<>j -* - XJ = CABS1( X( J ) ) - USCAL = TSCAL - REC = ONE / MAX( XMAX, ONE ) - IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN -* -* If x(j) could overflow, scale x by 1/(2*XMAX). -* - REC = REC*HALF - IF( NOUNIT ) THEN - TJJS = A( J, J )*TSCAL - ELSE - TJJS = TSCAL - END IF - TJJ = CABS1( TJJS ) - IF( TJJ.GT.ONE ) THEN -* -* Divide by A(j,j) when scaling x if A(j,j) > 1. -* - REC = MIN( ONE, REC*TJJ ) - USCAL = ZLADIV( USCAL, TJJS ) - END IF - IF( REC.LT.ONE ) THEN - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF -* - CSUMJ = ZERO - IF( USCAL.EQ.DCMPLX( ONE ) ) THEN -* -* If the scaling needed for A in the dot product is 1, -* call ZDOTU to perform the dot product. -* - IF( UPPER ) THEN - CSUMJ = ZDOTU( J-1, A( 1, J ), 1, X, 1 ) - ELSE IF( J.LT.N ) THEN - CSUMJ = ZDOTU( N-J, A( J+1, J ), 1, X( J+1 ), 1 ) - END IF - ELSE -* -* Otherwise, use in-line code for the dot product. -* - IF( UPPER ) THEN - DO 130 I = 1, J - 1 - CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I ) - 130 CONTINUE - ELSE IF( J.LT.N ) THEN - DO 140 I = J + 1, N - CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I ) - 140 CONTINUE - END IF - END IF -* - IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN -* -* Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j) -* was not used to scale the dotproduct. -* - X( J ) = X( J ) - CSUMJ - XJ = CABS1( X( J ) ) - IF( NOUNIT ) THEN - TJJS = A( J, J )*TSCAL - ELSE - TJJS = TSCAL - IF( TSCAL.EQ.ONE ) - $ GO TO 160 - END IF -* -* Compute x(j) = x(j) / A(j,j), scaling if necessary. -* - TJJ = CABS1( TJJS ) - IF( TJJ.GT.SMLNUM ) THEN -* -* abs(A(j,j)) > SMLNUM: -* - IF( TJJ.LT.ONE ) THEN - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale X by 1/abs(x(j)). -* - REC = ONE / XJ - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF - X( J ) = ZLADIV( X( J ), TJJS ) - ELSE IF( TJJ.GT.ZERO ) THEN -* -* 0 < abs(A(j,j)) <= SMLNUM: -* - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM. -* - REC = ( TJJ*BIGNUM ) / XJ - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - X( J ) = ZLADIV( X( J ), TJJS ) - ELSE -* -* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and -* scale = 0 and compute a solution to A**T *x = 0. -* - DO 150 I = 1, N - X( I ) = ZERO - 150 CONTINUE - X( J ) = ONE - SCALE = ZERO - XMAX = ZERO - END IF - 160 CONTINUE - ELSE -* -* Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot -* product has already been divided by 1/A(j,j). -* - X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ - END IF - XMAX = MAX( XMAX, CABS1( X( J ) ) ) - 170 CONTINUE -* - ELSE -* -* Solve A**H * x = b -* - DO 220 J = JFIRST, JLAST, JINC -* -* Compute x(j) = b(j) - sum A(k,j)*x(k). -* k<>j -* - XJ = CABS1( X( J ) ) - USCAL = TSCAL - REC = ONE / MAX( XMAX, ONE ) - IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN -* -* If x(j) could overflow, scale x by 1/(2*XMAX). -* - REC = REC*HALF - IF( NOUNIT ) THEN - TJJS = DCONJG( A( J, J ) )*TSCAL - ELSE - TJJS = TSCAL - END IF - TJJ = CABS1( TJJS ) - IF( TJJ.GT.ONE ) THEN -* -* Divide by A(j,j) when scaling x if A(j,j) > 1. -* - REC = MIN( ONE, REC*TJJ ) - USCAL = ZLADIV( USCAL, TJJS ) - END IF - IF( REC.LT.ONE ) THEN - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF -* - CSUMJ = ZERO - IF( USCAL.EQ.DCMPLX( ONE ) ) THEN -* -* If the scaling needed for A in the dot product is 1, -* call ZDOTC to perform the dot product. -* - IF( UPPER ) THEN - CSUMJ = ZDOTC( J-1, A( 1, J ), 1, X, 1 ) - ELSE IF( J.LT.N ) THEN - CSUMJ = ZDOTC( N-J, A( J+1, J ), 1, X( J+1 ), 1 ) - END IF - ELSE -* -* Otherwise, use in-line code for the dot product. -* - IF( UPPER ) THEN - DO 180 I = 1, J - 1 - CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )* - $ X( I ) - 180 CONTINUE - ELSE IF( J.LT.N ) THEN - DO 190 I = J + 1, N - CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )* - $ X( I ) - 190 CONTINUE - END IF - END IF -* - IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN -* -* Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j) -* was not used to scale the dotproduct. -* - X( J ) = X( J ) - CSUMJ - XJ = CABS1( X( J ) ) - IF( NOUNIT ) THEN - TJJS = DCONJG( A( J, J ) )*TSCAL - ELSE - TJJS = TSCAL - IF( TSCAL.EQ.ONE ) - $ GO TO 210 - END IF -* -* Compute x(j) = x(j) / A(j,j), scaling if necessary. -* - TJJ = CABS1( TJJS ) - IF( TJJ.GT.SMLNUM ) THEN -* -* abs(A(j,j)) > SMLNUM: -* - IF( TJJ.LT.ONE ) THEN - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale X by 1/abs(x(j)). -* - REC = ONE / XJ - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - END IF - X( J ) = ZLADIV( X( J ), TJJS ) - ELSE IF( TJJ.GT.ZERO ) THEN -* -* 0 < abs(A(j,j)) <= SMLNUM: -* - IF( XJ.GT.TJJ*BIGNUM ) THEN -* -* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM. -* - REC = ( TJJ*BIGNUM ) / XJ - CALL ZDSCAL( N, REC, X, 1 ) - SCALE = SCALE*REC - XMAX = XMAX*REC - END IF - X( J ) = ZLADIV( X( J ), TJJS ) - ELSE -* -* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and -* scale = 0 and compute a solution to A**H *x = 0. -* - DO 200 I = 1, N - X( I ) = ZERO - 200 CONTINUE - X( J ) = ONE - SCALE = ZERO - XMAX = ZERO - END IF - 210 CONTINUE - ELSE -* -* Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot -* product has already been divided by 1/A(j,j). -* - X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ - END IF - XMAX = MAX( XMAX, CABS1( X( J ) ) ) - 220 CONTINUE - END IF - SCALE = SCALE / TSCAL - END IF -* -* Scale the column norms by 1/TSCAL for return. -* - IF( TSCAL.NE.ONE ) THEN - CALL DSCAL( N, ONE / TSCAL, CNORM, 1 ) - END IF -* - RETURN -* -* End of ZLATRS -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/zscal.f b/cpp/nudg++/trunk/BlasLapack/zscal.f deleted file mode 100644 index 6fa8576..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zscal.f +++ /dev/null @@ -1,29 +0,0 @@ - subroutine zscal(n,za,zx,incx) -c -c scales a vector by a constant. -c jack dongarra, 3/11/78. -c modified 3/93 to return if incx .le. 0. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex za,zx(*) - integer i,incx,ix,n -c - if( n.le.0 .or. incx.le.0 )return - if(incx.eq.1)go to 20 -c -c code for increment not equal to 1 -c - ix = 1 - do 10 i = 1,n - zx(ix) = za*zx(ix) - ix = ix + incx - 10 continue - return -c -c code for increment equal to 1 -c - 20 do 30 i = 1,n - zx(i) = za*zx(i) - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/zswap.f b/cpp/nudg++/trunk/BlasLapack/zswap.f deleted file mode 100644 index f28a4e4..0000000 --- a/cpp/nudg++/trunk/BlasLapack/zswap.f +++ /dev/null @@ -1,36 +0,0 @@ - subroutine zswap (n,zx,incx,zy,incy) -c -c interchanges two vectors. -c jack dongarra, 3/11/78. -c modified 12/3/93, array(1) declarations changed to array(*) -c - double complex zx(*),zy(*),ztemp - integer i,incx,incy,ix,iy,n -c - if(n.le.0)return - if(incx.eq.1.and.incy.eq.1)go to 20 -c -c code for unequal increments or equal increments not equal -c to 1 -c - ix = 1 - iy = 1 - if(incx.lt.0)ix = (-n+1)*incx + 1 - if(incy.lt.0)iy = (-n+1)*incy + 1 - do 10 i = 1,n - ztemp = zx(ix) - zx(ix) = zy(iy) - zy(iy) = ztemp - ix = ix + incx - iy = iy + incy - 10 continue - return -c -c code for both increments equal to 1 - 20 do 30 i = 1,n - ztemp = zx(i) - zx(i) = zy(i) - zy(i) = ztemp - 30 continue - return - end diff --git a/cpp/nudg++/trunk/BlasLapack/ztrsm.f b/cpp/nudg++/trunk/BlasLapack/ztrsm.f deleted file mode 100644 index e414ec6..0000000 --- a/cpp/nudg++/trunk/BlasLapack/ztrsm.f +++ /dev/null @@ -1,414 +0,0 @@ - SUBROUTINE ZTRSM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, - $ B, LDB ) -* .. Scalar Arguments .. - CHARACTER*1 SIDE, UPLO, TRANSA, DIAG - INTEGER M, N, LDA, LDB - COMPLEX*16 ALPHA -* .. Array Arguments .. - COMPLEX*16 A( LDA, * ), B( LDB, * ) -* .. -* -* Purpose -* ======= -* -* ZTRSM solves one of the matrix equations -* -* op( A )*X = alpha*B, or X*op( A ) = alpha*B, -* -* where alpha is a scalar, X and B are m by n matrices, A is a unit, or -* non-unit, upper or lower triangular matrix and op( A ) is one of -* -* op( A ) = A or op( A ) = A' or op( A ) = conjg( A' ). -* -* The matrix X is overwritten on B. -* -* Parameters -* ========== -* -* SIDE - CHARACTER*1. -* On entry, SIDE specifies whether op( A ) appears on the left -* or right of X as follows: -* -* SIDE = 'L' or 'l' op( A )*X = alpha*B. -* -* SIDE = 'R' or 'r' X*op( A ) = alpha*B. -* -* Unchanged on exit. -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the matrix A is an upper or -* lower triangular matrix as follows: -* -* UPLO = 'U' or 'u' A is an upper triangular matrix. -* -* UPLO = 'L' or 'l' A is a lower triangular matrix. -* -* Unchanged on exit. -* -* TRANSA - CHARACTER*1. -* On entry, TRANSA specifies the form of op( A ) to be used in -* the matrix multiplication as follows: -* -* TRANSA = 'N' or 'n' op( A ) = A. -* -* TRANSA = 'T' or 't' op( A ) = A'. -* -* TRANSA = 'C' or 'c' op( A ) = conjg( A' ). -* -* Unchanged on exit. -* -* DIAG - CHARACTER*1. -* On entry, DIAG specifies whether or not A is unit triangular -* as follows: -* -* DIAG = 'U' or 'u' A is assumed to be unit triangular. -* -* DIAG = 'N' or 'n' A is not assumed to be unit -* triangular. -* -* Unchanged on exit. -* -* M - INTEGER. -* On entry, M specifies the number of rows of B. M must be at -* least zero. -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the number of columns of B. N must be -* at least zero. -* Unchanged on exit. -* -* ALPHA - COMPLEX*16 . -* On entry, ALPHA specifies the scalar alpha. When alpha is -* zero then A is not referenced and B need not be set before -* entry. -* Unchanged on exit. -* -* A - COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m -* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. -* Before entry with UPLO = 'U' or 'u', the leading k by k -* upper triangular part of the array A must contain the upper -* triangular matrix and the strictly lower triangular part of -* A is not referenced. -* Before entry with UPLO = 'L' or 'l', the leading k by k -* lower triangular part of the array A must contain the lower -* triangular matrix and the strictly upper triangular part of -* A is not referenced. -* Note that when DIAG = 'U' or 'u', the diagonal elements of -* A are not referenced either, but are assumed to be unity. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. When SIDE = 'L' or 'l' then -* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' -* then LDA must be at least max( 1, n ). -* Unchanged on exit. -* -* B - COMPLEX*16 array of DIMENSION ( LDB, n ). -* Before entry, the leading m by n part of the array B must -* contain the right-hand side matrix B, and on exit is -* overwritten by the solution matrix X. -* -* LDB - INTEGER. -* On entry, LDB specifies the first dimension of B as declared -* in the calling (sub) program. LDB must be at least -* max( 1, m ). -* Unchanged on exit. -* -* -* Level 3 Blas routine. -* -* -- Written on 8-February-1989. -* Jack Dongarra, Argonne National Laboratory. -* Iain Duff, AERE Harwell. -* Jeremy Du Croz, Numerical Algorithms Group Ltd. -* Sven Hammarling, Numerical Algorithms Group Ltd. -* -* -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC DCONJG, MAX -* .. Local Scalars .. - LOGICAL LSIDE, NOCONJ, NOUNIT, UPPER - INTEGER I, INFO, J, K, NROWA - COMPLEX*16 TEMP -* .. Parameters .. - COMPLEX*16 ONE - PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) - COMPLEX*16 ZERO - PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - LSIDE = LSAME( SIDE , 'L' ) - IF( LSIDE )THEN - NROWA = M - ELSE - NROWA = N - END IF - NOCONJ = LSAME( TRANSA, 'T' ) - NOUNIT = LSAME( DIAG , 'N' ) - UPPER = LSAME( UPLO , 'U' ) -* - INFO = 0 - IF( ( .NOT.LSIDE ).AND. - $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN - INFO = 1 - ELSE IF( ( .NOT.UPPER ).AND. - $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN - INFO = 2 - ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. - $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. - $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN - INFO = 3 - ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. - $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN - INFO = 4 - ELSE IF( M .LT.0 )THEN - INFO = 5 - ELSE IF( N .LT.0 )THEN - INFO = 6 - ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN - INFO = 9 - ELSE IF( LDB.LT.MAX( 1, M ) )THEN - INFO = 11 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'ZTRSM ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* -* And when alpha.eq.zero. -* - IF( ALPHA.EQ.ZERO )THEN - DO 20, J = 1, N - DO 10, I = 1, M - B( I, J ) = ZERO - 10 CONTINUE - 20 CONTINUE - RETURN - END IF -* -* Start the operations. -* - IF( LSIDE )THEN - IF( LSAME( TRANSA, 'N' ) )THEN -* -* Form B := alpha*inv( A )*B. -* - IF( UPPER )THEN - DO 60, J = 1, N - IF( ALPHA.NE.ONE )THEN - DO 30, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 30 CONTINUE - END IF - DO 50, K = M, 1, -1 - IF( B( K, J ).NE.ZERO )THEN - IF( NOUNIT ) - $ B( K, J ) = B( K, J )/A( K, K ) - DO 40, I = 1, K - 1 - B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) - 40 CONTINUE - END IF - 50 CONTINUE - 60 CONTINUE - ELSE - DO 100, J = 1, N - IF( ALPHA.NE.ONE )THEN - DO 70, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 70 CONTINUE - END IF - DO 90 K = 1, M - IF( B( K, J ).NE.ZERO )THEN - IF( NOUNIT ) - $ B( K, J ) = B( K, J )/A( K, K ) - DO 80, I = K + 1, M - B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) - 80 CONTINUE - END IF - 90 CONTINUE - 100 CONTINUE - END IF - ELSE -* -* Form B := alpha*inv( A' )*B -* or B := alpha*inv( conjg( A' ) )*B. -* - IF( UPPER )THEN - DO 140, J = 1, N - DO 130, I = 1, M - TEMP = ALPHA*B( I, J ) - IF( NOCONJ )THEN - DO 110, K = 1, I - 1 - TEMP = TEMP - A( K, I )*B( K, J ) - 110 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( I, I ) - ELSE - DO 120, K = 1, I - 1 - TEMP = TEMP - DCONJG( A( K, I ) )*B( K, J ) - 120 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/DCONJG( A( I, I ) ) - END IF - B( I, J ) = TEMP - 130 CONTINUE - 140 CONTINUE - ELSE - DO 180, J = 1, N - DO 170, I = M, 1, -1 - TEMP = ALPHA*B( I, J ) - IF( NOCONJ )THEN - DO 150, K = I + 1, M - TEMP = TEMP - A( K, I )*B( K, J ) - 150 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( I, I ) - ELSE - DO 160, K = I + 1, M - TEMP = TEMP - DCONJG( A( K, I ) )*B( K, J ) - 160 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/DCONJG( A( I, I ) ) - END IF - B( I, J ) = TEMP - 170 CONTINUE - 180 CONTINUE - END IF - END IF - ELSE - IF( LSAME( TRANSA, 'N' ) )THEN -* -* Form B := alpha*B*inv( A ). -* - IF( UPPER )THEN - DO 230, J = 1, N - IF( ALPHA.NE.ONE )THEN - DO 190, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 190 CONTINUE - END IF - DO 210, K = 1, J - 1 - IF( A( K, J ).NE.ZERO )THEN - DO 200, I = 1, M - B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) - 200 CONTINUE - END IF - 210 CONTINUE - IF( NOUNIT )THEN - TEMP = ONE/A( J, J ) - DO 220, I = 1, M - B( I, J ) = TEMP*B( I, J ) - 220 CONTINUE - END IF - 230 CONTINUE - ELSE - DO 280, J = N, 1, -1 - IF( ALPHA.NE.ONE )THEN - DO 240, I = 1, M - B( I, J ) = ALPHA*B( I, J ) - 240 CONTINUE - END IF - DO 260, K = J + 1, N - IF( A( K, J ).NE.ZERO )THEN - DO 250, I = 1, M - B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) - 250 CONTINUE - END IF - 260 CONTINUE - IF( NOUNIT )THEN - TEMP = ONE/A( J, J ) - DO 270, I = 1, M - B( I, J ) = TEMP*B( I, J ) - 270 CONTINUE - END IF - 280 CONTINUE - END IF - ELSE -* -* Form B := alpha*B*inv( A' ) -* or B := alpha*B*inv( conjg( A' ) ). -* - IF( UPPER )THEN - DO 330, K = N, 1, -1 - IF( NOUNIT )THEN - IF( NOCONJ )THEN - TEMP = ONE/A( K, K ) - ELSE - TEMP = ONE/DCONJG( A( K, K ) ) - END IF - DO 290, I = 1, M - B( I, K ) = TEMP*B( I, K ) - 290 CONTINUE - END IF - DO 310, J = 1, K - 1 - IF( A( J, K ).NE.ZERO )THEN - IF( NOCONJ )THEN - TEMP = A( J, K ) - ELSE - TEMP = DCONJG( A( J, K ) ) - END IF - DO 300, I = 1, M - B( I, J ) = B( I, J ) - TEMP*B( I, K ) - 300 CONTINUE - END IF - 310 CONTINUE - IF( ALPHA.NE.ONE )THEN - DO 320, I = 1, M - B( I, K ) = ALPHA*B( I, K ) - 320 CONTINUE - END IF - 330 CONTINUE - ELSE - DO 380, K = 1, N - IF( NOUNIT )THEN - IF( NOCONJ )THEN - TEMP = ONE/A( K, K ) - ELSE - TEMP = ONE/DCONJG( A( K, K ) ) - END IF - DO 340, I = 1, M - B( I, K ) = TEMP*B( I, K ) - 340 CONTINUE - END IF - DO 360, J = K + 1, N - IF( A( J, K ).NE.ZERO )THEN - IF( NOCONJ )THEN - TEMP = A( J, K ) - ELSE - TEMP = DCONJG( A( J, K ) ) - END IF - DO 350, I = 1, M - B( I, J ) = B( I, J ) - TEMP*B( I, K ) - 350 CONTINUE - END IF - 360 CONTINUE - IF( ALPHA.NE.ONE )THEN - DO 370, I = 1, M - B( I, K ) = ALPHA*B( I, K ) - 370 CONTINUE - END IF - 380 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of ZTRSM . -* - END diff --git a/cpp/nudg++/trunk/BlasLapack/ztrsv.f b/cpp/nudg++/trunk/BlasLapack/ztrsv.f deleted file mode 100644 index d0a57c4..0000000 --- a/cpp/nudg++/trunk/BlasLapack/ztrsv.f +++ /dev/null @@ -1,324 +0,0 @@ - SUBROUTINE ZTRSV ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) -* .. Scalar Arguments .. - INTEGER INCX, LDA, N - CHARACTER*1 DIAG, TRANS, UPLO -* .. Array Arguments .. - COMPLEX*16 A( LDA, * ), X( * ) -* .. -* -* Purpose -* ======= -* -* ZTRSV solves one of the systems of equations -* -* A*x = b, or A'*x = b, or conjg( A' )*x = b, -* -* where b and x are n element vectors and A is an n by n unit, or -* non-unit, upper or lower triangular matrix. -* -* No test for singularity or near-singularity is included in this -* routine. Such tests must be performed before calling this routine. -* -* Parameters -* ========== -* -* UPLO - CHARACTER*1. -* On entry, UPLO specifies whether the matrix is an upper or -* lower triangular matrix as follows: -* -* UPLO = 'U' or 'u' A is an upper triangular matrix. -* -* UPLO = 'L' or 'l' A is a lower triangular matrix. -* -* Unchanged on exit. -* -* TRANS - CHARACTER*1. -* On entry, TRANS specifies the equations to be solved as -* follows: -* -* TRANS = 'N' or 'n' A*x = b. -* -* TRANS = 'T' or 't' A'*x = b. -* -* TRANS = 'C' or 'c' conjg( A' )*x = b. -* -* Unchanged on exit. -* -* DIAG - CHARACTER*1. -* On entry, DIAG specifies whether or not A is unit -* triangular as follows: -* -* DIAG = 'U' or 'u' A is assumed to be unit triangular. -* -* DIAG = 'N' or 'n' A is not assumed to be unit -* triangular. -* -* Unchanged on exit. -* -* N - INTEGER. -* On entry, N specifies the order of the matrix A. -* N must be at least zero. -* Unchanged on exit. -* -* A - COMPLEX*16 array of DIMENSION ( LDA, n ). -* Before entry with UPLO = 'U' or 'u', the leading n by n -* upper triangular part of the array A must contain the upper -* triangular matrix and the strictly lower triangular part of -* A is not referenced. -* Before entry with UPLO = 'L' or 'l', the leading n by n -* lower triangular part of the array A must contain the lower -* triangular matrix and the strictly upper triangular part of -* A is not referenced. -* Note that when DIAG = 'U' or 'u', the diagonal elements of -* A are not referenced either, but are assumed to be unity. -* Unchanged on exit. -* -* LDA - INTEGER. -* On entry, LDA specifies the first dimension of A as declared -* in the calling (sub) program. LDA must be at least -* max( 1, n ). -* Unchanged on exit. -* -* X - COMPLEX*16 array of dimension at least -* ( 1 + ( n - 1 )*abs( INCX ) ). -* Before entry, the incremented array X must contain the n -* element right-hand side vector b. On exit, X is overwritten -* with the solution vector x. -* -* INCX - INTEGER. -* On entry, INCX specifies the increment for the elements of -* X. INCX must not be zero. -* Unchanged on exit. -* -* -* Level 2 Blas routine. -* -* -- Written on 22-October-1986. -* Jack Dongarra, Argonne National Lab. -* Jeremy Du Croz, Nag Central Office. -* Sven Hammarling, Nag Central Office. -* Richard Hanson, Sandia National Labs. -* -* -* .. Parameters .. - COMPLEX*16 ZERO - PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) -* .. Local Scalars .. - COMPLEX*16 TEMP - INTEGER I, INFO, IX, J, JX, KX - LOGICAL NOCONJ, NOUNIT -* .. External Functions .. - LOGICAL LSAME - EXTERNAL LSAME -* .. External Subroutines .. - EXTERNAL XERBLA -* .. Intrinsic Functions .. - INTRINSIC DCONJG, MAX -* .. -* .. Executable Statements .. -* -* Test the input parameters. -* - INFO = 0 - IF ( .NOT.LSAME( UPLO , 'U' ).AND. - $ .NOT.LSAME( UPLO , 'L' ) )THEN - INFO = 1 - ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. - $ .NOT.LSAME( TRANS, 'T' ).AND. - $ .NOT.LSAME( TRANS, 'C' ) )THEN - INFO = 2 - ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. - $ .NOT.LSAME( DIAG , 'N' ) )THEN - INFO = 3 - ELSE IF( N.LT.0 )THEN - INFO = 4 - ELSE IF( LDA.LT.MAX( 1, N ) )THEN - INFO = 6 - ELSE IF( INCX.EQ.0 )THEN - INFO = 8 - END IF - IF( INFO.NE.0 )THEN - CALL XERBLA( 'ZTRSV ', INFO ) - RETURN - END IF -* -* Quick return if possible. -* - IF( N.EQ.0 ) - $ RETURN -* - NOCONJ = LSAME( TRANS, 'T' ) - NOUNIT = LSAME( DIAG , 'N' ) -* -* Set up the start point in X if the increment is not unity. This -* will be ( N - 1 )*INCX too small for descending loops. -* - IF( INCX.LE.0 )THEN - KX = 1 - ( N - 1 )*INCX - ELSE IF( INCX.NE.1 )THEN - KX = 1 - END IF -* -* Start the operations. In this version the elements of A are -* accessed sequentially with one pass through A. -* - IF( LSAME( TRANS, 'N' ) )THEN -* -* Form x := inv( A )*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - IF( INCX.EQ.1 )THEN - DO 20, J = N, 1, -1 - IF( X( J ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( J ) = X( J )/A( J, J ) - TEMP = X( J ) - DO 10, I = J - 1, 1, -1 - X( I ) = X( I ) - TEMP*A( I, J ) - 10 CONTINUE - END IF - 20 CONTINUE - ELSE - JX = KX + ( N - 1 )*INCX - DO 40, J = N, 1, -1 - IF( X( JX ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( JX ) = X( JX )/A( J, J ) - TEMP = X( JX ) - IX = JX - DO 30, I = J - 1, 1, -1 - IX = IX - INCX - X( IX ) = X( IX ) - TEMP*A( I, J ) - 30 CONTINUE - END IF - JX = JX - INCX - 40 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 60, J = 1, N - IF( X( J ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( J ) = X( J )/A( J, J ) - TEMP = X( J ) - DO 50, I = J + 1, N - X( I ) = X( I ) - TEMP*A( I, J ) - 50 CONTINUE - END IF - 60 CONTINUE - ELSE - JX = KX - DO 80, J = 1, N - IF( X( JX ).NE.ZERO )THEN - IF( NOUNIT ) - $ X( JX ) = X( JX )/A( J, J ) - TEMP = X( JX ) - IX = JX - DO 70, I = J + 1, N - IX = IX + INCX - X( IX ) = X( IX ) - TEMP*A( I, J ) - 70 CONTINUE - END IF - JX = JX + INCX - 80 CONTINUE - END IF - END IF - ELSE -* -* Form x := inv( A' )*x or x := inv( conjg( A' ) )*x. -* - IF( LSAME( UPLO, 'U' ) )THEN - IF( INCX.EQ.1 )THEN - DO 110, J = 1, N - TEMP = X( J ) - IF( NOCONJ )THEN - DO 90, I = 1, J - 1 - TEMP = TEMP - A( I, J )*X( I ) - 90 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - ELSE - DO 100, I = 1, J - 1 - TEMP = TEMP - DCONJG( A( I, J ) )*X( I ) - 100 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/DCONJG( A( J, J ) ) - END IF - X( J ) = TEMP - 110 CONTINUE - ELSE - JX = KX - DO 140, J = 1, N - IX = KX - TEMP = X( JX ) - IF( NOCONJ )THEN - DO 120, I = 1, J - 1 - TEMP = TEMP - A( I, J )*X( IX ) - IX = IX + INCX - 120 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - ELSE - DO 130, I = 1, J - 1 - TEMP = TEMP - DCONJG( A( I, J ) )*X( IX ) - IX = IX + INCX - 130 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/DCONJG( A( J, J ) ) - END IF - X( JX ) = TEMP - JX = JX + INCX - 140 CONTINUE - END IF - ELSE - IF( INCX.EQ.1 )THEN - DO 170, J = N, 1, -1 - TEMP = X( J ) - IF( NOCONJ )THEN - DO 150, I = N, J + 1, -1 - TEMP = TEMP - A( I, J )*X( I ) - 150 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - ELSE - DO 160, I = N, J + 1, -1 - TEMP = TEMP - DCONJG( A( I, J ) )*X( I ) - 160 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/DCONJG( A( J, J ) ) - END IF - X( J ) = TEMP - 170 CONTINUE - ELSE - KX = KX + ( N - 1 )*INCX - JX = KX - DO 200, J = N, 1, -1 - IX = KX - TEMP = X( JX ) - IF( NOCONJ )THEN - DO 180, I = N, J + 1, -1 - TEMP = TEMP - A( I, J )*X( IX ) - IX = IX - INCX - 180 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/A( J, J ) - ELSE - DO 190, I = N, J + 1, -1 - TEMP = TEMP - DCONJG( A( I, J ) )*X( IX ) - IX = IX - INCX - 190 CONTINUE - IF( NOUNIT ) - $ TEMP = TEMP/DCONJG( A( J, J ) ) - END IF - X( JX ) = TEMP - JX = JX - INCX - 200 CONTINUE - END IF - END IF - END IF -* - RETURN -* -* End of ZTRSV . -* - END diff --git a/cpp/nudg++/trunk/Grid/3D/F072.neu b/cpp/nudg++/trunk/Grid/3D/F072.neu deleted file mode 100644 index 6e02b5b..0000000 --- a/cpp/nudg++/trunk/Grid/3D/F072.neu +++ /dev/null @@ -1,186 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -Sledge++ 3D mesh file, generated by GRUMMP v0.3.0: -vWriteFile_VolMesh_Neu( D:/__TW_HIDE/SVN/trunk/Examples/Experimental/GUI/Demo/Bdry/test/F13_01 ) -Sledge++ mesh generator module, Sept 2005 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 32 72 1 1 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -1.0000000000e+000 -1.0000000000e+000 1.0000000000e+000 - 2 -1.0000000000e+000 -1.0000000000e+000 0.0000000000e+000 - 3 5.4213934109e-001 -4.5788434093e-001 3.1151508327e-001 - 4 0.0000000000e+000 -1.0000000000e+000 0.0000000000e+000 - 5 -1.0000000000e+000 0.0000000000e+000 1.0000000000e+000 - 6 -1.0000000000e+000 0.0000000000e+000 0.0000000000e+000 - 7 0.0000000000e+000 -5.0000000000e-001 -5.0000000000e-001 - 8 4.9883692752e-001 -1.0000000000e+000 -6.1871188755e-001 - 9 1.0000000000e+000 -1.0000000000e+000 0.0000000000e+000 - 10 0.0000000000e+000 -1.0000000000e+000 1.0000000000e+000 - 11 1.0000000000e+000 -1.0000000000e+000 1.0000000000e+000 - 12 0.0000000000e+000 -1.0000000000e+000 -1.0000000000e+000 - 13 -5.0000000000e-001 0.0000000000e+000 -5.0000000000e-001 - 14 -1.0000000000e+000 1.0000000000e+000 1.0000000000e+000 - 15 0.0000000000e+000 0.0000000000e+000 0.0000000000e+000 - 16 -4.0495657274e-001 4.3398602602e-001 -5.6601397398e-001 - 17 4.5040636913e-001 9.1266213338e-002 -5.1075464744e-001 - 18 0.0000000000e+000 0.0000000000e+000 -1.0000000000e+000 - 19 1.0000000000e+000 8.7061901850e-002 1.8038330930e-001 - 20 -2.4089572359e-001 1.0000000000e+000 1.9389639762e-001 - 21 0.0000000000e+000 0.0000000000e+000 1.0000000000e+000 - 22 1.0000000000e+000 -3.6055224425e-001 -3.9144582417e-001 - 23 -1.0000000000e+000 1.0000000000e+000 0.0000000000e+000 - 24 5.0009979922e-001 -5.0669729411e-001 -1.0000000000e+000 - 25 -1.0000000000e+000 0.0000000000e+000 -1.0000000000e+000 - 26 1.0000000000e+000 1.0000000000e+000 1.0000000000e+000 - 27 1.0000000000e+000 -1.0000000000e+000 -1.0000000000e+000 - 28 -1.0000000000e+000 1.0000000000e+000 -1.0000000000e+000 - 29 0.0000000000e+000 1.0000000000e+000 -1.0000000000e+000 - 30 1.0000000000e+000 1.0000000000e+000 0.0000000000e+000 - 31 1.0000000000e+000 0.0000000000e+000 -1.0000000000e+000 - 32 1.0000000000e+000 1.0000000000e+000 -1.0000000000e+000 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 6 4 2 1 4 5 - 2 6 4 4 6 2 5 - 3 6 4 10 4 1 5 - 4 6 4 3 4 7 8 - 5 6 4 3 9 4 8 - 6 6 4 4 10 9 3 - 7 6 4 4 15 6 5 - 8 6 4 7 4 12 8 - 9 6 4 4 7 15 3 - 10 6 4 10 15 4 5 - 11 6 4 10 11 9 3 - 12 6 4 10 4 15 3 - 13 6 4 8 7 3 22 - 14 6 4 8 3 9 22 - 15 6 4 3 7 15 17 - 16 6 4 19 9 11 3 - 17 6 4 20 5 6 15 - 18 6 4 11 10 21 3 - 19 6 4 17 3 7 22 - 20 6 4 16 15 6 13 - 21 6 4 10 21 15 5 - 22 6 4 24 7 12 8 - 23 6 4 10 15 21 3 - 24 6 4 3 19 9 22 - 25 6 4 20 6 5 23 - 26 6 4 3 15 19 17 - 27 6 4 19 11 21 3 - 28 6 4 20 6 16 15 - 29 6 4 7 18 15 17 - 30 6 4 19 21 15 3 - 31 6 4 17 19 3 22 - 32 6 4 8 24 7 22 - 33 6 4 16 18 15 13 - 34 6 4 16 6 25 13 - 35 6 4 20 21 14 5 - 36 6 4 20 15 21 5 - 37 6 4 14 23 20 5 - 38 6 4 18 7 12 24 - 39 6 4 8 9 27 22 - 40 6 4 20 16 6 23 - 41 6 4 17 18 15 16 - 42 6 4 17 7 18 24 - 43 6 4 24 17 7 22 - 44 6 4 23 6 25 16 - 45 6 4 27 24 12 8 - 46 6 4 16 25 18 13 - 47 6 4 11 21 26 19 - 48 6 4 30 15 16 17 - 49 6 4 8 27 24 22 - 50 6 4 17 15 19 30 - 51 6 4 26 21 14 20 - 52 6 4 30 16 15 20 - 53 6 4 17 29 18 16 - 54 6 4 20 21 15 30 - 55 6 4 19 15 21 30 - 56 6 4 17 31 19 22 - 57 6 4 23 29 20 16 - 58 6 4 29 25 18 16 - 59 6 4 17 18 31 24 - 60 6 4 24 31 17 22 - 61 6 4 30 29 16 20 - 62 6 4 23 25 28 16 - 63 6 4 30 16 29 17 - 64 6 4 31 29 18 17 - 65 6 4 20 26 21 30 - 66 6 4 17 19 31 30 - 67 6 4 19 21 26 30 - 68 6 4 23 28 29 16 - 69 6 4 25 29 28 16 - 70 6 4 24 27 31 22 - 71 6 4 30 31 17 29 - 72 6 4 31 30 32 29 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 72 MATERIAL: 1.000 NFLAGS: 0 - FLUID - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Diri 1 54 0 0 - 51 6 1 - 47 6 1 - 8 6 1 - 38 6 1 - 56 6 3 - 24 6 3 - 70 6 3 - 39 6 3 - 20 6 3 - 34 6 3 - 2 6 1 - 7 6 1 - 33 6 3 - 46 6 3 - 21 6 2 - 37 6 2 - 35 6 3 - 3 6 4 - 25 6 3 - 1 6 2 - 2 6 3 - 61 6 2 - 66 6 3 - 65 6 2 - 29 6 1 - 9 6 1 - 67 6 4 - 72 6 3 - 72 6 1 - 57 6 1 - 37 6 1 - 47 6 4 - 68 6 1 - 44 6 1 - 62 6 1 - 51 6 4 - 5 6 3 - 8 6 3 - 39 6 1 - 45 6 4 - 16 6 1 - 59 6 3 - 38 6 4 - 70 6 1 - 45 6 1 - 72 6 4 - 69 6 1 - 1 6 1 - 6 6 1 - 3 6 1 - 18 6 1 - 11 6 1 - 64 6 1 - 58 6 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/F986.neu b/cpp/nudg++/trunk/Grid/3D/F986.neu deleted file mode 100644 index 928b0b9..0000000 --- a/cpp/nudg++/trunk/Grid/3D/F986.neu +++ /dev/null @@ -1,1685 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -Sledge++ 3D mesh file, generated by GRUMMP v0.3.0: -vWriteFile_VolMesh_Neu( D:/__TW_HIDE/SVN/trunk/Examples/Experimental/GUI/Demo/Bdry/test/F13_04 ) -Sledge++ mesh generator module, Sept 2005 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 258 986 1 1 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -1.0000000000e+000 0.0000000000e+000 0.0000000000e+000 - 2 -1.0000000000e+000 1.0000000000e+000 1.0000000000e+000 - 3 -1.0000000000e+000 3.6704111252e-001 4.7075541403e-001 - 4 -8.5000000000e-001 1.8350958827e-001 -8.3509588268e-002 - 5 -7.8730867647e-001 1.3376317711e-001 1.7086912832e-001 - 6 -1.0000000000e+000 9.8444876000e-002 1.2111044828e-001 - 7 -7.0000000000e-001 0.0000000000e+000 0.0000000000e+000 - 8 -8.7500000000e-001 0.0000000000e+000 0.0000000000e+000 - 9 -8.5000000000e-001 0.0000000000e+000 -1.2500000000e-001 - 10 -6.1924725966e-001 -6.9329723522e-001 0.0000000000e+000 - 11 -1.0000000000e+000 3.4418969394e-001 3.5005832366e-002 - 12 -1.0000000000e+000 2.9722222222e-001 -2.5000000000e-001 - 13 -7.1842105263e-001 -2.9736842105e-001 0.0000000000e+000 - 14 -1.0000000000e+000 -2.0000000000e-001 0.0000000000e+000 - 15 -1.0000000000e+000 -1.0000000000e+000 5.0000000000e-001 - 16 -1.0000000000e+000 -1.9153391914e-001 2.5991282180e-001 - 17 -1.0000000000e+000 -7.5000000000e-001 0.0000000000e+000 - 18 -1.0000000000e+000 -9.7705998021e-002 1.2138098670e-001 - 19 -1.0000000000e+000 0.0000000000e+000 -2.5000000000e-001 - 20 -1.0000000000e+000 1.4861111111e-001 -1.2500000000e-001 - 21 -1.0000000000e+000 1.0000000000e+000 3.0000000000e-001 - 22 -5.0000000000e-001 1.0000000000e+000 1.0000000000e+000 - 23 -1.0000000000e+000 -5.0000000000e-001 0.0000000000e+000 - 24 -8.1801959345e-001 -1.4989382996e-001 0.0000000000e+000 - 25 -1.0000000000e+000 0.0000000000e+000 -5.0000000000e-001 - 26 -7.5000000000e-001 -1.0000000000e+000 0.0000000000e+000 - 27 -1.0000000000e+000 5.0000000000e-001 1.0000000000e+000 - 28 -1.0000000000e+000 -1.0000000000e+000 0.0000000000e+000 - 29 -1.0000000000e+000 0.0000000000e+000 -1.0000000000e+000 - 30 -6.9534656520e-001 -3.2679447771e-001 1.9901202073e-001 - 31 -5.7157549849e-001 -7.5670769016e-001 3.3500692375e-001 - 32 -5.9985082597e-001 1.5379355812e-001 -1.6338008819e-001 - 33 -5.0000000000e-001 0.0000000000e+000 0.0000000000e+000 - 34 -5.5798248076e-001 0.0000000000e+000 -5.8655606354e-001 - 35 -1.7186080495e-001 -1.0042438032e-001 1.0331779576e-001 - 36 -7.5957739530e-001 -8.4425713459e-002 2.0610300273e-001 - 37 -1.4741615576e-001 8.7071312845e-002 1.7184998145e-001 - 38 -5.8276697146e-001 4.3255295714e-001 3.8857356368e-001 - 39 -2.9834344714e-001 1.9951979555e-001 3.2684419205e-002 - 40 -5.8791640776e-001 3.3394954665e-001 4.1303081331e-002 - 41 -6.0420974194e-001 1.9064004990e-001 3.5413049903e-001 - 42 -1.0000000000e-001 0.0000000000e+000 0.0000000000e+000 - 43 -3.8269375419e-001 2.1531745589e-001 6.4446732582e-001 - 44 -2.2627426039e-001 2.4699223179e-001 3.6926470454e-001 - 45 -1.9005212577e-001 1.0000000000e+000 5.6454759759e-001 - 46 -7.8569789389e-001 1.4000892487e-001 -3.1767990353e-001 - 47 -7.0199773600e-001 -1.0000000000e+000 1.6727513217e-001 - 48 -5.1836334452e-001 1.0000000000e+000 7.6593499180e-003 - 49 -2.9019202789e-001 9.9978728947e-002 -8.3299276315e-002 - 50 -7.3091526811e-001 4.0595318936e-001 -2.2852017420e-001 - 51 -1.5091181433e-001 1.3527474029e-001 1.0993957840e-002 - 52 -3.5000000000e-001 0.0000000000e+000 0.0000000000e+000 - 53 -1.0000000000e+000 -4.3785934988e-001 5.1916282027e-001 - 54 -1.0000000000e+000 6.5404954120e-001 -3.7985158752e-002 - 55 -1.0000000000e+000 5.9804014863e-001 -5.7108029726e-001 - 56 -4.0954526171e-001 0.0000000000e+000 -1.9890016691e-001 - 57 -4.7139246835e-001 -5.3410543682e-001 6.8453825330e-019 - 58 -1.0000000000e+000 -6.7627586318e-002 5.5461961077e-001 - 59 -5.0000000000e-002 9.6069798626e-002 -5.0000000000e-002 - 60 -4.9946544935e-001 -8.2057240220e-001 0.0000000000e+000 - 61 0.0000000000e+000 0.0000000000e+000 0.0000000000e+000 - 62 -2.0000000000e-001 0.0000000000e+000 0.0000000000e+000 - 63 -3.4105877479e-001 -1.5028822670e-001 1.6204170394e-018 - 64 -5.0000000000e-002 7.5657514451e-002 8.7145953757e-002 - 65 -5.0000000000e-002 -5.0000000000e-002 9.2500000000e-002 - 66 -2.8062017494e-001 8.8100683842e-003 1.3138087310e-001 - 67 -4.5627919612e-001 5.3173098644e-001 1.0000000000e+000 - 68 -3.7666666667e-001 0.0000000000e+000 -4.5333333333e-001 - 69 -4.2362319051e-001 1.2990954409e-001 1.6828703339e-001 - 70 -6.1153344493e-001 -1.0000000000e+000 6.7471594373e-001 - 71 -1.0000000000e+000 -5.0000000000e-001 1.0000000000e+000 - 72 -1.0000000000e+000 0.0000000000e+000 1.0000000000e+000 - 73 -2.0000000000e-001 -2.0000000000e-001 0.0000000000e+000 - 74 -1.5000000000e-001 0.0000000000e+000 -1.5000000000e-001 - 75 -1.0000000000e+000 1.0000000000e+000 -7.5000000000e-001 - 76 0.0000000000e+000 1.0000000000e+000 1.0000000000e+000 - 77 -1.5000000000e-001 -1.0000000000e-001 0.0000000000e+000 - 78 -5.6355830567e-001 0.0000000000e+000 -3.8726069226e-001 - 79 -5.1789356979e-001 -3.1895514995e-001 -1.1277532516e-017 - 80 -1.0000000000e+000 5.0000000000e-001 -1.0000000000e+000 - 81 -6.2373835589e-001 1.0000000000e+000 -6.2247671179e-001 - 82 -3.6033903166e-001 -3.8939698395e-001 0.0000000000e+000 - 83 -3.7585728531e-001 -1.0000000000e+000 2.3721710912e-001 - 84 -5.0000000000e-001 0.0000000000e+000 -1.0000000000e+000 - 85 -1.0000000000e+000 1.0000000000e+000 -3.0000000000e-001 - 86 -5.0000000000e-001 -1.0000000000e+000 0.0000000000e+000 - 87 5.0000000000e-001 1.0000000000e+000 1.0000000000e+000 - 88 1.0000000000e+000 1.0000000000e+000 1.0000000000e+000 - 89 -1.0000000000e+000 -1.0000000000e+000 1.0000000000e+000 - 90 -1.0000000000e+000 1.0000000000e+000 -1.0000000000e+000 - 91 -2.6326340898e-001 4.4987683984e-001 -1.4379274190e-001 - 92 -2.9086179851e-001 -1.4826454178e-001 2.4365071651e-001 - 93 -4.1191710204e-001 2.7485466149e-001 -4.9590750380e-001 - 94 2.0722486891e-001 2.5716283737e-001 5.2886160208e-001 - 95 -3.1361539777e-001 -4.0323206455e-001 1.7440029116e-001 - 96 -2.6154654101e-002 3.1395653858e-001 1.9610355293e-001 - 97 -1.4895273355e-001 1.1807928703e-001 -1.3524553645e-001 - 98 -5.8697669921e-001 -1.8319234861e-001 5.3917924794e-001 - 99 -4.3780776598e-001 4.3780878788e-001 -1.0000000000e+000 - 100 -4.1301157991e-002 2.6332820440e-001 -8.0976376504e-002 - 101 -4.2327586946e-002 -1.7741273701e-001 1.4209538055e-001 - 102 0.0000000000e+000 0.0000000000e+000 1.0000000000e+000 - 103 -2.2741274153e-001 -6.5609337338e-001 3.2290474471e-001 - 104 -1.8728290442e-001 -8.7181546351e-002 5.0064767440e-001 - 105 -6.1755166095e-001 5.6582489674e-001 -5.5599331469e-001 - 106 -3.1719400467e-001 2.2459337613e-001 -7.8015378564e-001 - 107 1.2244246702e-001 5.9761885061e-002 1.2244246702e-001 - 108 0.0000000000e+000 0.0000000000e+000 -2.0000000000e-001 - 109 -3.4085246110e-001 -8.1857258879e-001 1.5510694428e-001 - 110 0.0000000000e+000 0.0000000000e+000 -1.0000000000e-001 - 111 5.0000000000e-001 5.0000000000e-001 1.0000000000e+000 - 112 -3.5123181226e-002 -2.3124284826e-002 2.5739869790e-001 - 113 0.0000000000e+000 -1.0000000000e-001 0.0000000000e+000 - 114 -9.7023899384e-002 -1.0000000000e+000 2.3977596475e-001 - 115 -2.2196589662e-001 1.0000000000e+000 -5.1781288936e-001 - 116 -7.5000000000e-002 1.7500000000e-001 -8.5000000000e-001 - 117 -4.1438066669e-001 -5.7030170486e-001 1.0000000000e+000 - 118 -2.1786170797e-001 0.0000000000e+000 -2.3511994870e-001 - 119 -4.5915634147e-002 -8.5000000000e-001 1.4591563415e-001 - 120 2.7847803306e-001 4.6730445714e-001 2.8930800465e-002 - 121 0.0000000000e+000 -2.0000000000e-001 0.0000000000e+000 - 122 2.4580111870e-002 1.1287323230e-001 -1.5000000000e-001 - 123 9.9947126364e-002 1.0005287364e-001 -5.0000000000e-002 - 124 -1.5000000000e-001 1.1740038706e-001 -4.5000000000e-001 - 125 -2.7386285490e-001 -6.1625085475e-001 0.0000000000e+000 - 126 -3.3150721563e-001 -1.0000000000e+000 5.1348404489e-001 - 127 -2.5795075995e-001 1.7060718650e-001 -2.7054944503e-001 - 128 1.6976705093e-001 1.0000000000e+000 3.2373294887e-001 - 129 -1.9538155915e-001 0.0000000000e+000 -6.1520537667e-001 - 130 -1.2500000000e-001 0.0000000000e+000 -8.5000000000e-001 - 131 9.9802631579e-002 -5.0000000000e-002 1.0019736842e-001 - 132 6.2830253269e-001 1.0000000000e+000 -1.0994524632e-001 - 133 -1.6254733100e-001 -3.9390359012e-001 0.0000000000e+000 - 134 5.5272701997e-003 1.0000000000e+000 2.9413394980e-002 - 135 9.5929148350e-002 -5.0000000000e-002 -5.0000000000e-002 - 136 1.0000000000e+000 1.0000000000e+000 3.0000000000e-001 - 137 -2.2674394090e-002 3.2694191619e-001 -1.0000000000e+000 - 138 -2.0000000000e-001 -1.0000000000e+000 0.0000000000e+000 - 139 -6.2671914240e-002 1.1705837273e-001 -2.7500000000e-001 - 140 -2.5000000000e-001 2.5000000000e-001 -1.0000000000e+000 - 141 -1.8876811594e-001 -7.9547101449e-001 0.0000000000e+000 - 142 -1.2500000000e-001 1.2500000000e-001 -1.0000000000e+000 - 143 0.0000000000e+000 -1.5000000000e-001 -1.5000000000e-001 - 144 -5.0000000000e-001 1.0000000000e+000 -1.0000000000e+000 - 145 -2.5000000000e-001 0.0000000000e+000 -1.0000000000e+000 - 146 -5.0000000000e-001 -1.0000000000e+000 1.0000000000e+000 - 147 -1.2500000000e-001 0.0000000000e+000 -4.2500000000e-001 - 148 1.0000000000e+000 5.0000000000e-001 1.0000000000e+000 - 149 2.8809198154e-002 5.5371893512e-001 -6.2851913865e-001 - 150 -5.5469311364e-002 2.9347467311e-001 -3.7329041797e-001 - 151 -3.4697602045e-002 -3.3506296849e-001 2.6757412412e-001 - 152 2.2401596315e-001 -1.3412993327e-001 2.0168670709e-001 - 153 1.3229212269e-001 -1.6168506366e-001 -1.4002683131e-001 - 154 2.3461646548e-001 2.3752431475e-001 -7.0338362131e-001 - 155 6.0161102302e-001 2.7518564250e-001 2.6252011629e-001 - 156 2.9244029605e-001 1.4249316969e-001 2.4947126364e-002 - 157 1.0479800962e-001 -7.3558886496e-001 3.3843539549e-001 - 158 3.7665638715e-001 5.4355657726e-001 -3.0990722009e-001 - 159 -1.5478654188e-002 -4.8212139810e-001 6.8350987673e-001 - 160 2.5000000000e-001 -5.0000000000e-002 -5.0000000000e-002 - 161 1.5501237713e-001 1.8860846625e-001 -1.8228796375e-001 - 162 1.7296457418e-001 -1.9423751150e-001 7.1103363666e-003 - 163 0.0000000000e+000 0.0000000000e+000 -3.5000000000e-001 - 164 1.5325263623e-001 -8.0065024171e-001 1.1780956163e-001 - 165 -3.3020762244e-017 -2.6362935292e-001 -3.3871413160e-001 - 166 0.0000000000e+000 0.0000000000e+000 -5.0000000000e-001 - 167 0.0000000000e+000 0.0000000000e+000 -7.0000000000e-001 - 168 2.5987230559e-001 -4.0934757783e-001 3.8949795555e-001 - 169 1.1168873814e-001 6.3823649359e-001 -1.7363416875e-001 - 170 -1.0709000758e-001 -6.1949714542e-001 1.4216577176e-001 - 171 4.5827905158e-001 -3.8872947866e-002 4.6041303853e-001 - 172 0.0000000000e+000 -7.0000000000e-001 0.0000000000e+000 - 173 4.7157471220e-001 -4.8745644987e-001 1.0000000000e+000 - 174 2.6047878323e-001 1.0000000000e+000 -4.4596506027e-001 - 175 0.0000000000e+000 -5.0000000000e-001 0.0000000000e+000 - 176 1.2430407526e-001 9.6720908468e-002 -3.2100670822e-001 - 177 1.7910391566e-001 -7.9103915663e-002 -8.5000000000e-001 - 178 1.0000000000e-001 1.0000000000e-001 -1.0000000000e+000 - 179 -7.5000000000e-002 2.2063725490e-001 -6.0000000000e-001 - 180 -8.8526241087e-002 5.3356611989e-001 -1.0000000000e+000 - 181 1.0000000000e-001 -1.0000000000e+000 1.0000000000e-001 - 182 1.4056184540e-001 -2.9859185242e-003 -1.5000000000e-001 - 183 0.0000000000e+000 -8.7500000000e-001 0.0000000000e+000 - 184 0.0000000000e+000 -2.0000000000e-001 -6.0000000000e-001 - 185 1.2946199372e-001 -3.5000000000e-001 1.0006386835e-001 - 186 1.0000000000e+000 5.0426836032e-001 5.6756878224e-002 - 187 2.5606307620e-001 3.7249468335e-001 -1.0000000000e+000 - 188 2.4409303977e-001 6.1838269553e-001 -7.6506360374e-001 - 189 0.0000000000e+000 -3.3841573352e-001 -1.8170786676e-001 - 190 0.0000000000e+000 0.0000000000e+000 -8.7500000000e-001 - 191 1.0000000000e+000 1.0000000000e+000 -3.0000000000e-001 - 192 1.0434580675e-001 -7.2418214823e-002 -2.7500000000e-001 - 193 0.0000000000e+000 -1.0000000000e+000 1.0000000000e+000 - 194 0.0000000000e+000 -3.5000000000e-001 0.0000000000e+000 - 195 1.0000000000e+000 1.2366901292e-001 5.0487169116e-001 - 196 0.0000000000e+000 0.0000000000e+000 -1.0000000000e+000 - 197 -1.8872091155e-002 -1.0000000000e+000 5.4234754543e-001 - 198 0.0000000000e+000 1.0000000000e+000 -1.0000000000e+000 - 199 1.0796783062e-001 -1.5000000000e-001 -4.5000000000e-001 - 200 0.0000000000e+000 -1.6385006413e-001 -8.0793291076e-001 - 201 3.9125211228e-001 7.6427621764e-002 -1.0000000000e+000 - 202 1.0000000000e+000 0.0000000000e+000 1.0000000000e+000 - 203 0.0000000000e+000 -1.0000000000e+000 0.0000000000e+000 - 204 2.3662919434e-001 -2.2948286481e-002 -1.0000000000e+000 - 205 5.0000000000e-001 -1.0000000000e+000 1.0000000000e+000 - 206 5.2546412159e-001 -2.7485674183e-001 8.2125607248e-002 - 207 2.3500000000e-001 -3.5000000000e-001 -1.5000000000e-001 - 208 2.4420259088e-001 2.4420259088e-001 -4.4686422782e-001 - 209 5.6054489147e-001 1.2714565164e-001 -1.9486591848e-001 - 210 4.8906042000e-001 -3.9210242067e-002 -7.6305879120e-001 - 211 1.9702585878e-001 -6.1776518561e-002 -5.1669140808e-001 - 212 2.6479092412e-001 -4.1009557129e-001 -7.3028671388e-001 - 213 5.7266576074e-001 -6.3922551401e-001 2.6327685541e-001 - 214 5.6375273363e-001 3.2780148406e-001 -6.5528941502e-001 - 215 2.7586549651e-001 -6.6692597728e-002 -3.3463814626e-001 - 216 2.1181678502e-001 -3.1666666667e-001 -4.5000000000e-001 - 217 2.0143418210e-001 -6.0000000000e-001 1.3545521325e-001 - 218 1.9599660811e-001 -6.0000000000e-001 -1.2702198063e-001 - 219 0.0000000000e+000 -7.5000000000e-001 -3.1000000000e-001 - 220 1.8350958827e-001 -8.5000000000e-001 -8.3509588268e-002 - 221 4.1833570594e-001 -7.5025102740e-001 3.6313468091e-002 - 222 6.4565957118e-001 5.4755686374e-001 -1.0000000000e+000 - 223 1.0000000000e+000 -4.5534763762e-001 3.6376835358e-001 - 224 4.3611111111e-001 -1.0000000000e+000 4.8950617284e-001 - 225 0.0000000000e+000 -2.5000000000e-001 -1.0000000000e+000 - 226 1.0000000000e+000 -4.5000000000e-002 0.0000000000e+000 - 227 6.4693607393e-001 1.3189342405e-001 -1.0000000000e+000 - 228 3.7760416667e-001 -1.0000000000e+000 2.0022183642e-001 - 229 1.0000000000e+000 3.4463100777e-001 -4.7515182689e-001 - 230 0.0000000000e+000 -5.0720000000e-001 -2.5000000000e-001 - 231 0.0000000000e+000 -5.0000000000e-001 -5.0000000000e-001 - 232 1.4861111111e-001 -1.0000000000e+000 -1.3256645502e-001 - 233 3.5625000000e-001 -1.6250000000e-001 -1.0000000000e+000 - 234 3.0686482522e-001 -1.0000000000e+000 -1.9265576181e-002 - 235 1.0000000000e+000 -1.0000000000e+000 1.0000000000e+000 - 236 0.0000000000e+000 -1.0000000000e+000 -5.0000000000e-001 - 237 0.0000000000e+000 -3.7500000000e-001 -7.8125000000e-001 - 238 0.0000000000e+000 -1.0000000000e+000 -2.5000000000e-001 - 239 1.0000000000e+000 1.0000000000e+000 -1.0000000000e+000 - 240 5.1500000000e-001 -3.1666666667e-001 -4.5000000000e-001 - 241 4.2420126146e-001 -5.6509411101e-001 -1.0000000000e+000 - 242 3.3387982960e-001 -6.7343376166e-001 -4.6872863376e-001 - 243 1.0000000000e+000 -4.5574522135e-001 -1.5318983369e-001 - 244 5.1466971912e-001 -5.2650887452e-001 -1.9110554451e-001 - 245 3.3265923942e-001 -1.0000000000e+000 -2.9580812437e-001 - 246 6.4028663571e-001 -1.0000000000e+000 -1.1192238894e-001 - 247 0.0000000000e+000 -6.9540465081e-001 -7.2402179536e-001 - 248 1.0000000000e+000 -1.2895715356e-001 -5.0479057191e-001 - 249 3.6610377025e-001 -1.0000000000e+000 -6.3357460587e-001 - 250 1.0000000000e+000 -1.0000000000e+000 3.0000000000e-001 - 251 0.0000000000e+000 -5.0000000000e-001 -1.0000000000e+000 - 252 1.0000000000e+000 0.0000000000e+000 -1.0000000000e+000 - 253 0.0000000000e+000 -1.0000000000e+000 -1.0000000000e+000 - 254 6.3111482753e-001 -1.0000000000e+000 -4.1562068075e-001 - 255 5.0000000000e-001 -1.0000000000e+000 -1.0000000000e+000 - 256 1.0000000000e+000 -5.0000000000e-001 -1.0000000000e+000 - 257 1.0000000000e+000 -1.0000000000e+000 -3.0000000000e-001 - 258 1.0000000000e+000 -1.0000000000e+000 -1.0000000000e+000 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 6 4 4 6 1 8 - 2 6 4 8 4 6 5 - 3 6 4 8 4 9 1 - 4 6 4 11 6 4 5 - 5 6 4 6 11 3 5 - 6 6 4 8 7 4 5 - 7 6 4 9 7 4 8 - 8 6 4 4 1 6 20 - 9 6 4 8 6 1 18 - 10 6 4 9 4 20 1 - 11 6 4 14 8 1 18 - 12 6 4 20 6 4 11 - 13 6 4 20 4 12 11 - 14 6 4 21 22 2 3 - 15 6 4 5 7 4 32 - 16 6 4 3 36 6 5 - 17 6 4 20 1 19 9 - 18 6 4 9 4 7 32 - 19 6 4 27 3 2 22 - 20 6 4 5 6 8 36 - 21 6 4 5 8 7 36 - 22 6 4 11 38 3 5 - 23 6 4 11 4 40 5 - 24 6 4 18 14 8 24 - 25 6 4 36 6 8 18 - 26 6 4 36 8 7 24 - 27 6 4 24 30 13 7 - 28 6 4 36 16 6 18 - 29 6 4 30 14 16 18 - 30 6 4 9 20 4 46 - 31 6 4 13 30 23 10 - 32 6 4 11 4 12 50 - 33 6 4 33 5 32 7 - 34 6 4 13 14 30 24 - 35 6 4 20 12 4 46 - 36 6 4 14 16 23 30 - 37 6 4 30 23 14 13 - 38 6 4 5 4 40 32 - 39 6 4 33 36 5 7 - 40 6 4 30 7 33 13 - 41 6 4 18 30 14 24 - 42 6 4 18 8 36 24 - 43 6 4 22 21 38 3 - 44 6 4 3 41 36 5 - 45 6 4 41 3 38 5 - 46 6 4 32 9 4 46 - 47 6 4 9 19 20 46 - 48 6 4 11 40 38 5 - 49 6 4 36 7 30 24 - 50 6 4 20 19 12 46 - 51 6 4 10 47 17 26 - 52 6 4 36 30 16 18 - 53 6 4 19 25 12 46 - 54 6 4 53 10 17 23 - 55 6 4 3 6 36 58 - 56 6 4 17 31 47 10 - 57 6 4 47 28 15 17 - 58 6 4 11 40 4 50 - 59 6 4 56 9 7 32 - 60 6 4 30 33 7 36 - 61 6 4 3 54 38 11 - 62 6 4 18 36 30 24 - 63 6 4 53 17 10 31 - 64 6 4 13 57 30 10 - 65 6 4 17 15 47 31 - 66 6 4 33 32 5 41 - 67 6 4 50 4 12 46 - 68 6 4 33 5 36 41 - 69 6 4 17 47 28 26 - 70 6 4 53 30 10 23 - 71 6 4 17 53 15 31 - 72 6 4 54 38 21 3 - 73 6 4 32 41 40 5 - 74 6 4 3 27 67 22 - 75 6 4 16 6 58 36 - 76 6 4 16 53 23 30 - 77 6 4 41 38 3 43 - 78 6 4 19 34 25 46 - 79 6 4 53 10 30 31 - 80 6 4 32 4 40 50 - 81 6 4 54 11 12 50 - 82 6 4 22 38 21 45 - 83 6 4 40 41 38 5 - 84 6 4 31 30 57 10 - 85 6 4 33 56 7 32 - 86 6 4 3 67 38 22 - 87 6 4 50 32 4 46 - 88 6 4 25 55 12 46 - 89 6 4 3 36 41 58 - 90 6 4 26 10 47 60 - 91 6 4 58 36 30 16 - 92 6 4 40 38 54 11 - 93 6 4 41 3 58 43 - 94 6 4 10 31 47 60 - 95 6 4 3 38 67 43 - 96 6 4 79 13 30 33 - 97 6 4 9 78 19 46 - 98 6 4 11 54 40 50 - 99 6 4 39 33 32 49 - 100 6 4 48 21 38 45 - 101 6 4 60 31 57 10 - 102 6 4 58 30 53 16 - 103 6 4 34 55 25 46 - 104 6 4 50 12 55 46 - 105 6 4 40 38 41 44 - 106 6 4 15 70 47 31 - 107 6 4 54 21 38 48 - 108 6 4 41 44 38 43 - 109 6 4 32 78 9 46 - 110 6 4 72 3 27 67 - 111 6 4 45 38 44 43 - 112 6 4 29 80 25 34 - 113 6 4 55 54 12 50 - 114 6 4 49 56 33 32 - 115 6 4 70 15 53 31 - 116 6 4 39 32 33 69 - 117 6 4 39 52 33 49 - 118 6 4 32 69 41 33 - 119 6 4 56 78 9 32 - 120 6 4 22 67 38 45 - 121 6 4 72 58 3 43 - 122 6 4 19 78 34 46 - 123 6 4 37 35 42 65 - 124 6 4 35 42 62 37 - 125 6 4 13 30 57 79 - 126 6 4 32 39 40 69 - 127 6 4 32 41 69 40 - 128 6 4 40 54 38 48 - 129 6 4 43 3 72 67 - 130 6 4 39 33 52 66 - 131 6 4 69 37 39 44 - 132 6 4 52 56 33 49 - 133 6 4 51 49 52 39 - 134 6 4 30 92 33 36 - 135 6 4 45 67 38 43 - 136 6 4 80 55 25 34 - 137 6 4 48 40 54 50 - 138 6 4 40 39 44 69 - 139 6 4 69 40 41 44 - 140 6 4 64 42 37 51 - 141 6 4 66 39 37 51 - 142 6 4 37 42 62 51 - 143 6 4 40 91 39 32 - 144 6 4 37 62 35 66 - 145 6 4 41 33 92 36 - 146 6 4 39 69 33 66 - 147 6 4 69 39 37 66 - 148 6 4 49 39 91 32 - 149 6 4 51 52 66 39 - 150 6 4 65 42 37 64 - 151 6 4 67 22 76 45 - 152 6 4 54 85 21 48 - 153 6 4 15 53 71 70 - 154 6 4 52 35 62 66 - 155 6 4 66 63 33 52 - 156 6 4 44 38 91 40 - 157 6 4 39 44 91 40 - 158 6 4 31 57 30 95 - 159 6 4 32 40 91 50 - 160 6 4 51 52 49 62 - 161 6 4 98 53 30 31 - 162 6 4 60 86 47 26 - 163 6 4 66 35 63 52 - 164 6 4 35 62 42 77 - 165 6 4 37 39 44 96 - 166 6 4 51 64 42 59 - 167 6 4 66 37 62 51 - 168 6 4 44 91 38 45 - 169 6 4 40 38 91 48 - 170 6 4 41 92 44 43 - 171 6 4 50 93 32 46 - 172 6 4 51 39 37 96 - 173 6 4 48 38 91 45 - 174 6 4 58 30 36 98 - 175 6 4 45 44 94 43 - 176 6 4 52 77 62 35 - 177 6 4 63 35 77 52 - 178 6 4 84 80 29 34 - 179 6 4 64 61 42 59 - 180 6 4 48 91 40 50 - 181 6 4 51 66 52 62 - 182 6 4 66 35 37 92 - 183 6 4 41 92 33 69 - 184 6 4 65 61 42 64 - 185 6 4 98 58 41 36 - 186 6 4 30 33 92 79 - 187 6 4 51 39 97 49 - 188 6 4 74 52 62 49 - 189 6 4 58 53 30 98 - 190 6 4 98 41 58 43 - 191 6 4 34 105 55 46 - 192 6 4 69 92 37 44 - 193 6 4 109 47 31 60 - 194 6 4 41 44 92 69 - 195 6 4 15 71 89 70 - 196 6 4 45 94 67 43 - 197 6 4 34 78 93 46 - 198 6 4 32 93 78 46 - 199 6 4 77 73 35 63 - 200 6 4 51 37 64 96 - 201 6 4 51 42 97 59 - 202 6 4 37 112 35 65 - 203 6 4 65 42 113 35 - 204 6 4 31 30 98 95 - 205 6 4 97 62 42 51 - 206 6 4 66 33 63 92 - 207 6 4 50 55 105 46 - 208 6 4 66 63 35 92 - 209 6 4 109 31 57 60 - 210 6 4 48 54 105 50 - 211 6 4 93 78 56 32 - 212 6 4 51 97 62 49 - 213 6 4 98 92 30 36 - 214 6 4 79 30 57 95 - 215 6 4 66 33 92 69 - 216 6 4 63 95 73 35 - 217 6 4 79 33 92 63 - 218 6 4 32 49 56 127 - 219 6 4 32 91 93 50 - 220 6 4 55 105 54 50 - 221 6 4 77 113 42 35 - 222 6 4 69 37 92 66 - 223 6 4 98 41 92 36 - 224 6 4 109 31 47 83 - 225 6 4 98 58 72 43 - 226 6 4 55 99 34 80 - 227 6 4 39 91 44 96 - 228 6 4 70 53 117 31 - 229 6 4 97 42 62 74 - 230 6 4 31 70 47 126 - 231 6 4 98 92 41 43 - 232 6 4 34 93 78 68 - 233 6 4 118 56 52 49 - 234 6 4 51 100 64 59 - 235 6 4 61 110 42 59 - 236 6 4 34 93 105 46 - 237 6 4 91 49 97 39 - 238 6 4 45 94 44 96 - 239 6 4 45 44 91 96 - 240 6 4 65 37 112 64 - 241 6 4 37 35 112 92 - 242 6 4 44 104 92 37 - 243 6 4 44 92 104 43 - 244 6 4 74 62 97 49 - 245 6 4 113 61 42 65 - 246 6 4 96 37 104 44 - 247 6 4 94 67 76 45 - 248 6 4 71 53 58 98 - 249 6 4 126 47 31 83 - 250 6 4 102 72 67 43 - 251 6 4 94 44 104 43 - 252 6 4 63 92 95 35 - 253 6 4 31 103 57 95 - 254 6 4 51 100 39 96 - 255 6 4 39 97 100 51 - 256 6 4 59 107 64 61 - 257 6 4 50 105 93 46 - 258 6 4 93 56 78 68 - 259 6 4 48 105 91 50 - 260 6 4 118 52 74 49 - 261 6 4 55 34 99 105 - 262 6 4 105 85 54 48 - 263 6 4 32 91 49 127 - 264 6 4 84 99 80 34 - 265 6 4 79 92 30 95 - 266 6 4 107 61 65 64 - 267 6 4 98 117 53 31 - 268 6 4 105 54 85 55 - 269 6 4 71 58 72 98 - 270 6 4 109 86 47 60 - 271 6 4 31 57 103 109 - 272 6 4 94 102 67 43 - 273 6 4 101 73 95 35 - 274 6 4 35 121 73 77 - 275 6 4 51 97 100 59 - 276 6 4 32 56 93 127 - 277 6 4 51 64 100 96 - 278 6 4 64 37 112 96 - 279 6 4 59 97 110 42 - 280 6 4 55 75 99 80 - 281 6 4 53 117 71 70 - 282 6 4 43 98 102 72 - 283 6 4 63 73 95 82 - 284 6 4 95 57 79 82 - 285 6 4 113 35 101 65 - 286 6 4 98 30 92 95 - 287 6 4 65 112 35 101 - 288 6 4 63 95 79 82 - 289 6 4 48 91 134 45 - 290 6 4 48 105 85 81 - 291 6 4 106 99 84 34 - 292 6 4 101 95 92 35 - 293 6 4 74 110 97 42 - 294 6 4 75 105 85 55 - 295 6 4 109 47 86 83 - 296 6 4 91 97 100 39 - 297 6 4 68 34 93 129 - 298 6 4 31 98 103 95 - 299 6 4 39 100 91 96 - 300 6 4 101 121 73 35 - 301 6 4 95 79 92 63 - 302 6 4 99 34 93 105 - 303 6 4 64 100 107 59 - 304 6 4 55 99 75 105 - 305 6 4 99 93 34 106 - 306 6 4 96 104 94 44 - 307 6 4 67 76 102 94 - 308 6 4 31 114 83 109 - 309 6 4 98 104 92 43 - 310 6 4 105 93 91 50 - 311 6 4 74 97 118 49 - 312 6 4 53 71 117 98 - 313 6 4 45 76 94 128 - 314 6 4 94 104 102 43 - 315 6 4 32 93 91 127 - 316 6 4 35 112 92 101 - 317 6 4 31 117 70 126 - 318 6 4 98 102 104 43 - 319 6 4 68 93 56 127 - 320 6 4 113 35 77 121 - 321 6 4 92 104 112 37 - 322 6 4 75 85 105 81 - 323 6 4 99 90 80 75 - 324 6 4 49 118 56 127 - 325 6 4 109 57 125 60 - 326 6 4 96 104 37 112 - 327 6 4 123 107 59 61 - 328 6 4 107 65 112 64 - 329 6 4 98 103 117 31 - 330 6 4 48 115 105 81 - 331 6 4 31 83 114 126 - 332 6 4 59 61 110 123 - 333 6 4 31 103 114 109 - 334 6 4 95 125 57 82 - 335 6 4 115 105 91 48 - 336 6 4 71 72 117 98 - 337 6 4 34 106 93 129 - 338 6 4 96 94 128 45 - 339 6 4 81 105 75 99 - 340 6 4 91 97 49 127 - 341 6 4 64 107 100 96 - 342 6 4 45 91 134 96 - 343 6 4 107 65 61 131 - 344 6 4 118 68 56 127 - 345 6 4 106 84 145 34 - 346 6 4 113 101 35 121 - 347 6 4 65 113 61 131 - 348 6 4 31 114 103 126 - 349 6 4 31 103 117 126 - 350 6 4 64 112 107 96 - 351 6 4 59 97 100 122 - 352 6 4 89 71 146 70 - 353 6 4 102 76 111 94 - 354 6 4 133 95 73 82 - 355 6 4 125 57 103 95 - 356 6 4 97 108 110 74 - 357 6 4 134 48 115 91 - 358 6 4 98 117 102 72 - 359 6 4 49 97 118 127 - 360 6 4 98 92 104 95 - 361 6 4 59 110 97 122 - 362 6 4 59 100 107 123 - 363 6 4 109 138 86 60 - 364 6 4 125 103 57 109 - 365 6 4 74 118 97 108 - 366 6 4 106 130 129 34 - 367 6 4 75 99 144 81 - 368 6 4 87 111 76 128 - 369 6 4 96 128 134 45 - 370 6 4 101 95 73 133 - 371 6 4 98 104 103 95 - 372 6 4 115 99 105 81 - 373 6 4 96 94 104 112 - 374 6 4 123 59 100 122 - 375 6 4 146 71 117 70 - 376 6 4 94 76 111 128 - 377 6 4 131 112 65 101 - 378 6 4 131 65 113 101 - 379 6 4 94 107 112 96 - 380 6 4 99 144 90 75 - 381 6 4 124 93 68 127 - 382 6 4 68 129 93 124 - 383 6 4 106 145 130 34 - 384 6 4 123 110 59 122 - 385 6 4 107 112 65 131 - 386 6 4 109 86 138 83 - 387 6 4 110 61 113 135 - 388 6 4 87 111 136 88 - 389 6 4 123 107 61 135 - 390 6 4 101 73 121 133 - 391 6 4 123 61 110 135 - 392 6 4 84 140 99 106 - 393 6 4 133 125 95 82 - 394 6 4 141 109 125 60 - 395 6 4 131 61 107 135 - 396 6 4 96 128 94 120 - 397 6 4 124 68 118 127 - 398 6 4 150 100 91 97 - 399 6 4 101 92 95 151 - 400 6 4 97 110 108 122 - 401 6 4 115 144 99 81 - 402 6 4 93 91 149 105 - 403 6 4 151 104 92 95 - 404 6 4 131 113 61 135 - 405 6 4 109 138 114 83 - 406 6 4 119 103 109 114 - 407 6 4 99 149 93 106 - 408 6 4 99 93 149 105 - 409 6 4 141 138 109 60 - 410 6 4 156 94 96 107 - 411 6 4 151 103 104 95 - 412 6 4 152 102 94 104 - 413 6 4 70 117 146 126 - 414 6 4 96 100 91 169 - 415 6 4 92 112 104 151 - 416 6 4 124 118 68 147 - 417 6 4 151 92 112 101 - 418 6 4 156 96 100 107 - 419 6 4 94 104 112 152 - 420 6 4 87 136 111 128 - 421 6 4 93 150 91 127 - 422 6 4 139 97 118 108 - 423 6 4 105 91 149 115 - 424 6 4 98 104 102 159 - 425 6 4 94 112 107 152 - 426 6 4 127 150 91 97 - 427 6 4 122 108 97 139 - 428 6 4 156 96 94 120 - 429 6 4 159 104 103 98 - 430 6 4 122 97 100 150 - 431 6 4 124 68 129 147 - 432 6 4 105 149 99 115 - 433 6 4 156 100 96 120 - 434 6 4 84 145 140 106 - 435 6 4 171 102 111 94 - 436 6 4 96 134 128 120 - 437 6 4 98 102 117 159 - 438 6 4 159 103 117 98 - 439 6 4 109 119 114 138 - 440 6 4 148 136 111 88 - 441 6 4 139 118 97 127 - 442 6 4 150 91 149 93 - 443 6 4 101 95 133 151 - 444 6 4 96 120 100 169 - 445 6 4 100 156 107 123 - 446 6 4 96 91 134 169 - 447 6 4 94 111 155 128 - 448 6 4 95 103 125 170 - 449 6 4 124 150 93 127 - 450 6 4 130 116 140 106 - 451 6 4 157 114 103 119 - 452 6 4 120 94 155 128 - 453 6 4 162 121 101 113 - 454 6 4 131 152 112 101 - 455 6 4 106 137 116 140 - 456 6 4 114 126 159 103 - 457 6 4 119 109 103 170 - 458 6 4 152 112 107 131 - 459 6 4 159 117 103 126 - 460 6 4 109 125 103 170 - 461 6 4 119 109 141 138 - 462 6 4 106 129 179 93 - 463 6 4 162 101 131 113 - 464 6 4 123 100 161 122 - 465 6 4 169 134 115 91 - 466 6 4 150 91 100 169 - 467 6 4 156 107 152 94 - 468 6 4 139 124 118 127 - 469 6 4 139 97 122 150 - 470 6 4 135 153 113 110 - 471 6 4 106 116 137 149 - 472 6 4 128 120 134 132 - 473 6 4 139 97 150 127 - 474 6 4 153 110 108 143 - 475 6 4 96 134 120 169 - 476 6 4 152 94 102 171 - 477 6 4 95 151 103 170 - 478 6 4 152 104 112 151 - 479 6 4 151 112 152 101 - 480 6 4 143 113 153 110 - 481 6 4 106 167 130 116 - 482 6 4 151 104 103 159 - 483 6 4 133 95 125 170 - 484 6 4 182 108 110 122 - 485 6 4 130 140 145 106 - 486 6 4 115 91 149 169 - 487 6 4 120 155 94 156 - 488 6 4 124 179 129 93 - 489 6 4 152 168 102 104 - 490 6 4 135 160 123 107 - 491 6 4 179 93 149 106 - 492 6 4 140 180 99 106 - 493 6 4 155 111 136 128 - 494 6 4 94 171 155 111 - 495 6 4 163 118 108 139 - 496 6 4 142 116 140 130 - 497 6 4 153 121 113 143 - 498 6 4 128 155 120 132 - 499 6 4 135 131 160 107 - 500 6 4 161 100 150 122 - 501 6 4 106 130 167 129 - 502 6 4 180 149 99 106 - 503 6 4 114 159 157 103 - 504 6 4 168 102 104 159 - 505 6 4 142 140 116 137 - 506 6 4 100 156 161 120 - 507 6 4 182 110 123 122 - 508 6 4 119 141 109 170 - 509 6 4 180 144 99 115 - 510 6 4 139 150 124 127 - 511 6 4 135 131 113 162 - 512 6 4 100 161 156 123 - 513 6 4 180 99 149 115 - 514 6 4 141 125 109 170 - 515 6 4 123 107 160 156 - 516 6 4 139 163 118 124 - 517 6 4 176 108 122 139 - 518 6 4 179 150 93 124 - 519 6 4 101 131 152 162 - 520 6 4 128 136 155 132 - 521 6 4 194 101 121 133 - 522 6 4 120 161 100 169 - 523 6 4 133 151 95 170 - 524 6 4 119 103 157 170 - 525 6 4 131 152 160 107 - 526 6 4 162 153 121 113 - 527 6 4 182 123 110 135 - 528 6 4 179 149 116 106 - 529 6 4 169 120 132 134 - 530 6 4 163 147 118 124 - 531 6 4 153 108 110 182 - 532 6 4 111 173 102 171 - 533 6 4 150 149 91 169 - 534 6 4 145 142 140 130 - 535 6 4 116 149 154 137 - 536 6 4 162 135 153 113 - 537 6 4 106 180 137 140 - 538 6 4 120 155 158 132 - 539 6 4 124 129 166 147 - 540 6 4 143 153 165 108 - 541 6 4 106 179 167 116 - 542 6 4 157 181 114 119 - 543 6 4 93 149 150 179 - 544 6 4 193 117 102 159 - 545 6 4 157 151 103 159 - 546 6 4 156 160 152 107 - 547 6 4 156 152 171 94 - 548 6 4 151 152 104 168 - 549 6 4 142 116 178 137 - 550 6 4 106 137 180 149 - 551 6 4 114 203 138 119 - 552 6 4 169 132 120 158 - 553 6 4 194 162 121 101 - 554 6 4 133 101 151 194 - 555 6 4 94 155 171 156 - 556 6 4 163 150 124 139 - 557 6 4 126 146 193 117 - 558 6 4 161 150 100 169 - 559 6 4 157 103 151 170 - 560 6 4 183 138 119 141 - 561 6 4 159 151 104 168 - 562 6 4 106 167 179 129 - 563 6 4 182 110 153 135 - 564 6 4 163 108 176 139 - 565 6 4 176 122 150 139 - 566 6 4 130 142 116 196 - 567 6 4 116 154 178 137 - 568 6 4 148 111 136 195 - 569 6 4 156 158 120 155 - 570 6 4 135 160 131 162 - 571 6 4 101 152 151 185 - 572 6 4 122 182 108 176 - 573 6 4 182 123 161 122 - 574 6 4 152 102 168 171 - 575 6 4 126 193 159 117 - 576 6 4 115 174 134 169 - 577 6 4 120 161 158 156 - 578 6 4 155 136 111 195 - 579 6 4 114 159 126 197 - 580 6 4 179 129 166 124 - 581 6 4 116 154 149 179 - 582 6 4 175 133 125 170 - 583 6 4 141 119 172 170 - 584 6 4 123 160 161 156 - 585 6 4 163 124 166 147 - 586 6 4 124 166 150 163 - 587 6 4 185 101 152 162 - 588 6 4 168 173 102 159 - 589 6 4 182 160 123 135 - 590 6 4 130 116 167 190 - 591 6 4 143 153 121 189 - 592 6 4 174 115 149 169 - 593 6 4 131 160 152 162 - 594 6 4 169 132 174 134 - 595 6 4 186 155 136 132 - 596 6 4 120 158 161 169 - 597 6 4 125 141 172 170 - 598 6 4 164 119 157 170 - 599 6 4 135 153 160 162 - 600 6 4 122 150 161 176 - 601 6 4 183 119 172 141 - 602 6 4 196 142 145 130 - 603 6 4 168 102 173 171 - 604 6 4 192 165 153 108 - 605 6 4 179 166 150 124 - 606 6 4 114 181 203 119 - 607 6 4 116 167 154 179 - 608 6 4 119 157 181 164 - 609 6 4 189 121 162 153 - 610 6 4 114 157 159 197 - 611 6 4 164 172 119 170 - 612 6 4 149 187 154 137 - 613 6 4 123 161 160 182 - 614 6 4 116 154 167 190 - 615 6 4 193 102 173 159 - 616 6 4 186 158 155 132 - 617 6 4 185 151 101 194 - 618 6 4 133 175 151 170 - 619 6 4 163 108 165 192 - 620 6 4 163 176 150 139 - 621 6 4 182 153 160 135 - 622 6 4 169 174 132 158 - 623 6 4 195 155 171 111 - 624 6 4 182 153 108 192 - 625 6 4 159 157 151 168 - 626 6 4 116 178 196 142 - 627 6 4 190 130 116 196 - 628 6 4 163 176 108 192 - 629 6 4 115 149 198 174 - 630 6 4 144 180 198 115 - 631 6 4 183 172 119 164 - 632 6 4 116 178 154 190 - 633 6 4 194 185 162 101 - 634 6 4 175 125 172 170 - 635 6 4 122 161 182 176 - 636 6 4 180 149 198 115 - 637 6 4 119 203 138 183 - 638 6 4 129 166 167 179 - 639 6 4 186 136 191 132 - 640 6 4 183 119 181 164 - 641 6 4 143 165 153 189 - 642 6 4 169 149 174 158 - 643 6 4 181 114 197 157 - 644 6 4 133 151 175 194 - 645 6 4 149 180 187 137 - 646 6 4 176 150 166 163 - 647 6 4 158 132 191 174 - 648 6 4 202 173 111 171 - 649 6 4 111 148 202 195 - 650 6 4 176 182 108 192 - 651 6 4 185 152 151 168 - 652 6 4 154 187 178 137 - 653 6 4 189 162 121 194 - 654 6 4 158 191 132 186 - 655 6 4 188 174 149 158 - 656 6 4 159 197 193 126 - 657 6 4 186 136 155 195 - 658 6 4 206 160 152 156 - 659 6 4 208 149 150 169 - 660 6 4 149 154 187 188 - 661 6 4 171 111 202 195 - 662 6 4 156 209 158 155 - 663 6 4 206 152 160 162 - 664 6 4 153 207 160 162 - 665 6 4 116 196 178 190 - 666 6 4 208 158 149 169 - 667 6 4 209 158 161 156 - 668 6 4 209 161 160 156 - 669 6 4 206 152 171 156 - 670 6 4 119 181 203 183 - 671 6 4 179 149 150 208 - 672 6 4 208 150 161 169 - 673 6 4 206 171 155 156 - 674 6 4 154 177 167 190 - 675 6 4 179 154 149 208 - 676 6 4 217 157 151 170 - 677 6 4 163 165 166 199 - 678 6 4 217 151 157 168 - 679 6 4 208 161 150 176 - 680 6 4 208 161 158 169 - 681 6 4 208 154 149 188 - 682 6 4 206 171 152 168 - 683 6 4 154 178 177 190 - 684 6 4 208 149 158 188 - 685 6 4 176 150 208 166 - 686 6 4 208 150 179 166 - 687 6 4 185 175 151 194 - 688 6 4 149 187 180 188 - 689 6 4 185 152 206 162 - 690 6 4 189 162 207 153 - 691 6 4 164 157 217 170 - 692 6 4 174 149 198 188 - 693 6 4 208 167 179 154 - 694 6 4 154 167 177 211 - 695 6 4 185 206 152 168 - 696 6 4 159 224 157 168 - 697 6 4 153 160 215 182 - 698 6 4 186 155 158 209 - 699 6 4 153 165 207 189 - 700 6 4 217 151 175 170 - 701 6 4 180 198 149 188 - 702 6 4 184 166 165 199 - 703 6 4 192 165 163 199 - 704 6 4 211 163 176 166 - 705 6 4 210 154 178 177 - 706 6 4 161 215 160 182 - 707 6 4 164 217 172 170 - 708 6 4 154 178 187 201 - 709 6 4 185 151 217 168 - 710 6 4 208 179 167 166 - 711 6 4 209 206 155 156 - 712 6 4 216 165 153 192 - 713 6 4 159 173 224 168 - 714 6 4 171 213 173 168 - 715 6 4 209 160 206 156 - 716 6 4 184 167 166 211 - 717 6 4 217 175 151 185 - 718 6 4 228 181 157 164 - 719 6 4 217 175 172 170 - 720 6 4 214 158 174 188 - 721 6 4 207 160 215 153 - 722 6 4 206 160 207 162 - 723 6 4 190 177 167 200 - 724 6 4 182 161 215 176 - 725 6 4 158 191 214 174 - 726 6 4 211 199 163 166 - 727 6 4 183 220 172 164 - 728 6 4 208 158 161 209 - 729 6 4 157 197 224 159 - 730 6 4 214 187 154 188 - 731 6 4 182 215 153 192 - 732 6 4 210 178 154 201 - 733 6 4 153 207 165 216 - 734 6 4 177 178 196 190 - 735 6 4 208 211 167 154 - 736 6 4 163 215 176 192 - 737 6 4 223 195 155 171 - 738 6 4 161 160 215 209 - 739 6 4 158 214 191 186 - 740 6 4 162 207 185 194 - 741 6 4 183 181 220 164 - 742 6 4 217 213 157 164 - 743 6 4 159 193 224 173 - 744 6 4 189 207 162 194 - 745 6 4 223 155 206 171 - 746 6 4 211 167 177 200 - 747 6 4 154 177 210 211 - 748 6 4 177 196 178 204 - 749 6 4 217 157 213 168 - 750 6 4 208 167 211 166 - 751 6 4 201 187 154 214 - 752 6 4 206 213 171 168 - 753 6 4 185 207 175 194 - 754 6 4 186 155 226 195 - 755 6 4 211 166 184 199 - 756 6 4 185 206 207 162 - 757 6 4 211 184 167 200 - 758 6 4 157 224 213 168 - 759 6 4 208 215 161 176 - 760 6 4 208 166 211 176 - 761 6 4 228 157 213 164 - 762 6 4 157 197 181 228 - 763 6 4 194 207 175 189 - 764 6 4 214 154 208 188 - 765 6 4 211 176 163 215 - 766 6 4 199 216 165 184 - 767 6 4 176 215 182 192 - 768 6 4 214 209 186 158 - 769 6 4 214 208 158 188 - 770 6 4 192 163 215 199 - 771 6 4 210 178 204 177 - 772 6 4 171 202 173 223 - 773 6 4 217 172 218 164 - 774 6 4 192 216 165 199 - 775 6 4 218 172 220 164 - 776 6 4 224 197 193 159 - 777 6 4 180 187 222 188 - 778 6 4 216 153 215 192 - 779 6 4 201 154 210 214 - 780 6 4 185 217 206 168 - 781 6 4 224 173 213 168 - 782 6 4 186 226 155 209 - 783 6 4 174 198 222 188 - 784 6 4 171 173 213 223 - 785 6 4 218 175 172 217 - 786 6 4 211 210 154 208 - 787 6 4 207 206 209 160 - 788 6 4 208 210 154 214 - 789 6 4 185 217 175 207 - 790 6 4 189 207 230 165 - 791 6 4 180 222 198 188 - 792 6 4 223 171 202 195 - 793 6 4 211 163 199 215 - 794 6 4 209 208 158 214 - 795 6 4 153 215 207 216 - 796 6 4 177 196 225 190 - 797 6 4 207 209 215 160 - 798 6 4 190 225 177 200 - 799 6 4 210 204 178 201 - 800 6 4 218 172 175 230 - 801 6 4 220 172 219 183 - 802 6 4 208 161 215 209 - 803 6 4 205 224 193 173 - 804 6 4 214 174 222 188 - 805 6 4 223 155 195 226 - 806 6 4 216 231 165 184 - 807 6 4 234 220 181 164 - 808 6 4 183 232 181 203 - 809 6 4 206 155 226 209 - 810 6 4 189 230 207 175 - 811 6 4 212 211 177 200 - 812 6 4 191 174 222 214 - 813 6 4 177 225 196 204 - 814 6 4 212 184 211 200 - 815 6 4 217 213 206 168 - 816 6 4 234 181 228 164 - 817 6 4 157 224 197 228 - 818 6 4 214 222 187 188 - 819 6 4 216 211 184 199 - 820 6 4 211 177 210 212 - 821 6 4 208 211 215 176 - 822 6 4 223 206 155 226 - 823 6 4 200 177 212 225 - 824 6 4 217 206 207 185 - 825 6 4 206 171 213 223 - 826 6 4 164 217 213 221 - 827 6 4 230 207 216 165 - 828 6 4 217 218 175 207 - 829 6 4 183 181 232 220 - 830 6 4 192 215 216 199 - 831 6 4 214 191 186 229 - 832 6 4 212 211 184 216 - 833 6 4 164 218 217 221 - 834 6 4 164 220 218 221 - 835 6 4 157 213 224 228 - 836 6 4 191 222 174 239 - 837 6 4 177 210 233 204 - 838 6 4 164 213 228 221 - 839 6 4 230 218 207 175 - 840 6 4 201 227 187 214 - 841 6 4 220 219 172 218 - 842 6 4 237 184 212 200 - 843 6 4 202 235 173 223 - 844 6 4 177 233 210 212 - 845 6 4 239 198 222 174 - 846 6 4 235 205 173 224 - 847 6 4 177 233 225 204 - 848 6 4 218 219 172 230 - 849 6 4 164 234 220 221 - 850 6 4 214 186 209 229 - 851 6 4 216 215 211 199 - 852 6 4 216 212 231 184 - 853 6 4 209 210 208 214 - 854 6 4 216 165 231 230 - 855 6 4 213 235 173 224 - 856 6 4 213 173 235 223 - 857 6 4 177 225 233 212 - 858 6 4 164 228 234 221 - 859 6 4 187 227 222 214 - 860 6 4 201 233 210 204 - 861 6 4 186 229 226 209 - 862 6 4 201 210 227 214 - 863 6 4 232 183 220 219 - 864 6 4 191 222 229 214 - 865 6 4 217 206 213 221 - 866 6 4 183 238 232 203 - 867 6 4 207 209 206 240 - 868 6 4 237 231 212 184 - 869 6 4 234 181 220 232 - 870 6 4 208 209 240 210 - 871 6 4 227 233 210 201 - 872 6 4 218 207 216 230 - 873 6 4 208 240 211 210 - 874 6 4 207 215 209 240 - 875 6 4 217 207 206 244 - 876 6 4 200 212 237 225 - 877 6 4 208 211 240 215 - 878 6 4 211 210 240 212 - 879 6 4 183 232 238 219 - 880 6 4 208 240 209 215 - 881 6 4 207 215 240 216 - 882 6 4 212 240 211 216 - 883 6 4 248 210 209 214 - 884 6 4 191 229 222 239 - 885 6 4 211 240 215 216 - 886 6 4 206 226 240 209 - 887 6 4 240 216 218 207 - 888 6 4 206 221 246 213 - 889 6 4 217 218 207 244 - 890 6 4 243 206 213 223 - 891 6 4 221 217 206 244 - 892 6 4 229 222 227 214 - 893 6 4 206 207 240 244 - 894 6 4 227 210 248 214 - 895 6 4 233 241 210 212 - 896 6 4 243 226 206 223 - 897 6 4 220 242 219 218 - 898 6 4 221 218 217 244 - 899 6 4 210 241 240 212 - 900 6 4 248 209 229 214 - 901 6 4 220 221 244 218 - 902 6 4 216 231 212 242 - 903 6 4 209 240 210 248 - 904 6 4 218 216 242 230 - 905 6 4 206 246 243 213 - 906 6 4 240 218 244 207 - 907 6 4 233 210 241 227 - 908 6 4 233 225 241 212 - 909 6 4 218 242 219 230 - 910 6 4 228 213 246 221 - 911 6 4 216 212 240 242 - 912 6 4 206 240 226 243 - 913 6 4 209 229 226 248 - 914 6 4 228 250 213 224 - 915 6 4 206 246 221 244 - 916 6 4 240 218 216 242 - 917 6 4 227 248 229 214 - 918 6 4 242 216 231 230 - 919 6 4 220 219 245 232 - 920 6 4 213 250 235 224 - 921 6 4 213 235 250 223 - 922 6 4 209 226 240 248 - 923 6 4 242 231 219 230 - 924 6 4 234 245 220 221 - 925 6 4 237 212 231 247 - 926 6 4 212 225 251 237 - 927 6 4 248 241 210 227 - 928 6 4 220 244 242 218 - 929 6 4 242 219 245 220 - 930 6 4 220 244 221 245 - 931 6 4 251 241 225 212 - 932 6 4 243 213 250 223 - 933 6 4 246 234 228 221 - 934 6 4 234 220 245 232 - 935 6 4 222 227 252 229 - 936 6 4 243 206 240 244 - 937 6 4 242 231 212 247 - 938 6 4 238 245 219 232 - 939 6 4 212 241 240 242 - 940 6 4 206 243 246 244 - 941 6 4 242 219 231 247 - 942 6 4 246 250 213 228 - 943 6 4 210 240 241 248 - 944 6 4 219 236 245 238 - 945 6 4 247 241 212 242 - 946 6 4 252 239 222 229 - 947 6 4 219 245 236 242 - 948 6 4 240 244 218 242 - 949 6 4 237 251 212 247 - 950 6 4 242 236 219 247 - 951 6 4 245 234 246 221 - 952 6 4 220 242 244 245 - 953 6 4 212 251 241 247 - 954 6 4 246 213 250 243 - 955 6 4 244 246 221 245 - 956 6 4 227 229 248 252 - 957 6 4 248 226 240 243 - 958 6 4 252 241 248 227 - 959 6 4 249 236 242 247 - 960 6 4 242 245 236 249 - 961 6 4 241 243 248 240 - 962 6 4 247 249 241 242 - 963 6 4 254 242 240 241 - 964 6 4 241 254 243 240 - 965 6 4 254 243 240 244 - 966 6 4 254 240 242 244 - 967 6 4 254 242 245 244 - 968 6 4 254 246 243 244 - 969 6 4 249 253 236 247 - 970 6 4 254 242 241 249 - 971 6 4 244 254 246 245 - 972 6 4 254 245 242 249 - 973 6 4 241 248 243 256 - 974 6 4 249 241 255 247 - 975 6 4 251 255 241 247 - 976 6 4 241 243 254 256 - 977 6 4 254 241 255 249 - 978 6 4 246 250 257 243 - 979 6 4 248 256 241 252 - 980 6 4 243 257 246 254 - 981 6 4 249 255 253 247 - 982 6 4 255 251 253 247 - 983 6 4 255 256 241 254 - 984 6 4 257 243 256 254 - 985 6 4 258 256 255 254 - 986 6 4 256 258 257 254 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 986 MATERIAL: 1.000 NFLAGS: 0 - FLUID - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 729 730 - 731 732 733 734 735 736 737 738 739 740 - 741 742 743 744 745 746 747 748 749 750 - 751 752 753 754 755 756 757 758 759 760 - 761 762 763 764 765 766 767 768 769 770 - 771 772 773 774 775 776 777 778 779 780 - 781 782 783 784 785 786 787 788 789 790 - 791 792 793 794 795 796 797 798 799 800 - 801 802 803 804 805 806 807 808 809 810 - 811 812 813 814 815 816 817 818 819 820 - 821 822 823 824 825 826 827 828 829 830 - 831 832 833 834 835 836 837 838 839 840 - 841 842 843 844 845 846 847 848 849 850 - 851 852 853 854 855 856 857 858 859 860 - 861 862 863 864 865 866 867 868 869 870 - 871 872 873 874 875 876 877 878 879 880 - 881 882 883 884 885 886 887 888 889 890 - 891 892 893 894 895 896 897 898 899 900 - 901 902 903 904 905 906 907 908 909 910 - 911 912 913 914 915 916 917 918 919 920 - 921 922 923 924 925 926 927 928 929 930 - 931 932 933 934 935 936 937 938 939 940 - 941 942 943 944 945 946 947 948 949 950 - 951 952 953 954 955 956 957 958 959 960 - 961 962 963 964 965 966 967 968 969 970 - 971 972 973 974 975 976 977 978 979 980 - 981 982 983 984 985 986 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 322 0 0 - 51 6 4 - 90 6 2 - 162 6 2 - 162 6 3 - 69 6 4 - 69 6 3 - 949 6 2 - 950 6 3 - 925 6 4 - 941 6 3 - 982 6 3 - 969 6 3 - 96 6 2 - 24 6 3 - 34 6 2 - 27 6 4 - 26 6 3 - 472 6 4 - 594 6 3 - 520 6 2 - 647 6 3 - 639 6 3 - 972 6 2 - 977 6 4 - 960 6 3 - 702 6 1 - 981 6 1 - 969 6 1 - 971 6 3 - 980 6 3 - 245 6 1 - 985 6 4 - 387 6 1 - 235 6 1 - 986 6 3 - 716 6 1 - 29 6 3 - 28 6 3 - 11 6 4 - 9 6 3 - 790 6 4 - 641 6 2 - 763 6 4 - 810 6 2 - 653 6 4 - 591 6 4 - 521 6 4 - 644 6 4 - 390 6 3 - 249 6 2 - 331 6 3 - 295 6 3 - 405 6 3 - 386 6 3 - 230 6 3 - 579 6 4 - 413 6 4 - 656 6 3 - 557 6 1 - 369 6 3 - 368 6 4 - 313 6 2 - 420 6 2 - 805 6 4 - 754 6 4 - 649 6 3 - 792 6 4 - 568 6 4 - 657 6 2 - 388 6 2 - 649 6 1 - 440 6 4 - 440 6 2 - 288 6 4 - 393 6 2 - 284 6 3 - 334 6 3 - 354 6 4 - 283 6 2 - 582 6 1 - 199 6 2 - 217 6 2 - 155 6 3 - 176 6 1 - 177 6 4 - 101 6 4 - 64 6 2 - 54 6 3 - 31 6 4 - 71 6 1 - 54 6 4 - 57 6 3 - 431 6 3 - 530 6 1 - 416 6 3 - 585 6 4 - 539 6 3 - 677 6 1 - 619 6 1 - 495 6 1 - 876 6 4 - 798 6 2 - 638 6 1 - 842 6 2 - 806 6 3 - 723 6 4 - 757 6 3 - 926 6 3 - 868 6 2 - 394 6 4 - 325 6 3 - 409 6 2 - 307 6 1 - 353 6 1 - 363 6 3 - 560 6 2 - 601 6 4 - 597 6 1 - 232 6 4 - 258 6 3 - 297 6 2 - 358 6 3 - 250 6 1 - 344 6 1 - 383 6 3 - 345 6 3 - 78 6 1 - 366 6 3 - 843 6 1 - 178 6 4 - 112 6 4 - 648 6 1 - 532 6 1 - 274 6 3 - 320 6 4 - 164 6 3 - 221 6 1 - 860 6 2 - 847 6 3 - 799 6 3 - 544 6 1 - 615 6 1 - 813 6 3 - 748 6 3 - 871 6 2 - 840 6 1 - 708 6 3 - 896 6 2 - 932 6 4 - 845 6 1 - 843 6 2 - 921 6 3 - 973 6 3 - 957 6 2 - 984 6 1 - 978 6 3 - 913 6 3 - 979 6 2 - 956 6 3 - 946 6 1 - 983 6 1 - 979 6 3 - 985 6 1 - 986 6 1 - 368 6 1 - 388 6 4 - 848 6 3 - 800 6 3 - 923 6 3 - 854 6 3 - 289 6 4 - 151 6 3 - 82 6 4 - 100 6 2 - 74 6 3 - 151 6 1 - 19 6 4 - 14 6 1 - 280 6 2 - 113 6 1 - 88 6 1 - 136 6 1 - 294 6 4 - 268 6 3 - 330 6 2 - 367 6 4 - 401 6 2 - 290 6 4 - 322 6 2 - 152 6 1 - 357 6 1 - 152 6 3 - 576 6 1 - 629 6 4 - 845 6 2 - 836 6 4 - 110 6 4 - 380 6 3 - 323 6 3 - 14 6 4 - 19 6 1 - 72 6 4 - 630 6 4 - 630 6 1 - 110 6 1 - 509 6 1 - 380 6 1 - 323 6 1 - 879 6 4 - 801 6 3 - 866 6 2 - 637 6 3 - 938 6 2 - 934 6 4 - 978 6 1 - 869 6 2 - 866 6 3 - 808 6 3 - 944 6 2 - 846 6 1 - 944 6 3 - 803 6 4 - 933 6 1 - 951 6 1 - 920 6 3 - 846 6 2 - 942 6 2 - 816 6 1 - 817 6 3 - 803 6 1 - 914 6 2 - 762 6 3 - 557 6 3 - 861 6 1 - 831 6 3 - 639 6 1 - 946 6 2 - 884 6 2 - 125 6 4 - 40 6 3 - 106 6 1 - 776 6 1 - 352 6 4 - 195 6 4 - 352 6 1 - 336 6 1 - 375 6 1 - 57 6 1 - 634 6 1 - 13 6 4 - 81 6 1 - 55 6 2 - 61 6 2 - 12 6 2 - 5 6 1 - 121 6 1 - 269 6 1 - 7 6 2 - 3 6 4 - 75 6 1 - 36 6 1 - 11 6 1 - 97 6 1 - 59 6 1 - 606 6 1 - 551 6 1 - 643 6 1 - 17 6 3 - 50 6 1 - 17 6 1 - 8 6 3 - 122 6 1 - 53 6 1 - 540 6 4 - 474 6 3 - 497 6 3 - 480 6 2 - 505 6 2 - 537 6 3 - 645 6 3 - 549 6 4 - 652 6 3 - 590 6 4 - 627 6 2 - 112 6 1 - 796 6 3 - 501 6 3 - 602 6 4 - 534 6 1 - 602 6 1 - 626 6 3 - 434 6 1 - 37 6 3 - 260 6 1 - 233 6 1 - 119 6 1 - 982 6 1 - 132 6 1 - 85 6 1 - 188 6 1 - 907 6 4 - 975 6 1 - 153 6 1 - 195 6 1 - 958 6 2 - 76 6 1 - 248 6 1 - 102 6 4 - 935 6 1 - 859 6 1 - 931 6 1 - 178 6 1 - 264 6 1 - 908 6 1 - 365 6 2 - 356 6 3 - 229 6 3 - 777 6 1 - 791 6 1 - 293 6 2 - 492 6 1 - 392 6 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/Sphere_1074.neu b/cpp/nudg++/trunk/Grid/3D/Sphere_1074.neu deleted file mode 100644 index 98b39af..0000000 --- a/cpp/nudg++/trunk/Grid/3D/Sphere_1074.neu +++ /dev/null @@ -1,1456 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -Sledge++ 3D mesh file -umAMRMesh::print_neu(***) -Sledge++ AMR module - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 257 1074 1 0 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -9.2409598789e-002 6.412158769e-002 -9.936543111e-001 - 2 -2.1278390907e-001 -5.781534389e-001 -7.876938551e-001 - 3 1.0354127272e-001 -6.289946998e-001 -7.704835326e-001 - 4 4.1199953379e-001 -5.873232386e-001 -6.966403639e-001 - 5 -4.8591446603e-001 -4.558240918e-001 -7.457288573e-001 - 6 -2.8105780679e-001 -2.531703559e-001 -9.256950261e-001 - 7 4.8693386880e-004 -3.739678879e-001 -9.274415242e-001 - 8 3.2160485464e-001 -3.695918630e-001 -8.717638285e-001 - 9 6.1683301384e-001 -3.112451753e-001 -7.229408516e-001 - 10 -5.6280818482e-001 -1.935094376e-001 -8.036174745e-001 - 11 -3.9176841076e-001 5.389826568e-002 -9.184837993e-001 - 12 -8.3319796849e-002 -9.276549701e-002 -7.920728400e-001 - 13 1.6543905954e-001 -1.052004286e-001 -9.805930793e-001 - 14 4.8985920710e-001 -7.423131382e-002 -8.686355217e-001 - 15 -4.9409386772e-001 3.162284578e-001 -8.098585138e-001 - 16 -2.1113120244e-001 3.506920984e-001 -9.123807691e-001 - 17 8.1254093275e-002 3.307240363e-001 -9.402230502e-001 - 18 3.1963548794e-001 1.573572535e-001 -9.343831389e-001 - 19 5.6752027515e-001 2.604818935e-001 -7.810697283e-001 - 20 -2.7716221964e-001 6.298960243e-001 -7.255426265e-001 - 21 1.1207943785e-002 5.901989187e-001 -8.071800416e-001 - 22 3.3347314890e-001 4.679120608e-001 -8.184460658e-001 - 23 -4.2142563015e-001 -7.182473286e-001 -5.536435807e-001 - 24 -1.1808115849e-001 -8.185863595e-001 -5.621149467e-001 - 25 1.8416889149e-001 -8.229749072e-001 -5.373956857e-001 - 26 -6.6721782093e-001 -5.290261949e-001 -5.243583345e-001 - 27 -3.6187937911e-001 -4.433958918e-001 -4.168459819e-001 - 28 -8.5440137868e-002 -5.929893629e-001 -4.934764602e-001 - 29 2.3720932186e-001 -5.072160042e-001 -4.745996431e-001 - 30 6.6519204565e-001 -5.453561015e-001 -5.100061422e-001 - 31 -7.7691109691e-001 -2.304397567e-001 -5.859237718e-001 - 32 -5.0383753473e-001 -2.400840553e-001 -4.630801675e-001 - 33 -3.7179016844e-001 -7.948253556e-002 -6.161400500e-001 - 34 -1.9732030357e-001 -3.226919121e-001 -6.193850240e-001 - 35 8.1461258788e-002 -3.317264115e-001 -6.234233487e-001 - 36 3.9514122004e-001 -2.899082405e-001 -5.254399900e-001 - 37 8.2859375189e-001 -2.500281896e-001 -5.009174584e-001 - 38 -6.8494914575e-001 6.192445271e-002 -7.259545641e-001 - 39 -4.9963247697e-001 2.037812132e-001 -5.337178841e-001 - 40 -2.2156477403e-001 1.494701248e-001 -6.443867721e-001 - 41 -4.1761671218e-002 -3.134762317e-002 -5.032015850e-001 - 42 2.3308675011e-001 -1.001447198e-001 -7.017720798e-001 - 43 5.4786168389e-001 -3.165816554e-002 -5.461974576e-001 - 44 7.3242105150e-001 2.534419471e-002 -6.803800961e-001 - 45 -7.4012404413e-001 3.669186157e-001 -5.635486910e-001 - 46 -4.4179816950e-001 4.940686810e-001 -3.817277152e-001 - 47 -2.2435705921e-001 3.924586895e-001 -6.155332175e-001 - 48 7.0897391531e-002 1.984150515e-001 -7.268717041e-001 - 49 3.0217693899e-001 1.117114844e-001 -5.694206743e-001 - 50 5.7617039639e-001 2.329855965e-001 -4.298376372e-001 - 51 7.6109158530e-001 3.537735905e-001 -5.436762317e-001 - 52 -5.3473467846e-001 5.508845668e-001 -6.407690838e-001 - 53 -1.2653868102e-001 5.901868963e-001 -4.074427580e-001 - 54 6.7566457257e-002 4.856219389e-001 -6.076785633e-001 - 55 3.4824866850e-001 3.799470586e-001 -5.484493863e-001 - 56 5.7514679475e-001 5.694951907e-001 -5.872660326e-001 - 57 -3.9659097815e-001 7.901431915e-001 -4.673214459e-001 - 58 -6.3859842956e-002 8.107356404e-001 -5.819189302e-001 - 59 2.7540495393e-001 7.216127041e-001 -6.351592059e-001 - 60 -6.4053385190e-001 -7.198833871e-001 -2.673654680e-001 - 61 -3.1576742713e-001 -8.910768088e-001 -3.259954767e-001 - 62 1.8214853175e-002 -9.555902790e-001 -2.941350653e-001 - 63 3.1869927520e-001 -9.230696355e-001 -2.153444210e-001 - 64 4.5364517572e-001 -7.685988342e-001 -4.510674976e-001 - 65 -8.4103918887e-001 -4.473128513e-001 -3.042438093e-001 - 66 -6.3914483007e-001 -3.604937055e-001 -2.224343462e-001 - 67 -3.4565273623e-001 -5.815409326e-001 -2.427352911e-001 - 68 -9.2065505654e-002 -7.082773869e-001 -2.104591676e-001 - 69 1.8043161721e-001 -6.633629308e-001 -2.650290455e-001 - 70 4.9262537946e-001 -5.086101307e-001 -2.596493069e-001 - 71 8.2801329988e-001 -5.062594361e-001 -2.410297875e-001 - 72 -9.2462594596e-001 -1.635868611e-001 -3.439566798e-001 - 73 -4.3518373256e-001 -2.153764403e-001 -1.124315033e-001 - 74 -1.9418341731e-001 -1.914694872e-001 -3.062935181e-001 - 75 -2.3739028906e-002 -3.943547691e-001 -3.012044125e-001 - 76 2.9364380535e-001 -3.263922017e-001 -1.992205976e-001 - 77 6.1836581682e-001 -2.644421701e-001 -3.528349759e-001 - 78 9.5081285847e-001 -2.169435037e-001 -2.211117937e-001 - 79 -8.6800894694e-001 1.097094120e-001 -4.842771046e-001 - 80 -6.2973268891e-001 -3.141851717e-002 -3.609276130e-001 - 81 -3.3454972297e-001 4.424782162e-002 -3.096763154e-001 - 82 1.6226187572e-001 -1.140284788e-001 -3.597157332e-001 - 83 4.2899166059e-001 -2.529921321e-002 -2.625466668e-001 - 84 7.2963502892e-001 3.485802540e-003 -2.395694070e-001 - 85 8.9461204277e-001 5.341023613e-002 -4.436402147e-001 - 86 -9.7710419560e-001 1.010846103e-001 -1.872145598e-001 - 87 -6.1365648688e-001 2.570382737e-001 -2.662951619e-001 - 88 -2.4871056281e-001 3.072978258e-001 -3.168801600e-001 - 89 3.5970615620e-002 2.684506698e-001 -4.242999972e-001 - 90 2.7597931536e-001 2.419521829e-001 -2.522661982e-001 - 91 6.1501204062e-001 2.797065953e-001 -1.608396330e-001 - 92 8.9736096803e-001 3.267929217e-001 -2.965631114e-001 - 93 -8.7712908698e-001 3.891390340e-001 -2.814522648e-001 - 94 -6.8825666111e-001 6.299151802e-001 -3.598744708e-001 - 95 -2.5469052293e-001 6.370813814e-001 -1.536704914e-001 - 96 3.7163389867e-002 7.358495178e-001 -2.238073910e-001 - 97 2.2186488253e-001 5.689842121e-001 -3.628643836e-001 - 98 4.9052898925e-001 5.040341638e-001 -2.501652999e-001 - 99 7.5091493512e-001 6.016801392e-001 -2.722274236e-001 - 100 -5.1965916791e-001 8.354940404e-001 -1.786170700e-001 - 101 -1.9973027102e-001 9.307619857e-001 -3.062514421e-001 - 102 1.4276584338e-001 8.997749162e-001 -4.123384711e-001 - 103 3.1589928288e-001 9.296491478e-001 -1.896314967e-001 - 104 4.8020258305e-001 7.848634836e-001 -3.916564710e-001 - 105 -1.4400131753e-001 -9.891262501e-001 -2.988111732e-002 - 106 -6.4088108490e-001 -7.623047692e-001 9.034861857e-002 - 107 -4.4350448424e-001 -8.926091098e-001 -8.094906387e-002 - 108 1.2836751772e-001 -8.931612067e-001 2.469784667e-002 - 109 4.6305186341e-001 -8.836497604e-001 6.889174645e-002 - 110 6.1704183608e-001 -7.585928382e-001 -2.092756012e-001 - 111 -8.3496553152e-001 -5.501932945e-001 -1.094981623e-002 - 112 -4.8721422478e-001 -5.611695401e-001 -1.992187389e-002 - 113 -1.9086818534e-001 -7.134857362e-001 4.028986729e-002 - 114 7.8342544616e-002 -5.380829333e-001 -8.735450775e-003 - 115 3.5656079231e-001 -6.416555159e-001 -4.749744521e-002 - 116 5.6457840158e-001 -5.104096653e-001 8.909532796e-002 - 117 7.3487316083e-001 -6.771062966e-001 3.858107982e-002 - 118 -9.6693342232e-001 -2.461381153e-001 -6.675166347e-002 - 119 -6.8097282724e-001 -2.927998496e-001 8.268980911e-002 - 120 -2.1889705350e-001 -3.924239349e-001 -2.074626568e-002 - 121 2.9424995253e-002 -2.115104155e-001 -5.058177412e-002 - 122 3.3043587979e-001 -3.073074222e-001 7.047101551e-002 - 123 6.3407100746e-001 -2.757028811e-001 -8.017573807e-002 - 124 9.0964703934e-001 -4.118303867e-001 5.420328796e-002 - 125 -9.9337925989e-001 1.805882894e-002 1.134527454e-001 - 126 -7.2441500245e-001 -4.260996259e-002 -9.665655019e-002 - 127 -4.8362710268e-001 1.163971404e-001 -2.454885329e-002 - 128 -2.0876802989e-001 -3.181530732e-002 8.590935297e-003 - 129 -2.5550580401e-002 9.053883941e-002 -1.982680087e-001 - 130 2.3638751607e-001 -9.326954003e-003 -3.399383068e-002 - 131 5.4878758728e-001 -1.901679371e-002 2.579690377e-002 - 132 8.9703835626e-001 -1.139924751e-001 5.226626819e-002 - 133 9.8728850798e-001 1.033162287e-001 -1.207773082e-001 - 134 -9.3954431130e-001 3.414017423e-001 2.648276683e-002 - 135 -7.2999396766e-001 2.727612926e-001 9.460700695e-003 - 136 -2.8220575421e-001 3.007789171e-001 -6.137090643e-002 - 137 1.8688215284e-002 1.969259120e-001 7.170573439e-002 - 138 3.6746061918e-001 2.794120492e-001 2.074041454e-002 - 139 7.2852389648e-001 1.909605410e-001 5.420845460e-002 - 140 9.0756349473e-001 4.195205969e-001 -1.819263386e-002 - 141 -7.8154944444e-001 6.207090950e-001 -6.245546974e-002 - 142 -5.2128860916e-001 5.093034618e-001 -8.954785686e-002 - 143 -3.1145915002e-001 7.055463648e-001 1.224775000e-001 - 144 2.9896315104e-002 4.292429385e-001 -1.412588230e-001 - 145 3.0625678618e-001 6.285798171e-001 -6.970890804e-002 - 146 5.6260473818e-001 5.006291184e-001 8.848515924e-002 - 147 7.5773231236e-001 6.473794316e-001 8.210733655e-002 - 148 -5.8763276213e-001 7.994955699e-001 1.244771934e-001 - 149 -2.8508803788e-001 9.584999137e-001 1.651518627e-003 - 150 1.0090826022e-002 7.297173991e-001 5.252114363e-002 - 151 2.7688783816e-001 9.566438555e-001 9.036403025e-002 - 152 5.7214538058e-001 8.166317523e-001 -7.590944419e-002 - 153 1.6289109015e-002 9.958803635e-001 -8.920181890e-002 - 154 -5.3502126499e-001 -7.562987063e-001 3.765162840e-001 - 155 -3.5427636826e-001 -9.076626289e-001 2.250262361e-001 - 156 -7.1904659036e-002 -9.533796190e-001 2.930819369e-001 - 157 2.5044344433e-001 -9.175313883e-001 3.088919439e-001 - 158 5.7593335848e-001 -7.523901549e-001 3.197027090e-001 - 159 -7.6871664318e-001 -5.589146139e-001 3.109488335e-001 - 160 -5.0007541675e-001 -4.485278772e-001 2.069347048e-001 - 161 -2.5783714164e-001 -5.919738577e-001 2.703222801e-001 - 162 -3.8249085069e-003 -7.020927566e-001 2.950997492e-001 - 163 2.8618403670e-001 -6.192138218e-001 2.221934635e-001 - 164 4.6375139475e-001 -4.438458924e-001 4.161435759e-001 - 165 7.9968960474e-001 -5.048823856e-001 3.249466308e-001 - 166 -9.2464559944e-001 -2.996919982e-001 2.349791940e-001 - 167 -4.4750478476e-001 -8.066523109e-002 2.004371817e-001 - 168 -2.6089593469e-001 -2.477053618e-001 2.526928171e-001 - 169 1.1384727106e-002 -3.990787128e-001 2.159584079e-001 - 170 2.5767128361e-001 -2.654514543e-001 3.192708541e-001 - 171 6.2130553871e-001 -2.612067970e-001 2.385092085e-001 - 172 9.3306562688e-001 -1.895357449e-001 3.057200334e-001 - 173 -8.9795811589e-001 -6.513938144e-002 4.352333651e-001 - 174 -7.2620921580e-001 -1.688778108e-002 2.162238628e-001 - 175 -1.8296774271e-001 9.444199408e-003 4.362431979e-001 - 176 2.8690008191e-002 -4.753740482e-002 2.199897150e-001 - 177 3.7812432993e-001 -1.037258540e-002 2.457876447e-001 - 178 6.8936861058e-001 -1.712827013e-002 3.345031867e-001 - 179 9.7016512791e-001 1.419667100e-001 1.965326432e-001 - 180 -9.1390000473e-001 2.560917773e-001 3.149663198e-001 - 181 -6.2606232466e-001 2.263414705e-001 2.670738221e-001 - 182 -2.9729912783e-001 2.003617464e-001 2.489778118e-001 - 183 -2.4467811331e-002 2.819902283e-001 3.850776630e-001 - 184 2.5338512140e-001 2.211307555e-001 3.035996874e-001 - 185 6.0170835080e-001 2.479589241e-001 2.770322442e-001 - 186 8.5995589722e-001 4.154256136e-001 2.964749797e-001 - 187 -7.9747494768e-001 5.549250043e-001 2.368373865e-001 - 188 -4.9850918948e-001 4.705361254e-001 1.717746463e-001 - 189 -1.5208688382e-001 4.580018479e-001 1.286148579e-001 - 190 -3.8231824520e-002 6.748522891e-001 3.410885400e-001 - 191 1.6136589122e-001 4.569883026e-001 1.566293381e-001 - 192 3.0272645852e-001 6.769814045e-001 2.190337997e-001 - 193 6.6639789016e-001 6.157721177e-001 4.204028443e-001 - 194 -5.5813727123e-001 7.097513692e-001 4.298090036e-001 - 195 -3.1770867500e-001 8.881704025e-001 3.319857433e-001 - 196 -4.5459959169e-002 9.709239472e-001 2.350320843e-001 - 197 2.0128833795e-001 8.993413186e-001 3.881600151e-001 - 198 5.2295412320e-001 8.152888796e-001 2.486423684e-001 - 199 -2.6084007219e-001 -7.943938216e-001 5.485443579e-001 - 200 4.9575745886e-002 -8.114514528e-001 5.823133045e-001 - 201 3.6480562694e-001 -7.608262811e-001 5.367124225e-001 - 202 -5.5573791624e-001 -5.831713385e-001 5.925086990e-001 - 203 -3.5486217008e-001 -4.652560431e-001 4.838469852e-001 - 204 -8.9341170901e-002 -4.968873783e-001 5.765055937e-001 - 205 1.7135893806e-001 -5.394949536e-001 4.814446973e-001 - 206 6.1960943321e-001 -5.362274824e-001 5.731877854e-001 - 207 -7.7470678385e-001 -3.498377448e-001 5.267285364e-001 - 208 -5.9230012354e-001 -2.505695048e-001 4.123059401e-001 - 209 -3.3304758059e-001 -2.292253471e-001 6.027897585e-001 - 210 -4.4391622347e-002 -2.629723456e-001 4.578340476e-001 - 211 2.2007908341e-001 -3.077076860e-001 6.418937152e-001 - 212 4.7425538166e-001 -1.539498602e-001 5.347425031e-001 - 213 7.9025764146e-001 -2.638822342e-001 5.530452303e-001 - 214 -7.0935852583e-001 -8.273011189e-002 6.999758637e-001 - 215 -5.1239509422e-001 3.633007338e-002 4.956357908e-001 - 216 -3.0054565479e-001 3.117749073e-002 7.179230861e-001 - 217 1.5267795681e-001 -1.794490893e-003 4.887731924e-001 - 218 2.6744449033e-001 -2.870688862e-003 7.341327672e-001 - 219 4.7868345473e-001 1.458907747e-001 5.343971511e-001 - 220 8.7393790167e-001 1.066542883e-001 4.741913178e-001 - 221 -7.9860635108e-001 1.789700254e-001 5.746282507e-001 - 222 -5.0407151782e-001 3.511848339e-001 4.687259325e-001 - 223 -2.8100177085e-001 2.833377642e-001 5.963203513e-001 - 224 -1.6206949966e-002 1.574078411e-001 7.150896217e-001 - 225 2.3809210865e-001 3.005025563e-001 6.245455826e-001 - 226 4.4928015620e-001 4.466084585e-001 3.884276026e-001 - 227 7.3386003998e-001 3.444436960e-001 5.854980620e-001 - 228 -7.2135483687e-001 4.632008975e-001 5.148709823e-001 - 229 -2.8412551577e-001 5.300532896e-001 3.985949188e-001 - 230 -5.7272110968e-002 4.661924565e-001 6.176684669e-001 - 231 1.8774687206e-001 5.359975996e-001 4.692680745e-001 - 232 4.8630764451e-001 5.043134895e-001 7.135634368e-001 - 233 -2.5374277020e-001 7.673713159e-001 5.888598065e-001 - 234 4.4181323334e-002 7.821203456e-001 6.215591490e-001 - 235 3.8529310464e-001 7.358202385e-001 5.568822139e-001 - 236 -2.7476421430e-001 -5.476924397e-001 7.902769250e-001 - 237 6.3658350879e-002 -5.829135442e-001 8.100366752e-001 - 238 3.5921220870e-001 -5.560568666e-001 7.495114075e-001 - 239 -5.5233216555e-001 -3.387952391e-001 7.616737914e-001 - 240 -3.0413042582e-001 -2.607751874e-001 9.162428644e-001 - 241 -3.6572712616e-002 -3.282241560e-001 9.438915934e-001 - 242 2.5218395944e-001 -2.974789645e-001 9.208200241e-001 - 243 5.5228120984e-001 -3.066995981e-001 7.751908281e-001 - 244 -4.8484312855e-001 -1.723737861e-002 8.744312514e-001 - 245 -1.5964310864e-001 1.335254927e-002 9.870844883e-001 - 246 -3.5081318461e-002 -1.615651977e-001 7.264382984e-001 - 247 4.5528364670e-001 -4.661520911e-002 8.891253141e-001 - 248 7.1570474138e-001 -5.337681864e-003 6.983825827e-001 - 249 -5.8696032970e-001 2.520827349e-001 7.693710850e-001 - 250 -3.0702991931e-001 2.925368580e-001 9.056239918e-001 - 251 1.5617659749e-003 3.187218916e-001 9.478469907e-001 - 252 2.8574160746e-001 2.688850283e-001 9.198111633e-001 - 253 5.4369986149e-001 2.291119826e-001 8.074021044e-001 - 254 -4.5006173933e-001 5.446821773e-001 7.076480461e-001 - 255 -1.5464234909e-001 5.603064551e-001 8.137213399e-001 - 256 1.8905812483e-001 5.645499817e-001 8.034552533e-001 - 257 1.2502564869e-001 -9.844610590e-003 9.921046666e-001 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 6 4 242 247 218 257 - 2 6 4 165 116 158 164 - 3 6 4 165 158 206 164 - 4 6 4 117 115 109 116 - 5 6 4 117 116 109 158 - 6 6 4 117 165 116 158 - 7 6 4 223 255 254 250 - 8 6 4 187 181 228 180 - 9 6 4 108 157 156 105 - 10 6 4 108 162 156 157 - 11 6 4 200 162 156 199 - 12 6 4 200 156 162 157 - 13 6 4 38 10 33 32 - 14 6 4 174 167 181 215 - 15 6 4 127 181 174 167 - 16 6 4 192 151 198 152 - 17 6 4 226 232 227 193 - 18 6 4 50 92 85 51 - 19 6 4 50 99 92 51 - 20 6 4 113 108 156 105 - 21 6 4 113 156 108 162 - 22 6 4 163 116 122 164 - 23 6 4 163 116 115 122 - 24 6 4 163 158 116 164 - 25 6 4 163 162 108 157 - 26 6 4 163 109 116 158 - 27 6 4 163 109 115 116 - 28 6 4 163 157 109 158 - 29 6 4 163 157 108 109 - 30 6 4 163 108 115 109 - 31 6 4 246 242 218 257 - 32 6 4 170 163 122 164 - 33 6 4 161 156 162 199 - 34 6 4 176 121 128 137 - 35 6 4 176 170 121 122 - 36 6 4 230 223 255 254 - 37 6 4 230 229 223 254 - 38 6 4 230 255 234 233 - 39 6 4 230 255 223 250 - 40 6 4 230 251 255 250 - 41 6 4 230 254 255 233 - 42 6 4 230 229 254 233 - 43 6 4 222 223 229 254 - 44 6 4 173 180 174 125 - 45 6 4 168 176 121 128 - 46 6 4 110 117 115 109 - 47 6 4 110 115 117 116 - 48 6 4 201 206 158 164 - 49 6 4 201 238 206 164 - 50 6 4 201 157 163 158 - 51 6 4 201 158 163 164 - 52 6 4 205 200 201 238 - 53 6 4 205 200 238 237 - 54 6 4 205 200 162 157 - 55 6 4 205 201 200 157 - 56 6 4 205 163 170 164 - 57 6 4 205 238 201 164 - 58 6 4 205 201 163 164 - 59 6 4 205 162 163 157 - 60 6 4 205 163 201 157 - 61 6 4 155 156 161 199 - 62 6 4 155 113 156 105 - 63 6 4 155 107 113 105 - 64 6 4 155 112 107 106 - 65 6 4 155 113 107 112 - 66 6 4 155 161 112 106 - 67 6 4 155 161 113 112 - 68 6 4 155 156 113 162 - 69 6 4 155 161 156 162 - 70 6 4 155 113 161 162 - 71 6 4 63 157 108 105 - 72 6 4 63 108 157 109 - 73 6 4 63 108 62 105 - 74 6 4 63 115 108 109 - 75 6 4 63 115 110 64 - 76 6 4 63 110 115 109 - 77 6 4 11 33 38 10 - 78 6 4 66 112 119 111 - 79 6 4 66 111 118 65 - 80 6 4 66 119 118 111 - 81 6 4 66 118 72 65 - 82 6 4 235 226 198 193 - 83 6 4 235 232 226 193 - 84 6 4 235 226 232 231 - 85 6 4 235 192 226 231 - 86 6 4 235 226 192 198 - 87 6 4 190 234 230 231 - 88 6 4 190 230 234 233 - 89 6 4 190 229 230 233 - 90 6 4 190 233 234 196 - 91 6 4 190 195 233 196 - 92 6 4 190 229 233 195 - 93 6 4 219 226 232 227 - 94 6 4 219 218 212 247 - 95 6 4 146 186 147 193 - 96 6 4 146 147 198 193 - 97 6 4 146 198 226 193 - 98 6 4 146 147 186 140 - 99 6 4 146 192 226 198 - 100 6 4 146 198 147 152 - 101 6 4 146 192 198 152 - 102 6 4 146 99 147 140 - 103 6 4 146 147 99 152 - 104 6 4 248 219 178 212 - 105 6 4 248 219 220 178 - 106 6 4 248 219 212 247 - 107 6 4 248 220 219 227 - 108 6 4 171 116 165 164 - 109 6 4 171 212 170 164 - 110 6 4 171 122 116 164 - 111 6 4 171 170 122 164 - 112 6 4 143 229 190 195 - 113 6 4 143 149 195 196 - 114 6 4 143 195 190 196 - 115 6 4 136 128 127 81 - 116 6 4 19 18 14 49 - 117 6 4 84 85 92 133 - 118 6 4 84 85 50 92 - 119 6 4 84 78 85 133 - 120 6 4 84 132 78 133 - 121 6 4 98 99 50 51 - 122 6 4 98 152 99 104 - 123 6 4 98 146 99 152 - 124 6 4 101 153 149 96 - 125 6 4 101 102 153 96 - 126 6 4 101 58 102 96 - 127 6 4 53 101 58 57 - 128 6 4 53 58 101 96 - 129 6 4 41 40 33 81 - 130 6 4 39 45 52 15 - 131 6 4 39 46 52 45 - 132 6 4 39 38 45 15 - 133 6 4 39 11 38 15 - 134 6 4 39 38 11 33 - 135 6 4 39 40 11 15 - 136 6 4 39 11 40 33 - 137 6 4 39 33 40 81 - 138 6 4 39 38 79 45 - 139 6 4 241 242 246 257 - 140 6 4 241 246 236 240 - 141 6 4 241 246 245 257 - 142 6 4 241 245 246 240 - 143 6 4 204 246 241 237 - 144 6 4 204 241 236 237 - 145 6 4 204 236 241 246 - 146 6 4 204 236 200 237 - 147 6 4 204 200 205 237 - 148 6 4 204 200 236 199 - 149 6 4 204 162 200 199 - 150 6 4 204 205 200 162 - 151 6 4 204 161 162 199 - 152 6 4 216 244 245 250 - 153 6 4 216 246 245 240 - 154 6 4 216 245 244 240 - 155 6 4 252 218 247 257 - 156 6 4 182 176 128 137 - 157 6 4 182 128 136 137 - 158 6 4 182 223 222 215 - 159 6 4 182 127 128 167 - 160 6 4 182 127 136 128 - 161 6 4 182 222 223 229 - 162 6 4 182 181 167 215 - 163 6 4 182 222 181 215 - 164 6 4 182 181 127 167 - 165 6 4 224 230 223 250 - 166 6 4 224 251 230 250 - 167 6 4 224 246 218 257 - 168 6 4 224 218 252 257 - 169 6 4 224 252 251 257 - 170 6 4 224 223 216 250 - 171 6 4 224 245 246 257 - 172 6 4 224 251 245 257 - 173 6 4 224 216 246 245 - 174 6 4 224 245 251 250 - 175 6 4 224 216 245 250 - 176 6 4 256 234 230 255 - 177 6 4 256 230 251 255 - 178 6 4 256 230 234 231 - 179 6 4 256 234 235 231 - 180 6 4 256 235 232 231 - 181 6 4 194 222 229 254 - 182 6 4 194 228 222 254 - 183 6 4 194 229 143 195 - 184 6 4 194 233 229 195 - 185 6 4 194 254 229 233 - 186 6 4 249 223 254 250 - 187 6 4 249 223 222 254 - 188 6 4 249 222 228 254 - 189 6 4 249 216 223 250 - 190 6 4 249 244 216 250 - 191 6 4 249 222 223 215 - 192 6 4 249 223 216 215 - 193 6 4 249 216 244 215 - 194 6 4 160 119 112 111 - 195 6 4 160 159 119 111 - 196 6 4 160 112 161 106 - 197 6 4 160 111 112 106 - 198 6 4 160 159 111 106 - 199 6 4 169 161 113 162 - 200 6 4 169 168 161 210 - 201 6 4 169 176 168 210 - 202 6 4 169 168 176 121 - 203 6 4 169 204 161 162 - 204 6 4 169 161 204 210 - 205 6 4 169 205 170 210 - 206 6 4 169 170 176 210 - 207 6 4 169 176 170 121 - 208 6 4 169 205 204 162 - 209 6 4 169 204 205 210 - 210 6 4 169 163 205 162 - 211 6 4 169 170 205 163 - 212 6 4 169 121 170 122 - 213 6 4 169 170 163 122 - 214 6 4 211 241 237 242 - 215 6 4 211 246 241 242 - 216 6 4 211 241 246 237 - 217 6 4 211 237 238 242 - 218 6 4 211 205 238 237 - 219 6 4 211 246 204 237 - 220 6 4 211 204 205 237 - 221 6 4 211 246 242 218 - 222 6 4 211 204 246 210 - 223 6 4 211 205 204 210 - 224 6 4 211 238 205 164 - 225 6 4 211 218 242 247 - 226 6 4 211 170 212 164 - 227 6 4 211 205 170 164 - 228 6 4 211 170 205 210 - 229 6 4 31 10 38 32 - 230 6 4 31 66 72 65 - 231 6 4 31 66 26 32 - 232 6 4 31 26 66 65 - 233 6 4 60 112 111 106 - 234 6 4 60 107 112 106 - 235 6 4 60 66 26 65 - 236 6 4 60 111 66 65 - 237 6 4 60 112 66 111 - 238 6 4 154 155 161 199 - 239 6 4 154 161 155 106 - 240 6 4 154 160 161 106 - 241 6 4 154 160 159 202 - 242 6 4 154 159 160 106 - 243 6 4 68 113 107 105 - 244 6 4 68 62 108 105 - 245 6 4 68 108 113 105 - 246 6 4 61 62 68 105 - 247 6 4 61 68 107 105 - 248 6 4 5 10 31 32 - 249 6 4 5 31 26 32 - 250 6 4 5 33 10 32 - 251 6 4 166 118 119 111 - 252 6 4 166 119 159 111 - 253 6 4 166 173 174 125 - 254 6 4 166 174 118 125 - 255 6 4 166 174 119 118 - 256 6 4 126 66 118 72 - 257 6 4 126 66 119 118 - 258 6 4 126 118 86 72 - 259 6 4 126 119 174 118 - 260 6 4 126 86 118 125 - 261 6 4 126 118 174 125 - 262 6 4 126 127 174 167 - 263 6 4 126 174 119 167 - 264 6 4 73 168 128 167 - 265 6 4 73 119 66 112 - 266 6 4 73 160 168 167 - 267 6 4 73 119 160 167 - 268 6 4 73 160 119 112 - 269 6 4 73 126 119 167 - 270 6 4 73 126 66 119 - 271 6 4 73 128 127 167 - 272 6 4 73 127 126 167 - 273 6 4 73 127 128 81 - 274 6 4 197 190 234 196 - 275 6 4 197 235 234 231 - 276 6 4 197 192 235 231 - 277 6 4 197 192 151 198 - 278 6 4 197 235 192 198 - 279 6 4 197 234 190 231 - 280 6 4 197 190 192 231 - 281 6 4 150 143 190 196 - 282 6 4 150 190 197 196 - 283 6 4 150 197 190 192 - 284 6 4 150 151 153 196 - 285 6 4 150 197 151 196 - 286 6 4 150 197 192 151 - 287 6 4 150 153 149 196 - 288 6 4 150 149 143 196 - 289 6 4 150 149 153 96 - 290 6 4 225 232 226 231 - 291 6 4 225 219 226 232 - 292 6 4 225 256 232 231 - 293 6 4 225 256 252 232 - 294 6 4 225 252 224 218 - 295 6 4 225 230 256 231 - 296 6 4 225 224 252 251 - 297 6 4 225 252 256 251 - 298 6 4 225 230 224 251 - 299 6 4 225 256 230 251 - 300 6 4 185 226 219 227 - 301 6 4 185 227 186 193 - 302 6 4 185 226 227 193 - 303 6 4 185 186 146 193 - 304 6 4 185 146 226 193 - 305 6 4 185 220 186 227 - 306 6 4 185 219 220 227 - 307 6 4 185 220 219 178 - 308 6 4 185 186 220 179 - 309 6 4 185 220 178 179 - 310 6 4 191 226 146 192 - 311 6 4 191 226 192 231 - 312 6 4 191 192 190 231 - 313 6 4 191 150 190 192 - 314 6 4 243 248 212 247 - 315 6 4 243 206 238 164 - 316 6 4 243 212 206 164 - 317 6 4 243 211 242 247 - 318 6 4 243 211 238 242 - 319 6 4 243 238 211 164 - 320 6 4 243 211 212 164 - 321 6 4 243 212 218 247 - 322 6 4 243 218 211 247 - 323 6 4 243 212 211 218 - 324 6 4 253 219 232 227 - 325 6 4 253 248 219 227 - 326 6 4 253 219 225 232 - 327 6 4 253 225 252 232 - 328 6 4 253 219 248 247 - 329 6 4 253 225 219 218 - 330 6 4 253 252 225 218 - 331 6 4 253 218 219 247 - 332 6 4 253 252 218 247 - 333 6 4 124 117 165 116 - 334 6 4 124 71 117 116 - 335 6 4 124 165 171 116 - 336 6 4 172 132 171 178 - 337 6 4 172 178 220 179 - 338 6 4 172 132 178 179 - 339 6 4 172 171 124 165 - 340 6 4 172 124 171 132 - 341 6 4 172 132 179 133 - 342 6 4 172 78 132 133 - 343 6 4 172 124 132 78 - 344 6 4 94 52 46 45 - 345 6 4 94 46 52 57 - 346 6 4 37 85 84 78 - 347 6 4 43 19 14 49 - 348 6 4 43 50 19 49 - 349 6 4 43 50 84 85 - 350 6 4 43 84 37 85 - 351 6 4 29 25 4 64 - 352 6 4 29 25 3 4 - 353 6 4 29 8 36 4 - 354 6 4 56 50 19 51 - 355 6 4 56 98 50 51 - 356 6 4 56 98 99 104 - 357 6 4 56 99 98 51 - 358 6 4 123 84 132 78 - 359 6 4 123 71 124 116 - 360 6 4 123 124 71 78 - 361 6 4 123 132 124 78 - 362 6 4 123 124 171 116 - 363 6 4 123 171 124 132 - 364 6 4 123 116 171 122 - 365 6 4 82 43 36 49 - 366 6 4 91 50 99 92 - 367 6 4 91 50 98 99 - 368 6 4 91 92 99 140 - 369 6 4 91 84 50 92 - 370 6 4 91 99 146 140 - 371 6 4 91 98 146 99 - 372 6 4 91 84 92 133 - 373 6 4 145 192 146 152 - 374 6 4 145 146 98 152 - 375 6 4 145 191 146 192 - 376 6 4 145 151 192 152 - 377 6 4 145 152 98 104 - 378 6 4 145 150 192 151 - 379 6 4 145 150 191 192 - 380 6 4 129 128 121 137 - 381 6 4 129 136 128 137 - 382 6 4 129 128 136 81 - 383 6 4 103 153 102 96 - 384 6 4 103 150 153 96 - 385 6 4 103 150 151 153 - 386 6 4 103 145 150 96 - 387 6 4 103 150 145 151 - 388 6 4 103 152 145 104 - 389 6 4 103 151 145 152 - 390 6 4 59 58 21 54 - 391 6 4 95 101 149 96 - 392 6 4 95 149 150 96 - 393 6 4 95 143 150 149 - 394 6 4 95 53 101 96 - 395 6 4 95 53 46 57 - 396 6 4 95 101 53 57 - 397 6 4 88 129 136 81 - 398 6 4 88 136 127 81 - 399 6 4 88 95 53 46 - 400 6 4 88 40 41 81 - 401 6 4 88 41 129 81 - 402 6 4 88 39 40 81 - 403 6 4 88 142 95 46 - 404 6 4 88 95 142 136 - 405 6 4 47 52 39 46 - 406 6 4 47 88 53 46 - 407 6 4 47 39 88 46 - 408 6 4 47 88 39 40 - 409 6 4 47 40 39 15 - 410 6 4 47 39 52 15 - 411 6 4 6 33 11 10 - 412 6 4 80 86 79 72 - 413 6 4 80 126 86 72 - 414 6 4 80 127 73 81 - 415 6 4 80 126 73 127 - 416 6 4 80 79 39 38 - 417 6 4 80 81 73 32 - 418 6 4 80 33 81 32 - 419 6 4 80 33 39 81 - 420 6 4 80 31 38 32 - 421 6 4 80 31 79 38 - 422 6 4 80 38 33 32 - 423 6 4 80 38 39 33 - 424 6 4 80 79 31 72 - 425 6 4 80 66 126 72 - 426 6 4 80 73 66 32 - 427 6 4 80 73 126 66 - 428 6 4 80 66 31 32 - 429 6 4 80 31 66 72 - 430 6 4 203 161 204 199 - 431 6 4 203 154 199 202 - 432 6 4 203 154 161 199 - 433 6 4 203 199 236 202 - 434 6 4 203 204 236 199 - 435 6 4 203 160 154 202 - 436 6 4 203 154 160 161 - 437 6 4 203 236 239 202 - 438 6 4 203 160 168 161 - 439 6 4 203 161 168 210 - 440 6 4 203 204 161 210 - 441 6 4 175 216 224 223 - 442 6 4 175 216 223 215 - 443 6 4 175 223 182 215 - 444 6 4 175 167 168 215 - 445 6 4 175 182 167 215 - 446 6 4 175 168 176 210 - 447 6 4 175 224 216 246 - 448 6 4 175 128 168 167 - 449 6 4 175 182 128 167 - 450 6 4 175 176 168 128 - 451 6 4 175 182 176 128 - 452 6 4 214 249 244 215 - 453 6 4 221 228 181 180 - 454 6 4 221 222 249 215 - 455 6 4 221 249 222 228 - 456 6 4 221 214 173 215 - 457 6 4 221 249 214 215 - 458 6 4 221 181 222 215 - 459 6 4 221 222 181 228 - 460 6 4 221 174 181 215 - 461 6 4 221 173 174 215 - 462 6 4 221 181 174 180 - 463 6 4 221 174 173 180 - 464 6 4 67 66 60 112 - 465 6 4 67 61 60 23 - 466 6 4 67 73 66 112 - 467 6 4 67 60 107 112 - 468 6 4 67 60 61 107 - 469 6 4 67 61 68 107 - 470 6 4 67 107 113 112 - 471 6 4 67 68 113 107 - 472 6 4 24 68 61 62 - 473 6 4 183 230 225 231 - 474 6 4 183 190 230 231 - 475 6 4 183 191 190 231 - 476 6 4 183 224 225 230 - 477 6 4 183 230 190 229 - 478 6 4 183 176 182 137 - 479 6 4 183 175 182 176 - 480 6 4 183 182 175 223 - 481 6 4 183 224 230 223 - 482 6 4 183 175 224 223 - 483 6 4 183 223 230 229 - 484 6 4 183 182 223 229 - 485 6 4 139 146 186 140 - 486 6 4 139 146 185 186 - 487 6 4 139 186 179 140 - 488 6 4 139 186 185 179 - 489 6 4 139 91 146 140 - 490 6 4 139 140 179 133 - 491 6 4 139 92 140 133 - 492 6 4 139 91 92 133 - 493 6 4 139 92 91 140 - 494 6 4 139 179 132 133 - 495 6 4 139 178 132 179 - 496 6 4 139 185 178 179 - 497 6 4 139 132 84 133 - 498 6 4 139 84 91 133 - 499 6 4 131 139 185 178 - 500 6 4 131 123 171 122 - 501 6 4 131 171 132 178 - 502 6 4 131 132 139 178 - 503 6 4 131 171 123 132 - 504 6 4 131 91 139 84 - 505 6 4 131 123 84 132 - 506 6 4 131 84 139 132 - 507 6 4 213 248 220 178 - 508 6 4 213 220 172 178 - 509 6 4 213 248 178 212 - 510 6 4 213 178 171 212 - 511 6 4 213 172 171 178 - 512 6 4 213 243 212 206 - 513 6 4 213 243 248 212 - 514 6 4 213 206 212 164 - 515 6 4 213 212 171 164 - 516 6 4 213 171 172 165 - 517 6 4 213 165 206 164 - 518 6 4 213 171 165 164 - 519 6 4 188 143 194 229 - 520 6 4 188 194 222 229 - 521 6 4 188 194 187 228 - 522 6 4 188 222 194 228 - 523 6 4 188 222 182 229 - 524 6 4 188 182 222 181 - 525 6 4 188 187 181 228 - 526 6 4 188 181 222 228 - 527 6 4 188 127 182 181 - 528 6 4 188 136 182 127 - 529 6 4 188 142 136 127 - 530 6 4 135 127 188 181 - 531 6 4 135 142 188 127 - 532 6 4 135 188 142 141 - 533 6 4 135 86 126 125 - 534 6 4 135 174 127 181 - 535 6 4 135 126 127 174 - 536 6 4 135 181 187 180 - 537 6 4 135 188 187 181 - 538 6 4 135 188 141 187 - 539 6 4 135 126 174 125 - 540 6 4 135 174 180 125 - 541 6 4 135 174 181 180 - 542 6 4 87 94 46 45 - 543 6 4 87 94 142 46 - 544 6 4 87 46 39 45 - 545 6 4 87 142 135 127 - 546 6 4 87 142 88 46 - 547 6 4 87 39 79 45 - 548 6 4 87 39 80 79 - 549 6 4 87 88 39 46 - 550 6 4 87 136 142 127 - 551 6 4 87 88 136 127 - 552 6 4 87 88 142 136 - 553 6 4 87 79 80 86 - 554 6 4 87 127 80 81 - 555 6 4 87 80 39 81 - 556 6 4 87 126 80 127 - 557 6 4 87 135 126 127 - 558 6 4 87 88 127 81 - 559 6 4 87 39 88 81 - 560 6 4 87 80 126 86 - 561 6 4 87 126 135 86 - 562 6 4 148 188 142 143 - 563 6 4 148 142 188 141 - 564 6 4 148 143 149 195 - 565 6 4 148 194 143 195 - 566 6 4 148 141 188 187 - 567 6 4 148 188 194 187 - 568 6 4 148 194 188 143 - 569 6 4 30 29 4 64 - 570 6 4 30 29 36 4 - 571 6 4 44 43 19 14 - 572 6 4 44 43 37 85 - 573 6 4 44 50 85 51 - 574 6 4 44 50 43 85 - 575 6 4 44 19 50 51 - 576 6 4 44 19 43 50 - 577 6 4 42 82 36 49 - 578 6 4 42 41 82 49 - 579 6 4 42 36 8 14 - 580 6 4 42 48 41 49 - 581 6 4 42 43 14 49 - 582 6 4 42 36 43 49 - 583 6 4 42 43 36 14 - 584 6 4 42 14 18 49 - 585 6 4 42 18 48 49 - 586 6 4 35 3 8 4 - 587 6 4 35 29 3 4 - 588 6 4 35 8 29 4 - 589 6 4 35 29 8 36 - 590 6 4 35 8 42 36 - 591 6 4 35 82 42 41 - 592 6 4 35 82 29 36 - 593 6 4 35 42 82 36 - 594 6 4 114 121 169 122 - 595 6 4 114 163 115 122 - 596 6 4 114 169 163 122 - 597 6 4 114 113 68 108 - 598 6 4 114 163 108 115 - 599 6 4 114 169 113 162 - 600 6 4 114 163 169 162 - 601 6 4 114 113 108 162 - 602 6 4 114 108 163 162 - 603 6 4 55 19 50 49 - 604 6 4 55 19 56 50 - 605 6 4 55 56 98 50 - 606 6 4 77 37 84 78 - 607 6 4 77 84 123 78 - 608 6 4 77 71 37 78 - 609 6 4 77 123 71 78 - 610 6 4 77 37 43 84 - 611 6 4 77 30 37 71 - 612 6 4 83 84 43 50 - 613 6 4 83 50 43 49 - 614 6 4 83 43 82 49 - 615 6 4 83 77 43 84 - 616 6 4 83 91 84 50 - 617 6 4 83 91 131 84 - 618 6 4 83 82 43 36 - 619 6 4 83 43 77 36 - 620 6 4 83 131 123 84 - 621 6 4 83 123 77 84 - 622 6 4 90 55 98 50 - 623 6 4 90 83 82 49 - 624 6 4 90 55 50 49 - 625 6 4 90 50 83 49 - 626 6 4 90 98 91 50 - 627 6 4 90 91 83 50 - 628 6 4 22 59 21 54 - 629 6 4 22 55 59 54 - 630 6 4 22 56 55 19 - 631 6 4 22 59 55 56 - 632 6 4 22 48 55 54 - 633 6 4 22 18 19 49 - 634 6 4 22 19 55 49 - 635 6 4 22 48 18 49 - 636 6 4 22 55 48 49 - 637 6 4 100 101 95 57 - 638 6 4 100 95 101 149 - 639 6 4 100 143 95 149 - 640 6 4 100 148 143 149 - 641 6 4 100 46 94 57 - 642 6 4 100 95 46 57 - 643 6 4 100 142 95 143 - 644 6 4 100 148 142 143 - 645 6 4 100 94 142 141 - 646 6 4 100 142 148 141 - 647 6 4 100 142 94 46 - 648 6 4 100 95 142 46 - 649 6 4 144 136 129 137 - 650 6 4 144 88 129 136 - 651 6 4 144 129 90 137 - 652 6 4 144 53 95 96 - 653 6 4 144 95 88 136 - 654 6 4 144 88 95 53 - 655 6 4 144 95 150 96 - 656 6 4 144 150 145 96 - 657 6 4 144 191 145 150 - 658 6 4 20 58 53 54 - 659 6 4 20 21 58 54 - 660 6 4 20 53 58 57 - 661 6 4 20 53 47 54 - 662 6 4 20 47 21 54 - 663 6 4 20 46 53 57 - 664 6 4 20 47 53 46 - 665 6 4 20 47 52 15 - 666 6 4 20 52 46 57 - 667 6 4 20 52 47 46 - 668 6 4 16 40 47 15 - 669 6 4 16 47 20 15 - 670 6 4 16 20 47 21 - 671 6 4 16 40 11 1 - 672 6 4 16 11 40 15 - 673 6 4 16 48 40 1 - 674 6 4 16 48 47 40 - 675 6 4 16 21 47 54 - 676 6 4 16 47 48 54 - 677 6 4 208 160 203 202 - 678 6 4 208 207 159 202 - 679 6 4 208 159 160 202 - 680 6 4 208 239 207 202 - 681 6 4 208 203 239 202 - 682 6 4 208 160 159 119 - 683 6 4 208 160 119 167 - 684 6 4 208 168 160 167 - 685 6 4 208 203 160 168 - 686 6 4 208 166 159 207 - 687 6 4 208 159 166 119 - 688 6 4 208 239 214 207 - 689 6 4 208 119 174 167 - 690 6 4 208 167 174 215 - 691 6 4 208 168 167 215 - 692 6 4 208 119 166 174 - 693 6 4 208 173 214 215 - 694 6 4 208 214 173 207 - 695 6 4 208 174 173 215 - 696 6 4 208 173 166 207 - 697 6 4 208 166 173 174 - 698 6 4 209 175 246 210 - 699 6 4 209 175 216 246 - 700 6 4 209 246 204 210 - 701 6 4 209 204 203 210 - 702 6 4 209 246 216 240 - 703 6 4 209 203 168 210 - 704 6 4 209 168 175 210 - 705 6 4 209 216 175 215 - 706 6 4 209 236 246 240 - 707 6 4 209 236 204 246 - 708 6 4 209 203 204 236 - 709 6 4 209 203 208 168 - 710 6 4 209 244 239 240 - 711 6 4 209 216 244 240 - 712 6 4 209 239 236 240 - 713 6 4 209 203 236 239 - 714 6 4 209 208 203 239 - 715 6 4 209 175 168 215 - 716 6 4 209 168 208 215 - 717 6 4 209 244 216 215 - 718 6 4 209 208 214 215 - 719 6 4 209 214 208 239 - 720 6 4 209 214 244 215 - 721 6 4 209 244 214 239 - 722 6 4 120 67 113 112 - 723 6 4 120 73 67 112 - 724 6 4 120 168 169 121 - 725 6 4 120 168 121 128 - 726 6 4 120 73 168 128 - 727 6 4 120 169 114 121 - 728 6 4 120 114 169 113 - 729 6 4 120 67 68 113 - 730 6 4 120 68 114 113 - 731 6 4 120 169 161 113 - 732 6 4 120 169 168 161 - 733 6 4 120 113 161 112 - 734 6 4 120 160 73 112 - 735 6 4 120 73 160 168 - 736 6 4 120 161 160 112 - 737 6 4 120 168 160 161 - 738 6 4 28 24 25 62 - 739 6 4 28 68 24 62 - 740 6 4 28 3 29 25 - 741 6 4 28 24 3 25 - 742 6 4 28 35 29 3 - 743 6 4 28 3 24 2 - 744 6 4 28 35 3 2 - 745 6 4 28 67 61 68 - 746 6 4 28 61 24 68 - 747 6 4 28 61 67 23 - 748 6 4 28 24 61 23 - 749 6 4 28 24 23 2 - 750 6 4 217 225 224 218 - 751 6 4 217 225 183 224 - 752 6 4 217 175 183 176 - 753 6 4 217 183 175 224 - 754 6 4 217 219 225 218 - 755 6 4 217 175 176 210 - 756 6 4 217 224 246 218 - 757 6 4 217 224 175 246 - 758 6 4 217 176 170 210 - 759 6 4 217 246 175 210 - 760 6 4 217 212 219 218 - 761 6 4 217 170 211 210 - 762 6 4 217 246 211 218 - 763 6 4 217 211 246 210 - 764 6 4 217 211 212 218 - 765 6 4 217 211 170 212 - 766 6 4 189 142 188 143 - 767 6 4 189 188 142 136 - 768 6 4 189 95 142 143 - 769 6 4 189 142 95 136 - 770 6 4 189 143 188 229 - 771 6 4 189 150 95 143 - 772 6 4 189 188 182 229 - 773 6 4 189 182 188 136 - 774 6 4 189 95 144 136 - 775 6 4 189 144 95 150 - 776 6 4 189 190 143 229 - 777 6 4 189 182 183 229 - 778 6 4 189 150 143 190 - 779 6 4 189 191 150 190 - 780 6 4 189 191 144 150 - 781 6 4 189 183 190 229 - 782 6 4 189 183 191 190 - 783 6 4 189 191 183 137 - 784 6 4 189 182 136 137 - 785 6 4 189 183 182 137 - 786 6 4 189 136 144 137 - 787 6 4 189 144 191 137 - 788 6 4 93 94 87 45 - 789 6 4 93 79 87 86 - 790 6 4 93 87 79 45 - 791 6 4 93 87 135 86 - 792 6 4 93 142 94 141 - 793 6 4 93 87 94 142 - 794 6 4 93 135 142 141 - 795 6 4 93 135 87 142 - 796 6 4 9 36 43 14 - 797 6 4 9 8 36 14 - 798 6 4 9 30 77 36 - 799 6 4 9 77 30 37 - 800 6 4 9 43 44 14 - 801 6 4 9 44 43 37 - 802 6 4 9 77 43 36 - 803 6 4 9 43 77 37 - 804 6 4 9 36 8 4 - 805 6 4 9 30 36 4 - 806 6 4 7 8 35 3 - 807 6 4 7 3 35 2 - 808 6 4 7 42 35 8 - 809 6 4 97 59 55 54 - 810 6 4 97 59 102 104 - 811 6 4 97 58 59 54 - 812 6 4 97 102 59 58 - 813 6 4 97 53 144 96 - 814 6 4 97 102 58 96 - 815 6 4 97 58 53 96 - 816 6 4 97 53 58 54 - 817 6 4 97 102 103 104 - 818 6 4 97 103 102 96 - 819 6 4 97 144 145 96 - 820 6 4 97 90 55 98 - 821 6 4 97 145 98 104 - 822 6 4 97 98 56 104 - 823 6 4 97 55 56 98 - 824 6 4 97 56 59 104 - 825 6 4 97 55 59 56 - 826 6 4 97 103 145 104 - 827 6 4 97 145 103 96 - 828 6 4 97 145 90 98 - 829 6 4 97 144 90 145 - 830 6 4 76 114 115 122 - 831 6 4 76 121 114 122 - 832 6 4 76 77 83 123 - 833 6 4 76 29 82 36 - 834 6 4 76 83 77 36 - 835 6 4 76 123 131 122 - 836 6 4 76 131 83 122 - 837 6 4 76 83 131 123 - 838 6 4 76 82 83 36 - 839 6 4 70 30 29 36 - 840 6 4 70 77 30 36 - 841 6 4 70 29 76 36 - 842 6 4 70 76 77 36 - 843 6 4 70 29 30 64 - 844 6 4 70 30 110 64 - 845 6 4 70 110 30 71 - 846 6 4 70 30 77 71 - 847 6 4 70 110 115 64 - 848 6 4 70 77 123 71 - 849 6 4 70 77 76 123 - 850 6 4 70 71 123 116 - 851 6 4 70 115 110 116 - 852 6 4 70 117 71 116 - 853 6 4 70 110 117 116 - 854 6 4 70 110 71 117 - 855 6 4 70 115 116 122 - 856 6 4 70 76 115 122 - 857 6 4 70 116 123 122 - 858 6 4 70 123 76 122 - 859 6 4 138 91 98 146 - 860 6 4 138 91 90 98 - 861 6 4 138 131 83 91 - 862 6 4 138 83 90 91 - 863 6 4 138 185 139 146 - 864 6 4 138 139 91 146 - 865 6 4 138 131 139 185 - 866 6 4 138 139 131 91 - 867 6 4 138 98 145 146 - 868 6 4 138 90 145 98 - 869 6 4 138 145 191 146 - 870 6 4 138 185 146 226 - 871 6 4 138 146 191 226 - 872 6 4 138 145 144 191 - 873 6 4 138 90 144 145 - 874 6 4 138 191 144 137 - 875 6 4 138 144 90 137 - 876 6 4 89 88 144 53 - 877 6 4 89 47 53 54 - 878 6 4 89 47 88 53 - 879 6 4 89 53 97 54 - 880 6 4 89 144 97 53 - 881 6 4 89 144 88 129 - 882 6 4 89 48 47 54 - 883 6 4 89 97 144 90 - 884 6 4 89 129 88 41 - 885 6 4 89 90 144 129 - 886 6 4 89 47 48 40 - 887 6 4 89 88 47 40 - 888 6 4 89 97 55 54 - 889 6 4 89 97 90 55 - 890 6 4 89 48 41 40 - 891 6 4 89 41 88 40 - 892 6 4 89 55 90 49 - 893 6 4 89 48 55 49 - 894 6 4 89 55 48 54 - 895 6 4 89 41 48 49 - 896 6 4 89 82 129 41 - 897 6 4 89 90 129 82 - 898 6 4 89 82 41 49 - 899 6 4 89 90 82 49 - 900 6 4 17 18 48 1 - 901 6 4 17 48 16 1 - 902 6 4 17 22 48 18 - 903 6 4 17 21 16 54 - 904 6 4 17 16 48 54 - 905 6 4 17 22 21 54 - 906 6 4 17 48 22 54 - 907 6 4 75 114 120 68 - 908 6 4 75 120 67 68 - 909 6 4 75 67 28 68 - 910 6 4 75 120 114 121 - 911 6 4 75 82 76 29 - 912 6 4 75 114 76 121 - 913 6 4 75 35 82 29 - 914 6 4 75 28 35 29 - 915 6 4 75 76 82 121 - 916 6 4 75 82 35 41 - 917 6 4 130 176 121 122 - 918 6 4 130 83 131 122 - 919 6 4 130 121 176 137 - 920 6 4 130 121 76 122 - 921 6 4 130 76 83 122 - 922 6 4 130 83 138 131 - 923 6 4 130 82 76 121 - 924 6 4 130 83 76 82 - 925 6 4 130 129 121 137 - 926 6 4 130 138 90 137 - 927 6 4 130 90 138 83 - 928 6 4 130 129 82 121 - 929 6 4 130 90 129 137 - 930 6 4 130 129 90 82 - 931 6 4 130 90 83 82 - 932 6 4 177 185 219 178 - 933 6 4 177 131 185 178 - 934 6 4 177 131 138 185 - 935 6 4 177 217 170 212 - 936 6 4 177 219 217 212 - 937 6 4 177 130 138 131 - 938 6 4 177 178 219 212 - 939 6 4 177 171 131 178 - 940 6 4 177 130 131 122 - 941 6 4 177 217 176 170 - 942 6 4 177 171 178 212 - 943 6 4 177 170 171 212 - 944 6 4 177 171 170 122 - 945 6 4 177 131 171 122 - 946 6 4 177 170 176 122 - 947 6 4 177 176 130 122 - 948 6 4 134 93 135 86 - 949 6 4 134 86 135 125 - 950 6 4 134 135 180 125 - 951 6 4 134 135 93 141 - 952 6 4 134 135 187 180 - 953 6 4 134 135 141 187 - 954 6 4 12 35 42 41 - 955 6 4 12 7 6 1 - 956 6 4 12 42 48 41 - 957 6 4 12 40 48 1 - 958 6 4 12 41 48 40 - 959 6 4 12 41 40 33 - 960 6 4 12 11 40 1 - 961 6 4 12 40 11 33 - 962 6 4 12 6 11 1 - 963 6 4 12 11 6 33 - 964 6 4 13 42 7 8 - 965 6 4 13 18 42 14 - 966 6 4 13 42 8 14 - 967 6 4 13 48 18 1 - 968 6 4 13 48 42 18 - 969 6 4 13 7 12 1 - 970 6 4 13 12 48 1 - 971 6 4 13 12 42 48 - 972 6 4 13 35 7 42 - 973 6 4 13 12 35 42 - 974 6 4 13 12 7 35 - 975 6 4 69 75 28 68 - 976 6 4 69 28 75 29 - 977 6 4 69 28 29 25 - 978 6 4 69 114 75 68 - 979 6 4 69 28 25 62 - 980 6 4 69 68 28 62 - 981 6 4 69 75 76 29 - 982 6 4 69 76 75 114 - 983 6 4 69 25 63 62 - 984 6 4 69 63 25 64 - 985 6 4 69 25 29 64 - 986 6 4 69 114 108 115 - 987 6 4 69 114 68 108 - 988 6 4 69 76 114 115 - 989 6 4 69 63 108 62 - 990 6 4 69 108 68 62 - 991 6 4 69 115 63 64 - 992 6 4 69 108 63 115 - 993 6 4 69 70 76 115 - 994 6 4 69 76 70 29 - 995 6 4 69 70 115 64 - 996 6 4 69 29 70 64 - 997 6 4 27 28 75 67 - 998 6 4 27 28 67 23 - 999 6 4 27 66 73 32 - 1000 6 4 27 67 73 66 - 1001 6 4 27 5 26 32 - 1002 6 4 27 5 23 26 - 1003 6 4 27 26 66 32 - 1004 6 4 27 23 60 26 - 1005 6 4 27 67 60 23 - 1006 6 4 27 23 5 2 - 1007 6 4 27 28 23 2 - 1008 6 4 27 60 66 26 - 1009 6 4 27 60 67 66 - 1010 6 4 184 219 185 226 - 1011 6 4 184 177 185 219 - 1012 6 4 184 225 219 226 - 1013 6 4 184 185 138 226 - 1014 6 4 184 177 138 185 - 1015 6 4 184 225 217 219 - 1016 6 4 184 217 177 219 - 1017 6 4 184 138 191 226 - 1018 6 4 184 225 226 231 - 1019 6 4 184 183 225 231 - 1020 6 4 184 183 217 225 - 1021 6 4 184 191 138 137 - 1022 6 4 184 226 191 231 - 1023 6 4 184 191 183 231 - 1024 6 4 184 183 191 137 - 1025 6 4 184 217 183 176 - 1026 6 4 184 177 217 176 - 1027 6 4 184 138 130 137 - 1028 6 4 184 177 130 138 - 1029 6 4 184 176 183 137 - 1030 6 4 184 130 176 137 - 1031 6 4 184 130 177 176 - 1032 6 4 74 75 120 67 - 1033 6 4 74 27 75 67 - 1034 6 4 74 67 120 73 - 1035 6 4 74 27 67 73 - 1036 6 4 74 120 75 121 - 1037 6 4 74 120 121 128 - 1038 6 4 74 73 120 128 - 1039 6 4 74 73 128 81 - 1040 6 4 74 73 81 32 - 1041 6 4 74 27 73 32 - 1042 6 4 74 129 41 81 - 1043 6 4 74 128 129 81 - 1044 6 4 74 121 129 128 - 1045 6 4 74 81 33 32 - 1046 6 4 74 41 33 81 - 1047 6 4 74 129 82 41 - 1048 6 4 74 82 75 41 - 1049 6 4 74 82 129 121 - 1050 6 4 74 75 82 121 - 1051 6 4 34 75 28 35 - 1052 6 4 34 75 27 28 - 1053 6 4 34 35 28 2 - 1054 6 4 34 28 27 2 - 1055 6 4 34 74 27 75 - 1056 6 4 34 75 35 41 - 1057 6 4 34 74 75 41 - 1058 6 4 34 27 5 2 - 1059 6 4 34 74 41 33 - 1060 6 4 34 74 33 32 - 1061 6 4 34 27 74 32 - 1062 6 4 34 5 6 2 - 1063 6 4 34 6 7 2 - 1064 6 4 34 7 35 2 - 1065 6 4 34 12 6 33 - 1066 6 4 34 33 5 32 - 1067 6 4 34 5 27 32 - 1068 6 4 34 41 12 33 - 1069 6 4 34 35 12 41 - 1070 6 4 34 5 33 10 - 1071 6 4 34 33 6 10 - 1072 6 4 34 6 5 10 - 1073 6 4 34 12 7 6 - 1074 6 4 34 7 12 35 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 1074 MATERIAL: 1.0 NFLAGS: 0 - group_0 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 729 730 - 731 732 733 734 735 736 737 738 739 740 - 741 742 743 744 745 746 747 748 749 750 - 751 752 753 754 755 756 757 758 759 760 - 761 762 763 764 765 766 767 768 769 770 - 771 772 773 774 775 776 777 778 779 780 - 781 782 783 784 785 786 787 788 789 790 - 791 792 793 794 795 796 797 798 799 800 - 801 802 803 804 805 806 807 808 809 810 - 811 812 813 814 815 816 817 818 819 820 - 821 822 823 824 825 826 827 828 829 830 - 831 832 833 834 835 836 837 838 839 840 - 841 842 843 844 845 846 847 848 849 850 - 851 852 853 854 855 856 857 858 859 860 - 861 862 863 864 865 866 867 868 869 870 - 871 872 873 874 875 876 877 878 879 880 - 881 882 883 884 885 886 887 888 889 890 - 891 892 893 894 895 896 897 898 899 900 - 901 902 903 904 905 906 907 908 909 910 - 911 912 913 914 915 916 917 918 919 920 - 921 922 923 924 925 926 927 928 929 930 - 931 932 933 934 935 936 937 938 939 940 - 941 942 943 944 945 946 947 948 949 950 - 951 952 953 954 955 956 957 958 959 960 - 961 962 963 964 965 966 967 968 969 970 - 971 972 973 974 975 976 977 978 979 980 - 981 982 983 984 985 986 987 988 989 990 - 991 992 993 994 995 996 997 998 999 1000 - 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 - 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 - 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 - 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 - 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 - 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 - 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 - 1071 1072 1073 1074 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/cube.neu b/cpp/nudg++/trunk/Grid/3D/cube.neu deleted file mode 100644 index 533a23b..0000000 --- a/cpp/nudg++/trunk/Grid/3D/cube.neu +++ /dev/null @@ -1,2704 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -cube -PROGRAM: Gambit VERSION: 1.3.0 - 9 Apr 2001 10:50:07 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 414 1585 1 1 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 1.0000000000e+00 -1.0000000000e+00 1.0000000000e+00 - 2 1.0000000000e+00 -1.0000000000e+00 -1.0000000000e+00 - 3 1.0000000000e+00 -1.0000000000e+00 6.6666666667e-01 - 4 1.0000000000e+00 -1.0000000000e+00 3.3333333333e-01 - 5 1.0000000000e+00 -1.0000000000e+00 0.0000000000e+00 - 6 1.0000000000e+00 -1.0000000000e+00 -3.3333333333e-01 - 7 1.0000000000e+00 -1.0000000000e+00 -6.6666666667e-01 - 8 1.0000000000e+00 1.0000000000e+00 -1.0000000000e+00 - 9 1.0000000000e+00 6.6666666667e-01 -1.0000000000e+00 - 10 1.0000000000e+00 3.3333333333e-01 -1.0000000000e+00 - 11 1.0000000000e+00 0.0000000000e+00 -1.0000000000e+00 - 12 1.0000000000e+00 -3.3333333333e-01 -1.0000000000e+00 - 13 1.0000000000e+00 -6.6666666667e-01 -1.0000000000e+00 - 14 1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 - 15 1.0000000000e+00 1.0000000000e+00 6.6666666667e-01 - 16 1.0000000000e+00 1.0000000000e+00 3.3333333333e-01 - 17 1.0000000000e+00 1.0000000000e+00 0.0000000000e+00 - 18 1.0000000000e+00 1.0000000000e+00 -3.3333333333e-01 - 19 1.0000000000e+00 1.0000000000e+00 -6.6666666667e-01 - 20 1.0000000000e+00 -6.6666666667e-01 1.0000000000e+00 - 21 1.0000000000e+00 -3.3333333333e-01 1.0000000000e+00 - 22 1.0000000000e+00 0.0000000000e+00 1.0000000000e+00 - 23 1.0000000000e+00 3.3333333333e-01 1.0000000000e+00 - 24 1.0000000000e+00 6.6666666667e-01 1.0000000000e+00 - 25 1.0000000000e+00 7.7055764656e-01 7.6916569338e-01 - 26 1.0000000000e+00 4.4552598709e-01 1.4739533145e-03 - 27 1.0000000000e+00 2.0832179065e-01 1.5607380473e-01 - 28 1.0000000000e+00 7.7391624805e-01 -7.6699750251e-01 - 29 1.0000000000e+00 -7.6415065770e-01 7.6948322021e-01 - 30 1.0000000000e+00 -7.7146391036e-01 -7.6583977123e-01 - 31 1.0000000000e+00 -4.7771906950e-01 7.3084899975e-01 - 32 1.0000000000e+00 4.7014577957e-01 -6.8178383284e-01 - 33 1.0000000000e+00 -6.7847809855e-01 4.5144632020e-01 - 34 1.0000000000e+00 7.3567147275e-01 -4.8873142925e-01 - 35 1.0000000000e+00 -7.3405676874e-01 -4.8250076428e-01 - 36 1.0000000000e+00 -4.5921689586e-01 -6.8295528001e-01 - 37 1.0000000000e+00 4.5695380143e-01 6.8936724943e-01 - 38 1.0000000000e+00 7.3147326189e-01 4.9146338695e-01 - 39 1.0000000000e+00 7.2468253889e-01 -1.6289526202e-01 - 40 1.0000000000e+00 -1.3988934297e-01 7.3366779246e-01 - 41 1.0000000000e+00 -7.7221328952e-01 1.4428814507e-01 - 42 1.0000000000e+00 1.2426458745e-01 -7.3000238473e-01 - 43 1.0000000000e+00 -1.5589313956e-01 -7.7398799656e-01 - 44 1.0000000000e+00 -7.3328524801e-01 -1.4793693321e-01 - 45 1.0000000000e+00 1.5113210741e-01 7.7690777785e-01 - 46 1.0000000000e+00 7.2301285756e-01 1.6510488140e-01 - 47 1.0000000000e+00 4.4390026186e-01 3.2766721948e-01 - 48 1.0000000000e+00 1.0693143365e-01 4.6484981869e-01 - 49 1.0000000000e+00 -2.8680129038e-01 4.3375406568e-01 - 50 1.0000000000e+00 -4.5437070131e-01 8.3559092654e-02 - 51 1.0000000000e+00 4.5181416156e-01 -3.2484262430e-01 - 52 1.0000000000e+00 2.1226053502e-01 -4.6918416980e-01 - 53 1.0000000000e+00 -4.4612593436e-01 -3.0363037965e-01 - 54 1.0000000000e+00 -1.1184407279e-01 -4.6287729335e-01 - 55 1.0000000000e+00 -1.9155286987e-01 -1.3801044295e-01 - 56 1.0000000000e+00 -8.0824309786e-02 1.4118289649e-01 - 57 1.0000000000e+00 1.3243376297e-01 -1.5524258192e-01 - 58 -1.0000000000e+00 1.0000000000e+00 -1.0000000000e+00 - 59 -6.6666666667e-01 1.0000000000e+00 -1.0000000000e+00 - 60 -3.3333333333e-01 1.0000000000e+00 -1.0000000000e+00 - 61 0.0000000000e+00 1.0000000000e+00 -1.0000000000e+00 - 62 3.3333333333e-01 1.0000000000e+00 -1.0000000000e+00 - 63 6.6666666667e-01 1.0000000000e+00 -1.0000000000e+00 - 64 -1.0000000000e+00 1.0000000000e+00 1.0000000000e+00 - 65 -1.0000000000e+00 1.0000000000e+00 6.6666666667e-01 - 66 -1.0000000000e+00 1.0000000000e+00 3.3333333333e-01 - 67 -1.0000000000e+00 1.0000000000e+00 0.0000000000e+00 - 68 -1.0000000000e+00 1.0000000000e+00 -3.3333333333e-01 - 69 -1.0000000000e+00 1.0000000000e+00 -6.6666666667e-01 - 70 6.6666666667e-01 1.0000000000e+00 1.0000000000e+00 - 71 3.3333333333e-01 1.0000000000e+00 1.0000000000e+00 - 72 0.0000000000e+00 1.0000000000e+00 1.0000000000e+00 - 73 -3.3333333333e-01 1.0000000000e+00 1.0000000000e+00 - 74 -6.6666666667e-01 1.0000000000e+00 1.0000000000e+00 - 75 -7.6699750251e-01 1.0000000000e+00 7.7391624805e-01 - 76 1.4739533145e-03 1.0000000000e+00 4.4552598709e-01 - 77 1.5607380473e-01 1.0000000000e+00 2.0832179065e-01 - 78 -7.6583977123e-01 1.0000000000e+00 -7.7146391036e-01 - 79 7.6916569338e-01 1.0000000000e+00 7.7055764656e-01 - 80 7.6948322021e-01 1.0000000000e+00 -7.6415065770e-01 - 81 7.3084899975e-01 1.0000000000e+00 -4.7771906950e-01 - 82 -4.8873142925e-01 1.0000000000e+00 7.3567147275e-01 - 83 -6.8178383284e-01 1.0000000000e+00 4.7014577957e-01 - 84 4.5144632020e-01 1.0000000000e+00 -6.7847809855e-01 - 85 -4.8250076428e-01 1.0000000000e+00 -7.3405676874e-01 - 86 -6.8295528001e-01 1.0000000000e+00 -4.5921689586e-01 - 87 6.8936724943e-01 1.0000000000e+00 4.5695380143e-01 - 88 4.9146338695e-01 1.0000000000e+00 7.3147326189e-01 - 89 -1.6289526202e-01 1.0000000000e+00 7.2468253889e-01 - 90 7.3366779246e-01 1.0000000000e+00 -1.3988934297e-01 - 91 1.4428814507e-01 1.0000000000e+00 -7.7221328952e-01 - 92 -7.3000238473e-01 1.0000000000e+00 1.2426458745e-01 - 93 -1.4793693321e-01 1.0000000000e+00 -7.3328524801e-01 - 94 -7.7398799656e-01 1.0000000000e+00 -1.5589313956e-01 - 95 1.6510488140e-01 1.0000000000e+00 7.2301285756e-01 - 96 7.7690777785e-01 1.0000000000e+00 1.5113210741e-01 - 97 3.2766721948e-01 1.0000000000e+00 4.4390026186e-01 - 98 4.6484981869e-01 1.0000000000e+00 1.0693143365e-01 - 99 4.3375406568e-01 1.0000000000e+00 -2.8680129038e-01 - 100 8.3559092654e-02 1.0000000000e+00 -4.5437070131e-01 - 101 -3.2484262430e-01 1.0000000000e+00 4.5181416156e-01 - 102 -4.6918416980e-01 1.0000000000e+00 2.1226053502e-01 - 103 -3.0363037965e-01 1.0000000000e+00 -4.4612593436e-01 - 104 -4.6287729335e-01 1.0000000000e+00 -1.1184407279e-01 - 105 -1.3801044295e-01 1.0000000000e+00 -1.9155286987e-01 - 106 1.4118289649e-01 1.0000000000e+00 -8.0824309786e-02 - 107 -1.5524258192e-01 1.0000000000e+00 1.3243376297e-01 - 108 -1.0000000000e+00 -1.0000000000e+00 -1.0000000000e+00 - 109 -1.0000000000e+00 -6.6666666667e-01 -1.0000000000e+00 - 110 -1.0000000000e+00 -3.3333333333e-01 -1.0000000000e+00 - 111 -1.0000000000e+00 0.0000000000e+00 -1.0000000000e+00 - 112 -1.0000000000e+00 3.3333333333e-01 -1.0000000000e+00 - 113 -1.0000000000e+00 6.6666666667e-01 -1.0000000000e+00 - 114 -1.0000000000e+00 -1.0000000000e+00 1.0000000000e+00 - 115 -1.0000000000e+00 -1.0000000000e+00 6.6666666667e-01 - 116 -1.0000000000e+00 -1.0000000000e+00 3.3333333333e-01 - 117 -1.0000000000e+00 -1.0000000000e+00 0.0000000000e+00 - 118 -1.0000000000e+00 -1.0000000000e+00 -3.3333333333e-01 - 119 -1.0000000000e+00 -1.0000000000e+00 -6.6666666667e-01 - 120 -1.0000000000e+00 6.6666666667e-01 1.0000000000e+00 - 121 -1.0000000000e+00 3.3333333333e-01 1.0000000000e+00 - 122 -1.0000000000e+00 0.0000000000e+00 1.0000000000e+00 - 123 -1.0000000000e+00 -3.3333333333e-01 1.0000000000e+00 - 124 -1.0000000000e+00 -6.6666666667e-01 1.0000000000e+00 - 125 -1.0000000000e+00 -7.6505084084e-01 7.7397694379e-01 - 126 -1.0000000000e+00 -1.8456524172e-01 1.3390073999e-01 - 127 -1.0000000000e+00 5.0967812861e-01 -3.9815785748e-03 - 128 -1.0000000000e+00 -7.6549860080e-01 -7.7055966593e-01 - 129 -1.0000000000e+00 7.7059262737e-01 7.6378682685e-01 - 130 -1.0000000000e+00 7.7119998099e-01 -7.6502830094e-01 - 131 -1.0000000000e+00 7.3515597480e-01 -4.8239162260e-01 - 132 -1.0000000000e+00 -4.8317678602e-01 7.3625131383e-01 - 133 -1.0000000000e+00 -6.7884449204e-01 4.7029255884e-01 - 134 -1.0000000000e+00 4.5651434738e-01 -6.7790932862e-01 - 135 -1.0000000000e+00 -4.8137850675e-01 -7.3155039490e-01 - 136 -1.0000000000e+00 -6.8264010697e-01 -4.5682049119e-01 - 137 -1.0000000000e+00 4.5413262728e-01 6.7470820756e-01 - 138 -1.0000000000e+00 7.3427207834e-01 4.7973017356e-01 - 139 -1.0000000000e+00 -1.4930904835e-01 7.2954843873e-01 - 140 -1.0000000000e+00 7.3760792085e-01 -1.5959100898e-01 - 141 -1.0000000000e+00 1.4783972902e-01 -7.6844773657e-01 - 142 -1.0000000000e+00 -7.3007297620e-01 1.2541764155e-01 - 143 -1.0000000000e+00 -1.4498954479e-01 -7.2868552625e-01 - 144 -1.0000000000e+00 -7.7427683569e-01 -1.5432809314e-01 - 145 -1.0000000000e+00 1.4454949977e-01 7.6618643906e-01 - 146 -1.0000000000e+00 7.3718185212e-01 1.5585678378e-01 - 147 -1.0000000000e+00 4.4902846360e-01 2.8749128764e-01 - 148 -1.0000000000e+00 8.3716625275e-02 4.3202293733e-01 - 149 -1.0000000000e+00 4.5127949271e-01 -2.9482087515e-01 - 150 -1.0000000000e+00 9.4169008420e-02 -4.4008545594e-01 - 151 -1.0000000000e+00 -3.1219528597e-01 4.5083800409e-01 - 152 -1.0000000000e+00 -4.7187683603e-01 2.1342521602e-01 - 153 -1.0000000000e+00 -3.0083480068e-01 -4.3824800142e-01 - 154 -1.0000000000e+00 -4.6597424879e-01 -1.0694976145e-01 - 155 -1.0000000000e+00 -1.3366262859e-01 -1.7159044267e-01 - 156 -1.0000000000e+00 1.8126525053e-01 -8.3397354496e-03 - 157 6.6666666667e-01 -1.0000000000e+00 -1.0000000000e+00 - 158 3.3333333333e-01 -1.0000000000e+00 -1.0000000000e+00 - 159 0.0000000000e+00 -1.0000000000e+00 -1.0000000000e+00 - 160 -3.3333333333e-01 -1.0000000000e+00 -1.0000000000e+00 - 161 -6.6666666667e-01 -1.0000000000e+00 -1.0000000000e+00 - 162 -6.6666666667e-01 -1.0000000000e+00 1.0000000000e+00 - 163 -3.3333333333e-01 -1.0000000000e+00 1.0000000000e+00 - 164 0.0000000000e+00 -1.0000000000e+00 1.0000000000e+00 - 165 3.3333333333e-01 -1.0000000000e+00 1.0000000000e+00 - 166 6.6666666667e-01 -1.0000000000e+00 1.0000000000e+00 - 167 7.7055764656e-01 -1.0000000000e+00 7.6916569338e-01 - 168 4.4552598709e-01 -1.0000000000e+00 1.4739533145e-03 - 169 2.0832179065e-01 -1.0000000000e+00 1.5607380473e-01 - 170 7.7391624805e-01 -1.0000000000e+00 -7.6699750251e-01 - 171 -7.6415065770e-01 -1.0000000000e+00 7.6948322021e-01 - 172 -7.7146391036e-01 -1.0000000000e+00 -7.6583977123e-01 - 173 -4.7771906950e-01 -1.0000000000e+00 7.3084899975e-01 - 174 4.7014577957e-01 -1.0000000000e+00 -6.8178383284e-01 - 175 -6.7847809855e-01 -1.0000000000e+00 4.5144632020e-01 - 176 7.3567147275e-01 -1.0000000000e+00 -4.8873142925e-01 - 177 -7.3405676874e-01 -1.0000000000e+00 -4.8250076428e-01 - 178 -4.5921689586e-01 -1.0000000000e+00 -6.8295528001e-01 - 179 4.5695380143e-01 -1.0000000000e+00 6.8936724943e-01 - 180 7.3147326189e-01 -1.0000000000e+00 4.9146338695e-01 - 181 7.2468253889e-01 -1.0000000000e+00 -1.6289526202e-01 - 182 -1.3988934297e-01 -1.0000000000e+00 7.3366779246e-01 - 183 -7.7221328952e-01 -1.0000000000e+00 1.4428814507e-01 - 184 1.2426458745e-01 -1.0000000000e+00 -7.3000238473e-01 - 185 -1.5589313956e-01 -1.0000000000e+00 -7.7398799656e-01 - 186 -7.3328524801e-01 -1.0000000000e+00 -1.4793693321e-01 - 187 7.2301285756e-01 -1.0000000000e+00 1.6510488140e-01 - 188 1.5113210741e-01 -1.0000000000e+00 7.7690777785e-01 - 189 4.4390026186e-01 -1.0000000000e+00 3.2766721948e-01 - 190 1.0693143365e-01 -1.0000000000e+00 4.6484981869e-01 - 191 -2.8680129038e-01 -1.0000000000e+00 4.3375406568e-01 - 192 -4.5437070131e-01 -1.0000000000e+00 8.3559092654e-02 - 193 4.5181416156e-01 -1.0000000000e+00 -3.2484262430e-01 - 194 2.1226053502e-01 -1.0000000000e+00 -4.6918416980e-01 - 195 -4.4612593436e-01 -1.0000000000e+00 -3.0363037965e-01 - 196 -1.1184407279e-01 -1.0000000000e+00 -4.6287729335e-01 - 197 -1.9155286987e-01 -1.0000000000e+00 -1.3801044295e-01 - 198 -8.0824309786e-02 -1.0000000000e+00 1.4118289649e-01 - 199 1.3243376297e-01 -1.0000000000e+00 -1.5524258192e-01 - 200 7.6916569338e-01 7.7055764656e-01 -1.0000000000e+00 - 201 1.4739533145e-03 4.4552598709e-01 -1.0000000000e+00 - 202 1.5607380473e-01 2.0832179065e-01 -1.0000000000e+00 - 203 7.6948322021e-01 -7.6415065770e-01 -1.0000000000e+00 - 204 -7.6699750251e-01 7.7391624805e-01 -1.0000000000e+00 - 205 -7.6583977123e-01 -7.7146391036e-01 -1.0000000000e+00 - 206 4.5144632020e-01 -6.7847809855e-01 -1.0000000000e+00 - 207 -4.8873142925e-01 7.3567147275e-01 -1.0000000000e+00 - 208 -6.8178383284e-01 4.7014577957e-01 -1.0000000000e+00 - 209 7.3084899975e-01 -4.7771906950e-01 -1.0000000000e+00 - 210 -4.8250076428e-01 -7.3405676874e-01 -1.0000000000e+00 - 211 -6.8295528001e-01 -4.5921689586e-01 -1.0000000000e+00 - 212 6.8936724943e-01 4.5695380143e-01 -1.0000000000e+00 - 213 4.9146338695e-01 7.3147326189e-01 -1.0000000000e+00 - 214 -1.6289526202e-01 7.2468253889e-01 -1.0000000000e+00 - 215 7.3366779246e-01 -1.3988934297e-01 -1.0000000000e+00 - 216 1.4428814507e-01 -7.7221328952e-01 -1.0000000000e+00 - 217 -7.3000238473e-01 1.2426458745e-01 -1.0000000000e+00 - 218 -7.7398799656e-01 -1.5589313956e-01 -1.0000000000e+00 - 219 -1.4793693321e-01 -7.3328524801e-01 -1.0000000000e+00 - 220 7.7690777785e-01 1.5113210741e-01 -1.0000000000e+00 - 221 1.6510488140e-01 7.2301285756e-01 -1.0000000000e+00 - 222 3.2766721948e-01 4.4390026186e-01 -1.0000000000e+00 - 223 4.6484981869e-01 1.0693143365e-01 -1.0000000000e+00 - 224 4.3375406568e-01 -2.8680129038e-01 -1.0000000000e+00 - 225 8.3559092654e-02 -4.5437070131e-01 -1.0000000000e+00 - 226 -3.2484262430e-01 4.5181416156e-01 -1.0000000000e+00 - 227 -4.6918416980e-01 2.1226053502e-01 -1.0000000000e+00 - 228 -3.0363037965e-01 -4.4612593436e-01 -1.0000000000e+00 - 229 -4.6287729335e-01 -1.1184407279e-01 -1.0000000000e+00 - 230 -1.3801044295e-01 -1.9155286987e-01 -1.0000000000e+00 - 231 1.4118289649e-01 -8.0824309786e-02 -1.0000000000e+00 - 232 -1.5524258192e-01 1.3243376297e-01 -1.0000000000e+00 - 233 7.7391624805e-01 -7.6699750251e-01 1.0000000000e+00 - 234 4.4552598709e-01 1.4739533145e-03 1.0000000000e+00 - 235 2.0832179065e-01 1.5607380473e-01 1.0000000000e+00 - 236 7.7055764656e-01 7.6916569338e-01 1.0000000000e+00 - 237 -7.7146391036e-01 -7.6583977123e-01 1.0000000000e+00 - 238 -7.6415065770e-01 7.6948322021e-01 1.0000000000e+00 - 239 4.7014577957e-01 -6.8178383284e-01 1.0000000000e+00 - 240 -4.7771906950e-01 7.3084899975e-01 1.0000000000e+00 - 241 7.3567147275e-01 -4.8873142925e-01 1.0000000000e+00 - 242 -6.7847809855e-01 4.5144632020e-01 1.0000000000e+00 - 243 -4.5921689586e-01 -6.8295528001e-01 1.0000000000e+00 - 244 -7.3405676874e-01 -4.8250076428e-01 1.0000000000e+00 - 245 4.5695380143e-01 6.8936724943e-01 1.0000000000e+00 - 246 7.3147326189e-01 4.9146338695e-01 1.0000000000e+00 - 247 7.2468253889e-01 -1.6289526202e-01 1.0000000000e+00 - 248 -1.3988934297e-01 7.3366779246e-01 1.0000000000e+00 - 249 -7.7221328952e-01 1.4428814507e-01 1.0000000000e+00 - 250 1.2426458745e-01 -7.3000238473e-01 1.0000000000e+00 - 251 -7.3328524801e-01 -1.4793693321e-01 1.0000000000e+00 - 252 -1.5589313956e-01 -7.7398799656e-01 1.0000000000e+00 - 253 1.5113210741e-01 7.7690777785e-01 1.0000000000e+00 - 254 7.2301285756e-01 1.6510488140e-01 1.0000000000e+00 - 255 4.4390026186e-01 3.2766721948e-01 1.0000000000e+00 - 256 1.0693143365e-01 4.6484981869e-01 1.0000000000e+00 - 257 -2.8680129038e-01 4.3375406568e-01 1.0000000000e+00 - 258 -4.5437070131e-01 8.3559092654e-02 1.0000000000e+00 - 259 4.5181416156e-01 -3.2484262430e-01 1.0000000000e+00 - 260 2.1226053502e-01 -4.6918416980e-01 1.0000000000e+00 - 261 -4.4612593436e-01 -3.0363037965e-01 1.0000000000e+00 - 262 -1.1184407279e-01 -4.6287729335e-01 1.0000000000e+00 - 263 -1.9155286987e-01 -1.3801044295e-01 1.0000000000e+00 - 264 -8.0824309786e-02 1.4118289649e-01 1.0000000000e+00 - 265 1.3243376297e-01 -1.5524258192e-01 1.0000000000e+00 - 266 7.6203429699e-01 3.6591601372e-01 1.6173832119e-01 - 267 7.4239844084e-01 6.5991115570e-01 -6.4583760500e-01 - 268 7.3578399420e-01 6.5299487114e-01 6.4999878407e-01 - 269 7.3531961441e-01 7.4893683195e-02 -5.5402129889e-01 - 270 7.3622226715e-01 -6.5491253138e-01 -6.4376527071e-01 - 271 7.0473963022e-01 2.6550281048e-01 -3.1642311811e-01 - 272 7.3106724024e-01 -6.4011597633e-01 6.5059286356e-01 - 273 7.0184224844e-01 8.6643747985e-02 4.7338042408e-02 - 274 7.4266248941e-01 3.9391398430e-02 6.5847516060e-01 - 275 7.3578804731e-01 -6.5328973532e-01 2.6636769995e-02 - 276 7.3380464315e-01 6.3738936186e-01 -3.2548978925e-01 - 277 7.3549342155e-01 6.3107377291e-01 1.2278573122e-03 - 278 7.2978103161e-01 6.3279545307e-01 3.2807850838e-01 - 279 6.9767135382e-01 -2.4984094501e-01 -3.0150604248e-01 - 280 7.2323441505e-01 -6.3782262802e-01 -3.1135603786e-01 - 281 6.9139301777e-01 -2.4224929512e-01 2.8910517693e-02 - 282 7.1165412664e-01 -3.0146989226e-01 6.3275694847e-01 - 283 1.6173832119e-01 7.6203429699e-01 3.6591601372e-01 - 284 -6.4583760500e-01 7.3195385933e-01 6.5991115570e-01 - 285 -5.5402129889e-01 7.3531961441e-01 7.4893683195e-02 - 286 -6.4376527071e-01 7.3622226715e-01 -6.5491253138e-01 - 287 -3.1642311811e-01 7.0473963022e-01 2.6550281048e-01 - 288 4.7338042408e-02 7.0184224844e-01 8.6643747985e-02 - 289 2.6636769995e-02 7.0404535532e-01 -6.5328973532e-01 - 290 -3.2548978925e-01 7.3380464315e-01 6.3738936186e-01 - 291 1.2278573122e-03 7.3549342155e-01 6.3107377291e-01 - 292 3.2807850838e-01 7.2978103161e-01 6.3279545307e-01 - 293 -3.0150604248e-01 6.9767135382e-01 -2.4984094501e-01 - 294 -3.1135603786e-01 7.2323441505e-01 -6.3782262802e-01 - 295 2.8910517693e-02 6.9139301777e-01 -2.4224929512e-01 - 296 -7.2102731466e-01 -3.2287910581e-01 2.6605466008e-01 - 297 -7.4224597216e-01 -6.4235734940e-01 6.6017359495e-01 - 298 -7.3837053776e-01 -5.5597466230e-01 7.7297694981e-02 - 299 -7.3504996300e-01 -6.4317238331e-01 -6.5297687054e-01 - 300 -7.2218871117e-01 6.4134776592e-01 -3.1226783991e-01 - 301 -6.9396430254e-01 3.2339725643e-02 -6.4573955536e-01 - 302 -7.2734320164e-01 -3.1489372253e-01 6.3887923956e-01 - 303 -6.7856663465e-01 3.8074094057e-01 -1.0238073021e-01 - 304 -6.9143080711e-01 2.6319025084e-02 6.4258593321e-01 - 305 -7.1793615487e-01 -6.3143091095e-01 -2.4672514696e-01 - 306 -7.1878558397e-01 -3.0906760693e-01 -6.3282799721e-01 - 307 -7.1036761999e-01 -4.5654207468e-02 -1.5343145467e-02 - 308 3.6591601372e-01 -7.6203429699e-01 1.6173832119e-01 - 309 7.4893683195e-02 -7.3531961441e-01 -5.5402129889e-01 - 310 2.6550281048e-01 -7.0473963022e-01 -3.1642311811e-01 - 311 8.6643747985e-02 -7.0184224844e-01 4.7338042408e-02 - 312 3.9391398430e-02 -7.4266248941e-01 6.5847516060e-01 - 313 6.3279545307e-01 -7.2978103161e-01 3.2807850838e-01 - 314 -2.4984094501e-01 -6.9767135382e-01 -3.0150604248e-01 - 315 -2.4224929512e-01 -6.9139301777e-01 2.8910517693e-02 - 316 -3.0146989226e-01 -7.1165412664e-01 6.3275694847e-01 - 317 1.6173832119e-01 3.6591601372e-01 -7.6203429699e-01 - 318 -3.1642311811e-01 2.6550281048e-01 -7.0473963022e-01 - 319 4.7338042408e-02 8.6643747985e-02 -7.0184224844e-01 - 320 3.2807850838e-01 6.3279545307e-01 -7.2978103161e-01 - 321 -3.0150604248e-01 -2.4984094501e-01 -6.9767135382e-01 - 322 -3.1135603786e-01 -6.3782262802e-01 -7.2323441505e-01 - 323 2.8910517693e-02 -2.4224929512e-01 -6.9139301777e-01 - 324 6.3275694847e-01 -3.0146989226e-01 -7.1165412664e-01 - 325 4.9396142364e-01 3.3592849970e-01 -6.6046726704e-01 - 326 3.6591601372e-01 1.6173832119e-01 7.6203429699e-01 - 327 2.6550281048e-01 -3.1642311811e-01 7.0473963022e-01 - 328 8.6643747985e-02 4.7338042408e-02 7.0184224844e-01 - 329 6.3279545307e-01 3.2807850838e-01 7.2978103161e-01 - 330 -2.4984094501e-01 -3.0150604248e-01 6.9767135382e-01 - 331 -2.4224929512e-01 2.8910517693e-02 6.9139301777e-01 - 332 -7.2951767347e-01 -7.8981714447e-01 -1.1177421231e-03 - 333 -7.9695694149e-03 -7.9887986183e-01 -8.0196052790e-01 - 334 6.8576169014e-01 -4.4989261031e-01 -1.3178081810e-01 - 335 5.1458829641e-01 -8.9771717787e-02 3.5496380925e-01 - 336 3.7815627456e-01 6.9231951237e-01 -8.4316059947e-02 - 337 -1.3045302033e-01 7.6164585352e-01 -4.4492650032e-01 - 338 -6.5499269962e-01 3.8318276405e-01 -6.5868365765e-01 - 339 -1.5030108392e-01 1.9310946763e-01 -5.1248591393e-02 - 340 -6.5489482880e-01 3.7816813588e-01 6.5453010798e-01 - 341 -6.5651381016e-01 2.3288634419e-01 2.7511885762e-01 - 342 -7.0194399357e-01 -2.0565369725e-01 -3.1218832731e-01 - 343 3.9347019792e-01 -6.6586959362e-01 -6.6176515818e-01 - 344 3.8040012121e-01 -6.5830606222e-01 6.6117155552e-01 - 345 7.1246713400e-01 -4.0694323182e-01 3.1721857190e-01 - 346 -4.9807858467e-01 -4.9931952357e-01 -4.4293376803e-01 - 347 -8.9771717787e-02 -5.1458829641e-01 3.5496380925e-01 - 348 -5.2916979790e-01 -6.1335635185e-01 3.6803644896e-01 - 349 -4.9081280828e-02 3.5431236029e-01 -4.2987486720e-01 - 350 3.3210867643e-01 1.1479181238e-02 -3.5781973600e-01 - 351 2.8701198101e-01 7.4878728390e-01 -4.2984455824e-01 - 352 -1.2157703936e-01 -4.7298446298e-01 -5.0792646408e-01 - 353 3.5745576024e-01 -8.0792993307e-02 -7.2106689215e-01 - 354 3.7396636605e-01 3.7396636605e-01 3.7396636605e-01 - 355 1.2348835170e-01 3.9943170547e-01 6.4838773012e-01 - 356 3.2601784915e-03 -4.5520237088e-01 7.2583234310e-01 - 357 -4.8637863994e-01 -4.9425932765e-01 7.5496435165e-01 - 358 3.0235874653e-01 -3.5484427214e-01 1.1722474545e-01 - 359 4.4002583623e-01 7.0776671171e-01 2.2555899620e-01 - 360 -7.5768017769e-01 2.7979382873e-01 -3.8483265042e-01 - 361 -1.4674232900e-01 -5.7170841843e-02 -3.7323838472e-01 - 362 -2.1619264781e-01 5.1271069050e-01 1.3101626188e-02 - 363 -3.9921379089e-01 2.7235507965e-01 7.7243685722e-01 - 364 -4.6652072668e-01 1.6657941043e-01 1.9700581208e-02 - 365 -7.4040770531e-01 -4.0411148220e-02 3.5696837306e-01 - 366 -6.1163049936e-01 5.6094515324e-01 3.6457243562e-01 - 367 -8.1921714544e-01 3.6467716098e-01 1.1789305508e-01 - 368 -4.2004564404e-01 -3.3127310872e-01 -4.4818054885e-02 - 369 2.7526459098e-01 -4.0529426932e-01 -7.6774215698e-01 - 370 5.7897007465e-01 -4.6272632480e-01 1.0314658284e-01 - 371 -5.8894038200e-02 -7.2479575872e-02 2.9651194811e-01 - 372 -2.7214756608e-01 -7.3631942272e-01 3.1387022138e-01 - 373 -7.0619189739e-01 -7.6227778196e-01 2.3972356319e-01 - 374 -3.7218531966e-01 3.5028260946e-01 -2.8080782294e-01 - 375 2.2050827742e-01 3.2557758689e-01 -1.3287881017e-01 - 376 5.9118920565e-01 1.2028057128e-02 -2.1609543264e-01 - 377 2.0198315382e-01 -3.3972761035e-01 -3.7348109484e-01 - 378 4.9708515406e-01 -1.7909827828e-01 -4.9212470651e-01 - 379 6.3868266344e-01 1.9944575429e-01 4.0356525779e-01 - 380 2.3591941595e-01 -4.8279714584e-01 4.1759425402e-01 - 381 9.4520285726e-02 -1.0001798719e-01 -7.8981995583e-02 - 382 -3.9789593220e-01 7.3567903601e-03 -5.4809188843e-01 - 383 -2.5537014008e-01 3.0438503623e-01 3.7519019842e-01 - 384 -1.7078563571e-01 4.7526898980e-01 7.1446311474e-01 - 385 -4.3081015348e-01 -5.4893001914e-02 -2.1541923285e-01 - 386 2.1315889060e-01 -1.1825466156e-01 4.5886290073e-01 - 387 -4.1011920571e-01 -1.1172927916e-01 2.3805744946e-01 - 388 -4.8826593161e-01 5.4759961367e-01 -4.7295051813e-01 - 389 3.5946065187e-01 1.2627065182e-01 1.2304213643e-01 - 390 5.3319430351e-01 3.8631895185e-01 -6.8182647228e-02 - 391 4.0849980712e-01 3.0519697070e-01 -3.7060341239e-01 - 392 5.6137029082e-02 3.6364316940e-01 1.7273738980e-01 - 393 1.2720609084e-02 -5.4056328535e-01 -2.1615815163e-01 - 394 3.8002207875e-01 -4.6755176783e-01 -1.5798547864e-01 - 395 7.2740715742e-01 4.3084311485e-01 5.0244444609e-01 - 396 -1.0471606255e-01 -3.2440766692e-01 7.6170004904e-02 - 397 -4.4074565172e-01 4.1455665231e-01 1.7542618513e-01 - 398 -4.1680949926e-01 4.8673257232e-01 6.1932623386e-01 - 399 1.2951824069e-01 1.8229772151e-01 4.2133668065e-01 - 400 -4.5790383220e-01 9.2764109373e-02 4.5867499709e-01 - 401 -3.4818246961e-01 -4.0796709061e-01 2.3899102211e-01 - 402 2.0777201653e-01 4.7589147091e-01 -4.9578973651e-01 - 403 3.1893882155e-01 4.3418532610e-01 1.0591420531e-01 - 404 4.9526521564e-01 -4.8053544760e-01 -4.4090220332e-01 - 405 -2.4097126722e-01 -7.7769860625e-02 3.8238102570e-03 - 406 -3.9060780406e-01 4.9299353361e-01 3.8843229413e-01 - 407 -4.3690901995e-01 2.2218674421e-01 2.8204619884e-01 - 408 -4.1835007071e-01 -4.0204399824e-01 5.0489765406e-01 - 409 7.7244025469e-01 2.9542455077e-01 -7.4430555105e-01 - 410 2.9371759295e-01 1.6550809145e-01 -6.5434825420e-01 - 411 -1.9558714330e-01 4.9924680591e-01 2.5067800283e-01 - 412 2.2841352224e-01 5.9639837593e-02 -8.4433972836e-01 - 413 5.2700275183e-01 9.3317776918e-02 -6.8341594934e-01 - 414 1.4927403629e-01 2.1339543164e-01 -4.2001885176e-01 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 6 4 38 15 16 87 - 2 6 4 116 133 115 175 - 3 6 4 116 183 117 142 - 4 6 4 88 70 71 245 - 5 6 4 88 70 245 236 - 6 6 4 88 79 70 236 - 7 6 4 157 158 174 206 - 8 6 4 157 206 174 203 - 9 6 4 157 203 174 170 - 10 6 4 157 170 2 203 - 11 6 4 109 135 211 110 - 12 6 4 109 108 205 128 - 13 6 4 73 89 72 248 - 14 6 4 73 74 82 240 - 15 6 4 72 253 95 71 - 16 6 4 1 29 233 20 - 17 6 4 1 29 167 233 - 18 6 4 1 3 167 29 - 19 6 4 1 233 167 166 - 20 6 4 217 111 218 141 - 21 6 4 217 112 111 141 - 22 6 4 250 165 164 188 - 23 6 4 117 144 186 118 - 24 6 4 167 233 239 166 - 25 6 4 167 239 179 166 - 26 6 4 70 79 14 236 - 27 6 4 200 28 9 8 - 28 6 4 200 8 63 80 - 29 6 4 200 28 8 80 - 30 6 4 200 63 213 80 - 31 6 4 40 21 22 247 - 32 6 4 90 18 17 39 - 33 6 4 15 25 14 79 - 34 6 4 140 68 67 94 - 35 6 4 140 67 146 92 - 36 6 4 140 67 92 94 - 37 6 4 160 178 210 161 - 38 6 4 160 159 219 185 - 39 6 4 14 24 236 25 - 40 6 4 14 236 79 25 - 41 6 4 216 184 159 158 - 42 6 4 249 145 122 121 - 43 6 4 124 237 114 125 - 44 6 4 124 132 123 244 - 45 6 4 139 251 122 123 - 46 6 4 182 163 164 252 - 47 6 4 64 238 75 74 - 48 6 4 64 120 129 238 - 49 6 4 64 238 129 75 - 50 6 4 64 129 65 75 - 51 6 4 215 11 220 43 - 52 6 4 215 12 11 43 - 53 6 4 115 125 114 171 - 54 6 4 138 83 66 65 - 55 6 4 138 66 83 146 - 56 6 4 181 44 5 6 - 57 6 4 114 237 162 171 - 58 6 4 114 237 171 125 - 59 6 4 214 93 61 60 - 60 6 4 7 176 6 35 - 61 6 4 7 30 2 170 - 62 6 4 37 246 23 24 - 63 6 4 137 120 121 242 - 64 6 4 137 120 242 238 - 65 6 4 137 129 120 238 - 66 6 4 180 3 4 33 - 67 6 4 8 19 80 28 - 68 6 4 213 63 84 80 - 69 6 4 213 63 62 84 - 70 6 4 36 209 12 13 - 71 6 4 86 131 68 69 - 72 6 4 136 177 118 119 - 73 6 4 113 130 208 204 - 74 6 4 113 112 208 134 - 75 6 4 113 134 208 130 - 76 6 4 113 58 130 204 - 77 6 4 179 239 165 166 - 78 6 4 2 203 30 13 - 79 6 4 2 170 30 203 - 80 6 4 212 32 10 9 - 81 6 4 5 187 4 41 - 82 6 4 85 59 60 207 - 83 6 4 178 172 210 161 - 84 6 4 108 172 161 205 - 85 6 4 108 172 205 128 - 86 6 4 108 172 128 119 - 87 6 4 34 81 18 19 - 88 6 4 111 110 218 143 - 89 6 4 111 141 143 218 - 90 6 4 58 78 204 59 - 91 6 4 58 78 69 130 - 92 6 4 58 130 204 78 - 93 6 4 210 161 172 205 - 94 6 4 243 173 163 162 - 95 6 4 243 162 237 173 - 96 6 4 83 146 66 92 - 97 6 4 23 22 254 45 - 98 6 4 241 31 21 20 - 99 6 4 67 66 146 92 - 100 6 4 162 237 173 171 - 101 6 4 62 61 221 91 - 102 6 4 46 16 17 96 - 103 6 4 11 220 43 42 - 104 6 4 11 10 220 42 - 105 6 4 266 27 26 47 - 106 6 4 266 47 26 46 - 107 6 4 266 27 57 26 - 108 6 4 267 51 32 34 - 109 6 4 267 80 84 81 - 110 6 4 267 80 213 84 - 111 6 4 267 80 81 19 - 112 6 4 267 34 19 81 - 113 6 4 267 80 19 28 - 114 6 4 267 19 34 28 - 115 6 4 267 28 34 32 - 116 6 4 267 28 200 80 - 117 6 4 267 28 32 9 - 118 6 4 267 200 28 9 - 119 6 4 267 32 212 9 - 120 6 4 267 9 212 200 - 121 6 4 267 200 212 213 - 122 6 4 267 80 200 213 - 123 6 4 268 236 245 246 - 124 6 4 268 88 245 236 - 125 6 4 268 79 236 25 - 126 6 4 268 79 88 236 - 127 6 4 268 79 87 88 - 128 6 4 268 15 87 79 - 129 6 4 268 15 38 87 - 130 6 4 268 25 37 38 - 131 6 4 268 37 24 246 - 132 6 4 268 24 37 25 - 133 6 4 268 25 15 79 - 134 6 4 268 25 38 15 - 135 6 4 268 236 24 25 - 136 6 4 268 236 246 24 - 137 6 4 269 52 54 42 - 138 6 4 269 42 54 43 - 139 6 4 269 54 52 57 - 140 6 4 270 13 36 30 - 141 6 4 270 209 36 13 - 142 6 4 270 30 203 13 - 143 6 4 270 203 209 13 - 144 6 4 270 30 36 35 - 145 6 4 270 176 7 35 - 146 6 4 270 30 35 7 - 147 6 4 270 30 7 170 - 148 6 4 270 7 176 170 - 149 6 4 270 170 176 174 - 150 6 4 270 30 170 203 - 151 6 4 270 174 203 170 - 152 6 4 270 174 206 203 - 153 6 4 270 206 209 203 - 154 6 4 270 35 36 53 - 155 6 4 271 51 57 52 - 156 6 4 271 269 52 57 - 157 6 4 271 32 51 52 - 158 6 4 271 32 267 51 - 159 6 4 271 51 26 57 - 160 6 4 271 266 57 26 - 161 6 4 272 179 167 239 - 162 6 4 272 179 180 167 - 163 6 4 272 167 3 29 - 164 6 4 272 167 180 3 - 165 6 4 272 3 33 29 - 166 6 4 272 3 180 33 - 167 6 4 272 29 33 31 - 168 6 4 272 29 31 20 - 169 6 4 272 31 241 20 - 170 6 4 272 20 241 233 - 171 6 4 272 233 29 20 - 172 6 4 272 241 239 233 - 173 6 4 272 167 29 233 - 174 6 4 272 167 233 239 - 175 6 4 272 31 33 49 - 176 6 4 273 57 271 266 - 177 6 4 273 55 57 56 - 178 6 4 273 57 27 56 - 179 6 4 273 57 266 27 - 180 6 4 274 45 40 48 - 181 6 4 274 234 247 254 - 182 6 4 274 40 45 22 - 183 6 4 274 247 40 22 - 184 6 4 274 254 22 45 - 185 6 4 274 22 254 247 - 186 6 4 274 49 48 40 - 187 6 4 275 41 44 50 - 188 6 4 275 168 181 187 - 189 6 4 275 44 41 5 - 190 6 4 275 5 181 44 - 191 6 4 275 5 41 187 - 192 6 4 275 5 187 181 - 193 6 4 276 51 271 267 - 194 6 4 276 39 51 34 - 195 6 4 276 267 34 51 - 196 6 4 276 267 81 34 - 197 6 4 276 18 34 81 - 198 6 4 276 18 39 34 - 199 6 4 276 81 90 18 - 200 6 4 276 18 90 39 - 201 6 4 276 81 99 90 - 202 6 4 277 26 271 51 - 203 6 4 277 271 276 51 - 204 6 4 277 39 26 51 - 205 6 4 277 276 39 51 - 206 6 4 277 39 276 90 - 207 6 4 277 90 17 39 - 208 6 4 277 90 96 17 - 209 6 4 277 96 46 17 - 210 6 4 277 17 46 39 - 211 6 4 277 26 39 46 - 212 6 4 277 46 266 26 - 213 6 4 277 96 90 98 - 214 6 4 278 46 277 96 - 215 6 4 278 16 96 87 - 216 6 4 278 87 38 16 - 217 6 4 278 16 46 96 - 218 6 4 278 38 46 16 - 219 6 4 278 87 268 38 - 220 6 4 278 38 47 46 - 221 6 4 278 47 266 46 - 222 6 4 278 266 277 46 - 223 6 4 279 54 53 36 - 224 6 4 279 270 36 53 - 225 6 4 279 54 55 53 - 226 6 4 280 279 53 270 - 227 6 4 280 275 181 44 - 228 6 4 280 176 270 35 - 229 6 4 280 181 193 176 - 230 6 4 280 6 176 35 - 231 6 4 280 6 181 176 - 232 6 4 280 35 44 6 - 233 6 4 280 181 6 44 - 234 6 4 280 35 53 44 - 235 6 4 280 270 53 35 - 236 6 4 280 181 168 193 - 237 6 4 280 181 275 168 - 238 6 4 281 50 55 56 - 239 6 4 281 55 273 56 - 240 6 4 282 274 40 49 - 241 6 4 282 274 247 40 - 242 6 4 282 272 31 241 - 243 6 4 282 247 259 241 - 244 6 4 282 21 241 31 - 245 6 4 282 21 247 241 - 246 6 4 282 31 40 21 - 247 6 4 282 21 40 247 - 248 6 4 282 31 49 40 - 249 6 4 282 272 49 31 - 250 6 4 282 247 234 259 - 251 6 4 282 247 274 234 - 252 6 4 283 77 76 97 - 253 6 4 283 97 76 95 - 254 6 4 283 77 107 76 - 255 6 4 284 138 137 129 - 256 6 4 284 75 83 65 - 257 6 4 284 83 138 65 - 258 6 4 284 65 129 75 - 259 6 4 284 65 138 129 - 260 6 4 284 129 238 75 - 261 6 4 284 82 83 75 - 262 6 4 284 101 83 82 - 263 6 4 284 238 242 240 - 264 6 4 284 238 240 74 - 265 6 4 284 82 74 240 - 266 6 4 284 75 238 74 - 267 6 4 284 74 82 75 - 268 6 4 284 129 137 238 - 269 6 4 284 137 242 238 - 270 6 4 285 102 104 92 - 271 6 4 285 92 104 94 - 272 6 4 285 94 140 92 - 273 6 4 285 140 127 146 - 274 6 4 285 140 146 92 - 275 6 4 285 104 102 107 - 276 6 4 286 78 86 85 - 277 6 4 286 85 86 103 - 278 6 4 286 78 85 59 - 279 6 4 286 59 85 207 - 280 6 4 286 204 78 59 - 281 6 4 286 59 207 204 - 282 6 4 286 207 208 204 - 283 6 4 286 204 130 78 - 284 6 4 286 208 130 204 - 285 6 4 286 69 86 78 - 286 6 4 286 86 69 131 - 287 6 4 286 130 131 69 - 288 6 4 286 69 78 130 - 289 6 4 286 130 134 131 - 290 6 4 286 208 134 130 - 291 6 4 287 101 107 102 - 292 6 4 287 285 102 107 - 293 6 4 287 101 76 107 - 294 6 4 287 283 107 76 - 295 6 4 288 107 77 106 - 296 6 4 288 283 77 107 - 297 6 4 288 287 283 107 - 298 6 4 288 105 107 106 - 299 6 4 289 93 100 91 - 300 6 4 289 201 214 221 - 301 6 4 289 93 91 61 - 302 6 4 289 61 214 93 - 303 6 4 289 221 61 91 - 304 6 4 289 61 221 214 - 305 6 4 290 89 101 82 - 306 6 4 290 101 284 82 - 307 6 4 290 284 240 82 - 308 6 4 290 240 73 82 - 309 6 4 290 73 89 82 - 310 6 4 290 73 248 89 - 311 6 4 290 240 248 73 - 312 6 4 290 240 257 248 - 313 6 4 291 287 76 283 - 314 6 4 291 76 287 101 - 315 6 4 291 287 290 101 - 316 6 4 291 89 76 101 - 317 6 4 291 290 89 101 - 318 6 4 291 290 248 89 - 319 6 4 291 248 253 72 - 320 6 4 291 72 89 248 - 321 6 4 291 95 72 253 - 322 6 4 291 72 95 89 - 323 6 4 291 76 89 95 - 324 6 4 291 283 76 95 - 325 6 4 291 253 248 256 - 326 6 4 292 268 88 245 - 327 6 4 292 256 255 245 - 328 6 4 292 253 256 245 - 329 6 4 292 253 291 256 - 330 6 4 292 95 291 253 - 331 6 4 292 291 95 283 - 332 6 4 292 71 253 245 - 333 6 4 292 245 88 71 - 334 6 4 292 95 253 71 - 335 6 4 292 88 95 71 - 336 6 4 292 268 278 87 - 337 6 4 292 88 97 95 - 338 6 4 292 283 95 97 - 339 6 4 292 88 87 97 - 340 6 4 292 268 87 88 - 341 6 4 293 107 288 105 - 342 6 4 293 104 107 105 - 343 6 4 293 285 107 104 - 344 6 4 293 104 105 103 - 345 6 4 293 104 103 86 - 346 6 4 294 214 201 226 - 347 6 4 294 214 289 201 - 348 6 4 294 289 214 93 - 349 6 4 294 207 286 85 - 350 6 4 294 85 60 207 - 351 6 4 294 60 214 207 - 352 6 4 294 85 103 93 - 353 6 4 294 85 286 103 - 354 6 4 294 85 93 60 - 355 6 4 294 93 214 60 - 356 6 4 294 214 226 207 - 357 6 4 295 105 293 288 - 358 6 4 295 100 105 106 - 359 6 4 295 288 106 105 - 360 6 4 296 133 151 152 - 361 6 4 296 151 126 152 - 362 6 4 297 151 133 132 - 363 6 4 297 151 296 133 - 364 6 4 297 124 132 125 - 365 6 4 297 132 124 244 - 366 6 4 297 237 244 124 - 367 6 4 297 124 125 237 - 368 6 4 297 243 244 237 - 369 6 4 297 175 173 171 - 370 6 4 297 115 175 171 - 371 6 4 297 115 133 175 - 372 6 4 297 125 115 171 - 373 6 4 297 125 133 115 - 374 6 4 297 173 237 171 - 375 6 4 297 243 237 173 - 376 6 4 297 171 237 125 - 377 6 4 297 125 132 133 - 378 6 4 298 152 154 142 - 379 6 4 298 126 154 152 - 380 6 4 298 296 126 152 - 381 6 4 299 128 136 135 - 382 6 4 299 177 136 119 - 383 6 4 299 119 136 128 - 384 6 4 299 128 172 119 - 385 6 4 299 172 177 119 - 386 6 4 299 178 172 210 - 387 6 4 299 172 178 177 - 388 6 4 299 205 172 128 - 389 6 4 299 210 172 205 - 390 6 4 299 205 211 210 - 391 6 4 299 109 211 205 - 392 6 4 299 109 135 211 - 393 6 4 299 128 135 109 - 394 6 4 299 109 205 128 - 395 6 4 299 135 136 153 - 396 6 4 300 140 285 94 - 397 6 4 300 94 285 104 - 398 6 4 300 293 104 285 - 399 6 4 300 94 104 86 - 400 6 4 300 293 86 104 - 401 6 4 300 140 94 68 - 402 6 4 300 131 140 68 - 403 6 4 300 68 94 86 - 404 6 4 300 68 86 131 - 405 6 4 300 286 131 86 - 406 6 4 300 149 127 140 - 407 6 4 300 285 140 127 - 408 6 4 300 131 134 149 - 409 6 4 300 286 134 131 - 410 6 4 300 131 149 140 - 411 6 4 301 217 229 218 - 412 6 4 301 143 141 218 - 413 6 4 301 141 217 218 - 414 6 4 301 143 150 141 - 415 6 4 301 227 229 217 - 416 6 4 301 153 150 143 - 417 6 4 302 244 261 251 - 418 6 4 302 132 297 244 - 419 6 4 302 139 151 132 - 420 6 4 302 297 132 151 - 421 6 4 302 296 297 151 - 422 6 4 302 123 139 132 - 423 6 4 302 139 123 251 - 424 6 4 302 123 132 244 - 425 6 4 302 244 251 123 - 426 6 4 303 149 156 127 - 427 6 4 303 300 149 127 - 428 6 4 303 285 300 127 - 429 6 4 303 300 285 293 - 430 6 4 304 261 258 251 - 431 6 4 304 251 302 261 - 432 6 4 304 251 258 249 - 433 6 4 304 302 251 139 - 434 6 4 304 148 139 145 - 435 6 4 304 139 251 122 - 436 6 4 304 122 145 139 - 437 6 4 304 251 249 122 - 438 6 4 304 122 249 145 - 439 6 4 305 144 154 136 - 440 6 4 305 154 153 136 - 441 6 4 305 299 136 153 - 442 6 4 305 177 195 186 - 443 6 4 305 299 177 136 - 444 6 4 305 118 144 136 - 445 6 4 305 136 177 118 - 446 6 4 305 186 144 118 - 447 6 4 305 177 186 118 - 448 6 4 306 299 305 153 - 449 6 4 306 218 229 211 - 450 6 4 306 301 229 218 - 451 6 4 306 301 218 143 - 452 6 4 306 110 218 211 - 453 6 4 306 211 135 110 - 454 6 4 306 299 135 211 - 455 6 4 306 135 153 143 - 456 6 4 306 135 299 153 - 457 6 4 306 218 110 143 - 458 6 4 306 135 143 110 - 459 6 4 306 301 143 153 - 460 6 4 307 155 126 156 - 461 6 4 307 298 296 126 - 462 6 4 307 154 126 155 - 463 6 4 307 154 298 126 - 464 6 4 308 189 168 187 - 465 6 4 308 275 187 168 - 466 6 4 308 169 168 189 - 467 6 4 308 169 199 168 - 468 6 4 308 190 169 189 - 469 6 4 309 194 196 184 - 470 6 4 309 196 194 199 - 471 6 4 310 193 199 194 - 472 6 4 310 309 194 199 - 473 6 4 310 193 168 199 - 474 6 4 310 168 308 199 - 475 6 4 310 280 168 193 - 476 6 4 311 197 199 198 - 477 6 4 311 190 198 169 - 478 6 4 311 308 190 169 - 479 6 4 311 199 169 198 - 480 6 4 311 199 308 169 - 481 6 4 311 199 310 308 - 482 6 4 312 188 182 190 - 483 6 4 312 188 250 164 - 484 6 4 312 164 250 252 - 485 6 4 312 182 188 164 - 486 6 4 312 252 182 164 - 487 6 4 312 191 190 182 - 488 6 4 313 187 308 275 - 489 6 4 313 180 189 187 - 490 6 4 313 308 187 189 - 491 6 4 313 275 41 187 - 492 6 4 313 4 41 33 - 493 6 4 313 4 187 41 - 494 6 4 313 33 180 4 - 495 6 4 313 180 187 4 - 496 6 4 313 180 179 189 - 497 6 4 313 272 179 180 - 498 6 4 313 33 272 180 - 499 6 4 314 196 195 178 - 500 6 4 314 196 197 195 - 501 6 4 314 196 199 197 - 502 6 4 314 196 309 199 - 503 6 4 315 197 192 195 - 504 6 4 315 195 314 197 - 505 6 4 315 305 314 195 - 506 6 4 315 192 197 198 - 507 6 4 315 197 311 198 - 508 6 4 316 182 312 252 - 509 6 4 316 173 191 182 - 510 6 4 316 312 182 191 - 511 6 4 316 182 252 163 - 512 6 4 316 173 182 163 - 513 6 4 316 163 252 243 - 514 6 4 316 163 243 173 - 515 6 4 316 252 262 243 - 516 6 4 316 173 175 191 - 517 6 4 316 173 297 175 - 518 6 4 317 222 201 221 - 519 6 4 317 201 289 221 - 520 6 4 317 202 201 222 - 521 6 4 317 202 232 201 - 522 6 4 318 226 232 227 - 523 6 4 318 201 294 289 - 524 6 4 318 289 317 201 - 525 6 4 318 294 201 226 - 526 6 4 318 226 201 232 - 527 6 4 318 317 232 201 - 528 6 4 319 230 232 231 - 529 6 4 319 232 202 231 - 530 6 4 319 317 202 232 - 531 6 4 319 318 317 232 - 532 6 4 320 221 317 289 - 533 6 4 320 213 222 221 - 534 6 4 320 317 221 222 - 535 6 4 320 289 91 221 - 536 6 4 320 213 212 222 - 537 6 4 320 213 267 212 - 538 6 4 320 62 221 91 - 539 6 4 320 62 91 84 - 540 6 4 320 213 221 62 - 541 6 4 320 84 213 62 - 542 6 4 320 84 267 213 - 543 6 4 321 232 319 230 - 544 6 4 321 229 232 230 - 545 6 4 321 229 230 228 - 546 6 4 321 229 228 211 - 547 6 4 321 211 306 229 - 548 6 4 322 210 228 219 - 549 6 4 322 211 321 228 - 550 6 4 322 306 211 299 - 551 6 4 322 306 321 211 - 552 6 4 322 210 211 228 - 553 6 4 322 210 299 211 - 554 6 4 322 299 210 178 - 555 6 4 322 185 196 178 - 556 6 4 322 196 314 178 - 557 6 4 322 309 314 196 - 558 6 4 322 228 225 219 - 559 6 4 322 160 185 178 - 560 6 4 322 160 178 210 - 561 6 4 322 185 160 219 - 562 6 4 322 210 219 160 - 563 6 4 323 321 319 230 - 564 6 4 323 230 225 228 - 565 6 4 323 321 230 228 - 566 6 4 323 322 228 225 - 567 6 4 323 228 322 321 - 568 6 4 323 225 230 231 - 569 6 4 323 230 319 231 - 570 6 4 324 209 206 224 - 571 6 4 324 279 270 36 - 572 6 4 324 269 43 215 - 573 6 4 324 43 269 54 - 574 6 4 324 279 54 269 - 575 6 4 324 43 54 36 - 576 6 4 324 54 279 36 - 577 6 4 324 12 215 43 - 578 6 4 324 209 215 12 - 579 6 4 324 12 43 36 - 580 6 4 324 36 209 12 - 581 6 4 324 270 209 36 - 582 6 4 324 209 224 215 - 583 6 4 325 222 320 212 - 584 6 4 325 320 222 317 - 585 6 4 325 223 222 212 - 586 6 4 325 267 276 271 - 587 6 4 325 320 267 212 - 588 6 4 326 255 234 254 - 589 6 4 326 234 274 254 - 590 6 4 326 235 234 255 - 591 6 4 326 235 265 234 - 592 6 4 327 259 265 260 - 593 6 4 327 234 282 274 - 594 6 4 327 274 326 234 - 595 6 4 327 282 234 259 - 596 6 4 327 259 234 265 - 597 6 4 327 234 326 265 - 598 6 4 328 263 265 264 - 599 6 4 328 265 327 326 - 600 6 4 328 265 235 264 - 601 6 4 328 265 326 235 - 602 6 4 329 254 326 274 - 603 6 4 329 246 255 254 - 604 6 4 329 326 254 255 - 605 6 4 329 254 274 45 - 606 6 4 329 23 45 37 - 607 6 4 329 23 37 246 - 608 6 4 329 23 254 45 - 609 6 4 329 246 254 23 - 610 6 4 329 292 245 268 - 611 6 4 329 245 292 255 - 612 6 4 329 246 245 255 - 613 6 4 329 268 245 246 - 614 6 4 329 37 268 246 - 615 6 4 330 265 328 263 - 616 6 4 330 262 263 261 - 617 6 4 330 304 302 261 - 618 6 4 331 263 330 328 - 619 6 4 331 263 258 261 - 620 6 4 331 261 330 263 - 621 6 4 331 258 263 264 - 622 6 4 331 263 328 264 - 623 6 4 331 304 261 258 - 624 6 4 331 304 330 261 - 625 6 4 332 186 192 183 - 626 6 4 332 298 315 305 - 627 6 4 332 195 192 186 - 628 6 4 332 186 305 195 - 629 6 4 332 305 186 144 - 630 6 4 332 298 305 154 - 631 6 4 332 154 305 144 - 632 6 4 332 142 154 144 - 633 6 4 332 142 298 154 - 634 6 4 332 117 142 144 - 635 6 4 332 117 183 142 - 636 6 4 332 117 144 186 - 637 6 4 332 186 183 117 - 638 6 4 333 219 225 216 - 639 6 4 333 219 322 225 - 640 6 4 333 185 322 219 - 641 6 4 333 196 322 185 - 642 6 4 333 309 322 196 - 643 6 4 333 184 196 185 - 644 6 4 333 309 196 184 - 645 6 4 333 219 159 185 - 646 6 4 333 219 216 159 - 647 6 4 333 159 184 185 - 648 6 4 333 159 216 184 - 649 6 4 334 55 50 53 - 650 6 4 334 281 50 55 - 651 6 4 334 53 50 44 - 652 6 4 334 50 275 44 - 653 6 4 334 44 280 53 - 654 6 4 334 275 280 44 - 655 6 4 334 279 55 53 - 656 6 4 334 279 281 55 - 657 6 4 334 280 279 53 - 658 6 4 335 327 282 274 - 659 6 4 335 326 327 274 - 660 6 4 335 56 281 273 - 661 6 4 335 282 49 274 - 662 6 4 335 49 56 48 - 663 6 4 335 274 49 48 - 664 6 4 336 98 106 77 - 665 6 4 336 288 77 106 - 666 6 4 336 99 106 98 - 667 6 4 336 295 288 106 - 668 6 4 336 90 276 99 - 669 6 4 336 90 277 276 - 670 6 4 336 99 98 90 - 671 6 4 336 277 90 98 - 672 6 4 337 105 100 103 - 673 6 4 337 295 100 105 - 674 6 4 337 103 293 105 - 675 6 4 337 293 295 105 - 676 6 4 337 103 100 93 - 677 6 4 337 100 289 93 - 678 6 4 337 294 293 103 - 679 6 4 337 93 294 103 - 680 6 4 337 294 93 289 - 681 6 4 338 208 226 227 - 682 6 4 338 318 227 226 - 683 6 4 338 208 227 217 - 684 6 4 338 227 301 217 - 685 6 4 338 217 301 141 - 686 6 4 338 318 226 294 - 687 6 4 338 207 294 226 - 688 6 4 338 286 294 207 - 689 6 4 338 226 208 207 - 690 6 4 338 286 207 208 - 691 6 4 338 300 286 134 - 692 6 4 338 208 112 134 - 693 6 4 338 112 141 134 - 694 6 4 338 208 217 112 - 695 6 4 338 112 217 141 - 696 6 4 338 134 286 208 - 697 6 4 340 137 147 148 - 698 6 4 340 137 148 145 - 699 6 4 340 148 304 145 - 700 6 4 340 284 137 242 - 701 6 4 340 304 249 145 - 702 6 4 340 145 249 121 - 703 6 4 340 121 249 242 - 704 6 4 340 137 145 121 - 705 6 4 340 242 137 121 - 706 6 4 341 304 340 148 - 707 6 4 341 340 147 148 - 708 6 4 342 307 155 154 - 709 6 4 342 154 155 153 - 710 6 4 342 305 154 153 - 711 6 4 342 301 306 153 - 712 6 4 342 155 150 153 - 713 6 4 342 150 301 153 - 714 6 4 342 305 298 154 - 715 6 4 342 298 307 154 - 716 6 4 342 153 306 305 - 717 6 4 343 310 193 280 - 718 6 4 343 174 193 194 - 719 6 4 343 193 310 194 - 720 6 4 343 310 309 194 - 721 6 4 343 174 194 184 - 722 6 4 343 309 184 194 - 723 6 4 343 333 184 309 - 724 6 4 343 333 216 184 - 725 6 4 343 174 158 206 - 726 6 4 343 158 216 206 - 727 6 4 343 174 184 158 - 728 6 4 343 184 216 158 - 729 6 4 343 193 174 176 - 730 6 4 343 270 176 174 - 731 6 4 343 270 280 176 - 732 6 4 343 176 280 193 - 733 6 4 343 270 174 206 - 734 6 4 344 239 259 260 - 735 6 4 344 327 260 259 - 736 6 4 344 239 260 250 - 737 6 4 344 250 312 188 - 738 6 4 344 188 190 179 - 739 6 4 344 188 312 190 - 740 6 4 344 190 189 179 - 741 6 4 344 308 189 190 - 742 6 4 344 313 189 308 - 743 6 4 344 327 259 282 - 744 6 4 344 313 179 189 - 745 6 4 344 313 272 179 - 746 6 4 344 165 179 239 - 747 6 4 344 165 188 179 - 748 6 4 344 239 250 165 - 749 6 4 344 165 250 188 - 750 6 4 344 259 239 241 - 751 6 4 344 272 241 239 - 752 6 4 344 179 272 239 - 753 6 4 345 313 41 33 - 754 6 4 345 313 275 41 - 755 6 4 345 50 49 33 - 756 6 4 345 272 33 49 - 757 6 4 345 272 313 33 - 758 6 4 345 41 50 33 - 759 6 4 345 275 50 41 - 760 6 4 345 344 272 282 - 761 6 4 345 344 313 272 - 762 6 4 345 50 56 49 - 763 6 4 345 50 281 56 - 764 6 4 345 281 335 56 - 765 6 4 345 335 49 56 - 766 6 4 345 282 272 49 - 767 6 4 345 335 282 49 - 768 6 4 346 342 306 305 - 769 6 4 346 321 322 306 - 770 6 4 346 322 299 306 - 771 6 4 346 322 178 299 - 772 6 4 346 322 314 178 - 773 6 4 346 314 195 178 - 774 6 4 346 314 305 195 - 775 6 4 346 195 305 177 - 776 6 4 346 177 305 299 - 777 6 4 346 177 178 195 - 778 6 4 346 299 178 177 - 779 6 4 346 305 306 299 - 780 6 4 348 175 316 297 - 781 6 4 349 317 318 289 - 782 6 4 349 289 318 294 - 783 6 4 349 337 289 294 - 784 6 4 349 337 293 295 - 785 6 4 349 317 319 318 - 786 6 4 351 99 336 276 - 787 6 4 351 276 325 267 - 788 6 4 351 267 325 320 - 789 6 4 351 320 84 267 - 790 6 4 351 267 84 81 - 791 6 4 351 276 267 81 - 792 6 4 351 81 84 99 - 793 6 4 351 276 81 99 - 794 6 4 351 100 99 84 - 795 6 4 351 91 100 84 - 796 6 4 351 320 91 84 - 797 6 4 351 289 100 91 - 798 6 4 351 320 289 91 - 799 6 4 351 337 100 289 - 800 6 4 351 337 295 100 - 801 6 4 351 336 106 295 - 802 6 4 351 106 336 99 - 803 6 4 351 100 106 99 - 804 6 4 351 100 295 106 - 805 6 4 352 321 323 322 - 806 6 4 352 314 322 309 - 807 6 4 352 333 309 322 - 808 6 4 352 323 225 322 - 809 6 4 352 225 333 322 - 810 6 4 352 346 321 322 - 811 6 4 352 346 322 314 - 812 6 4 353 224 223 215 - 813 6 4 353 324 224 215 - 814 6 4 353 323 350 319 - 815 6 4 355 291 292 283 - 816 6 4 355 292 354 283 - 817 6 4 355 256 264 235 - 818 6 4 355 264 328 235 - 819 6 4 355 235 328 326 - 820 6 4 355 326 354 329 - 821 6 4 355 329 354 292 - 822 6 4 355 255 329 292 - 823 6 4 355 329 255 326 - 824 6 4 355 292 256 255 - 825 6 4 355 292 291 256 - 826 6 4 356 328 265 327 - 827 6 4 356 328 330 265 - 828 6 4 356 260 344 327 - 829 6 4 356 347 312 316 - 830 6 4 356 330 347 316 - 831 6 4 356 262 330 316 - 832 6 4 356 262 316 252 - 833 6 4 356 252 316 312 - 834 6 4 356 250 262 252 - 835 6 4 356 312 250 252 - 836 6 4 356 260 262 250 - 837 6 4 356 262 260 265 - 838 6 4 356 260 327 265 - 839 6 4 357 243 316 262 - 840 6 4 357 330 262 316 - 841 6 4 357 330 302 261 - 842 6 4 357 261 302 244 - 843 6 4 357 302 297 244 - 844 6 4 357 262 261 243 - 845 6 4 357 262 330 261 - 846 6 4 357 244 243 261 - 847 6 4 357 297 243 244 - 848 6 4 359 288 283 77 - 849 6 4 359 77 336 288 - 850 6 4 359 277 278 266 - 851 6 4 359 354 266 278 - 852 6 4 359 354 278 292 - 853 6 4 359 354 292 283 - 854 6 4 359 292 97 283 - 855 6 4 359 292 87 97 - 856 6 4 359 292 278 87 - 857 6 4 359 98 97 87 - 858 6 4 359 96 98 87 - 859 6 4 359 278 96 87 - 860 6 4 359 96 277 98 - 861 6 4 359 96 278 277 - 862 6 4 359 336 77 98 - 863 6 4 359 98 77 97 - 864 6 4 359 283 97 77 - 865 6 4 359 336 98 277 - 866 6 4 360 149 303 300 - 867 6 4 360 300 134 149 - 868 6 4 360 300 338 134 - 869 6 4 360 307 303 156 - 870 6 4 360 150 155 156 - 871 6 4 360 155 307 156 - 872 6 4 360 150 149 134 - 873 6 4 360 141 150 134 - 874 6 4 360 338 141 134 - 875 6 4 360 150 156 149 - 876 6 4 360 303 149 156 - 877 6 4 360 141 301 150 - 878 6 4 360 141 338 301 - 879 6 4 360 342 150 301 - 880 6 4 361 323 352 321 - 881 6 4 361 321 352 346 - 882 6 4 361 350 323 319 - 883 6 4 361 323 321 319 - 884 6 4 362 303 285 293 - 885 6 4 362 288 295 293 - 886 6 4 362 349 293 295 - 887 6 4 362 288 107 287 - 888 6 4 362 288 293 107 - 889 6 4 363 331 258 304 - 890 6 4 363 249 304 258 - 891 6 4 363 340 304 249 - 892 6 4 363 249 258 242 - 893 6 4 363 340 249 242 - 894 6 4 363 258 257 242 - 895 6 4 363 258 264 257 - 896 6 4 363 258 331 264 - 897 6 4 365 304 341 148 - 898 6 4 365 296 302 151 - 899 6 4 365 151 302 139 - 900 6 4 365 304 139 302 - 901 6 4 365 139 148 151 - 902 6 4 365 139 304 148 - 903 6 4 365 148 341 156 - 904 6 4 365 156 341 307 - 905 6 4 365 126 148 156 - 906 6 4 365 307 126 156 - 907 6 4 365 307 296 126 - 908 6 4 365 151 148 126 - 909 6 4 365 126 296 151 - 910 6 4 366 147 341 340 - 911 6 4 366 284 138 137 - 912 6 4 366 340 284 137 - 913 6 4 366 147 137 138 - 914 6 4 366 147 340 137 - 915 6 4 366 146 147 138 - 916 6 4 366 146 138 83 - 917 6 4 366 146 83 92 - 918 6 4 366 285 146 92 - 919 6 4 366 138 284 83 - 920 6 4 366 287 285 102 - 921 6 4 366 83 284 101 - 922 6 4 367 127 303 156 - 923 6 4 367 341 366 147 - 924 6 4 367 285 303 127 - 925 6 4 367 146 285 127 - 926 6 4 367 366 285 146 - 927 6 4 367 146 127 147 - 928 6 4 367 147 366 146 - 929 6 4 367 127 156 147 - 930 6 4 367 148 147 156 - 931 6 4 367 341 148 156 - 932 6 4 367 341 147 148 - 933 6 4 367 303 307 156 - 934 6 4 367 341 156 307 - 935 6 4 367 364 307 303 - 936 6 4 367 364 341 307 - 937 6 4 368 346 352 314 - 938 6 4 368 361 352 346 - 939 6 4 368 298 342 305 - 940 6 4 368 346 305 342 - 941 6 4 368 315 298 305 - 942 6 4 368 307 342 298 - 943 6 4 368 314 315 305 - 944 6 4 368 346 314 305 - 945 6 4 368 307 298 296 - 946 6 4 369 353 324 224 - 947 6 4 369 343 309 333 - 948 6 4 369 216 333 225 - 949 6 4 369 343 333 216 - 950 6 4 369 216 225 206 - 951 6 4 369 343 216 206 - 952 6 4 369 225 224 206 - 953 6 4 369 352 333 309 - 954 6 4 369 333 352 225 - 955 6 4 369 352 323 225 - 956 6 4 369 324 206 224 - 957 6 4 369 324 343 206 - 958 6 4 369 353 231 323 - 959 6 4 369 231 353 224 - 960 6 4 369 225 231 224 - 961 6 4 369 225 323 231 - 962 6 4 370 345 281 335 - 963 6 4 370 358 335 281 - 964 6 4 370 275 313 308 - 965 6 4 370 345 313 275 - 966 6 4 370 50 345 275 - 967 6 4 370 281 345 50 - 968 6 4 370 334 50 275 - 969 6 4 370 334 281 50 - 970 6 4 371 328 331 330 - 971 6 4 372 192 198 191 - 972 6 4 372 192 315 198 - 973 6 4 372 316 191 312 - 974 6 4 372 312 347 316 - 975 6 4 372 312 191 190 - 976 6 4 372 347 312 190 - 977 6 4 372 191 198 190 - 978 6 4 372 311 190 198 - 979 6 4 372 347 190 311 - 980 6 4 372 198 315 311 - 981 6 4 372 347 311 315 - 982 6 4 373 298 348 315 - 983 6 4 373 315 372 192 - 984 6 4 373 372 315 348 - 985 6 4 373 372 348 175 - 986 6 4 373 183 192 175 - 987 6 4 373 297 133 175 - 988 6 4 373 175 348 297 - 989 6 4 373 133 116 175 - 990 6 4 373 116 183 175 - 991 6 4 373 133 142 116 - 992 6 4 373 183 116 142 - 993 6 4 373 332 298 315 - 994 6 4 373 332 315 192 - 995 6 4 373 183 332 192 - 996 6 4 373 298 152 296 - 997 6 4 373 296 348 298 - 998 6 4 373 296 152 133 - 999 6 4 373 133 152 142 - 1000 6 4 373 152 298 142 - 1001 6 4 373 332 142 298 - 1002 6 4 373 332 183 142 - 1003 6 4 374 361 349 339 - 1004 6 4 374 364 339 362 - 1005 6 4 374 362 293 303 - 1006 6 4 374 362 349 293 - 1007 6 4 374 362 339 349 - 1008 6 4 375 339 362 349 - 1009 6 4 375 349 362 295 - 1010 6 4 375 295 362 288 - 1011 6 4 375 336 295 288 - 1012 6 4 376 271 57 269 - 1013 6 4 376 269 57 54 - 1014 6 4 376 54 279 269 - 1015 6 4 376 281 55 273 - 1016 6 4 376 281 279 55 - 1017 6 4 376 57 273 55 - 1018 6 4 376 271 273 57 - 1019 6 4 377 343 310 309 - 1020 6 4 377 309 369 343 - 1021 6 4 377 369 309 352 - 1022 6 4 377 369 352 323 - 1023 6 4 377 353 323 350 - 1024 6 4 377 369 323 353 - 1025 6 4 377 352 361 323 - 1026 6 4 377 361 350 323 - 1027 6 4 378 377 350 353 - 1028 6 4 378 369 353 324 - 1029 6 4 378 377 353 369 - 1030 6 4 378 350 376 269 - 1031 6 4 378 376 279 269 - 1032 6 4 378 279 324 269 - 1033 6 4 379 326 335 274 - 1034 6 4 379 274 329 326 - 1035 6 4 379 354 326 329 - 1036 6 4 379 335 56 48 - 1037 6 4 379 335 273 56 - 1038 6 4 379 27 273 266 - 1039 6 4 379 274 335 48 - 1040 6 4 380 335 327 282 - 1041 6 4 380 282 345 335 - 1042 6 4 380 327 344 282 - 1043 6 4 380 345 282 344 - 1044 6 4 380 313 345 344 - 1045 6 4 380 313 370 345 - 1046 6 4 380 308 370 313 - 1047 6 4 380 370 308 358 - 1048 6 4 380 344 308 313 - 1049 6 4 380 311 358 308 - 1050 6 4 380 311 308 190 - 1051 6 4 380 190 347 311 - 1052 6 4 380 312 347 190 - 1053 6 4 380 344 190 308 - 1054 6 4 380 190 344 312 - 1055 6 4 380 356 312 344 - 1056 6 4 380 356 347 312 - 1057 6 4 380 327 356 344 - 1058 6 4 381 350 377 361 - 1059 6 4 382 319 361 321 - 1060 6 4 382 318 319 232 - 1061 6 4 382 319 321 232 - 1062 6 4 382 232 321 229 - 1063 6 4 382 374 349 318 - 1064 6 4 382 374 361 349 - 1065 6 4 382 374 338 360 - 1066 6 4 382 374 318 338 - 1067 6 4 382 301 360 338 - 1068 6 4 382 321 346 306 - 1069 6 4 382 346 342 306 - 1070 6 4 382 306 342 301 - 1071 6 4 382 229 301 227 - 1072 6 4 384 257 363 264 - 1073 6 4 384 264 363 331 - 1074 6 4 384 383 355 331 - 1075 6 4 384 383 331 363 - 1076 6 4 384 257 264 256 - 1077 6 4 384 355 256 264 - 1078 6 4 384 256 355 291 - 1079 6 4 384 257 256 248 - 1080 6 4 384 291 248 256 - 1081 6 4 384 290 257 248 - 1082 6 4 384 291 290 248 - 1083 6 4 385 374 339 361 - 1084 6 4 385 374 364 339 - 1085 6 4 385 382 374 361 - 1086 6 4 385 382 360 374 - 1087 6 4 385 307 360 342 - 1088 6 4 385 360 307 303 - 1089 6 4 385 307 364 303 - 1090 6 4 385 303 374 360 - 1091 6 4 385 364 374 303 - 1092 6 4 385 368 307 342 - 1093 6 4 385 346 368 342 - 1094 6 4 385 368 346 361 - 1095 6 4 385 382 346 342 - 1096 6 4 386 380 335 327 - 1097 6 4 386 380 358 335 - 1098 6 4 386 358 380 371 - 1099 6 4 386 380 327 356 - 1100 6 4 386 347 380 356 - 1101 6 4 386 371 380 347 - 1102 6 4 386 328 356 327 - 1103 6 4 386 356 328 330 - 1104 6 4 386 328 371 330 - 1105 6 4 386 326 328 327 - 1106 6 4 386 327 335 326 - 1107 6 4 387 364 385 307 - 1108 6 4 387 385 368 307 - 1109 6 4 387 341 364 307 - 1110 6 4 387 365 341 307 - 1111 6 4 387 296 365 307 - 1112 6 4 387 368 296 307 - 1113 6 4 388 338 294 318 - 1114 6 4 388 318 374 338 - 1115 6 4 388 294 349 318 - 1116 6 4 388 349 374 318 - 1117 6 4 388 293 374 349 - 1118 6 4 388 300 86 286 - 1119 6 4 388 300 293 86 - 1120 6 4 388 103 286 86 - 1121 6 4 388 86 293 103 - 1122 6 4 388 103 294 286 - 1123 6 4 388 293 294 103 - 1124 6 4 388 338 360 300 - 1125 6 4 388 338 374 360 - 1126 6 4 388 300 360 303 - 1127 6 4 388 374 303 360 - 1128 6 4 388 294 338 286 - 1129 6 4 388 286 338 300 - 1130 6 4 389 358 381 376 - 1131 6 4 389 281 376 273 - 1132 6 4 389 358 376 281 - 1133 6 4 389 335 281 273 - 1134 6 4 389 335 358 281 - 1135 6 4 389 386 358 335 - 1136 6 4 389 354 379 266 - 1137 6 4 389 379 273 266 - 1138 6 4 389 273 379 335 - 1139 6 4 390 389 273 266 - 1140 6 4 390 376 389 375 - 1141 6 4 390 376 271 273 - 1142 6 4 390 273 389 376 - 1143 6 4 390 277 359 266 - 1144 6 4 390 336 359 277 - 1145 6 4 390 277 271 276 - 1146 6 4 390 276 336 277 - 1147 6 4 390 266 273 271 - 1148 6 4 391 351 276 325 - 1149 6 4 391 276 351 336 - 1150 6 4 391 390 276 336 - 1151 6 4 391 271 325 276 - 1152 6 4 391 390 271 276 - 1153 6 4 391 390 336 375 - 1154 6 4 391 376 375 350 - 1155 6 4 391 376 390 375 - 1156 6 4 391 390 376 271 - 1157 6 4 391 376 269 271 - 1158 6 4 391 376 350 269 - 1159 6 4 391 269 325 271 - 1160 6 4 392 283 355 354 - 1161 6 4 392 371 383 339 - 1162 6 4 392 339 381 371 - 1163 6 4 392 389 371 381 - 1164 6 4 392 381 339 375 - 1165 6 4 392 375 389 381 - 1166 6 4 392 362 375 339 - 1167 6 4 392 288 375 362 - 1168 6 4 393 368 314 315 - 1169 6 4 393 368 352 314 - 1170 6 4 393 352 368 361 - 1171 6 4 393 377 352 361 - 1172 6 4 393 361 381 377 - 1173 6 4 393 377 309 352 - 1174 6 4 393 377 310 309 - 1175 6 4 393 314 352 309 - 1176 6 4 393 309 310 199 - 1177 6 4 393 199 314 309 - 1178 6 4 393 310 311 199 - 1179 6 4 393 199 311 197 - 1180 6 4 393 197 314 199 - 1181 6 4 394 377 381 350 - 1182 6 4 394 377 393 381 - 1183 6 4 394 381 393 358 - 1184 6 4 394 381 358 376 - 1185 6 4 394 381 376 350 - 1186 6 4 394 350 378 377 - 1187 6 4 394 378 376 279 - 1188 6 4 394 376 378 350 - 1189 6 4 394 279 376 281 - 1190 6 4 394 376 358 281 - 1191 6 4 394 334 279 281 - 1192 6 4 394 370 281 358 - 1193 6 4 394 370 334 281 - 1194 6 4 394 334 275 280 - 1195 6 4 394 370 275 334 - 1196 6 4 394 275 370 308 - 1197 6 4 394 308 370 358 - 1198 6 4 394 311 310 308 - 1199 6 4 394 358 311 308 - 1200 6 4 394 311 393 310 - 1201 6 4 394 393 311 358 - 1202 6 4 394 308 168 275 - 1203 6 4 394 308 310 168 - 1204 6 4 394 393 377 310 - 1205 6 4 395 266 278 47 - 1206 6 4 395 379 266 47 - 1207 6 4 395 266 354 278 - 1208 6 4 395 379 354 266 - 1209 6 4 395 379 329 354 - 1210 6 4 395 292 329 268 - 1211 6 4 395 354 329 292 - 1212 6 4 395 292 268 278 - 1213 6 4 395 278 354 292 - 1214 6 4 395 48 47 37 - 1215 6 4 395 379 47 48 - 1216 6 4 395 329 379 274 - 1217 6 4 395 379 48 274 - 1218 6 4 395 329 45 37 - 1219 6 4 395 45 329 274 - 1220 6 4 395 45 48 37 - 1221 6 4 395 274 48 45 - 1222 6 4 395 329 37 268 - 1223 6 4 395 38 37 47 - 1224 6 4 395 38 268 37 - 1225 6 4 395 278 38 47 - 1226 6 4 395 38 278 268 - 1227 6 4 396 393 381 358 - 1228 6 4 396 311 393 358 - 1229 6 4 396 311 347 315 - 1230 6 4 396 315 393 311 - 1231 6 4 396 358 381 371 - 1232 6 4 396 380 358 371 - 1233 6 4 396 380 371 347 - 1234 6 4 396 368 393 315 - 1235 6 4 396 361 393 368 - 1236 6 4 396 381 393 361 - 1237 6 4 397 303 367 285 - 1238 6 4 397 285 367 366 - 1239 6 4 397 285 362 303 - 1240 6 4 397 366 367 341 - 1241 6 4 397 339 364 362 - 1242 6 4 397 287 362 285 - 1243 6 4 397 366 287 285 - 1244 6 4 398 257 384 290 - 1245 6 4 398 363 384 257 - 1246 6 4 398 257 290 240 - 1247 6 4 398 240 242 257 - 1248 6 4 398 242 363 257 - 1249 6 4 398 363 242 340 - 1250 6 4 398 284 242 240 - 1251 6 4 398 340 242 284 - 1252 6 4 398 290 284 240 - 1253 6 4 398 290 366 284 - 1254 6 4 398 366 340 284 - 1255 6 4 398 384 363 383 - 1256 6 4 399 371 386 328 - 1257 6 4 399 389 386 371 - 1258 6 4 399 392 389 371 - 1259 6 4 399 389 392 354 - 1260 6 4 399 389 335 386 - 1261 6 4 399 326 386 335 - 1262 6 4 399 328 386 326 - 1263 6 4 399 355 326 354 - 1264 6 4 399 355 328 326 - 1265 6 4 399 335 379 326 - 1266 6 4 399 379 354 326 - 1267 6 4 399 383 392 371 - 1268 6 4 399 331 371 328 - 1269 6 4 399 331 383 371 - 1270 6 4 399 355 331 328 - 1271 6 4 399 355 383 331 - 1272 6 4 399 392 383 355 - 1273 6 4 399 354 392 355 - 1274 6 4 400 341 365 304 - 1275 6 4 400 387 365 341 - 1276 6 4 400 398 363 383 - 1277 6 4 400 398 340 363 - 1278 6 4 400 340 341 304 - 1279 6 4 400 363 340 304 - 1280 6 4 400 383 331 371 - 1281 6 4 400 330 331 304 - 1282 6 4 400 363 304 331 - 1283 6 4 400 331 383 363 - 1284 6 4 401 396 371 347 - 1285 6 4 401 315 396 347 - 1286 6 4 401 368 396 315 - 1287 6 4 401 296 387 368 - 1288 6 4 401 348 296 298 - 1289 6 4 401 296 368 298 - 1290 6 4 401 348 298 315 - 1291 6 4 401 368 315 298 - 1292 6 4 401 347 372 315 - 1293 6 4 401 315 372 348 - 1294 6 4 402 325 317 320 - 1295 6 4 402 320 351 325 - 1296 6 4 402 391 325 351 - 1297 6 4 402 289 320 317 - 1298 6 4 402 351 320 289 - 1299 6 4 402 391 336 375 - 1300 6 4 402 336 391 351 - 1301 6 4 402 336 351 295 - 1302 6 4 402 375 336 295 - 1303 6 4 402 375 295 349 - 1304 6 4 402 349 295 337 - 1305 6 4 402 349 337 289 - 1306 6 4 402 349 289 317 - 1307 6 4 403 359 390 336 - 1308 6 4 403 359 336 288 - 1309 6 4 403 359 288 283 - 1310 6 4 403 392 283 288 - 1311 6 4 403 375 288 336 - 1312 6 4 403 375 392 288 - 1313 6 4 403 336 390 375 - 1314 6 4 403 389 392 375 - 1315 6 4 403 392 389 354 - 1316 6 4 403 375 390 389 - 1317 6 4 403 354 389 266 - 1318 6 4 403 390 266 389 - 1319 6 4 403 359 283 354 - 1320 6 4 403 283 392 354 - 1321 6 4 403 359 354 266 - 1322 6 4 403 266 390 359 - 1323 6 4 404 377 394 378 - 1324 6 4 404 310 377 343 - 1325 6 4 404 394 377 310 - 1326 6 4 404 343 377 369 - 1327 6 4 404 378 369 377 - 1328 6 4 404 343 369 324 - 1329 6 4 404 378 324 369 - 1330 6 4 404 343 280 310 - 1331 6 4 404 280 394 310 - 1332 6 4 404 378 394 279 - 1333 6 4 404 279 334 280 - 1334 6 4 404 394 280 334 - 1335 6 4 404 394 334 279 - 1336 6 4 404 324 378 279 - 1337 6 4 404 280 270 279 - 1338 6 4 404 270 324 279 - 1339 6 4 404 280 343 270 - 1340 6 4 404 270 343 324 - 1341 6 4 405 387 385 368 - 1342 6 4 405 368 401 387 - 1343 6 4 405 396 401 368 - 1344 6 4 405 385 361 368 - 1345 6 4 405 361 396 368 - 1346 6 4 405 381 396 361 - 1347 6 4 405 381 361 339 - 1348 6 4 405 361 385 339 - 1349 6 4 405 381 339 371 - 1350 6 4 405 371 396 381 - 1351 6 4 405 339 385 364 - 1352 6 4 405 387 364 385 - 1353 6 4 406 340 366 341 - 1354 6 4 406 398 366 340 - 1355 6 4 406 400 398 340 - 1356 6 4 406 400 383 398 - 1357 6 4 406 366 397 341 - 1358 6 4 406 384 398 383 - 1359 6 4 406 290 398 384 - 1360 6 4 406 287 366 290 - 1361 6 4 406 398 290 366 - 1362 6 4 406 287 397 366 - 1363 6 4 407 341 397 364 - 1364 6 4 407 387 341 364 - 1365 6 4 407 387 400 341 - 1366 6 4 407 400 371 383 - 1367 6 4 407 371 400 387 - 1368 6 4 407 405 371 387 - 1369 6 4 407 383 371 339 - 1370 6 4 407 405 339 371 - 1371 6 4 407 405 364 339 - 1372 6 4 407 364 405 387 - 1373 6 4 407 406 400 383 - 1374 6 4 407 400 340 341 - 1375 6 4 407 340 406 341 - 1376 6 4 407 400 406 340 - 1377 6 4 407 341 406 397 - 1378 6 4 407 397 406 383 - 1379 6 4 407 364 397 339 - 1380 6 4 407 397 383 339 - 1381 6 4 408 357 330 302 - 1382 6 4 408 347 330 316 - 1383 6 4 408 371 330 347 - 1384 6 4 408 401 371 347 - 1385 6 4 408 371 401 387 - 1386 6 4 408 372 401 347 - 1387 6 4 408 348 401 372 - 1388 6 4 408 348 372 316 - 1389 6 4 408 372 347 316 - 1390 6 4 408 330 357 316 - 1391 6 4 408 296 401 348 - 1392 6 4 408 387 401 296 - 1393 6 4 408 302 365 296 - 1394 6 4 408 387 296 365 - 1395 6 4 408 400 387 365 - 1396 6 4 408 330 304 302 - 1397 6 4 408 330 400 304 - 1398 6 4 408 297 357 302 - 1399 6 4 269 43 220 42 - 1400 6 4 269 215 220 43 - 1401 6 4 379 48 27 47 - 1402 6 4 379 27 266 47 - 1403 6 4 379 48 56 27 - 1404 6 4 379 56 273 27 - 1405 6 4 376 54 57 55 - 1406 6 4 376 55 279 54 - 1407 6 4 344 282 241 272 - 1408 6 4 344 241 282 259 - 1409 6 4 366 83 102 92 - 1410 6 4 366 285 92 102 - 1411 6 4 366 83 101 102 - 1412 6 4 366 101 287 102 - 1413 6 4 366 290 101 284 - 1414 6 4 366 290 287 101 - 1415 6 4 394 168 280 275 - 1416 6 4 394 310 280 168 - 1417 6 4 382 229 227 232 - 1418 6 4 382 227 318 232 - 1419 6 4 355 256 235 255 - 1420 6 4 355 235 326 255 - 1421 6 4 195 305 332 315 - 1422 6 4 195 315 332 192 - 1423 6 4 360 342 155 150 - 1424 6 4 360 342 307 155 - 1425 6 4 324 270 206 209 - 1426 6 4 324 270 343 206 - 1427 6 4 408 302 296 297 - 1428 6 4 408 296 348 297 - 1429 6 4 402 295 351 337 - 1430 6 4 402 337 351 289 - 1431 6 4 344 260 356 250 - 1432 6 4 344 356 312 250 - 1433 6 4 262 265 330 263 - 1434 6 4 262 265 356 330 - 1435 6 4 243 316 173 297 - 1436 6 4 243 297 357 316 - 1437 6 4 107 362 285 293 - 1438 6 4 107 362 287 285 - 1439 6 4 397 341 367 364 - 1440 6 4 397 364 367 303 - 1441 6 4 380 370 335 345 - 1442 6 4 380 370 358 335 - 1443 6 4 386 356 330 347 - 1444 6 4 386 330 371 347 - 1445 6 4 316 175 372 191 - 1446 6 4 316 348 372 175 - 1447 6 4 192 372 175 191 - 1448 6 4 192 373 175 372 - 1449 6 4 296 373 297 133 - 1450 6 4 296 297 373 348 - 1451 6 4 388 303 293 300 - 1452 6 4 388 303 374 293 - 1453 6 4 349 382 319 361 - 1454 6 4 349 382 318 319 - 1455 6 4 227 301 382 338 - 1456 6 4 227 382 318 338 - 1457 6 4 229 306 382 301 - 1458 6 4 229 321 382 306 - 1459 6 4 264 331 355 328 - 1460 6 4 264 384 355 331 - 1461 6 4 360 301 382 342 - 1462 6 4 360 385 342 382 - 1463 6 4 382 321 361 346 - 1464 6 4 382 385 346 361 - 1465 6 4 389 381 358 371 - 1466 6 4 389 358 386 371 - 1467 6 4 293 349 294 337 - 1468 6 4 293 349 388 294 - 1469 6 4 381 375 376 350 - 1470 6 4 381 389 376 375 - 1471 6 4 399 379 389 354 - 1472 6 4 399 335 389 379 - 1473 6 4 277 271 26 266 - 1474 6 4 277 266 390 271 - 1475 6 4 197 393 314 315 - 1476 6 4 197 393 315 311 - 1477 6 4 311 396 380 358 - 1478 6 4 311 380 396 347 - 1479 6 4 364 362 374 303 - 1480 6 4 364 303 397 362 - 1481 6 4 408 304 365 302 - 1482 6 4 408 304 400 365 - 1483 6 4 330 400 331 371 - 1484 6 4 371 405 396 401 - 1485 6 4 371 387 405 401 - 1486 6 4 400 408 371 330 - 1487 6 4 400 408 387 371 - 1488 6 4 316 357 408 297 - 1489 6 4 316 408 348 297 - 1490 6 4 409 212 267 32 - 1491 6 4 409 325 267 212 - 1492 6 4 409 271 32 267 - 1493 6 4 409 267 325 271 - 1494 6 4 409 220 223 212 - 1495 6 4 409 223 325 212 - 1496 6 4 409 10 220 212 - 1497 6 4 409 10 212 32 - 1498 6 4 409 220 10 42 - 1499 6 4 409 32 42 10 - 1500 6 4 409 269 220 42 - 1501 6 4 409 32 52 42 - 1502 6 4 409 269 42 52 - 1503 6 4 409 271 52 32 - 1504 6 4 409 271 269 52 - 1505 6 4 409 325 269 271 - 1506 6 4 410 353 350 319 - 1507 6 4 410 222 325 223 - 1508 6 4 410 325 222 317 - 1509 6 4 410 402 325 317 - 1510 6 4 410 402 391 325 - 1511 6 4 411 392 339 362 - 1512 6 4 411 339 392 383 - 1513 6 4 411 339 397 362 - 1514 6 4 411 383 397 339 - 1515 6 4 411 406 397 383 - 1516 6 4 411 362 397 287 - 1517 6 4 411 397 406 287 - 1518 6 4 411 288 362 287 - 1519 6 4 411 392 362 288 - 1520 6 4 411 288 287 283 - 1521 6 4 411 283 392 288 - 1522 6 4 411 355 392 283 - 1523 6 4 411 383 392 355 - 1524 6 4 411 291 355 283 - 1525 6 4 411 291 384 355 - 1526 6 4 411 384 383 355 - 1527 6 4 411 384 406 383 - 1528 6 4 411 384 291 290 - 1529 6 4 411 290 406 384 - 1530 6 4 411 291 287 290 - 1531 6 4 411 287 406 290 - 1532 6 4 411 291 283 287 - 1533 6 4 412 223 202 222 - 1534 6 4 412 410 223 222 - 1535 6 4 412 202 317 222 - 1536 6 4 412 410 222 317 - 1537 6 4 412 319 317 202 - 1538 6 4 412 319 410 317 - 1539 6 4 412 319 202 231 - 1540 6 4 412 410 319 353 - 1541 6 4 412 231 323 319 - 1542 6 4 412 353 319 323 - 1543 6 4 412 231 353 323 - 1544 6 4 412 223 231 202 - 1545 6 4 413 378 350 353 - 1546 6 4 413 410 353 350 - 1547 6 4 413 378 269 350 - 1548 6 4 413 391 350 269 - 1549 6 4 413 391 410 350 - 1550 6 4 413 269 378 324 - 1551 6 4 413 378 353 324 - 1552 6 4 413 269 324 215 - 1553 6 4 413 353 215 324 - 1554 6 4 413 325 391 269 - 1555 6 4 413 410 391 325 - 1556 6 4 413 223 410 325 - 1557 6 4 413 215 353 223 - 1558 6 4 413 220 215 223 - 1559 6 4 413 220 269 215 - 1560 6 4 413 223 409 220 - 1561 6 4 413 409 269 220 - 1562 6 4 413 325 409 223 - 1563 6 4 413 409 325 269 - 1564 6 4 414 410 391 350 - 1565 6 4 414 391 410 402 - 1566 6 4 414 391 402 375 - 1567 6 4 414 350 391 375 - 1568 6 4 414 410 350 319 - 1569 6 4 414 349 317 319 - 1570 6 4 414 410 319 317 - 1571 6 4 414 361 319 350 - 1572 6 4 414 361 349 319 - 1573 6 4 414 349 361 339 - 1574 6 4 414 339 375 349 - 1575 6 4 414 361 381 339 - 1576 6 4 414 339 381 375 - 1577 6 4 414 350 381 361 - 1578 6 4 414 375 381 350 - 1579 6 4 414 349 402 317 - 1580 6 4 414 410 317 402 - 1581 6 4 414 375 402 349 - 1582 6 4 353 224 231 223 - 1583 6 4 353 231 412 223 - 1584 6 4 353 223 412 410 - 1585 6 4 353 410 413 223 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 1585 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 729 730 - 731 732 733 734 735 736 737 738 739 740 - 741 742 743 744 745 746 747 748 749 750 - 751 752 753 754 755 756 757 758 759 760 - 761 762 763 764 765 766 767 768 769 770 - 771 772 773 774 775 776 777 778 779 780 - 781 782 783 784 785 786 787 788 789 790 - 791 792 793 794 795 796 797 798 799 800 - 801 802 803 804 805 806 807 808 809 810 - 811 812 813 814 815 816 817 818 819 820 - 821 822 823 824 825 826 827 828 829 830 - 831 832 833 834 835 836 837 838 839 840 - 841 842 843 844 845 846 847 848 849 850 - 851 852 853 854 855 856 857 858 859 860 - 861 862 863 864 865 866 867 868 869 870 - 871 872 873 874 875 876 877 878 879 880 - 881 882 883 884 885 886 887 888 889 890 - 891 892 893 894 895 896 897 898 899 900 - 901 902 903 904 905 906 907 908 909 910 - 911 912 913 914 915 916 917 918 919 920 - 921 922 923 924 925 926 927 928 929 930 - 931 932 933 934 935 936 937 938 939 940 - 941 942 943 944 945 946 947 948 949 950 - 951 952 953 954 955 956 957 958 959 960 - 961 962 963 964 965 966 967 968 969 970 - 971 972 973 974 975 976 977 978 979 980 - 981 982 983 984 985 986 987 988 989 990 - 991 992 993 994 995 996 997 998 999 1000 - 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 - 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 - 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 - 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 - 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 - 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 - 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 - 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 - 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 - 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 - 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 - 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 - 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 - 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 - 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 - 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 - 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 - 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 - 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 - 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 - 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 - 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 - 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 - 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 - 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 - 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 - 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 - 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 - 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 - 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 - 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 - 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 - 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 - 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 - 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 - 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 - 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 - 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 - 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 - 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 - 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 - 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 - 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 - 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 - 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 - 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 - 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 - 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 - 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 - 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 - 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 - 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 - 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 - 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 - 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 - 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 - 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 - 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 - 1581 1582 1583 1584 1585 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - pec 1 526 0 6 - 19 6 2 - 16 6 4 - 26 6 4 - 39 6 1 - 57 6 1 - 43 6 1 - 47 6 2 - 48 6 2 - 24 6 3 - 77 6 3 - 264 6 3 - 14 6 2 - 170 6 3 - 98 6 4 - 64 6 3 - 63 6 3 - 95 6 1 - 94 6 4 - 366 6 3 - 44 6 4 - 5 6 3 - 4 6 3 - 136 6 3 - 62 6 3 - 245 6 3 - 31 6 3 - 311 6 3 - 13 6 4 - 703 6 3 - 42 6 4 - 748 6 3 - 22 6 1 - 425 6 3 - 45 6 3 - 513 6 3 - 46 6 3 - 332 6 3 - 15 6 2 - 609 6 3 - 97 6 1 - 437 6 3 - 484 6 3 - 185 6 3 - 319 6 3 - 263 6 3 - 172 6 3 - 368 6 3 - 123 6 3 - 603 6 3 - 612 6 3 - 328 6 3 - 327 6 3 - 312 6 3 - 1247 6 3 - 892 6 3 - 894 6 3 - 243 6 3 - 750 6 3 - 736 6 3 - 734 6 3 - 417 6 3 - 846 6 3 - 515 6 3 - 844 6 3 - 834 6 3 - 836 6 3 - 432 6 3 - 430 6 3 - 325 6 3 - 1079 6 3 - 616 6 3 - 619 6 3 - 895 6 3 - 621 6 3 - 588 6 3 - 181 6 3 - 250 6 3 - 1419 6 3 - 590 6 3 - 592 6 3 - 596 6 3 - 1076 6 3 - 817 6 3 - 591 6 3 - 1433 6 2 - 837 6 3 - 598 6 3 - 600 6 3 - 28 6 1 - 27 6 4 - 10 6 4 - 78 6 2 - 90 6 4 - 76 6 2 - 84 6 4 - 12 6 1 - 8 6 2 - 7 6 2 - 281 6 3 - 82 6 3 - 73 6 4 - 74 6 1 - 143 6 3 - 70 6 3 - 93 6 2 - 37 6 4 - 391 6 3 - 11 6 4 - 120 6 3 - 80 6 4 - 30 6 1 - 69 6 1 - 351 6 3 - 59 6 4 - 578 6 3 - 52 6 1 - 726 6 3 - 41 6 4 - 694 6 3 - 21 6 1 - 452 6 3 - 88 6 1 - 562 6 3 - 38 6 1 - 1496 6 3 - 104 6 1 - 540 6 3 - 101 6 1 - 646 6 3 - 20 6 1 - 51 6 1 - 304 6 3 - 282 6 3 - 153 6 3 - 390 6 3 - 121 6 3 - 533 6 3 - 536 6 3 - 1494 6 3 - 585 6 3 - 582 6 3 - 570 6 3 - 950 6 3 - 952 6 3 - 356 6 3 - 689 6 3 - 683 6 3 - 681 6 3 - 548 6 3 - 552 6 3 - 449 6 3 - 546 6 3 - 411 6 3 - 415 6 3 - 638 6 3 - 558 6 3 - 1558 6 3 - 812 6 3 - 545 6 3 - 564 6 3 - 960 6 3 - 568 6 3 - 518 6 3 - 300 6 3 - 346 6 3 - 1533 6 3 - 520 6 3 - 522 6 3 - 526 6 3 - 1582 6 3 - 1544 6 3 - 521 6 3 - 544 6 3 - 1417 6 3 - 528 6 3 - 529 6 3 - 19 6 4 - 18 6 1 - 61 6 4 - 10 6 1 - 57 6 4 - 53 6 4 - 86 6 2 - 84 6 1 - 100 6 4 - 94 6 3 - 9 6 4 - 7 6 1 - 370 6 3 - 2 6 4 - 148 6 3 - 60 6 1 - 385 6 3 - 72 6 3 - 83 6 2 - 37 6 2 - 25 6 4 - 77 6 4 - 164 6 3 - 66 6 1 - 231 6 3 - 56 6 4 - 512 6 3 - 46 6 1 - 990 6 3 - 3 6 1 - 727 6 3 - 41 6 3 - 559 6 3 - 38 6 2 - 447 6 3 - 23 6 4 - 495 6 3 - 81 6 1 - 747 6 3 - 22 6 3 - 637 6 3 - 647 6 3 - 192 6 3 - 485 6 3 - 149 6 3 - 369 6 3 - 387 6 3 - 162 6 3 - 489 6 3 - 496 6 3 - 738 6 3 - 740 6 3 - 509 6 3 - 516 6 3 - 986 6 3 - 1447 6 4 - 229 6 3 - 729 6 3 - 721 6 3 - 718 6 3 - 442 6 3 - 777 6 3 - 555 6 3 - 499 6 3 - 643 6 3 - 469 6 3 - 625 6 3 - 627 6 3 - 482 6 3 - 487 6 3 - 500 6 3 - 503 6 3 - 971 6 3 - 506 6 3 - 464 6 3 - 188 6 3 - 236 6 3 - 468 6 3 - 466 6 3 - 471 6 3 - 473 6 3 - 977 6 3 - 477 6 3 - 467 6 3 - 501 6 3 - 470 6 3 - 476 6 3 - 479 6 3 - 43 6 4 - 53 6 1 - 86 6 4 - 12 6 2 - 48 6 1 - 50 6 1 - 91 6 4 - 76 6 1 - 287 6 3 - 71 6 3 - 364 6 3 - 44 6 1 - 373 6 3 - 2 6 1 - 75 6 2 - 74 6 2 - 393 6 3 - 11 6 2 - 383 6 3 - 72 6 4 - 65 6 1 - 63 6 1 - 259 6 3 - 54 6 4 - 422 6 3 - 45 6 4 - 402 6 3 - 34 6 1 - 693 6 3 - 21 6 3 - 991 6 3 - 3 6 4 - 458 6 3 - 88 6 2 - 444 6 3 - 23 6 2 - 704 6 3 - 42 6 3 - 55 6 2 - 99 6 1 - 89 6 1 - 634 6 3 - 436 6 3 - 35 6 1 - 377 6 3 - 289 6 3 - 381 6 3 - 255 6 3 - 915 6 3 - 913 6 3 - 698 6 3 - 697 6 3 - 410 6 3 - 408 6 3 - 873 6 3 - 872 6 3 - 419 6 3 - 362 6 3 - 999 6 3 - 360 6 3 - 455 6 3 - 395 6 3 - 439 6 3 - 440 6 3 - 632 6 3 - 378 6 3 - 414 6 3 - 416 6 3 - 434 6 3 - 901 6 3 - 709 6 3 - 712 6 3 - 875 6 3 - 870 6 3 - 406 6 3 - 426 6 3 - 273 6 3 - 927 6 3 - 361 6 3 - 908 6 3 - 929 6 3 - 460 6 3 - 462 6 3 - 379 6 3 - 905 6 3 - 930 6 3 - 47 6 4 - 50 6 4 - 91 6 1 - 90 6 2 - 26 6 1 - 33 6 4 - 67 6 1 - 28 6 3 - 111 6 3 - 87 6 3 - 267 6 3 - 14 6 1 - 256 6 3 - 54 6 3 - 68 6 3 - 69 6 3 - 278 6 3 - 82 6 1 - 285 6 3 - 71 6 4 - 128 6 3 - 1 6 3 - 6 6 1 - 4 6 1 - 309 6 3 - 13 6 1 - 199 6 3 - 32 6 1 - 539 6 3 - 101 6 2 - 96 6 4 - 99 6 2 - 354 6 3 - 59 6 3 - 403 6 3 - 34 6 3 - 335 6 3 - 15 6 4 - 215 6 3 - 102 6 3 - 301 6 3 - 36 6 3 - 322 6 3 - 208 6 3 - 261 6 3 - 109 6 3 - 276 6 3 - 127 6 3 - 337 6 3 - 339 6 3 - 858 6 3 - 857 6 3 - 201 6 3 - 792 6 3 - 795 6 3 - 794 6 3 - 305 6 3 - 262 6 3 - 1409 6 3 - 1411 6 3 - 352 6 3 - 277 6 3 - 399 6 3 - 345 6 3 - 271 6 3 - 270 6 3 - 299 6 3 - 676 6 3 - 213 6 3 - 670 6 3 - 344 6 3 - 672 6 3 - 803 6 3 - 358 6 3 - 253 6 3 - 323 6 3 - 316 6 3 - 863 6 3 - 252 6 3 - 291 6 3 - 293 6 3 - 666 6 3 - 664 6 3 - 254 6 3 - 342 6 3 - 275 6 3 - 298 6 3 - 295 6 3 - 39 6 2 - 33 6 1 - 67 6 2 - 27 6 3 - 16 6 2 - 18 6 2 - 61 6 1 - 78 6 4 - 168 6 3 - 98 6 3 - 117 6 3 - 80 6 3 - 165 6 3 - 66 6 3 - 114 6 3 - 87 6 4 - 146 6 3 - 60 6 4 - 140 6 3 - 70 6 4 - 132 6 3 - 62 6 4 - 134 6 3 - 1 6 1 - 198 6 3 - 32 6 3 - 246 6 3 - 31 6 1 - 492 6 3 - 81 6 4 - 1499 6 3 - 104 6 2 - 579 6 3 - 52 6 3 - 232 6 3 - 56 6 3 - 606 6 3 - 97 6 2 - 218 6 3 - 102 6 1 - 189 6 3 - 103 6 4 - 182 6 3 - 210 6 3 - 115 6 3 - 167 6 3 - 144 6 3 - 130 6 3 - 220 6 3 - 1223 6 3 - 1220 6 3 - 1214 6 3 - 248 6 3 - 175 6 3 - 758 6 3 - 755 6 3 - 194 6 3 - 108 6 3 - 1501 6 3 - 157 6 3 - 234 6 3 - 154 6 3 - 575 6 3 - 223 6 3 - 138 6 3 - 137 6 3 - 187 6 3 - 651 6 3 - 180 6 3 - 186 6 3 - 225 6 3 - 649 6 3 - 762 6 3 - 238 6 3 - 106 6 3 - 211 6 3 - 204 6 3 - 1401 6 3 - 105 6 3 - 155 6 3 - 159 6 3 - 662 6 3 - 1403 6 3 - 107 6 3 - 1405 6 3 - 139 6 3 - 177 6 3 - 178 6 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/cubeK268.neu b/cpp/nudg++/trunk/Grid/3D/cubeK268.neu deleted file mode 100644 index bea90c0..0000000 --- a/cpp/nudg++/trunk/Grid/3D/cubeK268.neu +++ /dev/null @@ -1,565 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -cube1 -PROGRAM: Gambit VERSION: 1.3.0 -27 Aug 2001 12:07:49 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 94 268 1 1 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 5.0000000000000000e-01 -5.0000000000e-01 5.0000000000e-01 - 2 5.0000000000000000e-01 -5.0000000000e-01 -5.0000000000e-01 - 3 5.0000000000000000e-01 -5.0000000000e-01 1.6666666667e-01 - 4 5.0000000000000000e-01 -5.0000000000e-01 -1.6666666667e-01 - 5 5.0000000000000000e-01 5.0000000000e-01 -5.0000000000e-01 - 6 5.0000000000000000e-01 1.9666666667e-01 -5.0000000000e-01 - 7 5.0000000000000000e-01 -1.9666666667e-01 -5.0000000000e-01 - 8 5.0000000000000000e-01 5.0000000000e-01 5.0000000000e-01 - 9 5.0000000000000000e-01 5.0000000000e-01 1.6666666667e-01 - 10 5.0000000000000000e-01 5.0000000000e-01 -1.6666666667e-01 - 11 5.0000000000000000e-01 -1.8666666667e-01 5.0000000000e-01 - 12 5.0000000000000000e-01 1.4666666667e-01 5.0000000000e-01 - 13 5.0000000000000000e-01 2.3507789125e-01 2.7150115797e-01 - 14 5.0000000000000000e-01 -2.4631031727e-01 2.7149457760e-01 - 15 5.0000000000000000e-01 2.5507397411e-01 -2.7236083069e-01 - 16 5.0000000000000000e-01 -2.6631416783e-01 -2.7236728279e-01 - 17 5.0000000000000000e-01 -9.5112888295e-04 1.9231307367e-01 - 18 5.0000000000000000e-01 2.7099470629e-01 -6.0965707545e-04 - 19 5.0000000000000000e-01 -2.7276183488e-01 -6.1743214209e-04 - 20 5.0000000000000000e-01 -9.3270234243e-04 -1.9364476866e-01 - 21 -5.0000000000000000e-01 5.0000000000e-01 -5.0000000000e-01 - 22 -1.6666666666999996e-01 5.0000000000e-01 -5.0000000000e-01 - 23 1.6666666667000007e-01 5.0000000000e-01 -5.0000000000e-01 - 24 -5.0000000000000000e-01 5.0000000000e-01 5.0000000000e-01 - 25 -5.0000000000000000e-01 5.0000000000e-01 1.6666666667e-01 - 26 -5.0000000000000000e-01 5.0000000000e-01 -1.6666666667e-01 - 27 1.6666666667000007e-01 5.0000000000e-01 5.0000000000e-01 - 28 -1.6666666666999996e-01 5.0000000000e-01 5.0000000000e-01 - 29 -2.7236083069000006e-01 5.0000000000e-01 2.8507397411e-01 - 30 2.7150115796999996e-01 5.0000000000e-01 2.8507789125e-01 - 31 -2.7236728279000000e-01 5.0000000000e-01 -2.8631416783e-01 - 32 2.7149457759999995e-01 5.0000000000e-01 -2.8631031727e-01 - 33 1.9231307367000006e-01 5.0000000000e-01 -9.5112888295e-04 - 34 -6.0965707545002079e-04 5.0000000000e-01 2.6099470629e-01 - 35 -6.1743214208997976e-04 5.0000000000e-01 -2.6276183488e-01 - 36 -1.9364476866000002e-01 5.0000000000e-01 -9.5270234243e-04 - 37 -5.0000000000000000e-01 -5.0000000000e-01 -5.0000000000e-01 - 38 -5.0000000000000000e-01 -1.6666666667e-01 -5.0000000000e-01 - 39 -5.0000000000000000e-01 1.6666666667e-01 -5.0000000000e-01 - 40 -5.0000000000000000e-01 -5.0000000000e-01 5.0000000000e-01 - 41 -5.0000000000000000e-01 -5.0000000000e-01 1.6666666667e-01 - 42 -5.0000000000000000e-01 -5.0000000000e-01 -1.6666666667e-01 - 43 -5.0000000000000000e-01 1.6666666667e-01 5.0000000000e-01 - 44 -5.0000000000000000e-01 -1.6666666667e-01 5.0000000000e-01 - 45 -5.0000000000000000e-01 -2.7236083069e-01 2.8507397411e-01 - 46 -5.0000000000000000e-01 2.7150115797e-01 2.8507789125e-01 - 47 -5.0000000000000000e-01 -2.7236728279e-01 -2.8631416783e-01 - 48 -5.0000000000000000e-01 2.7149457760e-01 -2.8631031727e-01 - 49 -5.0000000000000000e-01 1.9231307367e-01 -9.5112888295e-04 - 50 -5.0000000000000000e-01 -6.0965707545e-04 2.6099470629e-01 - 51 -5.0000000000000000e-01 -6.1743214209e-04 -2.6276183488e-01 - 52 -5.0000000000000000e-01 -1.9364476866e-01 -9.5270234243e-04 - 53 1.6666666667000007e-01 -5.0000000000e-01 -5.0000000000e-01 - 54 -1.6666666666999996e-01 -5.0000000000e-01 -5.0000000000e-01 - 55 -1.6666666666999996e-01 -5.0000000000e-01 5.0000000000e-01 - 56 1.6666666667000007e-01 -5.0000000000e-01 5.0000000000e-01 - 57 2.8507789125000005e-01 -5.0000000000e-01 2.7150115797e-01 - 58 -2.8631031727000000e-01 -5.0000000000e-01 2.7149457760e-01 - 59 2.8507397410999991e-01 -5.0000000000e-01 -2.7236083069e-01 - 60 -2.8631416783000008e-01 -5.0000000000e-01 -2.7236728279e-01 - 61 -9.5112888295001419e-04 -5.0000000000e-01 1.9231307367e-01 - 62 2.6099470628999999e-01 -5.0000000000e-01 -6.0965707545e-04 - 63 -2.6276183488000004e-01 -5.0000000000e-01 -6.1743214209e-04 - 64 -9.5270234242994523e-04 -5.0000000000e-01 -1.9364476866e-01 - 65 2.7150115796999996e-01 2.8507789125e-01 -5.0000000000e-01 - 66 -2.7236083069000006e-01 2.8507397411e-01 -5.0000000000e-01 - 67 2.7149457759999995e-01 -2.8631031727e-01 -5.0000000000e-01 - 68 -2.7236728279000000e-01 -2.8631416783e-01 -5.0000000000e-01 - 69 -6.0965707545002079e-04 2.6099470629e-01 -5.0000000000e-01 - 70 1.9231307367000006e-01 -9.5112888295e-04 -5.0000000000e-01 - 71 -6.1743214208997976e-04 -2.6276183488e-01 -5.0000000000e-01 - 72 -1.9364476866000002e-01 -9.5270234243e-04 -5.0000000000e-01 - 73 2.8507397410999991e-01 -2.7236083069e-01 5.0000000000e-01 - 74 -2.8631416783000008e-01 -2.7236728279e-01 5.0000000000e-01 - 75 2.8507789125000005e-01 2.7150115797e-01 5.0000000000e-01 - 76 -2.8631031727000000e-01 2.7149457760e-01 5.0000000000e-01 - 77 2.6099470628999999e-01 -6.0965707545e-04 5.0000000000e-01 - 78 -9.5112888295001419e-04 1.9231307367e-01 5.0000000000e-01 - 79 -9.5270234242994523e-04 -1.9364476866e-01 5.0000000000e-01 - 80 -2.6276183488000004e-01 -6.1743214209e-04 5.0000000000e-01 - 81 2.5829991697999999e-01 -1.8334290385e-01 -1.5554314852e-01 - 82 2.3446026444000001e-01 -1.8334108591e-01 1.5439674258e-01 - 83 2.5777769089000002e-01 1.8170532584e-01 -1.5553840995e-01 - 84 2.3437520861999994e-01 1.8170715868e-01 1.5440152586e-01 - 85 -1.5554314852000006e-01 2.5829991698e-01 -1.8334290385e-01 - 86 -1.5553840995000001e-01 2.5777769089e-01 1.8170532584e-01 - 87 -2.5829991697999999e-01 -1.5554314852e-01 -1.8334290385e-01 - 88 -2.5777769089000002e-01 -1.5553840995e-01 1.8170532584e-01 - 89 2.6753392815999999e-01 -8.0723827705e-04 1.0528176790e-03 - 90 1.4829332939999995e-02 -1.1656295974e-03 -2.3927578330e-01 - 91 3.9356499910000009e-02 2.8002762794e-01 -7.8986241715e-04 - 92 -2.4820561707000000e-01 6.1629176140e-02 -1.0985633126e-03 - 93 -1.2082404457000040e-02 -2.4497900903e-01 -2.0453006029e-02 - 94 2.6915045455000453e-03 -8.7227503536e-04 2.5509673357e-01 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 6 4 33 18 10 9 - 2 6 4 47 60 42 37 - 3 6 4 47 38 68 37 - 4 6 4 47 60 37 68 - 5 6 4 52 41 42 63 - 6 6 4 61 79 55 56 - 7 6 4 61 56 57 79 - 8 6 4 61 55 79 58 - 9 6 4 9 13 8 30 - 10 6 4 4 3 19 62 - 11 6 4 4 59 16 2 - 12 6 4 38 51 72 39 - 13 6 4 7 70 20 6 - 14 6 4 7 16 67 2 - 15 6 4 8 75 27 30 - 16 6 4 8 13 75 30 - 17 6 4 8 75 13 12 - 18 6 4 75 27 34 78 - 19 6 4 75 30 34 27 - 20 6 4 23 65 32 35 - 21 6 4 23 65 35 69 - 22 6 4 23 22 69 35 - 23 6 4 23 65 5 32 - 24 6 4 44 45 74 40 - 25 6 4 44 80 50 43 - 26 6 4 26 36 25 49 - 27 6 4 26 48 21 31 - 28 6 4 54 37 60 68 - 29 6 4 54 60 71 68 - 30 6 4 54 64 71 60 - 31 6 4 54 53 71 64 - 32 6 4 12 17 11 77 - 33 6 4 56 57 79 73 - 34 6 4 56 1 57 73 - 35 6 4 5 65 15 32 - 36 6 4 5 6 15 65 - 37 6 4 5 32 15 10 - 38 6 4 41 45 40 58 - 39 6 4 28 34 27 78 - 40 6 4 28 24 29 76 - 41 6 4 1 11 14 73 - 42 6 4 1 14 3 57 - 43 6 4 1 14 57 73 - 44 6 4 16 2 59 67 - 45 6 4 29 46 76 24 - 46 6 4 29 25 46 24 - 47 6 4 66 39 48 21 - 48 6 4 66 21 48 31 - 49 6 4 66 31 22 21 - 50 6 4 66 72 51 39 - 51 6 4 66 39 51 48 - 52 6 4 71 59 64 53 - 53 6 4 71 67 59 53 - 54 6 4 76 43 46 80 - 55 6 4 76 46 43 24 - 56 6 4 46 50 80 43 - 57 6 4 45 74 40 58 - 58 6 4 59 2 53 67 - 59 6 4 74 79 55 58 - 60 6 4 74 58 55 40 - 61 6 4 81 71 70 67 - 62 6 4 81 59 71 67 - 63 6 4 81 64 71 59 - 64 6 4 81 67 70 7 - 65 6 4 81 20 7 70 - 66 6 4 81 7 16 67 - 67 6 4 81 7 20 16 - 68 6 4 81 67 16 59 - 69 6 4 81 16 20 19 - 70 6 4 81 4 16 19 - 71 6 4 81 16 4 59 - 72 6 4 81 62 59 4 - 73 6 4 81 4 19 62 - 74 6 4 81 59 62 64 - 75 6 4 82 73 77 79 - 76 6 4 82 61 62 57 - 77 6 4 82 81 19 62 - 78 6 4 82 57 14 73 - 79 6 4 82 19 17 14 - 80 6 4 82 3 19 14 - 81 6 4 82 3 14 57 - 82 6 4 82 57 62 3 - 83 6 4 82 19 3 62 - 84 6 4 82 61 57 79 - 85 6 4 82 77 73 11 - 86 6 4 82 14 11 73 - 87 6 4 82 11 17 77 - 88 6 4 82 14 17 11 - 89 6 4 82 79 57 73 - 90 6 4 83 70 69 65 - 91 6 4 83 20 81 70 - 92 6 4 83 15 18 20 - 93 6 4 83 15 6 65 - 94 6 4 83 15 20 6 - 95 6 4 83 6 70 65 - 96 6 4 83 20 70 6 - 97 6 4 83 35 65 69 - 98 6 4 83 32 65 35 - 99 6 4 83 15 65 32 - 100 6 4 83 10 33 18 - 101 6 4 83 32 33 10 - 102 6 4 83 18 15 10 - 103 6 4 83 15 32 10 - 104 6 4 84 75 13 30 - 105 6 4 84 30 33 34 - 106 6 4 84 75 30 34 - 107 6 4 84 75 34 78 - 108 6 4 84 18 83 33 - 109 6 4 84 17 18 13 - 110 6 4 84 9 33 30 - 111 6 4 84 18 33 9 - 112 6 4 84 13 9 30 - 113 6 4 84 13 18 9 - 114 6 4 84 82 17 77 - 115 6 4 84 13 75 12 - 116 6 4 84 75 77 12 - 117 6 4 84 17 12 77 - 118 6 4 84 12 17 13 - 119 6 4 84 75 78 77 - 120 6 4 85 83 69 35 - 121 6 4 85 31 36 35 - 122 6 4 85 31 66 48 - 123 6 4 85 48 66 51 - 124 6 4 85 51 66 72 - 125 6 4 85 48 49 26 - 126 6 4 85 26 49 36 - 127 6 4 85 26 36 31 - 128 6 4 85 48 26 31 - 129 6 4 85 69 22 35 - 130 6 4 85 69 66 22 - 131 6 4 85 31 35 22 - 132 6 4 85 66 31 22 - 133 6 4 85 66 69 72 - 134 6 4 86 76 29 46 - 135 6 4 86 84 34 78 - 136 6 4 86 29 34 36 - 137 6 4 86 36 85 49 - 138 6 4 86 25 36 49 - 139 6 4 86 25 49 46 - 140 6 4 86 29 36 25 - 141 6 4 86 46 29 25 - 142 6 4 86 80 46 50 - 143 6 4 86 80 76 46 - 144 6 4 86 80 78 76 - 145 6 4 86 34 29 28 - 146 6 4 86 76 28 29 - 147 6 4 86 28 78 34 - 148 6 4 86 28 76 78 - 149 6 4 87 60 64 63 - 150 6 4 87 60 47 68 - 151 6 4 87 47 52 51 - 152 6 4 87 47 51 38 - 153 6 4 87 47 38 68 - 154 6 4 87 38 72 68 - 155 6 4 87 38 51 72 - 156 6 4 87 71 60 68 - 157 6 4 87 71 64 60 - 158 6 4 87 68 72 71 - 159 6 4 87 42 60 63 - 160 6 4 87 42 47 60 - 161 6 4 87 52 42 63 - 162 6 4 87 42 52 47 - 163 6 4 87 85 72 51 - 164 6 4 88 74 79 80 - 165 6 4 88 79 74 58 - 166 6 4 88 58 61 79 - 167 6 4 88 63 61 58 - 168 6 4 88 87 63 52 - 169 6 4 88 45 50 52 - 170 6 4 88 86 50 80 - 171 6 4 88 50 45 44 - 172 6 4 88 44 80 50 - 173 6 4 88 74 44 45 - 174 6 4 88 44 74 80 - 175 6 4 88 41 52 63 - 176 6 4 88 45 52 41 - 177 6 4 88 41 63 58 - 178 6 4 88 41 58 45 - 179 6 4 88 45 58 74 - 180 6 4 89 83 84 18 - 181 6 4 89 18 84 17 - 182 6 4 89 20 18 17 - 183 6 4 89 20 83 18 - 184 6 4 89 17 84 82 - 185 6 4 89 17 82 19 - 186 6 4 89 82 81 19 - 187 6 4 89 19 20 17 - 188 6 4 89 19 81 20 - 189 6 4 89 81 83 20 - 190 6 4 90 83 89 81 - 191 6 4 90 87 85 72 - 192 6 4 90 71 72 70 - 193 6 4 90 71 87 72 - 194 6 4 90 70 72 69 - 195 6 4 90 85 69 72 - 196 6 4 90 83 70 69 - 197 6 4 90 69 85 83 - 198 6 4 90 81 71 70 - 199 6 4 90 83 81 70 - 200 6 4 91 86 36 85 - 201 6 4 91 34 33 36 - 202 6 4 91 36 86 34 - 203 6 4 91 35 36 33 - 204 6 4 91 85 36 35 - 205 6 4 91 85 35 83 - 206 6 4 91 84 89 83 - 207 6 4 91 89 90 83 - 208 6 4 91 83 90 85 - 209 6 4 91 34 84 33 - 210 6 4 91 86 84 34 - 211 6 4 91 84 83 33 - 212 6 4 92 88 52 87 - 213 6 4 92 50 49 52 - 214 6 4 92 52 88 50 - 215 6 4 92 51 52 49 - 216 6 4 92 87 52 51 - 217 6 4 92 85 87 51 - 218 6 4 92 91 85 86 - 219 6 4 92 91 90 85 - 220 6 4 92 90 87 85 - 221 6 4 92 88 86 50 - 222 6 4 92 86 85 49 - 223 6 4 93 87 64 63 - 224 6 4 93 63 88 87 - 225 6 4 93 63 64 61 - 226 6 4 93 61 88 63 - 227 6 4 93 64 62 61 - 228 6 4 93 82 61 62 - 229 6 4 93 81 62 64 - 230 6 4 93 81 82 62 - 231 6 4 93 89 82 81 - 232 6 4 93 81 90 89 - 233 6 4 93 81 64 71 - 234 6 4 93 90 81 71 - 235 6 4 93 87 71 64 - 236 6 4 93 87 90 71 - 237 6 4 93 92 87 88 - 238 6 4 93 92 90 87 - 239 6 4 94 86 78 84 - 240 6 4 94 86 80 78 - 241 6 4 94 88 80 86 - 242 6 4 94 92 88 86 - 243 6 4 94 91 86 84 - 244 6 4 94 91 92 86 - 245 6 4 94 91 84 89 - 246 6 4 94 90 91 89 - 247 6 4 94 92 91 90 - 248 6 4 94 93 90 89 - 249 6 4 94 93 92 90 - 250 6 4 94 92 93 88 - 251 6 4 94 79 88 61 - 252 6 4 94 88 93 61 - 253 6 4 94 61 82 79 - 254 6 4 94 93 82 61 - 255 6 4 94 82 89 84 - 256 6 4 94 93 89 82 - 257 6 4 94 79 82 77 - 258 6 4 94 84 77 82 - 259 6 4 94 80 79 78 - 260 6 4 94 80 88 79 - 261 6 4 94 77 78 79 - 262 6 4 94 84 78 77 - 263 6 4 83 35 33 32 - 264 6 4 83 35 91 33 - 265 6 4 85 51 49 48 - 266 6 4 85 51 92 49 - 267 6 4 86 46 49 50 - 268 6 4 86 49 92 50 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 268 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 156 0 6 - 34 6 2 - 41 6 2 - 60 6 4 - 24 6 4 - 17 6 2 - 15 6 1 - 55 6 4 - 40 6 2 - 116 6 3 - 32 6 4 - 18 6 2 - 39 6 4 - 33 6 4 - 6 6 3 - 54 6 2 - 25 6 2 - 85 6 3 - 148 6 3 - 59 6 1 - 174 6 3 - 75 6 3 - 144 6 3 - 119 6 3 - 261 6 3 - 259 6 3 - 164 6 3 - 23 6 1 - 36 6 2 - 49 6 4 - 47 6 2 - 14 6 4 - 58 6 3 - 3 6 3 - 28 6 2 - 21 6 2 - 22 6 1 - 95 6 3 - 13 6 2 - 53 6 2 - 31 6 1 - 50 6 2 - 12 6 4 - 130 6 3 - 64 6 3 - 154 6 3 - 29 6 4 - 61 6 3 - 133 6 3 - 90 6 3 - 194 6 3 - 192 6 3 - 158 6 3 - 34 6 1 - 42 6 4 - 38 6 4 - 60 6 3 - 11 6 2 - 58 6 1 - 28 6 1 - 2 6 3 - 7 6 1 - 6 6 4 - 82 6 3 - 10 6 2 - 177 6 3 - 5 6 3 - 52 6 3 - 31 6 2 - 72 6 3 - 8 6 2 - 30 6 2 - 159 6 3 - 74 6 3 - 167 6 3 - 76 6 3 - 225 6 3 - 227 6 3 - 149 6 3 - 24 6 2 - 38 6 1 - 46 6 3 - 55 6 3 - 2 6 4 - 3 6 2 - 47 6 3 - 27 6 1 - 139 6 3 - 26 6 4 - 56 6 2 - 25 6 4 - 51 6 3 - 12 6 2 - 176 6 3 - 5 6 1 - 171 6 3 - 125 6 3 - 162 6 3 - 152 6 3 - 169 6 3 - 265 6 3 - 267 6 3 - 213 6 3 - 215 6 3 - 151 6 3 - 40 6 1 - 46 6 2 - 9 6 4 - 15 6 4 - 27 6 4 - 49 6 3 - 23 6 4 - 37 6 2 - 110 6 3 - 1 6 4 - 19 6 3 - 39 6 1 - 20 6 4 - 22 6 2 - 140 6 3 - 26 6 1 - 145 6 3 - 101 6 3 - 127 6 3 - 131 6 3 - 136 6 3 - 263 6 3 - 105 6 3 - 201 6 3 - 203 6 3 - 121 6 3 - 17 6 4 - 9 6 1 - 42 6 1 - 41 6 1 - 37 6 4 - 36 6 1 - 14 6 2 - 11 6 4 - 118 6 3 - 32 6 1 - 113 6 3 - 1 6 3 - 80 6 3 - 10 6 1 - 94 6 3 - 13 6 4 - 102 6 3 - 88 6 3 - 67 6 3 - 70 6 3 - 92 6 3 - 79 6 3 - 109 6 3 - 187 6 3 - 182 6 3 - 69 6 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/cubeK5.neu b/cpp/nudg++/trunk/Grid/3D/cubeK5.neu deleted file mode 100644 index e773c43..0000000 --- a/cpp/nudg++/trunk/Grid/3D/cubeK5.neu +++ /dev/null @@ -1,31 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -cav1 -PROGRAM: Gambit VERSION: 1.3.0 -25 Jul 2001 11:10:47 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 8 5 1 1 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -1.0000000000e-00 -1.0000000000e-00 -1.0000000000e-00 - 2 1.0000000000e-00 -1.0000000000e-00 -1.0000000000e-00 - 3 1.0000000000e-00 1.0000000000e-00 -1.0000000000e-00 - 4 -1.0000000000e-00 1.0000000000e-00 -1.0000000000e-00 - 5 -1.0000000000e-00 -1.0000000000e-00 1.0000000000e-00 - 6 1.0000000000e-00 -1.0000000000e-00 1.0000000000e-00 - 7 1.0000000000e-00 1.0000000000e-00 1.0000000000e-00 - 8 -1.0000000000e-00 1.0000000000e-00 1.0000000000e-00 -ENDOFSECTION - ELEMENTS/CELLS 1.3. - 1 6 4 1 2 4 5 - 2 6 4 2 3 4 7 - 3 6 4 2 7 5 6 - 4 6 4 4 5 7 8 - 5 6 4 2 7 4 5 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 5 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/cubeK6.neu b/cpp/nudg++/trunk/Grid/3D/cubeK6.neu deleted file mode 100644 index 240cc52..0000000 --- a/cpp/nudg++/trunk/Grid/3D/cubeK6.neu +++ /dev/null @@ -1,31 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -cav1 -PROGRAM: Gambit VERSION: 1.3.0 -25 Jul 2001 11:10:47 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 8 5 1 0 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -1.0000000000e-00 -1.0000000000e-00 -1.0000000000e-00 - 2 1.0000000000e-00 -1.0000000000e-00 -1.0000000000e-00 - 3 1.0000000000e-00 1.0000000000e-00 -1.0000000000e-00 - 4 -1.0000000000e-00 1.0000000000e-00 -1.0000000000e-00 - 5 -1.0000000000e-00 -1.0000000000e-00 1.0000000000e-00 - 6 1.0000000000e-00 -1.0000000000e-00 1.0000000000e-00 - 7 1.0000000000e-00 1.0000000000e-00 1.0000000000e-00 - 8 -1.0000000000e-00 1.0000000000e-00 1.0000000000e-00 -ENDOFSECTION - ELEMENTS/CELLS 1.3. - 1 6 4 1 2 4 5 - 2 6 4 2 3 4 7 - 3 6 4 2 7 5 6 - 4 6 4 4 5 7 8 - 5 6 4 2 7 4 5 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 5 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/cubeK6a.neu b/cpp/nudg++/trunk/Grid/3D/cubeK6a.neu deleted file mode 100644 index a065eb0..0000000 --- a/cpp/nudg++/trunk/Grid/3D/cubeK6a.neu +++ /dev/null @@ -1,31 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -cav1 -PROGRAM: Gambit VERSION: 1.3.0 -25 Jul 2001 11:10:47 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 8 5 1 1 3 3 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 1.0000000000e-00 -1.0000000000e-00 -1.0000000000e-00 - 2 3.0000000000e-00 -1.0000000000e-00 -1.0000000000e-00 - 3 3.0000000000e-00 1.0000000000e-00 -1.0000000000e-00 - 4 1.0000000000e-00 1.0000000000e-00 -1.0000000000e-00 - 5 1.0000000000e-00 -1.0000000000e-00 1.0000000000e-00 - 6 3.0000000000e-00 -1.0000000000e-00 1.0000000000e-00 - 7 3.0000000000e-00 1.0000000000e-00 1.0000000000e-00 - 8 1.0000000000e-00 1.0000000000e-00 1.0000000000e-00 -ENDOFSECTION - ELEMENTS/CELLS 1.3. - 1 6 4 1 2 4 5 - 2 6 4 2 3 4 7 - 3 6 4 2 7 5 6 - 4 6 4 4 5 7 8 - 5 6 4 2 7 4 5 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 5 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/cubeK86.neu b/cpp/nudg++/trunk/Grid/3D/cubeK86.neu deleted file mode 100644 index 716c669..0000000 --- a/cpp/nudg++/trunk/Grid/3D/cubeK86.neu +++ /dev/null @@ -1,151 +0,0 @@ - CONTROL INFO 2.0.4 -** GAMBIT NEUTRAL FILE -cubeH -PROGRAM: Gambit VERSION: 2.0.4 - 6 Jan 2003 16:17:19 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 39 86 1 0 3 3 -ENDOFSECTION - NODAL COORDINATES 2.0.4 - 1 1.000000000000000 -1.0000000000e+00 1.0000000000e+00 - 2 1.000000000000000 -1.0000000000e+00 -1.0000000000e+00 - 3 1.000000000000000 -1.0000000000e+00 0.0000000000e+00 - 4 1.000000000000000 1.0000000000e+00 -1.0000000000e+00 - 5 1.000000000000000 0.0000000000e+00 -1.0000000000e+00 - 6 1.000000000000000 1.0000000000e+00 1.0000000000e+00 - 7 1.000000000000000 1.0000000000e+00 0.0000000000e+00 - 8 1.000000000000000 0.0000000000e+00 1.0000000000e+00 - 9 1.000000000000000 3.0594453242e-01 3.0594233670e-01 - 10 1.000000000000000 -3.0593585442e-01 -3.0593403831e-01 - 11 1.000000000000000 4.1513197202e-01 -4.1512450328e-01 - 12 1.000000000000000 -4.1512112526e-01 4.1513380129e-01 - 13 -1.000000000000000 1.0000000000e+00 -1.0000000000e+00 - 14 0 1.0000000000e+00 -1.0000000000e+00 - 15 -1.000000000000000 1.0000000000e+00 1.0000000000e+00 - 16 -1.000000000000000 1.0000000000e+00 0.0000000000e+00 - 17 0 1.0000000000e+00 1.0000000000e+00 - 18 -0.305944532420000 1.0000000000e+00 3.0594233670e-01 - 19 0.305935854420000 1.0000000000e+00 -3.0593403831e-01 - 20 -0.415131972020000 1.0000000000e+00 -4.1512450328e-01 - 21 0.415121125260000 1.0000000000e+00 4.1513380129e-01 - 22 -1.000000000000000 -1.0000000000e+00 -1.0000000000e+00 - 23 -1.000000000000000 0.0000000000e+00 -1.0000000000e+00 - 24 -1.000000000000000 -1.0000000000e+00 1.0000000000e+00 - 25 -1.000000000000000 -1.0000000000e+00 0.0000000000e+00 - 26 -1.000000000000000 0.0000000000e+00 1.0000000000e+00 - 27 -1.000000000000000 -3.0594453242e-01 3.0594233670e-01 - 28 -1.000000000000000 3.0593585442e-01 -3.0593403831e-01 - 29 -1.000000000000000 -4.1513197202e-01 -4.1512450328e-01 - 30 -1.000000000000000 4.1512112526e-01 4.1513380129e-01 - 31 0 -1.0000000000e+00 -1.0000000000e+00 - 32 0 -1.0000000000e+00 1.0000000000e+00 - 33 0.305944532420000 -1.0000000000e+00 3.0594233670e-01 - 34 -0.305935854420000 -1.0000000000e+00 -3.0593403831e-01 - 35 0.415131972020000 -1.0000000000e+00 -4.1512450328e-01 - 36 -0.415121125260000 -1.0000000000e+00 4.1513380129e-01 - 37 0.163975270430000 1.6397527043e-01 -1.0000000000e+00 - 38 0.163975270430000 -1.6397527043e-01 1.0000000000e+00 - 39 0.138370826840000 2.9346370697e-01 1.3838069141e-01 -ENDOFSECTION - ELEMENTS/CELLS 2.0.4 - 1 6 4 1 8 12 38 - 2 6 4 1 32 38 33 - 3 6 4 1 33 38 12 - 4 6 4 1 3 33 12 - 5 6 4 24 26 32 36 - 6 6 4 24 36 25 27 - 7 6 4 24 26 36 27 - 8 6 4 8 21 38 17 - 9 6 4 8 21 17 6 - 10 6 4 8 21 9 38 - 11 6 4 8 6 9 21 - 12 6 4 8 9 12 38 - 13 6 4 32 36 26 38 - 14 6 4 32 36 38 33 - 15 6 4 25 27 36 34 - 16 6 4 25 29 27 34 - 17 6 4 25 29 34 22 - 18 6 4 4 7 19 11 - 19 6 4 4 19 14 37 - 20 6 4 4 11 19 37 - 21 6 4 4 37 5 11 - 22 6 4 15 26 30 17 - 23 6 4 15 16 18 30 - 24 6 4 15 30 18 17 - 25 6 4 5 35 31 2 - 26 6 4 5 31 35 37 - 27 6 4 5 35 2 10 - 28 6 4 5 37 35 10 - 29 6 4 5 10 11 37 - 30 6 4 36 26 38 27 - 31 6 4 2 10 35 3 - 32 6 4 29 23 28 37 - 33 6 4 29 34 31 37 - 34 6 4 29 23 37 31 - 35 6 4 29 31 34 22 - 36 6 4 29 23 31 22 - 37 6 4 26 38 30 17 - 38 6 4 26 38 27 30 - 39 6 4 19 14 37 20 - 40 6 4 14 37 20 23 - 41 6 4 14 23 20 13 - 42 6 4 9 7 21 6 - 43 6 4 33 35 10 3 - 44 6 4 33 10 12 3 - 45 6 4 31 34 35 37 - 46 6 4 16 28 13 20 - 47 6 4 16 18 28 20 - 48 6 4 16 30 28 18 - 49 6 4 28 20 23 13 - 50 6 4 28 20 37 23 - 51 6 4 39 19 11 37 - 52 6 4 39 7 9 11 - 53 6 4 39 19 7 11 - 54 6 4 39 21 9 7 - 55 6 4 39 19 21 7 - 56 6 4 39 19 18 21 - 57 6 4 39 9 21 38 - 58 6 4 39 21 18 17 - 59 6 4 39 38 21 17 - 60 6 4 39 18 30 17 - 61 6 4 39 30 38 17 - 62 6 4 39 27 38 30 - 63 6 4 39 27 36 38 - 64 6 4 39 38 36 33 - 65 6 4 39 34 33 36 - 66 6 4 39 36 27 34 - 67 6 4 39 33 10 12 - 68 6 4 39 38 33 12 - 69 6 4 39 10 9 12 - 70 6 4 39 12 9 38 - 71 6 4 39 33 34 35 - 72 6 4 39 33 35 10 - 73 6 4 39 35 34 37 - 74 6 4 39 35 37 10 - 75 6 4 39 34 29 37 - 76 6 4 39 37 29 28 - 77 6 4 39 27 29 34 - 78 6 4 39 27 28 29 - 79 6 4 39 28 30 18 - 80 6 4 39 28 27 30 - 81 6 4 39 11 10 37 - 82 6 4 39 9 10 11 - 83 6 4 39 28 20 37 - 84 6 4 39 19 37 20 - 85 6 4 39 28 18 20 - 86 6 4 39 18 19 20 -ENDOFSECTION - ELEMENT GROUP 2.0.4 -GROUP: 1 ELEMENTS: 86 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/3D/sphere.neu b/cpp/nudg++/trunk/Grid/3D/sphere.neu deleted file mode 100644 index f49aab3..0000000 --- a/cpp/nudg++/trunk/Grid/3D/sphere.neu +++ /dev/null @@ -1,86 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -default_id -PROGRAM: Gambit VERSION: 2.2.30 -10 Jan 2006 14:58:29 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 15 24 1 1 3 3 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 5.26432162877e-01 -8.50217135730e-01 0.00000000000e+00 - 2 2.53086971253e-01 -4.19853041075e-01 8.71590734738e-01 - 3 -3.59849775293e-01 -8.75520919040e-01 3.22445746670e-01 - 4 -3.23089576724e-01 -1.75257244527e-02 -9.46206095095e-01 - 5 -7.23937091680e-01 4.13525457505e-01 -5.52188177422e-01 - 6 -6.19435312048e-01 -6.11189134264e-02 7.82664917196e-01 - 7 1.84067898678e-01 5.34826032691e-01 8.24669705659e-01 - 8 9.32591739176e-01 5.58957449799e-02 3.56578622064e-01 - 9 -1.41652455397e-01 -7.58549125967e-01 -6.36032865012e-01 - 10 -9.47698918231e-01 -2.38456775160e-01 -2.12144117912e-01 - 11 -6.23751577043e-01 7.67030384110e-01 1.50327509090e-01 - 12 5.01127428135e-01 8.64913810842e-01 -2.82028471046e-02 - 13 6.88904097470e-01 -3.53541849569e-02 -7.23989796955e-01 - 14 -1.00175560487e-01 7.12127496823e-01 -6.94866379493e-01 - 15 -1.45067200065e-01 9.13868695498e-02 -1.36640608311e-01 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 6 4 15 2 1 8 - 2 6 4 15 2 8 7 - 3 6 4 15 8 12 7 - 4 6 4 15 13 12 8 - 5 6 4 15 12 13 14 - 6 6 4 15 5 14 4 - 7 6 4 15 13 4 14 - 8 6 4 15 9 4 13 - 9 6 4 15 1 9 13 - 10 6 4 15 3 9 1 - 11 6 4 15 3 10 9 - 12 6 4 15 3 6 10 - 13 6 4 15 5 10 11 - 14 6 4 15 11 10 6 - 15 6 4 15 7 11 6 - 16 6 4 15 2 6 3 - 17 6 4 15 10 5 4 - 18 6 4 15 10 4 9 - 19 6 4 15 14 5 11 - 20 6 4 15 12 14 11 - 21 6 4 15 12 11 7 - 22 6 4 15 2 7 6 - 23 6 4 15 1 13 8 - 24 6 4 15 2 3 1 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 24 MATERIAL: 1 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - sphere 1 24 0 6 - 24 6 3 - 16 6 3 - 22 6 3 - 2 6 3 - 1 6 3 - 10 6 3 - 11 6 3 - 12 6 3 - 15 6 3 - 14 6 3 - 3 6 3 - 21 6 3 - 23 6 3 - 9 6 3 - 20 6 3 - 19 6 3 - 13 6 3 - 18 6 3 - 17 6 3 - 6 6 3 - 8 6 3 - 5 6 3 - 7 6 3 - 4 6 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/CFD/Volker_374.neu b/cpp/nudg++/trunk/Grid/CFD/Volker_374.neu deleted file mode 100644 index 93a1b36..0000000 --- a/cpp/nudg++/trunk/Grid/CFD/Volker_374.neu +++ /dev/null @@ -1,748 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(D:\_TW\Book\VC8\NDG\Grid\CFD\geom\Volker_374.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 227 374 1 4 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -2.000000030e-001 -2.000000030e-001 - 2 2.000000000e+000 -2.000000030e-001 - 3 2.000000000e+000 -9.749999642e-002 - 4 2.000000000e+000 4.999999888e-003 - 5 2.000000000e+000 1.075000018e-001 - 6 2.000000000e+000 2.099999934e-001 - 7 -2.000000030e-001 2.099999934e-001 - 8 -2.000000030e-001 1.644444019e-001 - 9 -2.000000030e-001 1.188888997e-001 - 10 -2.000000030e-001 7.333333045e-002 - 11 -2.000000030e-001 2.777777985e-002 - 12 -2.000000030e-001 -1.777778007e-002 - 13 -2.000000030e-001 -6.333333254e-002 - 14 -2.000000030e-001 -1.088889018e-001 - 15 -2.000000030e-001 -1.544443965e-001 - 16 5.000000000e-002 0.000000000e+000 - 17 4.829629138e-002 1.294094976e-002 - 18 4.330126941e-002 2.500000037e-002 - 19 3.535534069e-002 3.535534069e-002 - 20 2.500000037e-002 4.330126941e-002 - 21 1.294096000e-002 4.829629138e-002 - 22 3.839744966e-009 5.000000075e-002 - 23 -1.294094976e-002 4.829629138e-002 - 24 -2.499998920e-002 4.330126941e-002 - 25 -3.535532951e-002 3.535534069e-002 - 26 -4.330126941e-002 2.500000969e-002 - 27 -4.829629138e-002 1.294096000e-002 - 28 -5.000000000e-002 0.000000000e+000 - 29 -4.829629883e-002 -1.294094045e-002 - 30 -4.330126941e-002 -2.499998920e-002 - 31 -3.535534069e-002 -3.535532951e-002 - 32 -2.500000969e-002 -4.330126941e-002 - 33 -1.294096000e-002 -4.829629138e-002 - 34 -1.151923001e-008 -5.000000075e-002 - 35 1.294094045e-002 -4.829629883e-002 - 36 2.499998920e-002 -4.330128059e-002 - 37 3.535532951e-002 -3.535534814e-002 - 38 4.330125824e-002 -2.500000969e-002 - 39 4.829629138e-002 -1.294097025e-002 - 40 6.400000304e-002 0.000000000e+000 - 41 6.181925163e-002 1.656441949e-002 - 42 5.542562902e-002 3.200000152e-002 - 43 4.525483027e-002 4.525483027e-002 - 44 3.200000152e-002 5.542562902e-002 - 45 1.656441949e-002 6.181925163e-002 - 46 4.914872953e-009 6.400000304e-002 - 47 -1.656441018e-002 6.181925908e-002 - 48 -3.199999034e-002 5.542562902e-002 - 49 -4.525483027e-002 4.525484145e-002 - 50 -5.542562157e-002 3.200000897e-002 - 51 -6.181925163e-002 1.656443067e-002 - 52 -6.400000304e-002 9.829746794e-009 - 53 -6.181925908e-002 -1.656441018e-002 - 54 -5.542562902e-002 -3.199999034e-002 - 55 -4.525484145e-002 -4.525483027e-002 - 56 -3.200000897e-002 -5.542562157e-002 - 57 -1.656443067e-002 -6.181925163e-002 - 58 -1.474461975e-008 -6.400000304e-002 - 59 1.656440087e-002 -6.181925908e-002 - 60 3.199999034e-002 -5.542562902e-002 - 61 4.525481910e-002 -4.525484890e-002 - 62 5.542562157e-002 -3.200002015e-002 - 63 6.181925163e-002 -1.656443998e-002 - 64 8.200000226e-002 0.000000000e+000 - 65 7.920592278e-002 2.251726016e-002 - 66 7.101407647e-002 4.349999875e-002 - 67 5.798276141e-002 6.151828915e-002 - 68 4.100000113e-002 7.534419745e-002 - 69 2.122317068e-002 8.403555304e-002 - 70 6.297180999e-009 8.699999750e-002 - 71 -2.122315019e-002 8.403555304e-002 - 72 -4.099998996e-002 7.534421235e-002 - 73 -5.798275024e-002 6.151830032e-002 - 74 -7.101407647e-002 4.350000992e-002 - 75 -7.920592278e-002 2.251726948e-002 - 76 -8.200000226e-002 1.336231037e-008 - 77 -7.920592278e-002 -2.251723967e-002 - 78 -7.101409137e-002 -4.349999130e-002 - 79 -5.798276886e-002 -6.151828170e-002 - 80 -4.100001976e-002 -7.534419745e-002 - 81 -2.122318000e-002 -8.403555304e-002 - 82 -1.889154078e-008 -8.699999750e-002 - 83 2.122314088e-002 -8.403555304e-002 - 84 4.099997878e-002 -7.534421980e-002 - 85 5.798273906e-002 -6.151831150e-002 - 86 7.101406902e-002 -4.350002110e-002 - 87 7.920590788e-002 -2.251728065e-002 - 88 1.099999994e-001 0.000000000e+000 - 89 1.062517986e-001 3.364647925e-002 - 90 9.526280314e-002 6.499999762e-002 - 91 7.778175175e-002 9.192387760e-002 - 92 5.499999970e-002 1.125833020e-001 - 93 2.847010083e-002 1.255704015e-001 - 94 8.447438304e-009 1.299999952e-001 - 95 -2.847008966e-002 1.255704015e-001 - 96 -5.499998853e-002 1.125833020e-001 - 97 -7.778173685e-002 9.192389250e-002 - 98 -9.526278824e-002 6.500001252e-002 - 99 -1.062517986e-001 3.364649042e-002 - 100 -1.099999994e-001 1.996667010e-008 - 101 -1.062517986e-001 -3.364644945e-002 - 102 -9.526280314e-002 -6.499998271e-002 - 103 -7.778175920e-002 -9.192386270e-002 - 104 -5.500001833e-002 -1.125833020e-001 - 105 -2.847011946e-002 -1.255704015e-001 - 106 -2.534232024e-008 -1.299999952e-001 - 107 2.847006917e-002 -1.255704015e-001 - 108 5.499998108e-002 -1.125833020e-001 - 109 7.778172195e-002 -9.192390740e-002 - 110 9.526278079e-002 -6.500002742e-002 - 111 1.062517986e-001 -3.364650905e-002 - 112 -1.500000060e-001 -1.700000018e-001 - 113 -1.071429029e-001 -1.700000018e-001 - 114 -6.428571790e-002 -1.700000018e-001 - 115 -2.142857015e-002 -1.700000018e-001 - 116 2.142857015e-002 -1.700000018e-001 - 117 6.428571790e-002 -1.700000018e-001 - 118 1.071429029e-001 -1.700000018e-001 - 119 1.500000060e-001 -1.700000018e-001 - 120 1.500000060e-001 -1.214286014e-001 - 121 1.500000060e-001 -7.285714149e-002 - 122 1.500000060e-001 -2.428572066e-002 - 123 1.500000060e-001 2.428572066e-002 - 124 1.500000060e-001 7.285714149e-002 - 125 1.500000060e-001 1.214286014e-001 - 126 1.500000060e-001 1.700000018e-001 - 127 1.071429029e-001 1.700000018e-001 - 128 6.428571790e-002 1.700000018e-001 - 129 2.142857015e-002 1.700000018e-001 - 130 -2.142857015e-002 1.700000018e-001 - 131 -6.428571790e-002 1.700000018e-001 - 132 -1.071429029e-001 1.700000018e-001 - 133 -1.500000060e-001 1.700000018e-001 - 134 -1.500000060e-001 1.214286014e-001 - 135 -1.500000060e-001 7.285714149e-002 - 136 -1.500000060e-001 2.428572066e-002 - 137 -1.500000060e-001 -2.428572066e-002 - 138 -1.500000060e-001 -7.285714149e-002 - 139 -1.500000060e-001 -1.214286014e-001 - 140 2.199999988e-001 -1.400000006e-001 - 141 3.499999940e-001 -1.400000006e-001 - 142 3.499999940e-001 1.400000006e-001 - 143 2.199999988e-001 1.400000006e-001 - 144 2.199999988e-001 9.333332628e-002 - 145 2.199999988e-001 4.666667059e-002 - 146 2.199999988e-001 0.000000000e+000 - 147 2.199999988e-001 -4.666667059e-002 - 148 2.199999988e-001 -9.333332628e-002 - 149 -1.220000014e-001 1.350000054e-001 - 150 -1.150000021e-001 1.000000015e-001 - 151 -9.000000358e-002 1.350000054e-001 - 152 -1.220000014e-001 -1.350000054e-001 - 153 -1.150000021e-001 -1.000000015e-001 - 154 -9.000000358e-002 -1.350000054e-001 - 155 1.220000014e-001 -1.350000054e-001 - 156 1.150000021e-001 -1.000000015e-001 - 157 9.000000358e-002 -1.350000054e-001 - 158 1.220000014e-001 1.350000054e-001 - 159 1.150000021e-001 1.000000015e-001 - 160 9.000000358e-002 1.350000054e-001 - 161 8.999999762e-001 -2.000000030e-001 - 162 8.999999762e-001 2.099999934e-001 - 163 3.499999940e-001 0.000000000e+000 - 164 3.499999940e-001 -2.000000030e-001 - 165 3.499999940e-001 2.099999934e-001 - 166 7.500000298e-002 -2.000000030e-001 - 167 7.500000298e-002 2.099999934e-001 - 168 2.125000060e-001 2.099999934e-001 - 169 2.125000060e-001 -2.000000030e-001 - 170 -6.250000000e-002 -2.000000030e-001 - 171 -6.250000000e-002 2.099999934e-001 - 172 1.437499970e-001 2.099999934e-001 - 173 1.437499970e-001 -2.000000030e-001 - 174 -1.312499940e-001 -2.000000030e-001 - 175 6.250000093e-003 2.099999934e-001 - 176 6.250000093e-003 -2.000000030e-001 - 177 -1.312499940e-001 2.099999934e-001 - 178 -1.656250060e-001 -2.000000030e-001 - 179 1.093750000e-001 -2.000000030e-001 - 180 -9.687499702e-002 -2.000000030e-001 - 181 -2.812499925e-002 -2.000000030e-001 - 182 1.500000000e+000 2.099999934e-001 - 183 1.450000048e+000 -2.000000030e-001 - 184 1.750000000e+000 -2.000000030e-001 - 185 6.250000000e-001 -2.000000030e-001 - 186 6.250000000e-001 2.099999934e-001 - 187 1.750000000e+000 2.099999934e-001 - 188 4.875000119e-001 -2.000000030e-001 - 189 4.875000119e-001 2.099999934e-001 - 190 3.499999940e-001 -7.000000030e-002 - 191 5.132954717e-001 -3.500000015e-002 - 192 3.499999940e-001 7.000000030e-002 - 193 1.832975030e+000 -4.625000060e-002 - 194 4.543863535e-001 1.049999967e-001 - 195 2.849999964e-001 -2.333333530e-002 - 196 2.824999988e-001 -1.400000006e-001 - 197 2.812500000e-001 -2.000000030e-001 - 198 2.824999988e-001 1.400000006e-001 - 199 1.600000024e+000 -1.978402212e-002 - 200 7.500938177e-001 4.999999888e-003 - 201 1.200000048e+000 2.099999934e-001 - 202 1.371851087e+000 1.757913642e-002 - 203 1.174999952e+000 -2.000000030e-001 - 204 1.037500024e+000 4.999999888e-003 - 205 1.875000000e+000 -2.000000030e-001 - 206 1.875000000e+000 2.099999934e-001 - 207 1.872035384e+000 7.891514152e-002 - 208 1.723794341e+000 6.325567514e-002 - 209 1.625000000e+000 2.099999934e-001 - 210 1.600000024e+000 -2.000000030e-001 - 211 1.711174965e+000 -7.978234440e-002 - 212 6.181547046e-001 6.515591592e-002 - 213 6.408133507e-001 -6.898255646e-002 - 214 7.624999881e-001 -2.000000030e-001 - 215 7.624999881e-001 2.099999934e-001 - 216 1.474933863e+000 -6.822025031e-002 - 217 1.497973680e+000 7.246658951e-002 - 218 1.350000024e+000 2.099999934e-001 - 219 1.312500000e+000 -2.000000030e-001 - 220 8.937969208e-001 5.722658336e-002 - 221 8.595249057e-001 -7.228798419e-002 - 222 1.037500024e+000 -2.000000030e-001 - 223 1.203585863e+000 4.025202990e-002 - 224 1.049999952e+000 2.099999934e-001 - 225 9.762427211e-001 -9.749999642e-002 - 226 1.141081214e+000 -7.413760573e-002 - 227 1.274096727e+000 -7.263995707e-002 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 178 15 1 - 2 3 3 114 180 170 - 3 3 3 15 139 14 - 4 3 3 139 15 112 - 5 3 3 138 14 139 - 6 3 3 193 205 3 - 7 3 3 112 152 139 - 8 3 3 195 196 190 - 9 3 3 113 114 154 - 10 3 3 174 113 112 - 11 3 3 152 154 153 - 12 3 3 154 152 113 - 13 3 3 103 153 154 - 14 3 3 152 153 139 - 15 3 3 103 154 104 - 16 3 3 113 152 112 - 17 3 3 176 166 116 - 18 3 3 138 139 153 - 19 3 3 13 138 137 - 20 3 3 13 14 138 - 21 3 3 13 137 12 - 22 3 3 137 138 101 - 23 3 3 100 137 101 - 24 3 3 137 136 12 - 25 3 3 138 102 101 - 26 3 3 142 194 189 - 27 3 3 78 102 79 - 28 3 3 102 138 153 - 29 3 3 53 77 54 - 30 3 3 77 101 78 - 31 3 3 78 54 77 - 32 3 3 77 100 101 - 33 3 3 103 79 102 - 34 3 3 78 101 102 - 35 3 3 103 102 153 - 36 3 3 77 53 76 - 37 3 3 104 154 114 - 38 3 3 193 3 4 - 39 3 3 105 115 106 - 40 3 3 105 104 114 - 41 3 3 103 80 79 - 42 3 3 80 103 104 - 43 3 3 81 80 104 - 44 3 3 56 79 80 - 45 3 3 104 105 81 - 46 3 3 105 114 115 - 47 3 3 82 81 105 - 48 3 3 34 58 35 - 49 3 3 81 58 57 - 50 3 3 58 81 82 - 51 3 3 57 58 33 - 52 3 3 81 57 80 - 53 3 3 83 58 82 - 54 3 3 82 105 106 - 55 3 3 115 116 106 - 56 3 3 56 80 57 - 57 3 3 30 54 31 - 58 3 3 54 78 55 - 59 3 3 126 168 172 - 60 3 3 29 52 53 - 61 3 3 30 29 54 - 62 3 3 132 177 133 - 63 3 3 54 55 31 - 64 3 3 29 53 54 - 65 3 3 33 32 57 - 66 3 3 33 58 34 - 67 3 3 130 171 131 - 68 3 3 31 55 32 - 69 3 3 32 56 57 - 70 3 3 115 176 116 - 71 3 3 113 174 180 - 72 3 3 32 55 56 - 73 3 3 55 79 56 - 74 3 3 114 181 115 - 75 3 3 82 106 107 - 76 3 3 55 78 79 - 77 3 3 170 181 114 - 78 3 3 52 29 28 - 79 3 3 135 136 99 - 80 3 3 136 11 12 - 81 3 3 11 135 10 - 82 3 3 135 11 136 - 83 3 3 10 135 9 - 84 3 3 205 2 3 - 85 3 3 136 100 99 - 86 3 3 136 137 100 - 87 3 3 75 99 100 - 88 3 3 74 75 50 - 89 3 3 99 74 98 - 90 3 3 74 99 75 - 91 3 3 97 98 73 - 92 3 3 99 98 135 - 93 3 3 75 76 51 - 94 3 3 75 100 76 - 95 3 3 100 77 76 - 96 3 3 135 98 150 - 97 3 3 9 134 8 - 98 3 3 9 135 134 - 99 3 3 8 133 7 - 100 3 3 133 8 134 - 101 3 3 132 171 177 - 102 3 3 189 165 142 - 103 3 3 134 149 133 - 104 3 3 141 164 188 - 105 3 3 150 97 151 - 106 3 3 97 150 98 - 107 3 3 149 151 132 - 108 3 3 151 149 150 - 109 3 3 132 151 131 - 110 3 3 149 132 133 - 111 3 3 97 96 151 - 112 3 3 150 149 134 - 113 3 3 135 150 134 - 114 3 3 132 131 171 - 115 3 3 98 74 73 - 116 3 3 184 193 211 - 117 3 3 52 27 51 - 118 3 3 52 28 27 - 119 3 3 51 26 50 - 120 3 3 49 50 26 - 121 3 3 49 73 74 - 122 3 3 49 74 50 - 123 3 3 26 51 27 - 124 3 3 75 51 50 - 125 3 3 26 25 49 - 126 3 3 116 166 117 - 127 3 3 220 215 200 - 128 3 3 15 178 112 - 129 3 3 48 24 23 - 130 3 3 48 25 24 - 131 3 3 118 173 119 - 132 3 3 49 25 48 - 133 3 3 148 140 196 - 134 3 3 47 23 22 - 135 3 3 73 48 72 - 136 3 3 48 73 49 - 137 3 3 95 131 96 - 138 3 3 131 151 96 - 139 3 3 96 97 72 - 140 3 3 72 71 96 - 141 3 3 72 48 47 - 142 3 3 73 72 97 - 143 3 3 47 46 71 - 144 3 3 47 48 23 - 145 3 3 95 71 70 - 146 3 3 71 95 96 - 147 3 3 130 95 94 - 148 3 3 95 130 131 - 149 3 3 70 71 46 - 150 3 3 47 71 72 - 151 3 3 22 46 47 - 152 3 3 130 129 175 - 153 3 3 22 45 46 - 154 3 3 51 76 52 - 155 3 3 76 53 52 - 156 3 3 175 171 130 - 157 3 3 118 166 179 - 158 3 3 163 190 191 - 159 3 3 107 83 82 - 160 3 3 107 116 117 - 161 3 3 59 35 58 - 162 3 3 58 83 59 - 163 3 3 59 83 84 - 164 3 3 35 59 60 - 165 3 3 107 108 83 - 166 3 3 180 114 113 - 167 3 3 86 85 110 - 168 3 3 108 84 83 - 169 3 3 60 84 85 - 170 3 3 60 59 84 - 171 3 3 109 85 84 - 172 3 3 35 60 36 - 173 3 3 108 109 84 - 174 3 3 107 117 108 - 175 3 3 181 176 115 - 176 3 3 61 60 85 - 177 3 3 60 37 36 - 178 3 3 37 60 61 - 179 3 3 112 178 174 - 180 3 3 62 38 37 - 181 3 3 62 39 38 - 182 3 3 119 173 169 - 183 3 3 62 37 61 - 184 3 3 143 198 168 - 185 3 3 63 62 87 - 186 3 3 86 62 61 - 187 3 3 39 40 16 - 188 3 3 39 63 40 - 189 3 3 64 40 63 - 190 3 3 16 40 41 - 191 3 3 87 62 86 - 192 3 3 63 39 62 - 193 3 3 61 85 86 - 194 3 3 129 167 175 - 195 3 3 108 117 157 - 196 3 3 143 168 126 - 197 3 3 118 119 155 - 198 3 3 118 117 166 - 199 3 3 157 155 156 - 200 3 3 155 157 118 - 201 3 3 120 156 155 - 202 3 3 157 156 109 - 203 3 3 155 119 120 - 204 3 3 118 157 117 - 205 3 3 140 119 169 - 206 3 3 141 196 164 - 207 3 3 190 196 141 - 208 3 3 140 148 120 - 209 3 3 216 210 199 - 210 3 3 121 156 120 - 211 3 3 192 198 144 - 212 3 3 140 120 119 - 213 3 3 164 196 197 - 214 3 3 188 191 141 - 215 3 3 111 86 110 - 216 3 3 109 156 110 - 217 3 3 64 87 88 - 218 3 3 87 86 111 - 219 3 3 88 87 111 - 220 3 3 87 64 63 - 221 3 3 110 121 111 - 222 3 3 110 85 109 - 223 3 3 121 148 147 - 224 3 3 110 156 121 - 225 3 3 123 88 122 - 226 3 3 88 111 122 - 227 3 3 147 122 121 - 228 3 3 147 146 122 - 229 3 3 195 146 147 - 230 3 3 122 111 121 - 231 3 3 120 148 121 - 232 3 3 64 88 65 - 233 3 3 202 218 223 - 234 3 3 157 109 108 - 235 3 3 5 6 206 - 236 3 3 40 64 41 - 237 3 3 43 20 19 - 238 3 3 141 191 190 - 239 3 3 21 20 44 - 240 3 3 173 118 179 - 241 3 3 43 44 20 - 242 3 3 21 44 45 - 243 3 3 19 18 43 - 244 3 3 220 221 225 - 245 3 3 41 42 18 - 246 3 3 17 16 41 - 247 3 3 43 42 66 - 248 3 3 43 18 42 - 249 3 3 65 66 42 - 250 3 3 44 43 67 - 251 3 3 42 41 65 - 252 3 3 18 17 41 - 253 3 3 127 167 128 - 254 3 3 67 43 66 - 255 3 3 69 70 46 - 256 3 3 69 45 68 - 257 3 3 70 93 94 - 258 3 3 129 94 93 - 259 3 3 94 129 130 - 260 3 3 70 94 95 - 261 3 3 93 70 69 - 262 3 3 46 45 69 - 263 3 3 92 68 91 - 264 3 3 68 45 44 - 265 3 3 93 92 128 - 266 3 3 93 69 92 - 267 3 3 67 91 68 - 268 3 3 93 128 129 - 269 3 3 92 160 128 - 270 3 3 92 69 68 - 271 3 3 44 67 68 - 272 3 3 126 172 127 - 273 3 3 90 67 66 - 274 3 3 22 21 45 - 275 3 3 88 89 65 - 276 3 3 41 64 65 - 277 3 3 90 91 67 - 278 3 3 66 89 90 - 279 3 3 124 90 89 - 280 3 3 90 159 91 - 281 3 3 124 89 123 - 282 3 3 66 65 89 - 283 3 3 143 144 198 - 284 3 3 191 188 185 - 285 3 3 124 145 144 - 286 3 3 124 123 145 - 287 3 3 145 146 195 - 288 3 3 159 90 124 - 289 3 3 192 145 195 - 290 3 3 145 123 146 - 291 3 3 89 88 123 - 292 3 3 125 124 144 - 293 3 3 159 125 158 - 294 3 3 159 124 125 - 295 3 3 160 158 127 - 296 3 3 158 160 159 - 297 3 3 126 127 158 - 298 3 3 160 127 128 - 299 3 3 158 125 126 - 300 3 3 159 160 91 - 301 3 3 143 125 144 - 302 3 3 142 165 198 - 303 3 3 142 192 194 - 304 3 3 168 198 165 - 305 3 3 5 207 4 - 306 3 3 7 133 177 - 307 3 3 213 191 185 - 308 3 3 143 126 125 - 309 3 3 202 216 217 - 310 3 3 172 167 127 - 311 3 3 212 189 194 - 312 3 3 91 160 92 - 313 3 3 146 123 122 - 314 3 3 167 129 128 - 315 3 3 191 194 163 - 316 3 3 107 106 116 - 317 3 3 206 207 5 - 318 3 3 163 192 195 - 319 3 3 199 208 209 - 320 3 3 163 194 192 - 321 3 3 194 191 212 - 322 3 3 195 147 148 - 323 3 3 190 163 195 - 324 3 3 148 196 195 - 325 3 3 197 140 169 - 326 3 3 140 197 196 - 327 3 3 192 144 145 - 328 3 3 142 198 192 - 329 3 3 207 208 193 - 330 3 3 215 220 162 - 331 3 3 214 200 213 - 332 3 3 200 215 212 - 333 3 3 227 223 226 - 334 3 3 217 182 218 - 335 3 3 225 204 220 - 336 3 3 223 224 204 - 337 3 3 227 216 202 - 338 3 3 204 224 220 - 339 3 3 193 184 205 - 340 3 3 187 208 207 - 341 3 3 187 207 206 - 342 3 3 4 207 193 - 343 3 3 182 217 209 - 344 3 3 208 199 211 - 345 3 3 208 187 209 - 346 3 3 208 211 193 - 347 3 3 184 211 210 - 348 3 3 210 211 199 - 349 3 3 212 186 189 - 350 3 3 213 212 191 - 351 3 3 161 221 214 - 352 3 3 212 213 200 - 353 3 3 213 185 214 - 354 3 3 210 216 183 - 355 3 3 186 212 215 - 356 3 3 217 216 199 - 357 3 3 209 217 199 - 358 3 3 217 218 202 - 359 3 3 227 226 203 - 360 3 3 223 218 201 - 361 3 3 183 216 219 - 362 3 3 221 220 200 - 363 3 3 214 221 200 - 364 3 3 161 225 221 - 365 3 3 225 161 222 - 366 3 3 203 226 222 - 367 3 3 226 223 204 - 368 3 3 224 223 201 - 369 3 3 162 220 224 - 370 3 3 226 225 222 - 371 3 3 226 204 225 - 372 3 3 227 203 219 - 373 3 3 216 227 219 - 374 3 3 223 227 202 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 374 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Cylinder 0.05 24 0 0 - 48 3 3 - 57 3 3 - 61 3 1 - 65 3 1 - 66 3 3 - 68 3 3 - 78 3 2 - 118 3 2 - 123 3 3 - 125 3 1 - 129 3 2 - 130 3 2 - 134 3 2 - 172 3 3 - 177 3 2 - 180 3 2 - 181 3 2 - 187 3 3 - 237 3 2 - 239 3 1 - 243 3 1 - 246 3 1 - 252 3 1 - 274 3 1 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 43 0 0 - 1 3 3 - 2 3 2 - 17 3 1 - 59 3 2 - 71 3 2 - 77 3 1 - 84 3 1 - 101 3 2 - 102 3 1 - 104 3 2 - 156 3 1 - 157 3 2 - 175 3 1 - 179 3 2 - 182 3 2 - 194 3 2 - 213 3 3 - 235 3 2 - 240 3 3 - 284 3 2 - 304 3 3 - 306 3 3 - 310 3 1 - 325 3 3 - 330 3 3 - 334 3 2 - 339 3 2 - 341 3 3 - 343 3 3 - 345 3 2 - 347 3 3 - 349 3 2 - 351 3 3 - 353 3 2 - 354 3 3 - 355 3 3 - 360 3 2 - 361 3 3 - 365 3 2 - 366 3 3 - 368 3 3 - 369 3 3 - 372 3 2 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Inflow 1 9 0 0 - 1 3 2 - 3 3 3 - 20 3 1 - 21 3 3 - 80 3 2 - 81 3 3 - 83 3 3 - 97 3 3 - 99 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Outflow 1 4 0 0 - 38 3 2 - 84 3 2 - 235 3 1 - 305 3 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/CFD/cylinderA00075b.neu b/cpp/nudg++/trunk/Grid/CFD/cylinderA00075b.neu deleted file mode 100644 index 9023db9..0000000 --- a/cpp/nudg++/trunk/Grid/CFD/cylinderA00075b.neu +++ /dev/null @@ -1,506 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(\\.PSF\Shared1\WUM_v5\cylinderA00075b.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 151 236 1 4 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -2.000000030e-001 -2.000000030e-001 - 2 2.000000000e+000 -2.000000030e-001 - 3 2.000000000e+000 2.099999934e-001 - 4 -2.000000030e-001 2.099999934e-001 - 5 5.000000075e-002 0.000000000e+000 - 6 4.619397968e-002 1.913416944e-002 - 7 3.535534069e-002 3.535534069e-002 - 8 1.913418062e-002 4.619397968e-002 - 9 3.839744966e-009 5.000000075e-002 - 10 -1.913416944e-002 4.619397968e-002 - 11 -3.535532951e-002 3.535534069e-002 - 12 -4.619396850e-002 1.913418062e-002 - 13 -5.000000075e-002 7.679489933e-009 - 14 -4.619397968e-002 -1.913416013e-002 - 15 -3.535534069e-002 -3.535532951e-002 - 16 -1.913418062e-002 -4.619396850e-002 - 17 -1.151923001e-008 -5.000000075e-002 - 18 1.913416013e-002 -4.619397968e-002 - 19 3.535532951e-002 -3.535534814e-002 - 20 4.619396850e-002 -1.913418062e-002 - 21 8.999999762e-001 -2.000000030e-001 - 22 8.999999762e-001 2.099999934e-001 - 23 -2.000000030e-001 4.999999888e-003 - 24 3.499999940e-001 -2.000000030e-001 - 25 3.499999940e-001 2.099999934e-001 - 26 7.500000298e-002 -2.000000030e-001 - 27 7.500000298e-002 2.099999934e-001 - 28 -6.250000000e-002 2.099999934e-001 - 29 2.125000060e-001 2.099999934e-001 - 30 2.125000060e-001 -2.000000030e-001 - 31 1.476257443e-001 9.864036739e-002 - 32 1.439218372e-001 -9.616551548e-002 - 33 -6.250000000e-002 -2.000000030e-001 - 34 -2.000000030e-001 -9.749999642e-002 - 35 2.685146593e-002 1.349914968e-001 - 36 -2.000000030e-001 1.075000018e-001 - 37 -7.568240911e-002 -1.132666618e-001 - 38 -7.886185497e-002 1.180250570e-001 - 39 2.600706369e-002 -1.307464689e-001 - 40 1.237703338e-001 2.461943589e-002 - 41 -1.259182245e-001 -2.504667081e-002 - 42 9.202937037e-002 -6.149207801e-002 - 43 5.847186968e-002 8.750929683e-002 - 44 -2.053256333e-002 1.032242328e-001 - 45 -8.936736733e-002 5.971340090e-002 - 46 -2.009701356e-002 -1.010343581e-001 - 47 3.246732354e-001 7.271244540e-004 - 48 -8.355397731e-002 -5.582897365e-002 - 49 5.089589581e-002 -7.617114484e-002 - 50 8.984994888e-002 -1.787228137e-002 - 51 -8.832272887e-002 1.756850444e-002 - 52 7.398328930e-002 4.943405092e-002 - 53 1.735892519e-002 8.726922423e-002 - 54 -4.943406209e-002 7.398328930e-002 - 55 -4.818734899e-002 -7.211742550e-002 - 56 1.614655368e-002 -8.117429167e-002 - 57 -8.053196222e-002 -1.601878740e-002 - 58 8.009817451e-002 1.593251154e-002 - 59 6.576029956e-002 -4.393964261e-002 - 60 -6.439414620e-002 4.302681237e-002 - 61 6.250000000e-001 2.099999934e-001 - 62 6.250000000e-001 -2.000000030e-001 - 63 4.238806665e-002 6.343819946e-002 - 64 -1.488469355e-002 7.483045012e-002 - 65 -1.470777243e-001 3.719754145e-002 - 66 1.450000048e+000 -2.000000030e-001 - 67 1.450000048e+000 2.099999934e-001 - 68 1.174999952e+000 2.099999934e-001 - 69 2.265614271e-001 3.234652430e-002 - 70 3.054865897e-001 1.092181355e-001 - 71 4.875000119e-001 2.099999934e-001 - 72 5.562499762e-001 4.999999888e-003 - 73 4.390954673e-001 7.690480351e-002 - 74 2.471699715e-001 -7.173247635e-002 - 75 7.624999881e-001 -3.985899314e-002 - 76 9.767506123e-001 4.999999888e-003 - 77 1.174999952e+000 -2.000000030e-001 - 78 3.449800909e-001 -9.867202491e-002 - 79 4.875000119e-001 -2.000000030e-001 - 80 1.312500000e+000 4.999999888e-003 - 81 1.534068227e+000 4.999999888e-003 - 82 1.725000024e+000 -2.000000030e-001 - 83 1.725000024e+000 2.099999934e-001 - 84 2.000000000e+000 -3.999999911e-002 - 85 1.875000000e+000 -2.000000030e-001 - 86 1.799999952e+000 -1.257812511e-002 - 87 4.475834668e-001 -4.065806046e-002 - 88 5.376088619e-001 -1.027766094e-001 - 89 6.487041712e-001 -6.649132818e-002 - 90 5.562499762e-001 1.190282032e-001 - 91 6.949054599e-001 8.570636064e-002 - 92 8.376281261e-001 8.156056702e-002 - 93 7.624999881e-001 2.099999934e-001 - 94 2.000000000e+000 -1.375000030e-001 - 95 1.437499970e-001 2.099999934e-001 - 96 2.249310911e-001 1.281815171e-001 - 97 4.187499881e-001 2.099999934e-001 - 98 7.624999881e-001 -2.000000030e-001 - 99 8.819684982e-001 -7.638166845e-002 - 100 1.037500024e+000 2.099999934e-001 - 101 1.106250048e+000 7.812554389e-002 - 102 1.104431868e+000 -6.988383085e-002 - 103 1.037500024e+000 -2.000000030e-001 - 104 9.874390364e-001 -1.033337936e-001 - 105 1.229321837e+000 9.782254696e-002 - 106 1.312500000e+000 2.099999934e-001 - 107 1.200874329e+000 -1.134841237e-002 - 108 1.312500000e+000 -2.000000030e-001 - 109 1.270501852e+000 -9.749999642e-002 - 110 1.394648314e+000 -8.851334453e-002 - 111 1.381250024e+000 1.075000018e-001 - 112 1.587499976e+000 -2.000000030e-001 - 113 1.656250000e+000 -7.261747867e-002 - 114 1.664335966e+000 7.508636266e-002 - 115 1.587499976e+000 2.099999934e-001 - 116 1.492034078e+000 1.075000018e-001 - 117 1.505432367e+000 -1.029944867e-001 - 118 9.687500000e-001 1.188720763e-001 - 119 1.862499952e+000 2.099999934e-001 - 120 2.000000000e+000 8.500000089e-002 - 121 1.906689405e+000 2.250000089e-002 - 122 1.821632981e+000 1.014113799e-001 - 123 1.883827090e+000 -8.775051683e-002 - 124 1.783902884e+000 -1.148537844e-001 - 125 1.914073706e+000 1.286060512e-001 - 126 4.302152097e-001 -1.296796501e-001 - 127 6.158800125e-001 6.201409921e-002 - 128 6.923696995e-001 3.364819800e-003 - 129 7.650719881e-001 4.250204936e-002 - 130 6.937500238e-001 2.099999934e-001 - 131 7.675190568e-001 1.267437190e-001 - 132 7.212249637e-001 -1.199294999e-001 - 133 8.312500119e-001 -2.000000030e-001 - 134 8.893645406e-001 1.088982075e-002 - 135 1.106250048e+000 2.099999934e-001 - 136 1.062344670e+000 4.649024457e-003 - 137 1.106250048e+000 -2.000000030e-001 - 138 1.243749976e+000 2.099999934e-001 - 139 1.381250024e+000 -2.000000030e-001 - 140 1.428140521e+000 1.224057283e-002 - 141 1.656250000e+000 -2.000000030e-001 - 142 1.618861556e+000 3.502599197e-003 - 143 1.710976720e+000 -1.540226513e-003 - 144 1.656250000e+000 2.099999934e-001 - 145 1.576486468e+000 8.226412535e-002 - 146 1.737090349e+000 1.234679744e-001 - 147 8.069198132e-001 -1.178041101e-001 - 148 1.047188520e+000 1.311929971e-001 - 149 1.182833076e+000 -1.115574539e-001 - 150 1.303563595e+000 1.296996772e-001 - 151 1.586797237e+000 -1.173768044e-001 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 1 33 37 - 2 3 3 60 51 12 - 3 3 3 43 63 52 - 4 3 3 26 39 33 - 5 3 3 14 13 57 - 6 3 3 64 53 44 - 7 3 3 49 56 39 - 8 3 3 52 31 43 - 9 3 3 28 38 44 - 10 3 3 48 34 37 - 11 3 3 143 86 146 - 12 3 3 32 74 69 - 13 3 3 53 9 8 - 14 3 3 64 54 10 - 15 3 3 50 5 20 - 16 3 3 58 52 6 - 17 3 3 88 89 72 - 18 3 3 55 16 15 - 19 3 3 56 49 18 - 20 3 3 40 69 31 - 21 3 3 31 95 27 - 22 3 3 32 42 49 - 23 3 3 60 12 11 - 24 3 3 78 74 30 - 25 3 3 107 80 105 - 26 3 3 51 57 13 - 27 3 3 44 53 35 - 28 3 3 30 32 26 - 29 3 3 59 49 42 - 30 3 3 69 96 31 - 31 3 3 132 62 98 - 32 3 3 59 20 19 - 33 3 3 10 54 11 - 34 3 3 63 8 7 - 35 3 3 27 28 35 - 36 3 3 96 69 70 - 37 3 3 4 36 38 - 38 3 3 26 32 39 - 39 3 3 64 10 9 - 40 3 3 23 41 65 - 41 3 3 1 37 34 - 42 3 3 4 38 28 - 43 3 3 51 65 41 - 44 3 3 46 17 16 - 45 3 3 39 46 33 - 46 3 3 20 59 50 - 47 3 3 74 47 69 - 48 3 3 34 41 23 - 49 3 3 14 48 15 - 50 3 3 19 18 49 - 51 3 3 50 32 40 - 52 3 3 7 6 52 - 53 3 3 43 31 27 - 54 3 3 28 44 35 - 55 3 3 38 45 54 - 56 3 3 65 38 36 - 57 3 3 12 51 13 - 58 3 3 55 15 48 - 59 3 3 33 46 37 - 60 3 3 127 90 72 - 61 3 3 95 96 29 - 62 3 3 34 48 41 - 63 3 3 55 37 46 - 64 3 3 18 17 56 - 65 3 3 32 49 39 - 66 3 3 32 50 42 - 67 3 3 40 52 58 - 68 3 3 51 45 65 - 69 3 3 57 41 48 - 70 3 3 6 5 58 - 71 3 3 31 52 40 - 72 3 3 63 53 8 - 73 3 3 35 53 43 - 74 3 3 38 54 44 - 75 3 3 60 54 45 - 76 3 3 37 55 48 - 77 3 3 46 16 55 - 78 3 3 17 46 56 - 79 3 3 39 56 46 - 80 3 3 41 57 51 - 81 3 3 48 14 57 - 82 3 3 5 50 58 - 83 3 3 40 58 50 - 84 3 3 49 59 19 - 85 3 3 50 59 42 - 86 3 3 54 60 11 - 87 3 3 51 60 45 - 88 3 3 47 73 70 - 89 3 3 73 71 97 - 90 3 3 52 63 7 - 91 3 3 53 63 43 - 92 3 3 53 64 9 - 93 3 3 54 64 44 - 94 3 3 38 65 45 - 95 3 3 36 23 65 - 96 3 3 67 111 116 - 97 3 3 96 95 31 - 98 3 3 88 87 126 - 99 3 3 32 69 40 - 100 3 3 69 47 70 - 101 3 3 78 87 47 - 102 3 3 29 70 25 - 103 3 3 87 88 72 - 104 3 3 71 90 61 - 105 3 3 78 47 74 - 106 3 3 90 73 72 - 107 3 3 73 97 25 - 108 3 3 32 30 74 - 109 3 3 78 30 24 - 110 3 3 133 147 98 - 111 3 3 127 91 61 - 112 3 3 108 109 77 - 113 3 3 118 92 134 - 114 3 3 136 104 102 - 115 3 3 150 80 111 - 116 3 3 87 72 73 - 117 3 3 24 79 126 - 118 3 3 107 136 102 - 119 3 3 80 109 110 - 120 3 3 85 2 94 - 121 3 3 142 81 151 - 122 3 3 117 110 66 - 123 3 3 85 123 124 - 124 3 3 142 145 81 - 125 3 3 121 123 84 - 126 3 3 120 121 84 - 127 3 3 81 117 151 - 128 3 3 47 87 73 - 129 3 3 126 87 78 - 130 3 3 79 62 88 - 131 3 3 89 132 75 - 132 3 3 62 89 88 - 133 3 3 89 75 128 - 134 3 3 90 71 73 - 135 3 3 128 127 89 - 136 3 3 91 128 129 - 137 3 3 93 130 131 - 138 3 3 134 75 99 - 139 3 3 101 68 135 - 140 3 3 131 22 93 - 141 3 3 131 130 91 - 142 3 3 123 94 84 - 143 3 3 27 35 43 - 144 3 3 70 29 96 - 145 3 3 73 25 70 - 146 3 3 103 104 21 - 147 3 3 133 21 147 - 148 3 3 134 99 76 - 149 3 3 135 100 148 - 150 3 3 100 22 118 - 151 3 3 68 101 105 - 152 3 3 99 104 76 - 153 3 3 102 103 137 - 154 3 3 77 149 137 - 155 3 3 21 104 99 - 156 3 3 104 103 102 - 157 3 3 101 136 107 - 158 3 3 101 107 105 - 159 3 3 106 111 67 - 160 3 3 150 138 105 - 161 3 3 107 109 80 - 162 3 3 107 102 149 - 163 3 3 116 140 81 - 164 3 3 110 108 139 - 165 3 3 117 81 140 - 166 3 3 110 117 140 - 167 3 3 108 110 109 - 168 3 3 80 110 140 - 169 3 3 151 141 113 - 170 3 3 141 82 113 - 171 3 3 122 125 119 - 172 3 3 114 142 143 - 173 3 3 67 116 115 - 174 3 3 146 144 114 - 175 3 3 140 116 111 - 176 3 3 116 81 145 - 177 3 3 66 112 117 - 178 3 3 117 112 151 - 179 3 3 92 118 22 - 180 3 3 76 136 148 - 181 3 3 121 120 125 - 182 3 3 122 86 121 - 183 3 3 3 119 125 - 184 3 3 123 121 86 - 185 3 3 83 146 119 - 186 3 3 122 119 146 - 187 3 3 124 123 86 - 188 3 3 94 123 85 - 189 3 3 124 86 143 - 190 3 3 85 124 82 - 191 3 3 121 125 122 - 192 3 3 3 125 120 - 193 3 3 24 126 78 - 194 3 3 88 126 79 - 195 3 3 89 127 72 - 196 3 3 129 131 91 - 197 3 3 129 128 75 - 198 3 3 127 128 91 - 199 3 3 134 129 75 - 200 3 3 131 129 92 - 201 3 3 61 90 127 - 202 3 3 91 130 61 - 203 3 3 22 131 92 - 204 3 3 62 132 89 - 205 3 3 118 134 76 - 206 3 3 75 132 147 - 207 3 3 21 99 147 - 208 3 3 134 92 129 - 209 3 3 148 100 118 - 210 3 3 136 101 148 - 211 3 3 104 136 76 - 212 3 3 149 77 109 - 213 3 3 106 150 111 - 214 3 3 138 68 105 - 215 3 3 139 66 110 - 216 3 3 80 140 111 - 217 3 3 113 82 124 - 218 3 3 143 142 113 - 219 3 3 145 142 114 - 220 3 3 124 143 113 - 221 3 3 146 86 122 - 222 3 3 115 116 145 - 223 3 3 144 115 145 - 224 3 3 145 114 144 - 225 3 3 144 146 83 - 226 3 3 143 146 114 - 227 3 3 75 147 99 - 228 3 3 98 147 132 - 229 3 3 148 118 76 - 230 3 3 135 148 101 - 231 3 3 107 149 109 - 232 3 3 137 149 102 - 233 3 3 138 150 106 - 234 3 3 80 150 105 - 235 3 3 141 151 112 - 236 3 3 142 151 113 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 236 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Cylinder 1 16 0 0 - 5 3 1 - 13 3 2 - 15 3 2 - 18 3 2 - 23 3 2 - 32 3 2 - 33 3 3 - 34 3 2 - 39 3 2 - 44 3 2 - 49 3 3 - 50 3 1 - 52 3 1 - 57 3 3 - 64 3 1 - 70 3 1 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 42 0 0 - 1 3 1 - 4 3 3 - 21 3 2 - 28 3 3 - 31 3 2 - 35 3 1 - 42 3 3 - 61 3 3 - 89 3 2 - 102 3 3 - 104 3 3 - 107 3 2 - 109 3 2 - 110 3 3 - 112 3 3 - 117 3 1 - 120 3 1 - 130 3 1 - 137 3 1 - 139 3 2 - 140 3 2 - 146 3 3 - 147 3 1 - 149 3 1 - 150 3 1 - 153 3 2 - 154 3 3 - 159 3 3 - 164 3 2 - 170 3 1 - 173 3 3 - 177 3 1 - 183 3 1 - 185 3 3 - 190 3 3 - 202 3 2 - 214 3 1 - 215 3 1 - 223 3 1 - 225 3 3 - 233 3 3 - 235 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Inflow 1 4 0 0 - 37 3 1 - 41 3 3 - 48 3 3 - 95 3 1 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Outflow 1 4 0 0 - 120 3 2 - 126 3 3 - 142 3 2 - 192 3 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/CFD/cylinderDA001.neu b/cpp/nudg++/trunk/Grid/CFD/cylinderDA001.neu deleted file mode 100644 index 1611bca..0000000 --- a/cpp/nudg++/trunk/Grid/CFD/cylinderDA001.neu +++ /dev/null @@ -1,638 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(\\.PSF\Shared1\WUM_v5\cylinderDA001.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 191 308 2 4 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 -2.000000030e-001 -2.000000030e-001 - 2 2.000000000e+000 -2.000000030e-001 - 3 2.000000000e+000 2.099999934e-001 - 4 -2.000000030e-001 2.099999934e-001 - 5 5.000000075e-002 0.000000000e+000 - 6 4.903925955e-002 9.754515253e-003 - 7 4.619397968e-002 1.913416944e-002 - 8 4.157347977e-002 2.777851000e-002 - 9 3.535534069e-002 3.535534069e-002 - 10 2.777851000e-002 4.157347977e-002 - 11 1.913418062e-002 4.619397968e-002 - 12 9.754518978e-003 4.903925955e-002 - 13 3.839744966e-009 5.000000075e-002 - 14 -9.754512459e-003 4.903925955e-002 - 15 -1.913416944e-002 4.619397968e-002 - 16 -2.777851000e-002 4.157347977e-002 - 17 -3.535532951e-002 3.535534069e-002 - 18 -4.157347977e-002 2.777851932e-002 - 19 -4.619396850e-002 1.913418062e-002 - 20 -4.903925955e-002 9.754522704e-003 - 21 -5.000000075e-002 7.679489933e-009 - 22 -4.903927073e-002 -9.754507802e-003 - 23 -4.619397968e-002 -1.913416013e-002 - 24 -4.157349095e-002 -2.777850069e-002 - 25 -3.535534069e-002 -3.535532951e-002 - 26 -2.777851932e-002 -4.157347977e-002 - 27 -1.913418062e-002 -4.619396850e-002 - 28 -9.754527360e-003 -4.903925955e-002 - 29 -1.151923001e-008 -5.000000075e-002 - 30 9.754504077e-003 -4.903927073e-002 - 31 1.913416013e-002 -4.619397968e-002 - 32 2.777850069e-002 -4.157349095e-002 - 33 3.535532951e-002 -3.535534814e-002 - 34 4.157346860e-002 -2.777851932e-002 - 35 4.619396850e-002 -1.913418062e-002 - 36 4.903925955e-002 -9.754531085e-003 - 37 5.999999866e-002 0.000000000e+000 - 38 5.884711817e-002 1.170541998e-002 - 39 5.543277040e-002 2.296100929e-002 - 40 4.988817871e-002 3.333421052e-002 - 41 4.242641106e-002 4.242639989e-002 - 42 3.333422169e-002 4.988817126e-002 - 43 2.296100929e-002 5.543277040e-002 - 44 1.170541998e-002 5.884711072e-002 - 45 4.607693782e-009 5.999999866e-002 - 46 -1.170540974e-002 5.884711817e-002 - 47 -2.296099998e-002 5.543277040e-002 - 48 -3.333421052e-002 4.988817871e-002 - 49 -4.242639989e-002 4.242641106e-002 - 50 -4.988817126e-002 3.333422169e-002 - 51 -5.543277040e-002 2.296100929e-002 - 52 -5.884711072e-002 1.170543022e-002 - 53 -5.999999866e-002 9.215387564e-009 - 54 -5.884711817e-002 -1.170540974e-002 - 55 -5.543277040e-002 -2.296099998e-002 - 56 -4.988817871e-002 -3.333419934e-002 - 57 -4.242641106e-002 -4.242639989e-002 - 58 -3.333422914e-002 -4.988817126e-002 - 59 -2.296102047e-002 -5.543277040e-002 - 60 -1.170543022e-002 -5.884711072e-002 - 61 -1.382307957e-008 -5.999999866e-002 - 62 1.170540974e-002 -5.884711817e-002 - 63 2.296099067e-002 -5.543278158e-002 - 64 3.333419934e-002 -4.988818988e-002 - 65 4.242639989e-002 -4.242641851e-002 - 66 4.988817126e-002 -3.333422914e-002 - 67 5.543277040e-002 -2.296102047e-002 - 68 5.884711072e-002 -1.170543954e-002 - 69 8.999999762e-001 -2.000000030e-001 - 70 8.999999762e-001 2.099999934e-001 - 71 -2.000000030e-001 4.999999888e-003 - 72 3.499999940e-001 -2.000000030e-001 - 73 3.499999940e-001 2.099999934e-001 - 74 7.500000298e-002 -2.000000030e-001 - 75 7.500000298e-002 2.099999934e-001 - 76 -2.000000030e-001 -9.749999642e-002 - 77 -6.250000000e-002 -2.000000030e-001 - 78 -2.000000030e-001 1.075000018e-001 - 79 -6.250000000e-002 2.099999934e-001 - 80 9.740772098e-002 1.186916158e-001 - 81 2.125000060e-001 -2.000000030e-001 - 82 -1.338314563e-001 -4.059734941e-002 - 83 3.975020349e-002 -1.310389638e-001 - 84 -3.904784843e-002 -1.287235916e-001 - 85 -1.309132725e-001 3.971209750e-002 - 86 -6.754538417e-002 1.263686270e-001 - 87 1.406470090e-001 4.266483709e-002 - 88 1.620130092e-001 -8.659781516e-002 - 89 6.250000093e-003 2.099999934e-001 - 90 1.325481758e-002 1.345779300e-001 - 91 -8.875582367e-002 -7.283998281e-002 - 92 7.194441557e-002 -8.766458184e-002 - 93 -8.761569858e-002 7.190436870e-002 - 94 1.177441180e-001 -1.159681845e-002 - 95 5.180605873e-002 9.692227095e-002 - 96 -1.025248319e-001 -1.009779423e-002 - 97 -3.040530905e-002 1.002328470e-001 - 98 9.400831908e-002 5.024848878e-002 - 99 9.062350541e-002 -4.843930528e-002 - 100 2.847669646e-002 -9.387516230e-002 - 101 -2.812342905e-002 -9.271053970e-002 - 102 -9.381195158e-002 2.845754288e-002 - 103 9.531319141e-003 9.677284956e-002 - 104 -7.988190651e-002 -4.269775748e-002 - 105 -5.746155605e-002 -7.001705468e-002 - 106 -5.700248480e-002 6.945773214e-002 - 107 9.185343236e-002 9.046765044e-003 - 108 5.593464524e-002 6.815654039e-002 - 109 5.470804498e-002 -6.666198373e-002 - 110 8.107022196e-002 -2.459239587e-002 - 111 7.300909609e-002 3.902417421e-002 - 112 8.086976595e-003 -8.210864663e-002 - 113 -2.375778183e-002 7.831890881e-002 - 114 -7.273632288e-002 3.887838870e-002 - 115 -8.207769692e-002 8.083971217e-003 - 116 2.383318916e-002 7.856751978e-002 - 117 -7.563716173e-002 -2.294428088e-002 - 118 -6.109923869e-002 -5.014282465e-002 - 119 -3.725951910e-002 -6.970760971e-002 - 120 -3.796866222e-004 -1.203296930e-001 - 121 6.250000093e-003 -2.000000030e-001 - 122 2.125000060e-001 2.099999934e-001 - 123 3.636393324e-002 -6.803219020e-002 - 124 5.963069201e-002 -4.893766716e-002 - 125 3.390564919e-001 9.063087404e-003 - 126 7.613465935e-002 -7.498627063e-003 - 127 6.250000000e-001 2.099999934e-001 - 128 1.450000048e+000 -2.000000030e-001 - 129 1.450000048e+000 2.099999934e-001 - 130 1.174999952e+000 2.099999934e-001 - 131 6.250000000e-001 -2.000000030e-001 - 132 1.174999952e+000 -2.000000030e-001 - 133 1.312500000e+000 4.999999888e-003 - 134 7.624999881e-001 4.999999888e-003 - 135 1.037500024e+000 4.999999888e-003 - 136 1.534068227e+000 4.999999888e-003 - 137 1.725000024e+000 -2.000000030e-001 - 138 1.725000024e+000 2.099999934e-001 - 139 2.000000000e+000 -3.999999911e-002 - 140 1.875000000e+000 -2.000000030e-001 - 141 1.799999952e+000 -1.257812511e-002 - 142 4.875000119e-001 2.099999934e-001 - 143 5.562499762e-001 1.527439058e-002 - 144 4.187499881e-001 1.054892465e-001 - 145 4.479963183e-001 1.727011695e-004 - 146 4.875000119e-001 -2.000000030e-001 - 147 3.855336905e-001 -9.332200885e-002 - 148 5.158154964e-001 -9.042765200e-002 - 149 2.740065753e-001 -8.220759779e-002 - 150 2.375982255e-001 1.255750004e-002 - 151 2.918263674e-001 1.124018133e-001 - 152 5.217580795e-001 1.125959158e-001 - 153 2.000000000e+000 -1.375000030e-001 - 154 1.312500000e+000 -2.000000030e-001 - 155 1.381250024e+000 -9.749999642e-002 - 156 1.243749976e+000 -9.749999642e-002 - 157 1.174999952e+000 2.291920781e-002 - 158 1.492034078e+000 -9.749999642e-002 - 159 1.587499976e+000 -2.000000030e-001 - 160 1.656250000e+000 -7.261747867e-002 - 161 1.664335966e+000 7.508636266e-002 - 162 1.587499976e+000 2.099999934e-001 - 163 1.423284054e+000 4.999999888e-003 - 164 1.312500000e+000 2.099999934e-001 - 165 1.367892027e+000 1.075000018e-001 - 166 1.251457453e+000 1.107947826e-001 - 167 1.119607925e+000 -8.854039758e-002 - 168 1.037500024e+000 -2.000000030e-001 - 169 1.037500024e+000 2.099999934e-001 - 170 9.687500000e-001 1.075000018e-001 - 171 8.999999762e-001 -1.291920710e-002 - 172 8.446079493e-001 9.854039550e-002 - 173 7.624999881e-001 2.099999934e-001 - 174 7.624999881e-001 -2.000000030e-001 - 175 6.937500238e-001 1.075000018e-001 - 176 6.937500238e-001 -9.749999642e-002 - 177 1.479394794e+000 1.023167744e-001 - 178 1.094059706e+000 1.075000018e-001 - 179 9.687500000e-001 -1.064596027e-001 - 180 8.312500119e-001 -1.064596027e-001 - 181 6.588796973e-001 1.949999714e-004 - 182 1.862499952e+000 2.099999934e-001 - 183 2.000000000e+000 8.500000089e-002 - 184 1.906689405e+000 2.250000089e-002 - 185 1.821632981e+000 1.014113799e-001 - 186 1.883827090e+000 -8.775051683e-002 - 187 1.783902884e+000 -1.148537844e-001 - 188 1.914073706e+000 1.286060512e-001 - 189 1.979630440e-001 1.171478406e-001 - 190 1.710976720e+000 -1.540226513e-003 - 191 1.575571060e+000 1.138696149e-001 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 117 53 115 - 2 3 3 55 117 56 - 3 3 3 56 25 24 - 4 3 3 25 56 57 - 5 3 3 118 105 119 - 6 3 3 56 24 55 - 7 3 3 54 55 22 - 8 3 3 82 91 104 - 9 3 3 100 112 120 - 10 3 3 23 22 55 - 11 3 3 55 24 23 - 12 3 3 54 22 53 - 13 3 3 86 4 78 - 14 3 3 47 46 113 - 15 3 3 27 59 60 - 16 3 3 77 76 1 - 17 3 3 61 29 60 - 18 3 3 29 61 30 - 19 3 3 56 118 57 - 20 3 3 28 60 29 - 21 3 3 57 26 25 - 22 3 3 26 57 58 - 23 3 3 151 150 125 - 24 3 3 26 58 59 - 25 3 3 26 59 27 - 26 3 3 84 77 121 - 27 3 3 60 28 27 - 28 3 3 116 103 45 - 29 3 3 115 114 102 - 30 3 3 77 91 76 - 31 3 3 59 119 60 - 32 3 3 85 71 82 - 33 3 3 106 114 49 - 34 3 3 52 53 21 - 35 3 3 21 20 52 - 36 3 3 78 71 85 - 37 3 3 53 22 21 - 38 3 3 52 20 51 - 39 3 3 53 52 115 - 40 3 3 106 48 113 - 41 3 3 50 19 18 - 42 3 3 19 50 51 - 43 3 3 51 20 19 - 44 3 3 114 93 102 - 45 3 3 75 80 122 - 46 3 3 117 104 118 - 47 3 3 49 18 17 - 48 3 3 18 49 50 - 49 3 3 17 16 49 - 50 3 3 86 79 4 - 51 3 3 65 124 66 - 52 3 3 49 16 48 - 53 3 3 44 116 45 - 54 3 3 47 48 15 - 55 3 3 14 46 47 - 56 3 3 189 150 151 - 57 3 3 46 14 13 - 58 3 3 14 47 15 - 59 3 3 48 16 15 - 60 3 3 86 90 79 - 61 3 3 149 72 147 - 62 3 3 79 90 89 - 63 3 3 107 87 98 - 64 3 3 126 38 37 - 65 3 3 111 108 41 - 66 3 3 75 90 80 - 67 3 3 30 62 63 - 68 3 3 62 30 61 - 69 3 3 30 63 31 - 70 3 3 143 181 175 - 71 3 3 92 74 88 - 72 3 3 32 63 64 - 73 3 3 84 121 120 - 74 3 3 32 31 63 - 75 3 3 88 74 81 - 76 3 3 66 34 33 - 77 3 3 32 64 33 - 78 3 3 57 118 58 - 79 3 3 33 64 65 - 80 3 3 86 93 106 - 81 3 3 66 67 34 - 82 3 3 64 123 109 - 83 3 3 65 109 124 - 84 3 3 65 64 109 - 85 3 3 108 80 95 - 86 3 3 34 67 35 - 87 3 3 100 123 112 - 88 3 3 36 35 68 - 89 3 3 5 68 37 - 90 3 3 68 5 36 - 91 3 3 71 76 82 - 92 3 3 5 37 38 - 93 3 3 35 67 68 - 94 3 3 189 80 87 - 95 3 3 161 190 185 - 96 3 3 66 33 65 - 97 3 3 178 170 135 - 98 3 3 100 92 109 - 99 3 3 44 12 11 - 100 3 3 118 91 105 - 101 3 3 10 42 11 - 102 3 3 42 10 9 - 103 3 3 60 101 112 - 104 3 3 43 11 42 - 105 3 3 13 45 46 - 106 3 3 45 13 44 - 107 3 3 39 111 40 - 108 3 3 44 13 12 - 109 3 3 11 43 44 - 110 3 3 42 41 108 - 111 3 3 93 78 85 - 112 3 3 84 91 77 - 113 3 3 7 6 38 - 114 3 3 111 38 107 - 115 3 3 68 67 110 - 116 3 3 38 39 7 - 117 3 3 5 38 6 - 118 3 3 7 39 8 - 119 3 3 9 8 41 - 120 3 3 115 51 114 - 121 3 3 68 110 126 - 122 3 3 40 41 8 - 123 3 3 40 8 39 - 124 3 3 113 103 97 - 125 3 3 124 110 67 - 126 3 3 9 41 42 - 127 3 3 171 135 170 - 128 3 3 90 75 89 - 129 3 3 102 93 85 - 130 3 3 116 42 108 - 131 3 3 84 101 105 - 132 3 3 112 123 62 - 133 3 3 74 92 83 - 134 3 3 76 91 82 - 135 3 3 94 99 88 - 136 3 3 106 49 48 - 137 3 3 78 93 86 - 138 3 3 66 124 67 - 139 3 3 150 94 88 - 140 3 3 80 90 95 - 141 3 3 95 90 103 - 142 3 3 51 115 52 - 143 3 3 85 82 96 - 144 3 3 113 45 103 - 145 3 3 90 86 97 - 146 3 3 80 98 87 - 147 3 3 116 108 95 - 148 3 3 88 99 92 - 149 3 3 94 107 110 - 150 3 3 112 62 61 - 151 3 3 92 100 83 - 152 3 3 58 118 119 - 153 3 3 101 84 120 - 154 3 3 51 50 114 - 155 3 3 96 102 85 - 156 3 3 44 43 116 - 157 3 3 97 103 90 - 158 3 3 117 55 54 - 159 3 3 82 104 96 - 160 3 3 84 105 91 - 161 3 3 58 119 59 - 162 3 3 113 48 47 - 163 3 3 86 106 97 - 164 3 3 87 107 94 - 165 3 3 107 98 111 - 166 3 3 111 41 40 - 167 3 3 80 108 98 - 168 3 3 64 63 123 - 169 3 3 99 109 92 - 170 3 3 94 110 99 - 171 3 3 68 126 37 - 172 3 3 111 39 38 - 173 3 3 108 111 98 - 174 3 3 60 112 61 - 175 3 3 120 112 101 - 176 3 3 113 46 45 - 177 3 3 106 113 97 - 178 3 3 49 114 50 - 179 3 3 93 114 106 - 180 3 3 102 96 115 - 181 3 3 115 96 117 - 182 3 3 116 43 42 - 183 3 3 95 103 116 - 184 3 3 117 54 53 - 185 3 3 96 104 117 - 186 3 3 117 118 56 - 187 3 3 91 118 104 - 188 3 3 105 101 119 - 189 3 3 60 119 101 - 190 3 3 120 121 83 - 191 3 3 83 100 120 - 192 3 3 149 150 88 - 193 3 3 74 83 121 - 194 3 3 123 63 62 - 195 3 3 100 109 123 - 196 3 3 109 99 124 - 197 3 3 110 124 99 - 198 3 3 81 72 149 - 199 3 3 129 165 177 - 200 3 3 110 107 126 - 201 3 3 38 126 107 - 202 3 3 146 148 147 - 203 3 3 172 173 175 - 204 3 3 169 178 130 - 205 3 3 164 166 165 - 206 3 3 73 144 142 - 207 3 3 155 163 133 - 208 3 3 156 132 154 - 209 3 3 157 135 167 - 210 3 3 151 144 73 - 211 3 3 180 134 176 - 212 3 3 179 167 135 - 213 3 3 156 157 167 - 214 3 3 140 2 153 - 215 3 3 136 158 160 - 216 3 3 158 159 160 - 217 3 3 140 186 187 - 218 3 3 162 177 191 - 219 3 3 184 186 139 - 220 3 3 183 184 139 - 221 3 3 160 161 136 - 222 3 3 131 174 176 - 223 3 3 152 127 142 - 224 3 3 145 143 152 - 225 3 3 145 144 125 - 226 3 3 152 142 144 - 227 3 3 125 147 145 - 228 3 3 148 143 145 - 229 3 3 149 147 125 - 230 3 3 148 131 176 - 231 3 3 146 147 72 - 232 3 3 147 148 145 - 233 3 3 131 148 146 - 234 3 3 150 149 125 - 235 3 3 81 149 88 - 236 3 3 144 151 125 - 237 3 3 150 87 94 - 238 3 3 73 122 151 - 239 3 3 189 151 122 - 240 3 3 145 152 144 - 241 3 3 152 143 175 - 242 3 3 158 155 128 - 243 3 3 186 153 139 - 244 3 3 128 155 154 - 245 3 3 156 155 133 - 246 3 3 155 156 154 - 247 3 3 156 133 157 - 248 3 3 165 166 133 - 249 3 3 130 178 166 - 250 3 3 137 160 159 - 251 3 3 163 158 136 - 252 3 3 158 128 159 - 253 3 3 187 160 137 - 254 3 3 185 188 182 - 255 3 3 190 161 160 - 256 3 3 129 177 162 - 257 3 3 161 138 162 - 258 3 3 158 163 155 - 259 3 3 157 178 135 - 260 3 3 165 133 163 - 261 3 3 177 163 136 - 262 3 3 129 164 165 - 263 3 3 130 166 164 - 264 3 3 133 166 157 - 265 3 3 70 172 170 - 266 3 3 156 167 132 - 267 3 3 171 179 135 - 268 3 3 168 132 167 - 269 3 3 170 169 70 - 270 3 3 170 172 171 - 271 3 3 174 180 176 - 272 3 3 168 179 69 - 273 3 3 175 134 172 - 274 3 3 171 172 134 - 275 3 3 172 70 173 - 276 3 3 152 175 127 - 277 3 3 69 180 174 - 278 3 3 173 127 175 - 279 3 3 134 181 176 - 280 3 3 176 181 148 - 281 3 3 163 177 165 - 282 3 3 136 161 191 - 283 3 3 178 157 166 - 284 3 3 170 178 169 - 285 3 3 179 168 167 - 286 3 3 180 179 171 - 287 3 3 179 180 69 - 288 3 3 134 180 171 - 289 3 3 175 181 134 - 290 3 3 148 181 143 - 291 3 3 184 183 188 - 292 3 3 185 141 184 - 293 3 3 3 182 188 - 294 3 3 186 184 141 - 295 3 3 182 138 185 - 296 3 3 161 185 138 - 297 3 3 187 186 141 - 298 3 3 153 186 140 - 299 3 3 187 141 190 - 300 3 3 140 187 137 - 301 3 3 184 188 185 - 302 3 3 3 188 183 - 303 3 3 80 189 122 - 304 3 3 150 189 87 - 305 3 3 187 190 160 - 306 3 3 185 190 141 - 307 3 3 136 191 177 - 308 3 3 161 162 191 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 248 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 5 8 9 13 14 16 19 23 - 26 28 29 30 31 32 33 36 39 40 - 44 45 46 50 51 53 56 60 61 62 - 63 64 65 66 70 71 73 75 78 80 - 82 83 84 85 87 91 94 95 97 98 - 100 103 107 110 111 112 114 115 120 121 - 124 125 127 128 129 130 131 132 133 134 - 135 136 137 138 139 140 141 142 143 144 - 145 146 147 148 149 150 151 152 153 154 - 155 156 157 158 159 160 161 162 163 164 - 165 166 167 168 169 170 171 172 173 174 - 175 176 177 178 179 180 181 182 183 184 - 185 186 187 188 189 190 191 192 193 194 - 195 196 197 198 199 200 201 202 203 204 - 205 206 207 208 209 210 211 212 213 214 - 215 216 217 218 219 220 221 222 223 224 - 225 226 227 228 229 230 231 232 233 234 - 235 236 237 238 239 240 241 242 243 244 - 245 246 247 248 249 250 251 252 253 254 - 255 256 257 258 259 260 261 262 263 264 - 265 266 267 268 269 270 271 272 273 274 - 275 276 277 278 279 280 281 282 283 284 - 285 286 287 288 289 290 291 292 293 294 - 295 296 297 298 299 300 301 302 303 304 - 305 306 307 308 119 122 123 126 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 2 ELEMENTS: 60 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 3 4 6 7 10 11 12 15 17 18 - 20 21 22 24 25 27 34 35 37 38 - 41 42 43 47 48 49 52 54 55 57 - 58 59 67 68 69 72 74 76 77 79 - 81 86 88 89 90 92 93 96 99 101 - 102 104 105 106 108 109 113 116 117 118 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Cylinder 1 32 0 0 - 3 3 2 - 10 3 1 - 11 3 2 - 18 3 3 - 20 3 3 - 21 3 2 - 25 3 3 - 27 3 2 - 35 3 1 - 37 3 2 - 41 3 2 - 43 3 2 - 47 3 2 - 49 3 1 - 57 3 2 - 58 3 3 - 59 3 2 - 69 3 3 - 74 3 1 - 76 3 2 - 77 3 3 - 86 3 3 - 88 3 1 - 90 3 2 - 99 3 2 - 101 3 3 - 102 3 2 - 108 3 2 - 113 3 1 - 117 3 3 - 118 3 3 - 119 3 1 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 34 0 0 - 16 3 3 - 26 3 2 - 45 3 3 - 50 3 2 - 62 3 3 - 75 3 2 - 128 3 2 - 193 3 3 - 198 3 1 - 204 3 3 - 206 3 3 - 208 3 2 - 214 3 1 - 222 3 1 - 223 3 2 - 231 3 3 - 233 3 3 - 238 3 1 - 244 3 3 - 250 3 3 - 252 3 2 - 256 3 3 - 257 3 2 - 262 3 1 - 263 3 3 - 268 3 1 - 269 3 2 - 272 3 3 - 275 3 2 - 277 3 3 - 278 3 1 - 293 3 1 - 295 3 1 - 300 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Inflow 1 4 0 0 - 13 3 2 - 16 3 2 - 36 3 1 - 91 3 1 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Outflow 1 4 0 0 - 214 3 2 - 220 3 3 - 243 3 2 - 302 3 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/CNS2D/otboxA01.neu b/cpp/nudg++/trunk/Grid/CNS2D/otboxA01.neu deleted file mode 100644 index 3e7e52e..0000000 --- a/cpp/nudg++/trunk/Grid/CNS2D/otboxA01.neu +++ /dev/null @@ -1,59 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(C:\Documents and Settings\Administrator\Desktop\WUM_v5\otboxA01.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 13 16 1 1 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 0.000000000e+000 0.000000000e+000 - 2 1.000000000e+000 0.000000000e+000 - 3 1.000000000e+000 1.000000000e+000 - 4 0.000000000e+000 1.000000000e+000 - 5 5.000000000e-001 5.000000000e-001 - 6 0.000000000e+000 5.000000000e-001 - 7 5.000000000e-001 0.000000000e+000 - 8 1.000000000e+000 5.000000000e-001 - 9 5.000000000e-001 1.000000000e+000 - 10 2.500000000e-001 2.500000000e-001 - 11 2.500000000e-001 7.500000000e-001 - 12 7.500000000e-001 2.500000000e-001 - 13 7.500000000e-001 7.500000000e-001 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 8 13 5 - 2 3 3 6 10 5 - 3 3 3 11 9 4 - 4 3 3 11 4 6 - 5 3 3 5 10 7 - 6 3 3 7 12 5 - 7 3 3 5 12 8 - 8 3 3 5 13 9 - 9 3 3 1 7 10 - 10 3 3 6 1 10 - 11 3 3 5 9 11 - 12 3 3 6 5 11 - 13 3 3 2 8 12 - 14 3 3 7 2 12 - 15 3 3 3 9 13 - 16 3 3 8 3 13 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 16 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 8 0 0 - 3 3 2 - 4 3 2 - 9 3 1 - 10 3 1 - 13 3 1 - 14 3 1 - 15 3 1 - 16 3 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/Couette_K082.neu b/cpp/nudg++/trunk/Grid/Euler2D/Couette_K082.neu deleted file mode 100644 index 8499a89..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/Couette_K082.neu +++ /dev/null @@ -1,203 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(D:\_TW\trunk\VC8\NDG\Grid\Euler2D\geom\Couette_K082.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 57 82 1 2 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 4.000000000e+000 0.000000000e+000 - 2 3.695518017e+000 1.530733943e+000 - 3 2.828427076e+000 2.828427076e+000 - 4 1.530733943e+000 3.695518017e+000 - 5 3.071795902e-007 4.000000000e+000 - 6 -1.530732989e+000 3.695518017e+000 - 7 -2.828427076e+000 2.828428030e+000 - 8 -3.695518017e+000 1.530733943e+000 - 9 -4.000000000e+000 6.143591804e-007 - 10 -3.695518017e+000 -1.530732989e+000 - 11 -2.828428030e+000 -2.828427076e+000 - 12 -1.530735016e+000 -3.695518017e+000 - 13 -9.215386854e-007 -4.000000000e+000 - 14 1.530732989e+000 -3.695518017e+000 - 15 2.828425884e+000 -2.828428030e+000 - 16 3.695518017e+000 -1.530735016e+000 - 17 1.000000000e+000 0.000000000e+000 - 18 9.238796234e-001 3.826833963e-001 - 19 7.071068287e-001 7.071068287e-001 - 20 3.826834857e-001 9.238795042e-001 - 21 7.679489755e-008 1.000000000e+000 - 22 -3.826833069e-001 9.238796234e-001 - 23 -7.071067095e-001 7.071068883e-001 - 24 -9.238795042e-001 3.826834857e-001 - 25 -1.000000000e+000 1.535897951e-007 - 26 -9.238796234e-001 -3.826833069e-001 - 27 -7.071068883e-001 -7.071065903e-001 - 28 -3.826836050e-001 -9.238793850e-001 - 29 -2.303846998e-007 -1.000000000e+000 - 30 3.826831877e-001 -9.238796234e-001 - 31 7.071065903e-001 -7.071068883e-001 - 32 9.238793850e-001 -3.826836944e-001 - 33 -2.500000000e+000 -4.972804487e-001 - 34 -4.972817004e-001 -2.500000000e+000 - 35 -1.416135788e+000 2.119397640e+000 - 36 1.416135669e+000 -2.119397640e+000 - 37 2.500000000e+000 -4.972813725e-001 - 38 4.972811341e-001 2.500000000e+000 - 39 2.119397640e+000 1.416136265e+000 - 40 -1.663131595e+000 -1.111268759e+000 - 41 -1.961797118e+000 3.902259469e-001 - 42 -3.902254701e-001 1.961797237e+000 - 43 3.902253211e-001 -1.961797237e+000 - 44 1.663130879e+000 -1.111269236e+000 - 45 1.111268878e+000 1.663131356e+000 - 46 1.961797476e+000 3.902255893e-001 - 47 -9.612829089e-001 -1.438660979e+000 - 48 -1.697016597e+000 -3.375573158e-001 - 49 -1.438661098e+000 9.612827897e-001 - 50 9.612822533e-001 -1.438661218e+000 - 51 1.697016597e+000 -3.375578821e-001 - 52 3.375577033e-001 1.697016478e+000 - 53 1.438661218e+000 9.612827301e-001 - 54 -3.148210347e-001 -1.582710028e+000 - 55 -8.965331912e-001 1.341757298e+000 - 56 -1.782883048e+000 -2.283978462e+000 - 57 -2.521209478e+000 1.427841306e+000 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 40 56 47 - 2 3 3 1 46 37 - 3 3 3 26 25 48 - 4 3 3 25 41 48 - 5 3 3 34 56 12 - 6 3 3 40 10 56 - 7 3 3 29 28 54 - 8 3 3 43 14 36 - 9 3 3 16 1 37 - 10 3 3 26 40 27 - 11 3 3 47 27 40 - 12 3 3 14 43 13 - 13 3 3 51 17 32 - 14 3 3 18 17 46 - 15 3 3 40 33 10 - 16 3 3 9 41 57 - 17 3 3 49 24 23 - 18 3 3 23 55 49 - 19 3 3 33 41 9 - 20 3 3 27 47 28 - 21 3 3 48 33 40 - 22 3 3 57 7 8 - 23 3 3 42 22 21 - 24 3 3 14 15 36 - 25 3 3 4 5 38 - 26 3 3 41 24 49 - 27 3 3 11 56 10 - 28 3 3 35 49 55 - 29 3 3 12 13 34 - 30 3 3 54 34 43 - 31 3 3 5 6 42 - 32 3 3 30 29 43 - 33 3 3 44 32 31 - 34 3 3 51 32 44 - 35 3 3 50 31 30 - 36 3 3 6 7 35 - 37 3 3 16 37 44 - 38 3 3 53 19 18 - 39 3 3 39 46 2 - 40 3 3 44 36 15 - 41 3 3 37 46 51 - 42 3 3 44 31 50 - 43 3 3 36 44 50 - 44 3 3 39 45 53 - 45 3 3 45 20 19 - 46 3 3 9 10 33 - 47 3 3 35 42 6 - 48 3 3 52 21 20 - 49 3 3 52 38 42 - 50 3 3 2 3 39 - 51 3 3 45 3 4 - 52 3 3 46 1 2 - 53 3 3 42 38 5 - 54 3 3 45 4 38 - 55 3 3 54 28 47 - 56 3 3 45 19 53 - 57 3 3 25 24 41 - 58 3 3 52 20 45 - 59 3 3 43 34 13 - 60 3 3 15 16 44 - 61 3 3 3 45 39 - 62 3 3 49 57 41 - 63 3 3 33 48 41 - 64 3 3 40 26 48 - 65 3 3 23 22 55 - 66 3 3 57 8 9 - 67 3 3 30 43 50 - 68 3 3 36 50 43 - 69 3 3 37 51 44 - 70 3 3 46 17 51 - 71 3 3 38 52 45 - 72 3 3 42 21 52 - 73 3 3 18 46 53 - 74 3 3 39 53 46 - 75 3 3 34 54 47 - 76 3 3 43 29 54 - 77 3 3 22 42 55 - 78 3 3 35 55 42 - 79 3 3 12 56 11 - 80 3 3 34 47 56 - 81 3 3 49 35 57 - 82 3 3 7 57 35 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 82 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Inflow 1 16 0 0 - 9 3 1 - 12 3 3 - 22 3 2 - 24 3 1 - 25 3 1 - 27 3 3 - 29 3 1 - 31 3 1 - 36 3 1 - 46 3 1 - 50 3 1 - 51 3 2 - 52 3 2 - 60 3 1 - 66 3 2 - 79 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Outflow 1 16 0 0 - 3 3 1 - 7 3 1 - 10 3 3 - 13 3 2 - 14 3 1 - 17 3 2 - 20 3 3 - 23 3 2 - 32 3 1 - 33 3 2 - 35 3 2 - 38 3 2 - 45 3 2 - 48 3 2 - 57 3 1 - 65 3 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/Couette_K242.neu b/cpp/nudg++/trunk/Grid/Euler2D/Couette_K242.neu deleted file mode 100644 index 14aee38..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/Couette_K242.neu +++ /dev/null @@ -1,507 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(D:\_TW\trunk\VC8\NDG\Grid\Euler2D\geom\Couette_K242.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 153 242 1 2 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 4.000000000e+000 0.000000000e+000 - 2 3.923141003e+000 7.803611755e-001 - 3 3.695518017e+000 1.530733943e+000 - 4 3.325879097e+000 2.222280979e+000 - 5 2.828427076e+000 2.828427076e+000 - 6 2.222280979e+000 3.325877905e+000 - 7 1.530733943e+000 3.695518017e+000 - 8 7.803614736e-001 3.923141003e+000 - 9 3.071795902e-007 4.000000000e+000 - 10 -7.803608775e-001 3.923141003e+000 - 11 -1.530732989e+000 3.695518017e+000 - 12 -2.222280979e+000 3.325879097e+000 - 13 -2.828427076e+000 2.828428030e+000 - 14 -3.325877905e+000 2.222280979e+000 - 15 -3.695518017e+000 1.530733943e+000 - 16 -3.923141003e+000 7.803617716e-001 - 17 -4.000000000e+000 6.143591804e-007 - 18 -3.923141003e+000 -7.803605795e-001 - 19 -3.695518017e+000 -1.530732989e+000 - 20 -3.325879097e+000 -2.222280025e+000 - 21 -2.828428030e+000 -2.828427076e+000 - 22 -2.222281933e+000 -3.325877905e+000 - 23 -1.530735016e+000 -3.695518017e+000 - 24 -7.803621292e-001 -3.923141003e+000 - 25 -9.215386854e-007 -4.000000000e+000 - 26 7.803602815e-001 -3.923141003e+000 - 27 1.530732989e+000 -3.695518017e+000 - 28 2.222280025e+000 -3.325879097e+000 - 29 2.828425884e+000 -2.828428030e+000 - 30 3.325877905e+000 -2.222281933e+000 - 31 3.695518017e+000 -1.530735016e+000 - 32 3.923141003e+000 -7.803624272e-001 - 33 1.000000000e+000 0.000000000e+000 - 34 9.807853103e-001 1.950902939e-001 - 35 9.238796234e-001 3.826833963e-001 - 36 8.314697146e-001 5.555701852e-001 - 37 7.071068287e-001 7.071068287e-001 - 38 5.555701852e-001 8.314695954e-001 - 39 3.826834857e-001 9.238795042e-001 - 40 1.950903982e-001 9.807853103e-001 - 41 7.679489755e-008 1.000000000e+000 - 42 -1.950902045e-001 9.807853103e-001 - 43 -3.826833069e-001 9.238796234e-001 - 44 -5.555701256e-001 8.314697146e-001 - 45 -7.071067095e-001 7.071068883e-001 - 46 -8.314694762e-001 5.555704236e-001 - 47 -9.238795042e-001 3.826834857e-001 - 48 -9.807853103e-001 1.950905025e-001 - 49 -1.000000000e+000 1.535897951e-007 - 50 -9.807853103e-001 -1.950902045e-001 - 51 -9.238796234e-001 -3.826833069e-001 - 52 -8.314697146e-001 -5.555701256e-001 - 53 -7.071068883e-001 -7.071065903e-001 - 54 -5.555704236e-001 -8.314694762e-001 - 55 -3.826836050e-001 -9.238793850e-001 - 56 -1.950905025e-001 -9.807853103e-001 - 57 -2.303846998e-007 -1.000000000e+000 - 58 1.950901002e-001 -9.807853103e-001 - 59 3.826831877e-001 -9.238796234e-001 - 60 5.555700064e-001 -8.314697742e-001 - 61 7.071065903e-001 -7.071068883e-001 - 62 8.314694762e-001 -5.555704832e-001 - 63 9.238793850e-001 -3.826836944e-001 - 64 9.807853103e-001 -1.950906068e-001 - 65 -2.403926373e+000 -7.292225957e-001 - 66 -7.292243838e-001 -2.403926134e+000 - 67 -2.215471029e+000 1.184194207e+000 - 68 -7.292225957e-001 2.403926373e+000 - 69 1.593656898e+000 -1.941876769e+000 - 70 2.500000000e+000 -2.462282777e-001 - 71 1.593656659e+000 1.941876888e+000 - 72 -1.548315406e+000 -1.270669460e+000 - 73 -1.993322968e+000 1.963252276e-001 - 74 1.963249296e-001 -1.993323803e+000 - 75 -1.270669103e+000 1.548315406e+000 - 76 1.963251382e-001 1.993322849e+000 - 77 1.766459823e+000 -9.441927075e-001 - 78 1.916720748e+000 5.814306140e-001 - 79 -1.675099015e+000 -5.081354380e-001 - 80 -5.081364512e-001 -1.675098896e+000 - 81 -1.543779850e+000 8.251677752e-001 - 82 -5.081354380e-001 1.675099015e+000 - 83 1.110488653e+000 -1.353134632e+000 - 84 1.742044806e+000 -1.715763956e-001 - 85 1.110488534e+000 1.353134632e+000 - 86 -9.856204391e-001 -1.200981259e+000 - 87 4.509982467e-001 -1.486743212e+000 - 88 4.509987235e-001 1.486742735e+000 - 89 1.370190144e+000 7.323817015e-001 - 90 -1.487114191e+000 1.464680731e-001 - 91 -9.479798675e-001 1.155117273e+000 - 92 1.317863464e+000 -7.044129372e-001 - 93 -1.261286497e+000 -6.741714478e-001 - 94 -1.401801556e-001 -1.423271298e+000 - 95 -1.401798129e-001 1.423270941e+000 - 96 1.423270941e+000 1.401799023e-001 - 97 -1.205118179e+000 6.441492438e-001 - 98 8.668786883e-001 -1.056295037e+000 - 99 8.668787479e-001 1.056295037e+000 - 100 -6.303981543e-001 -1.179391623e+000 - 101 -1.304201245e+000 -1.284524351e-001 - 102 -6.177707911e-001 1.155768275e+000 - 103 1.254081249e+000 -3.804219067e-001 - 104 -9.915109873e-001 -8.137118220e-001 - 105 1.257225722e-001 -1.276485324e+000 - 106 1.257228702e-001 1.276485205e+000 - 107 1.227430701e+000 3.723369241e-001 - 108 -1.885966301e+000 -2.298054695e+000 - 109 8.629763126e-001 -2.844854116e+000 - 110 8.629771471e-001 2.844853401e+000 - 111 2.621831656e+000 1.401399016e+000 - 112 -3.016120911e+000 2.970623970e-001 - 113 -1.922665000e+000 2.342774630e+000 - 114 2.672851563e+000 -1.428669691e+000 - 115 -2.816664457e+000 -1.505538106e+000 - 116 -3.130461276e-001 -3.178403139e+000 - 117 -3.130449355e-001 3.178403378e+000 - 118 3.178403378e+000 3.130452633e-001 - 119 -2.909238577e+000 1.555020332e+000 - 120 2.092704535e+000 -2.549969435e+000 - 121 2.092705488e+000 2.549968481e+000 - 122 -1.585065842e+000 -2.965447664e+000 - 123 -3.161187410e+000 -8.244915009e-001 - 124 -1.070721149e+000 3.086494446e+000 - 125 3.236075878e+000 -4.480032623e-001 - 126 -2.806536674e+000 9.127746224e-001 - 127 -2.318172693e+000 1.826440215e+000 - 128 2.243598223e+000 -1.917309761e+000 - 129 1.447452426e+000 -2.570688009e+000 - 130 9.003099799e-001 -2.112069845e+000 - 131 1.447453618e+000 2.570688486e+000 - 132 9.003099203e-001 2.112071514e+000 - 133 2.238908291e+000 1.921157241e+000 - 134 1.895844936e+000 1.295055270e+000 - 135 -2.843118429e+000 -2.954732180e-001 - 136 -1.333874345e+000 2.528122902e+000 - 137 2.739771366e+000 -8.150326610e-001 - 138 -1.269208193e+000 -1.931575418e+000 - 139 -2.578973293e+000 -2.169148445e+000 - 140 -2.136529446e+000 -1.636301517e+000 - 141 3.707799911e-001 -3.349451542e+000 - 142 1.735415608e-001 -2.685539722e+000 - 143 -1.032088548e-001 2.566586256e+000 - 144 3.707813025e-001 3.349451303e+000 - 145 3.212756634e+000 1.017102122e+000 - 146 2.600080967e+000 6.941299438e-001 - 147 -9.833517075e-001 -3.276779890e+000 - 148 -3.386260271e+000 1.027211189e+000 - 149 -2.735399961e+000 2.244885921e+000 - 150 2.735399961e+000 -2.244885921e+000 - 151 1.667613029e+000 -3.119885683e+000 - 152 1.667613864e+000 3.119885921e+000 - 153 2.734602928e+000 2.244230032e+000 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 139 21 108 - 2 3 3 74 94 80 - 3 3 3 72 140 138 - 4 3 3 72 93 79 - 5 3 3 52 104 53 - 6 3 3 21 22 108 - 7 3 3 19 20 115 - 8 3 3 106 41 40 - 9 3 3 35 107 36 - 10 3 3 51 101 93 - 11 3 3 86 93 72 - 12 3 3 90 49 48 - 13 3 3 108 22 122 - 14 3 3 57 105 58 - 15 3 3 100 54 104 - 16 3 3 26 109 141 - 17 3 3 94 74 87 - 18 3 3 130 109 129 - 19 3 3 62 61 98 - 20 3 3 116 147 24 - 21 3 3 72 79 65 - 22 3 3 51 50 101 - 23 3 3 75 67 81 - 24 3 3 93 104 52 - 25 3 3 52 51 93 - 26 3 3 119 126 67 - 27 3 3 124 68 117 - 28 3 3 56 100 94 - 29 3 3 84 92 77 - 30 3 3 118 70 125 - 31 3 3 104 54 53 - 32 3 3 73 112 135 - 33 3 3 97 47 46 - 34 3 3 17 112 16 - 35 3 3 123 135 17 - 36 3 3 74 80 66 - 37 3 3 73 81 67 - 38 3 3 149 13 14 - 39 3 3 75 82 68 - 40 3 3 113 127 75 - 41 3 3 13 113 12 - 42 3 3 42 41 95 - 43 3 3 81 73 90 - 44 3 3 45 91 97 - 45 3 3 97 91 81 - 46 3 3 106 39 88 - 47 3 3 82 75 91 - 48 3 3 97 90 48 - 49 3 3 122 147 66 - 50 3 3 91 44 102 - 51 3 3 102 42 95 - 52 3 3 45 44 91 - 53 3 3 12 113 136 - 54 3 3 128 69 120 - 55 3 3 89 134 85 - 56 3 3 106 95 41 - 57 3 3 131 71 121 - 58 3 3 79 73 65 - 59 3 3 49 90 101 - 60 3 3 59 87 98 - 61 3 3 14 15 119 - 62 3 3 76 95 88 - 63 3 3 115 65 123 - 64 3 3 57 56 94 - 65 3 3 60 98 61 - 66 3 3 57 94 105 - 67 3 3 100 56 55 - 68 3 3 105 59 58 - 69 3 3 118 125 1 - 70 3 3 92 83 77 - 71 3 3 86 138 80 - 72 3 3 62 92 63 - 73 3 3 92 62 98 - 74 3 3 124 136 68 - 75 3 3 109 26 27 - 76 3 3 126 148 112 - 77 3 3 128 150 114 - 78 3 3 79 90 73 - 79 3 3 114 30 31 - 80 3 3 89 85 99 - 81 3 3 48 47 97 - 82 3 3 125 137 31 - 83 3 3 118 1 2 - 84 3 3 137 77 114 - 85 3 3 96 33 103 - 86 3 3 99 39 38 - 87 3 3 132 85 71 - 88 3 3 111 145 3 - 89 3 3 89 78 134 - 90 3 3 27 28 151 - 91 3 3 44 43 102 - 92 3 3 64 63 103 - 93 3 3 143 82 76 - 94 3 3 116 24 25 - 95 3 3 38 37 99 - 96 3 3 101 50 49 - 97 3 3 87 130 83 - 98 3 3 82 95 76 - 99 3 3 124 10 11 - 100 3 3 99 88 39 - 101 3 3 144 143 110 - 102 3 3 117 9 10 - 103 3 3 5 6 121 - 104 3 3 63 92 103 - 105 3 3 34 96 107 - 106 3 3 77 70 84 - 107 3 3 103 33 64 - 108 3 3 115 123 19 - 109 3 3 87 74 130 - 110 3 3 111 133 134 - 111 3 3 78 89 96 - 112 3 3 4 111 3 - 113 3 3 36 89 99 - 114 3 3 110 7 8 - 115 3 3 86 72 138 - 116 3 3 110 131 152 - 117 3 3 153 4 5 - 118 3 3 132 88 85 - 119 3 3 54 100 55 - 120 3 3 34 33 96 - 121 3 3 102 95 82 - 122 3 3 78 84 70 - 123 3 3 87 83 98 - 124 3 3 28 29 120 - 125 3 3 81 91 75 - 126 3 3 77 83 69 - 127 3 3 78 96 84 - 128 3 3 34 107 35 - 129 3 3 97 46 45 - 130 3 3 90 97 81 - 131 3 3 98 60 59 - 132 3 3 92 98 83 - 133 3 3 99 37 36 - 134 3 3 88 99 85 - 135 3 3 86 80 100 - 136 3 3 94 100 80 - 137 3 3 90 79 101 - 138 3 3 93 101 79 - 139 3 3 102 43 42 - 140 3 3 82 91 102 - 141 3 3 92 84 103 - 142 3 3 96 103 84 - 143 3 3 93 86 104 - 144 3 3 100 104 86 - 145 3 3 94 87 105 - 146 3 3 59 105 87 - 147 3 3 39 106 40 - 148 3 3 88 95 106 - 149 3 3 96 89 107 - 150 3 3 36 107 89 - 151 3 3 22 23 122 - 152 3 3 65 115 140 - 153 3 3 120 129 151 - 154 3 3 66 116 142 - 155 3 3 144 9 117 - 156 3 3 131 132 71 - 157 3 3 121 133 153 - 158 3 3 70 118 146 - 159 3 3 17 18 123 - 160 3 3 126 73 67 - 161 3 3 119 127 149 - 162 3 3 136 75 68 - 163 3 3 31 32 125 - 164 3 3 128 77 69 - 165 3 3 139 20 21 - 166 3 3 115 139 140 - 167 3 3 141 25 26 - 168 3 3 116 141 142 - 169 3 3 143 117 68 - 170 3 3 8 144 110 - 171 3 3 145 2 3 - 172 3 3 118 145 146 - 173 3 3 15 16 148 - 174 3 3 127 119 67 - 175 3 3 29 30 150 - 176 3 3 129 120 69 - 177 3 3 6 7 152 - 178 3 3 133 121 71 - 179 3 3 23 24 147 - 180 3 3 138 122 66 - 181 3 3 135 123 65 - 182 3 3 19 123 18 - 183 3 3 10 124 117 - 184 3 3 124 11 12 - 185 3 3 137 125 70 - 186 3 3 1 125 32 - 187 3 3 119 15 148 - 188 3 3 73 126 112 - 189 3 3 75 127 67 - 190 3 3 149 113 13 - 191 3 3 120 29 150 - 192 3 3 77 128 114 - 193 3 3 130 129 69 - 194 3 3 151 109 27 - 195 3 3 130 69 83 - 196 3 3 130 74 142 - 197 3 3 121 6 152 - 198 3 3 132 110 76 - 199 3 3 110 132 131 - 200 3 3 88 132 76 - 201 3 3 134 133 71 - 202 3 3 153 111 4 - 203 3 3 134 71 85 - 204 3 3 134 78 146 - 205 3 3 73 135 65 - 206 3 3 17 135 112 - 207 3 3 12 136 124 - 208 3 3 75 136 113 - 209 3 3 77 137 70 - 210 3 3 31 137 114 - 211 3 3 122 138 108 - 212 3 3 138 66 80 - 213 3 3 108 138 140 - 214 3 3 20 139 115 - 215 3 3 108 140 139 - 216 3 3 65 140 72 - 217 3 3 109 130 142 - 218 3 3 25 141 116 - 219 3 3 109 142 141 - 220 3 3 66 142 74 - 221 3 3 82 143 68 - 222 3 3 110 143 76 - 223 3 3 9 144 8 - 224 3 3 143 144 117 - 225 3 3 111 134 146 - 226 3 3 2 145 118 - 227 3 3 111 146 145 - 228 3 3 70 146 78 - 229 3 3 66 147 116 - 230 3 3 23 147 122 - 231 3 3 112 148 16 - 232 3 3 119 148 126 - 233 3 3 119 149 14 - 234 3 3 113 149 127 - 235 3 3 114 150 30 - 236 3 3 120 150 128 - 237 3 3 120 151 28 - 238 3 3 109 151 129 - 239 3 3 110 152 7 - 240 3 3 121 152 131 - 241 3 3 121 153 5 - 242 3 3 111 153 133 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 242 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Inflow 1 32 0 0 - 6 3 1 - 7 3 1 - 34 3 3 - 38 3 2 - 41 3 3 - 61 3 1 - 75 3 2 - 79 3 2 - 83 3 2 - 90 3 1 - 94 3 2 - 99 3 2 - 102 3 2 - 103 3 1 - 112 3 3 - 114 3 2 - 117 3 2 - 124 3 1 - 151 3 1 - 159 3 1 - 163 3 1 - 165 3 2 - 167 3 2 - 171 3 2 - 173 3 1 - 175 3 1 - 177 3 1 - 179 3 1 - 182 3 3 - 184 3 2 - 186 3 3 - 223 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Outflow 1 32 0 0 - 5 3 3 - 8 3 2 - 9 3 3 - 12 3 2 - 14 3 3 - 19 3 1 - 22 3 1 - 25 3 1 - 31 3 2 - 33 3 2 - 42 3 1 - 52 3 1 - 64 3 1 - 65 3 3 - 67 3 2 - 68 3 2 - 72 3 3 - 81 3 1 - 86 3 2 - 91 3 1 - 92 3 1 - 95 3 1 - 96 3 2 - 107 3 2 - 119 3 3 - 120 3 1 - 128 3 3 - 129 3 2 - 131 3 2 - 133 3 2 - 139 3 2 - 147 3 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/Couette_K856.neu b/cpp/nudg++/trunk/Grid/Euler2D/Couette_K856.neu deleted file mode 100644 index fd60305..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/Couette_K856.neu +++ /dev/null @@ -1,1585 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(D:\_TW\trunk\VC8\NDG\Grid\Euler2D\geom\Couette_K856.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 492 856 1 2 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 1.000000000e+000 0.000000000e+000 - 2 9.951847196e-001 9.801712632e-002 - 3 9.807853103e-001 1.950902939e-001 - 4 9.569404125e-001 2.902846932e-001 - 5 9.238796234e-001 3.826833963e-001 - 6 8.819212914e-001 4.713967144e-001 - 7 8.314697146e-001 5.555701852e-001 - 8 7.730104923e-001 6.343932748e-001 - 9 7.071068287e-001 7.071068287e-001 - 10 6.343932748e-001 7.730103731e-001 - 11 5.555701852e-001 8.314695954e-001 - 12 4.713968039e-001 8.819211721e-001 - 13 3.826834857e-001 9.238795042e-001 - 14 2.902846932e-001 9.569402933e-001 - 15 1.950903982e-001 9.807853103e-001 - 16 9.801720828e-002 9.951847196e-001 - 17 7.679489755e-008 1.000000000e+000 - 18 -9.801705927e-002 9.951847196e-001 - 19 -1.950902045e-001 9.807853103e-001 - 20 -2.902846038e-001 9.569404125e-001 - 21 -3.826833069e-001 9.238796234e-001 - 22 -4.713967144e-001 8.819212914e-001 - 23 -5.555701256e-001 8.314697146e-001 - 24 -6.343932152e-001 7.730106115e-001 - 25 -7.071067095e-001 7.071068883e-001 - 26 -7.730103731e-001 6.343933940e-001 - 27 -8.314694762e-001 5.555704236e-001 - 28 -8.819211721e-001 4.713968933e-001 - 29 -9.238795042e-001 3.826834857e-001 - 30 -9.569402933e-001 2.902848125e-001 - 31 -9.807853103e-001 1.950905025e-001 - 32 -9.951847196e-001 9.801729023e-002 - 33 -1.000000000e+000 1.535897951e-007 - 34 -9.951847196e-001 -9.801697731e-002 - 35 -9.807853103e-001 -1.950902045e-001 - 36 -9.569404125e-001 -2.902845144e-001 - 37 -9.238796234e-001 -3.826833069e-001 - 38 -8.819214106e-001 -4.713965952e-001 - 39 -8.314697146e-001 -5.555701256e-001 - 40 -7.730106115e-001 -6.343932152e-001 - 41 -7.071068883e-001 -7.071065903e-001 - 42 -6.343935132e-001 -7.730103135e-001 - 43 -5.555704236e-001 -8.314694762e-001 - 44 -4.713968933e-001 -8.819211721e-001 - 45 -3.826836050e-001 -9.238793850e-001 - 46 -2.902849019e-001 -9.569402933e-001 - 47 -1.950905025e-001 -9.807853103e-001 - 48 -9.801735729e-002 -9.951847196e-001 - 49 -2.303846998e-007 -1.000000000e+000 - 50 9.801690280e-002 -9.951847792e-001 - 51 1.950901002e-001 -9.807853103e-001 - 52 2.902845144e-001 -9.569404125e-001 - 53 3.826831877e-001 -9.238796234e-001 - 54 4.713965058e-001 -8.819214106e-001 - 55 5.555700064e-001 -8.314697742e-001 - 56 6.343930960e-001 -7.730106115e-001 - 57 7.071065903e-001 -7.071068883e-001 - 58 7.730103135e-001 -6.343935132e-001 - 59 8.314694762e-001 -5.555704832e-001 - 60 8.819211125e-001 -4.713970125e-001 - 61 9.238793850e-001 -3.826836944e-001 - 62 9.569401741e-001 -2.902849913e-001 - 63 9.807853103e-001 -1.950906068e-001 - 64 9.951847196e-001 -9.801743925e-002 - 65 4.000000000e+000 0.000000000e+000 - 66 3.980739117e+000 3.920685053e-001 - 67 3.923141003e+000 7.803611755e-001 - 68 3.827760935e+000 1.161139011e+000 - 69 3.695518017e+000 1.530733943e+000 - 70 3.527684927e+000 1.885586977e+000 - 71 3.325879097e+000 2.222280979e+000 - 72 3.092041969e+000 2.537573099e+000 - 73 2.828427076e+000 2.828427076e+000 - 74 2.537573099e+000 3.092041969e+000 - 75 2.222280979e+000 3.325877905e+000 - 76 1.885586977e+000 3.527684927e+000 - 77 1.530733943e+000 3.695518017e+000 - 78 1.161139011e+000 3.827760935e+000 - 79 7.803614736e-001 3.923141003e+000 - 80 3.920688033e-001 3.980739117e+000 - 81 3.071795902e-007 4.000000000e+000 - 82 -3.920682073e-001 3.980739117e+000 - 83 -7.803608775e-001 3.923141003e+000 - 84 -1.161138058e+000 3.827760935e+000 - 85 -1.530732989e+000 3.695518017e+000 - 86 -1.885586977e+000 3.527684927e+000 - 87 -2.222280979e+000 3.325879097e+000 - 88 -2.537573099e+000 3.092041969e+000 - 89 -2.828427076e+000 2.828428030e+000 - 90 -3.092041016e+000 2.537574053e+000 - 91 -3.325877905e+000 2.222280979e+000 - 92 -3.527684927e+000 1.885586977e+000 - 93 -3.695518017e+000 1.530733943e+000 - 94 -3.827760935e+000 1.161139011e+000 - 95 -3.923141003e+000 7.803617716e-001 - 96 -3.980739117e+000 3.920691907e-001 - 97 -4.000000000e+000 6.143591804e-007 - 98 -3.980739117e+000 -3.920679092e-001 - 99 -3.923141003e+000 -7.803605795e-001 - 100 -3.827761889e+000 -1.161138058e+000 - 101 -3.695518017e+000 -1.530732989e+000 - 102 -3.527684927e+000 -1.885586023e+000 - 103 -3.325879097e+000 -2.222280025e+000 - 104 -3.092041969e+000 -2.537573099e+000 - 105 -2.828428030e+000 -2.828427076e+000 - 106 -2.537574053e+000 -3.092041016e+000 - 107 -2.222281933e+000 -3.325877905e+000 - 108 -1.885588050e+000 -3.527684927e+000 - 109 -1.530735016e+000 -3.695518017e+000 - 110 -1.161139011e+000 -3.827760935e+000 - 111 -7.803621292e-001 -3.923141003e+000 - 112 -3.920694888e-001 -3.980739117e+000 - 113 -9.215386854e-007 -4.000000000e+000 - 114 3.920676112e-001 -3.980739117e+000 - 115 7.803602815e-001 -3.923141003e+000 - 116 1.161138058e+000 -3.827761889e+000 - 117 1.530732989e+000 -3.695518017e+000 - 118 1.885586023e+000 -3.527686119e+000 - 119 2.222280025e+000 -3.325879097e+000 - 120 2.537571907e+000 -3.092041969e+000 - 121 2.828425884e+000 -2.828428030e+000 - 122 3.092041016e+000 -2.537574053e+000 - 123 3.325877905e+000 -2.222281933e+000 - 124 3.527683973e+000 -1.885588050e+000 - 125 3.695518017e+000 -1.530735016e+000 - 126 3.827760935e+000 -1.161139965e+000 - 127 3.923141003e+000 -7.803624272e-001 - 128 3.980739117e+000 -3.920697868e-001 - 129 -2.428002834e+000 -6.081824303e-001 - 130 -6.081838012e-001 -2.428002357e+000 - 131 -2.146907091e+000 1.286807418e+000 - 132 -8.432403803e-001 2.356698751e+000 - 133 1.070175648e+000 -2.262699127e+000 - 134 2.262698174e+000 -1.070177436e+000 - 135 1.491044283e+000 2.010440350e+000 - 136 2.428002834e+000 6.081821918e-001 - 137 -1.697656512e+000 -4.252404273e-001 - 138 -4.252412915e-001 -1.697656274e+000 - 139 -1.501114726e+000 8.997341394e-001 - 140 -5.895925760e-001 1.647800803e+000 - 141 7.482655644e-001 -1.582076311e+000 - 142 1.582075834e+000 -7.482666969e-001 - 143 4.869161248e-001 1.943875074e+000 - 144 1.042536259e+000 1.405697346e+000 - 145 1.697656512e+000 4.252403975e-001 - 146 -1.650679469e+000 2.448549867e-001 - 147 -1.403156638e+000 -1.271747828e+000 - 148 -1.299190283e+000 -6.144707203e-001 - 149 -6.144709587e-001 -1.299189925e+000 - 150 7.487177849e-002 -1.524062872e+000 - 151 -1.064875603e+000 9.651473165e-001 - 152 -2.108769864e-001 1.421619058e+000 - 153 1.024732590e+000 -1.130618334e+000 - 154 1.509385705e+000 -2.238962799e-001 - 155 3.645108342e-001 1.455207229e+000 - 156 1.064875722e+000 9.651471972e-001 - 157 -1.373393893e+000 -2.037233859e-001 - 158 -1.255118132e+000 5.936267376e-001 - 159 -5.936264992e-001 1.255118132e+000 - 160 5.869676471e-001 -1.241039991e+000 - 161 1.241039515e+000 -5.869684815e-001 - 162 7.137913108e-001 1.190888762e+000 - 163 1.331705451e+000 3.335746229e-001 - 164 -1.048436642e+000 -9.502477646e-001 - 165 -1.317554832e+000 1.954407841e-001 - 166 -1.957799345e-001 -1.319840789e+000 - 167 -2.861343622e+000 4.244401753e-001 - 168 1.875034869e-001 -1.264046431e+000 - 169 6.363783777e-002 1.295374751e+000 - 170 9.468444586e-001 -8.581704497e-001 - 171 1.276338339e+000 -6.270266324e-002 - 172 1.112420201e+000 6.667588353e-001 - 173 -7.613192201e-001 1.026520729e+000 - 174 -7.673501372e-001 -1.034651518e+000 - 175 4.394158721e-001 2.962303400e+000 - 176 -2.362118959e+000 -1.751866579e+000 - 177 4.262700081e-001 1.191344857e+000 - 178 -1.564036846e+000 -2.609437466e+000 - 179 1.492761075e-001 -3.038599491e+000 - 180 -2.043061018e+000 2.254169226e+000 - 181 2.043059111e+000 -2.254168272e+000 - 182 3.009336233e+000 -4.463934600e-001 - 183 2.443569899e+000 1.812273502e+000 - 184 -1.162553310e+000 -4.159680009e-001 - 185 -1.059063911e+000 -6.347783804e-001 - 186 -4.159685671e-001 -1.162552834e+000 - 187 -9.917448163e-001 7.355282307e-001 - 188 -3.000148535e-001 1.197727442e+000 - 189 8.291943073e-001 9.148750901e-001 - 190 7.407047153e-001 -9.987251163e-001 - 191 1.206157565e+000 -3.021274209e-001 - 192 -4.636894763e-001 3.125946045e+000 - 193 1.351138473e+000 2.856741905e+000 - 194 -1.209844470e+000 -5.943575129e-002 - 195 -1.140495658e+000 4.080760181e-001 - 196 4.055745900e-001 -1.133505583e+000 - 197 1.032601714e+000 -6.189179420e-001 - 198 1.190849304e+000 1.766457111e-001 - 199 1.133505702e+000 4.055748582e-001 - 200 -8.921045065e-001 -8.085563779e-001 - 201 -5.090122223e-001 1.076216221e+000 - 202 6.120489836e-001 1.021142006e+000 - 203 -3.200845957e+000 -4.747995436e-001 - 204 -7.926028371e-001 -3.164248228e+000 - 205 -2.797916412e+000 1.677006006e+000 - 206 -1.383512855e+000 2.925190926e+000 - 207 1.090129375e+000 -3.046714067e+000 - 208 2.775496244e+000 -1.663571119e+000 - 209 3.200846195e+000 4.748001695e-001 - 210 -5.817771703e-002 -1.184228897e+000 - 211 -1.398745418e+000 1.704376698e+000 - 212 1.833271623e+000 1.224952579e+000 - 213 -5.732576549e-002 1.166893363e+000 - 214 1.714252830e-001 1.155655503e+000 - 215 9.383880496e-001 6.959559321e-001 - 216 -5.985547900e-001 -9.986278415e-001 - 217 -2.991247654e+000 -1.414753914e+000 - 218 -2.239239931e+000 -2.470617771e+000 - 219 2.239237785e+000 2.470618963e+000 - 220 3.014252901e+000 1.425635576e+000 - 221 -1.149195790e+000 1.704671830e-001 - 222 -7.787785530e-001 8.592499495e-001 - 223 -3.170199394e+000 1.134316087e+000 - 224 1.730119944e+000 -2.886533976e+000 - 225 3.168598413e+000 -1.133744359e+000 - 226 -3.414085627e+000 1.677240282e-001 - 227 7.683923244e-001 -8.477905989e-001 - 228 5.882320404e-001 -9.814065695e-001 - 229 1.131808519e+000 -1.678881496e-001 - 230 1.077307343e+000 -3.854671121e-001 - 231 -1.030908346e+000 -4.875830412e-001 - 232 -1.106222510e+000 -2.770940959e-001 - 233 -2.770945430e-001 -1.106222391e+000 - 234 -9.781524539e-001 5.862823129e-001 - 235 1.520191193e+000 8.847141266e-001 - 236 1.663955748e-001 -1.121748924e+000 - 237 8.417485952e-001 3.360448599e+000 - 238 1.699839979e-001 3.460095882e+000 - 239 -2.800213337e+000 -2.076779127e+000 - 240 -1.490182519e+000 -3.150723696e+000 - 241 -1.710193008e-001 -3.481156588e+000 - 242 5.114065409e-001 -3.447631359e+000 - 243 -2.582477570e+000 2.340623379e+000 - 244 -2.076222897e+000 2.799463749e+000 - 245 2.582476854e+000 -2.340621948e+000 - 246 3.481156826e+000 -1.710190922e-001 - 247 -1.024563193e+000 -1.738105893e+000 - 248 -1.121743098e-001 2.017034531e+000 - 249 -1.013297677e+000 -1.343473792e+000 - 250 2.915916964e-002 -2.199563265e+000 - 251 1.417927742e+000 -1.681787491e+000 - 252 2.162987709e+000 -4.005152285e-001 - 253 2.842500210e+000 2.108140945e+000 - 254 -8.592473865e-001 3.430311203e+000 - 255 1.818016052e+000 3.033176899e+000 - 256 -3.460761547e+000 -8.668757081e-001 - 257 3.460761786e+000 8.668757081e-001 - 258 -1.009574890e+000 1.455753088e+000 - 259 -1.691818833e+000 -1.892938137e+000 - 260 -2.148275137e+000 -2.896612406e+000 - 261 -3.270970106e+000 1.547053814e+000 - 262 -3.509933949e+000 8.791928887e-001 - 263 1.546789765e+000 -3.270412445e+000 - 264 2.155092716e+000 -2.905808449e+000 - 265 3.270411968e+000 -1.546790123e+000 - 266 3.509334803e+000 -8.790436983e-001 - 267 2.954633713e+000 9.202095270e-001 - 268 2.467997313e+000 1.233841538e+000 - 269 -1.675092936e+000 -8.918725252e-001 - 270 -1.950487852e+000 -1.376287222e+000 - 271 -2.962496042e+000 -9.149965048e-001 - 272 -2.478332281e+000 -1.193556786e+000 - 273 -3.631960392e+000 -1.784262061e-001 - 274 -1.556681991e+000 3.291327238e+000 - 275 -8.880599737e-001 -3.545332909e+000 - 276 1.230079651e+000 3.437840700e+000 - 277 5.357542038e-001 3.611761093e+000 - 278 -1.791595817e-001 3.646882296e+000 - 279 1.739381075e+000 2.535321712e+000 - 280 -9.884704351e-001 1.917684078e+000 - 281 -1.443695188e+000 2.311805487e+000 - 282 -2.710337162e+000 -2.456506252e+000 - 283 -3.137499571e+000 -1.880544305e+000 - 284 1.794711649e-001 -3.653237104e+000 - 285 8.887342811e-001 -3.548027039e+000 - 286 -2.456323624e+000 2.710135460e+000 - 287 -2.937845469e+000 2.178855658e+000 - 288 2.937845469e+000 -2.178855658e+000 - 289 3.653236151e+000 1.794720292e-001 - 290 1.962755561e+000 7.916398644e-001 - 291 -9.086197615e-001 2.956926823e+000 - 292 -3.131505489e+000 7.290241122e-001 - 293 -2.596096277e+000 9.318179488e-001 - 294 -2.242746830e+000 4.240715206e-001 - 295 -5.369193554e-001 -3.430791616e+000 - 296 -3.373956680e-001 -2.983492613e+000 - 297 -1.143744469e+000 -3.278789282e+000 - 298 -1.108851671e+000 -2.790251017e+000 - 299 -1.160402775e+000 -2.256672382e+000 - 300 -1.184548259e+000 3.243313313e+000 - 301 -5.533904433e-001 2.691945076e+000 - 302 -5.366675183e-002 2.814930677e+000 - 303 3.249717951e-001 2.446643829e+000 - 304 9.503811598e-001 2.370625496e+000 - 305 -4.290746748e-001 2.291539669e+000 - 306 -2.480695248e+000 -2.737023354e+000 - 307 2.480693817e+000 2.737024307e+000 - 308 2.120604038e+000 2.820766926e+000 - 309 2.599407673e+000 2.386804104e+000 - 310 2.353335142e+000 2.145149231e+000 - 311 1.956389308e+000 1.858878374e+000 - 312 3.339277029e+000 1.579360604e+000 - 313 3.038598776e+000 1.794625759e+000 - 314 3.315701723e+000 1.208741307e+000 - 315 2.735919476e+000 1.629298329e+000 - 316 -1.750439167e+000 2.975667715e+000 - 317 -1.744586706e+000 2.575573921e+000 - 318 -2.552329779e+000 -5.311908945e-002 - 319 -5.196529999e-002 -2.639293194e+000 - 320 5.538548827e-001 -2.584337234e+000 - 321 -5.828901008e-002 2.399415970e+000 - 322 1.094259262e+000 3.106386423e+000 - 323 9.922085404e-001 2.744394064e+000 - 324 6.600064635e-001 2.592345238e+000 - 325 7.669937611e-001 3.033634901e+000 - 326 6.306187510e-001 2.252853632e+000 - 327 -1.454039663e-001 3.290273666e+000 - 328 1.466506571e-001 3.125654936e+000 - 329 7.761988044e-001 -3.211707354e+000 - 330 7.886341214e-001 -2.854215145e+000 - 331 1.129011631e+000 -2.653463125e+000 - 332 1.557763100e+000 -2.389096022e+000 - 333 4.909929335e-001 -3.022824049e+000 - 334 -2.638262510e+000 1.991954565e+000 - 335 -2.367583990e+000 1.656801939e+000 - 336 -1.883848310e+000 1.694511175e+000 - 337 -2.598516941e+000 1.331086040e+000 - 338 -1.633690596e+000 1.325434089e+000 - 339 2.637496233e+000 -1.990268111e+000 - 340 2.223053694e+000 -1.622708678e+000 - 341 1.795696974e+000 -1.314357638e+000 - 342 3.301423550e+000 1.347121447e-001 - 343 2.747880936e+000 1.559243500e-001 - 344 2.221914768e+000 1.231653169e-001 - 345 4.134016931e-001 -1.531792641e+000 - 346 5.095632672e-001 -2.031558990e+000 - 347 1.291323066e+000 -9.218321443e-001 - 348 1.371638298e+000 -1.298975587e+000 - 349 1.098844886e+000 -1.526166320e+000 - 350 9.771613479e-001 -1.890254140e+000 - 351 1.583010316e+000 1.066208631e-001 - 352 1.884352088e+000 -1.339634508e-001 - 353 1.817608237e+000 -4.826424718e-001 - 354 1.954520583e+000 -8.412813544e-001 - 355 -3.494789600e+000 1.250456214e+000 - 356 1.907747746e+000 -3.182887554e+000 - 357 3.493911266e+000 -1.250142932e+000 - 358 1.430212379e+000 1.281675100e+000 - 359 1.678275704e+000 1.583973646e+000 - 360 -2.023219585e+000 -6.748442650e-001 - 361 -2.115495443e+000 -2.173660249e-001 - 362 -3.430397987e+000 5.277171731e-001 - 363 1.387843966e+000 -2.877602577e+000 - 364 -1.868670940e+000 1.018759966e+000 - 365 -1.794064641e+000 6.221207976e-001 - 366 -2.226467848e+000 9.257928133e-001 - 367 -3.675096035e+000 3.362630606e-001 - 368 -3.167068005e+000 3.592832685e-001 - 369 -1.689479589e+000 -8.911929280e-002 - 370 1.244179130e+000 -3.471838474e+000 - 371 -3.164309025e+000 1.894538522e+000 - 372 3.164273977e+000 -1.894468784e+000 - 373 -2.001071692e+000 -1.027040005e+000 - 374 1.955829620e+000 -2.604616165e+000 - 375 2.315678835e+000 -2.583057404e+000 - 376 3.164228201e+000 -7.726306319e-001 - 377 2.675044060e+000 -8.049985766e-001 - 378 3.428718090e+000 -5.276790261e-001 - 379 2.664266348e+000 -1.241422296e+000 - 380 2.588041544e+000 -3.887785077e-001 - 381 1.708701372e+000 -1.991778374e+000 - 382 1.350784898e+000 -2.036137104e+000 - 383 -2.931474209e+000 1.369588852e+000 - 384 4.540077150e-001 3.292013168e+000 - 385 2.168924570e+000 1.510943413e+000 - 386 -3.294451952e+000 -1.492187530e-001 - 387 -2.908707142e+000 -2.145618498e-001 - 388 -1.125255942e+000 2.629655123e+000 - 389 -2.837078333e+000 1.013852507e-001 - 390 -2.286190510e+000 1.999417543e+000 - 391 -1.919101596e+000 -2.624966383e+000 - 392 -1.922406077e+000 -2.222642422e+000 - 393 -1.795360446e+000 -2.961854219e+000 - 394 -1.550362945e+000 -2.237354755e+000 - 395 -2.269257784e+000 -2.105870247e+000 - 396 -2.033814192e+000 -1.854928136e+000 - 397 1.309491158e+000 1.676399708e+000 - 398 8.994039893e-001 1.813828945e+000 - 399 -2.627433062e+000 -3.613967299e-001 - 400 -4.445384741e-001 1.953513384e+000 - 401 2.041235209e+000 -1.912265301e+000 - 402 1.805109262e+000 -1.659862876e+000 - 403 2.322299480e+000 -2.081722260e+000 - 404 2.171526551e-001 -3.343325377e+000 - 405 -2.288845301e+000 2.446666241e+000 - 406 1.344710827e+000 2.453789234e+000 - 407 8.563599586e-001 -2.494704008e+000 - 408 2.057580948e+000 4.439288080e-001 - 409 1.890890241e+000 1.789863259e-001 - 410 9.150645733e-001 3.653141737e+000 - 411 1.847894043e-001 3.761468172e+000 - 412 -2.739591360e+000 -1.700711012e+000 - 413 -1.615324855e+000 -3.415314913e+000 - 414 -1.853810102e-001 -3.773497105e+000 - 415 5.543537140e-001 -3.737156391e+000 - 416 -2.799348593e+000 2.537183523e+000 - 417 -2.250580311e+000 3.034557104e+000 - 418 2.799348116e+000 -2.537182808e+000 - 419 3.773497581e+000 -1.853807569e-001 - 420 -7.328859568e-001 -1.599589825e+000 - 421 -7.119497657e-001 -2.020030499e+000 - 422 -3.499574959e-001 -2.145141363e+000 - 423 -2.987504601e-001 -2.451187849e+000 - 424 6.258738041e-002 1.682175279e+000 - 425 -2.400855124e-001 1.726058722e+000 - 426 -9.144658595e-002 -1.852104783e+000 - 427 -3.376768112e+000 -1.270014405e+000 - 428 -3.336169004e+000 -1.606253505e+000 - 429 -1.395959616e+000 -1.652756929e+000 - 430 -1.342138886e+000 -1.979661345e+000 - 431 -1.703805089e+000 -1.575860500e+000 - 432 2.974684477e+000 -1.400614262e+000 - 433 3.193800449e+000 7.616605163e-001 - 434 2.816419840e+000 5.530529618e-001 - 435 2.788050413e+000 1.196088672e+000 - 436 2.592262030e+000 9.117901325e-001 - 437 2.255531549e+000 9.668611884e-001 - 438 -1.365136862e+000 -9.572597742e-001 - 439 -1.700956583e+000 -1.197658539e+000 - 440 -3.198822021e+000 -7.583309412e-001 - 441 -2.790224314e+000 -1.175613284e+000 - 442 -2.268485308e+000 -1.441126585e+000 - 443 -3.639994383e+000 -5.459350944e-001 - 444 1.492241025e+000 3.189296722e+000 - 445 -5.494071841e-001 3.633444071e+000 - 446 1.636843085e+000 2.806655169e+000 - 447 -1.300699234e+000 2.017009735e+000 - 448 -1.680311203e+000 2.014951468e+000 - 449 3.640089035e+000 5.464392900e-001 - 450 -7.381911874e-001 3.178418636e+000 - 451 -2.825227737e+000 7.285814881e-001 - 452 -5.531634092e-001 -3.729119778e+000 - 453 -1.138005406e-001 -3.185384512e+000 - 454 -6.725144982e-001 -2.803108454e+000 - 455 -1.270050049e+000 -3.549548626e+000 - 456 -1.401216388e+000 -2.862903357e+000 - 457 -1.271637917e+000 -2.536698818e+000 - 458 -9.344893098e-001 -2.504125595e+000 - 459 -1.266375422e+000 3.539283752e+000 - 460 -3.328641653e-001 2.872636318e+000 - 461 2.383713275e-001 2.736393213e+000 - 462 2.057268173e-001 2.130768538e+000 - 463 1.954128742e+000 2.231183767e+000 - 464 -1.932220936e+000 3.223715305e+000 - 465 -1.438738108e+000 2.620964289e+000 - 466 -2.552127838e+000 2.857679427e-001 - 467 -2.512792587e+000 6.129661798e-001 - 468 2.618040144e-001 -2.731524229e+000 - 469 -1.289966345e+000 1.238939047e+000 - 470 2.104624510e+000 -1.336523414e+000 - 471 3.015799999e+000 -8.568222821e-002 - 472 2.474778652e+000 3.020138741e-001 - 473 3.419587314e-001 -2.323152065e+000 - 474 1.592334032e+000 -1.067747355e+000 - 475 -2.006290913e+000 1.376395822e-001 - 476 -2.083258867e+000 6.700214744e-001 - 477 -2.308430195e+000 -9.133139253e-001 - 478 2.530686855e+000 -2.792183876e+000 - 479 2.327801943e+000 -7.182292938e-001 - 480 3.727590322e+000 -5.529367924e-001 - 481 2.509271622e+000 -1.507989168e+000 - 482 2.882459879e+000 -1.028465748e+000 - 483 2.497729301e+000 -6.647366285e-002 - 484 -3.121409416e+000 7.763905078e-002 - 485 -1.935736179e+000 -3.229578972e+000 - 486 6.211910248e-001 1.650576353e+000 - 487 1.141981483e+000 2.072351694e+000 - 488 -2.880897045e+000 -5.861865282e-001 - 489 -7.256386280e-001 2.074265957e+000 - 490 -9.974195361e-001 -2.022291183e+000 - 491 2.444075942e-001 -1.823443890e+000 - 492 2.123134136e+000 1.224720359e+000 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 106 107 260 - 2 3 3 158 195 234 - 3 3 3 104 239 103 - 4 3 3 188 159 201 - 5 3 3 413 240 485 - 6 3 3 152 159 188 - 7 3 3 413 108 109 - 8 3 3 185 164 200 - 9 3 3 429 247 249 - 10 3 3 46 233 47 - 11 3 3 306 260 218 - 12 3 3 149 166 186 - 13 3 3 151 158 187 - 14 3 3 455 109 110 - 15 3 3 184 148 185 - 16 3 3 228 55 54 - 17 3 3 256 99 100 - 18 3 3 230 62 61 - 19 3 3 283 103 239 - 20 3 3 153 190 160 - 21 3 3 221 194 33 - 22 3 3 103 283 102 - 23 3 3 445 192 327 - 24 3 3 157 184 232 - 25 3 3 44 216 45 - 26 3 3 184 231 232 - 27 3 3 189 162 202 - 28 3 3 32 31 221 - 29 3 3 178 391 393 - 30 3 3 156 162 189 - 31 3 3 43 216 44 - 32 3 3 157 148 184 - 33 3 3 265 124 125 - 34 3 3 42 216 43 - 35 3 3 114 415 284 - 36 3 3 42 200 174 - 37 3 3 210 48 233 - 38 3 3 47 233 48 - 39 3 3 170 197 58 - 40 3 3 168 210 150 - 41 3 3 110 111 275 - 42 3 3 113 114 284 - 43 3 3 232 36 35 - 44 3 3 146 165 158 - 45 3 3 214 213 17 - 46 3 3 37 231 38 - 47 3 3 138 149 420 - 48 3 3 36 232 231 - 49 3 3 318 361 475 - 50 3 3 37 36 231 - 51 3 3 171 198 1 - 52 3 3 42 174 216 - 53 3 3 267 435 436 - 54 3 3 166 138 150 - 55 3 3 159 140 258 - 56 3 3 39 185 200 - 57 3 3 231 39 38 - 58 3 3 215 6 172 - 59 3 3 131 366 364 - 60 3 3 45 186 233 - 61 3 3 148 164 185 - 62 3 3 222 23 173 - 63 3 3 196 53 52 - 64 3 3 97 273 367 - 65 3 3 197 60 59 - 66 3 3 362 367 226 - 67 3 3 273 226 367 - 68 3 3 153 160 141 - 69 3 3 262 223 355 - 70 3 3 447 211 280 - 71 3 3 486 144 398 - 72 3 3 92 93 261 - 73 3 3 234 26 187 - 74 3 3 30 29 195 - 75 3 3 99 256 443 - 76 3 3 154 161 142 - 77 3 3 198 3 2 - 78 3 3 405 244 286 - 79 3 3 438 148 269 - 80 3 3 287 243 416 - 81 3 3 89 90 416 - 82 3 3 235 212 358 - 83 3 3 30 195 221 - 84 3 3 416 286 89 - 85 3 3 46 45 233 - 86 3 3 88 89 286 - 87 3 3 88 417 87 - 88 3 3 165 146 369 - 89 3 3 188 20 19 - 90 3 3 249 174 164 - 91 3 3 29 28 234 - 92 3 3 214 155 169 - 93 3 3 148 157 137 - 94 3 3 251 349 350 - 95 3 3 25 24 222 - 96 3 3 41 40 200 - 97 3 3 52 236 196 - 98 3 3 26 234 27 - 99 3 3 173 23 201 - 100 3 3 139 338 364 - 101 3 3 21 201 22 - 102 3 3 203 443 440 - 103 3 3 18 213 19 - 104 3 3 151 139 158 - 105 3 3 118 119 356 - 106 3 3 23 222 24 - 107 3 3 258 469 151 - 108 3 3 25 222 26 - 109 3 3 361 318 399 - 110 3 3 254 83 84 - 111 3 3 213 18 17 - 112 3 3 20 188 201 - 113 3 3 214 17 16 - 114 3 3 85 86 274 - 115 3 3 213 214 169 - 116 3 3 426 150 138 - 117 3 3 438 269 439 - 118 3 3 84 85 459 - 119 3 3 169 424 152 - 120 3 3 188 213 152 - 121 3 3 269 148 137 - 122 3 3 27 234 28 - 123 3 3 172 235 156 - 124 3 3 138 166 149 - 125 3 3 125 126 357 - 126 3 3 154 191 161 - 127 3 3 422 138 421 - 128 3 3 150 426 491 - 129 3 3 352 353 252 - 130 3 3 210 236 49 - 131 3 3 48 210 49 - 132 3 3 177 14 13 - 133 3 3 51 50 236 - 134 3 3 359 397 358 - 135 3 3 348 349 251 - 136 3 3 170 190 153 - 137 3 3 190 227 228 - 138 3 3 263 370 117 - 139 3 3 242 415 285 - 140 3 3 263 117 118 - 141 3 3 365 158 139 - 142 3 3 57 56 227 - 143 3 3 486 398 143 - 144 3 3 228 227 55 - 145 3 3 348 347 153 - 146 3 3 34 194 232 - 147 3 3 8 215 9 - 148 3 3 227 58 57 - 149 3 3 462 424 143 - 150 3 3 229 230 191 - 151 3 3 191 154 171 - 152 3 3 22 201 23 - 153 3 3 227 56 55 - 154 3 3 174 249 149 - 155 3 3 118 356 263 - 156 3 3 70 312 69 - 157 3 3 228 53 196 - 158 3 3 419 128 65 - 159 3 3 356 264 224 - 160 3 3 418 121 122 - 161 3 3 381 402 251 - 162 3 3 418 245 478 - 163 3 3 372 124 265 - 164 3 3 336 338 211 - 165 3 3 265 125 357 - 166 3 3 415 114 115 - 167 3 3 345 346 141 - 168 3 3 288 245 418 - 169 3 3 300 450 254 - 170 3 3 331 133 407 - 171 3 3 266 225 357 - 172 3 3 457 178 456 - 173 3 3 424 425 152 - 174 3 3 154 352 351 - 175 3 3 419 246 480 - 176 3 3 230 60 197 - 177 3 3 63 229 64 - 178 3 3 202 13 12 - 179 3 3 67 257 449 - 180 3 3 104 282 239 - 181 3 3 147 438 439 - 182 3 3 419 289 246 - 183 3 3 162 155 177 - 184 3 3 68 257 67 - 185 3 3 306 105 106 - 186 3 3 296 204 295 - 187 3 3 380 483 252 - 188 3 3 68 69 314 - 189 3 3 189 10 9 - 190 3 3 112 113 414 - 191 3 3 202 10 189 - 192 3 3 157 165 369 - 193 3 3 486 162 144 - 194 3 3 219 308 279 - 195 3 3 156 189 215 - 196 3 3 8 7 215 - 197 3 3 4 199 5 - 198 3 3 261 371 92 - 199 3 3 144 162 156 - 200 3 3 94 355 93 - 201 3 3 145 163 351 - 202 3 3 6 215 7 - 203 3 3 192 301 460 - 204 3 3 252 353 354 - 205 3 3 445 83 254 - 206 3 3 214 14 177 - 207 3 3 202 177 13 - 208 3 3 194 34 33 - 209 3 3 159 152 140 - 210 3 3 400 489 140 - 211 3 3 228 160 190 - 212 3 3 322 323 193 - 213 3 3 12 11 202 - 214 3 3 80 277 79 - 215 3 3 41 200 42 - 216 3 3 345 168 150 - 217 3 3 198 199 4 - 218 3 3 142 161 347 - 219 3 3 229 1 64 - 220 3 3 100 427 256 - 221 3 3 253 71 72 - 222 3 3 313 220 312 - 223 3 3 63 62 230 - 224 3 3 255 75 76 - 225 3 3 81 411 80 - 226 3 3 4 3 198 - 227 3 3 147 429 249 - 228 3 3 313 71 253 - 229 3 3 149 186 216 - 230 3 3 377 379 482 - 231 3 3 63 230 229 - 232 3 3 151 187 222 - 233 3 3 230 161 191 - 234 3 3 79 410 78 - 235 3 3 424 169 155 - 236 3 3 411 277 80 - 237 3 3 347 170 153 - 238 3 3 444 76 77 - 239 3 3 235 163 145 - 240 3 3 253 309 310 - 241 3 3 199 198 163 - 242 3 3 276 444 77 - 243 3 3 199 6 5 - 244 3 3 74 307 73 - 245 3 3 73 309 72 - 246 3 3 351 171 154 - 247 3 3 258 173 159 - 248 3 3 358 156 235 - 249 3 3 141 160 345 - 250 3 3 214 16 15 - 251 3 3 238 411 278 - 252 3 3 283 428 102 - 253 3 3 433 209 449 - 254 3 3 337 383 293 - 255 3 3 450 301 192 - 256 3 3 277 384 237 - 257 3 3 78 410 276 - 258 3 3 324 304 323 - 259 3 3 221 33 32 - 260 3 3 165 157 194 - 261 3 3 158 165 195 - 262 3 3 195 165 221 - 263 3 3 236 52 51 - 264 3 3 345 196 168 - 265 3 3 58 197 59 - 266 3 3 347 197 170 - 267 3 3 1 198 2 - 268 3 3 351 198 171 - 269 3 3 163 172 199 - 270 3 3 6 199 172 - 271 3 3 200 40 39 - 272 3 3 174 200 164 - 273 3 3 201 21 20 - 274 3 3 173 201 159 - 275 3 3 202 11 10 - 276 3 3 177 202 162 - 277 3 3 387 399 318 - 278 3 3 262 292 223 - 279 3 3 414 241 452 - 280 3 3 457 456 298 - 281 3 3 93 355 261 - 282 3 3 205 335 334 - 283 3 3 464 417 244 - 284 3 3 211 448 336 - 285 3 3 407 330 331 - 286 3 3 284 404 241 - 287 3 3 208 481 339 - 288 3 3 181 374 375 - 289 3 3 342 209 343 - 290 3 3 182 376 378 - 291 3 3 150 210 166 - 292 3 3 210 168 236 - 293 3 3 211 258 280 - 294 3 3 336 335 131 - 295 3 3 212 235 290 - 296 3 3 311 183 310 - 297 3 3 152 213 169 - 298 3 3 19 213 188 - 299 3 3 14 214 15 - 300 3 3 155 214 177 - 301 3 3 156 215 172 - 302 3 3 9 215 189 - 303 3 3 149 216 174 - 304 3 3 45 216 186 - 305 3 3 396 442 176 - 306 3 3 203 386 443 - 307 3 3 218 391 392 - 308 3 3 239 282 395 - 309 3 3 255 308 75 - 310 3 3 310 219 463 - 311 3 3 435 267 220 - 312 3 3 209 342 449 - 313 3 3 221 31 30 - 314 3 3 194 221 165 - 315 3 3 151 222 173 - 316 3 3 26 222 187 - 317 3 3 262 94 95 - 318 3 3 451 223 292 - 319 3 3 264 119 120 - 320 3 3 331 332 133 - 321 3 3 266 126 127 - 322 3 3 377 482 376 - 323 3 3 273 97 98 - 324 3 3 484 387 389 - 325 3 3 190 170 227 - 326 3 3 58 227 170 - 327 3 3 53 228 54 - 328 3 3 160 228 196 - 329 3 3 191 171 229 - 330 3 3 1 229 171 - 331 3 3 60 230 61 - 332 3 3 161 230 197 - 333 3 3 184 185 231 - 334 3 3 39 231 185 - 335 3 3 34 232 35 - 336 3 3 157 232 194 - 337 3 3 186 166 233 - 338 3 3 210 233 166 - 339 3 3 158 234 187 - 340 3 3 29 234 195 - 341 3 3 163 235 172 - 342 3 3 290 235 145 - 343 3 3 236 50 49 - 344 3 3 196 236 168 - 345 3 3 444 322 193 - 346 3 3 78 276 77 - 347 3 3 278 81 82 - 348 3 3 238 278 327 - 349 3 3 104 105 282 - 350 3 3 412 239 176 - 351 3 3 455 275 297 - 352 3 3 297 298 456 - 353 3 3 453 295 241 - 354 3 3 295 204 275 - 355 3 3 285 115 116 - 356 3 3 242 285 329 - 357 3 3 287 90 91 - 358 3 3 334 243 287 - 359 3 3 180 448 317 - 360 3 3 316 206 274 - 361 3 3 288 122 123 - 362 3 3 339 245 288 - 363 3 3 289 65 66 - 364 3 3 342 246 289 - 365 3 3 259 429 431 - 366 3 3 420 421 138 - 367 3 3 461 175 328 - 368 3 3 400 248 305 - 369 3 3 147 249 164 - 370 3 3 249 247 420 - 371 3 3 423 296 319 - 372 3 3 473 319 468 - 373 3 3 382 332 381 - 374 3 3 402 381 401 - 375 3 3 377 479 134 - 376 3 3 380 252 479 - 377 3 3 73 307 309 - 378 3 3 313 315 220 - 379 3 3 459 274 300 - 380 3 3 300 291 450 - 381 3 3 255 444 446 - 382 3 3 308 219 307 - 383 3 3 427 100 101 - 384 3 3 427 271 440 - 385 3 3 314 69 312 - 386 3 3 314 267 433 - 387 3 3 211 338 469 - 388 3 3 173 258 151 - 389 3 3 392 395 218 - 390 3 3 259 392 394 - 391 3 3 107 108 485 - 392 3 3 391 218 260 - 393 3 3 383 261 223 - 394 3 3 205 287 371 - 395 3 3 95 96 367 - 396 3 3 368 292 362 - 397 3 3 363 263 224 - 398 3 3 329 370 207 - 399 3 3 120 121 478 - 400 3 3 374 224 264 - 401 3 3 225 432 265 - 402 3 3 339 372 208 - 403 3 3 127 128 480 - 404 3 3 376 225 266 - 405 3 3 315 268 435 - 406 3 3 209 433 434 - 407 3 3 385 183 311 - 408 3 3 290 437 492 - 409 3 3 137 360 269 - 410 3 3 271 441 477 - 411 3 3 270 439 373 - 412 3 3 442 396 270 - 413 3 3 441 271 217 - 414 3 3 129 399 488 - 415 3 3 441 412 272 - 416 3 3 269 360 373 - 417 3 3 98 99 443 - 418 3 3 273 443 386 - 419 3 3 86 87 464 - 420 3 3 300 274 206 - 421 3 3 111 112 452 - 422 3 3 297 275 204 - 423 3 3 322 276 237 - 424 3 3 444 193 446 - 425 3 3 384 277 238 - 426 3 3 410 277 237 - 427 3 3 82 83 445 - 428 3 3 278 445 327 - 429 3 3 279 446 406 - 430 3 3 135 311 463 - 431 3 3 140 280 258 - 432 3 3 132 281 447 - 433 3 3 388 132 301 - 434 3 3 316 317 465 - 435 3 3 306 282 105 - 436 3 3 395 282 218 - 437 3 3 412 283 239 - 438 3 3 217 427 428 - 439 3 3 404 284 242 - 440 3 3 414 284 241 - 441 3 3 116 117 370 - 442 3 3 285 370 329 - 443 3 3 405 286 243 - 444 3 3 417 286 244 - 445 3 3 91 92 371 - 446 3 3 334 287 205 - 447 3 3 123 124 372 - 448 3 3 288 372 339 - 449 3 3 66 67 449 - 450 3 3 289 449 342 - 451 3 3 408 290 145 - 452 3 3 136 436 437 - 453 3 3 388 291 206 - 454 3 3 291 388 301 - 455 3 3 362 292 262 - 456 3 3 451 292 167 - 457 3 3 467 451 167 - 458 3 3 335 337 131 - 459 3 3 466 167 389 - 460 3 3 365 139 364 - 461 3 3 275 111 452 - 462 3 3 296 453 179 - 463 3 3 319 296 179 - 464 3 3 454 204 296 - 465 3 3 297 204 298 - 466 3 3 240 413 455 - 467 3 3 454 298 204 - 468 3 3 490 458 421 - 469 3 3 299 457 458 - 470 3 3 247 429 430 - 471 3 3 291 300 206 - 472 3 3 459 254 84 - 473 3 3 132 305 301 - 474 3 3 238 327 328 - 475 3 3 321 301 305 - 476 3 3 462 143 326 - 477 3 3 321 305 248 - 478 3 3 326 304 324 - 479 3 3 398 144 397 - 480 3 3 406 135 279 - 481 3 3 132 280 489 - 482 3 3 462 321 248 - 483 3 3 260 306 106 - 484 3 3 282 306 218 - 485 3 3 74 75 308 - 486 3 3 309 307 219 - 487 3 3 308 307 74 - 488 3 3 308 255 446 - 489 3 3 310 309 219 - 490 3 3 72 309 253 - 491 3 3 219 279 463 - 492 3 3 253 310 183 - 493 3 3 212 359 358 - 494 3 3 183 385 268 - 495 3 3 70 71 313 - 496 3 3 314 312 220 - 497 3 3 313 312 70 - 498 3 3 315 253 183 - 499 3 3 267 314 220 - 500 3 3 68 314 257 - 501 3 3 253 315 313 - 502 3 3 268 315 183 - 503 3 3 274 86 464 - 504 3 3 317 316 244 - 505 3 3 180 317 244 - 506 3 3 465 317 281 - 507 3 3 389 368 484 - 508 3 3 129 360 361 - 509 3 3 468 319 179 - 510 3 3 250 422 423 - 511 3 3 242 329 333 - 512 3 3 350 346 133 - 513 3 3 461 321 303 - 514 3 3 321 302 460 - 515 3 3 325 237 384 - 516 3 3 323 304 406 - 517 3 3 237 325 322 - 518 3 3 175 461 324 - 519 3 3 324 323 325 - 520 3 3 303 462 326 - 521 3 3 324 325 175 - 522 3 3 323 322 325 - 523 3 3 303 326 324 - 524 3 3 398 326 143 - 525 3 3 460 327 192 - 526 3 3 328 175 384 - 527 3 3 327 302 328 - 528 3 3 461 328 302 - 529 3 3 207 330 329 - 530 3 3 329 330 333 - 531 3 3 330 207 331 - 532 3 3 320 468 333 - 533 3 3 207 363 331 - 534 3 3 224 374 332 - 535 3 3 332 331 363 - 536 3 3 381 332 181 - 537 3 3 320 333 330 - 538 3 3 333 179 404 - 539 3 3 205 337 335 - 540 3 3 243 334 390 - 541 3 3 338 131 364 - 542 3 3 390 334 335 - 543 3 3 211 447 448 - 544 3 3 390 336 180 - 545 3 3 383 337 205 - 546 3 3 337 293 366 - 547 3 3 131 338 336 - 548 3 3 139 151 469 - 549 3 3 208 379 481 - 550 3 3 245 339 403 - 551 3 3 134 354 470 - 552 3 3 340 401 403 - 553 3 3 341 470 354 - 554 3 3 347 348 474 - 555 3 3 209 434 343 - 556 3 3 246 342 471 - 557 3 3 136 408 472 - 558 3 3 471 342 343 - 559 3 3 408 136 290 - 560 3 3 351 352 409 - 561 3 3 345 160 196 - 562 3 3 491 346 345 - 563 3 3 250 473 346 - 564 3 3 473 407 346 - 565 3 3 347 161 197 - 566 3 3 349 153 141 - 567 3 3 251 341 348 - 568 3 3 474 348 341 - 569 3 3 153 349 348 - 570 3 3 350 349 141 - 571 3 3 346 350 141 - 572 3 3 350 133 382 - 573 3 3 351 163 198 - 574 3 3 353 154 142 - 575 3 3 252 344 352 - 576 3 3 344 408 409 - 577 3 3 154 353 352 - 578 3 3 354 353 142 - 579 3 3 354 142 474 - 580 3 3 354 134 479 - 581 3 3 262 355 94 - 582 3 3 261 355 223 - 583 3 3 264 356 119 - 584 3 3 263 356 224 - 585 3 3 266 357 126 - 586 3 3 265 357 225 - 587 3 3 385 359 212 - 588 3 3 156 358 144 - 589 3 3 311 135 359 - 590 3 3 397 359 135 - 591 3 3 360 137 361 - 592 3 3 373 477 272 - 593 3 3 157 369 137 - 594 3 3 475 146 365 - 595 3 3 362 262 95 - 596 3 3 368 362 226 - 597 3 3 263 363 207 - 598 3 3 332 363 224 - 599 3 3 131 337 366 - 600 3 3 365 146 158 - 601 3 3 476 364 366 - 602 3 3 475 365 294 - 603 3 3 467 366 293 - 604 3 3 365 476 294 - 605 3 3 95 367 362 - 606 3 3 97 367 96 - 607 3 3 226 273 386 - 608 3 3 292 368 167 - 609 3 3 475 369 146 - 610 3 3 361 137 369 - 611 3 3 207 370 263 - 612 3 3 116 370 285 - 613 3 3 205 371 261 - 614 3 3 91 371 287 - 615 3 3 208 372 265 - 616 3 3 123 372 288 - 617 3 3 477 360 129 - 618 3 3 442 373 272 - 619 3 3 375 374 264 - 620 3 3 332 374 181 - 621 3 3 264 120 478 - 622 3 3 375 245 403 - 623 3 3 378 376 266 - 624 3 3 377 376 182 - 625 3 3 377 182 380 - 626 3 3 377 134 379 - 627 3 3 266 127 480 - 628 3 3 182 378 246 - 629 3 3 134 470 481 - 630 3 3 379 208 432 - 631 3 3 471 380 182 - 632 3 3 483 343 472 - 633 3 3 401 381 181 - 634 3 3 382 381 251 - 635 3 3 350 382 251 - 636 3 3 332 382 133 - 637 3 3 261 383 205 - 638 3 3 293 383 223 - 639 3 3 328 384 238 - 640 3 3 384 175 325 - 641 3 3 359 385 311 - 642 3 3 492 385 212 - 643 3 3 387 386 203 - 644 3 3 226 386 484 - 645 3 3 440 488 203 - 646 3 3 387 318 389 - 647 3 3 465 388 206 - 648 3 3 281 132 388 - 649 3 3 466 389 318 - 650 3 3 368 389 167 - 651 3 3 336 390 335 - 652 3 3 390 180 405 - 653 3 3 393 391 260 - 654 3 3 178 394 392 - 655 3 3 178 392 391 - 656 3 3 395 396 176 - 657 3 3 260 107 485 - 658 3 3 393 240 456 - 659 3 3 457 394 178 - 660 3 3 430 394 299 - 661 3 3 396 392 259 - 662 3 3 239 395 176 - 663 3 3 392 396 395 - 664 3 3 396 259 431 - 665 3 3 487 304 326 - 666 3 3 358 397 144 - 667 3 3 487 397 135 - 668 3 3 398 487 326 - 669 3 3 387 203 488 - 670 3 3 361 399 129 - 671 3 3 305 132 489 - 672 3 3 425 140 152 - 673 3 3 403 401 181 - 674 3 3 340 470 402 - 675 3 3 340 402 401 - 676 3 3 251 402 341 - 677 3 3 403 181 375 - 678 3 3 340 403 339 - 679 3 3 333 404 242 - 680 3 3 404 179 453 - 681 3 3 390 405 243 - 682 3 3 244 405 180 - 683 3 3 323 406 193 - 684 3 3 406 304 487 - 685 3 3 346 407 133 - 686 3 3 330 407 320 - 687 3 3 409 408 145 - 688 3 3 408 344 472 - 689 3 3 351 409 145 - 690 3 3 344 409 352 - 691 3 3 277 410 79 - 692 3 3 276 410 237 - 693 3 3 278 411 81 - 694 3 3 277 411 238 - 695 3 3 412 176 442 - 696 3 3 283 412 217 - 697 3 3 413 109 455 - 698 3 3 485 240 393 - 699 3 3 284 414 113 - 700 3 3 452 241 295 - 701 3 3 285 415 115 - 702 3 3 284 415 242 - 703 3 3 287 416 90 - 704 3 3 286 416 243 - 705 3 3 286 417 88 - 706 3 3 464 244 316 - 707 3 3 288 418 122 - 708 3 3 478 245 375 - 709 3 3 289 419 65 - 710 3 3 480 246 378 - 711 3 3 249 420 149 - 712 3 3 421 420 247 - 713 3 3 490 421 247 - 714 3 3 421 130 422 - 715 3 3 423 422 130 - 716 3 3 422 250 426 - 717 3 3 423 130 454 - 718 3 3 250 423 319 - 719 3 3 143 424 155 - 720 3 3 425 248 400 - 721 3 3 248 425 424 - 722 3 3 140 425 400 - 723 3 3 422 426 138 - 724 3 3 491 250 346 - 725 3 3 101 102 428 - 726 3 3 271 427 217 - 727 3 3 217 428 283 - 728 3 3 101 428 427 - 729 3 3 147 439 431 - 730 3 3 259 394 430 - 731 3 3 430 299 490 - 732 3 3 259 430 429 - 733 3 3 147 431 429 - 734 3 3 396 431 270 - 735 3 3 432 225 482 - 736 3 3 208 265 432 - 737 3 3 314 433 257 - 738 3 3 434 433 267 - 739 3 3 436 434 267 - 740 3 3 434 136 472 - 741 3 3 315 435 220 - 742 3 3 436 435 268 - 743 3 3 437 436 268 - 744 3 3 436 136 434 - 745 3 3 268 385 492 - 746 3 3 136 437 290 - 747 3 3 147 164 438 - 748 3 3 148 438 164 - 749 3 3 373 439 269 - 750 3 3 431 439 270 - 751 3 3 427 440 256 - 752 3 3 488 440 271 - 753 3 3 412 441 217 - 754 3 3 441 272 477 - 755 3 3 373 442 270 - 756 3 3 412 442 272 - 757 3 3 443 256 440 - 758 3 3 98 443 273 - 759 3 3 76 444 255 - 760 3 3 322 444 276 - 761 3 3 445 254 450 - 762 3 3 82 445 278 - 763 3 3 406 446 193 - 764 3 3 308 446 279 - 765 3 3 132 447 280 - 766 3 3 447 281 448 - 767 3 3 317 448 281 - 768 3 3 180 336 448 - 769 3 3 449 257 433 - 770 3 3 66 449 289 - 771 3 3 301 450 291 - 772 3 3 445 450 192 - 773 3 3 167 466 467 - 774 3 3 223 451 293 - 775 3 3 414 452 112 - 776 3 3 275 452 295 - 777 3 3 295 453 296 - 778 3 3 404 453 241 - 779 3 3 423 454 296 - 780 3 3 454 130 458 - 781 3 3 275 455 110 - 782 3 3 455 297 240 - 783 3 3 393 456 178 - 784 3 3 297 456 240 - 785 3 3 458 457 298 - 786 3 3 394 457 299 - 787 3 3 454 458 298 - 788 3 3 421 458 130 - 789 3 3 274 459 85 - 790 3 3 254 459 300 - 791 3 3 321 460 301 - 792 3 3 327 460 302 - 793 3 3 321 461 302 - 794 3 3 324 461 303 - 795 3 3 321 462 303 - 796 3 3 424 462 248 - 797 3 3 135 463 279 - 798 3 3 310 463 311 - 799 3 3 417 464 87 - 800 3 3 274 464 316 - 801 3 3 388 465 281 - 802 3 3 316 465 206 - 803 3 3 475 466 318 - 804 3 3 466 294 467 - 805 3 3 467 294 476 - 806 3 3 451 467 293 - 807 3 3 333 468 179 - 808 3 3 468 320 473 - 809 3 3 211 469 258 - 810 3 3 139 469 338 - 811 3 3 402 470 341 - 812 3 3 470 340 481 - 813 3 3 471 343 483 - 814 3 3 246 471 182 - 815 3 3 483 472 344 - 816 3 3 434 472 343 - 817 3 3 473 250 319 - 818 3 3 407 473 320 - 819 3 3 354 474 341 - 820 3 3 347 474 142 - 821 3 3 475 294 466 - 822 3 3 369 475 361 - 823 3 3 364 476 365 - 824 3 3 467 476 366 - 825 3 3 360 477 373 - 826 3 3 477 129 271 - 827 3 3 418 478 121 - 828 3 3 264 478 375 - 829 3 3 380 479 377 - 830 3 3 354 479 252 - 831 3 3 419 480 128 - 832 3 3 266 480 378 - 833 3 3 481 379 134 - 834 3 3 339 481 340 - 835 3 3 432 482 379 - 836 3 3 376 482 225 - 837 3 3 252 483 344 - 838 3 3 471 483 380 - 839 3 3 226 484 368 - 840 3 3 387 484 386 - 841 3 3 413 485 108 - 842 3 3 260 485 393 - 843 3 3 143 155 486 - 844 3 3 162 486 155 - 845 3 3 397 487 398 - 846 3 3 406 487 135 - 847 3 3 129 488 271 - 848 3 3 387 488 399 - 849 3 3 140 489 280 - 850 3 3 305 489 400 - 851 3 3 430 490 247 - 852 3 3 458 490 299 - 853 3 3 150 491 345 - 854 3 3 250 491 426 - 855 3 3 290 492 212 - 856 3 3 268 492 437 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 856 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 729 730 - 731 732 733 734 735 736 737 738 739 740 - 741 742 743 744 745 746 747 748 749 750 - 751 752 753 754 755 756 757 758 759 760 - 761 762 763 764 765 766 767 768 769 770 - 771 772 773 774 775 776 777 778 779 780 - 781 782 783 784 785 786 787 788 789 790 - 791 792 793 794 795 796 797 798 799 800 - 801 802 803 804 805 806 807 808 809 810 - 811 812 813 814 815 816 817 818 819 820 - 821 822 823 824 825 826 827 828 829 830 - 831 832 833 834 835 836 837 838 839 840 - 841 842 843 844 845 846 847 848 849 850 - 851 852 853 854 855 856 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Inflow 1 64 0 0 - 1 3 1 - 3 3 3 - 7 3 2 - 14 3 2 - 17 3 2 - 22 3 3 - 33 3 2 - 41 3 1 - 42 3 1 - 72 3 1 - 81 3 1 - 86 3 1 - 87 3 3 - 105 3 1 - 110 3 2 - 114 3 1 - 118 3 1 - 125 3 1 - 140 3 2 - 156 3 3 - 158 3 2 - 160 3 2 - 166 3 2 - 184 3 3 - 185 3 2 - 188 3 1 - 190 3 1 - 200 3 3 - 214 3 3 - 221 3 2 - 224 3 2 - 225 3 3 - 234 3 3 - 238 3 2 - 244 3 3 - 245 3 3 - 317 3 2 - 319 3 2 - 321 3 2 - 323 3 2 - 346 3 3 - 347 3 2 - 349 3 1 - 355 3 2 - 357 3 2 - 361 3 2 - 363 3 2 - 383 3 2 - 391 3 1 - 395 3 1 - 399 3 1 - 403 3 1 - 417 3 1 - 419 3 1 - 421 3 1 - 427 3 1 - 441 3 1 - 445 3 1 - 447 3 1 - 449 3 1 - 485 3 1 - 495 3 1 - 606 3 3 - 725 3 1 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Outflow 1 64 0 0 - 10 3 3 - 16 3 2 - 18 3 2 - 25 3 3 - 28 3 1 - 31 3 3 - 34 3 3 - 38 3 3 - 43 3 2 - 46 3 3 - 50 3 1 - 57 3 2 - 63 3 2 - 65 3 2 - 74 3 1 - 77 3 2 - 85 3 1 - 89 3 2 - 91 3 1 - 95 3 1 - 96 3 1 - 98 3 3 - 101 3 3 - 103 3 3 - 106 3 3 - 108 3 3 - 111 3 2 - 113 3 2 - 122 3 3 - 131 3 3 - 132 3 2 - 133 3 1 - 142 3 1 - 147 3 3 - 148 3 2 - 152 3 3 - 153 3 2 - 177 3 3 - 178 3 2 - 189 3 2 - 196 3 1 - 197 3 3 - 202 3 3 - 208 3 2 - 213 3 1 - 215 3 3 - 219 3 2 - 223 3 1 - 226 3 1 - 243 3 2 - 250 3 2 - 259 3 2 - 263 3 2 - 265 3 3 - 267 3 3 - 271 3 2 - 273 3 2 - 275 3 2 - 299 3 3 - 313 3 2 - 327 3 3 - 331 3 3 - 335 3 3 - 343 3 2 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/Euler005.neu b/cpp/nudg++/trunk/Grid/Euler2D/Euler005.neu deleted file mode 100644 index 2a301b5..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/Euler005.neu +++ /dev/null @@ -1,3893 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:54:32 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 1214 2266 1 3 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 6.00000000000e-01 2.00000000000e-01 - 2 3.00000000000e+00 2.00000000000e-01 - 3 6.50000000000e-01 2.00000000000e-01 - 4 7.00000000000e-01 2.00000000000e-01 - 5 7.50000000000e-01 2.00000000000e-01 - 6 8.00000000000e-01 2.00000000000e-01 - 7 8.50000000000e-01 2.00000000000e-01 - 8 9.00000000000e-01 2.00000000000e-01 - 9 9.50000000000e-01 2.00000000000e-01 - 10 1.00000000000e+00 2.00000000000e-01 - 11 1.05000000000e+00 2.00000000000e-01 - 12 1.10000000000e+00 2.00000000000e-01 - 13 1.15000000000e+00 2.00000000000e-01 - 14 1.20000000000e+00 2.00000000000e-01 - 15 1.25000000000e+00 2.00000000000e-01 - 16 1.30000000000e+00 2.00000000000e-01 - 17 1.35000000000e+00 2.00000000000e-01 - 18 1.40000000000e+00 2.00000000000e-01 - 19 1.45000000000e+00 2.00000000000e-01 - 20 1.50000000000e+00 2.00000000000e-01 - 21 1.55000000000e+00 2.00000000000e-01 - 22 1.60000000000e+00 2.00000000000e-01 - 23 1.65000000000e+00 2.00000000000e-01 - 24 1.70000000000e+00 2.00000000000e-01 - 25 1.75000000000e+00 2.00000000000e-01 - 26 1.80000000000e+00 2.00000000000e-01 - 27 1.85000000000e+00 2.00000000000e-01 - 28 1.90000000000e+00 2.00000000000e-01 - 29 1.95000000000e+00 2.00000000000e-01 - 30 2.00000000000e+00 2.00000000000e-01 - 31 2.05000000000e+00 2.00000000000e-01 - 32 2.10000000000e+00 2.00000000000e-01 - 33 2.15000000000e+00 2.00000000000e-01 - 34 2.20000000000e+00 2.00000000000e-01 - 35 2.25000000000e+00 2.00000000000e-01 - 36 2.30000000000e+00 2.00000000000e-01 - 37 2.35000000000e+00 2.00000000000e-01 - 38 2.40000000000e+00 2.00000000000e-01 - 39 2.45000000000e+00 2.00000000000e-01 - 40 2.50000000000e+00 2.00000000000e-01 - 41 2.55000000000e+00 2.00000000000e-01 - 42 2.60000000000e+00 2.00000000000e-01 - 43 2.65000000000e+00 2.00000000000e-01 - 44 2.70000000000e+00 2.00000000000e-01 - 45 2.75000000000e+00 2.00000000000e-01 - 46 2.80000000000e+00 2.00000000000e-01 - 47 2.85000000000e+00 2.00000000000e-01 - 48 2.90000000000e+00 2.00000000000e-01 - 49 2.95000000000e+00 2.00000000000e-01 - 50 3.00000000000e+00 1.00000000000e+00 - 51 3.00000000000e+00 2.50000000000e-01 - 52 3.00000000000e+00 3.00000000000e-01 - 53 3.00000000000e+00 3.50000000000e-01 - 54 3.00000000000e+00 4.00000000000e-01 - 55 3.00000000000e+00 4.50000000000e-01 - 56 3.00000000000e+00 5.00000000000e-01 - 57 3.00000000000e+00 5.50000000000e-01 - 58 3.00000000000e+00 6.00000000000e-01 - 59 3.00000000000e+00 6.50000000000e-01 - 60 3.00000000000e+00 7.00000000000e-01 - 61 3.00000000000e+00 7.50000000000e-01 - 62 3.00000000000e+00 8.00000000000e-01 - 63 3.00000000000e+00 8.50000000000e-01 - 64 3.00000000000e+00 9.00000000000e-01 - 65 3.00000000000e+00 9.50000000000e-01 - 66 0.00000000000e+00 1.00000000000e+00 - 67 2.95000000000e+00 1.00000000000e+00 - 68 2.90000000000e+00 1.00000000000e+00 - 69 2.85000000000e+00 1.00000000000e+00 - 70 2.80000000000e+00 1.00000000000e+00 - 71 2.75000000000e+00 1.00000000000e+00 - 72 2.70000000000e+00 1.00000000000e+00 - 73 2.65000000000e+00 1.00000000000e+00 - 74 2.60000000000e+00 1.00000000000e+00 - 75 2.55000000000e+00 1.00000000000e+00 - 76 2.50000000000e+00 1.00000000000e+00 - 77 2.45000000000e+00 1.00000000000e+00 - 78 2.40000000000e+00 1.00000000000e+00 - 79 2.35000000000e+00 1.00000000000e+00 - 80 2.30000000000e+00 1.00000000000e+00 - 81 2.25000000000e+00 1.00000000000e+00 - 82 2.20000000000e+00 1.00000000000e+00 - 83 2.15000000000e+00 1.00000000000e+00 - 84 2.10000000000e+00 1.00000000000e+00 - 85 2.05000000000e+00 1.00000000000e+00 - 86 2.00000000000e+00 1.00000000000e+00 - 87 1.95000000000e+00 1.00000000000e+00 - 88 1.90000000000e+00 1.00000000000e+00 - 89 1.85000000000e+00 1.00000000000e+00 - 90 1.80000000000e+00 1.00000000000e+00 - 91 1.75000000000e+00 1.00000000000e+00 - 92 1.70000000000e+00 1.00000000000e+00 - 93 1.65000000000e+00 1.00000000000e+00 - 94 1.60000000000e+00 1.00000000000e+00 - 95 1.55000000000e+00 1.00000000000e+00 - 96 1.50000000000e+00 1.00000000000e+00 - 97 1.45000000000e+00 1.00000000000e+00 - 98 1.40000000000e+00 1.00000000000e+00 - 99 1.35000000000e+00 1.00000000000e+00 - 100 1.30000000000e+00 1.00000000000e+00 - 101 1.25000000000e+00 1.00000000000e+00 - 102 1.20000000000e+00 1.00000000000e+00 - 103 1.15000000000e+00 1.00000000000e+00 - 104 1.10000000000e+00 1.00000000000e+00 - 105 1.05000000000e+00 1.00000000000e+00 - 106 1.00000000000e+00 1.00000000000e+00 - 107 9.50000000000e-01 1.00000000000e+00 - 108 9.00000000000e-01 1.00000000000e+00 - 109 8.50000000000e-01 1.00000000000e+00 - 110 8.00000000000e-01 1.00000000000e+00 - 111 7.50000000000e-01 1.00000000000e+00 - 112 7.00000000000e-01 1.00000000000e+00 - 113 6.50000000000e-01 1.00000000000e+00 - 114 6.00000000000e-01 1.00000000000e+00 - 115 5.50000000000e-01 1.00000000000e+00 - 116 5.00000000000e-01 1.00000000000e+00 - 117 4.50000000000e-01 1.00000000000e+00 - 118 4.00000000000e-01 1.00000000000e+00 - 119 3.50000000000e-01 1.00000000000e+00 - 120 3.00000000000e-01 1.00000000000e+00 - 121 2.50000000000e-01 1.00000000000e+00 - 122 2.00000000000e-01 1.00000000000e+00 - 123 1.50000000000e-01 1.00000000000e+00 - 124 1.00000000000e-01 1.00000000000e+00 - 125 5.00000000000e-02 1.00000000000e+00 - 126 0.00000000000e+00 0.00000000000e+00 - 127 0.00000000000e+00 9.50000000000e-01 - 128 0.00000000000e+00 9.00000000000e-01 - 129 0.00000000000e+00 8.50000000000e-01 - 130 0.00000000000e+00 8.00000000000e-01 - 131 0.00000000000e+00 7.50000000000e-01 - 132 0.00000000000e+00 7.00000000000e-01 - 133 0.00000000000e+00 6.50000000000e-01 - 134 0.00000000000e+00 6.00000000000e-01 - 135 0.00000000000e+00 5.50000000000e-01 - 136 0.00000000000e+00 5.00000000000e-01 - 137 0.00000000000e+00 4.50000000000e-01 - 138 0.00000000000e+00 4.00000000000e-01 - 139 0.00000000000e+00 3.50000000000e-01 - 140 0.00000000000e+00 3.00000000000e-01 - 141 0.00000000000e+00 2.50000000000e-01 - 142 0.00000000000e+00 2.00000000000e-01 - 143 0.00000000000e+00 1.50000000000e-01 - 144 0.00000000000e+00 1.00000000000e-01 - 145 0.00000000000e+00 5.00000000000e-02 - 146 6.00000000000e-01 0.00000000000e+00 - 147 5.00000000000e-02 0.00000000000e+00 - 148 1.00000000000e-01 0.00000000000e+00 - 149 1.50000000000e-01 0.00000000000e+00 - 150 2.00000000000e-01 0.00000000000e+00 - 151 2.50000000000e-01 0.00000000000e+00 - 152 3.00000000000e-01 0.00000000000e+00 - 153 3.50000000000e-01 0.00000000000e+00 - 154 4.00000000000e-01 0.00000000000e+00 - 155 4.50000000000e-01 0.00000000000e+00 - 156 5.00000000000e-01 0.00000000000e+00 - 157 5.50000000000e-01 0.00000000000e+00 - 158 6.00000000000e-01 5.00000000000e-02 - 159 6.00000000000e-01 1.00000000000e-01 - 160 6.00000000000e-01 1.50000000000e-01 - 161 2.96482262322e+00 2.34685544416e-01 - 162 3.25544936548e-01 3.38804552347e-02 - 163 2.14584880936e+00 8.40282015902e-01 - 164 2.96474541655e+00 9.65167546881e-01 - 165 3.54317700822e-02 3.46795798662e-02 - 166 3.52609089556e-02 9.65257038906e-01 - 167 5.65357088629e-01 3.54803248161e-02 - 168 2.92148404803e+00 9.58705910417e-01 - 169 2.92163631532e+00 2.41002503258e-01 - 170 5.59382863506e-01 7.90647255340e-02 - 171 5.19933166158e-01 4.94712598531e-02 - 172 7.85533731872e-02 9.58883372447e-01 - 173 7.90402750767e-02 4.09622769766e-02 - 174 4.92532692554e-02 8.00188709687e-02 - 175 4.87967975985e-02 9.19730463565e-01 - 176 2.95147068177e+00 2.80122273549e-01 - 177 2.95125963202e+00 9.19455693785e-01 - 178 2.87207618698e+00 2.43239171330e-01 - 179 2.87185882049e+00 9.56358573880e-01 - 180 5.58296276685e-01 1.29139142024e-01 - 181 1.28232226629e-01 9.56603682649e-01 - 182 4.68395315337e-01 4.36242871426e-02 - 183 1.29307788628e-01 4.31190213671e-02 - 184 4.32914736153e-02 1.30853581176e-01 - 185 4.29044686033e-02 8.68710472250e-01 - 186 2.95750517139e+00 3.31122538641e-01 - 187 2.95720408608e+00 8.68206759671e-01 - 188 4.31896571991e-02 8.19575595214e-01 - 189 2.95703136181e+00 8.18696504580e-01 - 190 2.95736758551e+00 3.80304767421e-01 - 191 5.60032402037e-01 1.79686071180e-01 - 192 1.78475842199e-01 9.55284247250e-01 - 193 1.80507529802e-01 4.42525713665e-02 - 194 4.34628110059e-02 1.79768928579e-01 - 195 4.18394363365e-01 4.34186203075e-02 - 196 2.82167345785e+00 9.55041250894e-01 - 197 2.82192329974e+00 2.44593219078e-01 - 198 3.68146544323e-01 4.16606714022e-02 - 199 2.77131121875e+00 9.54782086138e-01 - 200 2.77156659768e+00 2.45054744971e-01 - 201 2.28876762899e-01 9.54957772252e-01 - 202 2.32179275145e-01 4.40022093592e-02 - 203 4.36448907230e-02 2.29315548988e-01 - 204 4.35103785137e-02 7.69816919998e-01 - 205 2.95715824586e+00 4.30198055429e-01 - 206 2.95694797035e+00 7.68376896158e-01 - 207 2.72102615429e+00 9.54857243246e-01 - 208 2.72130013624e+00 2.45259527032e-01 - 209 2.95700050653e+00 4.80639571154e-01 - 210 2.83109618040e-01 4.19822504602e-02 - 211 4.38689675340e-02 2.79280103782e-01 - 212 2.79168277447e-01 9.54938599528e-01 - 213 4.37443810428e-02 7.19610025595e-01 - 214 2.96698975862e+00 6.24671064895e-01 - 215 2.95731769456e+00 7.17503544354e-01 - 216 2.67109806523e+00 2.45310802181e-01 - 217 2.67080471278e+00 9.55019577916e-01 - 218 2.95737105950e+00 5.31571148788e-01 - 219 4.39553684696e-02 3.29616203991e-01 - 220 3.29379207620e-01 9.55007609776e-01 - 221 4.36315667077e-02 6.68954570972e-01 - 222 2.95921998543e+00 6.67023818705e-01 - 223 2.62095108309e+00 2.45282951687e-01 - 224 2.62065765896e+00 9.55083404087e-01 - 225 4.37664803020e-02 3.80355640751e-01 - 226 3.79494436545e-01 9.55019326102e-01 - 227 2.95925559825e+00 5.82109595341e-01 - 228 4.29377195426e-02 6.17872798796e-01 - 229 4.08461214649e-02 5.67245513475e-01 - 230 3.30144089416e-02 5.24767981036e-01 - 231 4.30242587511e-02 4.31483333641e-01 - 232 4.29552442602e-01 9.55000418637e-01 - 233 2.57058009272e+00 9.55095736025e-01 - 234 2.57081384577e+00 2.45183640938e-01 - 235 4.08668338745e-02 4.82154609399e-01 - 236 4.79585138128e-01 9.54975854829e-01 - 237 2.52055197214e+00 9.55101852838e-01 - 238 2.52067800802e+00 2.45070208436e-01 - 239 2.47055919674e+00 2.44984706141e-01 - 240 2.17722318508e+00 9.65779283313e-01 - 241 2.47054870554e+00 9.55138363472e-01 - 242 5.29606017135e-01 9.54955989015e-01 - 243 2.42047004840e+00 2.44932509825e-01 - 244 2.42056118555e+00 9.55240844704e-01 - 245 5.79617385263e-01 9.54943630772e-01 - 246 2.37041071041e+00 2.44905875476e-01 - 247 2.37055283982e+00 9.55469545160e-01 - 248 6.29620818388e-01 9.54939177213e-01 - 249 6.79620257168e-01 9.54941547250e-01 - 250 7.29620061583e-01 9.54949332510e-01 - 251 7.79622439401e-01 9.54961071214e-01 - 252 8.29627133210e-01 9.54974996177e-01 - 253 8.79632837851e-01 9.54989053885e-01 - 254 9.29638466739e-01 9.55001341786e-01 - 255 9.79643415209e-01 9.55010672265e-01 - 256 1.02964739041e+00 9.55016873658e-01 - 257 1.07965036422e+00 9.55020546885e-01 - 258 1.12965244424e+00 9.55022517834e-01 - 259 1.17965381289e+00 9.55023515180e-01 - 260 1.22965466862e+00 9.55023989637e-01 - 261 1.27965516125e+00 9.55024213667e-01 - 262 1.32965545653e+00 9.55024319691e-01 - 263 1.37965562704e+00 9.55024363800e-01 - 264 1.42965571860e+00 9.55024393766e-01 - 265 1.47965576255e+00 9.55024409294e-01 - 266 1.52965575464e+00 9.55024434346e-01 - 267 1.57965573173e+00 9.55024491852e-01 - 268 1.62965564909e+00 9.55024629451e-01 - 269 1.67965248238e+00 9.55021262232e-01 - 270 1.72961645504e+00 9.55022826882e-01 - 271 1.77952090097e+00 9.55049929264e-01 - 272 1.82933067227e+00 9.55138437585e-01 - 273 1.87904674850e+00 9.55304012376e-01 - 274 1.92866229516e+00 9.55562978486e-01 - 275 1.97818192002e+00 9.55934031691e-01 - 276 2.02774583645e+00 9.56332735836e-01 - 277 2.07815409918e+00 9.56206698861e-01 - 278 2.13290525434e+00 9.52663767964e-01 - 279 2.32053885790e+00 9.55997888232e-01 - 280 2.27054281973e+00 9.57069356126e-01 - 281 2.22107127249e+00 9.59306120215e-01 - 282 2.32037153227e+00 2.44899239564e-01 - 283 3.06421898852e-01 2.86794326172e-01 - 284 2.27034462177e+00 2.44907826497e-01 - 285 2.22033225347e+00 2.44920955671e-01 - 286 2.17034114253e+00 2.44923510889e-01 - 287 2.12037024660e+00 2.44905578681e-01 - 288 2.07040903166e+00 2.44868759521e-01 - 289 2.02044638659e+00 2.44823830651e-01 - 290 1.97047773584e+00 2.44784058386e-01 - 291 1.92050429918e+00 2.44758340247e-01 - 292 1.87052850264e+00 2.44748029492e-01 - 293 1.82055116221e+00 2.44748810899e-01 - 294 1.77057154840e+00 2.44755002036e-01 - 295 1.72058866046e+00 2.44762364593e-01 - 296 1.67060200313e+00 2.44768721509e-01 - 297 1.62061176311e+00 2.44773384339e-01 - 298 1.57061852938e+00 2.44776439596e-01 - 299 1.52062301299e+00 2.44778305852e-01 - 300 1.47062588876e+00 2.44779378042e-01 - 301 1.42062765299e+00 2.44779967935e-01 - 302 1.37062870264e+00 2.44780292641e-01 - 303 1.32062931354e+00 2.44780456562e-01 - 304 1.27062966071e+00 2.44780549071e-01 - 305 1.22062986819e+00 2.44780596570e-01 - 306 1.17062996727e+00 2.44780623385e-01 - 307 1.12063000445e+00 2.44780654287e-01 - 308 1.07064330675e+00 2.44770981300e-01 - 309 1.02064010179e+00 2.44765284962e-01 - 310 9.70644918429e-01 2.44719745265e-01 - 311 9.20620072009e-01 2.44646753434e-01 - 312 8.70530686052e-01 2.44527795741e-01 - 313 8.20380987636e-01 2.44302363173e-01 - 314 7.70149428403e-01 2.43925997242e-01 - 315 7.19780018727e-01 2.43279981997e-01 - 316 6.69275828140e-01 2.42014475612e-01 - 317 6.18729798775e-01 2.39013719696e-01 - 318 5.69037643513e-01 2.29335849393e-01 - 319 2.89576841173e+00 9.14908166368e-01 - 320 2.91738240609e+00 8.81291767539e-01 - 321 2.91419426643e+00 8.37974905483e-01 - 322 2.91416839633e+00 7.88057908884e-01 - 323 2.91410229174e+00 7.36533516485e-01 - 324 2.91561421529e+00 6.82872964328e-01 - 325 2.92182301543e+00 6.24148306808e-01 - 326 2.84463025891e+00 9.10370297047e-01 - 327 2.79321888306e+00 9.09635563950e-01 - 328 2.74254110383e+00 9.09612661650e-01 - 329 2.69200052088e+00 9.10112894323e-01 - 330 2.64169396655e+00 9.10323544077e-01 - 331 2.59152091491e+00 9.10363637957e-01 - 332 2.54143327776e+00 9.10357892724e-01 - 333 2.49138335388e+00 9.10378240515e-01 - 334 2.44132074707e+00 9.10474306831e-01 - 335 2.39122701524e+00 9.10756437238e-01 - 336 2.34107714308e+00 9.11399843878e-01 - 337 2.29079078039e+00 9.12779520071e-01 - 338 2.23977314541e+00 9.15582409954e-01 - 339 2.18510355173e+00 9.21605265365e-01 - 340 2.89619593277e+00 2.84279929907e-01 - 341 2.91789321723e+00 3.17682513993e-01 - 342 2.91486942609e+00 3.60438911835e-01 - 343 2.91484275851e+00 4.09547790779e-01 - 344 2.91426910681e+00 4.59921984570e-01 - 345 2.91422216547e+00 5.11559550106e-01 - 346 2.91575011711e+00 5.65265092990e-01 - 347 2.84521701490e+00 2.88685643414e-01 - 348 2.79387410884e+00 2.89680008630e-01 - 349 2.74320471877e+00 2.90315970692e-01 - 350 2.69267683752e+00 2.90462052036e-01 - 351 2.64236344893e+00 2.90529930945e-01 - 352 2.59207962362e+00 2.90365326364e-01 - 353 2.54178264498e+00 2.90097872555e-01 - 354 2.49152315594e+00 2.89874744836e-01 - 355 2.44132958742e+00 2.89732386665e-01 - 356 2.39119468287e+00 2.89658348800e-01 - 357 2.34109932190e+00 2.89635427582e-01 - 358 2.29103466755e+00 2.89649021185e-01 - 359 2.24100706540e+00 2.89680732635e-01 - 360 2.19102306352e+00 2.89705903283e-01 - 361 2.14107672247e+00 2.89698763508e-01 - 362 2.09115240482e+00 2.89643779109e-01 - 363 2.04123402117e+00 2.89549894612e-01 - 364 1.99131138291e+00 2.89448951582e-01 - 365 1.94138151837e+00 2.89373557819e-01 - 366 1.89144572267e+00 2.89337286029e-01 - 367 1.84150487151e+00 2.89333392337e-01 - 368 1.79155761735e+00 2.89346683886e-01 - 369 1.74160193929e+00 2.89364587023e-01 - 370 1.69163687584e+00 2.89380584219e-01 - 371 1.64166289371e+00 2.89392618925e-01 - 372 1.59168135037e+00 2.89400759395e-01 - 373 1.54169391136e+00 2.89405854370e-01 - 374 1.49170216000e+00 2.89408860255e-01 - 375 1.44170740852e+00 2.89410552210e-01 - 376 1.39171065229e+00 2.89411475026e-01 - 377 1.34171260502e+00 2.89411967289e-01 - 378 1.29171375265e+00 2.89412229157e-01 - 379 1.24171440714e+00 2.89412378001e-01 - 380 1.19171475539e+00 2.89412477853e-01 - 381 1.14171490758e+00 2.89412558856e-01 - 382 1.09172657733e+00 2.89403763797e-01 - 383 1.04172683699e+00 2.89387582928e-01 - 384 9.91726920462e-01 2.89323723732e-01 - 385 9.41675765872e-01 2.89217687222e-01 - 386 8.91539579037e-01 2.89025669948e-01 - 387 8.41291098679e-01 2.88692483346e-01 - 388 7.90891192446e-01 2.88143488556e-01 - 389 7.40241258123e-01 2.87240158797e-01 - 390 6.89192994769e-01 2.85668141092e-01 - 391 6.37583435916e-01 2.82695083357e-01 - 392 5.16838374503e-01 1.06086355290e-01 - 393 4.82377395494e-01 8.44972391781e-02 - 394 4.38280180360e-01 8.77185039416e-02 - 395 3.85557428429e-01 8.61420775873e-02 - 396 3.26626359366e-01 8.03641703527e-02 - 397 5.15418965600e-01 1.58791395961e-01 - 398 1.04392669786e-01 9.15423199250e-01 - 399 8.28315911402e-02 8.82011744483e-01 - 400 8.61751130049e-02 8.39208534607e-01 - 401 8.65006645533e-02 7.90151274233e-01 - 402 8.71799659478e-02 7.40087796468e-01 - 403 8.73112394715e-02 6.89213202920e-01 - 404 8.66036355959e-02 6.37257956391e-01 - 405 8.44704247025e-02 5.83348233666e-01 - 406 7.81474347392e-02 5.24415380409e-01 - 407 1.55662861012e-01 9.10955432709e-01 - 408 2.07152349352e-01 9.10101951862e-01 - 409 2.57851699063e-01 9.09880926008e-01 - 410 3.08364945831e-01 9.10168636715e-01 - 411 3.58612717068e-01 9.10230943639e-01 - 412 4.08724339821e-01 9.10189072917e-01 - 413 4.58778244024e-01 9.10125535319e-01 - 414 5.08808319842e-01 9.10070221262e-01 - 415 5.58825585234e-01 9.10028671749e-01 - 416 6.08834228525e-01 9.10002959259e-01 - 417 6.58839633763e-01 9.09996327726e-01 - 418 7.08846320520e-01 9.10008058025e-01 - 419 7.58855846452e-01 9.10033215746e-01 - 420 8.08868019387e-01 9.10065393128e-01 - 421 8.58882039890e-01 9.10098809168e-01 - 422 9.08896521798e-01 9.10129152592e-01 - 423 9.58909913427e-01 9.10153861504e-01 - 424 1.00892118330e+00 9.10172036399e-01 - 425 1.05892995826e+00 9.10184095198e-01 - 426 1.10893635332e+00 9.10191326666e-01 - 427 1.15894075296e+00 9.10195288667e-01 - 428 1.20894363033e+00 9.10197306706e-01 - 429 1.25894542999e+00 9.10198280135e-01 - 430 1.30894651473e+00 9.10198737327e-01 - 431 1.35894714955e+00 9.10198950727e-01 - 432 1.40894750489e+00 9.10199059870e-01 - 433 1.45894768063e+00 9.10199138750e-01 - 434 1.50894772132e+00 9.10199242309e-01 - 435 1.55894761535e+00 9.10199457145e-01 - 436 1.60894725396e+00 9.10199947831e-01 - 437 1.65894605033e+00 9.10190473988e-01 - 438 1.70891211275e+00 9.10178355308e-01 - 439 1.75879080018e+00 9.10202348195e-01 - 440 1.80855397692e+00 9.10296222331e-01 - 441 1.85817496039e+00 9.10506134250e-01 - 442 1.90761021515e+00 9.10895961996e-01 - 443 1.95679669705e+00 9.11518681767e-01 - 444 2.00564697478e+00 9.12364977156e-01 - 445 2.05395329227e+00 9.13278695899e-01 - 446 2.10102847785e+00 9.13383692949e-01 - 447 1.05688129194e-01 8.40040278659e-02 - 448 8.38772783097e-02 1.17272863054e-01 - 449 8.70983265237e-02 1.59649429520e-01 - 450 8.70314600623e-02 2.08280536856e-01 - 451 8.74946932339e-02 2.57916329800e-01 - 452 8.77889199298e-02 3.08268938757e-01 - 453 8.76986008644e-02 3.59337418460e-01 - 454 8.68980209160e-02 4.11404645298e-01 - 455 8.46262241882e-02 4.65378944473e-01 - 456 1.58391717372e-01 8.81638699668e-02 - 457 2.12337606635e-01 8.85501810783e-02 - 458 2.67273605032e-01 8.71017763530e-02 - 459 2.14233975166e+00 9.08509450027e-01 - 460 2.87010566374e+00 8.64223867079e-01 - 461 2.87099197472e+00 3.34143778838e-01 - 462 4.67363913280e-01 1.33771446910e-01 - 463 1.30330507414e-01 8.65298918726e-01 - 464 1.32490632787e-01 1.33390958543e-01 - 465 2.81653556343e+00 3.33425425115e-01 - 466 2.76579645013e+00 3.35505604044e-01 - 467 2.71471967079e+00 3.35300237540e-01 - 468 2.66432615029e+00 3.35760078082e-01 - 469 2.61393282187e+00 3.35628499907e-01 - 470 2.56343212855e+00 3.35117298510e-01 - 471 2.51299456760e+00 3.34678198377e-01 - 472 2.46267448922e+00 3.34406665157e-01 - 473 2.41245340171e+00 3.34263343598e-01 - 474 2.36230160223e+00 3.34207711522e-01 - 475 2.31220393944e+00 3.34220361567e-01 - 476 2.26215811342e+00 3.34282702916e-01 - 477 2.21216294656e+00 3.34361929259e-01 - 478 2.16221837483e+00 3.34403595353e-01 - 479 2.11232222135e+00 3.34356518291e-01 - 480 2.06245757482e+00 3.34215420346e-01 - 481 2.01259686344e+00 3.34029702454e-01 - 482 1.96272437065e+00 3.33869972386e-01 - 483 1.91284167845e+00 3.33780561341e-01 - 484 1.86295201633e+00 3.33759682659e-01 - 485 1.81305179848e+00 3.33778960719e-01 - 486 1.76313589302e+00 3.33811324056e-01 - 487 1.71320228243e+00 3.33841649450e-01 - 488 1.66325192286e+00 3.33864657132e-01 - 489 1.61328747359e+00 3.33880297791e-01 - 490 1.56331204463e+00 3.33890188044e-01 - 491 1.51332851203e+00 3.33896101429e-01 - 492 1.46333924641e+00 3.33899477706e-01 - 493 1.41334606572e+00 3.33901335521e-01 - 494 1.36335029136e+00 3.33902333260e-01 - 495 1.31335284131e+00 3.33902869716e-01 - 496 1.26335432281e+00 3.33903179071e-01 - 497 1.21335511284e+00 3.33903392792e-01 - 498 1.16335544030e+00 3.33903535248e-01 - 499 1.11336118878e+00 3.33897971505e-01 - 500 1.06336247076e+00 3.33875065450e-01 - 501 1.01335494633e+00 3.33809660377e-01 - 502 9.63285438349e-01 3.33692619467e-01 - 503 9.13128169966e-01 3.33472388447e-01 - 504 8.62839990550e-01 3.33106523270e-01 - 505 8.12372568600e-01 3.32513398607e-01 - 506 7.61617609937e-01 3.31571338497e-01 - 507 7.10408583842e-01 3.30051682215e-01 - 508 6.58465532466e-01 3.27539777427e-01 - 509 1.85206522806e-01 8.65868795851e-01 - 510 2.36062667440e-01 8.64289835032e-01 - 511 2.87070495925e-01 8.65508645816e-01 - 512 3.37357470929e-01 8.65657147660e-01 - 513 3.87436989035e-01 8.65558737513e-01 - 514 4.37458980849e-01 8.65419431722e-01 - 515 4.87474741126e-01 8.65312350003e-01 - 516 5.37490720152e-01 8.65236567080e-01 - 517 5.87506842486e-01 8.65185558992e-01 - 518 6.37523058272e-01 8.65161475412e-01 - 519 6.87539936447e-01 8.65168788169e-01 - 520 7.37560155870e-01 8.65204657892e-01 - 521 7.87585827012e-01 8.65259052128e-01 - 522 8.37615429363e-01 8.65319921116e-01 - 523 8.87645506753e-01 8.65377638042e-01 - 524 9.37673296439e-01 8.65426454603e-01 - 525 9.87697012127e-01 8.65463940205e-01 - 526 1.03771589004e+00 8.65490351717e-01 - 527 1.08773002208e+00 8.65507460347e-01 - 528 1.13774004334e+00 8.65517645110e-01 - 529 1.18774681515e+00 8.65523237240e-01 - 530 1.23775120041e+00 8.65526099247e-01 - 531 1.28775393517e+00 8.65527488654e-01 - 532 1.33775558021e+00 8.65528148679e-01 - 533 1.38775652275e+00 8.65528482093e-01 - 534 1.43775699895e+00 8.65528709667e-01 - 535 1.48775711117e+00 8.65528984947e-01 - 536 1.53775681330e+00 8.65529487307e-01 - 537 1.58775583219e+00 8.65530511105e-01 - 538 1.63775971295e+00 8.65515272543e-01 - 539 1.68774087270e+00 8.65491622006e-01 - 540 1.73764939802e+00 8.65490696890e-01 - 541 1.78746500702e+00 8.65539721829e-01 - 542 1.83714387289e+00 8.65709287776e-01 - 543 1.88661570740e+00 8.66105684134e-01 - 544 1.93582412272e+00 8.66823583378e-01 - 545 1.98465969768e+00 8.67927900071e-01 - 546 2.03281721265e+00 8.69406424709e-01 - 547 2.07948016775e+00 8.71238767712e-01 - 548 1.89664259477e-01 1.32436248768e-01 - 549 2.44377109290e-01 1.33788552652e-01 - 550 2.81533753934e+00 8.64944601590e-01 - 551 2.76453728473e+00 8.63641784713e-01 - 552 2.71347560064e+00 8.65273318960e-01 - 553 2.66308861142e+00 8.65743728849e-01 - 554 2.61289037100e+00 8.65837536517e-01 - 555 2.56277290210e+00 8.65799580308e-01 - 556 2.51266425746e+00 8.65763458262e-01 - 557 2.46251668327e+00 8.65820149168e-01 - 558 2.41229479471e+00 8.66043456089e-01 - 559 2.36197361456e+00 8.66550742819e-01 - 560 2.31160378376e+00 8.67672318935e-01 - 561 2.26141920290e+00 8.70061344526e-01 - 562 2.21192891208e+00 8.74100015251e-01 - 563 1.28359366486e-01 8.11776091204e-01 - 564 1.30121906835e-01 7.61662563899e-01 - 565 1.30940598323e-01 7.10883836550e-01 - 566 1.30608692405e-01 6.59177027819e-01 - 567 1.29161542662e-01 6.06188505023e-01 - 568 1.26760245736e-01 5.51540470437e-01 - 569 1.29783253642e-01 1.86225740935e-01 - 570 1.30858001805e-01 2.35676155862e-01 - 571 1.31461807177e-01 2.85885243345e-01 - 572 1.31696739378e-01 3.36870628016e-01 - 573 1.31221567278e-01 3.88749025397e-01 - 574 1.29707682534e-01 4.41837185185e-01 - 575 4.11037099708e-01 1.31006177311e-01 - 576 3.56469913554e-01 1.30577363061e-01 - 577 2.87236275890e+00 8.09840366884e-01 - 578 2.87102591036e+00 7.58431939380e-01 - 579 2.87101500889e+00 7.05635075412e-01 - 580 2.87279906674e+00 6.51025662576e-01 - 581 2.87357805489e+00 3.87454178352e-01 - 582 2.87213202108e+00 4.37587250019e-01 - 583 2.87117875097e+00 4.88765739660e-01 - 584 2.87126234333e+00 5.41434828789e-01 - 585 5.85364794881e-01 2.76471759987e-01 - 586 5.21526451881e-01 2.12168331014e-01 - 587 2.83440195260e+00 8.27360012436e-01 - 588 2.83594614297e+00 3.70089224480e-01 - 589 1.69376230327e-01 1.68978905802e-01 - 590 1.66319419435e-01 8.28895326839e-01 - 591 2.12304670464e+00 8.73410701641e-01 - 592 2.16679635175e+00 8.75541449708e-01 - 593 2.78936489726e+00 3.83442941501e-01 - 594 2.18869503397e-01 1.82450890136e-01 - 595 2.78708940580e+00 8.13844138711e-01 - 596 2.13732951312e-01 8.15186610743e-01 - 597 2.66252470227e-01 8.21298486722e-01 - 598 2.73446588611e+00 8.20730181046e-01 - 599 2.73664395433e+00 3.79047105927e-01 - 600 2.68467729445e+00 8.21360927281e-01 - 601 3.15900714105e-01 8.21337066585e-01 - 602 2.68682816592e+00 3.80943821242e-01 - 603 2.63470781294e+00 8.21552808025e-01 - 604 2.63657313321e+00 3.81266287201e-01 - 605 3.65675587635e-01 8.21135581366e-01 - 606 2.58466205699e+00 8.21446448077e-01 - 607 2.58573869093e+00 3.80240582689e-01 - 608 4.15545974996e-01 8.20864183552e-01 - 609 2.53502610110e+00 3.79418436786e-01 - 610 2.53453858501e+00 8.21320883261e-01 - 611 4.65504144747e-01 8.20682051513e-01 - 612 5.15519025412e-01 8.20562068789e-01 - 613 2.48433179241e+00 8.21313504292e-01 - 614 2.48455543015e+00 3.78964752136e-01 - 615 5.65550864751e-01 8.20471211529e-01 - 616 2.43399527763e+00 8.21448454102e-01 - 617 2.43425935344e+00 3.78735334095e-01 - 618 2.38347281426e+00 8.21790262584e-01 - 619 2.38407087221e+00 3.78642104774e-01 - 620 6.15580483151e-01 8.20415380190e-01 - 621 2.33395175126e+00 3.78649428737e-01 - 622 2.33272242621e+00 8.22476620187e-01 - 623 6.65611352274e-01 8.20407052150e-01 - 624 7.15651470905e-01 8.20448019640e-01 - 625 2.28388061381e+00 3.78742350521e-01 - 626 2.28191981727e+00 8.23900782117e-01 - 627 7.65700888331e-01 8.20526228149e-01 - 628 2.23384885540e+00 3.78891666661e-01 - 629 2.18387205818e+00 3.79030433887e-01 - 630 2.13397476877e+00 3.79063510846e-01 - 631 8.15755254493e-01 8.20622556132e-01 - 632 2.08415001780e+00 3.78915569489e-01 - 633 8.65810462258e-01 8.20719375045e-01 - 634 9.15861825720e-01 8.20804308785e-01 - 635 9.65906078416e-01 8.20871921007e-01 - 636 1.01594174129e+00 8.20921343636e-01 - 637 1.06596884905e+00 8.20954753277e-01 - 638 1.11598839626e+00 8.20975698839e-01 - 639 1.16600185409e+00 8.20987897772e-01 - 640 1.21601074674e+00 8.20994512283e-01 - 641 1.26601641010e+00 8.20997881768e-01 - 642 1.31601988613e+00 8.20999531490e-01 - 643 1.36602191031e+00 8.21000361857e-01 - 644 1.41602293910e+00 8.21000884617e-01 - 645 1.46602317001e+00 8.21001424905e-01 - 646 1.51602251115e+00 8.21002273158e-01 - 647 1.56602045439e+00 8.21003780836e-01 - 648 1.61602835915e+00 8.20986379721e-01 - 649 1.66602494016e+00 8.20957726347e-01 - 650 1.71598653592e+00 8.20927584821e-01 - 651 1.76589952220e+00 8.20921820317e-01 - 652 1.81572657439e+00 8.21003922880e-01 - 653 1.86541597691e+00 8.21278153045e-01 - 654 1.91489165400e+00 8.21945310661e-01 - 655 1.96409382663e+00 8.23171852342e-01 - 656 2.01296675477e+00 8.24954222051e-01 - 657 2.06119820860e+00 8.27394531689e-01 - 658 2.03435454456e+00 3.78616723731e-01 - 659 1.98455095092e+00 3.78304959649e-01 - 660 1.93473483062e+00 3.78107812899e-01 - 661 1.88491172952e+00 3.78048153499e-01 - 662 1.83507445374e+00 3.78072041345e-01 - 663 1.78521114140e+00 3.78122990572e-01 - 664 1.73531767798e+00 3.78172317390e-01 - 665 1.68539675200e+00 3.78210417739e-01 - 666 1.63545341743e+00 3.78236380877e-01 - 667 1.58549292468e+00 3.78252766997e-01 - 668 1.53551981087e+00 3.78262566473e-01 - 669 1.48553769212e+00 3.78268178381e-01 - 670 1.43554931746e+00 3.78271276383e-01 - 671 1.38555669978e+00 3.78272941793e-01 - 672 1.33556125832e+00 3.78273836730e-01 - 673 1.28556394831e+00 3.78274349735e-01 - 674 1.23556536977e+00 3.78274683891e-01 - 675 1.18556587661e+00 3.78274825862e-01 - 676 1.13556614764e+00 3.78271435458e-01 - 677 1.08556573667e+00 3.78247157511e-01 - 678 1.03554748860e+00 3.78188719467e-01 - 679 9.85471314013e-01 3.78071321835e-01 - 680 9.35309634369e-01 3.77857076948e-01 - 681 8.85022893395e-01 3.77503174222e-01 - 682 8.34562004291e-01 3.76942403879e-01 - 683 7.83837593973e-01 3.76079330629e-01 - 684 7.32726556825e-01 3.74751662216e-01 - 685 6.81036392461e-01 3.72719776096e-01 - 686 2.23209239774e+00 8.27307706194e-01 - 687 1.26954874264e-01 4.96534820011e-01 - 688 2.87297264396e+00 5.96012601360e-01 - 689 1.72211897033e-01 7.84404177822e-01 - 690 1.74106243642e-01 2.12516874048e-01 - 691 2.82876962777e+00 7.82030754994e-01 - 692 2.83087939631e+00 4.14055260865e-01 - 693 3.00797596655e-01 1.31162388636e-01 - 694 1.74310134104e-01 7.33724104350e-01 - 695 1.74802965218e-01 6.82235843217e-01 - 696 1.73653077108e-01 6.29994132268e-01 - 697 1.72182610982e-01 5.77057354689e-01 - 698 2.82700786253e+00 7.30010933559e-01 - 699 2.82890292065e+00 4.64414434738e-01 - 700 2.82734663519e+00 5.16068733034e-01 - 701 1.74821079938e-01 2.62442422860e-01 - 702 1.75612543947e-01 3.13283446019e-01 - 703 1.75684271999e-01 3.64885723306e-01 - 704 1.74794042980e-01 4.17267883223e-01 - 705 2.82671880689e+00 6.76707879167e-01 - 706 6.05344026022e-01 3.23341179786e-01 - 707 4.73650278864e-01 1.91979868132e-01 - 708 4.32836853939e-01 1.72375460234e-01 - 709 3.86377628752e-01 1.77550707651e-01 - 710 5.33408329999e-01 2.64567211576e-01 - 711 2.10761825959e+00 8.31313159937e-01 - 712 2.76771968763e-01 1.78516067743e-01 - 713 2.18455839011e+00 8.32123140528e-01 - 714 6.28418028345e-01 3.69673628824e-01 - 715 3.31581783953e-01 1.78734795585e-01 - 716 2.82720876369e+00 6.22803783853e-01 - 717 2.82716283914e+00 5.69048488223e-01 - 718 1.73088775341e-01 4.70378166140e-01 - 719 1.71774195109e-01 5.23734332972e-01 - 720 2.16406349236e-01 7.58468674343e-01 - 721 2.51138191433e-01 7.80544818591e-01 - 722 2.94315106896e-01 7.77192707782e-01 - 723 3.43358008591e-01 7.77001606855e-01 - 724 3.92936599565e-01 7.76419079861e-01 - 725 4.42818025979e-01 7.76124801352e-01 - 726 4.92852994800e-01 7.75981227360e-01 - 727 5.42919112062e-01 7.75851593857e-01 - 728 5.92977589511e-01 7.75736539279e-01 - 729 6.43035137059e-01 7.75686039680e-01 - 730 6.93104388422e-01 7.75721963391e-01 - 731 7.43188995464e-01 7.75826081869e-01 - 732 7.93284864237e-01 7.75966968291e-01 - 733 8.43381207602e-01 7.76115097324e-01 - 734 8.93470143999e-01 7.76250682646e-01 - 735 9.43546581281e-01 7.76361960736e-01 - 736 9.93608420716e-01 7.76445910517e-01 - 737 1.04365576714e+00 7.76504566927e-01 - 738 1.09369029593e+00 7.76542691814e-01 - 739 1.14371434147e+00 7.76565749455e-01 - 740 1.19373041766e+00 7.76578783887e-01 - 741 1.24374077140e+00 7.76585697461e-01 - 742 1.29374719248e+00 7.76589191247e-01 - 743 1.34375096184e+00 7.76590953937e-01 - 744 1.39375288214e+00 7.76591975260e-01 - 745 1.44375331224e+00 7.76592843347e-01 - 746 1.49375213558e+00 7.76593958840e-01 - 747 1.54374860246e+00 7.76595612460e-01 - 748 1.59375626690e+00 7.76580333211e-01 - 749 1.64376274436e+00 7.76551412262e-01 - 750 1.69376817821e+00 7.76505078889e-01 - 751 1.74377065830e+00 7.76462975316e-01 - 752 1.79376853725e+00 7.76452158897e-01 - 753 1.84375495798e+00 7.76547040872e-01 - 754 1.89366616217e+00 7.76952740680e-01 - 755 1.94334663422e+00 7.78080541406e-01 - 756 1.99287618721e+00 7.80126947240e-01 - 757 2.04257360355e+00 7.82861381898e-01 - 758 2.19496547617e-01 7.06147583712e-01 - 759 2.18172316944e-01 6.53718830465e-01 - 760 2.16437049977e-01 6.01864976027e-01 - 761 2.17314342155e-01 2.37497067948e-01 - 762 2.19188009196e-01 2.88564774582e-01 - 763 2.20094488905e-01 3.40160356563e-01 - 764 2.19879362266e-01 3.92276316937e-01 - 765 2.78462219644e+00 7.56294403179e-01 - 766 2.74970755733e+00 7.79473825477e-01 - 767 2.70638579051e+00 7.76983620503e-01 - 768 2.65706870719e+00 7.77602670313e-01 - 769 2.60722467921e+00 7.77335115773e-01 - 770 2.55714291376e+00 7.77044940088e-01 - 771 2.50690205502e+00 7.76929794470e-01 - 772 2.45649962286e+00 7.76998911639e-01 - 773 2.40588239112e+00 7.77232678666e-01 - 774 2.35490115238e+00 7.77641156566e-01 - 775 2.30329345629e+00 7.78286953174e-01 - 776 2.25088166184e+00 7.79471235649e-01 - 777 2.78142711482e+00 7.02882927062e-01 - 778 2.78854753450e+00 4.38433231542e-01 - 779 2.75369933062e+00 4.17306193829e-01 - 780 2.71019877096e+00 4.25424650821e-01 - 781 2.66068322465e+00 4.28206518198e-01 - 782 2.60877957092e+00 4.25679268622e-01 - 783 2.55755880806e+00 4.24076362500e-01 - 784 2.50695338552e+00 4.23394586875e-01 - 785 2.45663887873e+00 4.23098693215e-01 - 786 2.40645280129e+00 4.22977881993e-01 - 787 2.35633351517e+00 4.22972921288e-01 - 788 2.30624425948e+00 4.23076989093e-01 - 789 2.25616821273e+00 4.23286791156e-01 - 790 2.20612178413e+00 4.23567425132e-01 - 791 2.15614334933e+00 4.23793556513e-01 - 792 2.10628427911e+00 4.23758443501e-01 - 793 2.05653514743e+00 4.23362548690e-01 - 794 2.00681312244e+00 4.22792325524e-01 - 795 1.95707430400e+00 4.22367268507e-01 - 796 1.90733505410e+00 4.22220490898e-01 - 797 1.85758220561e+00 4.22250451667e-01 - 798 1.80778452966e+00 4.22329386810e-01 - 799 1.75793631900e+00 4.22403911964e-01 - 800 1.70804546450e+00 4.22460452915e-01 - 801 1.65812264266e+00 4.22499297922e-01 - 802 1.60817663226e+00 4.22523930885e-01 - 803 1.55821393580e+00 4.22538623905e-01 - 804 1.50823929289e+00 4.22546992728e-01 - 805 1.45825618677e+00 4.22551582927e-01 - 806 1.40826717830e+00 4.22554028413e-01 - 807 1.35827410988e+00 4.22555321324e-01 - 808 1.30827824624e+00 4.22556032046e-01 - 809 1.25828038271e+00 4.22556429828e-01 - 810 1.20828094542e+00 4.22556426957e-01 - 811 1.15827759308e+00 4.22553528354e-01 - 812 1.10827322588e+00 4.22531799477e-01 - 813 1.05824574038e+00 4.22481197104e-01 - 814 1.00816965904e+00 4.22372761445e-01 - 815 9.58016575021e-01 4.22181274927e-01 - 816 9.07753768472e-01 4.21864623221e-01 - 817 8.57336575469e-01 4.21374080348e-01 - 818 8.06694928622e-01 4.20635246224e-01 - 819 7.55757500773e-01 4.19548844166e-01 - 820 7.04436285695e-01 4.17983820205e-01 - 821 2.78433275439e+00 4.89509210686e-01 - 822 5.50628801845e-01 3.16607571969e-01 - 823 4.81087293392e-01 2.46980257732e-01 - 824 4.24455532887e-01 2.24949051337e-01 - 825 2.56669798928e-01 2.17644177178e-01 - 826 2.20022423343e+00 7.85895439508e-01 - 827 2.09291937283e+00 7.86805431791e-01 - 828 1.99640096670e+00 5.92348820291e-01 - 829 3.06379830847e-01 2.29551889819e-01 - 830 3.64372265102e-01 2.23602766376e-01 - 831 2.66188401573e-01 7.31945300705e-01 - 832 2.74282119164e+00 4.61796910680e-01 - 833 2.62291390587e-01 2.62729826706e-01 - 834 2.73457973657e+00 7.30921340625e-01 - 835 6.52704867879e-01 4.15782936455e-01 - 836 2.18564482695e-01 4.44850893690e-01 - 837 2.16921406304e-01 4.97475933649e-01 - 838 2.15781452710e-01 5.49743123987e-01 - 839 2.78245943355e+00 5.41654162017e-01 - 840 2.78200542915e+00 5.95089984441e-01 - 841 2.78178710735e+00 6.48735461864e-01 - 842 2.63170782156e-01 6.75859648232e-01 - 843 2.60928774572e-01 6.25432208692e-01 - 844 2.64144410550e-01 3.14437261959e-01 - 845 2.65140642736e-01 3.66699958017e-01 - 846 5.73926160093e-01 3.65608609929e-01 - 847 2.68064444033e+00 7.34532935541e-01 - 848 2.63073876122e+00 7.33600543425e-01 - 849 2.58065139360e+00 7.32939866460e-01 - 850 2.53034917060e+00 7.32623460764e-01 - 851 2.47987069438e+00 7.32640763534e-01 - 852 2.42925199414e+00 7.32816600854e-01 - 853 2.37838198328e+00 7.33114660750e-01 - 854 2.32694111798e+00 7.33500602111e-01 - 855 2.27400010189e+00 7.33754913505e-01 - 856 3.19818953586e-01 7.33734186157e-01 - 857 3.69384166833e-01 7.32080626803e-01 - 858 4.19279052074e-01 7.31553512854e-01 - 859 4.69441303788e-01 7.31468484063e-01 - 860 5.19616985004e-01 7.31327206413e-01 - 861 5.69738353771e-01 7.31120938623e-01 - 862 6.19831302975e-01 7.30978308882e-01 - 863 6.69941294343e-01 7.30976168798e-01 - 864 7.20084765377e-01 7.31102452670e-01 - 865 7.70245138292e-01 7.31299627256e-01 - 866 8.20406074693e-01 7.31517468843e-01 - 867 8.70553440860e-01 7.31720739104e-01 - 868 9.20679341646e-01 7.31892135353e-01 - 869 9.70780666303e-01 7.32024640584e-01 - 870 1.02085829023e+00 7.32119880019e-01 - 871 1.07091497520e+00 7.32183608349e-01 - 872 1.12095470004e+00 7.32223442648e-01 - 873 1.17098139326e+00 7.32246599227e-01 - 874 1.22099867024e+00 7.32259235996e-01 - 875 1.27100941766e+00 7.32265759571e-01 - 876 1.32101573573e+00 7.32269050901e-01 - 877 1.37101896195e+00 7.32270825174e-01 - 878 1.42101973636e+00 7.32272051808e-01 - 879 1.47101800620e+00 7.32273254961e-01 - 880 1.52101289668e+00 7.32274583702e-01 - 881 1.57101612283e+00 7.32263641175e-01 - 882 1.62102483686e+00 7.32237404281e-01 - 883 1.67104884612e+00 7.32192400615e-01 - 884 1.72110131926e+00 7.32136494153e-01 - 885 1.77121131360e+00 7.32071899625e-01 - 886 1.82143330180e+00 7.32036249882e-01 - 887 1.87181665925e+00 7.32108284938e-01 - 888 1.92227820977e+00 7.32580741277e-01 - 889 1.97225658111e+00 7.34636500963e-01 - 890 2.02223784371e+00 7.38015396908e-01 - 891 2.68923606662e+00 4.79613818766e-01 - 892 2.63216414487e+00 4.71751801770e-01 - 893 2.58013611652e+00 4.68452014679e-01 - 894 2.52969898112e+00 4.67629300851e-01 - 895 2.47956109334e+00 4.67360426565e-01 - 896 2.42946135172e+00 4.67253228254e-01 - 897 2.37937599879e+00 4.67240101453e-01 - 898 2.32929129031e+00 4.67327070580e-01 - 899 2.27919274860e+00 4.67556217413e-01 - 900 2.22906070791e+00 4.67958799461e-01 - 901 2.17892011218e+00 4.68456957663e-01 - 902 2.12885269103e+00 4.68792646515e-01 - 903 2.07901654658e+00 4.68508828840e-01 - 904 2.02936864680e+00 4.67559712370e-01 - 905 1.97973563931e+00 4.66629255401e-01 - 906 1.93011471302e+00 4.66275658679e-01 - 907 1.88049269894e+00 4.66334758072e-01 - 908 1.83077810769e+00 4.66464591482e-01 - 909 1.78097117675e+00 4.66573620449e-01 - 910 1.73109994485e+00 4.66651880780e-01 - 911 1.68118768496e+00 4.66704760533e-01 - 912 1.63124901320e+00 4.66739000291e-01 - 913 1.58129242530e+00 4.66759761104e-01 - 914 1.53132299910e+00 4.66771546103e-01 - 915 1.48134413346e+00 4.66777928618e-01 - 916 1.43135833218e+00 4.66781258523e-01 - 917 1.38136750126e+00 4.66782954739e-01 - 918 1.33137301762e+00 4.66783808050e-01 - 919 1.28137575224e+00 4.66784152527e-01 - 920 1.23137608501e+00 4.66783806916e-01 - 921 1.18137064634e+00 4.66780307436e-01 - 922 1.13136151156e+00 4.66762276101e-01 - 923 1.08132895073e+00 4.66718203788e-01 - 924 1.03125670768e+00 4.66624877563e-01 - 925 9.81119826235e-01 4.66461561879e-01 - 926 9.30890791562e-01 4.66192954173e-01 - 927 8.80529913675e-01 4.65781853558e-01 - 928 8.29989131424e-01 4.65175856555e-01 - 929 7.79212978860e-01 4.64319691051e-01 - 930 7.28141052540e-01 4.63143666587e-01 - 931 4.96475137034e-01 3.02988243662e-01 - 932 4.42271846676e-01 2.84304970774e-01 - 933 3.00962588529e-01 6.94229583479e-01 - 934 2.21609572045e+00 7.32383508500e-01 - 935 3.12139916180e-01 6.43846085779e-01 - 936 6.00785384313e-01 4.12904796691e-01 - 937 3.90075195425e-01 2.71404352332e-01 - 938 2.07293193143e+00 7.41318909523e-01 - 939 3.44684237328e-01 6.87755497147e-01 - 940 2.14625434458e+00 7.95305677384e-01 - 941 2.64083977330e-01 4.19438148066e-01 - 942 2.62077199032e-01 4.72253903638e-01 - 943 2.60195762464e-01 5.24305644160e-01 - 944 2.58232163266e-01 5.74879490006e-01 - 945 3.94643188721e-01 6.86685240969e-01 - 946 4.45274836415e-01 6.86972331578e-01 - 947 4.95700692209e-01 6.86954033574e-01 - 948 5.45925807175e-01 6.86612870557e-01 - 949 5.96055036094e-01 6.86262303690e-01 - 950 6.46217261184e-01 6.86156781145e-01 - 951 6.96447713602e-01 6.86294274254e-01 - 952 7.46713060006e-01 6.86561675390e-01 - 953 7.96975559135e-01 6.86869988805e-01 - 954 8.47212812011e-01 6.87165330286e-01 - 955 8.97412551069e-01 6.87416658977e-01 - 956 9.47572048770e-01 6.87614541595e-01 - 957 9.97693195987e-01 6.87759549003e-01 - 958 1.04778156561e+00 6.87859243156e-01 - 959 1.09784322556e+00 6.87923157149e-01 - 960 1.14788473225e+00 6.87961531150e-01 - 961 1.19791151923e+00 6.87982837358e-01 - 962 1.24792814192e+00 6.87994001129e-01 - 963 1.29793786980e+00 6.87999587073e-01 - 964 1.34794284585e+00 6.88002415092e-01 - 965 1.39794418211e+00 6.88004025877e-01 - 966 1.44794205758e+00 6.88005134929e-01 - 967 1.49793571212e+00 6.88005770941e-01 - 968 1.54793294646e+00 6.87998761321e-01 - 969 1.59793744100e+00 6.87977411219e-01 - 970 1.64795770129e+00 6.87942561432e-01 - 971 1.69801381035e+00 6.87888264329e-01 - 972 1.74814338240e+00 6.87816644406e-01 - 973 1.79843299198e+00 6.87737280855e-01 - 974 1.84902710270e+00 6.87642424839e-01 - 975 1.90017547508e+00 6.87535474930e-01 - 976 1.95201131860e+00 6.87628176540e-01 - 977 2.00164775370e+00 6.92364047903e-01 - 978 2.73771582261e+00 5.12795471123e-01 - 979 2.73791929147e+00 5.66795146047e-01 - 980 2.73653978842e+00 6.20917630576e-01 - 981 2.73710384751e+00 6.74084824631e-01 - 982 2.69939139994e+00 6.95118082771e-01 - 983 2.65534769904e+00 6.90369430332e-01 - 984 2.60531070153e+00 6.89111853569e-01 - 985 2.55484269472e+00 6.88298419656e-01 - 986 2.50412118377e+00 6.88304689202e-01 - 987 2.45343619685e+00 6.88470605965e-01 - 988 2.40275066467e+00 6.88702933196e-01 - 989 2.35195568148e+00 6.88989373270e-01 - 990 2.30101619674e+00 6.89221102471e-01 - 991 3.43805958091e-01 2.63807042400e-01 - 992 3.10731690724e-01 3.40056733562e-01 - 993 2.65478292072e+00 6.10561668151e-01 - 994 6.76759291366e-01 4.61595439357e-01 - 995 5.13915267770e-01 3.62490897211e-01 - 996 4.57313336592e-01 3.38895046833e-01 - 997 2.64886463294e+00 5.18573895753e-01 - 998 2.69404868452e+00 5.38619032297e-01 - 999 2.60075829342e+00 5.11703916315e-01 - 1000 2.55244763652e+00 5.11517842564e-01 - 1001 2.50302914667e+00 5.11521969576e-01 - 1002 2.45313846464e+00 5.11498781856e-01 - 1003 2.40309926503e+00 5.11499772762e-01 - 1004 2.35302806420e+00 5.11565244150e-01 - 1005 2.30293613399e+00 5.11745947543e-01 - 1006 2.25276847502e+00 5.12157816785e-01 - 1007 2.20248194249e+00 5.12883592482e-01 - 1008 2.15208535699e+00 5.13757292299e-01 - 1009 2.10168915953e+00 5.14248531715e-01 - 1010 2.05189597960e+00 5.13151760934e-01 - 1011 2.00246620153e+00 5.11074328102e-01 - 1012 1.95306580129e+00 5.10105790635e-01 - 1013 1.90372903630e+00 5.10317945713e-01 - 1014 1.85412521731e+00 5.10563250726e-01 - 1015 1.80433246135e+00 5.10722451388e-01 - 1016 1.75444621312e+00 5.10823319175e-01 - 1017 1.70451738838e+00 5.10889905952e-01 - 1018 1.65456818750e+00 5.10933887180e-01 - 1019 1.60460674783e+00 5.10961974985e-01 - 1020 1.55463638760e+00 5.10978517981e-01 - 1021 1.50465860410e+00 5.10987327069e-01 - 1022 1.45467448150e+00 5.10991776483e-01 - 1023 1.40468511604e+00 5.10993910892e-01 - 1024 1.35469155924e+00 5.10994837055e-01 - 1025 1.30469453215e+00 5.10994984383e-01 - 1026 1.25469421531e+00 5.10994087357e-01 - 1027 1.20468744572e+00 5.10989606583e-01 - 1028 1.15467428651e+00 5.10974453402e-01 - 1029 1.10464021930e+00 5.10936177462e-01 - 1030 1.05457400884e+00 5.10859308282e-01 - 1031 1.00445569408e+00 5.10724190848e-01 - 1032 9.54262121816e-01 5.10504027998e-01 - 1033 9.03963937836e-01 5.10169937570e-01 - 1034 8.53525090737e-01 5.09687097510e-01 - 1035 8.02902747026e-01 5.09021350234e-01 - 1036 7.52043824807e-01 5.08140680771e-01 - 1037 2.68765022903e+00 6.46926709043e-01 - 1038 2.16967637864e+00 7.51466622567e-01 - 1039 2.12414767226e+00 7.45473015931e-01 - 1040 6.25249405888e-01 4.59680498098e-01 - 1041 2.96515185396e-01 5.97688202084e-01 - 1042 3.53168364003e-01 3.10112304904e-01 - 1043 5.49704406483e-01 4.10182934361e-01 - 1044 4.03516720186e-01 3.24070820431e-01 - 1045 3.02550285049e-01 5.52362347773e-01 - 1046 2.05160929625e+00 6.97164063309e-01 - 1047 2.69505727883e+00 5.92099983840e-01 - 1048 3.04996187544e-01 5.00455304107e-01 - 1049 2.25052167832e+00 6.88828096987e-01 - 1050 3.07166127559e-01 4.47605408459e-01 - 1051 3.10445443499e-01 3.93430207538e-01 - 1052 7.00883959245e-01 5.07035268436e-01 - 1053 3.68045611878e-01 6.40667546270e-01 - 1054 4.20538680977e-01 6.42367375719e-01 - 1055 4.71365151775e-01 6.42834245425e-01 - 1056 5.21674999700e-01 6.42370743120e-01 - 1057 5.71778732253e-01 6.41571877110e-01 - 1058 6.21963196760e-01 6.41191852855e-01 - 1059 6.72337700840e-01 6.41328638555e-01 - 1060 7.22775660069e-01 6.41691398973e-01 - 1061 7.73199071430e-01 6.42120878395e-01 - 1062 8.23572469310e-01 6.42535761233e-01 - 1063 8.73881141289e-01 6.42892335747e-01 - 1064 9.24123134403e-01 6.43174516681e-01 - 1065 9.74305479826e-01 6.43384540997e-01 - 1066 1.02443692961e+00 6.43531339703e-01 - 1067 1.07452844661e+00 6.43628160633e-01 - 1068 1.12458933713e+00 6.43687535887e-01 - 1069 1.17462851199e+00 6.43721686530e-01 - 1070 1.22465248226e+00 6.43739562980e-01 - 1071 1.27466638642e+00 6.43748472346e-01 - 1072 1.32467346229e+00 6.43752711425e-01 - 1073 1.37467557328e+00 6.43754750943e-01 - 1074 1.42467335502e+00 6.43755661799e-01 - 1075 1.47466644324e+00 6.43755485127e-01 - 1076 1.52465894544e+00 6.43750748784e-01 - 1077 1.57465617509e+00 6.43735102626e-01 - 1078 1.62466233040e+00 6.43709556632e-01 - 1079 1.67469457750e+00 6.43665225585e-01 - 1080 1.72478206212e+00 6.43607448893e-01 - 1081 1.77498562133e+00 6.43532790819e-01 - 1082 1.82542682848e+00 6.43429951340e-01 - 1083 1.87639488207e+00 6.43238537736e-01 - 1084 1.92875501479e+00 6.42670632107e-01 - 1085 1.98583082913e+00 6.40123959787e-01 - 1086 2.63190530515e+00 6.46397654275e-01 - 1087 2.58076741172e+00 6.43636182272e-01 - 1088 2.52923389833e+00 6.43917503344e-01 - 1089 2.47828220689e+00 6.44160777363e-01 - 1090 2.42763552325e+00 6.44350127602e-01 - 1091 2.37711959263e+00 6.44551026113e-01 - 1092 2.32672404698e+00 6.44732423399e-01 - 1093 4.64933081142e-01 3.89522828832e-01 - 1094 5.03051412031e-01 4.19160170069e-01 - 1095 2.61724145425e+00 5.50476910369e-01 - 1096 2.65357703313e+00 5.67749130685e-01 - 1097 2.57611895866e+00 5.54876613742e-01 - 1098 2.52754514806e+00 5.55582371589e-01 - 1099 2.47768803717e+00 5.55724582151e-01 - 1100 2.42757818829e+00 5.55777449335e-01 - 1101 2.37743980371e+00 5.55848988015e-01 - 1102 2.32732886356e+00 5.55970686692e-01 - 1103 2.27721625356e+00 5.56222857650e-01 - 1104 2.22694264240e+00 5.56931071220e-01 - 1105 2.17639246876e+00 5.58274366754e-01 - 1106 2.12539341597e+00 5.59753687508e-01 - 1107 2.07374082597e+00 5.60615432958e-01 - 1108 2.02449079820e+00 5.56660268036e-01 - 1109 1.97577106369e+00 5.53146354549e-01 - 1110 1.92735802543e+00 5.54135455536e-01 - 1111 1.87786701220e+00 5.54655789751e-01 - 1112 1.82797541281e+00 5.54889403479e-01 - 1113 1.77798250686e+00 5.55011674588e-01 - 1114 1.72798081063e+00 5.55087810505e-01 - 1115 1.67798757355e+00 5.55140769562e-01 - 1116 1.62800283891e+00 5.55177062166e-01 - 1117 1.57802108045e+00 5.55200201297e-01 - 1118 1.52803861285e+00 5.55213462530e-01 - 1119 1.47805347659e+00 5.55219706835e-01 - 1120 1.42806439294e+00 5.55222436838e-01 - 1121 1.37807106875e+00 5.55223389423e-01 - 1122 1.32807376054e+00 5.55223200508e-01 - 1123 1.27807233263e+00 5.55221568073e-01 - 1124 1.22806439614e+00 5.55216150396e-01 - 1125 1.17804839123e+00 5.55202484315e-01 - 1126 1.12801462712e+00 5.55169578680e-01 - 1127 1.07795521273e+00 5.55107333858e-01 - 1128 1.02785408152e+00 5.54997631675e-01 - 1129 9.77695114181e-01 5.54821958149e-01 - 1130 9.27455896946e-01 5.54556873859e-01 - 1131 8.77111992956e-01 5.54179636770e-01 - 1132 8.26634641189e-01 5.53667401202e-01 - 1133 7.75989110312e-01 5.53008907684e-01 - 1134 3.43558213079e-01 5.89153573105e-01 - 1135 2.17806904495e+00 6.48140104063e-01 - 1136 5.74701753066e-01 4.57443354719e-01 - 1137 5.31597755672e-01 4.53153411345e-01 - 1138 3.97269412643e-01 5.97472480861e-01 - 1139 2.03086499195e+00 6.57331637707e-01 - 1140 7.25133585667e-01 5.52212038352e-01 - 1141 2.27672302327e+00 6.44718274333e-01 - 1142 2.10308340794e+00 6.98409474042e-01 - 1143 6.49320893611e-01 5.05732294925e-01 - 1144 4.47322016331e-01 5.98932761561e-01 - 1145 4.97235404827e-01 5.98817917128e-01 - 1146 5.47049445290e-01 5.97101849321e-01 - 1147 5.97102976024e-01 5.95945566179e-01 - 1148 6.47762188791e-01 5.96105417542e-01 - 1149 6.98505829900e-01 5.96625855865e-01 - 1150 7.49180356578e-01 5.97218503019e-01 - 1151 7.99759863114e-01 5.97794217478e-01 - 1152 8.50223993820e-01 5.98284318669e-01 - 1153 9.00580703562e-01 5.98672840612e-01 - 1154 9.50844728554e-01 5.98962949034e-01 - 1155 1.00103360282e+00 5.99169066394e-01 - 1156 1.05116329451e+00 5.99307055815e-01 - 1157 1.10124913910e+00 5.99394535630e-01 - 1158 1.15130315580e+00 5.99445573184e-01 - 1159 1.20133582008e+00 5.99473549069e-01 - 1160 1.25135411823e+00 5.99486953348e-01 - 1161 1.30136336719e+00 5.99493133037e-01 - 1162 1.35136624875e+00 5.99495657178e-01 - 1163 1.40136417013e+00 5.99496349118e-01 - 1164 1.45135736976e+00 5.99495470491e-01 - 1165 1.50134759813e+00 5.99491549930e-01 - 1166 1.55133822369e+00 5.99480484110e-01 - 1167 1.60133137491e+00 5.99461032168e-01 - 1168 1.65133686906e+00 5.99428510131e-01 - 1169 1.70136909155e+00 5.99383892276e-01 - 1170 1.75145367070e+00 5.99324424365e-01 - 1171 1.80163044239e+00 5.99242638503e-01 - 1172 1.85194680004e+00 5.99101630424e-01 - 1173 1.90239162819e+00 5.98759874529e-01 - 1174 1.95237547084e+00 5.97644985563e-01 - 1175 2.16036506305e+00 7.01746482536e-01 - 1176 2.20597627921e+00 6.84178033851e-01 - 1177 3.61577983415e-01 3.66241296539e-01 - 1178 4.17192267488e-01 3.72766139667e-01 - 1179 3.50972065792e-01 4.23284715399e-01 - 1180 3.50256192480e-01 4.77032418299e-01 - 1181 3.46838658168e-01 5.30112395231e-01 - 1182 4.64989176543e-01 4.34484678358e-01 - 1183 4.89859797866e-01 4.73004458131e-01 - 1184 2.60896600627e+00 5.97009127102e-01 - 1185 2.55476965667e+00 5.99388678467e-01 - 1186 2.50351259867e+00 5.99878714012e-01 - 1187 2.45292973995e+00 6.00046283088e-01 - 1188 2.40254560313e+00 6.00174085141e-01 - 1189 2.35227379715e+00 6.00312881740e-01 - 1190 2.30214230722e+00 6.00437475476e-01 - 1191 2.25214196370e+00 6.00623465913e-01 - 1192 2.20185312500e+00 6.02006528503e-01 - 1193 2.15113010550e+00 6.04592853020e-01 - 1194 2.09878888858e+00 6.06603030639e-01 - 1195 2.04140667176e+00 6.09361151093e-01 - 1196 3.89118727559e-01 4.06113365046e-01 - 1197 4.96304807040e-01 5.18777874436e-01 - 1198 3.81592030162e-01 5.55208741251e-01 - 1199 4.27526978250e-01 4.20220150546e-01 - 1200 4.24967871819e-01 5.53989382286e-01 - 1201 2.22788684458e+00 6.44286996139e-01 - 1202 6.73982004215e-01 5.51309556303e-01 - 1203 2.07628534836e+00 6.52993763544e-01 - 1204 6.22624760221e-01 5.50466355679e-01 - 1205 2.12825645956e+00 6.52691011438e-01 - 1206 5.71076974789e-01 5.50007520095e-01 - 1207 5.21845350994e-01 5.53872903443e-01 - 1208 4.52170998396e-01 5.12278979585e-01 - 1209 4.72908857882e-01 5.56689057968e-01 - 1210 3.91822255726e-01 4.51735280710e-01 - 1211 3.97606047908e-01 5.06387391565e-01 - 1212 5.96862544569e-01 5.04251144849e-01 - 1213 5.41025845175e-01 5.01785562523e-01 - 1214 4.36800238088e-01 4.67707189075e-01 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 49 2 161 - 2 3 3 161 2 51 - 3 3 3 50 67 164 - 4 3 3 50 164 65 - 5 3 3 126 147 165 - 6 3 3 126 165 145 - 7 3 3 125 66 166 - 8 3 3 166 66 127 - 9 3 3 157 146 167 - 10 3 3 167 146 158 - 11 3 3 164 67 168 - 12 3 3 168 67 68 - 13 3 3 49 161 169 - 14 3 3 49 169 48 - 15 3 3 167 158 170 - 16 3 3 170 158 159 - 17 3 3 157 167 171 - 18 3 3 157 171 156 - 19 3 3 125 166 172 - 20 3 3 125 172 124 - 21 3 3 165 147 173 - 22 3 3 173 147 148 - 23 3 3 145 165 174 - 24 3 3 145 174 144 - 25 3 3 166 127 175 - 26 3 3 175 127 128 - 27 3 3 161 51 176 - 28 3 3 176 51 52 - 29 3 3 65 164 177 - 30 3 3 65 177 64 - 31 3 3 48 169 178 - 32 3 3 48 178 47 - 33 3 3 168 68 179 - 34 3 3 179 68 69 - 35 3 3 170 159 180 - 36 3 3 180 159 160 - 37 3 3 124 172 181 - 38 3 3 124 181 123 - 39 3 3 156 171 182 - 40 3 3 156 182 155 - 41 3 3 173 148 183 - 42 3 3 183 148 149 - 43 3 3 144 174 184 - 44 3 3 144 184 143 - 45 3 3 175 128 185 - 46 3 3 185 128 129 - 47 3 3 176 52 186 - 48 3 3 186 52 53 - 49 3 3 64 177 187 - 50 3 3 64 187 63 - 51 3 3 185 129 188 - 52 3 3 188 129 130 - 53 3 3 63 187 189 - 54 3 3 63 189 62 - 55 3 3 186 53 190 - 56 3 3 190 53 54 - 57 3 3 180 160 191 - 58 3 3 191 160 1 - 59 3 3 123 181 192 - 60 3 3 123 192 122 - 61 3 3 183 149 193 - 62 3 3 193 149 150 - 63 3 3 143 184 194 - 64 3 3 143 194 142 - 65 3 3 155 182 195 - 66 3 3 155 195 154 - 67 3 3 179 69 196 - 68 3 3 196 69 70 - 69 3 3 47 178 197 - 70 3 3 47 197 46 - 71 3 3 154 195 198 - 72 3 3 154 198 153 - 73 3 3 196 70 199 - 74 3 3 199 70 71 - 75 3 3 46 197 200 - 76 3 3 46 200 45 - 77 3 3 122 192 201 - 78 3 3 122 201 121 - 79 3 3 193 150 202 - 80 3 3 202 150 151 - 81 3 3 142 194 203 - 82 3 3 142 203 141 - 83 3 3 188 130 204 - 84 3 3 204 130 131 - 85 3 3 190 54 205 - 86 3 3 205 54 55 - 87 3 3 62 189 206 - 88 3 3 62 206 61 - 89 3 3 199 71 207 - 90 3 3 207 71 72 - 91 3 3 45 200 208 - 92 3 3 45 208 44 - 93 3 3 205 55 209 - 94 3 3 209 55 56 - 95 3 3 202 151 210 - 96 3 3 210 151 152 - 97 3 3 141 203 211 - 98 3 3 141 211 140 - 99 3 3 121 201 212 - 100 3 3 121 212 120 - 101 3 3 153 198 162 - 102 3 3 153 162 152 - 103 3 3 204 131 213 - 104 3 3 213 131 132 - 105 3 3 61 206 215 - 106 3 3 61 215 60 - 107 3 3 44 208 216 - 108 3 3 44 216 43 - 109 3 3 207 72 217 - 110 3 3 217 72 73 - 111 3 3 209 56 218 - 112 3 3 218 56 57 - 113 3 3 140 211 219 - 114 3 3 140 219 139 - 115 3 3 120 212 220 - 116 3 3 120 220 119 - 117 3 3 213 132 221 - 118 3 3 221 132 133 - 119 3 3 60 215 222 - 120 3 3 60 222 59 - 121 3 3 43 216 223 - 122 3 3 43 223 42 - 123 3 3 217 73 224 - 124 3 3 224 73 74 - 125 3 3 139 219 225 - 126 3 3 139 225 138 - 127 3 3 119 220 226 - 128 3 3 119 226 118 - 129 3 3 218 57 227 - 130 3 3 227 57 58 - 131 3 3 221 133 228 - 132 3 3 228 133 134 - 133 3 3 59 222 214 - 134 3 3 59 214 58 - 135 3 3 228 134 229 - 136 3 3 229 134 135 - 137 3 3 138 225 231 - 138 3 3 138 231 137 - 139 3 3 118 226 232 - 140 3 3 118 232 117 - 141 3 3 224 74 233 - 142 3 3 233 74 75 - 143 3 3 42 223 234 - 144 3 3 42 234 41 - 145 3 3 137 231 235 - 146 3 3 137 235 136 - 147 3 3 117 232 236 - 148 3 3 117 236 116 - 149 3 3 233 75 237 - 150 3 3 237 75 76 - 151 3 3 41 234 238 - 152 3 3 41 238 40 - 153 3 3 229 135 230 - 154 3 3 230 135 136 - 155 3 3 40 238 239 - 156 3 3 40 239 39 - 157 3 3 237 76 241 - 158 3 3 241 76 77 - 159 3 3 116 236 242 - 160 3 3 116 242 115 - 161 3 3 39 239 243 - 162 3 3 39 243 38 - 163 3 3 241 77 244 - 164 3 3 244 77 78 - 165 3 3 115 242 245 - 166 3 3 115 245 114 - 167 3 3 38 243 246 - 168 3 3 38 246 37 - 169 3 3 244 78 247 - 170 3 3 247 78 79 - 171 3 3 114 245 248 - 172 3 3 114 248 113 - 173 3 3 113 248 249 - 174 3 3 113 249 112 - 175 3 3 112 249 250 - 176 3 3 112 250 111 - 177 3 3 111 250 251 - 178 3 3 111 251 110 - 179 3 3 110 251 252 - 180 3 3 110 252 109 - 181 3 3 109 252 253 - 182 3 3 109 253 108 - 183 3 3 108 253 254 - 184 3 3 108 254 107 - 185 3 3 107 254 255 - 186 3 3 107 255 106 - 187 3 3 106 255 256 - 188 3 3 106 256 105 - 189 3 3 105 256 257 - 190 3 3 105 257 104 - 191 3 3 104 257 258 - 192 3 3 104 258 103 - 193 3 3 103 258 259 - 194 3 3 103 259 102 - 195 3 3 102 259 260 - 196 3 3 102 260 101 - 197 3 3 101 260 261 - 198 3 3 101 261 100 - 199 3 3 100 261 262 - 200 3 3 100 262 99 - 201 3 3 99 262 263 - 202 3 3 99 263 98 - 203 3 3 98 263 264 - 204 3 3 98 264 97 - 205 3 3 97 264 265 - 206 3 3 97 265 96 - 207 3 3 96 265 266 - 208 3 3 96 266 95 - 209 3 3 95 266 267 - 210 3 3 95 267 94 - 211 3 3 94 267 268 - 212 3 3 94 268 93 - 213 3 3 93 268 269 - 214 3 3 93 269 92 - 215 3 3 92 269 270 - 216 3 3 92 270 91 - 217 3 3 91 270 271 - 218 3 3 91 271 90 - 219 3 3 90 271 272 - 220 3 3 90 272 89 - 221 3 3 89 272 273 - 222 3 3 89 273 88 - 223 3 3 88 273 274 - 224 3 3 88 274 87 - 225 3 3 87 274 275 - 226 3 3 87 275 86 - 227 3 3 86 275 276 - 228 3 3 86 276 85 - 229 3 3 85 276 277 - 230 3 3 85 277 84 - 231 3 3 84 277 278 - 232 3 3 84 278 83 - 233 3 3 247 79 279 - 234 3 3 279 79 80 - 235 3 3 279 80 280 - 236 3 3 280 80 81 - 237 3 3 280 81 281 - 238 3 3 281 81 82 - 239 3 3 281 82 240 - 240 3 3 240 82 83 - 241 3 3 37 246 282 - 242 3 3 37 282 36 - 243 3 3 36 282 284 - 244 3 3 36 284 35 - 245 3 3 35 284 285 - 246 3 3 35 285 34 - 247 3 3 34 285 286 - 248 3 3 34 286 33 - 249 3 3 33 286 287 - 250 3 3 33 287 32 - 251 3 3 32 287 288 - 252 3 3 32 288 31 - 253 3 3 31 288 289 - 254 3 3 31 289 30 - 255 3 3 30 289 290 - 256 3 3 30 290 29 - 257 3 3 29 290 291 - 258 3 3 29 291 28 - 259 3 3 28 291 292 - 260 3 3 28 292 27 - 261 3 3 27 292 293 - 262 3 3 27 293 26 - 263 3 3 26 293 294 - 264 3 3 26 294 25 - 265 3 3 25 294 295 - 266 3 3 25 295 24 - 267 3 3 24 295 296 - 268 3 3 24 296 23 - 269 3 3 23 296 297 - 270 3 3 23 297 22 - 271 3 3 22 297 298 - 272 3 3 22 298 21 - 273 3 3 21 298 299 - 274 3 3 21 299 20 - 275 3 3 20 299 300 - 276 3 3 20 300 19 - 277 3 3 19 300 301 - 278 3 3 19 301 18 - 279 3 3 18 301 302 - 280 3 3 18 302 17 - 281 3 3 17 302 303 - 282 3 3 17 303 16 - 283 3 3 16 303 304 - 284 3 3 16 304 15 - 285 3 3 15 304 305 - 286 3 3 15 305 14 - 287 3 3 14 305 306 - 288 3 3 14 306 13 - 289 3 3 13 306 307 - 290 3 3 13 307 12 - 291 3 3 12 307 308 - 292 3 3 12 308 11 - 293 3 3 11 308 309 - 294 3 3 11 309 10 - 295 3 3 10 309 310 - 296 3 3 10 310 9 - 297 3 3 9 310 311 - 298 3 3 9 311 8 - 299 3 3 8 311 312 - 300 3 3 8 312 7 - 301 3 3 7 312 313 - 302 3 3 7 313 6 - 303 3 3 6 313 314 - 304 3 3 6 314 5 - 305 3 3 5 314 315 - 306 3 3 5 315 4 - 307 3 3 4 315 316 - 308 3 3 4 316 3 - 309 3 3 3 316 317 - 310 3 3 3 317 1 - 311 3 3 152 162 210 - 312 3 3 227 58 214 - 313 3 3 136 235 230 - 314 3 3 83 278 240 - 315 3 3 169 161 176 - 316 3 3 177 164 168 - 317 3 3 166 175 172 - 318 3 3 165 173 174 - 319 3 3 167 170 171 - 320 3 3 191 1 318 - 321 3 3 318 1 317 - 322 3 3 168 179 319 - 323 3 3 168 319 177 - 324 3 3 187 177 320 - 325 3 3 320 177 319 - 326 3 3 189 187 321 - 327 3 3 321 187 320 - 328 3 3 206 189 322 - 329 3 3 322 189 321 - 330 3 3 215 206 323 - 331 3 3 323 206 322 - 332 3 3 222 215 324 - 333 3 3 324 215 323 - 334 3 3 214 222 325 - 335 3 3 325 222 324 - 336 3 3 179 196 326 - 337 3 3 179 326 319 - 338 3 3 196 199 327 - 339 3 3 196 327 326 - 340 3 3 199 207 328 - 341 3 3 199 328 327 - 342 3 3 207 217 329 - 343 3 3 207 329 328 - 344 3 3 217 224 330 - 345 3 3 217 330 329 - 346 3 3 224 233 331 - 347 3 3 224 331 330 - 348 3 3 233 237 332 - 349 3 3 233 332 331 - 350 3 3 237 241 333 - 351 3 3 237 333 332 - 352 3 3 241 244 334 - 353 3 3 241 334 333 - 354 3 3 244 247 335 - 355 3 3 244 335 334 - 356 3 3 247 279 336 - 357 3 3 247 336 335 - 358 3 3 279 280 337 - 359 3 3 279 337 336 - 360 3 3 280 281 338 - 361 3 3 280 338 337 - 362 3 3 281 240 339 - 363 3 3 281 339 338 - 364 3 3 178 169 340 - 365 3 3 340 169 176 - 366 3 3 176 186 341 - 367 3 3 176 341 340 - 368 3 3 186 190 342 - 369 3 3 186 342 341 - 370 3 3 190 205 343 - 371 3 3 190 343 342 - 372 3 3 205 209 344 - 373 3 3 205 344 343 - 374 3 3 209 218 345 - 375 3 3 209 345 344 - 376 3 3 218 227 346 - 377 3 3 218 346 345 - 378 3 3 197 178 347 - 379 3 3 347 178 340 - 380 3 3 200 197 348 - 381 3 3 348 197 347 - 382 3 3 208 200 349 - 383 3 3 349 200 348 - 384 3 3 216 208 350 - 385 3 3 350 208 349 - 386 3 3 223 216 351 - 387 3 3 351 216 350 - 388 3 3 234 223 352 - 389 3 3 352 223 351 - 390 3 3 238 234 353 - 391 3 3 353 234 352 - 392 3 3 239 238 354 - 393 3 3 354 238 353 - 394 3 3 243 239 355 - 395 3 3 355 239 354 - 396 3 3 246 243 356 - 397 3 3 356 243 355 - 398 3 3 282 246 357 - 399 3 3 357 246 356 - 400 3 3 284 282 358 - 401 3 3 358 282 357 - 402 3 3 285 284 359 - 403 3 3 359 284 358 - 404 3 3 286 285 360 - 405 3 3 360 285 359 - 406 3 3 287 286 361 - 407 3 3 361 286 360 - 408 3 3 288 287 362 - 409 3 3 362 287 361 - 410 3 3 289 288 363 - 411 3 3 363 288 362 - 412 3 3 290 289 364 - 413 3 3 364 289 363 - 414 3 3 291 290 365 - 415 3 3 365 290 364 - 416 3 3 292 291 366 - 417 3 3 366 291 365 - 418 3 3 293 292 367 - 419 3 3 367 292 366 - 420 3 3 294 293 368 - 421 3 3 368 293 367 - 422 3 3 295 294 369 - 423 3 3 369 294 368 - 424 3 3 296 295 370 - 425 3 3 370 295 369 - 426 3 3 297 296 371 - 427 3 3 371 296 370 - 428 3 3 298 297 372 - 429 3 3 372 297 371 - 430 3 3 299 298 373 - 431 3 3 373 298 372 - 432 3 3 300 299 374 - 433 3 3 374 299 373 - 434 3 3 301 300 375 - 435 3 3 375 300 374 - 436 3 3 302 301 376 - 437 3 3 376 301 375 - 438 3 3 303 302 377 - 439 3 3 377 302 376 - 440 3 3 304 303 378 - 441 3 3 378 303 377 - 442 3 3 305 304 379 - 443 3 3 379 304 378 - 444 3 3 306 305 380 - 445 3 3 380 305 379 - 446 3 3 307 306 381 - 447 3 3 381 306 380 - 448 3 3 308 307 382 - 449 3 3 382 307 381 - 450 3 3 309 308 383 - 451 3 3 383 308 382 - 452 3 3 310 309 384 - 453 3 3 384 309 383 - 454 3 3 311 310 385 - 455 3 3 385 310 384 - 456 3 3 312 311 386 - 457 3 3 386 311 385 - 458 3 3 313 312 387 - 459 3 3 387 312 386 - 460 3 3 314 313 388 - 461 3 3 388 313 387 - 462 3 3 315 314 389 - 463 3 3 389 314 388 - 464 3 3 316 315 390 - 465 3 3 390 315 389 - 466 3 3 317 316 391 - 467 3 3 391 316 390 - 468 3 3 170 180 392 - 469 3 3 170 392 171 - 470 3 3 182 171 393 - 471 3 3 393 171 392 - 472 3 3 195 182 394 - 473 3 3 394 182 393 - 474 3 3 198 195 395 - 475 3 3 395 195 394 - 476 3 3 162 198 396 - 477 3 3 396 198 395 - 478 3 3 180 191 397 - 479 3 3 180 397 392 - 480 3 3 181 172 398 - 481 3 3 398 172 175 - 482 3 3 175 185 399 - 483 3 3 175 399 398 - 484 3 3 185 188 400 - 485 3 3 185 400 399 - 486 3 3 188 204 401 - 487 3 3 188 401 400 - 488 3 3 204 213 402 - 489 3 3 204 402 401 - 490 3 3 213 221 403 - 491 3 3 213 403 402 - 492 3 3 221 228 404 - 493 3 3 221 404 403 - 494 3 3 228 229 405 - 495 3 3 228 405 404 - 496 3 3 229 230 406 - 497 3 3 229 406 405 - 498 3 3 192 181 407 - 499 3 3 407 181 398 - 500 3 3 201 192 408 - 501 3 3 408 192 407 - 502 3 3 212 201 409 - 503 3 3 409 201 408 - 504 3 3 220 212 410 - 505 3 3 410 212 409 - 506 3 3 226 220 411 - 507 3 3 411 220 410 - 508 3 3 232 226 412 - 509 3 3 412 226 411 - 510 3 3 236 232 413 - 511 3 3 413 232 412 - 512 3 3 242 236 414 - 513 3 3 414 236 413 - 514 3 3 245 242 415 - 515 3 3 415 242 414 - 516 3 3 248 245 416 - 517 3 3 416 245 415 - 518 3 3 249 248 417 - 519 3 3 417 248 416 - 520 3 3 250 249 418 - 521 3 3 418 249 417 - 522 3 3 251 250 419 - 523 3 3 419 250 418 - 524 3 3 252 251 420 - 525 3 3 420 251 419 - 526 3 3 253 252 421 - 527 3 3 421 252 420 - 528 3 3 254 253 422 - 529 3 3 422 253 421 - 530 3 3 255 254 423 - 531 3 3 423 254 422 - 532 3 3 256 255 424 - 533 3 3 424 255 423 - 534 3 3 257 256 425 - 535 3 3 425 256 424 - 536 3 3 258 257 426 - 537 3 3 426 257 425 - 538 3 3 259 258 427 - 539 3 3 427 258 426 - 540 3 3 260 259 428 - 541 3 3 428 259 427 - 542 3 3 261 260 429 - 543 3 3 429 260 428 - 544 3 3 262 261 430 - 545 3 3 430 261 429 - 546 3 3 263 262 431 - 547 3 3 431 262 430 - 548 3 3 264 263 432 - 549 3 3 432 263 431 - 550 3 3 265 264 433 - 551 3 3 433 264 432 - 552 3 3 266 265 434 - 553 3 3 434 265 433 - 554 3 3 267 266 435 - 555 3 3 435 266 434 - 556 3 3 268 267 436 - 557 3 3 436 267 435 - 558 3 3 269 268 437 - 559 3 3 437 268 436 - 560 3 3 270 269 438 - 561 3 3 438 269 437 - 562 3 3 271 270 439 - 563 3 3 439 270 438 - 564 3 3 272 271 440 - 565 3 3 440 271 439 - 566 3 3 273 272 441 - 567 3 3 441 272 440 - 568 3 3 274 273 442 - 569 3 3 442 273 441 - 570 3 3 275 274 443 - 571 3 3 443 274 442 - 572 3 3 276 275 444 - 573 3 3 444 275 443 - 574 3 3 277 276 445 - 575 3 3 445 276 444 - 576 3 3 278 277 446 - 577 3 3 446 277 445 - 578 3 3 173 183 447 - 579 3 3 173 447 174 - 580 3 3 184 174 448 - 581 3 3 448 174 447 - 582 3 3 194 184 449 - 583 3 3 449 184 448 - 584 3 3 203 194 450 - 585 3 3 450 194 449 - 586 3 3 211 203 451 - 587 3 3 451 203 450 - 588 3 3 219 211 452 - 589 3 3 452 211 451 - 590 3 3 225 219 453 - 591 3 3 453 219 452 - 592 3 3 231 225 454 - 593 3 3 454 225 453 - 594 3 3 235 231 455 - 595 3 3 455 231 454 - 596 3 3 183 193 456 - 597 3 3 183 456 447 - 598 3 3 193 202 457 - 599 3 3 193 457 456 - 600 3 3 202 210 458 - 601 3 3 202 458 457 - 602 3 3 162 396 210 - 603 3 3 458 210 396 - 604 3 3 227 214 325 - 605 3 3 346 227 325 - 606 3 3 230 235 406 - 607 3 3 235 455 406 - 608 3 3 240 278 339 - 609 3 3 278 446 459 - 610 3 3 278 459 339 - 611 3 3 319 326 460 - 612 3 3 319 460 320 - 613 3 3 321 320 460 - 614 3 3 340 341 461 - 615 3 3 340 461 347 - 616 3 3 341 342 461 - 617 3 3 392 397 462 - 618 3 3 392 462 393 - 619 3 3 394 393 462 - 620 3 3 398 399 463 - 621 3 3 398 463 407 - 622 3 3 399 400 463 - 623 3 3 448 447 464 - 624 3 3 464 447 456 - 625 3 3 449 448 464 - 626 3 3 348 347 465 - 627 3 3 465 347 461 - 628 3 3 349 348 466 - 629 3 3 466 348 465 - 630 3 3 350 349 467 - 631 3 3 467 349 466 - 632 3 3 351 350 468 - 633 3 3 468 350 467 - 634 3 3 352 351 469 - 635 3 3 469 351 468 - 636 3 3 353 352 470 - 637 3 3 470 352 469 - 638 3 3 354 353 471 - 639 3 3 471 353 470 - 640 3 3 355 354 472 - 641 3 3 472 354 471 - 642 3 3 356 355 473 - 643 3 3 473 355 472 - 644 3 3 357 356 474 - 645 3 3 474 356 473 - 646 3 3 358 357 475 - 647 3 3 475 357 474 - 648 3 3 359 358 476 - 649 3 3 476 358 475 - 650 3 3 360 359 477 - 651 3 3 477 359 476 - 652 3 3 361 360 478 - 653 3 3 478 360 477 - 654 3 3 362 361 479 - 655 3 3 479 361 478 - 656 3 3 363 362 480 - 657 3 3 480 362 479 - 658 3 3 364 363 481 - 659 3 3 481 363 480 - 660 3 3 365 364 482 - 661 3 3 482 364 481 - 662 3 3 366 365 483 - 663 3 3 483 365 482 - 664 3 3 367 366 484 - 665 3 3 484 366 483 - 666 3 3 368 367 485 - 667 3 3 485 367 484 - 668 3 3 369 368 486 - 669 3 3 486 368 485 - 670 3 3 370 369 487 - 671 3 3 487 369 486 - 672 3 3 371 370 488 - 673 3 3 488 370 487 - 674 3 3 372 371 489 - 675 3 3 489 371 488 - 676 3 3 373 372 490 - 677 3 3 490 372 489 - 678 3 3 374 373 491 - 679 3 3 491 373 490 - 680 3 3 375 374 492 - 681 3 3 492 374 491 - 682 3 3 376 375 493 - 683 3 3 493 375 492 - 684 3 3 377 376 494 - 685 3 3 494 376 493 - 686 3 3 378 377 495 - 687 3 3 495 377 494 - 688 3 3 379 378 496 - 689 3 3 496 378 495 - 690 3 3 380 379 497 - 691 3 3 497 379 496 - 692 3 3 381 380 498 - 693 3 3 498 380 497 - 694 3 3 382 381 499 - 695 3 3 499 381 498 - 696 3 3 383 382 500 - 697 3 3 500 382 499 - 698 3 3 384 383 501 - 699 3 3 501 383 500 - 700 3 3 385 384 502 - 701 3 3 502 384 501 - 702 3 3 386 385 503 - 703 3 3 503 385 502 - 704 3 3 387 386 504 - 705 3 3 504 386 503 - 706 3 3 388 387 505 - 707 3 3 505 387 504 - 708 3 3 389 388 506 - 709 3 3 506 388 505 - 710 3 3 390 389 507 - 711 3 3 507 389 506 - 712 3 3 391 390 508 - 713 3 3 508 390 507 - 714 3 3 408 407 509 - 715 3 3 509 407 463 - 716 3 3 409 408 510 - 717 3 3 510 408 509 - 718 3 3 410 409 511 - 719 3 3 511 409 510 - 720 3 3 411 410 512 - 721 3 3 512 410 511 - 722 3 3 412 411 513 - 723 3 3 513 411 512 - 724 3 3 413 412 514 - 725 3 3 514 412 513 - 726 3 3 414 413 515 - 727 3 3 515 413 514 - 728 3 3 415 414 516 - 729 3 3 516 414 515 - 730 3 3 416 415 517 - 731 3 3 517 415 516 - 732 3 3 417 416 518 - 733 3 3 518 416 517 - 734 3 3 418 417 519 - 735 3 3 519 417 518 - 736 3 3 419 418 520 - 737 3 3 520 418 519 - 738 3 3 420 419 521 - 739 3 3 521 419 520 - 740 3 3 421 420 522 - 741 3 3 522 420 521 - 742 3 3 422 421 523 - 743 3 3 523 421 522 - 744 3 3 423 422 524 - 745 3 3 524 422 523 - 746 3 3 424 423 525 - 747 3 3 525 423 524 - 748 3 3 425 424 526 - 749 3 3 526 424 525 - 750 3 3 426 425 527 - 751 3 3 527 425 526 - 752 3 3 427 426 528 - 753 3 3 528 426 527 - 754 3 3 428 427 529 - 755 3 3 529 427 528 - 756 3 3 429 428 530 - 757 3 3 530 428 529 - 758 3 3 430 429 531 - 759 3 3 531 429 530 - 760 3 3 431 430 532 - 761 3 3 532 430 531 - 762 3 3 432 431 533 - 763 3 3 533 431 532 - 764 3 3 433 432 534 - 765 3 3 534 432 533 - 766 3 3 434 433 535 - 767 3 3 535 433 534 - 768 3 3 435 434 536 - 769 3 3 536 434 535 - 770 3 3 436 435 537 - 771 3 3 537 435 536 - 772 3 3 437 436 538 - 773 3 3 538 436 537 - 774 3 3 438 437 539 - 775 3 3 539 437 538 - 776 3 3 439 438 540 - 777 3 3 540 438 539 - 778 3 3 440 439 541 - 779 3 3 541 439 540 - 780 3 3 441 440 542 - 781 3 3 542 440 541 - 782 3 3 442 441 543 - 783 3 3 543 441 542 - 784 3 3 443 442 544 - 785 3 3 544 442 543 - 786 3 3 444 443 545 - 787 3 3 545 443 544 - 788 3 3 445 444 546 - 789 3 3 546 444 545 - 790 3 3 446 445 547 - 791 3 3 547 445 546 - 792 3 3 456 457 548 - 793 3 3 456 548 464 - 794 3 3 457 458 549 - 795 3 3 457 549 548 - 796 3 3 326 327 550 - 797 3 3 326 550 460 - 798 3 3 327 328 551 - 799 3 3 327 551 550 - 800 3 3 328 329 552 - 801 3 3 328 552 551 - 802 3 3 329 330 553 - 803 3 3 329 553 552 - 804 3 3 330 331 554 - 805 3 3 330 554 553 - 806 3 3 331 332 555 - 807 3 3 331 555 554 - 808 3 3 332 333 556 - 809 3 3 332 556 555 - 810 3 3 333 334 557 - 811 3 3 333 557 556 - 812 3 3 334 335 558 - 813 3 3 334 558 557 - 814 3 3 335 336 559 - 815 3 3 335 559 558 - 816 3 3 336 337 560 - 817 3 3 336 560 559 - 818 3 3 337 338 561 - 819 3 3 337 561 560 - 820 3 3 338 339 562 - 821 3 3 338 562 561 - 822 3 3 400 401 563 - 823 3 3 400 563 463 - 824 3 3 401 402 564 - 825 3 3 401 564 563 - 826 3 3 402 403 565 - 827 3 3 402 565 564 - 828 3 3 403 404 566 - 829 3 3 403 566 565 - 830 3 3 404 405 567 - 831 3 3 404 567 566 - 832 3 3 405 406 568 - 833 3 3 405 568 567 - 834 3 3 450 449 569 - 835 3 3 569 449 464 - 836 3 3 451 450 570 - 837 3 3 570 450 569 - 838 3 3 452 451 571 - 839 3 3 571 451 570 - 840 3 3 453 452 572 - 841 3 3 572 452 571 - 842 3 3 454 453 573 - 843 3 3 573 453 572 - 844 3 3 455 454 574 - 845 3 3 574 454 573 - 846 3 3 395 394 575 - 847 3 3 575 394 462 - 848 3 3 396 395 576 - 849 3 3 576 395 575 - 850 3 3 322 321 577 - 851 3 3 577 321 460 - 852 3 3 323 322 578 - 853 3 3 578 322 577 - 854 3 3 324 323 579 - 855 3 3 579 323 578 - 856 3 3 325 324 580 - 857 3 3 580 324 579 - 858 3 3 342 343 581 - 859 3 3 342 581 461 - 860 3 3 343 344 582 - 861 3 3 343 582 581 - 862 3 3 344 345 583 - 863 3 3 344 583 582 - 864 3 3 345 346 584 - 865 3 3 345 584 583 - 866 3 3 317 391 585 - 867 3 3 317 585 318 - 868 3 3 397 191 586 - 869 3 3 586 191 318 - 870 3 3 577 460 587 - 871 3 3 587 460 550 - 872 3 3 465 461 588 - 873 3 3 588 461 581 - 874 3 3 569 464 589 - 875 3 3 589 464 548 - 876 3 3 509 463 590 - 877 3 3 590 463 563 - 878 3 3 446 547 591 - 879 3 3 446 591 459 - 880 3 3 339 459 592 - 881 3 3 339 592 562 - 882 3 3 466 465 593 - 883 3 3 593 465 588 - 884 3 3 548 549 594 - 885 3 3 548 594 589 - 886 3 3 550 551 595 - 887 3 3 550 595 587 - 888 3 3 510 509 596 - 889 3 3 596 509 590 - 890 3 3 511 510 597 - 891 3 3 597 510 596 - 892 3 3 551 552 598 - 893 3 3 551 598 595 - 894 3 3 467 466 599 - 895 3 3 599 466 593 - 896 3 3 552 553 600 - 897 3 3 552 600 598 - 898 3 3 512 511 601 - 899 3 3 601 511 597 - 900 3 3 468 467 602 - 901 3 3 602 467 599 - 902 3 3 553 554 603 - 903 3 3 553 603 600 - 904 3 3 469 468 604 - 905 3 3 604 468 602 - 906 3 3 513 512 605 - 907 3 3 605 512 601 - 908 3 3 554 555 606 - 909 3 3 554 606 603 - 910 3 3 470 469 607 - 911 3 3 607 469 604 - 912 3 3 514 513 608 - 913 3 3 608 513 605 - 914 3 3 471 470 609 - 915 3 3 609 470 607 - 916 3 3 555 556 610 - 917 3 3 555 610 606 - 918 3 3 515 514 611 - 919 3 3 611 514 608 - 920 3 3 516 515 612 - 921 3 3 612 515 611 - 922 3 3 556 557 613 - 923 3 3 556 613 610 - 924 3 3 472 471 614 - 925 3 3 614 471 609 - 926 3 3 517 516 615 - 927 3 3 615 516 612 - 928 3 3 557 558 616 - 929 3 3 557 616 613 - 930 3 3 473 472 617 - 931 3 3 617 472 614 - 932 3 3 558 559 618 - 933 3 3 558 618 616 - 934 3 3 474 473 619 - 935 3 3 619 473 617 - 936 3 3 518 517 620 - 937 3 3 620 517 615 - 938 3 3 475 474 621 - 939 3 3 621 474 619 - 940 3 3 559 560 622 - 941 3 3 559 622 618 - 942 3 3 519 518 623 - 943 3 3 623 518 620 - 944 3 3 520 519 624 - 945 3 3 624 519 623 - 946 3 3 476 475 625 - 947 3 3 625 475 621 - 948 3 3 560 561 626 - 949 3 3 560 626 622 - 950 3 3 521 520 627 - 951 3 3 627 520 624 - 952 3 3 477 476 628 - 953 3 3 628 476 625 - 954 3 3 478 477 629 - 955 3 3 629 477 628 - 956 3 3 479 478 630 - 957 3 3 630 478 629 - 958 3 3 522 521 631 - 959 3 3 631 521 627 - 960 3 3 480 479 632 - 961 3 3 632 479 630 - 962 3 3 523 522 633 - 963 3 3 633 522 631 - 964 3 3 524 523 634 - 965 3 3 634 523 633 - 966 3 3 525 524 635 - 967 3 3 635 524 634 - 968 3 3 526 525 636 - 969 3 3 636 525 635 - 970 3 3 527 526 637 - 971 3 3 637 526 636 - 972 3 3 528 527 638 - 973 3 3 638 527 637 - 974 3 3 529 528 639 - 975 3 3 639 528 638 - 976 3 3 530 529 640 - 977 3 3 640 529 639 - 978 3 3 531 530 641 - 979 3 3 641 530 640 - 980 3 3 532 531 642 - 981 3 3 642 531 641 - 982 3 3 533 532 643 - 983 3 3 643 532 642 - 984 3 3 534 533 644 - 985 3 3 644 533 643 - 986 3 3 535 534 645 - 987 3 3 645 534 644 - 988 3 3 536 535 646 - 989 3 3 646 535 645 - 990 3 3 537 536 647 - 991 3 3 647 536 646 - 992 3 3 538 537 648 - 993 3 3 648 537 647 - 994 3 3 539 538 649 - 995 3 3 649 538 648 - 996 3 3 540 539 650 - 997 3 3 650 539 649 - 998 3 3 541 540 651 - 999 3 3 651 540 650 - 1000 3 3 542 541 652 - 1001 3 3 652 541 651 - 1002 3 3 543 542 653 - 1003 3 3 653 542 652 - 1004 3 3 544 543 654 - 1005 3 3 654 543 653 - 1006 3 3 545 544 655 - 1007 3 3 655 544 654 - 1008 3 3 546 545 656 - 1009 3 3 656 545 655 - 1010 3 3 547 546 657 - 1011 3 3 657 546 656 - 1012 3 3 481 480 658 - 1013 3 3 658 480 632 - 1014 3 3 482 481 659 - 1015 3 3 659 481 658 - 1016 3 3 483 482 660 - 1017 3 3 660 482 659 - 1018 3 3 484 483 661 - 1019 3 3 661 483 660 - 1020 3 3 485 484 662 - 1021 3 3 662 484 661 - 1022 3 3 486 485 663 - 1023 3 3 663 485 662 - 1024 3 3 487 486 664 - 1025 3 3 664 486 663 - 1026 3 3 488 487 665 - 1027 3 3 665 487 664 - 1028 3 3 489 488 666 - 1029 3 3 666 488 665 - 1030 3 3 490 489 667 - 1031 3 3 667 489 666 - 1032 3 3 491 490 668 - 1033 3 3 668 490 667 - 1034 3 3 492 491 669 - 1035 3 3 669 491 668 - 1036 3 3 493 492 670 - 1037 3 3 670 492 669 - 1038 3 3 494 493 671 - 1039 3 3 671 493 670 - 1040 3 3 495 494 672 - 1041 3 3 672 494 671 - 1042 3 3 496 495 673 - 1043 3 3 673 495 672 - 1044 3 3 497 496 674 - 1045 3 3 674 496 673 - 1046 3 3 498 497 675 - 1047 3 3 675 497 674 - 1048 3 3 499 498 676 - 1049 3 3 676 498 675 - 1050 3 3 500 499 677 - 1051 3 3 677 499 676 - 1052 3 3 501 500 678 - 1053 3 3 678 500 677 - 1054 3 3 502 501 679 - 1055 3 3 679 501 678 - 1056 3 3 503 502 680 - 1057 3 3 680 502 679 - 1058 3 3 504 503 681 - 1059 3 3 681 503 680 - 1060 3 3 505 504 682 - 1061 3 3 682 504 681 - 1062 3 3 506 505 683 - 1063 3 3 683 505 682 - 1064 3 3 507 506 684 - 1065 3 3 684 506 683 - 1066 3 3 508 507 685 - 1067 3 3 685 507 684 - 1068 3 3 561 562 686 - 1069 3 3 561 686 626 - 1070 3 3 568 406 687 - 1071 3 3 687 406 455 - 1072 3 3 455 574 687 - 1073 3 3 346 325 688 - 1074 3 3 688 325 580 - 1075 3 3 584 346 688 - 1076 3 3 563 564 689 - 1077 3 3 563 689 590 - 1078 3 3 570 569 690 - 1079 3 3 690 569 589 - 1080 3 3 578 577 691 - 1081 3 3 691 577 587 - 1082 3 3 581 582 692 - 1083 3 3 581 692 588 - 1084 3 3 458 396 693 - 1085 3 3 693 396 576 - 1086 3 3 549 458 693 - 1087 3 3 564 565 694 - 1088 3 3 564 694 689 - 1089 3 3 565 566 695 - 1090 3 3 565 695 694 - 1091 3 3 566 567 696 - 1092 3 3 566 696 695 - 1093 3 3 567 568 697 - 1094 3 3 567 697 696 - 1095 3 3 579 578 698 - 1096 3 3 698 578 691 - 1097 3 3 582 583 699 - 1098 3 3 582 699 692 - 1099 3 3 583 584 700 - 1100 3 3 583 700 699 - 1101 3 3 571 570 701 - 1102 3 3 701 570 690 - 1103 3 3 572 571 702 - 1104 3 3 702 571 701 - 1105 3 3 573 572 703 - 1106 3 3 703 572 702 - 1107 3 3 574 573 704 - 1108 3 3 704 573 703 - 1109 3 3 580 579 705 - 1110 3 3 705 579 698 - 1111 3 3 391 508 706 - 1112 3 3 391 706 585 - 1113 3 3 462 397 707 - 1114 3 3 707 397 586 - 1115 3 3 575 462 708 - 1116 3 3 708 462 707 - 1117 3 3 576 575 709 - 1118 3 3 709 575 708 - 1119 3 3 318 585 710 - 1120 3 3 318 710 586 - 1121 3 3 459 591 592 - 1122 3 3 691 587 595 - 1123 3 3 593 588 692 - 1124 3 3 690 589 594 - 1125 3 3 590 689 596 - 1126 3 3 547 657 711 - 1127 3 3 547 711 591 - 1128 3 3 594 549 712 - 1129 3 3 712 549 693 - 1130 3 3 686 562 713 - 1131 3 3 713 562 592 - 1132 3 3 706 508 714 - 1133 3 3 714 508 685 - 1134 3 3 693 576 715 - 1135 3 3 693 715 712 - 1136 3 3 576 709 715 - 1137 3 3 688 580 716 - 1138 3 3 716 580 705 - 1139 3 3 584 688 717 - 1140 3 3 717 688 716 - 1141 3 3 700 584 717 - 1142 3 3 687 574 718 - 1143 3 3 718 574 704 - 1144 3 3 568 687 719 - 1145 3 3 719 687 718 - 1146 3 3 697 568 719 - 1147 3 3 689 694 720 - 1148 3 3 689 720 596 - 1149 3 3 597 596 721 - 1150 3 3 721 596 720 - 1151 3 3 601 597 722 - 1152 3 3 722 597 721 - 1153 3 3 605 601 723 - 1154 3 3 723 601 722 - 1155 3 3 608 605 724 - 1156 3 3 724 605 723 - 1157 3 3 611 608 725 - 1158 3 3 725 608 724 - 1159 3 3 612 611 726 - 1160 3 3 726 611 725 - 1161 3 3 615 612 727 - 1162 3 3 727 612 726 - 1163 3 3 620 615 728 - 1164 3 3 728 615 727 - 1165 3 3 623 620 729 - 1166 3 3 729 620 728 - 1167 3 3 624 623 730 - 1168 3 3 730 623 729 - 1169 3 3 627 624 731 - 1170 3 3 731 624 730 - 1171 3 3 631 627 732 - 1172 3 3 732 627 731 - 1173 3 3 633 631 733 - 1174 3 3 733 631 732 - 1175 3 3 634 633 734 - 1176 3 3 734 633 733 - 1177 3 3 635 634 735 - 1178 3 3 735 634 734 - 1179 3 3 636 635 736 - 1180 3 3 736 635 735 - 1181 3 3 637 636 737 - 1182 3 3 737 636 736 - 1183 3 3 638 637 738 - 1184 3 3 738 637 737 - 1185 3 3 639 638 739 - 1186 3 3 739 638 738 - 1187 3 3 640 639 740 - 1188 3 3 740 639 739 - 1189 3 3 641 640 741 - 1190 3 3 741 640 740 - 1191 3 3 642 641 742 - 1192 3 3 742 641 741 - 1193 3 3 643 642 743 - 1194 3 3 743 642 742 - 1195 3 3 644 643 744 - 1196 3 3 744 643 743 - 1197 3 3 645 644 745 - 1198 3 3 745 644 744 - 1199 3 3 646 645 746 - 1200 3 3 746 645 745 - 1201 3 3 647 646 747 - 1202 3 3 747 646 746 - 1203 3 3 648 647 748 - 1204 3 3 748 647 747 - 1205 3 3 649 648 749 - 1206 3 3 749 648 748 - 1207 3 3 650 649 750 - 1208 3 3 750 649 749 - 1209 3 3 651 650 751 - 1210 3 3 751 650 750 - 1211 3 3 652 651 752 - 1212 3 3 752 651 751 - 1213 3 3 653 652 753 - 1214 3 3 753 652 752 - 1215 3 3 654 653 754 - 1216 3 3 754 653 753 - 1217 3 3 655 654 755 - 1218 3 3 755 654 754 - 1219 3 3 656 655 756 - 1220 3 3 756 655 755 - 1221 3 3 657 656 757 - 1222 3 3 757 656 756 - 1223 3 3 694 695 758 - 1224 3 3 694 758 720 - 1225 3 3 695 696 759 - 1226 3 3 695 759 758 - 1227 3 3 696 697 760 - 1228 3 3 696 760 759 - 1229 3 3 701 690 761 - 1230 3 3 761 690 594 - 1231 3 3 702 701 762 - 1232 3 3 762 701 761 - 1233 3 3 703 702 763 - 1234 3 3 763 702 762 - 1235 3 3 704 703 764 - 1236 3 3 764 703 763 - 1237 3 3 698 691 765 - 1238 3 3 765 691 595 - 1239 3 3 595 598 766 - 1240 3 3 595 766 765 - 1241 3 3 598 600 767 - 1242 3 3 598 767 766 - 1243 3 3 600 603 768 - 1244 3 3 600 768 767 - 1245 3 3 603 606 769 - 1246 3 3 603 769 768 - 1247 3 3 606 610 770 - 1248 3 3 606 770 769 - 1249 3 3 610 613 771 - 1250 3 3 610 771 770 - 1251 3 3 613 616 772 - 1252 3 3 613 772 771 - 1253 3 3 616 618 773 - 1254 3 3 616 773 772 - 1255 3 3 618 622 774 - 1256 3 3 618 774 773 - 1257 3 3 622 626 775 - 1258 3 3 622 775 774 - 1259 3 3 626 686 776 - 1260 3 3 626 776 775 - 1261 3 3 705 698 777 - 1262 3 3 777 698 765 - 1263 3 3 692 699 778 - 1264 3 3 692 778 593 - 1265 3 3 599 593 779 - 1266 3 3 779 593 778 - 1267 3 3 602 599 780 - 1268 3 3 780 599 779 - 1269 3 3 604 602 781 - 1270 3 3 781 602 780 - 1271 3 3 607 604 782 - 1272 3 3 782 604 781 - 1273 3 3 609 607 783 - 1274 3 3 783 607 782 - 1275 3 3 614 609 784 - 1276 3 3 784 609 783 - 1277 3 3 617 614 785 - 1278 3 3 785 614 784 - 1279 3 3 619 617 786 - 1280 3 3 786 617 785 - 1281 3 3 621 619 787 - 1282 3 3 787 619 786 - 1283 3 3 625 621 788 - 1284 3 3 788 621 787 - 1285 3 3 628 625 789 - 1286 3 3 789 625 788 - 1287 3 3 629 628 790 - 1288 3 3 790 628 789 - 1289 3 3 630 629 791 - 1290 3 3 791 629 790 - 1291 3 3 632 630 792 - 1292 3 3 792 630 791 - 1293 3 3 658 632 793 - 1294 3 3 793 632 792 - 1295 3 3 659 658 794 - 1296 3 3 794 658 793 - 1297 3 3 660 659 795 - 1298 3 3 795 659 794 - 1299 3 3 661 660 796 - 1300 3 3 796 660 795 - 1301 3 3 662 661 797 - 1302 3 3 797 661 796 - 1303 3 3 663 662 798 - 1304 3 3 798 662 797 - 1305 3 3 664 663 799 - 1306 3 3 799 663 798 - 1307 3 3 665 664 800 - 1308 3 3 800 664 799 - 1309 3 3 666 665 801 - 1310 3 3 801 665 800 - 1311 3 3 667 666 802 - 1312 3 3 802 666 801 - 1313 3 3 668 667 803 - 1314 3 3 803 667 802 - 1315 3 3 669 668 804 - 1316 3 3 804 668 803 - 1317 3 3 670 669 805 - 1318 3 3 805 669 804 - 1319 3 3 671 670 806 - 1320 3 3 806 670 805 - 1321 3 3 672 671 807 - 1322 3 3 807 671 806 - 1323 3 3 673 672 808 - 1324 3 3 808 672 807 - 1325 3 3 674 673 809 - 1326 3 3 809 673 808 - 1327 3 3 675 674 810 - 1328 3 3 810 674 809 - 1329 3 3 676 675 811 - 1330 3 3 811 675 810 - 1331 3 3 677 676 812 - 1332 3 3 812 676 811 - 1333 3 3 678 677 813 - 1334 3 3 813 677 812 - 1335 3 3 679 678 814 - 1336 3 3 814 678 813 - 1337 3 3 680 679 815 - 1338 3 3 815 679 814 - 1339 3 3 681 680 816 - 1340 3 3 816 680 815 - 1341 3 3 682 681 817 - 1342 3 3 817 681 816 - 1343 3 3 683 682 818 - 1344 3 3 818 682 817 - 1345 3 3 684 683 819 - 1346 3 3 819 683 818 - 1347 3 3 685 684 820 - 1348 3 3 820 684 819 - 1349 3 3 699 700 821 - 1350 3 3 699 821 778 - 1351 3 3 710 585 822 - 1352 3 3 822 585 706 - 1353 3 3 586 710 823 - 1354 3 3 586 823 707 - 1355 3 3 708 707 824 - 1356 3 3 824 707 823 - 1357 3 3 709 708 824 - 1358 3 3 594 712 825 - 1359 3 3 594 825 761 - 1360 3 3 686 713 826 - 1361 3 3 686 826 776 - 1362 3 3 592 591 163 - 1363 3 3 592 163 713 - 1364 3 3 591 711 163 - 1365 3 3 711 657 827 - 1366 3 3 827 657 757 - 1367 3 3 712 715 829 - 1368 3 3 712 829 825 - 1369 3 3 715 709 830 - 1370 3 3 715 830 829 - 1371 3 3 709 824 830 - 1372 3 3 720 758 831 - 1373 3 3 720 831 721 - 1374 3 3 722 721 831 - 1375 3 3 779 778 832 - 1376 3 3 832 778 821 - 1377 3 3 780 779 832 - 1378 3 3 762 761 833 - 1379 3 3 833 761 825 - 1380 3 3 765 766 834 - 1381 3 3 765 834 777 - 1382 3 3 766 767 834 - 1383 3 3 685 820 835 - 1384 3 3 685 835 714 - 1385 3 3 704 764 836 - 1386 3 3 704 836 718 - 1387 3 3 719 718 837 - 1388 3 3 837 718 836 - 1389 3 3 697 719 838 - 1390 3 3 838 719 837 - 1391 3 3 760 697 838 - 1392 3 3 821 700 839 - 1393 3 3 839 700 717 - 1394 3 3 717 716 840 - 1395 3 3 717 840 839 - 1396 3 3 716 705 841 - 1397 3 3 716 841 840 - 1398 3 3 705 777 841 - 1399 3 3 758 759 842 - 1400 3 3 758 842 831 - 1401 3 3 759 760 843 - 1402 3 3 759 843 842 - 1403 3 3 763 762 844 - 1404 3 3 844 762 833 - 1405 3 3 764 763 845 - 1406 3 3 845 763 844 - 1407 3 3 706 714 846 - 1408 3 3 706 846 822 - 1409 3 3 767 768 847 - 1410 3 3 767 847 834 - 1411 3 3 768 769 848 - 1412 3 3 768 848 847 - 1413 3 3 769 770 849 - 1414 3 3 769 849 848 - 1415 3 3 770 771 850 - 1416 3 3 770 850 849 - 1417 3 3 771 772 851 - 1418 3 3 771 851 850 - 1419 3 3 772 773 852 - 1420 3 3 772 852 851 - 1421 3 3 773 774 853 - 1422 3 3 773 853 852 - 1423 3 3 774 775 854 - 1424 3 3 774 854 853 - 1425 3 3 775 776 855 - 1426 3 3 775 855 854 - 1427 3 3 723 722 856 - 1428 3 3 856 722 831 - 1429 3 3 724 723 857 - 1430 3 3 857 723 856 - 1431 3 3 725 724 858 - 1432 3 3 858 724 857 - 1433 3 3 726 725 859 - 1434 3 3 859 725 858 - 1435 3 3 727 726 860 - 1436 3 3 860 726 859 - 1437 3 3 728 727 861 - 1438 3 3 861 727 860 - 1439 3 3 729 728 862 - 1440 3 3 862 728 861 - 1441 3 3 730 729 863 - 1442 3 3 863 729 862 - 1443 3 3 731 730 864 - 1444 3 3 864 730 863 - 1445 3 3 732 731 865 - 1446 3 3 865 731 864 - 1447 3 3 733 732 866 - 1448 3 3 866 732 865 - 1449 3 3 734 733 867 - 1450 3 3 867 733 866 - 1451 3 3 735 734 868 - 1452 3 3 868 734 867 - 1453 3 3 736 735 869 - 1454 3 3 869 735 868 - 1455 3 3 737 736 870 - 1456 3 3 870 736 869 - 1457 3 3 738 737 871 - 1458 3 3 871 737 870 - 1459 3 3 739 738 872 - 1460 3 3 872 738 871 - 1461 3 3 740 739 873 - 1462 3 3 873 739 872 - 1463 3 3 741 740 874 - 1464 3 3 874 740 873 - 1465 3 3 742 741 875 - 1466 3 3 875 741 874 - 1467 3 3 743 742 876 - 1468 3 3 876 742 875 - 1469 3 3 744 743 877 - 1470 3 3 877 743 876 - 1471 3 3 745 744 878 - 1472 3 3 878 744 877 - 1473 3 3 746 745 879 - 1474 3 3 879 745 878 - 1475 3 3 747 746 880 - 1476 3 3 880 746 879 - 1477 3 3 748 747 881 - 1478 3 3 881 747 880 - 1479 3 3 749 748 882 - 1480 3 3 882 748 881 - 1481 3 3 750 749 883 - 1482 3 3 883 749 882 - 1483 3 3 751 750 884 - 1484 3 3 884 750 883 - 1485 3 3 752 751 885 - 1486 3 3 885 751 884 - 1487 3 3 753 752 886 - 1488 3 3 886 752 885 - 1489 3 3 754 753 887 - 1490 3 3 887 753 886 - 1491 3 3 755 754 888 - 1492 3 3 888 754 887 - 1493 3 3 756 755 889 - 1494 3 3 889 755 888 - 1495 3 3 757 756 890 - 1496 3 3 890 756 889 - 1497 3 3 781 780 891 - 1498 3 3 891 780 832 - 1499 3 3 782 781 892 - 1500 3 3 892 781 891 - 1501 3 3 783 782 893 - 1502 3 3 893 782 892 - 1503 3 3 784 783 894 - 1504 3 3 894 783 893 - 1505 3 3 785 784 895 - 1506 3 3 895 784 894 - 1507 3 3 786 785 896 - 1508 3 3 896 785 895 - 1509 3 3 787 786 897 - 1510 3 3 897 786 896 - 1511 3 3 788 787 898 - 1512 3 3 898 787 897 - 1513 3 3 789 788 899 - 1514 3 3 899 788 898 - 1515 3 3 790 789 900 - 1516 3 3 900 789 899 - 1517 3 3 791 790 901 - 1518 3 3 901 790 900 - 1519 3 3 792 791 902 - 1520 3 3 902 791 901 - 1521 3 3 793 792 903 - 1522 3 3 903 792 902 - 1523 3 3 794 793 904 - 1524 3 3 904 793 903 - 1525 3 3 795 794 905 - 1526 3 3 905 794 904 - 1527 3 3 796 795 906 - 1528 3 3 906 795 905 - 1529 3 3 797 796 907 - 1530 3 3 907 796 906 - 1531 3 3 798 797 908 - 1532 3 3 908 797 907 - 1533 3 3 799 798 909 - 1534 3 3 909 798 908 - 1535 3 3 800 799 910 - 1536 3 3 910 799 909 - 1537 3 3 801 800 911 - 1538 3 3 911 800 910 - 1539 3 3 802 801 912 - 1540 3 3 912 801 911 - 1541 3 3 803 802 913 - 1542 3 3 913 802 912 - 1543 3 3 804 803 914 - 1544 3 3 914 803 913 - 1545 3 3 805 804 915 - 1546 3 3 915 804 914 - 1547 3 3 806 805 916 - 1548 3 3 916 805 915 - 1549 3 3 807 806 917 - 1550 3 3 917 806 916 - 1551 3 3 808 807 918 - 1552 3 3 918 807 917 - 1553 3 3 809 808 919 - 1554 3 3 919 808 918 - 1555 3 3 810 809 920 - 1556 3 3 920 809 919 - 1557 3 3 811 810 921 - 1558 3 3 921 810 920 - 1559 3 3 812 811 922 - 1560 3 3 922 811 921 - 1561 3 3 813 812 923 - 1562 3 3 923 812 922 - 1563 3 3 814 813 924 - 1564 3 3 924 813 923 - 1565 3 3 815 814 925 - 1566 3 3 925 814 924 - 1567 3 3 816 815 926 - 1568 3 3 926 815 925 - 1569 3 3 817 816 927 - 1570 3 3 927 816 926 - 1571 3 3 818 817 928 - 1572 3 3 928 817 927 - 1573 3 3 819 818 929 - 1574 3 3 929 818 928 - 1575 3 3 820 819 930 - 1576 3 3 930 819 929 - 1577 3 3 823 710 931 - 1578 3 3 931 710 822 - 1579 3 3 824 823 932 - 1580 3 3 932 823 931 - 1581 3 3 833 825 829 - 1582 3 3 831 842 933 - 1583 3 3 831 933 856 - 1584 3 3 855 776 934 - 1585 3 3 934 776 826 - 1586 3 3 842 843 935 - 1587 3 3 842 935 933 - 1588 3 3 714 835 936 - 1589 3 3 714 936 846 - 1590 3 3 830 824 937 - 1591 3 3 937 824 932 - 1592 3 3 827 757 938 - 1593 3 3 938 757 890 - 1594 3 3 857 856 939 - 1595 3 3 939 856 933 - 1596 3 3 713 163 940 - 1597 3 3 940 163 711 - 1598 3 3 711 827 940 - 1599 3 3 826 713 940 - 1600 3 3 764 845 941 - 1601 3 3 764 941 836 - 1602 3 3 837 836 942 - 1603 3 3 942 836 941 - 1604 3 3 838 837 943 - 1605 3 3 943 837 942 - 1606 3 3 760 838 944 - 1607 3 3 944 838 943 - 1608 3 3 843 760 944 - 1609 3 3 858 857 945 - 1610 3 3 945 857 939 - 1611 3 3 859 858 946 - 1612 3 3 946 858 945 - 1613 3 3 860 859 947 - 1614 3 3 947 859 946 - 1615 3 3 861 860 948 - 1616 3 3 948 860 947 - 1617 3 3 862 861 949 - 1618 3 3 949 861 948 - 1619 3 3 863 862 950 - 1620 3 3 950 862 949 - 1621 3 3 864 863 951 - 1622 3 3 951 863 950 - 1623 3 3 865 864 952 - 1624 3 3 952 864 951 - 1625 3 3 866 865 953 - 1626 3 3 953 865 952 - 1627 3 3 867 866 954 - 1628 3 3 954 866 953 - 1629 3 3 868 867 955 - 1630 3 3 955 867 954 - 1631 3 3 869 868 956 - 1632 3 3 956 868 955 - 1633 3 3 870 869 957 - 1634 3 3 957 869 956 - 1635 3 3 871 870 958 - 1636 3 3 958 870 957 - 1637 3 3 872 871 959 - 1638 3 3 959 871 958 - 1639 3 3 873 872 960 - 1640 3 3 960 872 959 - 1641 3 3 874 873 961 - 1642 3 3 961 873 960 - 1643 3 3 875 874 962 - 1644 3 3 962 874 961 - 1645 3 3 876 875 963 - 1646 3 3 963 875 962 - 1647 3 3 877 876 964 - 1648 3 3 964 876 963 - 1649 3 3 878 877 965 - 1650 3 3 965 877 964 - 1651 3 3 879 878 966 - 1652 3 3 966 878 965 - 1653 3 3 880 879 967 - 1654 3 3 967 879 966 - 1655 3 3 881 880 968 - 1656 3 3 968 880 967 - 1657 3 3 882 881 969 - 1658 3 3 969 881 968 - 1659 3 3 883 882 970 - 1660 3 3 970 882 969 - 1661 3 3 884 883 971 - 1662 3 3 971 883 970 - 1663 3 3 885 884 972 - 1664 3 3 972 884 971 - 1665 3 3 886 885 973 - 1666 3 3 973 885 972 - 1667 3 3 887 886 974 - 1668 3 3 974 886 973 - 1669 3 3 888 887 975 - 1670 3 3 975 887 974 - 1671 3 3 889 888 976 - 1672 3 3 976 888 975 - 1673 3 3 890 889 977 - 1674 3 3 977 889 976 - 1675 3 3 832 821 978 - 1676 3 3 978 821 839 - 1677 3 3 891 832 978 - 1678 3 3 839 840 979 - 1679 3 3 839 979 978 - 1680 3 3 840 841 980 - 1681 3 3 840 980 979 - 1682 3 3 841 777 981 - 1683 3 3 841 981 980 - 1684 3 3 777 834 981 - 1685 3 3 834 847 982 - 1686 3 3 834 982 981 - 1687 3 3 847 848 983 - 1688 3 3 847 983 982 - 1689 3 3 848 849 984 - 1690 3 3 848 984 983 - 1691 3 3 849 850 985 - 1692 3 3 849 985 984 - 1693 3 3 850 851 986 - 1694 3 3 850 986 985 - 1695 3 3 851 852 987 - 1696 3 3 851 987 986 - 1697 3 3 852 853 988 - 1698 3 3 852 988 987 - 1699 3 3 853 854 989 - 1700 3 3 853 989 988 - 1701 3 3 854 855 990 - 1702 3 3 854 990 989 - 1703 3 3 829 830 991 - 1704 3 3 991 830 937 - 1705 3 3 844 833 283 - 1706 3 3 283 833 829 - 1707 3 3 845 844 992 - 1708 3 3 992 844 283 - 1709 3 3 820 930 994 - 1710 3 3 820 994 835 - 1711 3 3 822 846 995 - 1712 3 3 822 995 931 - 1713 3 3 932 931 996 - 1714 3 3 996 931 995 - 1715 3 3 892 891 997 - 1716 3 3 997 891 998 - 1717 3 3 998 891 978 - 1718 3 3 893 892 999 - 1719 3 3 999 892 997 - 1720 3 3 894 893 1000 - 1721 3 3 1000 893 999 - 1722 3 3 895 894 1001 - 1723 3 3 1001 894 1000 - 1724 3 3 896 895 1002 - 1725 3 3 1002 895 1001 - 1726 3 3 897 896 1003 - 1727 3 3 1003 896 1002 - 1728 3 3 898 897 1004 - 1729 3 3 1004 897 1003 - 1730 3 3 899 898 1005 - 1731 3 3 1005 898 1004 - 1732 3 3 900 899 1006 - 1733 3 3 1006 899 1005 - 1734 3 3 901 900 1007 - 1735 3 3 1007 900 1006 - 1736 3 3 902 901 1008 - 1737 3 3 1008 901 1007 - 1738 3 3 903 902 1009 - 1739 3 3 1009 902 1008 - 1740 3 3 904 903 1010 - 1741 3 3 1010 903 1009 - 1742 3 3 905 904 1011 - 1743 3 3 1011 904 1010 - 1744 3 3 906 905 1012 - 1745 3 3 1012 905 1011 - 1746 3 3 907 906 1013 - 1747 3 3 1013 906 1012 - 1748 3 3 908 907 1014 - 1749 3 3 1014 907 1013 - 1750 3 3 909 908 1015 - 1751 3 3 1015 908 1014 - 1752 3 3 910 909 1016 - 1753 3 3 1016 909 1015 - 1754 3 3 911 910 1017 - 1755 3 3 1017 910 1016 - 1756 3 3 912 911 1018 - 1757 3 3 1018 911 1017 - 1758 3 3 913 912 1019 - 1759 3 3 1019 912 1018 - 1760 3 3 914 913 1020 - 1761 3 3 1020 913 1019 - 1762 3 3 915 914 1021 - 1763 3 3 1021 914 1020 - 1764 3 3 916 915 1022 - 1765 3 3 1022 915 1021 - 1766 3 3 917 916 1023 - 1767 3 3 1023 916 1022 - 1768 3 3 918 917 1024 - 1769 3 3 1024 917 1023 - 1770 3 3 919 918 1025 - 1771 3 3 1025 918 1024 - 1772 3 3 920 919 1026 - 1773 3 3 1026 919 1025 - 1774 3 3 921 920 1027 - 1775 3 3 1027 920 1026 - 1776 3 3 922 921 1028 - 1777 3 3 1028 921 1027 - 1778 3 3 923 922 1029 - 1779 3 3 1029 922 1028 - 1780 3 3 924 923 1030 - 1781 3 3 1030 923 1029 - 1782 3 3 925 924 1031 - 1783 3 3 1031 924 1030 - 1784 3 3 926 925 1032 - 1785 3 3 1032 925 1031 - 1786 3 3 927 926 1033 - 1787 3 3 1033 926 1032 - 1788 3 3 928 927 1034 - 1789 3 3 1034 927 1033 - 1790 3 3 929 928 1035 - 1791 3 3 1035 928 1034 - 1792 3 3 930 929 1036 - 1793 3 3 1036 929 1035 - 1794 3 3 283 829 991 - 1795 3 3 978 979 998 - 1796 3 3 939 933 935 - 1797 3 3 980 981 1037 - 1798 3 3 1037 981 982 - 1799 3 3 982 983 1037 - 1800 3 3 826 940 1038 - 1801 3 3 826 1038 934 - 1802 3 3 940 827 1039 - 1803 3 3 940 1039 1038 - 1804 3 3 827 938 1039 - 1805 3 3 936 835 1040 - 1806 3 3 1040 835 994 - 1807 3 3 843 944 1041 - 1808 3 3 843 1041 935 - 1809 3 3 992 283 1042 - 1810 3 3 1042 283 991 - 1811 3 3 991 937 1042 - 1812 3 3 846 936 1043 - 1813 3 3 846 1043 995 - 1814 3 3 937 932 1044 - 1815 3 3 937 1044 1042 - 1816 3 3 932 996 1044 - 1817 3 3 944 943 1045 - 1818 3 3 944 1045 1041 - 1819 3 3 938 890 1046 - 1820 3 3 1046 890 977 - 1821 3 3 979 980 1047 - 1822 3 3 1047 980 1037 - 1823 3 3 943 942 1048 - 1824 3 3 943 1048 1045 - 1825 3 3 990 855 1049 - 1826 3 3 1049 855 934 - 1827 3 3 942 941 1050 - 1828 3 3 942 1050 1048 - 1829 3 3 941 845 1051 - 1830 3 3 941 1051 1050 - 1831 3 3 845 992 1051 - 1832 3 3 930 1036 1052 - 1833 3 3 930 1052 994 - 1834 3 3 945 939 1053 - 1835 3 3 1053 939 935 - 1836 3 3 946 945 1054 - 1837 3 3 1054 945 1053 - 1838 3 3 947 946 1055 - 1839 3 3 1055 946 1054 - 1840 3 3 948 947 1056 - 1841 3 3 1056 947 1055 - 1842 3 3 949 948 1057 - 1843 3 3 1057 948 1056 - 1844 3 3 950 949 1058 - 1845 3 3 1058 949 1057 - 1846 3 3 951 950 1059 - 1847 3 3 1059 950 1058 - 1848 3 3 952 951 1060 - 1849 3 3 1060 951 1059 - 1850 3 3 953 952 1061 - 1851 3 3 1061 952 1060 - 1852 3 3 954 953 1062 - 1853 3 3 1062 953 1061 - 1854 3 3 955 954 1063 - 1855 3 3 1063 954 1062 - 1856 3 3 956 955 1064 - 1857 3 3 1064 955 1063 - 1858 3 3 957 956 1065 - 1859 3 3 1065 956 1064 - 1860 3 3 958 957 1066 - 1861 3 3 1066 957 1065 - 1862 3 3 959 958 1067 - 1863 3 3 1067 958 1066 - 1864 3 3 960 959 1068 - 1865 3 3 1068 959 1067 - 1866 3 3 961 960 1069 - 1867 3 3 1069 960 1068 - 1868 3 3 962 961 1070 - 1869 3 3 1070 961 1069 - 1870 3 3 963 962 1071 - 1871 3 3 1071 962 1070 - 1872 3 3 964 963 1072 - 1873 3 3 1072 963 1071 - 1874 3 3 965 964 1073 - 1875 3 3 1073 964 1072 - 1876 3 3 966 965 1074 - 1877 3 3 1074 965 1073 - 1878 3 3 967 966 1075 - 1879 3 3 1075 966 1074 - 1880 3 3 968 967 1076 - 1881 3 3 1076 967 1075 - 1882 3 3 969 968 1077 - 1883 3 3 1077 968 1076 - 1884 3 3 970 969 1078 - 1885 3 3 1078 969 1077 - 1886 3 3 971 970 1079 - 1887 3 3 1079 970 1078 - 1888 3 3 972 971 1080 - 1889 3 3 1080 971 1079 - 1890 3 3 973 972 1081 - 1891 3 3 1081 972 1080 - 1892 3 3 974 973 1082 - 1893 3 3 1082 973 1081 - 1894 3 3 975 974 1083 - 1895 3 3 1083 974 1082 - 1896 3 3 976 975 1084 - 1897 3 3 1084 975 1083 - 1898 3 3 977 976 1085 - 1899 3 3 1085 976 1084 - 1900 3 3 983 984 1086 - 1901 3 3 983 1086 1037 - 1902 3 3 984 985 1087 - 1903 3 3 984 1087 1086 - 1904 3 3 985 986 1088 - 1905 3 3 985 1088 1087 - 1906 3 3 986 987 1089 - 1907 3 3 986 1089 1088 - 1908 3 3 987 988 1090 - 1909 3 3 987 1090 1089 - 1910 3 3 988 989 1091 - 1911 3 3 988 1091 1090 - 1912 3 3 989 990 1092 - 1913 3 3 989 1092 1091 - 1914 3 3 996 995 1093 - 1915 3 3 1093 995 1094 - 1916 3 3 1094 995 1043 - 1917 3 3 999 997 1095 - 1918 3 3 1095 997 1096 - 1919 3 3 1096 997 998 - 1920 3 3 1000 999 1097 - 1921 3 3 1097 999 1095 - 1922 3 3 1001 1000 1098 - 1923 3 3 1098 1000 1097 - 1924 3 3 1002 1001 1099 - 1925 3 3 1099 1001 1098 - 1926 3 3 1003 1002 1100 - 1927 3 3 1100 1002 1099 - 1928 3 3 1004 1003 1101 - 1929 3 3 1101 1003 1100 - 1930 3 3 1005 1004 1102 - 1931 3 3 1102 1004 1101 - 1932 3 3 1006 1005 1103 - 1933 3 3 1103 1005 1102 - 1934 3 3 1007 1006 1104 - 1935 3 3 1104 1006 1103 - 1936 3 3 1008 1007 1105 - 1937 3 3 1105 1007 1104 - 1938 3 3 1009 1008 1106 - 1939 3 3 1106 1008 1105 - 1940 3 3 1010 1009 1107 - 1941 3 3 1107 1009 1106 - 1942 3 3 1011 1010 1108 - 1943 3 3 1108 1010 1107 - 1944 3 3 1012 1011 1109 - 1945 3 3 1109 1011 1108 - 1946 3 3 1013 1012 1110 - 1947 3 3 1110 1012 1109 - 1948 3 3 1014 1013 1111 - 1949 3 3 1111 1013 1110 - 1950 3 3 1015 1014 1112 - 1951 3 3 1112 1014 1111 - 1952 3 3 1016 1015 1113 - 1953 3 3 1113 1015 1112 - 1954 3 3 1017 1016 1114 - 1955 3 3 1114 1016 1113 - 1956 3 3 1018 1017 1115 - 1957 3 3 1115 1017 1114 - 1958 3 3 1019 1018 1116 - 1959 3 3 1116 1018 1115 - 1960 3 3 1020 1019 1117 - 1961 3 3 1117 1019 1116 - 1962 3 3 1021 1020 1118 - 1963 3 3 1118 1020 1117 - 1964 3 3 1022 1021 1119 - 1965 3 3 1119 1021 1118 - 1966 3 3 1023 1022 1120 - 1967 3 3 1120 1022 1119 - 1968 3 3 1024 1023 1121 - 1969 3 3 1121 1023 1120 - 1970 3 3 1025 1024 1122 - 1971 3 3 1122 1024 1121 - 1972 3 3 1026 1025 1123 - 1973 3 3 1123 1025 1122 - 1974 3 3 1027 1026 1124 - 1975 3 3 1124 1026 1123 - 1976 3 3 1028 1027 1125 - 1977 3 3 1125 1027 1124 - 1978 3 3 1029 1028 1126 - 1979 3 3 1126 1028 1125 - 1980 3 3 1030 1029 1127 - 1981 3 3 1127 1029 1126 - 1982 3 3 1031 1030 1128 - 1983 3 3 1128 1030 1127 - 1984 3 3 1032 1031 1129 - 1985 3 3 1129 1031 1128 - 1986 3 3 1033 1032 1130 - 1987 3 3 1130 1032 1129 - 1988 3 3 1034 1033 1131 - 1989 3 3 1131 1033 1130 - 1990 3 3 1035 1034 1132 - 1991 3 3 1132 1034 1131 - 1992 3 3 1036 1035 1133 - 1993 3 3 1133 1035 1132 - 1994 3 3 979 1047 998 - 1995 3 3 1096 998 1047 - 1996 3 3 1037 1086 993 - 1997 3 3 1037 993 1047 - 1998 3 3 935 1041 1134 - 1999 3 3 935 1134 1053 - 2000 3 3 1041 1045 1134 - 2001 3 3 936 1040 1136 - 2002 3 3 936 1136 1043 - 2003 3 3 1094 1043 1137 - 2004 3 3 1137 1043 1136 - 2005 3 3 1054 1053 1138 - 2006 3 3 1138 1053 1134 - 2007 3 3 1046 977 1139 - 2008 3 3 1139 977 1085 - 2009 3 3 1036 1133 1140 - 2010 3 3 1036 1140 1052 - 2011 3 3 1092 990 1141 - 2012 3 3 1141 990 1049 - 2013 3 3 938 1046 1142 - 2014 3 3 938 1142 1039 - 2015 3 3 1040 994 1143 - 2016 3 3 1143 994 1052 - 2017 3 3 1055 1054 1144 - 2018 3 3 1144 1054 1138 - 2019 3 3 1056 1055 1145 - 2020 3 3 1145 1055 1144 - 2021 3 3 1057 1056 1146 - 2022 3 3 1146 1056 1145 - 2023 3 3 1058 1057 1147 - 2024 3 3 1147 1057 1146 - 2025 3 3 1059 1058 1148 - 2026 3 3 1148 1058 1147 - 2027 3 3 1060 1059 1149 - 2028 3 3 1149 1059 1148 - 2029 3 3 1061 1060 1150 - 2030 3 3 1150 1060 1149 - 2031 3 3 1062 1061 1151 - 2032 3 3 1151 1061 1150 - 2033 3 3 1063 1062 1152 - 2034 3 3 1152 1062 1151 - 2035 3 3 1064 1063 1153 - 2036 3 3 1153 1063 1152 - 2037 3 3 1065 1064 1154 - 2038 3 3 1154 1064 1153 - 2039 3 3 1066 1065 1155 - 2040 3 3 1155 1065 1154 - 2041 3 3 1067 1066 1156 - 2042 3 3 1156 1066 1155 - 2043 3 3 1068 1067 1157 - 2044 3 3 1157 1067 1156 - 2045 3 3 1069 1068 1158 - 2046 3 3 1158 1068 1157 - 2047 3 3 1070 1069 1159 - 2048 3 3 1159 1069 1158 - 2049 3 3 1071 1070 1160 - 2050 3 3 1160 1070 1159 - 2051 3 3 1072 1071 1161 - 2052 3 3 1161 1071 1160 - 2053 3 3 1073 1072 1162 - 2054 3 3 1162 1072 1161 - 2055 3 3 1074 1073 1163 - 2056 3 3 1163 1073 1162 - 2057 3 3 1075 1074 1164 - 2058 3 3 1164 1074 1163 - 2059 3 3 1076 1075 1165 - 2060 3 3 1165 1075 1164 - 2061 3 3 1077 1076 1166 - 2062 3 3 1166 1076 1165 - 2063 3 3 1078 1077 1167 - 2064 3 3 1167 1077 1166 - 2065 3 3 1079 1078 1168 - 2066 3 3 1168 1078 1167 - 2067 3 3 1080 1079 1169 - 2068 3 3 1169 1079 1168 - 2069 3 3 1081 1080 1170 - 2070 3 3 1170 1080 1169 - 2071 3 3 1082 1081 1171 - 2072 3 3 1171 1081 1170 - 2073 3 3 1083 1082 1172 - 2074 3 3 1172 1082 1171 - 2075 3 3 1084 1083 1173 - 2076 3 3 1173 1083 1172 - 2077 3 3 1085 1084 1174 - 2078 3 3 1174 1084 1173 - 2079 3 3 1038 1039 1175 - 2080 3 3 1175 1039 1142 - 2081 3 3 934 1038 1175 - 2082 3 3 1049 934 1176 - 2083 3 3 1176 934 1175 - 2084 3 3 1042 1044 1177 - 2085 3 3 1042 1177 992 - 2086 3 3 1051 992 1177 - 2087 3 3 1044 996 1178 - 2088 3 3 1044 1178 1177 - 2089 3 3 996 1093 1178 - 2090 3 3 1050 1051 1179 - 2091 3 3 1179 1051 1177 - 2092 3 3 1048 1050 1180 - 2093 3 3 1180 1050 1179 - 2094 3 3 1045 1048 1181 - 2095 3 3 1181 1048 1180 - 2096 3 3 1093 1094 1182 - 2097 3 3 1182 1094 1183 - 2098 3 3 1183 1094 1137 - 2099 3 3 1086 1087 1184 - 2100 3 3 1086 1184 993 - 2101 3 3 1087 1088 1185 - 2102 3 3 1087 1185 1184 - 2103 3 3 1088 1089 1186 - 2104 3 3 1088 1186 1185 - 2105 3 3 1089 1090 1187 - 2106 3 3 1089 1187 1186 - 2107 3 3 1090 1091 1188 - 2108 3 3 1090 1188 1187 - 2109 3 3 1091 1092 1189 - 2110 3 3 1091 1189 1188 - 2111 3 3 1095 1096 1184 - 2112 3 3 1184 1096 993 - 2113 3 3 993 1096 1047 - 2114 3 3 1097 1095 1184 - 2115 3 3 1098 1097 1185 - 2116 3 3 1185 1097 1184 - 2117 3 3 1099 1098 1186 - 2118 3 3 1186 1098 1185 - 2119 3 3 1100 1099 1187 - 2120 3 3 1187 1099 1186 - 2121 3 3 1101 1100 1188 - 2122 3 3 1188 1100 1187 - 2123 3 3 1102 1101 1189 - 2124 3 3 1189 1101 1188 - 2125 3 3 1103 1102 1190 - 2126 3 3 1190 1102 1189 - 2127 3 3 1104 1103 1191 - 2128 3 3 1191 1103 1190 - 2129 3 3 1105 1104 1192 - 2130 3 3 1192 1104 1191 - 2131 3 3 1106 1105 1193 - 2132 3 3 1193 1105 1192 - 2133 3 3 1107 1106 1194 - 2134 3 3 1194 1106 1193 - 2135 3 3 1108 1107 1195 - 2136 3 3 1195 1107 1194 - 2137 3 3 1109 1108 828 - 2138 3 3 828 1108 1195 - 2139 3 3 1110 1109 1174 - 2140 3 3 1174 1109 828 - 2141 3 3 1111 1110 1173 - 2142 3 3 1173 1110 1174 - 2143 3 3 1112 1111 1172 - 2144 3 3 1172 1111 1173 - 2145 3 3 1113 1112 1171 - 2146 3 3 1171 1112 1172 - 2147 3 3 1114 1113 1170 - 2148 3 3 1170 1113 1171 - 2149 3 3 1115 1114 1169 - 2150 3 3 1169 1114 1170 - 2151 3 3 1116 1115 1168 - 2152 3 3 1168 1115 1169 - 2153 3 3 1117 1116 1167 - 2154 3 3 1167 1116 1168 - 2155 3 3 1118 1117 1166 - 2156 3 3 1166 1117 1167 - 2157 3 3 1119 1118 1165 - 2158 3 3 1165 1118 1166 - 2159 3 3 1120 1119 1164 - 2160 3 3 1164 1119 1165 - 2161 3 3 1121 1120 1163 - 2162 3 3 1163 1120 1164 - 2163 3 3 1122 1121 1162 - 2164 3 3 1162 1121 1163 - 2165 3 3 1123 1122 1161 - 2166 3 3 1161 1122 1162 - 2167 3 3 1124 1123 1160 - 2168 3 3 1160 1123 1161 - 2169 3 3 1125 1124 1159 - 2170 3 3 1159 1124 1160 - 2171 3 3 1126 1125 1158 - 2172 3 3 1158 1125 1159 - 2173 3 3 1127 1126 1157 - 2174 3 3 1157 1126 1158 - 2175 3 3 1128 1127 1156 - 2176 3 3 1156 1127 1157 - 2177 3 3 1129 1128 1155 - 2178 3 3 1155 1128 1156 - 2179 3 3 1130 1129 1154 - 2180 3 3 1154 1129 1155 - 2181 3 3 1131 1130 1153 - 2182 3 3 1153 1130 1154 - 2183 3 3 1132 1131 1152 - 2184 3 3 1152 1131 1153 - 2185 3 3 1133 1132 1151 - 2186 3 3 1151 1132 1152 - 2187 3 3 1133 1151 1150 - 2188 3 3 1190 1189 1092 - 2189 3 3 1092 1141 1190 - 2190 3 3 1191 1190 1141 - 2191 3 3 1134 1045 1181 - 2192 3 3 1140 1133 1150 - 2193 3 3 1150 1149 1140 - 2194 3 3 1085 1174 828 - 2195 3 3 828 1195 1085 - 2196 3 3 1139 1085 1195 - 2197 3 3 1177 1178 1196 - 2198 3 3 1177 1196 1179 - 2199 3 3 1138 1134 1198 - 2200 3 3 1198 1134 1181 - 2201 3 3 1178 1093 1199 - 2202 3 3 1178 1199 1196 - 2203 3 3 1093 1182 1199 - 2204 3 3 1144 1138 1200 - 2205 3 3 1200 1138 1198 - 2206 3 3 1141 1049 1201 - 2207 3 3 1201 1049 1176 - 2208 3 3 1149 1148 1202 - 2209 3 3 1149 1202 1140 - 2210 3 3 1052 1140 1202 - 2211 3 3 1143 1052 1202 - 2212 3 3 1195 1194 1203 - 2213 3 3 1195 1203 1139 - 2214 3 3 1046 1139 1203 - 2215 3 3 1142 1046 1203 - 2216 3 3 1148 1147 1204 - 2217 3 3 1148 1204 1202 - 2218 3 3 1194 1193 1205 - 2219 3 3 1194 1205 1203 - 2220 3 3 1147 1146 1206 - 2221 3 3 1147 1206 1204 - 2222 3 3 1193 1192 1135 - 2223 3 3 1193 1135 1205 - 2224 3 3 1146 1145 1207 - 2225 3 3 1146 1207 1206 - 2226 3 3 1145 1144 1209 - 2227 3 3 1209 1144 1200 - 2228 3 3 1180 1179 1210 - 2229 3 3 1210 1179 1196 - 2230 3 3 1192 1191 1201 - 2231 3 3 1192 1201 1135 - 2232 3 3 1181 1180 1211 - 2233 3 3 1181 1211 1198 - 2234 3 3 1040 1143 1212 - 2235 3 3 1040 1212 1136 - 2236 3 3 1137 1136 1213 - 2237 3 3 1213 1136 1212 - 2238 3 3 1183 1137 1213 - 2239 3 3 1175 1142 1205 - 2240 3 3 1205 1142 1203 - 2241 3 3 1176 1175 1135 - 2242 3 3 1135 1175 1205 - 2243 3 3 1182 1183 1214 - 2244 3 3 1182 1214 1199 - 2245 3 3 1202 1204 1143 - 2246 3 3 1176 1135 1201 - 2247 3 3 1141 1201 1191 - 2248 3 3 1207 1145 1209 - 2249 3 3 1210 1196 1199 - 2250 3 3 1199 1214 1210 - 2251 3 3 1180 1210 1211 - 2252 3 3 1212 1143 1204 - 2253 3 3 1204 1206 1212 - 2254 3 3 1213 1212 1206 - 2255 3 3 1206 1207 1213 - 2256 3 3 1200 1198 1211 - 2257 3 3 1183 1213 1197 - 2258 3 3 1197 1213 1207 - 2259 3 3 1214 1183 1208 - 2260 3 3 1208 1183 1197 - 2261 3 3 1209 1200 1208 - 2262 3 3 1208 1200 1211 - 2263 3 3 1214 1208 1211 - 2264 3 3 1210 1214 1211 - 2265 3 3 1207 1209 1197 - 2266 3 3 1209 1208 1197 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 2266 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 729 730 - 731 732 733 734 735 736 737 738 739 740 - 741 742 743 744 745 746 747 748 749 750 - 751 752 753 754 755 756 757 758 759 760 - 761 762 763 764 765 766 767 768 769 770 - 771 772 773 774 775 776 777 778 779 780 - 781 782 783 784 785 786 787 788 789 790 - 791 792 793 794 795 796 797 798 799 800 - 801 802 803 804 805 806 807 808 809 810 - 811 812 813 814 815 816 817 818 819 820 - 821 822 823 824 825 826 827 828 829 830 - 831 832 833 834 835 836 837 838 839 840 - 841 842 843 844 845 846 847 848 849 850 - 851 852 853 854 855 856 857 858 859 860 - 861 862 863 864 865 866 867 868 869 870 - 871 872 873 874 875 876 877 878 879 880 - 881 882 883 884 885 886 887 888 889 890 - 891 892 893 894 895 896 897 898 899 900 - 901 902 903 904 905 906 907 908 909 910 - 911 912 913 914 915 916 917 918 919 920 - 921 922 923 924 925 926 927 928 929 930 - 931 932 933 934 935 936 937 938 939 940 - 941 942 943 944 945 946 947 948 949 950 - 951 952 953 954 955 956 957 958 959 960 - 961 962 963 964 965 966 967 968 969 970 - 971 972 973 974 975 976 977 978 979 980 - 981 982 983 984 985 986 987 988 989 990 - 991 992 993 994 995 996 997 998 999 1000 - 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 - 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 - 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 - 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 - 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 - 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 - 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 - 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 - 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 - 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 - 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 - 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 - 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 - 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 - 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 - 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 - 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 - 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 - 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 - 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 - 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 - 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 - 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 - 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 - 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 - 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 - 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 - 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 - 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 - 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 - 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 - 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 - 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 - 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 - 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 - 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 - 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 - 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 - 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 - 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 - 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 - 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 - 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 - 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 - 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 - 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 - 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 - 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 - 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 - 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 - 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 - 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 - 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 - 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 - 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 - 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 - 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 - 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 - 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 - 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 - 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 - 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 - 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 - 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 - 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 - 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 - 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 - 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 - 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 - 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 - 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 - 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 - 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 - 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 - 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 - 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 - 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 - 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 - 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 - 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 - 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 - 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 - 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 - 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 - 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 - 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 - 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 - 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 - 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 - 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 - 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 - 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 - 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 - 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 - 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 - 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 - 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 - 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 - 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 - 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 - 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 - 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 - 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 - 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 - 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 - 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 - 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 - 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 - 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 - 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 - 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 - 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 - 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 - 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 - 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 - 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 - 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 - 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 - 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 - 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 - 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 - 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 - 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 - 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 - 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 - 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 - 2261 2262 2263 2264 2265 2266 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Inflow 1 20 0 6 - 8 3 2 - 26 3 2 - 46 3 2 - 52 3 2 - 84 3 2 - 104 3 2 - 118 3 2 - 132 3 2 - 136 3 2 - 154 3 2 - 146 3 3 - 138 3 3 - 126 3 3 - 114 3 3 - 98 3 3 - 82 3 3 - 64 3 3 - 44 3 3 - 24 3 3 - 6 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Outflow 1 16 0 6 - 2 3 2 - 28 3 2 - 48 3 2 - 56 3 2 - 86 3 2 - 94 3 2 - 112 3 2 - 130 3 2 - 134 3 3 - 120 3 3 - 106 3 3 - 88 3 3 - 54 3 3 - 50 3 3 - 30 3 3 - 4 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Wall 1 124 0 6 - 310 3 3 - 308 3 3 - 306 3 3 - 304 3 3 - 302 3 3 - 300 3 3 - 298 3 3 - 296 3 3 - 294 3 3 - 292 3 3 - 290 3 3 - 288 3 3 - 286 3 3 - 284 3 3 - 282 3 3 - 280 3 3 - 278 3 3 - 276 3 3 - 274 3 3 - 272 3 3 - 270 3 3 - 268 3 3 - 266 3 3 - 264 3 3 - 262 3 3 - 260 3 3 - 258 3 3 - 256 3 3 - 254 3 3 - 252 3 3 - 250 3 3 - 248 3 3 - 246 3 3 - 244 3 3 - 242 3 3 - 168 3 3 - 162 3 3 - 156 3 3 - 152 3 3 - 144 3 3 - 122 3 3 - 108 3 3 - 92 3 3 - 76 3 3 - 70 3 3 - 32 3 3 - 14 3 3 - 1 3 1 - 10 3 2 - 16 3 2 - 36 3 2 - 58 3 2 - 3 3 1 - 12 3 2 - 34 3 2 - 68 3 2 - 74 3 2 - 90 3 2 - 110 3 2 - 124 3 2 - 142 3 2 - 150 3 2 - 158 3 2 - 164 3 2 - 170 3 2 - 234 3 2 - 236 3 2 - 238 3 2 - 240 3 2 - 232 3 3 - 230 3 3 - 228 3 3 - 226 3 3 - 224 3 3 - 222 3 3 - 220 3 3 - 218 3 3 - 216 3 3 - 214 3 3 - 212 3 3 - 210 3 3 - 208 3 3 - 206 3 3 - 204 3 3 - 202 3 3 - 200 3 3 - 198 3 3 - 196 3 3 - 194 3 3 - 192 3 3 - 190 3 3 - 188 3 3 - 186 3 3 - 184 3 3 - 182 3 3 - 180 3 3 - 178 3 3 - 176 3 3 - 174 3 3 - 172 3 3 - 166 3 3 - 160 3 3 - 148 3 3 - 140 3 3 - 128 3 3 - 116 3 3 - 100 3 3 - 78 3 3 - 60 3 3 - 38 3 3 - 20 3 3 - 7 3 1 - 5 3 1 - 22 3 2 - 42 3 2 - 62 3 2 - 80 3 2 - 96 3 2 - 102 3 3 - 72 3 3 - 66 3 3 - 40 3 3 - 18 3 3 - 9 3 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/Euler01.neu b/cpp/nudg++/trunk/Grid/Euler2D/Euler01.neu deleted file mode 100644 index 45cc38f..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/Euler01.neu +++ /dev/null @@ -1,1066 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:53:26 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 328 574 1 3 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 6.00000000000e-01 2.00000000000e-01 - 2 3.00000000000e+00 2.00000000000e-01 - 3 7.00000000000e-01 2.00000000000e-01 - 4 8.00000000000e-01 2.00000000000e-01 - 5 9.00000000000e-01 2.00000000000e-01 - 6 1.00000000000e+00 2.00000000000e-01 - 7 1.10000000000e+00 2.00000000000e-01 - 8 1.20000000000e+00 2.00000000000e-01 - 9 1.30000000000e+00 2.00000000000e-01 - 10 1.40000000000e+00 2.00000000000e-01 - 11 1.50000000000e+00 2.00000000000e-01 - 12 1.60000000000e+00 2.00000000000e-01 - 13 1.70000000000e+00 2.00000000000e-01 - 14 1.80000000000e+00 2.00000000000e-01 - 15 1.90000000000e+00 2.00000000000e-01 - 16 2.00000000000e+00 2.00000000000e-01 - 17 2.10000000000e+00 2.00000000000e-01 - 18 2.20000000000e+00 2.00000000000e-01 - 19 2.30000000000e+00 2.00000000000e-01 - 20 2.40000000000e+00 2.00000000000e-01 - 21 2.50000000000e+00 2.00000000000e-01 - 22 2.60000000000e+00 2.00000000000e-01 - 23 2.70000000000e+00 2.00000000000e-01 - 24 2.80000000000e+00 2.00000000000e-01 - 25 2.90000000000e+00 2.00000000000e-01 - 26 3.00000000000e+00 1.00000000000e+00 - 27 3.00000000000e+00 3.00000000000e-01 - 28 3.00000000000e+00 4.00000000000e-01 - 29 3.00000000000e+00 5.00000000000e-01 - 30 3.00000000000e+00 6.00000000000e-01 - 31 3.00000000000e+00 7.00000000000e-01 - 32 3.00000000000e+00 8.00000000000e-01 - 33 3.00000000000e+00 9.00000000000e-01 - 34 0.00000000000e+00 1.00000000000e+00 - 35 2.90000000000e+00 1.00000000000e+00 - 36 2.80000000000e+00 1.00000000000e+00 - 37 2.70000000000e+00 1.00000000000e+00 - 38 2.60000000000e+00 1.00000000000e+00 - 39 2.50000000000e+00 1.00000000000e+00 - 40 2.40000000000e+00 1.00000000000e+00 - 41 2.30000000000e+00 1.00000000000e+00 - 42 2.20000000000e+00 1.00000000000e+00 - 43 2.10000000000e+00 1.00000000000e+00 - 44 2.00000000000e+00 1.00000000000e+00 - 45 1.90000000000e+00 1.00000000000e+00 - 46 1.80000000000e+00 1.00000000000e+00 - 47 1.70000000000e+00 1.00000000000e+00 - 48 1.60000000000e+00 1.00000000000e+00 - 49 1.50000000000e+00 1.00000000000e+00 - 50 1.40000000000e+00 1.00000000000e+00 - 51 1.30000000000e+00 1.00000000000e+00 - 52 1.20000000000e+00 1.00000000000e+00 - 53 1.10000000000e+00 1.00000000000e+00 - 54 1.00000000000e+00 1.00000000000e+00 - 55 9.00000000000e-01 1.00000000000e+00 - 56 8.00000000000e-01 1.00000000000e+00 - 57 7.00000000000e-01 1.00000000000e+00 - 58 6.00000000000e-01 1.00000000000e+00 - 59 5.00000000000e-01 1.00000000000e+00 - 60 4.00000000000e-01 1.00000000000e+00 - 61 3.00000000000e-01 1.00000000000e+00 - 62 2.00000000000e-01 1.00000000000e+00 - 63 1.00000000000e-01 1.00000000000e+00 - 64 0.00000000000e+00 0.00000000000e+00 - 65 0.00000000000e+00 9.00000000000e-01 - 66 0.00000000000e+00 8.00000000000e-01 - 67 0.00000000000e+00 7.00000000000e-01 - 68 0.00000000000e+00 6.00000000000e-01 - 69 0.00000000000e+00 5.00000000000e-01 - 70 0.00000000000e+00 4.00000000000e-01 - 71 0.00000000000e+00 3.00000000000e-01 - 72 0.00000000000e+00 2.00000000000e-01 - 73 0.00000000000e+00 1.00000000000e-01 - 74 6.00000000000e-01 0.00000000000e+00 - 75 1.00000000000e-01 0.00000000000e+00 - 76 2.00000000000e-01 0.00000000000e+00 - 77 3.00000000000e-01 0.00000000000e+00 - 78 4.00000000000e-01 0.00000000000e+00 - 79 5.00000000000e-01 0.00000000000e+00 - 80 6.00000000000e-01 1.00000000000e-01 - 81 2.92999755901e+00 2.70337143289e-01 - 82 2.93678854373e+00 6.49377871561e-01 - 83 2.93049417576e+00 9.29113957166e-01 - 84 6.99304299326e-02 6.99668351832e-02 - 85 7.01550219299e-02 9.29946830199e-01 - 86 5.32356127771e-01 7.03337932211e-02 - 87 2.84532635591e+00 9.15092212449e-01 - 88 2.84426680190e+00 2.83683184006e-01 - 89 5.10680360304e-01 1.64332298916e-01 - 90 9.61175403073e-02 1.62211916555e-01 - 91 1.55597557203e-01 8.28356669481e-02 - 92 1.56067777330e-01 9.16880866105e-01 - 93 4.49013397803e-01 8.27964979012e-02 - 94 2.90406384786e+00 3.63124002239e-01 - 95 9.66028886614e-02 8.37665032098e-01 - 96 2.90584997596e+00 8.35338763371e-01 - 97 8.47813433726e-02 7.33796588990e-01 - 98 2.92198836565e+00 7.32589295437e-01 - 99 3.51976362430e-01 8.61301974081e-02 - 100 2.91744899933e+00 4.66999713495e-01 - 101 2.53576547728e-01 8.63745127935e-02 - 102 8.33755089677e-02 2.66067169059e-01 - 103 2.54417619078e-01 9.12615238993e-01 - 104 2.74747802163e+00 9.10309038779e-01 - 105 2.74610983630e+00 2.87811606055e-01 - 106 2.64809370104e+00 9.09297543054e-01 - 107 2.64647877141e+00 2.89049791988e-01 - 108 2.92158493317e+00 5.65699226265e-01 - 109 8.01165651091e-02 3.65080114162e-01 - 110 3.53958782787e-01 9.10774705422e-01 - 111 8.43137369052e-02 6.33318052972e-01 - 112 6.50601351523e-02 4.49309419509e-01 - 113 8.05818681695e-02 5.33324734105e-01 - 114 4.54145836099e-01 9.10616569521e-01 - 115 1.55919889168e+00 9.27487967147e-01 - 116 2.54819052567e+00 9.11245915748e-01 - 117 2.54573841679e+00 2.89246403116e-01 - 118 2.44508335559e+00 2.90443214430e-01 - 119 2.44869271374e+00 9.13411482625e-01 - 120 5.54235315506e-01 9.10470652955e-01 - 121 2.34456036456e+00 2.91286423442e-01 - 122 2.34939805540e+00 9.14402910877e-01 - 123 6.54275718136e-01 9.10433178078e-01 - 124 7.54316336844e-01 9.10515036937e-01 - 125 2.25031238920e+00 9.13909346957e-01 - 126 2.24385748948e+00 2.91049051967e-01 - 127 2.15114509347e+00 9.12935991335e-01 - 128 2.14308339636e+00 2.90363624264e-01 - 129 8.54346990541e-01 9.10635188111e-01 - 130 9.54371820358e-01 9.10713818524e-01 - 131 2.05159837522e+00 9.12232326015e-01 - 132 2.04249723765e+00 2.89797811511e-01 - 133 1.94214939707e+00 2.89431791984e-01 - 134 1.95155568097e+00 9.11876067919e-01 - 135 1.05437596226e+00 9.10703448587e-01 - 136 1.84200550864e+00 2.89176816304e-01 - 137 1.85098952424e+00 9.11885400851e-01 - 138 1.15449811277e+00 9.10506979279e-01 - 139 1.25517664984e+00 9.09879371953e-01 - 140 1.35816662856e+00 9.07803814014e-01 - 141 1.74202786761e+00 2.88935057243e-01 - 142 1.64215755323e+00 2.88680516876e-01 - 143 1.74984837769e+00 9.12510032516e-01 - 144 1.64915466591e+00 9.15161114240e-01 - 145 1.54235171771e+00 2.88444728219e-01 - 146 1.47077830058e+00 8.99029213640e-01 - 147 1.44257720557e+00 2.88307214442e-01 - 148 2.39512845302e+00 6.72560986548e-01 - 149 1.34279942213e+00 2.88298242814e-01 - 150 1.24299719696e+00 2.88360739883e-01 - 151 1.14309586013e+00 2.88433823397e-01 - 152 1.04301249245e+00 2.88453514788e-01 - 153 9.42624390287e-01 2.88357871790e-01 - 154 8.41708785548e-01 2.88022891932e-01 - 155 7.39938435462e-01 2.87146783441e-01 - 156 6.36891096934e-01 2.84440806319e-01 - 157 5.33984198220e-01 2.72738152644e-01 - 158 2.79486347044e+00 3.73391029212e-01 - 159 2.83886089563e+00 4.43304771915e-01 - 160 2.83673228936e+00 5.35609218256e-01 - 161 2.69495458775e+00 3.79435667303e-01 - 162 2.59316916776e+00 3.76955602441e-01 - 163 2.49195813491e+00 3.79205478561e-01 - 164 2.39103133060e+00 3.82622552790e-01 - 165 2.28938667282e+00 3.82879219994e-01 - 166 2.18738024513e+00 3.81269188861e-01 - 167 2.08589552196e+00 3.79943025851e-01 - 168 1.98496651205e+00 3.79121523174e-01 - 169 1.88447133060e+00 3.78618681810e-01 - 170 1.78432440104e+00 3.78203447473e-01 - 171 1.68445302064e+00 3.77709069541e-01 - 172 1.58476346265e+00 3.77158709268e-01 - 173 1.48516187283e+00 3.76735049579e-01 - 174 1.38559179784e+00 3.76591660847e-01 - 175 1.28600342306e+00 3.76680318547e-01 - 176 1.18629673637e+00 3.76844895141e-01 - 177 1.08633704673e+00 3.76930920315e-01 - 178 9.85943960355e-01 3.76833932887e-01 - 179 8.84882826964e-01 3.76421920649e-01 - 180 7.82648807949e-01 3.75418437658e-01 - 181 6.78195820048e-01 3.73086839088e-01 - 182 2.79804156851e+00 8.23259755619e-01 - 183 2.84458600256e+00 7.50451904205e-01 - 184 2.84986097964e+00 6.48851847251e-01 - 185 2.69768585440e+00 8.16271817615e-01 - 186 2.59557953724e+00 8.19967600033e-01 - 187 2.49632723514e+00 8.24930117624e-01 - 188 2.39820330571e+00 8.29076425379e-01 - 189 2.30068819772e+00 8.28879301756e-01 - 190 2.20305351701e+00 8.26544925881e-01 - 191 2.10430085256e+00 8.24828060268e-01 - 192 2.00454766795e+00 8.23902927176e-01 - 193 1.90387957447e+00 8.23618735493e-01 - 194 1.80190774299e+00 8.24069264222e-01 - 195 1.69702279365e+00 8.26064154797e-01 - 196 1.58281810111e+00 8.33750066338e-01 - 197 2.06183414655e-01 8.28265313706e-01 - 198 1.63335974963e-01 7.59267219463e-01 - 199 1.69888136173e-01 6.69138648518e-01 - 200 1.67344346202e-01 5.63506490917e-01 - 201 3.06445357500e-01 8.20960993043e-01 - 202 4.07805085346e-01 8.21442187498e-01 - 203 5.08054963586e-01 8.20966262828e-01 - 204 6.08196610853e-01 8.20742585601e-01 - 205 7.08375805419e-01 8.20833966701e-01 - 206 8.08582998489e-01 8.21085643504e-01 - 207 9.08728391758e-01 8.21323779095e-01 - 208 1.00876442261e+00 8.21431214929e-01 - 209 1.10869736142e+00 8.21309880373e-01 - 210 1.20858717374e+00 8.20786344065e-01 - 211 1.30842973446e+00 8.19373900980e-01 - 212 1.40722282315e+00 8.15507391278e-01 - 213 2.05569992582e-01 1.70984115226e-01 - 214 1.62228617820e-01 2.40931760936e-01 - 215 1.65970377299e-01 3.32912874870e-01 - 216 1.54609537665e-01 4.47810607089e-01 - 217 4.05976036180e-01 1.69599008955e-01 - 218 1.49516807037e+00 8.03192444893e-01 - 219 4.52617734192e-01 2.47691689414e-01 - 220 2.74588719757e+00 4.79331523499e-01 - 221 2.75291804645e+00 7.15697085083e-01 - 222 2.56384623614e-01 7.24689648151e-01 - 223 3.62077260673e-01 7.33096890139e-01 - 224 4.61527791607e-01 7.31551444247e-01 - 225 5.61547606896e-01 7.30928141432e-01 - 226 6.61951227045e-01 7.30921185698e-01 - 227 7.62529113380e-01 7.31337616952e-01 - 228 8.63036059409e-01 7.31810939150e-01 - 229 9.63311362477e-01 7.32119998825e-01 - 230 1.06331182244e+00 7.32170268530e-01 - 231 1.16299503609e+00 7.31854765960e-01 - 232 1.26224608788e+00 7.30960741182e-01 - 233 1.36058309119e+00 7.29013235149e-01 - 234 2.63999191463e+00 4.64130214643e-01 - 235 2.54077323915e+00 4.63083678638e-01 - 236 2.44086351707e+00 4.73427116373e-01 - 237 2.33767310107e+00 4.76570924565e-01 - 238 2.23301079604e+00 4.72843618184e-01 - 239 2.13016535706e+00 4.70342857413e-01 - 240 2.02851415577e+00 4.68938009349e-01 - 241 1.92753953294e+00 4.68193560804e-01 - 242 1.82702320142e+00 4.67729245547e-01 - 243 1.72695470279e+00 4.67148301477e-01 - 244 1.62727012584e+00 4.66261522392e-01 - 245 1.52779629935e+00 4.65341093400e-01 - 246 1.42840665358e+00 4.64851505719e-01 - 247 1.32906279503e+00 4.64910956070e-01 - 248 1.22962306212e+00 4.65215666979e-01 - 249 1.12990956749e+00 4.65442667991e-01 - 250 1.02976615033e+00 4.65446029677e-01 - 251 9.29007034640e-01 4.65120744590e-01 - 252 8.27363141094e-01 4.64300043010e-01 - 253 7.24399355500e-01 4.62683118308e-01 - 254 2.64179515400e+00 7.27396128750e-01 - 255 2.54071988684e+00 7.31797971037e-01 - 256 2.44440368753e+00 7.43475018406e-01 - 257 2.35042658067e+00 7.46367460186e-01 - 258 2.25641866703e+00 7.41013756570e-01 - 259 2.15876720020e+00 7.37779004092e-01 - 260 2.05930676399e+00 7.36057352115e-01 - 261 1.95885467546e+00 7.35298016818e-01 - 262 1.85753142256e+00 7.35292242110e-01 - 263 1.75507821075e+00 7.36099510098e-01 - 264 1.65152969427e+00 7.37579514534e-01 - 265 3.06001353332e-01 1.76432567518e-01 - 266 2.56260692234e-01 2.73930729043e-01 - 267 2.55121800465e-01 6.08802309900e-01 - 268 5.68578573713e-01 3.67493566262e-01 - 269 2.49871240790e-01 3.89347488672e-01 - 270 3.27697575449e-01 6.50990138224e-01 - 271 1.45686475694e+00 7.25723345021e-01 - 272 1.55366122565e+00 7.30960761995e-01 - 273 4.14512213384e-01 6.41930801557e-01 - 274 5.13912251082e-01 6.41021155861e-01 - 275 6.14626625548e-01 6.40657840158e-01 - 276 7.15921277400e-01 6.41341053884e-01 - 277 8.17132283195e-01 6.42175769841e-01 - 278 9.17952678597e-01 6.42782366288e-01 - 279 1.01831136209e+00 6.43058080144e-01 - 280 1.11821508477e+00 6.42981047610e-01 - 281 1.21765437256e+00 6.42491010030e-01 - 282 1.31656402813e+00 6.41511728652e-01 - 283 3.65942450276e-01 2.62841450398e-01 - 284 3.33539984140e-01 3.43753387496e-01 - 285 4.43552762772e-01 3.57524022908e-01 - 286 2.54337501324e-01 4.98974700205e-01 - 287 6.19666358424e-01 4.59862883850e-01 - 288 2.75720464886e+00 5.97289509846e-01 - 289 2.66704755675e+00 5.58188340451e-01 - 290 2.68057376567e+00 6.46914832099e-01 - 291 2.58608298175e+00 5.35950291898e-01 - 292 2.58377123243e+00 6.31069668564e-01 - 293 2.50111144520e+00 5.56288229353e-01 - 294 2.47788051964e+00 6.50224234307e-01 - 295 2.39187741810e+00 5.76457418220e-01 - 296 2.27893577959e+00 5.65177355573e-01 - 297 1.61193176951e+00 6.44497778385e-01 - 298 2.17455212794e+00 5.60829670909e-01 - 299 2.07251417203e+00 5.58724966588e-01 - 300 1.97124520361e+00 5.57700320755e-01 - 301 1.87030453519e+00 5.57257978184e-01 - 302 1.76969309537e+00 5.56947924784e-01 - 303 1.66975690040e+00 5.56005247387e-01 - 304 1.57037447854e+00 5.54346650730e-01 - 305 1.47117018190e+00 5.53035424065e-01 - 306 1.37214791588e+00 5.52906370312e-01 - 307 1.27310347473e+00 5.53477546801e-01 - 308 1.17371585745e+00 5.53962479731e-01 - 309 1.07388859136e+00 5.54157079926e-01 - 310 9.73544986922e-01 5.54007026813e-01 - 311 8.72572424678e-01 5.53461989637e-01 - 312 7.70847646773e-01 5.52434325342e-01 - 313 2.31413671433e+00 6.56816081911e-01 - 314 2.21638752277e+00 6.51141590209e-01 - 315 2.11618909117e+00 6.48377521022e-01 - 316 2.01545530479e+00 6.47010638098e-01 - 317 1.91443403807e+00 6.46484064698e-01 - 318 1.81315334598e+00 6.46514678323e-01 - 319 1.71196810659e+00 6.46592108835e-01 - 320 1.41500035499e+00 6.40293683487e-01 - 321 6.68351643520e-01 5.50948287331e-01 - 322 1.51356294594e+00 6.41217917096e-01 - 323 3.43893257228e-01 4.35322259944e-01 - 324 4.23539493711e-01 4.68544828683e-01 - 325 3.53730287599e-01 5.49982459358e-01 - 326 5.14148061067e-01 4.56875983122e-01 - 327 4.63767827421e-01 5.51878679451e-01 - 328 5.65542983858e-01 5.49747629986e-01 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 25 2 81 - 2 3 3 81 2 27 - 3 3 3 26 35 83 - 4 3 3 26 83 33 - 5 3 3 73 64 84 - 6 3 3 84 64 75 - 7 3 3 34 65 85 - 8 3 3 34 85 63 - 9 3 3 79 74 86 - 10 3 3 86 74 80 - 11 3 3 83 35 87 - 12 3 3 87 35 36 - 13 3 3 25 81 88 - 14 3 3 25 88 24 - 15 3 3 86 80 89 - 16 3 3 89 80 1 - 17 3 3 73 84 90 - 18 3 3 73 90 72 - 19 3 3 84 75 91 - 20 3 3 91 75 76 - 21 3 3 63 85 92 - 22 3 3 63 92 62 - 23 3 3 79 86 93 - 24 3 3 79 93 78 - 25 3 3 81 27 94 - 26 3 3 94 27 28 - 27 3 3 85 65 95 - 28 3 3 95 65 66 - 29 3 3 33 83 96 - 30 3 3 33 96 32 - 31 3 3 95 66 97 - 32 3 3 97 66 67 - 33 3 3 32 96 98 - 34 3 3 32 98 31 - 35 3 3 78 93 99 - 36 3 3 78 99 77 - 37 3 3 94 28 100 - 38 3 3 100 28 29 - 39 3 3 91 76 101 - 40 3 3 101 76 77 - 41 3 3 72 90 102 - 42 3 3 72 102 71 - 43 3 3 62 92 103 - 44 3 3 62 103 61 - 45 3 3 87 36 104 - 46 3 3 104 36 37 - 47 3 3 24 88 105 - 48 3 3 24 105 23 - 49 3 3 104 37 106 - 50 3 3 106 37 38 - 51 3 3 23 105 107 - 52 3 3 23 107 22 - 53 3 3 100 29 108 - 54 3 3 108 29 30 - 55 3 3 71 102 109 - 56 3 3 71 109 70 - 57 3 3 61 103 110 - 58 3 3 61 110 60 - 59 3 3 31 98 82 - 60 3 3 31 82 30 - 61 3 3 97 67 111 - 62 3 3 111 67 68 - 63 3 3 111 68 113 - 64 3 3 113 68 69 - 65 3 3 70 109 112 - 66 3 3 70 112 69 - 67 3 3 60 110 114 - 68 3 3 60 114 59 - 69 3 3 106 38 116 - 70 3 3 116 38 39 - 71 3 3 22 107 117 - 72 3 3 22 117 21 - 73 3 3 21 117 118 - 74 3 3 21 118 20 - 75 3 3 116 39 119 - 76 3 3 119 39 40 - 77 3 3 59 114 120 - 78 3 3 59 120 58 - 79 3 3 20 118 121 - 80 3 3 20 121 19 - 81 3 3 119 40 122 - 82 3 3 122 40 41 - 83 3 3 58 120 123 - 84 3 3 58 123 57 - 85 3 3 57 123 124 - 86 3 3 57 124 56 - 87 3 3 122 41 125 - 88 3 3 125 41 42 - 89 3 3 19 121 126 - 90 3 3 19 126 18 - 91 3 3 125 42 127 - 92 3 3 127 42 43 - 93 3 3 18 126 128 - 94 3 3 18 128 17 - 95 3 3 56 124 129 - 96 3 3 56 129 55 - 97 3 3 55 129 130 - 98 3 3 55 130 54 - 99 3 3 127 43 131 - 100 3 3 131 43 44 - 101 3 3 17 128 132 - 102 3 3 17 132 16 - 103 3 3 16 132 133 - 104 3 3 16 133 15 - 105 3 3 131 44 134 - 106 3 3 134 44 45 - 107 3 3 54 130 135 - 108 3 3 54 135 53 - 109 3 3 15 133 136 - 110 3 3 15 136 14 - 111 3 3 134 45 137 - 112 3 3 137 45 46 - 113 3 3 53 135 138 - 114 3 3 53 138 52 - 115 3 3 52 138 139 - 116 3 3 52 139 51 - 117 3 3 51 139 140 - 118 3 3 51 140 50 - 119 3 3 14 136 141 - 120 3 3 14 141 13 - 121 3 3 13 141 142 - 122 3 3 13 142 12 - 123 3 3 137 46 143 - 124 3 3 143 46 47 - 125 3 3 143 47 144 - 126 3 3 144 47 48 - 127 3 3 12 142 145 - 128 3 3 12 145 11 - 129 3 3 50 140 146 - 130 3 3 50 146 49 - 131 3 3 144 48 115 - 132 3 3 115 48 49 - 133 3 3 11 145 147 - 134 3 3 11 147 10 - 135 3 3 10 147 149 - 136 3 3 10 149 9 - 137 3 3 9 149 150 - 138 3 3 9 150 8 - 139 3 3 8 150 151 - 140 3 3 8 151 7 - 141 3 3 7 151 152 - 142 3 3 7 152 6 - 143 3 3 6 152 153 - 144 3 3 6 153 5 - 145 3 3 5 153 154 - 146 3 3 5 154 4 - 147 3 3 4 154 155 - 148 3 3 4 155 3 - 149 3 3 3 155 156 - 150 3 3 3 156 1 - 151 3 3 101 77 99 - 152 3 3 108 30 82 - 153 3 3 113 69 112 - 154 3 3 49 146 115 - 155 3 3 85 95 92 - 156 3 3 90 84 91 - 157 3 3 83 87 96 - 158 3 3 88 81 94 - 159 3 3 93 86 89 - 160 3 3 1 156 157 - 161 3 3 1 157 89 - 162 3 3 105 88 158 - 163 3 3 158 88 94 - 164 3 3 94 100 159 - 165 3 3 94 159 158 - 166 3 3 100 108 160 - 167 3 3 100 160 159 - 168 3 3 107 105 161 - 169 3 3 161 105 158 - 170 3 3 117 107 162 - 171 3 3 162 107 161 - 172 3 3 118 117 163 - 173 3 3 163 117 162 - 174 3 3 121 118 164 - 175 3 3 164 118 163 - 176 3 3 126 121 165 - 177 3 3 165 121 164 - 178 3 3 128 126 166 - 179 3 3 166 126 165 - 180 3 3 132 128 167 - 181 3 3 167 128 166 - 182 3 3 133 132 168 - 183 3 3 168 132 167 - 184 3 3 136 133 169 - 185 3 3 169 133 168 - 186 3 3 141 136 170 - 187 3 3 170 136 169 - 188 3 3 142 141 171 - 189 3 3 171 141 170 - 190 3 3 145 142 172 - 191 3 3 172 142 171 - 192 3 3 147 145 173 - 193 3 3 173 145 172 - 194 3 3 149 147 174 - 195 3 3 174 147 173 - 196 3 3 150 149 175 - 197 3 3 175 149 174 - 198 3 3 151 150 176 - 199 3 3 176 150 175 - 200 3 3 152 151 177 - 201 3 3 177 151 176 - 202 3 3 153 152 178 - 203 3 3 178 152 177 - 204 3 3 154 153 179 - 205 3 3 179 153 178 - 206 3 3 155 154 180 - 207 3 3 180 154 179 - 208 3 3 156 155 181 - 209 3 3 181 155 180 - 210 3 3 87 104 182 - 211 3 3 87 182 96 - 212 3 3 98 96 183 - 213 3 3 183 96 182 - 214 3 3 82 98 184 - 215 3 3 184 98 183 - 216 3 3 104 106 185 - 217 3 3 104 185 182 - 218 3 3 106 116 186 - 219 3 3 106 186 185 - 220 3 3 116 119 187 - 221 3 3 116 187 186 - 222 3 3 119 122 188 - 223 3 3 119 188 187 - 224 3 3 122 125 189 - 225 3 3 122 189 188 - 226 3 3 125 127 190 - 227 3 3 125 190 189 - 228 3 3 127 131 191 - 229 3 3 127 191 190 - 230 3 3 131 134 192 - 231 3 3 131 192 191 - 232 3 3 134 137 193 - 233 3 3 134 193 192 - 234 3 3 137 143 194 - 235 3 3 137 194 193 - 236 3 3 143 144 195 - 237 3 3 143 195 194 - 238 3 3 144 115 196 - 239 3 3 144 196 195 - 240 3 3 103 92 197 - 241 3 3 197 92 95 - 242 3 3 95 97 198 - 243 3 3 95 198 197 - 244 3 3 97 111 199 - 245 3 3 97 199 198 - 246 3 3 111 113 200 - 247 3 3 111 200 199 - 248 3 3 110 103 201 - 249 3 3 201 103 197 - 250 3 3 114 110 202 - 251 3 3 202 110 201 - 252 3 3 120 114 203 - 253 3 3 203 114 202 - 254 3 3 123 120 204 - 255 3 3 204 120 203 - 256 3 3 124 123 205 - 257 3 3 205 123 204 - 258 3 3 129 124 206 - 259 3 3 206 124 205 - 260 3 3 130 129 207 - 261 3 3 207 129 206 - 262 3 3 135 130 208 - 263 3 3 208 130 207 - 264 3 3 138 135 209 - 265 3 3 209 135 208 - 266 3 3 139 138 210 - 267 3 3 210 138 209 - 268 3 3 140 139 211 - 269 3 3 211 139 210 - 270 3 3 146 140 212 - 271 3 3 212 140 211 - 272 3 3 91 101 213 - 273 3 3 91 213 90 - 274 3 3 102 90 214 - 275 3 3 214 90 213 - 276 3 3 109 102 215 - 277 3 3 215 102 214 - 278 3 3 112 109 216 - 279 3 3 216 109 215 - 280 3 3 99 93 217 - 281 3 3 217 93 89 - 282 3 3 82 184 108 - 283 3 3 160 108 184 - 284 3 3 113 112 216 - 285 3 3 200 113 216 - 286 3 3 115 146 196 - 287 3 3 146 212 218 - 288 3 3 146 218 196 - 289 3 3 89 157 219 - 290 3 3 89 219 217 - 291 3 3 161 158 220 - 292 3 3 220 158 159 - 293 3 3 159 160 220 - 294 3 3 183 182 221 - 295 3 3 221 182 185 - 296 3 3 184 183 221 - 297 3 3 201 197 222 - 298 3 3 222 197 198 - 299 3 3 198 199 222 - 300 3 3 202 201 223 - 301 3 3 223 201 222 - 302 3 3 203 202 224 - 303 3 3 224 202 223 - 304 3 3 204 203 225 - 305 3 3 225 203 224 - 306 3 3 205 204 226 - 307 3 3 226 204 225 - 308 3 3 206 205 227 - 309 3 3 227 205 226 - 310 3 3 207 206 228 - 311 3 3 228 206 227 - 312 3 3 208 207 229 - 313 3 3 229 207 228 - 314 3 3 209 208 230 - 315 3 3 230 208 229 - 316 3 3 210 209 231 - 317 3 3 231 209 230 - 318 3 3 211 210 232 - 319 3 3 232 210 231 - 320 3 3 212 211 233 - 321 3 3 233 211 232 - 322 3 3 162 161 234 - 323 3 3 234 161 220 - 324 3 3 163 162 235 - 325 3 3 235 162 234 - 326 3 3 164 163 236 - 327 3 3 236 163 235 - 328 3 3 165 164 237 - 329 3 3 237 164 236 - 330 3 3 166 165 238 - 331 3 3 238 165 237 - 332 3 3 167 166 239 - 333 3 3 239 166 238 - 334 3 3 168 167 240 - 335 3 3 240 167 239 - 336 3 3 169 168 241 - 337 3 3 241 168 240 - 338 3 3 170 169 242 - 339 3 3 242 169 241 - 340 3 3 171 170 243 - 341 3 3 243 170 242 - 342 3 3 172 171 244 - 343 3 3 244 171 243 - 344 3 3 173 172 245 - 345 3 3 245 172 244 - 346 3 3 174 173 246 - 347 3 3 246 173 245 - 348 3 3 175 174 247 - 349 3 3 247 174 246 - 350 3 3 176 175 248 - 351 3 3 248 175 247 - 352 3 3 177 176 249 - 353 3 3 249 176 248 - 354 3 3 178 177 250 - 355 3 3 250 177 249 - 356 3 3 179 178 251 - 357 3 3 251 178 250 - 358 3 3 180 179 252 - 359 3 3 252 179 251 - 360 3 3 181 180 253 - 361 3 3 253 180 252 - 362 3 3 185 186 254 - 363 3 3 185 254 221 - 364 3 3 186 187 255 - 365 3 3 186 255 254 - 366 3 3 187 188 256 - 367 3 3 187 256 255 - 368 3 3 188 189 257 - 369 3 3 188 257 256 - 370 3 3 189 190 258 - 371 3 3 189 258 257 - 372 3 3 190 191 259 - 373 3 3 190 259 258 - 374 3 3 191 192 260 - 375 3 3 191 260 259 - 376 3 3 192 193 261 - 377 3 3 192 261 260 - 378 3 3 193 194 262 - 379 3 3 193 262 261 - 380 3 3 194 195 263 - 381 3 3 194 263 262 - 382 3 3 195 196 264 - 383 3 3 195 264 263 - 384 3 3 101 99 265 - 385 3 3 265 99 217 - 386 3 3 213 101 265 - 387 3 3 214 213 266 - 388 3 3 266 213 265 - 389 3 3 215 214 266 - 390 3 3 199 200 267 - 391 3 3 199 267 222 - 392 3 3 156 181 268 - 393 3 3 156 268 157 - 394 3 3 216 215 269 - 395 3 3 269 215 266 - 396 3 3 222 267 270 - 397 3 3 222 270 223 - 398 3 3 218 212 271 - 399 3 3 271 212 233 - 400 3 3 196 218 272 - 401 3 3 196 272 264 - 402 3 3 224 223 273 - 403 3 3 273 223 270 - 404 3 3 225 224 274 - 405 3 3 274 224 273 - 406 3 3 226 225 275 - 407 3 3 275 225 274 - 408 3 3 227 226 276 - 409 3 3 276 226 275 - 410 3 3 228 227 277 - 411 3 3 277 227 276 - 412 3 3 229 228 278 - 413 3 3 278 228 277 - 414 3 3 230 229 279 - 415 3 3 279 229 278 - 416 3 3 231 230 280 - 417 3 3 280 230 279 - 418 3 3 232 231 281 - 419 3 3 281 231 280 - 420 3 3 233 232 282 - 421 3 3 282 232 281 - 422 3 3 266 265 283 - 423 3 3 283 265 217 - 424 3 3 217 219 283 - 425 3 3 269 266 284 - 426 3 3 284 266 283 - 427 3 3 219 157 285 - 428 3 3 285 157 268 - 429 3 3 200 216 286 - 430 3 3 286 216 269 - 431 3 3 267 200 286 - 432 3 3 181 253 287 - 433 3 3 181 287 268 - 434 3 3 160 184 288 - 435 3 3 288 184 221 - 436 3 3 220 160 288 - 437 3 3 234 220 289 - 438 3 3 289 220 288 - 439 3 3 221 254 290 - 440 3 3 221 290 288 - 441 3 3 235 234 291 - 442 3 3 291 234 289 - 443 3 3 254 255 292 - 444 3 3 254 292 290 - 445 3 3 236 235 293 - 446 3 3 293 235 291 - 447 3 3 255 256 294 - 448 3 3 255 294 292 - 449 3 3 237 236 295 - 450 3 3 295 236 293 - 451 3 3 256 257 148 - 452 3 3 256 148 294 - 453 3 3 238 237 296 - 454 3 3 296 237 295 - 455 3 3 239 238 298 - 456 3 3 298 238 296 - 457 3 3 240 239 299 - 458 3 3 299 239 298 - 459 3 3 241 240 300 - 460 3 3 300 240 299 - 461 3 3 242 241 301 - 462 3 3 301 241 300 - 463 3 3 243 242 302 - 464 3 3 302 242 301 - 465 3 3 244 243 303 - 466 3 3 303 243 302 - 467 3 3 245 244 304 - 468 3 3 304 244 303 - 469 3 3 246 245 305 - 470 3 3 305 245 304 - 471 3 3 247 246 306 - 472 3 3 306 246 305 - 473 3 3 248 247 307 - 474 3 3 307 247 306 - 475 3 3 249 248 308 - 476 3 3 308 248 307 - 477 3 3 250 249 309 - 478 3 3 309 249 308 - 479 3 3 251 250 310 - 480 3 3 310 250 309 - 481 3 3 252 251 311 - 482 3 3 311 251 310 - 483 3 3 253 252 312 - 484 3 3 312 252 311 - 485 3 3 257 258 313 - 486 3 3 257 313 148 - 487 3 3 258 259 314 - 488 3 3 258 314 313 - 489 3 3 259 260 315 - 490 3 3 259 315 314 - 491 3 3 260 261 316 - 492 3 3 260 316 315 - 493 3 3 261 262 317 - 494 3 3 261 317 316 - 495 3 3 262 263 318 - 496 3 3 262 318 317 - 497 3 3 263 264 319 - 498 3 3 263 319 318 - 499 3 3 288 290 289 - 500 3 3 218 271 272 - 501 3 3 290 292 289 - 502 3 3 291 289 292 - 503 3 3 233 282 320 - 504 3 3 233 320 271 - 505 3 3 292 294 293 - 506 3 3 292 293 291 - 507 3 3 295 293 294 - 508 3 3 294 148 295 - 509 3 3 148 313 295 - 510 3 3 296 295 313 - 511 3 3 313 314 296 - 512 3 3 298 296 314 - 513 3 3 314 315 298 - 514 3 3 299 298 315 - 515 3 3 315 316 299 - 516 3 3 300 299 316 - 517 3 3 316 317 300 - 518 3 3 301 300 317 - 519 3 3 317 318 301 - 520 3 3 302 301 318 - 521 3 3 318 319 302 - 522 3 3 303 302 319 - 523 3 3 219 285 283 - 524 3 3 284 283 285 - 525 3 3 304 303 297 - 526 3 3 297 303 319 - 527 3 3 319 264 297 - 528 3 3 264 272 297 - 529 3 3 253 312 321 - 530 3 3 253 321 287 - 531 3 3 305 304 322 - 532 3 3 322 304 297 - 533 3 3 269 284 323 - 534 3 3 269 323 286 - 535 3 3 267 286 325 - 536 3 3 325 286 323 - 537 3 3 270 267 325 - 538 3 3 273 270 325 - 539 3 3 285 268 326 - 540 3 3 326 268 287 - 541 3 3 306 305 320 - 542 3 3 320 305 322 - 543 3 3 274 273 327 - 544 3 3 327 273 325 - 545 3 3 275 274 328 - 546 3 3 328 274 327 - 547 3 3 276 275 321 - 548 3 3 321 275 328 - 549 3 3 277 276 312 - 550 3 3 312 276 321 - 551 3 3 312 311 277 - 552 3 3 278 277 311 - 553 3 3 311 310 278 - 554 3 3 279 278 310 - 555 3 3 310 309 279 - 556 3 3 280 279 309 - 557 3 3 309 308 280 - 558 3 3 281 280 308 - 559 3 3 308 307 281 - 560 3 3 282 281 307 - 561 3 3 307 306 282 - 562 3 3 306 320 282 - 563 3 3 321 328 287 - 564 3 3 320 322 271 - 565 3 3 272 271 322 - 566 3 3 297 272 322 - 567 3 3 326 287 328 - 568 3 3 328 327 326 - 569 3 3 323 284 285 - 570 3 3 285 326 324 - 571 3 3 285 324 323 - 572 3 3 325 323 324 - 573 3 3 327 325 324 - 574 3 3 327 324 326 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 574 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Inflow 1 10 0 6 - 7 3 1 - 28 3 2 - 32 3 2 - 62 3 2 - 64 3 2 - 66 3 3 - 56 3 3 - 42 3 3 - 18 3 3 - 5 3 1 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Outflow 1 8 0 6 - 2 3 2 - 26 3 2 - 38 3 2 - 54 3 2 - 60 3 3 - 34 3 3 - 30 3 3 - 4 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Wall 1 62 0 6 - 150 3 3 - 148 3 3 - 146 3 3 - 144 3 3 - 142 3 3 - 140 3 3 - 138 3 3 - 136 3 3 - 134 3 3 - 128 3 3 - 122 3 3 - 120 3 3 - 110 3 3 - 104 3 3 - 102 3 3 - 94 3 3 - 90 3 3 - 80 3 3 - 74 3 3 - 72 3 3 - 52 3 3 - 48 3 3 - 14 3 3 - 1 3 1 - 10 3 2 - 16 3 2 - 3 3 1 - 12 3 2 - 46 3 2 - 50 3 2 - 70 3 2 - 76 3 2 - 82 3 2 - 88 3 2 - 92 3 2 - 100 3 2 - 106 3 2 - 112 3 2 - 124 3 2 - 126 3 2 - 132 3 2 - 130 3 3 - 118 3 3 - 116 3 3 - 114 3 3 - 108 3 3 - 98 3 3 - 96 3 3 - 86 3 3 - 84 3 3 - 78 3 3 - 68 3 3 - 58 3 3 - 44 3 3 - 22 3 3 - 8 3 3 - 6 3 2 - 20 3 2 - 40 3 2 - 36 3 3 - 24 3 3 - 9 3 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/Euler02.neu b/cpp/nudg++/trunk/Grid/Euler2D/Euler02.neu deleted file mode 100644 index fcd53a0..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/Euler02.neu +++ /dev/null @@ -1,337 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:52:38 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 99 156 1 3 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 6.00000000000e-01 2.00000000000e-01 - 2 3.00000000000e+00 2.00000000000e-01 - 3 8.00000000000e-01 2.00000000000e-01 - 4 1.00000000000e+00 2.00000000000e-01 - 5 1.20000000000e+00 2.00000000000e-01 - 6 1.40000000000e+00 2.00000000000e-01 - 7 1.60000000000e+00 2.00000000000e-01 - 8 1.80000000000e+00 2.00000000000e-01 - 9 2.00000000000e+00 2.00000000000e-01 - 10 2.20000000000e+00 2.00000000000e-01 - 11 2.40000000000e+00 2.00000000000e-01 - 12 2.60000000000e+00 2.00000000000e-01 - 13 2.80000000000e+00 2.00000000000e-01 - 14 3.00000000000e+00 1.00000000000e+00 - 15 3.00000000000e+00 4.00000000000e-01 - 16 3.00000000000e+00 6.00000000000e-01 - 17 3.00000000000e+00 8.00000000000e-01 - 18 0.00000000000e+00 1.00000000000e+00 - 19 2.80000000000e+00 1.00000000000e+00 - 20 2.60000000000e+00 1.00000000000e+00 - 21 2.40000000000e+00 1.00000000000e+00 - 22 2.20000000000e+00 1.00000000000e+00 - 23 2.00000000000e+00 1.00000000000e+00 - 24 1.80000000000e+00 1.00000000000e+00 - 25 1.60000000000e+00 1.00000000000e+00 - 26 1.40000000000e+00 1.00000000000e+00 - 27 1.20000000000e+00 1.00000000000e+00 - 28 1.00000000000e+00 1.00000000000e+00 - 29 8.00000000000e-01 1.00000000000e+00 - 30 6.00000000000e-01 1.00000000000e+00 - 31 4.00000000000e-01 1.00000000000e+00 - 32 2.00000000000e-01 1.00000000000e+00 - 33 0.00000000000e+00 0.00000000000e+00 - 34 0.00000000000e+00 8.00000000000e-01 - 35 0.00000000000e+00 6.00000000000e-01 - 36 0.00000000000e+00 4.00000000000e-01 - 37 0.00000000000e+00 2.00000000000e-01 - 38 6.00000000000e-01 0.00000000000e+00 - 39 2.00000000000e-01 0.00000000000e+00 - 40 4.00000000000e-01 0.00000000000e+00 - 41 2.84980992383e+00 3.73683978509e-01 - 42 2.89095641658e+00 5.24549941317e-01 - 43 6.50819041953e-01 6.71193191968e-01 - 44 2.86979836029e+00 8.59006248182e-01 - 45 1.43579201827e-01 8.55541965007e-01 - 46 1.32858267950e-01 1.30238134143e-01 - 47 4.60797413486e-01 1.24719337816e-01 - 48 2.86365916829e+00 6.91793343307e-01 - 49 1.97773933718e-01 6.65245735844e-01 - 50 1.40197557429e-01 4.87567105427e-01 - 51 2.93630053960e-01 1.42085639807e-01 - 52 1.82454374844e-01 3.02664467664e-01 - 53 3.20769766438e-01 8.24319798910e-01 - 54 2.66950940157e+00 3.87838846270e-01 - 55 2.69875488956e+00 7.89617476588e-01 - 56 5.20406883243e-01 8.25028435093e-01 - 57 1.49159250950e+00 8.68908399403e-01 - 58 2.49911236560e+00 8.20924698717e-01 - 59 2.47991037896e+00 3.83893571150e-01 - 60 2.28327947984e+00 3.69464475470e-01 - 61 2.30777817897e+00 8.43940264742e-01 - 62 7.22876419613e-01 8.36797504539e-01 - 63 9.22694936690e-01 8.41395655320e-01 - 64 2.08619805948e+00 3.72360669281e-01 - 65 2.11739534329e+00 8.35726652833e-01 - 66 1.12087810446e+00 8.45262548909e-01 - 67 1.91026617790e+00 7.80530953317e-01 - 68 1.88918494637e+00 3.83330489125e-01 - 69 1.31523314600e+00 8.52808285814e-01 - 70 1.66744396427e+00 7.86335041925e-01 - 71 1.69093796513e+00 3.86234852021e-01 - 72 1.48939202315e+00 3.77770234328e-01 - 73 1.28707677804e+00 3.68430656346e-01 - 74 1.08695430897e+00 3.63360539995e-01 - 75 8.90115347097e-01 3.61194819429e-01 - 76 6.97565548466e-01 3.64590292502e-01 - 77 2.74714834986e+00 5.63839617243e-01 - 78 2.55450534818e+00 5.97257565558e-01 - 79 2.35724631120e+00 5.40470035966e-01 - 80 2.17125897152e+00 5.30527460149e-01 - 81 1.98156135906e+00 5.56006539755e-01 - 82 1.78552492238e+00 5.81767068084e-01 - 83 1.57884138379e+00 5.67435323456e-01 - 84 1.37141433002e+00 5.41360407433e-01 - 85 1.16899166529e+00 5.28842715152e-01 - 86 9.71262079471e-01 5.23185719271e-01 - 87 7.80657388693e-01 5.20487891771e-01 - 88 3.92310495879e-01 2.78132067456e-01 - 89 5.06523237500e-01 4.08621230822e-01 - 90 4.39477363350e-01 6.27894983065e-01 - 91 3.11512316652e-01 4.65328122938e-01 - 92 2.39587284415e+00 6.96854868829e-01 - 93 2.23771275321e+00 6.88013150515e-01 - 94 8.48945346195e-01 6.80367428028e-01 - 95 2.07828297324e+00 6.80124443915e-01 - 96 1.04657350707e+00 6.85288733912e-01 - 97 1.24596823840e+00 6.93784783437e-01 - 98 1.44934995040e+00 7.15628856972e-01 - 99 6.10799044102e-01 5.20717935685e-01 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 13 2 41 - 2 3 3 41 2 15 - 3 3 3 14 19 44 - 4 3 3 14 44 17 - 5 3 3 18 34 45 - 6 3 3 18 45 32 - 7 3 3 33 39 46 - 8 3 3 33 46 37 - 9 3 3 40 38 47 - 10 3 3 47 38 1 - 11 3 3 17 44 48 - 12 3 3 17 48 16 - 13 3 3 41 15 42 - 14 3 3 42 15 16 - 15 3 3 45 34 49 - 16 3 3 49 34 35 - 17 3 3 40 47 51 - 18 3 3 40 51 39 - 19 3 3 37 46 52 - 20 3 3 37 52 36 - 21 3 3 32 45 53 - 22 3 3 32 53 31 - 23 3 3 13 41 54 - 24 3 3 13 54 12 - 25 3 3 44 19 55 - 26 3 3 55 19 20 - 27 3 3 49 35 50 - 28 3 3 50 35 36 - 29 3 3 31 53 56 - 30 3 3 31 56 30 - 31 3 3 55 20 58 - 32 3 3 58 20 21 - 33 3 3 12 54 59 - 34 3 3 12 59 11 - 35 3 3 11 59 60 - 36 3 3 11 60 10 - 37 3 3 58 21 61 - 38 3 3 61 21 22 - 39 3 3 30 56 62 - 40 3 3 30 62 29 - 41 3 3 29 62 63 - 42 3 3 29 63 28 - 43 3 3 10 60 64 - 44 3 3 10 64 9 - 45 3 3 61 22 65 - 46 3 3 65 22 23 - 47 3 3 28 63 66 - 48 3 3 28 66 27 - 49 3 3 65 23 67 - 50 3 3 67 23 24 - 51 3 3 9 64 68 - 52 3 3 9 68 8 - 53 3 3 27 66 69 - 54 3 3 27 69 26 - 55 3 3 67 24 70 - 56 3 3 70 24 25 - 57 3 3 8 68 71 - 58 3 3 8 71 7 - 59 3 3 26 69 57 - 60 3 3 26 57 25 - 61 3 3 7 71 72 - 62 3 3 7 72 6 - 63 3 3 6 72 73 - 64 3 3 6 73 5 - 65 3 3 5 73 74 - 66 3 3 5 74 4 - 67 3 3 4 74 75 - 68 3 3 4 75 3 - 69 3 3 3 75 76 - 70 3 3 3 76 1 - 71 3 3 39 51 46 - 72 3 3 16 48 42 - 73 3 3 50 36 52 - 74 3 3 25 57 70 - 75 3 3 52 46 51 - 76 3 3 45 49 53 - 77 3 3 44 55 48 - 78 3 3 54 41 77 - 79 3 3 77 41 42 - 80 3 3 59 54 78 - 81 3 3 78 54 77 - 82 3 3 60 59 79 - 83 3 3 79 59 78 - 84 3 3 64 60 80 - 85 3 3 80 60 79 - 86 3 3 68 64 81 - 87 3 3 81 64 80 - 88 3 3 71 68 82 - 89 3 3 82 68 81 - 90 3 3 72 71 83 - 91 3 3 83 71 82 - 92 3 3 73 72 84 - 93 3 3 84 72 83 - 94 3 3 74 73 85 - 95 3 3 85 73 84 - 96 3 3 75 74 86 - 97 3 3 86 74 85 - 98 3 3 76 75 87 - 99 3 3 87 75 86 - 100 3 3 51 47 88 - 101 3 3 51 88 52 - 102 3 3 47 1 88 - 103 3 3 1 76 89 - 104 3 3 1 89 88 - 105 3 3 56 53 90 - 106 3 3 90 53 49 - 107 3 3 49 50 91 - 108 3 3 49 91 90 - 109 3 3 62 56 43 - 110 3 3 43 56 90 - 111 3 3 55 58 78 - 112 3 3 55 78 77 - 113 3 3 55 77 48 - 114 3 3 58 61 92 - 115 3 3 58 92 78 - 116 3 3 61 65 93 - 117 3 3 61 93 92 - 118 3 3 63 62 94 - 119 3 3 94 62 43 - 120 3 3 65 67 95 - 121 3 3 65 95 93 - 122 3 3 66 63 96 - 123 3 3 96 63 94 - 124 3 3 67 70 82 - 125 3 3 67 82 81 - 126 3 3 67 81 95 - 127 3 3 69 66 97 - 128 3 3 97 66 96 - 129 3 3 57 69 98 - 130 3 3 98 69 97 - 131 3 3 78 92 79 - 132 3 3 48 77 42 - 133 3 3 81 80 95 - 134 3 3 93 95 80 - 135 3 3 91 50 52 - 136 3 3 52 88 91 - 137 3 3 80 79 93 - 138 3 3 92 93 79 - 139 3 3 83 82 70 - 140 3 3 70 57 98 - 141 3 3 70 98 83 - 142 3 3 84 83 98 - 143 3 3 98 97 84 - 144 3 3 85 84 97 - 145 3 3 97 96 85 - 146 3 3 86 85 96 - 147 3 3 96 94 86 - 148 3 3 87 86 94 - 149 3 3 94 43 87 - 150 3 3 88 89 91 - 151 3 3 90 91 89 - 152 3 3 43 90 99 - 153 3 3 99 90 89 - 154 3 3 89 76 99 - 155 3 3 76 87 99 - 156 3 3 87 43 99 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 156 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Inflow 1 5 0 6 - 5 3 1 - 16 3 2 - 28 3 2 - 20 3 3 - 8 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Outflow 1 4 0 6 - 2 3 2 - 14 3 2 - 12 3 3 - 4 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 2.2.30 - Wall 1 31 0 6 - 70 3 3 - 68 3 3 - 66 3 3 - 64 3 3 - 62 3 3 - 58 3 3 - 52 3 3 - 44 3 3 - 36 3 3 - 34 3 3 - 24 3 3 - 1 3 1 - 10 3 2 - 3 3 1 - 26 3 2 - 32 3 2 - 38 3 2 - 46 3 2 - 50 3 2 - 56 3 2 - 60 3 3 - 54 3 3 - 48 3 3 - 42 3 3 - 40 3 3 - 30 3 3 - 22 3 3 - 6 3 3 - 7 3 1 - 18 3 3 - 9 3 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/Scram_0977.neu b/cpp/nudg++/trunk/Grid/Euler2D/Scram_0977.neu deleted file mode 100644 index 168b854..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/Scram_0977.neu +++ /dev/null @@ -1,1894 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(D:\_TW\trunk\VC8\NDG\Grid\Euler2D\geom\Scram_0977.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 590 977 1 3 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 0.000000000e+000 0.000000000e+000 - 2 8.000000000e+000 0.000000000e+000 - 3 8.000000000e+000 8.000000119e-001 - 4 0.000000000e+000 1.700000048e+000 - 5 2.099999905e+000 6.999999881e-001 - 6 4.199999809e+000 2.199999988e-001 - 7 6.699999809e+000 5.899999738e-001 - 8 5.900000095e+000 6.999999881e-001 - 9 4.230751991e+000 7.540559024e-002 - 10 5.227825165e+000 7.364997268e-002 - 11 5.225142956e+000 3.019869030e-001 - 12 4.231472969e+000 1.472288966e-001 - 13 3.764641047e+000 6.584431976e-002 - 14 4.175775051e+000 7.540559024e-002 - 15 4.175775051e+000 1.447248012e-001 - 16 3.733566999e+000 2.391422987e-001 - 17 5.299956799e+000 7.033866644e-002 - 18 5.378022194e+000 6.828434020e-002 - 19 5.379683018e+000 3.269484937e-001 - 20 5.298930168e+000 3.106974959e-001 - 21 6.043021202e+000 2.924548984e-001 - 22 6.820486069e+000 4.005410075e-001 - 23 6.707983017e+000 5.271062851e-001 - 24 6.040404797e+000 4.101384878e-001 - 25 6.045314789e+000 8.012001216e-002 - 26 6.919810772e+000 8.985500038e-002 - 27 6.948572159e+000 1.638115048e-001 - 28 6.043516159e+000 1.948723942e-001 - 29 5.914268017e+000 7.537220716e-001 - 30 6.712987900e+000 6.313955784e-001 - 31 6.868414879e+000 8.803660870e-001 - 32 5.871094227e+000 9.897403717e-001 - 33 6.746655941e+000 5.569897890e-001 - 34 6.957599163e+000 3.425318897e-001 - 35 6.990997791e+000 7.749633789e-001 - 36 6.758961201e+000 6.026939750e-001 - 37 7.708734989e+000 6.822604686e-002 - 38 7.923544884e+000 6.822604686e-002 - 39 7.916035175e+000 7.171620131e-001 - 40 7.698219776e+000 7.442008853e-001 - 41 7.473993778e+000 8.181747794e-002 - 42 7.569032192e+000 8.174554259e-002 - 43 7.567529202e+000 7.502096295e-001 - 44 7.190392971e+000 7.892770767e-001 - 45 2.101727009e+000 7.237203717e-001 - 46 2.447000027e+000 7.409999967e-001 - 47 2.411042929e+000 8.021125793e-001 - 48 2.092888117e+000 7.636889815e-001 - 49 2.061758995e+000 6.537755132e-001 - 50 2.342529058e+000 5.436804295e-001 - 51 2.414649010e+000 5.821446776e-001 - 52 2.084048986e+000 6.825988889e-001 - 53 2.038700104e+000 6.937440038e-001 - 54 2.079437017e+000 7.091165185e-001 - 55 2.066066027e+000 7.480220795e-001 - 56 2.034813881e+000 7.287899852e-001 - 57 5.448896885e+000 6.622999161e-002 - 58 5.517107964e+000 6.584159285e-002 - 59 5.519773006e+000 3.476757109e-001 - 60 5.443815231e+000 3.361100852e-001 - 61 5.577293873e+000 6.725715846e-002 - 62 5.672999859e+000 6.599999964e-002 - 63 5.668713093e+000 3.682192862e-001 - 64 5.581402779e+000 3.507573009e-001 - 65 5.732397079e+000 6.725715846e-002 - 66 5.812572002e+000 6.355117261e-002 - 67 5.807991028e+000 3.910801113e-001 - 68 5.732397079e+000 3.805452883e-001 - 69 5.862999916e+000 6.599999964e-002 - 70 5.961448193e+000 6.584159285e-002 - 71 5.961448193e+000 4.094034135e-001 - 72 5.867540836e+000 3.979513049e-001 - 73 6.085745811e+000 2.398224026e-001 - 74 6.944462776e+000 2.192790061e-001 - 75 6.860235214e+000 3.332952857e-001 - 76 6.160728931e+000 2.726919949e-001 - 77 7.022390842e+000 7.719354331e-002 - 78 7.346065044e+000 7.719354331e-002 - 79 7.174981117e+000 6.012377143e-001 - 80 7.071712971e+000 6.628900170e-001 - 81 4.000000000e+000 0.000000000e+000 - 82 8.000000000e+000 4.000000060e-001 - 83 4.000000000e+000 1.250000000e+000 - 84 3.150000095e+000 4.600000083e-001 - 85 5.449999809e+000 4.050000012e-001 - 86 6.300000191e+000 6.449999809e-001 - 87 4.000000000e+000 6.999999881e-001 - 88 6.325249195e+000 3.316912949e-001 - 89 6.448866367e+000 1.809610575e-001 - 90 6.408505440e+000 6.780281067e-001 - 91 6.369754314e+000 9.350532293e-001 - 92 6.834311008e+000 4.678741693e-001 - 93 6.976850510e+000 5.917895436e-001 - 94 7.376437187e+000 3.251785040e-001 - 95 2.322156191e+000 7.347520590e-001 - 96 2.178132057e+000 6.081434488e-001 - 97 2.249349117e+000 6.323717833e-001 - 98 5.961448193e+000 2.844034135e-001 - 99 6.585602760e+000 2.278641462e-001 - 100 6.510481834e+000 3.029936552e-001 - 101 7.050734520e+000 4.137717485e-001 - 102 6.000000000e+000 0.000000000e+000 - 103 2.000000000e+000 0.000000000e+000 - 104 8.000000000e+000 2.000000030e-001 - 105 6.000000000e+000 1.024999976e+000 - 106 3.674999952e+000 3.400000036e-001 - 107 6.074999809e+000 4.975000024e-001 - 108 6.698719025e+000 1.723862737e-001 - 109 6.560746670e+000 6.547118425e-001 - 110 7.061223984e+000 5.383308530e-001 - 111 5.000000000e+000 0.000000000e+000 - 112 7.000000000e+000 9.125000238e-001 - 113 6.823645592e+000 1.680988967e-001 - 114 8.000000000e+000 6.000000238e-001 - 115 2.000000000e+000 1.475000024e+000 - 116 2.625000000e+000 5.799999833e-001 - 117 4.824999809e+000 3.125000000e-001 - 118 6.166830063e+000 3.096673191e-001 - 119 3.049999952e+000 6.999999881e-001 - 120 6.572867393e+000 3.661161363e-001 - 121 6.293368816e+000 1.862976253e-001 - 122 6.161386490e+000 7.158750892e-001 - 123 6.335605621e+000 2.878428102e-001 - 124 6.913771629e+000 3.870896995e-001 - 125 6.981372356e+000 6.503345966e-001 - 126 7.283415318e+000 5.572277904e-001 - 127 6.335674286e+000 2.338432670e-001 - 128 2.354848623e+000 6.003152728e-001 - 129 2.166698933e+000 6.574853659e-001 - 130 5.961448193e+000 1.908415854e-001 - 131 6.694534302e+000 2.252581269e-001 - 132 6.685358524e+000 3.181444705e-001 - 133 7.032880306e+000 2.017526627e-001 - 134 7.000000000e+000 0.000000000e+000 - 135 3.000000000e+000 0.000000000e+000 - 136 8.000000000e+000 1.000000015e-001 - 137 5.000000000e+000 1.137500048e+000 - 138 3.937500000e+000 2.800000012e-001 - 139 5.762499809e+000 4.512499869e-001 - 140 6.573792458e+000 1.766736656e-001 - 141 7.500000000e+000 8.562499881e-001 - 142 4.500000000e+000 0.000000000e+000 - 143 5.500000000e+000 0.000000000e+000 - 144 6.500000000e+000 9.687500000e-001 - 145 5.137499809e+000 3.587499857e-001 - 146 8.000000000e+000 6.999999881e-001 - 147 3.000000000e+000 1.362499952e+000 - 148 2.362499952e+000 6.399999857e-001 - 149 4.512499809e+000 2.662500143e-001 - 150 2.575000048e+000 6.999999881e-001 - 151 6.449058056e+000 3.489037156e-001 - 152 6.168442249e+000 1.905850172e-001 - 153 6.284945965e+000 6.969516277e-001 - 154 6.248167038e+000 2.802674174e-001 - 155 6.750000000e+000 9.406250119e-001 - 156 6.460638523e+000 2.308537066e-001 - 157 7.236904144e+000 6.732524633e-001 - 158 6.210710049e+000 2.368328422e-001 - 159 5.250000000e+000 0.000000000e+000 - 160 2.113949060e+000 6.735135913e-001 - 161 6.500000000e+000 0.000000000e+000 - 162 6.819498539e+000 2.222685665e-001 - 163 6.597920418e+000 3.105690479e-001 - 164 7.041807175e+000 3.077622056e-001 - 165 7.500000000e+000 0.000000000e+000 - 166 3.500000000e+000 0.000000000e+000 - 167 5.918749809e+000 4.743750095e-001 - 168 5.500000000e+000 1.081249952e+000 - 169 3.806250095e+000 3.100000024e-001 - 170 5.606249809e+000 4.281249940e-001 - 171 7.750000000e+000 8.281250000e-001 - 172 7.250000000e+000 8.843749762e-001 - 173 4.250000000e+000 0.000000000e+000 - 174 5.750000000e+000 0.000000000e+000 - 175 6.250000000e+000 9.968749881e-001 - 176 5.293749809e+000 3.818750083e-001 - 177 2.493750095e+000 6.100000143e-001 - 178 2.231250048e+000 6.700000167e-001 - 179 4.356249809e+000 2.431250066e-001 - 180 2.337500095e+000 6.999999881e-001 - 181 6.510962963e+000 3.575099409e-001 - 182 6.105979443e+000 1.927286983e-001 - 183 6.875000000e+000 9.265624881e-001 - 184 2.296875000e+000 6.549999714e-001 - 185 6.148228168e+000 2.383276224e-001 - 186 6.273192406e+000 2.353380471e-001 - 187 5.375000000e+000 0.000000000e+000 - 188 6.250000000e+000 0.000000000e+000 - 189 6.750000000e+000 0.000000000e+000 - 190 5.371874809e+000 3.934375048e-001 - 191 7.875000000e+000 8.140624762e-001 - 192 7.250000000e+000 0.000000000e+000 - 193 7.750000000e+000 0.000000000e+000 - 194 3.750000000e+000 0.000000000e+000 - 195 5.840624809e+000 4.628125131e-001 - 196 5.750000000e+000 1.053125024e+000 - 197 5.684374809e+000 4.396874905e-001 - 198 5.528124809e+000 4.165624976e-001 - 199 7.625000000e+000 8.421875238e-001 - 200 5.625000000e+000 0.000000000e+000 - 201 4.125000000e+000 0.000000000e+000 - 202 5.875000000e+000 0.000000000e+000 - 203 6.375000000e+000 9.828125238e-001 - 204 5.215624809e+000 3.703125119e-001 - 205 2.428124905e+000 6.250000000e-001 - 206 2.165625095e+000 6.850000024e-001 - 207 2.218750000e+000 6.999999881e-001 - 208 2.456249952e+000 6.999999881e-001 - 209 2.264062405e+000 6.625000238e-001 - 210 6.125000000e+000 0.000000000e+000 - 211 6.875000000e+000 0.000000000e+000 - 212 7.625000000e+000 0.000000000e+000 - 213 7.375000000e+000 0.000000000e+000 - 214 7.875000000e+000 0.000000000e+000 - 215 5.875000000e+000 1.039062500e+000 - 216 2.132812500e+000 6.924999952e-001 - 217 2.278125048e+000 6.999999881e-001 - 218 6.371117592e+000 1.836293340e-001 - 219 6.482563019e+000 8.498750627e-002 - 220 6.619084835e+000 9.077096581e-001 - 221 6.423043728e+000 2.954182327e-001 - 222 6.099999905e+000 6.725000143e-001 - 223 7.260522842e+000 3.392156065e-001 - 224 2.119945526e+000 6.309594512e-001 - 225 2.226570845e+000 7.299683690e-001 - 226 6.374194145e+000 4.686223865e-001 - 227 7.147390842e+000 7.719354331e-002 - 228 6.114367008e+000 2.523686588e-001 - 229 5.865270615e+000 2.319756448e-001 - 230 6.778963089e+000 4.472540021e-001 - 231 6.696676731e+000 3.833285868e-001 - 232 2.208024025e+000 6.449285746e-001 - 233 3.978056192e+000 1.869404912e-001 - 234 3.970207930e+000 7.062495500e-002 - 235 4.731099129e+000 2.250425667e-001 - 236 2.260330677e+000 5.759119391e-001 - 237 2.251965523e+000 7.829008102e-001 - 238 4.729288578e+000 7.452777773e-002 - 239 2.384578228e+000 7.378759980e-001 - 240 7.439062119e+000 7.635174394e-001 - 241 7.568280697e+000 4.159775674e-001 - 242 7.822268009e+000 7.288019657e-001 - 243 7.918928146e+000 4.671787322e-001 - 244 7.798544884e+000 6.822604686e-002 - 245 6.890634060e+000 7.004510164e-001 - 246 6.967224598e+000 4.671607316e-001 - 247 6.120424271e+000 9.623968005e-001 - 248 4.949999809e+000 6.999999881e-001 - 249 2.302098751e+000 6.163435578e-001 - 250 6.500000000e+000 6.175000072e-001 - 251 6.246039391e+000 3.206793070e-001 - 252 6.230905533e+000 1.884413213e-001 - 253 6.204448223e+000 2.764796913e-001 - 254 6.701187134e+000 8.742125332e-002 - 255 6.494419575e+000 9.213814735e-001 - 256 6.263938904e+000 8.255375922e-002 - 257 6.744160175e+000 8.939929008e-001 - 258 6.207299709e+000 4.393804371e-001 - 259 6.199999809e+000 6.587499976e-001 - 260 7.217751980e+000 4.702266455e-001 - 261 2.274363518e+000 7.323601842e-001 - 262 2.164148808e+000 7.268443704e-001 - 263 6.541088581e+000 4.978643358e-001 - 264 7.221065044e+000 7.719354331e-002 - 265 4.978556633e+000 7.408887148e-002 - 266 6.758581161e+000 3.919347823e-001 - 267 4.481286049e+000 1.861357391e-001 - 268 3.855811596e+000 2.130413949e-001 - 269 4.050808907e+000 7.249939442e-002 - 270 4.978120804e+000 2.635147274e-001 - 271 2.331504345e+000 7.925066948e-001 - 272 2.172426701e+000 7.732949257e-001 - 273 4.480020046e+000 7.496668398e-002 - 274 7.917481422e+000 5.921703577e-001 - 275 7.920651913e+000 3.182093203e-001 - 276 6.245089531e+000 9.487250447e-001 - 277 6.962411880e+000 4.048463106e-001 - 278 5.995348930e+000 9.761136174e-001 - 279 5.425000191e+000 6.999999881e-001 - 280 6.400000095e+000 6.312500238e-001 - 281 6.599999905e+000 6.037499905e-001 - 282 6.591875076e+000 8.620437980e-002 - 283 6.810499191e+000 8.863812685e-002 - 284 6.154626846e+000 8.133688569e-002 - 285 6.373250961e+000 8.377063274e-002 - 286 4.356379509e+000 1.666823179e-001 - 287 4.606192589e+000 2.055891454e-001 - 288 4.854609966e+000 2.442786545e-001 - 289 5.101632118e+000 2.827508152e-001 - 290 7.922098637e+000 1.932176799e-001 - 291 6.550000191e+000 6.106250286e-001 - 292 7.125000000e+000 0.000000000e+000 - 293 6.625000000e+000 0.000000000e+000 - 294 7.375000000e+000 8.703125119e-001 - 295 6.375000000e+000 0.000000000e+000 - 296 6.116987228e+000 2.390750051e-001 - 297 6.398156643e+000 2.323484868e-001 - 298 4.668749809e+000 2.893750072e-001 - 299 6.625000000e+000 9.546874762e-001 - 300 4.068749905e+000 2.500000000e-001 - 301 5.809739113e+000 2.660923302e-001 - 302 7.703477383e+000 4.062134624e-001 - 303 6.772796631e+000 3.257198930e-001 - 304 6.802220345e+000 7.743319273e-001 - 305 6.037827492e+000 7.347986102e-001 - 306 7.329926014e+000 4.412031472e-001 - 307 6.223166466e+000 7.064133286e-001 - 308 6.387153625e+000 3.402974904e-001 - 309 6.206434727e+000 3.151733279e-001 - 310 4.076915741e+000 1.658326387e-001 - 311 4.981249809e+000 3.356249928e-001 - 312 8.000000000e+000 5.000000000e-001 - 313 4.750000000e+000 0.000000000e+000 - 314 6.636867523e+000 6.430537105e-001 - 315 6.387499809e+000 5.437499881e-001 - 316 4.355386257e+000 7.518614084e-002 - 317 6.125000000e+000 1.010937452e+000 - 318 2.396874905e+000 6.999999881e-001 - 319 2.159374952e+000 6.999999881e-001 - 320 6.484625816e+000 6.663699746e-001 - 321 6.104925632e+000 3.010611236e-001 - 322 8.000000000e+000 3.000000119e-001 - 323 3.875000000e+000 0.000000000e+000 - 324 4.746874809e+000 3.009375036e-001 - 325 4.590624809e+000 2.778125107e-001 - 326 5.810823917e+000 1.885389388e-001 - 327 6.099606991e+000 7.253368497e-001 - 328 5.059374809e+000 3.471874893e-001 - 329 6.543749809e+000 5.668749809e-001 - 330 6.231249809e+000 5.206249952e-001 - 331 5.866405964e+000 3.149634898e-001 - 332 6.000000000e+000 6.862499714e-001 - 333 4.375000000e+000 0.000000000e+000 - 334 5.864135265e+000 1.489878297e-001 - 335 5.732397079e+000 2.239012271e-001 - 336 3.867424488e+000 6.823463738e-002 - 337 6.650000095e+000 5.968750119e-001 - 338 7.314727783e+000 7.763972878e-001 - 339 5.808865070e+000 3.285862207e-001 - 340 5.811697960e+000 1.260450631e-001 - 341 5.670485973e+000 2.432318777e-001 - 342 5.579348564e+000 2.090072334e-001 - 343 5.518590927e+000 2.226812840e-001 - 344 5.446355820e+000 2.011700422e-001 - 345 5.378880501e+000 2.019510716e-001 - 346 5.299443722e+000 1.905180812e-001 - 347 5.226611137e+000 1.769955158e-001 - 348 1.000000000e+000 1.587499976e+000 - 349 1.000000000e+000 0.000000000e+000 - 350 1.832074285e+000 1.093248367e+000 - 351 1.500000000e+000 0.000000000e+000 - 352 1.973540306e+000 9.372209311e-001 - 353 1.459239364e+000 6.472302079e-001 - 354 1.762052655e+000 5.075020790e-001 - 355 5.662499905e+000 6.999999881e-001 - 356 2.031899452e+000 3.208164871e-001 - 357 2.500000000e+000 1.418750048e+000 - 358 1.840536952e+000 6.895095706e-001 - 359 2.252537966e+000 1.112261772e+000 - 360 2.500000000e+000 0.000000000e+000 - 361 2.026798248e+000 8.460423946e-001 - 362 2.516993523e+000 3.034062088e-001 - 363 2.091024637e+000 4.716006517e-001 - 364 1.941342592e+000 6.109397411e-001 - 365 5.781250000e+000 6.999999881e-001 - 366 1.948251128e+000 7.014532089e-001 - 367 2.191715002e+000 9.476864934e-001 - 368 2.550189734e+000 8.428484201e-001 - 369 3.625000000e+000 0.000000000e+000 - 370 6.272799969e+000 8.240703344e-001 - 371 2.352585554e+000 9.520498514e-001 - 372 6.148824215e+000 8.402727246e-001 - 373 7.706106186e+000 2.372197658e-001 - 374 7.568656445e+000 2.488615513e-001 - 375 7.307271481e+000 1.960213929e-001 - 376 7.425215721e+000 2.034979910e-001 - 377 6.836193085e+000 5.573922396e-001 - 378 2.503332615e+000 4.565485120e-001 - 379 2.243886709e+000 4.130470753e-001 - 380 6.542793751e+000 7.918298841e-001 - 381 2.812500000e+000 6.999999881e-001 - 382 6.123852253e+000 4.247594774e-001 - 383 2.053719997e+000 7.999518514e-001 - 384 2.124468088e+000 8.721840382e-001 - 385 3.412499905e+000 4.000000060e-001 - 386 6.177587509e+000 3.774806857e-001 - 387 3.540251017e+000 1.943192780e-001 - 388 2.515625000e+000 6.999999881e-001 - 389 7.184227943e+000 1.946019530e-001 - 390 4.853922844e+000 7.430832833e-002 - 391 4.875000000e+000 0.000000000e+000 - 392 4.937500000e+000 0.000000000e+000 - 393 6.746085644e+000 6.844126582e-001 - 394 6.824797630e+000 6.515725255e-001 - 395 5.125000000e+000 0.000000000e+000 - 396 5.102825165e+000 7.387006283e-002 - 397 5.040690899e+000 7.397946715e-002 - 398 5.071941376e+000 1.781374216e-001 - 399 4.604654312e+000 7.474723458e-002 - 400 4.625000000e+000 0.000000000e+000 - 401 4.687500000e+000 0.000000000e+000 - 402 5.721875191e+000 8.726907969e-001 - 403 1.972522616e+000 7.834317684e-001 - 404 6.457641125e+000 4.832433760e-001 - 405 6.465624809e+000 5.553125143e-001 - 406 2.058480263e+000 5.598106384e-001 - 407 1.949298620e+000 4.694204330e-001 - 408 2.931250095e+000 1.024174571e+000 - 409 3.500000000e+000 1.306249976e+000 - 410 3.525000095e+000 6.999999881e-001 - 411 3.250000000e+000 0.000000000e+000 - 412 2.507091284e+000 1.159878492e+000 - 413 4.474999905e+000 6.999999881e-001 - 414 4.500000000e+000 1.193750024e+000 - 415 4.250000000e+000 1.221874952e+000 - 416 1.500000000e+000 1.531250000e+000 - 417 2.250000000e+000 0.000000000e+000 - 418 4.095644474e+000 9.750000238e-001 - 419 3.730913162e+000 1.002279520e+000 - 420 0.000000000e+000 6.999999881e-001 - 421 2.887500048e+000 5.199999809e-001 - 422 3.287499905e+000 9.708370566e-001 - 423 1.198567748e+000 1.102198958e+000 - 424 5.287161469e-001 1.111393809e+000 - 425 8.567428589e-001 6.041928530e-001 - 426 2.750000000e+000 1.390625000e+000 - 427 1.764543891e+000 8.898748159e-001 - 428 1.515149474e+000 1.085585117e+000 - 429 2.040613890e+000 1.140180111e+000 - 430 2.250000000e+000 1.446874976e+000 - 431 4.350217342e+000 9.875233769e-001 - 432 4.633203030e+000 9.394976497e-001 - 433 3.125000000e+000 2.136956453e-001 - 434 2.839305878e+000 2.374039143e-001 - 435 1.896760225e+000 1.292603850e+000 - 436 1.750000000e+000 1.503124952e+000 - 437 1.669580460e+000 1.256145835e+000 - 438 1.442875147e+000 1.306218266e+000 - 439 1.250000000e+000 1.559375048e+000 - 440 1.099283814e+000 1.344849467e+000 - 441 5.000000000e-001 1.643749952e+000 - 442 7.643581033e-001 1.349446893e+000 - 443 8.624057174e-001 1.016738176e+000 - 444 1.493973970e+000 3.245190978e-001 - 445 1.170334697e+000 4.529094994e-001 - 446 1.650421023e+000 6.635648608e-001 - 447 1.537347913e+000 8.600108624e-001 - 448 1.266231537e+000 8.388069868e-001 - 449 1.568469524e+000 4.957621694e-001 - 450 4.237500191e+000 6.999999881e-001 - 451 1.750000000e+000 0.000000000e+000 - 452 2.207933903e+000 2.059461921e-001 - 453 1.250000000e+000 0.000000000e+000 - 454 1.125000000e+000 2.114740759e-001 - 455 5.000000000e-001 0.000000000e+000 - 456 7.870066762e-001 2.685781121e-001 - 457 4.137327373e-001 5.211918950e-001 - 458 6.245389581e-001 8.136917949e-001 - 459 0.000000000e+000 1.200000048e+000 - 460 2.915293574e-001 8.707768321e-001 - 461 2.166692972e+000 1.278926849e+000 - 462 4.750000000e+000 1.165624976e+000 - 463 4.854402542e+000 9.684731364e-001 - 464 5.187500000e+000 6.999999881e-001 - 465 5.250000000e+000 1.109375000e+000 - 466 5.086597443e+000 9.156846404e-001 - 467 5.306250095e+000 8.869987130e-001 - 468 4.712500095e+000 6.999999881e-001 - 469 5.505309582e+000 8.822034597e-001 - 470 2.750000000e+000 0.000000000e+000 - 471 2.375000000e+000 1.328013688e-001 - 472 9.769893289e-001 3.642402291e-001 - 473 3.332811356e+000 2.079899609e-001 - 474 1.875000000e+000 1.744231433e-001 - 475 1.662823439e+000 1.944770217e-001 - 476 1.826207519e+000 3.435672820e-001 - 477 1.332873106e+000 1.916654557e-001 - 478 1.323563337e+000 3.670585155e-001 - 479 1.320596814e+000 5.414322019e-001 - 480 1.016154051e+000 5.339723229e-001 - 481 1.028754354e+000 7.786308527e-001 - 482 8.274247050e-001 8.051315546e-001 - 483 2.856873274e+000 1.215436339e+000 - 484 2.704470158e+000 1.046078324e+000 - 485 2.676004648e+000 1.225291252e+000 - 486 2.803563833e+000 8.871106505e-001 - 487 2.974266052e+000 8.560947180e-001 - 488 3.287499905e+000 6.999999881e-001 - 489 3.155082464e+000 8.474036455e-001 - 490 3.113461256e+000 1.024798751e+000 - 491 3.250000000e+000 1.334375024e+000 - 492 3.247803688e+000 1.150445342e+000 - 493 3.452297449e+000 1.101450920e+000 - 494 3.075553417e+000 1.199973464e+000 - 495 3.478661299e+000 8.989167213e-001 - 496 3.750000000e+000 1.278125048e+000 - 497 3.762500048e+000 6.999999881e-001 - 498 3.881249905e+000 8.651989698e-001 - 499 3.625000000e+000 1.292187452e+000 - 500 0.000000000e+000 3.499999940e-001 - 501 2.500000000e-001 0.000000000e+000 - 502 3.750000000e-001 2.470454872e-001 - 503 0.000000000e+000 1.250000000e-001 - 504 1.707464904e-001 2.374999970e-001 - 505 1.960518956e-001 4.617321193e-001 - 506 2.580571771e-001 6.629244685e-001 - 507 4.499340653e-001 7.173159122e-001 - 508 6.315473318e-001 5.823899508e-001 - 509 5.765952468e-001 3.597548008e-001 - 510 7.500000000e-001 0.000000000e+000 - 511 8.750000000e-001 0.000000000e+000 - 512 6.164039969e-001 1.632477939e-001 - 513 7.580524087e-001 4.496468902e-001 - 514 4.987314045e-001 1.376728892e+000 - 515 0.000000000e+000 1.450000048e+000 - 516 2.484328300e-001 1.672051311e+000 - 517 2.363836467e-001 1.325000048e+000 - 518 2.087809294e-001 1.091189742e+000 - 519 0.000000000e+000 9.499999881e-001 - 520 1.443153173e-001 7.878625989e-001 - 521 7.567810059e+000 6.252099276e-001 - 522 7.700164318e+000 6.192160249e-001 - 523 2.507203102e+000 9.984491467e-001 - 524 4.125000000e+000 1.235937476e+000 - 525 3.919196844e+000 1.067764282e+000 - 526 1.674987912e+000 1.032510638e+000 - 527 4.375000000e+000 1.207812548e+000 - 528 4.503609180e+000 1.033621907e+000 - 529 3.125000000e+000 0.000000000e+000 - 530 2.976478100e+000 1.571658254e-001 - 531 2.992609262e+000 3.515542746e-001 - 532 2.722585440e+000 4.027170837e-001 - 533 1.769392490e+000 1.360228181e+000 - 534 1.580494285e+000 1.391049743e+000 - 535 1.360168934e+000 1.156971335e+000 - 536 1.372728944e+000 9.803134203e-001 - 537 1.268787622e+000 1.305150390e+000 - 538 1.375000000e+000 1.545312524e+000 - 539 1.125000000e+000 1.573437452e+000 - 540 9.327985644e-001 1.418366671e+000 - 541 9.402928352e-001 1.210070133e+000 - 542 1.029945612e+000 1.061596870e+000 - 543 7.500000000e-001 1.615625024e+000 - 544 7.216567397e-001 1.156061530e+000 - 545 6.587016582e-001 9.889603257e-001 - 546 6.229356527e-001 1.279267192e+000 - 547 1.406650305e+000 7.872614264e-001 - 548 4.356249809e+000 8.193024993e-001 - 549 4.118750095e+000 6.999999881e-001 - 550 2.050481796e+000 1.569746733e-001 - 551 1.125000000e+000 0.000000000e+000 - 552 4.729363024e-001 9.291671515e-001 - 553 3.713618219e-001 1.059909701e+000 - 554 2.359966993e+000 1.285381198e+000 - 555 2.034231663e+000 1.335208178e+000 - 556 4.949839115e+000 8.511993289e-001 - 557 5.125000000e+000 1.123437524e+000 - 558 5.375000000e+000 1.095312476e+000 - 559 4.757706642e+000 8.478440046e-001 - 560 4.593750000e+000 6.999999881e-001 - 561 2.657638788e+000 1.702434868e-001 - 562 2.354693890e+000 2.940946817e-001 - 563 3.281250000e+000 4.300000072e-001 - 564 3.375000000e+000 0.000000000e+000 - 565 1.503603458e+000 1.623824090e-001 - 566 1.661866903e+000 3.595945239e-001 - 567 1.165650010e+000 6.489267349e-001 - 568 3.345661402e+000 8.354185224e-001 - 569 3.578443527e+000 1.014888287e+000 - 570 3.649695158e+000 8.410025239e-001 - 571 3.750000000e-001 0.000000000e+000 - 572 3.317986429e-001 3.929585516e-001 - 573 0.000000000e+000 5.249999762e-001 - 574 9.450447559e-001 1.751635224e-001 - 575 1.242164150e-001 1.686025620e+000 - 576 0.000000000e+000 1.575000048e+000 - 577 3.576802611e-001 1.510912657e+000 - 578 1.747469306e-001 1.504491687e+000 - 579 0.000000000e+000 1.325000048e+000 - 580 1.552683264e-001 9.453604221e-001 - 581 0.000000000e+000 1.075000048e+000 - 582 4.218574047e+000 1.069831848e+000 - 583 3.789657593e+000 1.136797905e+000 - 584 1.086992383e+000 1.198183298e+000 - 585 1.119361758e+000 9.197348952e-001 - 586 6.250000000e-001 1.629687548e+000 - 587 3.901319802e-001 1.236376166e+000 - 588 1.419261098e-001 1.217616796e+000 - 589 3.643228531e+000 1.146569252e+000 - 590 6.418362856e-001 1.463289499e+000 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 236 363 379 - 2 3 3 201 173 14 - 3 3 3 13 194 323 - 4 3 3 265 288 390 - 5 3 3 235 287 238 - 6 3 3 14 9 15 - 7 3 3 57 187 143 - 8 3 3 269 233 234 - 9 3 3 300 138 233 - 10 3 3 336 233 268 - 11 3 3 11 145 289 - 12 3 3 12 6 15 - 13 3 3 398 347 289 - 14 3 3 402 32 196 - 15 3 3 15 9 12 - 16 3 3 432 413 560 - 17 3 3 346 347 17 - 18 3 3 13 387 369 - 19 3 3 345 18 344 - 20 3 3 187 57 18 - 21 3 3 61 58 143 - 22 3 3 61 143 200 - 23 3 3 62 200 174 - 24 3 3 58 61 342 - 25 3 3 159 187 17 - 26 3 3 344 58 343 - 27 3 3 18 345 346 - 28 3 3 347 10 17 - 29 3 3 344 18 57 - 30 3 3 342 62 341 - 31 3 3 335 62 65 - 32 3 3 346 17 18 - 33 3 3 333 142 273 - 34 3 3 145 11 204 - 35 3 3 66 340 65 - 36 3 3 102 70 202 - 37 3 3 38 214 2 - 38 3 3 176 19 190 - 39 3 3 53 49 52 - 40 3 3 55 383 56 - 41 3 3 54 52 5 - 42 3 3 52 54 53 - 43 3 3 232 96 97 - 44 3 3 54 5 45 - 45 3 3 249 236 50 - 46 3 3 53 54 56 - 47 3 3 383 55 48 - 48 3 3 364 53 366 - 49 3 3 55 45 48 - 50 3 3 55 56 54 - 51 3 3 45 262 48 - 52 3 3 403 427 358 - 53 3 3 54 45 55 - 54 3 3 367 371 359 - 55 3 3 209 178 97 - 56 3 3 366 53 56 - 57 3 3 190 60 85 - 58 3 3 58 344 57 - 59 3 3 335 341 62 - 60 3 3 61 62 342 - 61 3 3 67 72 195 - 62 3 3 139 197 68 - 63 3 3 342 343 58 - 64 3 3 170 64 63 - 65 3 3 46 208 388 - 66 3 3 47 271 239 - 67 3 3 160 216 5 - 68 3 3 177 51 378 - 69 3 3 290 38 136 - 70 3 3 473 563 433 - 71 3 3 72 71 167 - 72 3 3 368 388 150 - 73 3 3 340 335 65 - 74 3 3 59 85 60 - 75 3 3 224 406 96 - 76 3 3 59 198 85 - 77 3 3 229 326 334 - 78 3 3 463 462 432 - 79 3 3 71 98 21 - 80 3 3 202 66 174 - 81 3 3 89 219 140 - 82 3 3 28 130 25 - 83 3 3 25 70 102 - 84 3 3 285 121 256 - 85 3 3 219 285 295 - 86 3 3 334 70 130 - 87 3 3 130 229 334 - 88 3 3 70 25 130 - 89 3 3 108 99 140 - 90 3 3 156 89 140 - 91 3 3 120 163 231 - 92 3 3 228 321 73 - 93 3 3 28 73 21 - 94 3 3 132 231 163 - 95 3 3 75 303 162 - 96 3 3 195 139 67 - 97 3 3 164 223 101 - 98 3 3 264 292 192 - 99 3 3 244 193 214 - 100 3 3 41 213 165 - 101 3 3 243 275 82 - 102 3 3 212 193 37 - 103 3 3 134 26 211 - 104 3 3 42 373 374 - 105 3 3 77 133 27 - 106 3 3 163 131 132 - 107 3 3 375 376 94 - 108 3 3 164 101 34 - 109 3 3 41 165 42 - 110 3 3 43 240 521 - 111 3 3 264 78 375 - 112 3 3 74 34 75 - 113 3 3 242 522 274 - 114 3 3 77 27 26 - 115 3 3 69 202 70 - 116 3 3 75 34 124 - 117 3 3 6 12 179 - 118 3 3 71 21 24 - 119 3 3 7 23 33 - 120 3 3 321 24 21 - 121 3 3 230 22 92 - 122 3 3 7 33 36 - 123 3 3 107 258 330 - 124 3 3 320 280 250 - 125 3 3 29 365 8 - 126 3 3 367 429 352 - 127 3 3 323 81 234 - 128 3 3 222 305 332 - 129 3 3 30 36 393 - 130 3 3 29 305 278 - 131 3 3 7 36 30 - 132 3 3 372 278 305 - 133 3 3 23 230 33 - 134 3 3 404 405 315 - 135 3 3 377 36 33 - 136 3 3 101 110 246 - 137 3 3 40 43 521 - 138 3 3 74 133 164 - 139 3 3 171 40 242 - 140 3 3 79 157 80 - 141 3 3 374 302 241 - 142 3 3 240 338 126 - 143 3 3 35 44 112 - 144 3 3 393 304 257 - 145 3 3 172 112 44 - 146 3 3 44 35 80 - 147 3 3 43 199 141 - 148 3 3 240 43 141 - 149 3 3 44 80 157 - 150 3 3 144 255 220 - 151 3 3 39 146 3 - 152 3 3 377 33 92 - 153 3 3 23 231 230 - 154 3 3 366 56 403 - 155 3 3 170 198 64 - 156 3 3 334 340 69 - 157 3 3 86 153 259 - 158 3 3 532 378 362 - 159 3 3 488 568 489 - 160 3 3 321 21 73 - 161 3 3 88 308 226 - 162 3 3 162 108 113 - 163 3 3 282 254 108 - 164 3 3 314 393 380 - 165 3 3 30 314 337 - 166 3 3 317 278 247 - 167 3 3 255 91 380 - 168 3 3 92 124 246 - 169 3 3 22 124 92 - 170 3 3 93 125 245 - 171 3 3 80 125 93 - 172 3 3 374 41 42 - 173 3 3 375 94 223 - 174 3 3 207 262 319 - 175 3 3 272 48 262 - 176 3 3 103 474 451 - 177 3 3 129 160 224 - 178 3 3 51 205 128 - 179 3 3 249 50 128 - 180 3 3 72 331 71 - 181 3 3 21 98 28 - 182 3 3 252 121 186 - 183 3 3 123 154 186 - 184 3 3 123 297 221 - 185 3 3 308 88 123 - 186 3 3 93 110 80 - 187 3 3 79 80 110 - 188 3 3 174 65 62 - 189 3 3 116 177 378 - 190 3 3 136 104 290 - 191 3 3 278 317 105 - 192 3 3 16 169 106 - 193 3 3 24 107 71 - 194 3 3 108 162 131 - 195 3 3 108 254 283 - 196 3 3 380 257 220 - 197 3 3 314 109 281 - 198 3 3 260 110 101 - 199 3 3 246 110 93 - 200 3 3 111 397 265 - 201 3 3 112 31 35 - 202 3 3 27 74 113 - 203 3 3 26 27 113 - 204 3 3 312 274 243 - 205 3 3 427 352 350 - 206 3 3 452 471 562 - 207 3 3 117 288 311 - 208 3 3 309 251 386 - 209 3 3 88 154 123 - 210 3 3 408 486 487 - 211 3 3 308 123 221 - 212 3 3 181 120 263 - 213 3 3 252 152 284 - 214 3 3 186 158 252 - 215 3 3 276 247 372 - 216 3 3 307 122 259 - 217 3 3 154 158 186 - 218 3 3 309 118 253 - 219 3 3 377 246 93 - 220 3 3 75 124 22 - 221 3 3 93 394 377 - 222 3 3 80 35 125 - 223 3 3 522 241 302 - 224 3 3 306 223 94 - 225 3 3 100 156 99 - 226 3 3 297 89 156 - 227 3 3 148 128 205 - 228 3 3 50 51 128 - 229 3 3 129 224 96 - 230 3 3 129 206 216 - 231 3 3 98 71 331 - 232 3 3 28 98 130 - 233 3 3 99 108 131 - 234 3 3 131 163 99 - 235 3 3 303 22 266 - 236 3 3 303 131 162 - 237 3 3 77 227 133 - 238 3 3 27 133 74 - 239 3 3 26 134 77 - 240 3 3 529 411 433 - 241 3 3 38 2 136 - 242 3 3 464 466 556 - 243 3 3 310 6 300 - 244 3 3 67 139 68 - 245 3 3 218 285 89 - 246 3 3 156 140 99 - 247 3 3 199 40 171 - 248 3 3 273 316 333 - 249 3 3 57 143 58 - 250 3 3 155 257 31 - 251 3 3 204 20 176 - 252 3 3 274 146 39 - 253 3 3 490 408 487 - 254 3 3 184 249 148 - 255 3 3 298 287 235 - 256 3 3 180 239 95 - 257 3 3 151 404 226 - 258 3 3 100 181 151 - 259 3 3 25 284 182 - 260 3 3 182 152 185 - 261 3 3 91 370 90 - 262 3 3 86 90 153 - 263 3 3 158 253 76 - 264 3 3 118 76 253 - 265 3 3 31 183 155 - 266 3 3 218 297 127 - 267 3 3 297 123 127 - 268 3 3 521 126 306 - 269 3 3 79 126 157 - 270 3 3 182 185 296 - 271 3 3 228 296 185 - 272 3 3 10 159 17 - 273 3 3 52 49 160 - 274 3 3 5 52 160 - 275 3 3 219 295 161 - 276 3 3 74 75 162 - 277 3 3 113 74 162 - 278 3 3 100 99 163 - 279 3 3 120 100 163 - 280 3 3 375 389 264 - 281 3 3 74 164 34 - 282 3 3 213 41 78 - 283 3 3 194 13 369 - 284 3 3 71 107 167 - 285 3 3 355 402 469 - 286 3 3 268 169 16 - 287 3 3 63 197 170 - 288 3 3 191 242 39 - 289 3 3 294 338 240 - 290 3 3 14 173 9 - 291 3 3 65 174 66 - 292 3 3 203 175 276 - 293 3 3 19 176 20 - 294 3 3 50 379 562 - 295 3 3 97 178 232 - 296 3 3 267 179 286 - 297 3 3 95 217 180 - 298 3 3 404 181 263 - 299 3 3 100 120 181 - 300 3 3 28 25 182 - 301 3 3 73 28 182 - 302 3 3 31 112 183 - 303 3 3 148 249 128 - 304 3 3 158 76 185 - 305 3 3 152 158 185 - 306 3 3 123 186 127 - 307 3 3 121 127 186 - 308 3 3 17 187 18 - 309 3 3 188 256 284 - 310 3 3 254 189 283 - 311 3 3 60 190 19 - 312 3 3 39 3 191 - 313 3 3 292 77 134 - 314 3 3 212 37 42 - 315 3 3 16 387 13 - 316 3 3 72 167 195 - 317 3 3 32 215 196 - 318 3 3 68 197 63 - 319 3 3 64 198 59 - 320 3 3 40 199 43 - 321 3 3 61 200 62 - 322 3 3 81 269 234 - 323 3 3 66 202 69 - 324 3 3 255 203 91 - 325 3 3 20 204 11 - 326 3 3 51 177 205 - 327 3 3 232 206 129 - 328 3 3 319 45 5 - 329 3 3 318 46 239 - 330 3 3 97 184 209 - 331 3 3 25 102 210 - 332 3 3 283 211 26 - 333 3 3 42 165 212 - 334 3 3 78 192 213 - 335 3 3 193 244 37 - 336 3 3 32 105 215 - 337 3 3 129 216 160 - 338 3 3 225 217 261 - 339 3 3 89 285 219 - 340 3 3 127 121 218 - 341 3 3 283 113 108 - 342 3 3 293 254 282 - 343 3 3 380 90 320 - 344 3 3 144 220 299 - 345 3 3 100 151 221 - 346 3 3 156 100 221 - 347 3 3 332 29 8 - 348 3 3 260 101 223 - 349 3 3 260 306 126 - 350 3 3 363 406 407 - 351 3 3 160 49 224 - 352 3 3 261 271 237 - 353 3 3 217 225 207 - 354 3 3 258 386 251 - 355 3 3 107 24 382 - 356 3 3 223 164 389 - 357 3 3 264 227 292 - 358 3 3 321 76 118 - 359 3 3 185 76 228 - 360 3 3 301 331 339 - 361 3 3 98 229 130 - 362 3 3 231 23 263 - 363 3 3 33 230 92 - 364 3 3 22 230 266 - 365 3 3 22 303 75 - 366 3 3 129 96 232 - 367 3 3 206 232 178 - 368 3 3 13 336 268 - 369 3 3 138 268 233 - 370 3 3 233 269 310 - 371 3 3 269 81 201 - 372 3 3 286 273 267 - 373 3 3 287 325 149 - 374 3 3 236 96 363 - 375 3 3 97 96 236 - 376 3 3 47 371 271 - 377 3 3 261 237 225 - 378 3 3 235 390 288 - 379 3 3 265 392 111 - 380 3 3 46 47 239 - 381 3 3 46 318 208 - 382 3 3 157 126 338 - 383 3 3 338 172 44 - 384 3 3 373 42 37 - 385 3 3 376 374 94 - 386 3 3 290 373 244 - 387 3 3 171 242 191 - 388 3 3 40 522 242 - 389 3 3 274 312 114 - 390 3 3 38 290 244 - 391 3 3 214 38 244 - 392 3 3 35 31 245 - 393 3 3 125 35 245 - 394 3 3 277 101 246 - 395 3 3 124 277 246 - 396 3 3 203 276 91 - 397 3 3 372 307 370 - 398 3 3 524 83 525 - 399 3 3 97 236 249 - 400 3 3 184 97 249 - 401 3 3 280 320 90 - 402 3 3 226 258 88 - 403 3 3 154 88 251 - 404 3 3 284 152 182 - 405 3 3 158 152 252 - 406 3 3 309 154 251 - 407 3 3 158 154 253 - 408 3 3 254 293 189 - 409 3 3 282 108 140 - 410 3 3 90 380 91 - 411 3 3 203 255 144 - 412 3 3 210 284 25 - 413 3 3 252 256 121 - 414 3 3 393 257 380 - 415 3 3 299 257 155 - 416 3 3 330 226 315 - 417 3 3 88 258 251 - 418 3 3 122 222 259 - 419 3 3 110 260 79 - 420 3 3 126 79 260 - 421 3 3 271 261 95 - 422 3 3 217 95 261 - 423 3 3 272 225 237 - 424 3 3 207 225 262 - 425 3 3 7 329 23 - 426 3 3 231 263 120 - 427 3 3 376 78 41 - 428 3 3 192 78 264 - 429 3 3 398 270 265 - 430 3 3 10 347 396 - 431 3 3 132 303 231 - 432 3 3 230 231 266 - 433 3 3 286 316 273 - 434 3 3 179 267 149 - 435 3 3 16 13 268 - 436 3 3 169 268 138 - 437 3 3 15 310 14 - 438 3 3 201 14 269 - 439 3 3 288 265 270 - 440 3 3 288 270 311 - 441 3 3 368 47 46 - 442 3 3 239 271 95 - 443 3 3 384 352 361 - 444 3 3 225 272 262 - 445 3 3 267 399 287 - 446 3 3 238 287 399 - 447 3 3 39 242 274 - 448 3 3 146 274 114 - 449 3 3 275 243 302 - 450 3 3 82 275 322 - 451 3 3 372 327 122 - 452 3 3 175 247 276 - 453 3 3 34 101 277 - 454 3 3 124 34 277 - 455 3 3 32 29 278 - 456 3 3 105 32 278 - 457 3 3 469 558 467 - 458 3 3 90 86 280 - 459 3 3 109 291 281 - 460 3 3 219 161 282 - 461 3 3 140 219 282 - 462 3 3 26 113 283 - 463 3 3 211 283 189 - 464 3 3 252 284 256 - 465 3 3 188 284 210 - 466 3 3 188 295 256 - 467 3 3 121 285 218 - 468 3 3 316 12 9 - 469 3 3 179 12 286 - 470 3 3 399 267 273 - 471 3 3 149 267 287 - 472 3 3 390 235 238 - 473 3 3 324 288 117 - 474 3 3 398 265 397 - 475 3 3 270 328 311 - 476 3 3 275 373 290 - 477 3 3 322 290 104 - 478 3 3 109 250 291 - 479 3 3 77 292 227 - 480 3 3 282 161 293 - 481 3 3 240 141 294 - 482 3 3 256 295 285 - 483 3 3 73 182 296 - 484 3 3 228 73 296 - 485 3 3 156 221 297 - 486 3 3 89 297 218 - 487 3 3 235 324 298 - 488 3 3 257 299 220 - 489 3 3 310 300 233 - 490 3 3 68 335 339 - 491 3 3 339 72 67 - 492 3 3 521 522 40 - 493 3 3 522 243 274 - 494 3 3 131 303 132 - 495 3 3 231 303 266 - 496 3 3 31 257 304 - 497 3 3 245 31 304 - 498 3 3 372 305 327 - 499 3 3 222 327 305 - 500 3 3 94 241 306 - 501 3 3 223 306 260 - 502 3 3 370 307 153 - 503 3 3 259 153 307 - 504 3 3 226 308 151 - 505 3 3 221 151 308 - 506 3 3 24 321 382 - 507 3 3 154 309 253 - 508 3 3 6 310 15 - 509 3 3 14 310 269 - 510 3 3 328 270 289 - 511 3 3 243 82 312 - 512 3 3 238 401 313 - 513 3 3 393 314 30 - 514 3 3 30 337 7 - 515 3 3 404 315 226 - 516 3 3 9 173 316 - 517 3 3 12 316 286 - 518 3 3 247 175 317 - 519 3 3 239 180 318 - 520 3 3 45 319 262 - 521 3 3 380 320 109 - 522 3 3 250 109 320 - 523 3 3 118 386 321 - 524 3 3 76 321 228 - 525 3 3 290 322 275 - 526 3 3 13 323 336 - 527 3 3 288 324 235 - 528 3 3 287 298 325 - 529 3 3 301 339 335 - 530 3 3 229 301 326 - 531 3 3 122 307 372 - 532 3 3 222 122 327 - 533 3 3 289 145 328 - 534 3 3 23 329 263 - 535 3 3 226 330 258 - 536 3 3 229 98 331 - 537 3 3 301 229 331 - 538 3 3 29 332 305 - 539 3 3 316 173 333 - 540 3 3 70 334 69 - 541 3 3 69 340 66 - 542 3 3 63 341 68 - 543 3 3 301 335 326 - 544 3 3 233 336 234 - 545 3 3 323 234 336 - 546 3 3 314 281 337 - 547 3 3 44 157 338 - 548 3 3 172 338 294 - 549 3 3 67 68 339 - 550 3 3 72 339 331 - 551 3 3 335 340 326 - 552 3 3 334 326 340 - 553 3 3 63 64 341 - 554 3 3 68 341 335 - 555 3 3 59 343 64 - 556 3 3 341 64 342 - 557 3 3 59 60 343 - 558 3 3 64 343 342 - 559 3 3 60 19 344 - 560 3 3 343 60 344 - 561 3 3 19 20 345 - 562 3 3 344 19 345 - 563 3 3 20 11 346 - 564 3 3 345 20 346 - 565 3 3 11 289 347 - 566 3 3 346 11 347 - 567 3 3 561 470 434 - 568 3 3 447 353 446 - 569 3 3 537 439 440 - 570 3 3 478 454 477 - 571 3 3 53 364 49 - 572 3 3 384 237 367 - 573 3 3 271 371 237 - 574 3 3 438 428 437 - 575 3 3 544 546 424 - 576 3 3 446 449 354 - 577 3 3 367 352 384 - 578 3 3 402 355 365 - 579 3 3 363 96 406 - 580 3 3 351 451 475 - 581 3 3 526 427 350 - 582 3 3 350 352 429 - 583 3 3 446 354 358 - 584 3 3 371 367 237 - 585 3 3 461 429 359 - 586 3 3 550 417 452 - 587 3 3 434 531 532 - 588 3 3 358 366 403 - 589 3 3 50 236 379 - 590 3 3 495 569 493 - 591 3 3 406 224 49 - 592 3 3 356 379 363 - 593 3 3 358 354 364 - 594 3 3 407 356 363 - 595 3 3 402 29 32 - 596 3 3 56 383 403 - 597 3 3 358 364 366 - 598 3 3 367 359 429 - 599 3 3 384 361 383 - 600 3 3 408 484 486 - 601 3 3 412 359 371 - 602 3 3 387 16 106 - 603 3 3 90 370 153 - 604 3 3 91 276 370 - 605 3 3 368 523 47 - 606 3 3 418 548 431 - 607 3 3 276 372 370 - 608 3 3 372 247 278 - 609 3 3 373 275 302 - 610 3 3 37 244 373 - 611 3 3 241 94 374 - 612 3 3 302 374 373 - 613 3 3 389 164 133 - 614 3 3 264 389 227 - 615 3 3 41 374 376 - 616 3 3 78 376 375 - 617 3 3 246 377 92 - 618 3 3 394 93 245 - 619 3 3 50 378 51 - 620 3 3 530 135 529 - 621 3 3 417 471 452 - 622 3 3 562 378 50 - 623 3 3 314 380 109 - 624 3 3 220 255 380 - 625 3 3 150 381 486 - 626 3 3 258 107 382 - 627 3 3 309 386 118 - 628 3 3 384 48 272 - 629 3 3 383 361 403 - 630 3 3 48 384 383 - 631 3 3 237 384 272 - 632 3 3 387 166 369 - 633 3 3 258 382 386 - 634 3 3 321 386 382 - 635 3 3 106 385 387 - 636 3 3 387 473 564 - 637 3 3 223 389 375 - 638 3 3 46 388 368 - 639 3 3 133 227 389 - 640 3 3 392 390 391 - 641 3 3 390 238 313 - 642 3 3 390 313 391 - 643 3 3 390 392 265 - 644 3 3 304 394 245 - 645 3 3 393 394 304 - 646 3 3 36 377 394 - 647 3 3 393 36 394 - 648 3 3 397 395 396 - 649 3 3 395 159 10 - 650 3 3 395 10 396 - 651 3 3 398 397 396 - 652 3 3 395 397 111 - 653 3 3 347 398 396 - 654 3 3 270 398 289 - 655 3 3 401 399 400 - 656 3 3 399 273 142 - 657 3 3 399 142 400 - 658 3 3 399 401 238 - 659 3 3 402 365 29 - 660 3 3 469 196 168 - 661 3 3 361 352 403 - 662 3 3 403 352 427 - 663 3 3 405 263 329 - 664 3 3 181 404 151 - 665 3 3 263 405 404 - 666 3 3 49 364 406 - 667 3 3 407 406 364 - 668 3 3 364 354 407 - 669 3 3 451 474 475 - 670 3 3 419 570 498 - 671 3 3 484 483 485 - 672 3 3 570 410 497 - 673 3 3 489 490 487 - 674 3 3 473 387 385 - 675 3 3 47 523 371 - 676 3 3 483 484 408 - 677 3 3 418 431 582 - 678 3 3 527 528 414 - 679 3 3 528 527 431 - 680 3 3 429 435 350 - 681 3 3 356 452 379 - 682 3 3 524 525 418 - 683 3 3 418 549 450 - 684 3 3 493 589 409 - 685 3 3 493 409 492 - 686 3 3 472 454 445 - 687 3 3 541 584 440 - 688 3 3 84 531 433 - 689 3 3 492 409 491 - 690 3 3 541 440 540 - 691 3 3 425 472 480 - 692 3 3 590 543 586 - 693 3 3 513 425 508 - 694 3 3 460 506 507 - 695 3 3 445 478 479 - 696 3 3 426 483 147 - 697 3 3 357 412 485 - 698 3 3 447 427 526 - 699 3 3 350 435 437 - 700 3 3 447 428 536 - 701 3 3 554 412 357 - 702 3 3 461 555 429 - 703 3 3 554 430 461 - 704 3 3 555 115 435 - 705 3 3 532 561 434 - 706 3 3 432 559 463 - 707 3 3 462 463 137 - 708 3 3 564 166 387 - 709 3 3 531 434 530 - 710 3 3 532 421 116 - 711 3 3 561 471 360 - 712 3 3 534 438 437 - 713 3 3 526 437 428 - 714 3 3 115 436 533 - 715 3 3 435 533 437 - 716 3 3 436 534 533 - 717 3 3 540 539 348 - 718 3 3 535 428 438 - 719 3 3 416 438 534 - 720 3 3 539 540 440 - 721 3 3 423 535 537 - 722 3 3 515 578 576 - 723 3 3 348 543 540 - 724 3 3 546 544 442 - 725 3 3 544 545 443 - 726 3 3 481 425 480 - 727 3 3 547 353 447 - 728 3 3 474 103 550 - 729 3 3 502 512 509 - 730 3 3 454 453 477 - 731 3 3 427 446 358 - 732 3 3 449 446 353 - 733 3 3 427 447 446 - 734 3 3 428 535 536 - 735 3 3 481 448 585 - 736 3 3 567 448 481 - 737 3 3 449 353 479 - 738 3 3 444 475 566 - 739 3 3 407 354 476 - 740 3 3 413 548 450 - 741 3 3 550 452 356 - 742 3 3 417 360 471 - 743 3 3 454 551 453 - 744 3 3 565 477 351 - 745 3 3 456 513 509 - 746 3 3 501 503 1 - 747 3 3 574 472 456 - 748 3 3 510 511 574 - 749 3 3 481 482 425 - 750 3 3 571 455 502 - 751 3 3 545 552 458 - 752 3 3 458 507 508 - 753 3 3 460 518 580 - 754 3 3 518 553 587 - 755 3 3 472 574 454 - 756 3 3 554 359 412 - 757 3 3 555 430 115 - 758 3 3 468 559 560 - 759 3 3 414 528 462 - 760 3 3 466 465 557 - 761 3 3 466 137 463 - 762 3 3 466 464 467 - 763 3 3 556 466 463 - 764 3 3 464 279 467 - 765 3 3 467 279 469 - 766 3 3 558 469 168 - 767 3 3 355 469 279 - 768 3 3 559 248 556 - 769 3 3 196 469 402 - 770 3 3 561 360 470 - 771 3 3 135 530 470 - 772 3 3 562 471 362 - 773 3 3 480 472 445 - 774 3 3 513 472 425 - 775 3 3 563 84 433 - 776 3 3 473 433 411 - 777 3 3 476 356 407 - 778 3 3 566 475 476 - 779 3 3 475 474 476 - 780 3 3 565 475 444 - 781 3 3 354 449 566 - 782 3 3 356 476 474 - 783 3 3 351 477 453 - 784 3 3 478 477 444 - 785 3 3 478 444 449 - 786 3 3 454 478 445 - 787 3 3 449 479 478 - 788 3 3 479 353 547 - 789 3 3 567 445 479 - 790 3 3 480 567 481 - 791 3 3 585 423 542 - 792 3 3 482 458 508 - 793 3 3 481 443 482 - 794 3 3 545 482 443 - 795 3 3 485 483 426 - 796 3 3 494 408 490 - 797 3 3 523 484 412 - 798 3 3 368 150 486 - 799 3 3 357 485 426 - 800 3 3 484 485 412 - 801 3 3 368 486 484 - 802 3 3 487 381 119 - 803 3 3 381 487 486 - 804 3 3 487 119 489 - 805 3 3 410 495 568 - 806 3 3 488 489 119 - 807 3 3 489 422 490 - 808 3 3 422 492 490 - 809 3 3 494 483 408 - 810 3 3 492 422 493 - 811 3 3 490 492 494 - 812 3 3 494 491 147 - 813 3 3 495 493 422 - 814 3 3 525 583 419 - 815 3 3 491 494 492 - 816 3 3 483 494 147 - 817 3 3 568 495 422 - 818 3 3 570 419 569 - 819 3 3 418 498 87 - 820 3 3 493 569 589 - 821 3 3 498 497 87 - 822 3 3 525 498 418 - 823 3 3 505 500 504 - 824 3 3 583 496 589 - 825 3 3 512 456 509 - 826 3 3 501 502 504 - 827 3 3 504 502 572 - 828 3 3 501 504 503 - 829 3 3 500 503 504 - 830 3 3 505 572 457 - 831 3 3 506 505 457 - 832 3 3 506 573 505 - 833 3 3 507 506 457 - 834 3 3 506 460 520 - 835 3 3 508 507 457 - 836 3 3 507 458 552 - 837 3 3 508 457 509 - 838 3 3 508 425 482 - 839 3 3 572 509 457 - 840 3 3 512 510 456 - 841 3 3 502 501 571 - 842 3 3 574 349 454 - 843 3 3 511 349 574 - 844 3 3 510 512 455 - 845 3 3 509 513 508 - 846 3 3 472 513 456 - 847 3 3 577 441 516 - 848 3 3 514 517 587 - 849 3 3 577 578 517 - 850 3 3 579 459 588 - 851 3 3 578 579 517 - 852 3 3 590 514 546 - 853 3 3 420 506 520 - 854 3 3 460 552 553 - 855 3 3 519 580 581 - 856 3 3 580 520 460 - 857 3 3 519 420 520 - 858 3 3 521 306 241 - 859 3 3 126 521 240 - 860 3 3 522 302 243 - 861 3 3 241 522 521 - 862 3 3 484 523 368 - 863 3 3 412 371 523 - 864 3 3 582 524 418 - 865 3 3 583 83 496 - 866 3 3 498 525 419 - 867 3 3 437 526 350 - 868 3 3 447 526 428 - 869 3 3 528 431 548 - 870 3 3 527 415 582 - 871 3 3 462 528 432 - 872 3 3 530 529 433 - 873 3 3 531 530 433 - 874 3 3 470 530 434 - 875 3 3 84 421 531 - 876 3 3 532 531 421 - 877 3 3 378 532 116 - 878 3 3 561 532 362 - 879 3 3 115 533 435 - 880 3 3 534 436 416 - 881 3 3 533 534 437 - 882 3 3 439 537 538 - 883 3 3 537 535 438 - 884 3 3 423 585 536 - 885 3 3 423 536 535 - 886 3 3 536 448 547 - 887 3 3 438 538 537 - 888 3 3 537 440 584 - 889 3 3 438 416 538 - 890 3 3 440 439 539 - 891 3 3 590 441 514 - 892 3 3 442 544 541 - 893 3 3 442 541 540 - 894 3 3 542 541 443 - 895 3 3 585 443 481 - 896 3 3 584 542 423 - 897 3 3 540 543 442 - 898 3 3 545 544 424 - 899 3 3 541 544 443 - 900 3 3 552 545 424 - 901 3 3 545 458 482 - 902 3 3 518 587 517 - 903 3 3 546 514 587 - 904 3 3 536 547 447 - 905 3 3 547 448 567 - 906 3 3 413 432 548 - 907 3 3 418 87 549 - 908 3 3 418 450 548 - 909 3 3 474 550 356 - 910 3 3 417 550 103 - 911 3 3 454 349 551 - 912 3 3 553 552 424 - 913 3 3 507 552 460 - 914 3 3 546 587 424 - 915 3 3 460 553 518 - 916 3 3 430 554 357 - 917 3 3 359 554 461 - 918 3 3 429 555 435 - 919 3 3 430 555 461 - 920 3 3 556 463 559 - 921 3 3 464 556 248 - 922 3 3 465 466 467 - 923 3 3 557 137 466 - 924 3 3 558 465 467 - 925 3 3 559 468 248 - 926 3 3 560 559 432 - 927 3 3 432 528 548 - 928 3 3 561 362 471 - 929 3 3 378 562 362 - 930 3 3 452 562 379 - 931 3 3 473 385 563 - 932 3 3 473 411 564 - 933 3 3 477 565 444 - 934 3 3 351 475 565 - 935 3 3 354 566 476 - 936 3 3 444 566 449 - 937 3 3 445 567 480 - 938 3 3 567 479 547 - 939 3 3 489 568 422 - 940 3 3 410 568 488 - 941 3 3 570 569 495 - 942 3 3 419 583 589 - 943 3 3 410 570 495 - 944 3 3 498 570 497 - 945 3 3 502 455 512 - 946 3 3 504 572 505 - 947 3 3 509 572 502 - 948 3 3 573 506 420 - 949 3 3 573 500 505 - 950 3 3 574 456 510 - 951 3 3 575 576 578 - 952 3 3 575 4 576 - 953 3 3 578 577 516 - 954 3 3 517 514 577 - 955 3 3 575 578 516 - 956 3 3 515 579 578 - 957 3 3 517 588 518 - 958 3 3 580 518 581 - 959 3 3 520 580 519 - 960 3 3 588 581 518 - 961 3 3 527 582 431 - 962 3 3 524 582 415 - 963 3 3 83 583 525 - 964 3 3 589 496 499 - 965 3 3 542 584 541 - 966 3 3 537 584 423 - 967 3 3 585 448 536 - 968 3 3 443 585 542 - 969 3 3 514 441 577 - 970 3 3 546 442 590 - 971 3 3 424 587 553 - 972 3 3 579 588 517 - 973 3 3 581 588 459 - 974 3 3 589 499 409 - 975 3 3 419 589 569 - 976 3 3 543 590 442 - 977 3 3 441 590 586 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 977 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 729 730 - 731 732 733 734 735 736 737 738 739 740 - 741 742 743 744 745 746 747 748 749 750 - 751 752 753 754 755 756 757 758 759 760 - 761 762 763 764 765 766 767 768 769 770 - 771 772 773 774 775 776 777 778 779 780 - 781 782 783 784 785 786 787 788 789 790 - 791 792 793 794 795 796 797 798 799 800 - 801 802 803 804 805 806 807 808 809 810 - 811 812 813 814 815 816 817 818 819 820 - 821 822 823 824 825 826 827 828 829 830 - 831 832 833 834 835 836 837 838 839 840 - 841 842 843 844 845 846 847 848 849 850 - 851 852 853 854 855 856 857 858 859 860 - 861 862 863 864 865 866 867 868 869 870 - 871 872 873 874 875 876 877 878 879 880 - 881 882 883 884 885 886 887 888 889 890 - 891 892 893 894 895 896 897 898 899 900 - 901 902 903 904 905 906 907 908 909 910 - 911 912 913 914 915 916 917 918 919 920 - 921 922 923 924 925 926 927 928 929 930 - 931 932 933 934 935 936 937 938 939 940 - 941 942 943 944 945 946 947 948 949 950 - 951 952 953 954 955 956 957 958 959 960 - 961 962 963 964 965 966 967 968 969 970 - 971 972 973 974 975 976 977 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - wall 1 184 0 0 - 2 3 1 - 3 3 2 - 7 3 2 - 9 3 1 - 16 3 2 - 22 3 2 - 23 3 2 - 25 3 1 - 33 3 1 - 34 3 3 - 36 3 3 - 37 3 2 - 38 3 3 - 55 3 1 - 57 3 3 - 62 3 1 - 65 3 2 - 67 3 2 - 72 3 2 - 76 3 2 - 80 3 3 - 96 3 1 - 98 3 2 - 99 3 2 - 100 3 2 - 102 3 1 - 103 3 3 - 117 3 3 - 123 3 3 - 124 3 2 - 125 3 2 - 127 3 1 - 128 3 3 - 134 3 2 - 145 3 1 - 147 3 2 - 155 3 1 - 157 3 3 - 174 3 3 - 176 3 3 - 189 3 1 - 191 3 2 - 192 3 2 - 207 3 3 - 227 3 3 - 230 3 2 - 240 3 1 - 243 3 2 - 247 3 3 - 251 3 3 - 254 3 3 - 265 3 2 - 275 3 2 - 283 3 3 - 284 3 2 - 287 3 2 - 292 3 1 - 297 3 2 - 302 3 2 - 312 3 2 - 313 3 3 - 316 3 2 - 317 3 2 - 326 3 2 - 328 3 3 - 330 3 2 - 331 3 2 - 333 3 2 - 334 3 2 - 336 3 2 - 344 3 3 - 347 3 3 - 353 3 3 - 367 3 3 - 371 3 2 - 373 3 2 - 379 3 2 - 381 3 2 - 387 3 3 - 398 3 1 - 408 3 2 - 411 3 3 - 415 3 3 - 416 3 3 - 418 3 2 - 425 3 1 - 434 3 3 - 436 3 3 - 458 3 2 - 459 3 2 - 463 3 3 - 465 3 3 - 466 3 1 - 473 3 3 - 475 3 2 - 478 3 2 - 480 3 2 - 481 3 2 - 487 3 2 - 512 3 2 - 514 3 2 - 518 3 2 - 519 3 2 - 528 3 2 - 533 3 2 - 539 3 2 - 546 3 2 - 548 3 3 - 578 3 2 - 580 3 1 - 620 3 2 - 625 3 1 - 632 3 2 - 635 3 1 - 640 3 3 - 642 3 2 - 649 3 1 - 652 3 3 - 655 3 3 - 657 3 2 - 660 3 2 - 663 3 3 - 672 3 2 - 678 3 3 - 683 3 2 - 689 3 2 - 692 3 2 - 696 3 3 - 707 3 3 - 708 3 1 - 710 3 2 - 714 3 1 - 717 3 2 - 723 3 1 - 740 3 3 - 742 3 1 - 743 3 2 - 746 3 3 - 748 3 1 - 750 3 1 - 757 3 2 - 758 3 3 - 759 3 3 - 760 3 2 - 764 3 1 - 766 3 3 - 767 3 3 - 770 3 2 - 771 3 3 - 775 3 1 - 783 3 3 - 799 3 3 - 802 3 2 - 806 3 3 - 812 3 2 - 821 3 2 - 841 3 2 - 843 3 1 - 844 3 3 - 847 3 2 - 865 3 2 - 870 3 1 - 875 3 1 - 880 3 2 - 882 3 3 - 889 3 2 - 890 3 2 - 907 3 2 - 910 3 3 - 911 3 2 - 916 3 3 - 921 3 3 - 923 3 1 - 924 3 1 - 925 3 2 - 931 3 2 - 932 3 2 - 940 3 3 - 952 3 1 - 955 3 3 - 962 3 3 - 964 3 2 - 974 3 2 - 977 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - inflow 1 11 0 0 - 722 3 3 - 746 3 2 - 829 3 1 - 850 3 1 - 855 3 3 - 857 3 1 - 948 3 3 - 949 3 1 - 952 3 2 - 956 3 1 - 973 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - outflow 1 8 0 0 - 151 3 2 - 190 3 1 - 241 3 2 - 389 3 2 - 448 3 3 - 450 3 3 - 477 3 3 - 511 3 2 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/fstepA001.neu b/cpp/nudg++/trunk/Grid/Euler2D/fstepA001.neu deleted file mode 100644 index bf5bcdf..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/fstepA001.neu +++ /dev/null @@ -1,744 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(C:\Documents and Settings\Administrator\Desktop\WUM_v5\fstepA001.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 227 381 1 3 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 3.499999940e-001 0.000000000e+000 - 2 1.500000000e+000 1.000000000e+000 - 3 0.000000000e+000 5.000000000e-001 - 4 6.000000238e-001 2.000000030e-001 - 5 0.000000000e+000 0.000000000e+000 - 6 1.799999952e+000 2.000000030e-001 - 7 3.000000000e+000 1.000000000e+000 - 8 0.000000000e+000 1.000000000e+000 - 9 6.000000238e-001 0.000000000e+000 - 10 3.000000000e+000 2.000000030e-001 - 11 7.500000000e-001 1.000000000e+000 - 12 2.903846204e-001 3.307692409e-001 - 13 3.750000000e-001 1.000000000e+000 - 14 5.930132866e-001 6.153725386e-001 - 15 1.200000048e+000 2.000000030e-001 - 16 1.125000000e+000 1.000000000e+000 - 17 1.312500000e+000 6.140624881e-001 - 18 2.250000000e+000 1.000000000e+000 - 19 1.752935767e+000 6.386008859e-001 - 20 2.400000095e+000 2.000000030e-001 - 21 9.375000000e-001 6.991203427e-001 - 22 2.793914378e-001 6.456581354e-001 - 23 2.099999905e+000 2.000000030e-001 - 24 2.250000000e+000 5.859375000e-001 - 25 3.000000000e+000 6.000000238e-001 - 26 2.500000000e+000 1.000000000e+000 - 27 2.375000000e+000 7.929687500e-001 - 28 2.616138935e+000 5.061239600e-001 - 29 2.642254829e+000 7.728588581e-001 - 30 1.875000000e+000 1.000000000e+000 - 31 2.141052246e+000 7.929687500e-001 - 32 1.998669863e+000 5.858598351e-001 - 33 2.750000000e+000 1.000000000e+000 - 34 3.000000000e+000 8.000000119e-001 - 35 2.827684641e+000 6.999999881e-001 - 36 2.822749853e+000 4.930336475e-001 - 37 2.700000048e+000 2.000000030e-001 - 38 3.000000000e+000 4.000000060e-001 - 39 1.835760474e+000 4.256628752e-001 - 40 1.500000000e+000 2.000000030e-001 - 41 1.577244520e+000 4.476869702e-001 - 42 2.875000000e+000 2.000000030e-001 - 43 3.000000000e+000 3.249999881e-001 - 44 2.867276907e+000 3.625000119e-001 - 45 2.712020397e+000 3.824008703e-001 - 46 2.549999952e+000 2.000000030e-001 - 47 2.474999905e+000 3.764106929e-001 - 48 2.255039215e+000 3.657775223e-001 - 49 2.436178684e+000 5.602937341e-001 - 50 1.351449370e+000 3.822158575e-001 - 51 1.079436779e+000 4.557137489e-001 - 52 8.999999762e-001 2.000000030e-001 - 53 8.124518394e-001 4.631147087e-001 - 54 2.057549953e+000 3.950872719e-001 - 55 1.924601436e+000 7.892767787e-001 - 56 1.687500000e+000 1.000000000e+000 - 57 1.593750000e+000 7.964018583e-001 - 58 1.378334165e+000 8.205935955e-001 - 59 1.157443523e+000 7.772467732e-001 - 60 1.781250000e+000 8.667331338e-001 - 61 1.312500000e+000 1.000000000e+000 - 62 2.847060442e+000 8.650754690e-001 - 63 1.950000048e+000 2.000000030e-001 - 64 1.875000000e+000 3.037797511e-001 - 65 1.987833381e+000 3.063321114e-001 - 66 1.946662784e+000 4.104299545e-001 - 67 1.904970050e+000 5.182138085e-001 - 68 1.883264542e+000 6.469962597e-001 - 69 1.791402936e+000 5.309863687e-001 - 70 1.662449598e+000 5.455739498e-001 - 71 1.492831707e+000 6.071901321e-001 - 72 1.705275297e+000 4.222700000e-001 - 73 1.649999976e+000 2.000000030e-001 - 74 1.626911402e+000 6.706624031e-001 - 75 1.619542360e+000 3.255824447e-001 - 76 1.484043241e+000 3.470230997e-001 - 77 1.716463089e+000 7.589508295e-001 - 78 1.754451275e+000 3.119079173e-001 - 79 2.013624191e+000 4.860026836e-001 - 80 2.148991346e+000 4.953361452e-001 - 81 2.124322891e+000 6.244444847e-001 - 82 2.028691053e+000 7.119846344e-001 - 83 2.216334105e+000 7.004030943e-001 - 84 2.338059902e+000 6.740207076e-001 - 85 2.258026123e+000 8.112059236e-001 - 86 2.375000000e+000 1.000000000e+000 - 87 2.062500000e+000 1.000000000e+000 - 88 2.183865309e+000 9.026207924e-001 - 89 2.437500000e+000 8.964843750e-001 - 90 2.508627415e+000 7.829138041e-001 - 91 2.565496683e+000 6.457282305e-001 - 92 2.625000000e+000 1.000000000e+000 - 93 2.687500000e+000 8.905218840e-001 - 94 2.707867384e+000 6.183864474e-001 - 95 2.562500000e+000 8.937693238e-001 - 96 2.325947285e+000 8.997576237e-001 - 97 1.821227789e+000 7.693403363e-001 - 98 2.625000000e+000 2.965390384e-001 - 99 2.257498264e+000 4.759714603e-001 - 100 2.362728119e+000 4.184986949e-001 - 101 2.250000000e+000 2.000000030e-001 - 102 2.351922274e+000 3.042271137e-001 - 103 2.338074207e+000 5.367044210e-001 - 104 0.000000000e+000 7.500000000e-001 - 105 2.500000000e-001 1.000000000e+000 - 106 3.125000000e-001 8.267942667e-001 - 107 5.625000000e-001 1.000000000e+000 - 108 6.562500000e-001 8.139132857e-001 - 109 1.382157207e-001 8.617842793e-001 - 110 4.438008070e-001 7.092008591e-001 - 111 4.249126613e-001 5.136052966e-001 - 112 6.038160324e-001 4.078091979e-001 - 113 4.681637287e-001 8.685033917e-001 - 114 7.619346976e-001 6.709108353e-001 - 115 8.265474439e-001 8.292162418e-001 - 116 9.375000000e-001 1.000000000e+000 - 117 9.821487665e-001 8.495602012e-001 - 118 7.500000000e-001 2.000000030e-001 - 119 8.249999881e-001 3.211673200e-001 - 120 9.810317755e-001 3.339523375e-001 - 121 1.049999952e+000 2.000000030e-001 - 122 1.125000000e+000 3.209175169e-001 - 123 1.217709661e+000 4.273535311e-001 - 124 1.174270630e+000 5.668236613e-001 - 125 1.032757759e+000 5.915808678e-001 - 126 8.985267878e-001 5.686390400e-001 - 127 9.362040758e-001 4.500387907e-001 - 128 6.959132552e-001 3.172739148e-001 - 129 1.350000024e+000 2.000000030e-001 - 130 1.252678156e+000 3.102631569e-001 - 131 1.450059265e-001 7.120479345e-001 - 132 1.500286609e-001 5.530091524e-001 - 133 0.000000000e+000 2.500000000e-001 - 134 1.259451210e-001 3.823581934e-001 - 135 1.650287956e-001 2.190677226e-001 - 136 3.246015310e-001 1.661792994e-001 - 137 4.506171048e-001 2.782285810e-001 - 138 1.749999970e-001 0.000000000e+000 - 139 4.749999940e-001 0.000000000e+000 - 140 6.000000238e-001 1.250000000e-001 - 141 4.851872921e-001 1.624999940e-001 - 142 2.832225263e-001 5.036718845e-001 - 143 0.000000000e+000 6.250000000e-001 - 144 4.124999940e-001 8.548752218e-002 - 145 1.315132022e+000 4.953096807e-001 - 146 1.446867228e+000 4.752350748e-001 - 147 1.057633877e+000 7.095750570e-001 - 148 1.156442404e+000 6.712823510e-001 - 149 7.109829187e-001 4.247142673e-001 - 150 7.212027311e-001 5.509698987e-001 - 151 0.000000000e+000 1.250000000e-001 - 152 6.250000000e-002 0.000000000e+000 - 153 8.437500000e-001 1.000000000e+000 - 154 3.602632880e-001 4.202634692e-001 - 155 4.815923572e-001 4.052891731e-001 - 156 3.000000000e+000 6.999999881e-001 - 157 2.882018328e+000 5.951625109e-001 - 158 3.000000000e+000 5.000000000e-001 - 159 2.787499905e+000 2.000000030e-001 - 160 2.916589737e+000 2.834101617e-001 - 161 2.718617439e+000 4.865275025e-001 - 162 2.474999905e+000 2.000000030e-001 - 163 2.510100365e+000 4.798606038e-001 - 164 2.586182117e+000 3.998776376e-001 - 165 2.146169424e+000 3.122082949e-001 - 166 1.593750000e+000 1.000000000e+000 - 167 1.279795408e+000 7.382457256e-001 - 168 1.887345314e+000 8.917065263e-001 - 169 2.015446424e+000 8.803096414e-001 - 170 1.781250000e+000 1.000000000e+000 - 171 1.218750000e+000 8.999152184e-001 - 172 1.406250000e+000 1.000000000e+000 - 173 3.000000000e+000 8.999999762e-001 - 174 2.756802320e+000 7.919946909e-001 - 175 1.565769196e+000 5.437021852e-001 - 176 1.477971673e+000 7.366347313e-001 - 177 1.378561735e+000 6.978584528e-001 - 178 2.454282522e+000 6.800053716e-001 - 179 2.646564960e+000 6.835188866e-001 - 180 3.125000000e-001 9.246734381e-001 - 181 6.562500000e-001 1.000000000e+000 - 182 1.250000000e-001 1.000000000e+000 - 183 0.000000000e+000 8.750000000e-001 - 184 3.421347141e-001 7.277836800e-001 - 185 5.635613799e-001 7.340942621e-001 - 186 6.603906155e-001 6.951012015e-001 - 187 5.596420765e-001 8.323715925e-001 - 188 4.834302962e-001 6.066641808e-001 - 189 5.409078598e-001 5.055928826e-001 - 190 3.779521883e-001 6.080632806e-001 - 191 6.383811831e-001 4.991738498e-001 - 192 4.687500000e-001 1.000000000e+000 - 193 7.460566163e-001 7.697301507e-001 - 194 8.424255848e-001 7.303969264e-001 - 195 1.098243952e+000 8.823637366e-001 - 196 1.031250000e+000 1.000000000e+000 - 197 9.750000238e-001 2.000000030e-001 - 198 1.424999952e+000 2.000000030e-001 - 199 8.647710830e-002 7.844159007e-001 - 200 2.145030200e-001 7.902216315e-001 - 201 1.899756640e-001 6.338694692e-001 - 202 9.358318150e-002 4.739502370e-001 - 203 0.000000000e+000 3.750000000e-001 - 204 1.943091154e-001 3.123985529e-001 - 205 9.254352748e-002 2.880409062e-001 - 206 2.600577772e-001 2.386128455e-001 - 207 3.553956747e-001 2.584328353e-001 - 208 5.596442223e-001 3.046807051e-001 - 209 2.624999881e-001 0.000000000e+000 - 210 2.264096588e-001 4.147188962e-001 - 211 1.400935411e+000 5.652177930e-001 - 212 8.069829941e-001 5.887256861e-001 - 213 1.194517314e-001 1.072324216e-001 - 214 2.240026444e-001 1.298288405e-001 - 215 8.956729174e-001 9.057406783e-001 - 216 2.899168968e+000 7.752843499e-001 - 217 2.913163185e+000 4.510138035e-001 - 218 2.780884743e+000 3.040802181e-001 - 219 2.527749777e+000 2.946887016e-001 - 220 1.667074084e+000 8.860220313e-001 - 221 1.968750000e+000 1.000000000e+000 - 222 1.284731507e+000 8.324694633e-001 - 223 1.493348002e+000 8.735535741e-001 - 224 2.875000000e+000 1.000000000e+000 - 225 7.351763844e-001 8.908092380e-001 - 226 1.399436235e+000 2.956334054e-001 - 227 1.578089237e+000 9.093508124e-001 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 126 127 125 - 2 3 3 225 181 108 - 3 3 3 122 123 51 - 4 3 3 188 14 185 - 5 3 3 153 225 215 - 6 3 3 157 25 156 - 7 3 3 201 22 131 - 8 3 3 4 208 141 - 9 3 3 142 154 111 - 10 3 3 40 73 75 - 11 3 3 206 12 204 - 12 3 3 135 206 204 - 13 3 3 105 180 13 - 14 3 3 3 202 132 - 15 3 3 71 176 177 - 16 3 3 65 64 63 - 17 3 3 180 113 13 - 18 3 3 69 39 67 - 19 3 3 28 163 164 - 20 3 3 97 60 77 - 21 3 3 96 88 85 - 22 3 3 100 102 47 - 23 3 3 188 189 14 - 24 3 3 167 17 177 - 25 3 3 113 184 110 - 26 3 3 180 109 200 - 27 3 3 96 27 89 - 28 3 3 81 32 80 - 29 3 3 31 83 85 - 30 3 3 24 80 99 - 31 3 3 49 163 91 - 32 3 3 34 216 156 - 33 3 3 168 221 30 - 34 3 3 217 157 36 - 35 3 3 95 29 93 - 36 3 3 216 62 174 - 37 3 3 157 94 36 - 38 3 3 170 168 30 - 39 3 3 31 81 83 - 40 3 3 32 81 82 - 41 3 3 66 67 39 - 42 3 3 80 165 48 - 43 3 3 35 216 174 - 44 3 3 95 89 90 - 45 3 3 173 224 62 - 46 3 3 179 91 94 - 47 3 3 160 44 218 - 48 3 3 45 218 44 - 49 3 3 43 38 44 - 50 3 3 41 75 72 - 51 3 3 157 158 25 - 52 3 3 66 64 65 - 53 3 3 70 41 72 - 54 3 3 72 39 69 - 55 3 3 145 50 146 - 56 3 3 36 45 44 - 57 3 3 10 43 160 - 58 3 3 36 161 45 - 59 3 3 160 43 44 - 60 3 3 37 98 46 - 61 3 3 37 218 98 - 62 3 3 162 46 219 - 63 3 3 100 163 49 - 64 3 3 100 49 103 - 65 3 3 32 79 80 - 66 3 3 165 101 48 - 67 3 3 90 91 29 - 68 3 3 84 27 85 - 69 3 3 124 51 123 - 70 3 3 50 226 76 - 71 3 3 128 4 118 - 72 3 3 183 199 109 - 73 3 3 212 114 150 - 74 3 3 120 52 197 - 75 3 3 119 120 127 - 76 3 3 48 99 80 - 77 3 3 66 39 64 - 78 3 3 2 223 227 - 79 3 3 68 19 69 - 80 3 3 168 170 60 - 81 3 3 166 227 220 - 82 3 3 175 41 70 - 83 3 3 171 61 16 - 84 3 3 223 172 58 - 85 3 3 207 154 12 - 86 3 3 124 125 51 - 87 3 3 220 60 56 - 88 3 3 57 74 77 - 89 3 3 172 61 58 - 90 3 3 225 115 215 - 91 3 3 62 33 93 - 92 3 3 63 64 6 - 93 3 3 165 65 23 - 94 3 3 78 39 72 - 95 3 3 23 65 63 - 96 3 3 65 54 66 - 97 3 3 54 79 66 - 98 3 3 66 79 67 - 99 3 3 68 67 32 - 100 3 3 67 68 69 - 101 3 3 82 68 32 - 102 3 3 55 168 97 - 103 3 3 70 69 19 - 104 3 3 69 70 72 - 105 3 3 74 19 77 - 106 3 3 146 211 145 - 107 3 3 19 74 70 - 108 3 3 71 74 176 - 109 3 3 75 41 76 - 110 3 3 64 78 6 - 111 3 3 176 74 57 - 112 3 3 73 78 75 - 113 3 3 175 74 71 - 114 3 3 146 76 41 - 115 3 3 78 73 6 - 116 3 3 129 226 130 - 117 3 3 40 75 76 - 118 3 3 19 68 97 - 119 3 3 77 60 220 - 120 3 3 39 78 64 - 121 3 3 75 78 72 - 122 3 3 80 79 54 - 123 3 3 67 79 32 - 124 3 3 80 54 165 - 125 3 3 80 24 81 - 126 3 3 83 81 24 - 127 3 3 82 55 68 - 128 3 3 81 31 82 - 129 3 3 169 82 31 - 130 3 3 84 83 24 - 131 3 3 83 84 85 - 132 3 3 103 84 24 - 133 3 3 49 91 178 - 134 3 3 89 26 86 - 135 3 3 168 169 221 - 136 3 3 85 88 31 - 137 3 3 96 18 88 - 138 3 3 18 87 88 - 139 3 3 169 88 87 - 140 3 3 93 33 92 - 141 3 3 96 89 86 - 142 3 3 178 27 84 - 143 3 3 89 27 90 - 144 3 3 91 90 178 - 145 3 3 94 91 28 - 146 3 3 93 92 95 - 147 3 3 26 95 92 - 148 3 3 93 29 174 - 149 3 3 94 28 161 - 150 3 3 94 35 174 - 151 3 3 89 95 26 - 152 3 3 95 90 29 - 153 3 3 18 96 86 - 154 3 3 27 96 85 - 155 3 3 19 97 77 - 156 3 3 68 55 97 - 157 3 3 164 45 28 - 158 3 3 162 219 102 - 159 3 3 100 99 48 - 160 3 3 103 24 99 - 161 3 3 100 48 102 - 162 3 3 100 47 163 - 163 3 3 102 101 20 - 164 3 3 101 102 48 - 165 3 3 20 162 102 - 166 3 3 100 103 99 - 167 3 3 84 103 49 - 168 3 3 182 183 109 - 169 3 3 143 132 201 - 170 3 3 200 109 199 - 171 3 3 107 187 181 - 172 3 3 194 193 114 - 173 3 3 113 106 184 - 174 3 3 185 186 108 - 175 3 3 109 105 182 - 176 3 3 200 199 131 - 177 3 3 188 190 111 - 178 3 3 110 188 185 - 179 3 3 22 201 142 - 180 3 3 206 207 12 - 181 3 3 118 119 128 - 182 3 3 149 150 191 - 183 3 3 110 185 187 - 184 3 3 113 107 192 - 185 3 3 150 149 53 - 186 3 3 194 21 117 - 187 3 3 117 195 196 - 188 3 3 193 225 108 - 189 3 3 194 117 115 - 190 3 3 147 117 21 - 191 3 3 117 147 195 - 192 3 3 119 52 120 - 193 3 3 52 119 118 - 194 3 3 128 149 112 - 195 3 3 121 15 122 - 196 3 3 125 127 51 - 197 3 3 197 121 120 - 198 3 3 130 50 123 - 199 3 3 120 122 51 - 200 3 3 50 145 123 - 201 3 3 123 145 124 - 202 3 3 148 17 167 - 203 3 3 125 147 21 - 204 3 3 147 148 59 - 205 3 3 126 125 21 - 206 3 3 126 21 194 - 207 3 3 126 53 127 - 208 3 3 119 127 53 - 209 3 3 51 127 120 - 210 3 3 149 119 53 - 211 3 3 128 112 208 - 212 3 3 130 122 15 - 213 3 3 122 130 123 - 214 3 3 129 130 15 - 215 3 3 143 131 104 - 216 3 3 22 184 200 - 217 3 3 204 210 134 - 218 3 3 142 111 190 - 219 3 3 202 3 203 - 220 3 3 154 210 12 - 221 3 3 204 205 135 - 222 3 3 138 213 152 - 223 3 3 135 133 213 - 224 3 3 139 141 144 - 225 3 3 139 140 141 - 226 3 3 208 137 141 - 227 3 3 155 111 154 - 228 3 3 140 4 141 - 229 3 3 136 1 144 - 230 3 3 139 9 140 - 231 3 3 207 141 137 - 232 3 3 144 1 139 - 233 3 3 132 202 210 - 234 3 3 142 210 154 - 235 3 3 141 136 144 - 236 3 3 3 132 143 - 237 3 3 136 206 214 - 238 3 3 76 146 50 - 239 3 3 124 145 17 - 240 3 3 175 146 41 - 241 3 3 211 146 71 - 242 3 3 148 125 124 - 243 3 3 147 59 195 - 244 3 3 125 148 147 - 245 3 3 17 148 124 - 246 3 3 119 149 128 - 247 3 3 212 53 126 - 248 3 3 186 150 114 - 249 3 3 14 189 191 - 250 3 3 133 151 213 - 251 3 3 116 215 117 - 252 3 3 151 5 152 - 253 3 3 11 225 153 - 254 3 3 155 112 189 - 255 3 3 154 137 155 - 256 3 3 208 155 137 - 257 3 3 157 156 35 - 258 3 3 94 157 35 - 259 3 3 44 217 36 - 260 3 3 217 38 158 - 261 3 3 218 37 159 - 262 3 3 160 218 42 - 263 3 3 10 160 42 - 264 3 3 94 161 36 - 265 3 3 28 45 161 - 266 3 3 219 46 98 - 267 3 3 47 219 164 - 268 3 3 91 163 28 - 269 3 3 47 164 163 - 270 3 3 45 164 98 - 271 3 3 65 165 54 - 272 3 3 101 165 23 - 273 3 3 58 176 223 - 274 3 3 222 167 58 - 275 3 3 148 167 59 - 276 3 3 97 168 60 - 277 3 3 168 55 169 - 278 3 3 82 169 55 - 279 3 3 88 169 31 - 280 3 3 195 171 16 - 281 3 3 56 60 170 - 282 3 3 59 167 222 - 283 3 3 61 171 222 - 284 3 3 216 173 62 - 285 3 3 93 174 62 - 286 3 3 174 29 179 - 287 3 3 74 175 70 - 288 3 3 146 175 71 - 289 3 3 223 176 57 - 290 3 3 58 167 177 - 291 3 3 177 17 211 - 292 3 3 58 177 176 - 293 3 3 27 178 90 - 294 3 3 49 178 84 - 295 3 3 174 179 94 - 296 3 3 29 91 179 - 297 3 3 109 180 105 - 298 3 3 113 180 106 - 299 3 3 107 113 187 - 300 3 3 183 182 8 - 301 3 3 184 106 200 - 302 3 3 104 199 183 - 303 3 3 190 184 22 - 304 3 3 186 185 14 - 305 3 3 187 185 108 - 306 3 3 150 186 14 - 307 3 3 186 114 193 - 308 3 3 187 108 181 - 309 3 3 110 187 113 - 310 3 3 110 184 190 - 311 3 3 189 188 111 - 312 3 3 155 189 111 - 313 3 3 189 112 191 - 314 3 3 110 190 188 - 315 3 3 142 190 22 - 316 3 3 149 191 112 - 317 3 3 14 191 150 - 318 3 3 225 193 115 - 319 3 3 192 13 113 - 320 3 3 186 193 108 - 321 3 3 193 194 115 - 322 3 3 194 114 212 - 323 3 3 171 195 59 - 324 3 3 196 116 117 - 325 3 3 195 16 196 - 326 3 3 120 121 122 - 327 3 3 226 129 198 - 328 3 3 40 76 226 - 329 3 3 104 131 199 - 330 3 3 200 131 22 - 331 3 3 180 200 106 - 332 3 3 143 201 131 - 333 3 3 142 201 132 - 334 3 3 202 203 134 - 335 3 3 202 134 210 - 336 3 3 210 204 12 - 337 3 3 205 203 133 - 338 3 3 205 204 134 - 339 3 3 203 205 134 - 340 3 3 133 135 205 - 341 3 3 214 135 213 - 342 3 3 207 206 136 - 343 3 3 141 207 136 - 344 3 3 154 207 137 - 345 3 3 128 208 4 - 346 3 3 155 208 112 - 347 3 3 206 135 214 - 348 3 3 209 1 136 - 349 3 3 210 142 132 - 350 3 3 177 211 71 - 351 3 3 145 211 17 - 352 3 3 53 212 150 - 353 3 3 194 212 126 - 354 3 3 152 213 151 - 355 3 3 138 209 214 - 356 3 3 138 214 213 - 357 3 3 209 136 214 - 358 3 3 153 215 116 - 359 3 3 115 117 215 - 360 3 3 156 216 35 - 361 3 3 173 216 34 - 362 3 3 38 217 44 - 363 3 3 157 217 158 - 364 3 3 218 45 98 - 365 3 3 218 159 42 - 366 3 3 164 219 98 - 367 3 3 219 47 102 - 368 3 3 166 220 56 - 369 3 3 77 220 57 - 370 3 3 169 87 221 - 371 3 3 61 222 58 - 372 3 3 59 222 171 - 373 3 3 57 220 227 - 374 3 3 172 223 2 - 375 3 3 224 173 7 - 376 3 3 224 33 62 - 377 3 3 181 225 11 - 378 3 3 226 50 130 - 379 3 3 40 226 198 - 380 3 3 2 227 166 - 381 3 3 57 227 223 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 381 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 55 0 0 - 10 3 1 - 13 3 3 - 33 3 2 - 38 3 3 - 60 3 3 - 62 3 1 - 71 3 2 - 74 3 2 - 83 3 2 - 89 3 1 - 92 3 3 - 95 3 3 - 115 3 2 - 134 3 2 - 138 3 1 - 140 3 2 - 147 3 3 - 153 3 3 - 163 3 2 - 165 3 1 - 171 3 3 - 175 3 2 - 184 3 2 - 193 3 3 - 195 3 1 - 197 3 1 - 214 3 3 - 222 3 3 - 228 3 1 - 230 3 1 - 230 3 2 - 232 3 2 - 252 3 2 - 253 3 3 - 261 3 2 - 263 3 3 - 272 3 3 - 281 3 3 - 300 3 2 - 319 3 1 - 324 3 1 - 325 3 2 - 327 3 2 - 348 3 1 - 355 3 1 - 358 3 3 - 365 3 2 - 368 3 3 - 370 3 2 - 374 3 3 - 375 3 3 - 376 3 1 - 377 3 3 - 379 3 3 - 380 3 3 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Inflow 1 8 0 0 - 215 3 3 - 219 3 2 - 236 3 3 - 250 3 1 - 252 3 1 - 300 3 3 - 302 3 3 - 337 3 2 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Outflow 1 8 0 0 - 6 3 2 - 32 3 3 - 49 3 1 - 51 3 2 - 57 3 1 - 260 3 2 - 361 3 3 - 375 3 2 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Euler2D/vortexA04.neu b/cpp/nudg++/trunk/Grid/Euler2D/vortexA04.neu deleted file mode 100644 index f4174cd..0000000 --- a/cpp/nudg++/trunk/Grid/Euler2D/vortexA04.neu +++ /dev/null @@ -1,479 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(C:\Documents and Settings\Tim\Desktop\vortexA04.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 145 256 1 1 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 0.000000000e+000 -5.000000000e+000 - 2 1.000000000e+001 -5.000000000e+000 - 3 1.000000000e+001 5.000000000e+000 - 4 0.000000000e+000 5.000000000e+000 - 5 5.000000000e+000 0.000000000e+000 - 6 0.000000000e+000 0.000000000e+000 - 7 5.000000000e+000 -5.000000000e+000 - 8 1.000000000e+001 0.000000000e+000 - 9 5.000000000e+000 5.000000000e+000 - 10 2.500000000e+000 -2.500000000e+000 - 11 2.500000000e+000 2.500000000e+000 - 12 7.500000000e+000 -2.500000000e+000 - 13 7.500000000e+000 2.500000000e+000 - 14 2.500000000e+000 0.000000000e+000 - 15 0.000000000e+000 -2.500000000e+000 - 16 2.500000000e+000 -5.000000000e+000 - 17 5.000000000e+000 -2.500000000e+000 - 18 0.000000000e+000 2.500000000e+000 - 19 5.000000000e+000 2.500000000e+000 - 20 2.500000000e+000 5.000000000e+000 - 21 7.500000000e+000 -5.000000000e+000 - 22 1.000000000e+001 -2.500000000e+000 - 23 7.500000000e+000 0.000000000e+000 - 24 1.000000000e+001 2.500000000e+000 - 25 7.500000000e+000 5.000000000e+000 - 26 1.250000000e+000 -1.250000000e+000 - 27 3.750000000e+000 -1.250000000e+000 - 28 3.750000000e+000 1.250000000e+000 - 29 1.250000000e+000 1.250000000e+000 - 30 1.250000000e+000 -3.750000000e+000 - 31 3.750000000e+000 -3.750000000e+000 - 32 6.250000000e+000 -3.750000000e+000 - 33 6.250000000e+000 -1.250000000e+000 - 34 1.250000000e+000 3.750000000e+000 - 35 3.750000000e+000 3.750000000e+000 - 36 6.250000000e+000 1.250000000e+000 - 37 6.250000000e+000 3.750000000e+000 - 38 8.750000000e+000 -3.750000000e+000 - 39 8.750000000e+000 -1.250000000e+000 - 40 8.750000000e+000 1.250000000e+000 - 41 8.750000000e+000 3.750000000e+000 - 42 2.500000000e+000 -1.250000000e+000 - 43 1.250000000e+000 0.000000000e+000 - 44 0.000000000e+000 -1.250000000e+000 - 45 1.250000000e+000 -2.500000000e+000 - 46 3.750000000e+000 0.000000000e+000 - 47 3.750000000e+000 -2.500000000e+000 - 48 5.000000000e+000 -1.250000000e+000 - 49 2.500000000e+000 1.250000000e+000 - 50 5.000000000e+000 1.250000000e+000 - 51 3.750000000e+000 2.500000000e+000 - 52 1.250000000e+000 2.500000000e+000 - 53 0.000000000e+000 1.250000000e+000 - 54 0.000000000e+000 -3.750000000e+000 - 55 1.250000000e+000 -5.000000000e+000 - 56 2.500000000e+000 -3.750000000e+000 - 57 3.750000000e+000 -5.000000000e+000 - 58 5.000000000e+000 -3.750000000e+000 - 59 6.250000000e+000 -2.500000000e+000 - 60 6.250000000e+000 -5.000000000e+000 - 61 7.500000000e+000 -3.750000000e+000 - 62 7.500000000e+000 -1.250000000e+000 - 63 6.250000000e+000 0.000000000e+000 - 64 0.000000000e+000 3.750000000e+000 - 65 2.500000000e+000 3.750000000e+000 - 66 1.250000000e+000 5.000000000e+000 - 67 5.000000000e+000 3.750000000e+000 - 68 3.750000000e+000 5.000000000e+000 - 69 6.250000000e+000 2.500000000e+000 - 70 7.500000000e+000 1.250000000e+000 - 71 7.500000000e+000 3.750000000e+000 - 72 6.250000000e+000 5.000000000e+000 - 73 8.750000000e+000 -5.000000000e+000 - 74 1.000000000e+001 -3.750000000e+000 - 75 8.750000000e+000 -2.500000000e+000 - 76 1.000000000e+001 -1.250000000e+000 - 77 8.750000000e+000 0.000000000e+000 - 78 1.000000000e+001 1.250000000e+000 - 79 8.750000000e+000 2.500000000e+000 - 80 1.000000000e+001 3.750000000e+000 - 81 8.750000000e+000 5.000000000e+000 - 82 1.875000000e+000 -6.250000000e-001 - 83 1.875000000e+000 -1.875000000e+000 - 84 3.125000000e+000 -1.875000000e+000 - 85 3.125000000e+000 -6.250000000e-001 - 86 6.250000000e-001 -6.250000000e-001 - 87 1.875000000e+000 6.250000000e-001 - 88 6.250000000e-001 6.250000000e-001 - 89 6.250000000e-001 -1.875000000e+000 - 90 6.250000000e-001 -3.125000000e+000 - 91 1.875000000e+000 -3.125000000e+000 - 92 4.375000000e+000 -6.250000000e-001 - 93 4.375000000e+000 6.250000000e-001 - 94 3.125000000e+000 6.250000000e-001 - 95 4.375000000e+000 -1.875000000e+000 - 96 3.125000000e+000 -3.125000000e+000 - 97 4.375000000e+000 -3.125000000e+000 - 98 5.625000000e+000 -1.875000000e+000 - 99 5.625000000e+000 -6.250000000e-001 - 100 3.125000000e+000 1.875000000e+000 - 101 1.875000000e+000 1.875000000e+000 - 102 4.375000000e+000 1.875000000e+000 - 103 5.625000000e+000 6.250000000e-001 - 104 5.625000000e+000 1.875000000e+000 - 105 4.375000000e+000 3.125000000e+000 - 106 3.125000000e+000 3.125000000e+000 - 107 6.250000000e-001 1.875000000e+000 - 108 1.875000000e+000 3.125000000e+000 - 109 6.250000000e-001 3.125000000e+000 - 110 6.250000000e-001 -4.375000000e+000 - 111 1.875000000e+000 -4.375000000e+000 - 112 3.125000000e+000 -4.375000000e+000 - 113 4.375000000e+000 -4.375000000e+000 - 114 5.625000000e+000 -4.375000000e+000 - 115 5.625000000e+000 -3.125000000e+000 - 116 6.875000000e+000 -3.125000000e+000 - 117 6.875000000e+000 -1.875000000e+000 - 118 6.875000000e+000 -4.375000000e+000 - 119 8.125000000e+000 -4.375000000e+000 - 120 8.125000000e+000 -3.125000000e+000 - 121 6.875000000e+000 -6.250000000e-001 - 122 8.125000000e+000 -1.875000000e+000 - 123 8.125000000e+000 -6.250000000e-001 - 124 6.875000000e+000 6.250000000e-001 - 125 6.250000000e-001 4.375000000e+000 - 126 1.875000000e+000 4.375000000e+000 - 127 3.125000000e+000 4.375000000e+000 - 128 4.375000000e+000 4.375000000e+000 - 129 5.625000000e+000 3.125000000e+000 - 130 5.625000000e+000 4.375000000e+000 - 131 6.875000000e+000 1.875000000e+000 - 132 6.875000000e+000 3.125000000e+000 - 133 8.125000000e+000 6.250000000e-001 - 134 8.125000000e+000 1.875000000e+000 - 135 6.875000000e+000 4.375000000e+000 - 136 8.125000000e+000 3.125000000e+000 - 137 8.125000000e+000 4.375000000e+000 - 138 9.375000000e+000 -4.375000000e+000 - 139 9.375000000e+000 -3.125000000e+000 - 140 9.375000000e+000 -1.875000000e+000 - 141 9.375000000e+000 -6.250000000e-001 - 142 9.375000000e+000 6.250000000e-001 - 143 9.375000000e+000 1.875000000e+000 - 144 9.375000000e+000 3.125000000e+000 - 145 9.375000000e+000 4.375000000e+000 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 70 13 131 - 2 3 3 26 42 82 - 3 3 3 125 66 4 - 4 3 3 88 53 6 - 5 3 3 5 92 48 - 6 3 3 48 99 5 - 7 3 3 5 99 63 - 8 3 3 67 130 9 - 9 3 3 56 31 96 - 10 3 3 45 91 10 - 11 3 3 51 106 11 - 12 3 3 6 43 88 - 13 3 3 75 39 122 - 14 3 3 61 120 12 - 15 3 3 72 9 130 - 16 3 3 79 41 136 - 17 3 3 94 49 14 - 18 3 3 85 46 14 - 19 3 3 10 83 45 - 20 3 3 10 91 56 - 21 3 3 115 59 17 - 22 3 3 47 97 17 - 23 3 3 109 64 18 - 24 3 3 104 69 19 - 25 3 3 11 100 51 - 26 3 3 65 127 20 - 27 3 3 12 116 61 - 28 3 3 12 120 75 - 29 3 3 134 13 70 - 30 3 3 62 123 23 - 31 3 3 13 134 79 - 32 3 3 71 137 25 - 33 3 3 44 89 26 - 34 3 3 43 86 26 - 35 3 3 47 95 27 - 36 3 3 14 42 85 - 37 3 3 50 102 28 - 38 3 3 14 46 94 - 39 3 3 52 107 29 - 40 3 3 87 49 29 - 41 3 3 55 111 30 - 42 3 3 54 110 30 - 43 3 3 58 17 97 - 44 3 3 57 113 31 - 45 3 3 60 118 32 - 46 3 3 17 58 115 - 47 3 3 62 121 33 - 48 3 3 98 59 33 - 49 3 3 65 126 34 - 50 3 3 18 52 109 - 51 3 3 68 20 127 - 52 3 3 67 128 35 - 53 3 3 103 63 36 - 54 3 3 19 50 104 - 55 3 3 71 135 37 - 56 3 3 129 69 37 - 57 3 3 74 139 38 - 58 3 3 73 138 38 - 59 3 3 77 23 123 - 60 3 3 76 141 39 - 61 3 3 78 143 40 - 62 3 3 133 77 40 - 63 3 3 81 25 137 - 64 3 3 80 145 41 - 65 3 3 84 27 42 - 66 3 3 83 10 42 - 67 3 3 87 29 43 - 68 3 3 26 82 43 - 69 3 3 26 86 44 - 70 3 3 90 30 45 - 71 3 3 26 89 45 - 72 3 3 93 28 46 - 73 3 3 92 5 46 - 74 3 3 96 31 47 - 75 3 3 27 84 47 - 76 3 3 98 33 48 - 77 3 3 27 95 48 - 78 3 3 101 29 49 - 79 3 3 100 11 49 - 80 3 3 103 36 50 - 81 3 3 28 93 50 - 82 3 3 105 35 51 - 83 3 3 28 102 51 - 84 3 3 108 34 52 - 85 3 3 29 101 52 - 86 3 3 29 107 53 - 87 3 3 30 90 54 - 88 3 3 30 110 55 - 89 3 3 112 31 56 - 90 3 3 30 111 56 - 91 3 3 31 112 57 - 92 3 3 114 32 58 - 93 3 3 31 113 58 - 94 3 3 117 33 59 - 95 3 3 116 12 59 - 96 3 3 32 114 60 - 97 3 3 119 38 61 - 98 3 3 32 118 61 - 99 3 3 122 39 62 - 100 3 3 33 117 62 - 101 3 3 124 36 63 - 102 3 3 33 121 63 - 103 3 3 125 4 64 - 104 3 3 11 106 65 - 105 3 3 34 108 65 - 106 3 3 34 126 66 - 107 3 3 129 37 67 - 108 3 3 35 105 67 - 109 3 3 35 128 68 - 110 3 3 132 37 69 - 111 3 3 131 13 69 - 112 3 3 133 40 70 - 113 3 3 36 124 70 - 114 3 3 136 41 71 - 115 3 3 37 132 71 - 116 3 3 37 135 72 - 117 3 3 38 119 73 - 118 3 3 38 138 74 - 119 3 3 140 39 75 - 120 3 3 38 139 75 - 121 3 3 39 140 76 - 122 3 3 142 40 77 - 123 3 3 39 141 77 - 124 3 3 40 142 78 - 125 3 3 144 41 79 - 126 3 3 40 143 79 - 127 3 3 41 144 80 - 128 3 3 41 145 81 - 129 3 3 14 43 82 - 130 3 3 42 14 82 - 131 3 3 26 45 83 - 132 3 3 42 26 83 - 133 3 3 10 47 84 - 134 3 3 42 10 84 - 135 3 3 27 46 85 - 136 3 3 42 27 85 - 137 3 3 6 44 86 - 138 3 3 43 6 86 - 139 3 3 14 49 87 - 140 3 3 43 14 87 - 141 3 3 29 53 88 - 142 3 3 43 29 88 - 143 3 3 15 45 89 - 144 3 3 44 15 89 - 145 3 3 15 54 90 - 146 3 3 45 15 90 - 147 3 3 30 56 91 - 148 3 3 45 30 91 - 149 3 3 27 48 92 - 150 3 3 46 27 92 - 151 3 3 5 50 93 - 152 3 3 46 5 93 - 153 3 3 28 49 94 - 154 3 3 46 28 94 - 155 3 3 17 48 95 - 156 3 3 47 17 95 - 157 3 3 10 56 96 - 158 3 3 47 10 96 - 159 3 3 31 58 97 - 160 3 3 47 31 97 - 161 3 3 17 59 98 - 162 3 3 48 17 98 - 163 3 3 33 63 99 - 164 3 3 48 33 99 - 165 3 3 28 51 100 - 166 3 3 49 28 100 - 167 3 3 11 52 101 - 168 3 3 49 11 101 - 169 3 3 19 51 102 - 170 3 3 50 19 102 - 171 3 3 5 63 103 - 172 3 3 50 5 103 - 173 3 3 36 69 104 - 174 3 3 50 36 104 - 175 3 3 19 67 105 - 176 3 3 51 19 105 - 177 3 3 35 65 106 - 178 3 3 51 35 106 - 179 3 3 18 53 107 - 180 3 3 52 18 107 - 181 3 3 11 65 108 - 182 3 3 52 11 108 - 183 3 3 34 64 109 - 184 3 3 52 34 109 - 185 3 3 1 55 110 - 186 3 3 54 1 110 - 187 3 3 16 56 111 - 188 3 3 55 16 111 - 189 3 3 16 57 112 - 190 3 3 56 16 112 - 191 3 3 7 58 113 - 192 3 3 57 7 113 - 193 3 3 7 60 114 - 194 3 3 58 7 114 - 195 3 3 32 59 115 - 196 3 3 58 32 115 - 197 3 3 32 61 116 - 198 3 3 59 32 116 - 199 3 3 12 62 117 - 200 3 3 59 12 117 - 201 3 3 21 61 118 - 202 3 3 60 21 118 - 203 3 3 21 73 119 - 204 3 3 61 21 119 - 205 3 3 38 75 120 - 206 3 3 61 38 120 - 207 3 3 23 63 121 - 208 3 3 62 23 121 - 209 3 3 12 75 122 - 210 3 3 62 12 122 - 211 3 3 39 77 123 - 212 3 3 62 39 123 - 213 3 3 23 70 124 - 214 3 3 63 23 124 - 215 3 3 34 66 125 - 216 3 3 64 34 125 - 217 3 3 20 66 126 - 218 3 3 65 20 126 - 219 3 3 35 68 127 - 220 3 3 65 35 127 - 221 3 3 9 68 128 - 222 3 3 67 9 128 - 223 3 3 19 69 129 - 224 3 3 67 19 129 - 225 3 3 37 72 130 - 226 3 3 67 37 130 - 227 3 3 36 70 131 - 228 3 3 69 36 131 - 229 3 3 13 71 132 - 230 3 3 69 13 132 - 231 3 3 23 77 133 - 232 3 3 70 23 133 - 233 3 3 40 79 134 - 234 3 3 70 40 134 - 235 3 3 25 72 135 - 236 3 3 71 25 135 - 237 3 3 13 79 136 - 238 3 3 71 13 136 - 239 3 3 41 81 137 - 240 3 3 71 41 137 - 241 3 3 2 74 138 - 242 3 3 73 2 138 - 243 3 3 22 75 139 - 244 3 3 74 22 139 - 245 3 3 22 76 140 - 246 3 3 75 22 140 - 247 3 3 8 77 141 - 248 3 3 76 8 141 - 249 3 3 8 78 142 - 250 3 3 77 8 142 - 251 3 3 24 79 143 - 252 3 3 78 24 143 - 253 3 3 24 80 144 - 254 3 3 79 24 144 - 255 3 3 3 81 145 - 256 3 3 80 3 145 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 256 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Wall 1 32 0 0 - 3 3 2 - 4 3 2 - 15 3 1 - 23 3 2 - 51 3 1 - 63 3 1 - 103 3 2 - 137 3 1 - 144 3 1 - 145 3 1 - 179 3 1 - 185 3 1 - 186 3 1 - 188 3 1 - 189 3 1 - 192 3 1 - 193 3 1 - 202 3 1 - 203 3 1 - 217 3 1 - 221 3 1 - 235 3 1 - 241 3 1 - 242 3 1 - 244 3 1 - 245 3 1 - 248 3 1 - 249 3 1 - 252 3 1 - 253 3 1 - 255 3 1 - 256 3 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell00625.neu b/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell00625.neu deleted file mode 100644 index 74e27d0..0000000 --- a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell00625.neu +++ /dev/null @@ -1,3778 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:48:10 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 1220 2310 1 0 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 -1.00000000000e+00 -1.00000000000e+00 - 2 1.00000000000e+00 -1.00000000000e+00 - 3 -9.37500000000e-01 -1.00000000000e+00 - 4 -8.75000000000e-01 -1.00000000000e+00 - 5 -8.12500000000e-01 -1.00000000000e+00 - 6 -7.50000000000e-01 -1.00000000000e+00 - 7 -6.87500000000e-01 -1.00000000000e+00 - 8 -6.25000000000e-01 -1.00000000000e+00 - 9 -5.62500000000e-01 -1.00000000000e+00 - 10 -5.00000000000e-01 -1.00000000000e+00 - 11 -4.37500000000e-01 -1.00000000000e+00 - 12 -3.75000000000e-01 -1.00000000000e+00 - 13 -3.12500000000e-01 -1.00000000000e+00 - 14 -2.50000000000e-01 -1.00000000000e+00 - 15 -1.87500000000e-01 -1.00000000000e+00 - 16 -1.25000000000e-01 -1.00000000000e+00 - 17 -6.25000000000e-02 -1.00000000000e+00 - 18 0.00000000000e+00 -1.00000000000e+00 - 19 6.25000000000e-02 -1.00000000000e+00 - 20 1.25000000000e-01 -1.00000000000e+00 - 21 1.87500000000e-01 -1.00000000000e+00 - 22 2.50000000000e-01 -1.00000000000e+00 - 23 3.12500000000e-01 -1.00000000000e+00 - 24 3.75000000000e-01 -1.00000000000e+00 - 25 4.37500000000e-01 -1.00000000000e+00 - 26 5.00000000000e-01 -1.00000000000e+00 - 27 5.62500000000e-01 -1.00000000000e+00 - 28 6.25000000000e-01 -1.00000000000e+00 - 29 6.87500000000e-01 -1.00000000000e+00 - 30 7.50000000000e-01 -1.00000000000e+00 - 31 8.12500000000e-01 -1.00000000000e+00 - 32 8.75000000000e-01 -1.00000000000e+00 - 33 9.37500000000e-01 -1.00000000000e+00 - 34 1.00000000000e+00 1.00000000000e+00 - 35 1.00000000000e+00 -9.37500000000e-01 - 36 1.00000000000e+00 -8.75000000000e-01 - 37 1.00000000000e+00 -8.12500000000e-01 - 38 1.00000000000e+00 -7.50000000000e-01 - 39 1.00000000000e+00 -6.87500000000e-01 - 40 1.00000000000e+00 -6.25000000000e-01 - 41 1.00000000000e+00 -5.62500000000e-01 - 42 1.00000000000e+00 -5.00000000000e-01 - 43 1.00000000000e+00 -4.37500000000e-01 - 44 1.00000000000e+00 -3.75000000000e-01 - 45 1.00000000000e+00 -3.12500000000e-01 - 46 1.00000000000e+00 -2.50000000000e-01 - 47 1.00000000000e+00 -1.87500000000e-01 - 48 1.00000000000e+00 -1.25000000000e-01 - 49 1.00000000000e+00 -6.25000000000e-02 - 50 1.00000000000e+00 0.00000000000e+00 - 51 1.00000000000e+00 6.25000000000e-02 - 52 1.00000000000e+00 1.25000000000e-01 - 53 1.00000000000e+00 1.87500000000e-01 - 54 1.00000000000e+00 2.50000000000e-01 - 55 1.00000000000e+00 3.12500000000e-01 - 56 1.00000000000e+00 3.75000000000e-01 - 57 1.00000000000e+00 4.37500000000e-01 - 58 1.00000000000e+00 5.00000000000e-01 - 59 1.00000000000e+00 5.62500000000e-01 - 60 1.00000000000e+00 6.25000000000e-01 - 61 1.00000000000e+00 6.87500000000e-01 - 62 1.00000000000e+00 7.50000000000e-01 - 63 1.00000000000e+00 8.12500000000e-01 - 64 1.00000000000e+00 8.75000000000e-01 - 65 1.00000000000e+00 9.37500000000e-01 - 66 -1.00000000000e+00 1.00000000000e+00 - 67 9.37500000000e-01 1.00000000000e+00 - 68 8.75000000000e-01 1.00000000000e+00 - 69 8.12500000000e-01 1.00000000000e+00 - 70 7.50000000000e-01 1.00000000000e+00 - 71 6.87500000000e-01 1.00000000000e+00 - 72 6.25000000000e-01 1.00000000000e+00 - 73 5.62500000000e-01 1.00000000000e+00 - 74 5.00000000000e-01 1.00000000000e+00 - 75 4.37500000000e-01 1.00000000000e+00 - 76 3.75000000000e-01 1.00000000000e+00 - 77 3.12500000000e-01 1.00000000000e+00 - 78 2.50000000000e-01 1.00000000000e+00 - 79 1.87500000000e-01 1.00000000000e+00 - 80 1.25000000000e-01 1.00000000000e+00 - 81 6.25000000000e-02 1.00000000000e+00 - 82 0.00000000000e+00 1.00000000000e+00 - 83 -6.25000000000e-02 1.00000000000e+00 - 84 -1.25000000000e-01 1.00000000000e+00 - 85 -1.87500000000e-01 1.00000000000e+00 - 86 -2.50000000000e-01 1.00000000000e+00 - 87 -3.12500000000e-01 1.00000000000e+00 - 88 -3.75000000000e-01 1.00000000000e+00 - 89 -4.37500000000e-01 1.00000000000e+00 - 90 -5.00000000000e-01 1.00000000000e+00 - 91 -5.62500000000e-01 1.00000000000e+00 - 92 -6.25000000000e-01 1.00000000000e+00 - 93 -6.87500000000e-01 1.00000000000e+00 - 94 -7.50000000000e-01 1.00000000000e+00 - 95 -8.12500000000e-01 1.00000000000e+00 - 96 -8.75000000000e-01 1.00000000000e+00 - 97 -9.37500000000e-01 1.00000000000e+00 - 98 -1.00000000000e+00 9.37500000000e-01 - 99 -1.00000000000e+00 8.75000000000e-01 - 100 -1.00000000000e+00 8.12500000000e-01 - 101 -1.00000000000e+00 7.50000000000e-01 - 102 -1.00000000000e+00 6.87500000000e-01 - 103 -1.00000000000e+00 6.25000000000e-01 - 104 -1.00000000000e+00 5.62500000000e-01 - 105 -1.00000000000e+00 5.00000000000e-01 - 106 -1.00000000000e+00 4.37500000000e-01 - 107 -1.00000000000e+00 3.75000000000e-01 - 108 -1.00000000000e+00 3.12500000000e-01 - 109 -1.00000000000e+00 2.50000000000e-01 - 110 -1.00000000000e+00 1.87500000000e-01 - 111 -1.00000000000e+00 1.25000000000e-01 - 112 -1.00000000000e+00 6.25000000000e-02 - 113 -1.00000000000e+00 0.00000000000e+00 - 114 -1.00000000000e+00 -6.25000000000e-02 - 115 -1.00000000000e+00 -1.25000000000e-01 - 116 -1.00000000000e+00 -1.87500000000e-01 - 117 -1.00000000000e+00 -2.50000000000e-01 - 118 -1.00000000000e+00 -3.12500000000e-01 - 119 -1.00000000000e+00 -3.75000000000e-01 - 120 -1.00000000000e+00 -4.37500000000e-01 - 121 -1.00000000000e+00 -5.00000000000e-01 - 122 -1.00000000000e+00 -5.62500000000e-01 - 123 -1.00000000000e+00 -6.25000000000e-01 - 124 -1.00000000000e+00 -6.87500000000e-01 - 125 -1.00000000000e+00 -7.50000000000e-01 - 126 -1.00000000000e+00 -8.12500000000e-01 - 127 -1.00000000000e+00 -8.75000000000e-01 - 128 -1.00000000000e+00 -9.37500000000e-01 - 129 -9.55918225900e-01 -9.56571630654e-01 - 130 -3.13361984654e-02 9.49225439729e-01 - 131 -3.61507686880e-02 6.89577214725e-01 - 132 9.55918193131e-01 -9.56572979145e-01 - 133 9.55918225900e-01 9.56571630654e-01 - 134 -9.55918193131e-01 9.56572979145e-01 - 135 -9.38966342139e-01 -8.99695757673e-01 - 136 9.01790702625e-01 -9.48615422289e-01 - 137 9.38972985822e-01 -8.99700489887e-01 - 138 9.38966342139e-01 8.99695757673e-01 - 139 9.01797037119e-01 9.48625507146e-01 - 140 -9.01797037119e-01 -9.48625507146e-01 - 141 -9.01790702625e-01 9.48615422289e-01 - 142 -9.38972985822e-01 8.99700489887e-01 - 143 -9.46289656063e-01 -8.35996060582e-01 - 144 9.46292890088e-01 -8.35996557384e-01 - 145 8.39681688372e-01 9.45797867409e-01 - 146 -8.39681688372e-01 -9.45797867409e-01 - 147 -8.39681862356e-01 9.45794999942e-01 - 148 8.39681862356e-01 -9.45794999942e-01 - 149 -9.46292890088e-01 8.35996557384e-01 - 150 9.46289656063e-01 8.35996060582e-01 - 151 -9.45836205372e-01 -7.74736579933e-01 - 152 7.76876476990e-01 9.44196735112e-01 - 153 9.45838516230e-01 -7.74735866153e-01 - 154 -7.76876476990e-01 -9.44196735112e-01 - 155 -7.76878104392e-01 9.44195153846e-01 - 156 7.76878104392e-01 -9.44195153846e-01 - 157 -9.45838516230e-01 7.74735866153e-01 - 158 9.45836205372e-01 7.74736579933e-01 - 159 -9.45225568720e-01 -7.12834841509e-01 - 160 7.13886508532e-01 9.43852810978e-01 - 161 9.45226997261e-01 -7.12833360526e-01 - 162 -7.13888512186e-01 9.43851550208e-01 - 163 -9.45226997261e-01 7.12833360526e-01 - 164 -7.13886508532e-01 -9.43852810978e-01 - 165 7.13888512186e-01 -9.43851550208e-01 - 166 9.45225568720e-01 7.12834841509e-01 - 167 -9.44551291566e-01 -6.50618487898e-01 - 168 6.51029045151e-01 9.43891734429e-01 - 169 9.44548629494e-01 -6.50613339718e-01 - 170 -6.51049910163e-01 9.43903266795e-01 - 171 -9.44548629494e-01 6.50613339718e-01 - 172 -6.51048258401e-01 -9.43904329958e-01 - 173 6.51031171545e-01 -9.43890829053e-01 - 174 9.44551291566e-01 6.50618487898e-01 - 175 5.88272641929e-01 9.44016198880e-01 - 176 -9.44041668666e-01 5.88226413552e-01 - 177 -5.88282527207e-01 -9.44027727834e-01 - 178 9.44041668666e-01 -5.88226413552e-01 - 179 -9.44052206124e-01 -5.88241009933e-01 - 180 5.88267876278e-01 -9.44012887408e-01 - 181 -5.88280128205e-01 9.44030528326e-01 - 182 9.44052206124e-01 5.88241009933e-01 - 183 5.25643856110e-01 9.44030405188e-01 - 184 -9.43749470493e-01 5.25727750597e-01 - 185 -5.25621195011e-01 -9.44036437819e-01 - 186 9.43749470493e-01 -5.25727750597e-01 - 187 -9.43771717946e-01 -5.25764294931e-01 - 188 5.25680168432e-01 -9.44045691900e-01 - 189 -5.25656569664e-01 9.44085766037e-01 - 190 9.43780238505e-01 5.25771792809e-01 - 191 -4.63056983136e-01 -9.43975471885e-01 - 192 -9.43670712126e-01 -4.63206799732e-01 - 193 4.63234464310e-01 -9.44021605019e-01 - 194 -4.63111737350e-01 9.44082560183e-01 - 195 9.43639662110e-01 -4.63128790476e-01 - 196 4.63113127040e-01 9.43969926801e-01 - 197 -9.43647815913e-01 4.63135966132e-01 - 198 9.43710316778e-01 4.63240253794e-01 - 199 4.00959543304e-01 -9.44038590800e-01 - 200 -4.00660014526e-01 9.44130404712e-01 - 201 -4.00541932652e-01 -9.43897807966e-01 - 202 9.43657741567e-01 -4.00411577171e-01 - 203 -9.43698725942e-01 4.00445973097e-01 - 204 -9.43708948374e-01 -4.00586422529e-01 - 205 4.00615199787e-01 9.43877351926e-01 - 206 9.43796075489e-01 4.00655661702e-01 - 207 -3.38060322582e-01 -9.43890227528e-01 - 208 -9.43855646880e-01 -3.37897585514e-01 - 209 3.38847510492e-01 -9.44144756363e-01 - 210 -3.38315817410e-01 9.44308771421e-01 - 211 9.43790521143e-01 -3.37547054059e-01 - 212 9.43982295347e-01 3.37990671226e-01 - 213 -9.43891474413e-01 3.37626056362e-01 - 214 3.38164907761e-01 9.43831012167e-01 - 215 -9.44100820901e-01 -2.75100682373e-01 - 216 -9.44248137511e-01 2.74590386935e-01 - 217 -2.76138880441e-01 9.44705437663e-01 - 218 9.44082931283e-01 -2.74472821382e-01 - 219 2.76941789053e-01 -9.44402387192e-01 - 220 9.44245066426e-01 2.75204786221e-01 - 221 -2.75561879441e-01 -9.44012592583e-01 - 222 2.75789244388e-01 9.43898853544e-01 - 223 -9.44461634468e-01 -2.12090585846e-01 - 224 -2.14224669202e-01 9.45445291703e-01 - 225 9.44647357791e-01 -2.11071263840e-01 - 226 2.13540907094e-01 9.44175879553e-01 - 227 9.44598254180e-01 2.12211755812e-01 - 228 2.15249604507e-01 -9.44852763595e-01 - 229 -9.44851043388e-01 2.11204789601e-01 - 230 -2.12969172532e-01 -9.44362665911e-01 - 231 9.45798972901e-01 -1.47293356554e-01 - 232 1.51554610792e-01 9.44827692629e-01 - 233 -9.45999100081e-01 1.47428942120e-01 - 234 -1.50272011641e-01 -9.45228328674e-01 - 235 1.53541924434e-01 -9.45343019620e-01 - 236 -9.45040508762e-01 -1.48727571451e-01 - 237 -1.52747469230e-01 9.46655720942e-01 - 238 9.45137868721e-01 1.48869550153e-01 - 239 9.00544436868e-02 9.46094999751e-01 - 240 -8.82019946682e-02 -9.47525766568e-01 - 241 9.48636346117e-01 -8.41538719960e-02 - 242 9.46174454506e-01 8.51143867910e-02 - 243 9.06533683192e-02 -9.44781101712e-01 - 244 -9.48792340622e-01 8.42957320588e-02 - 245 -9.19397897663e-02 9.48382605290e-01 - 246 -9.46151039539e-01 -8.49679300842e-02 - 247 2.92379037135e-02 9.48051216245e-01 - 248 -9.48866368318e-01 -2.18284158890e-02 - 249 9.48807305684e-01 2.19698713951e-02 - 250 2.22704582137e-02 -9.39228212671e-01 - 251 9.58581829947e-01 -3.11149714555e-02 - 252 -9.58679606099e-01 3.12347444473e-02 - 253 8.69441044754e-01 -8.94394723138e-01 - 254 -3.34497786884e-02 -9.55773418921e-01 - 255 -2.23253548419e-03 -1.78784918388e-01 - 256 8.96340330169e-01 -8.52693313596e-01 - 257 8.92014079831e-01 -7.99393591131e-01 - 258 8.91243620770e-01 -7.38469763970e-01 - 259 8.89702244833e-01 -6.76601991420e-01 - 260 8.88429064702e-01 -6.14306628720e-01 - 261 8.87632680339e-01 -5.51754881704e-01 - 262 8.87270340468e-01 -4.89025781357e-01 - 263 8.87228584908e-01 -4.26145059194e-01 - 264 8.87447123700e-01 -3.63082954745e-01 - 265 8.87939053453e-01 -2.99746853282e-01 - 266 8.88800134903e-01 -2.35911936006e-01 - 267 8.90328906379e-01 -1.71088216585e-01 - 268 8.93469732226e-01 -1.04050146179e-01 - 269 9.01854082477e-01 -3.08275783282e-02 - 270 8.05327010670e-01 -8.88923885659e-01 - 271 7.40964726359e-01 -8.87992917155e-01 - 272 6.77583056773e-01 -8.87849904136e-01 - 273 6.14431082581e-01 -8.88290267152e-01 - 274 5.51669814655e-01 -8.88389164960e-01 - 275 4.89195014274e-01 -8.88308411818e-01 - 276 4.26964361322e-01 -8.88215980718e-01 - 277 3.64978643032e-01 -8.88237067719e-01 - 278 3.03292578733e-01 -8.88476402863e-01 - 279 2.42039916467e-01 -8.89077561257e-01 - 280 1.81469042428e-01 -8.90165599273e-01 - 281 1.21840473601e-01 -8.91422537725e-01 - 282 6.32897049202e-02 -8.90227307766e-01 - 283 -8.69441044754e-01 8.94394723138e-01 - 284 -8.96340330169e-01 8.52693313596e-01 - 285 -8.92014079831e-01 7.99393591131e-01 - 286 -8.91243620770e-01 7.38469763970e-01 - 287 -8.89701965367e-01 6.76601814677e-01 - 288 -8.88426967777e-01 6.14305388344e-01 - 289 -8.87624839437e-01 5.51750561015e-01 - 290 -8.87268242329e-01 4.89031622199e-01 - 291 -8.87274143543e-01 4.26198039441e-01 - 292 -8.87590361568e-01 3.63214784789e-01 - 293 -8.88202305741e-01 2.99956080283e-01 - 294 -8.89163573151e-01 2.36177936980e-01 - 295 -8.90737455463e-01 1.71399063022e-01 - 296 -8.93834837099e-01 1.04387511949e-01 - 297 -9.02084663241e-01 3.11449588476e-02 - 298 -8.05327010670e-01 8.88923885659e-01 - 299 -7.40964726359e-01 8.87992917155e-01 - 300 -6.77600046648e-01 8.87860944525e-01 - 301 -6.14441528329e-01 8.88317153724e-01 - 302 -5.51618231658e-01 8.88446990881e-01 - 303 -4.88982108664e-01 8.88401960714e-01 - 304 -4.26469624663e-01 8.88363496728e-01 - 305 -3.64084016754e-01 8.88484547630e-01 - 306 -3.01876473299e-01 8.88931744766e-01 - 307 -2.39934663414e-01 8.89911436624e-01 - 308 -1.78502470330e-01 8.91666350783e-01 - 309 -1.18152481249e-01 8.94473965323e-01 - 310 -6.02727318018e-02 8.98733537928e-01 - 311 -8.69438361336e-01 -8.94397766555e-01 - 312 -8.96335914712e-01 -8.52693455201e-01 - 313 -8.92009885715e-01 -7.99394970654e-01 - 314 -8.91243630087e-01 -7.38474228040e-01 - 315 -8.89721247523e-01 -6.76620314280e-01 - 316 -8.88488258657e-01 -6.14355293280e-01 - 317 -8.87742950039e-01 -5.51850825152e-01 - 318 -8.87427646923e-01 -4.89196260304e-01 - 319 -8.87434117111e-01 -4.26465568277e-01 - 320 -8.87677124155e-01 -3.63669160481e-01 - 321 -8.88103510757e-01 -3.00749083119e-01 - 322 -8.88728698680e-01 -2.37561744579e-01 - 323 -8.89660272405e-01 -1.73856862155e-01 - 324 -8.91165581599e-01 -1.09122676115e-01 - 325 -8.94131893928e-01 -4.21368477955e-02 - 326 -8.05323793415e-01 -8.88926652918e-01 - 327 -7.40961392333e-01 -8.87995647840e-01 - 328 -6.77597882479e-01 -8.87864830979e-01 - 329 -6.14448124126e-01 -8.88318118928e-01 - 330 -5.51611301526e-01 -8.88404981205e-01 - 331 -4.88967002687e-01 -8.88270120191e-01 - 332 -4.26445714969e-01 -8.88077490303e-01 - 333 -3.63979985231e-01 -8.87957222977e-01 - 334 -3.01496099844e-01 -8.88022108674e-01 - 335 -2.38853271376e-01 -8.88394730619e-01 - 336 -1.75802107936e-01 -8.89366631036e-01 - 337 -1.11515910263e-01 -8.91690808669e-01 - 338 -4.24641081502e-02 -8.98158753281e-01 - 339 8.69438361336e-01 8.94397766555e-01 - 340 8.96335914712e-01 8.52693455201e-01 - 341 8.92009885715e-01 7.99394970654e-01 - 342 8.91243630087e-01 7.38474228040e-01 - 343 8.89721252825e-01 6.76620317466e-01 - 344 8.88488289186e-01 6.14355309043e-01 - 345 8.87760051370e-01 5.51866556221e-01 - 346 8.87497110678e-01 4.89258066505e-01 - 347 8.87575511369e-01 4.26585304128e-01 - 348 8.87884812541e-01 3.63838650240e-01 - 349 8.88361270215e-01 3.00971509164e-01 - 350 8.89000734273e-01 2.37846378143e-01 - 351 8.89883006187e-01 1.74181588443e-01 - 352 8.91260643307e-01 1.09468231072e-01 - 353 8.94050057427e-01 4.24892005382e-02 - 354 8.05323793415e-01 8.88926652918e-01 - 355 7.40961392333e-01 8.87995647840e-01 - 356 6.77580523588e-01 8.87853782424e-01 - 357 6.14432568078e-01 8.88297926552e-01 - 358 5.51635644667e-01 8.88388640347e-01 - 359 4.89025241605e-01 8.88248350812e-01 - 360 4.26495954927e-01 8.88013836675e-01 - 361 3.64008620631e-01 8.87807856338e-01 - 362 3.01576833909e-01 8.87747697925e-01 - 363 2.39217312056e-01 8.87951386005e-01 - 364 1.77080183169e-01 8.88678600971e-01 - 365 1.15463608141e-01 8.90343793565e-01 - 366 5.50392465615e-02 8.93463768541e-01 - 367 1.17758001270e-02 -8.81649827057e-01 - 368 -2.84687749070e-03 8.98373249217e-01 - 369 -8.36834351985e-01 8.32042894999e-01 - 370 8.36834351985e-01 -8.32042894999e-01 - 371 8.36830115802e-01 8.32045322846e-01 - 372 -8.36830115802e-01 -8.32045322846e-01 - 373 -7.68178098554e-01 -8.32958333045e-01 - 374 -7.04556239151e-01 -8.31232320513e-01 - 375 -6.40792670969e-01 -8.32958919917e-01 - 376 -5.77909417834e-01 -8.33246878033e-01 - 377 -5.15290795612e-01 -8.33040851359e-01 - 378 -4.52813280890e-01 -8.32655570382e-01 - 379 -3.90401883911e-01 -8.32318837016e-01 - 380 -3.27973699247e-01 -8.32193561247e-01 - 381 -2.65427269139e-01 -8.32392481844e-01 - 382 -2.02667883332e-01 -8.33058626213e-01 - 383 -1.39639570308e-01 -8.34551861426e-01 - 384 -7.68176179330e-01 8.32946017816e-01 - 385 -7.04545133191e-01 8.31206090874e-01 - 386 -6.40761152336e-01 8.32921816946e-01 - 387 -5.77850143570e-01 8.33231165640e-01 - 388 -5.15191097679e-01 8.33117907507e-01 - 389 -4.52627524657e-01 8.32882772923e-01 - 390 -3.90126656760e-01 8.32768788706e-01 - 391 -3.27704812038e-01 8.33004068035e-01 - 392 -2.65426173094e-01 8.33859937107e-01 - 393 -2.03393991828e-01 8.35697878715e-01 - 394 -1.41752229915e-01 8.38851935965e-01 - 395 7.68176179330e-01 -8.32946017816e-01 - 396 7.04536004785e-01 -8.31199537616e-01 - 397 6.40762125911e-01 -8.32893682418e-01 - 398 5.77926627413e-01 -8.33168099274e-01 - 399 5.15455705570e-01 -8.33006899299e-01 - 400 4.53220086344e-01 -8.32710667650e-01 - 401 3.91182420444e-01 -8.32485129314e-01 - 402 3.29370283069e-01 -8.32480762856e-01 - 403 2.67927390875e-01 -8.32900519959e-01 - 404 2.07202134371e-01 -8.34005633842e-01 - 405 1.48024083398e-01 -8.36144292351e-01 - 406 9.21214432366e-02 -8.39495558331e-01 - 407 7.68178098554e-01 8.32958333045e-01 - 408 7.04547048502e-01 8.31225985713e-01 - 409 6.40781448904e-01 8.32937851083e-01 - 410 5.77928565378e-01 8.33223020431e-01 - 411 5.15327872583e-01 8.33004194910e-01 - 412 4.52803341983e-01 8.32557857149e-01 - 413 3.90299430550e-01 8.32100512803e-01 - 414 3.27757779970e-01 8.31759961927e-01 - 415 2.65165294439e-01 8.31688249442e-01 - 416 2.02534281800e-01 8.32119433939e-01 - 417 1.39992334968e-01 8.33495800392e-01 - 418 7.79905043212e-02 8.36670805717e-01 - 419 -7.65944640525e-02 -8.37236384571e-01 - 420 -8.15367193413e-02 8.43753647398e-01 - 421 -8.38844880034e-01 -7.65554408831e-01 - 422 -8.35822897404e-01 -7.03587788549e-01 - 423 -8.33463978065e-01 -6.41235069905e-01 - 424 -8.31959093594e-01 -5.78540414568e-01 - 425 -8.31274099078e-01 -5.15665289684e-01 - 426 -8.31170914344e-01 -4.52762610453e-01 - 427 -8.31457771855e-01 -3.89849760975e-01 - 428 -8.31999942955e-01 -3.26882634767e-01 - 429 -8.32802789161e-01 -2.63768459203e-01 - 430 -8.33937301515e-01 -2.00298526502e-01 - 431 -8.35526524712e-01 -1.36093215851e-01 - 432 -8.37821495034e-01 -7.05901048387e-02 - 433 -8.38837792266e-01 7.65542741117e-01 - 434 -8.35769950599e-01 7.03541029310e-01 - 435 -8.33313445538e-01 6.41116846583e-01 - 436 -8.31671154098e-01 5.78321589413e-01 - 437 -8.30856985057e-01 5.15332647724e-01 - 438 -8.30698646725e-01 4.52291942541e-01 - 439 -8.31067971969e-01 3.89179720113e-01 - 440 -8.31847971176e-01 3.25892631388e-01 - 441 -8.33014756914e-01 2.62250272705e-01 - 442 -8.34693812143e-01 1.97921793781e-01 - 443 -8.37186548234e-01 1.32325496088e-01 - 444 -8.40781876343e-01 6.48048450978e-02 - 445 8.38837792266e-01 -7.65542741117e-01 - 446 8.35771423354e-01 -7.03542050601e-01 - 447 8.33323795094e-01 -6.41123658066e-01 - 448 8.31706675655e-01 -5.78343596914e-01 - 449 8.30910302062e-01 -5.15352991954e-01 - 450 8.30715007368e-01 -4.52257809435e-01 - 451 8.30974120326e-01 -3.89046766973e-01 - 452 8.31591803899e-01 -3.25649646532e-01 - 453 8.32577659991e-01 -2.61890767872e-01 - 454 8.34106824217e-01 -1.97441997725e-01 - 455 8.36554988094e-01 -1.31770486200e-01 - 456 8.40251434080e-01 -6.42303593213e-02 - 457 8.38844880034e-01 7.65554408831e-01 - 458 8.35823043148e-01 7.03587865842e-01 - 459 8.33464719408e-01 6.41235379651e-01 - 460 8.31984487633e-01 5.78564751910e-01 - 461 8.31359372423e-01 5.15746807659e-01 - 462 8.31331090256e-01 4.52910391748e-01 - 463 8.31701165619e-01 3.90074812995e-01 - 464 8.32330206225e-01 3.27217274510e-01 - 465 8.33190716236e-01 2.64219897836e-01 - 466 8.34313177193e-01 2.00834221393e-01 - 467 8.35772383200e-01 1.36687944221e-01 - 468 8.37823983906e-01 7.11878170510e-02 - 469 7.91420914841e-01 -7.86982977606e-01 - 470 -7.91420914841e-01 7.86982977606e-01 - 471 7.91434178500e-01 7.87004592473e-01 - 472 -7.91434178500e-01 -7.87004592473e-01 - 473 3.80266796036e-02 -8.37503355582e-01 - 474 -1.75607581502e-02 -8.36203778407e-01 - 475 -7.31875101789e-01 -7.70329676939e-01 - 476 7.31874590525e-01 7.70327199216e-01 - 477 7.31810436617e-01 -7.70239621149e-01 - 478 -7.31809399343e-01 7.70239881550e-01 - 479 -6.66296956391e-01 -7.78308489824e-01 - 480 6.66295177883e-01 7.78291469851e-01 - 481 6.66206166897e-01 -7.78160173683e-01 - 482 -6.66189495188e-01 7.78180424595e-01 - 483 -6.04223026959e-01 -7.78665219303e-01 - 484 6.04241028096e-01 7.78641158626e-01 - 485 6.04138539280e-01 -7.78473266881e-01 - 486 -6.04041690047e-01 7.78527348864e-01 - 487 -5.41986821086e-01 -7.78429830319e-01 - 488 5.42006276097e-01 7.78390825923e-01 - 489 5.41986305570e-01 -7.78260269013e-01 - 490 -5.41702635506e-01 7.78367183134e-01 - 491 -4.79702634544e-01 -7.77782315425e-01 - 492 4.79656479161e-01 7.77683523348e-01 - 493 4.79841977211e-01 -7.77688761346e-01 - 494 -4.79237162858e-01 7.77863686094e-01 - 495 -4.17399965847e-01 -7.77111356633e-01 - 496 4.17213038574e-01 7.76856507809e-01 - 497 4.17721731474e-01 -7.77086457139e-01 - 498 -4.16680747248e-01 7.77402491870e-01 - 499 -3.55056339832e-01 -7.76668929586e-01 - 500 3.54635300369e-01 7.76106651505e-01 - 501 3.55649897521e-01 -7.76683296089e-01 - 502 -3.54058804792e-01 7.77259568139e-01 - 503 -2.92625315567e-01 -7.76582773672e-01 - 504 2.91888295008e-01 7.75629452670e-01 - 505 2.93706790227e-01 -7.76713096671e-01 - 506 -2.91400301179e-01 7.77709176087e-01 - 507 2.28858141883e-01 7.75595794372e-01 - 508 -2.30046823770e-01 -7.76878565528e-01 - 509 2.32007712859e-01 -7.77446357942e-01 - 510 -2.28712212288e-01 7.79157621158e-01 - 511 1.65440015751e-01 7.76310254785e-01 - 512 -1.67324249731e-01 -7.77595586241e-01 - 513 1.70941297047e-01 -7.79387292858e-01 - 514 -1.65915544844e-01 7.82284251851e-01 - 515 1.01564704753e-01 7.78540507222e-01 - 516 1.11959841364e-01 -7.83587453126e-01 - 517 -1.04869584808e-01 -7.79007867200e-01 - 518 -1.01983689734e-01 7.87611889482e-01 - 519 -8.41057555454e-01 -3.12501791530e-03 - 520 8.40766821076e-01 3.69668132146e-03 - 521 -7.83205396247e-01 7.31905363778e-01 - 522 7.83209574181e-01 -7.31907826353e-01 - 523 7.83294986309e-01 7.31993840365e-01 - 524 -7.83293602392e-01 -7.31993933085e-01 - 525 -3.18477608420e-02 8.54591179692e-01 - 526 1.77398889453e-02 8.42589065898e-01 - 527 -7.79293803802e-01 -6.69468921390e-01 - 528 -7.76478801646e-01 -6.06295719949e-01 - 529 -7.75242041435e-01 -5.42865986480e-01 - 530 -7.74892829113e-01 -4.79598736363e-01 - 531 -7.75177754273e-01 -4.16453781795e-01 - 532 -7.75805676210e-01 -3.53420931712e-01 - 533 -7.76709836304e-01 -2.90439736930e-01 - 534 -7.77922755250e-01 -2.27359104786e-01 - 535 -7.79534123425e-01 -1.63949811485e-01 - 536 -7.81549957189e-01 -9.99278626968e-02 - 537 -7.79050932174e-01 6.69258872640e-01 - 538 -7.75987887648e-01 6.05900942439e-01 - 539 -7.74478202736e-01 5.42263586163e-01 - 540 -7.73956283551e-01 4.78785619590e-01 - 541 -7.74274524432e-01 4.15415021490e-01 - 542 -7.75138940211e-01 3.52075491752e-01 - 543 -7.76433686766e-01 2.88652462900e-01 - 544 -7.78173689850e-01 2.24953278771e-01 - 545 -7.80417703573e-01 1.60694304733e-01 - 546 -7.82965788439e-01 9.56927177458e-02 - 547 7.79076932480e-01 -6.69276161384e-01 - 548 7.76070816032e-01 -6.05955506316e-01 - 549 7.74622059628e-01 -5.42340397105e-01 - 550 7.74104910322e-01 -4.78824409043e-01 - 551 7.74348530365e-01 -4.15369786200e-01 - 552 7.75049685392e-01 -3.51911410750e-01 - 553 7.76081523506e-01 -2.88310477655e-01 - 554 7.77513423839e-01 -2.24407693077e-01 - 555 7.79510466227e-01 -1.59989081834e-01 - 556 7.82015007521e-01 -9.48981335515e-02 - 557 7.79298885776e-01 6.69469552012e-01 - 558 7.76513996728e-01 6.06324952421e-01 - 559 7.75333796584e-01 5.42952178248e-01 - 560 7.75055433432e-01 4.79752504802e-01 - 561 7.75434442427e-01 4.16710548425e-01 - 562 7.76171390157e-01 3.53829025812e-01 - 563 7.77182200367e-01 2.91014988693e-01 - 564 7.78480832623e-01 2.28107216303e-01 - 565 7.80068895570e-01 1.64817399547e-01 - 566 7.81838723658e-01 1.00801303671e-01 - 567 6.41605909145e-02 -7.94253289586e-01 - 568 3.70569843150e-02 7.84428850326e-01 - 569 -3.23737767968e-02 7.96031596434e-01 - 570 -4.36409644093e-02 -7.80561661942e-01 - 571 -7.84429998945e-01 3.03032429190e-02 - 572 -7.83698190774e-01 -3.50976330716e-02 - 573 7.83741790686e-01 -2.94891205571e-02 - 574 7.83505431660e-01 3.59247242619e-02 - 575 7.26911782277e-01 -7.00110833085e-01 - 576 6.84112604125e-01 -7.27789062636e-01 - 577 6.30053524802e-01 -7.24141128228e-01 - 578 5.68807796818e-01 -7.24254055788e-01 - 579 5.06934799280e-01 -7.23313001080e-01 - 580 4.44794917471e-01 -7.22211954696e-01 - 581 3.82517462385e-01 -7.21284725840e-01 - 582 3.20120220077e-01 -7.20780270321e-01 - 583 2.57552422582e-01 -7.20957004899e-01 - 584 1.94662247264e-01 -7.22252711756e-01 - 585 1.30743700830e-01 -7.25730266294e-01 - 586 7.20671827928e-01 -6.35425561978e-01 - 587 7.18548746112e-01 -5.70223026559e-01 - 588 7.17318008965e-01 -5.05955305145e-01 - 589 7.17505727592e-01 -4.42002887436e-01 - 590 7.18303177254e-01 -3.78343501504e-01 - 591 7.19430540188e-01 -3.14785723175e-01 - 592 7.20773713902e-01 -2.51266586072e-01 - 593 7.22470134624e-01 -1.87669984400e-01 - 594 7.24587267068e-01 -1.23950176358e-01 - 595 7.27173069208e-01 7.00365797796e-01 - 596 6.84335935302e-01 7.28054093225e-01 - 597 6.30346732585e-01 7.24483798633e-01 - 598 5.69099121636e-01 7.24611320270e-01 - 599 5.07150859964e-01 7.23574257849e-01 - 600 4.44876206802e-01 7.22245138050e-01 - 601 3.82389277225e-01 7.20951817269e-01 - 602 3.19650892301e-01 7.19945450382e-01 - 603 2.56509874902e-01 7.19359133643e-01 - 604 1.92766484225e-01 7.19349706446e-01 - 605 1.28074368239e-01 7.20235673321e-01 - 606 7.21237328228e-01 6.35942301624e-01 - 607 7.19522594212e-01 5.71082780797e-01 - 608 7.18680479300e-01 5.07231855065e-01 - 609 7.19097140717e-01 4.43759849619e-01 - 610 7.19939295323e-01 3.80722500924e-01 - 611 7.21033754178e-01 3.17979436306e-01 - 612 7.22396880590e-01 2.55472900463e-01 - 613 7.24173859688e-01 1.92988367793e-01 - 614 7.26130366056e-01 1.30256886813e-01 - 615 -7.26869256692e-01 7.00088855315e-01 - 616 -6.84065519067e-01 7.27785167959e-01 - 617 -6.29928617607e-01 7.24158930375e-01 - 618 -5.68512659540e-01 7.24318620852e-01 - 619 -5.06368130626e-01 7.23469509045e-01 - 620 -4.43889133519e-01 7.22574343477e-01 - 621 -3.81195634302e-01 7.21959175840e-01 - 622 -3.18257978134e-01 7.21856310371e-01 - 623 -2.55038872239e-01 7.22557414945e-01 - 624 -1.91642939961e-01 7.24666205881e-01 - 625 -1.28593438402e-01 7.29683328900e-01 - 626 -7.20539805202e-01 6.35346742616e-01 - 627 -7.18304105353e-01 5.70086131125e-01 - 628 -7.16988915473e-01 5.05802583502e-01 - 629 -7.17144078102e-01 4.41861906129e-01 - 630 -7.18045602407e-01 3.78285070521e-01 - 631 -7.19485450771e-01 3.14919661940e-01 - 632 -7.21311656734e-01 2.51655327133e-01 - 633 -7.23556224957e-01 1.88349720370e-01 - 634 -7.26049296430e-01 1.24890346887e-01 - 635 -7.27164015155e-01 -7.00368813140e-01 - 636 -6.84328029951e-01 -7.28066370277e-01 - 637 -6.30324855520e-01 -7.24500832690e-01 - 638 -5.69078411450e-01 -7.24633109936e-01 - 639 -5.07183609594e-01 -7.23642931509e-01 - 640 -4.45049364461e-01 -7.22494274922e-01 - 641 -3.82820729516e-01 -7.21555717613e-01 - 642 -3.20523909933e-01 -7.21059668041e-01 - 643 -2.58097489023e-01 -7.21062771342e-01 - 644 -1.95411825245e-01 -7.21357955339e-01 - 645 -1.32453402726e-01 -7.21606621134e-01 - 646 -7.21196757473e-01 -6.35917146819e-01 - 647 -7.19425879849e-01 -5.71002823469e-01 - 648 -7.18499444991e-01 -5.07075784134e-01 - 649 -7.18800029656e-01 -4.43482769962e-01 - 650 -7.19515950838e-01 -3.80287784798e-01 - 651 -7.20461504260e-01 -3.17354349835e-01 - 652 -7.21632247545e-01 -2.54607894745e-01 - 653 -7.23244201039e-01 -1.91912549139e-01 - 654 -7.25315831836e-01 -1.29066384570e-01 - 655 -6.99307914739e-02 -7.23055819291e-01 - 656 1.55458787186e-02 -7.83578507947e-01 - 657 6.24268314419e-02 -7.35035766033e-01 - 658 -6.55420813700e-02 7.36999479545e-01 - 659 6.22184529748e-02 7.22975124244e-01 - 660 -1.65958527712e-03 7.32906406180e-01 - 661 -6.63265734662e-01 6.68130423835e-01 - 662 6.63441426686e-01 -6.68187733944e-01 - 663 6.64019159223e-01 6.68771756822e-01 - 664 -6.63980772560e-01 -6.68759811960e-01 - 665 7.27645851253e-01 6.70880924467e-02 - 666 -7.27435471481e-01 -6.59023405261e-02 - 667 -7.28063358450e-01 6.12752493429e-02 - 668 -7.28660118135e-01 -2.43633608160e-03 - 669 7.26696384201e-01 -6.01831538042e-02 - 670 7.27965796800e-01 3.57609597901e-03 - 671 -6.64662375245e-01 -5.99707241679e-01 - 672 -6.61605432182e-01 -5.35290210087e-01 - 673 -6.62260207509e-01 -4.70770022675e-01 - 674 -6.63072854348e-01 -4.07376168763e-01 - 675 -6.64217066855e-01 -3.44371850958e-01 - 676 -6.65243168294e-01 -2.81864599241e-01 - 677 -6.66718345836e-01 -2.19650410073e-01 - 678 -6.68868940656e-01 -1.57610734229e-01 - 679 6.64775225296e-01 5.99783430487e-01 - 680 6.61839718282e-01 5.35457766523e-01 - 681 6.62644304852e-01 4.71056775127e-01 - 682 6.63602564610e-01 4.07788511941e-01 - 683 6.64903939666e-01 3.44927373708e-01 - 684 6.66126540518e-01 2.82610325656e-01 - 685 6.67900581272e-01 2.20709846559e-01 - 686 6.70349522142e-01 1.59095797021e-01 - 687 -6.63279412956e-01 5.98576940852e-01 - 688 -6.59520806223e-01 5.33560988240e-01 - 689 -6.59655568972e-01 4.68410531805e-01 - 690 -6.60497765990e-01 4.04419686976e-01 - 691 -6.62265149316e-01 3.40837990159e-01 - 692 -6.64197746254e-01 2.77739460491e-01 - 693 -6.66499601744e-01 2.14985947135e-01 - 694 -6.69169275880e-01 1.52504217895e-01 - 695 6.63614840898e-01 -5.98734576649e-01 - 696 6.60040977424e-01 -5.33813611540e-01 - 697 6.60362910588e-01 -4.68776356951e-01 - 698 6.61231144950e-01 -4.04812075316e-01 - 699 6.62731412636e-01 -3.41122352418e-01 - 700 6.64063087717e-01 -2.77777790222e-01 - 701 6.65525743716e-01 -2.14622333612e-01 - 702 6.67372353752e-01 -1.51631827865e-01 - 703 -5.97285034201e-01 -6.72266858104e-01 - 704 -5.35487396453e-01 -6.70497284029e-01 - 705 -4.73492267473e-01 -6.68706045621e-01 - 706 -4.11344272991e-01 -6.66987313416e-01 - 707 -3.49131987506e-01 -6.65823968165e-01 - 708 -2.86859715286e-01 -6.65465937586e-01 - 709 -2.24431252190e-01 -6.65757529356e-01 - 710 -1.61490984601e-01 -6.65934248321e-01 - 711 5.97336411746e-01 6.72287000828e-01 - 712 5.35527503528e-01 6.70485171476e-01 - 713 4.73448619687e-01 6.68526276210e-01 - 714 4.11112825048e-01 6.66472595014e-01 - 715 3.48487179676e-01 6.64716864593e-01 - 716 2.85475045729e-01 6.63477554842e-01 - 717 2.21901863091e-01 6.62828544391e-01 - 718 1.57391137473e-01 6.62772751619e-01 - 719 5.96649625225e-01 -6.71594694284e-01 - 720 5.34745513224e-01 -6.69807166430e-01 - 721 4.72590291850e-01 -6.68072508148e-01 - 722 4.10170084671e-01 -6.66436445702e-01 - 723 3.47472247061e-01 -6.65241391498e-01 - 724 2.84443680538e-01 -6.64737345495e-01 - 725 2.20920541595e-01 -6.65160744973e-01 - 726 1.56674876689e-01 -6.66977997711e-01 - 727 -5.96317979809e-01 6.71572226383e-01 - 728 -5.34208409439e-01 6.69906760856e-01 - 729 -4.71856905238e-01 6.68469132691e-01 - 730 -4.09209131827e-01 6.67280035725e-01 - 731 -3.46194023070e-01 6.66604591907e-01 - 732 -2.82702125205e-01 6.66547810457e-01 - 733 -2.18544008377e-01 6.67292309304e-01 - 734 -1.53759921518e-01 6.69661519679e-01 - 735 6.17947440575e-01 -6.23428112782e-01 - 736 6.19082811138e-01 6.24499340476e-01 - 737 -6.17541703507e-01 6.23308652052e-01 - 738 -6.18969537431e-01 -6.24428024817e-01 - 739 -9.73852915693e-02 -6.64329608848e-01 - 740 -6.01849283084e-01 -5.65241999524e-01 - 741 6.00056501974e-01 -5.63584637147e-01 - 742 -5.99431025068e-01 5.63364422928e-01 - 743 6.02118000310e-01 5.65393046570e-01 - 744 6.06554440783e-01 4.97787015957e-01 - 745 -6.06061314078e-01 -4.97521978612e-01 - 746 -6.02496028961e-01 4.94529312302e-01 - 747 6.03432505721e-01 -4.94984005669e-01 - 748 -6.05952902846e-01 -4.34470626496e-01 - 749 -6.01924804464e-01 4.30432124263e-01 - 750 6.03114607848e-01 -4.31094571862e-01 - 751 6.06658961721e-01 4.34819619655e-01 - 752 -6.48437712360e-03 -7.26794141994e-01 - 753 -9.17016224807e-02 6.78451296995e-01 - 754 -6.08295938276e-01 -3.71256078821e-01 - 755 -6.04898968297e-01 3.66263159057e-01 - 756 6.06067180439e-01 -3.67032550027e-01 - 757 6.09181872196e-01 3.71660980244e-01 - 758 9.16725714789e-02 -6.70935348458e-01 - 759 5.63257675167e-01 -6.17193231338e-01 - 760 -5.62693391843e-01 6.17180213787e-01 - 761 -5.64578762442e-01 -6.18382040130e-01 - 762 5.64742677169e-01 6.18441737821e-01 - 763 6.10019481909e-01 3.09464122268e-01 - 764 -6.08985551096e-01 -3.09025106911e-01 - 765 -6.06944501424e-01 3.03168018549e-01 - 766 6.07561909304e-01 -3.03825327364e-01 - 767 6.11237072642e-01 2.47763292909e-01 - 768 -6.09998333672e-01 -2.47122380191e-01 - 769 6.08842807036e-01 -2.40903132643e-01 - 770 -6.09251185265e-01 2.40609620831e-01 - 771 6.13832375610e-01 1.86715254033e-01 - 772 -6.11997820144e-01 -1.85433743498e-01 - 773 -6.12028538767e-01 1.78552340553e-01 - 774 6.10365215864e-01 -1.78186875061e-01 - 775 9.09907984186e-02 6.63295375466e-01 - 776 -6.71456308618e-01 -9.57288296075e-02 - 777 6.72608218032e-01 9.74366660214e-02 - 778 6.69620721559e-01 -8.89255775501e-02 - 779 -6.71858368525e-01 9.03043987465e-02 - 780 6.71923430303e-01 -2.65977328140e-02 - 781 -6.73637137782e-01 2.82340302647e-02 - 782 -5.02917906309e-01 -6.16118471136e-01 - 783 -4.40783438433e-01 -6.13270429714e-01 - 784 -3.78528374907e-01 -6.11024964192e-01 - 785 -3.16236958616e-01 -6.09948550188e-01 - 786 -2.53988314568e-01 -6.10138819024e-01 - 787 -5.00669340231e-01 6.15295009261e-01 - 788 -4.38107253854e-01 6.13290598266e-01 - 789 -3.75197625363e-01 6.11990750396e-01 - 790 -3.11827786594e-01 6.11354145095e-01 - 791 -2.47689477965e-01 6.11160400755e-01 - 792 5.01299515039e-01 -6.14960361889e-01 - 793 4.38749337271e-01 -6.12319310077e-01 - 794 3.75835226449e-01 -6.10211964338e-01 - 795 3.12544525780e-01 -6.08926932014e-01 - 796 2.48735447309e-01 -6.08538774867e-01 - 797 1.84201473380e-01 -6.09096217091e-01 - 798 5.03086843533e-01 6.16064674038e-01 - 799 4.40895094438e-01 6.12941132250e-01 - 800 3.78403222704e-01 6.10091567149e-01 - 801 3.15583323101e-01 6.07991987878e-01 - 802 2.52331352091e-01 6.06710393767e-01 - 803 1.88563983186e-01 6.06008344706e-01 - 804 -1.91846034485e-01 -6.11190394658e-01 - 805 -1.81920668064e-01 6.11363121178e-01 - 806 1.94950725401e-02 6.63973550543e-01 - 807 -3.52889121173e-02 -6.67948551891e-01 - 808 2.82752560289e-02 -6.73406872913e-01 - 809 5.24961169706e-01 6.69249165244e-02 - 810 1.18857744635e-01 -6.10650561336e-01 - 811 1.24206892840e-01 6.05570596128e-01 - 812 -6.14962011732e-01 -1.24221358655e-01 - 813 6.17618022761e-01 1.26516864442e-01 - 814 6.12383903362e-01 -1.15843561860e-01 - 815 -6.15273493810e-01 1.17178205305e-01 - 816 -6.73505278959e-01 -3.38634808569e-02 - 817 6.73300650424e-01 3.55558332743e-02 - 818 6.15175005505e-01 -5.42984503654e-02 - 819 -6.18645677861e-01 5.66715476711e-02 - 820 -1.29007782718e-01 -6.11349188154e-01 - 821 5.95024584800e-02 6.04549096569e-01 - 822 5.34391650515e-01 5.65698117443e-01 - 823 5.59097976264e-01 5.20016371964e-01 - 824 5.45559263987e-01 4.61667016143e-01 - 825 5.54785609786e-01 3.97360847494e-01 - 826 5.54702926262e-01 3.36196204465e-01 - 827 5.54650596296e-01 2.74677957062e-01 - 828 5.56276926449e-01 2.12988792165e-01 - 829 4.71985950574e-01 5.60880325931e-01 - 830 4.09495272332e-01 5.56360284757e-01 - 831 3.46775530710e-01 5.52925149822e-01 - 832 2.83643232407e-01 5.50917821075e-01 - 833 2.20187534657e-01 5.49759249556e-01 - 834 -5.30933478826e-01 5.63754579801e-01 - 835 -5.54600522370e-01 5.16835858036e-01 - 836 -5.38890672378e-01 4.56656758101e-01 - 837 -5.47984145682e-01 3.90563848604e-01 - 838 -5.49740540859e-01 3.28003406307e-01 - 839 -5.51930731387e-01 2.65534277055e-01 - 840 -5.54690660153e-01 2.03424696772e-01 - 841 -4.67960416721e-01 5.60121280295e-01 - 842 -4.05059019323e-01 5.57916236555e-01 - 843 -3.41937495138e-01 5.56853457794e-01 - 844 -2.78455691482e-01 5.56246408528e-01 - 845 -2.14548559122e-01 5.55359445017e-01 - 846 5.31627171366e-01 -5.63659632149e-01 - 847 5.55526970982e-01 -5.17087115284e-01 - 848 5.40313834138e-01 -4.57159837699e-01 - 849 5.49912721972e-01 -3.91591343820e-01 - 850 5.51479460327e-01 -3.29262843087e-01 - 851 5.52620757578e-01 -2.66702954396e-01 - 852 5.53753898154e-01 -2.04081037416e-01 - 853 4.68521896439e-01 -5.59253198765e-01 - 854 4.05285995827e-01 -5.55820278072e-01 - 855 3.41748424825e-01 -5.53558715499e-01 - 856 2.77804658988e-01 -5.52453440491e-01 - 857 2.13279197770e-01 -5.52238135817e-01 - 858 -5.34006248826e-01 -5.65606196615e-01 - 859 -5.58531158642e-01 -5.19820742102e-01 - 860 -5.44609849425e-01 -4.61424465531e-01 - 861 -5.53586446883e-01 -3.97105041370e-01 - 862 -5.53325031962e-01 -3.36047852589e-01 - 863 -5.53244360618e-01 -2.74681548214e-01 - 864 -5.54747037433e-01 -2.12918672639e-01 - 865 -4.71486823905e-01 -5.61006066723e-01 - 866 -4.08952687226e-01 -5.57005439406e-01 - 867 -3.46353220425e-01 -5.54535282425e-01 - 868 -2.83700196183e-01 -5.54139323177e-01 - 869 -2.21486587988e-01 -5.55502492016e-01 - 870 -1.11390676925e-01 6.12268847016e-01 - 871 5.60760202774e-01 1.52811786443e-01 - 872 -5.57716697907e-01 -1.51369949751e-01 - 873 -5.58126223076e-01 1.41951634100e-01 - 874 5.55363271860e-01 -1.41571317182e-01 - 875 -5.62365322020e-01 8.17234423193e-02 - 876 5.57629982878e-01 -7.95105018743e-02 - 877 -6.02028885490e-02 -6.01257220604e-01 - 878 5.04382117328e-01 5.10864336548e-01 - 879 -4.98630316357e-01 5.07933554995e-01 - 880 4.99534978316e-01 -5.07595670853e-01 - 881 -5.03543488804e-01 -5.10818872626e-01 - 882 5.39102599378e-02 -6.12896762030e-01 - 883 -4.62846864936e-02 6.38235873215e-01 - 884 -1.92827680241e-03 5.97635961213e-01 - 885 1.47686537243e-01 -5.52636360974e-01 - 886 1.56670891883e-01 5.48821446370e-01 - 887 6.18519701588e-01 6.23367694578e-03 - 888 6.20007117737e-01 6.65009803264e-02 - 889 -6.20207212373e-01 -3.53435989163e-03 - 890 -6.18471114441e-01 -6.38032244596e-02 - 891 9.34548804309e-02 5.47563716472e-01 - 892 -1.61052371893e-01 -5.58376314266e-01 - 893 -4.40847712065e-01 -5.04578742109e-01 - 894 -3.77748374403e-01 -4.99372042980e-01 - 895 -3.14203928676e-01 -4.97762114194e-01 - 896 -2.50416834287e-01 -4.98980577722e-01 - 897 -4.35619649021e-01 5.04207791975e-01 - 898 -3.72459595098e-01 5.02609553305e-01 - 899 -3.09286013330e-01 5.02278417785e-01 - 900 -2.46442744442e-01 5.01235108831e-01 - 901 4.36036740936e-01 -5.02324351401e-01 - 902 3.72047966265e-01 -4.98555761367e-01 - 903 3.07812139586e-01 -4.96737556727e-01 - 904 2.43505956093e-01 -4.96033305461e-01 - 905 4.41999244838e-01 5.04268041695e-01 - 906 3.79229838569e-01 4.98291286282e-01 - 907 3.15919991170e-01 4.95207345178e-01 - 908 2.52187721323e-01 4.93898812565e-01 - 909 -1.50368090821e-01 5.53548501615e-01 - 910 -5.04827559859e-01 -4.15639227524e-01 - 911 -4.75640815166e-01 -4.56440403743e-01 - 912 -4.99298019618e-01 -3.63172327019e-01 - 913 -4.96619868032e-01 -3.03290821650e-01 - 914 -4.97211060218e-01 -2.41031460508e-01 - 915 5.06389241176e-01 4.15756998791e-01 - 916 4.77151551020e-01 4.56391125629e-01 - 917 5.01235883328e-01 3.63172629332e-01 - 918 4.98664683052e-01 3.02977654707e-01 - 919 4.98891692538e-01 2.39987789964e-01 - 920 -4.95844407102e-01 4.07802215083e-01 - 921 -4.67613833690e-01 4.51447110592e-01 - 922 -4.92602096491e-01 3.52717773039e-01 - 923 -4.94641271608e-01 2.90389807016e-01 - 924 -4.97280275369e-01 2.27872183637e-01 - 925 4.98294596127e-01 -4.08489688803e-01 - 926 4.69135594115e-01 -4.50852111604e-01 - 927 4.95758680358e-01 -3.54132804521e-01 - 928 4.97108139069e-01 -2.92407103236e-01 - 929 4.97751690078e-01 -2.29925450180e-01 - 930 -5.65171207689e-02 5.87342731771e-01 - 931 -8.95005429362e-02 5.46056679214e-01 - 932 5.01230707097e-01 1.76234236504e-01 - 933 -4.99991749859e-01 -1.78351932383e-01 - 934 4.98874670219e-01 -1.67133907129e-01 - 935 -5.00724417585e-01 1.65768523266e-01 - 936 3.15317848933e-02 5.44732839174e-01 - 937 -5.05143674532e-01 1.04102164642e-01 - 938 5.00779112900e-01 -1.04210315859e-01 - 939 5.67641718053e-01 9.53612301621e-02 - 940 -5.62005149219e-01 -9.09397557886e-02 - 941 5.61833732146e-01 -1.92945607786e-02 - 942 -5.67643024377e-01 2.41305610271e-02 - 943 5.68093672461e-01 3.81691716969e-02 - 944 -2.14674509739e-03 -6.20773307270e-01 - 945 -5.67568210151e-01 -3.31512470730e-02 - 946 -1.06704527358e-01 -5.62305793978e-01 - 947 7.97527013808e-02 -5.53328298231e-01 - 948 1.78773064009e-01 -4.95933557705e-01 - 949 1.88736470691e-01 4.92722394016e-01 - 950 1.25681036028e-01 4.91400477856e-01 - 951 -1.87258862861e-01 -5.02107950166e-01 - 952 -1.83841658045e-01 4.98633829624e-01 - 953 -4.11330714925e-01 -4.45054004724e-01 - 954 -4.50043218772e-01 -3.98293803614e-01 - 955 -4.40326940151e-01 -3.36155133073e-01 - 956 -4.39415371381e-01 -2.71146761066e-01 - 957 -3.46700831290e-01 -4.40283655203e-01 - 958 -2.80724239896e-01 -4.42176566014e-01 - 959 -4.03352971000e-01 4.47511083563e-01 - 960 -4.34529001107e-01 3.86851831849e-01 - 961 -4.37697613449e-01 3.16782879516e-01 - 962 -4.39954299196e-01 2.52580671601e-01 - 963 -3.39367471781e-01 4.48799055019e-01 - 964 -2.77285892730e-01 4.48511968918e-01 - 965 4.03863142580e-01 -4.43645143677e-01 - 966 4.38471267685e-01 -3.86647293240e-01 - 967 4.43130980011e-01 -3.19233268178e-01 - 968 4.42607526150e-01 -2.56479881002e-01 - 969 3.38414951612e-01 -4.41203548921e-01 - 970 2.74062917367e-01 -4.40015883414e-01 - 971 4.13553502018e-01 4.44536224636e-01 - 972 4.52442320859e-01 3.98128126647e-01 - 973 4.43326976377e-01 3.35940872202e-01 - 974 4.42275161620e-01 2.70475569463e-01 - 975 3.49694206021e-01 4.38648435254e-01 - 976 2.84635360435e-01 4.38286522042e-01 - 977 -2.87646779345e-02 5.41260905240e-01 - 978 -5.04443648192e-01 -1.15936703492e-01 - 979 5.02817853431e-01 -4.09413215182e-02 - 980 -1.22152146302e-01 4.93768549171e-01 - 981 6.31948209990e-02 4.89662319319e-01 - 982 5.10954993798e-01 1.80559027137e-02 - 983 -5.10707895115e-01 -5.52944804027e-02 - 984 5.10452999752e-01 1.16560628773e-01 - 985 -5.11035287543e-01 4.39738565175e-02 - 986 4.43180019066e-01 2.04078581141e-01 - 987 -4.41651898874e-01 -2.06717369217e-01 - 988 -4.43082370986e-01 1.89861464459e-01 - 989 4.42953478079e-01 -1.93343878517e-01 - 990 4.44326777953e-01 -1.29839821258e-01 - 991 -4.47705508973e-01 1.27229596265e-01 - 992 -1.25340563150e-01 -5.09579650578e-01 - 993 1.13151498789e-01 -4.95735085425e-01 - 994 4.77315360643e-03 -5.55729660779e-01 - 995 -6.32266626735e-02 -5.29683129929e-01 - 996 2.09906585316e-01 -4.39914591751e-01 - 997 2.20810888704e-01 4.37094980194e-01 - 998 1.57554865880e-01 4.35710169163e-01 - 999 -2.15425920893e-01 -4.44725774996e-01 - 1000 -2.15993925318e-01 4.46266664905e-01 - 1001 -3.82664898493e-01 -3.77678298375e-01 - 1002 3.86374197950e-01 3.77086134052e-01 - 1003 3.68773230143e-01 -3.86240390808e-01 - 1004 3.94377426569e-01 -3.40142296459e-01 - 1005 3.88505891018e-01 -2.84217106962e-01 - 1006 3.04498692553e-01 -3.83267731003e-01 - 1007 -3.67450018532e-01 3.95765363936e-01 - 1008 -3.81861395760e-01 3.38458793374e-01 - 1009 -3.83300138741e-01 2.76769593447e-01 - 1010 -3.05473674230e-01 3.96409124725e-01 - 1011 3.16673701540e-01 3.83127177407e-01 - 1012 -3.11753190984e-01 -3.85501069184e-01 - 1013 3.86777370195e-01 3.03919138870e-01 - 1014 -3.82224266358e-01 -3.03743847038e-01 - 1015 3.40049521787e-01 3.32076897425e-01 - 1016 -3.34549269406e-01 -3.32675938036e-01 - 1017 -3.84985858139e-01 2.14122155486e-01 - 1018 -5.22732221663e-01 -5.41879303165e-03 - 1019 3.87713495322e-01 -2.20868431193e-01 - 1020 -3.89366896957e-01 1.51882346649e-01 - 1021 3.88271965927e-01 -1.56538815890e-01 - 1022 3.35042487758e-01 -3.22054815011e-01 - 1023 -3.30730481160e-01 3.53341782247e-01 - 1024 -3.27716640971e-01 3.01281147194e-01 - 1025 -6.06985224318e-02 4.89043054096e-01 - 1026 9.46840743479e-02 4.34203017106e-01 - 1027 -1.54586073486e-01 4.41070882238e-01 - 1028 4.60704490591e-02 -4.94313806651e-01 - 1029 -1.96981494388e-02 -4.84077947968e-01 - 1030 1.23414748532e-03 4.88024180027e-01 - 1031 -4.46553271351e-01 -1.42104594947e-01 - 1032 4.47184870301e-01 -6.61349909875e-02 - 1033 1.45988946605e-01 -4.39588290322e-01 - 1034 -1.49711542047e-01 -4.49807509111e-01 - 1035 2.40190689703e-01 -3.84213714695e-01 - 1036 -2.47212932625e-01 3.95273015791e-01 - 1037 2.52770340695e-01 3.81822182930e-01 - 1038 1.89444409005e-01 3.80425085784e-01 - 1039 -2.46120464279e-01 -3.87467858757e-01 - 1040 4.45096110466e-01 3.98947113189e-03 - 1041 -3.81681040627e-01 -2.36931853702e-01 - 1042 3.85340158863e-01 2.37642549420e-01 - 1043 -4.52813543028e-01 -7.66764741045e-02 - 1044 4.45043101315e-01 1.32061282572e-01 - 1045 -4.53638387193e-01 6.30812450608e-02 - 1046 -3.27575673914e-01 2.39523983017e-01 - 1047 4.72590172839e-01 6.76520996668e-02 - 1048 -4.63094418333e-01 -6.51003905703e-03 - 1049 -3.28773488494e-01 1.75533256221e-01 - 1050 3.89990369280e-01 -9.20241971589e-02 - 1051 3.97533193842e-01 -3.61081253105e-02 - 1052 1.26380936276e-01 3.78827520945e-01 - 1053 -3.95853042130e-01 8.92686897647e-02 - 1054 2.68685929104e-01 -3.28996325349e-01 - 1055 3.19737542624e-02 4.32900439355e-01 - 1056 8.22326867939e-02 -4.38177891897e-01 - 1057 1.93194878561e-02 -4.33064443770e-01 - 1058 -1.87458154222e-01 3.91994704174e-01 - 1059 2.84135869791e-01 3.26569941493e-01 - 1060 -2.77333802998e-01 -3.29655199425e-01 - 1061 -3.88056441939e-01 -1.70416221392e-01 - 1062 -8.49949736156e-02 -4.64049077176e-01 - 1063 -3.94500189715e-01 -1.04959765653e-01 - 1064 -2.74151626099e-01 3.36947903850e-01 - 1065 -9.32368496552e-02 4.35217883214e-01 - 1066 1.77199638496e-01 -3.84113749916e-01 - 1067 -1.79518631823e-01 -3.90649917203e-01 - 1068 2.21379816319e-01 3.25467590752e-01 - 1069 3.87866789411e-01 1.72343899695e-01 - 1070 3.23651336968e-01 2.70624443123e-01 - 1071 -3.16403448427e-01 -2.69294622475e-01 - 1072 3.33679787917e-01 -2.50863688965e-01 - 1073 3.32316914326e-01 -1.85535344729e-01 - 1074 -4.31437936393e-02 -4.21239662250e-01 - 1075 2.89095214210e-01 -2.77948987456e-01 - 1076 -1.27037101160e-01 3.81218619091e-01 - 1077 -3.09170401807e-02 4.32656242999e-01 - 1078 -3.37220520831e-01 1.14690607325e-01 - 1079 1.58332631576e-01 3.23830565786e-01 - 1080 2.06674364326e-01 -3.28877703929e-01 - 1081 1.15045551953e-01 -3.83355265478e-01 - 1082 5.40950790359e-02 -3.80882367220e-01 - 1083 3.34826782738e-01 -1.17934336035e-01 - 1084 -2.19031464231e-01 3.50952094293e-01 - 1085 -2.12999293075e-01 -3.33178866906e-01 - 1086 -1.08726036569e-01 -3.94566551996e-01 - 1087 -2.71933135525e-01 2.69418918568e-01 - 1088 -2.70544463299e-01 2.03408339724e-01 - 1089 -3.28336231492e-01 -1.97845424101e-01 - 1090 -3.36924202689e-01 -1.32403770081e-01 - 1091 3.31722408768e-01 2.01693572952e-01 - 1092 6.34018610703e-02 3.77442365853e-01 - 1093 2.53467173662e-01 2.70501664728e-01 - 1094 3.34634471346e-01 -4.45985767685e-02 - 1095 2.71232448064e-01 -2.16568941831e-01 - 1096 4.12035972794e-01 6.76183454596e-02 - 1097 3.73425166263e-01 1.53750180477e-02 - 1098 3.85534143001e-01 1.17055785190e-01 - 1099 -4.00471570056e-01 -3.95359591333e-02 - 1100 -4.01404801113e-01 2.50030085214e-02 - 1101 -2.17822043510e-01 2.99089138302e-01 - 1102 2.80825470320e-01 2.23574776957e-01 - 1103 2.34924989112e-01 -2.73505691394e-01 - 1104 3.46446058417e-01 7.54466589486e-02 - 1105 -1.66511494514e-01 3.34231583511e-01 - 1106 9.53156953988e-02 3.21883766414e-01 - 1107 -2.14585222379e-01 2.37203902495e-01 - 1108 -4.53644915011e-03 -3.75760733103e-01 - 1109 -5.67421014259e-02 -3.68993258545e-01 - 1110 3.32781867027e-01 1.37693412169e-01 - 1111 -6.44519526002e-02 3.76117302909e-01 - 1112 -3.45373488735e-01 5.38264092556e-02 - 1113 -3.44949580971e-01 -6.89390596845e-03 - 1114 -3.42241519207e-01 -6.89256824709e-02 - 1115 4.02480414733e-05 3.76835721992e-01 - 1116 1.45267637649e-01 -3.28752306623e-01 - 1117 8.48662588099e-02 -3.27932455671e-01 - 1118 1.90859274447e-01 2.69494724399e-01 - 1119 2.81813430709e-01 -1.49120545188e-01 - 1120 2.81474848292e-01 -8.51463810197e-02 - 1121 -1.48818864692e-01 -3.34719812897e-01 - 1122 -2.44565439773e-01 -2.75325520655e-01 - 1123 -2.66564847663e-01 -2.15668535649e-01 - 1124 -2.80023549653e-01 -1.55233655285e-01 - 1125 -2.69200685872e-01 1.32043573255e-01 - 1126 -8.99739155540e-02 -3.27861298672e-01 - 1127 1.73813285111e-01 -2.73968784308e-01 - 1128 1.13437792158e-01 -2.74338579860e-01 - 1129 -1.58843460310e-01 2.72803119491e-01 - 1130 2.56549120034e-02 -3.25604802243e-01 - 1131 1.27364455481e-01 2.67131185534e-01 - 1132 -1.01135135827e-01 3.14552553732e-01 - 1133 -2.96320209985e-01 7.87952570566e-02 - 1134 3.06660949687e-01 2.52369715391e-02 - 1135 2.65409523870e-01 -2.41497470051e-02 - 1136 -2.11838126138e-01 1.72381364481e-01 - 1137 3.22747513182e-02 3.20902142877e-01 - 1138 -2.90999842504e-01 2.47621103576e-02 - 1139 -2.87702392351e-01 -3.50667238462e-02 - 1140 -2.86649601240e-01 -9.51743928684e-02 - 1141 -3.22512613643e-02 -3.22590596595e-01 - 1142 2.76520594391e-01 1.65964010782e-01 - 1143 -1.81596748981e-01 -2.80321198042e-01 - 1144 -2.05026451562e-01 -2.24410978647e-01 - 1145 -2.19731712536e-01 -1.66559850491e-01 - 1146 2.20355254995e-01 2.07684017591e-01 - 1147 2.02328847654e-01 -2.19180832091e-01 - 1148 2.25010024217e-01 -1.65190186047e-01 - 1149 2.39997757157e-01 -1.15960397079e-01 - 1150 -2.37405570554e-01 -1.17754478122e-01 - 1151 -2.30971729893e-01 -6.44505338168e-02 - 1152 5.43369492832e-02 -2.74319923400e-01 - 1153 -2.32304768797e-01 -5.26759138368e-04 - 1154 -2.42607531101e-01 6.40470377681e-02 - 1155 -2.01646584957e-01 1.07846431011e-01 - 1156 2.22083228682e-01 -6.66949452047e-02 - 1157 -1.21838245007e-01 -2.75645551347e-01 - 1158 -3.16290010894e-02 3.21390499186e-01 - 1159 1.59962154488e-01 2.22183856826e-01 - 1160 1.40130148803e-01 -2.19989536509e-01 - 1161 1.64576319327e-01 -1.65935091024e-01 - 1162 1.88677019057e-01 -1.13832813640e-01 - 1163 -4.59689942735e-03 -2.72561594444e-01 - 1164 -1.52412208511e-01 -2.32709737270e-01 - 1165 -1.59284728115e-01 -1.77527288146e-01 - 1166 6.50403036575e-02 2.63784750018e-01 - 1167 2.78176080820e-01 9.45696543313e-02 - 1168 -1.56652774752e-01 2.08775882034e-01 - 1169 2.41538903161e-01 3.54851296379e-02 - 1170 -1.53015046411e-01 1.47440379858e-01 - 1171 1.99370540507e-01 -1.11576030900e-02 - 1172 8.09721233106e-02 -2.21299205348e-01 - 1173 1.04346526116e-01 -1.66085251874e-01 - 1174 1.28300210884e-01 -1.11003821985e-01 - 1175 -1.76030937260e-01 -1.08619976289e-01 - 1176 -6.43423680000e-02 -2.70302748486e-01 - 1177 -9.83015851295e-02 -2.09225050667e-01 - 1178 1.24999802796e-03 2.65225487757e-01 - 1179 -5.47702849058e-02 2.70386653327e-01 - 1180 -1.01527308799e-01 2.42666423212e-01 - 1181 2.39961098766e-02 -2.23560091905e-01 - 1182 1.00383554084e-01 2.02206174748e-01 - 1183 2.20070936312e-01 1.38582603209e-01 - 1184 1.61184670364e-01 1.67363775896e-01 - 1185 2.16791033436e-01 8.41351145140e-02 - 1186 -1.73855790152e-01 -3.42370020142e-02 - 1187 -1.75297342277e-01 3.96237553521e-02 - 1188 -1.48112553052e-01 9.31990118334e-02 - 1189 1.76131587821e-01 4.54809240459e-02 - 1190 -3.43849300581e-02 -2.19586654896e-01 - 1191 1.59629846583e-01 -5.87867621413e-02 - 1192 3.15026211518e-02 2.09399499970e-01 - 1193 4.70229977857e-02 -1.70252282639e-01 - 1194 6.47503652490e-02 -1.11495449804e-01 - 1195 -9.90914752562e-02 1.79149252682e-01 - 1196 1.63477712796e-01 1.05128233328e-01 - 1197 -1.08675451206e-01 -1.36098708968e-01 - 1198 -1.13968087963e-01 -6.82454833571e-02 - 1199 -3.80294733604e-02 2.09250285893e-01 - 1200 -1.16536560669e-01 -2.24653455585e-03 - 1201 -1.07678628928e-01 5.83749057733e-02 - 1202 -5.03599593084e-02 -1.59975096592e-01 - 1203 -5.07125199584e-02 -9.45422902760e-02 - 1204 4.85704107197e-03 1.54739149825e-01 - 1205 -5.44469480954e-02 -3.01772004722e-02 - 1206 1.03999612165e-01 1.29718749164e-01 - 1207 5.61723632031e-02 1.55696657309e-01 - 1208 4.16038147393e-03 -1.25246817988e-01 - 1209 -9.86627721517e-02 1.17037525397e-01 - 1210 -4.88218646433e-02 1.44106014931e-01 - 1211 1.32405503787e-01 -3.19481904323e-04 - 1212 9.23626769109e-02 -5.32838527052e-02 - 1213 1.64006335194e-02 -5.38482831674e-02 - 1214 -1.08562284931e-02 1.15061298627e-01 - 1215 -6.44298058220e-02 2.52908759105e-02 - 1216 -4.18296539877e-02 8.00796495653e-02 - 1217 1.10461488725e-01 6.33593497015e-02 - 1218 3.67904244746e-02 8.84260408520e-02 - 1219 -5.04521187549e-03 2.03352409669e-02 - 1220 6.27032608348e-02 1.11893358711e-02 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 128 1 129 - 2 3 3 129 1 3 - 3 3 3 33 2 132 - 4 3 3 132 2 35 - 5 3 3 65 34 133 - 6 3 3 133 34 67 - 7 3 3 97 66 134 - 8 3 3 134 66 98 - 9 3 3 128 129 135 - 10 3 3 128 135 127 - 11 3 3 33 132 136 - 12 3 3 33 136 32 - 13 3 3 132 35 137 - 14 3 3 137 35 36 - 15 3 3 65 133 138 - 16 3 3 65 138 64 - 17 3 3 133 67 139 - 18 3 3 139 67 68 - 19 3 3 129 3 140 - 20 3 3 140 3 4 - 21 3 3 97 134 141 - 22 3 3 97 141 96 - 23 3 3 134 98 142 - 24 3 3 142 98 99 - 25 3 3 127 135 143 - 26 3 3 127 143 126 - 27 3 3 137 36 144 - 28 3 3 144 36 37 - 29 3 3 139 68 145 - 30 3 3 145 68 69 - 31 3 3 140 4 146 - 32 3 3 146 4 5 - 33 3 3 96 141 147 - 34 3 3 96 147 95 - 35 3 3 32 136 148 - 36 3 3 32 148 31 - 37 3 3 142 99 149 - 38 3 3 149 99 100 - 39 3 3 64 138 150 - 40 3 3 64 150 63 - 41 3 3 126 143 151 - 42 3 3 126 151 125 - 43 3 3 145 69 152 - 44 3 3 152 69 70 - 45 3 3 144 37 153 - 46 3 3 153 37 38 - 47 3 3 146 5 154 - 48 3 3 154 5 6 - 49 3 3 95 147 155 - 50 3 3 95 155 94 - 51 3 3 31 148 156 - 52 3 3 31 156 30 - 53 3 3 149 100 157 - 54 3 3 157 100 101 - 55 3 3 63 150 158 - 56 3 3 63 158 62 - 57 3 3 125 151 159 - 58 3 3 125 159 124 - 59 3 3 152 70 160 - 60 3 3 160 70 71 - 61 3 3 153 38 161 - 62 3 3 161 38 39 - 63 3 3 94 155 162 - 64 3 3 94 162 93 - 65 3 3 157 101 163 - 66 3 3 163 101 102 - 67 3 3 154 6 164 - 68 3 3 164 6 7 - 69 3 3 30 156 165 - 70 3 3 30 165 29 - 71 3 3 62 158 166 - 72 3 3 62 166 61 - 73 3 3 124 159 167 - 74 3 3 124 167 123 - 75 3 3 160 71 168 - 76 3 3 168 71 72 - 77 3 3 161 39 169 - 78 3 3 169 39 40 - 79 3 3 93 162 170 - 80 3 3 93 170 92 - 81 3 3 163 102 171 - 82 3 3 171 102 103 - 83 3 3 164 7 172 - 84 3 3 172 7 8 - 85 3 3 29 165 173 - 86 3 3 29 173 28 - 87 3 3 61 166 174 - 88 3 3 61 174 60 - 89 3 3 168 72 175 - 90 3 3 175 72 73 - 91 3 3 171 103 176 - 92 3 3 176 103 104 - 93 3 3 172 8 177 - 94 3 3 177 8 9 - 95 3 3 169 40 178 - 96 3 3 178 40 41 - 97 3 3 123 167 179 - 98 3 3 123 179 122 - 99 3 3 28 173 180 - 100 3 3 28 180 27 - 101 3 3 92 170 181 - 102 3 3 92 181 91 - 103 3 3 60 174 182 - 104 3 3 60 182 59 - 105 3 3 175 73 183 - 106 3 3 183 73 74 - 107 3 3 176 104 184 - 108 3 3 184 104 105 - 109 3 3 177 9 185 - 110 3 3 185 9 10 - 111 3 3 178 41 186 - 112 3 3 186 41 42 - 113 3 3 122 179 187 - 114 3 3 122 187 121 - 115 3 3 27 180 188 - 116 3 3 27 188 26 - 117 3 3 91 181 189 - 118 3 3 91 189 90 - 119 3 3 59 182 190 - 120 3 3 59 190 58 - 121 3 3 185 10 191 - 122 3 3 191 10 11 - 123 3 3 121 187 192 - 124 3 3 121 192 120 - 125 3 3 26 188 193 - 126 3 3 26 193 25 - 127 3 3 90 189 194 - 128 3 3 90 194 89 - 129 3 3 186 42 195 - 130 3 3 195 42 43 - 131 3 3 183 74 196 - 132 3 3 196 74 75 - 133 3 3 184 105 197 - 134 3 3 197 105 106 - 135 3 3 58 190 198 - 136 3 3 58 198 57 - 137 3 3 25 193 199 - 138 3 3 25 199 24 - 139 3 3 89 194 200 - 140 3 3 89 200 88 - 141 3 3 191 11 201 - 142 3 3 201 11 12 - 143 3 3 195 43 202 - 144 3 3 202 43 44 - 145 3 3 197 106 203 - 146 3 3 203 106 107 - 147 3 3 120 192 204 - 148 3 3 120 204 119 - 149 3 3 196 75 205 - 150 3 3 205 75 76 - 151 3 3 57 198 206 - 152 3 3 57 206 56 - 153 3 3 201 12 207 - 154 3 3 207 12 13 - 155 3 3 119 204 208 - 156 3 3 119 208 118 - 157 3 3 24 199 209 - 158 3 3 24 209 23 - 159 3 3 88 200 210 - 160 3 3 88 210 87 - 161 3 3 202 44 211 - 162 3 3 211 44 45 - 163 3 3 56 206 212 - 164 3 3 56 212 55 - 165 3 3 203 107 213 - 166 3 3 213 107 108 - 167 3 3 205 76 214 - 168 3 3 214 76 77 - 169 3 3 118 208 215 - 170 3 3 118 215 117 - 171 3 3 213 108 216 - 172 3 3 216 108 109 - 173 3 3 87 210 217 - 174 3 3 87 217 86 - 175 3 3 211 45 218 - 176 3 3 218 45 46 - 177 3 3 23 209 219 - 178 3 3 23 219 22 - 179 3 3 55 212 220 - 180 3 3 55 220 54 - 181 3 3 207 13 221 - 182 3 3 221 13 14 - 183 3 3 214 77 222 - 184 3 3 222 77 78 - 185 3 3 117 215 223 - 186 3 3 117 223 116 - 187 3 3 86 217 224 - 188 3 3 86 224 85 - 189 3 3 218 46 225 - 190 3 3 225 46 47 - 191 3 3 222 78 226 - 192 3 3 226 78 79 - 193 3 3 54 220 227 - 194 3 3 54 227 53 - 195 3 3 22 219 228 - 196 3 3 22 228 21 - 197 3 3 216 109 229 - 198 3 3 229 109 110 - 199 3 3 221 14 230 - 200 3 3 230 14 15 - 201 3 3 225 47 231 - 202 3 3 231 47 48 - 203 3 3 226 79 232 - 204 3 3 232 79 80 - 205 3 3 229 110 233 - 206 3 3 233 110 111 - 207 3 3 230 15 234 - 208 3 3 234 15 16 - 209 3 3 21 228 235 - 210 3 3 21 235 20 - 211 3 3 116 223 236 - 212 3 3 116 236 115 - 213 3 3 85 224 237 - 214 3 3 85 237 84 - 215 3 3 53 227 238 - 216 3 3 53 238 52 - 217 3 3 232 80 239 - 218 3 3 239 80 81 - 219 3 3 234 16 240 - 220 3 3 240 16 17 - 221 3 3 231 48 241 - 222 3 3 241 48 49 - 223 3 3 52 238 242 - 224 3 3 52 242 51 - 225 3 3 20 235 243 - 226 3 3 20 243 19 - 227 3 3 233 111 244 - 228 3 3 244 111 112 - 229 3 3 84 237 245 - 230 3 3 84 245 83 - 231 3 3 115 236 246 - 232 3 3 115 246 114 - 233 3 3 239 81 247 - 234 3 3 247 81 82 - 235 3 3 114 246 248 - 236 3 3 114 248 113 - 237 3 3 51 242 249 - 238 3 3 51 249 50 - 239 3 3 83 245 130 - 240 3 3 83 130 82 - 241 3 3 241 49 251 - 242 3 3 251 49 50 - 243 3 3 19 243 250 - 244 3 3 19 250 18 - 245 3 3 244 112 252 - 246 3 3 252 112 113 - 247 3 3 240 17 254 - 248 3 3 254 17 18 - 249 3 3 82 130 247 - 250 3 3 252 113 248 - 251 3 3 18 250 254 - 252 3 3 50 249 251 - 253 3 3 132 137 136 - 254 3 3 129 140 135 - 255 3 3 138 133 139 - 256 3 3 134 142 141 - 257 3 3 148 136 253 - 258 3 3 253 136 137 - 259 3 3 137 144 256 - 260 3 3 137 256 253 - 261 3 3 144 153 257 - 262 3 3 144 257 256 - 263 3 3 153 161 258 - 264 3 3 153 258 257 - 265 3 3 161 169 259 - 266 3 3 161 259 258 - 267 3 3 169 178 260 - 268 3 3 169 260 259 - 269 3 3 178 186 261 - 270 3 3 178 261 260 - 271 3 3 186 195 262 - 272 3 3 186 262 261 - 273 3 3 195 202 263 - 274 3 3 195 263 262 - 275 3 3 202 211 264 - 276 3 3 202 264 263 - 277 3 3 211 218 265 - 278 3 3 211 265 264 - 279 3 3 218 225 266 - 280 3 3 218 266 265 - 281 3 3 225 231 267 - 282 3 3 225 267 266 - 283 3 3 231 241 268 - 284 3 3 231 268 267 - 285 3 3 241 251 269 - 286 3 3 241 269 268 - 287 3 3 156 148 270 - 288 3 3 270 148 253 - 289 3 3 165 156 271 - 290 3 3 271 156 270 - 291 3 3 173 165 272 - 292 3 3 272 165 271 - 293 3 3 180 173 273 - 294 3 3 273 173 272 - 295 3 3 188 180 274 - 296 3 3 274 180 273 - 297 3 3 193 188 275 - 298 3 3 275 188 274 - 299 3 3 199 193 276 - 300 3 3 276 193 275 - 301 3 3 209 199 277 - 302 3 3 277 199 276 - 303 3 3 219 209 278 - 304 3 3 278 209 277 - 305 3 3 228 219 279 - 306 3 3 279 219 278 - 307 3 3 235 228 280 - 308 3 3 280 228 279 - 309 3 3 243 235 281 - 310 3 3 281 235 280 - 311 3 3 250 243 282 - 312 3 3 282 243 281 - 313 3 3 147 141 283 - 314 3 3 283 141 142 - 315 3 3 142 149 284 - 316 3 3 142 284 283 - 317 3 3 149 157 285 - 318 3 3 149 285 284 - 319 3 3 157 163 286 - 320 3 3 157 286 285 - 321 3 3 163 171 287 - 322 3 3 163 287 286 - 323 3 3 171 176 288 - 324 3 3 171 288 287 - 325 3 3 176 184 289 - 326 3 3 176 289 288 - 327 3 3 184 197 290 - 328 3 3 184 290 289 - 329 3 3 197 203 291 - 330 3 3 197 291 290 - 331 3 3 203 213 292 - 332 3 3 203 292 291 - 333 3 3 213 216 293 - 334 3 3 213 293 292 - 335 3 3 216 229 294 - 336 3 3 216 294 293 - 337 3 3 229 233 295 - 338 3 3 229 295 294 - 339 3 3 233 244 296 - 340 3 3 233 296 295 - 341 3 3 244 252 297 - 342 3 3 244 297 296 - 343 3 3 155 147 298 - 344 3 3 298 147 283 - 345 3 3 162 155 299 - 346 3 3 299 155 298 - 347 3 3 170 162 300 - 348 3 3 300 162 299 - 349 3 3 181 170 301 - 350 3 3 301 170 300 - 351 3 3 189 181 302 - 352 3 3 302 181 301 - 353 3 3 194 189 303 - 354 3 3 303 189 302 - 355 3 3 200 194 304 - 356 3 3 304 194 303 - 357 3 3 210 200 305 - 358 3 3 305 200 304 - 359 3 3 217 210 306 - 360 3 3 306 210 305 - 361 3 3 224 217 307 - 362 3 3 307 217 306 - 363 3 3 237 224 308 - 364 3 3 308 224 307 - 365 3 3 245 237 309 - 366 3 3 309 237 308 - 367 3 3 130 245 310 - 368 3 3 310 245 309 - 369 3 3 140 146 311 - 370 3 3 140 311 135 - 371 3 3 143 135 312 - 372 3 3 312 135 311 - 373 3 3 151 143 313 - 374 3 3 313 143 312 - 375 3 3 159 151 314 - 376 3 3 314 151 313 - 377 3 3 167 159 315 - 378 3 3 315 159 314 - 379 3 3 179 167 316 - 380 3 3 316 167 315 - 381 3 3 187 179 317 - 382 3 3 317 179 316 - 383 3 3 192 187 318 - 384 3 3 318 187 317 - 385 3 3 204 192 319 - 386 3 3 319 192 318 - 387 3 3 208 204 320 - 388 3 3 320 204 319 - 389 3 3 215 208 321 - 390 3 3 321 208 320 - 391 3 3 223 215 322 - 392 3 3 322 215 321 - 393 3 3 236 223 323 - 394 3 3 323 223 322 - 395 3 3 246 236 324 - 396 3 3 324 236 323 - 397 3 3 248 246 325 - 398 3 3 325 246 324 - 399 3 3 146 154 326 - 400 3 3 146 326 311 - 401 3 3 154 164 327 - 402 3 3 154 327 326 - 403 3 3 164 172 328 - 404 3 3 164 328 327 - 405 3 3 172 177 329 - 406 3 3 172 329 328 - 407 3 3 177 185 330 - 408 3 3 177 330 329 - 409 3 3 185 191 331 - 410 3 3 185 331 330 - 411 3 3 191 201 332 - 412 3 3 191 332 331 - 413 3 3 201 207 333 - 414 3 3 201 333 332 - 415 3 3 207 221 334 - 416 3 3 207 334 333 - 417 3 3 221 230 335 - 418 3 3 221 335 334 - 419 3 3 230 234 336 - 420 3 3 230 336 335 - 421 3 3 234 240 337 - 422 3 3 234 337 336 - 423 3 3 240 254 338 - 424 3 3 240 338 337 - 425 3 3 139 145 339 - 426 3 3 139 339 138 - 427 3 3 150 138 340 - 428 3 3 340 138 339 - 429 3 3 158 150 341 - 430 3 3 341 150 340 - 431 3 3 166 158 342 - 432 3 3 342 158 341 - 433 3 3 174 166 343 - 434 3 3 343 166 342 - 435 3 3 182 174 344 - 436 3 3 344 174 343 - 437 3 3 190 182 345 - 438 3 3 345 182 344 - 439 3 3 198 190 346 - 440 3 3 346 190 345 - 441 3 3 206 198 347 - 442 3 3 347 198 346 - 443 3 3 212 206 348 - 444 3 3 348 206 347 - 445 3 3 220 212 349 - 446 3 3 349 212 348 - 447 3 3 227 220 350 - 448 3 3 350 220 349 - 449 3 3 238 227 351 - 450 3 3 351 227 350 - 451 3 3 242 238 352 - 452 3 3 352 238 351 - 453 3 3 249 242 353 - 454 3 3 353 242 352 - 455 3 3 145 152 354 - 456 3 3 145 354 339 - 457 3 3 152 160 355 - 458 3 3 152 355 354 - 459 3 3 160 168 356 - 460 3 3 160 356 355 - 461 3 3 168 175 357 - 462 3 3 168 357 356 - 463 3 3 175 183 358 - 464 3 3 175 358 357 - 465 3 3 183 196 359 - 466 3 3 183 359 358 - 467 3 3 196 205 360 - 468 3 3 196 360 359 - 469 3 3 205 214 361 - 470 3 3 205 361 360 - 471 3 3 214 222 362 - 472 3 3 214 362 361 - 473 3 3 222 226 363 - 474 3 3 222 363 362 - 475 3 3 226 232 364 - 476 3 3 226 364 363 - 477 3 3 232 239 365 - 478 3 3 232 365 364 - 479 3 3 239 247 366 - 480 3 3 239 366 365 - 481 3 3 269 251 249 - 482 3 3 249 353 269 - 483 3 3 252 248 297 - 484 3 3 248 325 297 - 485 3 3 254 250 338 - 486 3 3 250 282 367 - 487 3 3 250 367 338 - 488 3 3 130 310 368 - 489 3 3 130 368 247 - 490 3 3 366 247 368 - 491 3 3 298 283 369 - 492 3 3 369 283 284 - 493 3 3 284 285 369 - 494 3 3 270 253 370 - 495 3 3 370 253 256 - 496 3 3 256 257 370 - 497 3 3 339 354 371 - 498 3 3 339 371 340 - 499 3 3 341 340 371 - 500 3 3 312 311 372 - 501 3 3 372 311 326 - 502 3 3 313 312 372 - 503 3 3 326 327 373 - 504 3 3 326 373 372 - 505 3 3 327 328 374 - 506 3 3 327 374 373 - 507 3 3 328 329 375 - 508 3 3 328 375 374 - 509 3 3 329 330 376 - 510 3 3 329 376 375 - 511 3 3 330 331 377 - 512 3 3 330 377 376 - 513 3 3 331 332 378 - 514 3 3 331 378 377 - 515 3 3 332 333 379 - 516 3 3 332 379 378 - 517 3 3 333 334 380 - 518 3 3 333 380 379 - 519 3 3 334 335 381 - 520 3 3 334 381 380 - 521 3 3 335 336 382 - 522 3 3 335 382 381 - 523 3 3 336 337 383 - 524 3 3 336 383 382 - 525 3 3 299 298 384 - 526 3 3 384 298 369 - 527 3 3 300 299 385 - 528 3 3 385 299 384 - 529 3 3 301 300 386 - 530 3 3 386 300 385 - 531 3 3 302 301 387 - 532 3 3 387 301 386 - 533 3 3 303 302 388 - 534 3 3 388 302 387 - 535 3 3 304 303 389 - 536 3 3 389 303 388 - 537 3 3 305 304 390 - 538 3 3 390 304 389 - 539 3 3 306 305 391 - 540 3 3 391 305 390 - 541 3 3 307 306 392 - 542 3 3 392 306 391 - 543 3 3 308 307 393 - 544 3 3 393 307 392 - 545 3 3 309 308 394 - 546 3 3 394 308 393 - 547 3 3 271 270 395 - 548 3 3 395 270 370 - 549 3 3 272 271 396 - 550 3 3 396 271 395 - 551 3 3 273 272 397 - 552 3 3 397 272 396 - 553 3 3 274 273 398 - 554 3 3 398 273 397 - 555 3 3 275 274 399 - 556 3 3 399 274 398 - 557 3 3 276 275 400 - 558 3 3 400 275 399 - 559 3 3 277 276 401 - 560 3 3 401 276 400 - 561 3 3 278 277 402 - 562 3 3 402 277 401 - 563 3 3 279 278 403 - 564 3 3 403 278 402 - 565 3 3 280 279 404 - 566 3 3 404 279 403 - 567 3 3 281 280 405 - 568 3 3 405 280 404 - 569 3 3 282 281 406 - 570 3 3 406 281 405 - 571 3 3 354 355 407 - 572 3 3 354 407 371 - 573 3 3 355 356 408 - 574 3 3 355 408 407 - 575 3 3 356 357 409 - 576 3 3 356 409 408 - 577 3 3 357 358 410 - 578 3 3 357 410 409 - 579 3 3 358 359 411 - 580 3 3 358 411 410 - 581 3 3 359 360 412 - 582 3 3 359 412 411 - 583 3 3 360 361 413 - 584 3 3 360 413 412 - 585 3 3 361 362 414 - 586 3 3 361 414 413 - 587 3 3 362 363 415 - 588 3 3 362 415 414 - 589 3 3 363 364 416 - 590 3 3 363 416 415 - 591 3 3 364 365 417 - 592 3 3 364 417 416 - 593 3 3 365 366 418 - 594 3 3 365 418 417 - 595 3 3 337 338 419 - 596 3 3 337 419 383 - 597 3 3 310 309 420 - 598 3 3 420 309 394 - 599 3 3 314 313 421 - 600 3 3 421 313 372 - 601 3 3 315 314 422 - 602 3 3 422 314 421 - 603 3 3 316 315 423 - 604 3 3 423 315 422 - 605 3 3 317 316 424 - 606 3 3 424 316 423 - 607 3 3 318 317 425 - 608 3 3 425 317 424 - 609 3 3 319 318 426 - 610 3 3 426 318 425 - 611 3 3 320 319 427 - 612 3 3 427 319 426 - 613 3 3 321 320 428 - 614 3 3 428 320 427 - 615 3 3 322 321 429 - 616 3 3 429 321 428 - 617 3 3 323 322 430 - 618 3 3 430 322 429 - 619 3 3 324 323 431 - 620 3 3 431 323 430 - 621 3 3 325 324 432 - 622 3 3 432 324 431 - 623 3 3 285 286 433 - 624 3 3 285 433 369 - 625 3 3 286 287 434 - 626 3 3 286 434 433 - 627 3 3 287 288 435 - 628 3 3 287 435 434 - 629 3 3 288 289 436 - 630 3 3 288 436 435 - 631 3 3 289 290 437 - 632 3 3 289 437 436 - 633 3 3 290 291 438 - 634 3 3 290 438 437 - 635 3 3 291 292 439 - 636 3 3 291 439 438 - 637 3 3 292 293 440 - 638 3 3 292 440 439 - 639 3 3 293 294 441 - 640 3 3 293 441 440 - 641 3 3 294 295 442 - 642 3 3 294 442 441 - 643 3 3 295 296 443 - 644 3 3 295 443 442 - 645 3 3 296 297 444 - 646 3 3 296 444 443 - 647 3 3 257 258 445 - 648 3 3 257 445 370 - 649 3 3 258 259 446 - 650 3 3 258 446 445 - 651 3 3 259 260 447 - 652 3 3 259 447 446 - 653 3 3 260 261 448 - 654 3 3 260 448 447 - 655 3 3 261 262 449 - 656 3 3 261 449 448 - 657 3 3 262 263 450 - 658 3 3 262 450 449 - 659 3 3 263 264 451 - 660 3 3 263 451 450 - 661 3 3 264 265 452 - 662 3 3 264 452 451 - 663 3 3 265 266 453 - 664 3 3 265 453 452 - 665 3 3 266 267 454 - 666 3 3 266 454 453 - 667 3 3 267 268 455 - 668 3 3 267 455 454 - 669 3 3 268 269 456 - 670 3 3 268 456 455 - 671 3 3 342 341 457 - 672 3 3 457 341 371 - 673 3 3 343 342 458 - 674 3 3 458 342 457 - 675 3 3 344 343 459 - 676 3 3 459 343 458 - 677 3 3 345 344 460 - 678 3 3 460 344 459 - 679 3 3 346 345 461 - 680 3 3 461 345 460 - 681 3 3 347 346 462 - 682 3 3 462 346 461 - 683 3 3 348 347 463 - 684 3 3 463 347 462 - 685 3 3 349 348 464 - 686 3 3 464 348 463 - 687 3 3 350 349 465 - 688 3 3 465 349 464 - 689 3 3 351 350 466 - 690 3 3 466 350 465 - 691 3 3 352 351 467 - 692 3 3 467 351 466 - 693 3 3 353 352 468 - 694 3 3 468 352 467 - 695 3 3 370 445 469 - 696 3 3 370 469 395 - 697 3 3 369 433 470 - 698 3 3 369 470 384 - 699 3 3 371 407 471 - 700 3 3 371 471 457 - 701 3 3 372 373 472 - 702 3 3 372 472 421 - 703 3 3 367 282 473 - 704 3 3 473 282 406 - 705 3 3 338 367 474 - 706 3 3 338 474 419 - 707 3 3 373 374 475 - 708 3 3 373 475 472 - 709 3 3 407 408 476 - 710 3 3 407 476 471 - 711 3 3 396 395 477 - 712 3 3 477 395 469 - 713 3 3 385 384 478 - 714 3 3 478 384 470 - 715 3 3 374 375 479 - 716 3 3 374 479 475 - 717 3 3 408 409 480 - 718 3 3 408 480 476 - 719 3 3 397 396 481 - 720 3 3 481 396 477 - 721 3 3 386 385 482 - 722 3 3 482 385 478 - 723 3 3 375 376 483 - 724 3 3 375 483 479 - 725 3 3 409 410 484 - 726 3 3 409 484 480 - 727 3 3 398 397 485 - 728 3 3 485 397 481 - 729 3 3 387 386 486 - 730 3 3 486 386 482 - 731 3 3 376 377 487 - 732 3 3 376 487 483 - 733 3 3 410 411 488 - 734 3 3 410 488 484 - 735 3 3 399 398 489 - 736 3 3 489 398 485 - 737 3 3 388 387 490 - 738 3 3 490 387 486 - 739 3 3 377 378 491 - 740 3 3 377 491 487 - 741 3 3 411 412 492 - 742 3 3 411 492 488 - 743 3 3 400 399 493 - 744 3 3 493 399 489 - 745 3 3 389 388 494 - 746 3 3 494 388 490 - 747 3 3 378 379 495 - 748 3 3 378 495 491 - 749 3 3 412 413 496 - 750 3 3 412 496 492 - 751 3 3 401 400 497 - 752 3 3 497 400 493 - 753 3 3 390 389 498 - 754 3 3 498 389 494 - 755 3 3 379 380 499 - 756 3 3 379 499 495 - 757 3 3 413 414 500 - 758 3 3 413 500 496 - 759 3 3 402 401 501 - 760 3 3 501 401 497 - 761 3 3 391 390 502 - 762 3 3 502 390 498 - 763 3 3 380 381 503 - 764 3 3 380 503 499 - 765 3 3 414 415 504 - 766 3 3 414 504 500 - 767 3 3 403 402 505 - 768 3 3 505 402 501 - 769 3 3 392 391 506 - 770 3 3 506 391 502 - 771 3 3 415 416 507 - 772 3 3 415 507 504 - 773 3 3 381 382 508 - 774 3 3 381 508 503 - 775 3 3 404 403 509 - 776 3 3 509 403 505 - 777 3 3 393 392 510 - 778 3 3 510 392 506 - 779 3 3 416 417 511 - 780 3 3 416 511 507 - 781 3 3 382 383 512 - 782 3 3 382 512 508 - 783 3 3 405 404 513 - 784 3 3 513 404 509 - 785 3 3 394 393 514 - 786 3 3 514 393 510 - 787 3 3 417 418 515 - 788 3 3 417 515 511 - 789 3 3 406 405 516 - 790 3 3 516 405 513 - 791 3 3 383 419 517 - 792 3 3 383 517 512 - 793 3 3 420 394 518 - 794 3 3 518 394 514 - 795 3 3 297 325 519 - 796 3 3 297 519 444 - 797 3 3 325 432 519 - 798 3 3 269 353 520 - 799 3 3 269 520 456 - 800 3 3 353 468 520 - 801 3 3 433 434 521 - 802 3 3 433 521 470 - 803 3 3 445 446 522 - 804 3 3 445 522 469 - 805 3 3 458 457 523 - 806 3 3 523 457 471 - 807 3 3 422 421 524 - 808 3 3 524 421 472 - 809 3 3 368 310 525 - 810 3 3 525 310 420 - 811 3 3 366 368 526 - 812 3 3 526 368 525 - 813 3 3 418 366 526 - 814 3 3 423 422 527 - 815 3 3 527 422 524 - 816 3 3 424 423 528 - 817 3 3 528 423 527 - 818 3 3 425 424 529 - 819 3 3 529 424 528 - 820 3 3 426 425 530 - 821 3 3 530 425 529 - 822 3 3 427 426 531 - 823 3 3 531 426 530 - 824 3 3 428 427 532 - 825 3 3 532 427 531 - 826 3 3 429 428 533 - 827 3 3 533 428 532 - 828 3 3 430 429 534 - 829 3 3 534 429 533 - 830 3 3 431 430 535 - 831 3 3 535 430 534 - 832 3 3 432 431 536 - 833 3 3 536 431 535 - 834 3 3 434 435 537 - 835 3 3 434 537 521 - 836 3 3 435 436 538 - 837 3 3 435 538 537 - 838 3 3 436 437 539 - 839 3 3 436 539 538 - 840 3 3 437 438 540 - 841 3 3 437 540 539 - 842 3 3 438 439 541 - 843 3 3 438 541 540 - 844 3 3 439 440 542 - 845 3 3 439 542 541 - 846 3 3 440 441 543 - 847 3 3 440 543 542 - 848 3 3 441 442 544 - 849 3 3 441 544 543 - 850 3 3 442 443 545 - 851 3 3 442 545 544 - 852 3 3 443 444 546 - 853 3 3 443 546 545 - 854 3 3 446 447 547 - 855 3 3 446 547 522 - 856 3 3 447 448 548 - 857 3 3 447 548 547 - 858 3 3 448 449 549 - 859 3 3 448 549 548 - 860 3 3 449 450 550 - 861 3 3 449 550 549 - 862 3 3 450 451 551 - 863 3 3 450 551 550 - 864 3 3 451 452 552 - 865 3 3 451 552 551 - 866 3 3 452 453 553 - 867 3 3 452 553 552 - 868 3 3 453 454 554 - 869 3 3 453 554 553 - 870 3 3 454 455 555 - 871 3 3 454 555 554 - 872 3 3 455 456 556 - 873 3 3 455 556 555 - 874 3 3 459 458 557 - 875 3 3 557 458 523 - 876 3 3 460 459 558 - 877 3 3 558 459 557 - 878 3 3 461 460 559 - 879 3 3 559 460 558 - 880 3 3 462 461 560 - 881 3 3 560 461 559 - 882 3 3 463 462 561 - 883 3 3 561 462 560 - 884 3 3 464 463 562 - 885 3 3 562 463 561 - 886 3 3 465 464 563 - 887 3 3 563 464 562 - 888 3 3 466 465 564 - 889 3 3 564 465 563 - 890 3 3 467 466 565 - 891 3 3 565 466 564 - 892 3 3 468 467 566 - 893 3 3 566 467 565 - 894 3 3 367 473 474 - 895 3 3 478 470 521 - 896 3 3 523 471 476 - 897 3 3 469 522 477 - 898 3 3 524 472 475 - 899 3 3 473 406 567 - 900 3 3 567 406 516 - 901 3 3 418 526 568 - 902 3 3 418 568 515 - 903 3 3 526 525 569 - 904 3 3 526 569 568 - 905 3 3 525 420 569 - 906 3 3 420 518 569 - 907 3 3 517 419 570 - 908 3 3 570 419 474 - 909 3 3 546 444 571 - 910 3 3 571 444 519 - 911 3 3 519 432 572 - 912 3 3 519 572 571 - 913 3 3 432 536 572 - 914 3 3 556 456 573 - 915 3 3 573 456 520 - 916 3 3 520 468 574 - 917 3 3 520 574 573 - 918 3 3 468 566 574 - 919 3 3 522 547 575 - 920 3 3 522 575 477 - 921 3 3 481 477 576 - 922 3 3 576 477 575 - 923 3 3 485 481 577 - 924 3 3 577 481 576 - 925 3 3 489 485 578 - 926 3 3 578 485 577 - 927 3 3 493 489 579 - 928 3 3 579 489 578 - 929 3 3 497 493 580 - 930 3 3 580 493 579 - 931 3 3 501 497 581 - 932 3 3 581 497 580 - 933 3 3 505 501 582 - 934 3 3 582 501 581 - 935 3 3 509 505 583 - 936 3 3 583 505 582 - 937 3 3 513 509 584 - 938 3 3 584 509 583 - 939 3 3 516 513 585 - 940 3 3 585 513 584 - 941 3 3 547 548 586 - 942 3 3 547 586 575 - 943 3 3 548 549 587 - 944 3 3 548 587 586 - 945 3 3 549 550 588 - 946 3 3 549 588 587 - 947 3 3 550 551 589 - 948 3 3 550 589 588 - 949 3 3 551 552 590 - 950 3 3 551 590 589 - 951 3 3 552 553 591 - 952 3 3 552 591 590 - 953 3 3 553 554 592 - 954 3 3 553 592 591 - 955 3 3 554 555 593 - 956 3 3 554 593 592 - 957 3 3 555 556 594 - 958 3 3 555 594 593 - 959 3 3 557 523 595 - 960 3 3 595 523 476 - 961 3 3 476 480 596 - 962 3 3 476 596 595 - 963 3 3 480 484 597 - 964 3 3 480 597 596 - 965 3 3 484 488 598 - 966 3 3 484 598 597 - 967 3 3 488 492 599 - 968 3 3 488 599 598 - 969 3 3 492 496 600 - 970 3 3 492 600 599 - 971 3 3 496 500 601 - 972 3 3 496 601 600 - 973 3 3 500 504 602 - 974 3 3 500 602 601 - 975 3 3 504 507 603 - 976 3 3 504 603 602 - 977 3 3 507 511 604 - 978 3 3 507 604 603 - 979 3 3 511 515 605 - 980 3 3 511 605 604 - 981 3 3 558 557 606 - 982 3 3 606 557 595 - 983 3 3 559 558 607 - 984 3 3 607 558 606 - 985 3 3 560 559 608 - 986 3 3 608 559 607 - 987 3 3 561 560 609 - 988 3 3 609 560 608 - 989 3 3 562 561 610 - 990 3 3 610 561 609 - 991 3 3 563 562 611 - 992 3 3 611 562 610 - 993 3 3 564 563 612 - 994 3 3 612 563 611 - 995 3 3 565 564 613 - 996 3 3 613 564 612 - 997 3 3 566 565 614 - 998 3 3 614 565 613 - 999 3 3 521 537 615 - 1000 3 3 521 615 478 - 1001 3 3 482 478 616 - 1002 3 3 616 478 615 - 1003 3 3 486 482 617 - 1004 3 3 617 482 616 - 1005 3 3 490 486 618 - 1006 3 3 618 486 617 - 1007 3 3 494 490 619 - 1008 3 3 619 490 618 - 1009 3 3 498 494 620 - 1010 3 3 620 494 619 - 1011 3 3 502 498 621 - 1012 3 3 621 498 620 - 1013 3 3 506 502 622 - 1014 3 3 622 502 621 - 1015 3 3 510 506 623 - 1016 3 3 623 506 622 - 1017 3 3 514 510 624 - 1018 3 3 624 510 623 - 1019 3 3 518 514 625 - 1020 3 3 625 514 624 - 1021 3 3 537 538 626 - 1022 3 3 537 626 615 - 1023 3 3 538 539 627 - 1024 3 3 538 627 626 - 1025 3 3 539 540 628 - 1026 3 3 539 628 627 - 1027 3 3 540 541 629 - 1028 3 3 540 629 628 - 1029 3 3 541 542 630 - 1030 3 3 541 630 629 - 1031 3 3 542 543 631 - 1032 3 3 542 631 630 - 1033 3 3 543 544 632 - 1034 3 3 543 632 631 - 1035 3 3 544 545 633 - 1036 3 3 544 633 632 - 1037 3 3 545 546 634 - 1038 3 3 545 634 633 - 1039 3 3 527 524 635 - 1040 3 3 635 524 475 - 1041 3 3 475 479 636 - 1042 3 3 475 636 635 - 1043 3 3 479 483 637 - 1044 3 3 479 637 636 - 1045 3 3 483 487 638 - 1046 3 3 483 638 637 - 1047 3 3 487 491 639 - 1048 3 3 487 639 638 - 1049 3 3 491 495 640 - 1050 3 3 491 640 639 - 1051 3 3 495 499 641 - 1052 3 3 495 641 640 - 1053 3 3 499 503 642 - 1054 3 3 499 642 641 - 1055 3 3 503 508 643 - 1056 3 3 503 643 642 - 1057 3 3 508 512 644 - 1058 3 3 508 644 643 - 1059 3 3 512 517 645 - 1060 3 3 512 645 644 - 1061 3 3 528 527 646 - 1062 3 3 646 527 635 - 1063 3 3 529 528 647 - 1064 3 3 647 528 646 - 1065 3 3 530 529 648 - 1066 3 3 648 529 647 - 1067 3 3 531 530 649 - 1068 3 3 649 530 648 - 1069 3 3 532 531 650 - 1070 3 3 650 531 649 - 1071 3 3 533 532 651 - 1072 3 3 651 532 650 - 1073 3 3 534 533 652 - 1074 3 3 652 533 651 - 1075 3 3 535 534 653 - 1076 3 3 653 534 652 - 1077 3 3 536 535 654 - 1078 3 3 654 535 653 - 1079 3 3 517 570 655 - 1080 3 3 517 655 645 - 1081 3 3 570 474 656 - 1082 3 3 656 474 473 - 1083 3 3 473 567 656 - 1084 3 3 567 516 657 - 1085 3 3 657 516 585 - 1086 3 3 569 518 658 - 1087 3 3 658 518 625 - 1088 3 3 605 515 659 - 1089 3 3 659 515 568 - 1090 3 3 568 569 660 - 1091 3 3 568 660 659 - 1092 3 3 616 615 661 - 1093 3 3 661 615 626 - 1094 3 3 617 616 661 - 1095 3 3 576 575 662 - 1096 3 3 662 575 586 - 1097 3 3 577 576 662 - 1098 3 3 595 596 663 - 1099 3 3 595 663 606 - 1100 3 3 596 597 663 - 1101 3 3 635 636 664 - 1102 3 3 635 664 646 - 1103 3 3 636 637 664 - 1104 3 3 574 566 665 - 1105 3 3 665 566 614 - 1106 3 3 572 536 666 - 1107 3 3 666 536 654 - 1108 3 3 546 571 667 - 1109 3 3 546 667 634 - 1110 3 3 571 572 668 - 1111 3 3 571 668 667 - 1112 3 3 556 573 669 - 1113 3 3 556 669 594 - 1114 3 3 573 574 670 - 1115 3 3 573 670 669 - 1116 3 3 647 646 671 - 1117 3 3 671 646 664 - 1118 3 3 648 647 672 - 1119 3 3 672 647 671 - 1120 3 3 649 648 673 - 1121 3 3 673 648 672 - 1122 3 3 650 649 674 - 1123 3 3 674 649 673 - 1124 3 3 651 650 675 - 1125 3 3 675 650 674 - 1126 3 3 652 651 676 - 1127 3 3 676 651 675 - 1128 3 3 653 652 677 - 1129 3 3 677 652 676 - 1130 3 3 654 653 678 - 1131 3 3 678 653 677 - 1132 3 3 607 606 679 - 1133 3 3 679 606 663 - 1134 3 3 608 607 680 - 1135 3 3 680 607 679 - 1136 3 3 609 608 681 - 1137 3 3 681 608 680 - 1138 3 3 610 609 682 - 1139 3 3 682 609 681 - 1140 3 3 611 610 683 - 1141 3 3 683 610 682 - 1142 3 3 612 611 684 - 1143 3 3 684 611 683 - 1144 3 3 613 612 685 - 1145 3 3 685 612 684 - 1146 3 3 614 613 686 - 1147 3 3 686 613 685 - 1148 3 3 626 627 687 - 1149 3 3 626 687 661 - 1150 3 3 627 628 688 - 1151 3 3 627 688 687 - 1152 3 3 628 629 689 - 1153 3 3 628 689 688 - 1154 3 3 629 630 690 - 1155 3 3 629 690 689 - 1156 3 3 630 631 691 - 1157 3 3 630 691 690 - 1158 3 3 631 632 692 - 1159 3 3 631 692 691 - 1160 3 3 632 633 693 - 1161 3 3 632 693 692 - 1162 3 3 633 634 694 - 1163 3 3 633 694 693 - 1164 3 3 586 587 695 - 1165 3 3 586 695 662 - 1166 3 3 587 588 696 - 1167 3 3 587 696 695 - 1168 3 3 588 589 697 - 1169 3 3 588 697 696 - 1170 3 3 589 590 698 - 1171 3 3 589 698 697 - 1172 3 3 590 591 699 - 1173 3 3 590 699 698 - 1174 3 3 591 592 700 - 1175 3 3 591 700 699 - 1176 3 3 592 593 701 - 1177 3 3 592 701 700 - 1178 3 3 593 594 702 - 1179 3 3 593 702 701 - 1180 3 3 637 638 703 - 1181 3 3 637 703 664 - 1182 3 3 638 639 704 - 1183 3 3 638 704 703 - 1184 3 3 639 640 705 - 1185 3 3 639 705 704 - 1186 3 3 640 641 706 - 1187 3 3 640 706 705 - 1188 3 3 641 642 707 - 1189 3 3 641 707 706 - 1190 3 3 642 643 708 - 1191 3 3 642 708 707 - 1192 3 3 643 644 709 - 1193 3 3 643 709 708 - 1194 3 3 644 645 710 - 1195 3 3 644 710 709 - 1196 3 3 597 598 711 - 1197 3 3 597 711 663 - 1198 3 3 598 599 712 - 1199 3 3 598 712 711 - 1200 3 3 599 600 713 - 1201 3 3 599 713 712 - 1202 3 3 600 601 714 - 1203 3 3 600 714 713 - 1204 3 3 601 602 715 - 1205 3 3 601 715 714 - 1206 3 3 602 603 716 - 1207 3 3 602 716 715 - 1208 3 3 603 604 717 - 1209 3 3 603 717 716 - 1210 3 3 604 605 718 - 1211 3 3 604 718 717 - 1212 3 3 578 577 719 - 1213 3 3 719 577 662 - 1214 3 3 579 578 720 - 1215 3 3 720 578 719 - 1216 3 3 580 579 721 - 1217 3 3 721 579 720 - 1218 3 3 581 580 722 - 1219 3 3 722 580 721 - 1220 3 3 582 581 723 - 1221 3 3 723 581 722 - 1222 3 3 583 582 724 - 1223 3 3 724 582 723 - 1224 3 3 584 583 725 - 1225 3 3 725 583 724 - 1226 3 3 585 584 726 - 1227 3 3 726 584 725 - 1228 3 3 618 617 727 - 1229 3 3 727 617 661 - 1230 3 3 619 618 728 - 1231 3 3 728 618 727 - 1232 3 3 620 619 729 - 1233 3 3 729 619 728 - 1234 3 3 621 620 730 - 1235 3 3 730 620 729 - 1236 3 3 622 621 731 - 1237 3 3 731 621 730 - 1238 3 3 623 622 732 - 1239 3 3 732 622 731 - 1240 3 3 624 623 733 - 1241 3 3 733 623 732 - 1242 3 3 625 624 734 - 1243 3 3 734 624 733 - 1244 3 3 574 665 670 - 1245 3 3 572 666 668 - 1246 3 3 569 658 660 - 1247 3 3 719 662 735 - 1248 3 3 735 662 695 - 1249 3 3 679 663 736 - 1250 3 3 736 663 711 - 1251 3 3 727 661 737 - 1252 3 3 737 661 687 - 1253 3 3 671 664 738 - 1254 3 3 738 664 703 - 1255 3 3 656 567 657 - 1256 3 3 710 645 739 - 1257 3 3 739 645 655 - 1258 3 3 672 671 740 - 1259 3 3 740 671 738 - 1260 3 3 695 696 741 - 1261 3 3 695 741 735 - 1262 3 3 687 688 742 - 1263 3 3 687 742 737 - 1264 3 3 680 679 743 - 1265 3 3 743 679 736 - 1266 3 3 681 680 744 - 1267 3 3 744 680 743 - 1268 3 3 673 672 745 - 1269 3 3 745 672 740 - 1270 3 3 688 689 746 - 1271 3 3 688 746 742 - 1272 3 3 696 697 747 - 1273 3 3 696 747 741 - 1274 3 3 674 673 748 - 1275 3 3 748 673 745 - 1276 3 3 689 690 749 - 1277 3 3 689 749 746 - 1278 3 3 697 698 750 - 1279 3 3 697 750 747 - 1280 3 3 682 681 751 - 1281 3 3 751 681 744 - 1282 3 3 655 570 752 - 1283 3 3 752 570 656 - 1284 3 3 625 734 753 - 1285 3 3 625 753 658 - 1286 3 3 675 674 754 - 1287 3 3 754 674 748 - 1288 3 3 690 691 755 - 1289 3 3 690 755 749 - 1290 3 3 698 699 756 - 1291 3 3 698 756 750 - 1292 3 3 683 682 757 - 1293 3 3 757 682 751 - 1294 3 3 657 585 758 - 1295 3 3 758 585 726 - 1296 3 3 720 719 759 - 1297 3 3 759 719 735 - 1298 3 3 728 727 760 - 1299 3 3 760 727 737 - 1300 3 3 703 704 761 - 1301 3 3 703 761 738 - 1302 3 3 711 712 762 - 1303 3 3 711 762 736 - 1304 3 3 684 683 763 - 1305 3 3 763 683 757 - 1306 3 3 676 675 764 - 1307 3 3 764 675 754 - 1308 3 3 691 692 765 - 1309 3 3 691 765 755 - 1310 3 3 699 700 766 - 1311 3 3 699 766 756 - 1312 3 3 685 684 767 - 1313 3 3 767 684 763 - 1314 3 3 677 676 768 - 1315 3 3 768 676 764 - 1316 3 3 700 701 769 - 1317 3 3 700 769 766 - 1318 3 3 692 693 770 - 1319 3 3 692 770 765 - 1320 3 3 686 685 771 - 1321 3 3 771 685 767 - 1322 3 3 678 677 772 - 1323 3 3 772 677 768 - 1324 3 3 693 694 773 - 1325 3 3 693 773 770 - 1326 3 3 701 702 774 - 1327 3 3 701 774 769 - 1328 3 3 718 605 775 - 1329 3 3 775 605 659 - 1330 3 3 666 654 776 - 1331 3 3 776 654 678 - 1332 3 3 614 686 777 - 1333 3 3 614 777 665 - 1334 3 3 702 594 778 - 1335 3 3 778 594 669 - 1336 3 3 694 634 779 - 1337 3 3 779 634 667 - 1338 3 3 669 670 780 - 1339 3 3 669 780 778 - 1340 3 3 667 668 781 - 1341 3 3 667 781 779 - 1342 3 3 704 705 782 - 1343 3 3 704 782 761 - 1344 3 3 705 706 783 - 1345 3 3 705 783 782 - 1346 3 3 706 707 784 - 1347 3 3 706 784 783 - 1348 3 3 707 708 785 - 1349 3 3 707 785 784 - 1350 3 3 708 709 786 - 1351 3 3 708 786 785 - 1352 3 3 729 728 787 - 1353 3 3 787 728 760 - 1354 3 3 730 729 788 - 1355 3 3 788 729 787 - 1356 3 3 731 730 789 - 1357 3 3 789 730 788 - 1358 3 3 732 731 790 - 1359 3 3 790 731 789 - 1360 3 3 733 732 791 - 1361 3 3 791 732 790 - 1362 3 3 721 720 792 - 1363 3 3 792 720 759 - 1364 3 3 722 721 793 - 1365 3 3 793 721 792 - 1366 3 3 723 722 794 - 1367 3 3 794 722 793 - 1368 3 3 724 723 795 - 1369 3 3 795 723 794 - 1370 3 3 725 724 796 - 1371 3 3 796 724 795 - 1372 3 3 726 725 797 - 1373 3 3 797 725 796 - 1374 3 3 712 713 798 - 1375 3 3 712 798 762 - 1376 3 3 713 714 799 - 1377 3 3 713 799 798 - 1378 3 3 714 715 800 - 1379 3 3 714 800 799 - 1380 3 3 715 716 801 - 1381 3 3 715 801 800 - 1382 3 3 716 717 802 - 1383 3 3 716 802 801 - 1384 3 3 717 718 803 - 1385 3 3 717 803 802 - 1386 3 3 709 710 804 - 1387 3 3 709 804 786 - 1388 3 3 734 733 805 - 1389 3 3 805 733 791 - 1390 3 3 659 660 806 - 1391 3 3 659 806 775 - 1392 3 3 752 656 657 - 1393 3 3 736 762 743 - 1394 3 3 737 742 760 - 1395 3 3 735 741 759 - 1396 3 3 740 738 761 - 1397 3 3 739 655 807 - 1398 3 3 807 655 752 - 1399 3 3 660 658 131 - 1400 3 3 131 658 753 - 1401 3 3 806 660 131 - 1402 3 3 657 758 808 - 1403 3 3 657 808 752 - 1404 3 3 758 726 810 - 1405 3 3 810 726 797 - 1406 3 3 803 718 811 - 1407 3 3 811 718 775 - 1408 3 3 678 772 812 - 1409 3 3 678 812 776 - 1410 3 3 686 771 813 - 1411 3 3 686 813 777 - 1412 3 3 774 702 814 - 1413 3 3 814 702 778 - 1414 3 3 773 694 815 - 1415 3 3 815 694 779 - 1416 3 3 781 668 816 - 1417 3 3 816 668 666 - 1418 3 3 666 776 816 - 1419 3 3 780 670 817 - 1420 3 3 817 670 665 - 1421 3 3 665 777 817 - 1422 3 3 778 780 818 - 1423 3 3 778 818 814 - 1424 3 3 779 781 819 - 1425 3 3 779 819 815 - 1426 3 3 804 710 820 - 1427 3 3 820 710 739 - 1428 3 3 775 806 821 - 1429 3 3 775 821 811 - 1430 3 3 762 798 822 - 1431 3 3 762 822 743 - 1432 3 3 744 743 823 - 1433 3 3 823 743 822 - 1434 3 3 751 744 824 - 1435 3 3 824 744 823 - 1436 3 3 757 751 825 - 1437 3 3 825 751 824 - 1438 3 3 763 757 826 - 1439 3 3 826 757 825 - 1440 3 3 767 763 827 - 1441 3 3 827 763 826 - 1442 3 3 771 767 828 - 1443 3 3 828 767 827 - 1444 3 3 798 799 829 - 1445 3 3 798 829 822 - 1446 3 3 799 800 830 - 1447 3 3 799 830 829 - 1448 3 3 800 801 831 - 1449 3 3 800 831 830 - 1450 3 3 801 802 832 - 1451 3 3 801 832 831 - 1452 3 3 802 803 833 - 1453 3 3 802 833 832 - 1454 3 3 787 760 834 - 1455 3 3 834 760 742 - 1456 3 3 742 746 835 - 1457 3 3 742 835 834 - 1458 3 3 746 749 836 - 1459 3 3 746 836 835 - 1460 3 3 749 755 837 - 1461 3 3 749 837 836 - 1462 3 3 755 765 838 - 1463 3 3 755 838 837 - 1464 3 3 765 770 839 - 1465 3 3 765 839 838 - 1466 3 3 770 773 840 - 1467 3 3 770 840 839 - 1468 3 3 788 787 841 - 1469 3 3 841 787 834 - 1470 3 3 789 788 842 - 1471 3 3 842 788 841 - 1472 3 3 790 789 843 - 1473 3 3 843 789 842 - 1474 3 3 791 790 844 - 1475 3 3 844 790 843 - 1476 3 3 805 791 845 - 1477 3 3 845 791 844 - 1478 3 3 792 759 846 - 1479 3 3 846 759 741 - 1480 3 3 741 747 847 - 1481 3 3 741 847 846 - 1482 3 3 747 750 848 - 1483 3 3 747 848 847 - 1484 3 3 750 756 849 - 1485 3 3 750 849 848 - 1486 3 3 756 766 850 - 1487 3 3 756 850 849 - 1488 3 3 766 769 851 - 1489 3 3 766 851 850 - 1490 3 3 769 774 852 - 1491 3 3 769 852 851 - 1492 3 3 793 792 853 - 1493 3 3 853 792 846 - 1494 3 3 794 793 854 - 1495 3 3 854 793 853 - 1496 3 3 795 794 855 - 1497 3 3 855 794 854 - 1498 3 3 796 795 856 - 1499 3 3 856 795 855 - 1500 3 3 797 796 857 - 1501 3 3 857 796 856 - 1502 3 3 761 782 858 - 1503 3 3 761 858 740 - 1504 3 3 745 740 859 - 1505 3 3 859 740 858 - 1506 3 3 748 745 860 - 1507 3 3 860 745 859 - 1508 3 3 754 748 861 - 1509 3 3 861 748 860 - 1510 3 3 764 754 862 - 1511 3 3 862 754 861 - 1512 3 3 768 764 863 - 1513 3 3 863 764 862 - 1514 3 3 772 768 864 - 1515 3 3 864 768 863 - 1516 3 3 782 783 865 - 1517 3 3 782 865 858 - 1518 3 3 783 784 866 - 1519 3 3 783 866 865 - 1520 3 3 784 785 867 - 1521 3 3 784 867 866 - 1522 3 3 785 786 868 - 1523 3 3 785 868 867 - 1524 3 3 786 804 869 - 1525 3 3 786 869 868 - 1526 3 3 753 734 870 - 1527 3 3 870 734 805 - 1528 3 3 807 752 808 - 1529 3 3 813 771 871 - 1530 3 3 871 771 828 - 1531 3 3 772 864 872 - 1532 3 3 772 872 812 - 1533 3 3 773 815 873 - 1534 3 3 773 873 840 - 1535 3 3 852 774 874 - 1536 3 3 874 774 814 - 1537 3 3 815 819 875 - 1538 3 3 815 875 873 - 1539 3 3 814 818 876 - 1540 3 3 814 876 874 - 1541 3 3 739 807 877 - 1542 3 3 739 877 820 - 1543 3 3 823 822 878 - 1544 3 3 878 822 829 - 1545 3 3 824 823 878 - 1546 3 3 834 835 879 - 1547 3 3 834 879 841 - 1548 3 3 835 836 879 - 1549 3 3 846 847 880 - 1550 3 3 846 880 853 - 1551 3 3 847 848 880 - 1552 3 3 858 865 881 - 1553 3 3 858 881 859 - 1554 3 3 860 859 881 - 1555 3 3 808 758 882 - 1556 3 3 882 758 810 - 1557 3 3 131 753 883 - 1558 3 3 131 883 806 - 1559 3 3 753 870 883 - 1560 3 3 821 806 884 - 1561 3 3 884 806 883 - 1562 3 3 797 857 885 - 1563 3 3 797 885 810 - 1564 3 3 833 803 886 - 1565 3 3 886 803 811 - 1566 3 3 818 780 887 - 1567 3 3 887 780 817 - 1568 3 3 817 777 888 - 1569 3 3 817 888 887 - 1570 3 3 777 813 888 - 1571 3 3 781 816 889 - 1572 3 3 781 889 819 - 1573 3 3 816 776 890 - 1574 3 3 816 890 889 - 1575 3 3 776 812 890 - 1576 3 3 811 821 891 - 1577 3 3 811 891 886 - 1578 3 3 869 804 892 - 1579 3 3 892 804 820 - 1580 3 3 865 866 893 - 1581 3 3 865 893 881 - 1582 3 3 866 867 894 - 1583 3 3 866 894 893 - 1584 3 3 867 868 895 - 1585 3 3 867 895 894 - 1586 3 3 868 869 896 - 1587 3 3 868 896 895 - 1588 3 3 842 841 897 - 1589 3 3 897 841 879 - 1590 3 3 843 842 898 - 1591 3 3 898 842 897 - 1592 3 3 844 843 899 - 1593 3 3 899 843 898 - 1594 3 3 845 844 900 - 1595 3 3 900 844 899 - 1596 3 3 854 853 901 - 1597 3 3 901 853 880 - 1598 3 3 855 854 902 - 1599 3 3 902 854 901 - 1600 3 3 856 855 903 - 1601 3 3 903 855 902 - 1602 3 3 857 856 904 - 1603 3 3 904 856 903 - 1604 3 3 829 830 905 - 1605 3 3 829 905 878 - 1606 3 3 830 831 906 - 1607 3 3 830 906 905 - 1608 3 3 831 832 907 - 1609 3 3 831 907 906 - 1610 3 3 832 833 908 - 1611 3 3 832 908 907 - 1612 3 3 805 845 909 - 1613 3 3 805 909 870 - 1614 3 3 861 860 910 - 1615 3 3 910 860 911 - 1616 3 3 911 860 881 - 1617 3 3 862 861 912 - 1618 3 3 912 861 910 - 1619 3 3 863 862 913 - 1620 3 3 913 862 912 - 1621 3 3 864 863 914 - 1622 3 3 914 863 913 - 1623 3 3 825 824 915 - 1624 3 3 915 824 916 - 1625 3 3 916 824 878 - 1626 3 3 826 825 917 - 1627 3 3 917 825 915 - 1628 3 3 827 826 918 - 1629 3 3 918 826 917 - 1630 3 3 828 827 919 - 1631 3 3 919 827 918 - 1632 3 3 836 837 920 - 1633 3 3 836 920 921 - 1634 3 3 836 921 879 - 1635 3 3 837 838 922 - 1636 3 3 837 922 920 - 1637 3 3 838 839 923 - 1638 3 3 838 923 922 - 1639 3 3 839 840 924 - 1640 3 3 839 924 923 - 1641 3 3 848 849 925 - 1642 3 3 848 925 926 - 1643 3 3 848 926 880 - 1644 3 3 849 850 927 - 1645 3 3 849 927 925 - 1646 3 3 850 851 928 - 1647 3 3 850 928 927 - 1648 3 3 851 852 929 - 1649 3 3 851 929 928 - 1650 3 3 878 905 916 - 1651 3 3 879 921 897 - 1652 3 3 880 926 901 - 1653 3 3 911 881 893 - 1654 3 3 883 870 930 - 1655 3 3 883 930 884 - 1656 3 3 870 909 931 - 1657 3 3 870 931 930 - 1658 3 3 828 919 932 - 1659 3 3 828 932 871 - 1660 3 3 872 864 933 - 1661 3 3 933 864 914 - 1662 3 3 929 852 934 - 1663 3 3 934 852 874 - 1664 3 3 840 873 935 - 1665 3 3 840 935 924 - 1666 3 3 891 821 936 - 1667 3 3 936 821 884 - 1668 3 3 873 875 937 - 1669 3 3 873 937 935 - 1670 3 3 874 876 938 - 1671 3 3 874 938 934 - 1672 3 3 888 813 939 - 1673 3 3 939 813 871 - 1674 3 3 812 872 940 - 1675 3 3 812 940 890 - 1676 3 3 876 818 941 - 1677 3 3 941 818 887 - 1678 3 3 819 889 942 - 1679 3 3 819 942 875 - 1680 3 3 887 888 943 - 1681 3 3 887 943 941 - 1682 3 3 877 807 944 - 1683 3 3 944 807 808 - 1684 3 3 808 882 944 - 1685 3 3 889 890 945 - 1686 3 3 945 890 940 - 1687 3 3 820 877 946 - 1688 3 3 820 946 892 - 1689 3 3 882 810 947 - 1690 3 3 947 810 885 - 1691 3 3 857 904 948 - 1692 3 3 857 948 885 - 1693 3 3 833 886 949 - 1694 3 3 833 949 908 - 1695 3 3 886 891 950 - 1696 3 3 886 950 949 - 1697 3 3 869 892 951 - 1698 3 3 869 951 896 - 1699 3 3 845 900 952 - 1700 3 3 845 952 909 - 1701 3 3 893 894 953 - 1702 3 3 893 953 911 - 1703 3 3 910 911 954 - 1704 3 3 954 911 953 - 1705 3 3 912 910 954 - 1706 3 3 913 912 955 - 1707 3 3 955 912 954 - 1708 3 3 914 913 956 - 1709 3 3 956 913 955 - 1710 3 3 894 895 957 - 1711 3 3 894 957 953 - 1712 3 3 895 896 958 - 1713 3 3 895 958 957 - 1714 3 3 898 897 959 - 1715 3 3 959 897 921 - 1716 3 3 921 920 960 - 1717 3 3 921 960 959 - 1718 3 3 920 922 960 - 1719 3 3 922 923 961 - 1720 3 3 922 961 960 - 1721 3 3 923 924 962 - 1722 3 3 923 962 961 - 1723 3 3 899 898 963 - 1724 3 3 963 898 959 - 1725 3 3 900 899 964 - 1726 3 3 964 899 963 - 1727 3 3 902 901 965 - 1728 3 3 965 901 926 - 1729 3 3 926 925 966 - 1730 3 3 926 966 965 - 1731 3 3 925 927 966 - 1732 3 3 927 928 967 - 1733 3 3 927 967 966 - 1734 3 3 928 929 968 - 1735 3 3 928 968 967 - 1736 3 3 903 902 969 - 1737 3 3 969 902 965 - 1738 3 3 904 903 970 - 1739 3 3 970 903 969 - 1740 3 3 905 906 971 - 1741 3 3 905 971 916 - 1742 3 3 915 916 972 - 1743 3 3 972 916 971 - 1744 3 3 917 915 972 - 1745 3 3 918 917 973 - 1746 3 3 973 917 972 - 1747 3 3 919 918 974 - 1748 3 3 974 918 973 - 1749 3 3 906 907 975 - 1750 3 3 906 975 971 - 1751 3 3 907 908 976 - 1752 3 3 907 976 975 - 1753 3 3 942 889 945 - 1754 3 3 888 939 943 - 1755 3 3 884 930 977 - 1756 3 3 884 977 936 - 1757 3 3 930 931 977 - 1758 3 3 872 933 978 - 1759 3 3 872 978 940 - 1760 3 3 938 876 979 - 1761 3 3 979 876 941 - 1762 3 3 931 909 980 - 1763 3 3 980 909 952 - 1764 3 3 891 936 981 - 1765 3 3 891 981 950 - 1766 3 3 941 943 982 - 1767 3 3 941 982 979 - 1768 3 3 945 940 983 - 1769 3 3 983 940 978 - 1770 3 3 939 871 984 - 1771 3 3 984 871 932 - 1772 3 3 937 875 985 - 1773 3 3 985 875 942 - 1774 3 3 919 974 986 - 1775 3 3 919 986 932 - 1776 3 3 933 914 987 - 1777 3 3 987 914 956 - 1778 3 3 962 924 988 - 1779 3 3 988 924 935 - 1780 3 3 929 934 989 - 1781 3 3 929 989 968 - 1782 3 3 934 938 990 - 1783 3 3 934 990 989 - 1784 3 3 935 937 991 - 1785 3 3 935 991 988 - 1786 3 3 892 946 992 - 1787 3 3 892 992 951 - 1788 3 3 947 885 993 - 1789 3 3 993 885 948 - 1790 3 3 944 882 994 - 1791 3 3 994 882 947 - 1792 3 3 877 944 994 - 1793 3 3 946 877 995 - 1794 3 3 995 877 994 - 1795 3 3 904 970 996 - 1796 3 3 904 996 948 - 1797 3 3 976 908 997 - 1798 3 3 997 908 949 - 1799 3 3 949 950 998 - 1800 3 3 949 998 997 - 1801 3 3 896 951 999 - 1802 3 3 896 999 958 - 1803 3 3 952 900 1000 - 1804 3 3 1000 900 964 - 1805 3 3 954 953 1001 - 1806 3 3 1001 953 957 - 1807 3 3 955 954 1001 - 1808 3 3 972 971 1002 - 1809 3 3 1002 971 975 - 1810 3 3 973 972 1002 - 1811 3 3 969 965 1003 - 1812 3 3 1003 965 966 - 1813 3 3 966 967 1004 - 1814 3 3 966 1004 1003 - 1815 3 3 967 968 1005 - 1816 3 3 967 1005 1004 - 1817 3 3 970 969 1006 - 1818 3 3 1006 969 1003 - 1819 3 3 963 959 1007 - 1820 3 3 1007 959 960 - 1821 3 3 960 961 1008 - 1822 3 3 960 1008 1007 - 1823 3 3 961 962 1009 - 1824 3 3 961 1009 1008 - 1825 3 3 964 963 1010 - 1826 3 3 1010 963 1007 - 1827 3 3 975 976 1011 - 1828 3 3 975 1011 1002 - 1829 3 3 957 958 1012 - 1830 3 3 957 1012 1001 - 1831 3 3 974 973 1013 - 1832 3 3 1013 973 1002 - 1833 3 3 956 955 1014 - 1834 3 3 1014 955 1001 - 1835 3 3 946 995 992 - 1836 3 3 1013 1002 1015 - 1837 3 3 1015 1002 1011 - 1838 3 3 1014 1001 1016 - 1839 3 3 1016 1001 1012 - 1840 3 3 943 939 809 - 1841 3 3 809 939 984 - 1842 3 3 982 943 809 - 1843 3 3 942 945 1018 - 1844 3 3 942 1018 985 - 1845 3 3 945 983 1018 - 1846 3 3 962 988 1017 - 1847 3 3 962 1017 1009 - 1848 3 3 1005 968 1019 - 1849 3 3 1019 968 989 - 1850 3 3 988 991 1020 - 1851 3 3 988 1020 1017 - 1852 3 3 989 990 1021 - 1853 3 3 989 1021 1019 - 1854 3 3 1003 1004 1022 - 1855 3 3 1003 1022 1006 - 1856 3 3 1004 1005 1022 - 1857 3 3 1010 1007 1023 - 1858 3 3 1023 1007 1008 - 1859 3 3 1008 1009 1024 - 1860 3 3 1008 1024 1023 - 1861 3 3 931 980 1025 - 1862 3 3 931 1025 977 - 1863 3 3 998 950 1026 - 1864 3 3 1026 950 981 - 1865 3 3 980 952 1027 - 1866 3 3 1027 952 1000 - 1867 3 3 994 947 1028 - 1868 3 3 1028 947 993 - 1869 3 3 995 994 1029 - 1870 3 3 1029 994 1028 - 1871 3 3 936 977 1030 - 1872 3 3 936 1030 981 - 1873 3 3 978 933 1031 - 1874 3 3 1031 933 987 - 1875 3 3 938 979 1032 - 1876 3 3 938 1032 990 - 1877 3 3 948 996 1033 - 1878 3 3 948 1033 993 - 1879 3 3 999 951 1034 - 1880 3 3 1034 951 992 - 1881 3 3 970 1006 1035 - 1882 3 3 970 1035 996 - 1883 3 3 1000 964 1036 - 1884 3 3 1036 964 1010 - 1885 3 3 1011 976 1037 - 1886 3 3 1037 976 997 - 1887 3 3 997 998 1038 - 1888 3 3 997 1038 1037 - 1889 3 3 1012 958 1039 - 1890 3 3 1039 958 999 - 1891 3 3 979 982 1040 - 1892 3 3 979 1040 1032 - 1893 3 3 987 956 1041 - 1894 3 3 1041 956 1014 - 1895 3 3 974 1013 1042 - 1896 3 3 974 1042 986 - 1897 3 3 983 978 1043 - 1898 3 3 1043 978 1031 - 1899 3 3 932 986 1044 - 1900 3 3 932 1044 984 - 1901 3 3 937 985 1045 - 1902 3 3 937 1045 991 - 1903 3 3 977 1025 1030 - 1904 3 3 1024 1009 1046 - 1905 3 3 1046 1009 1017 - 1906 3 3 809 984 1047 - 1907 3 3 809 1047 982 - 1908 3 3 984 1044 1047 - 1909 3 3 1040 982 1047 - 1910 3 3 1018 983 1048 - 1911 3 3 1018 1048 985 - 1912 3 3 1045 985 1048 - 1913 3 3 983 1043 1048 - 1914 3 3 1017 1020 1049 - 1915 3 3 1017 1049 1046 - 1916 3 3 1021 990 1050 - 1917 3 3 1050 990 1032 - 1918 3 3 1032 1040 1051 - 1919 3 3 1032 1051 1050 - 1920 3 3 998 1026 1052 - 1921 3 3 998 1052 1038 - 1922 3 3 1020 991 1053 - 1923 3 3 1053 991 1045 - 1924 3 3 1035 1006 1054 - 1925 3 3 1054 1006 1022 - 1926 3 3 981 1030 1055 - 1927 3 3 981 1055 1026 - 1928 3 3 993 1033 1056 - 1929 3 3 993 1056 1028 - 1930 3 3 1029 1028 1057 - 1931 3 3 1057 1028 1056 - 1932 3 3 1000 1036 1058 - 1933 3 3 1000 1058 1027 - 1934 3 3 1011 1037 1059 - 1935 3 3 1011 1059 1015 - 1936 3 3 1012 1039 1060 - 1937 3 3 1012 1060 1016 - 1938 3 3 1031 987 1061 - 1939 3 3 1061 987 1041 - 1940 3 3 992 995 1062 - 1941 3 3 1062 995 1029 - 1942 3 3 1034 992 1062 - 1943 3 3 1043 1031 1063 - 1944 3 3 1063 1031 1061 - 1945 3 3 1036 1010 1064 - 1946 3 3 1064 1010 1023 - 1947 3 3 1023 1024 1064 - 1948 3 3 1025 980 1065 - 1949 3 3 1065 980 1027 - 1950 3 3 996 1035 1066 - 1951 3 3 996 1066 1033 - 1952 3 3 999 1034 1067 - 1953 3 3 999 1067 1039 - 1954 3 3 1037 1038 1068 - 1955 3 3 1037 1068 1059 - 1956 3 3 1044 986 1069 - 1957 3 3 1069 986 1042 - 1958 3 3 1013 1015 1070 - 1959 3 3 1013 1070 1042 - 1960 3 3 1041 1014 1071 - 1961 3 3 1071 1014 1016 - 1962 3 3 1022 1005 1072 - 1963 3 3 1072 1005 1019 - 1964 3 3 1019 1021 1073 - 1965 3 3 1019 1073 1072 - 1966 3 3 1070 1015 1059 - 1967 3 3 1016 1060 1071 - 1968 3 3 1029 1057 1074 - 1969 3 3 1029 1074 1062 - 1970 3 3 1022 1072 1075 - 1971 3 3 1022 1075 1054 - 1972 3 3 1065 1027 1076 - 1973 3 3 1076 1027 1058 - 1974 3 3 1055 1030 1077 - 1975 3 3 1077 1030 1025 - 1976 3 3 1025 1065 1077 - 1977 3 3 1049 1020 1078 - 1978 3 3 1078 1020 1053 - 1979 3 3 1068 1038 1079 - 1980 3 3 1079 1038 1052 - 1981 3 3 1035 1054 1080 - 1982 3 3 1035 1080 1066 - 1983 3 3 1056 1033 1081 - 1984 3 3 1081 1033 1066 - 1985 3 3 1057 1056 1082 - 1986 3 3 1082 1056 1081 - 1987 3 3 1021 1050 1083 - 1988 3 3 1021 1083 1073 - 1989 3 3 1036 1064 1084 - 1990 3 3 1036 1084 1058 - 1991 3 3 1039 1067 1085 - 1992 3 3 1039 1085 1060 - 1993 3 3 1034 1062 1086 - 1994 3 3 1086 1062 1074 - 1995 3 3 1067 1034 1086 - 1996 3 3 1024 1046 1087 - 1997 3 3 1024 1087 1064 - 1998 3 3 1046 1049 1088 - 1999 3 3 1046 1088 1087 - 2000 3 3 1041 1071 1089 - 2001 3 3 1041 1089 1061 - 2002 3 3 1063 1061 1090 - 2003 3 3 1090 1061 1089 - 2004 3 3 1069 1042 1091 - 2005 3 3 1091 1042 1070 - 2006 3 3 1052 1026 1092 - 2007 3 3 1092 1026 1055 - 2008 3 3 1059 1068 1093 - 2009 3 3 1059 1093 1070 - 2010 3 3 1050 1051 1094 - 2011 3 3 1050 1094 1083 - 2012 3 3 1072 1073 1095 - 2013 3 3 1072 1095 1075 - 2014 3 3 1047 1044 1096 - 2015 3 3 1047 1096 1040 - 2016 3 3 1051 1040 1097 - 2017 3 3 1097 1040 1096 - 2018 3 3 1044 1069 1098 - 2019 3 3 1044 1098 1096 - 2020 3 3 1043 1063 1099 - 2021 3 3 1043 1099 1048 - 2022 3 3 1045 1048 1100 - 2023 3 3 1100 1048 1099 - 2024 3 3 1053 1045 1100 - 2025 3 3 1094 1051 1097 - 2026 3 3 1064 1087 1101 - 2027 3 3 1064 1101 1084 - 2028 3 3 1091 1070 1102 - 2029 3 3 1102 1070 1093 - 2030 3 3 1080 1054 1103 - 2031 3 3 1103 1054 1075 - 2032 3 3 1075 1095 1103 - 2033 3 3 1097 1096 1104 - 2034 3 3 1104 1096 1098 - 2035 3 3 1076 1058 1105 - 2036 3 3 1105 1058 1084 - 2037 3 3 1052 1092 1106 - 2038 3 3 1052 1106 1079 - 2039 3 3 1087 1088 1107 - 2040 3 3 1087 1107 1101 - 2041 3 3 1074 1057 1108 - 2042 3 3 1108 1057 1082 - 2043 3 3 1086 1074 1109 - 2044 3 3 1109 1074 1108 - 2045 3 3 1069 1091 1110 - 2046 3 3 1069 1110 1098 - 2047 3 3 1077 1065 1111 - 2048 3 3 1111 1065 1076 - 2049 3 3 1078 1053 1112 - 2050 3 3 1112 1053 1100 - 2051 3 3 1100 1099 1113 - 2052 3 3 1100 1113 1112 - 2053 3 3 1099 1063 1114 - 2054 3 3 1099 1114 1113 - 2055 3 3 1063 1090 1114 - 2056 3 3 1092 1055 1115 - 2057 3 3 1115 1055 1077 - 2058 3 3 1066 1080 1116 - 2059 3 3 1066 1116 1081 - 2060 3 3 1082 1081 1117 - 2061 3 3 1117 1081 1116 - 2062 3 3 1093 1068 1118 - 2063 3 3 1118 1068 1079 - 2064 3 3 1073 1083 1119 - 2065 3 3 1073 1119 1095 - 2066 3 3 1083 1094 1120 - 2067 3 3 1083 1120 1119 - 2068 3 3 1085 1067 1121 - 2069 3 3 1121 1067 1086 - 2070 3 3 1071 1060 1122 - 2071 3 3 1122 1060 1085 - 2072 3 3 1089 1071 1123 - 2073 3 3 1123 1071 1122 - 2074 3 3 1090 1089 1124 - 2075 3 3 1124 1089 1123 - 2076 3 3 1049 1078 1125 - 2077 3 3 1049 1125 1088 - 2078 3 3 1077 1111 1115 - 2079 3 3 1098 1110 1104 - 2080 3 3 1086 1109 1126 - 2081 3 3 1086 1126 1121 - 2082 3 3 1105 1084 1101 - 2083 3 3 1080 1103 1127 - 2084 3 3 1080 1127 1116 - 2085 3 3 1117 1116 1128 - 2086 3 3 1128 1116 1127 - 2087 3 3 1101 1107 1129 - 2088 3 3 1101 1129 1105 - 2089 3 3 1108 1082 1130 - 2090 3 3 1130 1082 1117 - 2091 3 3 1118 1079 1131 - 2092 3 3 1131 1079 1106 - 2093 3 3 1111 1076 1132 - 2094 3 3 1132 1076 1105 - 2095 3 3 1125 1078 1133 - 2096 3 3 1133 1078 1112 - 2097 3 3 1097 1104 1134 - 2098 3 3 1097 1134 1094 - 2099 3 3 1120 1094 1135 - 2100 3 3 1135 1094 1134 - 2101 3 3 1107 1088 1136 - 2102 3 3 1136 1088 1125 - 2103 3 3 1092 1115 1137 - 2104 3 3 1092 1137 1106 - 2105 3 3 1112 1113 1138 - 2106 3 3 1112 1138 1133 - 2107 3 3 1113 1114 1139 - 2108 3 3 1113 1139 1138 - 2109 3 3 1114 1090 1140 - 2110 3 3 1114 1140 1139 - 2111 3 3 1090 1124 1140 - 2112 3 3 1109 1108 1141 - 2113 3 3 1141 1108 1130 - 2114 3 3 1091 1102 1142 - 2115 3 3 1091 1142 1110 - 2116 3 3 1085 1121 1143 - 2117 3 3 1085 1143 1122 - 2118 3 3 1123 1122 1144 - 2119 3 3 1144 1122 1143 - 2120 3 3 1124 1123 1145 - 2121 3 3 1145 1123 1144 - 2122 3 3 1102 1093 1146 - 2123 3 3 1146 1093 1118 - 2124 3 3 1103 1095 1147 - 2125 3 3 1103 1147 1127 - 2126 3 3 1095 1119 1148 - 2127 3 3 1095 1148 1147 - 2128 3 3 1119 1120 1149 - 2129 3 3 1119 1149 1148 - 2130 3 3 1126 1109 1141 - 2131 3 3 1142 1102 1146 - 2132 3 3 1105 1129 1132 - 2133 3 3 1140 1124 1150 - 2134 3 3 1150 1124 1145 - 2135 3 3 1139 1140 1151 - 2136 3 3 1151 1140 1150 - 2137 3 3 1117 1128 1152 - 2138 3 3 1117 1152 1130 - 2139 3 3 1138 1139 1153 - 2140 3 3 1153 1139 1151 - 2141 3 3 1133 1138 1154 - 2142 3 3 1154 1138 1153 - 2143 3 3 1125 1133 1154 - 2144 3 3 1136 1125 1155 - 2145 3 3 1155 1125 1154 - 2146 3 3 1120 1135 1156 - 2147 3 3 1120 1156 1149 - 2148 3 3 1143 1121 1157 - 2149 3 3 1157 1121 1126 - 2150 3 3 1115 1111 1158 - 2151 3 3 1115 1158 1137 - 2152 3 3 1111 1132 1158 - 2153 3 3 1146 1118 1159 - 2154 3 3 1159 1118 1131 - 2155 3 3 1128 1127 1160 - 2156 3 3 1160 1127 1147 - 2157 3 3 1147 1148 1161 - 2158 3 3 1147 1161 1160 - 2159 3 3 1148 1149 1162 - 2160 3 3 1148 1162 1161 - 2161 3 3 1141 1130 1163 - 2162 3 3 1163 1130 1152 - 2163 3 3 1144 1143 1164 - 2164 3 3 1164 1143 1157 - 2165 3 3 1145 1144 1165 - 2166 3 3 1165 1144 1164 - 2167 3 3 1106 1137 1166 - 2168 3 3 1106 1166 1131 - 2169 3 3 1104 1110 1167 - 2170 3 3 1167 1110 1142 - 2171 3 3 1134 1104 1167 - 2172 3 3 1129 1107 1168 - 2173 3 3 1168 1107 1136 - 2174 3 3 1135 1134 1169 - 2175 3 3 1169 1134 1167 - 2176 3 3 1149 1156 1162 - 2177 3 3 1136 1155 1170 - 2178 3 3 1136 1170 1168 - 2179 3 3 1135 1169 1171 - 2180 3 3 1135 1171 1156 - 2181 3 3 1128 1160 1172 - 2182 3 3 1128 1172 1152 - 2183 3 3 1160 1161 1173 - 2184 3 3 1160 1173 1172 - 2185 3 3 1161 1162 1174 - 2186 3 3 1161 1174 1173 - 2187 3 3 1145 1165 1175 - 2188 3 3 1145 1175 1150 - 2189 3 3 1151 1150 1175 - 2190 3 3 1126 1141 1176 - 2191 3 3 1126 1176 1157 - 2192 3 3 1141 1163 1176 - 2193 3 3 1164 1157 1177 - 2194 3 3 1177 1157 1176 - 2195 3 3 1165 1164 1177 - 2196 3 3 1137 1158 1178 - 2197 3 3 1137 1178 1166 - 2198 3 3 1158 1132 1179 - 2199 3 3 1158 1179 1178 - 2200 3 3 1132 1129 1180 - 2201 3 3 1132 1180 1179 - 2202 3 3 1129 1168 1180 - 2203 3 3 1163 1152 1181 - 2204 3 3 1181 1152 1172 - 2205 3 3 1131 1166 1182 - 2206 3 3 1131 1182 1159 - 2207 3 3 1167 1142 1183 - 2208 3 3 1183 1142 1146 - 2209 3 3 1146 1159 1184 - 2210 3 3 1146 1184 1183 - 2211 3 3 1169 1167 1185 - 2212 3 3 1185 1167 1183 - 2213 3 3 1153 1151 1186 - 2214 3 3 1186 1151 1175 - 2215 3 3 1154 1153 1187 - 2216 3 3 1187 1153 1186 - 2217 3 3 1155 1154 1187 - 2218 3 3 1159 1182 1184 - 2219 3 3 1155 1187 1188 - 2220 3 3 1155 1188 1170 - 2221 3 3 1171 1169 1189 - 2222 3 3 1189 1169 1185 - 2223 3 3 1176 1163 1190 - 2224 3 3 1176 1190 1177 - 2225 3 3 1163 1181 1190 - 2226 3 3 1162 1156 1191 - 2227 3 3 1162 1191 1174 - 2228 3 3 1156 1171 1191 - 2229 3 3 1166 1178 1192 - 2230 3 3 1166 1192 1182 - 2231 3 3 1181 1172 1193 - 2232 3 3 1193 1172 1173 - 2233 3 3 1173 1174 1194 - 2234 3 3 1173 1194 1193 - 2235 3 3 1180 1168 1195 - 2236 3 3 1195 1168 1170 - 2237 3 3 1183 1184 1196 - 2238 3 3 1183 1196 1185 - 2239 3 3 1175 1165 1197 - 2240 3 3 1197 1165 1177 - 2241 3 3 1186 1175 1198 - 2242 3 3 1198 1175 1197 - 2243 3 3 1179 1180 1199 - 2244 3 3 1199 1180 1195 - 2245 3 3 1178 1179 1199 - 2246 3 3 1187 1186 1200 - 2247 3 3 1200 1186 1198 - 2248 3 3 1185 1196 1189 - 2249 3 3 1178 1199 1192 - 2250 3 3 1188 1187 1201 - 2251 3 3 1201 1187 1200 - 2252 3 3 1177 1190 1202 - 2253 3 3 1177 1202 1197 - 2254 3 3 1190 1181 255 - 2255 3 3 1190 255 1202 - 2256 3 3 1181 1193 255 - 2257 3 3 1198 1197 1203 - 2258 3 3 1203 1197 1202 - 2259 3 3 1200 1198 1205 - 2260 3 3 1205 1198 1203 - 2261 3 3 1196 1184 1206 - 2262 3 3 1206 1184 1182 - 2263 3 3 1182 1192 1207 - 2264 3 3 1182 1207 1206 - 2265 3 3 1193 1194 1208 - 2266 3 3 1193 1208 255 - 2267 3 3 1170 1188 1209 - 2268 3 3 1170 1209 1195 - 2269 3 3 1199 1195 1210 - 2270 3 3 1210 1195 1209 - 2271 3 3 1191 1171 1211 - 2272 3 3 1211 1171 1189 - 2273 3 3 1194 1174 1212 - 2274 3 3 1212 1174 1191 - 2275 3 3 1212 1191 1211 - 2276 3 3 1209 1188 1201 - 2277 3 3 1202 255 1208 - 2278 3 3 1203 1202 1208 - 2279 3 3 1192 1199 1204 - 2280 3 3 1204 1199 1210 - 2281 3 3 1207 1192 1204 - 2282 3 3 1205 1203 1213 - 2283 3 3 1213 1203 1208 - 2284 3 3 1208 1194 1213 - 2285 3 3 1194 1212 1213 - 2286 3 3 1200 1205 1215 - 2287 3 3 1200 1215 1201 - 2288 3 3 1210 1209 1216 - 2289 3 3 1216 1209 1201 - 2290 3 3 1196 1206 1217 - 2291 3 3 1196 1217 1189 - 2292 3 3 1211 1189 1217 - 2293 3 3 1206 1207 1218 - 2294 3 3 1206 1218 1217 - 2295 3 3 1216 1201 1215 - 2296 3 3 1205 1213 1219 - 2297 3 3 1205 1219 1215 - 2298 3 3 1213 1212 1220 - 2299 3 3 1213 1220 1219 - 2300 3 3 1212 1211 1220 - 2301 3 3 1211 1217 1220 - 2302 3 3 1217 1218 1220 - 2303 3 3 1207 1204 1218 - 2304 3 3 1204 1210 1214 - 2305 3 3 1204 1214 1218 - 2306 3 3 1210 1216 1214 - 2307 3 3 1220 1218 1219 - 2308 3 3 1216 1215 1219 - 2309 3 3 1218 1214 1216 - 2310 3 3 1218 1216 1219 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 2310 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 729 730 - 731 732 733 734 735 736 737 738 739 740 - 741 742 743 744 745 746 747 748 749 750 - 751 752 753 754 755 756 757 758 759 760 - 761 762 763 764 765 766 767 768 769 770 - 771 772 773 774 775 776 777 778 779 780 - 781 782 783 784 785 786 787 788 789 790 - 791 792 793 794 795 796 797 798 799 800 - 801 802 803 804 805 806 807 808 809 810 - 811 812 813 814 815 816 817 818 819 820 - 821 822 823 824 825 826 827 828 829 830 - 831 832 833 834 835 836 837 838 839 840 - 841 842 843 844 845 846 847 848 849 850 - 851 852 853 854 855 856 857 858 859 860 - 861 862 863 864 865 866 867 868 869 870 - 871 872 873 874 875 876 877 878 879 880 - 881 882 883 884 885 886 887 888 889 890 - 891 892 893 894 895 896 897 898 899 900 - 901 902 903 904 905 906 907 908 909 910 - 911 912 913 914 915 916 917 918 919 920 - 921 922 923 924 925 926 927 928 929 930 - 931 932 933 934 935 936 937 938 939 940 - 941 942 943 944 945 946 947 948 949 950 - 951 952 953 954 955 956 957 958 959 960 - 961 962 963 964 965 966 967 968 969 970 - 971 972 973 974 975 976 977 978 979 980 - 981 982 983 984 985 986 987 988 989 990 - 991 992 993 994 995 996 997 998 999 1000 - 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 - 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 - 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 - 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 - 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 - 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 - 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 - 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 - 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 - 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 - 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 - 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 - 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 - 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 - 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 - 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 - 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 - 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 - 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 - 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 - 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 - 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 - 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 - 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 - 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 - 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 - 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 - 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 - 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 - 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 - 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 - 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 - 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 - 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 - 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 - 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 - 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 - 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 - 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 - 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 - 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 - 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 - 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 - 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 - 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 - 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 - 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 - 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 - 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 - 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 - 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 - 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 - 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 - 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 - 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 - 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 - 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 - 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 - 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 - 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 - 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 - 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 - 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 - 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 - 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 - 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 - 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 - 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 - 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 - 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 - 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 - 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 - 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 - 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 - 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 - 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 - 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 - 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 - 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 - 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 - 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 - 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 - 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 - 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 - 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 - 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 - 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 - 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 - 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 - 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 - 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 - 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 - 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 - 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 - 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 - 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 - 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 - 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 - 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 - 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 - 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 - 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 - 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 - 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 - 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 - 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 - 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 - 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 - 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 - 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 - 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 - 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 - 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 - 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 - 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 - 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 - 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 - 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 - 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 - 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 - 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 - 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 - 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 - 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 - 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 - 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 - 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 - 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 - 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 - 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 - 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell0125.neu b/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell0125.neu deleted file mode 100644 index c5fe332..0000000 --- a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell0125.neu +++ /dev/null @@ -1,959 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:47:18 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 317 568 1 0 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 -1.00000000000e+00 -1.00000000000e+00 - 2 1.00000000000e+00 -1.00000000000e+00 - 3 -8.75000000000e-01 -1.00000000000e+00 - 4 -7.50000000000e-01 -1.00000000000e+00 - 5 -6.25000000000e-01 -1.00000000000e+00 - 6 -5.00000000000e-01 -1.00000000000e+00 - 7 -3.75000000000e-01 -1.00000000000e+00 - 8 -2.50000000000e-01 -1.00000000000e+00 - 9 -1.25000000000e-01 -1.00000000000e+00 - 10 0.00000000000e+00 -1.00000000000e+00 - 11 1.25000000000e-01 -1.00000000000e+00 - 12 2.50000000000e-01 -1.00000000000e+00 - 13 3.75000000000e-01 -1.00000000000e+00 - 14 5.00000000000e-01 -1.00000000000e+00 - 15 6.25000000000e-01 -1.00000000000e+00 - 16 7.50000000000e-01 -1.00000000000e+00 - 17 8.75000000000e-01 -1.00000000000e+00 - 18 1.00000000000e+00 1.00000000000e+00 - 19 1.00000000000e+00 -8.75000000000e-01 - 20 1.00000000000e+00 -7.50000000000e-01 - 21 1.00000000000e+00 -6.25000000000e-01 - 22 1.00000000000e+00 -5.00000000000e-01 - 23 1.00000000000e+00 -3.75000000000e-01 - 24 1.00000000000e+00 -2.50000000000e-01 - 25 1.00000000000e+00 -1.25000000000e-01 - 26 1.00000000000e+00 0.00000000000e+00 - 27 1.00000000000e+00 1.25000000000e-01 - 28 1.00000000000e+00 2.50000000000e-01 - 29 1.00000000000e+00 3.75000000000e-01 - 30 1.00000000000e+00 5.00000000000e-01 - 31 1.00000000000e+00 6.25000000000e-01 - 32 1.00000000000e+00 7.50000000000e-01 - 33 1.00000000000e+00 8.75000000000e-01 - 34 -1.00000000000e+00 1.00000000000e+00 - 35 8.75000000000e-01 1.00000000000e+00 - 36 7.50000000000e-01 1.00000000000e+00 - 37 6.25000000000e-01 1.00000000000e+00 - 38 5.00000000000e-01 1.00000000000e+00 - 39 3.75000000000e-01 1.00000000000e+00 - 40 2.50000000000e-01 1.00000000000e+00 - 41 1.25000000000e-01 1.00000000000e+00 - 42 0.00000000000e+00 1.00000000000e+00 - 43 -1.25000000000e-01 1.00000000000e+00 - 44 -2.50000000000e-01 1.00000000000e+00 - 45 -3.75000000000e-01 1.00000000000e+00 - 46 -5.00000000000e-01 1.00000000000e+00 - 47 -6.25000000000e-01 1.00000000000e+00 - 48 -7.50000000000e-01 1.00000000000e+00 - 49 -8.75000000000e-01 1.00000000000e+00 - 50 -1.00000000000e+00 8.75000000000e-01 - 51 -1.00000000000e+00 7.50000000000e-01 - 52 -1.00000000000e+00 6.25000000000e-01 - 53 -1.00000000000e+00 5.00000000000e-01 - 54 -1.00000000000e+00 3.75000000000e-01 - 55 -1.00000000000e+00 2.50000000000e-01 - 56 -1.00000000000e+00 1.25000000000e-01 - 57 -1.00000000000e+00 0.00000000000e+00 - 58 -1.00000000000e+00 -1.25000000000e-01 - 59 -1.00000000000e+00 -2.50000000000e-01 - 60 -1.00000000000e+00 -3.75000000000e-01 - 61 -1.00000000000e+00 -5.00000000000e-01 - 62 -1.00000000000e+00 -6.25000000000e-01 - 63 -1.00000000000e+00 -7.50000000000e-01 - 64 -1.00000000000e+00 -8.75000000000e-01 - 65 -9.12241569506e-01 -9.13268199755e-01 - 66 -9.17262022984e-01 6.15895067485e-02 - 67 9.12053708531e-01 -9.13182012857e-01 - 68 9.11634610278e-01 9.13049236545e-01 - 69 -9.13099688558e-01 9.11658684336e-01 - 70 -8.79018518937e-01 -7.99619000335e-01 - 71 8.04133979728e-01 -8.97379433378e-01 - 72 8.77360999309e-01 7.99066900953e-01 - 73 8.02925261632e-01 8.96960981976e-01 - 74 8.78584616076e-01 -7.99381257259e-01 - 75 -8.04494540152e-01 -8.97499812322e-01 - 76 -7.99228350319e-01 8.77471070564e-01 - 77 -8.97103055492e-01 8.03019052668e-01 - 78 -8.94089413681e-01 -6.72080542219e-01 - 79 6.77889089859e-01 8.91112210556e-01 - 80 -6.80778529142e-01 -8.91980797938e-01 - 81 8.93527921378e-01 -6.71552934272e-01 - 82 -6.71678215339e-01 8.92350162425e-01 - 83 6.80264639874e-01 -8.91932418400e-01 - 84 -8.91338982062e-01 6.77995314484e-01 - 85 8.92178492097e-01 6.71377270365e-01 - 86 -8.93718507209e-01 -5.49179295846e-01 - 87 5.50940531454e-01 8.87842285084e-01 - 88 -8.88169597037e-01 5.51016224539e-01 - 89 -5.55585193235e-01 -8.88802142128e-01 - 90 8.93213035060e-01 -5.48129868365e-01 - 91 -5.48748959774e-01 8.91920581963e-01 - 92 5.55107819953e-01 -8.89137382144e-01 - 93 8.91728321202e-01 5.48259958730e-01 - 94 -8.93148780116e-01 -4.24539539944e-01 - 95 -8.88152378079e-01 4.22963189790e-01 - 96 4.23016461707e-01 8.87722645440e-01 - 97 8.93100084379e-01 -4.22637114694e-01 - 98 -4.24084749704e-01 8.91593540150e-01 - 99 -4.30024616756e-01 -8.88160221030e-01 - 100 4.29988256672e-01 -8.89449482489e-01 - 101 8.91377278930e-01 4.23287661487e-01 - 102 -8.92768016741e-01 -2.98514914123e-01 - 103 3.06079939728e-01 -8.91649861299e-01 - 104 -8.90550026502e-01 2.94526714526e-01 - 105 2.94776118563e-01 8.90027361628e-01 - 106 -3.05198608782e-01 -8.88824378724e-01 - 107 8.93946676186e-01 -2.95595995578e-01 - 108 -2.98041062937e-01 8.91568998050e-01 - 109 8.91382868896e-01 2.96861698296e-01 - 110 -8.96953960232e-01 1.67687769021e-01 - 111 1.68065272248e-01 8.96370717231e-01 - 112 8.98451638980e-01 -1.69408874031e-01 - 113 1.83751189799e-01 -8.95344927569e-01 - 114 -8.93697967529e-01 -1.71292026910e-01 - 115 -1.81567630106e-01 -8.91068333345e-01 - 116 -1.70798068969e-01 8.92821214627e-01 - 117 8.92813437012e-01 1.69283608508e-01 - 118 -5.95246811396e-02 -8.94858185355e-01 - 119 -8.98216162309e-01 -4.49634229898e-02 - 120 -4.44830272578e-02 8.97521846757e-01 - 121 8.97989783569e-01 4.28962333862e-02 - 122 7.40172117998e-01 -7.88911115507e-01 - 123 6.20698160137e-02 -8.97221354242e-01 - 124 9.17695941705e-01 -6.31199718662e-02 - 125 6.18994128017e-02 9.16777731792e-01 - 126 7.94191965616e-01 -7.05016571750e-01 - 127 7.86453770965e-01 -5.97469924359e-01 - 128 7.86699826378e-01 -4.73397707511e-01 - 129 7.86620164592e-01 -3.45114990002e-01 - 130 7.90016302965e-01 -2.11236644994e-01 - 131 8.04727701799e-01 -6.42142286035e-02 - 132 6.12466581479e-01 -7.78355025219e-01 - 133 4.84140732483e-01 -7.77413821354e-01 - 134 3.58761372278e-01 -7.79541088436e-01 - 135 2.36289528574e-01 -7.85790985493e-01 - 136 1.19527628051e-01 -7.94886594550e-01 - 137 7.37129150506e-01 7.87976188391e-01 - 138 7.91396517260e-01 7.04385689706e-01 - 139 7.83312662811e-01 5.97081104329e-01 - 140 7.83366583744e-01 4.73708917822e-01 - 141 7.82646775000e-01 3.47112468272e-01 - 142 7.83576807964e-01 2.17396209231e-01 - 143 7.88479113807e-01 8.27569839017e-02 - 144 6.06912731040e-01 7.76626053577e-01 - 145 4.74828117192e-01 7.74769985142e-01 - 146 3.42990645387e-01 7.76533740978e-01 - 147 2.07622681182e-01 7.84293361887e-01 - 148 6.06122942018e-02 8.02721833581e-01 - 149 -7.41105069235e-01 -7.89294635603e-01 - 150 -7.95220225443e-01 -7.05718138091e-01 - 151 -7.87556012497e-01 -5.98842444885e-01 - 152 -7.87317055435e-01 -4.76106836448e-01 - 153 -7.85868193181e-01 -3.50301264653e-01 - 154 -7.85894122065e-01 -2.21464101463e-01 - 155 -7.89728598825e-01 -8.75041401819e-02 - 156 -6.13736024136e-01 -7.78464365097e-01 - 157 -4.85402764173e-01 -7.76454408814e-01 - 158 -3.59070609584e-01 -7.76059413474e-01 - 159 -2.34195126759e-01 -7.78559806548e-01 - 160 -1.12508296380e-01 -7.84251521356e-01 - 161 -7.88392386502e-01 7.37302465791e-01 - 162 -7.04887943975e-01 7.91588931302e-01 - 163 -5.97939330010e-01 7.83550345742e-01 - 164 -4.75130759483e-01 7.83634804540e-01 - 165 -3.49253395392e-01 7.82896638007e-01 - 166 -2.20347934605e-01 7.83698320336e-01 - 167 -8.64345997532e-02 7.88086396861e-01 - 168 -7.77315759830e-01 6.07028024154e-01 - 169 -7.75750147906e-01 4.74741533892e-01 - 170 -7.77742934191e-01 3.42583741846e-01 - 171 -7.85624514858e-01 2.06911021558e-01 - 172 -8.04073252980e-01 5.97136177054e-02 - 173 3.92014299675e-03 -7.94152920668e-01 - 174 6.70949009190e-01 6.62233977611e-01 - 175 -6.63309990103e-01 6.71100534272e-01 - 176 6.76105767551e-01 -6.63693978393e-01 - 177 -6.77784703376e-01 -6.64658792241e-01 - 178 -6.65033928606e-01 5.29964971853e-01 - 179 -6.61520735226e-01 3.96443772152e-01 - 180 -6.69353354485e-01 2.61211892306e-01 - 181 5.38574903084e-01 -6.66453180018e-01 - 182 4.10266781871e-01 -6.63847573004e-01 - 183 2.83139438481e-01 -6.72037281142e-01 - 184 -5.41191436665e-01 -6.66661329162e-01 - 185 -4.13564879983e-01 -6.62136323795e-01 - 186 -2.85113524785e-01 -6.64611807784e-01 - 187 -1.59634607112e-01 -6.68730316557e-01 - 188 5.30023240597e-01 6.63437233356e-01 - 189 3.96877957833e-01 6.59467144938e-01 - 190 2.62120346356e-01 6.67056031387e-01 - 191 -6.80169920428e-01 1.24897532172e-01 - 192 1.61358370824e-01 -6.83159037772e-01 - 193 1.26308837666e-01 6.77840442593e-01 - 194 -5.29737434590e-01 6.77259982096e-01 - 195 -4.04311487244e-01 6.74387302377e-01 - 196 -2.76311969018e-01 6.73650106965e-01 - 197 -1.45088121055e-01 6.75498331148e-01 - 198 6.82244014391e-01 -5.29039577061e-01 - 199 6.79440956277e-01 -4.01774600986e-01 - 200 6.79270622282e-01 -2.70649874777e-01 - 201 6.82661306607e-01 -1.34569346730e-01 - 202 -6.83818539778e-01 -5.31277797951e-01 - 203 -6.79955137981e-01 -4.05979532703e-01 - 204 -6.77679062382e-01 -2.78195441170e-01 - 205 -6.78376952900e-01 -1.47081460261e-01 - 206 6.77086361408e-01 5.27908429150e-01 - 207 6.74209265799e-01 4.01533614047e-01 - 208 6.73518032916e-01 2.72362044296e-01 - 209 6.75570511352e-01 1.39678465649e-01 - 210 -5.89224087612e-01 -5.74761531233e-01 - 211 5.79149636693e-01 5.70735132048e-01 - 212 -5.72812676815e-01 5.79118400361e-01 - 213 5.86422339464e-01 -5.73372109109e-01 - 214 -5.38691554380e-01 4.55723158918e-01 - 215 4.66132620813e-01 -5.40696544531e-01 - 216 4.56068865749e-01 5.35690969409e-01 - 217 -4.71110525120e-01 -5.41376125510e-01 - 218 -5.50829014582e-01 3.13027318389e-01 - 219 3.27989533580e-01 -5.55390128805e-01 - 220 3.13931725802e-01 5.47305638027e-01 - 221 -3.36649444751e-01 -5.53209678633e-01 - 222 -2.08000864745e-01 -5.50857378440e-01 - 223 2.00333569016e-01 -5.67829282890e-01 - 224 -5.60686063227e-01 1.83005293141e-01 - 225 1.84654487504e-01 5.56994723787e-01 - 226 6.81478491684e-01 2.83330519611e-03 - 227 -9.98101594883e-03 6.80731863379e-01 - 228 -6.83139362791e-01 -1.17842554547e-02 - 229 -4.62455181381e-01 5.66230306628e-01 - 230 5.73397771009e-01 -4.62133238670e-01 - 231 5.66280451915e-01 4.59312091245e-01 - 232 -5.75721736247e-01 -4.64655489495e-01 - 233 6.14238781906e-02 -7.05608607267e-01 - 234 -3.86023182145e-02 -6.80613548088e-01 - 235 -3.35782350604e-01 5.63851931772e-01 - 236 -2.06235069131e-01 5.62889914609e-01 - 237 5.70091122691e-01 -3.33918507761e-01 - 238 5.63858990523e-01 3.31360733941e-01 - 239 5.62960886318e-01 2.00198453082e-01 - 240 -5.70598472457e-01 -3.38515374800e-01 - 241 -5.67180366667e-01 -2.09410409429e-01 - 242 5.68196633790e-01 -2.02099597527e-01 - 243 -7.74334087185e-02 -5.59646179586e-01 - 244 6.11013129983e-02 -5.87381936646e-01 - 245 -5.70859034242e-01 5.22764760076e-02 - 246 5.46901204447e-02 5.67446311158e-01 - 247 -7.48964887870e-02 5.64675962268e-01 - 248 -5.68044425369e-01 -7.79706666897e-02 - 249 5.67131945388e-01 -6.82143026621e-02 - 250 5.64896258561e-01 6.64317257813e-02 - 251 4.56438853149e-01 3.94883692922e-01 - 252 3.57743995980e-01 4.46437928633e-01 - 253 2.28460255671e-01 4.19208560080e-01 - 254 4.51090753634e-01 2.63736981458e-01 - 255 -4.67648846888e-01 -4.03124517874e-01 - 256 -3.78349238706e-01 -4.56315584677e-01 - 257 -2.64576578534e-01 -4.36258222606e-01 - 258 -4.57006140609e-01 -2.74604679446e-01 - 259 4.64554432826e-01 -4.00935217430e-01 - 260 3.68794689270e-01 -4.55274811651e-01 - 261 2.42206378655e-01 -4.33780526087e-01 - 262 4.56787907010e-01 -2.70627567512e-01 - 263 -3.99429590919e-01 4.56156437694e-01 - 264 -4.51029044393e-01 3.56951187771e-01 - 265 -4.24867011691e-01 2.26922428379e-01 - 266 -2.69853730997e-01 4.50948592686e-01 - 267 1.10983362349e-01 4.63331911575e-01 - 268 -4.68267027970e-01 1.08480435242e-01 - 269 1.23810123574e-01 -4.79886148724e-01 - 270 -1.30625767971e-01 -4.29535336763e-01 - 271 5.60881997825e-03 -4.51464119112e-01 - 272 -3.49107859512e-01 -3.43842056386e-01 - 273 3.39382985492e-01 3.30619795992e-01 - 274 -3.36994558369e-01 3.38846678506e-01 - 275 3.47507613847e-01 -3.41609462337e-01 - 276 -1.37912302014e-01 4.50170829264e-01 - 277 4.53142812952e-01 -1.38211422004e-01 - 278 4.51472067804e-01 -4.12250691928e-03 - 279 4.50344578770e-01 1.30470747690e-01 - 280 -4.53753015349e-01 -1.42981375961e-01 - 281 -5.33524712583e-03 4.51179014015e-01 - 282 -4.55614014265e-01 -9.14199788590e-03 - 283 -2.05118771493e-01 3.36383566396e-01 - 284 -3.37716749242e-01 -2.14132667262e-01 - 285 3.39450205155e-01 -2.10035451945e-01 - 286 3.37182325248e-01 -7.52945200337e-02 - 287 3.36879603307e-01 6.07561278758e-02 - 288 3.36191769739e-01 1.97185342440e-01 - 289 -2.78789677824e-01 2.18645631711e-01 - 290 -3.43227464614e-01 8.26885876257e-02 - 291 -2.08164000836e-01 -2.98318515752e-01 - 292 2.25541070938e-01 -2.87364412185e-01 - 293 1.08796642853e-01 -3.60700288228e-01 - 294 2.19368080764e-01 2.69674191817e-01 - 295 8.56949116130e-02 3.36064731151e-01 - 296 -3.71041368946e-02 -3.03850485613e-01 - 297 -6.70542938345e-02 3.37511423154e-01 - 298 -3.42059678279e-01 -7.26594727931e-02 - 299 2.20929067500e-01 -1.48536927588e-01 - 300 1.00037218958e-01 -2.23339640104e-01 - 301 2.23061290354e-01 -1.06969293590e-02 - 302 2.23858743479e-01 1.27757919542e-01 - 303 1.11748006761e-01 1.91727800915e-01 - 304 -1.41547541464e-01 2.25259619212e-01 - 305 -2.04687844392e-01 1.10996877989e-01 - 306 -2.28966150111e-01 -1.48894802646e-01 - 307 -1.21178884353e-01 -2.00961035774e-01 - 308 -2.32376201400e-01 -1.38558274140e-02 - 309 -1.21174159928e-02 -1.50291243208e-01 - 310 -9.87792262938e-03 2.25019998839e-01 - 311 1.05029589909e-01 -8.07847670579e-02 - 312 -1.21363789651e-01 -8.23515192935e-02 - 313 1.13928738697e-01 5.49213286052e-02 - 314 -7.88090361781e-02 1.17309766861e-01 - 315 -1.28810701903e-01 2.53425872572e-02 - 316 2.52760153579e-02 1.15824615832e-01 - 317 -1.16516499170e-02 -3.37139560491e-03 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 64 1 65 - 2 3 3 65 1 3 - 3 3 3 17 2 67 - 4 3 3 67 2 19 - 5 3 3 33 18 68 - 6 3 3 68 18 35 - 7 3 3 49 34 69 - 8 3 3 69 34 50 - 9 3 3 64 65 70 - 10 3 3 64 70 63 - 11 3 3 17 67 71 - 12 3 3 17 71 16 - 13 3 3 33 68 72 - 14 3 3 33 72 32 - 15 3 3 68 35 73 - 16 3 3 73 35 36 - 17 3 3 67 19 74 - 18 3 3 74 19 20 - 19 3 3 65 3 75 - 20 3 3 75 3 4 - 21 3 3 49 69 76 - 22 3 3 49 76 48 - 23 3 3 69 50 77 - 24 3 3 77 50 51 - 25 3 3 63 70 78 - 26 3 3 63 78 62 - 27 3 3 73 36 79 - 28 3 3 79 36 37 - 29 3 3 75 4 80 - 30 3 3 80 4 5 - 31 3 3 74 20 81 - 32 3 3 81 20 21 - 33 3 3 48 76 82 - 34 3 3 48 82 47 - 35 3 3 16 71 83 - 36 3 3 16 83 15 - 37 3 3 77 51 84 - 38 3 3 84 51 52 - 39 3 3 32 72 85 - 40 3 3 32 85 31 - 41 3 3 62 78 86 - 42 3 3 62 86 61 - 43 3 3 79 37 87 - 44 3 3 87 37 38 - 45 3 3 84 52 88 - 46 3 3 88 52 53 - 47 3 3 80 5 89 - 48 3 3 89 5 6 - 49 3 3 81 21 90 - 50 3 3 90 21 22 - 51 3 3 47 82 91 - 52 3 3 47 91 46 - 53 3 3 15 83 92 - 54 3 3 15 92 14 - 55 3 3 31 85 93 - 56 3 3 31 93 30 - 57 3 3 61 86 94 - 58 3 3 61 94 60 - 59 3 3 88 53 95 - 60 3 3 95 53 54 - 61 3 3 87 38 96 - 62 3 3 96 38 39 - 63 3 3 90 22 97 - 64 3 3 97 22 23 - 65 3 3 46 91 98 - 66 3 3 46 98 45 - 67 3 3 89 6 99 - 68 3 3 99 6 7 - 69 3 3 14 92 100 - 70 3 3 14 100 13 - 71 3 3 30 93 101 - 72 3 3 30 101 29 - 73 3 3 60 94 102 - 74 3 3 60 102 59 - 75 3 3 13 100 103 - 76 3 3 13 103 12 - 77 3 3 95 54 104 - 78 3 3 104 54 55 - 79 3 3 96 39 105 - 80 3 3 105 39 40 - 81 3 3 99 7 106 - 82 3 3 106 7 8 - 83 3 3 97 23 107 - 84 3 3 107 23 24 - 85 3 3 45 98 108 - 86 3 3 45 108 44 - 87 3 3 29 101 109 - 88 3 3 29 109 28 - 89 3 3 104 55 110 - 90 3 3 110 55 56 - 91 3 3 105 40 111 - 92 3 3 111 40 41 - 93 3 3 107 24 112 - 94 3 3 112 24 25 - 95 3 3 12 103 113 - 96 3 3 12 113 11 - 97 3 3 59 102 114 - 98 3 3 59 114 58 - 99 3 3 106 8 115 - 100 3 3 115 8 9 - 101 3 3 44 108 116 - 102 3 3 44 116 43 - 103 3 3 28 109 117 - 104 3 3 28 117 27 - 105 3 3 115 9 118 - 106 3 3 118 9 10 - 107 3 3 58 114 119 - 108 3 3 58 119 57 - 109 3 3 43 116 120 - 110 3 3 43 120 42 - 111 3 3 27 117 121 - 112 3 3 27 121 26 - 113 3 3 110 56 66 - 114 3 3 66 56 57 - 115 3 3 11 113 123 - 116 3 3 11 123 10 - 117 3 3 112 25 124 - 118 3 3 124 25 26 - 119 3 3 111 41 125 - 120 3 3 125 41 42 - 121 3 3 66 57 119 - 122 3 3 10 123 118 - 123 3 3 125 42 120 - 124 3 3 26 121 124 - 125 3 3 71 67 74 - 126 3 3 68 73 72 - 127 3 3 69 77 76 - 128 3 3 65 75 70 - 129 3 3 83 71 122 - 130 3 3 122 71 74 - 131 3 3 74 81 126 - 132 3 3 74 126 122 - 133 3 3 81 90 127 - 134 3 3 81 127 126 - 135 3 3 90 97 128 - 136 3 3 90 128 127 - 137 3 3 97 107 129 - 138 3 3 97 129 128 - 139 3 3 107 112 130 - 140 3 3 107 130 129 - 141 3 3 112 124 131 - 142 3 3 112 131 130 - 143 3 3 92 83 132 - 144 3 3 132 83 122 - 145 3 3 100 92 133 - 146 3 3 133 92 132 - 147 3 3 103 100 134 - 148 3 3 134 100 133 - 149 3 3 113 103 135 - 150 3 3 135 103 134 - 151 3 3 123 113 136 - 152 3 3 136 113 135 - 153 3 3 73 79 137 - 154 3 3 73 137 72 - 155 3 3 85 72 138 - 156 3 3 138 72 137 - 157 3 3 93 85 139 - 158 3 3 139 85 138 - 159 3 3 101 93 140 - 160 3 3 140 93 139 - 161 3 3 109 101 141 - 162 3 3 141 101 140 - 163 3 3 117 109 142 - 164 3 3 142 109 141 - 165 3 3 121 117 143 - 166 3 3 143 117 142 - 167 3 3 79 87 144 - 168 3 3 79 144 137 - 169 3 3 87 96 145 - 170 3 3 87 145 144 - 171 3 3 96 105 146 - 172 3 3 96 146 145 - 173 3 3 105 111 147 - 174 3 3 105 147 146 - 175 3 3 111 125 148 - 176 3 3 111 148 147 - 177 3 3 75 80 149 - 178 3 3 75 149 70 - 179 3 3 78 70 150 - 180 3 3 150 70 149 - 181 3 3 86 78 151 - 182 3 3 151 78 150 - 183 3 3 94 86 152 - 184 3 3 152 86 151 - 185 3 3 102 94 153 - 186 3 3 153 94 152 - 187 3 3 114 102 154 - 188 3 3 154 102 153 - 189 3 3 119 114 155 - 190 3 3 155 114 154 - 191 3 3 80 89 156 - 192 3 3 80 156 149 - 193 3 3 89 99 157 - 194 3 3 89 157 156 - 195 3 3 99 106 158 - 196 3 3 99 158 157 - 197 3 3 106 115 159 - 198 3 3 106 159 158 - 199 3 3 115 118 160 - 200 3 3 115 160 159 - 201 3 3 77 84 161 - 202 3 3 77 161 76 - 203 3 3 82 76 162 - 204 3 3 162 76 161 - 205 3 3 91 82 163 - 206 3 3 163 82 162 - 207 3 3 98 91 164 - 208 3 3 164 91 163 - 209 3 3 108 98 165 - 210 3 3 165 98 164 - 211 3 3 116 108 166 - 212 3 3 166 108 165 - 213 3 3 120 116 167 - 214 3 3 167 116 166 - 215 3 3 84 88 168 - 216 3 3 84 168 161 - 217 3 3 88 95 169 - 218 3 3 88 169 168 - 219 3 3 95 104 170 - 220 3 3 95 170 169 - 221 3 3 104 110 171 - 222 3 3 104 171 170 - 223 3 3 110 66 172 - 224 3 3 110 172 171 - 225 3 3 124 121 131 - 226 3 3 121 143 131 - 227 3 3 172 66 119 - 228 3 3 119 155 172 - 229 3 3 148 125 120 - 230 3 3 120 167 148 - 231 3 3 123 136 173 - 232 3 3 123 173 118 - 233 3 3 160 118 173 - 234 3 3 138 137 174 - 235 3 3 174 137 144 - 236 3 3 139 138 174 - 237 3 3 161 168 175 - 238 3 3 161 175 162 - 239 3 3 163 162 175 - 240 3 3 132 122 176 - 241 3 3 176 122 126 - 242 3 3 126 127 176 - 243 3 3 150 149 177 - 244 3 3 177 149 156 - 245 3 3 151 150 177 - 246 3 3 168 169 178 - 247 3 3 168 178 175 - 248 3 3 169 170 179 - 249 3 3 169 179 178 - 250 3 3 170 171 180 - 251 3 3 170 180 179 - 252 3 3 133 132 181 - 253 3 3 181 132 176 - 254 3 3 134 133 182 - 255 3 3 182 133 181 - 256 3 3 135 134 183 - 257 3 3 183 134 182 - 258 3 3 156 157 184 - 259 3 3 156 184 177 - 260 3 3 157 158 185 - 261 3 3 157 185 184 - 262 3 3 158 159 186 - 263 3 3 158 186 185 - 264 3 3 159 160 187 - 265 3 3 159 187 186 - 266 3 3 144 145 188 - 267 3 3 144 188 174 - 268 3 3 145 146 189 - 269 3 3 145 189 188 - 270 3 3 146 147 190 - 271 3 3 146 190 189 - 272 3 3 171 172 191 - 273 3 3 171 191 180 - 274 3 3 136 135 192 - 275 3 3 192 135 183 - 276 3 3 147 148 193 - 277 3 3 147 193 190 - 278 3 3 164 163 194 - 279 3 3 194 163 175 - 280 3 3 165 164 195 - 281 3 3 195 164 194 - 282 3 3 166 165 196 - 283 3 3 196 165 195 - 284 3 3 167 166 197 - 285 3 3 197 166 196 - 286 3 3 127 128 198 - 287 3 3 127 198 176 - 288 3 3 128 129 199 - 289 3 3 128 199 198 - 290 3 3 129 130 200 - 291 3 3 129 200 199 - 292 3 3 130 131 201 - 293 3 3 130 201 200 - 294 3 3 152 151 202 - 295 3 3 202 151 177 - 296 3 3 153 152 203 - 297 3 3 203 152 202 - 298 3 3 154 153 204 - 299 3 3 204 153 203 - 300 3 3 155 154 205 - 301 3 3 205 154 204 - 302 3 3 140 139 206 - 303 3 3 206 139 174 - 304 3 3 141 140 207 - 305 3 3 207 140 206 - 306 3 3 142 141 208 - 307 3 3 208 141 207 - 308 3 3 143 142 209 - 309 3 3 209 142 208 - 310 3 3 202 177 210 - 311 3 3 210 177 184 - 312 3 3 174 188 211 - 313 3 3 174 211 206 - 314 3 3 194 175 212 - 315 3 3 212 175 178 - 316 3 3 176 198 213 - 317 3 3 176 213 181 - 318 3 3 178 179 214 - 319 3 3 178 214 212 - 320 3 3 182 181 215 - 321 3 3 215 181 213 - 322 3 3 188 189 216 - 323 3 3 188 216 211 - 324 3 3 184 185 217 - 325 3 3 184 217 210 - 326 3 3 179 180 218 - 327 3 3 179 218 214 - 328 3 3 183 182 219 - 329 3 3 219 182 215 - 330 3 3 189 190 220 - 331 3 3 189 220 216 - 332 3 3 185 186 221 - 333 3 3 185 221 217 - 334 3 3 186 187 222 - 335 3 3 186 222 221 - 336 3 3 192 183 223 - 337 3 3 223 183 219 - 338 3 3 180 191 224 - 339 3 3 180 224 218 - 340 3 3 190 193 225 - 341 3 3 190 225 220 - 342 3 3 201 131 226 - 343 3 3 226 131 143 - 344 3 3 143 209 226 - 345 3 3 148 167 227 - 346 3 3 148 227 193 - 347 3 3 167 197 227 - 348 3 3 172 155 228 - 349 3 3 172 228 191 - 350 3 3 155 205 228 - 351 3 3 195 194 229 - 352 3 3 229 194 212 - 353 3 3 198 199 230 - 354 3 3 198 230 213 - 355 3 3 207 206 231 - 356 3 3 231 206 211 - 357 3 3 203 202 232 - 358 3 3 232 202 210 - 359 3 3 173 136 233 - 360 3 3 233 136 192 - 361 3 3 160 173 234 - 362 3 3 234 173 233 - 363 3 3 187 160 234 - 364 3 3 196 195 235 - 365 3 3 235 195 229 - 366 3 3 197 196 236 - 367 3 3 236 196 235 - 368 3 3 199 200 237 - 369 3 3 199 237 230 - 370 3 3 208 207 238 - 371 3 3 238 207 231 - 372 3 3 209 208 239 - 373 3 3 239 208 238 - 374 3 3 204 203 240 - 375 3 3 240 203 232 - 376 3 3 205 204 241 - 377 3 3 241 204 240 - 378 3 3 200 201 242 - 379 3 3 200 242 237 - 380 3 3 232 210 217 - 381 3 3 211 216 231 - 382 3 3 213 230 215 - 383 3 3 229 212 214 - 384 3 3 187 234 243 - 385 3 3 187 243 222 - 386 3 3 234 233 244 - 387 3 3 234 244 243 - 388 3 3 233 192 244 - 389 3 3 192 223 244 - 390 3 3 224 191 245 - 391 3 3 245 191 228 - 392 3 3 193 227 246 - 393 3 3 193 246 225 - 394 3 3 197 236 247 - 395 3 3 197 247 227 - 396 3 3 228 205 248 - 397 3 3 248 205 241 - 398 3 3 242 201 249 - 399 3 3 249 201 226 - 400 3 3 226 209 250 - 401 3 3 226 250 249 - 402 3 3 209 239 250 - 403 3 3 238 231 251 - 404 3 3 251 231 216 - 405 3 3 216 220 252 - 406 3 3 216 252 251 - 407 3 3 220 225 253 - 408 3 3 220 253 252 - 409 3 3 239 238 254 - 410 3 3 254 238 251 - 411 3 3 240 232 255 - 412 3 3 255 232 217 - 413 3 3 217 221 256 - 414 3 3 217 256 255 - 415 3 3 221 222 257 - 416 3 3 221 257 256 - 417 3 3 241 240 258 - 418 3 3 258 240 255 - 419 3 3 230 237 259 - 420 3 3 230 259 215 - 421 3 3 219 215 260 - 422 3 3 260 215 259 - 423 3 3 223 219 261 - 424 3 3 261 219 260 - 425 3 3 237 242 262 - 426 3 3 237 262 259 - 427 3 3 235 229 263 - 428 3 3 263 229 214 - 429 3 3 214 218 264 - 430 3 3 214 264 263 - 431 3 3 218 224 265 - 432 3 3 218 265 264 - 433 3 3 236 235 266 - 434 3 3 266 235 263 - 435 3 3 245 228 248 - 436 3 3 246 227 247 - 437 3 3 253 225 267 - 438 3 3 267 225 246 - 439 3 3 265 224 268 - 440 3 3 268 224 245 - 441 3 3 244 223 269 - 442 3 3 269 223 261 - 443 3 3 222 243 270 - 444 3 3 222 270 257 - 445 3 3 243 244 271 - 446 3 3 243 271 270 - 447 3 3 258 255 272 - 448 3 3 272 255 256 - 449 3 3 256 257 272 - 450 3 3 251 252 273 - 451 3 3 251 273 254 - 452 3 3 252 253 273 - 453 3 3 266 263 274 - 454 3 3 274 263 264 - 455 3 3 264 265 274 - 456 3 3 259 262 275 - 457 3 3 259 275 260 - 458 3 3 261 260 275 - 459 3 3 236 266 276 - 460 3 3 236 276 247 - 461 3 3 242 249 277 - 462 3 3 242 277 262 - 463 3 3 249 250 278 - 464 3 3 249 278 277 - 465 3 3 250 239 279 - 466 3 3 250 279 278 - 467 3 3 239 254 279 - 468 3 3 248 241 280 - 469 3 3 280 241 258 - 470 3 3 244 269 271 - 471 3 3 246 247 281 - 472 3 3 246 281 267 - 473 3 3 247 276 281 - 474 3 3 245 248 282 - 475 3 3 245 282 268 - 476 3 3 248 280 282 - 477 3 3 276 266 283 - 478 3 3 283 266 274 - 479 3 3 258 272 284 - 480 3 3 258 284 280 - 481 3 3 275 262 285 - 482 3 3 285 262 277 - 483 3 3 277 278 286 - 484 3 3 277 286 285 - 485 3 3 278 279 287 - 486 3 3 278 287 286 - 487 3 3 279 254 288 - 488 3 3 279 288 287 - 489 3 3 254 273 288 - 490 3 3 274 265 289 - 491 3 3 274 289 283 - 492 3 3 265 268 290 - 493 3 3 265 290 289 - 494 3 3 272 257 291 - 495 3 3 272 291 284 - 496 3 3 257 270 291 - 497 3 3 261 275 292 - 498 3 3 292 275 285 - 499 3 3 269 261 293 - 500 3 3 293 261 292 - 501 3 3 273 253 294 - 502 3 3 273 294 288 - 503 3 3 253 267 295 - 504 3 3 253 295 294 - 505 3 3 270 271 296 - 506 3 3 270 296 291 - 507 3 3 269 293 271 - 508 3 3 296 271 293 - 509 3 3 267 281 295 - 510 3 3 268 282 290 - 511 3 3 281 276 297 - 512 3 3 297 276 283 - 513 3 3 282 280 298 - 514 3 3 298 280 284 - 515 3 3 292 285 299 - 516 3 3 299 285 286 - 517 3 3 293 292 300 - 518 3 3 300 292 299 - 519 3 3 286 287 301 - 520 3 3 286 301 299 - 521 3 3 287 288 302 - 522 3 3 287 302 301 - 523 3 3 288 294 302 - 524 3 3 294 295 303 - 525 3 3 294 303 302 - 526 3 3 283 289 304 - 527 3 3 283 304 297 - 528 3 3 289 290 305 - 529 3 3 289 305 304 - 530 3 3 284 291 306 - 531 3 3 284 306 298 - 532 3 3 291 296 307 - 533 3 3 291 307 306 - 534 3 3 290 282 298 - 535 3 3 295 281 297 - 536 3 3 293 300 296 - 537 3 3 305 290 308 - 538 3 3 308 290 298 - 539 3 3 298 306 308 - 540 3 3 307 296 309 - 541 3 3 309 296 300 - 542 3 3 303 295 310 - 543 3 3 310 295 297 - 544 3 3 297 304 310 - 545 3 3 300 299 311 - 546 3 3 300 311 309 - 547 3 3 299 301 311 - 548 3 3 306 307 312 - 549 3 3 312 307 309 - 550 3 3 301 302 313 - 551 3 3 301 313 311 - 552 3 3 302 303 313 - 553 3 3 304 305 314 - 554 3 3 304 314 310 - 555 3 3 306 312 308 - 556 3 3 314 305 315 - 557 3 3 315 305 308 - 558 3 3 303 310 316 - 559 3 3 303 316 313 - 560 3 3 310 314 316 - 561 3 3 309 311 317 - 562 3 3 309 317 312 - 563 3 3 311 313 317 - 564 3 3 315 308 312 - 565 3 3 312 317 315 - 566 3 3 317 313 316 - 567 3 3 316 314 317 - 568 3 3 314 315 317 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 568 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell025.neu b/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell025.neu deleted file mode 100644 index 3fb4027..0000000 --- a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell025.neu +++ /dev/null @@ -1,268 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:46:24 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 90 146 1 0 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 -1.00000000000e+00 -1.00000000000e+00 - 2 1.00000000000e+00 -1.00000000000e+00 - 3 -7.50000000000e-01 -1.00000000000e+00 - 4 -5.00000000000e-01 -1.00000000000e+00 - 5 -2.50000000000e-01 -1.00000000000e+00 - 6 0.00000000000e+00 -1.00000000000e+00 - 7 2.50000000000e-01 -1.00000000000e+00 - 8 5.00000000000e-01 -1.00000000000e+00 - 9 7.50000000000e-01 -1.00000000000e+00 - 10 1.00000000000e+00 1.00000000000e+00 - 11 1.00000000000e+00 -7.50000000000e-01 - 12 1.00000000000e+00 -5.00000000000e-01 - 13 1.00000000000e+00 -2.50000000000e-01 - 14 1.00000000000e+00 0.00000000000e+00 - 15 1.00000000000e+00 2.50000000000e-01 - 16 1.00000000000e+00 5.00000000000e-01 - 17 1.00000000000e+00 7.50000000000e-01 - 18 -1.00000000000e+00 1.00000000000e+00 - 19 7.50000000000e-01 1.00000000000e+00 - 20 5.00000000000e-01 1.00000000000e+00 - 21 2.50000000000e-01 1.00000000000e+00 - 22 0.00000000000e+00 1.00000000000e+00 - 23 -2.50000000000e-01 1.00000000000e+00 - 24 -5.00000000000e-01 1.00000000000e+00 - 25 -7.50000000000e-01 1.00000000000e+00 - 26 -1.00000000000e+00 7.50000000000e-01 - 27 -1.00000000000e+00 5.00000000000e-01 - 28 -1.00000000000e+00 2.50000000000e-01 - 29 -1.00000000000e+00 0.00000000000e+00 - 30 -1.00000000000e+00 -2.50000000000e-01 - 31 -1.00000000000e+00 -5.00000000000e-01 - 32 -1.00000000000e+00 -7.50000000000e-01 - 33 -8.25315481678e-01 -8.24464819535e-01 - 34 -8.14479510817e-01 1.15026626072e-01 - 35 8.26548609944e-01 -8.19839961059e-01 - 36 8.25893132290e-01 8.26112308771e-01 - 37 -8.26307252863e-01 8.23894545922e-01 - 38 -7.93063327420e-01 -6.08234681141e-01 - 39 5.98552459433e-01 -7.43568183594e-01 - 40 7.59524619631e-01 5.96031746548e-01 - 41 6.13338016346e-01 7.97067260332e-01 - 42 7.99692212562e-01 -5.99446375206e-01 - 43 -5.95134196378e-01 -7.59169406376e-01 - 44 -6.14439541202e-01 7.92812847624e-01 - 45 -7.61312952493e-01 5.90049905287e-01 - 46 -7.80556743419e-01 -3.56459352243e-01 - 47 7.99248969450e-01 -3.48828951967e-01 - 48 -3.70890508383e-01 7.83458485744e-01 - 49 -3.37722654982e-01 -7.92973363920e-01 - 50 -7.83772523358e-01 3.24119146899e-01 - 51 3.69044951851e-01 7.88144867703e-01 - 52 3.31283613138e-01 -7.62719896216e-01 - 53 7.77327200210e-01 3.28296929893e-01 - 54 -7.76079136874e-01 -1.00444166525e-01 - 55 7.82879634117e-01 7.69389565848e-02 - 56 -1.24450559201e-01 7.78269951099e-01 - 57 8.30822011486e-01 -1.34041303312e-01 - 58 -1.28034404849e-01 -8.24707396821e-01 - 59 8.22195408054e-02 -7.72072158280e-01 - 60 -5.74884501595e-01 -4.82350632217e-01 - 61 1.22396599235e-01 7.80306921931e-01 - 62 1.52829369730e-01 -2.26416952463e-01 - 63 -3.94147789219e-01 -5.98411367276e-01 - 64 -1.39648335803e-01 -5.85304953392e-01 - 65 -5.48513809594e-01 -2.10584781355e-01 - 66 -4.95879560622e-01 5.75254549087e-01 - 67 -5.95977775527e-01 3.81331421085e-01 - 68 -5.53308748781e-01 1.04152223670e-01 - 69 -2.48318702202e-01 5.56148507419e-01 - 70 4.92637941241e-01 5.87068639970e-01 - 71 5.89432617311e-01 4.02510475486e-01 - 72 5.33056436590e-01 1.51271660390e-01 - 73 2.45266200630e-01 5.64908480860e-01 - 74 5.96764154960e-01 -4.51138058676e-01 - 75 4.08786746261e-01 -5.58274003266e-01 - 76 1.55334034152e-01 -5.03620958777e-01 - 77 5.98902414176e-01 -1.51962490486e-01 - 78 -9.89792119880e-04 5.52455145624e-01 - 79 -3.32784809789e-01 -3.73245088483e-01 - 80 -3.80751704510e-01 3.40687501587e-01 - 81 3.74383397739e-01 3.63123430243e-01 - 82 3.74129333694e-01 -3.21815459784e-01 - 83 3.24131645319e-01 -5.83171277916e-02 - 84 2.68998020381e-01 1.56466836263e-01 - 85 1.23770695546e-01 3.25146103052e-01 - 86 -1.22200060779e-01 3.17358575133e-01 - 87 -2.92156862925e-01 -9.88246447269e-02 - 88 -2.66297879037e-01 1.32652203808e-01 - 89 -7.39730319863e-02 -2.91070906501e-01 - 90 1.13009950584e-02 2.94881173108e-02 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 32 1 33 - 2 3 3 33 1 3 - 3 3 3 9 2 35 - 4 3 3 35 2 11 - 5 3 3 17 10 36 - 6 3 3 36 10 19 - 7 3 3 25 18 37 - 8 3 3 37 18 26 - 9 3 3 32 33 38 - 10 3 3 32 38 31 - 11 3 3 9 35 39 - 12 3 3 9 39 8 - 13 3 3 17 36 40 - 14 3 3 17 40 16 - 15 3 3 36 19 41 - 16 3 3 41 19 20 - 17 3 3 35 11 42 - 18 3 3 42 11 12 - 19 3 3 33 3 43 - 20 3 3 43 3 4 - 21 3 3 25 37 44 - 22 3 3 25 44 24 - 23 3 3 37 26 45 - 24 3 3 45 26 27 - 25 3 3 31 38 46 - 26 3 3 31 46 30 - 27 3 3 42 12 47 - 28 3 3 47 12 13 - 29 3 3 24 44 48 - 30 3 3 24 48 23 - 31 3 3 43 4 49 - 32 3 3 49 4 5 - 33 3 3 45 27 50 - 34 3 3 50 27 28 - 35 3 3 41 20 51 - 36 3 3 51 20 21 - 37 3 3 8 39 52 - 38 3 3 8 52 7 - 39 3 3 16 40 53 - 40 3 3 16 53 15 - 41 3 3 30 46 54 - 42 3 3 30 54 29 - 43 3 3 15 53 55 - 44 3 3 15 55 14 - 45 3 3 50 28 34 - 46 3 3 34 28 29 - 47 3 3 47 13 57 - 48 3 3 57 13 14 - 49 3 3 23 48 56 - 50 3 3 23 56 22 - 51 3 3 7 52 59 - 52 3 3 7 59 6 - 53 3 3 49 5 58 - 54 3 3 58 5 6 - 55 3 3 51 21 61 - 56 3 3 61 21 22 - 57 3 3 34 29 54 - 58 3 3 58 6 59 - 59 3 3 61 22 56 - 60 3 3 14 55 57 - 61 3 3 36 41 40 - 62 3 3 35 42 39 - 63 3 3 38 33 43 - 64 3 3 44 37 45 - 65 3 3 46 38 60 - 66 3 3 60 38 43 - 67 3 3 43 49 63 - 68 3 3 43 63 60 - 69 3 3 49 58 64 - 70 3 3 49 64 63 - 71 3 3 54 46 65 - 72 3 3 65 46 60 - 73 3 3 48 44 66 - 74 3 3 66 44 45 - 75 3 3 45 50 67 - 76 3 3 45 67 66 - 77 3 3 50 34 68 - 78 3 3 50 68 67 - 79 3 3 56 48 69 - 80 3 3 69 48 66 - 81 3 3 41 51 70 - 82 3 3 41 70 40 - 83 3 3 53 40 71 - 84 3 3 71 40 70 - 85 3 3 55 53 72 - 86 3 3 72 53 71 - 87 3 3 51 61 73 - 88 3 3 51 73 70 - 89 3 3 42 47 74 - 90 3 3 42 74 39 - 91 3 3 52 39 75 - 92 3 3 75 39 74 - 93 3 3 59 52 76 - 94 3 3 76 52 75 - 95 3 3 47 57 77 - 96 3 3 47 77 74 - 97 3 3 68 34 54 - 98 3 3 54 65 68 - 99 3 3 64 58 59 - 100 3 3 59 76 64 - 101 3 3 77 57 55 - 102 3 3 55 72 77 - 103 3 3 73 61 78 - 104 3 3 78 61 56 - 105 3 3 56 69 78 - 106 3 3 60 63 79 - 107 3 3 60 79 65 - 108 3 3 63 64 79 - 109 3 3 69 66 80 - 110 3 3 80 66 67 - 111 3 3 67 68 80 - 112 3 3 70 73 81 - 113 3 3 70 81 71 - 114 3 3 72 71 81 - 115 3 3 74 77 82 - 116 3 3 74 82 75 - 117 3 3 76 75 82 - 118 3 3 82 77 83 - 119 3 3 83 77 72 - 120 3 3 72 81 84 - 121 3 3 72 84 83 - 122 3 3 73 78 85 - 123 3 3 73 85 81 - 124 3 3 78 69 86 - 125 3 3 78 86 85 - 126 3 3 69 80 86 - 127 3 3 65 79 87 - 128 3 3 65 87 68 - 129 3 3 80 68 88 - 130 3 3 88 68 87 - 131 3 3 79 64 89 - 132 3 3 89 64 76 - 133 3 3 76 82 62 - 134 3 3 76 62 89 - 135 3 3 84 81 85 - 136 3 3 80 88 86 - 137 3 3 79 89 87 - 138 3 3 62 82 83 - 139 3 3 88 87 90 - 140 3 3 90 87 89 - 141 3 3 89 62 90 - 142 3 3 83 84 90 - 143 3 3 83 90 62 - 144 3 3 85 86 90 - 145 3 3 90 86 88 - 146 3 3 85 90 84 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 146 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell05.neu b/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell05.neu deleted file mode 100644 index 8f2387e..0000000 --- a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell05.neu +++ /dev/null @@ -1,100 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:45:53 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 32 46 1 0 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 -1.00000000000e+00 -1.00000000000e+00 - 2 1.00000000000e+00 -1.00000000000e+00 - 3 -5.00000000000e-01 -1.00000000000e+00 - 4 0.00000000000e+00 -1.00000000000e+00 - 5 5.00000000000e-01 -1.00000000000e+00 - 6 1.00000000000e+00 1.00000000000e+00 - 7 1.00000000000e+00 -5.00000000000e-01 - 8 1.00000000000e+00 0.00000000000e+00 - 9 1.00000000000e+00 5.00000000000e-01 - 10 -1.00000000000e+00 1.00000000000e+00 - 11 5.00000000000e-01 1.00000000000e+00 - 12 0.00000000000e+00 1.00000000000e+00 - 13 -5.00000000000e-01 1.00000000000e+00 - 14 -1.00000000000e+00 5.00000000000e-01 - 15 -1.00000000000e+00 0.00000000000e+00 - 16 -1.00000000000e+00 -5.00000000000e-01 - 17 -5.88645508883e-01 -5.98992105176e-01 - 18 2.11667061421e-01 6.85732630033e-01 - 19 5.88647540499e-01 5.99003090903e-01 - 20 6.26762099615e-01 -6.06914190601e-01 - 21 -6.26772420298e-01 6.06902153215e-01 - 22 1.88414881142e-01 -6.20334012720e-01 - 23 -6.26379177913e-01 -1.63523171119e-01 - 24 6.26386554150e-01 1.63514801246e-01 - 25 -1.88414262124e-01 6.20330082412e-01 - 26 3.43943168304e-01 -2.09401779089e-01 - 27 -2.11677073731e-01 -6.85741292847e-01 - 28 7.18061842858e-01 -2.30386196324e-01 - 29 -7.18064297465e-01 2.30387800123e-01 - 30 1.51890087403e-01 2.48403531289e-01 - 31 -1.51889281370e-01 -2.48399720144e-01 - 32 -3.43942925669e-01 2.09397547857e-01 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 16 1 17 - 2 3 3 17 1 3 - 3 3 3 9 6 19 - 4 3 3 19 6 11 - 5 3 3 5 2 20 - 6 3 3 20 2 7 - 7 3 3 13 10 21 - 8 3 3 21 10 14 - 9 3 3 5 20 22 - 10 3 3 5 22 4 - 11 3 3 16 17 23 - 12 3 3 16 23 15 - 13 3 3 9 19 24 - 14 3 3 9 24 8 - 15 3 3 13 21 25 - 16 3 3 13 25 12 - 17 3 3 19 11 18 - 18 3 3 18 11 12 - 19 3 3 17 3 27 - 20 3 3 27 3 4 - 21 3 3 20 7 28 - 22 3 3 28 7 8 - 23 3 3 21 14 29 - 24 3 3 29 14 15 - 25 3 3 18 12 25 - 26 3 3 27 4 22 - 27 3 3 28 8 24 - 28 3 3 29 15 23 - 29 3 3 20 28 26 - 30 3 3 20 26 22 - 31 3 3 24 19 30 - 32 3 3 30 19 18 - 33 3 3 23 17 31 - 34 3 3 31 17 27 - 35 3 3 21 29 32 - 36 3 3 21 32 25 - 37 3 3 28 24 26 - 38 3 3 24 30 26 - 39 3 3 29 23 32 - 40 3 3 23 31 32 - 41 3 3 27 22 31 - 42 3 3 22 26 31 - 43 3 3 18 25 30 - 44 3 3 25 32 30 - 45 3 3 30 32 31 - 46 3 3 31 26 30 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 46 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell1.neu b/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell1.neu deleted file mode 100644 index 4babdb8..0000000 --- a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell1.neu +++ /dev/null @@ -1,35 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:45:14 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 9 8 1 0 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 -1.00000000000e+00 -1.00000000000e+00 - 2 1.00000000000e+00 -1.00000000000e+00 - 3 0.00000000000e+00 -1.00000000000e+00 - 4 1.00000000000e+00 1.00000000000e+00 - 5 1.00000000000e+00 0.00000000000e+00 - 6 -1.00000000000e+00 1.00000000000e+00 - 7 0.00000000000e+00 1.00000000000e+00 - 8 -1.00000000000e+00 0.00000000000e+00 - 9 -1.63975270435e-01 -1.63975270435e-01 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 8 1 9 - 2 3 3 9 1 3 - 3 3 3 7 6 8 - 4 3 3 4 7 5 - 5 3 3 2 5 3 - 6 3 3 7 8 9 - 7 3 3 5 7 9 - 8 3 3 3 5 9 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 8 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 3 4 5 6 7 8 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell2.neu b/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell2.neu deleted file mode 100644 index a79d7b8..0000000 --- a/cpp/nudg++/trunk/Grid/Maxwell2D/Maxwell2.neu +++ /dev/null @@ -1,24 +0,0 @@ - CONTROL INFO 2.2.30 -** GAMBIT NEUTRAL FILE -1 -PROGRAM: Gambit VERSION: 2.2.30 -16 Feb 2006 10:44:37 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 4 2 1 0 2 2 -ENDOFSECTION - NODAL COORDINATES 2.2.30 - 1 -1.00000000000e+00 -1.00000000000e+00 - 2 1.00000000000e+00 -1.00000000000e+00 - 3 1.00000000000e+00 1.00000000000e+00 - 4 -1.00000000000e+00 1.00000000000e+00 -ENDOFSECTION - ELEMENTS/CELLS 2.2.30 - 1 3 3 4 1 3 - 2 3 3 3 1 2 -ENDOFSECTION - ELEMENT GROUP 2.2.30 -GROUP: 1 ELEMENTS: 2 MATERIAL: 2 NFLAGS: 1 - fluid - 0 - 1 2 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Maxwell2D/bar2.neu b/cpp/nudg++/trunk/Grid/Maxwell2D/bar2.neu deleted file mode 100644 index 4a59db6..0000000 --- a/cpp/nudg++/trunk/Grid/Maxwell2D/bar2.neu +++ /dev/null @@ -1,1740 +0,0 @@ -Mesh generated by MeshGen -Gambit neutral format -Dummy Line -Dummy Line -Dummy Line -NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 548 728 1 2 2 1 -ENDOFSECTION -NODAL COORDINATES - 1 -10.5 -1.5 - 2 -10.25 -1.5 - 3 -10.0 -1.5 - 4 -9.75 -1.5 - 5 -9.5 -1.5 - 6 -9.25 -1.5 - 7 -9.0 -1.5 - 8 -8.75 -1.5 - 9 -8.5 -1.5 - 10 -8.25 -1.5 - 11 -8.0 -1.5 - 12 -7.75 -1.5 - 13 -7.5 -1.5 - 14 -7.25 -1.5 - 15 -7.0 -1.5 - 16 -6.75 -1.5 - 17 -6.5 -1.5 - 18 -6.25 -1.5 - 19 -6.0 -1.5 - 20 -5.75 -1.5 - 21 -5.5 -1.5 - 22 -5.25 -1.5 - 23 -5.0 -1.5 - 24 -4.75 -1.5 - 25 -4.5 -1.5 - 26 -4.25 -1.5 - 27 -4.0 -1.5 - 28 -3.75 -1.5 - 29 -3.5 -1.5 - 30 -3.25 -1.5 - 31 -3.0 -1.5 - 32 -2.75 -1.5 - 33 -2.5 -1.5 - 34 -2.25 -1.5 - 35 -2.0 -1.5 - 36 -1.75 -1.5 - 37 -1.5 -1.5 - 38 -1.25 -1.5 - 39 -1.0 -1.5 - 40 -0.75 -1.5 - 41 -0.5 -1.5 - 42 -0.25 -1.5 - 43 0.0 -1.5 - 44 0.25 -1.5 - 45 0.5 -1.5 - 46 0.75 -1.5 - 47 1.0 -1.5 - 48 1.25 -1.5 - 49 1.5 -1.5 - 50 1.75 -1.5 - 51 2.0 -1.5 - 52 2.25 -1.5 - 53 2.5 -1.5 - 54 2.75 -1.5 - 55 3.0 -1.5 - 56 3.25 -1.5 - 57 3.5 -1.5 - 58 3.75 -1.5 - 59 4.0 -1.5 - 60 4.25 -1.5 - 61 4.5 -1.5 - 62 4.75 -1.5 - 63 5.0 -1.5 - 64 5.25 -1.5 - 65 5.5 -1.5 - 66 5.75 -1.5 - 67 6.0 -1.5 - 68 6.25 -1.5 - 69 6.5 -1.5 - 70 6.75 -1.5 - 71 7.0 -1.5 - 72 7.25 -1.5 - 73 7.5 -1.5 - 74 7.75 -1.5 - 75 8.0 -1.5 - 76 8.25 -1.5 - 77 8.5 -1.5 - 78 8.75 -1.5 - 79 9.0 -1.5 - 80 9.25 -1.5 - 81 9.5 -1.5 - 82 9.75 -1.5 - 83 10.0 -1.5 - 84 10.25 -1.5 - 85 10.5 -1.5 - 86 10.5 -1.25 - 87 10.5 -1.0 - 88 10.5 -0.75 - 89 10.5 -0.5 - 90 10.5 -0.25 - 91 10.5 0.0 - 92 10.5 0.25 - 93 10.5 0.5 - 94 10.5 0.75 - 95 10.5 1.0 - 96 10.5 1.25 - 97 10.5 1.5 - 98 10.25 1.5 - 99 10.0 1.5 - 100 9.75 1.5 - 101 9.5 1.5 - 102 9.25 1.5 - 103 9.0 1.5 - 104 8.75 1.5 - 105 8.5 1.5 - 106 8.25 1.5 - 107 8.0 1.5 - 108 7.75 1.5 - 109 7.5 1.5 - 110 7.25 1.5 - 111 7.0 1.5 - 112 6.75 1.5 - 113 6.5 1.5 - 114 6.25 1.5 - 115 6.0 1.5 - 116 5.75 1.5 - 117 5.5 1.5 - 118 5.25 1.5 - 119 5.0 1.5 - 120 4.75 1.5 - 121 4.5 1.5 - 122 4.25 1.5 - 123 4.0 1.5 - 124 3.75 1.5 - 125 3.5 1.5 - 126 3.25 1.5 - 127 3.0 1.5 - 128 2.75 1.5 - 129 2.5 1.5 - 130 2.25 1.5 - 131 2.0 1.5 - 132 1.75 1.5 - 133 1.5 1.5 - 134 1.25 1.5 - 135 1.0 1.5 - 136 0.75 1.5 - 137 0.5 1.5 - 138 0.25 1.5 - 139 0.0 1.5 - 140 -0.25 1.5 - 141 -0.5 1.5 - 142 -0.75 1.5 - 143 -1.0 1.5 - 144 -1.25 1.5 - 145 -1.5 1.5 - 146 -1.75 1.5 - 147 -2.0 1.5 - 148 -2.25 1.5 - 149 -2.5 1.5 - 150 -2.75 1.5 - 151 -3.0 1.5 - 152 -3.25 1.5 - 153 -3.5 1.5 - 154 -3.75 1.5 - 155 -4.0 1.5 - 156 -4.25 1.5 - 157 -4.5 1.5 - 158 -4.75 1.5 - 159 -5.0 1.5 - 160 -5.25 1.5 - 161 -5.5 1.5 - 162 -5.75 1.5 - 163 -6.0 1.5 - 164 -6.25 1.5 - 165 -6.5 1.5 - 166 -6.75 1.5 - 167 -7.0 1.5 - 168 -7.25 1.5 - 169 -7.5 1.5 - 170 -7.75 1.5 - 171 -8.0 1.5 - 172 -8.25 1.5 - 173 -8.5 1.5 - 174 -8.75 1.5 - 175 -9.0 1.5 - 176 -9.25 1.5 - 177 -9.5 1.5 - 178 -9.75 1.5 - 179 -10.0 1.5 - 180 -10.25 1.5 - 181 -10.5 1.5 - 182 -10.5 1.25 - 183 -10.5 1.0 - 184 -10.5 0.75 - 185 -10.5 0.5 - 186 -10.5 0.25 - 187 -10.5 0.0 - 188 -10.5 -0.25 - 189 -10.5 -0.5 - 190 -10.5 -0.75 - 191 -10.5 -1.0 - 192 -10.5 -1.25 - 193 -10.0 -1.0 - 194 -9.75 -1.0 - 195 -9.5 -1.0 - 196 -9.25 -1.0 - 197 -9.0 -1.0 - 198 -8.75 -1.0 - 199 -8.5 -1.0 - 200 -8.25 -1.0 - 201 -8.0 -1.0 - 202 -7.75 -1.0 - 203 -7.5 -1.0 - 204 -7.25 -1.0 - 205 -7.0 -1.0 - 206 -6.75 -1.0 - 207 -6.5 -1.0 - 208 -6.25 -1.0 - 209 -6.0 -1.0 - 210 -5.75 -1.0 - 211 -5.5 -1.0 - 212 -5.25 -1.0 - 213 -5.0 -1.0 - 214 -4.75 -1.0 - 215 -4.5 -1.0 - 216 -4.25 -1.0 - 217 -4.0 -1.0 - 218 -3.75 -1.0 - 219 -3.5 -1.0 - 220 -3.25 -1.0 - 221 -3.0 -1.0 - 222 -2.75 -1.0 - 223 -2.5 -1.0 - 224 -2.25 -1.0 - 225 -2.0 -1.0 - 226 -1.75 -1.0 - 227 -1.5 -1.0 - 228 -1.25 -1.0 - 229 -1.0 -1.0 - 230 -0.75 -1.0 - 231 -0.5 -1.0 - 232 -0.25 -1.0 - 233 0.0 -1.0 - 234 0.25 -1.0 - 235 0.5 -1.0 - 236 0.75 -1.0 - 237 1.0 -1.0 - 238 1.25 -1.0 - 239 1.5 -1.0 - 240 1.75 -1.0 - 241 2.0 -1.0 - 242 2.25 -1.0 - 243 2.5 -1.0 - 244 2.75 -1.0 - 245 3.0 -1.0 - 246 3.25 -1.0 - 247 3.5 -1.0 - 248 3.75 -1.0 - 249 4.0 -1.0 - 250 4.25 -1.0 - 251 4.5 -1.0 - 252 4.75 -1.0 - 253 5.0 -1.0 - 254 5.25 -1.0 - 255 5.5 -1.0 - 256 5.75 -1.0 - 257 6.0 -1.0 - 258 6.25 -1.0 - 259 6.5 -1.0 - 260 6.75 -1.0 - 261 7.0 -1.0 - 262 7.25 -1.0 - 263 7.5 -1.0 - 264 7.75 -1.0 - 265 8.0 -1.0 - 266 8.25 -1.0 - 267 8.5 -1.0 - 268 8.75 -1.0 - 269 9.0 -1.0 - 270 9.25 -1.0 - 271 9.5 -1.0 - 272 9.75 -1.0 - 273 10.0 -1.0 - 274 10.0 -0.75 - 275 10.0 -0.5 - 276 10.0 -0.25 - 277 10.0 0.0 - 278 10.0 0.25 - 279 10.0 0.5 - 280 10.0 0.75 - 281 10.0 1.0 - 282 9.75 1.0 - 283 9.5 1.0 - 284 9.25 1.0 - 285 9.0 1.0 - 286 8.75 1.0 - 287 8.5 1.0 - 288 8.25 1.0 - 289 8.0 1.0 - 290 7.75 1.0 - 291 7.5 1.0 - 292 7.25 1.0 - 293 7.0 1.0 - 294 6.75 1.0 - 295 6.5 1.0 - 296 6.25 1.0 - 297 6.0 1.0 - 298 5.75 1.0 - 299 5.5 1.0 - 300 5.25 1.0 - 301 5.0 1.0 - 302 4.75 1.0 - 303 4.5 1.0 - 304 4.25 1.0 - 305 4.0 1.0 - 306 3.75 1.0 - 307 3.5 1.0 - 308 3.25 1.0 - 309 3.0 1.0 - 310 2.75 1.0 - 311 2.5 1.0 - 312 2.25 1.0 - 313 2.0 1.0 - 314 1.75 1.0 - 315 1.5 1.0 - 316 1.25 1.0 - 317 1.0 1.0 - 318 0.75 1.0 - 319 0.5 1.0 - 320 0.25 1.0 - 321 0.0 1.0 - 322 -0.25 1.0 - 323 -0.5 1.0 - 324 -0.75 1.0 - 325 -1.0 1.0 - 326 -1.25 1.0 - 327 -1.5 1.0 - 328 -1.75 1.0 - 329 -2.0 1.0 - 330 -2.25 1.0 - 331 -2.5 1.0 - 332 -2.75 1.0 - 333 -3.0 1.0 - 334 -3.25 1.0 - 335 -3.5 1.0 - 336 -3.75 1.0 - 337 -4.0 1.0 - 338 -4.25 1.0 - 339 -4.5 1.0 - 340 -4.75 1.0 - 341 -5.0 1.0 - 342 -5.25 1.0 - 343 -5.5 1.0 - 344 -5.75 1.0 - 345 -6.0 1.0 - 346 -6.25 1.0 - 347 -6.5 1.0 - 348 -6.75 1.0 - 349 -7.0 1.0 - 350 -7.25 1.0 - 351 -7.5 1.0 - 352 -7.75 1.0 - 353 -8.0 1.0 - 354 -8.25 1.0 - 355 -8.5 1.0 - 356 -8.75 1.0 - 357 -9.0 1.0 - 358 -9.25 1.0 - 359 -9.5 1.0 - 360 -9.75 1.0 - 361 -10.0 1.0 - 362 -10.0 0.75 - 363 -10.0 0.5 - 364 -10.0 0.25 - 365 -10.0 0.0 - 366 -10.0 -0.25 - 367 -10.0 -0.5 - 368 -10.0 -0.75 - 369 -10.196899742625353 -1.1968916966882788 - 370 -10.240892676899083 -0.8873385581136953 - 371 -10.248438354649958 -0.6271195370658975 - 372 -10.249731072860964 -0.37536257470260437 - 373 -10.249946533090009 -0.1250500594998171 - 374 -10.249947234895588 0.12505565995563853 - 375 -10.249733208495236 0.37536664115156926 - 376 -10.248441682536642 0.6271209856664413 - 377 -10.240895902212559 0.8873374272727133 - 378 -10.196899899573848 1.196889654582836 - 379 -9.88734995691325 -1.24088732004414 - 380 -9.887350022475843 1.2408863120564557 - 381 -9.627134574906757 -1.2484342405757507 - 382 -9.62713459927985 1.2484338226419196 - 383 -9.37538247106699 -1.2497283306448506 - 384 -9.375382479220413 1.2497281799228401 - 385 -9.125081819010733 -1.249950045897798 - 386 -9.125081821491815 1.2499499974911068 - 387 -8.87502992361108 -1.2499879717164426 - 388 -8.87502992430487 1.2499879576268063 - 389 -8.625020604071857 -1.2499944417725517 - 390 -8.625020604251747 1.2499944380051904 - 391 -8.375018554450074 -1.2499955410410926 - 392 -8.3750185544936 1.2499955401061154 - 393 -8.125017741596917 -1.249995726741138 - 394 -8.125017741606738 1.2499957265244968 - 395 -7.875017138030995 -1.2499957578782108 - 396 -7.875017138033027 1.249995757831763 - 397 -7.625016569632017 -1.2499957630513918 - 398 -7.625016569632433 1.2499957630429968 - 399 -7.375016007090448 -1.249995763901675 - 400 -7.375016007090674 1.2499957639014154 - 401 -7.125015445514371 -1.2499957640397825 - 402 -7.125015445514729 1.249995764041216 - 403 -6.875014884095589 -1.2499957640620243 - 404 -6.875014884096099 1.249995764063781 - 405 -6.625014322702139 -1.24999576406568 - 406 -6.6250143227027065 1.2499957640674493 - 407 -6.3750137613127364 -1.2499957640663395 - 408 -6.375013761313255 1.2499957640680568 - 409 -6.125013199923964 -1.2499957640664423 - 410 -6.125013199924389 1.2499957640681207 - 411 -5.875012638535256 -1.2499957640664048 - 412 -5.875012638535616 1.2499957640680741 - 413 -5.625012077146529 -1.249995764066346 - 414 -5.62501207714688 1.2499957640680202 - 415 -5.3750115157578096 -1.2499957640663104 - 416 -5.375011515758186 1.2499957640679866 - 417 -5.125010954369141 -1.2499957640662955 - 418 -5.125010954369539 1.249995764067977 - 419 -4.875010392980517 -1.2499957640662804 - 420 -4.875010392980886 1.2499957640679804 - 421 -4.625009831591899 -1.249995764066247 - 422 -4.625009831592171 1.2499957640679817 - 423 -4.375009270203239 -1.249995764066193 - 424 -4.375009270203393 1.2499957640679888 - 425 -4.12500870881452 -1.2499957640661479 - 426 -4.125008708814616 1.2499957640680055 - 427 -3.8750081474257647 -1.249995764066154 - 428 -3.8750081474259015 1.249995764068003 - 429 -3.625007586037017 -1.2499957640662185 - 430 -3.625007586037256 1.2499957640679564 - 431 -3.3750070246483084 -1.2499957640662875 - 432 -3.375007024648655 1.2499957640678894 - 433 -3.1250064632596453 -1.2499957640662986 - 434 -3.1250064632600663 1.2499957640678587 - 435 -2.8750059018710132 -1.249995764066239 - 436 -2.87500590187145 1.2499957640678978 - 437 -2.625005340482382 -1.2499957640661534 - 438 -2.6250053404827685 1.2499957640679844 - 439 -2.375004779093716 -1.249995764066102 - 440 -2.3750047790940085 1.249995764068063 - 441 -2.1250042177049875 -1.2499957640660995 - 442 -2.1250042177051833 1.249995764068091 - 443 -1.8750036563162025 -1.2499957640661046 - 444 -1.8750036563163377 1.2499957640680588 - 445 -1.625003094927397 -1.2499957640660726 - 446 -1.6250030949275225 1.2499957640679844 - 447 -1.3750025335386244 -1.2499957640660082 - 448 -1.3750025335387595 1.249995764067905 - 449 -1.125001972149932 -1.2499957640659543 - 450 -1.1250019721500364 1.2499957640678632 - 451 -0.8750014107613427 -1.2499957640659425 - 452 -0.8750014107613362 1.2499957640678907 - 453 -0.6250008493728326 -1.2499957640659771 - 454 -0.625000849372649 1.2499957640679897 - 455 -0.37500028798434365 -1.2499957640660426 - 456 -0.37500028798398094 1.2499957640681243 - 457 -0.12499972659582324 -1.2499957640661161 - 458 -0.12499972659535574 1.2499957640682449 - 459 0.12500083479274704 -1.2499957640661645 - 460 0.12500083479322863 1.2499957640683348 - 461 0.37500139618135964 -1.2499957640661592 - 462 0.375001396181831 1.2499957640684125 - 463 0.6250019575700109 -1.249995764066116 - 464 0.6250019575705111 1.2499957640684787 - 465 0.8750025189587215 -1.2499957640660873 - 466 0.8750025189592548 1.249995764068491 - 467 1.1250030803475157 -1.2499957640661037 - 468 1.1250030803479876 1.2499957640684112 - 469 1.3750036417363782 -1.249995764066147 - 470 1.3750036417366645 1.2499957640682506 - 471 1.625004203125236 -1.2499957640661779 - 472 1.6250042031253142 1.2499957640680652 - 473 1.875004764514004 -1.249995764066173 - 474 1.8750047645139907 1.249995764067909 - 475 2.12500532590266 -1.2499957640661463 - 476 2.1250053259027117 1.249995764067803 - 477 2.3750058872912585 -1.2499957640661377 - 478 2.375005887291464 1.2499957640677468 - 479 2.6250064486798697 -1.2499957640661719 - 480 2.625006448680223 1.2499957640677377 - 481 2.8750070100685314 -1.2499957640662263 - 482 2.8750070100689524 1.2499957640677626 - 483 3.1250075714572563 -1.2499957640662513 - 484 3.125007571457631 1.2499957640678006 - 485 3.3750081328460344 -1.2499957640662283 - 486 3.3750081328462875 1.2499957640678532 - 487 3.625008694234826 -1.2499957640661752 - 488 3.6250086942349675 1.249995764067933 - 489 3.8750092556235844 -1.2499957640661232 - 490 3.875009255623681 1.2499957640680253 - 491 4.125009817012301 -1.249995764066101 - 492 4.1250098170123985 1.249995764068087 - 493 4.375010378401004 -1.249995764066121 - 494 4.375010378401119 1.2499957640680812 - 495 4.625010939789723 -1.2499957640661656 - 496 4.625010939789871 1.249995764068014 - 497 4.8750115011784505 -1.249995764066212 - 498 4.875011501178652 1.2499957640679218 - 499 5.125012062567166 -1.249995764066253 - 500 5.125012062567407 1.2499957640678478 - 501 5.375012623955878 -1.2499957640662955 - 502 5.375012623956096 1.2499957640678272 - 503 5.625013185344618 -1.2499957640663462 - 504 5.625013185344727 1.2499957640678732 - 505 5.875013746733401 -1.2499957640663928 - 506 5.875013746733335 1.2499957640679744 - 507 6.125014308122196 -1.2499957640664192 - 508 6.125014308121941 1.2499957640681005 - 509 6.375014869510952 -1.249995764066426 - 510 6.375014869510545 1.249995764068204 - 511 6.625015430899634 -1.2499957640664074 - 512 6.625015430899161 1.2499957640682415 - 513 6.875015992288355 -1.2499957640662698 - 514 6.875015992287931 1.2499957640681112 - 515 7.125016553679047 -1.2499957640645705 - 516 7.12501655367878 1.2499957640662842 - 517 7.375017115096352 -1.2499957640424793 - 518 7.3750171150963295 1.2499957640428896 - 519 7.625017676806228 -1.2499957637969992 - 520 7.625017676806813 1.249995763785759 - 521 7.875018241267367 -1.249995761462045 - 522 7.8750182412715946 1.2499957613626365 - 523 8.125018828320483 -1.2499957420705752 - 524 8.125018828347981 1.2499957414175242 - 525 8.37501958092948 -1.2499955984192568 - 526 8.375019581081135 1.2499955948935189 - 527 8.625021442542828 -1.2499946268386888 - 528 8.625021443241415 1.2499946110289215 - 529 8.875030269207002 -1.2499884781084687 - 530 8.875030271896904 1.2499884192445285 - 531 9.125081103484561 -1.2499512001135902 - 532 9.125081112146356 1.2499510187988516 - 533 9.375379942869998 -1.2497304666519522 - 534 9.375379966187591 1.249730007487337 - 535 9.627129753273103 -1.2484373087207972 - 536 9.627129805759362 1.248436361438219 - 537 9.887343418991053 -1.2408903836529808 - 538 9.887343517979609 1.240888813217022 - 539 10.196893712395953 -1.1968929039369283 - 540 10.240890161929139 -0.8873390568292896 - 541 10.248437412348277 -0.6271197205709166 - 542 10.249730731494195 -0.3753626310760705 - 543 10.24994633259094 -0.12505005793995302 - 544 10.249946872091558 0.12505572009282576 - 545 10.249732300652362 0.3753668158564585 - 546 10.248439662079326 0.6271213821521633 - 547 10.240892108851485 0.8873381785902247 - 548 10.196893869413397 1.1968908618441354 -ENDOFSECTION -ELEMENTS/CELLS - 1 3 3 192 1 2 - 2 3 3 379 3 4 - 3 3 3 369 2 3 - 4 3 3 383 5 6 - 5 3 3 387 7 8 - 6 3 3 385 6 7 - 7 3 3 381 4 5 - 8 3 3 191 192 369 - 9 3 3 192 2 369 - 10 3 3 194 379 381 - 11 3 3 379 4 381 - 12 3 3 369 3 379 - 13 3 3 193 369 379 - 14 3 3 383 6 385 - 15 3 3 381 5 383 - 16 3 3 197 385 387 - 17 3 3 385 7 387 - 18 3 3 387 8 389 - 19 3 3 198 387 389 - 20 3 3 391 389 9 - 21 3 3 195 381 383 - 22 3 3 389 8 9 - 23 3 3 196 383 385 - 24 3 3 393 10 11 - 25 3 3 397 12 13 - 26 3 3 395 11 12 - 27 3 3 401 14 15 - 28 3 3 403 15 16 - 29 3 3 403 401 15 - 30 3 3 399 13 14 - 31 3 3 200 391 393 - 32 3 3 391 10 393 - 33 3 3 201 393 395 - 34 3 3 395 12 397 - 35 3 3 393 11 395 - 36 3 3 199 389 391 - 37 3 3 407 17 18 - 38 3 3 399 14 401 - 39 3 3 409 18 19 - 40 3 3 411 19 20 - 41 3 3 203 397 399 - 42 3 3 397 13 399 - 43 3 3 405 16 17 - 44 3 3 204 399 401 - 45 3 3 391 9 10 - 46 3 3 202 395 397 - 47 3 3 191 369 370 - 48 3 3 370 369 193 - 49 3 3 368 370 193 - 50 3 3 193 379 194 - 51 3 3 190 191 370 - 52 3 3 195 383 196 - 53 3 3 197 387 198 - 54 3 3 196 385 197 - 55 3 3 194 381 195 - 56 3 3 189 190 371 - 57 3 3 190 370 371 - 58 3 3 372 188 189 - 59 3 3 372 189 371 - 60 3 3 372 371 367 - 61 3 3 372 366 373 - 62 3 3 372 367 366 - 63 3 3 365 373 366 - 64 3 3 373 188 372 - 65 3 3 367 371 368 - 66 3 3 371 370 368 - 67 3 3 187 188 373 - 68 3 3 199 391 200 - 69 3 3 198 389 199 - 70 3 3 200 393 201 - 71 3 3 201 395 202 - 72 3 3 207 405 407 - 73 3 3 403 16 405 - 74 3 3 208 407 409 - 75 3 3 407 18 409 - 76 3 3 409 19 411 - 77 3 3 206 403 405 - 78 3 3 405 17 407 - 79 3 3 209 409 411 - 80 3 3 202 397 203 - 81 3 3 204 401 205 - 82 3 3 203 399 204 - 83 3 3 206 405 207 - 84 3 3 208 409 209 - 85 3 3 209 411 210 - 86 3 3 207 407 208 - 87 3 3 205 403 206 - 88 3 3 413 210 411 - 89 3 3 205 401 403 - 90 3 3 413 411 20 - 91 3 3 415 21 22 - 92 3 3 419 23 24 - 93 3 3 417 22 23 - 94 3 3 423 25 26 - 95 3 3 427 27 28 - 96 3 3 425 26 27 - 97 3 3 421 24 25 - 98 3 3 211 413 415 - 99 3 3 413 21 415 - 100 3 3 212 415 417 - 101 3 3 417 23 419 - 102 3 3 415 22 417 - 103 3 3 213 417 419 - 104 3 3 214 419 421 - 105 3 3 421 25 423 - 106 3 3 425 27 427 - 107 3 3 427 28 429 - 108 3 3 217 425 427 - 109 3 3 216 423 425 - 110 3 3 419 24 421 - 111 3 3 215 421 423 - 112 3 3 423 26 425 - 113 3 3 218 427 429 - 114 3 3 29 429 28 - 115 3 3 413 20 21 - 116 3 3 431 29 30 - 117 3 3 435 433 31 - 118 3 3 433 30 31 - 119 3 3 437 32 33 - 120 3 3 441 34 35 - 121 3 3 439 33 34 - 122 3 3 435 31 32 - 123 3 3 445 36 37 - 124 3 3 219 429 431 - 125 3 3 431 30 433 - 126 3 3 447 37 38 - 127 3 3 443 35 36 - 128 3 3 449 38 39 - 129 3 3 455 41 42 - 130 3 3 453 40 41 - 131 3 3 451 39 40 - 132 3 3 457 42 43 - 133 3 3 431 429 29 - 134 3 3 220 431 433 - 135 3 3 211 415 212 - 136 3 3 213 419 214 - 137 3 3 212 417 213 - 138 3 3 215 423 216 - 139 3 3 435 32 437 - 140 3 3 223 437 439 - 141 3 3 222 435 437 - 142 3 3 437 33 439 - 143 3 3 214 421 215 - 144 3 3 221 433 435 - 145 3 3 216 425 217 - 146 3 3 218 429 219 - 147 3 3 217 427 218 - 148 3 3 220 433 221 - 149 3 3 222 437 223 - 150 3 3 223 439 224 - 151 3 3 221 435 222 - 152 3 3 219 431 220 - 153 3 3 441 224 439 - 154 3 3 225 441 443 - 155 3 3 441 35 443 - 156 3 3 226 443 445 - 157 3 3 445 37 447 - 158 3 3 439 34 441 - 159 3 3 227 445 447 - 160 3 3 229 449 451 - 161 3 3 447 38 449 - 162 3 3 231 453 455 - 163 3 3 451 40 453 - 164 3 3 455 42 457 - 165 3 3 232 455 457 - 166 3 3 449 39 451 - 167 3 3 228 447 449 - 168 3 3 453 41 455 - 169 3 3 230 451 453 - 170 3 3 225 443 226 - 171 3 3 227 447 228 - 172 3 3 226 445 227 - 173 3 3 229 451 230 - 174 3 3 231 455 232 - 175 3 3 232 457 233 - 176 3 3 230 453 231 - 177 3 3 228 449 229 - 178 3 3 459 233 457 - 179 3 3 225 224 441 - 180 3 3 443 36 445 - 181 3 3 459 457 43 - 182 3 3 211 210 413 - 183 3 3 186 187 374 - 184 3 3 187 373 374 - 185 3 3 375 185 186 - 186 3 3 375 186 374 - 187 3 3 375 374 364 - 188 3 3 376 185 375 - 189 3 3 375 364 363 - 190 3 3 364 374 365 - 191 3 3 374 373 365 - 192 3 3 376 375 363 - 193 3 3 377 184 376 - 194 3 3 184 185 376 - 195 3 3 378 183 377 - 196 3 3 183 184 377 - 197 3 3 362 377 376 - 198 3 3 378 377 361 - 199 3 3 378 361 380 - 200 3 3 380 361 360 - 201 3 3 382 380 360 - 202 3 3 179 378 380 - 203 3 3 361 377 362 - 204 3 3 376 363 362 - 205 3 3 182 183 378 - 206 3 3 384 359 358 - 207 3 3 386 358 357 - 208 3 3 386 384 358 - 209 3 3 390 356 355 - 210 3 3 394 354 353 - 211 3 3 392 355 354 - 212 3 3 388 357 356 - 213 3 3 398 352 351 - 214 3 3 177 382 384 - 215 3 3 382 359 384 - 216 3 3 400 351 350 - 217 3 3 396 353 352 - 218 3 3 402 350 349 - 219 3 3 408 347 346 - 220 3 3 406 348 347 - 221 3 3 404 349 348 - 222 3 3 410 346 345 - 223 3 3 382 360 359 - 224 3 3 178 380 382 - 225 3 3 182 378 180 - 226 3 3 176 384 386 - 227 3 3 181 182 180 - 228 3 3 180 378 179 - 229 3 3 175 386 388 - 230 3 3 388 356 390 - 231 3 3 173 390 392 - 232 3 3 386 357 388 - 233 3 3 390 355 392 - 234 3 3 174 388 390 - 235 3 3 392 354 394 - 236 3 3 172 392 394 - 237 3 3 179 380 178 - 238 3 3 177 384 176 - 239 3 3 178 382 177 - 240 3 3 175 388 174 - 241 3 3 173 392 172 - 242 3 3 172 394 171 - 243 3 3 174 390 173 - 244 3 3 176 386 175 - 245 3 3 396 171 394 - 246 3 3 170 396 398 - 247 3 3 394 353 396 - 248 3 3 168 400 402 - 249 3 3 398 351 400 - 250 3 3 396 352 398 - 251 3 3 169 398 400 - 252 3 3 166 404 406 - 253 3 3 402 349 404 - 254 3 3 164 408 410 - 255 3 3 406 347 408 - 256 3 3 408 346 410 - 257 3 3 167 402 404 - 258 3 3 404 348 406 - 259 3 3 165 406 408 - 260 3 3 170 398 169 - 261 3 3 168 402 167 - 262 3 3 169 400 168 - 263 3 3 166 406 165 - 264 3 3 167 404 166 - 265 3 3 165 408 164 - 266 3 3 164 410 163 - 267 3 3 162 163 412 - 268 3 3 163 410 412 - 269 3 3 410 345 412 - 270 3 3 170 171 396 - 271 3 3 400 350 402 - 272 3 3 344 412 345 - 273 3 3 414 344 343 - 274 3 3 418 342 341 - 275 3 3 416 343 342 - 276 3 3 422 340 339 - 277 3 3 426 338 337 - 278 3 3 424 339 338 - 279 3 3 420 341 340 - 280 3 3 161 414 416 - 281 3 3 416 342 418 - 282 3 3 160 416 418 - 283 3 3 418 341 420 - 284 3 3 414 343 416 - 285 3 3 159 418 420 - 286 3 3 422 339 424 - 287 3 3 420 340 422 - 288 3 3 156 424 426 - 289 3 3 424 338 426 - 290 3 3 426 337 428 - 291 3 3 157 422 424 - 292 3 3 430 428 336 - 293 3 3 155 426 428 - 294 3 3 428 337 336 - 295 3 3 158 420 422 - 296 3 3 162 412 414 - 297 3 3 432 335 334 - 298 3 3 436 434 333 - 299 3 3 434 334 333 - 300 3 3 438 332 331 - 301 3 3 442 330 329 - 302 3 3 440 331 330 - 303 3 3 436 333 332 - 304 3 3 430 335 432 - 305 3 3 444 329 328 - 306 3 3 152 432 434 - 307 3 3 432 334 434 - 308 3 3 446 328 327 - 309 3 3 154 428 430 - 310 3 3 448 327 326 - 311 3 3 454 324 323 - 312 3 3 452 325 324 - 313 3 3 450 326 325 - 314 3 3 456 323 322 - 315 3 3 430 336 335 - 316 3 3 153 430 432 - 317 3 3 162 414 161 - 318 3 3 160 418 159 - 319 3 3 161 416 160 - 320 3 3 158 422 157 - 321 3 3 436 332 438 - 322 3 3 149 438 440 - 323 3 3 150 436 438 - 324 3 3 438 331 440 - 325 3 3 159 420 158 - 326 3 3 151 434 436 - 327 3 3 157 424 156 - 328 3 3 155 428 154 - 329 3 3 156 426 155 - 330 3 3 153 432 152 - 331 3 3 151 436 150 - 332 3 3 150 438 149 - 333 3 3 152 434 151 - 334 3 3 154 430 153 - 335 3 3 148 149 440 - 336 3 3 147 442 444 - 337 3 3 440 330 442 - 338 3 3 145 446 448 - 339 3 3 444 328 446 - 340 3 3 442 329 444 - 341 3 3 146 444 446 - 342 3 3 143 450 452 - 343 3 3 448 326 450 - 344 3 3 141 454 456 - 345 3 3 452 324 454 - 346 3 3 456 322 458 - 347 3 3 142 452 454 - 348 3 3 450 325 452 - 349 3 3 144 448 450 - 350 3 3 446 327 448 - 351 3 3 140 456 458 - 352 3 3 148 442 147 - 353 3 3 146 446 145 - 354 3 3 147 444 146 - 355 3 3 144 450 143 - 356 3 3 142 454 141 - 357 3 3 141 456 140 - 358 3 3 143 452 142 - 359 3 3 145 448 144 - 360 3 3 139 140 458 - 361 3 3 148 440 442 - 362 3 3 454 323 456 - 363 3 3 321 458 322 - 364 3 3 414 412 344 - 365 3 3 461 44 45 - 366 3 3 465 46 47 - 367 3 3 463 45 46 - 368 3 3 469 48 49 - 369 3 3 473 50 51 - 370 3 3 471 49 50 - 371 3 3 467 47 48 - 372 3 3 234 459 461 - 373 3 3 459 44 461 - 374 3 3 235 461 463 - 375 3 3 463 46 465 - 376 3 3 461 45 463 - 377 3 3 236 463 465 - 378 3 3 238 467 469 - 379 3 3 465 47 467 - 380 3 3 240 471 473 - 381 3 3 469 49 471 - 382 3 3 473 51 475 - 383 3 3 239 469 471 - 384 3 3 467 48 469 - 385 3 3 241 473 475 - 386 3 3 471 50 473 - 387 3 3 237 465 467 - 388 3 3 52 475 51 - 389 3 3 459 43 44 - 390 3 3 477 52 53 - 391 3 3 481 479 54 - 392 3 3 479 53 54 - 393 3 3 483 55 56 - 394 3 3 487 57 58 - 395 3 3 485 56 57 - 396 3 3 481 54 55 - 397 3 3 491 59 60 - 398 3 3 242 475 477 - 399 3 3 477 53 479 - 400 3 3 493 60 61 - 401 3 3 489 58 59 - 402 3 3 495 61 62 - 403 3 3 501 64 65 - 404 3 3 499 63 64 - 405 3 3 497 62 63 - 406 3 3 503 65 66 - 407 3 3 477 475 52 - 408 3 3 243 477 479 - 409 3 3 234 461 235 - 410 3 3 236 465 237 - 411 3 3 235 463 236 - 412 3 3 238 469 239 - 413 3 3 481 55 483 - 414 3 3 246 483 485 - 415 3 3 245 481 483 - 416 3 3 483 56 485 - 417 3 3 237 467 238 - 418 3 3 244 479 481 - 419 3 3 239 471 240 - 420 3 3 241 475 242 - 421 3 3 240 473 241 - 422 3 3 243 479 244 - 423 3 3 245 483 246 - 424 3 3 246 485 247 - 425 3 3 244 481 245 - 426 3 3 242 477 243 - 427 3 3 487 247 485 - 428 3 3 248 487 489 - 429 3 3 485 57 487 - 430 3 3 249 489 491 - 431 3 3 491 60 493 - 432 3 3 489 59 491 - 433 3 3 250 491 493 - 434 3 3 251 493 495 - 435 3 3 495 62 497 - 436 3 3 254 499 501 - 437 3 3 497 63 499 - 438 3 3 493 61 495 - 439 3 3 252 495 497 - 440 3 3 499 64 501 - 441 3 3 253 497 499 - 442 3 3 248 489 249 - 443 3 3 250 493 251 - 444 3 3 249 491 250 - 445 3 3 252 497 253 - 446 3 3 251 495 252 - 447 3 3 253 499 254 - 448 3 3 254 501 255 - 449 3 3 256 255 503 - 450 3 3 255 501 503 - 451 3 3 501 65 503 - 452 3 3 248 247 487 - 453 3 3 487 58 489 - 454 3 3 505 503 66 - 455 3 3 507 67 68 - 456 3 3 511 69 70 - 457 3 3 509 68 69 - 458 3 3 515 71 72 - 459 3 3 519 73 74 - 460 3 3 517 72 73 - 461 3 3 513 70 71 - 462 3 3 257 505 507 - 463 3 3 505 67 507 - 464 3 3 259 509 511 - 465 3 3 507 68 509 - 466 3 3 509 69 511 - 467 3 3 258 507 509 - 468 3 3 260 511 513 - 469 3 3 513 71 515 - 470 3 3 517 73 519 - 471 3 3 515 72 517 - 472 3 3 264 519 521 - 473 3 3 262 515 517 - 474 3 3 519 74 521 - 475 3 3 261 513 515 - 476 3 3 511 70 513 - 477 3 3 263 517 519 - 478 3 3 75 521 74 - 479 3 3 256 503 505 - 480 3 3 523 75 76 - 481 3 3 527 77 78 - 482 3 3 525 76 77 - 483 3 3 531 79 80 - 484 3 3 533 80 81 - 485 3 3 533 531 80 - 486 3 3 529 78 79 - 487 3 3 266 523 525 - 488 3 3 523 76 525 - 489 3 3 268 527 529 - 490 3 3 527 78 529 - 491 3 3 525 77 527 - 492 3 3 265 521 523 - 493 3 3 539 83 84 - 494 3 3 537 82 83 - 495 3 3 86 84 85 - 496 3 3 539 84 86 - 497 3 3 529 79 531 - 498 3 3 535 81 82 - 499 3 3 269 529 531 - 500 3 3 523 521 75 - 501 3 3 267 525 527 - 502 3 3 256 505 257 - 503 3 3 258 509 259 - 504 3 3 257 507 258 - 505 3 3 260 513 261 - 506 3 3 259 511 260 - 507 3 3 261 515 262 - 508 3 3 262 517 263 - 509 3 3 270 531 533 - 510 3 3 263 519 264 - 511 3 3 265 523 266 - 512 3 3 264 521 265 - 513 3 3 267 527 268 - 514 3 3 269 531 270 - 515 3 3 270 533 271 - 516 3 3 268 529 269 - 517 3 3 266 525 267 - 518 3 3 535 271 533 - 519 3 3 272 535 537 - 520 3 3 535 82 537 - 521 3 3 272 537 273 - 522 3 3 539 273 537 - 523 3 3 272 271 535 - 524 3 3 540 539 87 - 525 3 3 539 86 87 - 526 3 3 541 274 540 - 527 3 3 274 273 540 - 528 3 3 540 87 88 - 529 3 3 541 540 88 - 530 3 3 540 273 539 - 531 3 3 537 83 539 - 532 3 3 542 276 275 - 533 3 3 275 274 541 - 534 3 3 543 277 276 - 535 3 3 542 275 541 - 536 3 3 90 542 89 - 537 3 3 542 541 89 - 538 3 3 543 90 91 - 539 3 3 543 542 90 - 540 3 3 544 277 543 - 541 3 3 543 276 542 - 542 3 3 541 88 89 - 543 3 3 544 543 91 - 544 3 3 533 81 535 - 545 3 3 505 66 67 - 546 3 3 460 321 320 - 547 3 3 464 319 318 - 548 3 3 462 320 319 - 549 3 3 468 317 316 - 550 3 3 472 315 314 - 551 3 3 470 316 315 - 552 3 3 466 318 317 - 553 3 3 138 460 462 - 554 3 3 462 319 464 - 555 3 3 137 462 464 - 556 3 3 464 318 466 - 557 3 3 460 320 462 - 558 3 3 136 464 466 - 559 3 3 468 316 470 - 560 3 3 466 317 468 - 561 3 3 470 315 472 - 562 3 3 472 314 474 - 563 3 3 132 472 474 - 564 3 3 134 468 470 - 565 3 3 476 474 313 - 566 3 3 133 470 472 - 567 3 3 474 314 313 - 568 3 3 135 466 468 - 569 3 3 139 458 460 - 570 3 3 478 312 311 - 571 3 3 482 480 310 - 572 3 3 480 311 310 - 573 3 3 484 309 308 - 574 3 3 488 307 306 - 575 3 3 486 308 307 - 576 3 3 482 310 309 - 577 3 3 476 312 478 - 578 3 3 490 306 305 - 579 3 3 129 478 480 - 580 3 3 478 311 480 - 581 3 3 492 305 304 - 582 3 3 131 474 476 - 583 3 3 494 304 303 - 584 3 3 500 301 300 - 585 3 3 498 302 301 - 586 3 3 496 303 302 - 587 3 3 502 300 299 - 588 3 3 476 313 312 - 589 3 3 130 476 478 - 590 3 3 139 460 138 - 591 3 3 137 464 136 - 592 3 3 138 462 137 - 593 3 3 135 468 134 - 594 3 3 482 309 484 - 595 3 3 126 484 486 - 596 3 3 127 482 484 - 597 3 3 484 308 486 - 598 3 3 136 466 135 - 599 3 3 128 480 482 - 600 3 3 134 470 133 - 601 3 3 132 474 131 - 602 3 3 133 472 132 - 603 3 3 130 478 129 - 604 3 3 128 482 127 - 605 3 3 127 484 126 - 606 3 3 129 480 128 - 607 3 3 131 476 130 - 608 3 3 125 126 486 - 609 3 3 124 488 490 - 610 3 3 486 307 488 - 611 3 3 123 490 492 - 612 3 3 492 304 494 - 613 3 3 490 305 492 - 614 3 3 122 492 494 - 615 3 3 121 494 496 - 616 3 3 496 302 498 - 617 3 3 119 498 500 - 618 3 3 498 301 500 - 619 3 3 494 303 496 - 620 3 3 118 500 502 - 621 3 3 500 300 502 - 622 3 3 120 496 498 - 623 3 3 125 488 124 - 624 3 3 123 492 122 - 625 3 3 124 490 123 - 626 3 3 121 496 120 - 627 3 3 119 500 118 - 628 3 3 118 502 117 - 629 3 3 120 498 119 - 630 3 3 122 494 121 - 631 3 3 504 117 502 - 632 3 3 125 486 488 - 633 3 3 488 306 490 - 634 3 3 504 502 299 - 635 3 3 460 458 321 - 636 3 3 506 298 297 - 637 3 3 510 296 295 - 638 3 3 508 297 296 - 639 3 3 514 512 294 - 640 3 3 516 293 292 - 641 3 3 514 294 293 - 642 3 3 512 295 294 - 643 3 3 116 504 506 - 644 3 3 504 298 506 - 645 3 3 114 508 510 - 646 3 3 508 296 510 - 647 3 3 506 297 508 - 648 3 3 115 506 508 - 649 3 3 520 291 290 - 650 3 3 524 289 288 - 651 3 3 522 290 289 - 652 3 3 526 288 287 - 653 3 3 510 295 512 - 654 3 3 518 292 291 - 655 3 3 113 510 512 - 656 3 3 504 299 298 - 657 3 3 545 279 278 - 658 3 3 546 280 279 - 659 3 3 545 278 544 - 660 3 3 93 545 92 - 661 3 3 545 544 92 - 662 3 3 94 546 93 - 663 3 3 546 545 93 - 664 3 3 546 279 545 - 665 3 3 544 91 92 - 666 3 3 547 280 546 - 667 3 3 528 287 286 - 668 3 3 532 285 284 - 669 3 3 530 286 285 - 670 3 3 95 547 94 - 671 3 3 281 280 547 - 672 3 3 548 281 547 - 673 3 3 538 282 281 - 674 3 3 536 283 282 - 675 3 3 547 546 94 - 676 3 3 534 284 283 - 677 3 3 548 547 95 - 678 3 3 115 508 114 - 679 3 3 514 293 516 - 680 3 3 116 506 115 - 681 3 3 111 514 516 - 682 3 3 112 512 514 - 683 3 3 110 516 518 - 684 3 3 518 291 520 - 685 3 3 108 520 522 - 686 3 3 520 290 522 - 687 3 3 522 289 524 - 688 3 3 109 518 520 - 689 3 3 516 292 518 - 690 3 3 107 522 524 - 691 3 3 114 510 113 - 692 3 3 112 514 111 - 693 3 3 113 512 112 - 694 3 3 110 518 109 - 695 3 3 108 522 107 - 696 3 3 107 524 106 - 697 3 3 109 520 108 - 698 3 3 111 516 110 - 699 3 3 526 106 524 - 700 3 3 105 526 528 - 701 3 3 524 288 526 - 702 3 3 104 528 530 - 703 3 3 530 285 532 - 704 3 3 528 286 530 - 705 3 3 103 530 532 - 706 3 3 101 534 536 - 707 3 3 534 283 536 - 708 3 3 99 538 548 - 709 3 3 538 281 548 - 710 3 3 548 95 96 - 711 3 3 100 536 538 - 712 3 3 536 282 538 - 713 3 3 102 532 534 - 714 3 3 532 284 534 - 715 3 3 98 548 96 - 716 3 3 105 528 104 - 717 3 3 103 532 102 - 718 3 3 104 530 103 - 719 3 3 101 536 100 - 720 3 3 99 548 98 - 721 3 3 98 96 97 - 722 3 3 100 538 99 - 723 3 3 102 534 101 - 724 3 3 105 106 526 - 725 3 3 526 287 528 - 726 3 3 116 117 504 - 727 3 3 278 277 544 - 728 3 3 234 233 459 -ENDOFSECTION -ELEMENT GROUP -GROUP: 1 ELEMENTS: 728 MATERIAL: 1 NFLAGS: 1 -fluid -0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100 - 101 102 103 104 105 106 107 108 109 110 - 111 112 113 114 115 116 117 118 119 120 - 121 122 123 124 125 126 127 128 129 130 - 131 132 133 134 135 136 137 138 139 140 - 141 142 143 144 145 146 147 148 149 150 - 151 152 153 154 155 156 157 158 159 160 - 161 162 163 164 165 166 167 168 169 170 - 171 172 173 174 175 176 177 178 179 180 - 181 182 183 184 185 186 187 188 189 190 - 191 192 193 194 195 196 197 198 199 200 - 201 202 203 204 205 206 207 208 209 210 - 211 212 213 214 215 216 217 218 219 220 - 221 222 223 224 225 226 227 228 229 230 - 231 232 233 234 235 236 237 238 239 240 - 241 242 243 244 245 246 247 248 249 250 - 251 252 253 254 255 256 257 258 259 260 - 261 262 263 264 265 266 267 268 269 270 - 271 272 273 274 275 276 277 278 279 280 - 281 282 283 284 285 286 287 288 289 290 - 291 292 293 294 295 296 297 298 299 300 - 301 302 303 304 305 306 307 308 309 310 - 311 312 313 314 315 316 317 318 319 320 - 321 322 323 324 325 326 327 328 329 330 - 331 332 333 334 335 336 337 338 339 340 - 341 342 343 344 345 346 347 348 349 350 - 351 352 353 354 355 356 357 358 359 360 - 361 362 363 364 365 366 367 368 369 370 - 371 372 373 374 375 376 377 378 379 380 - 381 382 383 384 385 386 387 388 389 390 - 391 392 393 394 395 396 397 398 399 400 - 401 402 403 404 405 406 407 408 409 410 - 411 412 413 414 415 416 417 418 419 420 - 421 422 423 424 425 426 427 428 429 430 - 431 432 433 434 435 436 437 438 439 440 - 441 442 443 444 445 446 447 448 449 450 - 451 452 453 454 455 456 457 458 459 460 - 461 462 463 464 465 466 467 468 469 470 - 471 472 473 474 475 476 477 478 479 480 - 481 482 483 484 485 486 487 488 489 490 - 491 492 493 494 495 496 497 498 499 500 - 501 502 503 504 505 506 507 508 509 510 - 511 512 513 514 515 516 517 518 519 520 - 521 522 523 524 525 526 527 528 529 530 - 531 532 533 534 535 536 537 538 539 540 - 541 542 543 544 545 546 547 548 549 550 - 551 552 553 554 555 556 557 558 559 560 - 561 562 563 564 565 566 567 568 569 570 - 571 572 573 574 575 576 577 578 579 580 - 581 582 583 584 585 586 587 588 589 590 - 591 592 593 594 595 596 597 598 599 600 - 601 602 603 604 605 606 607 608 609 610 - 611 612 613 614 615 616 617 618 619 620 - 621 622 623 624 625 626 627 628 629 630 - 631 632 633 634 635 636 637 638 639 640 - 641 642 643 644 645 646 647 648 649 650 - 651 652 653 654 655 656 657 658 659 660 - 661 662 663 664 665 666 667 668 669 670 - 671 672 673 674 675 676 677 678 679 680 - 681 682 683 684 685 686 687 688 689 690 - 691 692 693 694 695 696 697 698 699 700 - 701 702 703 704 705 706 707 708 709 710 - 711 712 713 714 715 716 717 718 719 720 - 721 722 723 724 725 726 727 728 -ENDOFSECTION -BOUNDARY CONDITIONS - Wall 1 176 0 6 - 49 3 3 - 50 3 3 - 52 3 3 - 53 3 3 - 54 3 3 - 55 3 3 - 62 3 2 - 63 3 3 - 65 3 3 - 68 3 3 - 69 3 3 - 70 3 3 - 71 3 3 - 80 3 3 - 81 3 3 - 82 3 3 - 83 3 3 - 84 3 3 - 85 3 3 - 86 3 3 - 87 3 3 - 135 3 3 - 136 3 3 - 137 3 3 - 138 3 3 - 143 3 3 - 145 3 3 - 146 3 3 - 147 3 3 - 148 3 3 - 149 3 3 - 150 3 3 - 151 3 3 - 152 3 3 - 170 3 3 - 171 3 3 - 172 3 3 - 173 3 3 - 174 3 3 - 175 3 3 - 176 3 3 - 177 3 3 - 179 3 1 - 182 3 1 - 189 3 2 - 190 3 3 - 200 3 2 - 203 3 3 - 204 3 2 - 206 3 2 - 207 3 2 - 209 3 2 - 210 3 2 - 211 3 2 - 212 3 2 - 213 3 2 - 216 3 2 - 217 3 2 - 218 3 2 - 219 3 2 - 220 3 2 - 221 3 2 - 222 3 2 - 223 3 2 - 272 3 3 - 273 3 2 - 274 3 2 - 275 3 2 - 276 3 2 - 277 3 2 - 278 3 2 - 279 3 2 - 294 3 2 - 297 3 2 - 299 3 2 - 300 3 2 - 301 3 2 - 302 3 2 - 303 3 2 - 305 3 2 - 308 3 2 - 310 3 2 - 311 3 2 - 312 3 2 - 313 3 2 - 314 3 2 - 315 3 2 - 363 3 3 - 409 3 3 - 410 3 3 - 411 3 3 - 412 3 3 - 417 3 3 - 419 3 3 - 420 3 3 - 421 3 3 - 422 3 3 - 423 3 3 - 424 3 3 - 425 3 3 - 426 3 3 - 442 3 3 - 443 3 3 - 444 3 3 - 445 3 3 - 446 3 3 - 447 3 3 - 448 3 3 - 449 3 1 - 452 3 1 - 502 3 3 - 503 3 3 - 504 3 3 - 505 3 3 - 506 3 3 - 507 3 3 - 508 3 3 - 510 3 3 - 511 3 3 - 512 3 3 - 513 3 3 - 514 3 3 - 515 3 3 - 516 3 3 - 517 3 3 - 521 3 3 - 523 3 1 - 527 3 1 - 532 3 2 - 533 3 1 - 534 3 2 - 546 3 2 - 547 3 2 - 548 3 2 - 549 3 2 - 550 3 2 - 551 3 2 - 552 3 2 - 567 3 2 - 570 3 2 - 572 3 2 - 573 3 2 - 574 3 2 - 575 3 2 - 576 3 2 - 578 3 2 - 581 3 2 - 583 3 2 - 584 3 2 - 585 3 2 - 586 3 2 - 587 3 2 - 588 3 2 - 636 3 2 - 637 3 2 - 638 3 2 - 640 3 2 - 641 3 2 - 642 3 2 - 649 3 2 - 650 3 2 - 651 3 2 - 652 3 2 - 654 3 2 - 656 3 2 - 657 3 2 - 658 3 2 - 667 3 2 - 668 3 2 - 669 3 2 - 671 3 1 - 673 3 2 - 674 3 2 - 676 3 2 - 727 3 1 - 728 3 1 -ENDOFSECTION -BOUNDARY CONDITIONS - Far 1 192 0 6 - 1 3 1 - 1 3 2 - 2 3 2 - 3 3 2 - 4 3 2 - 5 3 2 - 6 3 2 - 7 3 2 - 8 3 1 - 22 3 2 - 24 3 2 - 25 3 2 - 26 3 2 - 27 3 2 - 28 3 2 - 30 3 2 - 37 3 2 - 39 3 2 - 40 3 2 - 43 3 2 - 45 3 2 - 51 3 1 - 56 3 1 - 58 3 2 - 67 3 1 - 91 3 2 - 92 3 2 - 93 3 2 - 94 3 2 - 95 3 2 - 96 3 2 - 97 3 2 - 114 3 3 - 115 3 2 - 116 3 2 - 118 3 2 - 119 3 2 - 120 3 2 - 121 3 2 - 122 3 2 - 123 3 2 - 126 3 2 - 127 3 2 - 128 3 2 - 129 3 2 - 130 3 2 - 131 3 2 - 132 3 2 - 183 3 1 - 185 3 2 - 194 3 1 - 196 3 1 - 205 3 1 - 227 3 1 - 227 3 3 - 228 3 3 - 237 3 3 - 238 3 3 - 239 3 3 - 240 3 3 - 241 3 3 - 242 3 3 - 243 3 3 - 244 3 3 - 260 3 3 - 261 3 3 - 262 3 3 - 263 3 3 - 264 3 3 - 265 3 3 - 266 3 3 - 267 3 1 - 270 3 1 - 317 3 3 - 318 3 3 - 319 3 3 - 320 3 3 - 325 3 3 - 327 3 3 - 328 3 3 - 329 3 3 - 330 3 3 - 331 3 3 - 332 3 3 - 333 3 3 - 334 3 3 - 335 3 1 - 352 3 3 - 353 3 3 - 354 3 3 - 355 3 3 - 356 3 3 - 357 3 3 - 358 3 3 - 359 3 3 - 360 3 1 - 365 3 2 - 366 3 2 - 367 3 2 - 368 3 2 - 369 3 2 - 370 3 2 - 371 3 2 - 388 3 3 - 389 3 2 - 390 3 2 - 392 3 2 - 393 3 2 - 394 3 2 - 395 3 2 - 396 3 2 - 397 3 2 - 400 3 2 - 401 3 2 - 402 3 2 - 403 3 2 - 404 3 2 - 405 3 2 - 406 3 2 - 455 3 2 - 456 3 2 - 457 3 2 - 458 3 2 - 459 3 2 - 460 3 2 - 461 3 2 - 478 3 3 - 480 3 2 - 481 3 2 - 482 3 2 - 483 3 2 - 484 3 2 - 486 3 2 - 493 3 2 - 494 3 2 - 495 3 2 - 495 3 3 - 498 3 2 - 525 3 2 - 528 3 2 - 536 3 3 - 538 3 2 - 542 3 2 - 545 3 2 - 590 3 3 - 591 3 3 - 592 3 3 - 593 3 3 - 598 3 3 - 600 3 3 - 601 3 3 - 602 3 3 - 603 3 3 - 604 3 3 - 605 3 3 - 606 3 3 - 607 3 3 - 608 3 1 - 623 3 3 - 624 3 3 - 625 3 3 - 626 3 3 - 627 3 3 - 628 3 3 - 629 3 3 - 630 3 3 - 660 3 3 - 662 3 3 - 665 3 2 - 670 3 3 - 678 3 3 - 680 3 3 - 691 3 3 - 692 3 3 - 693 3 3 - 694 3 3 - 695 3 3 - 696 3 3 - 697 3 3 - 698 3 3 - 710 3 2 - 716 3 3 - 717 3 3 - 718 3 3 - 719 3 3 - 720 3 3 - 721 3 2 - 721 3 3 - 722 3 3 - 723 3 3 - 724 3 1 - 726 3 1 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Grid/Other/circA01.neu b/cpp/nudg++/trunk/Grid/Other/circA01.neu deleted file mode 100644 index c861c39..0000000 --- a/cpp/nudg++/trunk/Grid/Other/circA01.neu +++ /dev/null @@ -1,113 +0,0 @@ - CONTROL INFO 1.3.0 -** GAMBIT NEUTRAL FILE -USEMe mesh file, generated by function: -WriteNeuFormat(C:\Documents and Settings\timwar\Desktop\circA01.neu) -WinUSEMe beta version Ausgust 2002 - NUMNP NELEM NGRPS NBSETS NDFCD NDFVL - 30 42 1 1 2 2 -ENDOFSECTION - NODAL COORDINATES 1.3.0 - 1 1.000000000e+000 0.000000000e+000 - 2 9.238796234e-001 3.826833963e-001 - 3 7.071068287e-001 7.071068287e-001 - 4 3.826834857e-001 9.238795042e-001 - 5 7.679489755e-008 1.000000000e+000 - 6 -3.826833069e-001 9.238796234e-001 - 7 -7.071067095e-001 7.071068883e-001 - 8 -9.238795042e-001 3.826834857e-001 - 9 -1.000000000e+000 1.535897951e-007 - 10 -9.238796234e-001 -3.826833069e-001 - 11 -7.071068883e-001 -7.071065903e-001 - 12 -3.826836050e-001 -9.238793850e-001 - 13 -2.303846998e-007 -1.000000000e+000 - 14 3.826831877e-001 -9.238796234e-001 - 15 7.071065903e-001 -7.071068883e-001 - 16 9.238793850e-001 -3.826836944e-001 - 17 -4.316749767e-007 -1.164324885e-007 - 18 -9.945613891e-002 5.000000000e-001 - 19 -5.000001788e-001 9.945627302e-002 - 20 -2.832274437e-001 -4.238795936e-001 - 21 2.832270861e-001 -4.238795340e-001 - 22 4.999997616e-001 9.945619106e-002 - 23 3.314354420e-001 4.960280955e-001 - 24 -2.167729586e-001 2.167728543e-001 - 25 -2.832276523e-001 -1.173166558e-001 - 26 -1.869738639e-007 -3.065630496e-001 - 27 2.832269371e-001 -1.173165292e-001 - 28 6.169267297e-001 3.832668364e-001 - 29 1.180048808e-001 7.166358232e-001 - 30 1.140036881e-001 2.825680971e-001 -ENDOFSECTION - ELEMENTS/CELLS 1.3.0 - 1 3 3 10 20 25 - 2 3 3 30 24 17 - 3 3 3 11 12 20 - 4 3 3 29 4 5 - 5 3 3 30 23 18 - 6 3 3 9 19 8 - 7 3 3 21 13 14 - 8 3 3 11 20 10 - 9 3 3 7 18 6 - 10 3 3 7 19 24 - 11 3 3 19 7 8 - 12 3 3 18 23 29 - 13 3 3 13 21 26 - 14 3 3 7 24 18 - 15 3 3 1 22 16 - 16 3 3 28 3 23 - 17 3 3 22 27 16 - 18 3 3 16 21 15 - 19 3 3 26 17 25 - 20 3 3 1 2 22 - 21 3 3 10 19 9 - 22 3 3 5 6 18 - 23 3 3 13 20 12 - 24 3 3 23 22 28 - 25 3 3 4 23 3 - 26 3 3 19 25 24 - 27 3 3 25 17 24 - 28 3 3 21 14 15 - 29 3 3 27 17 26 - 30 3 3 23 30 22 - 31 3 3 10 25 19 - 32 3 3 26 25 20 - 33 3 3 13 26 20 - 34 3 3 27 26 21 - 35 3 3 16 27 21 - 36 3 3 30 27 22 - 37 3 3 22 2 28 - 38 3 3 3 28 2 - 39 3 3 4 29 23 - 40 3 3 5 18 29 - 41 3 3 24 30 18 - 42 3 3 30 17 27 -ENDOFSECTION - ELEMENT GROUP 1.3.0 -GROUP: 1 ELEMENTS: 42 MATERIAL: 1.000 NFLAGS: 0 - epsilon: 1.000 - 0 - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 -ENDOFSECTION - BOUNDARY CONDITIONS 1.3.0 - Dirichlet 1 16 0 0 - 3 3 1 - 4 3 2 - 6 3 3 - 7 3 2 - 8 3 3 - 9 3 3 - 11 3 2 - 15 3 3 - 18 3 3 - 20 3 1 - 21 3 3 - 22 3 1 - 23 3 3 - 25 3 3 - 28 3 2 - 38 3 3 -ENDOFSECTION diff --git a/cpp/nudg++/trunk/Include/ARBCplane2D.h b/cpp/nudg++/trunk/Include/ARBCplane2D.h deleted file mode 100644 index b5ce265..0000000 --- a/cpp/nudg++/trunk/Include/ARBCplane2D.h +++ /dev/null @@ -1,98 +0,0 @@ -// ARBCplane2D.h -// -// 2007/08/27 -//--------------------------------------------------------- -#ifndef NDG__ARBCplane2D_H__INCLUDED -#define NDG__ARBCplane2D_H__INCLUDED - -#include "NDG2D.h" -#include "OpStructs2D.h" // {DGops2D, BCops2D} - - -//--------------------------------------------------------- -class ARBCplane2D : public NDG2D -//--------------------------------------------------------- -{ -public: - ARBCplane2D(); - virtual ~ARBCplane2D(); - virtual void Driver(); - -protected: - - virtual void Run(); - virtual void RHS(); - - virtual void Resize(); - virtual void SetIC(); - virtual void SetStepSize(); - virtual void InitRun(); - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - -protected: - - void BuildOperators(); - void WriteSample(); - void BuildDGops2D(); - void BuildDG1D(double bcnx, double bcny, char coord, double normtol, DGops2D& bc); - void BuildBCops2D(int ne, int np, double delt /* [bcmatrices,aj] */); - - DVec& DGgrad1D (DGops2D& dg, DVec& Q, DVec& bcQ); - DVec& DGpenalty1D(DGops2D& dg, DVec& Q, DVec& bcQ); - - // utility - int CountBCFaces(int bc, const DMat& fnx, const DMat& fny, double bcnx, double bcny, double normtol); - - - //------------------------------------- - // member data - //------------------------------------- - - // select simulation mode - enum { - eBar = 0, - }; - - double alpha, mmode, nmode; - - double delt; - int ne, np; - - - DMat Ex, Ey, Hz; - DMat resEx, resEy, resHz; - DMat rhsEx, rhsEy, rhsHz; - DMat dEx, dEy, dHz; - - DMat Qn, Qe, Qw, Qs, Qne, Qse, Qsw, Qnw; - DMat Qhatn,Qhate,Qhatw,Qhats,Qhatne,Qhatse,Qhatsw,Qhatnw; - DMat resQn,resQe,resQw,resQs,resQne,resQse,resQsw,resQnw; - DMat rhsQn,rhsQe,rhsQw,rhsQs,rhsQne,rhsQse,rhsQsw,rhsQnw; - - DVec sampEx, sampEy, sampHz; - - // stepsize calculation - DVec rLGL, w; - FILE* sampFile; - DVec sampleweights; - int sampletri; - - enum { - eNorth = 0, - eSouth = 1, - eEast = 2, - eWest = 3, - eNBCInfo = 4 - }; - - // struct ARBC arbc; - // struct DGBC dgbc; - - DGops2D dgbc[4]; - BCops2D arbc; - -}; - -#endif // NDG__ARBCplane2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/ArrayGen.h b/cpp/nudg++/trunk/Include/ArrayGen.h deleted file mode 100644 index 8930800..0000000 --- a/cpp/nudg++/trunk/Include/ArrayGen.h +++ /dev/null @@ -1,521 +0,0 @@ -// ArrayGen.h -// -// 2007/02/14 -//--------------------------------------------------------- -#ifndef NDG__ArrayGen_Type_H__INCLUDED -#define NDG__ArrayGen_Type_H__INCLUDED - -#include "Mat_COL.h" - - -// forward declarations: -template class ArrayGen; - -typedef ArrayGen DArray; - -template std::ostream& operator << (std::ostream& os, const ArrayGen& x); -template std::istream& operator >> (std::istream& is, ArrayGen& x); - - -//--------------------------------------------------------- -template -class ArrayGen : public virtual Vector -//--------------------------------------------------------- -{ - // A multi-dimensional array implemented as a simple Vector. - // Multi-dimensional indexing is enabled by subscript operators - // for 1, 2, 3 and LVec indices. The base of each index must - // be set manually (default base is 1). If there are more than - // 3 dimensions, a "LVec" argument needs to be used. Note that - // for arrays of dimension > 1, the first index varies fastest, - // i.e. storage is fortran-compatible column-major. To interface - // with fortran, pass the pointer returned from getPtr0(). - - // - // Member data - // -protected: - - long ndim; // number of dimensions - LVec nm; // length of each dimension, multiple index - LVec bm; // base of each dimension, multiple index - long nm1; // length of 1D - long nm1nm2; // length 1D multiplied with length 2D - long bm0; // helper for subscript operator() - - mutable long local_index; // relative subscripting parameter - - long current_iterator_index; // for iterating over the array entries - long totalLength(const LVec& n); - - void init(long n1); - void init(long n1, long n2); - void init(long n1, long n2, long n3); - void init(const LVec& n); - - bool compatible(const Vector& X) const - { - // compatible if total length the same. - return this->size() == X.size(); - } - - bool compatible(const ArrayGen& a) - { - // compatible if total length the same. - // return this->size() == X.size(); - - bool b = true; - if (this->m_Len != a.m_Len) b = false; - if (nm != a.nm) b = false; - if (bm != a.bm) b = false; - return b; - } - - // Used in subscript functions having a LVec argument. - long elmNo(const LVec& index, long base=0) const - { - long i,r,n; - for (i=1, r=base, n=1; i <= ndim; n *= nm(i), ++i) - { - r += n*index(i); - } - return r; - } - - -public: - - // - // constructors - // - ArrayGen() : Vector() {} - ArrayGen(long n1) : Vector(n1) { init(n1); } - ArrayGen(long n1, long n2) : Vector(n1*n2) { init(n1, n2); } - ArrayGen(long n1, long n2, long n3) : Vector(n1*n2*n3) { init(n1, n2, n3); } - ArrayGen(const LVec& n) : Vector(totalLength(n)) { init(n); } - ArrayGen(const ArrayGen& X) : Vector(X.size()) { init(X.nm); setBase(X.bm); } - - ArrayGen(long n1, long n2, long n3, long n4) - : Vector(n1*n2*n3*n4) - { - LVec idx(4); - idx(1)=n1; idx(2)=n2; - idx(3)=n3; idx(4)=n4; - init(idx); - } - - // - // destructor - // - virtual ~ArrayGen () {} - - - // - // allocation - // - // 1/2/3-dim. arrays, or multiple index - bool resize(long n1) { init(n1); return Vector::resize(n1, 0.0); } - bool resize(long n1, long n2) { init(n1,n2); return Vector::resize(n1*n2, 0.0); } - bool resize(long n1, long n2, long n3) { init(n1,n2,n3); return Vector::resize(n1*n2*n3, 0.0); } - bool resize(const LVec& lvec) { init(lvec); return Vector::resize(totalLength(lvec),0.0); } - bool resize(T* a, long n, long base=0) - { - Vector::resize(n, 0.0); - copy(a); - return *this; - } - - // setBase() - choose arbitrary base for the index of each dimension. - void setBase(long b1) { assert(ndim >= 1); bm(1)=b1; bm0 = 1 - b1; } - void setBase(long b1, long b2) { assert(ndim >= 2); bm(1)=b1; bm(2)=b2; bm0 = 1 - nm1*b2 - b1; } - void setBase(long b1, long b2, long b3) { assert(ndim >= 3); bm(1)=b1; bm(2)=b2; bm(3)=b3; bm0 = 1 - nm1nm2*b3 - nm1*b2 - b1; } - void setBase(const LVec& b) - { - assert(ndim == b.size()); - bm.resize (ndim, 0); - bm = b; - // set bm0 = 1 - b(1) - nm(1)*b(2) - nm(1)*nm(2)*b(3) ... - bm0 = 1-bm(1); - long n = 1; - for (long i = 1; i < ndim; ++i) { - n *= nm(i); - bm0 -= n*bm(i+1); - } - } - - // getBase() and getMaxI() allow one to determine the - // lower and upper bounds on loops involving ArrayGen - // objects. getDim() finds the length of the loops. - - // lower index: - void getBase(long& b1) const { assert(ndim >= 1); b1 = bm(1); } - void getBase(long& b1, long& b2) const { assert(ndim >= 2); b1 = bm(1); b2 = bm(2); } - void getBase(long& b1, long& b2, long& b3) const { assert(ndim >= 3); b1 = bm(1); b2 = bm(2); b3 = bm(3); } - void getBase(LVec& b) const { b.resize(ndim, 0); b = bm; } - - // upper index: - void getMaxI(long& n1) const { assert(ndim >= 1); n1 = nm(1) + bm(1) - 1; } - void getMaxI(long& n1, long& n2) const { assert(ndim >= 2); n1=nm(1)+bm(1) - 1; n2=nm(2)+bm(2)-1; } - void getMaxI(long& n1, long& n2, long& n3) const { assert(ndim >= 3); n1=nm(1)+bm(1)-1; n2=nm(2)+bm(2)-1; n3=nm(3)+bm(3)-1; } - void getMaxI(LVec& n) const { assert(ndim >= n.size()); n.resize(ndim, 0); for (long i = 1; i <= ndim; i++) n(i) = nm(i) + bm(i) - 1; } - - long getNoIndices() const { return ndim; } - - // length of each dimension: - void getDim(long& n1) const { assert(ndim >= 1); n1 = nm1; } - void getDim(long& n1, long& n2) const { assert(ndim >= 2); n1 = nm(1); n2 = nm(2); } - void getDim(long& n1, long& n2, long& n3) const { assert(ndim >= 3); n1 = nm(1); n2 = nm(2); n3 = nm(3); } - void getDim(LVec& n) const { assert(ndim >= n.size()); n.resize(ndim,0); n = nm; } - - // for singleIndex1 -#ifndef NDEBUG - void indexOk1(long i) const { assert(i >= 1 && i <= this->m_Len); } - void indexOk (long i) const { assert( ndim == 1 ); assert( i>=bm(1) && i<=bm(1)+nm(1)-1); } - void indexOk (long i, long j) const { assert( ndim == 2 ); assert( i >= bm(1) && i <= bm(1)+nm(1)-1); assert( j >= bm(2) && j <= bm(2)+nm(2)-1); } - void indexOk (long i, long j, long k) const { assert( ndim == 3 ); assert( i >= bm(1) && i <= bm(1)+nm(1)-1); assert( j >= bm(2) && j <= bm(2)+nm(2)-1); assert( k >= bm(3) && k <= bm(3)+nm(3)-1); } - void indexOk (const LVec& index) const { assert( ndim == index.size()); for (long k=1; k<=index.size(); ++k) assert( index(k) >= bm(k) && index(k) <= bm(k)+nm(k)-1); } -#else - void indexOk1(long i) const {} - void indexOk (long i) const {} - void indexOk (long i, long j) const {} - void indexOk (long i, long j, long k) const {} - void indexOk (const LVec& index) const {} -#endif - - - std::string arraySize() const { return std::string("NOT_IMPLEMENTED...[0,0]x[0,0]"); } - - // singleIndex1() enables indexing the n-dimensional array with - // a single index. Avoids separate loops over each dimension. - T& singleIndex1(long i) { indexOk1(i); return this->vm1_[i]; } - const T& singleIndex1(long i) const { indexOk1(i); return this->vm1_[i]; } - - //--------------------------------------------- - // return the single index element number: - // i returns (i-bm(1) + 1); - // ij returns ((j-bm(2))*nm(1) + i-bm(1) + 1); - // ijk returns ((k-bm(3))*nm(1)*nm(2) + (j-bm(2))*nm(1) + i-bm(1) + 1); - //--------------------------------------------- - long multiple2single(long i) const { return i + bm0; } // (i-bm(1)+1); - long multiple2single(long i, long j) const { return j*nm1 + i + bm0; } // (j-bm(2))*nm(1) + i-bm(1)+1; - long multiple2single(long i, long j, long k) const { return k*nm1nm2 + j*nm1 + i + bm0; } // (k-bm(3))*nm(1)*nm(2) + (j-bm(2))*nm(1) + i-bm(1)+1; - long multiple2single(const LVec& index) const { return elmNo(index,bm0); } - - long length1D() const { return nm1; } - long length1Dx2D() const { return nm1nm2;} - - // set a local reference index : - void setLocalIndex(long i) const { indexOk(i); local_index = multiple2single(i); } - void setLocalIndex(long i, long j) const { indexOk(i,j); local_index = multiple2single(i,j); } - void setLocalIndex(long i, long j, long k) const { indexOk(i,j,k); local_index = multiple2single(i,j,k); } - void setLocalIndex(const LVec& index) const { indexOk(index); local_index = multiple2single(index); } - - // getLocalIndex() returns the single index, - // corresponding to element number in base Vector. - long getLocalIndex() const { return local_index; } - - // subscript the neighbors of the local index : - T& local(long i) { indexOk1(local_index+i); return this->vm1_[local_index+i]; } - const T& local(long i) const { indexOk1(local_index+i); return this->vm1_[local_index+i]; } - T& local(long i, long j) { indexOk1(local_index + nm1*j + i); return this->vm1_[local_index + nm1*j + i]; } - const T& local(long i, long j) const { indexOk1(local_index + nm1*j + i); return this->vm1_[local_index + nm1*j + i]; } - T& local(long i, long j, long k) { indexOk1(local_index + nm1nm2*k + nm1*j + i); return this->vm1_[local_index + nm1nm2*k + nm1*j + i]; } - const T& local(long i, long j, long k) const { indexOk1(local_index + nm1nm2*k + nm1*j + i); return this->vm1_[local_index + nm1nm2*k + nm1*j + i]; } - T& local(const LVec& index) { long r = elmNo(index,local_index); indexOk1(r); return this->vm1_[r]; } - const T& local(const LVec& index) const { long r = elmNo(index,local_index); indexOk1(r); return this->vm1_[r]; } - - //------------------------------------- - // indexing operators : - //------------------------------------- - T& operator()(long i) { indexOk(i); return this->vm1_[multiple2single(i)]; } - const T& operator()(long i) const { indexOk(i); return this->vm1_[multiple2single(i)]; } - T& operator()(long i, long j) { indexOk(i,j); return this->vm1_[multiple2single(i,j)]; } - const T& operator()(long i, long j) const { indexOk(i,j); return this->vm1_[multiple2single(i,j)]; } - T& operator()(long i, long j, long k) { indexOk(i,j,k); return this->vm1_[multiple2single(i,j,k)]; } - const T& operator()(long i, long j, long k) const { indexOk(i,j,k); return this->vm1_[multiple2single(i,j,k)]; } - T& operator()(const LVec& index) { indexOk(index); return this->vm1_[multiple2single(index)]; } - const T& operator()(const LVec& index) const { indexOk(index); return this->vm1_[multiple2single(index)]; } - - T& operator()(long i, long j, long k, long l) - { - LVec idx(4); - idx(1)=i; idx(2)=j; - idx(3)=k; idx(4)=l; - indexOk(idx); return this->vm1_[multiple2single(idx)]; - } - const T& operator()(long i, long j, long k, long l) const - { - LVec idx(4); - idx(1)=i; idx(2)=j; - idx(3)=k; idx(4)=l; - indexOk(idx); return this->vm1_[multiple2single(idx)]; - } - - // startIterator() starts an iteration over all the array entries. - void startIterator() { current_iterator_index = 0; } - - // nextEntry() moves a pointer to the next entry in the array. - // Returns true if there is a next entry, else false. - bool nextEntry() - { - current_iterator_index++; - return (current_iterator_index >= 1 && current_iterator_index <= this->m_Len) ? true : false; - } - - // thisEntry() returns a reference to the current entry. - const T& thisEntry() const { - // read-only version - assert(current_iterator_index >= 1 && current_iterator_index <= this->m_Len); - return this->vm1_[current_iterator_index]; - } - - T& thisEntry () { - // read-write version - assert(current_iterator_index >= 1 && current_iterator_index <= this->m_Len); - return this->vm1_[current_iterator_index]; - } - - - ArrayGen& operator=(T a) { fill(a); return *this; } - - ArrayGen& operator=(const ArrayGen& a) - { - ndim = a.ndim; - nm = a.nm; - bm = a.bm; - nm1 = a.nm1; - nm1nm2 = a.nm1nm2; - bm0 = a.bm0; - - Vector::operator=(a); - return *this; - } - - void fill(const T& a) { Vector::operator=(a); } - void fill(const Vector& X) { Vector::operator=(X); } - void fill(T start, T stop) { Vector::fill(start,stop); } - - void set_slice(int k, const Mat_COL& Q) - { - umMSG(1, "DArray: setting array slice %d\n", k); - } - - //####################################################### - void get_slice(int k, Mat_COL& Q) const - //####################################################### - { - assert(3==ndim); // only deal with slices of 3d arrays - assert(k<=nm(3)); // nm(3) is number of slices in array - - umMSG(1, "DArray: returning array slice %d\n", k); - - int M=nm(1), N=nm(2); - int idx = (k-1) * (M*N); // idx is offset to kth slice - Q.load(M,N, this->v_[idx]); - } - - - //####################################################### - Mat_COL& get_slice(int k) const - //####################################################### - { - assert(3==ndim); // only deal with slices of 3d arrays - assert(k<=nm(3)); // nm(3) is number of slices in array - - umMSG(1, "DArray: returning array slice %d\n", k); - std::string sz = umOFORM("%s(slice:%d)", this->name(), k); - - int M=nm(1), N=nm(2); - int idx = (k-1) * (M*N); // idx is offset to kth slice - - Mat_COL *tmp=new Mat_COL(M,N, this->v_[idx], OBJ_temp, sz.c_str()); - return (*tmp); - } - - - void print ( - std::ostream& os, - const char* header = NULL, - long nentries_per_line = 3, - // dec places : [ 4] ios::fixed - long prec = 4, // sig figures: [ 4] ios::scientific - long wdth = 12 // spacing [12] - ) const; - - - friend std::ostream& operator << <> (std::ostream& os, const ArrayGen& x); - friend std::istream& operator >> <> (std::istream& is, ArrayGen& x); -}; - - -void printAsIndex(std::ostream& os, const LVec& X); -long sv_single2multiple(long single, long loop_length, long prod_loop_length); -void single2multiple(long single, LVec& multiple, const LVec& loop_length, const LVec& prod_loop_length, const LVec& loop_base); - - -// Initialization -template inline -long ArrayGen::totalLength (const LVec& n) -{ - const long nsd = n.size(); - long ntot = 1; - for (long i = 1; i <= nsd; i++) - ntot *= n(i); - - return ntot; -} - - -template inline -void ArrayGen::init(long n1) -{ - ndim = 1; - nm.resize(ndim); - bm.resize(ndim); - bm = 1; // fill(1); // base = 1 - bm0 = 0; - nm(1) = n1; - nm1 = n1; - nm1nm2 = 0; - local_index = bm0; -} - - -template inline -void ArrayGen::init(long n1, long n2) -{ - ndim = 2; - nm.resize(ndim); - bm.resize(ndim); - bm = 1; // fill(1); // base = 1 - bm0 = -n1; - nm(1) = nm1 = n1; - nm(2) = n2; - nm1nm2= n1*n2; - local_index = bm0; -} - - -template inline -void ArrayGen::init(long n1, long n2, long n3) -{ - ndim = 3; - nm.resize(ndim); - bm.resize(ndim); - bm = 1; // fill(1); // base = 1 - bm0 = -n1*n2 - n1; - - nm(1) = nm1 = n1; - nm(2) = n2; - nm(3) = n3; - nm1nm2= n1*n2; - local_index = bm0; -} - - -template inline -void ArrayGen::init(const LVec& n) -{ - ndim = n.size(); - nm.resize(ndim, 0); - bm.resize(ndim, 0); - bm = 1; // fill(1); // base = 1 - nm = n; - nm1 = nm(1); - - if (ndim >= 2) nm1nm2 = nm(1)*nm(2); - else nm1nm2=0; - - bm0 = 1-bm(1); - long nn = 1; - - for (long i = 1; i < ndim; ++i) - { - nn*=nm(i); - bm0 -= nn*bm(i+1); - } - local_index = bm0; -} - - -template -std::ostream& operator << (std::ostream& os, const ArrayGen& x) -{ - x.print(os); - return os; -} - - -template -std::istream& operator >> (std::istream& is, ArrayGen& x) -{ - umWARNING("operator >> (std::istream&, ArrayGen&)", "Not implemented yet."); - return is; -} - - -template -void ArrayGen::print -( - std::ostream& os, - const char* header, // [NULL] - long nentries_per_line, // [ 3] - // dec places : [ 4] ios::fixed - long prec, // sig figures: [ 4] ios::scientific - long wdth // spacing [12] -) const -{ - std::string header_str = header != NULL ? header : ""; - bool text = (header != NULL); - long i, j, k; - - if (this->size()<1) - return; - - if (text) - os << "\n[" << this->m_Len << "] " << header_str.c_str() << " $\n"; - - //------------------------------------- - // Find max index value (not used) - //------------------------------------- - long maxi = -10000; - bool negative = false; - for (i = 1; i <= ndim; i++) { - if (maxi < abs(bm(i)+nm(i)-1)) { - maxi = abs(bm(i)+nm(i)-1); - if (bm(i)+nm(i)-1 < 0) - negative = true; - } - } - - LVec idx (ndim); - LVec prod (ndim); - for (j = 1; j <= ndim; j++) - { - prod(j) = 1; - for (k = 1; k <= j-1; k++) - prod(j) *= nm(k); - } - - os << std::setiosflags(std::ios::fixed); - os << std::setprecision(prec); - - for (i = 1; i <= this->m_Len; i++) - { - single2multiple (i, idx, nm, prod, bm); - if (text) { - // write index - printAsIndex(os, idx); - os << '='; - } - os << std::setw(wdth) << operator()(idx) << " "; - if ((i % nentries_per_line) == 0) - os << '\n'; - } - if (bm.size() != 1) - os << '\n'; - os.flush(); -} - - -#endif // NDG__ArrayGen_Type_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/ArrayMacros.h b/cpp/nudg++/trunk/Include/ArrayMacros.h deleted file mode 100644 index b9c52a7..0000000 --- a/cpp/nudg++/trunk/Include/ArrayMacros.h +++ /dev/null @@ -1,262 +0,0 @@ -// ArrayMacros.h -// -// 2007/09/20 -//--------------------------------------------------------- -#ifndef NDG__ArrayMacros_H__INCLUDED -#define NDG__ArrayMacros_H__INCLUDED - -#define USE_SSE2 0 -#define UNROLL_LOOPS 1 -#define RGN_BASE_OFFSET (1) - -// select Cholesky solver -// #define NDG_USE_CHOLMOD -#undef NDG_USE_CHOLMOD - - -#ifndef NDEBUG -#define CHECK_ARRAY_INDEX 1 -#else -#define CHECK_ARRAY_INDEX 0 -#endif - -// trace allocation/release of arrays -#ifndef NDEBUG -# define SHOW_D_ALLOC 1 -# define SHOW_SP_ALLOC 1 -# define USE_ARRAY_NAMES 1 -#else -# define SHOW_D_ALLOC 0 -# define SHOW_SP_ALLOC 0 -# define USE_ARRAY_NAMES 1 -#endif - -#include -#include - -//--------------------------------------- -// OS-dependent items -//--------------------------------------- -#if defined(WIN32) && !defined(__CYGWIN__) - #define snprintf _snprintf -#endif - -#include "LOG_funcs.h" - - -// -// STRUCT: MATLAB binary output data -// -typedef struct { - long type; // matrix type - long m; // # rows - long n; // # cols - long imag; // is complex? - long namlen; // length of variable name -} umMATLAB; - - -// -// ENUM: object modes -// -typedef enum { - OBJ_temp = 0, // temporary, ownership to be transfered - OBJ_real = 1 // normal object -} OBJ_mode; - - -// -// ENUM: sort order -// -typedef enum { - eDescend = 0, - eAscend = 1 -} eDir; - - -// -// ENUM: matrix orientation -// -typedef enum { - MajorROW = 0, - MajorCOL = 1 -} eMajor; - - -// select section of matrix -enum { - sp_LT = -1, // lower triangle - sp_All = 0, // entire matrix - sp_UT = 1 // upper triangle -}; - - -// flags to indicate shape of matrix -enum { - sp_NONE = 0, // arbitrary entries - sp_LOWER = 1, // entries only in lower triangle - sp_UPPER = 2, // entries only in upper triangle - sp_TRIANGULAR = 4, // entries only in one triangle - sp_SYMMETRIC = 8 // symmetric, but only one triangle stored -}; - - -// -// ENUM: Norm types -// -typedef enum { - NORM_l1, // sqrt( sum_i^n abs(v_i)) - NORM_L1, // sqrt((1/n)sum_i^n abs(v_i)) - BLAS_l2, // sqrt( sum_i^n v_i^2) - BLAS_L2, // sqrt((1/n)sum_i^n v_i^2) - NORM_Linf // L-infinity norm -} norm_type; - - -// -// ENUM: factorization mode -// -typedef enum { - FACT_NONE, // LU without pivots - FACT_CHOL, // Cholesky: LL' - FACT_CHOL_D, // Cholesky: LDL' - FACT_LU, // LU without pivots - FACT_LUP, // LU with pivots - FACT_QR, // QR without pivots - FACT_QRP // QR with pivots -} fact_type; - - -// -// ENUM: boolean operations -// -typedef enum { - B_lt, // < - B_le, // <= - B_gt, // > - B_ge, // >= - B_and, // && - B_or // || -} B_type; - - -// -// ENUM: orientation (not used) -// -typedef enum { - MAT_ident = 0, // identity - MAT_trans = 1 // transpose -} MAT_mode; - - -// -// ENUM: data mode for array constructors -// -typedef enum { - SZ_DATA_VEC = 0, // load ASCII data into vector - SZ_DATA_MAT_ROWS = 1, // load data into matrix by ROWS - SZ_DATA_MAT_COLS = 2 // load data into matrix by COLS -} SZ_DATA_mode; - - -// -// orientation of array data -// -class ArrayData { -public: - ArrayData() : m_mode(SZ_DATA_VEC) {} - virtual ~ArrayData() {} - SZ_DATA_mode mode() const { return m_mode; } - SZ_DATA_mode m_mode; -}; -class MatRowData : public ArrayData { -public: - MatRowData() { m_mode = SZ_DATA_MAT_ROWS; } - virtual ~MatRowData() {} -}; -class MatColData : public ArrayData { -public: - MatColData() { m_mode = SZ_DATA_MAT_COLS; } - virtual ~MatColData() {} -}; -class MatDimension : public ArrayData { -public: - MatDimension() { m_mode = SZ_DATA_VEC; } - virtual ~MatDimension() {} -}; - - -extern ArrayData gVecData; -extern MatRowData gRowData; -extern MatColData gColData; -extern MatDimension All; - - -// utilities used by struct facedata -inline int* umIVector(int L) {return (int*)calloc(std::max(L,1),sizeof(int));} -inline int* umIVectorExtend(int *v, int L) {return (int*)realloc(v,sizeof(int)*std::max(L,1));} -inline void umIVectorFree(int*& v) {if (v) {free(v); v=NULL;} } - - -//--------------------------------------- -inline const char* mode_str(OBJ_mode mode) -//--------------------------------------- -{ - static std::string msg; - switch (mode) { - case OBJ_temp: msg = "-tmp"; break; - case OBJ_real: msg = " reg"; break; - default: msg = "????"; break; - } - return msg.c_str(); -} - - -//--------------------------------------- -inline const char* tmp_op_name -( - const char* s1, - const char* op, - const char* s2, - std::string& name -) -//--------------------------------------- -{ -#ifndef NDEBUG - - static char buf[300]={""}; - static int sID=0; - ++sID; - - snprintf(buf, (size_t)298, "%s%s%s", s1,op,s2); -//sprintf (buf, "%s%s%s", s1,op,s2); - -#else - - static char buf[3]={"X"}; - -#endif - - name = buf; - return buf; -} - - -//--------------------------------------------------------- -// Some systems may not have abs() min(), and max() -//--------------------------------------------------------- -#undef USE_ABS_MIN_MAX -#ifdef USE_ABS_MIN_MAX -{ - inline double abs(double t) { return ( t > 0 ? t : -t); } - inline double min(double a, double b) { return (a < b ? a : b); } - inline double max(double a, double b) { return (a > b ? a : b); } - inline float abs(float t) { return ( t > 0 ? t : -t); } - inline float min(float a, float b) { return (a < b ? a : b); } - inline float max(float a, float b) { return (a > b ? a : b); } - inline double sign(double a) { return (a > 0 ? 1.0 : -1.0); } - inline float sign(float a) { return (a > 0.0 ? 1.0f : -1.0f); } -} -#endif - -#endif // NDG__ArrayMacros_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/BlasLapack.h b/cpp/nudg++/trunk/Include/BlasLapack.h deleted file mode 100644 index 87a62d3..0000000 --- a/cpp/nudg++/trunk/Include/BlasLapack.h +++ /dev/null @@ -1,147 +0,0 @@ -// BlasLapack.h -// Declare subset of BLAS/LAPACK -// 2007/09/15 -//--------------------------------------------------------- -#ifndef NDG__umBlasLapack_H__INCLUDED -#define NDG__umBlasLapack_H__INCLUDED - -#include - -#ifdef _MSC_VER // NBN: testing AMD's ACML -#define USE_ACML 1 -#else -#undef USE_ACML -#endif - -#ifdef USE_ACML - - // Declare wrappers for ACML versions of BLAS/LAPACK routines - #include "Blas_ACML.h" - #undef UNDERSCORE - #define NOUNDERSCORE - #define F77name(X,UX) X - -#else - - // NBN: Win32 ATLAS, MKL - #if defined(WIN32) && !defined(__CYGWIN__) - #ifndef UNDERSCORE - #define UNDERSCORE - #endif - #elif defined(USE_MKL) - #ifndef NOUNDERSCORE - #define NOUNDERSCORE - #endif - #endif - - #if defined(UNDERSCORE) - #define F77name(X,UX) X ## _ - #elif defined(PREUNDERSCORE) - #define F77name(X,UX) _ ## X ## _ - #elif defined(NOUNDERSCORE) - #define F77name(X,UX) X - #endif - -extern "C" { - - double F77name(dasum,DASUM)(const int& n, const double* x, const int& incx); - double F77name(dnrm2,DNRM2)(const int& n, const double* x, const int& incx); - double F77name(ddot, DDOT )(const int& n, const double* x, const int& incx, const double* y, const int& incy); - - void F77name(daxpy,DAXPY)(const int& n, const double& alpha, const double* x, const int& incx, /*const*/ double* y, const int& incy); - void F77name(dscal,DSCAL)(const int& n, const double& alpha, /*const*/ double* x, const int& incx); - void F77name(dcopy,DCOPY)(const int& n, const double* x, const int& incx, /*const*/ double* y, const int& incy); - - // General: - void F77name(dgemm,DGEMM)(const char& transa,const char& transb, const int& m, const int& n, const int& k, const double& alpha, const double* A, const int& lda, const double* B, const int& ldb, const double& beta, const double* C, const int& ldc); - void F77name(dgemv,DGEMV)(const char& trans, const int& m, const int& n, const double& alpha, const double* A, const int& lda, const double* x, const int& incx, const double& beta, const double* y, const int& incy); - - // Banded: - void F77name(dgbmv,DGBMV)(const char& trans, const int& m, const int& n, const int& kl, const int& ku, const double& alpha, const double* A, const int& lda, const double* x, const int& incx, const double& beta, const double* y, const int& incy); - void F77name(dsbmv,DSBMV)(const char& uplo, const int& n, const int& kl, const double& alpha, const double* A, const int& lda, const double* x, const int& incx, const double& beta, const double* y, const int& incy); - - // Symmetric - void F77name(dsyrk,DSYRK)(const char& uplo, const char& transa, const int& n, const int& k, const double& alpha, const double *a, const int& lda, const double& beta, double *c, const int& ldc); - void F77name(dtrsm,DTRSM)(const char& side, const char& uplo, const char& transa, const char& diag, const int& m, const int& n, const double& alpha, double *a, const int& lda, double *b, const int& ldb); - - // LAPACK: - void F77name(dgesvd,DGESVD)(const char& jobu, const char& jobvt, const int& m, const int& n, const double* A, const int& lda, const double* w, const double* U, const int& ldu, const double* vt, const int& ldvt, const double* work, const int& lwork, int& info); - void F77name(dgetri,DGETRI)(const int& n, const double* A, const int& lda, const int* ipiv, const double* work, const int& lwork, int& info); - void F77name(dgetrf,DGETRF)(const int& m, const int& n, const double* A, const int& lda, const int* ipiv, int& info); - void F77name(dgetrs,DGETRS)(const char& trans,const int& n, const int& nrhs, const double* A, const int& lda, const int* perm, double* x, const int& ldx, int& info); - - void F77name(dgbtrf,DGBTRF)(const int& m, const int& n, const int& kl, const int& ku, const double* A, const int& lda, const int* perm , int& info); - void F77name(dgbtrs,DGBTRS)(const char& trans,const int& n, const int& kl, const int& ku, const int& nrhs, const double* A, const int& lda, const int* perm, const double* x, const int& ldx, int& info); - void F77name(dgelss,DGELSS)(const int& m, const int& n, const int& nrhs, const double* A, const int& lda, const double* b, const int& ldb, const double* s, const double& rcond, const int& rank, const double* work, const int& lwork, int& info); - - // solve via LU factorization - void F77name(dgesv, DGESV )(const int& n, const int& nrhs, double *A, const int& lda, int *ipiv, double *B, const int& ldb, int& info); - // solve via Cholesky factorization - void F77name(dposv, DPOSV )(const char& uplo, const int& n, const int& nrhs, double *A, const int& lda, double *B, const int& ldb, int& info); - void F77name(dpotrf,DPOTRF)(const char& uplo, const int& n, double *A, const int& lda, int& info); - void F77name(dpotrs,DPOTRS)(const char& uplo, const int& n, const int& nrhs, double *A, const int& lda, double *b, const int& ldb, int& INFO); - - // qr factorization - void F77name(dgeqrf,DGEQRF)(const int& m, const int& n, double *a, const int& lda, double *tau, int& info); - - void F77name(dpbtrf,DPBTRF)(const char& uplo, const int& n, const int& kd, double* AB, const int& ldab, int& info); - void F77name(dpbtrs,DPBTRS)(const char& uplo, const int& n, const int& kd, const int& nrhs, const double* AB, const int& ldab, double* b, const int& ldb, int& info); - void F77name(dgeev, DGEEV )(const char& jobvl,const char& jobvr,const int& n, const double* a, const int& lda, double* wr, double* wi, double* vl, const int& ldvl, double* vr, const int& ldvr, double* work, const int& lwork, int& info); - void F77name(dsyev, DSYEV )(const char& jobz, const char& uplo, const int& n, double* a, const int& lda, double* w, double* work, const int& lwork, int& info); - void F77name(dgecon,DGECON)(const char& NORM, const int& N, double *A, const int& LDA, const double& ANORM, double& RCOND, double *WORK, int *IWORK, int& info); - - void F77name(zgemm, ZGEMM)(const char& transa,const char& transb, const int& m, const int& n, const int& k, const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, const std::complex& beta, std::complex* C, const int& ldc); - void F77name(zgecon, ZGECON)(const char &norm, const int &N, std::complex* A, const int &ldA, const double &anorm, double &rcond, std::complex* work, double *rwork, int &info); - void F77name(zgetrf, ZGETRF)(const int &M, const int &N, std::complex* A, const int &ldA, int *ipiv, int &info); -} - -#endif - - -//--------------------------------------- -// BLAS: -//--------------------------------------- -#define ASUM F77name(dasum,DASUM) -#define AXPY F77name(daxpy,DAXPY) -#define SCAL F77name(dscal,DSCAL) -#define COPY F77name(dcopy,DCOPY) -#define NRM2 F77name(dnrm2,DNRM2) -#define DOT F77name(ddot,DDOT) -#define GEMV F77name(dgemv,DGEMV) -#define GEMM F77name(dgemm,DGEMM) -#define GBMV F77name(dgbmv,DGBMV) -#define SBMV F77name(dsbmv,DSBMV) - -#define SYRK F77name(dsyrk,DSYRK) -#define TRSM F77name(dtrsm,DTRSM) - -#define ZGEMM F77name(zgemm,ZGEMM) -#define ZGECON F77name(zgecon,ZGECON) -#define ZGETRF F77name(zgetrf,ZGETRF) - -//--------------------------------------- -// LAPACK: -//--------------------------------------- -#define GESVD F77name(dgesvd,DGESVD) -#define GETRF F77name(dgetrf,DGETRF) -#define GETRI F77name(dgetri,DGETRI) -#define GETRS F77name(dgetrs,DGETRS) -#define GBTRF F77name(dgbtrf,DGBTRF) -#define GBTRS F77name(dgbtrs,DGBTRS) -#define GELSS F77name(dgelss,DGELSS) - -#define GESV F77name(dgesv, DGESV) -#define POSV F77name(dposv, DPOSV) -#define POTRF F77name(dpotrf,DPOTRF) -#define POTRS F77name(dpotrs,DPOTRS) - -#define GEQRF F77name(dgeqrf,DGEQRF) - -#define PBTRF F77name(dpbtrf,DPBTRF) -#define PBTRS F77name(dpbtrs,DPBTRS) -#define GEEV F77name(dgeev, DGEEV) -#define SYEV F77name(dsyev, DSYEV) - -#define GECON F77name(dgecon,DGECON) - -#endif // NDG__umBlasLapack_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Blas_ACML.h b/cpp/nudg++/trunk/Include/Blas_ACML.h deleted file mode 100644 index 9cd79a3..0000000 --- a/cpp/nudg++/trunk/Include/Blas_ACML.h +++ /dev/null @@ -1,271 +0,0 @@ -// Blas_ACML.h -// Wrappers for ACML BLAS/LAPACK -// 2007/09/15 -//--------------------------------------------------------- -#ifndef NDG__umBlas_ACML_H__INCLUDED -#define NDG__umBlas_ACML_H__INCLUDED - -// Wrappers for AMD's ACML -#ifdef USE_ACML - -//--------------------------------------------------------- -// Declare ACML versions of extern C BLAS routines -//--------------------------------------------------------- -extern "C" { - - extern double __cdecl dasum(int n, double *x, int incx); - extern double __cdecl dnrm2(int n, double *x, int incx); - extern double __cdecl ddot(int n, double *x, int incx, double *y, int incy); - extern void __cdecl daxpy(int n, double alpha, double *x, int incx, double *y, int incy); - extern void __cdecl dscal(int n, double alpha, double *y, int incy); - void dcopy(int n, double *x, int incx, double *y, int incy); - - // General: - extern void __cdecl dgemm(char transa, char transb, int m, int n, int k, double alpha, double *a, int lda, double *b, int ldb, double beta, double *c, int ldc); - extern void __cdecl dgemv(char transa, int m, int n, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); - - // Banded: - extern void __cdecl dgbmv(char transa, int m, int n, int nsub, int nsuper, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); - extern void __cdecl dsbmv(char uplo, int n, int ndiag, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); - - - extern void __cdecl dsyrk(char uplo, char transa, int n, int k, double alpha, double *a, int lda, double beta, double *c, int ldc); - - extern void __cdecl dtrsm(char side, char uplo, char transa, - char diag, int m, int n, double alpha, double *a, int lda, - double *b, int ldb); - - - // LAPACK: - extern void __cdecl dgesvd(char jobu, char jobvt, int m, int n, double *a, int lda, double *sing, double *u, int ldu, double *vt, int ldvt, int *info); - extern void __cdecl dgetri(int n, double *a, int lda, int *ipiv, int *info); - extern void __cdecl dgetrf(int m, int n, double *a, int lda, int *ipiv, int *info); - extern void __cdecl dgetrs(char transa, int n, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); - - extern void __cdecl dgbtrf(int m, int n, int nsub, int nsuper, double *a, int lda, int *ipiv, int *info); - extern void __cdecl dgbtrs(char transa, int n, int nsub, int nsuper, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); - extern void __cdecl dgelss(int m, int n, int nrhs, double *a, int lda, double *b, int ldb, double *sing, double rcond, int *irank, int *info); - - extern void __cdecl dgesv(int n, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); - extern void __cdecl dposv(char uplo, int n, int nrhs, double *a, int lda, double *b, int ldb, int *info); - extern void __cdecl dpotrf(char uplo, int n, double *a, int lda, int *info); - extern void __cdecl dpotrs(char uplo, int n, int nrhs, double *a, int lda, double *b, int ldb, int *info); - - // qr factorization - extern void __cdecl dgeqrf(int m, int n, double *a, int lda, double *tau, int *info); - - extern void __cdecl dpbtrf(char uplo, int n, int ndiag, double *a, int lda, int *info); - extern void __cdecl dpbtrs(char uplo, int n, int ndiag, int nrhs, double *a, int lda, double *b, int ldb, int *info); - extern void __cdecl dgeev(char jobvl, char jobvr, int n, double *a, int lda, double *wr, double *wi, double *vl, int ldvl, double *vr, int ldvr, int *info); - extern void __cdecl dsyev(char jobz, char uplo, int n, double *a, int lda, double *w, int *info); - - extern void __cdecl dgecon(char norm, int n, double *a, int lda, double anorm, double *rcond, int *info); - - typedef struct { - double real, imag; - } umDOUBLECOMPLEX; -//extern void __cdecl zgemm(char transa, char transb, int m, int n, int k, std::complex *alpha, std::complex *a, int lda, std::complex *b, int ldb, std::complex *beta, std::complex *c, int ldc); - extern void __cdecl zgemm(char transa, char transb, int m, int n, int k, umDOUBLECOMPLEX *alpha, umDOUBLECOMPLEX *a, int lda, umDOUBLECOMPLEX *b, int ldb, umDOUBLECOMPLEX *beta, umDOUBLECOMPLEX *c, int ldc); - - extern void __cdecl zgecon(char norm, int n, std::complex *a, int lda, double anorm, double *rcond, int *info); - - extern void __cdecl zgetrf(int m, int n, std::complex *a, int lda, int *ipiv, int *info); - extern void __cdecl zgetri(int n, std::complex *a, int lda, int *ipiv, int *info); - extern void __cdecl zgetrs(char transa, int n, int nrhs, std::complex *a, int lda, int *ipiv, std::complex *b, int ldb, int *info); - -} // extern "C" - - -//--------------------------------------------------------- -// Define wrappers as required... -//--------------------------------------------------------- - -// inline double dasum(int n, double *x, int incx); -// inline double dnrm2(int n, double *x, int incx); - -inline double ddot(const int& n, const double* x, const int& incx, const double* y, const int& incy) -{ - return ddot(n, (double*)x, incx, (double*)y, incy); -} - -// inline void daxpy(int n, double alpha, double *x, int incx, double *y, int incy); -inline void dcopy(const int& n, const double* x, const int& incx, double* y, const int& incy) -{ - dcopy(n, (double*)x, incx, y, incy); -} - -// inline void dscal(int n, double alpha, double *y, int incy); - -// General: -inline void dgemm(const char& transa,const char& transb, const int& m, const int& n, const int& k, - const double& alpha, const double* A, const int& lda, const double* B, const int& ldb, const double& beta, const double* C, const int& ldc) -{ - dgemm(transa, transb, m, n, k, alpha, - (double*)A, lda, - (double*)B, ldb, beta, - (double*)C, ldc); -} - -inline void dgemv(const char& trans, const int& m, const int& n, const double& alpha, const double* A, const int& lda, const double* x, const int& incx, const double& beta, const double* y, const int& incy) -{ - dgemv(trans, m, n, alpha, (double*)A, lda, (double*)x, incx, beta, (double*)y, incy); -} - -// Banded: -// inline void dgbmv(char transa, int m, int n, int nsub, int nsuper, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); -// inline void dsbmv(char uplo, int n, int ndiag, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); -inline void dsbmv(const char& uplo, const int& n, const int& kl, const double& alpha, const double* A, const int& lda, const double* x, const int& incx, const double& beta, const double* y, const int& incy) -{ - char UPLO=uplo; int N=n, KL=kl, LDA=lda, INCX=incx, INCY=incy; - double ALPHA=alpha, BETA=beta; - dsbmv(UPLO, N, KL, ALPHA, (double*)A, LDA, (double*)x, INCX, beta, (double*)y, INCY); -} - - - -// LAPACK: -inline void dgesvd(const char& jobu, const char& jobvt, const int& m, const int& n, const double* A, const int& lda, const double* w, const double* U, const int& ldu, const double* vt, const int& ldvt, const double* work, const int& lwork, int& info) -{ - int INFO=0; - dgesvd(jobu, jobvt, m, n, (double*)A, lda, (double*)w, (double*)U, ldu, (double*)vt, ldvt, &INFO); - info=INFO; -} - -inline void dgetrf(const int& m, const int& n, const double* A, const int& lda, const int* ipiv, int& info) -{ - int INFO=0; - dgetrf(m, n, (double*)A, lda, (int*)ipiv, &INFO); - info=INFO; -} -// inline void dgetri(int n, double *a, int lda, int *ipiv, int *info); -inline void dgetrs(const char& trans,const int& n, const int& nrhs, const double* A, const int& lda, - const int* perm, const double* x, const int& ldx, int& info) -{ - int INFO=0; - dgetrs(trans, n, nrhs, (double*)A, lda, (int*)perm, (double*)x, ldx, &INFO); - info=INFO; -} - -// inline void dgbtrf(int m, int n, int nsub, int nsuper, double *a, int lda, int *ipiv, int *info); -// inline void dgbtrs(char transa, int n, int nsub, int nsuper, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); - -inline void dgelss(const int& m, const int& n, const int& nrhs, const double* A, const int& lda, const double* b, const int& ldb, - const double* s, const double& rcond, const int& rank, const double* work, const int& lwork, int& info) -{ - int INFO=0, RANK=rank; - dgelss(m, n, nrhs, (double*)A, lda, (double*)b, ldb, (double*)s, rcond, &RANK, &INFO); - info=INFO; -} - -inline void dgesv(const int& n, const int& nrhs, double *A, const int& lda, int *ipiv, double *B, const int& ldb, int& info) -{ - int INFO=0; - dgesv(n, nrhs, A, lda, ipiv, B, ldb, &INFO); - info=INFO; -} - - -inline void dposv(const char& uplo, const int& n, const int& nrhs, double *A, const int& lda, double *B, const int& ldb, int& info) -{ - int INFO=0; - dposv(uplo, n, nrhs, A, lda, B, ldb, &INFO); - info=INFO; -} - -inline void dpotrf(const char& uplo, const int& n, double *A, const int& lda, int& info) -{ - int INFO=0; - dpotrf(uplo, n, A, lda, &INFO); - info=INFO; -} - -inline void dpotrs(const char& uplo, const int& n, const int& nrhs, const double *A, const int& lda, const double *b, const int& ldb, int& info) -{ - int INFO=0; - dpotrs(uplo, n, nrhs, (double*)A, lda, (double*)b, ldb, &INFO); - info=INFO; -} - - -inline void dgeqrf(const int& m, const int& n, double *a, const int& lda, double *tau, int& info) -{ - int INFO=0; - dgeqrf(m, n, a, lda, tau, &INFO); - info=INFO; -} - - -inline void dpbtrf(const char& uplo, const int& n, const int& kd, double* AB, const int& ldab, int& info) -{ - int INFO=0; - dpbtrf(uplo, n, kd, AB, ldab, &INFO); - info=INFO; -} - -inline void dpbtrs(const char& uplo, const int& n, const int& kd, const int& nrhs, const double* AB, const int& ldab, double* b, const int& ldb, int& info) -{ - int INFO=0; - dpbtrs(uplo, n, kd, nrhs, (double*)AB, ldab, b, ldb, &INFO); - info=INFO; -} - -inline void dgeev(const char& jobvl,const char& jobvr,const int& n, const double* a, const int& lda, double* wr, double* wi, double* vl, const int& ldvl, double* vr, const int& ldvr, double* work, const int& lwork, int& info) -{ - int INFO=0; - dgeev(jobvl, jobvr, n, (double*)a, lda, wr, wi, vl, ldvl, vr, ldvr, &INFO); - info=INFO; -} - -inline void dsyev(const char& jobz, const char& uplo, const int& n, double* a, const int& lda, double* w, double* work, const int& lwork, int& info) -{ - int INFO=0; - dsyev(jobz, uplo, n, a, lda, w, &INFO); - info=INFO; -} - -inline void dgecon(const char& NORM, const int& N, double *A, const int& lda, const double& anorm, double& rcond, double *WORK, int *IWORK, int& info) -{ - int INFO=0; - double RCOND=rcond; - dgecon(NORM, N, (double*)A, lda, anorm, &RCOND, &INFO); - rcond=RCOND; - info=INFO; -} - -inline void zgemm(const char& transa,const char& transb, const int& m, const int& n, const int& k, const std::complex& alpha, const std::complex* A, const int& lda, const std::complex* B, const int& ldb, const std::complex& beta, std::complex* C, const int& ldc) -{ -#ifdef USE_ACML - - umERROR("ACML's zgemm", "FIXME: incompatible interface"); - - umDOUBLECOMPLEX ALPHA; // = alpha; - umDOUBLECOMPLEX BETA; // = beta; - zgemm(transa, transb, m, n, k, &ALPHA, - (umDOUBLECOMPLEX*)A, lda, - (umDOUBLECOMPLEX*)B, ldb, &BETA, - (umDOUBLECOMPLEX*)C, ldc); -#endif -} - - -inline void zgecon(const char &norm, const int &N, std::complex* A, const int &ldA, const double &anorm, double &rcond, std::complex* work, double *rwork, int& info) -{ - int INFO=0; - double RCOND=rcond; - zgecon(norm, N, A, ldA, anorm, &RCOND, &INFO); - rcond=RCOND; - info=INFO; -} - -inline void zgetrf(const int &m, const int &n, std::complex* A, const int &ldA, int *ipiv, int& info) -{ - int INFO=0; - zgetrf(m, n, A, ldA, ipiv, &INFO); - info=INFO; -} - -// inline void zgetri(int n, std::complex *a, int lda, int *ipiv, int *info); -// inline void zgetrs(char transa, int n, int nrhs, std::complex *a, int lda, int *ipiv, std::complex *b, int ldb, int *info); - -#endif // USE_ACML -#endif // NDG__umBlas_ACML_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CHOLMOD_solver.h b/cpp/nudg++/trunk/Include/CHOLMOD_solver.h deleted file mode 100644 index 33163a9..0000000 --- a/cpp/nudg++/trunk/Include/CHOLMOD_solver.h +++ /dev/null @@ -1,49 +0,0 @@ -// CHOLMOD_solver.h -// Test wrapper for CHOLMOD -// 2007/06/06 -//--------------------------------------------------------- -#ifndef NDG__CHOLMOD_solver_H__INCLUDED -#define NDG__CHOLMOD_solver_H__INCLUDED - - -#include "cholmod.h" -#include "CS_Type.h" - -//--------------------------------------------------------- -class CHOLMOD_solver -//--------------------------------------------------------- -{ -public: - - CHOLMOD_solver(); - CHOLMOD_solver(const CSd &mat, double droptol=0.0); - virtual ~CHOLMOD_solver(); - - void reset(); - void init_common(); - - // interface compatibility - int num_rows() const { return m_M; } - int num_cols() const { return m_N; } - void set_droptol(double d) { drop_tol = d; } - void write_matlab(const char* sz) const; - - // load/factor/solve - bool load(const CSd& mat); - void chol(const CSd &mat, int dummy=1, double droptol=0.0); - DVec& solve(const DVec &b); - -protected: - bool initialized; - double drop_tol; - int m_status, m_NNZ, m_M, m_N; - - cholmod_sparse *A; - cholmod_factor *L; - cholmod_dense *x, *b; // solution, rhs - cholmod_common Common, *cm; - - DVec B, X; // rhs, solution -}; - -#endif // INCLUDED diff --git a/cpp/nudg++/trunk/Include/CS_SpReg2D.h b/cpp/nudg++/trunk/Include/CS_SpReg2D.h deleted file mode 100644 index 037c7ea..0000000 --- a/cpp/nudg++/trunk/Include/CS_SpReg2D.h +++ /dev/null @@ -1,488 +0,0 @@ -// CS_SpReg2D.h -// 2D sub-regions of sparse matrices -// 2007/09/28 -//--------------------------------------------------------- -#ifndef NDG__CS_SpReg2D_H__INCLUDED -#define NDG__CS_SpReg2D_H__INCLUDED - -//#include -//#include - -#include "ArrayMacros.h" -#include "Index.h" - - -//--------------------------------------------------------- -template -class SpReg2D -//--------------------------------------------------------- -{ -protected: - - SpMat & A_; - int offset_[2]; // 0-based - int dim_[2]; - -public: - - // typedef's for std::compatibility - - // data type of referenced array - typedef typename SpMat::m_data_type T; - -//typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - T m_ZERO; - - SpMat & array() { return A_; } - const SpMat & array() const { return A_; } - - int lbound() const { return 1; } - int size() const { return A_.size(); } - int num_rows() const { return dim_[0]; } - int num_cols() const { return dim_[1]; } - const char* name() const { return A_.name(); } - - int offset(int i) const // 1-offset - { -#if (CHECK_ARRAY_INDEX) - assert( A_.lbound() <= i); - assert( i<= dim_[0] + A_.lbound()-1); -#endif - return offset_[i-A_.lbound()]; - } - - - SpReg2D(SpMat &A, int i1, int i2, - int j1, int j2) - : A_(A), m_ZERO(T(0)) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( A.lbound() <= i1); - assert( i2<= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= j1); - assert( j2<= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = i1-A.lbound(); - offset_[1] = j1-A.lbound(); - dim_[0] = i2-i1+1; - dim_[1] = j2-j1+1; - } - - SpReg2D(SpMat &A, const Index1D &I, const int j) - : A_(A), m_ZERO(T(0)) - { - // This region will be part of a sparse column - // m_mode = eCol; - -#if (CHECK_ARRAY_INDEX) - assert( I.lbound() <= I.ubound() ); - assert( A.lbound() <= I.lbound() ); - assert( I.ubound() <= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= j ); - assert( j <= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = I.lbound() - A.lbound(); - offset_[1] = j - A.lbound(); - dim_[0] = I.ubound() - I.lbound() + 1; - dim_[1] = 1; - } - - - SpReg2D(SpMat &A, const int i, const Index1D &J) - : A_(A), m_ZERO(T(0)) - { - // This region will be part of a sparse row - // m_mode = eRow; - -#if (CHECK_ARRAY_INDEX) - assert( J.lbound() <= J.ubound() ); - assert( A.lbound() <= i ); - assert( i <= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= J.lbound() ); - assert( J.ubound() <= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = i - A.lbound(); - offset_[1] = J.lbound() - A.lbound(); - dim_[0] = 1; - dim_[1] = J.ubound() - J.lbound() + 1; - } - - - - SpReg2D(SpMat &A, const Index1D &I, - const Index1D &J) - : A_(A), m_ZERO(T(0)) - { -#if (CHECK_ARRAY_INDEX) - assert( I.lbound() <= I.ubound() ); - assert( J.lbound() <= J.ubound() ); - assert( A.lbound() <= I.lbound() ); - assert( I.ubound() <= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= J.lbound() ); - assert( J.ubound() <= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = I.lbound()-A.lbound(); - offset_[1] = J.lbound()-A.lbound(); - dim_[0] = I.ubound() - I.lbound() + 1; - dim_[1] = J.ubound() - J.lbound() + 1; - } - - - SpReg2D(SpReg2D &A, int i1, int i2, - int j1, int j2) - : A_(A.A_), m_ZERO(T(0)) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( A.lbound() <= i1); - assert( i2 <= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= j1); - assert( j2 <= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = (i1 - A.lbound()) + A.offset_[0]; - offset_[1] = (j1 - A.lbound()) + A.offset_[1]; - dim_[0] = i2-i1 + 1; - dim_[1] = j2-j1 + 1; - } - - SpReg2D operator()(int i1, int i2, - int j1, int j2) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( A_.lbound() <= i1); - assert( i2 <= dim_[0] + A_.lbound()-1); - assert( A_.lbound() <= j1); - assert( j2 <= dim_[1] + A_.lbound()-1 ); -#endif - - return SpReg2D(A_, i1+offset_[0], offset_[0] + i2, - j1+offset_[1], offset_[1] + j2); - } - - - SpReg2D operator()(const Index1D &I, const Index1D &J) - { -#if (CHECK_ARRAY_INDEX) - assert( I.lbound() <= I.ubound() ); - assert( J.lbound() <= J.ubound() ); - assert( A_.lbound()<= I.lbound()); - assert( I.ubound() <= dim_[0] + A_.lbound()-1); - assert( A_.lbound()<= J.lbound()); - assert( J.ubound() <= dim_[1] + A_.lbound()-1 ); -#endif - - return SpReg2D(A_, I.lbound()+offset_[0], - offset_[0] + I.ubound(), offset_[1]+J.lbound(), - offset_[1] + J.ubound()); - } - - - inline T& operator()(int i, int j) - { -#if (CHECK_ARRAY_INDEX) - assert( A_.lbound() <= i); - assert( i <= dim_[0] + A_.lbound()-1); - assert( A_.lbound() <= j); - assert( j <= dim_[1] + A_.lbound()-1 ); -#endif - -#if (THIS_IS_READY) - return A_(i+offset_[0], j+offset_[1]); -#else - return m_ZERO; -#endif - } - - inline const T& operator() (int i, int j) const - { -#if (CHECK_ARRAY_INDEX) - assert( A_.lbound() <= i); - assert( i<= dim_[0] + A_.lbound()-1); - assert( A_.lbound() <= j); - assert( j<= dim_[1] + A_.lbound()-1 ); -#endif - -#if (THIS_IS_READY) - return A_(i+offset_[0], j+offset_[1]); -#else - return m_ZERO; -#endif - } - - - SpReg2D& operator=(const SpReg2D &R) - { - int M = num_rows(); - int N = num_cols(); - - // make sure both sides conform - assert(M == R.num_rows()); - assert(N == R.num_cols()); - - int start = R.lbound(); - int Mend = start + M - 1; - int Nend = start + N - 1; - -#if (THIS_IS_READY) - //################################### - for (int j=start; j<=Nend; ++j) - for (int i=start; i<=Mend; ++i) - (*this)(i,j) = R(i,j); - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - - - SpReg2D& operator=(const SpMat &R) - { - int M = num_rows(); - int N = num_cols(); - - // make sure both sides conform - assert(M == R.num_rows()); - assert(N == R.num_cols()); - - int start = R.lbound(); - int Mend = start + M - 1; - int Nend = start + N - 1; - -#if (THIS_IS_READY) - //################################### - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) = R(i,j); - //################################### -#endif // (THIS_IS_READY) - - // if R is temporary, delete it. - if (R.get_mode() == OBJ_temp) - delete (&R); - - return *this; - } - - SpReg2D& operator=(const Vector &V) - { - int M=num_rows(), N=num_cols(), len=V.length(); - bool load_col = true; int ir=0,jc=0,i=0,j=0; - - // load a dense vector into a region of - // one column or row of a sparse matrix - - if (1==N) { - // load a region of one column - load_col = true; - if (len!=M) { umERROR("Sparse region = Vector", "vector has length %d, expected %d", len, M); } - } else if (1==M) { - // load a region of one row - load_col = false; - if (len!=N) { umERROR("Sparse region = Vector", "vector has length %d, expected %d", len, M); } - } else { - umERROR("Sparse region = Vector", "region is (%d,%d), expected 1d region", M, N); - } - - if (load_col) { - j=1; // jc = 1+offset_[1]; - for (i=1; i<=len; ++i) { // load region of a sparse column - ir = i+offset_[0]; - jc = j+offset_[1]; - A_.set1(ir, jc, V(i)); - } - } else { - i=1; // ir = 1+offset_[0]; - for (j=1; j<=len; ++j) { // load region of a sparse row - ir = i+offset_[0]; - jc = j+offset_[1]; - A_.set1(ir, jc, V(i)); - } - } - - if (V.get_mode() == OBJ_temp) delete (&V); // cleanup - - return *this; - } - - - //------------------------------------- - // Apply scalar to each mapped element - //------------------------------------- - - SpReg2D& operator=(const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - -#if (THIS_IS_READY) - //################################### - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) = t; - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - - SpReg2D& operator *= (const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - -#if (THIS_IS_READY) - //################################### - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) *= t; - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - - SpReg2D& operator /= (const T& t) - { - assert (T(0) != t); - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - -#if (THIS_IS_READY) - //################################### - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) /= t; - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - - SpReg2D& operator += (const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - -#if (THIS_IS_READY) - //################################### - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) += t; - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - - SpReg2D& operator -= (const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - -#if (THIS_IS_READY) - //################################### - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) -= t; - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - - - //####################################################### - // arithmetic operators +,-,*,/ - //####################################################### - SpReg2D & operator+=(const SpReg2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - -#if (THIS_IS_READY) - //################################### - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) += R(i,j); - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - - SpReg2D & operator-=(const SpReg2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - -#if (THIS_IS_READY) - //################################### - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) -= R(i,j); - //################################### -#endif // (THIS_IS_READY) - - return *this; - } - -}; - - -//--------------------------------------------------------- -// std::ostream algorithms -//--------------------------------------------------------- - - -template -std::ostream& operator<<(std::ostream &s, const SpReg2D &A) -{ -#if (THIS_IS_READY) - //################################### - - int start = A.lbound(); - int Mend=A.lbound()+ A.num_rows() - 1; - int Nend=A.lbound() + A.num_cols() - 1; - - s << A.num_rows() << " " << A.num_cols() << "\n"; - for (int i=start; i<=Mend; ++i) { - for (int j=start; j<=Nend; ++j) { - s << A(i,j) << " "; - } - s << "\n"; - } - - //################################### -#endif // (THIS_IS_READY) - - s.flush(); - return s; -} - -#endif // NDG__CS_SpReg2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CS_Type.h b/cpp/nudg++/trunk/Include/CS_Type.h deleted file mode 100644 index 4eb7f87..0000000 --- a/cpp/nudg++/trunk/Include/CS_Type.h +++ /dev/null @@ -1,2905 +0,0 @@ -// CS_Type.h -// low-level routines on CS structures -// 2007/10/11 -//--------------------------------------------------------- -#ifndef NDG__CS_Type_H__INCLUDED -#define NDG__CS_Type_H__INCLUDED - -#include "Mat_COL.h" -#include "LOG_funcs.h" -#include "CS_Utils.h" - -// TODO: regions of sparse matrices -#include "CS_SpReg2D.h" - - -// typedef versions for certain data types -template class CS; - -// forward -class CSS; - -typedef CS CSd; -typedef CS CSz; -typedef CS CSi; - -// define pointers to "keep" functions -typedef int (*KeepFunc)(int, int, double, void *); - -#define CS_READY_4_THIS 0 -#define USE_SPARSE_THREADS 0 -//######################################################### -// FIXME: See SSMULT re sorting row indices -// http://www.cise.ufl.edu/research/sparse/ssmult/SSMULT/ -#define CS_ROWS_ARE_SORTED 1 // FIXME: row indices not sorted? -//######################################################### - - -// forward -template inline CS& trans (const CS &A, int values=1); -template inline CS& trans2(const CS &A, int values=1); -template inline CS& perm(const CS &A, const IVec& pinv, const IVec& q, int values); - - -//--------------------------------------------------------- -template class CS -//--------------------------------------------------------- -{ -public: - - int nzmax; // maximum number of entries - int m; // number of rows - int n; // number of columns - IVec P; // column pointers (size n+1) or col indices (size nzmax) - IVec I; // row indices, size nzmax - - Vector X; // numerical values, size nzmax - - int nz; // if (triplet) nz stores num entries, - // if (is_csc ) nz must be -1 - - int m_mode; // {OBJ_real,OBJ_temp} - int m_values; // data as well as structure? - int m_shape; // lower/upper/triangular/symmetric? - - std::string m_name; // string identifier - static int sp_count; // track number of objects - -public: - - typedef T m_data_type; // for SpReg2D< SpMat > - - - CS(const char* sz="CS", int mode = OBJ_real); - CS(int Nr, int Nc, int nzmax, int values, int triplet, int mode=OBJ_real, const char* sz="CS"); - CS(const CS& B); - CS(const CS& B, int mode, const char* sz, int values); - virtual ~CS(); - - bool ok() const; - void reset(); - void resize(int Nr, int Nc, int nzmax, int values, int triplet); - bool realloc(int max_nz, bool bCheck=true); - CS& own(const CS& B, int values=1); - - int num_rows() const { return m; } - int num_cols() const { return n; } - int lbound() const { return 1; } // base for operator(i,j) - int dim(int d) const { return (d==1)?m:((d==2)?n:0); } - int size() const { return is_csc() ? nzmax : nz; } - int nnz() const { return is_csc() ? nzmax : nz; } - int get_sp_count() const { return sp_count; } - - const char* name() const { return m_name.c_str(); } - void set_name(const char* sz) { m_name = sz; } - int get_mode() const { return m_mode; } - void set_mode(int mode) { m_mode = mode; } - int get_shape() const { return m_shape; } - void set_shape(int flag) { m_shape = flag; } - bool is_square() const { return (m == n); } - bool is_zero() const { return is_csc() ? (P[n]<1) : (nz<1); } - bool is_triplet() const { return (nz >= 0 ); } - bool is_csc() const { return (-1 == nz); } - bool is_compatible(const CS &B) const { return (B.num_rows()==m && B.num_cols()==n); } - - T operator()(int i, int j) const; - T& operator()(int i, int j); - - CS& operator = (const CS& B); - void copy(const CS& B, int values=1); - - void add_val (const T& x); - void mult_val(const T& x); - void div_val (const T& x) { if (x != T(0)) { mult_val(T(1)/x); } - else { umERROR("CS::div_val", "division by zero"); }} - - CS& operator += (const T& x) { add_val ( x); return (*this); } - CS& operator -= (const T& x) { add_val (-x); return (*this); } - CS& operator *= (const T& x) { mult_val( x); return (*this); } - CS& operator /= (const T& x) { div_val ( x); return (*this); } - - - CS& operator += (const CS& B); - CS& operator -= (const CS& B); - CS& operator *= (const CS& B); - - // FIXME: implement solvers - CS& operator /= (const CS& B) { return (*this); } - CS& operator |= (const CS& B) { return (*this); } - - //------------------------------------- - // cs_* routines - //------------------------------------- - - int val_idx(int i, int j) const; // Note: !CS_ROWS_ARE_SORTED - CS& compress(bool bSort=false); - CS& compress(const CS& B, bool bSort=false); - double cumsum(IVec& c, int Nc); - cs_dp* dmperm(int seed) const; - void dropdiag(); - int dropsort(double tol=0.0); // drop + sort - int droptol(double tol=0.0); // drop small entries - int dupl(); - bool entry(int i, int j, T x); // add 0-based (i,j) to matrix - bool set1 (int i, int j, T x); // add 1-based (i,j) to matrix - int ereach(int k, const IVec& parent, int *s, int *w); - IVec& etree(int ata) const; - CS& identity(int Ni, bool pack=true); - int is_tri() const; - IMat& find2D(char op, T val) const; - int fkeep(KeepFunc fK, void *other); - void gaxpy(const Vector& x, Vector& y) const; // y += Ax - void gxapy(const Vector& x, Vector& y) const; // y += xA - - void load(FILE *fp); - void load(int Nr, int Nc, IVec& ir, IVec& jc, Vector& Ax, - int part=sp_All, bool forceSym=true, double tol=0.0, - bool free_args=false); // release {ir,jc, Ax}? - - CS& make_tri_sym(); - bool maxtrans(IVec& jimatch, int seed) const; - double nonsymmetry() const; - T norm() const; - T norm1() const { return norm(); } - CS& permute(const IVec& pinv, const IVec& q, int values=1); - CS& permuteP(const IVec& pinv, int values=1); - CS& permuteQ(const IVec& q, int values=1); - void print(bool brief=true); - void scale(const CS& B); - int scatter(int j, T beta, IVec& w, Vector& x, int mark, CS& C, int Nz) const; - cs_dp* SCC(); - void spy(const char* msg) const; - CS& symperm(const IVec& pinv, int values); - CS& transpose(int values); - void write_ML(FILE* fp) const; - - //------------------------------------- - // Debug utilities - //------------------------------------- -#ifndef NDEBUG - // 1-based indexing - #define CS_BOUNDS_CHECK(i, iLO, iHI) \ - assert((int)(iLO) <= (int)(i )); \ - assert((int)(i ) <= (int)(iHI)); - //------------------------------------- - #define CS_BOUNDS_CHECK_IJ(i, j) \ - CS_BOUNDS_CHECK(i, 1, (this->m)); \ - CS_BOUNDS_CHECK(j, 1, (this->n)); - //------------------------------------- - #define CS_BOUNDS_CHECK_00(i, j) \ - CS_BOUNDS_CHECK(i, 0, (this->m-1)); \ - CS_BOUNDS_CHECK(j, 0, (this->n-1)); - //------------------------------------- -#else - // no checking - #define CS_BOUNDS_CHECK(i, iLO, iHI) - #define CS_BOUNDS_CHECK_IJ(i, j) - #define CS_BOUNDS_CHECK_00(i, j) -#endif - - //------------------------------------------------------- - // operations involving (contiguous) Region1D - //------------------------------------------------------- -public: - SpReg2D< CS > operator()(const Index1D &I, const Index1D &J); - SpReg2D< CS > operator()(const Index1D &I, int j); -//SpReg1D< CS > operator()(const Index1D &I, int j); -//SpReg1D< CS > operator()(const Index1D &I); -//SpReg1D< CS > operator()(const MatDimension&, int j); -//SpReg2D< CS > operator()(int i, const MatDimension&); - -}; - - -template inline -SpReg2D< CS > -CS::operator()(const Index1D &I, const Index1D &J) -{ - // return a 2D region of (*this) - return SpReg2D< CS >(*this, I,J); -} - -template inline -SpReg2D< CS > -CS::operator()(const Index1D &I, int j) -{ - // return a 2D region of (*this) - return SpReg2D< CS >(*this, I,j); -} - - - -/////////////////////////////////////////////////////////// -// -// define static member data -// -/////////////////////////////////////////////////////////// - -// allow toggling of allocation tracing in debug mode -template int CS::sp_count=0; - - - -/////////////////////////////////////////////////////////// -// -// CS member functions -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template -CS::CS(const char* sz, int mode) -//--------------------------------------------------------- - : nzmax(0), m(0), n(0), P("P"), I("I"), X("X"), nz(0), - m_mode(mode), m_values(0), m_shape(sp_NONE), m_name(sz) -{ - ++sp_count; - //umTRC(2, "+++ CS ctor (1) +++ : name: %s, count: %d\n", name(), sp_count); -} - - -//--------------------------------------------------------- -template -CS::CS(int Nr, int Nc, int nzmax, int values, int triplet, int mode, const char* sz) -//--------------------------------------------------------- - : nzmax(0), m(0), n(0), P("P"), I("I"), X("X"), nz(0), - m_mode(mode), m_values(0), m_shape(sp_NONE), m_name(sz) -{ - ++sp_count; - resize(Nr, Nc, nzmax, values, triplet); - //umTRC(2, "+++ CS ctor (2) +++ : name: %s, count: %d\n", name(), sp_count); -} - - -//--------------------------------------------------------- -template -CS::CS(const CS& B) //, int mode, const char* sz, int values) -//--------------------------------------------------------- - : nzmax(0), m(0), n(0), P("P"), I("I"), X("X"), nz(0), - m_mode(OBJ_real), m_values(B.m_values), m_shape(B.m_shape), m_name("CS") -{ - ++sp_count; - this->copy(B, B.m_values); - //umTRC(2, "+++ CS ctor (3) +++ : name: %s, count: %d\n", name(), sp_count); -} - - -//--------------------------------------------------------- -template -CS::CS(const CS& B, int mode, const char* sz, int values) -//--------------------------------------------------------- - : nzmax(0), m(0), n(0), P("P"), I("I"), X("X"), nz(0), - m_mode(mode), m_values(values), m_shape(sp_NONE), m_name(sz) -{ - ++sp_count; - this->copy(B, values); - //umTRC(2, "+++ CS ctor (4) +++ : name: %s, count: %d\n", name(), sp_count); -} - - -//--------------------------------------------------------- -template -CS::~CS() -//--------------------------------------------------------- -{ - --sp_count; - this->reset(); // force full deallocation of arrays - //umTRC(2, " CS dtor --- : name: %s, count: %d\n", name(), sp_count); -} - - -//--------------------------------------------------------- -template inline -T CS::operator()(int i, int j) const -//--------------------------------------------------------- -{ - // 1-based public interface: - // if entry (i,j) exists in sparsity pattern, - // return its value, else return 0. - - assert(is_csc()); // only implemented for compressed form - CS_BOUNDS_CHECK_IJ(i,j); // 1-based interface - int idx = val_idx(i-1,j-1); // 0-based storage - if (idx < 0) { - return (T)0; - } - assert(idx < P[n]); // check index is valid - return X[idx]; -} - - -//--------------------------------------------------------- -template inline -T& CS::operator()(int i, int j) -//--------------------------------------------------------- -{ - static T tZ = 0; - // if entry (i,j) exists in current sparsity pattern - // return a reference to it. However... - - // TODO: non-const version allows changes to both the - // element values and the sparsity structure - - if ( is_csc() ) { - umERROR("CS::operator()(i,j)", "compressed form is read-only"); - } else if ( !is_csc() ) { - umERROR("CS::operator()(i,j)", "triplet form is read-only"); - } - - //####################################################### - // FIXME: transitional operation! - //####################################################### - // Version 1: allow duplicates; sum when compressing - // add entry(i,j) - // if entry (i,j) is not in the sparsity pattern of - // a csc matrix, it is very expensive to insert it. - // for now, treat a missing entry as an error. - //####################################################### - - assert(is_csc()); // only implemented for compressed form - CS_BOUNDS_CHECK_IJ(i,j); // 1-based interface - int idx = val_idx(i-1,j-1); // 0-based storage - if (idx < 0) { - //umERROR("CS::operator()(%d,%d)", "FIXME: insertion to csc matrix", i,j); - return tZ; - } - return X[idx]; -} - -//--------------------------------------------------------- -template inline -CS& CS::operator = (const CS& B) -//--------------------------------------------------------- -{ - if (this == &B) return (*this); - - // define dimensions, nzmax, (triplet or csc) - m=B.m; n=B.n; nzmax=B.nzmax; nz=B.nz; - m_values=B.m_values; - if (m_name == "CS") { m_name = B.m_name; } - - if (OBJ_temp != B.get_mode()) { - // copy internal arrays - P = B.P; I = B.I; X = B.X; - } else { - // take ownership of B's internal arrays - CS& Bref = const_cast< CS& >(B); - // transfer {P,I,X}. Note: since these arrays may be - // huge, call own_2() to force immediate deallocation - P.own_2(Bref.P); I.own_2(Bref.I); X.own_2(Bref.X); - delete (&B); - } - - assert(ok()); - return (*this); -} - -//--------------------------------------------------------- -template inline -void CS::copy(const CS& B, int values) -//--------------------------------------------------------- -{ - if (this == &B) return; - - // define dimensions, nzmax, (triplet or csc) - m=B.m; n=B.n; nzmax=B.nzmax; nz=B.nz; - if (m_name == "CS") { m_name = B.m_name; } - m_shape = B.m_shape; // shapes will match - - if (B.X.size() != B.I.size()) values = 0; - m_values = values; // copy numeric data? - - if (OBJ_temp != B.get_mode()) - { - // copy internal arrays - P = B.P; I = B.I; // deep copy {P,I} - if (values) { - X = B.X; // deep copy {X} ? - } else { X.Free(); } - - } else { - // take ownership of B's internal arrays - CS& Bref = const_cast< CS& >(B); - - // Note: since these arrays may be huge, we call - // own_2() to force immediate deallocation - P.own_2(Bref.P); I.own_2(Bref.I); // transfer {P,I} - if (values) X.own_2(Bref.X); // transfer {X} ? - delete (&B); - } - - if (m>0 && n>0) { - assert(this->ok()); - } -} - - -//--------------------------------------------------------- -template inline -bool CS::ok() const -//--------------------------------------------------------- -{ - //----------------------------------- - // not "ok" if empty or inconsistent - //----------------------------------- - - // check for empty matrix - if (m<=0 || n<=0) { return false; } - - // triplet: p holds nzmax column ids - // for csc: p holds n column offsets, and p[n] <- nzmax - if (nz >= 0) { if (P.size() != nzmax) return false; } - else { if (P.size() != (n+1)) return false; } - - // I holds nzmax row ids, - if (I.size() != nzmax) return false; - // X holds {0 || nzmax} non-zeros - if (m_values && (X.size() != nzmax)) return false; - - // non-empty and consistent - return true; -} - - -//--------------------------------------------------------- -template inline -void CS::reset() -//--------------------------------------------------------- -{ - // release allocations, reset counters and flags - m = n = nzmax = nz = 0; - P.Free(); I.Free(); X.Free(); - - // not changing mode or name - // m_mode = OBJ_real; - // m_values = 0; - // m_name = "CS"; -} - - -//--------------------------------------------------------- -template inline -void CS::resize(int Nr, int Nc, int max_nz, int values, int triplet) -//--------------------------------------------------------- -{ - // define dimensions, nzmax, (triplet or csc) - m = Nr; n = Nc; m_values = values; - nzmax = max_nz = std::max(max_nz, 1); - nz = triplet ? 0 : -1; - P.resize(triplet ? max_nz : n+1); - I.resize(nzmax); - X.resize(values ? max_nz : 0); - - if (m>0 && n>0) { - assert(this->ok()); - } -} - - -//--------------------------------------------------------- -template inline -bool CS::realloc(int max_nz, bool bCheck) -//--------------------------------------------------------- -{ - // realloc internal arrays to accommodate max_nz entries - // pass (max_nz<=0) to remove extra space (keeping data) - - if (bCheck) { // expect size info to be correct - if (!ok()) return false; // inconsistent size info - } - - if (max_nz <= 0) max_nz = (is_csc()) ? P[n] : nz; - I.realloc( max_nz ); - - // NBN: also realloc P when non-triplet. - // See C.fkeep(cs_rprune, rr) in dmperm - P.realloc( is_triplet() ? max_nz : n+1); - - if (m_values) { X.realloc(max_nz); } // non-zeros - this->nzmax = max_nz; - return (ok()); -} - - -//--------------------------------------------------------- -template inline -CS& CS::own(const CS& B, int values) -//--------------------------------------------------------- -{ - // assume ownership of all data in another CS - - if (this == &B) return (*this); - - umTRC(2, "taking ownership of CS(%s)...\n", B.name()); - - // define dimensions, nzmax, (triplet or csc) - m=B.m; n=B.n; nzmax=B.nzmax; nz=B.nz; - if (m_name == "CS") { m_name = B.m_name; } - m_shape = B.m_shape; // shapes will match - - if (B.X.size() != B.I.size()) values = 0; - m_values = values; // copy numeric data? - - // take ownership of B's internal arrays - CS& Bref = const_cast< CS& >(B); - P.own(Bref.P); I.own(Bref.I); // transfer {P,I} - if (values) X.own(Bref.X); // transfer {X} ? - else X.Free(); - - Bref.reset(); // reset B to empty - - if (m>0 && n>0) { - assert(this->ok()); - } - return (*this); -} - - -//--------------------------------------------------------- -template inline -void CS::add_val(const T& x) -//--------------------------------------------------------- -{ - // add x to all non-zeros - - // handle special cases - if (!ok()) { umWARNING("CS::add_val()", "matrix is empty"); return; } - if ((T)0 == x) { return; } - - if (!m_values) { - m_values = 1; // add numeric data - if (is_csc()) - X.resize(nzmax); // nzmax is size of index array - else X.resize(nz); // nz is size of index array - } - - X += x; // add x to each non-zero -} - - -//--------------------------------------------------------- -template inline -void CS::mult_val(const T& x) -//--------------------------------------------------------- -{ - // multiply all non-zeros by x - - // handle special cases - if (!ok()) { umWARNING("CS::mult_val()", "matrix is empty"); return; } - if (!m_values) { umWARNING("CS::mult_val()", "matrix is sybolic (numeric data not stored)"); return; } - if ((T)1 == x) { return; } - - X *= x; // mult each non-zero by x -} - - -//--------------------------------------------------------- -template inline -CS& CS::operator += (const CS &B) -//--------------------------------------------------------- -{ - // this += B - // deletes B (if temp) - - if (!is_csc() || !B.is_csc() || !is_compatible(B)) { - umERROR("CS::operator+=()", "Both args must be csc"); - } - - int anz = P[n], bnz = B.P[n]; // num. nonzeros - int values = (m_values && B.m_values)?1:0; // do values? - IVec w(m); Vector x(values?m:0); // workspaces - CS *C=new CS(m,n,anz+bnz,values,0,OBJ_temp, "t.(+=)"); // result - if (!C->ok() || !w.ok() || (values && !x.ok())) { umERROR("CS::operator +=", "out of memory"); } - - T alpha=1, beta=1; - int Nz=0, p=0; - for (int j=0; jP[j] = Nz; // column j of C starts here - Nz = this->scatter(j, alpha, w, x, j+1, (*C), Nz); // alpha*A(:,j) - Nz = B.scatter(j, beta, w, x, j+1, (*C), Nz); // beta *B(:,j) - if (values) { - for (p = C->P[j]; pX[p] = x[C->I[p]]; - } - } - } - - if (B.get_mode()==OBJ_temp) { - delete (&B); // delete temporaries - } - C->P[n] = Nz; // finalize the last column of C - C->realloc(0); // remove extra space from C - (*this) = (*C); // swap with result: A <- A+B - return (*this); -} - - -//--------------------------------------------------------- -template inline -CS& CS::operator -= (const CS &B) -//--------------------------------------------------------- -{ - // this -= B - // deletes B (if temp) - - if (!is_csc() || !B.is_csc() || !is_compatible(B)) { - umERROR("CS::operator-=()", "Both args must be csc"); - } - - int anz = P[n], bnz = B.P[n]; // num. nonzeros - int values = (m_values && B.m_values)?1:0; // do values? - IVec w(m); Vector x(values?m:0); // workspaces - CS *C=new CS(m,n,anz+bnz,values,0,OBJ_temp, "t.(-=)"); // result - if (!C->ok() || !w.ok() || (values && !x.ok())) { umERROR("CS::operator -=", "out of memory"); } - - T alpha=1, beta = -1; // (beta = -1) ==> subtract columns - int Nz=0, p=0; - for (int j=0; jP[j] = Nz; // column j of C starts here - Nz = this->scatter(j, alpha, w, x, j+1, (*C), Nz); // 1 * A(:,j) - Nz = B.scatter(j, beta, w, x, j+1, (*C), Nz); // -1 * B(:,j) - if (values) { - for (p = C->P[j]; pX[p] = x[C->I[p]]; - } - } - } - - if (B.get_mode()==OBJ_temp) { - delete (&B); // delete temporaries - } - - C->P[n] = Nz; // finalize the last column of C - -#if (1) - C->droptol(); // drop zeros, then conpact -#else - C->realloc(0); // compact only (retains zeros) -#endif - (*this) = (*C); // swap with result: A <- A+B - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// cs_* routines -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -int CS::val_idx(int i, int j) const -//--------------------------------------------------------- -{ - static int last_j = -1; // remember last col - static int last_i = -1; // remember last row - -//umWARNING("CS::val_idx", "TODO: needs testing"); - CS_BOUNDS_CHECK_00(i,j); // 0-based interface - - // get 0-based index into {I,X} arrays for entry (i,j) - // return -(idx+2) if entry not in sparsity pattern - // (idx is index of insertion point) - - //--------------------------------------------- - // speed up search by checking extreme cases - //--------------------------------------------- - int len = P[j+1] - P[j]; - if (len <= 0) {return -2;} // no entries in col j - - int iLO = I[P[j]]; // find lowest row index in col j - if (i < iLO) { return -2; } - - int iHI = I[P[j+1]-1]; // find highest row index in col j - if (i > iHI) { return -(len+2); } - - -#if (!CS_ROWS_ARE_SORTED) - - //####################################################### - // FIXME: cannot guarantee that row ids are stored in - // sequential order, so check row ids sequentially: - //####################################################### - - // [SLOW] sequential search - for (int p=P[j]; p=0) && (last_i= I[last_i]) { - lo = last_i; // search upper block - } else { - hi = last_i; // search lower block - } - } - } - - int mid=lo, tmp=0; - while (lo <= hi) - { - mid = (hi + lo)/2; - if ((tmp=I[mid] - i) > 0) - { - hi = mid-1; - if (I[hi] == i) { - last_j=j; last_i=hi; // remember hi index - return hi; - } - } - else if (tmp < 0) - { - lo = mid+1; - if (I[lo] == i) { // check - last_j=j; last_i=lo; // remember lo index - return lo; - } - } - else // tmp == 0 - { - last_j=j; last_i=mid; // remember mid index - return mid; - } - } - tmp = I[mid] - i; - - if (tmp > 0) { - return -(mid+2); // insert at mid - } else { // tmp < 0 - return -(mid+3); // insert at mid+1 - } - //####################################################### -#endif -} - - -//--------------------------------------------------------- -template inline -CS& CS::compress(bool bSort) -//--------------------------------------------------------- -{ - // convert this from triplet to csc form - - if (is_csc()) { - return (*this); // already converted - } else if (!ok()) { - umWARNING("CS::compress()", "empty matrix"); - return (*this); // empty: nothing to do - } - - // accumulate compressed result in a temporary - // matrix, then swap ownership of the data - - // CS B(m, n, nz, m_values, 0); // temp matrix - CS* tmp=new CS(m,n,nz,m_values, 0, OBJ_temp, "t.compress"); - - CS& B = (*tmp); // reference - int p=0, k=0; IVec w(n); // workspace - for (k=0; k inline -CS& CS::compress(const CS& B, bool bSort) -//--------------------------------------------------------- -{ - // copy B, converting triplet -> csc if necessary - - if (B.is_csc()) { - (*this) = B; // B is in csc form, so - return (*this); // just copy and return. - } else if (!B.ok()) { - umWARNING("CS::compress(B)", "empty matrix"); - return (*this); // empty: nothing to do - } - - // convert triplet data in B to csc form - - m_values = B.m_values; - int Nr=B.m, Nc=B.n, Nz=B.nz, p=0, k=0; - this->resize(Nr, Nc, Nz, m_values, 0); - IVec w(Nc); // workspace - for (k=0; kcumsum(w, Nc); // column pointers - for (k=0; k inline -double CS::cumsum(IVec& c, int Nc) -//--------------------------------------------------------- -{ - // p [0..n] = cumulative sum of c [0..n-1], - // and then copy p [0..n-1] into c - - if (c.size() != Nc) return -1.0; - int Nz=0; double Nz2=0.0; - for (int i=0; i inline -cs_dp* CS::dmperm (int seed) const -//--------------------------------------------------------- -{ - // compute coarse and then fine dmperm for (*this) - - int i=0, j=0, k=0; bool bOk=true; - //--- Maximum matching ---------------------------------- - if (!is_csc()) return NULL; - cs_dp *D = new cs_dp(m,n); // allocate result - if (!D) return NULL; - IVec &Dp=D->P, &Dq=D->Q, &Dr=D->R, &Ds=D->S; - int *cc=D->cc, *rr=D->rr; - IVec wij; // workspace for max transversal - if (!maxtrans(wij, seed)) { delete D; return NULL; } - int *jmatch = wij.data(); // jmatch - int *imatch = wij.data()+m; // imatch = inverse of jmatch - //--- Coarse decomposition ------------------------------ - int *wi=Dr.data(), *wj=Ds.data(); // use Dr and Ds as workspace - for (j=0; j C = perm(*this, p_inv, Dq, 0); // C=A(p,q) (it will hold A(R2,C2)) - if (!C.ok()) { - umWARNING("CS::dmperm","error permuting matrix"); - delete D; return NULL; - } - - // p_inv.resize(0); // cs_free (p_inv); - - int Nc = cc[3] - cc[2]; // delete cols C0, C1, and C3 from C - if (cc[2]>0) { - for (j=cc[2]; j<=cc[3]; ++j) { C.P[j-cc[2]] = C.P[j]; } - } - - C.n = Nc; - if (rr[2]-rr[1] < m) { // delete rows R0, R1, and R3 from C - C.fkeep(&CS_rprune, rr); - int cnz = C.P[Nc]; - if (rr[1] > 0) { for (k=0; kP; // C(ps,ps) is the permuted matrix - IVec& rs = scc->R; // kth block is rs[k]..rs[k+1]-1 - int nb1 = scc->nb; // # of blocks of A(R2,C2) - for (k=0; k 0) nb2++; // leading coarse block A (R1, [C0 C1]) - for (k=0; knb = nb2; - delete scc; - return D; -} - - -//--------------------------------------------------------- -template inline -void CS::dropdiag() -//--------------------------------------------------------- -{ - // drop diagonal entries from csc matrix - - if (!is_csc()) {umWARNING("CS::dropdiag", "expected csc form"); return;} - - int p=0, Nz=0; - for (int j=0; j inline -int CS::dropsort(double tol) -//--------------------------------------------------------- -{ - // 1. drop entries with |x| <= tol - // 2. sort row indices in each column. - // - // Note: duplicate entries - //------------------------- - // Currently retains the last value found for duplicate - // entries. An alternative is to sum such duplicates. - - if (!is_csc()) { umWARNING("CS::sort()", "expected csc form"); return 0; } - if (tol<0.0) { tol = 0.0; } // verfy drop tolerance - - - IVec w(m, -1); assert(w.ok()); // init workspace array to -1 (row i not yet seen) - int Nz=0, i=0, j=0, p=0, q=0; - for (j=0; j= q) // now check for duplicates... - { - //------------------------------- - // duplicate entry for A(i,j) - //------------------------------- - X[w[i]] = X[p]; // retain only last value - //X[w[i]] += X[p]; // sum duplicate values - - } else { - w[i] = Nz; // record where row i occurs - I[Nz] = i; // keep A(i,j) - X[Nz++] = X[p]; - } - } - P[j] = q; // record start of column j - } - P[n] = Nz; // record total nnz - realloc(0); // remove extra space - -#if (1) - //####################################################### - // sort array A[n] using workspace W[n] - // void mergesort(int A[], int W[], int n); - // mergesort(Ci, (int*) (Cx+pcstart), cnz - pcstart); - //####################################################### - //umTRC(1, "Starting dropsort (m,n) = (%d,%d)\n", m,n); - //####################################################### - - IVecSort sv, sortI; IVec iv; VecSort sortX; - int istart=0,istop=0,len=0; - for (j=0; j1) - { - sv.borrow(len, &(I[istart])); sv.makeIndex(iv); - - sortI.borrow(len, &(I[istart])); // wrap row.ids for col j - sortX.borrow(len, &(X[istart])); // wrap values for col j - - sortI.sortFromIndexVec(iv); // sort indices in place - sortX.sortFromIndexVec(iv); // sort values in place - } - } - - //####################################################### - //umTRC(1, "\nDone -- dropsort complete\n\n"); - //####################################################### -#endif - - - - return 1; -} - - -//--------------------------------------------------------- -template inline -int CS::droptol(double tol) -//--------------------------------------------------------- -{ - // drop entries with |x| <= tol - // return new Nz if ok(), else -1 - - if (!m_values) { - umTRC(2, "CS::droptol called on symbolic object (no values).\n"); - return P[n]; - } - - assert(tol >= 0.0); - if (!is_csc()) {umWARNING("CS::droptol", "Please compress before calling droptol()."); return -1;} -//if (!m_values) {umWARNING("CS::droptol", "Values are not yet stored in this object."); return P[n];} - -#ifndef NDEBUG - int Nz1 = P[n]; // get current nnz -#endif - - int p=0, Nz=0; - for (int j=0; j tol) { - X[Nz ] = X[p]; // keep A(i, j) - I[Nz++] = I[p]; // i.e. A(I[p],j) - } - } - } - -#ifndef NDEBUG - if (Nz1 != Nz) umMSG(1, "droptol: dropped %d entries from %s\n", Nz1-Nz, name()); - else umMSG(1, "droptol: no dropped entries from %s\n", name()); -#endif - - P[n] = Nz; // finalize: Nz non-zeros passed droptol test - realloc(0); // remove extra space - return Nz; // num. non-zeros that remain -} - - -//--------------------------------------------------------- -template inline -int CS::dupl() -//--------------------------------------------------------- -{ - // sum duplicate entries, and remove - - if (!is_csc()) { umWARNING("CS::dupl()", "expected csc form"); return 0; } - - IVec w(m, -1); assert(w.ok()); // init workspace array to -1 (row i not yet seen) - int Nz=0, i=0, j=0, p=0, q=0; - for (j=0; j= q) { - X[w[i]] += X[p]; // A(i,j) is a duplicate - } else { - w[i] = Nz; // record where row i occurs - I[Nz] = i; // keep A(i,j) - X[Nz++] = X[p]; - } - } - P[j] = q; // record start of column j - } - P[n] = Nz; // finalize: record nnz - realloc(0); // remove extra space - return 1; -} - - -//--------------------------------------------------------- -template inline -bool CS::entry(int i, int j, T x) -//--------------------------------------------------------- -{ - // add an entry to a triplet matrix; - // indices i,j are 0-based - // return 1 if ok, 0 otherwise - - if (!is_triplet() || i < 0 || j < 0) return false; - - if (T(0) == x) { - // avoid adding zeros, but allow that the user might - // be defining the matrix "size" with this entry: - m = std::max(m, i+1); - n = std::max(n, j+1); - return false; - } - - if (this->nz >= this->nzmax) { - if (!realloc (2*(this->nzmax))) return false; - } - - if (m_values) X[nz] = x; - I[nz] = i; P[nz++] = j; - m = std::max(m, i+1); - n = std::max(n, j+1); - return true; -} - - -//--------------------------------------------------------- -template inline -bool CS::set1(int i, int j, T x) -//--------------------------------------------------------- -{ - // alias for entry(i,j,x) - // helper for 1-based indices - return entry(i-1, j-1, x); -} - - -//--------------------------------------------------------- -template -int CS::ereach(int k, const IVec& parent, int *s, int *w) -//--------------------------------------------------------- -{ - // find nonzero pattern of Cholesky L(k,1:k-1) - // using etree and triu(A(:,k)) - - // check inputs - if (!this->is_csc() || !parent.ok() || !s || !w) return -1; - - int top=n, i=0, p=0, len=0; - CS_MARK (w, k); // mark node k as visited - for (p=P[k]; pk) continue; // only use upper triangular part of A - for (len=0; !CS_MARKED (w,i); i=parent[i]) // traverse up etree - { - s[len++] = i; // L(k,i) is nonzero - CS_MARK (w, i); // mark i as visited - } - while (len>0) { - s[--top] = s[--len]; // push path onto stack - } - } - for (p=top; p -IVec& CS::etree(int ata) const -//--------------------------------------------------------- -{ - // compute the etree of A (using triu(A), - // or A'A without forming A'A - - if (!is_csc()) { umERROR("CS::etree","expected csc matrix"); } - - int i=0, k=0, p=0, inext=0; - IVec* parent = new IVec(n, "parent", OBJ_temp); // allocate result - IVec w(n+(ata?m:0)); // workspace - if (!w.ok() || !parent->ok()) { - umERROR("CS::etree","out of memory"); return (*parent); - } - int *wd = w.data(); - int *ancestor=wd, *prev=wd+n; - int *pd = parent->data(); - if (ata) for (i=0; i inline -CS& CS::identity(int Ni, bool pack) -//--------------------------------------------------------- -{ - resize(Ni, Ni, Ni, 1, 1); // alloc (n,n) triplet form - - for (int i=0; i inline -int CS::is_tri() const -//--------------------------------------------------------- -{ - // Returns: - // 1 if A is square & upper tri., - // -1 if square & lower tri., - // 0 otherwise - - if (m != n) return (0); - bool is_upper=true, is_lower=true; - for (int j=0; j j) is_upper = false; // not upper tri. - if (I[p] < j) is_lower = false; // not lower tri. - } - } - return (is_upper ? 1 : (is_lower ? -1 : 0)) ; -} - - -//--------------------------------------------------------- -template -IMat& CS::find2D(char op, T val) const -//--------------------------------------------------------- -{ - // Return both row and column info. - // See also find2D(Mat_COL,...), Vector::find(...) - - if (!ok()) { umERROR("CS::find2D()", "empty matrix"); } - if (!is_csc()) { umERROR("CS::find2D()", "expected csc matrix"); } - - CS mask(m,n, 1, 1, 1); // record hits in (triplet) mask - int count=0, j=0, p=0,i=0; - - switch (op) { - - case '<': // find ids of elements less than val - //----------------------------------------------------- - for (j=0; j': // find ids of elements greater than val - //----------------------------------------------------- - for (j=0; j val) { - i = I[p]; - mask.entry(i,j,1); // A(i,j) satisfies condition - ++count; // increment total hits - } - } - } - break; - } - - mask.compress(); // convert A to csc form - mask.dupl(); // sum up duplicates - - // extract find() results - std::string sz; - if (sizeof(T) == sizeof(double)) - { sz=umOFORM("find(CSd, %c, %g)", op, val); } - else { sz=umOFORM("find(CSi, %c, %d)", op, val); } - - // allocate result array - IMat *tmp = new IMat(count, 2, sz.c_str(), OBJ_temp); - - int sk=0; - for (j=0; j inline -int CS::fkeep(KeepFunc fK, void *other) -//--------------------------------------------------------- -{ - // drop entries for which fkeep(A(i,j)) is false; - // return nz if OK, else -1 - - if (!is_csc()) {umWARNING("CS::fkeep", "expected csc form"); return -1;} - if (!fK) {umWARNING("CS::fkeep", "invalid KeepFunc"); return -1;} - - int nz=0, p=0; - for (int j=0; j size info no longer consistent! - return nz; -} - - -//--------------------------------------------------------- -template inline -void CS::gaxpy(const Vector& x, Vector& y) const -//--------------------------------------------------------- -{ - // y += A*x - - assert(is_csc() && x.ok() && y.ok()); - assert(num_rows()==y.size() && num_cols()==x.size()); - - T xj=(T)0; - for (int j=0; j inline -void CS::gxapy(const Vector& x, Vector& y) const -//--------------------------------------------------------- -{ - // y += x*A - -#if (USE_SPARSE_THREADS) - // Using OpenMP + ACML sparse BLAS -#else - - assert(is_csc() && x.ok() && y.ok()); - assert(num_cols()==y.size() && num_rows()==x.size()); - - for (int j=0; j -void CS::load(FILE *fp) -//--------------------------------------------------------- -{ - if (!fp) { umWARNING("CS::load", "invalid file"); return; } - - this->resize(0, 0, 1, 1, 1); // reset to empty (triplet form) - - int i=0, j=0; double x=0.0; - while (fscanf (fp, "%d %d %lg\n", &i, &j, &x) == 3) - { - if (!entry (i, j, T(x))) { - umERROR("CS::load", "failed to add entry (%d,%d) = %g)", i,j,x); - } - } -} - - -//--------------------------------------------------------- -template -void CS::load -( - int Nr, int Nc, // matrix dimensions - IVec& ir, // row indices - IVec& jc, // col indices - Vector& Ax, // numeric data (TODO: make optional) - int part, // select {upper/lower/all} - bool forceSym, // mirror L\U triangle? - double tol, // drop tolerance - bool free_args // release {ir,jc, Ax} arrays? -) -//--------------------------------------------------------- -{ - // convert {i,j,Aij} triplets to csc format. - // {ir,jc} indices are 0-based - // duplicate triples are summed - - int Nz = Ax.size(), i=0,j=0,k=0; T x=0; bool bOk=true; - assert(ir.size()>=Nz); // need row index for each A_ij - assert(jc.size()>=Nz); // need col index for each A_ij - if (tol<0.0) tol=0.0; - -#if (0) - // set to empty (triplet form) with logical size (Nr,Nc) - this->resize(Nr, Nc, 1, 1, 1); -#else - // set to triplet form with estimated nnz and logical size (Nr,Nc) - int to_load = Ax.get_nnz(tol); - if (part != sp_All) { - int Nn=std::max(Nr,Nc); // estimate storage required - to_load = Nn+5 + (to_load-Nn)/2; // ... to load L\U triangle - } - this->resize(Nr, Nc, to_load, 1, 1); -#endif - - //--------------------------------------------- - // select which part of the matrix to load - //--------------------------------------------- - switch (part) { - - case sp_LT: - //----------------------------------- - // load entries in lower triangle - //----------------------------------- - m_shape = (sp_LOWER | sp_TRIANGULAR); - - for (k=0; k= j) { // is entry in lower triangle ? - x=Ax[k]; if (fabs(double(x)) > tol) { - bOk=entry(i,j,x); assert(bOk); - } - } - } - break; - - case sp_All: - //----------------------------------- - // load all entries -- no "shape" - //----------------------------------- - m_shape = sp_NONE; - - for (k=0; ktol) { - bOk=entry(i,j,x); assert(bOk); - } - } - break; - - case sp_UT: - //----------------------------------- - // load entries in upper triangle - //----------------------------------- - m_shape = (sp_UPPER | sp_TRIANGULAR); - - for (k=0; ktol) { - bOk=entry(i,j,x); assert(bOk); - } - } - } - break; - } - - if (free_args) { - // If free_args is true, then the user is allowing us - // to release these allocations, which can be HUGE(!). - // make_tri_sym() can then use the freed memory. - ir.Free(); jc.Free(); Ax.Free(); - } - - this->compress(); // convert to csc form - this->dupl(); // sum up duplicates -//this->droptol(tol); // all x passed tol test above. - if (part != sp_All) { // was only L\U triangle loaded? - if (forceSym) { // make L\U tri symmetric? - make_tri_sym(); // mirror L\U triangle - } - } - - if (!ok()) { - umERROR("CS::load(m,n, ...)", "error loading triplet data"); - } - -#if (0) - //####################################################### - // Testing sort() behavior: - //####################################################### - { - dropsort(); // drop zeros and sort row indices - - FILE* fp = fopen("MLsorted.dat", "w"); - //FILE* fp = fopen("MLnosort.dat", "w"); - write_ML(fp); - fclose(fp); - } - //####################################################### -#endif - -} - - -//--------------------------------------------------------- -template inline -CS& CS::make_tri_sym() -//--------------------------------------------------------- -{ - // A += triu(A,1)' - // - // Note: this routine is intended to make a symmetric - // matrix from an upper or lower triangular csc matrix - - assert(get_mode()==OBJ_real); // else need to adjust mode - - // AT = A' - CS* AT = new CS(trans(*this),OBJ_temp,"(self)^(T)",1); - AT->dropdiag(); // drop diagonal entries from AT - (*this) += (*AT); // += deletes AT (OBJ_temp) - return (*this); -} - - -//--------------------------------------------------------- -template -bool CS::maxtrans(IVec& jimatch, int seed) const -//--------------------------------------------------------- -{ - // find a maximum transveral - // [jmatch [0..m-1]; imatch [0..n-1]] - - if (!is_csc()) return false; - - int i=0, j=0, k=0, p=0; - int *jmatch=NULL, *imatch=NULL; - - jimatch.resize(m+n); // allocate result - if (!jimatch.ok()) return false; - - int n2=0, m2=0; - for (k=0, j=0; j *C = const_cast*>(this); - bool use_trans = false; - if (m2 < n2) { - use_trans = true; // work with transpose - C = new CS(trans((*this),0)); // copy structure only - if (!C->ok()) { delete C; return false; } - } - - // allow for transposed case - int cn=C->n, cm=C->m; - int* ji_data = jimatch.data(); - jmatch = (m2 < n2) ? ji_data + cn : ji_data; - imatch = (m2 < n2) ? ji_data : ji_data + cm; - - // allocate workspace and set pointers - IVec w(5*cn); assert(w.ok()); - int *wd = w.data(); - int *cheap=wd+cn, *js=wd+2*cn, *is=wd+3*cn, *ps=wd+4*cn; - for (j=0; jP[j]; // for cheap assignment - for (i=0; i=0) {imatch[jmatch[i]]=i;} - } - - if (use_trans) { delete C; } // if allocated here, release C - - return true; -} - - -//--------------------------------------------------------- -template -CS& CS::operator *= (const CS&B) -//--------------------------------------------------------- -{ - // this *= B, (column-wise gaxpy multiplication) - // deletes B (if temp) - - if (!is_csc() || !B.is_csc()) { - umERROR("CS::multiply", "Both args must be csc"); - } - - int Nr=this->m, anz=this->P[n], Nc=B.n, bnz=B.P[B.n]; - int values = (m_values && B.m_values)?1:0; - IVec w(Nr); Vector x(values ? Nr : 0); // workspaces - - bool size_is_known = false; - -#if (1) - - // umWARNING("sparse A*=B", "Nigel, please check this untested code!"); - - //####################################################### - // preprocess to find nnz in result, C = A*B - //####################################################### - int cnz=0; - { - //IVec Cp(Nc+1, "Cp"); // precalc pattern for C? - IVec Flag(Nr, "Flag"); // workspace - int pa=0,paend=0,pb=0,pbend=0,mark=0,pcstart=0,i=0,j=0,k=0; - const IVec &Ap=this->P, &Ai=this->I, &Bi=B.I; - for (j=0; j *C = new CS(Nr, Nc, cnz, values, 0, OBJ_temp, "t.(*=)"); - - size_is_known = true; - - //####################################################### -#else - //####################################################### - - CS *C = new CS(Nr, Nc, anz+bnz, values, 0, OBJ_temp, "t.(*=)"); - - //####################################################### -#endif - - - if (!C->ok() || !w.ok() || (values && !x.ok())) { - umERROR("CS::multiply", "out of memory"); - } - - int Nz=0, p=0; - for (int j=0; j C->nzmax) - if ((!size_is_known) && (Nz+Nr > C->nzmax)) - { - C->realloc(2*C->nzmax+Nr); - if (!C->ok()) { umERROR("CS::multiply", "out of memory"); } - } - - C->P[j] = Nz; // column j of C starts here - for (p=B.P[j]; pscatter(B.I[p], values?B.X[p]:T(1), w, x, j+1, (*C), Nz); - } - if (values) { - for (p=C->P[j]; pX[p] = x[C->I[p]];} - } - } - - // if B is temporary, delete it - if (B.get_mode()==OBJ_temp) {delete (&B);} - - C->P[Nc] = Nz; // finalize last column of C - C->droptol(); // drop zeros, then conpact - (*this) = (*C); // swap with result: A <- A*C - return (*this); -} - - -//--------------------------------------------------------- -template inline -double CS::nonsymmetry() const -//--------------------------------------------------------- -{ - umERROR("CS::nonsymmetry", "not implemented"); - - // TODO: find max relative non-symmetry: - // e.g. max( (A-A')/abs(A) ) - -//int old_mode = m_mode; // avoid premature delete - assert(OBJ_real==m_mode); // TODO: make mutable - - const CS& ref = (*this); - CS A2 = ref - trans(ref); // compute (A-A') - Vector& X2 = A2.X; - X2 /= abs(this->X); // compute (A-A')/abs(A) -//m_mode = old_mode; // restore mode - - double max_val = X2.max_val_abs(); - return max_val; -} - - -//--------------------------------------------------------- -template inline -T CS::norm() const -//--------------------------------------------------------- -{ - // return 1-norm: largest column sum - - if (!is_csc() || !m_values) return T(-1); - - T nrm1=0, s=0; int p=0; - for (int j=0; j -CS& CS::permute(const IVec& pinv, const IVec& q, int values) -//--------------------------------------------------------- -{ - // permute this "in-place" - if (!ok()) {umWARNING("CS::permute","empty matrix"); return (*this);} - if (!is_csc()) {umWARNING("CS::permute","expected csc"); return (*this);} - if (m_values && !values) {X.resize(0);} // drop numeric data - - bool swap_mode = false; - if (OBJ_temp == m_mode) { - m_mode = OBJ_real; // avoid prematue deletion of this - swap_mode = true; // during copy constructor for B - } - - m_values = values; - - // copy current state into C, then permute (*this) - CS C(*this, OBJ_temp, "CS", values); - if (!C.ok()) { umERROR("CS::permute", "error making copy"); } - - int Nz=0, j=0,t=0; bool bpi=pinv.ok(), bq=q.ok(); - for (int k=0; kP[k] = Nz; - j = bq ? q[k] : k; // col k of result is col q[k] of original - for (t=C.P[j]; tX[Nz]=C.X[t]; // row i of original is row pinv[i] of result - this->I[Nz++] = bpi ? pinv[C.I[t]] : C.I[t]; - } - } - this->P[n] = Nz; // finalize last column - if (swap_mode) { m_mode=OBJ_temp; } // restore "temp" mode - return (*this); -} - - -//--------------------------------------------------------- -template inline -CS& CS::permuteP(const IVec& pinv, int values) -//--------------------------------------------------------- -{ - // Apply left-permutation only: A = p(A) - IVec NoQ; - permute(pinv, NoQ, values); - return (*this); -} - - -//--------------------------------------------------------- -template inline -CS& CS::permuteQ(const IVec& q, int values) -//--------------------------------------------------------- -{ - // Apply right-permutation only: A = (A)q - IVec NoPinv; - permute(NoPinv, q, values); - return (*this); -} - - -//--------------------------------------------------------- -template -void CS::print(bool brief) -//--------------------------------------------------------- -{ - if (!ok()) { printf("(null)\n"); return; } - - if (nz < 0) { - // compressed sparse column - printf ("%d-by-%d, nzmax: %d nnz: %d, 1-norm: %g\n", m, n, nzmax, P[n], (double)norm()); - for (int j=0; j20) { printf (" ...\n"); return; } - } - } - } else { - // triplet form - printf ("triplet: %d-by-%d, nzmax: %d nnz: %d\n", m, n, nzmax, nz); - for (int p=0; p20) { printf (" ...\n"); return; } - } - } -} - - -//--------------------------------------------------------- -template inline -int CS::scatter -( - int j, - T beta, - IVec& w, - Vector& x, - int mark, - CS& C, - int Nz -) const -//--------------------------------------------------------- -{ - // x += beta * A(:,j), - // where x is a dense vector and A(:,j) is sparse - - assert(this->is_csc() && C.is_csc() && w.ok()); - bool values = x.ok(); - - int i=0, p=0; - for (p=P[j]; pI[p]; // A(i,j) is nonzero - if (w[i] < mark) { - w[i] = mark; // i is new entry in column j - C.I[Nz++] = i; // add i to pattern of C(:,j) - if (values) { - x[i] = beta*this->X[p]; // x(i) = beta*A(i,j) - } - } - else if (values) { - x[i] += beta*this->X[p]; // i exists in C(:,j) already - } - } - return Nz; -} - - -//--------------------------------------------------------- -template -cs_dp* CS::SCC() -//--------------------------------------------------------- -{ - // find the strongly connected components of a square matrix - // matrix A temporarily modified, then restored - - if (this->n > 0) { - if (!ok() || !is_csc()) {umWARNING("CS::SCC","invalid matrix"); return NULL;} - } - - cs_dp *D = new cs_dp(n, 0); // allocate result - CS AT = trans((*this), 0); // AT = A' - IVec xi(2*n+1); // workspace - if (!D || !xi.ok()) { umWARNING("CS::SCC", "D or xi empty"); return NULL; } - if (n>0 && !AT.ok()) { umWARNING("CS::SCC", "A^T invalid"); return NULL; } - - int *Blk=xi.data(), *pstack=xi.data() + n; - int *rcopy = pstack; IVec &Dp=D->P, &Dr=D->R; - int top = n, nb=0, i=0, k=0, b=0; - - for (i=0; ip - top = CS_dfs(i, AT, top, Dp, pstack, NULL); - } - Dr[nb] = 0; // first block starts at zero; - for (k=nb; k<=n; ++k) - Dr[k-nb] = Dr[k]; // shift D->r up - D->nb = nb = n-nb; // nb = # of strongly connected components - for (b=0; b -void CS::spy(const char* msg) const -//--------------------------------------------------------- -{ - if (!ok()) { umLOG(1, "spy(%s): empty matrix\n", msg); return; } - - if (this->is_csc()) { - if (nzmax<2 && this->P[1]<1) { - umLOG(1, "spy(%s): empty matrix\n", msg); - } else { - umLOG(1, "spy(%s): (%5d,%5d) nnz %8d (csc form)\n", msg,m,n,nzmax); - } - } else { - umLOG(1, "spy(%s): (%5d,%5d) nnz %8d (triplet)\n", msg,m,n,nz); - } - - // TODO: dump as bitmap. - // return; - - // limit - int MAX_spy_cols = 200; - if (this->num_cols() > MAX_spy_cols) { return; } - - CS C = trans(*this, m_values); - int Nr = C.num_rows(), Nc = C.num_cols(); - printf("\nCS(%d,%d)\n", Nr,Nc); - - char buf[42]={'\0'}, buf2[42]={'\0'}, buf3[42]={'\0'}; - int di = (int) ceil(log10(double(Nr+1))); - sprintf(buf, "Row[%%0%dd] ", di); - - if (Nc>20) { sprintf(buf2, "." ); sprintf(buf3, " " ); } - else { sprintf(buf2, ". "); sprintf(buf3, " "); } - - bool brief = true; - if (brief) - { - // ... - for (int j=0; j= 0) { - //fprintf(stderr, buf2); - printf(buf2); - } else { - //fprintf(stderr, buf3); - printf(buf3); - } - } - //fprintf(stderr, "\n"); - printf("\n"); - } - } - else - { - // ... - printf("TODO: spy( +details )\n"); - } -} - - -//--------------------------------------------------------- -template -CS& CS::symperm(const IVec& pinv, int values) -//--------------------------------------------------------- -{ - // in-place permutation of (*this) - // A = A(p,p) where A is symmetric - // upper part stored; uses pinv not p. - - if (!is_csc()) { umERROR("CS::symperm", "not csc"); } - if (!m_values) { values=0; } // cannot do values if no X data - CS *C = new CS(n, n, P[n], values, 0, OBJ_temp, "t.symperm"); // alloc result - - IVec w(n); // workspace - if (!C->ok() || !w.ok()) { umERROR("CS::symperm", "out of memory"); } - - // check for (optional) permutation - bool bp = (pinv.size() >= n); - int i=0,i2=0,j=0,j2=0,p=0,q=0; - - for (j=0; jj) continue; // skip lower triangular part of A - i2 = bp ? pinv[i] : i; // row i of A is row i2 of C - w[std::max(i2,j2)]++ ; // column count of C - } - } - C->cumsum(w, n); // compute column pointers of C - for (j=0; jj) continue; // skip lower triangular part of A - i2 = bp ? pinv[i] : i; // row i of A is row i2 of C - C->I[q = w[std::max(i2,j2)]++] = std::min(i2,j2); - if (values) C->X[q] = X[p]; - } - } - (*this) = (*C); // swap ownership of data - return (*this); -} - - -//--------------------------------------------------------- -template inline -CS& CS::transpose(int values) -//--------------------------------------------------------- -{ - // transpose this "in-place" - - if (!ok()) { return (*this); } // empty matrix - if (!is_csc()) {umWARNING("CS::transpose","expected csc"); return (*this);} - if (m_values && !values) {X.resize(0);} // drop numeric data - - bool swap_mode = false; - if (OBJ_temp == m_mode) { - m_mode = OBJ_real; // avoid prematue deletion of this - swap_mode = true; // during copy constructor for B - } - - m_values = values; - - // copy current state, then transpose - CS B(*this); - if (!B.ok()) { umERROR("CS::transpose", "error making copy"); } - - int mm=B.m, nn=B.n; - resize(nn, mm, B.P[nn], values, 0); IVec w(mm); // result + workspace - if (!ok() || !w.ok()) { umERROR("CS::transpose", "out of memory"); } - int p=0, q=0, j=0; - for (p=0; pcumsum(w, mm); // row pointers - for (j=0; j -void CS::write_ML(FILE* fp) const -//--------------------------------------------------------- -{ - // Write as (Matlab-compatible) ASCII triplets. - // Note that indices are adjusted to be 1-based. - - if (m<1 || n<1) { fprintf(fp,"SparseMatrix: *** EMPTY ***\n"); return; } - if (!m_values) { fprintf(fp,"SparseMatrix: *** SYMBOLIC ***\n"); return; } - - int i=0, j=0, p=0; double x=0.0; - -#if (1) - //####################################################### - // FIXME: forcing correct dimensions - // FIXME: check if Matlab sums duplicate entries - // - // sort_drop_dupl(); - // - // If entry (m,n) is not in the sparsity pattern, - // we must output it to define "logical" size of - // the "triplet" matrix for Matlab. - fprintf(fp,"%4d %4d %25.15e\n", m, n, 0.0); - //####################################################### -#endif - - if (is_triplet()) - { - for (int k=0; k global operators -// -/////////////////////////////////////////////////////////// - - -template inline -Vector& full(const CS& A, const IVec& ids) -{ - // FIXME: currently only appropriate for - // a sparse matrix with 1 column - - // return a dense vector containing elements mapped by - // the ids index array. If element A(ids(i),1) is not - // in the sparsity pattern of A, set that entry to 0. - - assert(A.is_csc()); // only implemented for compressed form - if (A.num_cols() > 1) { // this version: testing "sparse columns" - umERROR("full(CS&, IVec&)", "transitional code: matrix must have only 1 column"); - } - - // initialize dense vector with len zeros - int len = ids.length(), id=0, idx=0; - Vector *tmp = new Vector(len, "full(CS)", OBJ_temp); - for (int i=1; i<=len; ++i) { - id = ids(i)-1; // 0-based storage - idx = A.val_idx(id, 0); // (idx>=0) ==> A(id,1) non-zero - if (idx >= 0) { - (*tmp)(i) = A.X[idx]; // make this entry non-zero - } - } - return (*tmp); -} - - - - -//--------------------------------------------------------- -// Addition -//--------------------------------------------------------- -// C = A + B -// C = A + x -// C = x + A -//--------------------------------------------------------- - -template inline -CS& operator+(const CS& A, const CS& B) -{ - CS *tmp=new CS(A,OBJ_temp,"A+B",1); // deletes A (if temp) - (*tmp) += B; // deletes B (if temp) - return (*tmp); -} - - -template inline -CS& operator+(const CS& A, const T& x) -{ - CS *tmp=new CS(A,OBJ_temp,"A+x",1); - (*tmp) += x; - return (*tmp); -} - - -template inline -CS& operator+(const T& x, const CS& A) -{ - CS *tmp=new CS(A,OBJ_temp,"x+A",1); - (*tmp) += x; - return (*tmp); -} - - -//--------------------------------------------------------- -// Subtraction -//--------------------------------------------------------- -// C = A - B -// C = A - x -// C = x - A -//--------------------------------------------------------- - -template inline -CS& operator-(const CS& A, const CS& B) -{ - CS *tmp=new CS(A,OBJ_temp,"A-B",1); // deletes A (if temp) - (*tmp) -= B; // deletes B (if temp) - return (*tmp); -} - - -template inline -CS& operator-(const CS& A, const T& x) -{ - CS *tmp=new CS(A,OBJ_temp,"A-x",1); - (*tmp) -= x; - return (*tmp); -} - - -template inline -CS& operator-(const T& x, const CS& A) -{ - // FIXME: what operation should this perform? - umERROR("operator-(x, CS)", "Not implemented"); - - CS *tmp=new CS(A,OBJ_temp,"x-A",1); - (*tmp) -= x; - return (*tmp); -} - - -//--------------------------------------------------------- -// Multiplication -//--------------------------------------------------------- -// C = A * B -//----------------- -// C = A * x -// C = x * A -//----------------- -// Y = A * DMat -//----------------- -// y = A * vec -// y = vec * A -//--------------------------------------------------------- - - -template inline -CS& operator*(const CS& A, const CS& B) -{ - CS *tmp=new CS(A,OBJ_temp,"A*B",1); // deletes A (if temp) - (*tmp) *= B; // deletes B (if temp) - return (*tmp); -} - -template inline -CS& operator*(const CS& A, const T& x) -{ - CS *tmp=new CS(A,OBJ_temp,"A*x",1); - (*tmp) *= x; - return (*tmp); -} - -template inline -CS& operator*(const T& x, const CS& A) -{ - CS *tmp=new CS(A,OBJ_temp,"x*A",1); - (*tmp) *= x; - return (*tmp); -} - - -inline // specialization for = -DMat& operator*(const CSd& A, const DMat& cX) -{ - // Y = A*X ... sparse * dense - - if (!A.ok()) { umERROR("CSd*DMat", "matrix is empty");} - if (!A.is_csc()) { umERROR("CSd*DMat", "matrix must be in csc form");} - - // use a non-const reference - DMat& X = const_cast(cX); - - int NrA=A.num_rows(), NcA=A.num_cols(); - int NrX=X.num_rows(), NcX=X.num_cols(); - assert(NrX == NcA); - // allocate zero result - DMat *Y=new DMat(NrA,NcX, "SP*X", OBJ_temp); - - // if the sparse mat is zero, return zero result - if (A.is_zero()) { - return (*Y); - } - - DVec x("x"),y("y"); - for (int j=1; j<=NcX; ++j) - { - y.borrow(NrA, Y->pCol(j)); // jth column of result - x.borrow(NrX, X.pCol(j)); // jth column of arg - A.gaxpy(x, y); // y += A*x - } - return (*Y); -} - - -template inline -Vector& operator*(const CS& A, const Vector& x) -{ - // y = A*x - - int Nr=A.num_rows(), Nc=A.num_cols(); - assert(x.size() == Nc); - Vector *tmp=new Vector(Nr, 0.0, OBJ_temp, "SP*v"); - Vector &y=(*tmp); // use a reference (for syntax) - - if (A.get_shape() & sp_SYMMETRIC) - { - // enable the operation when only one triangle - // of a symmetric matrix A is actually stored: - assert(A.is_square()); double Aij=0.0; - int n = A.num_cols(), i=0; - for (int j=0; j inline -Vector& operator*(const Vector& x, const CS& A) -{ - // y = x*A - - int Nr=A.num_rows(), Nc=A.num_cols(); - assert(x.size() == Nr); - Vector *tmp=new Vector(Nc, 0.0, OBJ_temp, "v*SP"); - Vector &y=(*tmp); // use a reference (for syntax) - A.gxapy(x, y); // y = x*A + 0 - - // delete temporaries - if (A.get_mode()==OBJ_temp) { delete (&A); } - if (x.get_mode()==OBJ_temp) { delete (&x); } - - return y; -} - - -//--------------------------------------------------------- -// Division -//--------------------------------------------------------- -// x = A | b ... Matlab's x = A\b -// x = A / b ... ? -//--------------------------------------------------------- - -// implemented in file CS_Utils.cpp -DVec& operator | (const CSd& A, const DVec& b); -DMat& operator | (const CSd& A, const DMat& B); - - - -/////////////////////////////////////////////////////////// -// -// Miscellaneous global operators (add as required) -// -//--------------------------------------------------------- -// find2D(A, op, val) Matlab "find(...)" -// trans(A, vals) return A^T -// perm (A,p,vals) return p(A) -// abs(A) return abs(A) -// aA_plus_bB C = alpha*A + beta*B -//--------------------------------------------------------- - - -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -IMat& find2D(const CS &A, char op, T val) -//--------------------------------------------------------- -{ - // Matlab "find": return both row and column info. - // See also find2D(Mat_COL,...), Vector::find(...) - // - // Note: from sparse matrices, Matlab seems to return - // row indices in col 2, and column indices in col 1. - - IMat& tmp = A.find2D(op, val); - // delete temp objects - if (A.get_mode() == OBJ_temp) { delete (&A); } - return (tmp); -} - - - -//--------------------------------------------------------- -template inline -CS& trans(const CS &A, int values) -//--------------------------------------------------------- -{ - // return C = A' - - if (!A.ok()) { umERROR("trans(CS)", "matrix is empty");} - if (!A.is_csc()) { umERROR("trans(CS)", "matrix must be in csc form");} - int do_values = (values && A.m_values) ? 1 : 0; - int m=A.m, n=A.n, p=0, q=0, j=0; IVec w(m); - CS* C = new CS(n, m, A.P[n], do_values, 0, OBJ_temp, "t.trans"); - if (!C->ok()||!w.ok()) {umERROR("trans(CS)", "out of memory");} - for (p=0; pcumsum(w, m); // prepare row pointers in C - for (j=0; jI[q=w[A.I[p]]++] = j; // place A(i,j) as entry C(j,i) - if (do_values) C->X[q]=A.X[p]; - } - } - return (*C); -} - - -//--------------------------------------------------------- -template inline -CS& trans2(const CS &A, int values) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "trans(%s)", A.name()); - - // Copy constructor deletes A (if temp) - CS* At = new CS(A, OBJ_temp, buf, values); - At->transpose(values); - return (*At); -} - - -//--------------------------------------------------------- -template inline -CS& perm(const CS &A, const IVec& pinv, const IVec& q, int values) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "perm(%s)", A.name()); - - // Copy constructor deletes A (if temp) - CS* tmp = new CS(A, OBJ_temp, buf, values); - tmp->permute(pinv, q, values); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -CS& abs(const CS &A) -//--------------------------------------------------------- -{ - // return abs(A) - CS* Z = new CS("t.abs", OBJ_temp); - if (!A.ok()) { umWARNING("abs(CS)", "matrix is empty"); return (*Z); } - if (!A.m_values) { umWARNING("abs(CS)", "matrix is sybolic (numeric data not stored)"); return (*Z); } - - CS* C = new CS(A, OBJ_temp, "abs(A)", 1); - if (!C->ok()) {umERROR("abs(CS)", "out of memory");} - C->X.set_abs(); - return (*C); -} - - -// C = alpha*A + beta*B -//--------------------------------------------------------- -template inline -CS& aA_plus_bB -( - const T& alpha, const CS& A, - const T& beta, const CS& B -) -//--------------------------------------------------------- -{ - // C = alpha*A + beta*B - - if (!A.is_csc() || !B.is_csc() || !A.is_compatible(B)) { - umERROR("CS: aA_plus_bB", "Both args must be csc"); - } - -#if (0) - - //####################################################### - CS *C = new CS(A, OBJ_temp, "a*A+b*B"); - (*C) *= alpha; - (*C) += (beta*B); - return (*tmp); - //####################################################### - -#else - - //####################################################### - int m=A.m, n=B.n, anz=A.P[A.n], bnz=B.P[B.n]; // num. nonzeros - int values = (A.m_values && B.m_values)?1:0; // do values? - IVec w(m); Vector x(values?m:0); // workspaces - CS *C = new CS(m,n,anz+bnz,values,0,OBJ_temp, "aA_plus_bB"); // result - if (!C->ok() || !w.ok() || (values && !x.ok())) { umERROR("aA_plus_bB", "out of memory."); } - int p=0, Nz=0; - for (int j=0; jok()); - return (*C); - //####################################################### - -#endif -} - - -//--------------------------------------------------------- -class CSS // CS Symbolic -//--------------------------------------------------------- -{ -public: - - IVec pinv; // inverse row perm. for QR, fill red. perm for Chol - IVec Q; // fill-reducing column permutation for LU and QR - IVec parent; // elimination tree for Cholesky and QR - IVec cp; // column pointers for Cholesky, row counts for QR - IVec leftmost; // leftmost[i] = min(find(A(i,:))), for QR - int m2; // # of rows for QR, after adding fictitious rows - double lnz; // # entries in L for LU or Cholesky; in V for QR - double unz; // # entries in U for LU; in R for QR - int m_mode; // {OBJ_real,OBJ_temp} - -public: - CSS(); - ~CSS(); - - void Free(); - void show_alloc() const; - int get_mode() const { return m_mode; } - void set_mode(int mode) { m_mode = mode; } - bool ok() const; - -}; - - -//--------------------------------------------------------- -class CSN // CS Numeric -//--------------------------------------------------------- -{ -public: - - CSd L; // L for LU and Cholesky, V for QR - CSd U; // U for LU, R for QR, not used for Cholesky - IVec pinv; // partial pivoting for LU - DVec B; // beta [0..n-1] for QR - CSd *C, *E; // pointers - int m_mode; // {OBJ_real,OBJ_temp} - -public: - CSN(); - ~CSN(); - - void Free(); - void show_alloc() const; - int get_mode() const { return m_mode; } - void set_mode(int mode) { m_mode = mode; } - bool ok() const; -}; - - -//--------------------------------------------------------- -class CS_Chol -//--------------------------------------------------------- -{ -public: - - CS_Chol(); - ~CS_Chol(); - - // Perform Cholesky factorization using - // selected AMD re-ordering mode: - int chol(CSd& A, int order=1, double dummy=0.0); - - // use factored form to solve for rhs, return x=A\rhs - DVec& solve(const DVec& rhs); - - // factor and solve for rhs, return x=A\rhs - DVec& chol_solve(int order, CSd& A, DVec& rhs); - -protected: - CSS *S; // symbolic info - CSN *N; // numeric data - DVec b, x; // rhs, solution -}; - - -//--------------------------------------------------------- -class CS_LU -//--------------------------------------------------------- -{ -public: - - CS_LU(); - ~CS_LU(); - - CSS* get_S() { return this->S; } // symbolic info - CSN* get_N() { return this->N; } // numeric data - DVec& get_b() { return this->b; } // rhs - DVec& get_x() { return this->x; } // solution - - // Perform LU factorization using appropriate - // AMD re-ordering: 0:natural, 1:Chol, 2:LU, 3:QR - // tol: partial pivoting "scale factor" - int lu(const CSd& A, int order=2, double tol=1.0); - - // use factored form to solve for rhs, return x=A\rhs - DVec& solve(const DVec& rhs); - - // use factored form to solve for MULTIPLE rhs's, return X=A\RHS - DMat& solve(const DMat& RHS); - -protected: - CSS *S; // symbolic info - CSN *N; // numeric data - DVec b, x; // rhs, solution -}; - - -//--------------------------------------------------------- -class CS_QR -//--------------------------------------------------------- -{ -public: - CS_QR() {} - ~CS_QR() {} - - bool ok() const { return true; } -}; - - -/* -//--------------------------------------------------------- -class CS_Cholinc -//--------------------------------------------------------- -{ -public: - - CS_Cholinc() {} - ~CS_Cholinc() {} - - // Perform Cholesky factorization using - // selected AMD re-ordering mode: - int cholinc(CSd& A, double droptol=1e-3, int order=1); - -protected: - CSd L; // lower triangular factor: A = L*L' -}; -*/ - - -//--------------------------------------------------------- -class CS_PCG -//--------------------------------------------------------- -{ -public: - - CS_PCG() - : m_droptol(1e-3), m_tol(1e-6), m_maxit(20), - m_verbose(true), m_factor(false), m_oldsol(false) {} - - ~CS_PCG() {} - - // create incomplete Cholesky preconditioner - int cholinc(CSd& A, double droptol=1e-3); - - // Use a preconditioned Conjugate Gradient method - // to return an iterative solution to: x = A\rhs. - DVec& solve(const DVec& rhs, double tol=1e-6, int maxit=20); - DVec& solve_LLT(const DVec& rhs); // x <- [LL']\rhs. - - // adjust options for incomplete factorization - void set_droptol(double dtol) { m_droptol = dtol; } - - // adjust options for pcg solver - void set_tol(double tol) { m_tol = tol; } - void set_maxit(int maxit) { m_maxit = maxit; } - void set_verbose(bool verb) { m_verbose = verb; } - - // get solver results - DVec& get_x() { return x; } - int get_flag() const { return m_flag; } - double get_relres() const { return m_relres; } - int get_iter() const { return m_iter; } - DVec& get_resvec() { return m_resvec; } - -protected: - // the system ------------------------- - CSd A; // symmetric pos.def system to solve - CSd L; // cholinc() preconditioner - DVec pb, px, x; // permuted rhs, permuted sol, sol. - DVec prec_x; // solution from preconditioner - IVec perm, pinv; // permutations - // parameters ------------------------- - double m_droptol; // [in] factorization drop-tol - double m_tol; // [in] solution convergence tol - int m_maxit; // [in] max iterations before abort - bool m_verbose; // [in] adjust log output - bool m_factor; // [in] cholinc factor exists - bool m_permute; // [in] previous solution exists - bool m_oldsol; // [in] previous solution exists - // result info ------------------------ - int m_flag; // [out] status info - double m_relres; // [out] |B-A*X|/|B| relative residual - int m_iter; // [out] num. iterations used 0<=iter<=MAXIT - DVec m_resvec; // [out] vector of |resid| at each iteration - //------------------------------------- -}; - - -// TODO: gmres -//--------------------------------------------------------- -class CS_GMRES -//--------------------------------------------------------- -{ -public: - - CS_GMRES() {} - ~CS_GMRES() {} - - // create incomplete LU preconditioner - int luinc(CSd& A, int order=2, double droptol=1e-6); - - // Use a preconditioned GMRES method - // to return an iterative solution to: x = A\rhs. - DVec& solve(const DVec& rhs); - -protected: - CSd A; // unsymmetric system to solve - CSd L,U; // luinc() preconditioner - DVec b, x; // rhs, solution - IVec perm, pinv; // permutations -}; - - -#endif // NDG__CS_Type_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CS_Utils.h b/cpp/nudg++/trunk/Include/CS_Utils.h deleted file mode 100644 index b30174c..0000000 --- a/cpp/nudg++/trunk/Include/CS_Utils.h +++ /dev/null @@ -1,129 +0,0 @@ -// CS_Utils.h -// declare utility routines used by CS structures -// 2007/10/06 -//--------------------------------------------------------- -#ifndef NDG__CS_Utils_H__INCLUDED -#define NDG__CS_Utils_H__INCLUDED - -#include "Vec_Type.h" - -// declare class CS -template class CS; -class CSS; // symbolic -class CSN; // numeric - -IVec& CS_counts(const CS& A, const IVec& parent, const IVec& post, int ata); -double CS_cumsum(IVec& p, IVec& c, int n); -int CS_happly(const CS& V, int i, double beta, DVec& x); -double CS_house(double *x, double *beta, int n); -int CS_ipvec(const IVec& p, const DVec& b, DVec& x, int n); -int CS_pvec (const IVec& p, const DVec& b, DVec& x, int n); -int CS_leaf(int i, int j, const int *first, int *maxfirst, int *prevleaf, int *ancestor, int *jleaf); -void CS_randperm(int n, int seed, IVec& p); -IVec& CS_pinv(const IVec& p, int n); -IVec& CS_post(const IVec& parent, int n); - - -//--------------------------------------------------------- -// triangular solves -//--------------------------------------------------------- -int CS_lsolve (const CS& L, DVec& x); -int CS_ltsolve(const CS& L, DVec& x); -int CS_usolve (const CS& U, DVec& x); -int CS_utsolve(const CS& U, DVec& x); -int CS_spsolve(CS& G, const CS& B, int k, IVec& xi, DVec& x, const IVec& pinv, int lo); - -//--------------------------------------------------------- -// utilites... -//--------------------------------------------------------- -int CS_reach(CS& G, const CS& B, int k, IVec& xi, const IVec& pinv); -int CS_rprune (int i, int j, double aij, void *other); -void CS_matched(int n, const int *wj, const int *imatch, IVec& p, IVec& q, int *cc, int *rr, int set, int mark); -void CS_unmatched (int m, const int *wi, IVec& p, int *rr, int set); - -bool CS_bfs(const CS& A, int n, int *wi, int *wj, IVec& queue, const int *imatch, const int *jmatch, int mark); -int CS_dfs(int j, CS& G, int top, IVec& xi, int *pstack, const int *pinv); -int CS_tdfs(int j, int k, int *head, const int *next, int *post, int *stack); -int CS_vcount(const CS &A, CSS *S); -void CS_augment(int k, const CS& A, int *jmatch, int *cheap, IVec& w, int *js, int *is, int *ps); - - -//--------------------------------------------------------- -// matrix reorderings -//--------------------------------------------------------- -CS& CS_symperm(const CS& A, const IVec& pinv, int values); -IVec& CS_amd(int order, const CS& A); - -//--------------------------------------------------------- -// qr routines -//--------------------------------------------------------- -CSS* CS_sqr(int order, const CS& A, int qr); -CSN* CS_qr(const CS& A, const CSS *S); -bool CS_qrsol(int order, const CS& A, DVec& b); - -//--------------------------------------------------------- -// lu routines -//--------------------------------------------------------- -bool CS_lusol(int order, const CS& A, DVec& b, double tol); -CSN* CS_lu(const CS& A, const CSS *S, double tol); - - -//--------------------------------------------------------- -// Cholesky routines -//--------------------------------------------------------- -bool CS_cholsol(int order, CS& A, DVec& b); -CSS* CS_schol(int order, const CS& A); -CSN* CS_chol(CS& A, const CSS *S, bool own_A=false); - -//--------------------------------------------------------- -// macros -//--------------------------------------------------------- -#define CS_FLIP(i) (-(i)-2) -#define CS_UNFLIP(i) (((i) < 0) ? CS_FLIP(i) : (i)) -#define CS_MARKED(w,j) (w[j]<0) -#define CS_MARK(w,j) { w[j]=CS_FLIP(w[j]); } - - - -// typedef struct cs_dmperm_results {...} csd; -// cs_dmperm or cs_scc output -//--------------------------------------------------------- -class cs_dp -//--------------------------------------------------------- -{ -public: - cs_dp(int m, int n) - { - P.resize(std::max(m,1)); - R.resize(m+6); - Q.resize(std::max(n,1)); - S.resize(n+6); - - // init coarse row/col decompositions - for (int i=0; i<5; ++i) {rr[i]=cc[i]=0;} - -#ifndef NDEBUG - assert(P.ok() && Q.ok()); - assert(R.ok() && S.ok()); -#endif - - } - - ~cs_dp() {} - - int get_mode() const { return m_mode; } - void set_mode(int mode) { m_mode = mode; } - bool ok() const { return true; } - - IVec P; // size m, row permutation - IVec Q; // size n, column permutation - IVec R; // size nb+1, block k is rows r[k] to r[k+1]-1 in A(p,q) - IVec S; // size nb+1, block k is cols s[k] to s[k+1]-1 in A(p,q) - int nb; // # of blocks in fine dmperm decomposition - int rr[5]; // coarse row decomposition - int cc[5]; // coarse column decomposition - int m_mode; // {OBJ_real,OBJ_temp} -}; - - -#endif // NDG__CS_Utils_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CS_dp.h b/cpp/nudg++/trunk/Include/CS_dp.h deleted file mode 100644 index 8b13789..0000000 --- a/cpp/nudg++/trunk/Include/CS_dp.h +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cpp/nudg++/trunk/Include/Constants.h b/cpp/nudg++/trunk/Include/Constants.h deleted file mode 100644 index e7c59bb..0000000 --- a/cpp/nudg++/trunk/Include/Constants.h +++ /dev/null @@ -1,785 +0,0 @@ -// Constants.h -// numeric and GUI constants -// 2006/12/12 -//--------------------------------------------------------- -#ifndef NDG__Constants_H__INCLUDED -#define NDG__Constants_H__INCLUDED - - - -/////////////////////////////////////////////////////////// -// -// Numeric constants -// -/////////////////////////////////////////////////////////// - -// some systems do not support M_PI in math.h etc: - -#ifndef M_E -#define M_E 2.7182818284590452354 // e -#endif -#ifndef M_LOG2E -#define M_LOG2E 1.4426950408889634074 // log 2e -#endif -#ifndef M_LOG10E -#define M_LOG10E 0.43429448190325182765 // log 10e -#endif -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 // log e2 -#endif -#ifndef M_LN10 -#define M_LN10 2.30258509299404568402 // log e10 -#endif -#ifndef M_PI -#define M_PI 3.14159265358979323846 // pi -#endif -#ifndef M_PI_2 -#define M_PI_2 1.57079632679489661923 // pi/2 -#endif -#ifndef M_1_PI -#define M_1_PI 0.31830988618379067154 // 1/pi -#endif -#ifndef M_PI_4 -#define M_PI_4 0.78539816339744830962 // pi/4 -#endif -#ifndef M_2_PI -#define M_2_PI 0.63661977236758134308 // 2/pi -#endif - -#undef PI -//#define PI 3.141592653589793238462643383279502884197169399375105820974944592308 -#define PI 3.14159265358979323846 -//#define SQUAREROOTTWO 1.4142135623730950488016887242096980785696718753769480732 -#define SQUAREROOTTWO 1.41421356237309504880 - -/////////////////////////////////////////////////////////////////////////////// -// Constants -/////////////////////////////////////////////////////////////////////////////// -const double TWOPI = 2.0 * PI; -const double FOURPI = 4.0 * PI; -const double HALFPI = 0.5 * PI; -const double inv1pi = 1.0 / PI; -const double inv2pi = 1.0 / TWOPI; -const double inv4pi = 1.0 / FOURPI; - -const double SQROOTTWO = 1.414213562373095048801688724209698; -const double ONETHIRD = 1.0/3.0; -const double TWOTHIRD = 2.0/3.0; -const double ONESIXTH = 1.0/6.0; - -const double DM_E = 2.7182818284590452354; // e -const double DM_LOG2E = 1.4426950408889634074; // log 2e -const double DM_LOG10E = 0.43429448190325182765; // log 10e -const double LOG10E = DM_LOG10E; -const double DM_LN2 = 0.69314718055994530942; // log e2 -const double DM_LN10 = 2.30258509299404568402; // log e10 - - -// Adjust degenerate COLOR/CONTOUR ranges: -const double MIN_COLOR_delta = 1.0e-10; // PageVizColormap.cpp (line 109) -const double MIN_CONTOUR_delta = 1.0e-5; // PageVizContour.cpp (line 100) - - -/////////////////////////////////////////////////////////// -// -// enums for messages and control IDs -// -/////////////////////////////////////////////////////////// - -enum SLEDGE_WND_IDs -{ - // Window identifiers for FindWindowById() - umID_WND_MAIN = 101, - umID_WND_HELP = 102, - umID_WND_PLOT = 103, - umID_WND_GEOM_2D = 104, - umID_WND_GEOM_3D = 105, - umID_WND_SIM_CTRL = 106, - umID_WND_AVI_CTRL = 107, - umID_WND_EXP_CTRL = 108, - // windows for custom GUIs - umID_WND_USEME = 201, - umID_WND_GNUPLOT = 202, - umID_WND_BBH = 210, - umID_WND_WICK = 211, - umID_WND_DISC_CTRL = 211 - // ... - // ... -}; - -enum SLEDGE_ThreadEvents -{ - // events passed from sim threads to GUI panels - umID_WORKER_EVENT = 301, - umID_DOPLOT_EVENT = 302, - umID_RENDER_EVENT = 303, - - umID_MENU_EVENT = 306, // [Apply] from Menu GUI - umID_PDEWIZ_EVENT = 307, // [Apply] from PDEWiz GUI - - umID_LOAD_DOMAINS = 310, // [Load] from Mesh GUI - - umID_SCURVE_EVENT = 321, - - umID_UPDATE_GUI = 350 -}; - -enum SLEDGE_ThreadState -{ - THREAD_INVALID = -2, - THREAD_ABORTED = -1, - THREAD_CREATED = 0, - THREAD_ON_ENTRY = 1, - THREAD_RUNNING = 2, - THREAD_PROGRESS = 3, - THREAD_RESULTS = 4, - THREAD_SIM_END = 5, - THREAD_PAUSED = 6, - THREAD_RESUMED = 7, - THREAD_STOPPED = 8, - THREAD_KILLED = 9, - THREAD_FINISHED = 10, - THREAD_ON_EXIT = 11, - THREAD_EXCEPTION = 12 -}; - -enum SLEDGE_ThreadMsgs -{ - umUSER_0 = 4000, - umUSER_THREAD_CREATED = (umUSER_0 + THREAD_CREATED), - umUSER_THREAD_RUNNING = (umUSER_0 + THREAD_RUNNING), - umUSER_THREAD_PROGRESS = (umUSER_0 + THREAD_PROGRESS), - umUSER_THREAD_RESULTS = (umUSER_0 + THREAD_RESULTS), - umUSER_THREAD_FINISHED = (umUSER_0 + THREAD_FINISHED), - umUSER_THREAD_PAUSED = (umUSER_0 + THREAD_PAUSED), - umUSER_THREAD_RESUMED = (umUSER_0 + THREAD_RESUMED), - umUSER_THREAD_STOPPED = (umUSER_0 + THREAD_STOPPED), - umUSER_THREAD_KILLED = (umUSER_0 + THREAD_KILLED), - umUSER_THREAD_ABORTED = (umUSER_0 + THREAD_ABORTED), - umUSER_THREAD_EXCEPTION = (umUSER_0 + THREAD_EXCEPTION) -}; - - -enum SLEDGE_PlotRequest -{ - PLOT_ERRORS = 0, // algebraic equation - PLOT_R_PROFILE = 1, // disc profile - PLOT_BVI_MAG = 2, // disc BVI magnitudes - PLOT_V_STRUCT = 3, // Vertical structure - PLOT_TLUSTY_DAT = 4, // TLusty input data - PLOT_TLUSTY_FLUX = 5, // TLusty output flux - PLOT_SPECTRUM = 6, // disc spectrum - //--------------------------------------------- - PLOT_CLAW1D = 11, // CLAWPack 1D - PLOT_CLAW2D = 12, // CLAWPack 2D - PLOT_CLAW3D = 13, // CLAWPack 3D - //--------------------------------------------- - PLOT_TEST = 17, // testing... - //--------------------------------------------- - PLOT_SHOW_AEQ = 21, // algebraic equation - PLOT_SHOW_DAE = 22, // DAE convergence - PLOT_SHOW_SCURVE = 23, // disk S-curves - PLOT_CANNIZZO = 24, // Canizzo disc state - //--------------------------------------------- - PLOT_GAL_ORBIT = 30, // galactic orbit - PLOT_SHOW_RCS = 41, // Hagstrom RCS - //--------------------------------------------- - PLOT_MATRIX_COLS = 50, // col-major data, e.g. PDE eigenvalues - PLOT_MATRIX_ROWS = 51 // row-major data, e.g. PDE eigenvalues -}; - - -enum SLEDGE_VtkRequest -{ - RENDER_VTK_GUI = 0, - RENDER_VTK_MESH = 1, - RENDER_VTK_FIELD = 2, - RENDER_VTK_SCALARS = 3, - RENDER_VTK_VECTORS = 4, - UPDATE_VTK_DATASET = 5, - RENDER_VTK_C6464 = 10, - RENDER_VS_COL = 11, - RENDER_CANNIZZO = 12 -}; - - -enum SLEDGE_SimRequest -{ - // Rebuild Vtk objects to match Cannizzo grid - SET_CANNIZZO_RADII = 1, - SET_CANNIZZO_MDOT = 2, - SET_WALID_RADII = 3 -}; - - -enum SLEDGE_UserMode { - USER_MODE_None = 0, - USER_MODE_Define = 1, - USER_MODE_Build = 2, - USER_MODE_Solve = 3, - USER_MODE_Zoom = 4, - USER_MODE_Explore = 5, - USER_MODE_Element = 6, - //------------------------- - // 2D Geometry - //------------------------- - USER_MODE_Rect = 20, - USER_MODE_Ellipse = 21, - USER_MODE_Vertex = 22, - USER_MODE_Hole2D = 25, - USER_MODE_Region2D = 26, - USER_MODE_Select2D = 27, - USER_MODE_Adjust2D = 28, - USER_MODE_SetBC2D = 29, - //------------------------- - // 3D Geometry - //------------------------- - USER_MODE_Hexagon = 30, - USER_MODE_Sphere = 31, - USER_MODE_Torus = 32, - USER_MODE_Hole3D = 35, - USER_MODE_Region3D = 36, - USER_MODE_Select3D = 37, - USER_MODE_Adjust3D = 38, - USER_MODE_SetBC3D = 39 -}; - - -// Used as radio transfer values -enum SLEDGE_VideoMode -{ - MODE_RECORD_AVI = 0, - MODE_RECORD_MPEG = 1, - MODE_RECORD_WMV = 2 -}; - - -enum SLEDGE_PlotMode2D -{ - MODE_Plot_SINGLE = 0, // profiles : plot a single data set - MODE_Plot_MULTI = 1, // S-curves : accumulate multiple data sets - MODE_Plot_BUFFER = 2 // BVI Light: plot subset of data buffer -}; - - - -//--------------------------------------------------------- -// Toolbar IDs -//--------------------------------------------------------- -#define umID_TOOLBAR_MAIN 1100 -#define umID_TOOLBAR_PLOT 1101 -#define umID_TOOLBAR_WICK 1102 -#define umID_TOOLBAR_BBH 1103 -#define umID_TOOLBAR_MESH 1104 -#define umID_TOOLBAR_USEME 1105 - - -//--------------------------------------------------------- -// IDs for Tools in umMainFrame (ID_TOOLBAR_MAIN) -//--------------------------------------------------------- -#define umID_SIM 1110 -#define umID_LOG 1111 -#define umID_ENV 1112 -#define umID_DISPL 1113 -#define umID_GRAPH 1114 -#define umID_EXTRA 1115 -#define umID_ABOUT 1116 -#define umID_HELP 1117 - -#define umID_WIZ 1120 -#define umID_MENU 1121 -#define umID_MOVIE 1122 - -#define umID_PLOT 1130 -#define umID_PLOTS 1131 -#define umID_PLOTBUF 1132 - -#define umID_GNUPLOT 1140 -#define umID_USEMe 1141 -#define umID_C6464 1142 -#define umID_DISC 1143 -#define umID_WICK 1144 -#define umID_TEXTWIN 1145 -#define umID_MESH 1146 - -#define umID_MENU_OPTIONS 1150 -#define umID_MENU_RESET 1151 - - -//--------------------------------------------------------- -// IDs for Tools in umUSEMeView (ID_TOOLBAR_USEME) -//--------------------------------------------------------- -#define umID_VIEW_RESET 1140 -#define umID_SHOW_MESH_CTRLS 1141 -#define umID_SHOW_VIZ_CTRLS 1142 -#define umID_SHOW_LIGHT_TOOL 1143 -#define umID_SHOW_DISC_CTRLS 1144 - -#define umID_SHOW_USEME_GEOM 1150 -#define umID_SHOW_USEME_BDRY 1151 -#define umID_SHOW_USEME_MESH 1152 - -#define umID_SHOW_USEME_FIELD 1155 -#define umID_SHOW_USEME_CNTRS 1156 -#define umID_SHOW_USEME_SLICE 1157 - -#define umID_SHOW_USEME_AXES 1160 -#define umID_SHOW_USEME_CANVAS 1161 -#define umID_SHOW_USEME_WORLD 1162 - -#define umID_SHOW_USEME_TEXT 1166 - -//--------------------------------------------------------- -// ?? -//--------------------------------------------------------- -#define umID_BBH_VTK 1190 -#define umID_MESH_VTK 1191 -#define umID_WICK_VTK 1192 -#define umID_USEME_VTK 1193 -#define umID_FIELD_VTK 1194 - -//--------------------------------------------------------- -// Common IDs for menus -//--------------------------------------------------------- -#define umID_QUIT 1210 -#define umID_SAVE 1211 -#define umID_CLEAR_LOG 1212 -#define umID_TOGGLE_LOG 1213 -#define umID_TT_DELAY 1214 -#define umID_TT_ENABLE 1215 - -#define umID_PREFER 1300 -#define umID_PROPERTIES 1301 -#define umID_TOOLBAR 1310 -#define umID_STATBAR 1311 - -//--------------------------------------------------------- -// IDs for PlotView -//--------------------------------------------------------- -#define umID_SCALE_MINMAX 1400 -#define umID_SCALE_AUTO 1401 -#define umID_SCALE_FULL 1402 - -//--------------------------------------------------------- -// IDs for Menu -//--------------------------------------------------------- -#define umID_TREE_MENU 1430 -#define umID_EDIT_COMMAND 1431 -#define umID_EDIT_PROMPT 1432 -#define umID_EDIT_VALID 1433 -#define umID_COMBO_ANSWER 1434 -#define umID_EDIT_CURVAL 1435 -#define umID_BTN_ACCEPT 1436 - -//--------------------------------------------------------- -// Common IDs for controls -//--------------------------------------------------------- -#define umID_FIND 2000 -#define umID_LOAD 2001 -#define umID_EDIT 2002 -#define umID_SAVEAS 2003 -#define umID_WRITE 2004 -#define umID_CLEAR 2005 - -#define umID_FIND_MENU 2010 -#define umID_LOAD_MENU 2011 -#define umID_EDIT_MENU 2012 - -#define umID_DELETE_ALL 2020 -#define umID_ADD 2021 -#define umID_DELETE 2022 -#define umID_VERIFY 2023 -#define umID_APPLY 2024 -#define umID_RESET 2025 - -#define umID_SLIDER 2041 - -#define umID_SLIDER_1 2051 -#define umID_SLIDER_2 2052 -#define umID_SLIDER_3 2053 -#define umID_SLIDER_4 2054 -#define umID_SLIDER_5 2055 - -#define umID_COLOR_R 2071 -#define umID_COLOR_G 2072 -#define umID_COLOR_B 2073 - -// Standard camera settings -#define umID_CAM_POS_X 2081 -#define umID_CAM_POS_Y 2082 -#define umID_CAM_POS_Z 2083 - -#define umID_CAM_NEG_X 2084 -#define umID_CAM_NEG_Y 2085 -#define umID_CAM_NEG_Z 2086 - -// User-defined camera settings -#define umID_CAM_USER_1 2091 -#define umID_CAM_USER_2 2092 -#define umID_CAM_USER_3 2093 -#define umID_CAM_USER_4 2094 -#define umID_CAM_USER_5 2095 -#define umID_CAM_USER_6 2096 -#define umID_CAM_USER_7 2097 -#define umID_CAM_USER_8 2098 - -#define umID_GRID_LIGHTS 2100 - -#define umID_LOG_NOTEBOOK 2300 - -#define umID_COMBO_BDRY 2510 -#define umID_COMBO_SPP 2512 -#define umID_COMBO_MENU 2513 -#define umID_COMBO_SIM 2514 -#define umID_COMBO_P 2515 -#define umID_COMBO_Q 2516 - - -// Simulation controls -#define umID_TEXT_PSTEP 2520 -#define umID_TEXT_FTIME 2521 -#define umID_TEXT_STATUS 2522 -#define umID_TREE_FIELD 2525 - -// Recording sim as movie -#define umID_MOIVIEOPTS 2530 -#define umID_MOVIE_NAME 2531 -#define umID_SET_NAME 2532 -#define umID_MOVIE_BPP 2533 -#define umID_MOVIE_FPS 2534 -#define umID_RADIO_MODE 2535 - -// Mesh options -#define umID_TREE_MESH 2540 - - -// ... -// ... grid for BC/facetype colors (RGB ) -// ... -// ... -// ... - - -// Atom grid -#define umID_COMBO_PROF 2550 -#define umID_TEXT_TMIN 2551 -#define umID_TEXT_TMAX 2552 -#define umID_TEXT_WLO 2553 -#define umID_TEXT_W_N 2554 -#define umID_TEXT_WHI 2555 - - -/////////////////////////////////////////////////////////// -// -// Viz pages -// -/////////////////////////////////////////////////////////// - -#define umID_CHOICE_CATEGORY 2600 -#define umID_CHK_VIZ_AUTO 2601 -#define umID_CHK_VIZ_WIRE 2602 -#define umID_CHK_VIZ_SHOW 2605 - -//--------------------------------------------------------- -// IDD_PAGE_VIZ_ ? GENERAL -//--------------------------------------------------------- -#define umID_CHOICE_INTERP 2610 -#define umID_CHOICE_ORDER 2611 -#define umID_CHECK_INTERP_TRI 2612 -#define umID_CHECK_WIREFRAME 2613 -#define umID_CHECK_GRAYSCALE 2614 -#define umID_CHECK_LEGEND 2615 -#define umID_CHECK_OUTLINE 2616 - -//--------------------------------------------------------- -// IDD_PAGE_VIZ_ ? COLORMAP -//--------------------------------------------------------- -#define umID_TEXT_CMIN 2621 -#define umID_TEXT_CMAX 2622 -#define umID_TEXT_OPACITY 2623 - -#define umID_CHK_VIZ_SCALE 2624 -#define umID_SLIDER_SCALE 2625 -#define umID_TEXT_SCALE 2626 - -//--------------------------------------------------------- -// IDD_PAGE_VIZ_ ? CONTOUR -//--------------------------------------------------------- -#define umID_TEXT_NLEVELS 2631 -#define umID_TEXT_CTRMIN 2632 -#define umID_TEXT_CTRMAX 2633 - -//--------------------------------------------------------- -// IDD_PAGE_VIZ_SLICE -//--------------------------------------------------------- -#define umID_TEXT_X 2640 -#define umID_TEXT_Y 2641 -#define umID_TEXT_Z 2642 -#define umID_TEXT_OPAC_X 2643 -#define umID_TEXT_OPAC_Y 2644 -#define umID_TEXT_OPAC_Z 2645 - -#define umID_CHECK_X 2650 -#define umID_CHECK_Y 2651 -#define umID_CHECK_Z 2652 -#define umID_CHECK_CTR_X 2653 -#define umID_CHECK_CTR_Y 2654 -#define umID_CHECK_CTR_Z 2655 - - -//--------------------------------------------------------- -// Message to all Viz pages: HandleNewDataSet() -//--------------------------------------------------------- -#define umID_NEW_DATASET 2690 - - -/////////////////////////////////////////////////////////// -// -// Mesh Control panel -// -/////////////////////////////////////////////////////////// -#define umID_MESH_NOTEBOOK 2700 - -#define umID_MeshOpts_P1 2701 -#define umID_MeshOpts_P2 2702 -#define umID_MeshOpts_P3 2703 -#define umID_MeshOpts_P4 2704 - -#define umID_MESHOPTS2D 2712 -#define umID_MESHOPTS3D 2713 - -#define umID_VizOpts_CMAP 2721 -#define umID_VizOpts_SLICE 2722 -#define umID_VizOpts_P3 2723 -#define umID_VizOpts_P4 2724 - -#define umID_VISIBLE 2730 -#define umID_3DW_ON 2731 -#define umID_COLOR_GRID 2732 - - - -/////////////////////////////////////////////////////////// -// -// Simulation Control panel -// -/////////////////////////////////////////////////////////// -#define umID_SIM_NOTEBOOK 2800 - -#define umID_SimCTRL_P1 2801 -#define umID_SimCTRL_P2 2802 -#define umID_SimCTRL_P3 2803 -#define umID_SimCTRL_P4 2804 - -/////////////////////////////////////////////////////////// -// -// Disc Control panel -// -/////////////////////////////////////////////////////////// -#define umID_DISC_NOTEBOOK 2810 - -#define umID_DiscCTRL_P1 2811 -#define umID_DiscCTRL_P2 2812 - - -/////////////////////////////////////////////////////////// -// -// PDE Wizard -// -/////////////////////////////////////////////////////////// -#define umID_WIZ_NOTEBOOK 2900 - -#define umID_PDE_WIZ_1LAWS 2901 -#define umID_PDE_WIZ_2DERIV 2902 -#define umID_PDE_WIZ_3BCOND 2903 -#define umID_PDE_WIZ_4INITC 2904 -#define umID_PDE_WIZ_5PARAM 2905 -#define umID_PDE_WIZ_6ANAL 2906 - -#define umID_CHOICE_WIZ_FILES 2910 -#define umID_CHOICE_WIZ_SOLVER 2911 -#define umID_CHOICE_WIZ_FLUX 2912 -#define umID_CHOICE_WIZ_LIMITER 2913 - - -/////////////////////////////////////////////////////////// -// -// Mesh module -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -// Geometry module IDS -//--------------------------------------------------------- -#define ID_MESH_VTK_VIEW 3001 - -#define umID_REFRESH 3010 -#define umID_SOURCE 3011 -#define umID_EXTRACT 3012 - -// editing modes -#define umID_MODE_NONE 3100 -#define umID_MODE_DESIGN 3101 -#define umID_MODE_ADJUST 3102 -#define umID_MODE_ZOOM 3104 -// 2D modes -#define umID_MODE_SELECT 3110 -#define umID_MODE_CIRCLE 3111 -#define umID_MODE_RECT 3112 -#define umID_MODE_ELLIPSE 3113 -#define umID_MODE_LINE 3114 -#define umID_MODE_VERTEX 3115 -#define umID_MODE_POLY 3116 -#define umID_MODE_SPLINE 3117 -#define umID_MODE_BEZIER 3118 -// 3D modes -#define umID_MODE_HEXAGON 3121 -#define umID_MODE_SPHERE 3122 -#define umID_MODE_ELLIPSOID 3123 -// spare mode IDs -#define umID_MODE_SPARE1 3131 -#define umID_MODE_SPARE2 3132 -#define umID_MODE_SPARE3 3133 -#define umID_MODE_SPARE4 3134 -#define umID_MODE_SPARE5 3135 -// regions -#define umID_MODE_HOLE 3141 -#define umID_MODE_REGION 3142 - -#define umID_TREE_BDRY_2D 3151 -#define umID_TREE_BDRY_3D 3152 - - -//--------------------------------------------------------- -// Mesh module control IDS -//--------------------------------------------------------- -#define umID_BH_SYS_RADIUS 3510 -#define umID_BH_HOLE1_X 3511 -#define umID_BH_HOLE2_X 3512 -#define umID_GRUMMP_RESOLUTION 3513 -#define umID_GRUMMP_GRADATION 3514 - -#define umID_GEN_MESH_SURF 3520 -#define umID_GEN_MESH_GRUMMP 3521 -#define umID_GEN_MESH_STOP 3522 -#define umID_GEN_MESH_KILL 3523 - -#define umID_GRID_TREE 3531 - - -/////////////////////////////////////////////////////////// -// -// Field module -// -/////////////////////////////////////////////////////////// - -//--------------------------------------------------------- -// Field module menu IDS -//--------------------------------------------------------- -#define umID_FIELD_ID_1 4001 - -//--------------------------------------------------------- -// Field module control IDS -//--------------------------------------------------------- -#define umID_FIELD_IDC_1 4501 - - -/////////////////////////////////////////////////////////// -// -// Simulation module -// -/////////////////////////////////////////////////////////// -// NOTE: #define wxID_LOWEST 4999 -// NOTE: #define wxID_HIGHEST 5999 - - -//--------------------------------------------------------- -// Simulation module menu IDS -//--------------------------------------------------------- -#define umID_SIM_ID_1 6101 - -//--------------------------------------------------------- -// Simulation module control IDS -//--------------------------------------------------------- -#define umID_SIM_WIZ 6501 -#define umID_SIM_OPTS 6502 -#define umID_SIM_AMR 6503 - -// simulation thread -#define umID_THREAD_START 6511 -#define umID_THREAD_PAUSE 6512 -#define umID_THREAD_STOP 6513 -#define umID_THREAD_KILL 6514 - -// movie recording -#define umID_RECORD_START 6521 -#define umID_RECORD_PAUSE 6522 -#define umID_RECORD_STOP 6523 - - -//--------------------------------------------------------- -// Light kit control IDS -//--------------------------------------------------------- -#define IDC_LIGHT_0 7000 -#define IDC_LIGHT_1 7001 -#define IDC_LIGHT_2 7002 -#define IDC_LIGHT_3 7003 -#define IDC_LIGHT_4 7004 -#define IDC_LIGHT_5 7005 -#define IDC_LIGHT_6 7006 -#define IDC_LIGHT_7 7007 - -#define IDC_LIGHT_RESET 7011 -#define IDC_LIGHT_COLOR 7012 - - -/////////////////////////////////////////////////////////// -// -// Wick Binary/Accretion module -// -/////////////////////////////////////////////////////////// - -//--------------------------------------------------------- -// Wick Binary/Accretion module menu IDS -//--------------------------------------------------------- - -enum { - SOLVER_Hameury = 0, // building input for Hameury - SOLVER_SCurve = 1 // generating S-Curve data -}; - - -enum { - SPECTRUM_Walid = 0, // Wavelength vs Flux - SPECTRUM_TLusty = 1 // Frequency vs Flux -}; - -enum { - TL_TEST_wavl = 0, // test plot is against wavelength - TL_TEST_freq = 1 // test plot is against frequency -}; - - -//--------------------------------------------------------- -// Wick Binary/Accretion module control IDS -//--------------------------------------------------------- -#define IDC_WICK_M1 7101 -#define IDC_WICK_M2 7102 -#define IDC_WICK_P 7103 -#define IDC_WICK_Q 7104 -#define IDC_WICK_RS 7110 -#define IDC_WICK_R1 7111 -#define IDC_WICK_R2 7112 -#define IDC_WICK_NATOMS 7116 -#define IDC_WICK_NREF 7117 -#define IDC_WICK_GRID 7120 - -#define IDC_BBH_M1 7201 -#define IDC_BBH_M2 7202 -#define IDC_BBH_P 7203 -#define IDC_BBH_Q 7204 -#define IDC_BBH_GRID 7220 - - -#endif // NDG__Constants_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Cub2D.h b/cpp/nudg++/trunk/Include/Cub2D.h deleted file mode 100644 index 498f003..0000000 --- a/cpp/nudg++/trunk/Include/Cub2D.h +++ /dev/null @@ -1,64 +0,0 @@ -// Cub2D.h -// 2D Cubature data -// 2007/06/06 -//--------------------------------------------------------- -#ifndef NDG__Cub2D_H__INCLUDED -#define NDG__Cub2D_H__INCLUDED - -#include "Mat_COL.h" - -//--------------------------------------------------------- -class Cub2D -//--------------------------------------------------------- -{ -public: - Cub2D(); - int Ncub; - DVec r, s, w; - DMat W; - DMat V, Dr, Ds, VT, DrT, DsT; - DMat x,y, rx, sx, ry, sy, J; - DMat mm, mmCHOL; -}; - - -//--------------------------------------------------------- -class Gauss2D -//--------------------------------------------------------- -{ -public: - Gauss2D(); - void resize(int Ng, int K, int Nfaces); - int NGauss; - DVec z, w; - DMat x, y, W; - IMat mapM, mapP; - IVec mapI,mapO,mapW,mapC,mapS,mapD,mapN,mapB; - DMat nx, ny, J, sJ, rx, ry, sx, sy; - DMat interp, interpT, finterp[4]; -}; - - -//--------------------------------------------------------- -class CInfo2D -//--------------------------------------------------------- -{ -public: - CInfo2D() : elmt(0) {} - - void resize(int Ng, int Nf){ - // these need to be sized before use - gnx.resize(Ng,Nf); gx.resize(Ng,Nf); - gny.resize(Ng,Nf); gy.resize(Ng,Nf); - } - - int elmt; // element number in global mesh - DMat MM; // mass matrix - DMat Dx, Dy; // physical derivative matrices - DMat gnx,gx,gny,gy; // normals and coordinates at Gauss nodes - DMat gVM[4], gVP[4]; // Vandermondes for '-' and '+' traces - DMat glift[4]; // matrices to lift Gauss node data -}; - - -#endif // NDG__Cub2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Cub3D.h b/cpp/nudg++/trunk/Include/Cub3D.h deleted file mode 100644 index cb33ef4..0000000 --- a/cpp/nudg++/trunk/Include/Cub3D.h +++ /dev/null @@ -1,67 +0,0 @@ -// Cub3D.h -// 3D Cubature data -// 2007/09/23 -//--------------------------------------------------------- -#ifndef NDG__Cub333D_H__INCLUDED -#define NDG__Cub333D_H__INCLUDED - -#include "Mat_COL.h" - -//--------------------------------------------------------- -class Cub3D -//--------------------------------------------------------- -{ -public: - Cub3D(); - int Ncub; - DVec R, S, T, w; - DMat W; - DMat V, Dr, Ds, Dt, VT, DrT, DsT, DtT; - DMat x,y,z, rx,sx,tx, ry,sy,ty, rz,sz,tz, J; - DMat mm, mmCHOL; -}; - - -// FIXME: adjust for 3D -//--------------------------------------------------------- -class Gauss3D -//--------------------------------------------------------- -{ -public: - Gauss3D(); - void resize(int Ng, int K, int Nfaces); - int NGauss; - // DVec z, w; - // DMat x, y, z, W; - IMat mapM, mapP; - IVec mapI,mapO,mapW,mapC,mapS,mapD,mapN,mapB; - DMat nx,ny,nz, J, sJ, rx,ry,rz, sx,sy,sz, tx,ty,tz; - DMat interp, interpT, finterp[5]; -}; - - - -// FIXME: adjust for 3D -//--------------------------------------------------------- -class CInfo3D -//--------------------------------------------------------- -{ -public: - CInfo3D() : elmt(0) {} - - void resize(int Ng, int Nf){ - // these need to be sized before use - gnx.resize(Ng,Nf); gx.resize(Ng,Nf); - gny.resize(Ng,Nf); gy.resize(Ng,Nf); - } - - int elmt; // element number in global mesh - DMat MM; // mass matrix - DMat Dx, Dy, Dz; // physical derivative matrices - DMat gnx,gx,gny,gy,gnz,gz; // normals and coordinates at Gauss nodes - DMat gVM[5], gVP[5]; // Vandermondes for '-' and '+' traces - DMat glift[5]; // matrices to lift Gauss node data -}; - - -#endif // NDG__Cub333D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CubatureData2D.h b/cpp/nudg++/trunk/Include/CubatureData2D.h deleted file mode 100644 index 0518640..0000000 --- a/cpp/nudg++/trunk/Include/CubatureData2D.h +++ /dev/null @@ -1,39 +0,0 @@ -// CubatureData2D.h -// declare arrays of precalculated cubature data -// 2007/06/06 -//--------------------------------------------------------- -#ifndef NDG__CubatureData2D_H__INCLUDED -#define NDG__CubatureData2D_H__INCLUDED - -extern double cub2D_1[3]; -extern double cub2D_2[9]; -extern double cub2D_3[18]; -extern double cub2D_4[18]; -extern double cub2D_5[21]; -extern double cub2D_6[36]; -extern double cub2D_7[45]; -extern double cub2D_8[48]; -extern double cub2D_9[57]; - -extern double cub2D_10[75]; -extern double cub2D_11[84]; -extern double cub2D_12[108]; -extern double cub2D_13[120]; -extern double cub2D_14[138]; -extern double cub2D_15[162]; -extern double cub2D_16[174]; -extern double cub2D_17[198]; -extern double cub2D_18[219]; -extern double cub2D_19[246]; - -extern double cub2D_20[255]; -extern double cub2D_21[279]; -extern double cub2D_22[300]; -extern double cub2D_23[318]; -extern double cub2D_24[354]; -extern double cub2D_25[378]; -extern double cub2D_26[414]; -extern double cub2D_27[435]; -extern double cub2D_28[675]; - -#endif // NDG__CubatureData2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CurvedCNS2D.h b/cpp/nudg++/trunk/Include/CurvedCNS2D.h deleted file mode 100644 index cd7f287..0000000 --- a/cpp/nudg++/trunk/Include/CurvedCNS2D.h +++ /dev/null @@ -1,86 +0,0 @@ -// CurvedCNS2D.h -// solver for 2D compressible Navier-Stokes equations -// 2007/07/12 -//--------------------------------------------------------- -#ifndef NDG__Curved_C_NS2D_H__INCLUDED -#define NDG__Curved_C_NS2D_H__INCLUDED - -//#include "CurvedEuler2D.h" -#include "NDG2D.h" - -//--------------------------------------------------------- -class CurvedCNS2D : public NDG2D // CurvedEuler2D -//--------------------------------------------------------- -{ -public: - CurvedCNS2D(); - virtual ~CurvedCNS2D(); - virtual void Driver(); - -protected: - - virtual void Run(); - - virtual void Resize(); // resize system arrays - virtual void Resize_cub(); // resize cubature arrays - virtual void MapGaussFaceData(); // associate Gauss data - virtual void PreCalcBdryData(); // precalc constant boundary data - virtual void SetIC(); - virtual void SetStepSize(); - virtual void InitRun(); - - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - - - // define pointers to functions - typedef void (CurvedCNS2D::*fp_IC)(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - typedef void (CurvedCNS2D::*fp_ES)(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - typedef void (CurvedCNS2D::*fp_BC)(const DVec& q1, const DVec& q2, const DVec& q3, const DVec& q4, - double rkti, DVec& b1, DVec& b2, DVec& b3, DVec& b4); - - fp_IC InitialSolution; // function pointer to initial solution - fp_ES ExactSolution; // function pointer to exact solution - fp_BC BCSolution; // function pointer to boundary conditions - - // functions for initial/exact solutions - void CylIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void ChannelIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void BoxFlowIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void CouetteIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - - // functions for boundary solutions - void CylBC2D (const DVec& q1, const DVec& q2, const DVec& q3, const DVec& q4, double rkti, DVec& b1, DVec& b2, DVec& b3, DVec& b4); - void ChannelBC2D (const DVec& q1, const DVec& q2, const DVec& q3, const DVec& q4, double rkti, DVec& b1, DVec& b2, DVec& b3, DVec& b4); - void BoxFlowBC2D (const DVec& q1, const DVec& q2, const DVec& q3, const DVec& q4, double rkti, DVec& b1, DVec& b2, DVec& b3, DVec& b4); - void CouetteBC2D (const DVec& q1, const DVec& q2, const DVec& q3, const DVec& q4, double rkti, DVec& b1, DVec& b2, DVec& b3, DVec& b4); - - - void RHS(double rkti, fp_BC SolutionBC); - -protected: - - //------------------------------------- - // member data - //------------------------------------- - - // select simulation mode - enum { - eIsentropicVortex = 0, - eChannelFlow = 1, - eCouetteFlow = 2, - eCylinderFlow = 3, - eBoxFlow = 4 - }; - - double gamma, gm1, mu, pbar, pref; - DMat Q, rhsQ, resQ; - - // store pre-calculated constant boundary data - IVec gmapB; // concatenated boundary maps - DVec gxB, gyB; // {x,y} coords of boundary nodes - DVec rhoB,rhouB,rhovB,EnerB; -}; - -#endif // NDG__Curved_C_NS2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CurvedEuler2D.h b/cpp/nudg++/trunk/Include/CurvedEuler2D.h deleted file mode 100644 index a280fa9..0000000 --- a/cpp/nudg++/trunk/Include/CurvedEuler2D.h +++ /dev/null @@ -1,96 +0,0 @@ -// CurvedEuler2D.h -// Solves the 2D vacuum Maxwell's equations on TM form -// 2007/07/12 -//--------------------------------------------------------- -#ifndef NDG__CurvedEuler2D_H__INCLUDED -#define NDG__CurvedEuler2D_H__INCLUDED - -#include "NDG2D.h" - -//--------------------------------------------------------- -class CurvedEuler2D : public NDG2D -//--------------------------------------------------------- -{ -public: - CurvedEuler2D(); - virtual ~CurvedEuler2D(); - virtual void Driver(); - -protected: - - virtual void Run(); - - virtual void Resize(); // resize system arrays - virtual void Resize_cub(); // resize cubature arrays - virtual void SetIC(); - virtual void SetStepSize(); - virtual void InitRun(); - - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - - - // http://www.codeproject.com/cpp/FastDelegate.asp - - // define pointers to functions - typedef void (CurvedEuler2D::*fp_IC)(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - typedef void (CurvedEuler2D::*fp_ES)(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - typedef void (CurvedEuler2D::*fp_BC)(const DVec& xi, const DVec& yi, const DVec& nxi, const DVec& nyi, const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, double ti, DMat& Qio); - - fp_IC InitialSolution; // function pointer to initial solution - fp_ES ExactSolution; // function pointer to exact solution - fp_BC BCSolution; // function pointer to boundary conditions - - // functions for initial/exact solutions - void IsentropicVortexIC2D(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void ChannelIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void CouetteIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - - // functions for boundary solutions - void IsentropicVortexBC2D(const DVec& xi, const DVec& yi, const DVec& nxi, const DVec& nyi, const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, double ti, DMat& Qio); - void ChannelBC2D (const DVec& xi, const DVec& yi, const DVec& nxi, const DVec& nyi, const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, double ti, DMat& Qio); - void CouetteBC2D (const DVec& xi, const DVec& yi, const DVec& nxi, const DVec& nyi, const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, double ti, DMat& Qio); - - void MapGaussFaceData(); - void PreCalcBdryData(); - void RHS(DMat& Qin, double ti, fp_BC SolutionBC); - - void Fluxes(DMat& Qin, DMat& F, DMat& G); - void Fluxes(DMat& Qin, double gamma, DMat& F, DMat& G, DVec& rho, DVec& u, DVec& v, DVec& p); - - void LF2D (const DMat& lnx, const DMat& lny, DMat& QM, DMat& QP, double gamma, DMat& flux); - void Roe2D(const DMat& lnx, const DMat& lny, DMat& QM, DMat& QP, double gamma, DMat& flux); - void HLL2D(const DMat& lnx, const DMat& lny, DMat& QM, DMat& QP, double gamma, DMat& flux); - - -protected: - - //------------------------------------- - // member data - //------------------------------------- - - // select simulation mode - enum { - eIsentropicVortex = 0, - eChannelFlow = 1, - eCouetteFlow = 2, - eCylinderFlow = 3, - eBoxFlow = 4, - eForwardStep = 5, - eScramInlet = 6 - }; - - double gamma, gm1; - DMat Q, Q1, Q2, Qbc, rhsQ, resQ; - DMat QM, QP, flux; // nflux, - DMat cQ, cF, cG, gQ, gQM, gQP; - DVec resid; - - // store pre-calculated constant boundary data - IVec gmapB; // concatenated boundary maps - DVec gxB, gyB; // {x,y} coords of boundary nodes - DVec rhoB,rhouB,rhovB,EnerB; -}; - -#endif // NDG__CurvedEuler2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/CurvedINS2D.h b/cpp/nudg++/trunk/Include/CurvedINS2D.h deleted file mode 100644 index 179b235..0000000 --- a/cpp/nudg++/trunk/Include/CurvedINS2D.h +++ /dev/null @@ -1,188 +0,0 @@ -// CurvedINS2D.h -// -// 2007/07/14 -//--------------------------------------------------------- -#ifndef NDG__CurvedINS2D_H__INCLUDED -#define NDG__CurvedINS2D_H__INCLUDED - -#include "NDG2D.h" -#include "Mat_DIAG.h" - -#ifdef NDG_USE_CHOLMOD -#include "CHOLMOD_solver.h" -#endif - - -//--------------------------------------------------------- -class CurvedINS2D : public NDG2D -//--------------------------------------------------------- -{ -public: - CurvedINS2D(); - virtual ~CurvedINS2D(); - virtual void Driver(); - -protected: - - virtual void Run(); - - virtual void Resize(); // resize system arrays - virtual void PreCalcBdryData(); // precalc constant boundary data - virtual void SetIC(); - virtual void SetStepSize(); - virtual void InitRun(); - - virtual void create_solvers(); - virtual void free_solvers(); - virtual void reset_solvers(); - virtual void TimeScaleBCData(); - - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - - // http://www.codeproject.com/cpp/FastDelegate.asp - - // define pointers to functions - typedef void (CurvedINS2D::*fp_ES)(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - typedef void (CurvedINS2D::*fp_BC)(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - fp_ES ExactSolution; // func.ptr -> exact solution - fp_BC ExactSolutionBC; // func.ptr -> exact solution on boundary - - - //------------------------------------------------------- - // For each sim type, define pairs of functions that - // calculate both initial/exact and boundary solutions - //------------------------------------------------------- - - // Channel: - void INSchannelIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - void INSchannelBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - // Kovasznay: - void KovasznayIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - void KovasznayBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - // VolkerCylinder: - void INScylinderIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - void INScylinderBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - // PearsonVortex: - void PearsonVortexIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - void PearsonVortexBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - // Stirer: - void INSstirerIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo) {} - void INSstirerBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT) {} - - // Taylor-Couette: - //void INScouetteIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - //void INScouetteBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - // const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - // DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - // Backdrop: - void BackdropIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - void BackdropBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - // Wedge: - void WedgeIC2D(const DVec& xin, const DVec& yin, double ti, double nu, DMat& Uxo, DMat& Uyo, DMat& PRo); - void WedgeBC2D(const DVec& xin, const DVec& yin, const DVec& nxi, const DVec& nyi, - const IVec& MAPI, const IVec& MAPO, const IVec& MAPW, const IVec& MAPC, double ti, double nu, - DVec& BCUX, DVec& BCUY, DVec& BCPR, DVec& BCDUNDT); - - //------------------------------------- - // translated m-files - //------------------------------------- - - void CurvedINSPressureSetUp2D(); - void CurvedINSViscousSetUp2D(); - - void INSAdvection2D(); - void INSPressure2D(); - - void CurvedINSAdvection2D() {umERROR("CurvedINSAdvection2D", "TODO:");} - void CurvedINSPressure2D() {umERROR("CurvedINSPressure2D", "TODO:");} - void CurvedINSViscous2D(); - - void INSLiftDrag2D(double ra); - - -protected: - - //------------------------------------- - // member data - //------------------------------------- - - // select simulation type - enum { - eNone = 0, - eChannel = 1, - eKovasznay = 2, - eStep = 3, - eVolkerCylinder = 4, - ePearsonVortex = 5, - eStirer = 6, - eBackdrop = 7, - eWedge = 8 - }; - - double nu; // adjust Reynolds Number - double g0, a0, a1, b0, b1; // dual splitting scheme coefficients - double tfac,tfac1,tpfac,tpfac1,tpfac2; - - DMat Ux, Uy, PR; - DMat NUx, NUy, dpdn; - DMat UxT,UyT, UxTT, UyTT; - - // storage for history of fields and nonlinear terms - DMat Uxold,Uyold,NUxold,NUyold,dpdnold; - DVec bcUx, bcUy, bcPR, bcdUndt; - DVec Uxrhs,Uyrhs, rhsbcUx, rhsbcUy, rhsbcPR; - DVec refrhsbcUx, refrhsbcUy, refrhsbcPR; - DVec refbcUx, refbcUy, refbcPR, refbcdUndt; - // - IVec nbcmapD, vbcmapD; - - // store pre-calculated constant boundary data - //IVec gmapB; // concatenated boundary maps - //DVec gxB, gyB; // {x,y} coords of boundary nodes - //DVec uB,vB,pB; // {u,v,p} at boundary nodes - - - // track various work times - double time_setup, time_advection; - double time_viscous, time_viscous_sol; - double time_pressure, time_pressure_sol; - - - //------------------------------------- - // Select sparse Cholesky solver - //------------------------------------- -#ifdef NDG_USE_CHOLMOD - CHOLMOD_solver *PRsystemC, *VELsystemC; -#else - CS_Chol *PRsystemC, *VELsystemC; -#endif - - // TODO: allow sparse LU solver for non-sym-pos-def - // - -}; - -#endif // NDG__CurvedINS2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Euler2D.h b/cpp/nudg++/trunk/Include/Euler2D.h deleted file mode 100644 index d616673..0000000 --- a/cpp/nudg++/trunk/Include/Euler2D.h +++ /dev/null @@ -1,147 +0,0 @@ -// Euler2D.h -// -// 2007/03/05 -//--------------------------------------------------------- -#ifndef NDG__Euler2D_H__INCLUDED -#define NDG__Euler2D_H__INCLUDED - -#include "NDG2D.h" - -//--------------------------------------------------------- -class Euler2D : public NDG2D -//--------------------------------------------------------- -{ -public: - Euler2D(); - virtual ~Euler2D(); - virtual void Driver(); - -protected: - - virtual void Run(); - - virtual void Resize(); // resize system arrays - virtual void Resize_cub(); // resize cubature arrays - virtual void SetIC(); - virtual void SetStepSize(); - virtual void InitRun(); - virtual void Report(bool bForce=false); - virtual void DisplaySolution(bool bForce=false); - - - // define pointers to functions - typedef void (Euler2D::*fp_IC)(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - typedef void (Euler2D::*fp_ES)(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - typedef void (Euler2D::*fp_BC)(const DVec& xi, const DVec& yi, double ti, DMat& Qio); - - fp_IC InitialSolution; // function pointer to initial solution - fp_ES ExactSolution; // function pointer to exact solution - fp_BC BCSolution; // function pointer to boundary conditions - - // functions for initial/exact solutions -//void IsentropicVortex2D(const DVec& xi, const DVec& yi, double ti, DMat& Qo); -//void PlaneFlow2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void BumpFlowIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void ForwardStepIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void ShockBubbleIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - - // functions for boundary solutions -//void IsentropicVortexBC2D(const DVec& xi, const DVec& yi, double ti, DMat& Qio); -//void ChannelBC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qio); - void BumpFlowBC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qio); - void ForwardStepBC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qio); - void ShockBubbleBC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qio); - - void MapGaussFaceData(); - void RHS(DMat& Qin, double ti, fp_BC SolutionBC); - - void Fluxes(DMat& Qin, DMat& F, DMat& G); - void Fluxes(DMat& Qin, double gamma, DMat& F, DMat& G, DVec& rho, DVec& u, DVec& v, DVec& p); - - void LF2D (const DVec& lnx, const DVec& lny, DMat& QM, DMat& QP, double gamma, DMat& FLUX); - void Roe2D (const DVec& lnx, const DVec& lny, DMat& QM, DMat& QP, double gamma, DMat& FLUX); - void Eigen2D(const DVec& lnx, const DVec& lny, DMat& QM, DMat& QP, double gamma, DMat& FLUX, bool b=false); - void HLLC2D (const DVec& lnx, const DVec& lny, DMat& QM, DMat& QP, double gamma, DMat& flux); - - void EvalSmoothness(); - void LimitWaves(DMat wave[5], const DMat& s); - DMat& Limit2D(const DMat& Qin); - - void Eval_SrcEXP(); - void Eval_SrcIMP(); - void Load_Aux(); - - -protected: - - //------------------------------------- - // member data - //------------------------------------- - - // select simulation mode - enum { - eIsentropicVortex = 0, - eChannelFlow = 1, - eBumpFlow = 2, - eForwardStep = 3, - eShockBubble = 4 - }; - - int sim_mode; - double gamma,gamma1; - - DMat m_Q, rhsQ, resQ; - DMat QsrcEXP,QsrcIMP; // explicit/implicit source terms - - DMat Q1, limQ; - DMat QM, QP, Qbc; - DMat cQ, cF, cG; // Q evaluated at cubature nodes - DMat gQ, gQM, gQP; // Q, {Q+, Q-}, evaluated at gauss nodes - DMat flux; // calculated flux - DMat aux; // auxillary data (e.g. for geometric source terms) - - DVec phi; // smoothness indicator - DVec C1, C2, C3, C4; // characteristic variables ("strengths") - // (coefficients in eigenvector sums) - DMat wave[5]; // waves using characteristic recomposition - DMat ws; // wave speeds - DMat CP, CM, CR; // coefficients at QP, QM and Roe average - - DVec LimAVE; - - int m_nExplicit, m_nImplicit; - - // monitor range of primitive variables - double rmin,rmax,umin,umax,vmin,vmax,pmin,pmax; - - // NBN: OPTIMIZE DEBUG - double rhs_dt, rhs_time; - double flux_time, flux_dt; - - // initial conditions routines - // common/fsscorn/ xc0,yc0,xc1,yc1 - double xc0,yc0,xc1,yc1; - double x0, y0, r0; - - double cellave(const DVec& xk, const DVec& yk); - double fdisc(const double x, const double y); - double fss(double s); - double zeroin(const double x1, const double x2,double tol); - - void RefineDisk(IMat& flags, double x0, double y0, double r0, double tol); - - DVec qin; // initial state inside bubble - DVec qout; // initial state outside bubble - - double rhoin; // density in bubble: - - double rinf; // density behind shock - double vinf; // velocity behind shock - double einf; // energy behind shock - double pinf; // pressure behind shock: - - double m_lambda; - -}; - -#endif // NDG__Euler2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Euler3D.h b/cpp/nudg++/trunk/Include/Euler3D.h deleted file mode 100644 index 82a12b6..0000000 --- a/cpp/nudg++/trunk/Include/Euler3D.h +++ /dev/null @@ -1,103 +0,0 @@ -// Euler3D.h -// -// 2007/07/11 -//--------------------------------------------------------- -#ifndef NDG__Euler333D_H__INCLUDED -#define NDG__Euler333D_H__INCLUDED - -#include "NDG3D.h" - -//--------------------------------------------------------- -class Euler3D : public NDG3D -//--------------------------------------------------------- -{ -public: - Euler3D(); - virtual ~Euler3D(); - virtual void Driver(); - -protected: - - virtual void Run(); - - virtual void Resize(); // resize system arrays - virtual void SetIC(); - virtual void SetStepSize(); - virtual void InitRun(); - - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - - // precalculate any constant BC data - virtual void PrecalcBdryData(); - - - - // http://www.codeproject.com/cpp/FastDelegate.asp - - // define pointers to functions - typedef void (Euler3D::*fp_IC)(const DVec& xi, const DVec& yi, const DVec& zi, double ti, DMat& Qo); - typedef void (Euler3D::*fp_ES)(const DVec& xi, const DVec& yi, const DVec& zi, double ti, DMat& Qo); - typedef void (Euler3D::*fp_BC)(const DVec& xi, const DVec& yi, const DVec& zi, - const DVec& nxi, const DVec& nyi, const DVec& nzi, - const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, - double ti, DMat& Qio); - - fp_IC InitialSolution; // function pointer to initial solution - fp_ES ExactSolution; // function pointer to exact solution - fp_BC BCSolution; // function pointer to boundary conditions - - // functions for initial/exact solutions - void IsentropicVortexIC3D(const DVec& xi, const DVec& yi, const DVec& zi, double ti, DMat& Qo); - void CouetteIC3D (const DVec& xi, const DVec& yi, const DVec& zi, double ti, DMat& Qo); - - // functions for boundary solutions - void IsentropicVortexBC3D(const DVec& xi, const DVec& yi, const DVec& zi, - const DVec& nxi, const DVec& nyi, const DVec& nzi, - const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, - double ti, DMat& Qio); - - void CouetteBC3D(const DVec& xi, const DVec& yi, const DVec& zi, - const DVec& nxi, const DVec& nyi, const DVec& nzi, - const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, - double ti, DMat& Qio); - - - void RHS(DMat& Qin, double ti, fp_BC SolutionBC); - - void Fluxes(DMat& Qin, DMat& F, DMat& G, DMat& H); - void Fluxes(DMat& Qin, DMat& F, DMat& G, DMat& H, DVec& rho, DVec& u, DVec& v, DVec& w, DVec& p); - - -protected: - - //------------------------------------- - // member data - //------------------------------------- - - // select simulation mode - enum { - eIsentropicVortex = 0, - eChannelFlow = 1, - eCouetteFlow = 2, - eCylinderFlow = 3, - eBoxFlow = 4, - eForwardStep = 5 - }; - - double gamma,gm1; - - DMat Q, rhsQ, resQ; // state data and residual - DMat cF,cG,cH; // storage for flux data - DMat QM, QP, flux; // - DMat fM,gM,hM,fP,gP,hP; // - - // store pre-calculated constant boundary data - IVec gmapB; // concatenated boundary maps - DVec gxB,gyB,gzB; // {x,y,z} coords of boundary nodes - DVec rhoB,rhouB,rhovB,rhowB,EnerB; - -}; - -#endif // NDG__Euler333D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/EulerShock2D.h b/cpp/nudg++/trunk/Include/EulerShock2D.h deleted file mode 100644 index a2419fb..0000000 --- a/cpp/nudg++/trunk/Include/EulerShock2D.h +++ /dev/null @@ -1,69 +0,0 @@ -// EulerShock2D.h -// specialization of CurvedEuler2D for shocks -// 2007/08/15 -//--------------------------------------------------------- -#ifndef NDG__EulerShock2D_H__INCLUDED -#define NDG__EulerShock2D_H__INCLUDED - -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -class EulerShock2D : public CurvedEuler2D -//--------------------------------------------------------- -{ -public: - EulerShock2D(); - virtual ~EulerShock2D(); - virtual void Driver(); - -protected: - - virtual void Run(); - virtual void Run_Iter(); - - virtual void Resize(); // resize system arrays - virtual void SetIC(); - virtual void SetStepSize(); - virtual void InitRun(); - - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - - void precalc_limiter_data(); - DMat& EulerLimiter2D(const DMat& Qin, double ti); - - // functions for initial/exact solutions - void ForwardStepIC2D(const DVec& xi, const DVec& yi, double ti, DMat& Qo); - void InletIC2D (const DVec& xi, const DVec& yi, double ti, DMat& Qo); - - // functions for boundary solutions - void ForwardStepBC2D(const DVec& xi, const DVec& yi, const DVec& nxi, const DVec& nyi, const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, double ti, DMat& Qio); - void InletBC2D (const DVec& xi, const DVec& yi, const DVec& nxi, const DVec& nyi, const IVec& tmapI, const IVec& tmapO, const IVec& tmapW, const IVec& tmapC, double ti, DMat& Qio); - - // adapt the mesh based on jumps in mach number - void AdaptMesh_Mach(double jumptol); - -protected: - - //------------------------------------- - // member data - //------------------------------------- - - DMat Q1, limQ, oldQ; - - // These members store geometric data precalculated - // in InitRun(), then reused in EulerLimiter2D() - DMat Lim_dx, Lim_dy, Lim_fnx, Lim_fny, Lim_fL; - DMat Lim_ctx, Lim_cty; - DVec Lim_AVE, Lim_xv1,Lim_yv1, Lim_xv2,Lim_yv2, Lim_xv3,Lim_yv3; - DVec xc0,xc1,xc2,xc3, yc0,yc1,yc2,yc3, A0,A1,A2,A3, A1_A2_A3; - IVec Lim_E1,Lim_E2,Lim_E3, Lim_id1,Lim_id2,Lim_id3; - IVec Lim_idI,Lim_idO,Lim_idW,Lim_idC, Lim_ids; - - bool bDoCalcIC; // use IC routine for first iteration - int mesh_level; // track adaptive iterations -}; - -#endif // NDG__EulerShock2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/ExprC_headers.h b/cpp/nudg++/trunk/Include/ExprC_headers.h deleted file mode 100644 index ec1a3c6..0000000 --- a/cpp/nudg++/trunk/Include/ExprC_headers.h +++ /dev/null @@ -1,37 +0,0 @@ -// exprc_headers.h -// -// 2007/01/18 -//--------------------------------------------------------- -#ifndef NDG__Exprc_headers_H__INCLUDED -#define NDG__Exprc_headers_H__INCLUDED - -//#define WIN32_LEAN_AND_MEAN -//#define NO_MIN_MAX - -// adjust trace output -#undef VERBOSEPARSE -#undef VERBOSEEVALUATE -#undef VERBOSETOKENIZE - -#ifdef _DEBUG -//#define VERBOSEPARSE -//#define VERBOSEEVALUATE -//#define VERBOSETOKENIZE -#endif - - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "Mat_COL.h" -#include "ExprC/ExpCmp.h" -#include "ExprC/ExpCmpI.h" - -#endif // NDG__Exprc_headers_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/F77Array_Type.h b/cpp/nudg++/trunk/Include/F77Array_Type.h deleted file mode 100644 index 6319b95..0000000 --- a/cpp/nudg++/trunk/Include/F77Array_Type.h +++ /dev/null @@ -1,549 +0,0 @@ -// F77Array_Type.h -// -// 2007/02/15 -//--------------------------------------------------------- -#ifndef NDG__F77Array_Type_H__INCLUDED -#define NDG__F77Array_Type_H__INCLUDED - -#include "Vec_Type.h" - - -// forward declarations: -template class F77Vec; - -typedef F77Vec F77DVec; -typedef F77Vec F77LVec; -typedef F77Vec F77IVec; - - -//--------------------------------------------------------- -template -class F77Vec : public virtual Vector -//--------------------------------------------------------- -{ - // Specialization of Vector allowing arbitrary - // base index, c.f. F77 dimension (-3:N+3) - - // - // Member data - // -protected: - - int base; // arbitrary base index for array - T* vmb_; // b-offset pointer into array - -public: - - // - // constructors - // - F77Vec( const char* sz="F77Vec", OBJ_mode md=OBJ_real); - F77Vec(int N, const char* sz="F77Vec", OBJ_mode md=OBJ_real); - F77Vec(int lo, int hi, const char* sz="F77Vec", OBJ_mode md=OBJ_real); - F77Vec(const Index1D& II, const char* sz="F77Vec", OBJ_mode md=OBJ_real); - F77Vec(const F77Vec& B, const char* sz="F77Vec", OBJ_mode md=OBJ_real); - - // destructor - virtual ~F77Vec (); - - // resize/realloc - bool resize(int N, bool binit=true, T x=T(0)); - bool resize(int lo, int hi, bool binit=true, T x=T(0)); - bool resize(const Index1D& II, bool binit=true, T x=T(0)); - - // set/get arbitrary base for indexing into the array - void setBase(int b1) { base = b1; } - int getBase() const { return base; } - - // element access - const T& operator()(int i) const { Check_index_b(i); return this->vmb_[i]; } - T& operator()(int i) { Check_index_b(i); return this->vmb_[i]; } - - // assignment - F77Vec& operator=(const F77Vec& B) - { - Vector::operator=(B) - base = B.base; - vmb_ = v_ - base; // set b-offset pointer - return *this; - } - - // assignment - F77Vec& operator=(const Vector& B) - { - Vector::operator=(B) - base = 1; - vmb_ = v_ - base; // set b-offset pointer - return *this; - } - -protected: - //------------------------------------- - // Optional index checking - //------------------------------------- -#if (CHECK_ARRAY_INDEX) - - void Check_index_b(int i) const { - // check for legal b-based index - if (i-base < 0 ) throw 1; - if (i-base >= m_Len) throw 2; - } - -#else - - // no checking of indices - void Check_index_b(int i) const throw() {} - -#endif - -}; - - - -/////////////////////////////////////////////////////////// -// -// constructors -// -/////////////////////////////////////////////////////////// - -template inline -F77Vec::F77Vec(const char* sz, OBJ_mode md) -: Vector(sz, md), base(1), vmb_(NULL) -{} - - -template inline -F77Vec::F77Vec(int N, const char* sz, OBJ_mode md) -: Vector(N, sz, md), base(1), vmb_(NULL) -{} - - -template inline -F77Vec::F77Vec(int lo, int hi, const char* sz, OBJ_mode md) -: Vector(sz, md), base(1), vmb_(NULL) -{ - resize(lo,hi); -} - - -template inline -F77Vec::F77Vec(const Index1D& II, const char* sz, OBJ_mode md) -: Vector(sz, md), base(1), vmb_(NULL) -{ - resize(II); -} - - -template inline -F77Vec::F77Vec(const F77Vec& B, const char* sz, OBJ_mode md) -: Vector(sz, md), base(1), vmb_(NULL) -{ - this->operator=(B); -} - - -/////////////////////////////////////////////////////////// -// -// destructor -// -/////////////////////////////////////////////////////////// - -template inline -F77Vec::~F77Vec () -{} - - - - -/////////////////////////////////////////////////////////// -// -// resize/realloc -// -/////////////////////////////////////////////////////////// - -template inline -bool F77Vec::resize(int N, bool binit, T x) -{ - base = 1; bool ret = false; - ret = Vector::resize(N, binit, x); - vmb_ = v_ - base; // set b-offset pointer - return ret; -} - - -template inline -bool F77Vec::resize(int lo, int hi, bool binit, T x) -{ - assert(lo<=hi); - base = lo; bool ret = false; - ret = Vector::resize( (hi-lo)+1, binit, x); - vmb_ = v_ - base; // set b-offset pointer - return ret; -} - - -template inline -bool F77Vec::resize(const Index1D& II, bool binit, T x) -{ - int lo=II.lo(), hi=II.hi(); assert(lo<=hi); - base = lo; bool ret = false; - ret = Vector::resize( (hi-lo)+1, binit, x); - vmb_ = v_ - base; // set b-offset pointer - return ret; -} - - - - -//######################################################### -#if 1 // (THIS_IS_READY) -//######################################################### - -#include "Mat_Col.h" - -// forward declarations: -template class F77Mat; - -typedef F77Mat F77DMat; -typedef F77Mat F77LMat; -typedef F77Mat F77IMat; - - -//--------------------------------------------------------- -template -class F77Mat : public virtual Mat_COL -//--------------------------------------------------------- -{ - // Specialization of Mat_COL allowing arbitrary - // base indices, c.f. F77 dimension (-3:N+3, 5:10) - - // - // Member data - // -protected: - - int bm; // arbitrary base for row index - int bn; // arbitrary base for col index - - T** bcol; // b-based data pointers, adjusted - // to enable b-based (i,j) indexing - -public: - - // - // constructors - // - explicit F77Mat( const char* sz="F77Mat", OBJ_mode md=OBJ_real); - explicit F77Mat( int Nr, int Nc, const char* sz="F77Mat", OBJ_mode md=OBJ_real); - explicit F77Mat(const Index1D& II, const Index1D& JJ, const char* sz="F77Mat", OBJ_mode md=OBJ_real); - explicit F77Mat(const Index1D& II, int Nc, const char* sz="F77Mat", OBJ_mode md=OBJ_real); - explicit F77Mat( int Nr, const Index1D& JJ, const char* sz="F77Mat", OBJ_mode md=OBJ_real); - explicit F77Mat(const F77Mat& B, const char* sz="F77Mat", OBJ_mode md=OBJ_real); - - // destructor - virtual ~F77Mat(); - virtual void destroy(); - void set_bpointers(int M, int N); - - // resize/realloc - bool resize( int Nr, int Nc, bool binit=true, T x=T(0)); - bool resize(const Index1D& II, const Index1D& JJ, bool binit=true, T x=T(0)); - bool resize(const Index1D& II, int Nc, bool binit=true, T x=T(0)); - bool resize( int Nr, const Index1D& JJ, bool binit=true, T x=T(0)); - - - // set/get arbitrary row and column index base - void setBaseM(int b) { bm = b; } - int getBaseM() const { return bm; } - - void setBaseN(int b) { bn = b; } - int getBaseN() const { return bn; } - - // element access - const T& operator()(int i, int j) const - { - CheckIdx_IJ_b(i,j); - return this->bcol[j][i]; - } - - T& operator()(int i, int j) - { - CheckIdx_IJ_b(i,j); - return this->bcol[j][i]; - } - - - // assignment - F77Mat& operator=(const F77Mat& B); - F77Mat& operator=(const Mat_COL& B); - - -protected: - //------------------------------------- - // Optional index checking - //------------------------------------- -#if (CHECK_ARRAY_INDEX) - - void CheckIdx_IJ_b(int i, int j) const { - // check for legal b-based indices - if (i < bm) throw 1; if (i >= (m_M+bm)) throw 2; - if (j < bn) throw 3; if (j >= (m_N+bn)) throw 4; - } - -#else - - // no checking of indices - void CheckIdx_IJ_b(int i, int j) const throw() {} - -#endif - - - -}; - - - -/////////////////////////////////////////////////////////// -// -// constructors -// -/////////////////////////////////////////////////////////// -template inline -F77Mat::F77Mat(const char* sz, OBJ_mode md) -: Mat_COL(sz,md), - bm(1), bn(1), bcol(NULL) -{ -} - - -template inline -F77Mat::F77Mat(int Nr, int Nc, const char* sz, OBJ_mode md) -: Mat_COL(Nr, Nc, sz, md), - bm(1), bn(1), bcol(NULL) -{ - // A(1:Nr, 1:Nc) - bm = 1; - bn = 1; - set_bpointers(Nr, Nc); -} - - -template inline -F77Mat::F77Mat(const Index1D& II, const Index1D& JJ, const char* sz, OBJ_mode md) -: Mat_COL(II.N(), JJ.N(), sz, md), - bm(1), bn(1), bcol(NULL) -{ - // A(ia:ib, ja:jb) - bm = II.lo(); - bn = JJ.lo(); - set_bpointers(II.N(), JJ.N()); -} - - -template inline -F77Mat::F77Mat(const Index1D& II, int Nc, const char* sz, OBJ_mode md) -: Mat_COL(II.N(), Nc, sz, md), - bm(1), bn(1), bcol(NULL) -{ - // A(ia:ib, 1:Nc) - bm = II.lo(); - bn = 1; - set_bpointers(II.N(), Nc); -} - - -template inline -F77Mat::F77Mat(int Nr, const Index1D& JJ, const char* sz, OBJ_mode md) -: Mat_COL(Nr, JJ.N(), sz, md), - bm(1), bn(1), bcol(NULL) -{ - // A(1:Nr, ja:jb) - bm = 1; - bn = JJ.lo(); - set_bpointers(Nr, JJ.N()); -} - - -template inline -F77Mat::F77Mat(const F77Mat& B, const char* sz, OBJ_mode md) -: Mat_COL(sz,md), - bm(0), bn(0), bcol(NULL) -{ - this->operator=(B); -} - - -/////////////////////////////////////////////////////////// -// -// destructors -// -/////////////////////////////////////////////////////////// - - -template inline -F77Mat::~F77Mat() -{ - this->destroy(); -} - - -template inline -void F77Mat::destroy() -{ - // Mat/Vec base classes manage deallocation of data, - // This class manages only its b-based bcol pointers. - Mat_COL::destroy(); - - // Note: restore "bcol" to 0-offset -//if (col_) {col_ ++; ::free(col_); col_=NULL;} - if (bcol) {bcol +=bn; ::free(bcol); bcol=NULL;} - - bm = bn = 0; -} - - -// The internal contiguous (0-offset) array v_[M*N] is -// allocated in base class Vector. Here we create an -// internal array of column pointers to enable b-based, -// column-major indexing into an (M,N) matrix. -//--------------------------------------------------------- -template inline -void F77Mat::set_bpointers(int M, int N) -//--------------------------------------------------------- -{ - // Assumes base class version has been called - // to allow use as a Mat_COL object - - // Mat_COL::set_pointers(M,N); - - // clear the old set of b-col pointers - // Note: restore "bcol" to 0-offset - if (bcol) {bcol += bn; ::free(bcol); bcol=NULL;} - - // allocate a New set of col pointers - bcol = (T **) calloc((size_t)N, sizeof(T*) ); - assert(bcol); - - // adjust pointers for b-based indexing - - T* p = this->v_ - bm; // bm <= row offset - - for (int i=0; i inline -bool F77Mat::resize(int Nr, int Nc, bool binit, T x) -{ - bool rb=Mat_COL::resize(Nr, Nc, binit, x); - - // A(1:Nr, 1:Nc) - bm = 1; - bn = 1; - set_bpointers(Nr, Nc); - return rb; -} - - -template inline -bool F77Mat::resize(const Index1D& II, const Index1D& JJ, bool binit, T x) -{ - bool rb=Mat_COL::resize(II.N(), JJ.N(), binit, x); - - // A(ia:ib, ja:jb) - bm = II.lo(); - bn = JJ.lo(); - set_bpointers(II.N(), JJ.N()); - return rb; -} - - -template inline -bool F77Mat::resize(const Index1D& II, int Nc, bool binit, T x) -{ - bool rb=Mat_COL::resize(II.N(), Nc, binit, x); - - // A(ia:ib, 1:Nc) - bm = II.lo(); - bn = 1; - set_bpointers(II.N(), Nc); - return rb; -} - - -template inline -bool F77Mat::resize(int Nr, const Index1D& JJ, bool binit, T x) -{ - bool rb=Mat_COL::resize(Nr, JJ.N(), binit, x); - - // A(1:Nr, ja:jb) - bm = 1; - bn = JJ.lo(); - set_bpointers(Nr, JJ.N()); - return rb; -} - - -/////////////////////////////////////////////////////////// -// -// assignment -// -/////////////////////////////////////////////////////////// - - -template inline -F77Mat& F77Mat::operator=(const F77Mat& B) -{ - if (this->v_ == B.v_) - return (*this); - - // set up base class structure - Mat_COL::operator=(B); - - // set up b-based indexing - this->bm = B.getBaseM(); - this->bn = B.getBaseN(); - set_bpointers(m_M, m_N); - - return *this; -} - - -template inline -F77Mat& F77Mat::operator=(const Mat_COL& B) -{ - if (this->v_ == B.v_) - return (*this); - - // set up base class structure - Mat_COL::operator=(B); - - // set up b-based indexing - this->bm = 1; - this->bn = 1; - set_bpointers(m_M, m_N); - - return *this; -} - - -//######################################################### -#endif // (THIS_IS_READY) -//######################################################### - - -#endif // NDG__F77Array_Type_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/FaceData3D.h b/cpp/nudg++/trunk/Include/FaceData3D.h deleted file mode 100644 index 999763d..0000000 --- a/cpp/nudg++/trunk/Include/FaceData3D.h +++ /dev/null @@ -1,45 +0,0 @@ -// FaceData3D.h -// -// 2007/10/04 -//--------------------------------------------------------- -#ifndef NDG__FaceData3D_H__INCLUDED -#define NDG__FaceData3D_H__INCLUDED - -#include "Poly3D.h" -#include "VecObj_Type.h" -#include "MatObj_Type.h" - - -const int MAXfd = 20; - -//--------------------------------------------------------- -class FaceData3D -//--------------------------------------------------------- -{ -public: - - FaceData3D(); - ~FaceData3D(); - void reset(); - FaceData3D& operator=(const FaceData3D& B); - -public: - - IV neighs; // ids of neighbor faces - DV *fx[MAXfd], - *fy[MAXfd], - *fz[MAXfd]; // {x,y,z} for all points of each face -//DM fxyz[MAXfd]; // {x,y,z} for all points of each face - DM *mmM[MAXfd], - *mmP[MAXfd]; // internal,external mass matrices - Poly3D *polys[MAXfd]; - DV *weights[MAXfd]; - int bcflag; -}; - - -// define FaceMat -typedef MatObj FaceMat; - - -#endif // NDG__FaceData3D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/GMRES_solver.h b/cpp/nudg++/trunk/Include/GMRES_solver.h deleted file mode 100644 index 32987a1..0000000 --- a/cpp/nudg++/trunk/Include/GMRES_solver.h +++ /dev/null @@ -1,62 +0,0 @@ -// GMRES_solver.h -// -// 2007/01/07 -//--------------------------------------------------------- -#ifndef NDG__GMRES_solver_H__INCLUDED -#define NDG__GMRES_solver_H__INCLUDED - -// sparse matrix -#include "CS_Type.h" - - -//--------------------------------------------------------- -class GMRES_solver -//--------------------------------------------------------- -{ -protected: - CSd* m_pA; // pointer to system - CS_LU* m_precSol; // TODO: iLU preconditioner - - double m_droptol; - bool precond_ok; - -public: - GMRES_solver() - : m_pA(NULL), m_precSol(NULL), m_droptol(1e-6), precond_ok(false) - {} - - GMRES_solver(CSd& A, double droptol=1e-6) - : m_pA(&A), m_precSol(NULL), m_droptol(droptol), precond_ok(false) - { - init(A, droptol); - } - - void reset() { - m_pA = NULL; precond_ok = false; - if (m_precSol) { delete m_precSol; m_precSol=NULL; } - } - - void init(CSd& A, double droptol=1e-6) - { - reset(); - try { - m_pA = &A; // pointer to system - m_precSol = new CS_LU; // create preconditioner - //m_precSol->ilu(droptol); // prepare iLU preconditioner - m_precSol->lu(*m_pA); // prepare iLU preconditioner - precond_ok = true; - } catch(...) { - precond_ok = false; - umERROR("GMRES_solver::init()", "failed to create preconditioner"); - } - } - - void solve (umDVec& b, // right hand side - umDVec& x, // init/final solution - umIVec& iter, // return {inner,outer} iterations - int restart = 10, // after "restart" iterations, restart algorithm - double tol = 1e-6, // ] tolerance of the method - int maxit = 50); // max number of outer iterations -}; - -#endif // NDG__GMRES_solver_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Global_funcs.h b/cpp/nudg++/trunk/Include/Global_funcs.h deleted file mode 100644 index 2c036bc..0000000 --- a/cpp/nudg++/trunk/Include/Global_funcs.h +++ /dev/null @@ -1,327 +0,0 @@ -// Global_funcs.h -// declare global functions -// 2007/10/15 -//--------------------------------------------------------- -#ifndef NDG__Global_funcs_H__INCLUDED -#define NDG__Global_funcs_H__INCLUDED - - -#define wxUSE_GUI 0 // GUI disabled - - -#include "Constants.h" -#include "Mat_COL.h" -#include "Strings.h" // define a vector of std::string - -class Cub2D; -class Gauss2D; - -class Cub3D; -//class Gauss3D; - -// flag to hide untranslated blocks -#define THIS_IS_READY 0 -#define TESTING_IMAP 1 - - -// Define numeric constants for boundary conditions -// In = 1; Out = 2; Wall = 3; Far = 4; Cyl = 5; -// Dirichlet = 6; Neuman = 7; Slip = 8; - -enum BCTypes { - BC_None = 0, - BC_In = 1, - BC_Out = 2, - BC_Wall = 3, - BC_Far = 4, - BC_Cyl = 5, - BC_Dirichlet = 6, - BC_Neuman = 7, - BC_Slip = 8, - BC_All = 99 -}; - - -// Define numeric constants for flux types -enum FluxTypes { - FT_LaxF = 1, - FT_Roe = 2, - FT_RoeVL = 3, - FT_HLL = 4, - FT_HLLC = 5, - FT_Eigen = 6 -}; - - -// Define numeric constants for filter and limiter types -enum { - LIMITER_none = 0, - FILTER_cutoff = 1, - FILTER_exp = 2, - LIMITER_LS_ENO = 3, - LIMITER_WENO = 4 -}; - - -//--------------------------------------------------------- -// OS-dependent items -//--------------------------------------------------------- -#if defined(WIN32) && !defined(__CYGWIN__) - #define HAS_ISINF 1 - #include - #define isnan(x) (_isnan(x)) - #define isinf(x) (!(_finite(x)) && !(_isnan(x))) - #define finite(x) (_finite(x)) - // string functions - #define snprintf _snprintf -#else - - // finite/isnan for Mac - // Aggressive delve into math.h on OS X - #define isinf(x) __inline_isinfd(x) - -#endif - - -//--------------------------------------------------------- -// inline utility functions -//--------------------------------------------------------- - -inline int umMOD (int n, int m) { return n%m; } -inline int umDIV (int n, int m) { return ((n-(n%m))/m); } -inline double SQ (double x) { return x*x; } - -inline double dSign(double a, double b) { return (b>=0.0 ? std::abs(a) : -std::abs(a)); } -inline double iSign(int a, int b) { return (b>=0 ? std::abs(a) : -std::abs(a)); } - - -void NDG_garbage_collect(); - -//--------------------------------------------------------- -// function prototypes -//--------------------------------------------------------- -void JacobiGQ(double alpha, double beta, int n, DVec& x, DVec& w, bool sort=true); -DVec& JacobiGL(double alpha, double beta, int N); -DVec& JacobiP (const DVec& x,double alpha,double beta,int N); -DMat& Vandermonde2D(int N, const DVec& r, const DVec& s); -DMat& Vandermonde1D(int N, const DVec& xp); -DVec& Simplex2DP(const DVec& a, const DVec& b, int i, int j); -DVec& GradJacobiP(const DVec& z,double alpha,double beta,int N); -void GradVandermonde2D(int N, const DVec& r, const DVec& s, DMat& V2Dr, DMat& V2Ds); -void Nodes2D(int N, DVec& x, DVec& y); -void xytors(const DVec& x, const DVec& y, DVec& r, DVec& s); -void Dmatrices2D(int N, const DVec& r, const DVec& s, const DMat& V, DMat& Dr, DMat& Ds); -DVec& TriAreas(const DVec& x1, const DVec& y1, const DVec& x2, const DVec& y2, const DVec& x3, const DVec& y3); - - -// overloaded global versions: for matrix and vector args -void GeometricFactors2D(const DMat& x, const DMat& y, const DMat& Dr, const DMat& Ds, DMat& rx, DMat& sx, DMat& ry, DMat& sy, DMat& J); -void GeometricFactors2D(const DVec& x, const DVec& y, const DMat& Dr, const DMat& Ds, DVec& rx, DVec& sx, DVec& ry, DVec& sy, DVec& J); - -// overloaded global version -void Dmatrices2D(int N, const DVec& r, const DVec& s, const DMat& V, DMat& Dr, DMat& Ds); - -void rstoab(const DVec& r, const DVec& s, DVec& a, DVec& b); -void GradSimplex2DP(const DVec& a, const DVec& b, int id, int jd, DVec& dmodedr, DVec& dmodeds); -DVec& Warpfactor(int N, const DVec& rout); -void Connect2D(const IMat& EToV, IMat& EToE, IMat& EToF); - -void Cubature2D(int Corder, Cub2D& cub); -void Cubature2D(int Corder, DVec& r, DVec& s, DVec& w, int& Ncub); - -void Cubature3D(int Corder, Cub3D& cub); -void Cubature3D(int Corder, DVec& r, DVec& s, DVec& t, DVec& w, int& Ncub); - -void tiConnect2D(IMat& EToV, IMat& EToE, IMat& EToF); -void tiConnect3D(IMat& EToV, IMat& EToE, IMat& EToF); - -// 3D -DMat& Vandermonde3D(int N, const DVec& r, const DVec& s, const DVec& t); -void Nodes3D(int p, DVec& X, DVec& Y, DVec& Z); -void EquiNodes3D(int N, DVec& X, DVec& Y, DVec& Z); -void rsttoabc(const DVec& r, const DVec& s, const DVec& t, DVec& a, DVec& b, DVec& c); -void xyztorst(const DVec& X, const DVec& Y, const DVec& Z, DVec& r, DVec& s, DVec& t); -DVec& Simplex3DP(const DVec& a, const DVec& b, const DVec& c, int i, int j, int k); - -void GradVandermonde3D(int N, const DVec& r, const DVec& s, const DVec& t, DMat& V3Dr, DMat& V3Ds, DMat& V3Dt); -void GradSimplex3DP(const DVec& a, const DVec& b, const DVec& c, int id, int jd, int kd, DVec& V3Dr, DVec& V3Ds, DVec& V3Dt); - -// overloaded global versions: for matrix and vector args -void GeometricFactors3D(const DMat& x, const DMat& y, const DMat& z, const DMat& Dr, const DMat& Ds, const DMat& Dt, DMat& rx, DMat& sx, DMat& tx, DMat& ry, DMat& sy, DMat& ty, DMat& rz, DMat& sz, DMat& tz, DMat& J); -void GeometricFactors3D(const DVec& x, const DVec& y, const DVec& z, const DMat& Dr, const DMat& Ds, const DMat& Dt, DVec& rx, DVec& sx, DVec& tx, DVec& ry, DVec& sy, DVec& ty, DVec& rz, DVec& sz, DVec& tz, DVec& J); - -// overloaded global version -void Dmatrices3D(int N, const DVec& r, const DVec& s, const DVec& t, const DMat& V, DMat& Dr, DMat& Ds, DMat& Dt); - -void WarpShiftFace3D(int p, double pval, double pval2, const DVec& L1, const DVec& L2, const DVec& L3, const DVec& L4, DVec& warpx, DVec& warpy); -void evalshift(int p, double pval, const DVec& L1, const DVec& L2, const DVec& L3, DVec& dx, DVec& dy); -DVec& evalwarp(int p, const DVec& xnodes, const DVec& xout); - -IVec& TopTheta(const DVec& u, double theta, bool do_print=false); - - -double gamma(int x); -double lgamma(const double x); -double gamma(const double x); -double factorial(int n); - -DVec& range(int lo, int hi); -DVec& ones (int N); -DMat& ones (int M, int N); -DVec& zeros(int N); -DMat& zeros(int M, int N); -DMat& eye (int N); -DVec& rand (int N); -DMat& rand (int M, int N); -IVec& ceil (const DVec& V); -IVec& intersect(const IVec& A, const IVec& B); - -bool isInf(const DVec& V); - -bool file_exists(std::string& fname); -bool match_BC(std::string& name, const char* szbc); - - -//--------------------------------------------------------- -// debug utilites: print arrays to the MSG file -//--------------------------------------------------------- - -// Numerical {DMat,IMat} and {DVec,IVec} -void dumpDMat(const DMat& M, const char* s); -void dumpIMat(const IMat& M, const char* s); -void dumpDVec(const DVec& V, const char* s); -void dumpIVec(const IVec& V, const char* s); -void dumpIMap(const IMap& V, const char* s); - - -//--------------------------------------------------------- -// special functions (add as required) -//--------------------------------------------------------- -DVec& besselj(int N, const DVec& X); - -// tex "table" output -void textable(string& capt, FILE* fid, string* titles, DMat& entries, string* form); - - -/////////////////////////////////////////////////////////// -// -// Templated versions (allow non-double data types) -// -/////////////////////////////////////////////////////////// - - -// return an integer range from [start:stop]. -// If (stop inline -Vector& Range(T start, T stop) -//--------------------------------------------------------- -{ - int len = 0; - if (start<=stop) - len = int(stop-start) + 1; - else len = int(start-stop) + 1; - - Vector *tmp=new Vector(len, (T)0, OBJ_temp); - - if (stop != start) { - // load vector with [start:stop], stepping by +/- 1 - T delta=(start inline -Vector& Ones(T N) -//--------------------------------------------------------- -{ - char buf[32]={""}; snprintf(buf,(size_t)30,"ones(%d)",N); - Vector *tmp=new Vector(N, (T)1, OBJ_temp, buf); - return (*tmp); -} - - -// templated version for arbitrary type. -// See also DVec& ones(M,N); -//--------------------------------------------------------- -template inline -Mat_COL& Ones(T M, T N) -//--------------------------------------------------------- -{ - char buf[52]={""}; snprintf(buf,(size_t)50,"ones(%d,%d)",M,N); - Mat_COL *tmp=new Mat_COL(M, N, (T)1, OBJ_temp, buf); - return (*tmp); -} - - -// templated version for arbitrary type. -// See also DVec& zeros(N); -//--------------------------------------------------------- -template inline -Vector& Zeros(T N) -//--------------------------------------------------------- -{ - char buf[32]={""}; snprintf(buf,(size_t)30,"zeros(%d)",N); - Vector *tmp=new Vector(N, (T)0, OBJ_temp, buf); - return (*tmp); -} - - -// templated version for arbitrary type. -// See also DVec& zeros(M,N); -//--------------------------------------------------------- -template inline -Mat_COL& Zeros(T M, T N) -//--------------------------------------------------------- -{ - char buf[52]={""}; snprintf(buf,(size_t)50,"zeros(%d,%d)",M,N); - Mat_COL *tmp=new Mat_COL(M, N, (T)0, OBJ_temp, buf); - return (*tmp); -} - - - -// templated version for arbitrary type. -// See also DMat& eye(N); -//--------------------------------------------------------- -template inline -Mat_COL& Eye(T N) -//--------------------------------------------------------- -{ - Mat_COL *tmp=new Mat_COL("eye", OBJ_temp); - tmp->identity(N); - return (*tmp); -} - - -//--------------------------------------------------------- -// debug utilities: print arrays in Matlab binary format -//--------------------------------------------------------- -template inline -void dumpMatlab(const Mat_COL& M, const char* sz) { - FILE* fp = fopen( umOFORM("%s.mat", sz), "wb"); - if (fp) { M.m_save(fp, sz); fclose(fp); } -} - -template inline -void dumpMatlab(const Vector& V, const char* sz) { - FILE* fp = fopen( umOFORM("%s.mat", sz), "wb"); - if (fp) { V.m_save_v(fp, sz); fclose(fp); } -} - - -#endif // NDG__Global_funcs_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Globals2D.h b/cpp/nudg++/trunk/Include/Globals2D.h deleted file mode 100644 index 5e8e505..0000000 --- a/cpp/nudg++/trunk/Include/Globals2D.h +++ /dev/null @@ -1,75 +0,0 @@ -// Globals2D.h -// containter for (2D) global data -// 2007/06/11 -//--------------------------------------------------------- -#ifndef NDG__Globals_22D_H__INCLUDED -#define NDG__Globals_22D_H__INCLUDED - -#include "Global_funcs.h" -#include "Cub2D.h" -#include "VecObj_Type.h" - - - -//--------------------------------------------------------- -class Globals2D -//--------------------------------------------------------- -{ -public: - - Globals2D(); - virtual ~Globals2D(); - - void init(); - void reset(); - void clear(); - - int Np, Nfp, N, K, Nfaces; - double NODETOL; - DVec r, s; - DMat Dr, Ds, LIFT, Drw, Dsw, MassMatrix; - DMat Fx, Fy, nx, ny, jac, Fscale; - IVec vmapB, mapB; - IMat BCType, Fmask; - IVec mapI, mapO, mapW, mapF, mapC, mapS, mapM, mapP, mapD, mapN; - IVec vmapI, vmapO, vmapW, vmapF, vmapC, vmapS, vmapM, vmapP, vmapD, vmapN; - // NBN: 2nd vmapO -> vmapF, add {vmapM, vmapP} - - - DMat rx, ry, sx, sy, J, sJ; - DVec rk4a, rk4b, rk4c; - IMat EToE, EToF, EToV, saveBCType; - // NBN: add {saveBCType} - - DMat V, invV, VVT; // +NBN: precalculate V*V' - DVec VX, VY, VZ; // +NBN: triangles on a sphere - DMat x, y, z; // +NBN: triangles on a sphere - - //------------------------------------- - // cubature and quadrature data for curved elements - //------------------------------------- - - IVec straight, curved; // map {straight,curved} bdry faces - - Cub2D m_cub; // 2D cubature data - Gauss2D m_gauss; // 2D surface data - - int CubatureOrder; // order for 2D cubature - int NGauss; // number of Gauss points - - VecObj m_cinfo; // 2D curved face data - - - //------------------------------------- - // +NBN: added - //------------------------------------- - DVec materialVals, epsilon; - int tstep, Nsteps; - double dt, time, FinalTime, RKtime, pi, eps; - double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax; - int Nv, Nmats, Nbcs, Nsd; - bool bIs3D, bCoord3D, bElement3D; - -}; - -#endif // NDG__Globals_22D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Globals3D.h b/cpp/nudg++/trunk/Include/Globals3D.h deleted file mode 100644 index cf9e775..0000000 --- a/cpp/nudg++/trunk/Include/Globals3D.h +++ /dev/null @@ -1,75 +0,0 @@ -// Globals3D.h -// containter for (3D) global data -// 2007/09/23 -//--------------------------------------------------------- -#ifndef NDG__Globals_333D_H__INCLUDED -#define NDG__Globals_333D_H__INCLUDED - -#include "Global_funcs.h" -#include "Cub3D.h" -#include "VecObj_Type.h" - - -//--------------------------------------------------------- -class Globals3D -//--------------------------------------------------------- -{ -public: - - Globals3D(); - virtual ~Globals3D(); - - void init(); - void reset(); - void clear(); - - int Np, Nfp, N, K, Nfaces; - double NODETOL; - DVec r, s, t; - DMat Dr, Ds, Dt, LIFT, Drw, Dsw, Dtw, MassMatrix; - DMat Fx, Fy, Fz, nx, ny, nz, Fscale, sJ; - - - IVec vmapB, mapB; - IMat BCType, Fmask; - IVec mapI, mapO, mapW, mapF, mapC, mapS, mapM, mapP, mapD, mapN; - IVec vmapI, vmapO, vmapW, vmapF, vmapC, vmapS, vmapM, vmapP, vmapD, vmapN; - - - DMat rx, ry, rz, sx, sy, sz, tx, ty, tz, J; - DVec rk4a, rk4b, rk4c; - - IMat EToE, EToF, EToV, saveBCType; - - DMat V, invV, VVT; // +NBN: precalculate V*V' - DVec VX, VY, VZ; // +NBN: triangles on a sphere - DMat x, y, z; // +NBN: triangles on a sphere - - //------------------------------------- - // cubature and quadrature data for curved elements - //------------------------------------- - - IVec straight, curved; // map {straight,curved} bdry faces - - Cub3D m_cub; // 3D cubature data -//Gauss3D m_gauss; // 3D surface data - - int CubatureOrder; // order for 3D cubature - int NGauss; // number of Gauss points - - VecObj m_cinfo; // 3D curved face data - - - //------------------------------------- - // +NBN: added - //------------------------------------- - DVec materialVals, epsilon; - int tstep, Nsteps; - double dt, time, FinalTime, RKtime, pi, eps; - double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax; - int Nv, Nmats, Nbcs, Nsd; - bool bIs3D, bCoord3D, bElement3D; - -}; - -#endif // NDG__Globals_333D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/IMap.h b/cpp/nudg++/trunk/Include/IMap.h deleted file mode 100644 index 13efa29..0000000 --- a/cpp/nudg++/trunk/Include/IMap.h +++ /dev/null @@ -1,205 +0,0 @@ -// IMap.h -// index vector for mapping regions of arrays -// 2006/12/17 -//--------------------------------------------------------- -#ifndef NDG__IMap_H__INCLUDED -#define NDG__IMap_H__INCLUDED - - -#include - -// template class Vector; - - -//--------------------------------------------------------- -class IMap : public std::vector -//--------------------------------------------------------- -{ - // Note: inherits std::vector<> members - - typedef std::vector iBASE; - -public: - IMap(int N=0) : iBASE((size_type)N) {} - IMap(const IMap& B) : iBASE((iBASE&)B) {} - IMap(const iBASE& B) : iBASE(B) {} - IMap(int N, const int* p) { copy(N, p); } - ~IMap() {} - - // set/get: 1-based access - inline int& operator()(int i) {return iBASE::operator[]((size_type)(i)-1);} - inline const int& operator()(int i) const {return iBASE::operator[]((size_type)(i)-1);} - - // set/get: 0-based access - inline int& operator[](int i) {return iBASE::operator[]((size_type)i);} - inline const int& operator[](int i) const {return iBASE::operator[]((size_type)i);} - - int size() const { return (int) (iBASE::size()); } - void fill(int i) { assign(iBASE::size(), i); } - IMap& operator=(int i) { fill(i); return (*this); } - - IMap& copy(int len, const int *p) - { - resize(len); - if (len>0) { - assert(p); - int Nmod4=len&3; int N4=len-Nmod4; - int i=0; IMap& v=(*this); - for (i=0; isize() <= B.size()); - iBASE::iterator i; iBASE::const_iterator i2; - for (i=begin(), i2=B.begin(); i!=end(); ++i, ++i2) { - (*i) += (*i2); - } - } - - void operator -= (const IMap &B) { - assert(this->size() <= B.size()); - iBASE::iterator i; iBASE::const_iterator i2; - for (i=begin(), i2=B.begin(); i!=end(); ++i, ++i2) { - (*i) -= (*i2); - } - } - - - // Partition segment into equal intervals - // If (stop=0); - - if (0 == len) { - // keep current size - } else { - resize((size_type)len); - } - - if (stop != start) { - IMap& v=(*this); int N=(int)size(); - int delta=(stop-start) / (N-1); - v(1) = start; // Set exact start value - for (int i=2; i all) - ) const; - -}; - - -//--------------------------------------------------------- -// Global operators and routines -//--------------------------------------------------------- - -// C = A + B -inline IMap operator+(const IMap &A, const IMap &B) -{ - IMap tmp(A); tmp += B; return tmp; -} - - -// C = A - B -inline IMap operator-(const IMap &A, const IMap &B) -{ - IMap tmp(A); tmp -= B; return tmp; -} - - -//--------------------------------------------------------- -inline void IMap::print -( - FILE* os, - const char* msg, - const char* fmt, // [%d|%e|%lf|%g] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - bool vert, // vertical/horizontal - int nline, // entries per line - int nv // num vals to write (0 --> all) -) const -//--------------------------------------------------------- -{ - static char buf[20] = {""}; - - // write min(nv,len) vals - int len = this->size(); - if (nv > 0) len = (nv<=len ? nv : len); - - if (msg) { fprintf(os, "%s\n", msg); } - fprintf(os, "(%d)\n", len); - - const IMap& v=(*this); - - if (1==nline || vert) { - sprintf(buf, "%c%dd\n", '%',wdth); - for (int i=0; i -class MLIndex_sort -//--------------------------------------------------------- -{ -public: - - MLIndex_sort(); - MLIndex_sort(bool (*comp) (T, T)); - ~MLIndex_sort() { merge_freemem (); } - void set_compare(bool (*comp) (T, T)) { compare = comp; } - void sort(T *v, int elements); - -private: - - // One MergeState exists on the stack per invocation - // of mergesort. It's just a convenient way to pass - // state around among the helper functions. - // - // DGB: This isn't needed with mergesort in a class, - // but it doesn't slow things up, and it is likely - // to make my life easier for any potential - // backporting of changes in the Python code. - - struct s_slice - { - T *base; - int len; - }; - - typedef struct s_MergeState - { - // This controls when we get *into* galloping mode. - // It's initialized to MIN_GALLOP. - // - // merge_lo and merge_hi tend to nudge it higher for - // random data, and lower for highly structured data. - - int min_gallop; - - // 'a' is temp storage to help with merges. It contains - // room for alloced entries. - - T *a; // may point to temparray below - int alloced; - - // A stack of n pending runs yet to be merged. Run #i starts at - // address base[i] and extends for len[i] elements. It's always - // true (so long as the indices are in bounds) that - // - // pending[i].base + pending[i].len == pending[i+1].base - // - // so we could cut the storage for this, but it's a minor amount, - // and keeping all the info explicit simplifies the code. - - int n; - struct s_slice pending[MAX_MERGE_PENDING]; - } MergeState; - - MergeState ms; - - bool (*compare)(T, T); - void reverse_slice (T *lo, T *hi); - void binarysort (T *lo, T *hi, T *start); - int count_run(T *lo, T *hi, int *descending); - int gallop_left(T key, T *a, int n, int hint); - int gallop_right(T key, T *a, int n, int hint); - void merge_init(); - void merge_freemem(); - int merge_getmem(int need); - int merge_lo(T *pa, int na, T *pb, int nb); - int merge_hi(T *pa, int na, T *pb, int nb); - int merge_at(int i); - int merge_collapse(); - int merge_force_collapse(); - int merge_compute_minrun(int n); -}; - - -//--------------------------------------------------------- -// MACROS: -//--------------------------------------------------------- -#define IFLT(a,b) if (compare==NULL?((a)<(b)):compare((a),(b))) - - -template -MLIndex_sort::MLIndex_sort () : compare (NULL) -{ - merge_init(); - merge_getmem(1024); -} - - -template -MLIndex_sort::MLIndex_sort (bool (*comp) (T, T)) : compare (comp) -{ - merge_init(); - merge_getmem(1024); -} - - -// Reverse a slice of a list in place, from lo up to (exclusive) hi. -template -void MLIndex_sort::reverse_slice(T *lo, T *hi) -{ - --hi; - while (lo < hi) - { - T t = *lo; - *lo = *hi; - *hi = t; - ++lo; - --hi; - } -} - - -template -void MLIndex_sort::binarysort(T *lo, T *hi, T *start) -{ - register T *l, *p, *r; - register T pivot; - - if (lo == start) - ++start; - - for (; start < hi; ++start) - { - // set l to where *start belongs - l = lo; - r = start; - pivot = *r; - - // Invariants: - // pivot >= all in [lo, l). - // pivot < all in [r, start). - // The second is always true at the start. - - do - { - p = l + ((r - l) >> 1); - IFLT (pivot, *p) - r = p; - else - l = p+1; - } - while (l < r); - - // The invariants still hold, so pivot >= all in [lo, l) - // and pivot < all in [l, start), so pivot belongs at l. - // Note that if there are elements equal to pivot, l - // points to the first slot after them -- that's why - // this sort is stable. Slide over to make room. - // Note: memmove can be slow for moving few slots. - - for (p = start; p > l; --p) - *p = *(p-1); - - *l = pivot; - } - - return; -} - - - -//--------------------------------------------------------- -// Return the length of the run beginning at lo, in the -// slice [lo, hi). lo < hi is required on entry. -// A "run" is the longest ascending sequence, with -// -// lo[0] <= lo[1] <= lo[2] <= ... -// -// or the longest descending sequence, with -// -// lo[0] > lo[1] > lo[2] > ... -// -// Boolean *descending is set to 0 in the former case, or -// to 1 in the latter. For its intended use in a stable -// mergesort, the strictness of the defn of "descending" -// is needed so that the caller can safely reverse a -// descending sequence without violating stability -// (strict > ensures there are no equal elements to -// get out of order). -// -// Returns -1 in case of error. -//--------------------------------------------------------- - -template -int MLIndex_sort::count_run(T *lo, T *hi, int *descending) -{ - *descending = 0; - ++lo; - if (lo == hi) - return 1; - int n = 2; - IFLT (*lo, *(lo-1)) - { - *descending = 1; - for (lo = lo+1; lo < hi; ++lo, ++n) - { - IFLT (*lo, *(lo-1)) - ; - else - break; - } - } - else { - for (lo = lo+1; lo < hi; ++lo, ++n) { - IFLT (*lo, *(lo-1)) - break; - } - } - - return n; -} - - -//--------------------------------------------------------- -// Locate the proper position of key in a sorted vector; -// if the vector contains an element equal to key, return -// the position immediately to the left of the leftmost -// equal element. [gallop_right() does the same except -// returns the position to the right of the rightmost -// equal element (if any).] -// -// "a" is a sorted vector with n elements, starting at a[0]. -// n must be > 0. -// -// "hint" is an index at which to begin the search, -// 0 <= hint < n. The closer hint is to the final -// result, the faster this runs. -// -// The return value is the int k in 0..n such that -// -// a[k-1] < key <= a[k] -// -// pretending that *(a-1) is minus infinity and a[n] is -// plus infinity. IOW, key belongs at index k; or, IOW, -// the first k elements of a should precede key, and -// the last n-k should follow key. -// -// Returns -1 on error. -//--------------------------------------------------------- - -template -int MLIndex_sort::gallop_left(T key, T *a, int n, int hint) -{ - int ofs; - int lastofs; - int k; - - a += hint; - lastofs = 0; - ofs = 1; - IFLT (*a, key) - { - // a[hint] < key -- gallop right, until - // a[hint + lastofs] < key <= a[hint + ofs] - - const int maxofs = n - hint; // &a[n-1] is highest - while (ofs < maxofs) - { - IFLT (a[ofs], key) - { - lastofs = ofs; - ofs = (ofs << 1) + 1; - if (ofs <= 0) // int overflow - ofs = maxofs; - } - else // key <= a[hint + ofs] - break; - } - if (ofs > maxofs) - ofs = maxofs; - // Translate back to offsets relative to &a[0]. - lastofs += hint; - ofs += hint; - } - else - { - // key <= a[hint] -- gallop left, until - // a[hint - ofs] < key <= a[hint - lastofs] - - const int maxofs = hint + 1; // &a[0] is lowest - while (ofs < maxofs) - { - IFLT (*(a-ofs), key) - break; - // key <= a[hint - ofs] - lastofs = ofs; - ofs = (ofs << 1) + 1; - if (ofs <= 0) // int overflow - ofs = maxofs; - } - if (ofs > maxofs) - ofs = maxofs; - // Translate back to positive offsets relative to &a[0]. - k = lastofs; - lastofs = hint - ofs; - ofs = hint - k; - } - a -= hint; - - // Now a[lastofs] < key <= a[ofs], so key belongs - // somewhere to the right of lastofs but no farther - // right than ofs. Do a binary search, with - // invariant a[lastofs-1] < key <= a[ofs]. - - ++lastofs; - while (lastofs < ofs) - { - int m = lastofs + ((ofs - lastofs) >> 1); - - IFLT (a[m], key) - lastofs = m+1; // a[m] < key - else - ofs = m; // key <= a[m] - } - return ofs; -} - - -//--------------------------------------------------------- -// Exactly like gallop_left(), except that if key already -// exists in a[0:n], finds the position immediately to the -// right of the rightmost equal value. -// -// The return value is the int k in 0..n such that -// -// a[k-1] <= key < a[k] -// -// or -1 if error. -// -// The code duplication is massive, but this is enough -// different given that we're sticking to "<" comparisons -// that it's much harder to follow if written as one -// routine with yet another "left or right?" flag. -//--------------------------------------------------------- -template -int MLIndex_sort::gallop_right(T key, T *a, int n, int hint) -{ - int ofs; - int lastofs; - int k; - - a += hint; - lastofs = 0; - ofs = 1; - IFLT (key, *a) - { - // key < a[hint] -- gallop left, until - // a[hint - ofs] <= key < a[hint - lastofs] - - const int maxofs = hint + 1; // &a[0] is lowest - while (ofs < maxofs) - { - IFLT (key, *(a-ofs)) - { - lastofs = ofs; - ofs = (ofs << 1) + 1; - if (ofs <= 0) // int overflow - ofs = maxofs; - } - else // a[hint - ofs] <= key - break; - } - if (ofs > maxofs) - ofs = maxofs; - - // Translate back to positive offsets relative to &a[0]. - k = lastofs; - lastofs = hint - ofs; - ofs = hint - k; - } - else - { - // a[hint] <= key -- gallop right, until - // a[hint + lastofs] <= key < a[hint + ofs] - - const int maxofs = n - hint; // &a[n-1] is highest - while (ofs < maxofs) - { - IFLT (key, a[ofs]) - break; - // a[hint + ofs] <= key - lastofs = ofs; - ofs = (ofs << 1) + 1; - if (ofs <= 0) // int overflow - ofs = maxofs; - } - if (ofs > maxofs) - ofs = maxofs; - // Translate back to offsets relative to &a[0]. - lastofs += hint; - ofs += hint; - } - a -= hint; - - // Now a[lastofs] <= key < a[ofs], so key belongs - // somewhere to the right of lastofs but no farther - // right than ofs. Do a binary search, with - // invariant a[lastofs-1] <= key < a[ofs]. - - ++lastofs; - while (lastofs < ofs) - { - int m = lastofs + ((ofs - lastofs) >> 1); - - IFLT (key, a[m]) - ofs = m; // key < a[m] - else - lastofs = m+1; // a[m] <= key - } - return ofs; -} - - -// Conceptually a MergeState's constructor. -template -void MLIndex_sort::merge_init() -{ - ms.a = NULL; - ms.alloced = 0; - ms.n = 0; - ms.min_gallop = MIN_GALLOP; -} - - -// Free all the temp memory owned by the MergeState. -// This must be called when you're done with a MergeState, -// and may be called before then if you want to free the -// temp memory early. - -template -void MLIndex_sort::merge_freemem() -{ - if (ms.a) - free (ms.a); - ms.alloced = 0; - ms.a = NULL; -} - - -static inline int -roundupsize(int n) -{ - unsigned int nbits = 3; - unsigned int n2 = (unsigned int)n >> 8; - - // Round up: - // If n < 256, to a multiple of 8. - // If n < 2048, to a multiple of 64. - // If n < 16384, to a multiple of 512. - // If n < 131072, to a multiple of 4096. - // If n < 1048576, to a multiple of 32768. - // If n < 8388608, to a multiple of 262144. - // If n < 67108864, to a multiple of 2097152. - // If n < 536870912, to a multiple of 16777216. - // ... - // If n < 2**(5+3*i), to a multiple of 2**(3*i). - // - // This over-allocates proportional to the list size, making room - // for additional growth. The over-allocation is mild, but is - // enough to give linear-time amortized behavior over a long - // sequence of appends() in the presence of a poorly-performing - // system realloc() (which is a reality, e.g., across all flavors - // of Windows, with Win9x behavior being particularly bad -- and - // we've still got address space fragmentation problems on Win9x - // even with this scheme, although it requires much longer lists to - // provoke them than it used to). - - while (n2) { - n2 >>= 3; - nbits += 3; - } - return ((n >> nbits) + 1) << nbits; -} - - -// Ensure enough temp memory for 'need' array slots is available. -// Returns 0 on success and -1 if the memory can't be gotten. - -template -int MLIndex_sort::merge_getmem(int need) -{ - if (need <= ms.alloced) - return 0; - - need = roundupsize(need); - // Don't realloc! That can cost cycles to copy the old data, but - // we don't care what's in the block. - - merge_freemem( ); - ms.a = (T *) malloc (need * sizeof (T)); - if (ms.a) { - ms.alloced = need; - return 0; - } - merge_freemem( ); // reset to sane state - return -1; -} - - -#define MERGE_GETMEM(NEED) ((NEED) <= ms.alloced ? 0 : \ - merge_getmem(NEED)) - -//--------------------------------------------------------- -// Merge the na elements starting at pa with the nb -// elements starting at pb in a stable way, in-place. -// na and nb must be > 0, and pa + na == pb. -// Must also have that *pb < *pa, that pa[na-1] belongs -// at the end of the merge, and should have na <= nb. -// -// Return 0 if successful, -1 if error. -//--------------------------------------------------------- - -template -int MLIndex_sort::merge_lo(T *pa, int na, T *pb, int nb) -{ - int k; - T *dest; - int result = -1; - int min_gallop = ms.min_gallop; - - if (MERGE_GETMEM(na) < 0) - return -1; - memcpy(ms.a, pa, na * sizeof(T)); - dest = pa; - pa = ms.a; - - *dest++ = *pb++; - --nb; - if (nb == 0) - goto Succeed; - if (na == 1) - goto CopyB; - - for (;;) { - int acount = 0; // # of times A won in a row - int bcount = 0; // # of times B won in a row - - // Do the straightforward thing until (if ever) one run - // appears to win consistently. - - for (;;) { - - IFLT (*pb, *pa) - { - *dest++ = *pb++; - ++bcount; - acount = 0; - --nb; - if (nb == 0) - goto Succeed; - if (bcount >= min_gallop) - break; - } - else - { - *dest++ = *pa++; - ++acount; - bcount = 0; - --na; - if (na == 1) - goto CopyB; - if (acount >= min_gallop) - break; - } - } - - // One run is winning so consistently that galloping may - // be a huge win. So try that, and continue galloping until - // (if ever) neither run appears to be winning consistently - // anymore. - - ++min_gallop; - do - { - min_gallop -= min_gallop > 1; - ms.min_gallop = min_gallop; - k = gallop_right(*pb, pa, na, 0); - acount = k; - if (k) - { - if (k < 0) - goto Fail; - memcpy(dest, pa, k * sizeof(T)); - dest += k; - pa += k; - na -= k; - if (na == 1) - goto CopyB; - - // na==0 is impossible now if the comparison - // function is consistent, but we can't assume - // that it is. - - if (na == 0) - goto Succeed; - } - - *dest++ = *pb++; - --nb; - if (nb == 0) - goto Succeed; - - k = gallop_left(*pa, pb, nb, 0); - bcount = k; - if (k) { - if (k < 0) - goto Fail; - memmove(dest, pb, k * sizeof(T)); - dest += k; - pb += k; - nb -= k; - if (nb == 0) - goto Succeed; - } - *dest++ = *pa++; - --na; - if (na == 1) - goto CopyB; - } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP); - ++min_gallop; // penalize it for leaving galloping mode - ms.min_gallop = min_gallop; - } - -Succeed: - result = 0; - -Fail: - if (na) - memcpy(dest, pa, na * sizeof(T)); - return result; - -CopyB: - // The last element of pa belongs at the end of the merge. - memmove(dest, pb, nb * sizeof(T)); - dest[nb] = *pa; - return 0; -} - - -//--------------------------------------------------------- -// Merge the na elements starting at pa with the nb -// elements starting at pb in a stable way, in-place. -// na and nb must be > 0, and pa + na == pb. -// Must also have that *pb < *pa, that pa[na-1] belongs -// at the end of the merge, and should have na >= nb. -// -// Return 0 if successful, -1 if error. -//--------------------------------------------------------- - -template -int MLIndex_sort::merge_hi(T *pa, int na, T *pb, int nb) -{ - int k; - T *dest; - int result = -1; - T *basea; - T *baseb; - int min_gallop = ms.min_gallop; - - if (MERGE_GETMEM(nb) < 0) - return -1; - dest = pb + nb - 1; - memcpy(ms.a, pb, nb * sizeof(T)); - basea = pa; - baseb = ms.a; - pb = ms.a + nb - 1; - pa += na - 1; - - *dest-- = *pa--; - --na; - if (na == 0) - goto Succeed; - if (nb == 1) - goto CopyA; - - for (;;) - { - int acount = 0; // # of times A won in a row - int bcount = 0; // # of times B won in a row - - // Do the straightforward thing until (if ever) - // one run appears to win consistently. - - for (;;) - { - IFLT (*pb, *pa) - { - *dest-- = *pa--; - ++acount; - bcount = 0; - --na; - if (na == 0) - goto Succeed; - if (acount >= min_gallop) - break; - } - else - { - *dest-- = *pb--; - ++bcount; - acount = 0; - --nb; - if (nb == 1) - goto CopyA; - if (bcount >= min_gallop) - break; - } - } - - // One run is winning so consistently that galloping - // may be a huge win. So try that, and continue - // galloping until (if ever) neither run appears - // to be winning consistently anymore. - - ++min_gallop; - do - { - min_gallop -= min_gallop > 1; - ms.min_gallop = min_gallop; - k = gallop_right(*pb, basea, na, na-1); - if (k < 0) - goto Fail; - k = na - k; - acount = k; - if (k) - { - dest -= k; - pa -= k; - memmove(dest+1, pa+1, k * sizeof(T )); - na -= k; - if (na == 0) - goto Succeed; - } - *dest-- = *pb--; - --nb; - if (nb == 1) - goto CopyA; - - k = gallop_left(*pa, baseb, nb, nb-1); - if (k < 0) - goto Fail; - k = nb - k; - bcount = k; - if (k) - { - dest -= k; - pb -= k; - memcpy(dest+1, pb+1, k * sizeof(T)); - nb -= k; - if (nb == 1) - goto CopyA; - - // nb==0 is impossible now if the comparison - // function is consistent, but we can't assume - // that it is. - - if (nb == 0) - goto Succeed; - } - *dest-- = *pa--; - --na; - if (na == 0) - goto Succeed; - } while (acount >= MIN_GALLOP || bcount >= MIN_GALLOP); - ++min_gallop; // penalize it for leaving galloping mode - ms.min_gallop = min_gallop; - } - -Succeed: - result = 0; - -Fail: - if (nb) - memcpy(dest-(nb-1), baseb, nb * sizeof(T)); - return result; - -CopyA: - // The first element of pb belongs at the front of the merge. - dest -= na; - pa -= na; - memmove(dest+1, pa+1, na * sizeof(T)); - *dest = *pb; - return 0; -} - - -//--------------------------------------------------------- -// Merge the two runs at stack indices i and i+1. -// Returns 0 on success, -1 on error. -//--------------------------------------------------------- -template -int MLIndex_sort::merge_at(int i) -{ - T *pa, *pb; - int na, nb; - int k; - - pa = ms.pending[i].base; - na = ms.pending[i].len; - pb = ms.pending[i+1].base; - nb = ms.pending[i+1].len; - - // Record the length of the combined runs; if i is - // the 3rd-last run now, also slide over the last - // run (which isn't involved in this merge). - // The current run i+1 goes away in any case. - - ms.pending[i].len = na + nb; - if (i == ms.n - 3) - ms.pending[i+1] = ms.pending[i+2]; - --ms.n; - - // Where does b start in a? Elements in a before - // that can be ignored (already in place). - - k = gallop_right(*pb, pa, na, 0); - if (k < 0) - return -1; - pa += k; - na -= k; - if (na == 0) - return 0; - - // Where does a end in b? Elements in b after - // that can be ignored (already in place). - - nb = gallop_left(pa[na-1], pb, nb, nb-1); - if (nb <= 0) - return nb; - - // Merge what remains of the runs, using a temp - // array with min(na, nb) elements. - - if (na <= nb) - return merge_lo(pa, na, pb, nb); - else - return merge_hi(pa, na, pb, nb); -} - - -//--------------------------------------------------------- -// Examine the stack of runs waiting to be merged, -// merging adjacent runs until the stack invariants -// are re-established: -// -// 1. len[-3] > len[-2] + len[-1] -// 2. len[-2] > len[-1] -// -// Returns 0 on success, -1 on error. -//--------------------------------------------------------- -template -int MLIndex_sort::merge_collapse() -{ - struct s_slice *p = ms.pending; - while (ms.n > 1) - { - int n = ms.n - 2; - if (n > 0 && p[n-1].len <= p[n].len + p[n+1].len) - { - if (p[n-1].len < p[n+1].len) - --n; - if (merge_at(n) < 0) - return -1; - } - else if (p[n].len <= p[n+1].len) - { - if (merge_at(n) < 0) - return -1; - } - else - break; - } - return 0; -} - - - -//--------------------------------------------------------- -// Regardless of invariants, merge all runs on the stack -// until only one remains. This is used at the end of -// the mergesort. -// -// Returns 0 on success, -1 on error. -//--------------------------------------------------------- - -template -int MLIndex_sort::merge_force_collapse() -{ - struct s_slice *p = ms.pending; - while (ms.n > 1) { - int n = ms.n - 2; - if (n > 0 && p[n-1].len < p[n+1].len) - --n; - if (merge_at(n) < 0) - return -1; - } - return 0; -} - - -//--------------------------------------------------------- -// Compute appropriate value for minimum run length; -// natural runs shorter than this are boosted via -// binary insertion. -// -// If n < 64, return n (too small for fancy stuff). -// Else if n is an exact power of 2, return 32. -// Else return an int k, 32 <= k <= 64, such that n/k is -// close to, but strictly less than, an exact power of 2. -//--------------------------------------------------------- - -template -int MLIndex_sort::merge_compute_minrun(int n) -{ - int r = 0; // becomes 1 if any 1 bits are shifted off - while (n >= 64) { - r |= n & 1; - n >>= 1; - } - return n + r; -} - - -//--------------------------------------------------------- -template -void MLIndex_sort::sort (T *v, int elements) -//--------------------------------------------------------- -{ - // Re-initialize the Mergestate as this - // might be the second time called: - - ms.n = 0; - ms.min_gallop = MIN_GALLOP; - - if (elements > 1) - { - int nremaining = elements; - T *lo = v; - T *hi = v + elements; - - // March over the array once, left to right, - // finding natural runs, and extending short - // natural runs to minrun elements. - - int minrun = merge_compute_minrun(nremaining); - do - { - int descending; - int n; - - // Identify next run. - n = count_run(lo, hi, &descending); - if (n < 0) - goto fail; - if (descending) - reverse_slice(lo, lo + n); - - // If short, extend to min(minrun, nremaining). - if (n < minrun) - { - const int force = nremaining <= minrun ? nremaining : minrun; - binarysort(lo, lo + force, lo + n); - n = force; - } - - // Push run onto pending-runs stack, and maybe merge. - assert(ms.n < MAX_MERGE_PENDING); - ms.pending[ms.n].base = lo; - ms.pending[ms.n].len = n; - ++ms.n; - if (merge_collapse() < 0) - goto fail; - // Advance to find next run. - lo += n; - nremaining -= n; - } while (nremaining); - - merge_force_collapse( ); - } - -fail: - return; -} - - -#endif // NDG__IndexSort_Type_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/LOG.h b/cpp/nudg++/trunk/Include/LOG.h deleted file mode 100644 index 7d07304..0000000 --- a/cpp/nudg++/trunk/Include/LOG.h +++ /dev/null @@ -1,52 +0,0 @@ -// LOG.h -// -// 2006/10/15 -//--------------------------------------------------------- -#ifndef NDG__LOG__INCLUDED -#define NDG__LOG__INCLUDED - - -// declare log and message routines -#include "LOG_funcs.h" - - -//--------------------------------------------------------- -// Global log targets -//--------------------------------------------------------- - -// Redirect messages file in console mode -extern FILE* g_LOGFile; -extern FILE* g_MSGFile; -extern FILE* g_TRCFile; - -// Clear message windows (cf: Matlab's "clc") -void Clear_umLOG(); -void Clear_umMSG(); - -// Redirect EC printf() to file in console mode -extern FILE* EC_fout; -extern FILE* EC_ferr; - -// Redirect printf() to file -extern FILE* g_pStdOut; -extern FILE* g_pStdErr; - -//--------------------------------------------------------- -// Some string utilities -//--------------------------------------------------------- -#include - -void umEATWHITE(std::ifstream& ins); -bool getNextDataLine(std::ifstream& is, char* buf); -int findOneOf(const char* source, const char* marks); -std::string trim (const char* sz); -std::string lowercase(const char* sz); // return lower case copy -std::string uppercase(const char* sz); // return upper case copy -void makelower(std::string& rs); // convert arg to lower case -void makeupper(std::string& rs); // convert arg to upper case - -bool text2Bool(const char* sz); // convert text->bool -std::string bool2Text(bool b, int mode=0); // convert bool->text -std::string trim(const char* sz); // strip leading/trailing spaces - -#endif // NDG__LOG__INCLUDED diff --git a/cpp/nudg++/trunk/Include/LOG_funcs.h b/cpp/nudg++/trunk/Include/LOG_funcs.h deleted file mode 100644 index 6e92e19..0000000 --- a/cpp/nudg++/trunk/Include/LOG_funcs.h +++ /dev/null @@ -1,29 +0,0 @@ -// LOG_funcs.h -// declare log and message routines -// 2006/10/15 -//--------------------------------------------------------- -#ifndef NDG__umLOG_funcs__INCLUDED -#define NDG__umLOG_funcs__INCLUDED - -#include -#include - -void umLOG(int n, const char* format_str, ...); -void umMSG(int n, const char* format_str, ...); -void umTRC(int n, const char* format_str, ...); - -void umLOG(const std::string& msg, int n=0); -void umMSG(const std::string& msg, int n=0); -void umTRC(const std::string& msg, int n=0); - -void umWARNING(char* function_name, ...); -void umERROR(char* function_name, ...); -void umQUIT(); - -char* umOFORM(const char* fmt, ...); - -std::string trim(const char* sz); - -extern FILE* g_TRCFile; - -#endif // NDG__umLOG_funcs__INCLUDED diff --git a/cpp/nudg++/trunk/Include/MappedRegion1D.h b/cpp/nudg++/trunk/Include/MappedRegion1D.h deleted file mode 100644 index 36212f5..0000000 --- a/cpp/nudg++/trunk/Include/MappedRegion1D.h +++ /dev/null @@ -1,330 +0,0 @@ -// MappedRegion1D.h -// Mapped 1D sub-regions of vectors -// 2007/10/16 -//--------------------------------------------------------- -#ifndef NDG__MappedRegion1d_H__INCLUDED -#define NDG__MappedRegion1d_H__INCLUDED - -#include -#include - -#include "IMap.h" - -// declare "const" version -template class const_MappedRegion1D; - - -//--------------------------------------------------------- -template class MappedRegion1D -//--------------------------------------------------------- -{ -protected: - - Array1D & A_; // the mapped vector - IMap map_; // id's of mapped values - - int dim_; // num entries in map - int A_dim_; // num entries in vector - -public: - - // data type of referenced array - typedef typename Array1D::data_type T; - - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - - Array1D & array() { return A_; } - const Array1D & array() const { return A_; } - - int lbound() const { return A_.lbound(); } - int dim (int i=1) const { return dim_; } - int size () const { return dim_; } - const char* name() const { return A_.name(); } - - - MappedRegion1D(Array1D &V, const IMap &I) - : A_(V), map_(I) - { - dim_ = I.size(); - A_dim_ = A_.size(); - } - - - MappedRegion1D(MappedRegion1D &V, const IMap &I) - : A_(V.A_), map_(I) - { - umWARNING("Debugging MappedRegion1D", - "Mapped region passed to mapped region?"); - - dim_ = I.size(); - A_dim_ = A_.size(); - } - - - MappedRegion1D operator()(const IMap &I) - { - return MappedRegion1D( A_, I ); - } - - - T & operator()(int i) - { -#if (CHECK_ARRAY_INDEX) - assert( map_(i) <= A_dim_ ); -#endif - - return A_(map_(i)); - } - - - const T & operator() (int i) const - { -#if (CHECK_ARRAY_INDEX) - assert( map_(i) <= A_dim_ ); -#endif - - return A_(map_(i)); - } - - - MappedRegion1D & operator=(const Array1D &R) - { - // make sure both sides conform - assert(dim() == R.dim()); - int N = dim(); - for (int i=1; i<=N; ++i) - (*this)(i) = R(i); - - if (R.get_mode() == OBJ_temp) {delete (&R);} // delete temps - return *this; - } - - MappedRegion1D & operator=(const MappedRegion1D &R) - { - // make sure both sides conform - assert(dim() == R.dim()); - int N = dim(); - for (int i=1; i<=N; ++i) - (*this)(i) = R(i); // assigns R.A_(map_(i)) - - return *this; - } - - - MappedRegion1D & operator=(const const_MappedRegion1D &R) - { - // make sure both sides conform - assert(dim() == R.dim()); - int N = dim(); - for (int i=1; i<=N; ++i) - (*this)(i) = R(i); // assigns R.A_(map_(i)) - - return *this; - } - - - //------------------------------------- - // Apply scalar to each mapped element - //------------------------------------- - - MappedRegion1D & operator=(const T& t) - { - int N=dim(); - for (int i=1; i<=N; ++i) - (*this)(i) = t; - - return *this; - } - - MappedRegion1D & operator += (const T& t) - { - int N=dim(); - for (int i=1; i<=N; ++i) - (*this)(i) += t; - - return *this; - } - - MappedRegion1D & operator -= (const T& t) - { - int N=dim(); - for (int i=1; i<=N; ++i) - (*this)(i) -= t; - - return *this; - } - - MappedRegion1D & operator *= (const T& t) - { - int N=dim(); - for (int i=1; i<=N; ++i) - (*this)(i) *= t; - - return *this; - } - - MappedRegion1D & operator /= (const T& t) - { - assert (T(0) != t); - int N=dim(); - for (int i=1; i<=N; ++i) - (*this)(i) /= t; - - return *this; - } - - - //------------------------------------- - // arithmetic operators += , -= - //------------------------------------- - - MappedRegion1D & operator += (const Array1D &B) - { - int Nv = this->size(); - assert(Nv == B.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) += B(i); - - if (B.get_mode() == OBJ_temp) {delete (&B);} // delete temps - return *this; - } - - MappedRegion1D & operator -= (const Array1D &B) - { - int Nv = this->size(); - assert(Nv == B.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) -= B(i); - - if (B.get_mode() == OBJ_temp) {delete (&B);} // delete temps - return *this; - } - - MappedRegion1D & operator += (const MappedRegion1D &R) - { - int Nv = this->size(); - assert(Nv == R.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) += R(i); - - return *this; - } - - MappedRegion1D & operator -= (const MappedRegion1D &R) - { - int Nv = this->size(); - assert(Nv == R.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) -= R(i); - - return *this; - } - -}; - - - -//--------------------------------------------------------- -template class const_MappedRegion1D -//--------------------------------------------------------- -{ -protected: - - const Array1D & A_; // the mapped vector - IMap map_; // id's of mapped values - - int dim_; // num entries in map - int A_dim_; // num entries in vector - -public: - - // data type of referenced array - typedef typename Array1D::data_type T; - - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - const Array1D & array() const { return A_; } - - int lbound() const { return A_.lbound(); } - int dim (int i=1) const { return dim_; } - int size () const { return dim_; } - const char* name() const { return A_.name(); } - - - const_MappedRegion1D(const Array1D &V, const IMap &I) - : A_(V), map_(I) - { - dim_ = I.size(); - A_dim_ = A_.size(); - } - - - const_MappedRegion1D(const_MappedRegion1D &V, const IMap &I) - : A_(V.A_), map_(I) - { - umWARNING("Nigel: debugging const_MappedRegion1D", - "const Mapped region passed to mapped region"); - - dim_ = I.size(); - A_dim_ = A_.size(); - } - - - const_MappedRegion1D operator()(const IMap &I) const - { - return const_MappedRegion1D( A_, I ); - } - - - const T & operator() (int i) const - { -#if (CHECK_ARRAY_INDEX) - assert( map_(i) <= A_dim_ ); -#endif - - return A_(map_(i)); - } - -}; - - - -//--------------------------------------------------------- -// I/O : non-const MappedRegion1D -//--------------------------------------------------------- -template -std::ostream& operator<<(std::ostream &s, MappedRegion1D &R) -{ - int N = R.dim(); - for (int i=1; i<=N; i++) - s << R(i) << std::endl; - return s; -} - - -//--------------------------------------------------------- -// I/O : const MappedRegion1D -//--------------------------------------------------------- -template -std::ostream& operator<<(std::ostream &s, const_MappedRegion1D &R) -{ - int N = R.dim(); - for (int i=1; i<=N; ++i) - s << R(i) << std::endl; - return s; -} - -#endif // NDG__MappedRegion1d_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/MappedRegion2D.h b/cpp/nudg++/trunk/Include/MappedRegion2D.h deleted file mode 100644 index 5db1fa5..0000000 --- a/cpp/nudg++/trunk/Include/MappedRegion2D.h +++ /dev/null @@ -1,645 +0,0 @@ -// MappedRegion2D.h -// Mapped 2D sub-regions of matrices -// 2007/10/16 -//--------------------------------------------------------- -#ifndef NDG__MappedRegion_22D_H__INCLUDED -#define NDG__MappedRegion_22D_H__INCLUDED - -#include -#include - -#include "IMap.h" - -// declare "const" version -template class const_MappedRegion2D; - - -//--------------------------------------------------------- -template class MappedRegion2D -//--------------------------------------------------------- -{ -protected: - - Array2D & A_; // the mapped matrix - IMap Rmap_; // id's of mapped "Rows" - IMap Cmap_; // id's of mapped "Cols" - - int dim_[2]; // num entries in {R,C} maps - int A_dim_[2]; // num entries in matrix - -public: - - // data type of referenced array - typedef typename Array2D::m_data_type T; - - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - - Array2D & array() { return A_; } - const Array2D & array() const { return A_; } - - int lbound() const { return A_.lbound(); } - int size() const { return A_.size(); } - int num_rows() const { return dim_[0]; } - int num_cols() const { return dim_[1]; } - int dim(int i) const { return (1==i)?dim_[0]:dim_[1]; } - const char* name() const{ return A_.name(); } - - // Map subset of Rows in matrix - MappedRegion2D(Array2D &V, const IMap &I, const MatDimension&) - : A_(V), Rmap_(I) - { - int Nc = A_.num_cols(); // num cols in Cmap (All) - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = Nc; // mapping entire rows - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = Nc; // num cols in matrix - Cmap_.linspace(1,Nc, Nc); // map "All" cols (start,stop, len) - } - - MappedRegion2D(Array2D &V, const Index1D &IDX, const MatDimension&) - : A_(V) - { - // Build Rmap (selected rows): - int i1=IDX.lo(), i2=IDX.hi(), Nr=IDX.N(); - Rmap_.linspace(i1,i2, Nr); // map rows [i1:i2] - - int Nc = A_.num_cols(); // num cols in Cmap (All) - dim_[0] = Nr; // num rows in Rmap - dim_[1] = Nc; // mapping entire rows - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = Nc; // num cols in matrix - Cmap_.linspace(1,Nc, Nc); // map "All" cols (start,stop, len) - } - - - //--------------------------------------------- - // Map subset of Columns in matrix - //--------------------------------------------- - - MappedRegion2D(Array2D &V, const MatDimension&, const IMap &J) - : A_(V), Cmap_(J) - { - int Nr = A_.num_rows(); // num rows in Rmap (All) - dim_[0] = Nr; // mapping entire columns - dim_[1] = J.size(); // num cols in Cmap - A_dim_[0] = Nr; // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - Rmap_.linspace(1,Nr, Nr); // map "All" rows (start,stop, len) - } - - MappedRegion2D(Array2D &V, const MatDimension&, const Index1D &JDX) - : A_(V) - { - // Build Cmap (selected columns): - int j1=JDX.lo(), j2=JDX.hi(), Nc=JDX.N(); - Cmap_.linspace(j1,j2, Nc); // map cols [j1:j2] - - int Nr = A_.num_rows(); // num rows in Rmap (All) - dim_[0] = Nr; // mapping entire columns - dim_[1] = Nc; // num cols in Cmap - A_dim_[0] = Nr; // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - Rmap_.linspace(1,Nr, Nr); // map "All" rows (start,stop, len) - } - - - //--------------------------------------------- - // Generalized 2D mapping : (Map, Map) - //--------------------------------------------- - - MappedRegion2D(Array2D &V, const IMap &I, const IMap &J) - : A_(V), Rmap_(I), Cmap_(J) - { - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = J.size(); // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - // Generalized 2D mapping : (Map, Range) - MappedRegion2D(Array2D &V, const IMap &I, const Index1D &JDX) - : A_(V), Rmap_(I) - { - // Build Cmap (selected columns): - int j1=JDX.lo(), j2=JDX.hi(), Nc=JDX.N(); - Cmap_.linspace(j1,j2, Nc); // map cols [j1:j2] - - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = Nc; // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - - // Generalized 2D mapping : (Range, Map) - MappedRegion2D(Array2D &V, const Index1D &IDX, const IMap &J) - : A_(V), Cmap_(J) - { - // Build Rmap (selected rows): - int i1=IDX.lo(), i2=IDX.hi(), Nr=IDX.N(); - Rmap_.linspace(i1,i2, Nr); // map rows [i1:i2] - - dim_[0] = Nr; // num rows in Rmap - dim_[1] = J.size(); // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - - MappedRegion2D(MappedRegion2D &V, const IMap &I, const MatDimension&) - : A_(V.A_), Rmap_(I) - { - umWARNING("Nigel: debugging MappedRegion2D", "Mapped region passed to mapped region"); - - int Nc = A_.num_cols(); // num cols in Cmap (All) - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = A_.num_cols(); // mapping entire rows - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = Nc; // num cols in matrix - Cmap_.linspace(1,Nc, Nc); // map "All" cols (start,stop, len) - } - - MappedRegion2D(MappedRegion2D &V, const IMap &I, const IMap &J) - : A_(V.A_), Rmap_(I), Cmap_(J) - { - umWARNING("Nigel: debugging MappedRegion2D", "Mapped region passed to mapped region"); - - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = J.size(); // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - - MappedRegion2D operator()(const IMap &I, const MatDimension& MD) - { - return MappedRegion2D( A_, I, MD ); - } - - MappedRegion2D operator()(const IMap &I, const IMap &J) - { - return MappedRegion2D( A_, I, J ); - } - - - T & operator()(int i, int j) - { -#if (CHECK_ARRAY_INDEX) - assert( Rmap_(i) <= A_dim_[0] ); // check row index in range - assert( Cmap_(j) <= A_dim_[1] ); // check col index in range -#endif - - return A_(Rmap_(i), Cmap_(j)); - } - - - const T & operator() (int i, int j) const - { -#if (CHECK_ARRAY_INDEX) - assert( Rmap_(i) <= A_dim_[0] ); // check row index in range - assert( Cmap_(j) <= A_dim_[1] ); // check col index in range -#endif - - return A_(Rmap_(i), Cmap_(j)); - } - - - MappedRegion2D & operator=(const MappedRegion2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) = R(i,j); // A_(Rmap_(i), Cmap_(j)) = R(i,j) - - return *this; - } - - - MappedRegion2D & operator=(const const_MappedRegion2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) = R(i,j); // A_(Rmap_(i), Cmap_(j)) = R(i,j) - - return *this; - } - - - MappedRegion2D & operator=(const Array2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) = R(i,j); // A_(Rmap_(i), Cmap_(j)) = R(i,j) - - // if R is temporary, delete it. - if (R.get_mode() == OBJ_temp) - delete (&R); - - return *this; - } - - - MappedRegion2D & operator=(const T* data) - { - // load a (single) mapped column or row with raw data - // (Note: fudge to allow loading from IVec/DVec) - - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - - if ((1==M) && (N>1)) { - // load the mapped row (assumes data has correct length) - for (int j=1; j<=N; ++j) { - (*this)(1,j) = data[j-1]; - } - } - else if ((M>1) && (1==N)) { - // load the mapped column (assumes data has correct length) - for (int i=1; i<=M; ++i) { - (*this)(i,1) = data[i-1]; - } - } - else if ((1==M) && (1==N)) { - // degenerate case: a single element - (*this)(1,1) = data[0]; - } - else { - umERROR("MappedRegion2D operator=(T*)", - "Map should contain a single column or row"); - } - - return *this; - } - - - //------------------------------------- - // Apply scalar to each mapped element - //------------------------------------- - - MappedRegion2D & operator=(const T t) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) = t; // A_(Rmap_(i), Cmap_(j)) = t - - return *this; - } - - MappedRegion2D& operator += (const T& t) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) += t; // A(Rmap_(i), Cmap_(j)) += t - - return *this; - } - - MappedRegion2D& operator -= (const T& t) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) -= t; // A_(Rmap_(i), Cmap_(j)) -= t - - return (*this); - } - - MappedRegion2D & operator *= (const T& t) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) *= t; // A_(Rmap_(i), Cmap_(j)) *= t - - return *this; - } - - MappedRegion2D& operator /= (const T& t) - { - assert (T(0) != t); - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) /= t; // A_(Rmap_(i), Cmap_(j)) /= t - - return (*this); - } - - - //------------------------------------- - // arithmetic operators += , -= - //------------------------------------- - - MappedRegion2D& operator += (const Array2D& B) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == B.num_rows()); // assume both sides conform - assert(N == B.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) += B(i,j); // A_(Rmap_(i), Cmap_(j)) += B(i,j) - - if (B.get_mode() == OBJ_temp) {delete (&B);} // clean up temps - return (*this); - } - - - MappedRegion2D& operator -= (const Array2D& B) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == B.num_rows()); // assume both sides conform - assert(N == B.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) -= B(i,j); // A_(Rmap_(i), Cmap_(j)) -= B(i,j) - - if (B.get_mode() == OBJ_temp) {delete (&B);} // clean up temps - return (*this); - } - - MappedRegion2D& operator += (const MappedRegion2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) += R(i,j); // A_(Rmap_(i), Cmap_(j)) += R(i,j) - - return (*this); - } - - MappedRegion2D& operator -= (const MappedRegion2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) -= R(i,j); // A_(Rmap_(i), Cmap_(j)) -= R(i,j) - - return (*this); - } - -}; - - - -//--------------------------------------------------------- -template class const_MappedRegion2D -//--------------------------------------------------------- -{ -protected: - - const Array2D & A_; // the mapped matrix - IMap Rmap_; // id's of mapped "Rows" - IMap Cmap_; // id's of mapped "Cols" - - int dim_[2]; // num entries in {R,C} maps - int A_dim_[2]; // num entries in matrix - -public: - - // data type of referenced array - typedef typename Array2D::m_data_type T; - - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - const Array2D & array() const { return A_; } - - int lbound() const { return A_.lbound(); } - int size() const { return A_.size(); } - int num_rows() const { return dim_[0]; } - int num_cols() const { return dim_[1]; } - int dim (int i) const { return (1==i)?dim_[0]:dim_[1]; } - const char* name() const{ return A_.name(); } - - - // Map subset of Rows in matrix - const_MappedRegion2D(const Array2D &V, const IMap &I, const MatDimension&) - : A_(V), Rmap_(I) - { - int Nc = A_.num_cols(); // num cols in Cmap (All) - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = Nc; // mapping entire rows - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = Nc; // num cols in matrix - Cmap_.linspace(1,Nc, Nc); // map "All" cols (start,stop, len) - } - const_MappedRegion2D(const Array2D &V, const Index1D &IDX, const MatDimension&) - : A_(V) - { - // Build Rmap (selected rows): - int i1=IDX.lo(), i2=IDX.hi(), Nr=IDX.N(); - Rmap_.linspace(i1,i2, Nr); // map rows [i1:i2] - - int Nc = A_.num_cols(); // num cols in Cmap (All) - dim_[0] = Nr; // num rows in Rmap - dim_[1] = Nc; // mapping entire rows - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = Nc; // num cols in matrix - Cmap_.linspace(1,Nc, Nc); // map "All" cols (start,stop, len) - } - - - // Map subset of Columns in matrix - const_MappedRegion2D(const Array2D &V, const MatDimension&, const IMap &J) - : A_(V), Cmap_(J) - { - int Nr = A_.num_rows(); // num rows in Rmap (All) - dim_[0] = Nr; // mapping entire columns - dim_[1] = J.size(); // num cols in Cmap - A_dim_[0] = Nr; // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - Rmap_.linspace(1,Nr, Nr); // map "All" rows (start,stop, len) - } - const_MappedRegion2D(const Array2D &V, const MatDimension&, const Index1D &JDX) - : A_(V) - { - // Build Cmap (selected columns): - int j1=JDX.lo(), j2=JDX.hi(), Nc=JDX.N(); - Cmap_.linspace(j1,j2, Nc); // map cols [j1:j2] - - int Nr = A_.num_rows(); // num rows in Rmap (All) - dim_[0] = Nr; // mapping entire columns - dim_[1] = Nc; // num cols in Cmap - A_dim_[0] = Nr; // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - Rmap_.linspace(1,Nr, Nr); // map "All" rows (start,stop, len) - } - - - // Generalized 2D mapping : (Map, Map) - const_MappedRegion2D(const Array2D &V, const IMap &I, const IMap &J) - : A_(V), Rmap_(I), Cmap_(J) - { - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = J.size(); // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - // Generalized 2D mapping : (Map, Range) - const_MappedRegion2D(const Array2D &V, const IMap &I, const Index1D &JDX) - : A_(V), Rmap_(I) - { - // Build Cmap (selected columns): - int j1=JDX.lo(), j2=JDX.hi(), Nc=JDX.N(); - Cmap_.linspace(j1,j2, Nc); // map cols [j1:j2] - - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = Nc; // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - // Generalized 2D mapping : (Range, Map) - const_MappedRegion2D(const Array2D &V, const Index1D &IDX, const IMap &J) - : A_(V), Cmap_(J) - { - // Build Rmap (selected rows): - int i1=IDX.lo(), i2=IDX.hi(), Nr=IDX.N(); - Rmap_.linspace(i1,i2, Nr); // map rows [i1:i2] - - dim_[0] = Nr; // num rows in Rmap - dim_[1] = J.size(); // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - - - const_MappedRegion2D(const const_MappedRegion2D &V, const IMap& I, const MatDimension&) - : A_(V.A_), Rmap_(I) - { - umWARNING("Nigel: debugging const_MappedRegion2D", "Mapped region passed to mapped region"); - - int Nc = A_.num_cols(); // num cols in Cmap (All) - dim_[0] = I.size(); // num rows in map - dim_[1] = Nc; // mapping entire rows - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = Nc; // num cols in matrix - Cmap_.linspace(1,Nc, Nc); // map "All" cols (start,stop, len) - } - const_MappedRegion2D(const const_MappedRegion2D &V, const IMap &I, const IMap &J) - : A_(V.A_), Rmap_(I), Cmap_(J) - { - umWARNING("Nigel: debugging MappedRegion2D", "Mapped region passed to mapped region"); - - dim_[0] = I.size(); // num rows in Rmap - dim_[1] = J.size(); // num rows in Cmap - A_dim_[0] = A_.num_rows(); // num rows in matrix - A_dim_[1] = A_.num_cols(); // num cols in matrix - } - - - const_MappedRegion2D operator()(const IMap &I, const MatDimension& MD) const - { - return const_MappedRegion2D( A_, I, MD ); - } - const_MappedRegion2D operator()(const IMap &I, const IMap &J) const - { - return const_MappedRegion2D( A_, I, J ); - } - - - const T & operator() (int i, int j) const - { -#if (CHECK_ARRAY_INDEX) - assert( Rmap_(i) <= A_dim_[0] ); // check row index in range - assert( Cmap_(j) <= A_dim_[1] ); // check col index in range -#endif - - return A_(Rmap_(i), Cmap_(j)); - } - -}; - - - -//--------------------------------------------------------- -// I/O : non-const MappedRegion2D -//--------------------------------------------------------- -template -std::ostream& operator<<(std::ostream &s, MappedRegion2D &R) -{ - int M = R.num_rows(); // num mapped rows - int N = R.num_cols(); // FIXME: entire rows only - - s << M << " " << N << "\n"; - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) { - s << R(i,j) << " "; - } - s << "\n"; - } - s.flush(); - return s; -} - - -//--------------------------------------------------------- -// I/O : const MappedRegion2D -//--------------------------------------------------------- -template -std::ostream& operator<<(std::ostream &s, const_MappedRegion2D &R) -{ - int M = R.num_rows(); // num mapped rows - int N = R.num_cols(); // FIXME: entire rows only - - s << M << " " << N << "\n"; - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) { - s << R(i,j) << " "; - } - s << "\n"; - } - s.flush(); - return s; -} - -#endif // NDG__MappedRegion_22D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/MatObj_Type.h b/cpp/nudg++/trunk/Include/MatObj_Type.h deleted file mode 100644 index f6d9cae..0000000 --- a/cpp/nudg++/trunk/Include/MatObj_Type.h +++ /dev/null @@ -1,269 +0,0 @@ -// MatObj_Type.h: simple 2-D array of objects -// column-wise, 1-based (i,j) indexing -// 2007/10/18 -//--------------------------------------------------------- -#ifndef NDG__MatObj_Type_H__INCLUDED -#define NDG__MatObj_Type_H__INCLUDED - -#include -#include -#include "ArrayMacros.h" - - -// typedef versions for common data types -template class MatObj; - -typedef MatObj DM; -typedef MatObj IM; - -// for debug print -void dumpDM(const DM& M, const char* s); -void dumpIM(const IM& M, const char* s); - - -//--------------------------------------------------------- -template -class MatObj -//--------------------------------------------------------- -{ - -protected: - - T* v_; // pointer to calloc'd alloc. - T** col_; // pointers to 1-offset columns - int m_, n_; // num_rows, num_cols - - void initialize(int M, int N); - void copy(const T* p); - -public: - - // constructors - MatObj() : v_(0),col_(0),m_(0),n_(0) {;} - MatObj(const MatObj &B) : v_(0),col_(0),m_(0),n_(0) {copy(B);} - MatObj(int M, int N) : v_(0),col_(0),m_(0),n_(0) {initialize(M,N);} - MatObj(int M, int N, T* p) : v_(0),col_(0),m_(0),n_(0) { - initialize(M,N); int len = M*N; - for (int i=0; i0 && n_>0); } - int size() const { return (m_*n_); } - int length() const { return (m_*n_); } - int num_rows() const { return m_; } - int num_cols() const { return n_; } - bool resize(int M, int N); - - // access to data - const T* data() const { return v_; } - T* data() { return v_; } - - // return pointer to data in col j - T* pCol(int j) {Check_idx_Col(j); return col_[j]+1;} - const T* pCol(int j) const {Check_idx_Col(j); return col_[j]+1;} - - - // 1-based element access - const T& operator()(int i, int j) const {Check_index_IJ(i,j); return col_[j][i];} - T& operator()(int i, int j) {Check_index_IJ(i,j); return col_[j][i];} - - // assignment - MatObj& operator=(const T& x) { fill(x); return (*this); } - MatObj& operator=(const MatObj &B); - - void copy(const MatObj& rB) { (*this) = rB ; } - void copy(const MatObj* pB) { (*this) = (*pB); } - void fill(const T &x); - - void append_col(int len, T* p); - - -protected: - - //------------------------------------- - // Optional index checking - //------------------------------------- -#if (CHECK_ARRAY_INDEX) - // 1-based indices - void Check_index_IJ (int i, int j) const { - if (i<1) throw 1; if (i> m_) throw 2; - if (j<1) throw 3; if (j> n_) throw 4; - } - void Check_idx_Row(int i) const {if (i<1) throw 1; if (i>m_) throw 2;} - void Check_idx_Col(int j) const {if (j<1) throw 1; if (j>n_) throw 2;} - void Check_idx_Len(int k) const {if (k<1) throw 1; if (k>(m_*n_)) throw 2;} -#else - // 1-based indices - void Check_index_IJ(int i, int j) const {} - void Check_idx_Row(int i) const {} - void Check_idx_Col(int j) const {} - void Check_idx_Len(int k) const {} -#endif - -}; - - - -//--------------------------------------------------------- -// define member functions -//--------------------------------------------------------- - -template inline -void MatObj::initialize(int M, int N) -{ - // allocate the data array, and build the - // array of 1-based column pointers. - - assert(NULL == v_ ); // should be empty - assert(NULL == col_); // should be empty - assert(0==m_&&0==n_); // should be empty - assert(M>=0 && N>=0); - - if (M<1 || N<1) { - // allow empty initialization - return; - } - - // Please note: use new (not calloc) to ensure - // that each object's constructor is called! - - v_ = new T[M*N]; // array of objects - col_ = new T* [N]; // column pointers - - assert(v_ && col_); - - // set matrix dimensions (m,n) - m_ = M; n_ = N; - - // adjust pointers for 1-based indexing - T* p = v_ - 1; - for (int i=0; i inline -void MatObj::destroy() -{ - if (v_) { delete [] v_; } // delete objects - if (col_) {col_++; delete [] col_;} // delete col pointers - v_=NULL; col_=NULL; m_=0; n_=0; // zero in case reused -} - - -template inline -bool MatObj::resize(int M, int N) -{ - // resize allocation - if (M==m_ && N==n_) { return false; } - destroy(); - if (M>0 && N>0) { initialize(M,N); } - return true; -} - - -template inline -MatObj& MatObj::operator=(const MatObj &B) -{ - if (&B == this) { return (*this); } - int Nr = B.num_rows(), Nc = B.num_cols(); - if ((Nr==m_) && (Nc==n_)) { - copy(B.data()); // no re-alloc, just deep copy - } else { - destroy(); // release allocation - initialize(Nr,Nc); // rebuild - copy(B.data()); // deep copy - } - return (*this); -} - - -template inline -void MatObj::fill(const T &x) -{ - // fill array: unroll into blocks of 4, then fill tail - int N = m_*n_, i=0; - int Nmod4 = N & 3; int N4 = N - Nmod4; - for (i=0; i inline -void MatObj::copy(const T* p) -{ - // Note: - // - assumes length of source and destination match. - // - assumes object defines operator=() - int N = m_*n_, i=0; - int Nmod4 = N & 3; int N4 = N - Nmod4; - for (i=0; i inline -void MatObj::append_col(int len, T* p) -{ - // To append a column, simply append new data to tail - // of existing array, then adjust logical dimensions. - // Note: handle case of appending 1st col to empty mat - - // check for nothing to do - if (len<1 || !p) - return; - - int i=0; - if (!ok()) { - resize(len, 1); // appending "1st" col to empty mat - for (i=1; i<=len; ++i) { - col_[1][i] = p[i-1]; // load data into new column - } - } - else - { - assert(len >= m_); // assume enough data for new column - int Ni = size(); // store length of current data array - int Nr = m_; // store current row count - int Nc = n_ + 1; // set new column count - T* tpv = v_; // store existing data - - v_ = NULL; // unlink pointer from data - destroy(); // reset members - initialize(Nr,Nc); // re-alloc expanded object - - // reload old data - for (i=0; i inline std::ostream& operator<<(std::ostream &s, const MatObj &A) { return s; } -// template inline std::istream& operator>>(std::istream &s, MatObj &A) { return s; } - -#endif // NDG__MatObj_Type_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Mat_COL.h b/cpp/nudg++/trunk/Include/Mat_COL.h deleted file mode 100644 index d1d0750..0000000 --- a/cpp/nudg++/trunk/Include/Mat_COL.h +++ /dev/null @@ -1,6275 +0,0 @@ -// Matrix_COL.h -// Matlab-compatible dense matrix -// 1-based (i,j) indexing -// 2007/10/16 -//--------------------------------------------------------- -#ifndef NDG__Matrix_COL_H__INCLUDED -#define NDG__Matrix_COL_H__INCLUDED - -#include "Vec_Type.h" -#include "Region2D.h" -#include "VecSort_Type.h" - -// typedef versions for common data types -template class Mat_COL; - -typedef Mat_COL DMat; -typedef Mat_COL ZMat; -typedef Mat_COL IMat; -typedef Mat_COL LMat; -typedef Mat_COL BMat; - -// add forward declarations (as necessary) -// -// C = A * B -void umAxB(const DMat& A, const DMat& B, DMat& C); -void umAxB(const ZMat& A, const ZMat& B, ZMat& C); - -// bool chol_solve(const DMat& ch, const DMat& B, DMat& X); -// DVec& chol_solve(const DMat& ch, const DVec& b); - - - -//--------------------------------------------------------- -template -class Mat_COL : public virtual Vector -//--------------------------------------------------------- -{ - // - // Member data - // -protected: - - int m_M; // num rows - int m_N; // num cols - int m_MN; // num elements = (m*n) - - T** col_; // 1-based data pointers, adjusted - // to enable 1-based (i,j) indexing - - fact_type m_fact_mode; // factorization scheme - int* m_ipiv; // pivot data for LU factorization - - double m_norm_1, // max col sum - m_norm_inf, // max row sum - m_norm_frob; // sqrt(sum(squares)) - -public: - - // typedef's for std::compatibility - typedef int size_type; - typedef T m_data_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - // constructors - explicit Mat_COL(const char* sz="mat", OBJ_mode md=OBJ_real); - Mat_COL(const Mat_COL &B, OBJ_mode md=OBJ_real, const char* sz="mat"); - explicit Mat_COL(int M, int N, const char* sz, OBJ_mode md=OBJ_real); - explicit Mat_COL(int M, int N, const T x=T(0), OBJ_mode md=OBJ_real, const char* sz="mat"); - explicit Mat_COL(int M, int N, const T *data, OBJ_mode md=OBJ_real, const char* sz="mat"); - explicit Mat_COL(const ArrayData& rAD, int M, int N, const char *sdata, OBJ_mode md=OBJ_real, const char* sz="mat"); - - // destructor - virtual ~Mat_COL(); - virtual void destroy(); - virtual void Free(); - - // manage allocation - Mat_COL& borrow(int M, int N, T* p); - void lend_col(int N, Vector &col); - void set_pointers(int M, int N); - bool resize(int M, int N, bool bInit=true, T x=T(0)); // reinit to zeros(M,N) - bool resize(const Mat_COL& B, bool bInit=true, T x=T(0)); // reinit to zeros(M,N) - bool realloc(int newM, int newN, bool bInit=true, T x=T(0)); // map col-data onto new shape - bool reshape(int newM, int newN, bool bInit=true, T x=T(0)); // wrap data into new shape - bool compatible(const Mat_COL& B) const; - - void append_col(const Vector& V); - void append_row(const Vector& V); - - void append_cols(const Mat_COL& B); - void append_rows(const Mat_COL& B); - void append_rows(int Nr, int Nc=1); - void merge_rows(IVec map, Mat_COL& B); - - // copy/load - Mat_COL& copy(const T *vec); - Mat_COL& copy(const Mat_COL& B); - void load(int M, int N, const T *vdata); - void load(int M, int N, const Vector& V); - void load_col (int j, int Nr, const T* pdata); - void load_rows(int M, int N, const char *sdata); - void load_cols(int M, int N, const char *sdata); - - // assignment - Mat_COL& operator=(const T &val); - Mat_COL& operator=(const Mat_COL &B); - Mat_COL& operator=(const Vector &V); - // allow assignment of IMat to DMat - Mat_COL& assign(const IMat &B); - - - // Utilities - bool ok() const { return ((this->v_!=NULL) && (m_M>0) && (m_N>0)); } - int size() const { return this->m_Len; } - void size(int& M, int& N) const { M=m_M; N=m_N; } - bool is_square() const { return (this->ok() && (m_M==m_N)); } - int lbound () const { return 1; } // base for operator(i,j) - int dim(int d) const { return (d==1)?m_M:((d==2)?m_N:0); } - int num_rows() const { return m_M; } - int num_cols() const { return m_N; } - int max_mn() const { return (m_M > m_N) ? m_M : m_N; } - int min_mn() const { return (m_M < m_N) ? m_M : m_N; } - - // "mode". See also Vector::m_mode - void set_factmode(fact_type fm) { m_fact_mode = fm; } - fact_type get_factmode() const { return m_fact_mode; } - bool is_factored() const { return (FACT_NONE==m_fact_mode)?false:true;} - int* get_pivots() const { return m_ipiv; } - void set_pivots(int* ipiv) {if(m_ipiv){umIVectorFree(m_ipiv);} m_ipiv=ipiv;} - - Mat_COL& zeros() {Vector::fill(T(0)); return (*this);} - Mat_COL& zeros(int M, int N) {resize(M,N,true,T(0)); return (*this);} - - Mat_COL& ones() {Vector::fill(T(1)); return (*this);} - Mat_COL& ones(int M, int N) {resize(M,N,true,T(1)); return (*this);} - - Mat_COL& fill(const T &x) {Vector::fill(x); return (*this);} - Mat_COL& set_abs() {Vector::set_abs(); return (*this);} - - Mat_COL& operator!() const; - Mat_COL& identity(int N); - Mat_COL& diag(const Vector& d); - Mat_COL& set_diag(int i, const Vector& d, bool MLmode=false); - Mat_COL& set_diags(const Mat_COL& B, const IVec& d, int m, int n); - - Mat_COL& transpose(); - Mat_COL& hilbert(int N); - - // Comparison ("fuzzy", uses m_EqTol) - bool operator==(const Mat_COL &B) const; - bool operator!=(const Mat_COL &B) const { return (!operator==(B));} - - //------------------------------------- - // return "Boolean" results - //------------------------------------- - Mat_COL& eq (T val) const; // R = (BCType==Wall) - Mat_COL& eq (Mat_COL& B) const; // R = (EToE==outer(Range,Ones)) - - Mat_COL& le (T val) const; // R = (U <= val) - Mat_COL& lt (T val) const; // R = (U < val) - Mat_COL& lt_abs(T val) const; // R = (U < tol) - - Mat_COL& ge (T val) const; // R = (U >= val) - Mat_COL& gt (T val) const; // R = (U > val) - Mat_COL& gt_abs(T val) const; // R = (U > tol) - - - // MAX row/col vals - T max_row_val (const int i) const; - T max_row_val_abs(const int i) const; - T max_col_val (const int j) const; - T max_col_val_abs(const int j) const; - - // MIN row/col vals - T min_row_val (const int i) const; - T min_row_val_abs(const int i) const; - T min_col_val (const int j) const; - T min_col_val_abs(const int j) const; - - // matrix norms - double norm1() const; // max column sum - double norm_inf() const; // max row sum - double norm_frob() const; // frobenius-norm - - // Element-by-element operations. - - // The first set update (*this) in place - Mat_COL& mult_element(const Mat_COL &B); - Mat_COL& mult_element(const Vector& b); - Mat_COL& mult_element(const T* data); - Mat_COL& div_element (const Mat_COL &B); - Mat_COL& div_element (const Vector& b); - - // The following variations do not change (*this) - Mat_COL& dd(const Mat_COL &B) const; - Mat_COL& dm(const Mat_COL &B) const; - Mat_COL& dm(const Vector &V) const; - Mat_COL& dm(const T* data) const; - - - //------------------------------------- - // numerical routines - //------------------------------------- - - // apply scalar to all elements - void add_val (const T &x) { Vector::add_val (x); } - void mult_val(const T &x) { Vector::mult_val(x);} - void div_val (const T &x) { Vector::div_val (x); } - void pow_val (const T &x) { Vector::pow_val (x); } - - //------------------------------------- - // Overloaded arithmetic operators. - // Note: pattern for global operators, - // tmp(A); tmp+=x; return tmp; - //------------------------------------- - Mat_COL& operator += (const T &x) {add_val ( x); return (*this);} - Mat_COL& operator -= (const T &x) {add_val (-x); return (*this);} - Mat_COL& operator *= (const T &x) {mult_val( x); return (*this);} - Mat_COL& operator /= (const T &x) {div_val ( x); return (*this);} - - - // element-by-element operations (A.+B) all call - // unrolled vector version (deleting arg if temp) - // - // A.+B, A.+V, A.-B, A.-V - Mat_COL& operator+=(const Mat_COL &B) {Vector::operator+=((const Vector&)B);return(*this);} - Mat_COL& operator+=(const Vector &V) {Vector::operator+=(V);return(*this);} - Mat_COL& operator-=(const Mat_COL &B) {Vector::operator-=((const Vector&)B);return(*this);} - Mat_COL& operator-=(const Vector &V) {Vector::operator-=(V);return(*this);} - - Mat_COL& operator*=(const Mat_COL &A); // matrix multiplication - Mat_COL& operator/=(const Mat_COL &A); // mrdivide(B,A): B/A => B*inv(A) - Mat_COL& operator|=(const Mat_COL &A); // mldivide(A,B): A\B => inv(A)*B - - Mat_COL& invert(); - - void zero_below_diag(); // helper for chol() - Mat_COL& fact_Chol(); - void solve_Chol(const Mat_COL& B, Mat_COL& X); - void solve_Chol(const Vector& b, Vector& x); - - Mat_COL& fact_LU(); - double solve_LU(const Mat_COL& B, Mat_COL& X, bool bTrans=false, bool bCond=false); - double solve_LU(const Vector& b, Vector& x, bool bTrans=false, bool bCond=false); - - - //------------------------------------- - // element access - //------------------------------------- - - // single (1-based) index into base array - T& operator()(int i) { return Vector::operator()(i); } - const T& operator()(int i) const { return Vector::operator()(i); } - - // 1-based element access (make "virtual" if required) - T& operator()(int i, int j) {CheckIdx_IJ_1(i,j); return col_[j][i];} - const T& operator()(int i, int j) const {CheckIdx_IJ_1(i,j); return col_[j][i];} - - // return pointer to (1-based) col j - T* operator[](int j) {CheckIdx_Col_1(j); return col_[j];} - const T* operator[](int j) const {CheckIdx_Col_1(j); return col_[j];} - - // return pointer to data in col j - T* pCol(int j) {CheckIdx_Col_1(j); return col_[j]+1;} - const T* pCol(int j) const {CheckIdx_Col_1(j); return col_[j]+1;} - - // return T** array of (1-based) col pointers - T** COLS() { return col_ ; } - const T** COLS() const { return col_ ; } - - - - //--------------------------------------------- - // set/get entire rows/cols - //--------------------------------------------- - - // NOTE: return value must be assigned or deleted! - Vector& get_row(const int i) const; - Vector& get_col(const int j) const; - - void set_row(const int i, const T &x); - void set_row(const int i, const Vector &vec); - void set_col(const int j, const T &x); - void set_col(const int j, const Vector &vec); - void add_col(const int j, const Vector &vec); - void sub_col(const int j, const Vector &vec); - void extend_col(const int ncol); - - Vector& col_sums() const; - Vector& col_sums_abs() const; - Vector& row_sums() const; - - Vector& max_col_vals_abs() const; - Vector& max_col_vals() const; - Vector& max_row_vals() const; - - Vector& min_col_vals_abs() const; - Vector& min_col_vals() const; - Vector& min_row_vals() const; - - Mat_COL& reverse_rows(); - Mat_COL& sort_cols(const IVec& idx); - Mat_COL& sort(int dim=1); - - void scale_col(const int j, const double &x); - void scale_col(const int j, const Vector &vec); - - // Kronecker tensor product. - Mat_COL& kron(const Mat_COL& B) const; - void setKronBlock(int row, int col, const Mat_COL& B); - -public: - - //------------------------------------- - // Adjustable output format. - //------------------------------------- - - void print ( - FILE* os = stdout, - const char* msg=NULL, - const char* fmt="lf", // [%e|%lf|%g] - int prec=4, // sig.figs|dec.places - int wdth=8, // output spacing [12] - int nline=100, // entries per line - int nr=0, // num rows to write (0 --> all) - int nc=0 // num cols to write (0 --> all) - ) const; - - void print_STREAM ( - std::ostream& os, - const char* msg=NULL, - char fmt='G', // [%e|%lf|%g] - int prec=4, // sig.figs|dec.places - int wdth=12, // output spacing [12] - int nline=100, // entries per line - int nr=0, // num rows to write (0 --> all) - int nc=0 // num cols to write (0 --> all) - ) const; - - // Formatted for Gnuplot - void print_GP ( - std::ostream& os, - int prec=4, // sig. figs [ 4] ios::scientific - int wdth=12, // output spacing [12] - int nr=0, // num rows to write (0 --> all) - int nc=0) const; // num cols to write (0 --> all) - - - - // Save matrix in Matlab ".mat" format (BINARY) - // Note: For Win32, fp MUST be opened in "wb" mode - void m_save(FILE* fp, const char* name) const; - void m_load(FILE *fp, std::string& name); - - - // - // Optional index checking - // -protected: - -#if (CHECK_ARRAY_INDEX) - - // 0-based indices - void CheckIdx_IJ_0 (int i, int j) const { if (i < 0) throw 1; if (i >= m_M) throw 2; - if (j < 0) throw 3; if (j >= m_N) throw 4;} - void CheckIdx_Row_0(int i) const {if (i<0) throw 1; if (i>=m_M) throw 2;} - void CheckIdx_Col_0(int j) const {if (j<0) throw 1; if (j>=m_N) throw 2;} - void CheckIdx_Len_0(int k) const {if (k<0) throw 1; if (k>=m_MN) throw 2;} - - // 1-based indices - void CheckIdx_IJ_1 (int i, int j) const { if (i < 1) throw 1; if (i > m_M) throw 2; - if (j < 1) throw 3; if (j > m_N) throw 4;} - void CheckIdx_Row_1(int i) const {if (i<1) throw 1; if (i>m_M) throw 2;} - void CheckIdx_Col_1(int j) const {if (j<1) throw 1; if (j>m_N) throw 2;} - void CheckIdx_Len_1(int k) const {if (k<1) throw 1; if (k>m_MN) throw 2;} - -#else - - // 0-based indices - void CheckIdx_IJ_0(int i, int j) const {} - void CheckIdx_Row_0(int i) const {} - void CheckIdx_Col_0(int j) const {} - void CheckIdx_Len_0(int k) const {} - - // 1-based indices - void CheckIdx_IJ_1(int i, int j) const {} - void CheckIdx_Row_1(int i) const {} - void CheckIdx_Col_1(int j) const {} - void CheckIdx_Len_1(int k) const {} - -#endif - - - - //------------------------------------------------------- - // member functions involving a subset of the matrix - //------------------------------------------------------- -public: - - Vector& get_map(const IVec& map) const; - Vector& get_map(const IVec& map, int j) const; - Vector& get_map(int i, const IVec& map) const; - - Mat_COL& get_map(const IMat& map) const; -//Mat_COL& operator()(const IMat& map) const; - - Mat_COL& set_map(const IMat& map, const T x); - Mat_COL& set_map(const IMat& map, const Vector& X); - - Mat_COL& concat_v(const Mat_COL& A1, const Mat_COL& A2); - Mat_COL& concat_v(const Mat_COL& A1, const Mat_COL& A2, const Mat_COL& A3); - - - //------------------------------------------------------- - // operations involving (contiguous) Region1D - //------------------------------------------------------- -public: - Mat_COL(const Region2D< Mat_COL > &R, OBJ_mode md=OBJ_real, const char *sz="mat"); - Mat_COL(const const_Region2D< Mat_COL > &R, OBJ_mode md=OBJ_real, const char *sz="mat"); - - const_Region2D< Mat_COL > operator()(const Index1D &I, const Index1D &J) const; - Region2D< Mat_COL > operator()(const Index1D &I, const Index1D &J); - - const_Region1D< Vector > operator()(const Index1D &I, int j) const; - Region1D< Vector > operator()(const Index1D &I, int j); - - const_Region1D< Vector > operator()(const Index1D &I) const; - Region1D< Vector > operator()(const Index1D &I); - - const_Region1D< Vector > operator()(const MatDimension&, int j) const; - Region1D< Vector > operator()(const MatDimension&, int j); - - const_Region2D< Mat_COL > operator()(int i, const MatDimension&) const; - Region2D< Mat_COL > operator()(int i, const MatDimension&); - - Mat_COL& operator=(const Region2D< Mat_COL > &B); - Mat_COL& operator=(const const_Region2D< Mat_COL > &B); - Mat_COL& operator=(const Region1D< Vector > &R); - Mat_COL& operator=(const const_Region1D< Vector > &R); - - Mat_COL& mult_element(const Region2D< Mat_COL > &R); - Mat_COL& div_element (const Region2D< Mat_COL > &R); - - Mat_COL& operator+=(const Region2D< Mat_COL > &R); - Mat_COL& operator-=(const Region2D< Mat_COL > &R); - //------------------------------------------------------- - - - //------------------------------------------------------- - // operations involving MappedRegion2D (and 1D) - //------------------------------------------------------- -public: - Mat_COL(const MappedRegion2D< Mat_COL > &B, OBJ_mode md=OBJ_real, const char *sz="mat"); - Mat_COL(const const_MappedRegion2D< Mat_COL > &B, OBJ_mode md=OBJ_real, const char *sz="mat"); - - - const_MappedRegion2D< Mat_COL > operator()(const Region1D< Vector > &Ri, int j) const; - MappedRegion2D< Mat_COL > operator()(const Region1D< Vector > &Ri, int j); - const_MappedRegion2D< Mat_COL > operator()(const IVec &I, int j) const; - MappedRegion2D< Mat_COL > operator()(const IVec &I, int j); - - - const_MappedRegion2D< Mat_COL > operator()(int i, const Region1D< Vector > &Rj) const; - MappedRegion2D< Mat_COL > operator()(int i, const Region1D< Vector > &Rj); - const_MappedRegion2D< Mat_COL > operator()(int i, const IVec &J) const; - MappedRegion2D< Mat_COL > operator()(int i, const IVec &J); - - - const_MappedRegion1D< Vector > operator()(const IVec &I) const; - MappedRegion1D< Vector > operator()(const IVec &I); - - // Map subset of rows - const_MappedRegion2D< Mat_COL > operator()(const IVec &I, const MatDimension& MD) const; - MappedRegion2D< Mat_COL > operator()(const IVec &I, const MatDimension& MD); - const_MappedRegion2D< Mat_COL > operator()(const Index1D &ID, const MatDimension& MD) const; - MappedRegion2D< Mat_COL > operator()(const Index1D &ID, const MatDimension& MD); - - // Map subset of columns - const_MappedRegion2D< Mat_COL > operator()(const MatDimension& MD, const IVec &J) const; - MappedRegion2D< Mat_COL > operator()(const MatDimension& MD, const IVec &J); - - //------------------------------------- - // Generalized 2D mapping - //------------------------------------- - const_MappedRegion2D< Mat_COL > operator()(const IVec &I, const IVec &J) const; - MappedRegion2D< Mat_COL > operator()(const IVec &I, const IVec &J); - - const_MappedRegion2D< Mat_COL > operator()(const IVec &I, const Index1D &IDX) const; - MappedRegion2D< Mat_COL > operator()(const IVec &I, const Index1D &IDX); - - const_MappedRegion2D< Mat_COL > operator()(const Index1D &IDX, const IVec &J) const; - MappedRegion2D< Mat_COL > operator()(const Index1D &IDX, const IVec &J); - - Mat_COL& operator=(const const_MappedRegion2D< Mat_COL > &R); - Mat_COL& operator=(const MappedRegion2D< Mat_COL > &R); - - Mat_COL& operator=(const const_MappedRegion1D< Vector > &R); - Mat_COL& operator=(const MappedRegion1D< Vector > &R); - - - Mat_COL& dm(const MappedRegion2D< Mat_COL > &R) const; - Mat_COL& dd(const MappedRegion2D< Mat_COL > &R) const; - - Mat_COL& mult_element(const MappedRegion2D< Mat_COL > &R); - Mat_COL& div_element (const MappedRegion2D< Mat_COL > &R); - - Mat_COL& operator+=(const MappedRegion2D< Mat_COL > &R); - Mat_COL& operator-=(const MappedRegion2D< Mat_COL > &R); - //------------------------------------------------------- - - -}; - - -/////////////////////////////////////////////////////////// -// -// constructors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(const char* sz, OBJ_mode md) -//--------------------------------------------------------- -: Vector(sz, md), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{} - - -// not "explicit"; allows construction from return objects -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(const Mat_COL &B, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(sz, md), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - int Nr = B.m_M, Nc = B.m_N; - this->m_mode = md; - - // manage copy of real/temp objects - // deletes B, if temporary. - Vector::operator= ((const Vector&) B); - - if (Nr>0 && Nc>0) { - set_pointers(Nr,Nc); - } -} - - -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(int M, int N, const char* sz, OBJ_mode md) -//--------------------------------------------------------- -: Vector(M*N, sz, md), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - set_pointers(M,N); -} - - -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(int M, int N, const T x, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(M*N, x, md, sz), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - set_pointers(M,N); -} - - -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(int M, int N, const T *data, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(M*N, data, md, sz), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - set_pointers(M,N); -} - - -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(const ArrayData& rAD, int M, int N, const char *sdata, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(M*N, T(0), md, sz), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - set_pointers(M,N); - - try - { - std::istringstream ins(sdata); - - if (SZ_DATA_MAT_ROWS==rAD.mode()) { - // load rows in ASCII file into matrix ROWS - for (int i=1; i<=M; ++i) - for (int j=1; j<=N; ++j) - ins >> col_[j][i]; // >> (*this)(i,j); - } - else { - // load rows in ASCII file into matrix COLUMNS - assert(SZ_DATA_MAT_COLS==rAD.mode()); - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - ins >> col_[j][i]; // >> (*this)(i,j); - } - } catch(...) { - umERROR("Mat_COL(M,N, char *s)", "problem parsing data."); - } -} - - -/////////////////////////////////////////////////////////// -// -// destructors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_COL::~Mat_COL() -//--------------------------------------------------------- -{ - destroy(); -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::destroy() -//--------------------------------------------------------- -{ - // Base class Vector manages deallocation of data, - // This class manages only its COLUMN pointers. - Vector::destroy(); - - // Note: restore "col_" to 0-offset - if (col_) {col_ ++; ::free(col_); col_=NULL;} - - m_M = m_N = m_MN = 0; - m_fact_mode = FACT_NONE; - - if (m_ipiv) { umIVectorFree(m_ipiv); } -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::Free() -//--------------------------------------------------------- -{ - destroy(); // release registry entry -} - - -/////////////////////////////////////////////////////////// -// -// manage allocation -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::borrow(int M, int N, T* p) -//--------------------------------------------------------- -{ - // "Borrowing" data allows wrapping external - // arrays to exploit matrix algorithms while - // avoiding any overhead of copying data. - - assert(M*N >=0); // must be non-negative - assert(p); // expecting valid data - - // base class calls virtual destroy() to reset - // all members, and handles the storage. - Vector::borrow(M*N, p); - - if (M>0 && N>0) { - // prepare index arrays - set_pointers(M, N); - } - - return (*this); -} - - -// lend_col sets up col to borrow column N of *this -//--------------------------------------------------------- -template inline -void Mat_COL::lend_col(int N, Vector &col) -//--------------------------------------------------------- -{ - CheckIdx_Col_1(N); - col.borrow(m_M, this->pCol(N)); -} - - -// The internal contiguous (0-offset) array v_[M*N] is -// allocated in base class Vector. Here we create an -// internal array of column pointers to enable 1-based, -// column-major indexing into an (M,N) matrix. -//--------------------------------------------------------- -template inline -void Mat_COL::set_pointers(int M, int N) -//--------------------------------------------------------- -{ - m_fact_mode = FACT_NONE; - - assert( this->v_ ); // data allocated in Vector::initialize() - assert( M >= 1); - assert( N >= 1); - - // clear the old set of column pointers - // Note: restore "col_" to 0-offset - if (col_) {col_ ++; ::free(col_); col_=NULL;} - - // allocate a New set of col pointers - col_ = (T **) calloc((size_t)N, sizeof(T*) ); - assert(col_); - - m_M = M; // num rows - m_N = N; // num cols - m_MN = M*N; // total elements - - // adjust pointers for 1-based indexing - T* p = this->v_ - 1; - for (int i=0; i inline -bool Mat_COL::resize(int M, int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // Resize existing object, optionally setting - // the entire array to some given inital value. - // Return value indicates whether size has changed. - - assert(!this->m_borrowed); // "borrowed" allocations must not be changed - assert(M >= 0); // must be non-negative - assert(N >= 0); - - bool bResized=false; - - if ((M != m_M) || (N != m_N)) - { - m_fact_mode = FACT_NONE; - - bResized=true; - this->destroy(); // clear allocation, zero all members - if ((M>0) && (N>0)) - { - initialize(M*N, bInit, x); - set_pointers(M, N); - } - } - else if (bInit && this->m_Len>0) - { - m_fact_mode = FACT_NONE; // destroys any factorization - fill(x); // no resize, just fill existing array - } - - m_M = M; // num rows - m_N = N; // num cols - m_MN = M*N; // total elements - - return bResized; -} - - -//--------------------------------------------------------- -template inline -bool Mat_COL::resize(const Mat_COL& B, bool bInit, T x) -//--------------------------------------------------------- -{ - // Resize existing object to match size of matrix B. - // Optionally set entire array to given inital value. - // Return value indicates whether size has changed. - - int Nrow=B.num_rows(), Ncol=B.num_cols(); - bool bResized = this->resize(Nrow, Ncol, bInit, x); - return bResized; -} - - -//--------------------------------------------------------- -template inline -bool Mat_COL::realloc(int newM, int newN, bool bInit, T x) -//--------------------------------------------------------- -{ - // Re-allocate the matrix, if necessary, to match - // new dimensions. Appropriate range of existing - // data is copied (columnwise) into new structure. - - if (newM==m_M && newN==m_N) { - // no change - return false; - } - - //------------------------------------- - // Note: retain existing column data - //------------------------------------- - bool reset_mode=false; - if (OBJ_temp == this->get_mode()) { - this->set_mode(OBJ_real); // avoid premature deletion - reset_mode=true; - } - - Mat_COL old(*this); // store existing data - resize(newM, newN, bInit,x); // resize allocation - - int Nr = std::min(newM, old.num_rows()); - int Nc = std::min(newN, old.num_cols()); - for (int j=1; j<=Nc; ++j) { // reload old col j - (*this).load_col(j, Nr, old.pCol(j)); - } - if (reset_mode) { - this->set_mode(OBJ_temp); // restore mode - } - return true; // shape & size was changed -} - - -//--------------------------------------------------------- -template inline -bool Mat_COL::reshape(int newM, int newN, bool bInit, T x) -//--------------------------------------------------------- -{ - // Re-shapes the matrix, expanding or contracting to - // match new dimensions. Existing data is retained, - // but logically "wrapped" into new shape. - - if (newM==m_M && newN==m_N) { - return false; // no change - } - if (newM*newN != m_M*m_N) { - extend(newM*newN,bInit,x); // expand or contract - } - set_pointers(newM, newN); // adjust logical indexing - return true; // shape has changed -} - - -//--------------------------------------------------------- -template inline -bool Mat_COL::compatible(const Mat_COL& B) const -//--------------------------------------------------------- -{ - // check for matching matrix dimensions - if (B.num_rows() != this->m_M) { return false; } - if (B.num_cols() != this->m_N) { return false; } - return true; -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::append_col(const Vector& V) -//--------------------------------------------------------- -{ - // enable Matlab: Mat = [Mat, col]; - - // To append a column, simply append new data to tail - // of existing array, then adjust logical dimensions. - // Note: handle case of appending 1st col to empty mat - - if (!V.ok()) { - // empty args may still be "temporary" - if (V.get_mode() == OBJ_temp) { delete (&V); } - return; // nothing to do - } - - assert(!this->m_borrowed); // not change "borrowed" structure - - if (!ok()) { - resize(V.length(), 1); // appending "1st" col to empty mat - this->set_col(1, V); // load data into new column - } else { - int old_len = size(); // store current length - int new_len = size()+m_M; // calculate required length - this->extend(new_len); // add space for new column - set_pointers(m_M, m_N+1); // adjust logical indexing - this->set_col(m_N, V); // load data into new column - } -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::append_cols(const Mat_COL& B) -//--------------------------------------------------------- -{ - // enable Matlab: Mat = [MatA, MatB]; - - // To append a matrix as extra columns, simply append - // the new col-major data to the tail of the existing - // col-major array, then adjust logical dimensions. - // Note: handle case of "appending" to empty mat - - if (!B.ok()) { - // empty args may still be "temporary" - if (B.get_mode() == OBJ_temp) { delete (&B); } - return; - } - - assert(!this->m_borrowed); // don't change "borrowed" structure - if (!ok()) { - (*this) = B; // copy as a new matrix - } - else - { - // assume compatible column length - if (this->num_rows()!=B.num_rows()) { - umERROR("Mat_COL::append_cols", - "Expected col.length of %d, found %d.", m_M, B.num_rows()); - } - - int newNc = this->num_cols()+B.num_cols(); - Vector::append(B); // append col-major data to tail - set_pointers(m_M, newNc); // adjust logical indexing - } -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::append_row(const Vector& V) -//--------------------------------------------------------- -{ - // enable Matlab: Mat = [Mat; row]; - - // Appending a row is more expensive than appending - // a column, since each element of the new row must - // be "inserted" into the old data with stride m_M. - // Here we simply allocate a new (M+1,N) matrix, - // copy each old column j into the range (1:M,j), - // then insert the new row into range (M+1,:). - - // [ ][ ][ ] - // [ ][ ][ ] - // [ ][ ][ ] - // [ ][ ][ ] - // --------- - // [+][+][+] <-- new row threaded into old data - - if (!V.ok()) { - // empty args may still be "temporary" - if (V.get_mode() == OBJ_temp) { delete (&V); } - return; // nothing to do - } - - assert(!this->m_borrowed); // don't change "borrowed" structure - - if (!ok()) { - int rlen = V.length(); // matrix is empty, so ... - this->resize(1, rlen); // set initial shape, and ... - this->set_row(1,V); // set first row of new matrix - } - else - { - // allocate an empty matrix - Mat_COL *tmp = new Mat_COL("tmp: adding row", OBJ_temp); - - // resize the new matrix WITHOUT initializing elements - tmp->resize(m_M+1, std::max(m_N,1), false); - - // load existing (column-oriented) data into new matrix - for (int j=1; j<=m_N; ++j) { - tmp->load_col(j, m_M, this->pCol(j)); // load (1:M,j) - } - - tmp->set_row(m_M, V); // insert elements of the new row - (*this) = (*tmp); // swap ownership of expanded matrix - } -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::append_rows(const Mat_COL& B) -//--------------------------------------------------------- -{ - // enable Matlab: Mat = [MatA; MatB]; - - // Appending rows is more expensive than appending - // columns, since elements of each new row must - // be "inserted" into the old data with stride m_M. - // Here we simply allocate a new (M1+M2,N) matrix, - // copy each old column j into the range (1:M1,j), - // then insert the new rows into range (M1+1:M1+M2,:). - - // [ ][ ][ ] - // [ ][ ][ ] - // [ ][ ][ ] - // [ ][ ][ ] - // --------- - // [+][+][+] <-- new rows threaded - // [+][+][+] <-- ... into old data - // [+][+][+] <-- - - if (!B.ok()) { - // empty args may still be "temporary" - if (B.get_mode() == OBJ_temp) { delete (&B); } - return; - } - - assert(!this->m_borrowed); // don't change "borrowed" structure - if (!ok()) { - (*this) = B; // copy as a new matrix - } - else - { - // assume compatible row length - if (this->num_cols()!=B.num_cols()) { - umERROR("Mat_COL::append_rows", - "Expected row length of %d, found %d.", m_N, B.num_cols()); - } - - // allocate an empty matrix - Mat_COL *tmp = new Mat_COL("tmp: adding rows", OBJ_temp); - - // resize the new matrix WITHOUT initializing elements - int M1=this->num_rows(), M2=B.num_rows(); - tmp->resize(M1+M2, m_N, false); - - // load existing (column-oriented) data into new matrix - for (int j=1; j<=m_N; ++j) { - tmp->load_col(j, m_M, this->pCol(j)); // load (1:M1,j) - } - - // append rows of new matrix to copy of old matrix - for (int i=1; i<=M2; ++i) { - tmp->set_row(M1+i, B.get_row(i)); - } - if (B.get_mode()==OBJ_temp) {delete (&B);} // clean up - - // swap ownership of expanded matrix - (*this) = (*tmp); - } -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::append_rows(int Nr, int Nc) -//--------------------------------------------------------- -{ - // Append num_rows empty rows to existing matrix - // Allow user to specify Nc = num cols in case - // the current matrix in empty. - - // Appending rows is more expensive than appending - // columns, since elements of each new row must - // be "inserted" into the old data with stride m_M. - // Here we simply allocate a new (M1+M2,N) matrix, - // copy each old column j into the range (1:M1,j), - // then insert the new rows into range (M1+1:M1+M2,:). - - // [ ][ ][ ] - // [ ][ ][ ] - // [ ][ ][ ] - // [ ][ ][ ] - // --------- - // [+][+][+] <-- new rows threaded - // [+][+][+] <-- ... into old data - // [+][+][+] <-- - - if (Nr<1) { return; } // no rows added - - assert(!this->m_borrowed); // don't change "borrowed" structure - if (!ok()) { - this->resize(Nr, Nc); // allocate new matrix of user size - } - else - { - // allocate an empty matrix - Mat_COL *tmp = new Mat_COL("tmp: adding rows", OBJ_temp); - - // resize the new matrix, initializing data to zero - int M1=this->num_rows(); - tmp->resize(M1+Nr, m_N, true, T(0)); - - // load existing (column-oriented) data into new matrix - for (int j=1; j<=m_N; ++j) { - tmp->load_col(j, m_M, this->pCol(j)); // load (1:M1,j) - } - - // swap ownership of expanded matrix - (*this) = (*tmp); - } -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::merge_rows(IVec map, Mat_COL& B) -//--------------------------------------------------------- -{ - // merge the rows of B into the rows of (*this) - - int Nr = this->num_rows(), Nc = this->num_cols(); - int Nrb = B.num_rows(), id = 0; - assert(B.num_cols() == Nc); // compatible? - int max_row = map.max_val(); // find max. new row index - int new_rows = max_row-Nr; // number of rows to append - if (new_rows>0) { - this->append_rows(new_rows); - } - - // inset rows of B into (possibly expanded) (*this) - for (int i=1; i<=Nrb; ++i) { - id = map(i); - this->set_row(id, B.get_row(i)); - } - if (B.get_mode()==OBJ_temp) {delete (&B);} // clean up -} - - - -/////////////////////////////////////////////////////////// -// -// copy/load -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::copy(const T *vec) -//--------------------------------------------------------- -{ - // assumes sufficient elements, col-major sequence - Vector::copy(vec); - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::copy(const Mat_COL& B) -//--------------------------------------------------------- -{ - this->operator=(B); - return (*this); -} - - -//--------------------------------------------------------- -template -void Mat_COL::load(int M, int N, const T *vdata) -//--------------------------------------------------------- -{ - // load (col-major) data into matrix COLUMNS - resize(M,N, false); - copy(vdata); -} - - -//--------------------------------------------------------- -template -void Mat_COL::load(int M, int N, const Vector& V) -//--------------------------------------------------------- -{ - // load (col-major) data into matrix COLUMNS - - resize(M,N); // initialize to zeros(M,N) - - int len = V.size(); - if (M*N == len) { - // wrap vector data into existing (M,N) structure. - Vector::operator= (V); // deletes V if OBJ_temp - } else { - // load section of data into (M,N) structure. - len = std::min(len, (M*N)); - Vector::copy(len, V.data()); - if (OBJ_temp == V.get_mode()) { delete (&V); } - } - - // refresh pointers in case we switched allocation. - set_pointers(m_M, m_N); -} - - -//--------------------------------------------------------- -template -void Mat_COL::load_col(int j, int Nr, const T* pdata) -//--------------------------------------------------------- -{ - // load values into range (1:Nr,j) - - assert(j >=1 && j <=this->num_cols()); // check col index - assert(Nr>=0 && Nr<=this->num_rows()); // check col length - for (int i=1; i<=Nr; ++i) - this->col_[j][i] = pdata[i-1]; -} - - -//--------------------------------------------------------- -template -void Mat_COL::load_rows(int M, int N, const char *sdata) -//--------------------------------------------------------- -{ - // load ASCII rows into matrix ROWS - resize(M,N); - try { - std::istringstream ins(sdata); - for (int i=1; i<=M; ++i) // for each row... - for (int j=1; j<=N; ++j) // for each col... - ins >> col_[j][i]; // >> (*this)(i,j); - } catch(...) { - umERROR("load(M,N, char *s)", "problem parsing data."); - } -} - - -//--------------------------------------------------------- -template -void Mat_COL::load_cols(int M, int N, const char *sdata) -//--------------------------------------------------------- -{ - // load ASCII rows into matrix COLUMNS - resize(M,N); - try { - std::istringstream ins(sdata); - for (int j=1; j<=N; ++j) // for each col... - for (int i=1; i<=M; ++i) // for each row... - ins >> col_[j][i]; // >> (*this)(i,j); - } catch(...) { - umERROR("load(M,N, char *s)", "problem parsing data."); - } -} - - - - -/////////////////////////////////////////////////////////// -// -// assignment -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const T &val) -//--------------------------------------------------------- -{ - fill(val); - return (*this); -} - - -//--------------------------------------------------------- -// allow assignment of IMat to DMat -template inline -Mat_COL& Mat_COL::assign(const IMat &B) -//--------------------------------------------------------- -{ - int M=B.num_rows(), N=B.num_cols(); - m_fact_mode = FACT_NONE; - if (this->m_name=="mat" || this->m_name.empty()) - this->m_name=B.name(); - - this->resize(M,N); // resize array of T - const int* p = B.data(); // load int data as T - - int Nmod4 = this->m_Len & 3; - int N4 = this->m_Len - Nmod4, i=0; - // unroll - for (i=0; iv_[i ]=T(p[i ]); this->v_[i+1]=T(p[i+1]); - this->v_[i+2]=T(p[i+2]); this->v_[i+3]=T(p[i+3]); - } - // cleanup - for (i=N4; im_Len; ++i) { this->v_[i] = T(p[i]); } - - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const Mat_COL &B) -//--------------------------------------------------------- -{ - if (this->v_ == B.v_) { - // if both matrices are empty, then check for - // NULL to avoid leaking empty OBJ_temp's - if (NULL != this->v_) { - return (*this); - } - } - - int M=B.m_M, N=B.m_N; - m_fact_mode = B.get_factmode(); - if (this->m_name=="mat" || this->m_name.empty()) - this->m_name=B.name(); - - // base class manages the actual allocation - Vector::operator= ((const Vector&) B); - - if (this->m_Len > 0) { - // adjust (column) pointers for (M,N) indexing - set_pointers(M, N); - } - - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const Vector &V) -//--------------------------------------------------------- -{ - // load from Vector: - // - // Note: loading a vector into a matrix - // Allow assignment of a vector of matching - // length into an existing (M,N) matrix - - if (this->v_ == V.data()) - return (*this); - - m_fact_mode = FACT_NONE; - if (this->m_name=="mat" || this->m_name.empty()) - this->m_name=V.name(); - - int len = V.size(); - - if (this->ok() && (m_M*m_N == len)) - { - // load a vector into an existing (M,N) structure. - Vector::operator= (V); - - // refresh pointers in case we switched allocation. - set_pointers(m_M, m_N); - } - else - { - // copy vector into a new (N,1) matrix - Vector::operator= (V); - set_pointers(len, 1); - } - - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// utilities -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator!() const -//--------------------------------------------------------- -{ - // returns a "Boolean" result: all non-zeros in - // this are "toggled" to zero, and vice-versa. - - // initialize result to ZERO, then toggle... - Mat_COL* tmp = new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "!TMP"); - for (int i=0; im_Len; ++i){ - if (this->ZERO == this->v_[i]) { - tmp->v_[i] = this->ONE; - } - } - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::identity(int N) -//--------------------------------------------------------- -{ - // set to (N,N) identity matrix - resize(N,N, true, this->ZERO); - for (int i=1; i<=N; ++i) - col_[i][i] = T(1); // 1-based col-major version - - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::diag(const Vector& d) -//--------------------------------------------------------- -{ - // set to (N,N) diagonal matrix - int N = d.size(); - resize(N,N, true, this->ZERO); - for (int i=1; i<=N; ++i) - col_[i][i] = d(i); - - // if d is temporary, delete it. - if (d.get_mode() == OBJ_temp) { delete (&d); } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::set_diag -( - int i, // index of the [sub/sup] diagonal - const Vector& d, // the data to write along diagonal - bool MLmode // if ("matlab" mode), then fill -) // super-diagonals from tail of d -//--------------------------------------------------------- -{ - // replace ith diagonal with elements from d - // FIXME: calc. max length when rectangular - - int idx = std::abs(i), k=0; - if (idx < min_mn()) // check valid diagonal - { - int Nd = d.size(); // length of argument - int Ndi = min_mn() - idx; // length of ith diagonal - assert(Ndi <= Nd); // check enough elements - - if (i>0) - { - if (MLmode) { - // Matlab "spdiags" mode: fill super-diagonals - // starting from the tail of the arg array, d. - for (k=Nd; k>i; --k) { col_[k][k-i] = d(k); } - } else { - for (k=1;k<=Ndi; ++k) { col_[k+i][k] = d(k); } - } - } - else { - for (k=1; k<=Ndi; ++k) col_[k][k-i] = d(k); - } - } else { - umLOG(1, "diagonal %d out of range [0:(+/-)%d]\n", i, min_mn()-1); - } - - // if d is temporary, delete it. - if (d.get_mode() == OBJ_temp) { delete (&d); } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::set_diags -( - const Mat_COL& B, // each column holds a diagonal - const IVec& ids, // ids for placing each diagonal - int m, int n // dimensions of final matrix -) -//--------------------------------------------------------- -{ - // Build matrix A using the columns of matrix arg B - // as the diagonals of A, indexed by IVec arg d. - // see Matlab "spdiags" - // A = spdiags([dM1,d0,dP1], [-1,0,1], np, np); - - int Ndiags = ids.size(), Nr=B.num_rows(), di=0; DVec vec; - if (B.num_cols()::set_diags", "expected %d columns, found %d", Ndiags, B.num_cols()); - } - - this->resize(m,n); - Mat_COL& D=const_cast&>(B); // enable borrow() - - for (int i=1; i<=Ndiags; ++i) { - di = ids(i); // index for this diagonal - vec.borrow(Nr, D.pCol(i)); // data to load along diagonal - set_diag(di, vec, true); // load diagonal in "spdiags" mode - } // i.e. load super-diags from tail - if (OBJ_temp == B.get_mode()) { delete (&B); } - if (OBJ_temp == ids.get_mode()) { delete (&ids); } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::transpose() -//--------------------------------------------------------- -{ - int rows = this->num_cols(); - int cols = this->num_rows(); - - Mat_COL* tmp = new Mat_COL(rows,cols, this->ZERO, OBJ_temp, "mat"); - - for (int j=1; j<=cols; ++j) - for (int i=1; i<=rows; ++i) - (*tmp)(i,j) = (*this)(j,i); - - // replace this matrix with its transpose - (*this) = (*tmp); - return (*this); -} - - -//--------------------------------------------------------- -template -Mat_COL& Mat_COL::hilbert(int N) -//--------------------------------------------------------- -{ - // load (N,N) Hilbert matrix - this->resize(N,N, false); - for (int j=1; j<=N; ++j) - for (int i=1; i<=N; ++i) - col_[j][i] = (1.0 / double(i+j-1)); - - return (*this); -} - - - -//--------------------------------------------------------- -template inline -bool Mat_COL::operator==(const Mat_COL &B) const -//--------------------------------------------------------- -{ - // Comparison ("fuzzy", uses m_EqTol) - - if (this->v_ == B.v_) return true; // same vector? - if (B.num_rows() != m_M) return false; // diff. shape? - if (B.num_cols() != m_N) return false; // diff. shape? - - // compare data in base arrays - return Vector::operator==((const Vector&)B); -} - - - - -/////////////////////////////////////////////////////////// -// -// member Boolean operations -// -/////////////////////////////////////////////////////////// - - -template inline -Mat_COL& Mat_COL::eq(T val) const -{ - // return a matrix of [0/1] values: - // r(i) = (v(i) == val) ? 1:0 - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(x==val)"); - for (int i=1; i<=this->m_Len; ++i) { if (this->vm1_[i] == val) { tmp->vm1_[i] = this->ONE; } } - return (*tmp); -} - - -template inline -Mat_COL& Mat_COL::eq(Mat_COL& B) const -{ - // return a matrix of [0/1] values: - // r(i,j) = (A(i,j) == B(i,j)) ? 1:0 - - if (! this->compatible(B)) { umERROR("Mat_COL::eq(B)", "matrix dimensions not compatible"); } - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(A==B)"); - const T* pA=this->data(), *pB=B.data(); T* pT=tmp->data(); - for (int i=0; im_Len; ++i) { - if (pA[i] == pB[i]) { pT[i] = T(1); } - } - - if (B.get_mode() == OBJ_temp) { delete (&B); } // delete temps - return (*tmp); -} - - -template inline -Mat_COL& Mat_COL::le(T val) const -{ - // return a matrix of [0/1] values: - // r(i) = (v(i) <= val) ? 1:0 - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(x<=val)"); - for (int i=1; i<=this->m_Len; ++i) { if (this->vm1_[i] <= val) { tmp->vm1_[i] = this->ONE; } } - return (*tmp); -} - - -template inline -Mat_COL& Mat_COL::lt(T val) const -{ - // return a matrix of [0/1] values: - // r(i) = (v(i) < val) ? 1:0 - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(xm_Len; ++i) { if (this->vm1_[i] < val) { tmp->vm1_[i] = this->ONE; } } - return (*tmp); -} - - -template inline -Mat_COL& Mat_COL::lt_abs(T val) const -{ - // return a matrix of [0/1] values: - // r(i) = |v(i)| < val ? 1:0 - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(|x|m_Len; ++i) { if (std::abs(this->vm1_[i]) < fval) { tmp->vm1_[i] = this->ONE; } } - return (*tmp); -} - - -template inline -Mat_COL& Mat_COL::ge(T val) const -{ - // return a matrix of [0/1] values: - // r(i) = (v(i) >= val) ? 1:0 - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(x>=val)"); - for (int i=1; i<=this->m_Len; ++i) { if (this->vm1_[i] >= val) { tmp->vm1_[i] = this->ONE; } } - return (*tmp); -} - - -template inline -Mat_COL& Mat_COL::gt(T val) const -{ - // return a matrix of [0/1] values: - // r(i) = (v(i) > val) ? 1:0 - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(x>val)"); - for (int i=1; i<=this->m_Len; ++i) { if (this->vm1_[i] > val) { tmp->vm1_[i] = this->ONE; } } - return (*tmp); -} - - -template inline -Mat_COL& Mat_COL::gt_abs(T val) const -{ - // return a matrix of [0/1] values: - // r(i) = |v(i)| > val ? 1:0 - - // initialize with zeros. - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->ZERO, OBJ_temp, "(|x|>tol)"); - T fval = std::abs(val); - for (int i=1; i<=this->m_Len; ++i) { if (std::abs(this->vm1_[i]) > fval) { tmp->vm1_[i] = this->ONE; } } - return (*tmp); -} - - - -//--------------------------------------------------------- -// get MAX row/col values without copying data -//--------------------------------------------------------- -template inline -T Mat_COL::max_row_val(const int i) const { - CheckIdx_Row_1(i); if (m_N<1) return this->ZERO; - T res = col_[1][i]; - for (int j=2; j<=m_N; ++j) res = std::max(res, col_[j][i]); - return res; -} - -template inline -T Mat_COL::max_row_val_abs(const int i) const { - CheckIdx_Row_1(i); if (m_N<1) return this->ZERO; - T res = std::abs(col_[1][i]); - for (int j=2; j<=m_N; ++j) res = std::max(res, std::abs(col_[j][i])); - return res; -} - -template inline -T Mat_COL::max_col_val(const int j) const { - CheckIdx_Col_1(j); if (m_M<1) return this->ZERO; - T res = col_[j][1]; - for (int i=2; i<=m_M; ++i) res = std::max(res, col_[j][i]); - return res; -} - -template inline -T Mat_COL::max_col_val_abs(const int j) const { - CheckIdx_Col_1(j); if (m_M<1) return this->ZERO; - T res = std::abs(col_[j][1]); - for (int i=2; i<=m_M; ++i) res = std::max(res, std::abs(col_[j][i])); - return res; -} - -//--------------------------------------------------------- -// get MIN row/col values without copying data -//--------------------------------------------------------- -template inline -T Mat_COL::min_row_val(const int i) const { - CheckIdx_Row_1(i); if (m_N<1) return this->ZERO; - T res = col_[1][i]; - for (int j=2; j<=m_N; ++j) res = std::min(res, col_[j][i]); - return res; -} - -template inline -T Mat_COL::min_row_val_abs(const int i) const { - CheckIdx_Row_1(i); if (m_N<1) return this->ZERO; - T res = std::abs(col_[1][i]); - for (int j=2; j<=m_N; ++j) res = std::min(res, std::abs(col_[j][i])); - return res; -} - -template inline -T Mat_COL::min_col_val(const int j) const { - CheckIdx_Col_1(j); if (m_M<1) return this->ZERO; - T res = col_[j][1]; - for (int i=2; i<=m_M; ++i) res = std::min(res, col_[j][i]); - return res; -} - -template inline -T Mat_COL::min_col_val_abs(const int j) const { - CheckIdx_Col_1(j); if (m_M<1) return this->ZERO; - T res = std::abs(col_[j][1]); - for (int i=2; i<=m_M; ++i) res = std::min(res, std::abs(col_[j][i])); - return res; -} - - -/////////////////////////////////////////////////////////// -// -// matrix norms -// -/////////////////////////////////////////////////////////// - - -template -double Mat_COL::norm1() const -{ - // matrix 1-norm: max column sum - assert(ok()); - - T maxval = this->ZERO; - for (int j=1; j<=m_N; ++j) { - T sum = this->ZERO; - for (int i=1;i<=m_M;++i) {sum += std::abs(col_[j][i]);} - maxval = std::max(maxval,sum); - } - return (double) maxval; -} - - -template -double Mat_COL::norm_inf() const -{ - // matrix infinity-norm: max row sum - assert(ok()); - - T maxval = this->ZERO; - for (int i=1; i<=m_M; ++i) { - T sum = this->ZERO; - for (int j=1;j<=m_N;++j) {sum += std::abs(col_[j][i]);} - maxval = std::max(maxval,sum); - } - return (double) maxval; -} - - -template -double Mat_COL::norm_frob() const -{ - // matrix frobenius-norm - - assert(ok()); - double ss = (double) this->sumsquares(); - return sqrt(ss); -} - - -/////////////////////////////////////////////////////////// -// -// element by element operations. Most call optimized -// Vector versions, deleting temporary args -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -// The first set update (*this) in place -//--------------------------------------------------------- - -template inline -Mat_COL& Mat_COL::mult_element(const Mat_COL &B) -{ - // A = A .* B - Vector::operator *= ((const Vector&)B); - return (*this); -} - -template inline -Mat_COL& Mat_COL::mult_element(const Vector& b) -{ - // A = A .* b - Vector::operator *= (b); - return (*this); -} - -template inline -Mat_COL& Mat_COL::mult_element(const T* data) -{ - // A = A .* data - Vector::operator *= (data); - return (*this); -} - -template inline -Mat_COL& Mat_COL::div_element (const Mat_COL &B) -{ - // A = A ./ B - Vector::operator /= ((const Vector&)B); - return (*this); -} - -template inline -Mat_COL& Mat_COL::div_element (const Vector& b) -{ - // A = A ./ b - Vector::operator /= (b); - return (*this); -} - - -//--------------------------------------------------------- -// The following variations do not change (*this) -//--------------------------------------------------------- - -template inline -Mat_COL& Mat_COL::dd(const Mat_COL &B) const -{ - // (*this) is not changed: C = A ./ B - - std::string sz; tmp_op_name(this->name(), "./", B.name(), sz); - // NOT USING COPY CONSTRUCTOR: side-effects if (*this)==OBJ_temp - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->data(), OBJ_temp, sz.c_str()); - (*tmp).div_element(B); - if (OBJ_temp == this->m_mode) { - delete (this); - } - return (*tmp); -} - -template inline -Mat_COL& Mat_COL::dm(const Mat_COL &B) const -{ - // (*this) is not changed: C = A .* B - - std::string sz; tmp_op_name(this->name(), ".*", B.name(), sz); - // NOT USING COPY CONSTRUCTOR: side-effects if (*this)==OBJ_temp - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->data(), OBJ_temp, sz.c_str()); - (*tmp).mult_element(B); - if (OBJ_temp == this->m_mode) { - delete (this); - } - return (*tmp); -} - -template inline -Mat_COL& Mat_COL::dm(const Vector &V) const -{ - // (*this) is not changed: C = A .* V - - std::string sz; tmp_op_name(this->name(), ".*", V.name(), sz); - // NOT USING COPY CONSTRUCTOR: side-effects if (*this)==OBJ_temp - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->data(), OBJ_temp, sz.c_str()); - (*tmp).mult_element(V); - if (OBJ_temp == this->m_mode) { - delete (this); - } - return (*tmp); -} - -template inline -Mat_COL& Mat_COL::dm(const T* data) const -{ - // (*this) is not changed: C = A .* data - - // assumes input array has sufficient elements - std::string sz; tmp_op_name(this->name(), ".*", "v", sz); - - // NOT USING COPY CONSTRUCTOR: side-effects if (*this)==OBJ_temp - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->data(), OBJ_temp, sz.c_str()); - (*tmp).mult_element(data); - if (OBJ_temp == this->m_mode) { - delete (this); - } - return (*tmp); -} - - - - -///////////////////////////////////////////////////////// -// -// numerical routines: BLAS 3 matrix/matrix ops -// -///////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -// matrix multiplication -//--------------------------------------------------------- - -template <> inline // specialization for = -DMat& DMat::operator*=(const DMat &B) -{ - // calls BLAS DGEMM - - DMat* C = new DMat("op*=TMP", OBJ_temp); - umAxB((*this), B, (*C)); - (*this) = (*C); - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*this); -} - -template <> inline // specialization for =< complex > -ZMat& ZMat::operator*=(const ZMat &B) -{ - // calls BLAS ZGEMM - - ZMat* C = new ZMat("op*=TMP", OBJ_temp); - umAxB((*this), B, (*C)); - (*this) = (*C); - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*this); -} - - -template -Mat_COL& Mat_COL::operator*=(const Mat_COL &B) -{ - // default n^3 algorithm - - Mat_COL* C = new Mat_COL("op*=TMP", OBJ_temp); - - OBJ_mode old_md = this->get_mode(); // (*this) may be OBJ_temp - this->set_mode(OBJ_real); // stop matmult deleting (*this). - matmult((*this), B, (*C)); // default n^3 algorithm - this->set_mode(old_md); // restore original mode - (*this) = (*C); - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*this); -} - - -//--------------------------------------------------------- -// matrix "division": Matlab's A/B, A\B -//--------------------------------------------------------- - -template -Mat_COL& Mat_COL::operator/=(const Mat_COL &A) -{ - //-------------------------------------------------- - // Set (*this) to be a matrix of LU solution vectors - // See Matlab: mrdivide(B,A) == B/A == B*inv(A) - // X = B/A is the solution to the equation XA = B - //-------------------------------------------------- - assert(sizeof(T) == sizeof(double)); - - - // Matlab's A\B and B/A - //------------------------------------------------------- - // B/A -> B*inv(A) -> B/A = ( A' \ B' )' - // ------ ----------- ----------------------------- - // X = tr( tr(A) | tr(B) ); - //------------------------------------------------------- - // (*this) = tr( tr(A) | tr(*this) ); - //------------------------------------------------------- -#if (1) - OBJ_mode old_mode = this->m_mode; - this->m_mode = OBJ_real; // avoid premature deletion - (*this) = trans( trans(A) | trans(*this) ); - this->m_mode = old_mode; -#else - (*this) *= inv(A); -#endif - - return (*this); -} - - -template -Mat_COL& Mat_COL::operator|=(const Mat_COL &B) -{ - //-------------------------------------------------- - // Set (*this) to be a matrix of LU solution vectors - // See Matlab: mldivide(A,B) == A\B == inv(A)*B - // X = A\B is the solution to the equation AX = B - //-------------------------------------------------- - - assert(sizeof(T) == sizeof(double)); - - // Do not use copy ctor here: would delete B if - // OBJ_temp, and we need B below in solve_LU(). - Mat_COL* X = new Mat_COL(B.num_rows(),B.num_cols(),this->ZERO,OBJ_temp,"Xsol.TMP"); - - try { - fact_LU(); - solve_LU(B, (*X)); // B deleted here if OBJ_temp - (*this)=(*X); // transfer ownership of data - } catch (...) { - umWARNING("Mat_COL::operator |= (B)", "caught exception."); - // TODO: clean up - } - - return (*this); -} - - -//--------------------------------------------------------- -template -Mat_COL& Mat_COL::invert() -//--------------------------------------------------------- -{ - assert(sizeof(T) == sizeof(double)); - assert(this->is_square()); - - if (1 == m_MN) { - if (fabs(this->v_[0]) <= DBL_MIN) {umERROR("Mat_COL::invert()", "matrix has 1 (zero) element.");} - this->v_[0] = 1.0 / this->v_[0]; return (*this); - } - - int info=0, N = m_N; IVec ipiv(N, 0, OBJ_temp); - Mat_COL tmp(N,N, this->data(), OBJ_temp); - - // factorize a copy of this matrix - GETRF (N,N, tmp.data(), N, ipiv.data(), info); - if (info) {umERROR("Mat_COL::invert()", "dgetrf reports: info = %d", info);} - - char op = 'N'; // Mat_COL is COL major: [N]o transpose - this->identity(N); // make identity, then overwrite with inverse - - // use LU factors to overwrite this with inverse - GETRS (op, N, N, tmp.data(), N, ipiv.data(), this->data(), N, info); - if (info) {umERROR("Mat_COL::invert()", "dgetrs reports: info = %d", info);} - return (*this); -} - - -//--------------------------------------------------------- -template inline -void Mat_COL::zero_below_diag() -//--------------------------------------------------------- -{ - // set all values below diagonal to zero. - // Called by chol() to make factor match Matlab's - for (int j=1; jcol_[j][i] = (T)0; - } - } -} - - -//--------------------------------------------------------- -// Cholesky factor/solve -//--------------------------------------------------------- - -template inline -Mat_COL& Mat_COL::fact_Chol() -{ - assert(sizeof(T) == sizeof(double)); - - // check if matrix is already factored - if (FACT_CHOL == this->m_fact_mode) {return (*this);} - - chol(*this, true); // in-place Cholesky factorization - return (*this); // Note: sets fact_mode -} - - -template inline -void Mat_COL::solve_Chol(const Mat_COL& B, Mat_COL& X) -{ - // Solve a set of linear systems using Cholesky-factored - // symmetric positive-definite matrix, A = U^T U. - - assert(sizeof(T) == sizeof(double)); - if (FACT_CHOL != m_fact_mode) { fact_Chol(); } - assert (FACT_CHOL == m_fact_mode); - - chol_solve((*this), B, X); -} - - -template -void Mat_COL::solve_Chol(const Vector& b, Vector& x) -{ - // Solves a linear system using Cholesky-factored - // symmetric positive-definite matrix, A = U^T U. - - assert(sizeof(T) == sizeof(double)); - if (FACT_CHOL != m_fact_mode) { fact_Chol(); } - assert (FACT_CHOL == m_fact_mode); - - x = chol_solve((*this), b); -} - - - -//--------------------------------------------------------- -// LU factor/solve -//--------------------------------------------------------- - -template -Mat_COL& Mat_COL::fact_LU() -{ - assert(sizeof(T) == sizeof(double)); - - // check if matrix is already factored - if (FACT_LUP == this->m_fact_mode) {return (*this);} - - // For later estimation of condition number, store - // a norm matching the mode for cond.est in GECON. - - m_norm_1 = norm1(); -//m_norm_inf = norm_inf(); - - lu(*this, true); // in-place LU factorization - return (*this); // sets fact_mode and pivots -} - - -//--------------------------------------------------------- -template -double Mat_COL::solve_LU -( - const Mat_COL& B, // matrix of RHS's - Mat_COL& X, // matrix of solutions - bool bTrans, // is this transposed? - bool bCond // estimate condition number? -) -//--------------------------------------------------------- -{ - // Given that this matrix has been factored by fact_LU - // solve_LU() solves: A X = B - // If bTrans, solves: A^T X = B - - assert(sizeof(T) == sizeof(double)); - - if (FACT_LUP != m_fact_mode) { fact_LU(); } - assert (FACT_LUP == m_fact_mode); - assert (m_ipiv); - - int rows=m_M, LDA=m_M, NRHS=B.num_cols(), LDB=B.num_rows(), info=0; - int ldwork=4*rows; double rcond=0.0; assert(LDB==rows); - char NT = bTrans ? 'T' : 'N'; - - X = B; // initialize solution with RHS - - GETRS (NT, rows, NRHS, this->data(), LDA, m_ipiv, X.data(), LDB, info); - - if (info) { umERROR("DMat::solve_LU(B,X)", "dgetrs reports: info = %d", info); } - - if (bCond) { - DVec work(ldwork,0.0,OBJ_temp); IVec iwork(rows,0,OBJ_temp); - // get reciprocal condition estimate - // Note: 1-norm was calculated in fact_LU - GECON('1',rows, this->data(), LDA, m_norm_1, rcond, work.data(), iwork.data(), info); - return 1.0/rcond; - } - return -1.0; // condition estimate not requested -} - - -//--------------------------------------------------------- -template -double Mat_COL::solve_LU -( - const Vector& b, // RHS - Vector& x, // solution vector - bool bTrans, // is this transposed? - bool bCond // estimate condition number? -) -//--------------------------------------------------------- -{ - // Given that this matrix has been factored by fact_LU - // solve_LU() solves: A x = b - // If bTrans, solves: A^T x = b - - assert(sizeof(T) == sizeof(double)); - - if (FACT_LUP != m_fact_mode) { fact_LU(); } - assert (FACT_LUP == m_fact_mode); - assert (m_ipiv); - - int rows=m_M, LDA=m_M, NRHS=1, LDB=b.size(), info=0; - int ldwork=4*rows; double rcond=0.0; assert(LDB==rows); - char NT = bTrans ? 'T' : 'N'; - - x = b; // initialize solution with RHS - - GETRS (NT, rows, NRHS, this->data(), LDA, m_ipiv, x.data(), LDB, info); - - if (info) { umERROR("DMat::solve_LU(b,x)", "dgetrs reports: info = %d", info); } - - if (bCond) { - DVec work(ldwork,0.0,OBJ_temp); IVec iwork(rows,0,OBJ_temp); - // get reciprocal condition estimate - // Note: 1-norm was calculated in fact_LU - GECON('1',rows, this->data(), LDA, m_norm_1, rcond, work.data(), iwork.data(), info); - return 1.0/rcond; - } - return -1.0; // condition estimate not requested -} - - - -/////////////////////////////////////////////////////////// -// -// set/get entire rows/cols -// -/////////////////////////////////////////////////////////// - - -template -Vector& Mat_COL::get_row(const int i) const -{ - // NOTE: return value must be assigned or deleted! - - // return row as a vector - CheckIdx_Row_1(i); - int N = this->num_cols(); - Vector* tmp = new Vector(N, T(0), OBJ_temp, "row"); - T* p = tmp->d_m1(); - for (int j=1; j<=N; ++j) - p[j] = this->col_[j][i]; - return (*tmp); -} - - -template -Vector& Mat_COL::get_col(const int j) const -{ - // NOTE: return value must be assigned or deleted! - - // return column as a vector - CheckIdx_Col_1(j); - int M = this->num_rows(); - Vector* tmp = new Vector(M, T(0), OBJ_temp, "col"); - T* p = tmp->d_m1(); - for (int i=1; i<=M; ++i) - p[i] = this->col_[j][i]; - return (*tmp); -} - - -template -void Mat_COL::set_row(const int i, const T &x) -{ - // Fill row i with a value - CheckIdx_Row_1(i); - for (int j=1; j<=m_N; ++j) - this->col_[j][i] = x; -} - - -template -void Mat_COL::set_row(const int i, const Vector &vec) -{ - // Fill row i with a vector - CheckIdx_Row_1(i); - assert(vec.size() >= m_N); // sufficient values? - for (int j=1; j<=m_N; ++j) - this->col_[j][i] = vec(j); - - if (vec.get_mode()==OBJ_temp) {delete (&vec);} -} - - -template -void Mat_COL::set_col(const int j, const T &x) -{ - // Fill col j with a value - CheckIdx_Col_1(j); - for (int i=1; i<=m_M; ++i) - this->col_[j][i] = x; -} - - -template -void Mat_COL::set_col(const int j, const Vector &vec) -{ - // Fill col j with a vector - CheckIdx_Col_1(j); - assert(vec.size() >= m_M); // sufficient values? - for (int i=1; i<=m_M; ++i) - this->col_[j][i] = vec(i); - - if (vec.get_mode()==OBJ_temp) {delete (&vec);} -} - - -template -void Mat_COL::add_col(const int j, const Vector &vec) -{ - // Add a vector to col(j) - CheckIdx_Col_1(j); - assert(vec.size() >= m_M); // sufficient values? - for (int i=1; i<=m_M; ++i) - this->col_[j][i] += vec(i); - - if (vec.get_mode()==OBJ_temp) {delete (&vec);} -} - - -template -void Mat_COL::sub_col(const int j, const Vector &vec) -{ - // Subtract a vector from col(j) - CheckIdx_Col_1(j); - assert(vec.size() >= m_M); // sufficient values? - for (int i=1; i<=m_M; ++i) - this->col_[j][i] -= vec(i); - - if (vec.get_mode()==OBJ_temp) {delete (&vec);} -} - - -template -void Mat_COL::extend_col(const int ncol) -{ - // This will extend (or contract) the matrix to - // have ncol columns, keeping exisitng data. - assert(ncol>0); - this->extend(m_M*ncol); - this->set_pointers(m_M, ncol); -} - - -///////////////////////////////////////// -// -// Return vectors of {col/row} sums -// -///////////////////////////////////////// - - -template <> inline // specialization for T=double -DVec& Mat_COL::col_sums() const -{ - // return row vector "tmp", where tmp(j) is - // the sum of all elements in column(j) - DVec* tmp = new DVec(m_N, 0.0, OBJ_temp, "row"); - double one = 1.0; - for (int j=1; j<=m_N; ++j) { - (*tmp)(j) = DOT(m_M, &one, 0, pCol(j), 1); - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template -Vector& Mat_COL::col_sums() const -{ - // return row vector "tmp", where tmp(j) - // is the sum of all elements in column(j) - Vector* tmp = new Vector(m_N, T(0), OBJ_temp, "row"); - T* p = tmp->d_m1(); - for (int j=1; j<=m_N; ++j) { - T sum = this->ZERO; - for (int i=1; i<=m_M; ++i) { - sum += col_[j][i]; - } - p[j] = sum; - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template -Vector& Mat_COL::col_sums_abs() const -{ - // return row vector "tmp", where tmp(j) is the sum - // of absolute values of all elements in column(j) - Vector* tmp = new Vector(m_N, T(0), OBJ_temp, "row"); - T* p = tmp->d_m1(); - for (int j=1; j<=m_N; ++j) { - T sum = this->ZERO; - for (int i=1; i<=m_M; ++i) { - sum += std::abs(col_[j][i]); - } - p[j] = sum; - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template -Vector& Mat_COL::row_sums() const -{ - // return column vector "tmp", where tmp(i) - // is the sum of all elements in row(i) - Vector* tmp = new Vector(m_M, T(0), OBJ_temp, "col"); - T* p = tmp->d_m1(); - for (int i=1; i<=m_M; ++i) { - T sum = this->ZERO; - for (int j=1; j<=m_N; ++j) { - sum += col_[j][i]; - } - p[i] = sum; - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -///////////////////////////////////////// -// -// Return vectors of max {col/row} data -// -///////////////////////////////////////// - - -template -Vector& Mat_COL::max_col_vals_abs() const -{ - // return row vector "tmp", where tmp(j) is the - // max absolute value of elements in column(j) - Vector* tmp = new Vector(m_N, T(0), OBJ_temp, "|max_col_vals|"); - T* p = tmp->d_m1(); - for (int j=1; j<=m_N; ++j) { - p[j]=max_col_val_abs(j); - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - -template -Vector& Mat_COL::max_col_vals() const -{ - // return row vector "tmp", where tmp(j) - // is the maximum element in column(j) - Vector* tmp = new Vector(m_N, T(0), OBJ_temp, "max_col_vals"); - T* p = tmp->d_m1(); - for (int j=1; j<=m_N; ++j) { - p[j] = max_col_val(j); - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template -Vector& Mat_COL::max_row_vals() const -{ - // return column vector "tmp", where tmp(i) - // is the maximum element in row(i) - Vector* tmp = new Vector(m_M, T(0), OBJ_temp, "max_row_vals"); - T* p = tmp->d_m1(); - for (int i=1; i<=m_M; ++i) { - p[i] = max_row_val(i); - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -///////////////////////////////////////// -// -// Return vectors of min {col/row} data -// -///////////////////////////////////////// - -template -Vector& Mat_COL::min_col_vals_abs() const -{ - // return row vector "tmp", where tmp(j) is the - // min absolute value of elements in column(j) - Vector* tmp = new Vector(m_N, T(0), OBJ_temp, "|min_col_vals|"); - T* p = tmp->d_m1(); - for (int j=1; j<=m_N; ++j) { - p[j]=min_col_val_abs(j); - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template -Vector& Mat_COL::min_col_vals() const -{ - // return row vector "tmp", where tmp(j) - // is the minimum element in column(j) - Vector* tmp = new Vector(m_N, T(0), OBJ_temp, "min_col_vals"); - T* p = tmp->d_m1(); - for (int j=1; j<=m_N; ++j) { - p[j] = min_col_val(j); - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template -Vector& Mat_COL::min_row_vals() const -{ - // return column vector "tmp", where tmp(i) - // is the minimum element in row(i) - Vector* tmp = new Vector(m_M, T(0), OBJ_temp, "min_row_vals"); - T* p = tmp->d_m1(); - for (int i=1; i<=m_M; ++i) { - p[i] = min_row_val(i); - } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - - -///////////////////////////////////////// -// -// Utility routines: reverse, sort, scale -// -///////////////////////////////////////// - - -//--------------------------------------------------------- -template -Mat_COL& Mat_COL::reverse_rows() -//--------------------------------------------------------- -{ - // reverse the row order, i.e. reproduce Matlab - // operation: (*this) = (*this)(end:-1:1,:); - - int Nr = num_rows(), Nc = num_cols(); - Mat_COL* tmp = new Mat_COL(Nr,Nc, this->ZERO, OBJ_temp); - for (int i=1; i<=Nr; ++i) { - tmp->set_row(i, this->get_row((Nr-i)+1)); - } - (*this) = (*tmp); // replace this with row-reversed version - return (*this); -} - - -//--------------------------------------------------------- -template -Mat_COL& Mat_COL::sort_cols(const IVec& idx) -//--------------------------------------------------------- -{ - // Permute matrix columns: reorder the columns - // of this matrix according to permution in idx: - - int Nr=num_rows(), Nc=num_cols(); - assert(idx.size() == Nc); - Mat_COL *tmp = new Mat_COL(Nr,Nc,T(0),OBJ_temp); - for (int j=1; j<=Nc; ++j) { - tmp->set_col(j, this->get_col(idx(j))); - } - (*this) = (*tmp); // replace this with permuted version - return (*this); -} - - -//--------------------------------------------------------- -template -Mat_COL& Mat_COL::sort(int dim) -//--------------------------------------------------------- -{ - // sort each column or row according to dim - // 1 : ascending by cols (-1 descending) - // 2 : ascending by rows (-2 descending) - - int Nr=num_rows(), Nc=num_cols(), i,j; - VecSort tmp; IVec idx; - - switch (dim) { - case 1: // sort columns in ascending order (in situ) - for (j=1; j<=Nc; ++j) { - tmp.borrow(Nr, pCol(j)); - tmp.mixedheapsort(); - } - break; - - case 2: // sort rows in ascending order - for (i=1; i<=Nr; ++i) { - tmp = this->get_row(i); - tmp.mixedheapsort(); - this->set_row(i, tmp); - } - break; - - case -1: // sort columns in decending order (in situ) - umERROR("Mat_COL::sort(-1)", "Note yet implemented"); - break; - - case -2: // sort rows in decending order - umERROR("Mat_COL::sort(-2)", "Note yet implemented"); - break; - - default: - umERROR("Mat_COL::sort(%d)", "unexpected dim", dim); - break; - } - - return (*this); -} - - -//--------------------------------------------------------- -template -Mat_COL& sortrows(const Mat_COL& A, int j) -//--------------------------------------------------------- -{ - // reorder the rows of matrix A using the - // permution implied by sorting column j - - int Nr=A.num_rows(), Nc=A.num_cols(); - assert(0 srt = A.get_col(j); - IVec idx; srt.makeIndex(idx); - Mat_COL *tmp = new Mat_COL(Nr,Nc,T(0),OBJ_temp); - for (int i=1; i<=Nr; ++i) { - tmp->set_row(i, A.get_row(idx(i))); - } - return (*tmp); -} - - - -//--------------------------------------------------------- -// Scaling rows and columns: -// -// Since this array is column-major, we want to scale -// both rows and columns by working along the columns. -// -// Multiplication by a diagonal matrix from the right (M=A*D) -// reduces to scaling each column by a single element from -// the diagonal of D; whereas multiplication from the left -// (M=D*A) is a vector (.*) operation. -//--------------------------------------------------------- - -template -void Mat_COL::scale_col(const int j, const double &x) -{ - // scale all elements of column j by a scalar - CheckIdx_Col_1(j); - - // unroll loop (down column j) - int Nmod4 = m_M & 3; - int N4 = m_M - Nmod4, i=0; - T* pJ = col_[j] + 1; // pointer to 0-offset data in col j - for (i=0; i -void Mat_COL::scale_col(const int j, const Vector &vec) -{ - // "dot-mult" elements of col j by elements of vec - CheckIdx_Col_1(j); - assert(vec.size() >= m_M); // sufficient values? - - // unroll loop (down column j) - int Nmod4 = m_M & 3; - int N4 = m_M - Nmod4, i=0; - - const T* pV = vec.data(); // pointer to 0-offset data in vec - T* pJ = col_[j] + 1; // pointer to 0-offset data in col j - - for (i=0; i -void Mat_COL::setKronBlock(int row, int col, const Mat_COL& B) -{ - int M = B.num_rows(); - int N = B.num_cols(); - assert((row+M-1) <= this->num_rows()); - assert((col+N-1) <= this->num_cols()); - int rdx=0, cdx=0; - - for (int i=1; i<=M; ++i) { - rdx = row+i-1; - for (int j=1; j<=N; ++j) { - cdx = col+j-1; - (*this)(rdx,cdx) = B(i,j); - } - } -} - - -template -Mat_COL& Mat_COL::kron(const Mat_COL& B) const -{ - int M=this->num_rows(), N=this->num_cols(); - int brows=B.num_rows(), bcols=B.num_cols(); - int totM=M*brows, totN=N*bcols; - int i,j,rowI,colJ; double scal=0.0; - - Mat_COL* tmp = new Mat_COL(totM, totN, this->ZERO, OBJ_temp, "kron.TMP"); - - for (i=1; i<=M; ++i) { - for (j=1; j<=N; ++j) { - rowI = ((i-1) * brows) + 1; - colJ = ((j-1) * bcols) + 1; - scal = (*this)(i,j); - tmp->setKronBlock(rowI, colJ, B*scal); - } - } - - return (*tmp); -} - - - - -/////////////////////////////////////////////////////////// -// -// I/O: matrix input/output -// -/////////////////////////////////////////////////////////// - - -// Write a format that can be read by Mat_COL -template -std::ostream& operator<<(std::ostream &s, const Mat_COL &A) -{ - int M = A.num_rows(), N = A.num_cols(); - s << M << " " << N << "\n"; - - // I/O iosflags - // s << std::setiosflags(std::ios::scientific); - // s << std::setiosflags(std::ios::fixed); - // s << std::setprecision(3); - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) { - s << A(i,j) << " "; - if (0==(j%20)) - s << "\n"; - } - s << "\n"; - } - s << std::endl; - return s; -} - - -template -std::istream& operator>>(std::istream &s, Mat_COL &A) -{ - int M=0, N=0; - s >> M >> N; - A.resize(M,N); - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) { - s >> A(i,j); - } - } - return s; -} - - -//--------------------------------------------------------- -template -void Mat_COL::print -( - FILE* os, - const char* msg, - const char* fmt, // [%e|%lf] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - int nline, // entries per line - int nr, // num rows to write (0 --> all) - int nc // num cols to write (0 --> all) -) const -//--------------------------------------------------------- -{ - static char buf[20] = {""}; - - // handle integer data types - if (sizeof(T) == sizeof(double)) - sprintf(buf, "%c%d.%d%s ", '%',wdth, prec,fmt); - else sprintf(buf, "%c%dd ", '%',wdth); - - - int M = this->num_rows(); - int N = this->num_cols(); - - // Select which rows, cols to write - if (nr > 0) M = (nr<=M ? nr : M); // write min(nr,M) rows - if (nc > 0) N = (nc<=N ? nc : N); // write min(nc,N) cols - -#if (1) - if (msg) { fprintf(os, "%s\n", msg); } - fprintf(os, "(%d,%d)\n", M,N); -#endif - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) - { - fprintf(os, buf, (*this)(i,j)); - if (j && (0 == (j%nline))) - fprintf(os, "\n"); - } - fprintf(os, "\n"); - } - fprintf(os, "\n"); - fflush(os); -} - - -//--------------------------------------------------------- -template -void Mat_COL::print_STREAM -( - std::ostream& os, - const char* msg, - char fmt, // [%e|%lf] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - int nline, // entries per line - int nr, // num rows to write (0 --> all) - int nc // num cols to write (0 --> all) -) const -//--------------------------------------------------------- -{ - // save current settings - std::ios_base::fmtflags flgs = os.flags(); - if ('E' == toupper(fmt)) - { os << std::setiosflags(std::ios::scientific); } - else if ('F' == toupper(fmt)) -//{ os << std::setiosflags(std::ios::fixed); } - { os << std::setiosflags(std::ios::fixed|std::ios::showpoint); } - else { } // general format - - os << std::setprecision(prec); - - int M = this->num_rows(); - int N = this->num_cols(); - - // Select which rows, cols to write - if (nr > 0) M = (nr<=M ? nr : M); // write min(nr,M) rows - if (nc > 0) N = (nc<=N ? nc : N); // write min(nc,N) cols - -#if (1) - if (msg) { os << msg << "\n"; } - os << M << " " << N << "\n"; -#endif - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) { - os << std::setw(wdth) << (*this)(i,j) << " "; - if (j && (0 == (j%nline))) - os << "\n"; - } - os << "\n"; - } - os << std::endl; - os.setf(flgs); // restore stream settings -} - - -//--------------------------------------------------------- -template -void Mat_COL::print_GP -( - std::ostream& os, - int prec, // sig. figs [ 4] ios::scientific - int wdth, // output spacing [12] - int nr, // num rows to write (0 --> all) - int nc // num cols to write (0 --> all) -) const -//--------------------------------------------------------- -{ - // save settings - std::ios_base::fmtflags flgs = os.flags(); - - os << std::setiosflags(std::ios::scientific); -//os << std::setiosflags(std::ios::fixed); - os << std::setprecision(prec); - - int M = this->num_rows(); - int N = this->num_cols(); - - if (nr > 0) M = (nr<=M ? nr : M); // write min(nr,M) rows - if (nc > 0) N = (nc<=N ? nc : N); // write min(nc,N) cols - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) { - os << std::setw(wdth) << (*this)(i,j) << " "; - } - os << "\n"; - } - os << std::endl; - // restore settings - os.setf(flgs); -} - - - -// I/O: Matlab (binary) .mat format -//####################################### -// Define Matlab constants -//####################################### -#define COL_ORDER 0 // col-major data -#define ROW_ORDER 1 // row-major data -#define DOUBLE_PREC 0 // double precision -#define SINGLE_PREC 1 // single precision - -#define MACH_ID 0 // 80x87 format (small-endian?) -//#define MACH_ID 1 // 6888x format (big-endian?) -#define ORDER COL_ORDER -#define PRECISION DOUBLE_PREC -//####################################### - -//--------------------------------------------------------- -template -void Mat_COL::m_save(FILE* fp, const char* name) const -//--------------------------------------------------------- -{ - // Save matrix in Matlab ".mat" format (BINARY) - // Note: For Win32, fp MUST be opened in "wb" mode - - if (!this->ok()) { umWARNING("Mat_COL::m_save","Empty matrix"); return; } - - int M = this->num_rows(); - int N = this->num_cols(); - int i=0, j=0; - - umMATLAB mat; - mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; - mat.m = M; - mat.n = N; - mat.imag = 0; // FALSE; - mat.namlen = (name? (long)(strlen(name)+1) : (long)1); - - // write header - fwrite(&mat,sizeof(umMATLAB),1,fp); - // write name - if (! name) - fwrite("",sizeof(char),1,fp); - else - fwrite(name,sizeof(char),(int)(mat.namlen),fp); - - // write actual data - if (false && sizeof(T) == sizeof(double)) { - fwrite(this->v_, sizeof(double),M*N,fp); - } else { - double val=0.0; - for (j=1; j<=N; ++j) { - for (i=1; i<=M; ++i) { - // Write element(i,j) as a double - val = (double)(col_[j][i]); - fwrite(&val, sizeof(double),1,fp); - } - } - } -} - - -//--------------------------------------------------------- -template -void Mat_COL::m_load(FILE *fp, std::string& name) -//--------------------------------------------------------- -{ - // loads a ".mat" file variable (MATLAB format) - // imaginary parts ignored - - umMATLAB mat; - - if (fread(&mat,sizeof(umMATLAB),1,fp) != 1) - umERROR("E_FORMAT","m_load"); - if (mat.type >= 10000) // don't load a sparse matrix - umERROR("E_FORMAT","m_load"); - - int m_flag = (mat.type/1000) % 10; - int o_flag = (mat.type/100) % 10; - int p_flag = (mat.type/10) % 10; - int t_flag = (mat.type) % 10; - if (m_flag != MACH_ID) umERROR("E_FORMAT","m_load"); - if ( t_flag != 0 ) umERROR("E_FORMAT","m_load"); - if ( p_flag != DOUBLE_PREC && - p_flag != SINGLE_PREC ) umERROR("E_FORMAT","m_load"); - - int len = mat.namlen+1; - char* buf = (char*)malloc((unsigned)(len*sizeof(char))); - if (!fread(buf,sizeof(char),(unsigned)mat.namlen,fp)) - umERROR("E_FORMAT","m_load"); - buf[len]='\0'; - name = buf; - - int M=mat.m, N=mat.n; - this->resize(M,N); - - float f_temp=0.0f; - double d_temp=0.0; - int i=0, iR=0, jC=0; - - if (false && (p_flag == DOUBLE_PREC) && - (o_flag == COL_ORDER) && - (sizeof(T) == sizeof(double))) - { - // read data directly into allocation - fread(this->v_, sizeof(double),M*N,fp); - } - else - { - // load one element at a time - for (i=0; icol_[jC][iR] = (T)(d_temp); // cast double to - //(*this)(iR,jC) = (T)(d_temp); // cast double to - } - else if ( o_flag == COL_ORDER ) - { - this->v_[i] = (T)(d_temp); // cast double to - } - else - { - umERROR("E_FORMAT","m_load"); - } - } - } - - // skip imaginary part - if (mat.imag) - { - if (p_flag == DOUBLE_PREC) { - for (i=0; i = double -inline DMat& inv(const DMat& A) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "inv(%s)", A.name()); - - DMat *tmp=new DMat(A, OBJ_temp, buf); - tmp->invert(); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& trans(const Mat_COL &A) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "trans(%s)", A.name()); - - // constructor deletes A (if temporary) - Mat_COL* tmp = new Mat_COL(A, OBJ_temp, buf); - tmp->transpose(); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& abs(const Mat_COL &A) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "abs(%s)", A.name()); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, buf); - tmp->set_abs(); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Vector& abs(const Vector& V) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "abs(%s)", V.name()); - - Vector *tmp=new Vector(V, OBJ_temp, buf); - tmp->set_abs(); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Vector& abs(const MappedRegion1D< Vector >& R) -//--------------------------------------------------------- -{ - static char buf[20]={""}; - snprintf(buf, (size_t)19, "abs(map)"); - - Vector *tmp=new Vector(R, OBJ_temp, buf); - tmp->set_abs(); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& abs(const MappedRegion2D< Mat_COL >& R) -//--------------------------------------------------------- -{ - static char buf[20]={""}; - snprintf(buf, (size_t)19, "abs(map)"); - - Mat_COL *tmp=new Mat_COL(R, OBJ_temp, buf); - tmp->set_abs(); - return (*tmp); -} - - - -//--------------------------------------------------------- -inline DMat& sqrt(const DMat& A) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "sqrt(%s)", A.name()); - - DMat *tmp=new DMat(A, OBJ_temp, buf); - tmp->SQRT(); - return (*tmp); -} - - -//--------------------------------------------------------- -inline DVec& sqrt(const DVec& V) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "sqrt(%s)", V.name()); - - DVec *tmp=new DVec(V, OBJ_temp, buf); - tmp->SQRT(); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& sqr(const Mat_COL& A) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "(%s)^2", A.name()); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, buf); - tmp->SQR(); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Vector& sqr(const Vector& V) -//--------------------------------------------------------- -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "(%s)^2", V.name()); - - Vector *tmp=new Vector(V, OBJ_temp, buf); - tmp->SQR(); - return (*tmp); -} - - -//--------------------------------------------------------- -inline DMat& exp(const DMat& A) -//--------------------------------------------------------- -{ - static char buf[100]={""}; snprintf(buf, (size_t)90, "exp(%s)", A.name()); - DMat *tmp=new DMat(A, OBJ_temp, buf); - tmp->exp_val(); - return (*tmp); -} - - -//--------------------------------------------------------- -inline DVec& exp(const DVec& V) -//--------------------------------------------------------- -{ - static char buf[100]={""}; snprintf(buf, (size_t)90, "exp(%s)", V.name()); - DVec *tmp=new DVec(V, OBJ_temp, buf); - tmp->exp_val(); - return (*tmp); -} - - -//--------------------------------------------------------- -inline DMat& log(const DMat& A) -//--------------------------------------------------------- -{ - static char buf[100]={""}; snprintf(buf, (size_t)90, "log(%s)", A.name()); - DMat *tmp=new DMat(A, OBJ_temp, buf); - tmp->log(); - return (*tmp); -} - - -//--------------------------------------------------------- -inline DVec& log(const DVec& V) -//--------------------------------------------------------- -{ - static char buf[100]={""}; snprintf(buf, (size_t)90, "log(%s)", V.name()); - DVec *tmp=new DVec(V, OBJ_temp, buf); - tmp->log(); - return (*tmp); -} - - -//--------------------------------------------------------- -inline DMat& pow(const DMat& A, double x) -//--------------------------------------------------------- -{ - static char buf[100]={""}; snprintf(buf, (size_t)90, "(%s)^%g", A.name(), x); - DMat *tmp=new DMat(A, OBJ_temp, buf); - tmp->pow_val(x); - return (*tmp); -} - - -//--------------------------------------------------------- -inline DVec& pow(const DVec& V, double x) -//--------------------------------------------------------- -{ - static char buf[100]={""}; snprintf(buf, (size_t)90, "(%s)^%g", V.name(), x); - DVec *tmp=new DVec(V, OBJ_temp, buf); - tmp->pow_val(x); - return (*tmp); -} - - -// max/min DMat -// Note: templated version confuses mapped regions -//--------------------------------------------------------- -inline DMat& max(const DMat& A, const DMat& B) -//--------------------------------------------------------- -{ - int M=A.num_rows(), N=A.num_cols(), len=A.size(); - assert(B.num_rows()==M && B.num_cols()==N); // assume matching dimensions - - // constructor deletes A if OBJ_temp - DMat *tmp=new DMat(A, OBJ_temp, "MAX(A,B)"); - double *a=tmp->data(); const double *b=B.data(); - // operate over vector data - for (int i=0; idata(); const double *b=B.data(); - // operate over vector data - for (int i=0; idata(); const double *b=B.data(); - for (int i=0; idata(); const double *b=B.data(); - for (int i=0; idata(); const int *b=B.data(); - for (int i=0; idata(); const int *b=B.data(); - for (int i=0; idata(); - for (int i=0; idata(); - for (int i=0; iapply(sin); - return (*tmp); -} -inline DVec& sin(const DVec& X) -{ - char buf[100]={""}; snprintf(buf, (size_t)90, "sin(%s)", X.name()); - DVec *tmp=new DVec(X, OBJ_temp, buf); - tmp->apply(sin); - return (*tmp); -} - - -// -// cos -// -inline DMat& cos(const DMat& X) -{ - char buf[100]={""}; snprintf(buf, (size_t)90, "cos(%s)", X.name()); - DMat *tmp=new DMat(X, OBJ_temp, buf); - tmp->apply(cos); - return (*tmp); -} -inline DVec& cos(const DVec& X) -{ - char buf[100]={""}; snprintf(buf, (size_t)90, "cos(%s)", X.name()); - DVec *tmp=new DVec(X, OBJ_temp, buf); - tmp->apply(cos); - return (*tmp); -} - - -inline DVec& asin(const DVec& X) -{ - char buf[100]={""}; snprintf(buf, (size_t)90, "asin(%s)", X.name()); - DVec *tmp=new DVec(X, OBJ_temp, buf); - tmp->apply(asin); - return (*tmp); -} - -inline DVec& acos(const DVec& X) -{ - char buf[100]={""}; snprintf(buf, (size_t)90, "acos(%s)", X.name()); - DVec *tmp=new DVec(X, OBJ_temp, buf); - tmp->apply(acos); - return (*tmp); -} - - -inline DVec& atan2(const DVec& Y, const DVec& X) -{ - char buf[]={"atan2(y,x)"}; - int N=Y.size(); - assert((X.size()==N) && (X.min_val_abs()>0.0)); - - DVec *tmp=new DVec(N, buf, OBJ_temp); - for (int i=1; i<=N; ++i) { - (*tmp)(i) = atan2(Y(i),X(i)); - } - return (*tmp); -} - - - - -//--------------------------------------------------------- -// Addition: -//--------------------------------------------------------- -// matrix + matrix -// matrix + vector -// vector + matrix -// matrix + scalar -// scalar + matrix -// -// region + region (for Regions, see below) -// matrix + region -// region + matrix -// matrix + mapped region -// mapped region + matrix -// -// mapped region2D + scalar (R+x) -// scalar + mapped region2D (x+R) -// -// mapped region2D + vector (R+V) -// vector + mapped region2D (V+R) -//--------------------------------------------------------- - - - -// matrix + matrix -template inline -Mat_COL& operator+(const Mat_COL &A, const Mat_COL &B) -{ -#if (USE_ARRAY_NAMES) - // - // NBN: eventually we may want to avoid using names. - // Use simple stubs during transition? - // - std::string sz; tmp_op_name(A.name(),"+",B.name(), sz); -#else - static std::string sz("mat"); -#endif - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - -// matrix + vector -template inline -Mat_COL& operator+(const Mat_COL &A, const Vector &V) -{ - std::string sz; tmp_op_name(A.name(),"+",V.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) += V; - return (*tmp); -} - -// vector + matrix -template inline -Mat_COL& operator+(const Vector &V, const Mat_COL &A) -{ - std::string sz; tmp_op_name(V.name(),"+",A.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) += V; - return (*tmp); -} - -// matrix + scalar -template inline -Mat_COL& operator+(const Mat_COL &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"+","x", sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - -// scalar + matrix -template inline -Mat_COL& operator+(const T &x, const Mat_COL &A) -{ - std::string sz; tmp_op_name("x","+",A.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - - -//--------------------------------------------------------- -// Subtraction: -//--------------------------------------------------------- -// matrix - matrix -// matrix - vector -// vector - matrix -// matrix - scalar -// scalar - matrix -// -// region - region (for Regions, see below) -// -// matrix - mapped region -// mapped region - matrix -// -// mapped region2D - scalar -// scalar - mapped region2D -// -// mapped region2D - vector -// vector - mapped region2D -//--------------------------------------------------------- - - -// matrix - matrix -template inline -Mat_COL& operator-(const Mat_COL &A, const Mat_COL &B) -{ - std::string sz; tmp_op_name(A.name(),"-",B.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - -// matrix - vector -template inline -Mat_COL& operator-(const Mat_COL &A, const Vector &V) -{ - std::string sz; tmp_op_name(A.name(),"-",V.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) -= V; - return (*tmp); -} - -// vector - matrix -template inline -Vector& operator-(const Vector &V, const Mat_COL &A) -{ - std::string sz; tmp_op_name(V.name(),"-",A.name(), sz); - - Vector *tmp=new Vector(V, OBJ_temp, sz.c_str()); - (*tmp) -= (const Vector&)(A); - return (*tmp); -} - -// matrix - scalar -template inline -Mat_COL& operator-(const Mat_COL &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"-","x", sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) -= x; - return (*tmp); -} - -// scalar - matrix -template inline -Mat_COL& operator-(const T &x, const Mat_COL &A) -{ - // - // create a matrix filled with scalar x; subtract A - // - std::string sz; tmp_op_name("x","-",A.name(), sz); - - Mat_COL *tmp=new Mat_COL(A.num_rows(), A.num_cols(), x, OBJ_temp, sz.c_str()); - (*tmp) -= A; - return (*tmp); -} - - - -//--------------------------------------------------------- -// Division : -//--------------------------------------------------------- -// 1a : matrix | matrix : "left division" A\B via LU factorization -// 1b : matrix | vector : "left division" A\b via LU factorization -// -// 2a : matrix / matrix : "right division" B/A ==> B*inv(A) -// 2b : vector / matrix : "right division" b/A ==> b*inv(A) - -// 3a : matrix / scalar -// 3b : scalar / matrix -// -// 4a: Region2D ./ Region2D (for Regions, see below) -// 4b: Region1D ./ Region1D -// -// 5a: MappedRegion2D ./ MappedRegion2D -// 5b: MappedRegion1D ./ MappedRegion1D -//--------------------------------------------------------- - -// 1a : matrix | matrix -template inline -Mat_COL& operator| (const Mat_COL &A, const Mat_COL &B) -{ - std::string sz; tmp_op_name(A.name(),"|",B.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) |= B; - return (*tmp); -} - - -// 1b : matrix | Vector -template inline -Vector& operator| (const Mat_COL &A, const Vector &b) -{ - std::string sz; tmp_op_name(A.name(),"|",b.name(), sz); - - Vector *x=new Vector(sz.c_str(), OBJ_temp); - umSOLVE(A, b, (*x)); - return (*x); -} - - -// 2a : matrix / matrix -template inline -Mat_COL& operator/ (const Mat_COL &A, const Mat_COL &B) -{ - std::string sz; tmp_op_name(A.name(),"/",B.name(), sz); - - // Matlab's A\B and B/A - //------------------------------------------------------- - // B/A -> B*inv(A) -> B/A = ( A' \ B' )' - // ------ ----------- ----------------------------- - // X = tr( tr(A) | tr(B) ); - //------------------------------------------------------- - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) /= B; - return (*tmp); -} - - -// 2b : vector / matrix : "right division" b/A ==> b*inv(A) - -inline // specialization for = -DVec& operator/ (const DVec &b, const DMat &A) -{ - // Matlab's A\B and B/A - //------------------------------------------------------- - // b/A -> b*inv(A) -> b/A = ( A' \ b )' - // ------ ----------- ----------------------------- - // x = tr( tr(A) | b ); - //------------------------------------------------------- - - std::string sz; tmp_op_name(b.name(),"/",A.name(), sz); - DVec *tmp=new DVec(sz.c_str(), OBJ_temp); - (*tmp) = trans(A)|b; - return (*tmp); -} - - - -// 3a : matrix / scalar -template inline -Mat_COL& operator/ (const Mat_COL &A, const T &x) -{ - assert(fabs(x)>0.0); - - std::string sz; tmp_op_name(A.name(),"/","x", sz); - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) /= x; - return (*tmp); -} - - -// 3b : scalar / matrix -template inline -Mat_COL& operator/ (const T &x, const Mat_COL &A) -{ - // - // create a matrix filled with scalar x; div_element(A) - // - std::string sz; tmp_op_name("x","/",A.name(), sz); - - Mat_COL *tmp=new Mat_COL(A.num_rows(), A.num_cols(), x, OBJ_temp, sz.c_str()); - tmp->div_element(A); - return (*tmp); -} - - -//--------------------------------------------------------- -// Multiplication : -//--------------------------------------------------------- -// 1a : DMat * DMat -// 1b : mat * mat -// -// 2 : matrix * scalar -// 3 : scalar * matrix -// -// 4a: matrix * vector : C = A * v ... if (rows,cols) match, -// 4b: matrix * vector : C = A .* v ... else if size() match. -// -// 5a: vector * matrix : c = v * A ... if (rows,cols) match, -// 5b: vector * matrix : c = v .* A ... else if size() match. -// -// -// 6a: Region2D .* Region2D (for Regions, see below) -// 6b: Region1D .* Region1D -// 6c: matrix * Region1D (i.e. matrix*vector) -// 6d: matrix * MappedRegion1D (i.e. matrix*vector) -// -// 7a: MappedRegion2D .* MappedRegion2D -// 7b: MappedRegion1D .* MappedRegion1D -// -// -//--------------------------------------------------------- - -// 1a : DMat * DMat -inline -DMat& operator*(const DMat& A, const DMat& B) -{ - std::string sz; tmp_op_name(A.name(),"*",B.name(), sz); - DMat* C = new DMat(sz.c_str(), OBJ_temp); - umAxB (A, B, (*C)); // calls BLAS DGEMM - - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*C); -} - - -// 1b : mat * mat -template inline -Mat_COL& operator*(const Mat_COL &A, const Mat_COL &B) -{ - std::string sz; tmp_op_name(A.name(),"*",B.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) *= B; - return (*tmp); -} - - -// 2 : matrix * scalar -template inline -Mat_COL& operator*(const Mat_COL &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"*","x", sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -// 3 : scalar * matrix -template inline -Mat_COL& operator*(const T &x, const Mat_COL &A) -{ - std::string sz; tmp_op_name("x","*",A.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -// 4a: matrix * vector : C = A * v ... if (rows,cols) match, -// 4b: matrix * vector : C = A .* v ... else if size() match. -template inline -Vector& operator* (const Mat_COL &A, const Vector &V) -{ - int M=A.num_rows(), K=A.num_cols(), N=V.size(); - - if (K==N) - { - return matmult(A,V); // usual A * v - } - else if ( M*K == N ) - { - return ((const Vector &)A) * V; // Matlab A .* v - //return (Vector&) (A.dm(V)); // Matlab A .* v - } - else - { - umERROR("matrix * vector", "incompatible dimensions"); - Vector* dum = new Vector(1); - return (*dum); - } -} - - -// 5a: vector * matrix : c = v * A ... if (rows,cols) match, -// 5b: vector * matrix : c = v .* A ... else if size() match. -template inline -Vector& operator* (const Vector &V, const Mat_COL &A) -{ - int M=A.num_rows(), K=A.num_cols(), N=V.size(); - - if (N==M) - { - return matmult(V,A); // usual v * A - } - else if ( N == M*K ) - { - return (V * ((const Vector &)A)); // Matlab v .* A - //return (Vector&) (A.dm(V)); // Matlab v .* A - } - else - { - umERROR("vector * matrix", "incompatible dimensions"); - Vector* dum = new Vector(1); - return (*dum); - } -} - - -/////////////////////////////////////////////////////////// -// -// outer product of vectors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_COL& outer(const Vector &A, const Vector &B) -//--------------------------------------------------------- -{ - std::string sz = umOFORM("outer(%s,%s)", A.name(), B.name()); - - // Each column of result is a scalar multiple of the - // vector A. If A is OBJ_temp, we need to delay its - // deletion until after all columns have been set. - // Do this by temporarily adjusting its mode: - - Vector& Aref = const_cast< Vector& >(A); - bool reset_temp_A=false; - if (OBJ_temp == A.get_mode()) { - reset_temp_A = true; // set flag - Aref.set_mode(OBJ_real); // avoid early deletion - } - - - int M = A.size(), N = B.size(); - Mat_COL *tmp=new Mat_COL(M,N, sz.c_str(), OBJ_temp); - T x=0; - for (int j=1; j<=N; ++j) { - x=B(j); - if (x != T(0)) - { - if (T(1) == x) { - (*tmp).set_col(j, A ); // case of outer(V, ones(K)) - } else { - (*tmp).set_col(j, A*x); // general case - } - } - } - - if (reset_temp_A) { - Aref.set_mode(OBJ_temp); // A was temporary, - delete (&A); // so delete it here. - } - - if (B.get_mode() == OBJ_temp) {delete (&B);} - return (*tmp); -} - - -// negation (unary operator) -template inline -Mat_COL& operator- (const Mat_COL &A) -{ - std::string sz; tmp_op_name(" ","-",A.name(), sz); - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) *= T(-1); - return (*tmp); -} - - - -/////////////////////////////////////////////////////////// -// -// Matlab "element-wise" operations: C = A .* B -// C = A ./ B -// -/////////////////////////////////////////////////////////// - -template inline -void mult_element(const Mat_COL &A, const Mat_COL &B, Mat_COL &C) -{ - C = A; - C.mult_element(B); -} - - -template inline -void div_element(const Mat_COL &A, const Mat_COL &B, Mat_COL &C) -{ - C = A; - C.div_element(B); -} - - - -/////////////////////////////////////////////////////////// -// -// Matlab "find" operations -// -/////////////////////////////////////////////////////////// - - -template inline -IMat& find2D(const Mat_COL &A, char op, T val) -{ - // Return both row and column info. - // See also Vector::find(...) - - std::string sz; - if (sizeof(T) == sizeof(double)) { - sz=umOFORM("find(%s %c %g)", A.name(), op, val); - } else { - sz=umOFORM("find(%s %c %d)", A.name(), op, val); - } - - int Nr=A.num_rows(), Nc=A.num_cols(); - IMat mask(Nr,Nc); -//IVec rowmask(Nr); - int count=0, i=0, j=0, rh=0; - - switch (op) { - - case '<': // find ids of elements less than val - //----------------------------------------------------- - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (A(i,j) < val) { - mask(i,j) = 1; // elem (i,j) satisfies condition - //++rowmask(i); // row i has another match - ++count; // increment total hits - } - } - } - break; - - case '=': // find ids of elements that equal val - //----------------------------------------------------- - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (A(i,j) == val) { - mask(i,j) = 1; // elem (i,j) satisfies condition - //++rowmask(i); // row i has another match - ++count; // increment total hits - } - } - } - break; - - case '>': // find ids of elements greater than val - //----------------------------------------------------- - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (A(i,j) > val) { - mask(i,j) = 1; // elem (i,j) satisfies condition - //++rowmask(i); // row i has another match - ++count; // increment total hits - } - } - } - break; - - } - - IMat *tmp = new IMat(sz.c_str(), OBJ_temp); - if (count>0) - { - -/* - // extract find() results - tmp->resize(count, 2); - int sk=0; - for (i=1; i<=Nr; ++i) { - if (rowmask(i) > 0) { - // extract hits in ith row - for (j=1; j<=Nc; ++j) { - if (mask(i,j)) { - ++sk; - (*tmp)(sk, 1) = i; - (*tmp)(sk, 2) = j; - } - } - } - } -*/ - //##################################################### - - //------------------------------------------- - // to match Matlab, return results by column - //------------------------------------------- - - // extract find() results - tmp->resize(count, 2); - int sk=0; - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (mask(i,j)) { - ++sk; - (*tmp)(sk, 1) = i; - (*tmp)(sk, 2) = j; - } - } - } - //##################################################### - - assert(count == sk); - } - - if (A.get_mode() == OBJ_temp) { delete (&A); } - return (*tmp); -} - - -template inline -IMat& find2D(const Mat_COL &A, char op, const Mat_COL &B) -{ - // Return both row and column info. - // See also Vector::find(...) - - std::string sz; - sz=umOFORM("find(%s %c %s)", A.name(), op, B.name()); - - int Nr=A.num_rows(), Nc=A.num_cols(); - IMat mask(Nr,Nc); -//IVec rowmask(Nr); - int count=0, i=0, j=0, rh=0; - - switch (op) { - - case '<': // find ids of elements less than val - //----------------------------------------------------- - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (A(i,j) < B(i,j)) { - mask(i,j) = 1; // elem (i,j) satisfies condition - //++rowmask(i); // row i has another match - ++count; // increment total hits - } - } - } - break; - - case '=': // find ids of elements that equal val - //----------------------------------------------------- - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (A(i,j) == B(i,j)) { - mask(i,j) = 1; // elem (i,j) satisfies condition - //++rowmask(i); // row i has another match - ++count; // increment total hits - } - } - } - break; - - case '>': // find ids of elements greater than val - //----------------------------------------------------- - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (A(i,j) > B(i,j)) { - mask(i,j) = 1; // elem (i,j) satisfies condition - //++rowmask(i); // row i has another match - ++count; // increment total hits - } - } - } - break; - - } - - IMat *tmp = new IMat(sz.c_str(), OBJ_temp); - if (count>0) - { - - //------------------------------------------- - // to match Matlab, return results by column - //------------------------------------------- - // extract find() results - tmp->resize(count, 2); - int sk=0; - for (j=1; j<=Nc; ++j) { - for (i=1; i<=Nr; ++i) { - if (mask(i,j)) { - ++sk; - (*tmp)(sk, 1) = i; - (*tmp)(sk, 2) = j; - } - } - } - assert(count == sk); - } - - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -void matmult -( - const Mat_COL &A, - const Mat_COL &B, - Mat_COL &C -) -//--------------------------------------------------------- -{ - assert(A.num_cols() == B.num_rows()); - int M = A.num_rows(); - int N = A.num_cols(); - int K = B.num_cols(); - - T ZERO = T(0), sc = T(0); - T* colk = NULL; - - // Adjust shape of C, and set to zero - C.resize(M,K, true, ZERO); - - // Col major: each column of C is a - // vector sum, updated by saxpy ops - for (int k=1; k<=K; ++k) - { - colk = C[k]; // pointer to start of C(:,k) - - for (int j=1; j<=N; ++j) { - sc = B(j,k); - if (sc != ZERO) { - for (int i=1; i<=M; ++i) { - // C(i,k) += sc * A(i,j); - colk[i] += sc * A(i,j); - } - } - } - } - - // This overload is called by A*=B for (T != double) - // In that case, A is the calling object and so we - // must NOT delete A. (Note: to make sure, we now - // manipulate A's mode so that A.mode = OBJ_real.) - -//if (A.get_mode() == OBJ_temp) delete (&A); - if (B.get_mode() == OBJ_temp) delete (&B); -} - - -// matrix-vector product: BLAS 2 -//--------------------------------------------------------- -inline // specialization for = -DVec& matmult(const DMat &A, const DVec &V) -//--------------------------------------------------------- -{ - // Returns "col" vector: x = A*v - - int rows=A.num_rows(), cols=A.num_cols(); - if (V.size() != cols) { umERROR("Mat*Vec", "wrong dimensions"); } - DVec* X = new DVec(rows, 0.0, OBJ_temp, "A*v"); - double alpha=1.0, beta=0.0; int inc = 1; - - GEMV ('N', rows, cols, alpha, - A.data(), rows, - V.data(), inc, beta, - X->data(), inc); - - // delete temporary objects - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - - return (*X); -} - - -// matrix-vector product: general -//--------------------------------------------------------- -template inline -Vector& matmult(const Mat_COL &A, const Vector &V) -//--------------------------------------------------------- -{ - // Returns "col" vector: x = A*v - - int rows=A.num_rows(), cols=A.num_cols(); T ZERO=T(0); - if (V.size() != cols) { umERROR("Mat*Vec", "wrong dimensions"); } - Vector* X = new Vector(rows, ZERO, OBJ_temp, "A*v"); - - // Col major: X=Sum(v(j)*A(j)). X is - // a vector sum, updated by saxpy ops - double* px = X->d_m1(); - T sc = ZERO; - for (int j=1; j<=cols; ++j) { - sc = V(j); - if (sc != ZERO) { - for (int i=1; i<=rows; ++i) { - //(*X)(i) += sc * A(i,j); - px[i] += sc * A(i,j); - } - } - } - - // delete temporary objects - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - - return (*X); -} - - -// vector-matrix product: BLAS 2 -//--------------------------------------------------------- -inline // specialization for = -DVec& matmult(const DVec &V, const DMat &A) -//--------------------------------------------------------- -{ - // Returns "row" vector: x = v*A = A' * v - - int rows=A.num_rows(), cols=A.num_cols(); - if (V.size() != rows) { umERROR("umVec * umMat", "wrong dimensions"); } - DVec* X = new DVec(cols, 0.0, OBJ_temp, "v*A"); - double alpha=1.0, beta=0.0; int inc = 1; - - GEMV ('T', rows, cols, alpha, - A.data(), rows, - V.data(), inc, beta, - X->data(), inc); - - // delete temporary objects - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - - return (*X); -} - - -// vector-matrix product: general -//--------------------------------------------------------- -template inline -Vector& matmult (const Vector &V, const Mat_COL &A) -//--------------------------------------------------------- -{ - // Returns "row" vector: x = v*A = A' * v - - int rows=A.num_rows(), cols=A.num_cols(); T ZERO = T(0); - if (V.size() != rows) { umERROR("umVec * umMat", "wrong dimensions"); } - Vector* X = new Vector(cols, ZERO, OBJ_temp, "v*A"); - - // Col major: X(i) = dot product - T* px = X->d_m1(); - for (int j=1; j<=cols; ++j) { - const T* Aj = A[j]+1; // shift to 0-based data - px[j] = V.inner(rows, Aj); - } - - // delete temporary objects - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - - return (*X); -} - - -// Returns Kronecker tensor product of A and B. -//--------------------------------------------------------- -template inline -Mat_COL& kron(const Mat_COL& A, const Mat_COL& B) -//--------------------------------------------------------- -{ - return A.kron(B); -} - -//--------------------------------------------------------- -template inline -Mat_COL& reverse_rows(const Mat_COL& A) -//--------------------------------------------------------- -{ - // reverse the row order, i.e. reproduce Matlab - // operation: B = A(end:-1:1,:); - -#if (1) - - Mat_COL* tmp = new Mat_COL(A, OBJ_temp); - tmp->reverse_rows(); - return (*tmp); - -#else - - int Nr = A.num_rows(), Nc = A.num_cols(); - Mat_COL* tmp = new Mat_COL(Nr,Nc, T(0), OBJ_temp); - for (int i=1; i<=Nr; ++i) { - tmp->set_row(i, A.get_row((Nr-i)+1)); - } - // delete temporary objects - if (A.get_mode() == OBJ_temp) { delete (&A); } - return (*tmp); - -#endif - -} - - - -// In-place update of user-provided matrix C = A * B -// Calls to each permutation of transposed GEMM -void umAtransxB(const DMat& A,const DMat& B, DMat& C); // C = A^T* B -void umAxBtrans(const DMat& A,const DMat& B, DMat& C); // C = A * B^T - - -/////////////////////////////////////////////////////////// -// -// LAPACK: add drivers as required -// -/////////////////////////////////////////////////////////// - - -// Routines that use LU factorization -void umSOLVE(const DMat& mat, const DVec& b, DVec& x); -void umSOLVE(const DMat& mat, const DMat& B, DMat& X); - -// Routines that use Cholesky factorization -void umSOLVE_CH(const DMat& mat, const DVec& b, DVec& x); -void umSOLVE_CH(const DMat& mat, const DMat& B, DMat& X); - -// Generalized least squares solution -void umSOLVE_LS(const DMat& mat, const DMat& B, DMat& X); - -// Singular value decomposition -DVec& svd(const DMat& mat, DMat& U, DMat& VT, char ju='A', char jvt='A'); -DVec& svd(const DMat& mat); - -double norm(const DMat& mat); -double cond(const DMat& mat); - -void eig(const DMat& A, DVec& Re); // DGEEV -void eig(const DMat& A, DVec& Re, DMat& VR); // DGEEV -void eig(const DMat& A, DVec& Re, DMat& VL, DMat& VR, bool bL, bool bR); -void eig_sym(const DMat& A, DVec& ev, DMat& Q, bool bDoEVecs=false); // DSYEV - -//--------------------------------------- -// lu factorization/solve -//--------------------------------------- -DMat& lu(DMat& A, bool in_place=false); -bool lu_solve(DMat& LU, const DMat& B, DMat& X); -DVec& lu_solve(DMat& LU, const DVec& b); - -// Region1D -DVec& lu_solve(DMat& ch, Region1D R); - -//--------------------------------------- -// Cholesky factorization/solve -//--------------------------------------- -DMat& chol(DMat& A, bool in_place=false); -bool chol_solve(const DMat& ch, const DMat& B, DMat& X); -DVec& chol_solve(const DMat& ch, const DVec& rhs); - -// Region1D -DVec& chol_solve(const DMat& ch, Region1D R); - - -//--------------------------------------- -// qu factorization/solve -//--------------------------------------- -DMat& qr(DMat& A, bool in_place=false); - - -// remove "numerical noise" from array elements -void umPOLISH(DVec& V, double eps = 1e-10); -void umPOLISH(DMat& A, double eps = 1e-10); - - -/////////////////////////////////////////////////////////// -// -// member functions involving a subset of the matrix -// -/////////////////////////////////////////////////////////// - - -template inline -Vector& Mat_COL::get_map(const IVec& map) const -{ - // Return a vector of elements indexed by map - // Enables the following syntax: - // - // VEC: vec = Q.get_map(um->vmapR) - Q.get_map(um->vmapL); - // - // MAT: Q_pec.set_col(j, fQ.get_map(um->mapPEC, j)); - - return Vector::vmap(map); -} - - -template inline -Vector& Mat_COL::get_map(const IVec& map, int j) const -{ - // Return a vector of values mapped from column j - - static char buf[100]={""}; - snprintf(buf, (size_t)90, "vmap(%s,%d)", this->name(),j); - CheckIdx_Col_1(j); - int idx=0, len=map.size(); - Vector *tmp=new Vector(len, this->ZERO, OBJ_temp, buf); - - // Load elements indexed by map into result - if (len > 0) { - T* p = (*tmp).d_m1(); // 1-offset pointer - for (int k=1; k<=len; ++k) { - idx = map(k); - CheckIdx_Row_1(idx); // check (idx <= num_rows()) - p[k] = col_[j][idx]; // copy mapped element - } - } - - return (*tmp); -} - - -template inline -Vector& Mat_COL::get_map(int i, const IVec& map) const -{ - // Return a vector of values mapped from row i - - static char buf[100]={""}; - snprintf(buf, (size_t)90, "vmap(%d,%s)", i,this->name()); - CheckIdx_Row_1(i); - int idx=0, len=map.size(); - Vector *tmp=new Vector(len, this->ZERO, OBJ_temp, buf); - - // Load elements indexed by map into result - if (len > 0) { - T* p = (*tmp).d_m1(); // 1-offset pointer - for (int k=1; k<=len; ++k) { - idx = map(k); - CheckIdx_Col_1(idx); // check (idx <= num_cols()) - p[k] = col_[idx][i]; // copy mapped element - } - } - - return (*tmp); -} - - - -template inline -Mat_COL& Mat_COL::get_map(const IMat& map) const -{ - // Return selected elements as a new matrix - // Elements are indexed by matrix map arg. - - int Nr=map.num_rows(), Nc=map.num_cols(), idx=0; - Mat_COL *tmp = new Mat_COL(Nr, Nc, this->ZERO, OBJ_temp); - Mat_COL& ref = (*tmp); - if ((Nr<1)||(Nc<1)) {ref.Free(); return ref;} // empty map - - // Load elements indexed by map into result - // Note: Map contains 1-based indices into base vector - for (int j=1; j<=Nc; ++j) { - for (int i=1; i<=Nr; ++i) { - idx = map(i,j); // index into base array - this->Check_index_1(idx); // make sure index is valid - ref(i,j) = this->vm1_[idx]; // copy mapped element to New matrix - } - } - return (*tmp); -} - - -/* -template inline -Mat_COL& Mat_COL::operator()(const IMat& map) const -{ - // Return selected elements as a new matrix - // Elements are indexed by matrix map arg. - return get_map(map); -} -*/ - - -// Set elements indicated by map to given value -template inline -Mat_COL& Mat_COL::set_map(const IMat& map, const T x) -{ - // Use base-class version - Vector::set_map((const IVec&)map, x); - return (*this); -} - - -template inline -Mat_COL& Mat_COL::set_map(const IMat& map, const Vector& X) -{ - // Set elements indicated by map to corresponding - // elements in X. Result is same shape as map. - - // check whether the integer entries in an IMat - // are being "re-mapped", e.g. EToV = gnum(EToV); - bool remap_self = false; - IMat* THIS = dynamic_cast(this); - if (THIS) { - if ((&map) == THIS) { - remap_self = true; - } - } - - if (!remap_self) - { - // make shape of result match shape of the map - this->resize(map.num_rows(),map.num_cols(),false); - // base-class version loads the mapped entries - Vector::set_map((const IVec&)map, X); - } - else - { - // The map is the same object as "this" matrix. - // To re-map the elements in a matrix, we build - // a temporary matrix, then swap with self. - - OBJ_mode old_md = this->get_mode(); // (*this) may be OBJ_temp - this->set_mode(OBJ_real); // avoid premature deletion - - IMat *tmp = new IMat(m_M,m_N,0,OBJ_temp); // alloc buffer - IVec& B = dynamic_cast(*tmp); // -> base class - - B.set_map((const IVec&)map, (IVec&)X); // call base class version - (*THIS) = (*tmp); // switch ownership - this->set_mode(old_md); // restore original mode - } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::concat_v -( - const Mat_COL& A1, - const Mat_COL& A2 -) -//--------------------------------------------------------- -{ - // example of "vertical" concatenation - - int M1=A1.num_rows(), M2=A2.num_rows(); - int Nc=A1.num_cols(); - assert(A2.num_cols() == Nc); // num cols must match - int totM = M1 + M2; - Index1D I1(1, M1), I2(M1+1, totM), J(1,Nc); - this->resize(totM, Nc); - (*this)(I1,J) = A1; - (*this)(I2,J) = A2; - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::concat_v -( - const Mat_COL& A1, - const Mat_COL& A2, - const Mat_COL& A3 -) -//--------------------------------------------------------- -{ - // example of "vertical" concatenation - - int M1=A1.num_rows(), M2=A2.num_rows(), M3=A3.num_rows(); - int Nc=A1.num_cols(); - assert(A2.num_cols() == Nc); // num cols must match - assert(A3.num_cols() == Nc); // num cols must match - int totM = M1 + M2 + M3; - Index1D I1(1, M1), I2(M1+1, M1+M2), I3(M1+M2+1, totM), J(1,Nc); - this->resize(totM, Nc); - (*this)(I1,J) = A1; - (*this)(I2,J) = A2; - (*this)(I3,J) = A3; - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// member functions involving (contiguous) Region[1,2]D -// -/////////////////////////////////////////////////////////// - -// construct from Region2D -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(const Region2D< Mat_COL > &R, OBJ_mode md, const char *sz) -//--------------------------------------------------------- -: Vector(sz, md), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - (*this)=R; // matrix = region -} - -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(const const_Region2D< Mat_COL > &R, OBJ_mode md, const char *sz) -//--------------------------------------------------------- -: Vector(sz, md), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - (*this)=R; // matrix = region -} - - - - -template inline -const_Region2D< Mat_COL > -Mat_COL::operator()(const Index1D &I, const Index1D &J) const -{ - // return a const 2D region of (*this) - return const_Region2D< Mat_COL >(*this, I,J); -} - - -template inline -Region2D< Mat_COL > -Mat_COL::operator()(const Index1D &I, const Index1D &J) -{ - // return a 2D region of (*this) - return Region2D< Mat_COL >(*this, I,J); -} - - -template inline -const_Region1D< Vector > -Mat_COL::operator()(const Index1D& I, int j) const -{ - // return part of column j as a Region1D< V > - // (optimize assignment of a vector to this Region1D) - int i1 = (j-1)*m_M + I.lo(); - int i2 = i1 + I.N() - 1; - return const_Region1D< Vector >( (const Vector&)(*this), i1, i2); -} - -template inline -Region1D< Vector > -Mat_COL::operator()(const Index1D& I, int j) -{ - // return part of column j as a Region1D< V > - // (optimize assignment of a vector to this Region1D) - int i1 = (j-1)*m_M + I.lo(); - int i2 = i1 + I.N() - 1; - return Region1D< Vector >( (Vector&)(*this), i1, i2); -} - - -template inline -const_Region1D< Vector > -Mat_COL::operator()(const Index1D &I) const -{ - // Return range of values as a Region1D< V > - // A(I) = V = F(I); - return const_Region1D< Vector >( (const Vector&)(*this), I); -} - -template inline -Region1D< Vector > -Mat_COL::operator()(const Index1D &I) -{ - // Return range of values as a Region1D< V > - // A(I) = V = F(I); - return Region1D< Vector >( (Vector&)(*this), I); -} - - -template inline -const_Region1D< Vector > -Mat_COL::operator()(const MatDimension&, int j) const -{ - // return entire column j as a Region1D< V > - // (optimize assignment of a vector to this Region1D) - int i1 = (j-1)*m_M + 1; - int i2 = (j )*m_M; - return const_Region1D< Vector >( (const Vector&)(*this), i1, i2); -} - -template inline -Region1D< Vector > -Mat_COL::operator()(const MatDimension&, int j) -{ - // return entire column j as a Region1D< V > - // (optimize assignment of a vector to this Region1D) - int i1 = (j-1)*m_M + 1; - int i2 = (j )*m_M; - return Region1D< Vector >( (Vector&)(*this), i1, i2); -} - - -template inline -const_Region2D< Mat_COL > -Mat_COL::operator()(int i, const MatDimension&) const -{ - // return entire row i as a Region2D< Mat > - // A(i,:) = A(i,All) = V; <== A.set_row(i, V); - // V = A(i,All) = A(i,:); <== V = A.get_row(i); - - Index1D I(i,i); // select row i - Index1D J(1,num_cols()); // select all columns - return const_Region2D< Mat_COL >(*this, I,J); -} - -template inline -Region2D< Mat_COL > -Mat_COL::operator()(int i, const MatDimension&) -{ - // return entire row i as a Region2D< Mat > - // A(i,:) = A(i,All) = V; <== A.set_row(i, V); - // V = A(i,All) = A(i,:); <== V = A.get_row(i); - - Index1D I(i,i); // select row i - Index1D J(1,num_cols()); // select all columns - return Region2D< Mat_COL >(*this, I,J); -} - - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const Region2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - // load from Region2D< Mat > - // TODO: BLAS? - - int M = R.num_rows(), N = R.num_cols(); - resize(M,N); - for (int j=1; j<=N; ++j) { // for each col... - for (int i=1; i<=M; ++i) { // for each row... - this->col_[j][i] = R(i,j); // load R(offi+i,offj+j) - } - } - return (*this); -} -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const const_Region2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - // load from Region2D< Mat > - // TODO: BLAS? - - int M = R.num_rows(), N = R.num_cols(); - resize(M,N); - for (int j=1; j<=N; ++j) { // for each col... - for (int i=1; i<=M; ++i) { // for each row... - this->col_[j][i] = R(i,j); // load R(offi+i,offj+j) - } - } - return (*this); -} - - - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const Region1D< Vector > &R) -//--------------------------------------------------------- -{ - // load from Region1D< Vec > - // - // Note: loading a Region1D into a matrix - // Allow assignment of a vector of matching - // length into an existing (M,N) matrix - - m_fact_mode = FACT_NONE; - if (this->m_name=="mat" || this->m_name.empty()) - this->m_name=R.name(); - - int len = R.size(); - if (this->ok() && (m_M*m_N == len)) { - // load Region1D into existing (M,N) structure. - Vector::operator= (R); - // refresh pointers in case we switched allocation. - set_pointers(m_M, m_N); - } else { - // load region into a new (N,1) matrix - Vector::operator= (R); - set_pointers(len, 1); - } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const const_Region1D< Vector > &R) -//--------------------------------------------------------- -{ - // load from Region1D< Vec > - // - // Note: loading a Region1D into a matrix - // Allow assignment of a vector of matching - // length into an existing (M,N) matrix - - m_fact_mode = FACT_NONE; - if (this->m_name=="mat" || this->m_name.empty()) - this->m_name=R.name(); - - int len = R.size(); - if (this->ok() && (m_M*m_N == len)) { - // load Region1D into existing (M,N) structure. - Vector::operator= (R); - // refresh pointers in case we switched allocation. - set_pointers(m_M, m_N); - } else { - // load region into a new (N,1) matrix - Vector::operator= (R); - set_pointers(len, 1); - } - return (*this); -} - - -// A = A .* R -template inline -Mat_COL& Mat_COL::mult_element(const Region2D< Mat_COL > &R) -{ - assert(m_M == R.num_rows()); // assume both sides conform - assert(m_N == R.num_cols()); - for (int j=1; j<=m_N; ++j) - for (int i=1; i<=m_M; ++i) - (*this)(i,j) *= R(i,j); - - return (*this); -} - - -// A = A ./ R -template inline -Mat_COL& Mat_COL::div_element(const Region2D< Mat_COL > &R) -{ - assert(m_M == R.num_rows()); // assume both sides conform - assert(m_N == R.num_cols()); - for (int j=1; j<=m_N; ++j) - for (int i=1; i<=m_M; ++i) - (*this)(i,j) /= R(i,j); - - return (*this); -} - - -template inline -Mat_COL& Mat_COL::operator+=(const Region2D< Mat_COL > &R) -{ - int M1 = this->num_rows(), N1 = this->num_cols(); - int M2 = R.num_rows(), N2 = R.num_cols(); - - // Allow addition of smaller block to (*this), but - // treat addition of a larger block as an error - // TODO: allow call to expand(M2,N2); - - if ((M2 > M1) || (N2 > N1)) { - umERROR("Mat_COL::operator += (Region2D<> R)", - "Region2D (%d,%d) is larger than (*this) (%d,%d)\n" - "TODO: expand (*this).", M2,N2, M1,N1); - } - for (int j=1; j<=N2; ++j) { - for (int i=1; i<=M2; ++i) { - this->col_[j][i] += R(i,j); // adds R(offi+i,offj+j) - } - } - return (*this); -} - - -template inline -Mat_COL& Mat_COL::operator-=(const Region2D< Mat_COL > &R) -{ - int M1 = this->num_rows(), N1 = this->num_cols(); - int M2 = R.num_rows(), N2 = R.num_cols(); - - // Allow subtraction of smaller block to (*this), but - // treat subtraction of a larger block as an error - // TODO: allow call to expand(M2,N2); - - if ((M2 > M1) || (N2 > N1)) { - umERROR("Mat_COL::operator -= (Region2D<> R)", - "Region2D (%d,%d) is larger than (*this) (%d,%d)\n" - "TODO: expand (*this).", M2,N2, M1,N1); - } - for (int j=1; j<=N2; ++j) { - for (int i=1; i<=M2; ++i) { - this->col_[j][i] -= R(i,j); // subtracts R(offi+i,offj+j) - } - } - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// global functions involving (contiguous) Region[1,2]D -// -// region + region -// matrix + region -// region + matrix -// -// - region (negation, unary operator) -// region - region -// -// Multiplication : -//--------------------------------------- -// 6a: Region2D .* Region2D => dm(R1,R2) -// 6b: Region1D .* Region1D => dm(R1,R2) -// 6c: matrix * Region1D => A*r -// -// Division : -//--------------------------------------- -// 4a: Region2D ./ Region2D => dd(R1,R2) -// 4b: Region1D ./ Region1D => dd(R1,R2) -// -// -// outer (vector, Region1D) -// outer (Region1D, vector) -// -/////////////////////////////////////////////////////////// - -// region + region -template inline -Mat_COL& operator+(const Region2D< Mat_COL > &RA, - const Region2D< Mat_COL > &RB) -{ - std::string sz("rgn(A)+rgn(B)"); - - Mat_COL *tmp=new Mat_COL(RA, OBJ_temp, sz.c_str()); - (*tmp) += RB; - return (*tmp); -} - - -// matrix + region -template inline -Mat_COL& operator+(const Mat_COL &M, - const Region2D< Mat_COL > &R) -{ - std::string sz; tmp_op_name(M.name(),"+","rgn()", sz); - - Mat_COL *tmp=new Mat_COL(M, OBJ_temp, sz.c_str()); - (*tmp) += R; - return (*tmp); -} - - -// region + matrix -template inline -Mat_COL& operator+(const Region2D< Mat_COL > &R, - const Mat_COL &M) -{ - std::string sz; tmp_op_name("rgn()","+",M.name(), sz); - - Mat_COL *tmp=new Mat_COL(M, OBJ_temp, sz.c_str()); - (*tmp) += R; - return (*tmp); -} - - -// - region (negation, unary operator) -template inline -Mat_COL& operator-(const Region2D< Mat_COL > &R) -{ - std::string sz; tmp_op_name(" ","-","rgn(A)", sz); - - Mat_COL *tmp=new Mat_COL(R, OBJ_temp, sz.c_str()); - (*tmp) *= T(-1); - return (*tmp); -} - - -// region - region -template inline -Mat_COL& operator-(const Region2D< Mat_COL > &RA, - const Region2D< Mat_COL > &RB) -{ - std::string sz("rgn(A)-rgn(B)"); - - Mat_COL *tmp=new Mat_COL(RA, OBJ_temp, sz.c_str()); - (*tmp) -= RB; - return (*tmp); -} - - - -//--------------------------------------------------------- -// Multiplication : -//--------------------------------------------------------- -// 6a: Region2D .* Region2D -// 6b: Region1D .* Region1D -//--------------------------------------------------------- - - -// 6a. Region2D .* Region2D -template inline -Mat_COL& dm(const Region2D< Mat_COL > &A, - const Region2D< Mat_COL > &B) -{ - std::string sz; tmp_op_name("reg2D(A)",".*","reg2D(B)", sz); - - Mat_COL *tmpA=new Mat_COL(A, OBJ_temp, sz.c_str()); - tmpA->mult_element(B); - return (*tmpA); -} - - -// 6b. Region1D .* Region1D -template inline -Vector& dm(const Region1D< Vector > &A, - const Region1D< Vector > &B) -{ - std::string sz; tmp_op_name("reg1D(A)",".*","reg1D(B)", sz); - - Vector *tmpA=new Vector(A, OBJ_temp, sz.c_str()); - tmpA->mult_element(B); - return (*tmpA); -} - - -// 6c: matrix * Region1D -template inline -Vector& operator*(const Mat_COL &A, const Region1D< Vector > &R) -{ - int M=A.num_rows(), K=A.num_cols(), N=R.size(); - assert(K==N); - Vector V(R); - return matmult(A,V); // usual A * v -} - - -// 6d: matrix * MappedRegion1D -template inline -Vector& operator*(const Mat_COL &A, - const MappedRegion1D< Vector > &R) -{ - int M=A.num_rows(), K=A.num_cols(), N=R.size(); - assert(K==N); - Vector V(R); - return matmult(A,V); // usual A * v -} - - - -//--------------------------------------------------------- -// Division : -//--------------------------------------------------------- -// 6a: Region2D ./ Region2D -// 6b: Region1D ./ Region1D -//--------------------------------------------------------- - -// 6a: Region2D ./ Region2D -template inline -Mat_COL& dd(const Region2D< Mat_COL > &A, - const Region2D< Mat_COL > &B) -{ - std::string sz; tmp_op_name("reg2D(A)","./","reg2D(B)", sz); - - Mat_COL *tmpA=new Mat_COL(A, OBJ_temp, sz.c_str()); - tmpA->div_element(B); - return (*tmpA); -} - - -// 6b: Region1D ./ Region1D -template inline -Vector& dd(const Region1D< Vector > &A, - const Region1D< Vector > &B) -{ - std::string sz; tmp_op_name("reg1D(A)","./","reg1D(B)", sz); - - Vector *tmpA=new Vector(A, OBJ_temp, sz.c_str()); - tmpA->div_element(B); - return (*tmpA); -} - - - - -//--------------------------------------------------------- -// outer products of vectors with Region1D -//--------------------------------------------------------- -// -// Each column of result is a scaled copy of LHS, -// e.g.: -// -// [ R(1) R(2) R(3) ... ] -// ----------------------------------- -// A(1) | R1 A(1) R2 A(1) R3 A(1) ... | -// A(2) | R1 A(2) R2 A(2) R3 A(2) ... | -// A(3) | R1 A(3) R2 A(3) R3 A(3) ... | -// A(4) | R1 A(4) R2 A(4) R3 A(4) ... | -//--------------------------------------------------------- - -template inline -//Mat_COL& operator* -Mat_COL& outer -( - const Vector &V, - const Region1D< Vector > &R -) -{ - std::string sz("outer(V,reg(B))"); - - int M = V.size(), N = R.size(); - Mat_COL *tmp=new Mat_COL(M,N, sz.c_str(), OBJ_temp); - Vector vec(V); // avoid issue of temporary V - for (int j=1; j<=N; ++j) { (*tmp).set_col(j, vec*R(j)); } - return (*tmp); -} - - -template inline -Mat_COL& operator* -( - const Region1D< Vector > &R, - const Vector &V -) -{ - std::string sz("outer(reg(B),V)"); - - int M = R.size(), N = V.size(); - Mat_COL *tmp=new Mat_COL(M,N, sz.c_str(), OBJ_temp); - Vector B(R); // convert map to vector - for (int j=1; j<=N; ++j) { (*tmp).set_col(j, B*V(j)); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - return (*tmp); -} - - - -/////////////////////////////////////////////////////////// -// -// member functions involving MappedRegion1D -// -/////////////////////////////////////////////////////////// - - -// construct from MappedRegion2D -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(const MappedRegion2D< Mat_COL > &R, OBJ_mode md, const char *sz) -//--------------------------------------------------------- -: Vector(sz, md), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - (*this)=R; // matrix = mapped region -} - -//--------------------------------------------------------- -template inline -Mat_COL::Mat_COL(const const_MappedRegion2D< Mat_COL > &R, OBJ_mode md, const char *sz) -//--------------------------------------------------------- -: Vector(sz, md), - m_M(0), m_N(0), m_MN(0), col_(0), - m_fact_mode(FACT_NONE), m_ipiv(NULL) -{ - (*this)=R; // matrix = mapped region -} - - - -//--------------------------------------------------------- -// return mapped region of 1 column as a MappedRegion2D< Mat > -//--------------------------------------------------------- - -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Region1D< Vector > &Ri, int j) const -{ - Vector I(Ri); // extract a IVec - IMap im(I.size(), I.data()); // repack as IMap - Index1D JDX(j,j); - return const_MappedRegion2D< Mat_COL >( (*this), im, JDX); -} - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Region1D< Vector > &Ri, int j) -{ - Vector I(Ri); // extract a IVec - IMap im(I.size(), I.data()); // repack as IMap - Index1D JDX(j,j); - return MappedRegion2D< Mat_COL >( (*this), im, JDX); -} - - -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Vector &I, int j) const -{ - Index1D JDX(j,j); - IMap im(I.size(), I.data()); // repack as IMap - return const_MappedRegion2D< Mat_COL >( (*this), im, JDX); -} - - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Vector &I, int j) -{ - Index1D JDX(j,j); - IMap im(I.size(), I.data()); // repack as IMap - return MappedRegion2D< Mat_COL >( (*this), im, JDX); -} - - - -//--------------------------------------------------------- -// return mapped region of 1 row as a MappedRegion2D< Mat > -//--------------------------------------------------------- - -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(int i, const Region1D< Vector > &Rj) const -{ - Vector J(Rj); // extract a IVec - IMap jn(J.size(), J.data()); // repack as IMap - Index1D IDX(i,i); - return const_MappedRegion2D< Mat_COL >( (*this), IDX, jn); -} - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(int i, const Region1D< Vector > &Rj) -{ - Vector J(Rj); // extract a IVec - IMap jn(J.size(), J.data()); // repack as IMap - Index1D IDX(i,i); - return MappedRegion2D< Mat_COL >( (*this), IDX, jn); -} - - -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(int i, const Vector &J) const -{ - Index1D IDX(i,i); - IMap jn(J.size(), J.data()); // repack as IMap - return const_MappedRegion2D< Mat_COL >( (*this), IDX, jn); -} - - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(int i, const Vector &J) -{ - Index1D IDX(i,i); - IMap jn(J.size(), J.data()); // repack as IMap - return MappedRegion2D< Mat_COL >( (*this), IDX, jn); -} - - -//--------------------------------------------------------- -// Return mapped values as a MappedRegion1D< V > -// -// A(mapI) = V = F(mapI); -// -//--------------------------------------------------------- - -template inline -const_MappedRegion1D< Vector > -Mat_COL::operator()(const IVec &I) const -{ - // return a (1D) const mapped region of (*this) - IMap im(I.size(), I.data()); // repack as IMap - return const_MappedRegion1D< Vector >( (const Vector&)(*this), im); -} - - -template inline -MappedRegion1D< Vector > -Mat_COL::operator()(const IVec &I) -{ - // return a (1D) mapped region of (*this) - IMap im(I.size(), I.data()); // repack as IMap - return MappedRegion1D< Vector >( (Vector&)(*this), im); -} - - -//--------------------------------------------------------- -// Map subset of Rows in this matrix -//--------------------------------------------------------- - -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const IVec &I, const MatDimension& MD) const -{ - IMap im(I.size(), I.data()); // repack as IMap - return const_MappedRegion2D< Vector >(*this, im, MD); -} - - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const IVec &I, const MatDimension& MD) -{ - IMap im(I.size(), I.data()); // repack as IMap - if (I.get_mode() == OBJ_temp) { delete (&I); } - return MappedRegion2D< Mat_COL >(*this, im, MD); -} - - -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Index1D &ID, const MatDimension& MD) const -{ - return const_MappedRegion2D< Vector >(*this, ID, MD); -} - - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Index1D &ID, const MatDimension& MD) -{ - return MappedRegion2D< Mat_COL >(*this, ID, MD); -} - - -//--------------------------------------------------------- -// Map subset of Columns in this matrix -//--------------------------------------------------------- - -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const MatDimension& MD, const IVec &J) const -{ - IMap jm(J.size(), J.data()); // repack as IMap - return const_MappedRegion2D< Vector >(*this, MD, jm); -} - - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const MatDimension& MD, const IVec &J) -{ - IMap jm(J.size(), J.data()); // repack as IMap - return MappedRegion2D< Mat_COL >(*this, MD, jm); -} - - -//--------------------------------------------------------- -// Generalized 2D mapping -//--------------------------------------------------------- - -//--------------------------------------- -// (Map, Map) -//--------------------------------------- -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const IVec &I, const IVec &J) const -{ - IMap im(I.size(), I.data()); // repack as IMap - IMap jm(J.size(), J.data()); - return const_MappedRegion2D< Vector >(*this, im, jm); -} - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const IVec &I, const IVec &J) -{ - IMap im(I.size(), I.data()); // repack as IMap - IMap jm(J.size(), J.data()); - return MappedRegion2D< Mat_COL >(*this, im, jm); -} - - -//--------------------------------------- -// (Map, Range) -//--------------------------------------- -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const IVec &I, const Index1D &IDX) const -{ - IMap im(I.size(), I.data()); // repack as IMap - return const_MappedRegion2D< Vector >(*this, im, IDX); -} - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const IVec &I, const Index1D &IDX) -{ - IMap im(I.size(), I.data()); // repack as IMap - return MappedRegion2D< Mat_COL >(*this, im, IDX); -} - - -//--------------------------------------- -// (Range, Map) -//--------------------------------------- -template inline -const_MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Index1D &IDX, const IVec &J) const -{ - IMap jm(J.size(), J.data()); // repack as IMap - return const_MappedRegion2D< Vector >(*this, IDX, jm); -} - -template inline -MappedRegion2D< Mat_COL > -Mat_COL::operator()(const Index1D &IDX, const IVec &J) -{ - IMap jm(J.size(), J.data()); // repack as IMap - return MappedRegion2D< Mat_COL >(*this, IDX, jm); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const const_MappedRegion2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - // load from a MappedRegion2D< Mat > - - int M = R.num_rows(), N = R.num_cols(); - resize(M,N); - for (int j=1; j<=N; ++j) { // for each col... - for (int i=1; i<=M; ++i) { // for each row... - this->col_[j][i] = R(i,j); // load R(map(i),j) - } - } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const MappedRegion2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - // load from a MappedRegion2D< Mat > - - int M = R.num_rows(), N = R.num_cols(); - resize(M,N); - for (int j=1; j<=N; ++j) { // for each col... - for (int i=1; i<=M; ++i) { // for each row... - this->col_[j][i] = R(i,j); // load R(map(i),j) - } - } - return (*this); -} - - -// Note: loading a MappedRegion1D into a 2D matrix. -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const const_MappedRegion1D< Vector > &R) -//--------------------------------------------------------- -{ - // Allow assignment of a vector of matching - // length into an existing (M,N) matrix - - m_fact_mode = FACT_NONE; - if (this->m_name=="mat" || this->m_name.empty()) {this->m_name=R.name();} - int len = R.size(); - if (this->ok() && (m_M*m_N == len)) { - Vector::operator= (R); // load MappedRegion1D into existing (M,N) structure. - set_pointers(m_M, m_N); // refresh pointers in case we switched allocation. - } else { - Vector::operator= (R); // load region into a new (N,1) matrix - set_pointers(len, 1); - } - return (*this); -} - - -// Note: loading a MappedRegion1D into a 2D matrix. -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator=(const MappedRegion1D< Vector > &R) -//--------------------------------------------------------- -{ - // Allow assignment of a vector of matching - // length into an existing (M,N) matrix - - m_fact_mode = FACT_NONE; - if (this->m_name=="mat" || this->m_name.empty()) {this->m_name=R.name();} - int len = R.size(); - if (this->ok() && (m_M*m_N == len)) { - Vector::operator= (R); // load MappedRegion1D into existing (M,N) structure. - set_pointers(m_M, m_N); // refresh pointers in case we switched allocation. - } else { - Vector::operator= (R); // load region into a new (N,1) matrix - set_pointers(len, 1); - } - return (*this); -} - - - -// (*this) is not changed: C = A .* R(map) -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::dm(const MappedRegion2D< Mat_COL > &R) const -//--------------------------------------------------------- -{ - int M2=R.num_rows(), N2=R.num_cols(); - if ((m_M != M2) || (m_N != N2)) { - umERROR("Mat_COL dm (MappedRegion2D)", - "Dimensions of MappedRegion2D (%d,%d) must match (*this) (%d,%d)\n", M2,N2, m_M,m_N); - } - - std::string sz; tmp_op_name(this->name(), ".*", "R(map)", sz); - // NOT USING COPY CONSTRUCTOR: side-effects if (*this)==OBJ_temp - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->data(), OBJ_temp, sz.c_str()); - - for (int j=1; j<=m_N; ++j) { - for (int i=1; i<=m_M; ++i) { - tmp->col_[j][i] *= R(i,j); // multiplies by R( map(i), j ) - } - } - - return (*tmp); -} - - -// (*this) is not changed: C = A ./ R(map) -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::dd(const MappedRegion2D< Mat_COL > &R) const -//--------------------------------------------------------- -{ - int M2=R.num_rows(), N2=R.num_cols(); - if ((m_M != M2) || (m_N != N2)) { - umERROR("Mat_COL dd (MappedRegion2D)", - "Dimensions of MappedRegion2D (%d,%d) must match (*this) (%d,%d)\n", M2,N2, m_M,m_N); - } - - std::string sz; tmp_op_name(this->name(), "./", "R(map)", sz); - // NOT USING COPY CONSTRUCTOR: side-effects if (*this)==OBJ_temp - Mat_COL *tmp=new Mat_COL(m_M, m_N, this->data(), OBJ_temp, sz.c_str()); - - for (int j=1; j<=m_N; ++j) { - for (int i=1; i<=m_M; ++i) { - tmp->col_[j][i] /= R(i,j); // divides by R( map(i), j ) - } - } - - return (*tmp); -} - - -// A = A .* R -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::mult_element(const MappedRegion2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - assert(m_M == R.num_rows()); // assume both sides conform - assert(m_N == R.num_cols()); - for (int j=1; j<=m_N; ++j) - for (int i=1; i<=m_M; ++i) - (*this)(i,j) *= R(i,j); - - return (*this); -} - - -// A = A ./ R -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::div_element(const MappedRegion2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - assert(m_M == R.num_rows()); // assume both sides conform - assert(m_N == R.num_cols()); - for (int j=1; j<=m_N; ++j) - for (int i=1; i<=m_M; ++i) - (*this)(i,j) /= R(i,j); - - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator+=(const MappedRegion2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - int M1 = this->num_rows(), M2 = R.num_rows(); - int N1 = this->num_cols(), N2 = R.num_cols(); - - // Allow addition of smaller block to (*this), but - // treat addition of a larger block as an error - // TODO: allow call to expand(M2,N2); - - if ((M2 > M1) || (N2 > N1)) { - umERROR("Mat_COL::operator += (MappedRegion2D<> R)", - "MappedRegion2D (%d,%d) is larger than (*this) (%d,%d)\n" - "TODO: expand (*this).", M2,N2, M1,N1); - } - for (int j=1; j<=N2; ++j) { - for (int i=1; i<=M2; ++i) { - this->col_[j][i] += R(i,j); // adds R( map(i), j ) - } - } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Mat_COL& Mat_COL::operator-=(const MappedRegion2D< Mat_COL > &R) -//--------------------------------------------------------- -{ - int M1 = this->num_rows(), M2 = R.num_rows(); - int N1 = this->num_cols(), N2 = R.num_cols(); - - // Allow subtraction of smaller block to (*this), but - // treat subtraction of a larger block as an error - // TODO: allow call to expand(M2,N2); - - if ((M2 > M1) || (N2 > N1)) { - umERROR("Mat_COL::operator -= (MappedRegion2D<> R)", - "MappedRegion2D (%d,%d) is larger than (*this) (%d,%d)\n" - "TODO: expand (*this).", M2,N2, M1,N1); - } - for (int j=1; j<=N2; ++j) { - for (int i=1; i<=M2; ++i) { - this->col_[j][i] -= R(i,j); // subtracts R( map(i), j ) - } - } - return (*this); -} - - -/////////////////////////////////////////////////////////// -// -// global functions involving MappedRegion[1,2]D -// -/////////////////////////////////////////////////////////// -// -// Addition: -// -// matrix + mapped region -// mapped region + matrix -// -// mapped region + scalar (R+x) -// scalar + mapped region (x+R) -// -// vector + mapped region -// mapped region + vector -// -// mapped region + mapped region -// -// -// Subtraction: -// -// matrix - mapped region -// mapped region - matrix -// -// mapped region - scalar -// scalar - mapped region -// -// vector - mapped region -// mapped region - vector -// -// mapped region - mapped region -// - mapped region (negation, unary op) -// -/////////////////////////////////////////////////////////// - - - -//--------------------------------------------------------- -// Addition: -//--------------------------------------------------------- - -// matrix + mapped region -template inline -Mat_COL& operator+(const Mat_COL &M, - const MappedRegion2D< Mat_COL > &R) -{ - std::string sz; tmp_op_name(M.name(),"+","map()", sz); - - Mat_COL *tmp=new Mat_COL(M, OBJ_temp, sz.c_str()); - (*tmp) += R; - return (*tmp); -} - - -// mapped region + matrix -template inline -Mat_COL& operator+(const MappedRegion2D< Mat_COL > &R, - const Mat_COL &M) -{ - std::string sz; tmp_op_name("rgn()","+",M.name(), sz); - - Mat_COL *tmp=new Mat_COL(M, OBJ_temp, sz.c_str()); - (*tmp) += R; - return (*tmp); -} - - -// mapped region + scalar -template inline -Mat_COL& operator+(const MappedRegion2D< Mat_COL > &R, T x) -{ - std::string sz; tmp_op_name("map2D()","+","x", sz); - - Mat_COL *tmp=new Mat_COL(R, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - -// scalar + mapped region -template inline -Mat_COL& operator+(T x, const MappedRegion2D< Mat_COL > &R) -{ - // create a matrix filled with scalar x; add R - std::string sz; tmp_op_name("x","+","map2D()", sz); - - Mat_COL *tmp=new Mat_COL(R.num_rows(), R.num_cols(), x, OBJ_temp, sz.c_str()); - (*tmp) += R; - return (*tmp); -} - - -//--------------------------------------------------------- -// *** treat a Mapped 2D region as a Vector *** -//--------------------------------------------------------- -// vector + mapped region2D -template inline -Vector& operator+(const Vector &V, - const MappedRegion2D< Mat_COL > &R) -{ - std::string sz; tmp_op_name(V.name(),"+","map2D()", sz); - - // NBN: expecting Nr||Nc to be 1 - int Nr=R.num_rows(); // num mapped rows - int Nc=R.num_cols(); // num mapped cols - - // use a Matrix to extract elements of the 2D map - Mat_COL tmpM(R); - Vector *tmp=new Vector(V, OBJ_temp, sz.c_str()); - - // cast mapped elements to a Vector, then add - (*tmp) += ((const Vector&) tmpM); - return (*tmp); -} - - -//--------------------------------------------------------- -// *** treat a Mapped 2D region as a Vector *** -//--------------------------------------------------------- -// mapped region2D + vector -template inline -Vector& operator+(const MappedRegion2D< Mat_COL > &R, - const Vector &V) -{ - std::string sz; tmp_op_name("map2D()","+",V.name(), sz); - - // NBN: expecting Nr||Nc to be 1 - int Nr=R.num_rows(); // num mapped rows - int Nc=R.num_cols(); // num mapped cols - - // use a Matrix to extract elements of the 2D map - Mat_COL tmpM(R); - - // Convert mapped elements to a Vector, then add - Vector *tmp=new Vector((const Vector&)tmpM, OBJ_temp, sz.c_str()); - (*tmp) += V; - return (*tmp); -} - - -// MappedRegion2D + MappedRegion2D -template inline -Mat_COL& operator+(const MappedRegion2D< Mat_COL > &A, - const MappedRegion2D< Mat_COL > &B) -{ - std::string sz("A(map) + B(map)"); - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - - - -//--------------------------------------------------------- -// Subtraction: -//--------------------------------------------------------- - - -// matrix - mapped region -template inline -Mat_COL& operator-(const Mat_COL &M, - const MappedRegion2D< Mat_COL > &R) -{ - std::string sz; tmp_op_name(M.name(),"-","map2D()", sz); - - Mat_COL *tmp=new Mat_COL(M, OBJ_temp, sz.c_str()); - (*tmp) -= R; - return (*tmp); -} - -// mapped region - matrix -template inline -Mat_COL& operator-(const MappedRegion2D< Mat_COL > &R, - const Mat_COL &M) -{ - std::string sz; tmp_op_name("map2D()","-",M.name(), sz); - - Mat_COL *tmp=new Mat_COL(M, OBJ_temp, sz.c_str()); - (*tmp) -= R; - return (*tmp); -} - - -// mapped region - scalar -template inline -Mat_COL& operator-(const MappedRegion2D< Mat_COL > &R, T x) -{ - std::string sz; tmp_op_name("map2D()","-","x", sz); - - Mat_COL *tmp=new Mat_COL(R, OBJ_temp, sz.c_str()); - (*tmp) -= x; - return (*tmp); -} - -// scalar - mapped region -template inline -Mat_COL& operator-(T x, const MappedRegion2D< Mat_COL > &R) -{ - // - // create a matrix filled with scalar x; subtract R - // - std::string sz; tmp_op_name("x","-","map2D()", sz); - - Mat_COL *tmp=new Mat_COL(R.num_rows(), R.num_cols(), x, OBJ_temp, sz.c_str()); - - (*tmp) -= R; - return (*tmp); -} - - -//--------------------------------------------------------- -// *** treat a Mapped 2D region as a Vector *** -//--------------------------------------------------------- -// vector - mapped region2D -template inline -Vector& operator-(const Vector &V, - const MappedRegion2D< Mat_COL > &R) -{ - std::string sz; tmp_op_name(V.name(),"-","map2D()", sz); - - // NBN: expecting Nr||Nc to be 1 - int Nr=R.num_rows(); // num mapped rows - int Nc=R.num_cols(); // num mapped cols - - // use a Matrix to extract elements of the 2D map - Mat_COL tmpM(R); - - Vector *tmp=new Vector(V, OBJ_temp, sz.c_str()); - - // cast mapped elements to a Vector, then subtract - (*tmp) -= ((const Vector&) tmpM); - return (*tmp); -} - -//--------------------------------------------------------- -// *** treat a Mapped 2D region as a Vector *** -//--------------------------------------------------------- -// mapped region2D - vector -template inline -Vector& operator-(const MappedRegion2D< Mat_COL > &R, - const Vector &V) -{ - std::string sz; tmp_op_name("map2D()","-",V.name(), sz); - - // NBN: expecting Nr||Nc to be 1 - int Nr=R.num_rows(); // num mapped rows - int Nc=R.num_cols(); // num mapped cols - - // use a Matrix to extract elements of the 2D map - Mat_COL tmpM(R); - - // Convert mapped elements to a Vector, then subtract - Vector *tmp=new Vector((const Vector&)tmpM, OBJ_temp, sz.c_str()); - (*tmp) -= V; - return (*tmp); -} - - -// MappedRegion2D - MappedRegion2D -template inline -Mat_COL& operator-(const MappedRegion2D< Mat_COL > &A, - const MappedRegion2D< Mat_COL > &B) -{ - std::string sz("A(map) - B(map)"); - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - - -// negation (unary operator) of a MappedRegion2D -template inline -Mat_COL& operator-(const MappedRegion2D< Mat_COL > &R) -{ - std::string sz; tmp_op_name(" ","-","A(map)", sz); - - Mat_COL *tmp=new Mat_COL(R, OBJ_temp, sz.c_str()); - (*tmp) *= T(-1); - return (*tmp); -} - - - - -//--------------------------------------------------------- -// Multiplication : -//--------------------------------------------------------- -// 7a: MappedRegion2D .* MappedRegion2D -// 7b: MappedRegion1D .* MappedRegion1D -//--------------------------------------------------------- - - -// 7a: MappedRegion2D .* MappedRegion2D -template inline -Mat_COL& dm(const MappedRegion2D< Mat_COL > &A, - const MappedRegion2D< Mat_COL > &B) -{ - std::string sz; tmp_op_name("map2D(A)",".*","map2D(B)", sz); - - Mat_COL *tmpA=new Mat_COL(A, OBJ_temp, sz.c_str()); - tmpA->mult_element(B); - return (*tmpA); -} - - -// 7b: MappedRegion1D .* MappedRegion1D -template inline -Vector& dm(const MappedRegion1D< Vector > &A, - const MappedRegion1D< Vector > &B) -{ - std::string sz; tmp_op_name("map1D(A)",".*","map1D(B)", sz); - - Vector *tmpA=new Vector(A, OBJ_temp, sz.c_str()); - tmpA->mult_element(B); - return (*tmpA); -} - - -//--------------------------------------------------------- -// Division : -//--------------------------------------------------------- -// 5a: MappedRegion2D ./ MappedRegion2D -// 5b: MappedRegion1D ./ MappedRegion1D -//--------------------------------------------------------- - - -// 7a: MappedRegion2D ./ MappedRegion2D -template inline -Mat_COL& dd(const MappedRegion2D< Mat_COL > &A, - const MappedRegion2D< Mat_COL > &B) -{ - std::string sz; tmp_op_name("map2D(A)","./","map2D(B)", sz); - - Mat_COL *tmpA=new Mat_COL(A, OBJ_temp, sz.c_str()); - tmpA->div_element(B); - return (*tmpA); -} - - -// 7b: MappedRegion1D ./ MappedRegion1D -template inline -Vector& dd(const MappedRegion1D< Vector > &A, - const MappedRegion1D< Vector > &B) -{ - std::string sz; tmp_op_name("map1D(A)","./","map1D(B)", sz); - - Vector *tmpA=new Vector(A, OBJ_temp, sz.c_str()); - tmpA->div_element(B); - return (*tmpA); -} - - -// 7c: MappedRegion1D ./ vector -template inline -Vector& dd(const MappedRegion1D< Vector > &A, - Vector &B) -{ - std::string sz; tmp_op_name("map1D(A)","./","vector", sz); - - Vector *tmpA=new Vector(A, OBJ_temp, sz.c_str()); - (*tmpA) /= B; - return (*tmpA); -} - -// 7d: vector ./ MappedRegion1D -template inline -Vector& dd( Vector &A, - const MappedRegion1D< Vector > &B) -{ - std::string sz; tmp_op_name("vector","./","map1D(B)", sz); - - Vector *tmpA=new Vector(A, OBJ_temp, sz.c_str()); - (*tmpA).div_element(B); - return (*tmpA); -} - - - -//--------------------------------------------------------- -// outer products of vectors with MappedRegion1D -//--------------------------------------------------------- -// -// Each column of result is a scaled copy of LHS, -// e.g.: -// -// [ R(1) R(2) R(3) ... ] -// ----------------------------------- -// A(1) | R1 A(1) R2 A(1) R3 A(1) ... | -// A(2) | R1 A(2) R2 A(2) R3 A(2) ... | -// A(3) | R1 A(3) R2 A(3) R3 A(3) ... | -// A(4) | R1 A(4) R2 A(4) R3 A(4) ... | -//--------------------------------------------------------- - -template inline -Mat_COL& operator* -( - const Vector &V, - const MappedRegion1D< Vector > &R -) -{ - std::string sz("outer(V,R(map))"); - - int M = V.size(), N = R.size(); - Mat_COL *tmp=new Mat_COL(M,N, sz.c_str(), OBJ_temp); - Vector vec(V); // avoid issue of temporary V - for (int j=1; j<=N; ++j) { - (*tmp).set_col(j, R(j) * vec); - } - - return (*tmp); -} - - -template inline -Mat_COL& operator* -( - const MappedRegion1D< Vector > &R, - const Vector &V -) -{ - std::string sz("outer(R(map),V)"); - - int M = R.size(), N = V.size(); - Mat_COL *tmp=new Mat_COL(M,N, sz.c_str(), OBJ_temp); - Vector B(R); // convert map to vector - - for (int j=1; j<=N; ++j) { - (*tmp).set_col(j, B*V(j)); - } - - if (V.get_mode() == OBJ_temp) { delete (&V); } - return (*tmp); -} - - - -//--------------------------------------------------------- -// Miscellaneous operators involving MappedRegion2D : -//--------------------------------------------------------- -// max (mapped region, mapped region) -// -// mapped region += vector -// mapped region -= vector -// ... -// ... -// ... -//--------------------------------------------------------- - - -//--------------------------------------------------------- -template inline -Mat_COL& max -( - const MappedRegion2D< Mat_COL >& A, - const MappedRegion2D< Mat_COL >& B -) -//--------------------------------------------------------- -{ - // assume matching dimensions - int Nr=A.num_rows(), Nc=A.num_cols(), len=A.size(); - assert( B.num_rows()==Nr && B.num_cols()==Nc ); - - // constructor deletes A if OBJ_temp - DMat *tmp=new DMat(A, OBJ_temp, "MAX(A,B)"); - double **p = tmp->col_; - for (int j=1; j<=Nc; ++j) { - for (int i=1; i<=Nr; ++i) { - p[j][i] = std::max(p[j][i], B(i,j)); - } - } - - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*tmp); -} - - -#endif // NDG__Matrix_COL_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Mat_DIAG.h b/cpp/nudg++/trunk/Include/Mat_DIAG.h deleted file mode 100644 index 167ab48..0000000 --- a/cpp/nudg++/trunk/Include/Mat_DIAG.h +++ /dev/null @@ -1,1598 +0,0 @@ -// Mat_DIAG.h -// Matlab-compatible diagonal matrix -// 1-based (i,j) indexing -// 2007/10/08 -//--------------------------------------------------------- -#ifndef NDG__Mat_DIAG_H__INCLUDED -#define NDG__Mat_DIAG_H__INCLUDED - -#include "Vec_Type.h" - -#define ALLOW_NON_DIAG_IDX 1 - - -// typedef versions for common data types -template class Mat_DIAG; - -typedef Mat_DIAG DMat_Diag; -typedef Mat_DIAG ZMat_Diag; -typedef Mat_DIAG IMat_Diag; -typedef Mat_DIAG LMat_Diag; -typedef Mat_DIAG BMat_Diag; - - -//--------------------------------------------------------- -template -class Mat_DIAG : public virtual Vector -//--------------------------------------------------------- -{ - // - // Member data - // -protected: - - int m_M; // num rows - int m_N; // num cols - int m_MN; // num elements = (m*n) - int m_D; // num diagonal elements = min(M,N) - - double m_norm_1, // max col sum - m_norm_inf, // max row sum - m_norm_frob; // sqrt(sum(squares)) - - -public: - - // constructors - explicit Mat_DIAG(const char* sz="diag", OBJ_mode md=OBJ_real); - Mat_DIAG(const Mat_DIAG &B, OBJ_mode md=OBJ_real, const char* sz="diag"); - Mat_DIAG(const Vector &V, OBJ_mode md=OBJ_real, const char* sz="diag"); - explicit Mat_DIAG(int N, const char* sz); - explicit Mat_DIAG(int N, const T x=T(0), OBJ_mode md=OBJ_real, const char* sz="diag"); - explicit Mat_DIAG(int N, const T *data, OBJ_mode md=OBJ_real, const char* sz="diag"); - - - // destructor - virtual ~Mat_DIAG(); - virtual void destroy(); - - void borrow(int M, int N, T* p); - void borrow(int N, T* p) { borrow(N,N, p); } - void borrow(const Vector& CV); - - void set_counters(int M, int N); - - bool resize(int M, int N, bool bInit=true, T x=T(0)); - bool resize(int N, bool bInit=true, T x=T(0)) { return resize(N,N, bInit, x); } - - - //------------------------------------------------------- - void load(int D, const T *vdata) - //------------------------------------------------------- - { - // load data into matrix DIAGONAL - resize(D,D, false); - copy(vdata); - } - - - //------------------------------------------------------- - void load(int M, int N, const T *vdata) - //------------------------------------------------------- - { - // load data into matrix DIAGONAL - resize(M,N, false); - copy(vdata); - } - - - //------------------------------------------------------- - void load(int M, int N, const char *sdata) - //------------------------------------------------------- - { - // load ASCII data into matrix DIAGONAL - resize(M,N); - try { - std::istringstream ins(sdata); - for (int i=0; i> this->v_[i]; // just loading diagonal - } catch(...) { - umERROR("load(M,N, char *s)", "problem parsing data."); - } - } - - - // assignment - Mat_DIAG& operator=(const T &val) { fill(val); return (*this); } - Mat_DIAG& operator=(const Mat_DIAG &B); - Mat_DIAG& operator=(const Vector &V); - - - Mat_DIAG& copy(const T *vec) - { - // assumes sufficient elements, col-major sequence - Vector::copy(vec); - return (*this); - } - - Mat_DIAG& copy(const Mat_DIAG& B) - { - this->operator=(B); - return (*this); - } - - - // - // Utilities - // - bool ok() const { return ((this->v_!=NULL) && (m_D>0)); } - bool is_square() const { return (this->ok() && (m_M==m_N) && (m_D==m_N)); } - - int size() const { return this->m_Len; } - void size(int& M, int& N) const { M=m_M; N=m_N; } - int dim(int d) const { return (d==1)?m_M:((d==2)?m_N:0); } - int num_rows() const { return m_M; } - int num_cols() const { return m_N; } - int num_diag() const { return m_D; } - int M () const { return m_M; } - int N () const { return m_N; } - int D () const { return m_D; } - int max_mn () const { return (m_M > m_N) ? m_M : m_N; } - int min_mn () const { return (m_M < m_N) ? m_M : m_N; } - - Mat_DIAG& zeros() {Vector::fill(T(0)); return (*this);} - Mat_DIAG& zeros(int M, int N) {resize(M,N,true,T(0)); return (*this);} - - Mat_DIAG& ones() {Vector::fill(T(1)); return (*this);} - Mat_DIAG& ones(int M, int N) {resize(M,N,true,T(1)); return (*this);} - - Mat_DIAG& fill(const T &x) {Vector::fill(x); return (*this);} - Mat_DIAG& set_abs() {Vector::set_abs(); return (*this);} - - - Mat_DIAG& identity(int N) - { - // set to (N,N) identity matrix - resize(N,N, true, this->ONE); - return (*this); - } - - - Mat_DIAG& diag(const Vector& V) - { - // Set vector arg to be matrix diagonal - (*this) = V; - return (*this); - } - - - Mat_DIAG& transpose() - { - // allow for this to be (logically) rectangular, - // but diagonal remains unchanged. - int tmp=m_N; m_N=m_M; m_M=tmp; - return (*this); - } - - - // - // Comparison ("fuzzy", uses m_EqTol) - // - bool operator == (const Mat_DIAG &B) const - { - if (this->v_ == B.v_) return true; // same vector? - if (B.num_rows() != m_M) return false; // diff. shape? - if (B.num_cols() != m_N) return false; // diff. shape? - if (B.min_mn() != m_D) return false; // diff. shape? - - // compare data in base array - return Vector::operator==((const Vector&)B); - } - - bool operator != (const Mat_DIAG &B) const - { - bool bRet = this->operator==(B); - return (!bRet); - } - - Mat_DIAG operator! () const - { - // return a "boolean inverse" - Mat_DIAG* tmp = new Mat_DIAG((*this), OBJ_temp, "!TMP"); - - T* p = tmp->data(); - for (int i=0; im_Len; ++i) - { - // consider fuzzy m_EqTol - p[i] = (this->ZERO == this->v_[i] ? this->ONE : this->ZERO); - } - return (*tmp); - } - - - // - // Numerical routines. - // - // Simple routines are provided to accommodate all - // data types, plus calls to BLAS for T=. - // - - - // - // apply scalar to all elements - // - - /*virtual*/ void add_val (const T &x) { Vector::add_val (x); } - /*virtual*/ void mult_val(const T &x) { Vector::mult_val(x);} - /*virtual*/ void div_val (const T &x) { Vector::div_val (x); } - /*virtual*/ void pow_val (const T &x) { Vector::pow_val (x); } - - - // - // Overloaded arithmetic operators. - // - - // Pattern for global operators: - // tmp(A); tmp+=x; return tmp; - - Mat_DIAG& operator += (const T &x) {add_val ( x); return (*this);} - Mat_DIAG& operator -= (const T &x) {add_val (-x); return (*this);} - Mat_DIAG& operator *= (const T &x) {mult_val( x); return (*this);} - Mat_DIAG& operator /= (const T &x) {div_val ( x); return (*this);} - - - // - // element-by-element operations (A.+B) all call - // unrolled vector version (deleting arg if temp) - // - - // A .+ B - Mat_DIAG& operator += (const Mat_DIAG &B) { - Vector::operator += ((const Vector&)B); - return (*this); - } - - // A .- B - Mat_DIAG& operator -= (const Mat_DIAG &B) { - Vector::operator -= ((const Vector&)B); - return (*this); - } - - // A .+ V - Mat_DIAG& operator += (const Vector &V) { - Vector::operator += (V); - return (*this); - } - - // A .- V - Mat_DIAG& operator -= (const Vector &V) { - Vector::operator -= (V); - return (*this); - } - - - Mat_DIAG& operator *= (const Mat_DIAG &B) - { - assert(B.min_mn()==m_D); // must be compatible - m_M = m_N = this->m_D; // FIXME: forcing to be (logically) square - - // standard matrix multiplication, which in this case reduces - // to a vector operation, v1 .* v2. We can use the unrolled - // vector version (which deletes B if B is a "temp" object) - Vector::operator *= ((const Vector&)B); - return (*this); - } - - - Mat_DIAG& operator /= (const Mat_DIAG &B) - { - assert(B.min_mn()==m_D); // must be compatible - m_M = m_N = this->m_D; // FIXME: force to be (logically) square - - // multiply (*this) by inv(B), which in this case reduces - // to a vector operation, v1 ./ v2. We can use the unrolled - // vector version (which deletes B if B is a "temp" object) - Vector::operator /= ((const Vector&)B); - return (*this); - } - - - Mat_DIAG& operator |= (const Mat_DIAG &B) - { - return this->operator /= (B); - } - - - // Return LU solution to Ax=b - Vector& operator | (const Vector &b) - { - // Return the "LU" solution vector, which in this case - // reduces to a vector operation, x(i)=b(i)/A(i,i) - - // must be compatible - assert( m_D == b.size() ); - - Vector *x=new Vector(b, OBJ_temp, "inv(A)*b"); - (*x) /= dynamic_cast< Vector& >(*this); - - return (*x); - } - - - // A = A .* B - Mat_DIAG& mult_element(const Mat_DIAG &B) - { - // Unrolled vector version (deletes B if temp) - Vector::operator *= ((const Vector&)B); - return (*this); - } - - // A = A .* b - Mat_DIAG& mult_element(const Vector& b) - { - // Unrolled vector version (deletes b if temp) - Vector::operator *= (b); - return (*this); - } - - // A = A .* data - Mat_DIAG& mult_element(const T* data) - { - Vector::operator *= (data); - return (*this); - } - - // A = A ./ B - Mat_DIAG& div_element (const Mat_DIAG &B) - { - // Unrolled vector version (deletes B if temp) - Vector::operator /= ((const Vector&)B); - return (*this); - } - - // A = A ./ b - Mat_DIAG& div_element (const Vector& b) - { - // Unrolled vector version (deletes b if temp) - Vector::operator /= (b); - return (*this); - } - - // (*this) is not changed: C = A ./ B - Mat_DIAG& dd(const Mat_DIAG &B) const - { - // FIXME: check side-effects if OBJ_temp - // FIXME: tmp ctor may delete (*this) - - std::string sz; tmp_op_name(this->name(), "./", B.name(), sz); - Mat_DIAG *tmp=new Mat_DIAG((*this), OBJ_temp, sz.c_str()); - (*tmp).div_element(B); - return (*tmp); - } - - // (*this) is not changed: C = A .* B - Mat_DIAG& dm(const Mat_DIAG &B) const - { - // FIXME: check side-effects if OBJ_temp - // FIXME: tmp ctor may delete (*this) - - std::string sz; tmp_op_name(this->name(), ".*", B.name(), sz); - Mat_DIAG *tmp=new Mat_DIAG((*this), OBJ_temp, sz.c_str()); - (*tmp).mult_element(B); - return (*tmp); - } - - // (*this) is not changed: C = A .* V - Mat_DIAG& dm(const Vector &V) const - { - std::string sz; tmp_op_name(this->name(), ".*", V.name(), sz); - Mat_DIAG *tmp=new Mat_DIAG((*this), OBJ_temp, sz.c_str()); - (*tmp).mult_element(V); - return (*tmp); - } - - // (*this) is not changed: C = A .* data - Mat_DIAG& dm(const T* data) const - { - // assumes data has sufficinet elements - std::string sz; tmp_op_name(this->name(), ".*", "v", sz); - Mat_DIAG *tmp=new Mat_DIAG((*this), OBJ_temp, sz.c_str()); - (*tmp).mult_element(data); - return (*tmp); - } - - - - // - // element access - // - - // - // single (1-based) index into base array - // - T& operator()(int i) { return Vector::operator()(i); } - const T& operator()(int i) const { return Vector::operator()(i); } - - // - // 1-based element access (make "virtual" if required) - // - T& operator()(int i, int j) - { - CheckIdx_IJ_1(i,j); -#if (ALLOW_NON_DIAG_IDX) - return (i==j) ? this->vm1_[i] : this->ZERO; -#else - assert(i==j); - return this->vm1_[i]; -#endif - } - - const T& operator()(int i, int j) const - { - CheckIdx_IJ_1(i,j); -#if (ALLOW_NON_DIAG_IDX) - return (i==j) ? this->vm1_[i] : this->ZERO; -#else - assert(i==j); - return this->vm1_[i]; -#endif - } - - - // - // get MAX row/col values - // - T max_row_val (const int i) const {CheckIdx_Row_1(i); if(m_N<1) return this->ZERO; return this->vm1_[i]; } - T max_row_val_abs(const int i) const {CheckIdx_Row_1(i); if(m_N<1) return this->ZERO; return std::abs(this->vm1_[i]);} - T max_col_val (const int j) const {CheckIdx_Col_1(j); if(m_M<1) return this->ZERO; return this->vm1_[j]; } - T max_col_val_abs(const int j) const {CheckIdx_Col_1(j); if(m_M<1) return this->ZERO; return std::abs(this->vm1_[j]);} - - // - // get MIN row/col values - // - T min_row_val (const int i) const {CheckIdx_Row_1(i); if(m_N<1) return this->ZERO; return this->vm1_[i]; } - T min_row_val_abs(const int i) const {CheckIdx_Row_1(i); if(m_N<1) return this->ZERO; return std::abs(this->vm1_[i]);} - T min_col_val (const int j) const {CheckIdx_Col_1(j); if(m_M<1) return this->ZERO; return this->vm1_[j]; } - T min_col_val_abs(const int j) const {CheckIdx_Col_1(j); if(m_M<1) return this->ZERO; return std::abs(this->vm1_[j]);} - - - // - // set/get entire rows/cols - // - - // return row as a ZERO vector with "diagonal" element set - // NOTE: return value must be assigned or deleted! - Vector& get_row(const int i) const - { - CheckIdx_Row_1(i); - int N = this->num_cols(); - Vector* tmp = new Vector(N, T(0), OBJ_temp, "row"); - tmp(i) = this->vm1_[i]; - return (*tmp); - } - - // return column as a ZERO vector with "diagonal" element set - // NOTE: return value must be assigned or deleted! - Vector& get_col(const int j) const - { - CheckIdx_Col_1(j); - int M = this->num_rows(); - Vector* tmp = new Vector(M, T(0), OBJ_temp, "col"); - tmp(j) = this->vm1_[j]; - return (*tmp); - } - - void set_row(const int i, const double &x) - { - // set value of diagonal element in row i - CheckIdx_Row_1(i); - this->vm1_[i] = x; - } - - void set_row(const int i, const Vector &vec) - { - // set value of diagonal element in row i - CheckIdx_Row_1(i); - assert(vec.size() >= m_N); // sufficient values? - this->vm1_[i] = vec(i); - - if (vec.get_mode()==OBJ_temp) { - delete (&vec); - } - } - - void set_col(const int j, const double &x) - { - // set value of diagonal element in column j - CheckIdx_Col_1(j); - this->vm1_[j] = x; - } - - void set_col(const int j, const Vector &vec) - { - // set value of diagonal element in column j - CheckIdx_Col_1(j); - assert(vec.size() >= m_M); // sufficient values? - this->vm1_[j] = vec(j); - - if (vec.get_mode()==OBJ_temp) { - delete (&vec); - } - } - - void add_col(const int j, const Vector &vec) - { - // Add a value to diagonal element in column j - CheckIdx_Col_1(j); - assert(vec.size() >= m_M); // sufficient values? - this->vm1_[j] += vec(j); - - if (vec.get_mode()==OBJ_temp) { - delete (&vec); - } - } - - void sub_col(const int j, const Vector &vec) - { - // Subtract a value from diagonal element in column j - CheckIdx_Col_1(j); - assert(vec.size() >= m_M); // sufficient values? - this->vm1_[j] -= vec(j); - - if (vec.get_mode()==OBJ_temp) { - delete (&vec); - } - } - - - // - // matrix norms - // - - - // matrix 1-norm: max column sum - double norm1() const {return Vector::max_val_abs();} - - // matrix infinity-norm: max row sum - double norm_inf() const {return Vector::max_val_abs();} - - // matrix frobenius-norm - double norm_frob() const {return sqrt(this->sumsquares());} - - - - // ##################################################### - // - // Operations only appropriate for - // - // ##################################################### - -public: - - Mat_DIAG& hilbert(int N) - { - // load diagonal of (N,N) Hilbert matrix - this->resize(N,N, false); - for (int i=1; i<=N; ++i) - this->vm1_[i] = (T) (1.0 / double(i+i-1)); - - return (*this); - } - - - //------------------------------------- - Mat_DIAG& invert() - //------------------------------------- - { - if (sizeof(T) != sizeof(double)) { - umLOG(1, "invert only available for type = .\n"); - umERROR("Mat_DIAG::invert()", "matrix type is not ."); - } - - if (!this->is_square()) { - umLOG(1, "TODO: pseudo-inverse for general (M,N) matrices.\n"); - umERROR("Mat_DIAG::invert()", "matrix is not square."); - } - - for (int i=0; iv_[i] = 1.0 / this->v_[i]; - } - - return (*this); - } - - - // - // Adjustable output format. - // - void print ( - FILE* os = stdout, - const char* msg=NULL, - const char* fmt="lf", // [%e|%lf|%g] - int prec=4, // sig.figs|dec.places - int wdth=8, // output spacing [12] - int nline=100, // entries per line - int nr=0, // num rows to write (0 --> all) - int nc=0 // num cols to write (0 --> all) - ) const; - - void print_STREAM ( - std::ostream& os, - const char* msg=NULL, - char fmt='G', // [%e|%lf|%g] - int prec=4, // sig.figs|dec.places - int wdth=12, // output spacing [12] - int nline=100, // entries per line - int nr=0, // num rows to write (0 --> all) - int nc=0 // num cols to write (0 --> all) - ) const; - - - // - // Optional index checking - // - -protected: - -#if (CHECK_ARRAY_INDEX) - - // 0-based indices - void CheckIdx_IJ_0 (int i, int j) const { if (i < 0) throw 1; if (i >= m_M) throw 2; - if (j < 0) throw 3; if (j >= m_N) throw 4;} - void CheckIdx_Row_0(int i) const {if (i<0) throw 1; if (i>=m_M) throw 2;} - void CheckIdx_Col_0(int j) const {if (j<0) throw 1; if (j>=m_N) throw 2;} - void CheckIdx_Len_0(int k) const {if (k<0) throw 1; if (k>=m_MN) throw 2;} - - // 1-based indices - void CheckIdx_IJ_1 (int i, int j) const { if (i < 1) throw 1; if (i > m_M) throw 2; - if (j < 1) throw 3; if (j > m_N) throw 4;} - void CheckIdx_Row_1(int i) const {if (i<1) throw 1; if (i>m_M) throw 2;} - void CheckIdx_Col_1(int j) const {if (j<1) throw 1; if (j>m_N) throw 2;} - void CheckIdx_Len_1(int k) const {if (k<1) throw 1; if (k>m_MN) throw 2;} - -#else - - // 0-based indices - void CheckIdx_IJ_0(int i, int j) const {} - void CheckIdx_Row_0(int i) const {} - void CheckIdx_Col_0(int j) const {} - void CheckIdx_Len_0(int k) const {} - - // 1-based indices - void CheckIdx_IJ_1(int i, int j) const {} - void CheckIdx_Row_1(int i) const {} - void CheckIdx_Col_1(int j) const {} - void CheckIdx_Len_1(int k) const {} - -#endif - - - //--------------------------------------------- - // Region1D: 1D regions of Vector objects - //--------------------------------------------- -public: - - // Construct with a Region1D along the diagonal - Mat_DIAG(const Region1D< Vector > &R, OBJ_mode md=OBJ_real, const char* sz="diag") - : Vector(R,md,sz), // vector = region - m_M(0), m_N(0), m_MN(0), m_D(0) - { - int D = this->size(); - set_counters(D,D); - } - - // rebuild with a Region1D along the diagonal - Mat_DIAG& operator = (const Region1D< Vector > &R) - { - Vector vec(R); - (*this) = vec; - return (*this); - } - -}; - - - -/////////////////////////////////////////////////////////// -// -// constructors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Mat_DIAG::Mat_DIAG(const char* sz, OBJ_mode md) -//--------------------------------------------------------- - : Vector(sz, md), - m_M(0), m_N(0), m_MN(0), m_D(0) -{} - - -// not "explicit"; allows construction from return objects -//--------------------------------------------------------- -template inline -Mat_DIAG::Mat_DIAG(const Mat_DIAG &B, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(sz, md), - m_M(0), m_N(0), m_MN(0), m_D(B.min_mn()) -{ - int Nr = B.m_M, Nc = B.m_N; - this->m_mode = md; - - // manage copy of real/temp objects - // deletes B, if temporary. - Vector::operator= ((const Vector&) B); - - // FIXME: Allow (logically) rectangular? - if (Nr>0 && Nc>0) { - set_counters(Nr,Nc); - } -} - - -//--------------------------------------------------------- -template inline -Mat_DIAG::Mat_DIAG(const Vector &V, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(V,md,sz), // deletes V, if temporary. - m_M(0), m_N(0), m_MN(0), m_D(0) -{ - int D = this->size(); - set_counters(D,D); -} - - -//--------------------------------------------------------- -template inline -Mat_DIAG::Mat_DIAG(int N, const char* sz) -//--------------------------------------------------------- -: Vector(N, sz), - m_M(N), m_N(N), m_MN(0), m_D(N) -{ - set_counters(N,N); // adjust logical size -} - - -//--------------------------------------------------------- -template inline -Mat_DIAG::Mat_DIAG(int N, const T x, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(N, x, md, sz), - m_M(0), m_N(0), m_MN(0), m_D(N) -{ - set_counters(N,N); // adjust logical size -} - - -//--------------------------------------------------------- -template inline -Mat_DIAG::Mat_DIAG(int N, const T *data, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: Vector(N, data, md, sz), - m_M(0), m_N(0), m_MN(0), m_D(N) -{ - set_counters(N,N); // adjust logical size -} - - -/////////////////////////////////////////////////////////// -// -// destructors -// -/////////////////////////////////////////////////////////// - -template inline -Mat_DIAG::~Mat_DIAG() -{ - destroy(); -} - - -template inline -void Mat_DIAG::destroy() -{ - // Base class Vector manages deallocation of data, - Vector::destroy(); - m_M = m_N = m_MN = m_D = 0; -} - - -// "Borrowing" data allows wrapping external arrays -// to exploit matrix algorithms while avoiding any -// overhead of copying data. -//--------------------------------------------------------- -template inline -void Mat_DIAG::borrow(int M, int N, T* p) -//--------------------------------------------------------- -{ - assert(M*N >=0); // must be non-negative - assert(p); // expecting valid data - - // base class calls virtual destroy() to reset - // all members, and handles the storage. - - // only borrow elements for diagonal = min(M,N) - m_D = std::min(M,N); - Vector::borrow(m_D, p); - - if (M>0 && N>0) { - // prepare index arrays - set_counters(M, N); - } -} - - -//--------------------------------------------------------- -template inline -void Mat_DIAG::borrow(const Vector& CV) -//--------------------------------------------------------- -{ - Vector& V = const_cast&>(CV); - int N = V.length(); - T* p = V.data(); - this->borrow(N,N, p); -} - - - -// The internal contiguous (0-offset) array v_[D] is -// allocated in base class Vector. Here we simply -// set the logical size, which may be rectangular. -//--------------------------------------------------------- -template inline -void Mat_DIAG::set_counters(int M, int N) -//--------------------------------------------------------- -{ - assert( this->v_ ); // data allocated in Vector::initialize() - assert( M >= 1); - assert( N >= 1); - - m_M = M; // num rows - m_N = N; // num cols - m_MN = M*N; // total (logical) elements - m_D = std::min(M,N); // actual length of stored array -} - - -//--------------------------------------------------------- -template inline -bool Mat_DIAG::resize(int M, int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // The internal contiguous (0-offset) array - // v_[D] is allocated by base class Vector. - // - // Call set_counters(M,N) to set up logical size - - // Resize existing object, optionally setting - // the entire array to some given inital value. - // Return value indicates whether size has changed. - - assert(M >= 0); - assert(N >= 0); - - int D = std::min(M,N); // actual length of stored array - - bool bResized=false; - - if ((M != m_M) || (N != m_N) || (D != m_D)) - { - bResized=true; - this->destroy(); // clear allocation, zero members - if (D > 0) - { - initialize(D, bInit, x); // allocate array with D elements - set_counters(M, N); // adjust logical size - } - } - else if (bInit && this->m_Len>0) - { - fill(x); // no resize, just fill existing array - } - - m_M = M; // num rows - m_N = N; // num cols - m_MN = M*N; // total (logical) elements - m_D = D; // total (actual) elements - - return bResized; -} - - - -/////////////////////////////////////////////////////////// -// -// assignment -// -/////////////////////////////////////////////////////////// - -template inline -Mat_DIAG& Mat_DIAG::operator=(const Mat_DIAG &B) -{ - if (this->v_ == B.v_) - return (*this); - - int M=B.m_M, N=B.m_N; - if (this->m_name=="diag" || this->m_name.empty()) - this->m_name = B.name(); - - // base class manages the actual allocation - Vector::operator= ((const Vector&) B); - - // adjust logical size - set_counters(M, N); - - return (*this); -} - - -template inline -Mat_DIAG& Mat_DIAG::operator=(const Vector &V) -{ - // Set vector arg to be matrix diagonal - - if (this->v_ == V.data()) - return (*this); - - if (this->m_name=="diag" || this->m_name.empty()) - this->m_name=V.name(); - - int N = V.size(); - Vector::operator= (V); - set_counters(N,N); - - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// I/O: write a format that can be read by Mat_DIAG -// -/////////////////////////////////////////////////////////// - -template -std::ostream& operator<<(std::ostream &s, const Mat_DIAG &A) -{ - int M = A.M(), N = A.N(), D = A.D(); - s << M << " " << N << " " << D << "\n"; - - // I/O iosflags - // s << std::setiosflags(std::ios::scientific); - // s << std::setiosflags(std::ios::fixed); - // s << std::setprecision(3); - - for (int i=1; i<=D; ++i) { - s << A(i) << " "; - // TLB: was (j%10). Should be i%10? - if (0==(i%10)) - s << "\n"; - } - s << std::endl; - return s; -} - - -template -std::istream& operator>>(std::istream &s, Mat_DIAG &A) -{ - int M=0, N=0, D=0; - s >> M >> N >> D; - A.resize(M,N); - for (int i=1; i<=D; ++i) { - s >> A(i); - } - return s; -} - - -//--------------------------------------------------------- -template -void Mat_DIAG::print -( - FILE* os, - const char* msg, - const char* fmt, // [%e|%lf] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - int nline, // entries per line - int nr, // num rows to write (0 --> all) - int nc // num cols to write (0 --> all) -) const -//--------------------------------------------------------- -{ - static char buf[20] = {""}; - sprintf(buf, "%c%d.%d%s ", '%',wdth, prec,fmt); - - int M = this->num_rows(); - int N = this->num_cols(); - - // Select which rows, cols to write - if (nr > 0) M = (nr<=M ? nr : M); // write min(nr,M) rows - if (nc > 0) N = (nc<=N ? nc : N); // write min(nc,N) cols - -#if (1) - if (msg) { fprintf(os, "%s\n", msg); } - fprintf(os, "(%d,%d)\n", M,N); -#endif - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) - { - fprintf(os, buf, (*this)(i,j)); - if (j && (0 == (j%nline))) - fprintf(os, "\n"); - } - fprintf(os, "\n"); - } - fprintf(os, "\n"); - fflush(os); -} - - -//--------------------------------------------------------- -template -void Mat_DIAG::print_STREAM -( - std::ostream& os, - const char* msg, - char fmt, // [%e|%lf] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - int nline, // entries per line - int nr, // num rows to write (0 --> all) - int nc // num cols to write (0 --> all) -) const -//--------------------------------------------------------- -{ - // save current settings - std::ios_base::fmtflags flgs = os.flags(); - if ('E' == toupper(fmt)) - { os << std::setiosflags(std::ios::scientific); } - else if ('F' == toupper(fmt)) -//{ os << std::setiosflags(std::ios::fixed); } - { os << std::setiosflags(std::ios::fixed|std::ios::showpoint); } - else { } // general format - - os << std::setprecision(prec); - - int M = this->num_rows(); - int N = this->num_cols(); - - // Select which rows, cols to write - if (nr > 0) M = (nr<=M ? nr : M); // write min(nr,M) rows - if (nc > 0) N = (nc<=N ? nc : N); // write min(nc,N) cols - -#if (1) - if (msg) { os << msg << "\n"; } - os << M << " " << N << "\n"; -#endif - - for (int i=1; i<=M; ++i) { - for (int j=1; j<=N; ++j) { - os << std::setw(wdth) << (*this)(i,j) << " "; - if (j && (0 == (j%nline))) - os << "\n"; - } - os << "\n"; - } - os << std::endl; - os.setf(flgs); // restore stream settings -} - - - -// -// Basic matrix algorithms -// - - -// DMat_Diag& inv (const DMat_Diag& A); -// DMat_Diag& trans (const DMat_Diag& A); -// DMat_Diag& abs (const DMat_Diag& A); -// DMat_Diag& sqrt (const DMat_Diag& A); -// DMat_Diag& sqr (const DMat_Diag& A); -// DMat_Diag& exp (const DMat_Diag& A); - - -inline DMat_Diag& inv (const DMat_Diag& A) -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "inv(%s)", A.name()); - - DMat_Diag *tmp=new DMat_Diag(A, OBJ_temp, buf); - tmp->invert(); - return (*tmp); -} - - -template -inline Mat_DIAG& trans(const Mat_DIAG& A) -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "tr(%s)", A.name()); - - DMat_Diag *tmp=new DMat_Diag(A, OBJ_temp, buf); - tmp->transpose(); - return (*tmp); -} - - -template -inline Mat_DIAG& abs (const Mat_DIAG& A) -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "abs(%s)", A.name()); - - DMat_Diag *tmp=new DMat_Diag(A, OBJ_temp, buf); - tmp->set_abs(); - return (*tmp); -} - - -inline DMat_Diag& sqrt(const DMat_Diag& A) -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "sqrt(%s)", A.name()); - - DMat_Diag *tmp=new DMat_Diag(A, OBJ_temp, buf); - tmp->SQRT(); - return (*tmp); -} - - -template -inline Mat_DIAG& sqr(const Mat_DIAG& A) -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "(%s)^2", A.name()); - - DMat_Diag *tmp=new DMat_Diag(A, OBJ_temp, buf); - tmp->SQR(); - return (*tmp); -} - - -inline DMat_Diag& exp(const DMat_Diag& A) -{ - static char buf[100]={""}; - snprintf(buf, (size_t)90, "exp(%s)", A.name()); - - DMat_Diag *tmp=new DMat_Diag(A, OBJ_temp, buf); - tmp->exp_val(); - return (*tmp); -} - - - -// -// Addition: -// diag + diag -// diag + vector -// vector + diag -// diag + scalar -// scalar + diag -// - -// diag + diag -template inline -Mat_DIAG& operator+(const Mat_DIAG &A, const Mat_DIAG &B) -{ -#if (USE_ARRAY_NAMES) - // - // NBN: eventually we may want to avoid using names. - // Use simple stubs during transition? - // - std::string sz; tmp_op_name(A.name(),"+",B.name(), sz); -#else - static std::string sz("mat"); -#endif - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - -// diag + vector -template inline -Mat_DIAG& operator+(const Mat_DIAG &A, const Vector &V) -{ - std::string sz; tmp_op_name(A.name(),"+",V.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) += V; - return (*tmp); -} - -// vector + diag -template inline -Mat_DIAG& operator+(const Vector &V, const Mat_DIAG &A) -{ - std::string sz; tmp_op_name(V.name(),"+",A.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) += V; - return (*tmp); -} - -// diag + scalar -template inline -Mat_DIAG& operator+(const Mat_DIAG &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"+","x", sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - - -// scalar + diag -template inline -Mat_DIAG& operator+(const T &x, const Mat_DIAG &A) -{ - std::string sz; tmp_op_name("x","+",A.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - - -// -// Subtraction: -// diag - diag -// diag - vector -// vector - diag -// diag - scalar -// scalar - diag -// - -// diag - diag -template inline -Mat_DIAG& operator-(const Mat_DIAG &A, const Mat_DIAG &B) -{ - std::string sz; tmp_op_name(A.name(),"-",B.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - -// diag = diag - vector -template inline -Mat_DIAG& operator-(const Mat_DIAG &A, const Vector &V) -{ - std::string sz; tmp_op_name(A.name(),"-",V.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) -= V; - return (*tmp); -} - -// diag = vector - diag -template inline -Mat_DIAG& operator-(const Vector &V, const Mat_DIAG &A) -{ - std::string sz; tmp_op_name(V.name(),"-",A.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(V, OBJ_temp, sz.c_str()); - (*tmp) -= A; - return (*tmp); -} - -// diag - scalar -template inline -Mat_DIAG& operator-(const Mat_DIAG &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"-","x", sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) -= x; - return (*tmp); -} - -// scalar - diag -template inline -Mat_DIAG& operator-(const T &x, const Mat_DIAG &A) -{ - // - // create a matrix filled with scalar x; subtract A - // - std::string sz; tmp_op_name("x","-",A.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A.D(), x, OBJ_temp, sz.c_str()); - (*tmp) -= A; - return (*tmp); -} - - - -// -// Division : -// diag | diag ... matlab "right division" -// diag / diag ... "multiply by inverse" -// diag / scalar -// scalar / diag -// - -// NBN: using "||" due to overload abiguities -template inline -Mat_DIAG& operator|| (const Mat_DIAG &A, const Mat_DIAG &B) -{ - std::string sz; tmp_op_name(A.name(),"|",B.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) |= B; - return (*tmp); -} - - -template inline -Mat_DIAG& operator/ (const Mat_DIAG &A, const Mat_DIAG &B) -{ - std::string sz; tmp_op_name(A.name(),"/",B.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) /= B; - return (*tmp); -} - - -template inline -Mat_DIAG& operator/ (const Mat_DIAG &A, const T &x) -{ - assert(fabs(x)>0.0); - - std::string sz; tmp_op_name(A.name(),"/","x", sz); - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) /= x; - return (*tmp); -} - - -template inline -Mat_DIAG& operator/ (const T &x, const Mat_DIAG &A) -{ - // - // create a matrix filled with scalar x; div_element(A) - // - std::string sz; tmp_op_name("x","/",A.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A.M(), A.N(), x, OBJ_temp, sz.c_str()); - tmp->div_element(A); - return (*tmp); -} - - -// -// Multiplication : -// -// 1 : diag * diag : D = D*D -// -// 2a: diag * scal : D = D*x -// 2b: scal * diag : D = x*D -// -// 3a: diag * vec : x = D*v -// 3b: vec * diag : x = v*D -// -// 4a: dense * diag : M = A*D -// 4b: diag * dense : M = D*A -// - -// 1 : diag * diag : D = D*D -template inline -Mat_DIAG& operator*(const Mat_DIAG &A, const Mat_DIAG &B) -{ - std::string sz; tmp_op_name(A.name(),"*",B.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) *= B; - return (*tmp); -} - - -// 2a: diag * scal : D = D*x -template inline -Mat_DIAG& operator*(const Mat_DIAG &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"*","x", sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - -// 2b: scal * diag : D = x*D -template inline -Mat_DIAG& operator*(const T &x, const Mat_DIAG &A) -{ - std::string sz; tmp_op_name("x","*",A.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -// 3a: diag * vec : x = D*v -template inline -Vector& operator* (const Mat_DIAG &A, const Vector &V) -{ - // allow diagonal matrix to be (logically) rectangular - int rows=A.num_rows(), cols=A.num_cols(), N=V.size(); - assert(cols==N); - - Vector* X = new Vector(rows, T(0), OBJ_temp, "A*v"); - - const T* Ai=A.data(); - const T* vi=V.data(); - T* xi=X->data(); - - // Only dot non-zero part of A's diagonal - for (int i=0; i inline -Vector& operator* (const Vector &V, const Mat_DIAG &A) -{ - // allow diagonal matrix to be (logically) rectangular - int rows=A.num_rows(), cols=A.num_cols(), N=V.size(); - assert(N==rows); - - Vector* X = new Vector(cols, T(0), OBJ_temp, "v*A"); - - const T* vi=V.data(); - const T* Ai=A.data(); - T* xi=X->data(); - - // Only dot non-zero part of A's diagonal - for (int i=0; i inline -Mat_COL& operator* (const Mat_COL &A, const Mat_DIAG &D) -{ - std::string sz; tmp_op_name(A.name(),"*",D.name(), sz); - - // only using non-zero part of (square) diagonal matrix - int cols=A.num_cols(); - int tD=D.D(); // actual number of diagonal elements - - if (cols != tD) { umERROR("dense * diag", "wrong dimensions"); } - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - - // algorithm reduces to scaling the COLUMNS of A - for (int j=1; j<=cols; ++j) { - tmp->scale_col(j, D(j)); - } - - // if D is temporary, delete it. - if (D.get_mode() == OBJ_temp) { delete (&D); } - - return (*tmp); -} - -// 4b: diag * dense : M = D*A -template inline -Mat_COL& operator* (const Mat_DIAG &D, const Mat_COL &A) -{ - std::string sz; tmp_op_name(D.name(),"*",A.name(), sz); - - // only using non-zero part of (square) diagonal matrix - int rows=A.num_rows(), cols=A.num_cols(); - int tD=D.D(); // actual number of diagonal elements - - if (rows != tD) { umERROR("diag * dense", "wrong dimensions"); } - - Mat_COL *tmp=new Mat_COL(A, OBJ_temp, sz.c_str()); - - // algorithm reduces to scaling the ROWS of A - for (int j=1; j<=cols; ++j) { - tmp->scale_col(j, D); - } - - // if D is temporary, delete it. - if (D.get_mode() == OBJ_temp) { delete (&D); } - - return (*tmp); -} - - - - -// negation (unary operator) -template inline -Mat_DIAG& operator- (const Mat_DIAG &A) -{ - std::string sz; tmp_op_name(" ","-",A.name(), sz); - - Mat_DIAG *tmp=new Mat_DIAG(A, OBJ_temp, sz.c_str()); - (*tmp) *= T(-1); - return (*tmp); -} - - - -// -// Matlab "element-wise" operations: C = A .* B -// C = A ./ B -// -template inline -void mult_element(const Mat_DIAG &A, const Mat_DIAG &B, Mat_DIAG &C) -{ - C = A; - C.mult_element(B); -} - - -template inline -void div_element(const Mat_DIAG &A, const Mat_DIAG &B, Mat_DIAG &C) -{ - C = A; - C.div_element(B); -} - - -//--------------------------------------------------------- -template inline -void matmult -( - const Mat_DIAG &A, - const Mat_DIAG &B, - Mat_DIAG &C -) -//--------------------------------------------------------- -{ - assert(A.num_cols() == B.num_rows()); - int M = A.num_rows(); - int N = A.num_cols(); - int K = B.num_cols(); - - T ZERO = T(0), sc = T(0); - double* colk = NULL; - - // Allow diagonal result to be (logically) rectangular - // Adjust shape of C, and set to zero - C.resize(M,K, true, ZERO); - - const T* Ai = A.data(); - const T* Bi = B.data(); - T* Ci = C.data(); - - // Only dot the non-zero parts of the diagonals - int tD = std::min(A.D(), B.D()); - for (int i=0; i neighbors -// #include "MatObj_Type.h" -// #include "FaceData.h" -// -// typedef MatObj FaceMat; - - -//--------------------------------------------------------- -class NDG2D : public Globals2D -//--------------------------------------------------------- -{ -public: - NDG2D(); - virtual ~NDG2D(); - virtual void Driver()=0; // All simulators implement Driver() - - const char* GetClassName() const { return class_name.c_str(); } - const char* GetMeshFileName() const { return FileName.c_str(); } - bool Stationary() const { return m_bStationary; } - bool HasAnalyticSol() const { return m_bHasAnalyticSol; } - - -protected: - virtual void Run()=0; // All simulators implement Run() - virtual void InitRun(); - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - virtual double GetAnalyticError(); - - - // Setup routines - bool StartUp2D(); - DMat& Lift2D(); - void Normals2D(); - void BuildMaps2D(); - void BuildBCMaps2D(); - void BuildPeriodicMaps2D(double xperiod, double yperiod); - void MakeCylinder2D(const IMat& faces, double ra, double xo, double yo); - void CalcElemCentroids(DMat& centroid); - - bool MeshReaderGambit2D(const string& fname); - bool load_BF_group(istream& is, char* buf); - void AdjustCylBC(double radius, double Cx, double Cy, int bc=BC_Cyl, bool toWall=false); - - void Dmatrices2D(); - void Dmatrices2D(int N, Cub2D& cub); // high-order cubature - - void GeometricFactors2D(); - void GeometricFactors2D(Cub2D& cub); // high-order cubature - - void dtscale2D(DVec& dtscale); - - void BuildCurvedOPS2D(int Nc); - void InterpMatrix2D(Cub2D& cub); - DMat& InterpMatrix2D(const DVec&, const DVec&); - - // cubature and quadrature routines -//Cub2D& BuildCubatureMesh2D(int Corder); - Cub2D& CubatureVolumeMesh2D(int Corder); - Gauss2D& GaussFaceMesh2D(int NGauss); - - void PhysDmatrices2D( - const DVec& x1, // [in] - const DVec& y1, // [in] - const DMat& interp, // [in] - DMat& Dx, // [out] - DMat& Dy); // [out] - - - void CurvedDGGrad2D ( - const DMat& cU, // [in] - const DMat& gU, // [in] - const IVec& gmapD, // [in] - const DVec& bcU, // [in] - DMat& dUdx, // [out] - DMat& dUdy); // [out] - - - DMat& CurvedDGDiv2D ( - const DMat& cU, // [in] - const DMat& cV, // [in] - const DMat& gU, // [in] - const DMat& gV, // [in] - const IVec& gmapN, // [in] - const DVec& bcNdotU); // [in] - - - DMat& CurvedDGJump2D ( - const DMat& gU, // [in] - const IVec& gmapD, // [in] - const DVec& bcU); // [in] - - - -/* - void CurvedDGPenalty2D( - Cub2D& cub, // [in] - Gauss2D& gauss, // [in] - const IVec& straight, // [in] - const IVec& curved, // [in] - const DMat& cU, // [in] - const DMat& gU, // [in] - const IVec& gmapD, // [in] - const DVec& bcU, // [in] - DMat& penaltyU); // [out] -*/ - -/* - void CubatureVolumeMatrices2D( - int Corder, // [in] - CSd& cphi, // [out] sparse - CSd& cdphidx, // [out] sparse - CSd& cdphidy, // [out] sparse - DMat_Diag& cw, // [out] diag - CSd& cmminv, // [out] sparse - CSd& cmm); // [out] sparse -*/ - - void CurvedPoissonIPDG2D( - Gauss2D& gauss, // [in] - Cub2D& cub, // [in] - CSd& spOP, // [out] sparse - CSd& spMM); // [out] sparse - - void CurvedPoissonIPDGbc2D( - Gauss2D& gauss, // [in] - CSd& spOP); // [out] sparse - - - void Sample2D(double xout, // [in] - double yout, // [in] - DVec& sampleweights, // [out] - int& sampletri); // [out] - - // FInfo* neighbors; // information for non-conforming faces - // void BuildHNonCon2D(int NGauss, double tol, FInfo*& neighbors); - - void FindLocalCoords2D( - int k, // [in] - const DVec& xout, // [in] - const DVec& yout, // [in] - DVec& rOUT, // [out] - DVec& sOUT); // [out] - -#if (THIS_IS_READY) - //####################################################### - - void PartialLiftData2D( - int k1, int f1, // [in] - int k2, int f2, // [in] - int noncon, // [in] - const DVec& xy1, // [in] - const DVec& xy2, // [in] - DMat& phiminus, // [out] - DMat& gradphiminus, // [out] - DMat& phiplus, // [out] - DMat& gradphiplus); // [out] - - - void PartialGaussData2D( - int k1, int f1, // [in] - int k2, int f2, // [in] - double tol, // [in] - int noncon, // [in] - const DVec& xy1, // [in] - const DVec& xy2, // [in] - DVec& weights, // [out] - DVec& gnx, // [out] - DVec& gny, // [out] - double& hinv); // [out] - - - void GaussTraceMatrices2D( - double tol, // [in] - int NGauss, // [in] - CSd& gphiminus, // [out] - CSd& gphiplus, // [out] - CSd& gphiBC, // [out] - DMat_Diag& spgnx, // [out] - DMat_Diag& spgny, // [out] - DMat_Diag& spgw, // [out] - DMat_Diag& sphinv); // [out] - - //####################################################### -#endif // (THIS_IS_READY) - - - //------------------------------------- - // DG functions - //------------------------------------- - void Div2D(const DMat& u, // [in] - const DMat& v, // [in] - DMat& divu); // [out] - - - void Grad2D(const DMat& u, // [in] - DMat& ux, // [out] - DMat& uy); // [out] - - void Curl2D(const DMat& ux, // [in] - const DMat& uy, // [in] - DMat& vz); // [out] - - void Curl2D(const DMat& ux, // [in] - const DMat& uy, // [in] - const DMat& uz, // [in] - DMat& vx, // [out] - DMat& vy, // [out] - DMat& vz); // [out] - - - //------------------------------------- - // Filters - //------------------------------------- - DMat& Filter2D(int Norder, int Nc, double sp); - DMat& CutOffFilter2D(int Nc, double frac); - void filter_Q(const DMat& filter, DMat& Q); - - //------------------------------------- - // Mesh adaptivity - //------------------------------------- - DMat& ConformingHrefine2D(IMat& edgerefineflag, const DMat& Qin); - void Hrefine2D(IVec& refineflag); - - - //------------------------------------- - // Output functions - //------------------------------------- - void Triangulation2D(int Np, IMat& alltri); - - // render selected solution fields - void OutputVTK(const DMat& FData, int order, int zfield=0); - - void Output_DG_tris(); // render the DG elements - void Output_Mesh(); // render the mesh - - // Utility routines - void OutputSampleXYZ(int sample_N, DMat &newX, DMat &newY, DMat &newZ, - const DMat &FData, DMat &newFData, int zfield=0); - void OutputSampleELMT2D(int sample_N, IMat& ELMT); - void OutputNodes(bool bFaceNodes=false); - void OutputNodes_cub(); - void OutputNodes_gauss(); - -protected: - - //------------------------------------- - // member data - //------------------------------------- - int sim_type; // select simulation mode - int flux_type; // select flux type - int Nfields; // number of solution fields - Strings sol_names; // names for solution fields - string class_name; // identify without RTTI - - - //------------------------------------------------------- - // N[*] : number of unpaired data points on [*] boundary - //------------------------------------------------------- - int Ninflow, Noutflow, Nwall, Nfar, Ncyl; - int Ndirichlet, Nneuman, Nslip; - - int m_Np_K; // was m_Npts_Nel - int m_Nfp_Nfaces_K; // was m_Nfq_Nfaces_Nel - int m_Nfp_Nfaces; // was m_Nfq_Nfaces - int m_Np_Nfields; // was m_Npts_Nfields - - stopwatch timer; // timer class - string FileName; // gambit .neu-format mesh file - double m_eps; // machine precision - double ti0,ti1,tw1,trhs; // time data - double time_rhs, // time for evaluating RHS - time_rhs_c, // time to adjust for curved elements - time_flux, // time to evaluate flux - time_upw, // time to evaluate eigen-flux - time_bc, // time to evaluate BCs - time_source, // time to evaluate source terms - time_iter, // time for 1 iteration - time_limit, // time used by "limiters" - time_work, // total NDG++ time - time_total; // total simulation time - - int Nreport; // frequency of reporting - int Nrender; // frequency of rendering - int Nplotfield; // selected field to plot - int NvtkInterp; // Vtk interpolation order - DMat Q_plot; // storage for fields to render - DVec dtscale; // stepsize calculation - DMat m_Filter; // filter - - // boolean flags - bool m_bMenuLoaded; - bool m_bStationary; - bool m_bHasAnalyticSol; - bool m_bArgsSet; - bool m_bSummaryShown; - bool m_bHeaderShown; - bool m_bContinue; - bool m_bUserStop; - bool m_bDoTest; - bool m_bUseAMR; - bool m_bAdapted; - bool m_bApplyFilter; - - // iteritive h-refinement of default mesh - int Nrefine, refine_count; - - // error analysis - double m_maxAbsError; - DVec m_ErrAnalytic; - DVec m_ErrEstimate; - - //------------------------------------- - // static member data - //------------------------------------- - static int N2Dobjects; // count of active simulators - static int PlotNumber; // accumulated plot count - static double TotalSimTime; // accumulate time for multiple runs -}; - -extern NDG2D* g_D2; // global pointer - -#endif // NDG__NDG_22D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/NDG3D.h b/cpp/nudg++/trunk/Include/NDG3D.h deleted file mode 100644 index 2cce25d..0000000 --- a/cpp/nudg++/trunk/Include/NDG3D.h +++ /dev/null @@ -1,233 +0,0 @@ -// NDG3D.h -// interface implemented by 3D solvers -// 2007/10/07 -//--------------------------------------------------------- -#ifndef NDG__NDG_333D_H__INCLUDED -#define NDG__NDG_333D_H__INCLUDED - -#include "Globals3D.h" -#include "Stopwatch.h" - -// sparse matrix -#include "CS_Type.h" - - -//--------------------------------------------------------- -class NDG3D : public Globals3D -//--------------------------------------------------------- -{ -public: - NDG3D(); - virtual ~NDG3D(); - virtual void Driver()=0; // All simulators implement Driver() - - const char* GetClassName() const { return class_name.c_str(); } - const char* GetMeshFileName() const { return FileName.c_str(); } - bool Stationary() const { return m_bStationary; } - bool HasAnalyticSol() const { return m_bHasAnalyticSol; } - - -protected: - virtual void Run()=0; // All simulators implement Run() - virtual void InitRun(); - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - virtual double GetAnalyticError(); - - - // Setup routines - bool StartUp3D(); - DMat& Lift3D(); - void Normals3D(); - void BuildMaps3D(); - void BuildBCMaps3D(); -//void MakeSphere3D(const IMat& faces, double ra, double xo, double yo, double zo); - void CalcElemCentroids(DMat& centroid); - - bool MeshReaderGambit3D(const string& fname); - bool load_BF_group(istream& is, char* buf); - - void Dmatrices3D(); - void Dmatrices3D(int Nc, Cub3D& cub); // high-order cubature - - void GeometricFactors3D(); - void GeometricFactors3D(Cub3D& cub); // high-order cubature - - double dtscale3D() const; - - -//void BuildCurvedOPS3D(int Nc); - void InterpMatrix3D(Cub3D& cub); - DMat& InterpMatrix3D(const DVec&, const DVec&, const DVec&); - - // cubature and quadrature routines -//Cub2D& BuildCubatureMesh3D(int Corder); - void CubatureVolumeMesh3D(int Corder, Cub3D& cub); -//Gauss2D& GaussFaceMesh3D(int NGauss); - - - void PhysDmatrices3D( - const DVec& x1, // [in] - const DVec& y1, // [in] - const DVec& z1, // [in] - const DMat& interp, // [in] - DMat& Dx, // [out] - DMat& Dy, // [out] - DMat& Dz); // [out] - - void PartialLiftData3D( - int k1, int f1, // [in] - int k2, int f2, // [in] - const DVec& xg, // [in] - const DVec& yg, // [in] - const DVec& zg, // [in] - DMat& VM, // [out] - DMat gradVM[4], // [out] - DMat& VP, // [out] - DMat gradVP[4]); // [out] - - - void Div3D (const DMat& Ux, const DMat& Uy, const DMat& Uz, DMat& divU); - void Grad3D(const DMat& U, DMat& dUdx, DMat& dUdy, DMat& dUdz); - void Curl3D(const DMat& Ux, const DMat& Uy, const DMat& Uz, DMat& curlx, DMat& curly, DMat& curlz); - - - void PoissonIPDG3D (CSd& spOP, CSd& spMM); - DMat& PoissonIPDGbc3D(DVec& ubc); - - void Sample3D(double xout, // [in] - double yout, // [in] - double zout, // [in] - DVec& sampleweights, // [out] - int& sampletet); // [out] - - - void FindLocalCoords3D (int k, const DVec& xi, const DVec& yi, const DVec& zi, DVec& rOUT, DVec& sOUT, DVec& tOUT); - DMat& InterpNodeShapes3D(int k, const DVec& xi, const DVec& yi, const DVec& zi); - - -#if (0) - //####################################################### - // TODO: - //####################################################### - -//void AdjustSphBC(double radius, double Cx, double Cy, double Cz, int bc=BC_Cyl); - - - //####################################################### - // TODO: - //####################################################### -#endif - - //------------------------------------- - // Filters - //------------------------------------- - DMat& Filter3D_exp (int Nc, double sp); - DMat& Filter3D_cutoff(int Nc, double frac); - - //------------------------------------- - // Mesh adaptivity - //------------------------------------- -//DMat& ConformingHrefine3D(IMat& edgerefineflag, const DMat& Qin); - void Hrefine3D(IVec& refineflag); - - - //------------------------------------- - // Output functions - //------------------------------------- - - // render selected solution fields - void OutputVTK(const DMat& FData, int order, int zfield=0); - - // TODO: - // void Output_DG_tris(); // render the DG elements - void Output_Mesh(); // render the mesh - - void OutputSampleXYZ(int sample_N, DMat &newX, DMat &newY, DMat &newZ, - const DMat &FData, DMat &newFData, int zfield=0); - void OutputSampleELMT3D(int sample_N, IMat& ELMT); - void OutputNodes(bool bFaceNodes=false); - - void PlotContour3D(int nn, const DVec& field, const DVec& cntrs); - - -protected: - - //------------------------------------- - // member data - //------------------------------------- - int sim_type; // select simulation mode - int flux_type; // select flux type - int Nfields; // number of solution fields - Strings sol_names; // names for solution fields - string class_name; // identify without RTTI - - - //------------------------------------------------------- - // N[*] : number of unpaired data points on [*] boundary - //------------------------------------------------------- - int Ninflow, Noutflow, Nwall, Nfar, Ncyl; - int Ndirichlet, Nneuman, Nslip; - - int m_Np_K; // was m_Npts_Nel - int m_Nfp_Nfaces_K; // was m_Nfq_Nfaces_Nel - int m_Nfp_Nfaces; // was m_Nfq_Nfaces - int m_Np_Nfields; // was m_Npts_Nfields - - stopwatch timer; // timer class - string FileName; // gambit .neu-format mesh file - double m_eps; // machine precision - double ti0,ti1,tw1,trhs; // time data - double time_rhs, // time for evaluating RHS - time_rhs_c, // time to adjust for curved elements - time_flux, // time to evaluate flux - time_upw, // time to evaluate eigen-flux - time_bc, // time to evaluate BCs - time_source, // time to evaluate source terms - time_iter, // time for 1 iteration - time_limit, // time used by "limiters" - time_work, // total NDG++ time - time_total; // total simulation time - - int Nreport; // frequency of reporting - int Nrender; // frequency of rendering - int Nplotfield; // selected field to plot - int NvtkInterp; // Vtk interpolation order - DMat Q_plot; // storage for fields to render - DVec dtscale; // stepsize calculation - DMat m_Filter; // filter - - // boolean flags - bool m_bMenuLoaded; - bool m_bStationary; - bool m_bHasAnalyticSol; - bool m_bArgsSet; - bool m_bSummaryShown; - bool m_bHeaderShown; - bool m_bContinue; - bool m_bUserStop; - bool m_bDoTest; - bool m_bUseAMR; - bool m_bAdapted; - bool m_bApplyFilter; - - // iteritive h-refinement of default mesh - int Nrefine, refine_count; - - // error analysis - double m_maxAbsError; - DVec m_ErrAnalytic; - DVec m_ErrEstimate; - - //------------------------------------- - // static member data - //------------------------------------- - static int N3Dobjects; // count of active simulators - static int PlotNumber; // accumulated plot count - static double TotalSimTime; // accumulate time for multiple runs -}; - -extern NDG3D* g_D3; // global pointer - -#endif // NDG__NDG_333D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/NDGLib_headers.h b/cpp/nudg++/trunk/Include/NDGLib_headers.h deleted file mode 100644 index 0a78453..0000000 --- a/cpp/nudg++/trunk/Include/NDGLib_headers.h +++ /dev/null @@ -1,46 +0,0 @@ -// NDGLib_headers.h -// file for pre-compiling headers -// 2007/06/06 -//--------------------------------------------------------- -#ifndef NDGLib__headers_H__INCLUDED -#define NDGLib__headers_H__INCLUDED - -#include -#include -#include -#include -#include - -using std::cout; -using std::cin; -using std::cerr; -using std::endl; -using std::ends; -using std::string; -using std::istream; -using std::ifstream; -using std::ostream; -using std::ofstream; -using std::stringstream; - -#include -#include -#include -#include -#include -#include -#include - -#include "Global_funcs.h" -#include "Constants.h" -#include "LOG.h" -#include "Mat_COL.h" -#include "Mat_DIAG.h" -#include "Cub2D.h" -#include "Cub3D.h" - -// sparse matrix -//#include "CS_Type.h" - - -#endif // NDGLib__headers_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/NDG_headers.h b/cpp/nudg++/trunk/Include/NDG_headers.h deleted file mode 100644 index cca53a2..0000000 --- a/cpp/nudg++/trunk/Include/NDG_headers.h +++ /dev/null @@ -1,23 +0,0 @@ -// NDG_headers.h -// -// 2006/12/15 -//--------------------------------------------------------- -#ifndef NDG__headers_H__INCLUDED -#define NDG__headers_H__INCLUDED - - -#include "LOG_funcs.h" - -// forward declarations -bool InitGlobalInfo(); -void FreeGlobalInfo(); - -#ifdef WIN32 -// process management routines -#include -// clear {min,max} macros -#undef min -#undef max -#endif - -#endif // NDG__headers_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/NonConInfo2D.h b/cpp/nudg++/trunk/Include/NonConInfo2D.h deleted file mode 100644 index de998e9..0000000 --- a/cpp/nudg++/trunk/Include/NonConInfo2D.h +++ /dev/null @@ -1,89 +0,0 @@ -// NonConInfo2D.h -// -// 2007/08/18 -//--------------------------------------------------------- -#ifndef NDG__NonConInfo2D_H__INCLUDED -#define NDG__NonConInfo2D_H__INCLUDED - - -// forward -class PInfo; -class FInfo; - -#include -typedef std::vector FInfoV; // face info for H non-con -typedef std::vector PInfoV; // mode info for P non-con - - -//--------------------------------------------------------- -class PInfo -//--------------------------------------------------------- -{ - // information for N'th order elements -public: - - PInfo(int maxN) - : Nmax(maxN), Np(0), Nfp(0), K(0) - { - // allow 1-based indexing of the following - // arrays, by skipping element[0] in each - - interpP = new DMat[Nmax+1]; assert(interpP); - fmapM = new IVec[Nmax+1]; assert(fmapM); - vmapP = new IMat[Nmax+1]; assert(vmapP); - } - - ~PInfo() { - if (interpP) { delete [] interpP; interpP=NULL; } - if (fmapM) { delete [] fmapM; fmapM=NULL; } - if (vmapP) { delete [] vmapP; vmapP=NULL; } - } - - PInfo& operator=(const PInfo& B) { - Np=B.Np; Nfp=B.Nfp; K=B.K; - Fmask=B.Fmask; ids=B.ids; ks=B.ks; mapW=B.mapW; - r=B.r; s=B.s; Dr=B.Dr; Ds=B.Ds; LIFT=B.LIFT; V=B.V; - rx=B.rx; ry=B.ry; sx=B.sx; sy=B.sy; J=B.J; sJ=B.sJ; - x=B.x; y=B.y; nx=B.nx; ny=B.ny; Fscale=B.Fscale; - // TODO: copy interpP, fmapM, vmapP, ... - return (*this); - } - -public: - int Nmax,Np,Nfp,K; - IMat Fmask,ids,tri; - IVec ks,mapW; - DVec r,s; - DMat Dr,Ds,LIFT,V; - DMat rx,ry,sx,sy,J,sJ; - DMat x,y,nx,ny,Fscale; - - DMat* interpP; // interp matrices for all necessary orders. - IVec* fmapM; // used as 1D vector of ids, each possible order - IMat* vmapP; // used as 2D matrix of ids, each possible order -}; - - -//--------------------------------------------------------- -class FInfo -//--------------------------------------------------------- -{ - // information for non-conforming faces -public: - - FInfo() : elmtM(0),elmtP(0),faceM(0),faceP(0),nx(0.0),ny(0.0) {} - ~FInfo() {} - - FInfo& operator=(const FInfo& B) { - elmtM=B.elmtM; elmtP=B.elmtP; faceM=B.faceM; faceP=B.faceP; - nx=B.nx; ny=B.ny; gVM=B.gVM; gVP=B.gVP; lift=B.lift; - return (*this); - } - -public: - int elmtM,elmtP, faceM,faceP; - double nx,ny; - DMat gVM, gVP, lift; -}; - -#endif // NDG__NonConInfo2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/OpStructs2D.h b/cpp/nudg++/trunk/Include/OpStructs2D.h deleted file mode 100644 index ffd4fb7..0000000 --- a/cpp/nudg++/trunk/Include/OpStructs2D.h +++ /dev/null @@ -1,85 +0,0 @@ -// OpStructs2D.h -// -// 2007/08/27 -//--------------------------------------------------------- -#ifndef NDG__OpStructs2D_H__INCLUDED -#define NDG__OpStructs2D_H__INCLUDED - -#include "CS_Type.h" - -// forward -// class DGops2D -// class BCops2D - - -//--------------------------------------------------------- -class DGops2D -//--------------------------------------------------------- -{ - // information for N'th order elements -public: - - DGops2D() : Nfp(0), K(0) {} - ~DGops2D() { } - - // DGops2D& operator=(const DGops2D& I) - // { this->K = I.K; umERROR("DGops2D& operator=()", "TODO"); return (*this); } - - // resize member arrays - void resize(int bc_Nfp, int bc_K) - { - this->Nfp = bc_Nfp; - this->K = bc_K; - - map.resize(Nfp, K); - elmts.resize(K); - faces.resize(K); - - Diff.resize(Nfp*Nfp, K); // zeros(Nfp, Nfp, bc.K); - LIFT.resize(Nfp* 2, K); // zeros(Nfp, 2, bc.K); - - x.resize(Nfp, K); - y.resize(Nfp, K); - H.resize(K); - signedH.resize(K); - normal.resize(2,K); - mapB.resize(2); - } - -public: - - // 1D dg systems for each edge - int Nfp, K; - DMat x,y, fx,fy, normal, Diff, LIFT; - DMat genDiff, genLIFT, genInvJac, genSignedInvJac; - DVec H, signedH; - - IMat map, vmap, vvmapM, vvmapP; - IVec elmts, faces, mapB, vmapB; -}; - - -//--------------------------------------------------------- -class BCops2D -//--------------------------------------------------------- -{ - // information for N'th order elements -public: - - BCops2D() : q(0) {} - ~BCops2D() {} - - int q; - - // Boundary matrices {E,N,W,S} and LU factors - CSd eA,eB,eC, nA,nB,nC, wA,wB,wC, sA,sB,sC; - CS_LU eLU, nLU, wLU, sLU; - - // Boundary matrices {NE,NW,SW,SE} and LU factors - CSd neA,neC, nwA,nwC, swA,swC, seA,seC; - CS_LU neLU, nwLU, swLU, seLU; - - DVec nG, eG, wG, sG; -}; - -#endif // NDG__OpStructs2D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Poly3D.h b/cpp/nudg++/trunk/Include/Poly3D.h deleted file mode 100644 index d91319d..0000000 --- a/cpp/nudg++/trunk/Include/Poly3D.h +++ /dev/null @@ -1,50 +0,0 @@ -// Poly3D.h -// -// 2007/10/18 -//--------------------------------------------------------- -#ifndef NDG__Poly3D_H__INCLUDED -#define NDG__Poly3D_H__INCLUDED - - -// #define FAST_POLY3D 1 - -#include "Mat_Col.h" -#include "MatObj_Type.h" -#include "VecObj_Type.h" - - -//--------------------------------------------------------- -class Poly3D -//--------------------------------------------------------- -{ -public: - Poly3D(); - Poly3D(const Poly3D& p); - ~Poly3D(); - - Poly3D& operator=(const Poly3D& p); - - void Clear(); - bool HavePoint(const DVec& point); - void AddPoint(const DVec& point); - void AddTriangle(const DVec& v1, const DVec& v2, const DVec& v3); - void BuildTriangles(); - void SortPoints(const DVec& cent); - -public: - int m_N, m_Ntri; - DM m_xyz, m_x, m_y, m_z; - DV m_areas; - static int s_Npolys; -}; - - -// helper routines for class Poly3D (see file Poly3D.cpp) - -bool IntersectTest3D (const DM& x1, const DM& x2, Poly3D& poly); -bool PointInTri3D (const DM& tri, const DVec& point); -double TriArea3D (const DVec& Xa, const DVec& Xb, const DVec& Xc); -bool EdgeIntersect3D (const DVec& a1, const DVec& b1, const DVec& a2, const DVec& b2, DVec& xint); - - -#endif // NDG__Poly3D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/RAND.h b/cpp/nudg++/trunk/Include/RAND.h deleted file mode 100644 index 3a1da63..0000000 --- a/cpp/nudg++/trunk/Include/RAND.h +++ /dev/null @@ -1,46 +0,0 @@ -// RAND.h -// -// 2006/10/15 -//--------------------------------------------------------- -#ifndef NDG__RAND_H__INCLUDED -#define NDG__RAND_H__INCLUDED - -#include -#include -#include - - -// manage random numbers -//--------------------------------------------------------- -class umRAND -//--------------------------------------------------------- -{ - double inv_RandMax; - - umRAND() - : inv_RandMax(1.0/double(RAND_MAX)) - { - srand ((unsigned int)(time(NULL))); - } - - double make_rand(double from, double to) const - { - static double dMin=0.0, dMax=0.0; - dMin = std::min(from, to); - dMax = std::max(from, to); - double nr = (double)(rand()); - //return dMin + nr * (dMax - dMin) / m_RandMax; - return dMin + nr * (dMax - dMin) * inv_RandMax; - } - -public: - ~umRAND() {} - - static double get_rand(double from=0.0, double to=1.0) - { - static umRAND r; - return r.make_rand(from, to); - } -}; - -#endif // NDG__RAND_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/ROHOP3D.h b/cpp/nudg++/trunk/Include/ROHOP3D.h deleted file mode 100644 index 818fe8b..0000000 --- a/cpp/nudg++/trunk/Include/ROHOP3D.h +++ /dev/null @@ -1,109 +0,0 @@ -// ROHOP3D.h -// -// 2007/10/05 -//--------------------------------------------------------- -#ifndef NDG__ROHOP3D_H__INCLUDED -#define NDG__ROHOP3D_H__INCLUDED - -#include "NDG3D.h" -#include "FaceData3D.h" // typedef "FaceMat" - - -//--------------------------------------------------------- -class ROHOP3D : public NDG3D -//--------------------------------------------------------- -{ -public: - ROHOP3D(); - virtual ~ROHOP3D(); - virtual void Driver(); - -protected: - - virtual void Run(); - - DMat& RHS (const DMat& xi, const DMat& yi, const DMat& zi, - const DMat& xc, const DMat& yc, const DMat& zc); - - virtual void Resize(); - virtual void InitRun(); - virtual void Summary(); - virtual void Report(bool bForce=false); - virtual void FinalReport(); - - void ClearFaceData(); - void FindNonCon3D(); - void NonConPoissonIPDG3D(CSd& spOP, CSd& spMM); - void BuildResultsTable(); - - // exactu, exactdudx, exactdudy, exactdudz, // function pointers - DVec& IPDGErrorNorm3D(const DMat& uh, double tfac); - - DVec& ExactSol(const DMat& xi, const DMat& yi, const DMat& zi, - const DMat& xc, const DMat& yc, const DMat& zc); - - // functions used by IPDGErrorNorm3D - DVec& exactu (const DVec& xi, const DVec& yi, const DVec& zi); - DVec& exactdudx(const DVec& xi, const DVec& yi, const DVec& zi); - DVec& exactdudy(const DVec& xi, const DVec& yi, const DVec& zi); - DVec& exactdudz(const DVec& xi, const DVec& yi, const DVec& zi); - - // neighbors, ROHOPbcD3D, ROHOPbcN3D - void BdryTerms(const DMat& U, double tol, int NGauss, double tfac); - - // functions used by BdryTerms (was ROHOPterms3D) - DVec& ubcD(const DVec& xi, const DVec& yi, const DVec& zi); - DVec& ubcN(const DVec& xi, const DVec& yi, const DVec& zi); - - -protected: - - double m_theta,m_delt,m_tfac; - int m_test, Nloop; - - DVec Ndof,AVEetaE1,AVEetaE2,AVEetaE3,AVEetaE4; - DVec AVEoscT,AVEoscN,AVEoscD,AVEetaT,AVEoscTf; - DVec sumerr,sumosc, M1T, M2T, M1E,M2E; - - IVec saveK; - DVec saveMAXERROR; - - // typedef MatObj FaceMat; - FaceMat noncon; - double nc_tol; - - DMat etaE, etaE1, etaE2, etaE3, etaE4; - DMat osc, oscD, oscN; - - -#if (0) - - //------------------------------------- - // member data - //------------------------------------- - double alpha, mmode, nmode, xmode, ymode; - - DMat Hx, Hy, Hz, Ex, Ey, Ez; - DMat dHx, dHy, dHz, dEx, dEy, dEz; - DMat rhsHx, rhsHy, rhsHz, rhsEx, rhsEy, rhsEz; - DMat resHx, resHy, resHz, resEx, resEy, resEz; - DMat fluxHx,fluxHy,fluxHz,fluxEx,fluxEy,fluxEz; - - // local spatial derivatives - DMat curlHx, curlHy, curlHz, curlEx, curlEy, curlEz; - DMat ndotdH, ndotdE; - - DMat Ezinit; // store initial conditions - DMat EzAnal; // analytic solution - DMat errEz; // error estimate - - DVec sampleweights; // data for monitoring - int sampletet; // selected sample point - - DVec sampleEz; // Ez(t) at sample point - DVec sampleT; // time for each Ez(t) - -#endif -}; - -#endif // NDG__ROHOP3D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Region1D.h b/cpp/nudg++/trunk/Include/Region1D.h deleted file mode 100644 index 7914846..0000000 --- a/cpp/nudg++/trunk/Include/Region1D.h +++ /dev/null @@ -1,456 +0,0 @@ -// Region1D.h -// 1D sub-regions of vectors -// 2007/10/16 -//--------------------------------------------------------- -#ifndef NDG__Region1D_H__INCLUDED -#define NDG__Region1D_H__INCLUDED - -#include -#include - -#include "ArrayMacros.h" -#include "Index.h" - - -#define USE_BLAS_REGION 0 - -// declare "const" version -template class const_Region1D; - -//--------------------------------------------------------- -template -class Region1D -//--------------------------------------------------------- -{ -protected: - - Array1D & A_; - int offset_; // 0-based - int dim_; - -public: - - // typedef's for std::compatibility - - // data type of referenced array - typedef typename Array1D::data_type T; - - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - - const Array1D & array() const { return A_; } - Array1D & array() { return A_; } - - int lbound() const { return A_.lbound(); } - int offset(int i=1) const { return offset_;} - int dim (int i=1) const { return dim_; } - int size () const { return dim_; } - const char* name() const { return A_.name(); } - - - Region1D(Array1D &V, int i1, int i2) - : A_(V) - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i1 ); - assert(i2 <= V.dim() + (lbound()-1)); - assert(i1 <= i2); -#endif - - offset_ = i1 - lbound(); - dim_ = i2-i1 + 1; - } - - - Region1D(Array1D &V, const Index1D &I) - : A_(V) - { -#if (CHECK_ARRAY_INDEX) - assert( lbound() <= I.lbound()); - assert(I.ubound() <= V.dim() + (lbound()-1)); - assert(I.lbound() <= I.ubound()); -#endif - - offset_ = I.lbound() - lbound(); - dim_ = I.ubound() - I.lbound() + 1; - } - - - Region1D(Region1D &V, int i1, int i2) - : A_(V.A_) - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i1); - assert(i2 <= V.dim() + (lbound()-1)); - assert(i1 <= i2); -#endif - - // (old-offset) (new-offset) - // - offset_ = (i1 - lbound()) + V.offset_; - dim_ = i2-i1 + 1; - } - - - Region1D operator()(int i1, int i2) - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i1); - assert(i2 <= dim() + (lbound()-1)); - assert(i1 <= i2); -#endif - - // offset_ is 0-based - return Region1D(A_, i1+offset_, offset_ + i2); - } - - - Region1D operator()(const Index1D &I) - { -#if (CHECK_ARRAY_INDEX) - assert( lbound() <= I.lbound()); - assert(I.ubound() <= dim() + (lbound()-1)); - assert(I.lbound() <= I.ubound()); -#endif - - return Region1D(A_, I.lbound()+offset_, - I.ubound()+offset_); - } - - - T & operator()(int i) - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i); - assert(i <= dim() + (lbound()-1)); -#endif - - return A_(i+offset_); - } - - - const T & operator() (int i) const - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i); - assert(i <= dim() + (lbound()-1)); -#endif - - return A_(i+offset_); - } - - - Region1D & operator=(const Array1D &B) - { - // make sure both sides conform - assert(dim() == B.dim()); - int N=dim(), istart=lbound(); - int iend = istart + N-1; - -#if (USE_BLAS_REGION) - //##################################################### - if (sizeof(T) == sizeof(double)) { - const double* p = (const double*)B.data(); // source - double* my_v=(double*)(A_.data())+offset_; // destination - COPY(N, p, 1, my_v, 1); - } - // else ... - //##################################################### -#else - for (int i=istart; i<=iend; ++i) - (*this)(i) = B(i); -#endif - - if (B.get_mode() == OBJ_temp) {delete (&B);} // clean up temps - return *this; - } - - - Region1D & operator=(const Region1D &R) - { - // make sure both sides conform - assert(dim() == R.dim()); - int N = dim(); - int istart = lbound(); - int iend = istart + N-1; - for (int i=istart; i<=iend; ++i) - (*this)(i) = R(i); - - return *this; - } - - - Region1D & operator=(const const_Region1D &R) - { - // make sure both sides conform - assert(dim() == R.dim()); - int N = dim(); - int istart = lbound(); - int iend = istart + N-1; - for (int i=istart; i<=iend; ++i) - (*this)(i) = R(i); - - return *this; - } - - - //------------------------------------- - // Apply scalar to each mapped element - //------------------------------------- - - Region1D & operator=(const T& t) - { - int N=dim(), istart = lbound(); - int iend = istart + N-1; - for (int i=istart; i<= iend; ++i) - (*this)(i) = t; - - return *this; - } - - Region1D & operator += (const T& t) - { - int N=dim(), istart = lbound(); - int iend = istart + N-1; - for (int i=istart; i<= iend; ++i) - (*this)(i) += t; - - return *this; - } - - Region1D & operator -= (const T& t) - { - int N=dim(), istart = lbound(); - int iend = istart + N-1; - for (int i=istart; i<= iend; ++i) - (*this)(i) -= t; - - return *this; - } - - Region1D & operator *= (const T& t) - { - int N=dim(), istart = lbound(); - int iend = istart + N-1; - for (int i=istart; i<= iend; ++i) - (*this)(i) *= t; - - return *this; - } - - Region1D & operator /= (const T& t) - { - int N=dim(), istart = lbound(); - int iend = istart + N-1; - for (int i=istart; i<= iend; ++i) - (*this)(i) /= t; - - return *this; - } - - - //------------------------------------- - // arithmetic operators += , -= - //------------------------------------- - - Region1D & operator += (const Array1D &B) - { - int Nv = this->size(); - assert(Nv == B.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) += B(i); - - if (B.get_mode() == OBJ_temp) {delete (&B);} // delete temps - return *this; - } - - Region1D & operator -= (const Array1D &B) - { - int Nv = this->size(); - assert(Nv == B.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) -= B(i); - - if (B.get_mode() == OBJ_temp) {delete (&B);} // delete temps - return *this; - } - - Region1D & operator += (const Region1D &R) - { - int Nv = this->size(); - assert(Nv == R.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) += R(i); - - return *this; - } - - Region1D & operator -= (const Region1D &R) - { - int Nv = this->size(); - assert(Nv == R.size()); - for (int i=1; i<=Nv; ++i) - (*this)(i) -= R(i); - - return *this; - } - -}; - - - -//--------------------------------------------------------- -template -class const_Region1D -//--------------------------------------------------------- -{ -protected: - - const Array1D & A_; - int offset_; // 0-based - int dim_; - -public: - - // data type of referenced array - typedef typename Array1D::data_type T; - - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - const Array1D & array() const { return A_; } - - int lbound() const { return A_.lbound(); } - int offset(int i=1) const { return offset_; } - int dim (int i=1) const { return dim_; } - int size () const { return dim_; } - const char* name() const { return A_.name(); } - - - const_Region1D(const Array1D &V, int i1, int i2) - : A_(V) - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i1 ); - assert(i2 <= V.dim() + (lbound()-1)); - assert(i1 <= i2); -#endif - - offset_ = i1 - lbound(); - dim_ = i2-i1 + 1; - } - - const_Region1D(const Array1D &V, const Index1D &I) - : A_(V) - { -#if (CHECK_ARRAY_INDEX) - assert( lbound() <= I.lbound()); - assert(I.ubound() <= V.dim() + (lbound()-1)); - assert(I.lbound() <= I.ubound()); -#endif - - offset_ = I.lbound() - lbound(); - dim_ = I.ubound() - I.lbound() + 1; - } - - - const_Region1D(const_Region1D &V, int i1, int i2) - : A_(V.A_) - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i1); - assert(i2 <= V.dim() + (lbound()-1)); - assert(i1 <= i2); -#endif - - // (old-offset) (new-offset) - // - offset_ = (i1 - lbound()) + V.offset_; - dim_ = i2-i1 + 1; - } - - - const_Region1D operator()(int i1, int i2) - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i1); - assert(i2 <= dim() + (lbound()-1)); - assert(i1 <= i2); -#endif - - // offset_ is 0-based - return const_Region1D(A_, i1+offset_, offset_ + i2); - } - - - const_Region1D operator()(const Index1D &I) - { -#if (CHECK_ARRAY_INDEX) - assert( lbound() <= I.lbound()); - assert(I.ubound() <= dim() + (lbound()-1)); - assert(I.lbound() <= I.ubound()); -#endif - - return const_Region1D(A_, I.lbound()+offset_, - I.ubound()+offset_); - } - - - const T & operator() (int i) const - { -#if (CHECK_ARRAY_INDEX) - assert(lbound() <= i); - assert(i <= dim() + (lbound()-1)); -#endif - - return A_(i+offset_); - } - -}; - - - -//--------------------------------------------------------- -// I/O : non-const Region1D -//--------------------------------------------------------- -template -std::ostream& operator<<(std::ostream &s, Region1D &R) -{ - int N = R.dim(); - int istart = R.lbound(); - int iend = N - 1 + R.lbound(); - for (int i=istart; i<=iend; i++) - s << R(i) << std::endl; - - return s; -} - - -//--------------------------------------------------------- -// I/O : const Region1D -//--------------------------------------------------------- -template -std::ostream& operator<<(std::ostream &s, const_Region1D &R) -{ - int N = R.dim(); - int istart = R.lbound(); - int iend = N - 1 + R.lbound(); - for (int i=istart; i<=iend; i++) - s << R(i) << std::endl; - - return s; -} - - -#endif // NDG__Region1D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Region2D.h b/cpp/nudg++/trunk/Include/Region2D.h deleted file mode 100644 index 4bdc9dd..0000000 --- a/cpp/nudg++/trunk/Include/Region2D.h +++ /dev/null @@ -1,596 +0,0 @@ -// Region2D.h -// 2D sub-regions of matrices -// 2007/10/16 -//--------------------------------------------------------- -#ifndef NDG__Region_22D_H__INCLUDED -#define NDG__Region_22D_H__INCLUDED - -#include -#include - -#include "ArrayMacros.h" -#include "Index.h" - - -// declare "const" version -template class const_Region2D; - -//--------------------------------------------------------- -template class Region2D -//--------------------------------------------------------- -{ -protected: - - Array2D & A_; - int offset_[2]; // 0-based - int dim_[2]; - -public: - - // typedef's for std::compatibility - - // data type of referenced array - typedef typename Array2D::m_data_type T; - - typedef T value_type; - typedef T element_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - Array2D & array() { return A_; } - const Array2D & array() const { return A_; } - - int lbound() const { return A_.lbound(); } - int size() const { return A_.size(); } - int num_rows() const { return dim_[0]; } - int num_cols() const { return dim_[1]; } - const char* name() const { return A_.name(); } - - int offset(int i) const // 1-offset - { -#if (CHECK_ARRAY_INDEX) - assert( A_.lbound() <= i); - assert( i<= dim_[0] + A_.lbound()-1); -#endif - return offset_[i-A_.lbound()]; - } - - int dim(int i) const - { - umWARNING("FIXME: Region2D""dim(%d)", "checking who calls this code?", i); - -#if (1) - return dim_[i-A_.lbound()]; -#else - return (1==i)?dim_[0]:dim_[1]; -#endif - } - - - Region2D(Array2D &A, int i1, int i2, - int j1, int j2) - : A_(A) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( A.lbound() <= i1); - assert( i2<= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= j1); - assert( j2<= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = i1-A.lbound(); - offset_[1] = j1-A.lbound(); - dim_[0] = i2-i1+1; - dim_[1] = j2-j1+1; - } - - Region2D(Array2D &A, const Index1D &I, - const Index1D &J) - : A_(A) - { -#if (CHECK_ARRAY_INDEX) - assert( I.lbound() <= I.ubound() ); - assert( J.lbound() <= J.ubound() ); - assert( A.lbound() <= I.lbound() ); - assert( I.ubound() <= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= J.lbound() ); - assert( J.ubound() <= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = I.lbound()-A.lbound(); - offset_[1] = J.lbound()-A.lbound(); - dim_[0] = I.ubound() - I.lbound() + 1; - dim_[1] = J.ubound() - J.lbound() + 1; - } - - - Region2D(Region2D &A, int i1, int i2, - int j1, int j2) - : A_(A.A_) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( A.lbound() <= i1); - assert( i2 <= A.dim(A.lbound()) + A.lbound()-1); - assert( A.lbound() <= j1); - assert( j2 <= A.dim(A.lbound()+1) + A.lbound()-1 ); -#endif - - offset_[0] = (i1 - A.lbound()) + A.offset_[0]; - offset_[1] = (j1 - A.lbound()) + A.offset_[1]; - dim_[0] = i2-i1 + 1; - dim_[1] = j2-j1 + 1; - } - - Region2D operator()(int i1, int i2, - int j1, int j2) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( A_.lbound() <= i1); - assert( i2 <= dim_[0] + A_.lbound()-1); - assert( A_.lbound() <= j1); - assert( j2 <= dim_[1] + A_.lbound()-1 ); -#endif - - return Region2D(A_, i1+offset_[0], offset_[0] + i2, - j1+offset_[1], offset_[1] + j2); - } - - - Region2D operator()(const Index1D &I, const Index1D &J) - { -#if (CHECK_ARRAY_INDEX) - assert( I.lbound() <= I.ubound() ); - assert( J.lbound() <= J.ubound() ); - assert( A_.lbound()<= I.lbound()); - assert( I.ubound() <= dim_[0] + A_.lbound()-1); - assert( A_.lbound()<= J.lbound()); - assert( J.ubound() <= dim_[1] + A_.lbound()-1 ); -#endif - - return Region2D(A_, I.lbound()+offset_[0], - offset_[0] + I.ubound(), offset_[1]+J.lbound(), - offset_[1] + J.ubound()); - } - - - inline T& operator()(int i, int j) - { -#if (CHECK_ARRAY_INDEX) - assert( A_.lbound() <= i); - assert( i <= dim_[0] + A_.lbound()-1); - assert( A_.lbound() <= j); - assert( j <= dim_[1] + A_.lbound()-1 ); -#endif - - return A_(i+offset_[0], j+offset_[1]); - } - - inline const T& operator() (int i, int j) const - { -#if (CHECK_ARRAY_INDEX) - assert( A_.lbound() <= i); - assert( i<= dim_[0] + A_.lbound()-1); - assert( A_.lbound() <= j); - assert( j<= dim_[1] + A_.lbound()-1 ); -#endif - - return A_(i+offset_[0], j+offset_[1]); - } - - - Region2D& operator=(const Region2D &R) - { - int M = num_rows(); - int N = num_cols(); - - // make sure both sides conform - assert(M == R.num_rows()); - assert(N == R.num_cols()); - - int start = R.lbound(); - int Mend = start + M - 1; - int Nend = start + N - 1; - - for (int j=start; j<=Nend; ++j) - for (int i=start; i<=Mend; ++i) - (*this)(i,j) = R(i,j); - - return *this; - } - - Region2D& operator=(const const_Region2D &R) - { - int M = num_rows(); - int N = num_cols(); - - // make sure both sides conform - assert(M == R.num_rows()); - assert(N == R.num_cols()); - - int start = R.lbound(); - int Mend = start + M - 1; - int Nend = start + N - 1; - - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) = R(i,j); - - return *this; - } - - Region2D& operator=(const Array2D &R) - { - int M = num_rows(); - int N = num_cols(); - - // make sure both sides conform - assert(M == R.num_rows()); - assert(N == R.num_cols()); - - int start = R.lbound(); - int Mend = start + M - 1; - int Nend = start + N - 1; - - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) = R(i,j); - - // if R is temporary, delete it. - if (R.get_mode() == OBJ_temp) - delete (&R); - - return *this; - } - - Region2D& operator=(const Vector &V) - { - // this Region2D maps one "row" of a matrix - // load a vector into this row: - - int M=num_rows(), N=num_cols(); - - // make sure both sides conform - assert( 1 == M); - assert(V.size() == N); - - for (int j=1; j<=N; ++j) - (*this)(1,j) = V(j); - - // if V is temporary, delete it. - if (V.get_mode() == OBJ_temp) {delete (&V);} - return *this; - } - - - //------------------------------------- - // Apply scalar to each mapped element - //------------------------------------- - - Region2D& operator=(const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) = t; - - return *this; - } - - Region2D& operator += (const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) += t; - - return *this; - } - - Region2D& operator -= (const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) -= t; - - return *this; - } - - Region2D& operator *= (const T& t) - { - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) *= t; - - return *this; - } - - Region2D& operator /= (const T& t) - { - assert (T(0) != t); - int start = lbound(); - int Mend = lbound() + num_rows() - 1; - int Nend = lbound() + num_cols() - 1; - - for (int j=start; j<=Nend; ++j) // assume col-major - for (int i=start; i<=Mend; ++i) - (*this)(i,j) /= t; - - return *this; - } - - - //------------------------------------- - // arithmetic operators += , -= - //------------------------------------- - - Region2D & operator += (const Array2D &B) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == B.num_rows()); // assume both sides conform - assert(N == B.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) += B(i,j); - - if (B.get_mode() == OBJ_temp) {delete (&B);} // clean up temps - return *this; - } - - Region2D & operator -= (const Array2D &B) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == B.num_rows()); // assume both sides conform - assert(N == B.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) -= B(i,j); - - if (B.get_mode() == OBJ_temp) {delete (&B);} // clean up temps - return *this; - } - - Region2D & operator += (const Region2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) += R(i,j); - - return *this; - } - - Region2D & operator -= (const Region2D &R) - { - int M = this->num_rows(); // num. mapped rows - int N = this->num_cols(); // num. mapped cols - assert(M == R.num_rows()); // assume both sides conform - assert(N == R.num_cols()); - - for (int j=1; j<=N; ++j) - for (int i=1; i<=M; ++i) - (*this)(i,j) -= R(i,j); - - return *this; - } - -}; - - - -//--------------------------------------------------------- -template -class const_Region2D -//--------------------------------------------------------- -{ -protected: - - const Array2D & A_; - int offset_[2]; // 0-based - int dim_[2]; - -public: - typedef typename Array2D::m_data_type T; - - typedef T value_type; - typedef T element_type; - typedef const T* const_iterator; - typedef const T& const_reference; - - const Array2D & array() const { return A_; } - int lbound() const { return A_.lbound(); } - int size() const { return A_.size(); } - int num_rows() const { return dim_[0]; } - int num_cols() const { return dim_[1]; } - const char* name() const { return A_.name(); } - - int offset(int i) const // 1-offset - { -#if (CHECK_ARRAY_INDEX) - assert( RGN_BASE_OFFSET <= i); - assert( i<= dim_[0] + RGN_BASE_OFFSET-1); -#endif - return offset_[i-RGN_BASE_OFFSET]; - } - - - int dim(int i) const - { -#if (CHECK_ARRAY_INDEX) - assert( RGN_BASE_OFFSET <= i); - assert( i<= dim_[0] + RGN_BASE_OFFSET-1); -#endif - return dim_[i-RGN_BASE_OFFSET]; - } - - - const_Region2D(const Array2D &A, int i1, int i2, - int j1, int j2) : A_(A) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( RGN_BASE_OFFSET <= i1); - assert( i2<= A.dim(RGN_BASE_OFFSET) + RGN_BASE_OFFSET-1); - assert( RGN_BASE_OFFSET <= j1); - assert( j2<= A.dim(RGN_BASE_OFFSET+1) + RGN_BASE_OFFSET-1 ); -#endif - - offset_[0] = i1-RGN_BASE_OFFSET; - offset_[1] = j1-RGN_BASE_OFFSET; - dim_[0] = i2-i1+1; - dim_[1] = j2-j1+1; - } - - const_Region2D(const Array2D &A, const Index1D &I, const Index1D &J) : A_(A) - { -#if (CHECK_ARRAY_INDEX) - assert( I.lbound() <= I.ubound() ); - assert( J.lbound() <= J.ubound() ); - assert( RGN_BASE_OFFSET <= I.lbound()); - assert( I.ubound()<= A.dim(RGN_BASE_OFFSET) + RGN_BASE_OFFSET-1); - assert( RGN_BASE_OFFSET <= J.lbound()); - assert( J.ubound() <= A.dim(RGN_BASE_OFFSET+1) + RGN_BASE_OFFSET-1 ); -#endif - - offset_[0] = I.lbound()-RGN_BASE_OFFSET; - offset_[1] = J.lbound()-RGN_BASE_OFFSET; - dim_[0] = I.ubound() - I.lbound() + 1; - dim_[1] = J.ubound() - J.lbound() + 1; - } - - - const_Region2D(const_Region2D &A, int i1, int i2, - int j1, int j2) : A_(A.A_) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( RGN_BASE_OFFSET <= i1); - assert( i2<= A.dim(RGN_BASE_OFFSET) + RGN_BASE_OFFSET-1); - assert( RGN_BASE_OFFSET <= j1); - assert( j2<= A.dim(RGN_BASE_OFFSET+1) + RGN_BASE_OFFSET-1 ); -#endif - - offset_[0] = (i1 - RGN_BASE_OFFSET) + A.offset_[0]; - offset_[1] = (j1 - RGN_BASE_OFFSET) + A.offset_[1]; - dim_[0] = i2-i1 + 1; - dim_[1] = j2-j1+1; - } - - const_Region2D operator()(int i1, int i2, int j1, int j2) - { -#if (CHECK_ARRAY_INDEX) - assert( i1 <= i2 ); - assert( j1 <= j2); - assert( RGN_BASE_OFFSET <= i1); - assert( i2<= dim_[0] + RGN_BASE_OFFSET-1); - assert( RGN_BASE_OFFSET <= j1); - assert( j2<= dim_[0] + RGN_BASE_OFFSET-1 ); -#endif - - return const_Region2D(A_, i1+offset_[0], offset_[0] + i2, - j1+offset_[1], offset_[1] + j2); - } - - const_Region2D operator()(const Index1D &I, const Index1D &J) - { -#if (CHECK_ARRAY_INDEX) - assert( I.lbound() <= I.ubound() ); - assert( J.lbound() <= J.ubound() ); - assert( RGN_BASE_OFFSET <= I.lbound()); - assert( I.ubound()<= dim_[0] + RGN_BASE_OFFSET-1); - assert( RGN_BASE_OFFSET <= J.lbound()); - assert( J.ubound() <= dim_[1] + RGN_BASE_OFFSET-1 ); -#endif - - return const_Region2D(A_, I.lbound()+offset_[0], offset_[0] + I.ubound(), - offset_[1]+J.lbound(), offset_[1] + J.ubound()); - } - - inline const T & operator() (int i, int j) const - { -#if (CHECK_ARRAY_INDEX) - assert( RGN_BASE_OFFSET <= i); - assert( i<= dim_[0] + RGN_BASE_OFFSET-1); - assert( RGN_BASE_OFFSET <= j); - assert( j<= dim_[1] + RGN_BASE_OFFSET-1 ); -#endif - return A_(i+offset_[0], j+offset_[1]); - } - -}; - - -//--------------------------------------------------------- -// std::ostream algorithms -//--------------------------------------------------------- - -template -std::ostream& operator<<(std::ostream &s, const const_Region2D &A) -{ - int start = A.lbound(); - int Mend=A.lbound()+ A.num_rows() - 1; - int Nend=A.lbound() + A.num_cols() - 1; - - s << A.num_rows() << " " << A.num_cols() << "\n"; - for (int i=start; i<=Mend; ++i) { - for (int j=start; j<=Nend; ++j) { - s << A(i,j) << " "; - } - s << "\n"; - } - s.flush(); - return s; -} - - -template -std::ostream& operator<<(std::ostream &s, const Region2D &A) -{ - int start = A.lbound(); - int Mend=A.lbound()+ A.num_rows() - 1; - int Nend=A.lbound() + A.num_cols() - 1; - - s << A.num_rows() << " " << A.num_cols() << "\n"; - for (int i=start; i<=Mend; ++i) { - for (int j=start; j<=Nend; ++j) { - s << A(i,j) << " "; - } - s << "\n"; - } - s.flush(); - return s; -} - -#endif // NDG__Region_22D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Registry_Type.h b/cpp/nudg++/trunk/Include/Registry_Type.h deleted file mode 100644 index b807c00..0000000 --- a/cpp/nudg++/trunk/Include/Registry_Type.h +++ /dev/null @@ -1,819 +0,0 @@ -// Registry_Type.h -// manage a registry of dense arrays -// 2007/10/06 -//--------------------------------------------------------- -#ifndef NDG__Registry_Type_H__INCLUDED -#define NDG__Registry_Type_H__INCLUDED - - -#ifdef _DEBUG -#define SHOW_Reg_ALLOC 1 -#define CHECK_Reg_ALLOC 1 -#else -#define SHOW_Reg_ALLOC 0 -#define CHECK_Reg_ALLOC 0 -#endif - -#include "LOG_funcs.h" - - -// Select sizes for the two small, -// preallocated registries: - -const int iReg_small = 16; // (M,N)=( 4, 4) -//const int iReg_med = 256; // (M,N)=(16,16) - const int iReg_med = 512; // (M,N)=(16,32) -//const int iReg_med = 1024; // (M,N)=(32,32) - -typedef enum { - umREG_SMALL = 0, - umREG_MEDIUM = 1, - umREG_GENERAL = 2 -} umREG_size; - - -//--------------------------------------------------------- -template -class umRegistry -//--------------------------------------------------------- -{ -protected: - - T **dbase; - int *curlen; - int *maxlen; - bool *inuse; - - int num_alloc; - int MAX_alloc; - - int m_iNextSlot; - int m_iRegSize; - bool m_bFixedSize; - -public: - umRegistry ( - int N = 200, // initial number of slots - bool bInit = false, // preallocate all elements? - int Nlen = 0); // length of preallocate arrays - - virtual ~umRegistry(); - - int size() const { return num_alloc; } - std::string get_reg_name() const; - void release_all(); // release all allocations - int compact(); // release unused allocations - void expand(); - bool can_store(int i, int N); - T* get_alloc(int N, int& user_id); - int select_length(int N); - int select_max_length(int N); - T* resize_alloc(const T* ptr, const int N, int& user_id); - int add_alloc(T *ptr, int N); - bool check_alloc(const T* ptr, const int user_id, const int N); - void free_alloc (T *& ptr, int user_id); // mark as available - void free_alloc_2(T *& ptr, int user_id); // free allocation - void show_alloc() const; -}; - - -//--------------------------------------------------------- -template -umRegistry::umRegistry -( - int N, // initial number of slots - bool bInit, // preallocate all elements? - int Nlen // length of preallocate arrays -) -//--------------------------------------------------------- -: dbase(NULL), curlen(NULL), maxlen(NULL), inuse(NULL), - num_alloc(0), MAX_alloc(0), - m_iNextSlot(0), m_iRegSize(0), m_bFixedSize(false) -{ - if (iReg_small == Nlen) { m_iRegSize = iReg_small;} // small registry - else if (iReg_med == Nlen) { m_iRegSize = iReg_med; } // medium registry - else { m_iRegSize = 0; } // arbitrary registry - -#if (SHOW_Reg_ALLOC) - // Use printf: Log files not available when static object created. - std::string msg = get_reg_name(); - if (bInit) { printf("Creating %s (%d arrays length = %d)\n", msg.c_str(), N, Nlen); } - else { printf("Creating %s (%d slots available)\n", msg.c_str(), N);} -#endif - - assert(NULL==dbase); // TODO: singleton object - MAX_alloc = N; - num_alloc = 0; - dbase = (T ** ) calloc((size_t)N, sizeof(T* )); assert(dbase); - curlen = (int* ) calloc((size_t)N, sizeof(int)); assert(curlen); - maxlen = (int* ) calloc((size_t)N, sizeof(int)); assert(maxlen); - inuse = (bool*) calloc((size_t)N, sizeof(bool)); assert(inuse); - - if (!bInit || Nlen<1) - { - // set up an empty database - - m_bFixedSize = false; - for (int i=0; i -umRegistry::~umRegistry() -//--------------------------------------------------------- -{ -#if (SHOW_Reg_ALLOC) - if (g_TRCFile && num_alloc>0) { - std::string msg = get_reg_name(); - umTRC(1, "\nReleasing %s (%d of %d used)\n", msg.c_str(), num_alloc, MAX_alloc); - } -#endif - -#if (SHOW_Reg_ALLOC) - if (g_TRCFile && num_alloc>0) { - show_alloc(); - } -#endif - - // free all allocations - int i=0; - for (i=0; i -std::string umRegistry::get_reg_name() const -//--------------------------------------------------------- -{ - static char buf[50] = {""}; - static std::string sz1; sz1 = "GENERAL"; - if (iReg_small==m_iRegSize) sz1 = "SMALL "; - else if (iReg_med ==m_iRegSize) sz1 = "MEDIUM "; - sprintf(buf, "umRegistry<%s> %s", typeid(T).name(), sz1.c_str()); - return std::string(buf); -} - - -//--------------------------------------------------------- -template -void umRegistry::release_all() -//--------------------------------------------------------- -{ - // release all allocations - umWARNING("umRegistry::release_all()", "not implemented."); - return this->size(); -} - - -//--------------------------------------------------------- -template -int umRegistry::compact() -//--------------------------------------------------------- -{ - // release unused allocations - - if (m_bFixedSize) - { -#ifndef NBEBUG - // check flags are consistent: - for (int i=0; isize(); - } - - else - { - for (int i=0; isize(); - } -} - - -//--------------------------------------------------------- -template -void umRegistry::expand() -//--------------------------------------------------------- -{ - int Nold = MAX_alloc; - - // Select amount by which to expand this registry: - int N = MAX_alloc+100; - - if (iReg_small == m_iRegSize) { - N = 2*MAX_alloc; // for the "small" registry, double its size - } else if (iReg_med == m_iRegSize) { - N = 2*MAX_alloc; // for the "medium" registry ... - } - - - bool b1=true, b2=true, b3=true, b4=true; - - assert(dbase); - - dbase = (T **) realloc(dbase, N*sizeof(T* )); b1=(dbase ?true:false); - curlen = (int*) realloc(curlen, N*sizeof(int )); b2=(curlen?true:false); - maxlen = (int*) realloc(maxlen, N*sizeof(int )); b3=(maxlen?true:false); - inuse = (bool*)realloc(inuse, N*sizeof(bool)); b4=(inuse ?true:false); - - if (!(b1 && b2 && b3 && b4)) { - umERROR("umRegistry::expand()", - "Problem expanding umRegistry<%s> from %d to %d\n", - typeid(T).name(), Nold, N); - } - - // - // initialize the new elements - // - if (m_bFixedSize) - { - // pre-allocate each slot in fixed-size registries - for (int i=Nold; i -bool umRegistry::can_store(int i, int N) -//--------------------------------------------------------- -{ - // Can allocation[i] store requested array? - if (!dbase[i]) { - return false; - } else { - return (N <= maxlen[i]) ? true : false; - } -} - - -//--------------------------------------------------------- -template -T* umRegistry::get_alloc(int N, int& user_id) -//--------------------------------------------------------- -{ - -#if (CHECK_Reg_ALLOC) - if (m_bFixedSize) { - if (iReg_small==m_iRegSize && N>iReg_small) { umERROR("umRegistry<%s>::get_alloc(%d)", "SMALL registry limted to %d", typeid(T).name(), N, iReg_small); } - else if (iReg_med ==m_iRegSize && N>iReg_med ) { umERROR("umRegistry<%s>::get_alloc(%d)", "MEDIUM registry limted to %d", typeid(T).name(), N, iReg_med); } - } -#endif - - // Get an allocation from the registry. - // If necessary, adds a new allocation. - assert(dbase); - - int max_idx = num_alloc; - if (m_bFixedSize) - max_idx = MAX_alloc; - - // start search at m_iNextSlot - for (int i=m_iNextSlot; i::get_alloc", - "Failed to realloc block (%0.3lf million elements)", - double(RLEN)/1e6); - } - - curlen[i] = N; // length of array actually in use. - maxlen[i] = RLEN; // actual length of allocation - return dbase[i]; // return pointer to this slot - } - } - else - { - m_iNextSlot = i+1; // slot[i] is taken - } - } - - //------------------------------------------------------- - // No free slots: allocate new object, add to registry - //------------------------------------------------------- - if (num_alloc < MAX_alloc) - { - user_id = num_alloc++; - m_iNextSlot = user_id+1; - - int RLEN = N; - if (!m_bFixedSize) { - // make block larger than requested to allow reuse - // for slightly larger requests in the future - //RLEN = select_length(N); - RLEN = N; // NBN: 2006/12/25 - } - - dbase [user_id] = (T*) calloc((size_t)RLEN, sizeof(T)); - curlen[user_id] = N; // current length of array in use - maxlen[user_id] = RLEN; // actual length of allocation - inuse [user_id] = true; - return dbase[user_id]; - } - else - { - this->expand(); - return get_alloc(N, user_id); - } -} - - - -//--------------------------------------------------------- -template -int umRegistry::select_length(int N) -//--------------------------------------------------------- -{ - // Only used by registries with "non-fixed" length - // - // Select appropriate length to allocate when a - // request is made for N elements. By making the - // allocation larger than requested, this block - // can accommodate slightly larger requests later. - - //########################################### - // TODO: tune sizes as required - // TODO: Handle usual (larger?) cases first - //########################################### - - int RLEN = N; double x=0.0; - if (N >= 3000) { RLEN = N; } - else if (N >= 1000) { x = sqrt(double(N))+10.0; RLEN = int(x*x); } - else if (N >= 500) { x = sqrt(double(N))+10.0; RLEN = int(x*x); } - else if (N >= 200) { x = sqrt(double(N))+10.0; RLEN = int(x*x); } - else if (N >= 100) { x = sqrt(double(N))+ 5.0; RLEN = int(x*x); } - else if (N >= 50) { x = sqrt(double(N))+ 5.0; RLEN = int(x*x); } - else if (N >= 10) { RLEN = N+20; } - else { RLEN = N+10; } - return RLEN; -} - - -//--------------------------------------------------------- -template -int umRegistry::select_max_length(int N) -//--------------------------------------------------------- -{ - int RLEN = select_length(N); - if (N >= 3000) { RLEN *= 3; } - else if (N >= 1000) { RLEN *= 3; } - else if (N >= 500) { RLEN *= 10; } - else if (N >= 200) { RLEN *= 10; } - else if (N >= 100) { RLEN *= 10; } - else if (N >= 50) { RLEN *= 10; } - else if (N >= 10) { RLEN *= 100; } - else { RLEN *= 100; } - return RLEN; -} - - -//--------------------------------------------------------- -template -T* umRegistry::resize_alloc(const T* ptr, const int N, int& user_id) -//--------------------------------------------------------- -{ - // Adjust the size of an existing allocation. If the - // pointer is NULL, call get_alloc() and update user_id - assert(dbase); - assert(user_id < num_alloc); - - if (m_bFixedSize) - { - assert(N <= m_iRegSize); // caller must "switch registries" - assert(ptr == dbase[user_id]); - curlen[user_id] = N; // update current length of array. - //maxlen[user_id] = ...; // no change to fixed-length allocations - inuse [user_id] = true; // confirming still in use. - return dbase[user_id]; // return user's pointer - } - - //------------------------------------- - // realloc slot in "dynamic" registry - //------------------------------------- - try - { - if (user_id < 0) - { - // Unexpected: current block should be registered! - // Call get_alloc() and update user_id - assert(NULL==ptr); - if (ptr) { umWARNING("umRegistry<%s>::resize_alloc()", "expected ptr to be NULL!"); } - T* pnew = get_alloc(N, user_id); - if (!pnew) { - umERROR("umRegistry::resize_alloc", - "Failed to allocate block (%0.3lf million elements)", - double(N)/1e6); - } - return pnew; - } - - // during LU sparse factorizations, large allocations - // can be realloc'd to < half original size. - // check for this condition and recover the memory - - else if ( (N<= maxlen[user_id] ) && - (N>=2*maxlen[user_id]/3) ) - { - // this request fits in the current slot and is similar - // in size. Re-use allocation and update book-keeping: - - assert(ptr == dbase[user_id]); - curlen[user_id] = N; // update length of array actually in use. - //maxlen[user_id] = ...; // no change to actual length of allocation - inuse [user_id] = true; // confirming still in use. - return dbase[user_id]; // return user's pointer - } - else - { - // We need either to "expand" the allocation, - // or "reduce" an unnecessarily large block: - - int i = user_id; - assert(ptr == dbase[i]); - - //int RLEN = select_length(N); - int RLEN = N; // NBN: 2007/01/07 - - dbase[i] = (T*) realloc(dbase[i], RLEN*sizeof(T)); - if (! dbase[i]) {umERROR("umRegistry::resize_alloc", "Failed to realloc block (%0.3lf million elements)", double(RLEN)/1e6);} - curlen[i] = N; // length of array actually in use. - maxlen[i] = RLEN; // actual length of allocation - inuse[i] = true; // confirming still in use. - return dbase[i]; // return pointer to this slot - } - } - catch (...) - { - umWARNING("umRegistry::resize_alloc(%d)", - "Exception while allocating block (%d bytes)", - N, N*sizeof(T)); - return NULL; - } -} - - -//--------------------------------------------------------- -template -int umRegistry::add_alloc(T *ptr, int N) -//--------------------------------------------------------- -{ - // Insert a "raw" allocation with length N - // into first free slot in the database. - // Return the id of this slot to caller. - - assert(dbase); - - if (m_bFixedSize && (N > m_iRegSize) ) - { - umWARNING("umRegistry<%s>::add_alloc(%d)", - "%d-element array added to FIXED-SIZED registry (limit = %d)", - typeid(T).name(), N, N, m_iRegSize); - } - - for (int i=m_iNextSlot; iexpand(); - return add_alloc(ptr, N); - } -} - - -//--------------------------------------------------------- -template -bool umRegistry::check_alloc(const T* ptr, const int user_id, const int N) -//--------------------------------------------------------- -{ - // check for invalid ptr/id pairs - if (user_id < 0) { - return false; - } else if (m_bFixedSize && (user_id >= MAX_alloc)) { - return false; - } else if (!m_bFixedSize && (user_id >= num_alloc)) { - return false; - } - - if (dbase) { - if (ptr == dbase[user_id]) { - // Pointer matches the allocation in slot[user_id]. - // If this is a fixed length registry, check length: - if (m_bFixedSize && m_iRegSize::check_alloc()", - "Array (%d) is bigger than fixed size (%d)", - typeid(T).name(), N, m_iRegSize); - } - return true; - } - else { return false; } - } else { return false; } -} - - -//--------------------------------------------------------- -template -void umRegistry::free_alloc(T *& ptr, int user_id) -//--------------------------------------------------------- -{ - // - // Mark allocation as available - // - -#if (CHECK_Reg_ALLOC) - if (m_bFixedSize) { assert(user_id < MAX_alloc); } - else { assert(user_id < num_alloc); } -#endif - - if (user_id < 0) - { - assert(NULL==ptr); - if (ptr) { - std::string msg = get_reg_name(); - umWARNING("%s - free_alloc()", "expected ptr to be NULL!", msg.c_str()); - } - } - else if (dbase) - { - assert(ptr == dbase[user_id]); - inuse [user_id] = false; // this slot is available - curlen[user_id] = 0; // update current length - ptr = NULL; // zero the caller's pointer - - // slot[user_id] is free; update "first-free-slot" marker - if (user_id >= 0) - m_iNextSlot = std::min(m_iNextSlot, user_id); - } - else - { - // Note: destructors of static allocations - // may be called after program termination. - } -} - - -//--------------------------------------------------------- -template -void umRegistry::free_alloc_2(T *& ptr, int user_id) -//--------------------------------------------------------- -{ - // Allow user to flush large arrays immediately. - // free the allocation and mark as available - - if (m_bFixedSize || (user_id < 0)) - { - // pass to basic version - free_alloc(ptr, user_id); - return; - } - - assert(user_id < num_alloc); - - if (dbase) - { - assert(ptr == dbase[user_id]); - free(dbase[user_id]); // free allocation - dbase [user_id] = NULL; // invalidate pointer - inuse [user_id] = false; // this slot is available - curlen[user_id] = 0; // update current length - ptr = NULL; // zero the caller's pointer - - // slot[user_id] is free; update "first-free-slot" marker - if (user_id >= 0) - m_iNextSlot = std::min(m_iNextSlot, user_id); - } - else - { - // Note: destructors of static allocations - // may be called after program termination. - } -} - - - -//--------------------------------------------------------- -template -void umRegistry::show_alloc() const -//--------------------------------------------------------- -{ - if (!g_TRCFile) - return; - - assert(dbase); - bool bExist=false; - int i=0,N=0,M=0,iUse=0; - - std::string msg = get_reg_name(); - umTRC(1, "--------------------------\n%s\n" - " i Use? cur max \n", msg.c_str()); - - if (num_alloc<1) { - umTRC(1, "[Empty]\n\n"); - return; - } - - for (i=0; i - -// Usage: -// void start() : start timing -// double stop() : stop timing -// void reset() : set elapsed time to 0.0 -// double read() : read elapsed time (in seconds) - - -inline double seconds(void) -{ - static const double secs_per_tick = 1.0 / CLOCKS_PER_SEC; - return ((double)clock()) * secs_per_tick; -} - - -//--------------------------------------------------------- -class stopwatch -//--------------------------------------------------------- -{ -private: - bool running; - double last_time; - double total; - -public: - stopwatch() : running(false), last_time(0.0), total(0.0) {} - - void reset() { running = false; last_time = 0.0; total=0.0; } - - void start() { - if (!running) { - last_time = seconds(); - running = true; - } - } - - double stop() { - if (running) { - total += seconds() - last_time; - running = false; - } - return total; - } - - double read() { - if (running) { - total+= seconds() - last_time; - last_time = seconds(); - } - return total; - } - -}; - -#endif // NDG__Stopwatch_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Strings.h b/cpp/nudg++/trunk/Include/Strings.h deleted file mode 100644 index 2dee1de..0000000 --- a/cpp/nudg++/trunk/Include/Strings.h +++ /dev/null @@ -1,12 +0,0 @@ -// umArrayString.h -// -// 2007/01/21 -//--------------------------------------------------------- -#ifndef NDG__Strings_H__INCLUDED -#define NDG__Strings_H__INCLUDED - -#include -#include -typedef std::vector Strings; - -#endif // NDG__Strings_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/TestPoissonIPDG3D.h b/cpp/nudg++/trunk/Include/TestPoissonIPDG3D.h deleted file mode 100644 index de21ec6..0000000 --- a/cpp/nudg++/trunk/Include/TestPoissonIPDG3D.h +++ /dev/null @@ -1,43 +0,0 @@ -// TestPoissonIPDG3D.h -// -// 2007/08/28 -//--------------------------------------------------------- -#ifndef NDG__TestPoissonIPDG3D_H__INCLUDED -#define NDG__TestPoissonIPDG3D_H__INCLUDED - -#include "NDG3D.h" - -//--------------------------------------------------------- -class TestPoissonIPDG3D : public NDG3D -//--------------------------------------------------------- -{ -public: - TestPoissonIPDG3D() { class_name = "TestPoissonIPDG3D"; } - virtual ~TestPoissonIPDG3D() {} - virtual void Driver(); - -protected: - - virtual void Run(); - -//virtual void Resize(); -//virtual void SetIC(); -//virtual void InitRun(); -//virtual void Summary(); -//virtual void Report(bool bForce=false); - -protected: - -//void BuildOps(); -//void BuildPrecond(); -//void BC(); - - - //------------------------------------- - // member data - //------------------------------------- - - -}; - -#endif // NDG__TestPoissonIPDG3D_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Tokenizer.h b/cpp/nudg++/trunk/Include/Tokenizer.h deleted file mode 100644 index 5a4e280..0000000 --- a/cpp/nudg++/trunk/Include/Tokenizer.h +++ /dev/null @@ -1,34 +0,0 @@ -// Tokenizer.h -// "strtok" for std::string, using a table lookup -// that only works for single byte characters -// 2007/01/21 -//--------------------------------------------------------- -#ifndef NDG__Tokenizer_H__INCLUDED -#define NDG__Tokenizer_H__INCLUDED - -#include -#include - - -//--------------------------------------------------------- -class Tokenizer -//--------------------------------------------------------- -{ -public: - Tokenizer(const char* cs, const char* csDelim); - void SetDelimiters(const char* csDelim); - - // Note: must return signed int, not size_t - int Next(std::string& cs); - - std::string Tail(); - size_t GetPosition() { return m_nCurPos; } - -private: - std::string m_cs; - std::bitset<256> m_delim; - size_t m_nCurPos; -}; - - -#endif // NDG__Tokenizer_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/VecM_Type.h b/cpp/nudg++/trunk/Include/VecM_Type.h deleted file mode 100644 index 447e3a8..0000000 --- a/cpp/nudg++/trunk/Include/VecM_Type.h +++ /dev/null @@ -1,362 +0,0 @@ -// VecM_Type.h -// dense vector allocated in multiple blocks -// support for oversized sparse CS objects -// 2007/01/01 -//--------------------------------------------------------- -#ifndef NDG__VecM_BLOCK_H__INCLUDED -#define NDG__VecM_BLOCK_H__INCLUDED - - -//######################################################### -// NBN: EXPERIMENTAL -//######################################################### -// This class implements a dense vector allocated -// in multiple blocks. Each block is a VectorM. -// Intended to support sparse CS objects that -// are too large for single contiguous allocation. -// Interface indexing is 1-based (i,j) -//######################################################### - - -#include "Vec_Type.h" - - -// typedef versions for common data types -template class VectorM; - -typedef VectorM DVecM; -typedef VectorM ZVecM; -typedef VectorM IVecM; -typedef VectorM LVecM; - - -//--------------------------------------------------------- -template -class VectorM -//--------------------------------------------------------- -{ - // - // Member data - // -protected: - - int m_Len; // total elements (i.e. sum of blocks) - int n1,n2; // length of each block (TODO: allow d blocks) - VectorM** V_; // array of vector blocks - - std::string m_name; // identifier string - double m_EqTol; // allow "fuzzy" comparison - bool m_borrowed; // is data borrowed? - int m_id; // identifier number - OBJ_mode m_mode; // real or temporary - - static int s_count; // track number of objects - -public: - - - // constructors - explicit VectorM(const char* sz="vecM", OBJ_mode md=OBJ_real); - explicit VectorM(int N, const char* sz="vecM", OBJ_mode md=OBJ_real); - explicit VectorM(std::istream &is, const char* sz="vecM", OBJ_mode md=OBJ_real); - - // destructor - virtual ~VectorM(); - void destroy(); - void Free() { destroy(); } - - // manage allocation - VectorM& borrow(int N, T* p) { return (*this); } - VectorM& own (VectorM& B) { return (*this); } - - void initialize(int N, bool bInit=true, T x=T(0)); - - bool resize(int N, bool bInit=true, T x=T(0)); - bool extend(int N, bool bInit=true, T x=T(0)); - bool realloc(int N, bool bInit=true, T x=T(0)); - - // copy/load - VectorM& copy(const T *vec) { return (*this); } - VectorM& copy(int N, const T *vec) { return (*this); } - void load(int N, const char *sdata) { } - - // assignment - VectorM& operator=(const T &x); - VectorM& operator=(const VectorM &B); - - VectorM& append(const VectorM& B); - - // utilities - bool ok() const { return ((V_!=NULL) && (m_Len>0)); } - int size() const { return m_Len; } - int length() const { return m_Len; } - void set_name(const char* sz) { m_name = sz; } - const char* name() const { return m_name.c_str(); } - bool is_borrowed() const { return m_borrowed; } - int get_s_count() const { return s_count; } - - // "mode" - OBJ_mode get_mode() const { return m_mode; } - void set_mode(OBJ_mode mode) { m_mode = mode; } - - - //------------------------------------- - // element access - //------------------------------------- - - // set/get: 1-based access - const T& operator()(int i) const; - T& operator()(int i); - - // set/get: 0-based access - const T& operator[](int i) const; - T& operator[](int i); - - -protected: - //------------------------------------- - // Optional index checking - //------------------------------------- -#if (CHECK_ARRAY_INDEX) - - void Check_index_0(int i) const { - // check for legal 0-based index - if (i< 0 ) throw 1; - if (i>=m_Len) throw 2; - } - void Check_index_1(int i) const { - // check for legal 1-based index - if (i<1 ) throw 1; - if (i>m_Len) throw 2; - } - -#else - - // no checking of indices - void Check_index_0(int i) const throw() {} - void Check_index_1(int i) const throw() {} - -#endif - -}; - - - -/////////////////////////////////////////////////////////// -// -// define static member data -// -/////////////////////////////////////////////////////////// - -template int VectorM::s_count=0; - - - -/////////////////////////////////////////////////////////// -// -// constructors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -VectorM::VectorM(const char* sz, OBJ_mode md); -//--------------------------------------------------------- -: m_Len(0), n1(0), n2(0), V_(NULL), - m_name(xz), m_borrowed(false), m_mode(md) -{ - ++s_count; -} - - - -//--------------------------------------------------------- -template inline -VectorM::VectorM(int N, const char* sz, OBJ_mode md); -//--------------------------------------------------------- -: m_Len(0), n1(0), n2(0), V_(NULL), - m_name(xz), m_borrowed(false), m_mode(md) -{ - ++s_count; - resize(N); -} - - -//--------------------------------------------------------- -template inline -VectorM::VectorM(std::istream &is, const char* sz, OBJ_mode md); -//--------------------------------------------------------- -: m_Len(0), n1(0), n2(0), V_(NULL), - m_name(xz), m_borrowed(false), m_mode(md) -{ - ++s_count; - umWARNING("VectorM(istream&)", "TODO: please implement"); -} - - - -/////////////////////////////////////////////////////////// -// -// destructors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template -VectorM::~VectorM() -//--------------------------------------------------------- -{ - --s_count; - - if (V_) { - destroy(); - } -} - - -//--------------------------------------------------------- -template inline -void VectorM::destroy() -//--------------------------------------------------------- -{ - if (V_ && (!m_borrowed)) { - for (int i=0; i<2; ++i) { - delete V_[i]; V_[i]=NULL; // delete ith block - } - delete [] V_; // delete the array of pointers - } - - V_ = NULL; // Pointers may be tested, - m_Len = 0; // no data left - n1=n2 = 0; -} - - - -/////////////////////////////////////////////////////////// -// -// manage allocation -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -void VectorM::initialize(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // check size of request in bytes - double block = (double)(N * sizeof(int)); - if (block > 200.0 * 1024.0 * 1024.0) { - umWARNING("VectorM::initialize", - "requested allocation is %lf MB", - block/(1024.0 * 1024.0)); - } - - // set total length and chunck sizes - m_Len=N; n1=N/2; n2=N-n1; - - try { - V_ = new Vector*[2]; - V_[0] = new Vector(n1, bInit, x); - V_[1] = new Vector(n2, bInit, x); - } - catch (...) - { - umERROR("", "out of memory"); - } -} - - -//--------------------------------------------------------- -template inline -bool VectorM::resize(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - return false; -} - - -//--------------------------------------------------------- -template inline -bool VectorM::extend(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - return false; -} - - -//--------------------------------------------------------- -template inline -bool VectorM::realloc(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // alias for extend - return extend(N, bInit, x); -} - - -/////////////////////////////////////////////////////////// -// -// set/get: 1-based access -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -T& VectorM::operator()(int i) -//--------------------------------------------------------- -{ - assert(ok()); - Check_index_1(i); - if (i<=n1) return V_[0]->operator()(i); - else return V_[1]->operator()(i); -} - - -//--------------------------------------------------------- -template inline -const T& VectorM::operator()(int i) const -//--------------------------------------------------------- -{ - assert(ok()); - Check_index_1(i); - if (i<=n1) return V_[0]->operator()(i); - else return V_[1]->operator()(i); -} - - -/////////////////////////////////////////////////////////// -// -// set/get: 0-based access -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -T& VectorM::operator[](int i) -//--------------------------------------------------------- -{ - Check_index_0(i); - if (ioperator[](i); - else return V_[1]->operator[](i); -} - - -//--------------------------------------------------------- -template inline -const T& VectorM::operator[](int i) const -//--------------------------------------------------------- -{ - Check_index_0(i); - if (ioperator[](i); - else return V_[1]->operator[](i); -} - - - -#endif // NDG__VecM_BLOCK_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/VecObj_Type.h b/cpp/nudg++/trunk/Include/VecObj_Type.h deleted file mode 100644 index 76972de..0000000 --- a/cpp/nudg++/trunk/Include/VecObj_Type.h +++ /dev/null @@ -1,311 +0,0 @@ -// VecObj_Type.h: simple 1-D array of objects -// 1-based () and 0-based [] indexing -// 2007/10/18 -//--------------------------------------------------------- -#ifndef NDG__VecObj_Type_H__INCLUDED -#define NDG__VecObj_Type_H__INCLUDED - -#include -#include -#include "ArrayMacros.h" - - -// typedef versions for common data types -template class VecObj; - -typedef VecObj DV; -typedef VecObj IV; - -// for debug print -void dumpDV(const DV& V, const char* s); -void dumpIV(const IV& V, const char* s); - - -//--------------------------------------------------------- -template -class VecObj -//--------------------------------------------------------- -{ - -protected: - T* v_; // pointer to calloc'd alloc. - T* vm1_; // pointer for 1-based access - int n_; // length of allocation - - void initialize(int len); - void copy(const T* p); - -public: - - // constructors - VecObj() : v_(0),vm1_(0),n_(0) {;} - VecObj(const VecObj &B): v_(0),vm1_(0),n_(0) {copy(B);} - VecObj(int N) : v_(0),vm1_(0),n_(0) {initialize(N);} - VecObj(int N, T* p) : v_(0),vm1_(0),n_(0) { - initialize(N); - for (int i=0; i0); } - int size() const { return n_; } - int length() const { return n_; } - bool resize(int N); - - void truncate(int N); - bool extend(int N); - bool realloc(int N); // same as extend - - VecObj& append(const T& x); - VecObj& append(const VecObj& B); - - // access to data - const T* data() const { return v_; } - T* data() { return v_; } - - // 1-based (i) access - const T& operator()(int i) const {Check_index_1(i);return vm1_[i];} - T& operator()(int i) {Check_index_1(i);return vm1_[i];} - - // 0-based [i] access - const T& operator[](int i) const {Check_index_0(i);return v_[i];} - T& operator[](int i) {Check_index_0(i);return v_[i];} - - // assignment - VecObj& operator=(const T& x) { fill(x); return (*this); } - VecObj& operator=(const VecObj &B); - - void copy(const VecObj& rA) { (*this) = rA ; } - void copy(const VecObj* pA) { (*this) = (*pA); } - - // optimize certain assignments (assumes length is ok) - void set(T& x1, T& x2) { v_[0]=x1; v_[1]=x2; } - void set(T& x1, T& x2, T& x3) { v_[0]=x1; v_[1]=x2; v_[2]=x3; } - - void fill(const T &x); - -protected: - - //------------------------------------- - // Optional index checking - //------------------------------------- -#if (CHECK_ARRAY_INDEX) - void Check_index_0(int i) const { - // check for legal 0-based index - if (i< 0 ) throw 1; - if (i>=n_) throw 2; - } - void Check_index_1(int i) const { - // check for legal 1-based index - if (i<1 ) throw 1; - if (i>n_) throw 2; - } -#else - void Check_index_0(int i) const throw() {} - void Check_index_1(int i) const throw() {} -#endif - -}; - - - -//--------------------------------------------------------- -// define member functions -//--------------------------------------------------------- - -template inline -void VecObj::initialize(int len) -{ - // create the array, adjusting 1-based pointers - // about to allocate, so expect v_ to be NULL - assert(NULL == v_); - - // Please note: use new (not calloc) to ensure - // that each object's constructor is called: - - v_ = new T[len]; // array of objects - assert(v_ ); - vm1_ = v_-1; - n_ = len; -} - - -template inline -void VecObj::destroy() -{ - if (v_) { delete [] v_; } - n_=0; v_=NULL; vm1_=NULL; -} - - -template inline -bool VecObj::resize(int N) -{ - // Resize existing object, optionally setting - // the entire array to some given inital value. - // Return value indicates whether size has changed. - - assert( N >= 0 ); // must be non-negative - bool bResized=false; - if (N != n_) { - bResized=true; - this->destroy(); // clear allocation, zero members - if (N > 0) { - initialize(N); - } - } - - return bResized; -} - - -//--------------------------------------------------------- -template inline -void VecObj::truncate(int N) -{ - extend(N); // alias for extend -} - - -template inline -bool VecObj::realloc(int N) -{ - return extend(N); // alias for extend -} - - -template inline -bool VecObj::extend(int N) -//--------------------------------------------------------- -{ - // resize a VecObj, retaining existing values - if (N<1) { destroy(); return true; } - - assert( N >= 0 ); // must be non-negative - int Nold = n_; // store current size - - if (!ok()) - { - return resize(N); // new allocation - } - else if (n_ == N) - { - return true; // i.e. all's OK - //return false; // i.e. not resized - } - else - { - // Note: using new/delete, so not using realloc - // For now, simply re-allocate and copy... - - T* v2 = new T[N]; // allocate new array of default objects - if (!v2) { - destroy(); // attempt cleanup - umERROR("VecObj::extend()", "realloc from %d to %d objects failed", Nold, N); - return false; - } - - int tocopy = std::min(Nold, N); - for (int i=0; iv_ = v2; // take ownership of new array - vm1_ = v_ - 1; // update 1-offset pointer - n_ = N; - } - return true; -} - - -// append 1 to an existing VecObj -template inline -VecObj& VecObj::append(const T& x) -{ - if (!ok()) { - resize(1); v_[0]=x; // "appending" first element - } else { - int len1 = this->size(); - this->extend(len1+1); - this->v_[len1] = x; - } - return (*this); -} - - -// append a VecObj to an existing VecObj -template inline -VecObj& VecObj::append(const VecObj &B) -{ - if (!ok()) { - (*this)=B; // "appending" to empty array - } else { - int len1 = this->size(), len2 = B.size(); - int total = len1+len2; - this->extend(total); - // append elements of B to tail of this extended array - for (int sk=len1, i=0; iv_[sk]=B[i]; - } - } - return (*this); -} - - -template inline -VecObj& VecObj::operator=(const VecObj &B) -{ - if (&B == this) { return (*this); } - int N = B.size(); - if (n_ == N) { - copy(B.data()); // no re-alloc, just deep copy - } else { - destroy(); // release allocation - initialize(N); // rebuild - copy(B.data()); // deep copy - } - return (*this); -} - - -template inline -void VecObj::fill(const T &x) -{ - // fill array: unroll into blocks of 4, then fill tail - int N = this->n_, i=0; - int Nmod4 = N & 3; int N4 = N - Nmod4; - for (i=0; i inline -void VecObj::copy(const T* p) -{ - // Note: - // - assumes length of source and destination match. - // - assumes object defines operator=() - - int N = this->n_, i=0; - int Nmod4 = N & 3; int N4 = N - Nmod4; - for (i=0; i inline std::ostream& operator<<(std::ostream &s, const VecObj &A) { return s; } -// template inline std::istream& operator>>(std::istream &s, VecObj &A) { return s; } - -#endif // NDG__VecObj_Type_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/VecSort_Type.h b/cpp/nudg++/trunk/Include/VecSort_Type.h deleted file mode 100644 index dc7b49b..0000000 --- a/cpp/nudg++/trunk/Include/VecSort_Type.h +++ /dev/null @@ -1,737 +0,0 @@ -// VecSort_Type.h -// Vector plus sort functions. T must be "sortable" -// 2007/07/31 -//--------------------------------------------------------- -#ifndef NDG__VecSort_Type_H__INCLUDED -#define NDG__VecSort_Type_H__INCLUDED - -#include "Vec_Type.h" - - -// typedef versions for common data types -template class VecSort; - -typedef VecSort IVecSort; -typedef VecSort DVecSort; - - -//--------------------------------------------------------- -template -class VecSort : public virtual Vector -//--------------------------------------------------------- -{ -public: - VecSort() : Vector() {} - VecSort(int N) : Vector(N) {} - VecSort(const VecSort& X) : Vector(X) {} - VecSort(const Vector& X) : Vector(X) {} - ~VecSort() {} - - VecSort& operator=(const T& value) { fill(value); return (*this); } - VecSort& operator=(const VecSort& X) { Vector::operator = (X); return *this; } - - // "operator==" - true if equality holds for all components. - // "operator!=" - equals !"operator==". - // "operator<" - true if inequality holds for all components. - // "operator>" - true if inequality holds for all components. - // "operator<=" - true if inequality holds for all components. - // "operator>=" - true if inequality holds for all components. - - bool operator == (const VecSort& X); - bool operator != (const VecSort& X) { return !(*this == X); } - - bool operator < (const VecSort& X); - bool operator > (const VecSort& X); - bool operator <= (const VecSort& X); - bool operator >= (const VecSort& X); - - - // minValue(), maxValue() computes the min/max value of the - // entries in the vector. Overloaded version uses int arg - // to return index where the min/max value was found. - T maxValue() const; - T minValue() const; - T maxValue(int& i) const; // max occured in position i - T minValue(int& i) const; // min occured in position i - - - // select() computes the kth smallest value in the vector. - // An overloaded version has an integer arg which sets the - // length (N) of the sub-vector on which the computation - // is performed. The input array will be rearranged to - // have the computed value in location (k), with smaller - // elements moved to (1:k-1) (in arbitrary order, and all - // larger elements in (k+1:N) (also in arbitrary order). - T select(int k); // get the k smallest element - T select(int k, int N); // only use the N first positions - - - // heapsort() sorts the vector using the heapsort algorithm. - // An overloaded version allows for only the entries in - // positions (1:N) to be sorted. - void heapsort(); - void heapsort(int N); // only sort the N first positions - - - // mixedheapsort() sorts the vector using a mixture of three - // methods. Usually faster than "heapsort" for small vectors. - void mixedheapsort(); - void mixedheapsort(int N); // only sort the N first positions - - - // quicksort() sorts the vector using the quicksort. - // Usually the fastest algorithm for large vectors. - void quicksort(); - void quicksort(int N); // only sort the N first positions - - - // makeIndex() instead of changing the order of the array - // entries, an index vector is made which maps the original - // array entries onto a sorted array. When sorting several - // arrays simultaneously, this index vector can be used as - // input to sortFromIndexVec() - void makeIndex(IVec& index) const; - - - // sortFromIndexVec() changes the entry order in the object - // according to an index vector (e.g. computed by makeIndex()). - void sortFromIndexVec(const IVec& index); -}; - - - -template -bool VecSort::operator == (const VecSort& X) -{ - if (this->m_Len != X.m_Len) - return false; - else - { - int N = this->size(); - for (int i = 0; i < N; ++i) - if (this->v_[i] != X.v_[i]) - return false; - } - return true; -} - - -template -T VecSort::maxValue() const -{ - T tmax = this->v_[0]; - const T* astop = this->end(); - for (const T* ap = this->begin(); ap < astop; ap++) - if (*ap > tmax) tmax = *ap; - - return tmax; -} - - -template -T VecSort::minValue() const -{ - T tmin = this->v_[0]; - const T* astop = this->end(); - for (const T* ap = this->begin(); ap < astop; ap++) - if (*ap < tmin) tmin = *ap; - - return tmin; -} - - -template -T VecSort::maxValue(int& i) const -{ - // - // returns 1-based index - // - T tmax = this->v_[0]; - i = 1; - int j = 1; - - const T* astop = this->end(); - for (const T* ap = this->begin(); ap < astop; ap++) - { - if (*ap > tmax) - { - tmax = *ap; - i = j; - } - j++; - } - return tmax; -} - - -template -T VecSort::minValue(int& i) const -{ - // - // returns 1-based index - // - T tmin = this->v_[0]; - i = 1; - int j = 1; - - const T* astop = this->end(); - for (const T* ap = this->begin(); ap < astop; ap++) - { - if (*ap < tmin) - { - tmin = *ap; - i = j; - } - j++; - } - return tmin; -} - - -template -T VecSort::select(int k) -{ - // Select the kth smallest of this vector, - // rearrangement will occur unless the - // min or max value alternatives are used. - if ( 1 == k ) - return minValue(); - else if ( this->size() == k ) - return maxValue(); - else - return select(k, this->size()); -} - - -template -T VecSort::select(int k, int N) -{ - // Returns the kth smallest value in the range (1:N). - // The input array will be rearranged to have this value - // in location (k), with all smaller elements moved - // to (1:k-1) (in arbitrary order, and all larger - // elements in (k+1:N) (also in arbitrary order). - int i,ir=N,j,l=1,midp; - T v,temp; - - VecSort& a = *this; - - for (;;) - { - if (ir <= l+1) - { - if (ir == l+1 && a(ir) < a(l)) {temp=a(l); a(l)=a(ir); a(ir)=temp;} - return a(k); - } - else - { - midp=(l+ir)>>1; - i=l+1; - temp=a(midp); a(midp)=a(i); a(i)=temp; - if (a(l) > a(ir)) {temp=a(l); a(l)=a(ir); a(ir)=temp;} - if (a(i) > a(ir)) {temp=a(i); a(i)=a(ir); a(ir)=temp;} - if (a(l) > a(i )) {temp=a(l); a(l)=a(i ); a(i )=temp;} - j=ir; - v=a(i); - for (;;) { - do i++; while (a(i) < v); - do j--; while (a(j) > v); - if (j < i) break; - temp=a(i); a(i)=a(j); a(j)=temp; - } - a(l+1)=a(j); - a(j)=v; - if (j >= k) ir=j-1; - if (j <= k) l=i; - } - } -} - - -template -void VecSort::heapsort() -{ - heapsort(this->size()); -} - - -template -void VecSort::heapsort(int N) -{ - // modified sort.c (from Numerical Recipes) - - if (N<2) - return; - - int i,j; - T v; - - VecSort& a = *this; - - int l,ir; - l=(N>>1); - - while (l>0) { - v=a(l); - i=l--; - j=i<<1; - while (j1) { - i=1;j=2; - while (j -void VecSort::mixedheapsort() -{ - mixedheapsort(this->m_Len); -} - - -template -void VecSort::mixedheapsort(int N) -{ - // Sort the first N items of the T vector. Selects - // a sort method appropriate for length of vector. - - if (this->size() < N) { - umERROR("VecSort::mixedheapsort()", - "Requested sort of %d elements in array with length %d", N, this->m_Len); - } - - int i,j; - T v; - VecSort& a = *this; - - if (N < 14) - { - // - // straight insertion - // - for (j=2;j<=N;j++) { - v=a(j); i=j; - while ( a(i-1) > v ) { a(i)=a(i-1); i--; if (i==1) break; } - a(i)=v; - } - return; - } - else if ( N <= 64 ) - { - // - // Shell's method - // - int inc; - inc=13; - do { - inc *= 3; - inc++; - } while ( inc <= N ); - do { - inc/=3; - for (j=inc+1;j<=N;j++) { - v=a(j); i=j; - while (a(i-inc)>v) { a(i)=a(i-inc); i-=inc; if (i<=inc) break; } - a(i)=v; - } - } while ( inc > 4 ); - for (j=2;j<=N;j++) { - v=a(j); i=j; - while ( a(i-1) > v ) { a(i)=a(i-1); i--; if (i==1) break; } - a(i)=v; - } - return; - } - else - { - // - // heap sort - // - int l,ir; - l=(N>>1); - while (l>0) { - v=a(l); - i=l--; - j=i<<1; - while (j1) { - i=1;j=2; - while (j -void VecSort::quicksort() -{ - quicksort(this->m_Len); -} - - -template -void VecSort::quicksort(int N) -{ - if ( N < 2 ) - return; - - if (this->size() < N) { - umERROR("VecSort::quicksort()", - "Requested sort(%d) in array length %d.", N, this->m_Len); - } - - - // - // sort the (sub)vector a(1:N) - // - int i,ir=N,j,midp,l=1; - int jstack=0; - - VecSort& a = *this; - - T v,temp; - int istack[50]={0}; - - for (;;) - { - if (ir-l<8) - { - for (j=l+1;j<=ir;j++) - { - v=a(j); i=j; - while ( a(i-1) > v ) { a(i)=a(i-1); i--; if (i==l) break; } - a(i)=v; - } - if (jstack == 0) break; - ir=istack[jstack--]; - l=istack[jstack--]; - } - else - { - midp=(l+ir)>>1; - i=l+1; - temp=a(midp);a(midp)=a(i);a(i)=temp; - if (a(l)>a(ir)) { - temp=a(l);a(l)=a(ir);a(ir)=temp; - } - if (a(i)>a(ir)) { - temp=a(i);a(i)=a(ir);a(ir)=temp; - } - if (a(l)>a(i)) { - temp=a(l);a(l)=a(i);a(i)=temp; - } - j=ir; - v=a(i); - for (;;) { - do i++; while (a(i) < v); - do j--; while (a(j) > v); - if (j= 48) - umERROR("VecSort:: quicksort","error NSTACK too small"); - if (ir-i+1 >= j-l) { - istack[++jstack]=i; - istack[++jstack]=ir; - ir=j-1; - } else { - istack[++jstack]=l; - istack[++jstack]=j-1; - l=i; - } - } - } -} - - -template -void VecSort::makeIndex(IVec& index) const -{ - int l=0,j=0,ir=0,indxt=0,i=0; - T q=T(0); - int N = this->m_Len; - - const VecSort& V = *this; - - index.resize(this->size()); - - for (j=1; j <= N; ++j) - index(j)=j; - l=(N >> 1) + 1; - ir=N; - for (;;) - { - if (l > 1) - q=V((indxt=index(--l))); - else - { - q=V((indxt=index(ir))); - index(ir)=index(1); - if (--ir == 1) - { - index(1)=indxt; - return; - } - } - i=l; - j=l << 1; - while (j <= ir) - { - if (j < ir && V(index(j)) < V(index(j+1))) - j++; - if (q < V(index(j))) - { - index(i)=index(j); - j += (i=j); - } - else j=ir+1; - } - index(i)=indxt; - } -} - - -template -void VecSort::sortFromIndexVec(const IVec& index) -{ - VecSort tmp = (*this); - int N = this->size(); - for (int i=1; i<=N; ++i) - (*this)(i) = tmp(index(i)); -} - - -template -bool VecSort::operator < (const VecSort& X) -{ - if (X.size() == this->m_Len) - { - T* ap = this->begin(); - T* xp = X.begin(); - T* astop = this->end(); - - for ( ; ap < astop; ap++, xp++) - if (*ap >= *xp) - return false; - - return true; - } - else - return false; -} - - -template -bool VecSort::operator > (const VecSort& X) -{ - if (X.size() == this->m_Len) - { - T* ap = this->begin(); - T* xp = X.begin(); - T* astop = this->end(); - - for ( ; ap < astop; ap++, xp++) - if (*ap <= *xp) - return false; - - return true; - } - else - return false; -} - - -template -bool VecSort::operator <= (const VecSort& X) -{ - if (X.size() == this->m_Len) - { - T* ap = this->begin(); - T* xp = X.begin(); - T* astop = this->end(); - - for ( ; ap < astop; ap++, xp++) - if (*ap > *xp) - return false; - - return true; - } - else - return false; -} - - -template -bool VecSort::operator >= (const VecSort& X) -{ - if (X.size() == this->m_Len) - { - T* ap = this->begin(); - T* xp = X.begin(); - T* astop = this->end(); - - for ( ; ap < astop; ap++, xp++) - if (*ap < *xp) - return false; - - return true; - } - else - return false; -} - - - -/////////////////////////////////////////////////////////// -// -// Matlab "sort_unique" operation -// -/////////////////////////////////////////////////////////// - -#include - -template inline -Vector& sort(const Vector &A, bool unique, bool ascending=true) -{ - Vector *tmp = new Vector("vec", OBJ_temp); - - int N = A.size(); - if (N<2) { - (*tmp) = A; // vector of length {0/1} - } - else if (!unique) - { - if (ascending) { - VecSort s(A); - s.mixedheapsort(); // sort entire vector, retaining duplicates - (*tmp) = s; - } - else { - // sort in descending order (specify binary predicate) - (*tmp) = A; - std::sort(tmp->begin(), tmp->end(), std::greater()); - } - } - else - { - typedef typename std::set::iterator SetIt; - - // std::set sorts and removes duplicates - std::set us; - for (int i=1; i<=N; ++i) { us.insert(A(i)); } - int len = (int) us.size(), sk=0;; - tmp->resize(len); SetIt it; - for (it=us.begin(), sk=1; it!=us.end(); it++, sk++) { - (*tmp)(sk) = (*it); - } - if (A.get_mode() == OBJ_temp) { delete (&A); } - } - - return (*tmp); -} - - - -/////////////////////////////////////////////////////////// -// -// Matlab "[S,IX] sort(v, dir)" operation -// -/////////////////////////////////////////////////////////// - - -template inline -void sort(const Vector &A, Vector &S, IVec& IX, eDir dir=eAscend) -{ - int N = A.size(); S.resize(N); IX.resize(N); - if (N<2) { - S = A; - if (1==N) { - IX(1)=1; - } - } - else - { - VecSort tmp(A); - if (eAscend==dir) { - tmp.makeIndex(IX); - for (int i=1; i<=N; ++i) { - S(i) = tmp(IX(i)); - } - } - else { - IVec ix; tmp.makeIndex(ix); - for (int i=1,j=N; i<=N; ++i, --j) { - S(i) = tmp(ix(j)); // sort the vector - IX(i)= ix(j); // reverse indices - } - } - } -} - - -#endif // NDG__VecSort_Type_H__INCLUDED diff --git a/cpp/nudg++/trunk/Include/Vec_Type.h b/cpp/nudg++/trunk/Include/Vec_Type.h deleted file mode 100644 index 9109376..0000000 --- a/cpp/nudg++/trunk/Include/Vec_Type.h +++ /dev/null @@ -1,4410 +0,0 @@ -// Vector_Type.h -// 1-based () indexing -// 0-based [] indexing -// 2007/10/15 -//--------------------------------------------------------- -#ifndef NDG__Vector_Type_H__INCLUDED -#define NDG__Vector_Type_H__INCLUDED - - -#include -#include -#include - -#include -#include -#include - -#include "ArrayMacros.h" -#include "BlasLapack.h" -#include "RAND.h" -#include "Registry_Type.h" -#include - -#include "Region1D.h" - -//--------------------------------------- -// Mapped regions -//--------------------------------------- -#include "MappedRegion1D.h" -#include "MappedRegion2D.h" - - -typedef double (FuncPtr)(double); -typedef std::complex dcmplx; - -// typedef versions for common data types -template class Vector; - -typedef Vector DVec; -typedef Vector ZVec; -typedef Vector IVec; -typedef Vector LVec; -typedef Vector BVec; - -// forward declarations -template inline Vector& concat(const Vector &A, T x); -template inline Vector& concat(const Vector &A, const Vector &B); - - -//--------------------------------------------------------- -template -class Vector -//--------------------------------------------------------- -{ - // - // Member data - // -protected: - - T* v_; // original pointer for 0-based indexing - T* vm1_; // adjusted pointer for 1-based indexing - int m_Len; // num elements (i.e. length of array) - T ZERO; // use as T(0); - T ONE; // use as T(1); - - std::string m_name; // identifier string - double m_EqTol; // allow "fuzzy" comparison - bool m_borrowed; // is data borrowed? - int m_id; // identifier number - OBJ_mode m_mode; // real or temporary - - static int s_count; // track number of objects - static umRegistry s_Reg1; // manage small arrays (preallocated) - static umRegistry s_Reg2; // manage medium arrays (preallocated) - static umRegistry s_Reg3; // manage general allocations - umRegistry* m_pReg; // pointer to registry storing this data - static bool s_trace; // toggle tracing of allocations - -public: - - // typedef's for std::compatibility - - typedef int size_type; - typedef T data_type; - typedef T* pointer; - typedef T* iterator; - typedef T& reference; - typedef const T* const_iterator; - typedef const T& const_reference; - - // toggle _DEBUG trace - static void set_trace(bool b) { s_trace = b; } - - - // constructors - explicit Vector(const char* sz="vec", OBJ_mode md=OBJ_real); - Vector(const Vector &B, OBJ_mode md=OBJ_real, const char* sz="vec"); - explicit Vector(int N, const char* sz, OBJ_mode md=OBJ_real); - explicit Vector(int N, const T x=T(0), OBJ_mode md=OBJ_real, const char* sz="vec"); - explicit Vector(int N, const T* vdata, OBJ_mode md=OBJ_real, const char* sz="vec"); - explicit Vector(const ArrayData& rAD, int N, const char *sdata, OBJ_mode md=OBJ_real, const char* sz="vec"); - explicit Vector(const T x1, const T x2, const T x3); - - // destructor - virtual ~Vector(); - virtual void destroy (); // mark as available - virtual void destroy_2(); // free allocation - virtual void Free(); - - // manage allocation - Vector& borrow(int N, T* p); - Vector& borrow(const Vector& CV); - Vector& own (Vector& B); // allow lazy deallocation - Vector& own_2(Vector& B); // force immediate dealloc - - void initialize(int N, bool bInit=true, T x=T(0)); - bool resize(int N, bool bInit=true, T x=T(0)); - bool resize(const Vector& B, bool bInit=true, T x=T(0)); - void truncate(int N); - bool extend(int N, bool bInit=true, T x=T(0)); - bool realloc(int N, bool bInit=true, T x=T(0)); // same as extend - bool switch_Registry(int N, bool bInit=true, T x=T(0)); - bool reg_ok() const; - void show_registry() const { if (reg_ok()) {m_pReg->show_alloc();}} - void compact() const; - - // copy/load - Vector& copy( const T *vec); - Vector& copy(int N, const T *vec); - Vector& copy(int N, const Vector& V); - - void load(int N, const char *sdata); - void set(const T x1, const T x2); - void set(const T x1, const T x2, const T x3); - void set(const T x1, const T x2, const T x3, const T x4); - - // assignment - Vector& operator=(const T &x); - Vector& operator=(const Vector &B); - // allow assignment of - Vector& assign(const IVec &B); // enable IVec -> DVec - Vector& assign(const DVec &B); // enable DVec -> IVec - - - Vector& append(const T& x); - Vector& append(const Vector& B); - - // utilities - bool ok() const { return ((v_!=NULL) && (m_Len>0)); } - int size() const { return m_Len; } - int length() const { return m_Len; } - int lbound () const { return 1; } // for Region1D - int dim(int d=1) const { return m_Len; } // for Region1D - void set_name(const char* sz) { m_name = sz; } - const char* name() const { return m_name.c_str(); } - bool is_borrowed() const { return m_borrowed; } -//bool is_inf() const; // check finite -//bool is_nan() const; // check NaN - int get_id() const { return m_id; } - void set_id(int id) { m_id = id; } - int get_s_count() const { return s_count; } - int get_nnz(T tol=T(0)) const; - - // "mode" - OBJ_mode get_mode() const { return m_mode; } - void set_mode(OBJ_mode mode) { m_mode = mode; } - - Vector& zeros(int N=0); - Vector& ones(int N=0); - Vector& fill(const T &x); - Vector& operator!() const; - Vector& set_abs(); - Vector& set_min_val(double dtol=0.0); - Vector& SQRT(); - Vector& SQR(); - - T max_val() const; // return result only - T min_val() const; // " - void max_val(T& res, int& id) const; // return both result and array id - void min_val(T& res, int& id) const; // " - - - T max_val_abs() const; - T min_val_abs() const; - T sum() const; - T sumsquares() const; - T inner(const Vector &B) const; - T inner(int N, const T* p) const; - - double mean() const; - - // vector norms - double norm (norm_type lp = BLAS_L2) const; - double norm1() const { return norm(NORM_l1); } - double norm2() const { return norm(BLAS_L2); } - double norm_inf() const { return norm(NORM_Linf); } - - Vector& normalize(); - Vector& randomize(double from=0.0, double to=1.0, int N=0); - Vector& rand(double from=0.0, double to=1.0, int N=0); - Vector& randnorm(); - Vector& apply(FuncPtr fptr); - Vector& exp_val(); - Vector& log(); - Vector& chop(double eps = 1e-10); - - // "fuzzy" compare - double GetEqTol() const { return m_EqTol; } - void SetEqTol(double tol) { m_EqTol=tol; } - bool same_object(const Vector& B) const; - bool operator==(const Vector& B) const; - bool operator!=(const Vector &B) const { return (!operator==(B));} - - //------------------------------------- - // return "Boolean" results - //------------------------------------- - Vector& eq (T val) const; // r = (BCType==Wall) - - Vector& le (T val) const; // r = (u <= val) - Vector& lt (T val) const; // r = (u < val) - Vector& lt_abs(T val) const; // r = (u < tol) - - Vector& ge (T val) const; // r = (u >= val) - Vector& gt (T val) const; // r = (u > val) - Vector& gt_abs(T val) const; // r = (u > tol) - - bool any(const T& val) const; // is val in this array? - - //------------------------------------- - // numerical routines - //------------------------------------- - - // apply scalar to all elements - void add_val (const T &x); - void sub_val (const T &x) { add_val(-x); } - void mult_val(const T &x); - void div_val (const T &x); - void pow_val (const T &x); - - - //------------------------------------- - // Overloaded arithmetic operators. - // Note: pattern for global operators, - // tmp(A); tmp+=x; return tmp; - //------------------------------------- - Vector& operator += (const T &x) { add_val ( x); return (*this); } - Vector& operator -= (const T &x) { add_val (-x); return (*this); } - Vector& operator *= (const T &x) { mult_val( x); return (*this); } - Vector& operator /= (const T &x) { div_val ( x); return (*this); } - - - Vector& operator+=(const Vector& B); - Vector& operator-=(const Vector& B); - Vector& operator*=(const T* p); - Vector& operator*=(const Vector& B); - Vector& operator/=(const Vector& B); - - Vector& dd(const Vector &B) const; // C = A ./ B - Vector& dm(const Vector &B) const; // C = A .* B - - // this += alpha*X - void axp_y (const T& alpha, const Vector& X); - - // this = alpha*X + y - void axp_y (const T& alpha, const Vector& X, const Vector& Y); - - - - //------------------------------------- - // element access - //------------------------------------- - - // set/get: 1-based access - T& operator()(int i) {Check_index_1(i); return vm1_[i];} - const T& operator()(int i) const {Check_index_1(i); return vm1_[i];} - - // set/get: 0-based access - T& operator[](int i) {Check_index_0(i); return v_[i];} - const T& operator[](int i) const {Check_index_0(i); return v_[i];} - - // expose data pointer - const T* get_v() const { return v_; } - T* get_v() { return v_; } - void set_v(T* p) { v_ = p; } - - // array access: return T* - const T* data() const { return v_; } - T* data() { return v_; } - - // return "data()-1" for 1-based access - T* d_m1() { return vm1_; } - const T* d_m1() const { return vm1_; } - - // array access: return T** - const T** pdata() const { return (const T**)(&v_); } - T** pdata() { return (&v_); } - - // array access: "stl container" - const_iterator begin() const { return v_; } - iterator begin() { return v_; } - - // array access: "stl container" - const_iterator end() const { return v_ + m_Len; } - iterator end() { return v_ + m_Len; } - - // expose address of current registry - const umRegistry* get_reg() const { return m_pReg; } - umRegistry* get_reg() { return m_pReg; } - - - //------------------------------------- - // I/O - //------------------------------------- - - void print ( - FILE* os = stdout, - const char* msg=NULL, - const char* fmt="lf", // [%d|%e|%lf|%g] - int prec =2, // sig.figs|dec.places - int wdth =6, // output spacing [12] - bool vert =false, // vertical/horizontal - int nline=5, // entries per line - int nv =0 // num vals to write (0 --> all) - ) const; - - - void print_STREAM ( - std::ostream& os, - const char* msg=NULL, - char fmt ='G', // [%d|%e|%lf|%g] - int prec =2, // sig.figs|dec.places - int wdth =6, // output spacing [12] - bool vert =false, // vertical/horizontal - int nline=5, // entries per line - int nv =0 // num vals to write (0 --> all) - ) const; - - - std::string display ( - const char* msg=NULL, - char fmt ='D', // [%d|%e|%lf|%g] - int prec =2, // sig.figs|dec.places - int wdth =6, // output spacing [12] - bool vert =false, // vertical/horizontal - int nline=5, // entries per line - int nv =0 // num vals to write (0 --> all) - ) const; - - - // Save vector as (Mx1) array in Matlab ".mat" format (BINARY) - // Note: For Win32, fp MUST be opened in "wb" mode - void m_save_v(FILE* fp, const char* name) const; - void m_load_v(FILE *fp, char **name); - - -protected: - //------------------------------------- - // Optional index checking - //------------------------------------- -#if (CHECK_ARRAY_INDEX) - - void Check_index_0(int i) const { - // check for legal 0-based index - if (i< 0 ) throw 1; - if (i>=m_Len) throw 2; - } - void Check_index_1(int i) const { - // check for legal 1-based index - if (i<1 ) throw 1; - if (i>m_Len) throw 2; - } - -#else - - // no checking of indices - void Check_index_0(int i) const throw() {} - void Check_index_1(int i) const throw() {} - -#endif - - - //------------------------------------------------------- - // member functions involving a subset of the array - //------------------------------------------------------- -public: - - void linspace(T start, T stop, int len=0); - void range(int start, int stop); - - Vector& get_map(const IVec& iM) const; - Vector& set_map(const IVec& iM, const T &x); - Vector& set_map(const IVec& iM, const Vector& X); - - - //------------------------------------------------------- - // operations involving (contiguous) Region1D - //------------------------------------------------------- -public: - Vector(const Region1D< Vector > &R, OBJ_mode md=OBJ_real, const char *sz="vec"); - Vector(const_Region1D< Vector > &R, OBJ_mode md=OBJ_real, const char *sz="vec"); - - const_Region1D< Vector > operator()(const Index1D &I) const; - Region1D< Vector > operator()(const Index1D &I); - - Vector& operator=(const Region1D< Vector > &R); - Vector& operator=(const const_Region1D< Vector > &R); - Vector& append (const Region1D< Vector > &R); - Vector& mult_element(const Region1D< Vector > &R); - Vector& div_element(const Region1D< Vector > &R); - Vector& dd(const Region1D< Vector > &R) const; - Vector& dm(const Region1D< Vector > &R) const; - Vector& operator+=(const Region1D< Vector > &R); - Vector& operator-=(const Region1D< Vector > &R); - //------------------------------------------------------- - - - //------------------------------------------------------- - // operations involving MappedRegion1D - //------------------------------------------------------- -public: - Vector(const MappedRegion1D< Vector > &R, OBJ_mode md=OBJ_real, const char *sz="vec"); - - // IMAP - const_MappedRegion1D< Vector > operator()(const IVec &I) const; - MappedRegion1D< Vector > operator()(const IVec &I); - // IMAP - const_MappedRegion1D< Vector > operator()(const const_Region1D< Vector > &Ri) const; - MappedRegion1D< Vector > operator()(const Region1D< Vector > &Ri); - - - Vector& operator=(const MappedRegion1D< Vector > &R); - Vector& operator=(const const_MappedRegion1D< Vector > &R); - Vector& mult_element(const MappedRegion1D< Vector >& R); - Vector& div_element(const MappedRegion1D< Vector >& R); - Vector& dd(const MappedRegion1D< Vector > &R) const; - Vector& dm(const MappedRegion1D< Vector > &R) const; - Vector& operator+=(const MappedRegion1D< Vector > &R); - Vector& operator-=(const MappedRegion1D< Vector > &R); - //------------------------------------------------------- - -}; - - - -/////////////////////////////////////////////////////////// -// -// define static member data -// -/////////////////////////////////////////////////////////// - -// allow toggling of allocation tracing in debug mode -template bool Vector::s_trace=false; -template int Vector::s_count=0; - - -/////////////////////////////////////////////////////////// -// -// Set initial sizes of the 3 registries here here -// -/////////////////////////////////////////////////////////// - -// Both the smaller registries involve less memory -// than one large matrix, so we preallocate them: -#if (1) -template umRegistry Vector::s_Reg1(500, true, iReg_small); // 16 = 4* 4 -template umRegistry Vector::s_Reg2(500, true, iReg_med); // 256 = 16*16 -template umRegistry Vector::s_Reg3(500, false, 0); // arbitrary length -#else -template umRegistry Vector::s_Reg1(10, true, iReg_small); // 16 = 4* 4 -template umRegistry Vector::s_Reg2(10, true, iReg_med); // 256 = 16*16 -template umRegistry Vector::s_Reg3(10, false, 0); // arbitrary length -#endif - - - -/////////////////////////////////////////////////////////// -// -// constructors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Vector::Vector(const char* sz, OBJ_mode md) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; -} - - -// not "explicit"; allows construction from return objects -//--------------------------------------------------------- -template inline -Vector::Vector(const Vector &B, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - operator=(B); // manage copy of real/temp objects -} - - -//--------------------------------------------------------- -template inline -Vector::Vector(int N, const char* sz, OBJ_mode md) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - initialize(N, true, ZERO); -} - - -//--------------------------------------------------------- -template inline -Vector::Vector(int N, const T x, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - initialize(N, true, x); -} - - -//--------------------------------------------------------- -template inline -Vector::Vector(int N, const T* vdata, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - initialize(N, false); - copy(vdata); -} - - -//--------------------------------------------------------- -template inline -Vector::Vector(const ArrayData& rAD, int N, const char *sdata, OBJ_mode md, const char* sz) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - initialize(N, false); - try { - // Read ascii data into array - std::istringstream ins(sdata); - for (int i=0; i> v_[i]; } - } catch(...) { - umERROR("Vector<%s>(%d, char*)", "istringstream exception", typeid(T).name(), N); - } -} - - -//--------------------------------------------------------- -template inline -Vector::Vector(const T x1, const T x2, const T x3) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name("vec"), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(OBJ_real), m_pReg(NULL) -{ - ++s_count; - initialize(3, false); - vm1_[1]=x1; vm1_[2]=x2; vm1_[3]=x3; -} - - - - -/////////////////////////////////////////////////////////// -// -// destructors -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Vector::~Vector() -//--------------------------------------------------------- -{ - --s_count; - - if (v_) { - destroy(); - } -} - - -//--------------------------------------------------------- -template inline -void Vector::destroy() -//--------------------------------------------------------- -{ - if (v_ && (!m_borrowed)) { - assert(reg_ok()); - m_pReg->free_alloc(v_, m_id); // mark allocation as "available" - } - - v_ = NULL; // Pointers may be tested, - vm1_ = NULL; // so set both to NULL. - m_Len = 0; // no data left - m_id = -1; // no slot in registry -} - - -//--------------------------------------------------------- -template inline -void Vector::destroy_2() -//--------------------------------------------------------- -{ - if (v_ && (!m_borrowed)) { - assert(reg_ok()); - m_pReg->free_alloc_2(v_, m_id); // ***RELEASE*** allocation - } - - v_ = NULL; // Pointers may be tested, - vm1_ = NULL; // so set both to NULL. - m_Len = 0; // no data left - m_id = -1; // no slot in registry -} - - -//--------------------------------------------------------- -template inline -void Vector::Free() -//--------------------------------------------------------- -{ -//destroy (); // mark slot as available - destroy_2(); // release registry entry -} - - - -/////////////////////////////////////////////////////////// -// -// manage allocation -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Vector& Vector::borrow(int N, T* p) -//--------------------------------------------------------- -{ - //--------------------------------------------- - // "Borrowing" data allows wrapping external - // arrays to exploit vector algorithms while - // avoiding any overhead of copying data. - // - // NB: do not tangle external arrays with Vector - // registries. Since this object does not "own" - // the external data, it must not delete it. - // - // return (*this) to enable syntax such as: - // - // y = A * Vj.borrow(n,V.pCol(j)); - //--------------------------------------------- - - destroy(); // reset all members - assert(N >= 0); // must be non-negative - if (!p) { umERROR("Array::borrow(%d)", "pointer was NULL", N); } - m_borrowed = true; // do not delete the external data - if (N > 0) { - v_ = p; // point to the external array - vm1_ = v_ - 1; // adjust 1-offset pointer - m_Len = N; // update length - m_id = -1; // no slot in registry - } - - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::borrow(const Vector& CV) -//--------------------------------------------------------- -{ - Vector& B = const_cast&>(CV); - int N = B.length(); - T* p = B.data(); - this->borrow(N, p); - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::own(Vector& B) -//--------------------------------------------------------- -{ - // "owning" another vector transfers ownership - // of the allocation, avoiding any overhead of - // copying data, e.g. from a temporary object. - - destroy(); // reset all members - - if (!B.ok()) { - return (*this); // both arrays are empty - } - - // Take ownership of B's allocation: - m_pReg= B.m_pReg; // point to B's registry - m_id = B.m_id; // take B's slot in registry - v_ = B.v_; // point to B's array - vm1_ = v_ - 1; // adjust 1-offset pointer - m_Len = B.m_Len; // update length - - m_name = B.m_name; // copy B's name - m_EqTol = B.m_EqTol; // copy B's equality tolerance - m_borrowed= B.m_borrowed; // copy B's borrowed status - m_mode = B.m_mode; // copy B's mode - - // invalidate B: - B.m_id = -1; // invalidate B's slot - B.v_ = NULL; // invalidate B's array - B.vm1_ = NULL; // invalidate B's array - B.m_Len = 0; // invalidate B's length - - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::own_2(Vector& B) -//--------------------------------------------------------- -{ - // call this version when an array is very large, - // and you want to force immediate release of the - // allocation from the registry - - this->destroy_2(); // release (large) allocation - this->own(B); // take over B's allocation - return (*this); -} - - -//--------------------------------------------------------- -template inline -void Vector::initialize(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // Allocate (or reuse) data, adjust pointers - // v_[] is 0-offset for 0-based indexing - // vm1_[] is 1-offset for 1-based indexing - - assert( N >= 0 ); // must be non-negative - - if ((N>0) && (m_Len!=N)) - { - // About to allocate, expect v_ to be NULL - assert( NULL == v_ ); - - // Select storage location: - if (N <= iReg_small) { m_pReg = &s_Reg1; } - else if (N <= iReg_med) { m_pReg = &s_Reg2; } - else { m_pReg = &s_Reg3; } - - v_ = m_pReg->get_alloc(N, m_id); - - assert(m_pReg->check_alloc(v_, m_id, N)); - if (!v_) { umERROR("Vector::initialize(%d)", "alloc failed (%0.2lf MB)", N, double(N*(int)sizeof(T))/(1024.*1024.)); } - - vm1_ = v_ - 1; // make 1-offset - } - else if ((N>0) && (m_Len==N)) - { - assert( v_ ); // reusing allocation - vm1_ = v_ - 1; // make 1-offset - } - else - { - assert(0==N); - v_ = vm1_ = NULL; - } - - m_Len = N; // update length - m_EqTol = 0.0; // adjust for "fuzzy" comparison - - if (N>0 && bInit) { - fill(x); // fill array with given value - } -} - - -//--------------------------------------------------------- -template inline -bool Vector::resize(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // Resize existing object, optionally setting - // the entire array to some given inital value. - // Return value indicates whether size has changed. - - assert(!m_borrowed); // "borrowed" allocations must not be changed - assert( N >= 0 ); // must be non-negative - - bool bResized=false; - - // TODO: (N < m_Len) is an alternate test. - // If new array fits in current allocation, - // just update some housekeeping details. - - if (N != m_Len) - { - bResized=true; - this->destroy(); // clear allocation, zero members - if (N > 0) - { - initialize(N, bInit, x); - } - m_Len = N; - } - else if (bInit && m_Len>0) - { - // no resize, but fill existing array - fill(x); - } - - return bResized; -} - - -//--------------------------------------------------------- -template inline -bool Vector::resize(const Vector& B, bool bInit, T x) -//--------------------------------------------------------- -{ - // Resize existing object to match size of vector B. - // Optionally set entire array to given inital value. - // Return value indicates whether size has changed. - int Nlen=B.size(); - bool bResized = this->resize(Nlen, bInit, x); - return bResized; -} - - -//--------------------------------------------------------- -template inline -void Vector::truncate(int N) -{ - extend(N, false, 0); // alias for extend -} - - -template inline -bool Vector::realloc(int N, bool bInit, T x) -{ - return extend(N, bInit, x); // alias for extend -} - - -template inline -bool Vector::extend(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // resize a Vector, retaining existing values - - if (N<1) { destroy(); return true; } - - assert(!m_borrowed); // "borrowed" data not held in registry - assert( N >= 0 ); // must be non-negative - int Nold = m_Len; // store current size - - if (!ok()) - { - return resize(N, bInit, x); - } - else if (m_Len == N) - { - return true; // i.e. all's OK - //return false; // i.e. not resized - } - else - { - // a. If new size "fits" in current registry, just resize - // b. If new size "belongs" in current registry, just resize - - if ( (N <= iReg_small) && (&s_Reg1==m_pReg)) {v_ = s_Reg1.resize_alloc(v_, N, m_id);} - else if ((N > iReg_small) && (N <= iReg_med ) && (&s_Reg2==m_pReg)) {v_ = s_Reg2.resize_alloc(v_, N, m_id);} - else if ((N > iReg_med) && (&s_Reg3==m_pReg)) {v_ = s_Reg3.resize_alloc(v_, N, m_id);} - else { - switch_Registry(N, bInit, x); - } - - if (!v_) { - umWARNING("Vector::extend()", "Call to s_Reg.resize_alloc(%d) failed", N); - destroy(); - return false; - } - else - { - vm1_ = v_ - 1; // update 1-offset pointer - m_Len=N; - if (N>0 && bInit) - { - // fill new elements with given value - for (int i=Nold+1; i<=N; ++i) { - vm1_[i] = x; - } - } - } - return true; - } -} - - -//--------------------------------------------------------- -template inline -bool Vector::switch_Registry(int N, bool bInit, T x) -//--------------------------------------------------------- -{ - // "borrowed" data is not held in registry - assert(!m_borrowed); - - // non-destructive resizing of existing arrays. - // keeps resized arrays in appropriate registry. - - // compare new with old registry--did we really switch? - umRegistry* pRegOld = m_pReg; - -#if defined(_DEBUG) || defined(DEBUG) - //##################################################### - bool bSwitched = false; - if (&s_Reg1 == m_pReg) - { - // currently in s_Reg1: fixed (small) - if (N <= iReg_small) { - umTRC(1, "switch_Registry: small (no change)\n"); - } else if (N <= iReg_med) { - umTRC(1, "switch_Registry: small --> medium\n"); - bSwitched = true; - } else { - umTRC(1, "switch_Registry: small --> dynamic\n"); - bSwitched = true; - } - } - else if (&s_Reg2 == m_pReg) - { - // currently in s_Reg2: fixed (medium) - if (N <= iReg_small) { - umTRC(1, "switch_Registry: medium --> small\n"); - bSwitched = true; - } else if (N <= iReg_med) { - umTRC(1, "switch_Registry: medium (no change)\n"); - } else { - umTRC(1, "switch_Registry: medium --> dynamic\n"); - bSwitched = true; - } - } - else - { - // currently in s_Reg2: dynamic - if (N <= iReg_small) { - umTRC(1, "switch_Registry: dynamic --> small\n"); - bSwitched = true; - } else if (N <= iReg_med) { - umTRC(1, "switch_Registry: dynamic --> medium\n"); - bSwitched = true; - } else { - umTRC(1, "switch_Registry: dynamic (no change)\n"); - } - } - //##################################################### -#endif - - // constructor selects correct registry - Vector *tmp = new Vector(N, ZERO, OBJ_temp, "switching"); - - int L=std::min(size(), N); // how much data to copy? - tmp->copy(L, data()); // copy existing data - (*this) = (*tmp); // switch ownership, delete tmp - - assert(reg_ok()); - return (pRegOld == m_pReg) ? false : true; -} - - -//--------------------------------------------------------- -template inline -bool Vector::reg_ok() const -//--------------------------------------------------------- -{ - // if (m_borrowed) { return false; } - if (!m_pReg) { return false; } - if (!v_ ) { return false; } - - if ((m_pReg != &s_Reg1) && - (m_pReg != &s_Reg2) && - (m_pReg != &s_Reg3)) { return false; } - - bool bOK = m_pReg->check_alloc(v_, m_id, m_Len); - return bOK; -} - - - - -//--------------------------------------------------------- -template inline -void Vector::compact() const -//--------------------------------------------------------- -{ -//s_Reg1.compact(); // no change to fixed-size registry -//s_Reg2.compact(); // no change to fixed-size registry - s_Reg3.compact(); // release all unused allocations -} - - - -/////////////////////////////////////////////////////////// -// -// copy/load -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template <> inline // specialization for T=double -DVec& DVec::copy(const double *vec) -{ - // Overwrite entire vector (assume vec has enough values). - // call BLAS dcopy() - COPY(m_Len, (const double*)vec, 1, (double*)v_, 1); - return (*this); -} - -template <> inline // specialization for T=double -DVec& DVec::copy(int N, const double *vec) -//--------------------------------------------------------- -{ - if (N > m_Len) { this->resize(N, false); } - - // Overwrite 1st N entries (assume vec has >= N values). - // call BLAS dcopy() - COPY(N, (const double*)vec, 1, (double*)v_, 1); - return (*this); -} - - - -//--------------------------------------------------------- -template inline -Vector& Vector::copy(const T *vec) -//--------------------------------------------------------- -{ - // Assumes vec has enough values. TODO: memcpy() ? - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline -Vector& Vector::copy(int N, const T *vec) -//--------------------------------------------------------- -{ - // Assumes vec has enough values. - - if (N > m_Len) { this->resize(N, false); } - - if (N == m_Len) { - // overwrite entire vector - return copy(vec); - } else { - // overwrite first N entries (of zero-based data) - for (int i=1; i<=N; ++i) { - (*this)(i)=vec[i-1]; - } - return (*this); - } -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::copy(int N, const Vector& V) -//--------------------------------------------------------- -{ - // assume arg has enough values. - assert(N <= V.size()); - - if (N >= m_Len) { - // replace vector - (*this) = V; - } else { - // overwrite first N entries - copy(N, V.data()); - // clean up temporaries - if (V.get_mode() == OBJ_temp) { delete (&V); } - } - return (*this); -} - - -//--------------------------------------------------------- -template inline -void Vector::load(int N, const char *sdata) -//--------------------------------------------------------- -{ - // load ASCII data - resize(N); - try { - std::istringstream ins(sdata); - for (int i=0; i> v_[i]; - } catch(...) { - umERROR("Vector::load(N, char *s)", "problem parsing data."); - } -} - - -template inline -void Vector::set(const T x1, const T x2) -{ - resize(2); vm1_[1]=x1; vm1_[2]=x2; -} - -template inline -void Vector::set(const T x1, const T x2, const T x3) -{ - resize(3); vm1_[1]=x1; vm1_[2]=x2; vm1_[3]=x3; -} - - -template inline -void Vector::set(const T x1, const T x2, const T x3, const T x4) -{ - resize(4); vm1_[1]=x1; vm1_[2]=x2; vm1_[3]=x3; vm1_[4]=x4; -} - - - -/////////////////////////////////////////////////////////// -// -// assignment -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -Vector& Vector::operator=(const T &x) -//--------------------------------------------------------- -{ - fill(x); - return (*this); -} - - -//--------------------------------------------------------- -// enable assignment of IVec to DVec -template inline -Vector& Vector::assign(const IVec &B) -//--------------------------------------------------------- -{ - int len=B.size(); - if (this->m_name=="vec" || this->m_name.empty()) - this->m_name=B.name(); - - this->resize(len); // resize array of T - const int* p = B.data(); // load int data as T - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; iv_[i ]=T(p[i ]); this->v_[i+1]=T(p[i+1]); - this->v_[i+2]=T(p[i+2]); this->v_[i+3]=T(p[i+3]); - } - // cleanup - for (i=N4; iv_[i] = T(p[i]); } - - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*this); -} - - -//--------------------------------------------------------- -// enable assignment of DVec to IVec -template inline -Vector& Vector::assign(const DVec &B) -//--------------------------------------------------------- -{ - int len=B.size(); - if (this->m_name=="vec" || this->m_name.empty()) - this->m_name=B.name(); - - this->resize(len); // resize array of T - const double* p = B.data(); // load double data as T - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; iv_[i ]=T(p[i ]); this->v_[i+1]=T(p[i+1]); - this->v_[i+2]=T(p[i+2]); this->v_[i+3]=T(p[i+3]); - } - // cleanup - for (i=N4; iv_[i] = T(p[i]); } - - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::operator=(const Vector &B) -//--------------------------------------------------------- -{ - if (this->v_ == B.v_) { - // if both vectors are empty, then check for - // NULL to avoid leaking empty OBJ_temp's - if (NULL != this->v_) { - return (*this); - } - } - - int N = B.size(); - if (m_name=="vec" || m_name=="mat" || m_name.empty()) - m_name=B.name(); - - if (N<1) { - // B is empty. Delete if OBJ_temp - if (OBJ_temp == B.get_mode()) { - delete (&B); - } - this->destroy(); // reset to empty array - } - - else if (this->m_borrowed) - { - // This Vector wraps an external array. If lengths - // match, deep copy the data to the external array: - if (m_Len == B.m_Len) { - copy(B.v_); // deep copy into external array - } else { - umERROR("Vector::operator=(Vector&)", - "When assigning an array to a borrowed \n" - "array, lengths must match exactly: \n" - "here the borrowed array has length: %d\n" - " the array being copied has length: %d", m_Len, B.m_Len); - } - - // If B was a temporary object, delete it. - if (B.get_mode() == OBJ_temp) {delete &B;} - } - - else if (OBJ_temp != B.get_mode()) - { - // Deep copy operation - if (m_Len == B.m_Len) { - copy(B.v_); // re-use currrent structure - } else { - destroy(); - initialize(B.m_Len, false); // re-use, with housekeeping - copy(B.v_); - } - } - else - { - // B is a "temporary" object: transfer ownership - - Vector &Bref = const_cast& >(B); - - if (reg_ok()) - { - // free current allocation - assert(m_pReg->check_alloc(v_, m_id, m_Len)); - m_pReg->free_alloc(v_, m_id); // free current allocation - } - - m_Len = Bref.size(); // copy length - m_id = Bref.get_id(); // take B's slot in the registry - v_ = Bref.get_v(); // take B's array - vm1_ = v_ - 1; // adjust 1-based pointer - - if (B.is_borrowed()) { - umWARNING("Vector::operator=(B)", "check transfer of borrowed allocation"); - this->m_borrowed = true; - } else { - m_pReg = Bref.get_reg(); // copy address of B's registry - assert(m_pReg->check_alloc(v_, m_id, m_Len)); - } - - Bref.set_v(NULL); // detach B from its array - Bref.set_id(-1); // mark as unregistered - Bref.m_Len = 0; // mark as empty (for debug trace) - delete &B; // delete temporary object - } - - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::append(const T& x) -//--------------------------------------------------------- -{ - // append a single value, retaining existing values - - assert(!m_borrowed); // avoid changing "borrowed" structure - if (!ok()) { - resize(1); v_[0]=x; - } else { - OBJ_mode old_md = this->get_mode(); // (*this) may be OBJ_temp - this->set_mode(OBJ_real); // stop concat deleting (*this). - (*this) = concat((*this), x); // call global concat(A,x) - this->set_mode(old_md); // restore original mode - } - return (*this); -} - - - -//--------------------------------------------------------- -template inline -Vector& Vector::append(const Vector& B) -//--------------------------------------------------------- -{ - // append a second vector, retaining existing values - - assert(!m_borrowed); // avoid changing "borrowed" structure - if (!ok()) { - (*this)=B; - } else { - OBJ_mode old_md = this->get_mode(); // (*this) may be OBJ_temp - this->set_mode(OBJ_real); // stop concat deleting (*this). - (*this) = concat((*this), B); // call global concat(A,B) - this->set_mode(old_md); // restore original mode - } - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// utilities -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -int Vector::get_nnz(T tol) const -//--------------------------------------------------------- -{ - int nnz = 0; - for (int i=0; i tol) { ++nnz; } - } - return nnz; -} - - - -//--------------------------------------------------------- -template inline -Vector& Vector::zeros(int N) -//--------------------------------------------------------- -{ - if (N>0) {resize(N, true, ZERO);} // resize, then fill - else {fill(ZERO);} - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::ones(int N) -//--------------------------------------------------------- -{ - if (N>0) {resize(N, true, ONE);} // resize, then fill - else {fill(ONE);} - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::fill(const T &x) -//--------------------------------------------------------- -{ - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline -Vector& Vector::operator!() const -//--------------------------------------------------------- -{ - // returns a "Boolean" result: all non-zeros in - // this are "toggled" to zero, and vice-versa. - - // initialize result to ZERO, then toggle... - Vector* tmp = new Vector(m_Len, ZERO, OBJ_temp); - for (int i=0; iv_[i]) { - tmp->v_[i] = ONE; - } - } - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::set_abs() -//--------------------------------------------------------- -{ - for (int i=0; i inline -Vector& Vector::set_min_val(double dtol) -//--------------------------------------------------------- -{ - for (int i=0; i inline -Vector& Vector::SQRT() -//--------------------------------------------------------- -{ - // apply(::sqrt); - for (int i=0; i0) { - v_[i] = (T) sqrt(double(v_[i])); - } else { - v_[i] = ZERO; - } - } - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::SQR() -//--------------------------------------------------------- -{ - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // umroll - for (i=0; i inline -T Vector::max_val() const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - T res = v_[0]; - for (int i=1; im_mode) {delete this;} - return res; -} - -//--------------------------------------------------------- -template inline -T Vector::min_val() const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - T res = v_[0]; - for (int i=1; im_mode) {delete this;} - return res; -} - - -//--------------------------------------------------------- -template inline -void Vector::max_val(T& res, int& id) const -//--------------------------------------------------------- -{ - if (m_Len<1) { res = 0.0; id = -1; return; } - - // work on local vars - T tres = vm1_[1]; int tid=1; - for (int i=2; i<=m_Len; ++i) { - if (vm1_[i] > tres) { tres = vm1_[i]; tid = i; } - } - if (OBJ_temp == this->m_mode) {delete this;} - res=tres; id=tid; // update user args -} - - -//--------------------------------------------------------- -template inline -void Vector::min_val(T& res, int& id) const -//--------------------------------------------------------- -{ - if (m_Len<1) { res = 0.0; id = -1; return; } - - // work on local vars - T tres = vm1_[1]; int tid=1; - for (int i=2; i<=m_Len; ++i) { - if (vm1_[i] < tres) { tres = vm1_[i]; tid = i; } - } - if (OBJ_temp == this->m_mode) {delete this;} - res=tres; id=tid; // update user args -} - - -//--------------------------------------------------------- -template inline -T Vector::max_val_abs() const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - T res = std::abs(v_[0]); - for (int i=1; im_mode) {delete this;} - return res; -} - - -//--------------------------------------------------------- -template inline -T Vector::min_val_abs() const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - T res = std::abs(v_[0]); - for (int i=1; im_mode) {delete this;} - return res; -} - - - -//--------------------------------------------------------- -template <> inline // specialization for T=double -double Vector::sum() const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - double one = 1.0; - // call BLAS ddot() - double val = DOT(m_Len, &one, 0, (const double*)v_, 1); - if (OBJ_temp == this->m_mode) {delete this;} - return val; -} - - -//--------------------------------------------------------- -template inline -T Vector::sum() const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - - // accumulate - T r0=ZERO, r1=ZERO, r2=ZERO, r3=ZERO; - for (i=0; im_mode) {delete this;} - return r0; -} - - -//--------------------------------------------------------- -template inline -T Vector::sumsquares() const -//--------------------------------------------------------- -{ - // Return the sum of squares of all elements. - T ret = inner(*this); - return ret; -} - - -//--------------------------------------------------------- -template <> inline // specialization for T=double -double Vector::inner(const Vector &B) const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - assert(B.size() >= m_Len); - // call BLAS ddot() - double ret = DOT(m_Len, this->v_, 1, B.data(), 1); - if (OBJ_temp == B.get_mode() ) {delete (&B);} - if (OBJ_temp == this->m_mode) {delete this;} - return ret; -} - - -//--------------------------------------------------------- -template inline -T Vector::inner(const Vector &B) const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - int N = B.size(); - assert(N >= m_Len); - // pass a pointer into B's data - T ret = inner(N, B.data()); - if (OBJ_temp == B.getmode() ) {delete (&B);} - return ret; -} - - -//--------------------------------------------------------- -template inline -T Vector::inner(int N, const T* p) const -//--------------------------------------------------------- -{ - if (m_Len<1) return ZERO; - assert(N >= m_Len); - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - - // accumulate - T r0=ZERO, r1=ZERO, r2=ZERO, r3=ZERO; - for (i=0; im_mode) {delete this;} - return r0; -} - - -//--------------------------------------------------------- -template inline -double Vector::mean() const -//--------------------------------------------------------- -{ - // Return mean (average) of all elements. - if (m_Len<1) return 0.0; - double ret = ((double)sum()) / (double)m_Len; - if (OBJ_temp == this->m_mode) {delete this;} - return ret; -} - - - -/////////////////////////////////////////////////////////// -// -// vector norms -// -/////////////////////////////////////////////////////////// - - -template inline -double Vector::norm(norm_type lp) const -{ - double nrx = 0.0; - if (lp == NORM_L1 || lp == NORM_l1) - { - for (int i=0; iv_[i]);} - if (lp == NORM_L1) nrx /= double(m_Len); - } - else if (lp == BLAS_L2 || lp == BLAS_l2) - { - //if (sizeof(T) == sizeof(double)) - //nrx = NRM2(m_Len, this->v_, 1); - nrx = sqrt(double(sumsquares())); - } - else // if (lp == NORM_Linf) - { - double tmp=0.0, tmax = -1.0; - for (int i=0; itmax) tmax = tmp; - } - nrx = tmax; - } - if (OBJ_temp == this->m_mode) {delete this;} - return nrx; -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::normalize() -//--------------------------------------------------------- -{ - div_val(norm(NORM_Linf)); // divide by |max| element -//div_val(norm(BLAS_L2)); // divide by Euclidean length - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::randomize(double from, double to, int N) -//--------------------------------------------------------- -{ - if ((N>0) && (N!=m_Len)) { - // allow (optional) simultaneous resize - resize(N, false); - } - - // random numbers clamped within - // user-defined range: - for (int i=0; i inline -Vector& Vector::rand(double from, double to, int N) -//--------------------------------------------------------- -{ - return randomize(from, to, N); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::randnorm() -//--------------------------------------------------------- -{ - randomize(0.0, 1.0); - normalize(); - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::apply(FuncPtr fptr) -//--------------------------------------------------------- -{ - // apply single arg function to all elements (e.g. sin, exp) - for (int i=0; i inline -Vector& Vector::exp_val() -//--------------------------------------------------------- -{ - apply(::exp); - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::log() -//--------------------------------------------------------- -{ - if (this->min_val()<=0.0) { - umWARNING("Vector::log()", "negative elements passed to log()"); - } - apply(::log); - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::chop(double eps) -//--------------------------------------------------------- -{ - // set "small" elements to 0.0; - for (int i=0; i inline -bool Vector::same_object(const Vector& B) const -//--------------------------------------------------------- -{ - if (this != &B) { - return false; - } else { - return true; - } -} - - -//--------------------------------------------------------- -template inline -bool Vector::operator==(const Vector& B) const -//--------------------------------------------------------- -{ - // same vector? - if (v_ == B.v_) { return true; } // NB: NULL==NULL ? - int len = B.size(); - if (len != m_Len) { return false; } - for (int i=0; i m_EqTol ) { - // different value - return false; - } - } - return true; -} - - - - -/////////////////////////////////////////////////////////// -// -// member Boolean operations -// -/////////////////////////////////////////////////////////// - - -template inline -Vector& Vector::eq(T val) const -{ - // return a vector of [0/1] values: - // r(i) = (v(i) == val) ? 1:0 - - // initialize with zeros. - Vector *tmp=new Vector(m_Len, ZERO, OBJ_temp, "(x==val)"); - for (int i=1; i<=m_Len; ++i) { if (this->vm1_[i] == val) { tmp->vm1_[i] = this->ONE; } } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template inline -Vector& Vector::le(T val) const -{ - // return a vector of [0/1] values: - // r(i) = (v(i) <= val) ? 1:0 - - // initialize with zeros. - Vector *tmp=new Vector(m_Len, ZERO, OBJ_temp, "(x<=val)"); - for (int i=1; i<=m_Len; ++i) { if (this->vm1_[i] <= val) { tmp->vm1_[i] = this->ONE; } } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template inline -Vector& Vector::lt(T val) const -{ - // return a vector of [0/1] values: - // r(i) = (v(i) < val) ? 1:0 - - // initialize with zeros. - Vector *tmp=new Vector(m_Len, ZERO, OBJ_temp, "(xvm1_[i] < val) { tmp->vm1_[i] = this->ONE; } } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template inline -Vector& Vector::lt_abs(T val) const -{ - // return a vector of [0/1] values: - // r(i) = |v(i)| < val ? 1:0 - - // initialize with zeros. - Vector *tmp=new Vector(m_Len, ZERO, OBJ_temp, "(|x|vm1_[i] = this->ONE; } } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template inline -Vector& Vector::ge(T val) const -{ - // return a vector of [0/1] values: - // r(i) = (v(i) >= val) ? 1:0 - - // initialize with zeros. - Vector *tmp=new Vector(m_Len, ZERO, OBJ_temp, "(x>=val)"); - for (int i=1; i<=m_Len; ++i) { if (this->vm1_[i] >= val) { tmp->vm1_[i] = this->ONE; } } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template inline -Vector& Vector::gt(T val) const -{ - // return a vector of [0/1] values: - // r(i) = (v(i) > val) ? 1:0 - - // initialize with zeros. - Vector *tmp=new Vector(m_Len, ZERO, OBJ_temp, "(x>val)"); - for (int i=1; i<=m_Len; ++i) { if (this->vm1_[i] > val) { tmp->vm1_[i] = this->ONE; } } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - -template inline -Vector& Vector::gt_abs(T val) const -{ - // return a vector of [0/1] values: - // r(i) = |v(i)| > val ? 1:0 - - // initialize with zeros. - Vector *tmp=new Vector(m_Len, ZERO, OBJ_temp, "(|x|>tol)"); - T fval = std::abs(val); - for (int i=1; i<=m_Len; ++i) { if (std::abs(vm1_[i]) > fval) { tmp->vm1_[i] = this->ONE; } } - if (OBJ_temp == this->m_mode) {delete this;} - return (*tmp); -} - - - -template inline -bool Vector::any(const T& val) const -{ - // return true if any instance of the - // given value is found in the array - - for (int i=1; i<=m_Len; ++i) { - if (val == this->vm1_[i]) { - return true; - } - } - return false; -} - - -///////////////////////////////////////////////////////// -// -// numerical routines. -// -// Default routines are provided to accommodate all -// data types, plus calls to BLAS for T=. -// -///////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -void Vector::add_val(const T &x) -//--------------------------------------------------------- -{ - // Add a value to all elements. - - if (ZERO==x) { return; } - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline // specialization for T=double -void Vector::mult_val(const double &x) -//--------------------------------------------------------- -{ - // handle special cases - if (ZERO==x) {fill(ZERO); return;} - if (ONE ==x) { return; } - - // call BLAS dscal() - SCAL(m_Len, x, v_, 1); -} - - -//--------------------------------------------------------- -template inline -void Vector::mult_val(const T &x) -//--------------------------------------------------------- -{ - // Multiply all elements by a value. - - // handle special cases - if (ZERO==x) {fill(ZERO); return;} - if (ONE ==x) { return; } - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline // specialization for T=double -void Vector::div_val(const double &x) -//--------------------------------------------------------- -{ - // Divide all elements by a value. - - if (1.0==x) { return; } - if (0.0==x) throw "division by zero"; - - double recip = 1.0/x; // convert fp divisions - mult_val(recip); // ... to multiplications -} - - -//--------------------------------------------------------- -template inline -void Vector::div_val(const T &x) -//--------------------------------------------------------- -{ - // Divide all elements by a value. - - // handle special cases - if (ONE==x) { return; } - if (T(0)==x) throw "division by zero"; - - // handle integer division - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline -void Vector::pow_val(const T &x) -//--------------------------------------------------------- -{ - // Raise all elements to a power. - - // handle special cases - if (ZERO==x) {fill(ONE); return;} // all elements become 1 - if (ONE ==x) { return; } // array remains the same - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline // specialization for T=double -Vector& Vector::operator+=(const Vector& B) -//--------------------------------------------------------- -{ - assert(B.size() >= m_Len); // B may be longer than A - const double* p = B.data(); // operate on the base array - // call BLAS daxpy() - AXPY(m_Len, 1.0, (double*)p, 1, v_, 1); - - // if B is temporary, delete it. - if (B.get_mode() == OBJ_temp) {delete (&B);} - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::operator+=(const Vector& B) -//--------------------------------------------------------- -{ - // element-by-element --> A .+ B - - assert(B.size() >= m_Len); // B may be longer than A - const T* p = B.data(); // operate on the base array - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline // specialization for T=double -Vector& Vector::operator-=(const Vector& B) -//--------------------------------------------------------- -{ - assert(B.size() >= m_Len); // B may be longer than A - const double *p = B.data(); // operate on the base array - // call BLAS daxpy() - AXPY(m_Len, -1.0, (double*)p, 1, v_, 1); - - // if B is temporary, delete it. - if (B.get_mode() == OBJ_temp) {delete (&B);} - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::operator-=(const Vector& B) -//--------------------------------------------------------- -{ - // element-by-element --> A .- B - - assert(B.size() >= m_Len); // B may be longer than A - const T* p = B.data(); // operate on the base array - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline -Vector& Vector::operator*=(const T* p) -//--------------------------------------------------------- -{ - // element-by-element --> A .* data - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline -Vector& Vector::operator*=(const Vector& B) -//--------------------------------------------------------- -{ - // element-by-element --> A .* B - - assert(B.size() >= m_Len); // B may be longer than A - const T* p = B.data(); // operate on the base array - (*this) *= (p); - - // if B is temporary, delete it. - if (B.get_mode() == OBJ_temp) {delete (&B);} - return (*this); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::operator/=(const Vector& B) -//--------------------------------------------------------- -{ - // element-by-element --> A ./ B - - if (m_Len>0) - { - assert(B.size() >= m_Len); // B may be longer than A - assert(B.min_val_abs()>0.0); // DEBUG check for zero divisor - - const T* p = B.data(); // operate on the base array - - int Nmod4 = m_Len & 3; - int N4 = m_Len - Nmod4, i=0; - // unroll - for (i=0; i inline -Vector& Vector::dd(const Vector &B) const -//--------------------------------------------------------- -{ - // (*this) is not changed: C = A ./ B - -#ifndef NDEBUG - // FIXME: tmp ctor may delete (*this) - // if (OBJ_temp == m_mode) {umWARNING("Vector::dd(B)", "check for side-effects");} -#endif - - std::string sz; tmp_op_name(name(), "./", B.name(), sz); - Vector *tmp=new Vector((*this), OBJ_temp, sz.c_str()); - (*tmp)/=(B); - return (*tmp); -} - - -//--------------------------------------------------------- -template inline -Vector& Vector::dm(const Vector &B) const -//--------------------------------------------------------- -{ - // (*this) is not changed: C = A .* B - -#ifndef NDEBUG - // FIXME: tmp ctor may delete (*this) - //if (OBJ_temp == m_mode) {umWARNING("Vector::dm(B)", "check for side-effects");} -#endif - - std::string sz; tmp_op_name(name(), ".*", B.name(), sz); - Vector *tmp=new Vector((*this), OBJ_temp, sz.c_str()); - (*tmp)*=(B); - return (*tmp); -} - - -//--------------------------------------------------------- -template <> inline // specialization for T=double -void Vector::axp_y(const double& alpha, const Vector& X) -//--------------------------------------------------------- -{ - // BLAS example: this += alpha*X - assert(this->size() == X.size()); - AXPY(m_Len, alpha, (double*)X.data(), 1, this->v_, 1); - - // if X is temporary, delete it. - if (X.get_mode() == OBJ_temp) {delete (&X);} -} - - -//--------------------------------------------------------- -template inline -void Vector::axp_y(const T& alpha, const Vector& X) -//--------------------------------------------------------- -{ - (*this) += (alpha*X); -} - - - -//--------------------------------------------------------- -template <> inline // specialization for T=double -void Vector::axp_y -( - const double& alpha, - const Vector& X, - const Vector& Y -) -//--------------------------------------------------------- -{ - // BLAS example: this = alpha*X + y - assert(Y.size() == X.size()); - - (*this) = Y; // copy Y, then add alpha*X, - AXPY(m_Len, alpha, (double*)X.data(), 1, this->v_, 1); - - // operator=() above deletes temporary Y - // if X is temporary, delete it here. - if (X.get_mode() == OBJ_temp) {delete (&X);} -} - - -//--------------------------------------------------------- -template inline -void Vector::axp_y -( - const T& alpha, - const Vector& X, - const Vector& Y -) -//--------------------------------------------------------- -{ - assert(Y.size() == X.size()); - (*this) = Y; // copy Y, - (*this) += (alpha*X); // then add alpha*X -} - - - - -/////////////////////////////////////////////////////////// -// -// I/O: vector input/output -// -/////////////////////////////////////////////////////////// - - -// Write a format that can be read by Vector -template -std::ostream& operator<<(std::ostream &s, const Vector &A) -{ - int N = A.size(); - s << N << "\n"; - for (int i=0; i -std::istream & operator>>(std::istream &s, Vector &A) -{ - int N = 0; - s >> N; - if (A.size() != N) { A.resize(N); } - for (int i=0; i> A[i]; } - return s; -} - - -//--------------------------------------------------------- -template -void Vector::print -( - FILE* os, - const char* msg, - const char* fmt, // [%d|%e|%lf|%g] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - bool vert, // vertical/horizontal - int nline, // entries per line - int nv // num vals to write (0 --> all) -) const -//--------------------------------------------------------- -{ - static char buf[20] = {""}; - - // write min(nv,len) vals - int len = this->size(); - if (nv > 0) len = (nv<=len ? nv : len); - - if (msg) { fprintf(os, "%s\n", msg); } - fprintf(os, "(%d)\n", len); - - if (1==nline || vert) { - - // handle integer data types - if (sizeof(T) == sizeof(double)) - sprintf(buf, "%c%d.%d%s\n", '%',wdth, prec,fmt); - else sprintf(buf, "%c%dd\n", '%',wdth); - - for (int i=0; i -void Vector::print_STREAM -( - std::ostream& os, - const char* msg, - char fmt, // [%d|%e|%lf|%g] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - bool vert, // vertical/horizontal - int nline, // entries per line - int nv // num vals to write (0 --> all) -) const -//--------------------------------------------------------- -{ - // save stream settings - std::ios_base::fmtflags flgs = os.flags(); - if ('E' == toupper(fmt)) - { os << std::setiosflags(std::ios::scientific); } - else if ('F' == toupper(fmt)) - //{ os << std::setiosflags(std::ios::fixed); } - { os << std::setiosflags(std::ios::fixed|std::ios::showpoint); } - else { ; } // general format - //os << std::setiosflags();} - os << std::setprecision(prec); - - // write min(nv,len) vals - int len = this->size(); - if (nv > 0) len = (nv<=len ? nv : len); - - if (msg) { os << msg << "\n"; } - os << "(" << len << ")\n"; - - if (1==nline || vert) { - for (int i=0; i -std::string Vector::display -( - const char* msg, - char fmt, // [%d|%e|%lf|%g] - int prec, // sig.figs|dec.places - int wdth, // output spacing [12] - bool vert, // vertical/horizontal - int nline, // entries per line - int nv // num vals to write (0 --> all) -) const -//--------------------------------------------------------- -{ - std::stringstream ss; - - if ('E' == toupper(fmt)) - { ss << std::setiosflags(std::ios::scientific); } - else if ('F' == toupper(fmt)) - { ss << std::setiosflags(std::ios::fixed|std::ios::showpoint); } - else { ; } // general format - ss << std::setprecision(prec); - - // write min(nv,len) vals - int len = this->size(); - if (nv > 0) len = (nv<=len ? nv : len); - - if (msg && vert) { ss << msg << "\n"; } - else if (msg) { ss << msg << " "; } - - ss << "(" << len << "): "; - if (vert) ss << '\n'; - - if (1==nline || vert) { - for (int i=0; i -void Vector::m_save_v(FILE* fp, const char* name) const -//--------------------------------------------------------- -{ - // Save vector as (M,1) array in Matlab ".mat" format (BINARY) - // Note: For Win32, fp MUST be opened in "wb" mode - - if (!this->ok()) { - umWARNING("Vector::m_save_v","Empty vector"); - return; - } - - int M = this->size(); - - umMATLAB mat; - mat.type = 1000*MACH_ID + 100*ORDER + 10*PRECISION + 0; - mat.m = M; // save as Mx1 array - mat.n = 1; // one column - mat.imag = 0; // FALSE; - mat.namlen = (name? (long)(strlen(name)+1) : (long)1); - - // write header - fwrite(&mat,sizeof(umMATLAB),1,fp); - // write name - if ( name == (char *)NULL ) - fwrite("",sizeof(char),1,fp); - else - fwrite(name,sizeof(char),(int)(mat.namlen),fp); - - // write actual data - if (sizeof(T) == sizeof(double)) { - fwrite(v_,sizeof(double),M,fp); - } else { - for (int i=0; i -void Vector::m_load_v(FILE *fp, char **name) -//--------------------------------------------------------- -{ - // loads a ".mat" file variable (MATLAB format) - // imaginary parts ignored - - umMATLAB mat; - - if (fread(&mat,sizeof(umMATLAB),1,fp) != 1) - umERROR("E_FORMAT","m_load_v"); - if (mat.type >= 10000) // don't load a sparse matrix - umERROR("E_FORMAT","m_load_v"); - - int m_flag = (mat.type/1000) % 10; - int o_flag = (mat.type/100) % 10; - int p_flag = (mat.type/10) % 10; - int t_flag = (mat.type) % 10; - if (m_flag != MACH_ID) umERROR("E_FORMAT","m_load_v"); - if ( t_flag != 0 ) umERROR("E_FORMAT","m_load_v"); - if ( p_flag != DOUBLE_PREC && - p_flag != SINGLE_PREC ) umERROR("E_FORMAT","m_load_v"); - - *name = (char *)malloc((unsigned)(mat.namlen)+1); - if ( fread(*name,sizeof(char),(unsigned)(mat.namlen),fp) == 0 ) - umERROR("E_FORMAT","m_load_v"); - - int M=mat.m, N=mat.n; - this->resize(M*N); - - float f_temp=0.0f; - double d_temp=0.0; - int i=0, iR=0, jC=0; - - if ((p_flag == DOUBLE_PREC) && (sizeof(T) == sizeof(double))) - { - // read data directly into allocation - fread(this->v_, sizeof(double),M*N,fp); - } - else - { - // load one element at a time - if (p_flag == DOUBLE_PREC) { - for (i=0; iv_[i] = (T)(d_temp); // cast double to - } - } else { - for (i=0; iv_[i] = (T)(f_temp); // cast float to - } - } - } - - // skip imaginary part - if (mat.imag) - { - if (p_flag == DOUBLE_PREC) { - for (i=0; i inline -Vector& operator+(const Vector &A, const Vector &B) -{ - std::string sz; tmp_op_name(A.name(),"+",B.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - - -template inline -Vector& operator-(const Vector &A, const Vector &B) -{ - std::string sz; tmp_op_name(A.name(),"-",B.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - - -// C = A + x -// C = x + A -// C = A - x -// C = x - A (make vector X from scalar x) - -template inline -Vector& operator+(const Vector &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"+","x", sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - - -template inline -Vector& operator+(const T &x, const Vector &A) -{ - std::string sz; tmp_op_name("x","+",A.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - - -template inline -Vector& operator-(const Vector &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"-","x", sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) -= x; - return (*tmp); -} - - -template inline -Vector& operator-(const T &x, const Vector &A) -{ - // Create vec X filled with scalar x, then call X - A - - std::string sz; tmp_op_name("x","-",A.name(), sz); - - Vector *tmp=new Vector(A.size(), x, OBJ_temp, sz.c_str()); - (*tmp) -= A; - return (*tmp); -} - - - -// C = A * x -// C = x * A -// C = A .* B Note: element-by-element -// C = A ./ B Note: element-by-element -// C = A / x -// C = x / A - -template inline -Vector& operator*(const Vector &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"*","x", sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -template inline -Vector& operator*(const T &x, const Vector &A) -{ - std::string sz; tmp_op_name("x","*",A.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -/* -//--------------------------------------------------------- -// specialization for T=double -inline DVec& operator*(const DVec& A, const DVec& B) -//--------------------------------------------------------- -{ - int n = A.size(); - assert(A.size() == n); - // element-by-element --> A .* B - // using BLAS2 symmetric banded mat*vec - std::string sz; tmp_op_name(A.name(),"*",B.name(), sz); -//DVec *tmp=new DVec(A, OBJ_temp, sz.c_str()); - DVec *tmp=new DVec(n, sz.c_str(), OBJ_temp); -//dsbmv(uplo, n, kd, alpha, double *a, lda, double *x, int incx, double beta, double *y, int incy); - SBMV ('U', n, 0, 1.0, A.data(), 1, B.data(), 1, 0.0, tmp->data(), 1); - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*tmp); -} -*/ - -template inline -Vector& operator*(const Vector &A, const Vector &B) -{ - // element-by-element --> A .* B - std::string sz; tmp_op_name(A.name(),"*",B.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= B; - return (*tmp); -} - - -template inline -Vector& operator/(const Vector &A, const Vector &B) -{ - // element-by-element --> A ./ B - std::string sz; tmp_op_name(A.name(),"/",B.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) /= B; - return (*tmp); -} - - -template inline -Vector& operator/(const Vector &A, const T &x) -{ - std::string sz; tmp_op_name(A.name(),"/","x", sz); - assert(std::abs(x) > (T)0); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) /= x; - return (*tmp); -} - - -template inline -Vector& operator/(const T &x, const Vector &A) -{ - // create a vector filled with scalar x; tmp = tmp./A - std::string sz; tmp_op_name("x","/",A.name(), sz); - - Vector *tmp=new Vector(A.size(), x, OBJ_temp, sz.c_str()); - (*tmp) /= A; - return (*tmp); -} - - - -/////////////////////////////////////////////////////////// -// -// Globals: double precision norms -// -/////////////////////////////////////////////////////////// - - -inline double norm1(const DVec& V) -{ - double nval = V.norm(NORM_l1); -//double nval = V.norm(NORM_L1); // scaled - if (V.get_mode() == OBJ_temp) { delete (&V); } - return nval; -} - -inline double norm2(const DVec& V) -{ - double nval = V.norm(BLAS_L2); - if (V.get_mode() == OBJ_temp) { delete (&V); } - return nval; -} - -inline double norm_inf(const DVec& V) -{ - double nval = V.norm(NORM_Linf); - if (V.get_mode() == OBJ_temp) { delete (&V); } - return nval; -} - -inline double norm(const DVec& V) -{ - return norm2(V); -} - - - -/////////////////////////////////////////////////////////// -// -// Globals: miscellaneous operations -// -/////////////////////////////////////////////////////////// - - -// C = -A : unary negation -// C = !A : boolean not -// x = A.B : inner product -// Z = aX+Y : [*]axpy -// -// Y = apply(f, X); - - -// negation (unary operator) -template inline -Vector& operator- (const Vector &A) -{ - std::string sz; tmp_op_name(" ","-",A.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= T(-1); - return (*tmp); -} - - -// boolean (unary operator) -template inline -Vector& operator! (const Vector &A) -{ - std::string sz; tmp_op_name(" ","!",A.name(), sz); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - tmp->operator!(); - return (*tmp); -} - - -// x = A.B -template inline -T inner(const Vector &A, const Vector &B) -{ - T retval = A.inner(B); - - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - - return retval; -} - - -// daxpy : Z = aX+Y -template inline -Vector& axp_y(const double alpha, const Vector &X, const Vector &Y) -{ - std::string sz; tmp_op_name(X.name(), "*a+", Y.name(), sz); - - Vector *tmp=new Vector(Y, OBJ_temp, sz.c_str()); - tmp->axp_y(alpha, X); - return (*tmp); -} - - -// apply : Y = = sin(X) = apply(sin, X); -template inline -Vector& apply(FuncPtr fptr, const Vector &X) -{ - char buf[100]={""}; - snprintf(buf, (size_t)90, "func(%s)", X.name()); - - Vector *tmp=new Vector(X, OBJ_temp, buf); - tmp->apply(fptr); - return (*tmp); -} - - - -/* -// overloads for integer arg -template inline -Vector& operator/(const Vector &A, int i) { return A / ((T)i); } -template inline -Vector& operator/(int i, const Vector &A) { return ((T)i) / A; } - -template inline -Vector& operator*(const Vector &A, int i) { return A * ((T)i); } -template inline -Vector& operator*(int i, const Vector &A) { return ((T)i) * A; } -*/ - - -/////////////////////////////////////////////////////////// -// -// Globals: Matlab "find" operations -// -/////////////////////////////////////////////////////////// - - -template inline -IVec& find(const Vector &V, char op, T val) -{ - std::string sz; - if (sizeof(T) == sizeof(double)) { - sz=umOFORM("find(%s %c %g)", V.name(), op, val); - } else { - sz=umOFORM("find(%s %c %d)", V.name(), op, val); - } - - - int len = V.size(); - IVec mask(len); - - int count=0; - - switch (op) { - - case '<': // find ids of elements less than val - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - if (V(i) < val) { - mask(i) = i; // ith element satisfies condition - count++; - } - } - break; - - case '=': // find ids of elements that equal val - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - if (V(i) == val) { - mask(i) = i; // ith element satisfies condition - count++; - } - } - break; - - case '>': // find ids of elements greater than val - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - if (V(i) > val) { - mask(i) = i; // ith element satisfies condition - count++; - } - } - break; - - case '!': // find ids of elements != val - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - if (V(i) != val) { - mask(i) = i; // ith element satisfies condition - count++; - } - } - break; - - - } - - int sk=0; - IVec *tmp = new IVec(count, sz.c_str(), OBJ_temp); - for (int i=1; i<=len; ++i) { - if (mask(i) >= 1) { - (*tmp)(++sk) = mask(i); // element mask(i) satisfied condition - } - } - -#if (0) // defined(_DEBUG) || defined(DEBUG) - umMSG(1, "find(Vec) : found %d matching elements\n", count); - if ((count>0) && (count<=20)) - umMSG(1, "%s\n", tmp->display(" ", 0,3,false,20).c_str()); -#endif - - if (V.get_mode() == OBJ_temp) { delete (&V); } - return (*tmp); -} - - - -template inline -IVec& find(const Vector &A, char op, const Vector &B) -{ - std::string sz; - sz=umOFORM("find(%s %c %s)", A.name(), op, B.name()); - - int len = A.size(), blen=B.size(); - - // for '&' operation, lengths need not match - if (op != '&') { - assert(blen == len); - } - - IVec mask(len); - - int count=0; - - switch (op) { - - case '<': // find ids of elements less than val - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - if (A(i) < B(i)) { - mask(i) = i; // ith element satisfies condition - count++; - } - } - break; - - case '=': // find ids of elements that equal val - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - if (A(i) == B(i)) { - mask(i) = i; // ith element satisfies condition - count++; - } - } - break; - - case '>': // find ids of elements greater than val - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - if (A(i) > B(i)) { - mask(i) = i; // ith element satisfies condition - count++; - } - } - break; - - case '&': // return elements that are in both sets - //----------------------------------------------------- - for (int i=1; i<=len; ++i) { - for (int j=1; j<=blen; ++j) { - if (A(i) == B(j)) { - mask(i) = i; // ith element satisfies condition - count++; - break; // add value A(i), move to next i - } - } - } - break; - - } - - int sk=0; - IVec *tmp = new IVec(count, sz.c_str(), OBJ_temp); - - if (op != '&') { - for (int i=1; i<=len; ++i) { - if (mask(i) >= 1) { - (*tmp)(++sk) = mask(i); // element mask(i) satisfied condition - } - } - } else { - for (int i=1; i<=len; ++i) { - if (mask(i) >= 1) - { - // in this case we return the actual values that - // were in both sets. The indices into A where - // these were found are are stored in mask, so - // return that actual value, not just the index. - - // element A(mask(i)) was in both "sets" - (*tmp)(++sk) = (int) A(mask(i)); - } - } - } - - - -#if (0) // defined(_DEBUG) || defined(DEBUG) - umMSG(1, "find(Vec%cVec) : found %d matching elements\n", op,count); - if ((count>0) && (count<=20)) - umMSG(1, "%s\n", tmp->display(" ", 0,3,false,20).c_str()); -#endif - - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - - return (*tmp); -} - - - -/////////////////////////////////////////////////////////// -// -// Globals: Matlab "setdiff" operation -// -/////////////////////////////////////////////////////////// - -#include - -template inline -Vector& setdiff(const Vector &A, const Vector &B) -{ - // return values in A that are not in B, sorting result - - Vector *tmp = new Vector("setdiff(A,B)", OBJ_temp); - - int Na=A.size(), Nb=B.size(), i=0; - if (Nb<1) { - (*tmp) = sort(A, false); // NOT deleting duplicates - } - else - { - typedef typename std::set::iterator SetIt; - - // Note: std::set sorts/removes duplicates from A - std::set us; - for (i=1; i<=Na; ++i) {us.insert(A(i));} - for (i=1; i<=Nb; ++i) {us.erase (B(i));} - - int len = (int) us.size(), sk=0; - tmp->resize(len); SetIt it; - for (it=us.begin(), sk=1; it!=us.end(); it++, sk++) { - (*tmp)(sk) = (*it); - } - } - - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - - return (*tmp); -} - - -template inline -Vector& setdiff(const Vector &A, const T& x) -{ - // return values in A that are not in B, sorting result - - Vector *tmp = new Vector("setdiff(A,x)", OBJ_temp); - - int Na=A.size(), i=0; - - typedef typename std::set::iterator SetIt; - - // Note: std::set sorts/removes duplicates from A - std::set us; - for (i=1; i<=Na; ++i) { us.insert(A(i)); } - - // if x is in the set, remove it. - us.erase(x); - - int len = (int) us.size(), sk=0; - tmp->resize(len); SetIt it; - for (it=us.begin(), sk=1; it!=us.end(); it++, sk++) { - (*tmp)(sk) = (*it); - } - - if (A.get_mode() == OBJ_temp) { delete (&A); } - - return (*tmp); -} - - - -/////////////////////////////////////////////////////////// -// -// Globals: Matlab "unique" operation -// -/////////////////////////////////////////////////////////// - -template inline -Vector& unique(const Vector &A) -{ - // return sorted values of A, removing duplicates - Vector *tmp = new Vector("unique(A)", OBJ_temp); - - int Na=A.size(), i=0; - if (Na<=1) { - // degenerate cases Na = {0,1} - tmp->resize(Na); for(i=1;i<=Na;++i) {(*tmp)(i)=A(i);} - } - else - { - typedef typename std::set::iterator SetIt; - - // Note: std::set sorts/removes duplicates from A - std::set us; - for (i=1; i<=Na; ++i) {us.insert(A(i));} - int len = (int) us.size(), sk=0; - tmp->resize(len); SetIt it; - for (it=us.begin(), sk=1; it!=us.end(); it++, sk++) { - (*tmp)(sk) = (*it); - } - } - if (A.get_mode() == OBJ_temp) { delete (&A); } - return (*tmp); -} - - -/////////////////////////////////////////////////////////// -// -// Globals: Matlab "concat" operations -// -/////////////////////////////////////////////////////////// - - -// concatenate 2 vectors -template inline -Vector& concat(const Vector &A, const Vector &B) -{ - std::string sz("[A,B]"); - int len1 = A.size(), len2 = B.size(); - int total = len1+len2; - int i=0, sk=0; - - Vector *tmp = new Vector(total, sz.c_str(), OBJ_temp); - for (i=1; i<=len1; ++i ) {(*tmp)(i )=A(i);} - for (i=1, sk=len1+1; i<=len2; ++i, ++sk) {(*tmp)(sk)=B(i);} - - // delete temporaries - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - - return (*tmp); -} - - -// concatenate 3 vectors -template inline -Vector& concat(const Vector &A, const Vector &B, const Vector &C) -{ - std::string sz("[A,B,C]"); - int len1=A.size(), len2=B.size(), len3=C.size(); - int total=len1+len2+len3, i=0,sk=0; - - Vector *tmp = new Vector(total, sz.c_str(), OBJ_temp); - for (i=1; i<=len1; ++i ) {(*tmp)(i )=A(i);} - for (i=1, sk=len1+1; i<=len2; ++i, ++sk) {(*tmp)(sk)=B(i);} - for (i=1, sk=len1+len2+1; i<=len3; ++i, ++sk) {(*tmp)(sk)=C(i);} - - // delete temporaries - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - if (C.get_mode() == OBJ_temp) { delete (&C); } - - return (*tmp); -} - - -// concatenate 4 vectors -template inline -Vector& concat -( - Vector &A, Vector &B, - Vector &C, Vector &D -) -{ - std::string sz("[A,B,C,D]"); - int len1=A.size(),len2=B.size(),len3=C.size(),len4=D.size(); - int total = len1+len2+len3+len4, i=0, sk=0; - - Vector *tmp = new Vector(total, sz.c_str(), OBJ_temp); - for (i=1; i<=len1; ++i ) {(*tmp)(i )=A(i);} - for (i=1, sk=len1+1; i<=len2; ++i, ++sk) {(*tmp)(sk)=B(i);} - for (i=1, sk=len1+len2+1; i<=len3; ++i, ++sk) {(*tmp)(sk)=C(i);} - for (i=1, sk=len1+len2+len3+1; i<=len4; ++i, ++sk) {(*tmp)(sk)=D(i);} - - // delete temporaries - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - if (C.get_mode() == OBJ_temp) { delete (&C); } - if (D.get_mode() == OBJ_temp) { delete (&D); } - - return (*tmp); -} - - -// concatenate [vector; scalar] -template inline -Vector& concat(const Vector &A, T x) -{ - std::string sz("[A,x]"); - int len1 = A.size(); int total=len1+1; - Vector *tmp = new Vector(total, sz.c_str(), OBJ_temp); - tmp->copy(len1, A.data()); (*tmp)(total)=x; - - // delete temporaries - if (A.get_mode() == OBJ_temp) { delete (&A); } - - return (*tmp); -} - - -// concatenate [scalar; vector] -template inline -Vector& concat(T x, const Vector &A) -{ - std::string sz("[x,A]"); - // create as OBJ_real to avoid premature deletion in append() - Vector *tmp = new Vector(1, sz.c_str(), OBJ_real); - tmp->append(A); // calls global concat() - tmp->set_mode(OBJ_temp); // restore OBJ_temp mode - - // if A is OBJ_temp, then A is deleted in append(A) - - return (*tmp); -} - - -/////////////////////////////////////////////////////////// -// -// Matlab "intersect" operation -// -/////////////////////////////////////////////////////////// - -// implemented for int arrays in file Global_funcs.cpp -IVec& intersect(const IVec& A, const IVec& B); - - - -/////////////////////////////////////////////////////////// -// -// Matlab "floor", "mod" operations -// -/////////////////////////////////////////////////////////// - - -template inline -Vector& floor(const Vector &V) -{ - std::string sz=umOFORM("floor(%s)", V.name()); - - int len = V.size(); - Vector *tmp = new Vector(len, sz.c_str(), OBJ_temp); - for (int i=1; i<=len; ++i) { - (*tmp)(i) = (T) (floor(double(V(i)))); - } - - if (V.get_mode() == OBJ_temp) {delete (&V);} - return (*tmp); -} - - -inline // specialization for -IVec& mod(const IVec& V, int d) -{ - std::string sz=umOFORM("mod(%s)", V.name()); - int len = V.size(); - IVec *tmp = new IVec(len, sz.c_str(), OBJ_temp); - for (int i=1; i<=len; ++i) { - (*tmp)(i) = V(i) % d; - } - if (V.get_mode() == OBJ_temp) { delete (&V); } - return (*tmp); -} - - -// mod: general version -template inline -Vector& mod(const Vector &V, T d) -{ - std::string sz=umOFORM("mod(%s)", V.name()); - int len = V.size(); - Vector *tmp = new Vector(len, sz.c_str(), OBJ_temp); - for (int i=1; i<=len; ++i) { (*tmp)(i) = (T)fmod(double(V(i)), double(d)); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - return (*tmp); -} - - -/////////////////////////////////////////////////////////// -// -// Boolean "&&", "||" -// -/////////////////////////////////////////////////////////// - - -// C = A&B -template inline -Vector& operator &&(const Vector &A, const Vector &B) -{ - int len=A.size(); - assert(B.size()==len); // assume matching dimension - Vector *tmp=new Vector(len, T(0), OBJ_temp, "(a&b)"); - const T *a=A.data(); const T *b=B.data(); T *p=tmp->data(); - for (int i=0; i inline -Vector& operator ||(const Vector &A, const Vector &B) -{ - int len=A.size(); - assert(B.size()==len); // assume matching dimension - Vector *tmp=new Vector(len, T(0), OBJ_temp, "(a|b)"); - const T *a=A.data(); const T *b=B.data(); T *p=tmp->data(); - for (int i=0; i inline -Vector& cumsum(const Vector& A) -//--------------------------------------------------------- -{ - int N=A.size(); - Vector *tmp=new Vector(N, "cumsum(A)", OBJ_temp); - - T tmp_sum = T(0); - for (int i=1; i<=N; ++i) { - tmp_sum += A(i); - (*tmp)(i) = tmp_sum; - } - if (A.get_mode() == OBJ_temp) { delete (&A); } - return (*tmp); -} - - -/////////////////////////////////////////////////////////// -// -// Matlab "sub2ind" operation -// -/////////////////////////////////////////////////////////// - - -inline -IVec& sub2ind(int Nr, int Nc, const IVec &ri, const IVec &cj) -{ - std::string sz=umOFORM("sub2ind(%d,%d)", Nr, Nc); - - int len = ri.size(); assert(cj.size() == len); - IVec *tmp = new IVec(len, sz.c_str(), OBJ_temp); - for (int i=1; i<=len; ++i) { - assert(cj(i)>=1 && cj(i)<=Nc); - assert(ri(i)>=1 && ri(i)<=Nr); - (*tmp)(i) = (cj(i)-1)*Nr + ri(i); - } - - // delete temp objects - if (ri.get_mode() == OBJ_temp) { delete (&ri); } - if (cj.get_mode() == OBJ_temp) { delete (&cj); } - - return (*tmp); -} - - - -/////////////////////////////////////////////////////////// -// -// member functions involving a subset of the array -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -template inline -void Vector::linspace(T start, T stop, int len) -//--------------------------------------------------------- -{ - // Partition segment into equal intervals. If len is 0, - // the keep the current size, else resize the array - assert(len>=0); - - if (len != 0) {resize(len);} // user resizing - else { if(!ok()) {resize(2); }} // catch empty vectors - - if (stop != start) { - T delta=(stop-start) / (T)(m_Len-1); - vm1_[1 ] = start; // set exact start value - for (int i=2; i inline -void Vector::range(int start, int stop) -//--------------------------------------------------------- -{ - // Set contents to be integer range from [start:stop]. - // If (stop inline -Vector& Vector::get_map(const IVec& iM) const -{ - // Return subset of elements, indexed by map - // Enables the following syntax: - // - // v = q.map(um->vmapR) - q.map(um->vmapL); - - static char buf[100]={""}; - snprintf(buf, (size_t)90, "vmap(%s)", this->name()); - int idx=0, len=iM.size(); - Vector *tmp=new Vector(len, ZERO, OBJ_temp, buf); - if (len > 0) { - // Load elements indexed by iM into New vector - for (int k=1; k<=len; ++k) { - idx = iM(k); - Check_index_1(idx); // make sure index is valid - tmp->vm1_[k] = vm1_[idx]; // copy mapped element to New vec - } - } - return (*tmp); -} - - -template inline -Vector& Vector::set_map(const IVec& iM, const T &x) -{ - // Set elements indicated by map to given value - - int len = iM.size(); - if (len < 1) { return (*this); } // zero-length map - int idx = 0; - for (int k=1; k<=len; ++k) { - idx = iM(k); - if (idx>0 && idx <=m_Len) { - vm1_[idx] = x; // set mapped element to x - } else { // skip elements out of range - umTRC(3, "set_map: index %d (%d) out of range [1:%d]\n", k, idx, m_Len); - } - } - return (*this); -} - - -template inline -Vector& Vector::set_map(const IVec& iM, const Vector& X) -{ - // Set elements indicated by map to corresponding elements in X - int len = iM.size(), xlen = X.size(); - if (len < 1) { return (*this); } // zero-length map - if (len > m_Len) { umERROR("Vector::set_map()", "too many entries in map"); } - int idx = 0; - this->fill(ZERO); // zero all entries - for (int k=1; k<=len; ++k) { - idx = iM(k); // index into array of X values - if (idx>=1 && idx <= xlen) { // check index is in range - vm1_[k] = X.vm1_[idx]; // set mapped element - } else { // skip elements out of range - umTRC(1, "set_map: index %d (%d) out of range [1:%d]\n", k, idx, m_Len); - } - } - - // if X is temporary, delete it. - if (X.get_mode() == OBJ_temp) {delete (&X);} - if (iM.get_mode()== OBJ_temp) {delete (&iM);} - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// member functions involving (contiguous) Region1D -// -/////////////////////////////////////////////////////////// - - -// construct from Region1D -template inline -Vector::Vector(const Region1D< Vector > &R, OBJ_mode md, const char *sz) -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - (*this)=R; // vector = region -} - - -// construct from const_Region1D -template inline -Vector::Vector(const_Region1D< Vector > &R, OBJ_mode md, const char *sz) -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - (*this)=R; // vector = region -} - - - -template inline -const_Region1D< Vector > -Vector::operator()(const Index1D &I) const -{ - // return a const region of (*this) - return const_Region1D< Vector >(*this, I); -} - - -template inline -Region1D< Vector > -Vector::operator()(const Index1D &I) -{ - // return a region of (*this) - return Region1D< Vector >(*this, I); -} - - -template inline -Vector& Vector::operator=(const Region1D< Vector > &R) -{ - // load from Region1D< Vec<> > - int N = R.size(); resize(N); - for (int i=1; i<=N; ++i) {this->vm1_[i]=R(i);} // loads R(offset+i) - return (*this); -} - -template inline -Vector& Vector::operator=(const const_Region1D< Vector > &R) -{ - // load from Region1D< Vec<> > - int N = R.size(); resize(N); - for (int i=1; i<=N; ++i) {this->vm1_[i]=R(i);} // loads R(offset+i) - return (*this); -} - - -template inline -Vector& Vector::append(const Region1D< Vector > &R) -{ - Vector br(R); // load vector from Region1D - append(br); // append - return (*this); -} - - -template inline -Vector& Vector::mult_element(const Region1D< Vector > &R) -{ - assert(R.size() >= m_Len); - for (int i=1; i<=m_Len; ++i) { - vm1_[i] *= R(i); - } - return (*this); -} - - -template inline -Vector& Vector::div_element(const Region1D< Vector > &R) -{ - assert(R.size() >= m_Len); - for (int i=1; i<=m_Len; ++i) { - assert(R(i) != ZERO); - vm1_[i] /= R(i); - } - return (*this); -} - - -template inline -Vector& Vector::dd(const Region1D< Vector > &R) const -{ - // (*this) is not changed: C = A ./ reg(R) - std::string sz; tmp_op_name(name(), "./", R.name(), sz); - Vector *tmp=new Vector((*this), OBJ_temp, sz.c_str()); - Vector bv(R); - (*tmp) /= bv; - return (*tmp); -} - - -template inline -Vector& Vector::dm(const Region1D< Vector > &R) const -{ - // (*this) is not changed: C = A .* reg(R) - std::string sz; tmp_op_name(name(), ".*", R.name(), sz); - Vector *tmp=new Vector((*this), OBJ_temp, sz.c_str()); - Vector bv(R); - (*tmp) *= bv; - return (*tmp); -} - - -template inline -Vector& Vector::operator+=(const Region1D< Vector > &R) -{ - int N1 = this->size(), N2 = R.size(); - - // Allow addition of blocks of different sizes. - // if arg is too long, extend this to match - - if (N2 > N1) { this->extend(N2); } - for (int i=1; i<=N2; ++i) { - this->vm1_[i] += R(i); // adds R(offset+i) - } - return (*this); -} - - -template inline -Vector& Vector::operator-=(const Region1D< Vector > &R) -{ - int N1 = this->size(), N2 = R.size(); - - // Allow subtraction of blocks of different sizes. - // if arg is too long, extend this to match - - if (N2 > N1) { this->extend(N2); } - for (int i=1; i<=N2; ++i) { - this->vm1_[i] -= R(i); // subtracts R(offset+i) - } - return (*this); -} - - - -/////////////////////////////////////////////////////////// -// -// global functions involving (contiguous) Region1D -// -/////////////////////////////////////////////////////////// -// -// vector + region -// vector - region -// vector * region -// -// region + region -// region - region -// -// region * scalar -// scalar * region -// region / scalar -// scalar / region -// -// inner (vector,region) -// inner (region,vector) -/////////////////////////////////////////////////////////// - -// vector + region -template inline -Vector& operator+(const Vector &A, const Region1D< Vector > &B) -{ - std::string sz("A+reg(B)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - - -// vector - region -template inline -Vector& operator-(const Vector &A, const Region1D< Vector > &B) -{ - std::string sz("A-reg(B)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - - -// A = vector * region -template inline -Vector& operator*(const Vector &A, const Region1D< Vector > &B) -{ - std::string sz("A*reg(B)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= B; - return (*tmp); -} - - -// region + region -template inline -Vector& operator+(const Region1D< Vector > &A, const Region1D< Vector > &B) -{ - std::string sz("reg(A) + reg(B)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - - -// region - region -template inline -Vector& operator-(const Region1D< Vector > &A, const Region1D< Vector > &B) -{ - std::string sz("reg(A) - reg(B)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - - -// region * scalar -template inline -Vector& operator*(const Region1D< Vector > &A, T x) -{ - std::string sz("reg(A) * x"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -// scalar * region -template inline -Vector& operator*(T x, const Region1D< Vector > &A) -{ - std::string sz("x * reg(A)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -// region / scalar -template inline -Vector& operator/(const Region1D< Vector > &A, T x) -{ - std::string sz("reg(A) / x"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) /= x; - return (*tmp); -} - - -// scalar / region -template inline -Vector& operator/(T x, const Region1D< Vector > &A) -{ - // create a vector filled with scalar x; tmp = tmp./A - - std::string sz("x / reg(A)"); - - Vector *tmp =new Vector(A.size(), x, OBJ_temp, sz.c_str()); - Vector B(A, OBJ_temp); - tmp /= B; - return (*tmp); -} - - -// inner (vector,region) -template inline -T inner(const Vector& V, const Region1D< Vector > &R) -{ - T retval=T(0); int len=V.size(); assert(R.size()<=len); - for (int i=1; i<=len; ++i) { retval += V(i)*R(i); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - return retval; -} - -// inner (region,vector) -template inline -T inner(const Region1D< Vector > &R, const Vector& V) -{ - T retval=T(0); int len=R.size(); assert(V.size()<=len); - for (int i=1; i<=len; ++i) { retval += R(i)*V(i); } - if (V.get_mode() == OBJ_temp) { delete (&V); } - return retval; -} - - - -/////////////////////////////////////////////////////////// -// -// member functions involving MappedRegion1D -// -/////////////////////////////////////////////////////////// - - -// construct from MappedRegion1D -//--------------------------------------------------------- -template inline -Vector::Vector(const MappedRegion1D< Vector > &R, OBJ_mode md, const char *sz) -//--------------------------------------------------------- -: v_(0), vm1_(0), m_Len(0), ZERO(0), ONE(1), - m_name(sz), m_EqTol(0.0), m_borrowed(false), - m_id(-1), m_mode(md), m_pReg(NULL) -{ - ++s_count; - (*this)=R; // vector = mapped region -} - - -template inline -MappedRegion1D< Vector > -Vector::operator()(const IVec &I) -{ - // return a mapped region of (*this) IMAP - IMap im(I.size(), I.data()); - if (I.get_mode()==OBJ_temp) {delete (&I);} - return MappedRegion1D< Vector >(*this, im); -} - - -template inline -const_MappedRegion1D< Vector > -Vector::operator()(const IVec &I) const -{ - // return a const mapped region of (*this) IMAP - IMap im(I.size(), I.data()); - if (I.get_mode()==OBJ_temp) {delete (&I);} - return const_MappedRegion1D< Vector >(*this, im); -} - - -template inline -MappedRegion1D< Vector > -Vector::operator()(const Region1D< Vector > &Ri) -{ - //int lo=Ri.lbound(), hi=Ri.size(), ofs=Ri.offset(); - //Index1D I(lo+ofs,hi+ofs); - // return a mapped region of (*this) IMAP - Vector I(Ri); - IMap im(I.size(), I.data()); - return MappedRegion1D< Vector >(*this, im); -} - - -template inline -const_MappedRegion1D< Vector > -Vector::operator()(const const_Region1D< Vector > &Ri) const -{ - //int lo=Ri.lbound(), hi=Ri.size(); - //Index1D I(lo,hi); - // return a const mapped region of (*this) IMAP - Vector I(Ri); - IMap im(I.size(), I.data()); - return const_MappedRegion1D< Vector >(*this, im); -} - - -template inline -Vector& Vector::operator=(const MappedRegion1D< Vector > &R) -{ - // load from a MappedRegion1D< Vec<> > - int N = R.size(); resize(N); - for (int i=1; i<=N; ++i) {this->vm1_[i] = R(i);} // loads R(map(i)) - return (*this); -} - - -template inline -Vector& Vector::operator=(const const_MappedRegion1D< Vector > &R) -{ - // load from a const_MappedRegion1D< Vec<> > - int N = R.size(); resize(N); - for (int i=1; i<=N; ++i) {this->vm1_[i] = R(i);} // loads R(map(i)) - return (*this); -} - - -template inline -Vector& Vector::mult_element(const MappedRegion1D< Vector >& R) -{ - assert(R.size() >= m_Len); - for (int i=1; i<=m_Len; ++i) { - vm1_[i] *= R(i); - } - return (*this); -} - - -template inline -Vector& Vector::div_element(const MappedRegion1D< Vector >& R) -{ - assert(R.size() >= m_Len); - for (int i=1; i<=m_Len; ++i) { - assert(R(i) != ZERO); - vm1_[i] /= R(i); - } - return (*this); -} - - -template inline -Vector& Vector::dd(const MappedRegion1D< Vector > &R) const -{ - // (*this) is not changed: C = A ./ R(map) - std::string sz; tmp_op_name(name(), "./", R.name(), sz); - Vector *tmp=new Vector((*this), OBJ_temp, sz.c_str()); - Vector bv(R); - (*tmp) /= bv; - return (*tmp); -} - - -template inline -Vector& Vector::dm(const MappedRegion1D< Vector > &R) const -{ - // (*this) is not changed: C = A .* R(map) - std::string sz; tmp_op_name(name(), ".*", R.name(), sz); - Vector *tmp=new Vector((*this), OBJ_temp, sz.c_str()); - Vector bv(R); - (*tmp) *= bv; - return (*tmp); -} - - -template inline -Vector& Vector::operator+=(const MappedRegion1D< Vector > &R) -{ - int N1 = this->size(), N2 = R.size(); - - // Allow addition of blocks of different sizes. - // if arg is too long, extend this to match - - if (N2 > N1) { this->extend(N2); } - for (int i=1; i<=N2; ++i) { - this->vm1_[i] += R(i); // adds R(map(i)) - } - return (*this); -} - - -template inline -Vector& Vector::operator-=(const MappedRegion1D< Vector > &R) -{ - int N1 = this->size(), N2 = R.size(); - - // Allow subtraction of blocks of different sizes. - // if arg is too long, extend this to match - - if (N2 > N1) { this->extend(N2); } - for (int i=1; i<=N2; ++i) { - this->vm1_[i] -= R(i); // subtracts R(map(i)) - } - return (*this); -} - - -/////////////////////////////////////////////////////////// -// -// global functions involving MappedRegion1D -// -/////////////////////////////////////////////////////////// -// -// vector + mapped region -// vector - mapped region -// -// mapped region + mapped region -// mapped region - mapped region -// -// mapped region * scalar -// scalar * mapped region -// mapped region / scalar -// scalar / mapped region -// mapped region + scalar -// scalar + mapped region -// mapped region - scalar -// scalar - mapped region -// -/////////////////////////////////////////////////////////// - - -// vector + mapped region -template inline -Vector& operator+(const Vector &A, const MappedRegion1D< Vector > &B) -{ - std::string sz("A+B(map)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - - -// vector - mapped region -template inline -Vector& operator-(const Vector &A, const MappedRegion1D< Vector > &B) -{ - std::string sz("A-B(map)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - - -// mapped region + mapped region -template inline -Vector& operator+(const MappedRegion1D< Vector > &A, const MappedRegion1D< Vector > &B) -{ - std::string sz("A(map) + B(map)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += B; - return (*tmp); -} - - -// mapped region - mapped region -template inline -Vector& operator-(const MappedRegion1D< Vector > &A, const MappedRegion1D< Vector > &B) -{ - std::string sz("A(map) - B(map)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) -= B; - return (*tmp); -} - - -// mapped region * scalar -template inline -Vector& operator*(const MappedRegion1D< Vector > &A, T x) -{ - std::string sz("A(map)*x"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -// scalar * mapped region -template inline -Vector& operator*(T x, const MappedRegion1D< Vector > &A) -{ - std::string sz("x*A(map)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) *= x; - return (*tmp); -} - - -// mapped region / scalar -template inline -Vector& operator/(const MappedRegion1D< Vector > &A, T x) -{ - std::string sz("A(map)/x"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) /= x; - return (*tmp); -} - - -// scalar / mapped region -template inline -Vector& operator/(T x, const MappedRegion1D< Vector > &A) -{ - // create a vector filled with scalar x; tmp = tmp./A - - std::string sz("x/A(map)"); - - Vector *tmp =new Vector(A.size(), x, OBJ_temp, sz.c_str()); - Vector B(A, OBJ_temp); - tmp /= B; - return (*tmp); -} - - -// mapped region + scalar -template inline -Vector& operator+(const MappedRegion1D< Vector > &A, T x) -{ - std::string sz("A(map)+x"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - - -// scalar + mapped region -template inline -Vector& operator+(T x, const MappedRegion1D< Vector > &A) -{ - std::string sz("x+A(map)"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) += x; - return (*tmp); -} - - -// mapped region - scalar -template inline -Vector& operator-(const MappedRegion1D< Vector > &A, T x) -{ - std::string sz("A(map)-x"); - - Vector *tmp=new Vector(A, OBJ_temp, sz.c_str()); - (*tmp) -= x; - return (*tmp); -} - - -// scalar - mapped region -template inline -Vector& operator-(T x, const MappedRegion1D< Vector > &A) -{ - std::string sz("x-A(map)"); - - Vector *tmp=new Vector(A.size(), x, OBJ_temp, sz.c_str()); - (*tmp) -= A; - return (*tmp); -} - -#endif // NDG__Vector_Type_H__INCLUDED - diff --git a/cpp/nudg++/trunk/Include/acml.h b/cpp/nudg++/trunk/Include/acml.h deleted file mode 100644 index b244be2..0000000 --- a/cpp/nudg++/trunk/Include/acml.h +++ /dev/null @@ -1,2409 +0,0 @@ -/* - * ACML version 3.6.0 Copyright AMD,NAG 2003,2004,2005 - */ - -/* - This is the ACML header file. It contains function prototypes - to allow a C programmer to call ACML routines via their C - or Fortran interfaces. - - C interfaces to ACML routines differ from FORTRAN interfaces in - the following major respects: - - (i) The FORTRAN interface names are appended by an underscore. - - (ii) The C interfaces contain no workspace arguments; all - workspace memory is allocated internally. - - (iii) Scalar input arguments are passed by value in C interfaces. - FORTRAN interfaces pass all arguments (except for character - string "length" arguments that are normally hidden from - FORTRAN programmers) by reference. - - (iv) Most arguments that are passed as character string pointers - to FORTRAN interfaces are passed by value as single - characters to C interfaces. The character string "length" - arguments of FORTRAN interfaces are not required in the - C interfaces. - - It is important to note that in both the FORTRAN and C interfaces, - 2-dimensional arrays are assumed to be stored in column-major order. - e.g. the matrix A = [ 1.0 2.0 ] - [ 3.0 4.0 ] - would be stored in memory as 1.0, 3.0, 2.0, 4.0. This storage order - corresponds to a FORTRAN-style 2-D array declaration A(2,2), but not - to an array declared as a[2][2] in C which would be stored in - row-major order as 1.0, 2.0, 3.0, 4.0. - - As an example, compare the FORTRAN and C interfaces of LAPACK - routine dsytrf as implemented in ACML. - FORTRAN: - void dsytrf_(char *uplo, int *n, double *a, int *lda, int *ipiv, - double *work, int *lwork, int *info, int uplo_len); - - C: - void dsytrf(char uplo, int n, double *a, int lda, int *ipiv, int *info); - - C code calling both the above variants might look like this: - - double *a; - int *ipiv; - double *work; - int n, lda, lwork, info; - - // - // Assume that all arrays and variables are allocated and initialized - // as required by dsytrf. - // - // Call the FORTRAN version of dsytrf. The first argument is a character - // string, and the last argument is the length of that string. The input - // scalar arguments n, lda and lwork, as well as the output scalar - // argument info, are all passed by reference. - dsytrf_("Upper", &n, a, &lda, ipiv, work, &lwork, &info, 5); - - // - // Call the C version of dsytrf. The first argument is a character, - // workspace is not required, and input scalar arguments n and lda are - // passed by value. Output scalar argument info is passed by reference. - dsytrf('U', n, a, lda, ipiv, &info); - -*/ - -#ifndef _ACML_H -#define _ACML_H - -/* Under Windows math.h defines "complex" to mean "_complex". */ -#include -#undef complex - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* ------------------------------------------------------------------ */ - -/* A complex datatype for use by the C interfaces to ACML routines */ -#ifndef _ACML_COMPLEX -#define _ACML_COMPLEX -typedef struct -{ - float real, imag; -} complex; -typedef struct -{ - double real, imag; -} doublecomplex; -#endif /* !defined(_ACML_COMPLEX) */ -/* - These typedefs are for routines that are arguments to other routines, - e.g. ACML_CGEES_SELECT describes the argument "select" of routine cgees. - */ -typedef int (* ACML_CGEES_SELECT)(complex *); -typedef int (* ACML_CGEESX_SELECT)(complex *); -typedef int (* ACML_CGGES_SELCTG)(complex *, complex *); -typedef int (* ACML_CGGESX_SELCTG)(complex *, complex *); -typedef int (* ACML_DGEES_SELECT)(double *, double *); -typedef int (* ACML_DGEESX_SELECT)(double *, double *); -typedef int (* ACML_DGGES_DELCTG)(double *, double *, double *); -typedef int (* ACML_DGGESX_DELCTG)(double *, double *, double *); -typedef int (* ACML_SGEES_SELECT)(float *, float *); -typedef int (* ACML_SGEESX_SELECT)(float *, float *); -typedef int (* ACML_SGGES_SELCTG)(float *, float *, float *); -typedef int (* ACML_SGGESX_SELCTG)(float *, float *, float *); -typedef int (* ACML_ZGEES_SELECT)(doublecomplex *); -typedef int (* ACML_ZGEESX_SELECT)(doublecomplex *); -typedef int (* ACML_ZGGES_DELCTG)(doublecomplex *, doublecomplex *); -typedef int (* ACML_ZGGESX_DELCTG)(doublecomplex *, doublecomplex *); -typedef void (* ACML_DRANDINITIALIZEUSER_UINI)(int *, int *, int *, int *, int *, int *, int *); -typedef void (* ACML_DRANDINITIALIZEUSER_UGEN)(int *, int *, double *, int *); -typedef void (* ACML_SRANDINITIALIZEUSER_UINI)(int *, int *, int *, int *, int *, int *, int *); -typedef void (* ACML_SRANDINITIALIZEUSER_UGEN)(int *, int *, float *, int *); - -/* ------------------------------------------------------------------ */ -/* Below are prototypes for the C interfaces to ACML routines */ - -/* BLAS C interfaces */ -extern void caxpy(int n, complex *alpha, complex *x, int incx, complex *y, int incy); -extern void ccopy(int n, complex *x, int incx, complex *y, int incy); -extern complex cdotc(int n, complex *x, int incx, complex *y, int incy); -extern complex cdotu(int n, complex *x, int incx, complex *y, int incy); -extern void cgbmv(char transa, int m, int n, int nsub, int nsuper, complex *alpha, complex *a, int lda, complex *x, int incx, complex *beta, complex *y, int incy); -extern void cgemm(char transa, char transb, int m, int n, int k, complex *alpha, complex *a, int lda, complex *b, int ldb, complex *beta, complex *c, int ldc); -extern void cgemv(char transa, int m, int n, complex *alpha, complex *a, int lda, complex *x, int incx, complex *beta, complex *y, int incy); -extern void cgerc(int m, int n, complex *alpha, complex *x, int incx, complex *y, int incy, complex *a, int lda); -extern void cgeru(int m, int n, complex *alpha, complex *x, int incx, complex *y, int incy, complex *a, int lda); -extern void chbmv(char uplo, int n, int ndiag, complex *alpha, complex *a, int lda, complex *x, int incx, complex *beta, complex *y, int incy); -extern void chemm(char side, char uplo, int m, int n, complex *alpha, complex *a, int lda, complex *b, int ldb, complex *beta, complex *c, int ldc); -extern void chemv(char uplo, int n, complex *alpha, complex *a, int lda, complex *x, int incx, complex *beta, complex *y, int incy); -extern void cher(char uplo, int n, float alpha, complex *x, int incx, complex *a, int lda); -extern void cher2(char uplo, int n, complex *alpha, complex *x, int incx, complex *y, int incy, complex *a, int lda); -extern void cher2k(char uplo, char transa, int n, int k, complex *alpha, complex *a, int lda, complex *b, int ldb, float beta, complex *c, int ldc); -extern void cherk(char uplo, char transa, int n, int k, float alpha, complex *a, int lda, float beta, complex *c, int ldc); -extern void chpmv(char uplo, int n, complex *alpha, complex *a, complex *x, int incx, complex *beta, complex *y, int incy); -extern void chpr(char uplo, int n, float alpha, complex *x, int incx, complex *a); -extern void chpr2(char uplo, int n, complex *alpha, complex *x, int incx, complex *y, int incy, complex *a); -extern void crotg(complex *a, complex *b, float *c, complex *s); -extern void cscal(int n, complex *alpha, complex *y, int incy); -extern void csrot(int n, complex *x, int incx, complex *y, int incy, float c, float s); -extern void csscal(int n, float alpha, complex *y, int incy); -extern void cswap(int n, complex *x, int incx, complex *y, int incy); -extern void csymm(char side, char uplo, int m, int n, complex *alpha, complex *a, int lda, complex *b, int ldb, complex *beta, complex *c, int ldc); -extern void csyr2k(char uplo, char transa, int n, int k, complex *alpha, complex *a, int lda, complex *b, int ldb, complex *beta, complex *c, int ldc); -extern void csyrk(char uplo, char transa, int n, int k, complex *alpha, complex *a, int lda, complex *beta, complex *c, int ldc); -extern void ctbmv(char uplo, char transa, char diag, int n, int ndiag, complex *a, int lda, complex *y, int incy); -extern void ctbsv(char uplo, char transa, char diag, int n, int ndiag, complex *a, int lda, complex *y, int incy); -extern void ctpmv(char uplo, char transa, char diag, int n, complex *a, complex *y, int incy); -extern void ctpsv(char uplo, char transa, char diag, int n, complex *a, complex *y, int incy); -extern void ctrmm(char side, char uplo, char transa, char diag, int m, int n, complex *alpha, complex *a, int lda, complex *b, int ldb); -extern void ctrmv(char uplo, char transa, char diag, int n, complex *a, int lda, complex *y, int incy); -extern void ctrsm(char side, char uplo, char transa, char diag, int m, int n, complex *alpha, complex *a, int lda, complex *b, int ldb); -extern void ctrsv(char uplo, char transa, char diag, int n, complex *a, int lda, complex *y, int incy); -extern double dasum(int n, double *x, int incx); -extern void daxpy(int n, double alpha, double *x, int incx, double *y, int incy); -extern void dcopy(int n, double *x, int incx, double *y, int incy); -extern double ddot(int n, double *x, int incx, double *y, int incy); -extern void dgbmv(char transa, int m, int n, int nsub, int nsuper, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); -extern void dgemm(char transa, char transb, int m, int n, int k, double alpha, double *a, int lda, double *b, int ldb, double beta, double *c, int ldc); -extern void dgemv(char transa, int m, int n, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); -extern void dger(int m, int n, double alpha, double *x, int incx, double *y, int incy, double *a, int lda); -extern double dnrm2(int n, double *x, int incx); -extern void drot(int n, double *x, int incx, double *y, int incy, double c, double s); -extern void drotg(double *a, double *b, double *c, double *s); -extern void drotm(int n, double *x, int incx, double *y, int incy, double *param); -extern void drotmg(double d1, double d2, double b1, double b2, double *param); -extern void dsbmv(char uplo, int n, int ndiag, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); -extern void dscal(int n, double alpha, double *y, int incy); -extern double dsdot(int n, float *x, int incx, float *y, int incy); -extern void dspmv(char uplo, int n, double alpha, double *a, double *x, int incx, double beta, double *y, int incy); -extern void dspr(char uplo, int n, double alpha, double *x, int incx, double *a); -extern void dspr2(char uplo, int n, double alpha, double *x, int incx, double *y, int incy, double *a); -extern void dswap(int n, double *x, int incx, double *y, int incy); -extern void dsymm(char side, char uplo, int m, int n, double alpha, double *a, int lda, double *b, int ldb, double beta, double *c, int ldc); -extern void dsymv(char uplo, int n, double alpha, double *a, int lda, double *x, int incx, double beta, double *y, int incy); -extern void dsyr(char uplo, int n, double alpha, double *x, int incx, double *a, int lda); -extern void dsyr2(char uplo, int n, double alpha, double *x, int incx, double *y, int incy, double *a, int lda); -extern void dsyr2k(char uplo, char transa, int n, int k, double alpha, double *a, int lda, double *b, int ldb, double beta, double *c, int ldc); -extern void dsyrk(char uplo, char transa, int n, int k, double alpha, double *a, int lda, double beta, double *c, int ldc); -extern void dtbmv(char uplo, char transa, char diag, int n, int ndiag, double *a, int lda, double *y, int incy); -extern void dtbsv(char uplo, char transa, char diag, int n, int ndiag, double *a, int lda, double *y, int incy); -extern void dtpmv(char uplo, char transa, char diag, int n, double *a, double *y, int incy); -extern void dtpsv(char uplo, char transa, char diag, int n, double *a, double *y, int incy); -extern void dtrmm(char side, char uplo, char transa, char diag, int m, int n, double alpha, double *a, int lda, double *b, int ldb); -extern void dtrmv(char uplo, char transa, char diag, int n, double *a, int lda, double *y, int incy); -extern void dtrsm(char side, char uplo, char transa, char diag, int m, int n, double alpha, double *a, int lda, double *b, int ldb); -extern void dtrsv(char uplo, char transa, char diag, int n, double *a, int lda, double *y, int incy); -extern double dzasum(int n, doublecomplex *x, int incx); -extern double dznrm2(int n, doublecomplex *x, int incx); -extern int icamax(int n, complex *x, int incx); -extern int idamax(int n, double *x, int incx); -extern int isamax(int n, float *x, int incx); -extern int izamax(int n, doublecomplex *x, int incx); -extern int lsame(char ca, char cb); -extern float sasum(int n, float *x, int incx); -extern void saxpy(int n, float alpha, float *x, int incx, float *y, int incy); -extern float scasum(int n, complex *x, int incx); -extern float scnrm2(int n, complex *x, int incx); -extern void scopy(int n, float *x, int incx, float *y, int incy); -extern float sdot(int n, float *x, int incx, float *y, int incy); -extern float sdsdot(int n, float sb, float *sx, int incx, float *sy, int incy); -extern void sgbmv(char transa, int m, int n, int nsub, int nsuper, float alpha, float *a, int lda, float *x, int incx, float beta, float *y, int incy); -extern void sgemm(char transa, char transb, int m, int n, int k, float alpha, float *a, int lda, float *b, int ldb, float beta, float *c, int ldc); -extern void sgemv(char transa, int m, int n, float alpha, float *a, int lda, float *x, int incx, float beta, float *y, int incy); -extern void sger(int m, int n, float alpha, float *x, int incx, float *y, int incy, float *a, int lda); -extern float snrm2(int n, float *x, int incx); -extern void srot(int n, float *x, int incx, float *y, int incy, float c, float s); -extern void srotg(float *a, float *b, float *c, float *s); -extern void srotm(int n, float *x, int incx, float *y, int incy, float *param); -extern void srotmg(float d1, float d2, float b1, float b2, float *param); -extern void ssbmv(char uplo, int n, int ndiag, float alpha, float *a, int lda, float *x, int incx, float beta, float *y, int incy); -extern void sscal(int n, float alpha, float *x, int incx); -extern void sspmv(char uplo, int n, float alpha, float *a, float *x, int incx, float beta, float *y, int incy); -extern void sspr(char uplo, int n, float alpha, float *x, int incx, float *a); -extern void sspr2(char uplo, int n, float alpha, float *x, int incx, float *y, int incy, float *a); -extern void sswap(int n, float *x, int incx, float *y, int incy); -extern void ssymm(char side, char uplo, int m, int n, float alpha, float *a, int lda, float *b, int ldb, float beta, float *c, int ldc); -extern void ssymv(char uplo, int n, float alpha, float *a, int lda, float *x, int incx, float beta, float *y, int incy); -extern void ssyr(char uplo, int n, float alpha, float *x, int incx, float *a, int lda); -extern void ssyr2(char uplo, int n, float alpha, float *x, int incx, float *y, int incy, float *a, int lda); -extern void ssyr2k(char uplo, char transa, int n, int k, float alpha, float *a, int lda, float *b, int ldb, float beta, float *c, int ldc); -extern void ssyrk(char uplo, char transa, int n, int k, float alpha, float *a, int lda, float beta, float *c, int ldc); -extern void stbmv(char uplo, char transa, char diag, int n, int ndiag, float *a, int lda, float *y, int incy); -extern void stbsv(char uplo, char transa, char diag, int n, int ndiag, float *a, int lda, float *y, int incy); -extern void stpmv(char uplo, char transa, char diag, int n, float *a, float *y, int incy); -extern void stpsv(char uplo, char transa, char diag, int n, float *a, float *y, int incy); -extern void strmm(char side, char uplo, char transa, char diag, int m, int n, float alpha, float *a, int lda, float *b, int ldb); -extern void strmv(char uplo, char transa, char diag, int n, float *a, int lda, float *y, int incy); -extern void strsm(char side, char uplo, char transa, char diag, int m, int n, float alpha, float *a, int lda, float *b, int ldb); -extern void strsv(char uplo, char transa, char diag, int n, float *a, int lda, float *y, int incy); -extern void xerbla(const char *srname, int *info); -extern void zaxpy(int n, doublecomplex *alpha, doublecomplex *x, int incx, doublecomplex *y, int incy); -extern void zcopy(int n, doublecomplex *x, int incx, doublecomplex *y, int incy); -extern doublecomplex zdotc(int n, doublecomplex *x, int incx, doublecomplex *y, int incy); -extern doublecomplex zdotu(int n, doublecomplex *x, int incx, doublecomplex *y, int incy); -extern void zdrot(int n, doublecomplex *cx, int incx, doublecomplex *cy, int incy, double c, double s); -extern void zdscal(int n, double alpha, doublecomplex *y, int incy); -extern void zgbmv(char transa, int m, int n, int nsub, int nsuper, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *x, int incx, doublecomplex *beta, doublecomplex *y, int incy); -extern void zgemm(char transa, char transb, int m, int n, int k, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *beta, doublecomplex *c, int ldc); -extern void zgemv(char transa, int m, int n, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *x, int incx, doublecomplex *beta, doublecomplex *y, int incy); -extern void zgerc(int m, int n, doublecomplex *alpha, doublecomplex *x, int incx, doublecomplex *y, int incy, doublecomplex *a, int lda); -extern void zgeru(int m, int n, doublecomplex *alpha, doublecomplex *x, int incx, doublecomplex *y, int incy, doublecomplex *a, int lda); -extern void zhbmv(char uplo, int n, int ndiag, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *x, int incx, doublecomplex *beta, doublecomplex *y, int incy); -extern void zhemm(char side, char uplo, int m, int n, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *beta, doublecomplex *c, int ldc); -extern void zhemv(char uplo, int n, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *x, int incx, doublecomplex *beta, doublecomplex *y, int incy); -extern void zher(char uplo, int n, double alpha, doublecomplex *x, int incx, doublecomplex *a, int lda); -extern void zher2(char uplo, int n, doublecomplex *alpha, doublecomplex *x, int incx, doublecomplex *y, int incy, doublecomplex *a, int lda); -extern void zher2k(char uplo, char transa, int n, int k, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *b, int ldb, double beta, doublecomplex *c, int ldc); -extern void zherk(char uplo, char transa, int n, int k, double alpha, doublecomplex *a, int lda, double beta, doublecomplex *c, int ldc); -extern void zhpmv(char uplo, int n, doublecomplex *alpha, doublecomplex *a, doublecomplex *x, int incx, doublecomplex *beta, doublecomplex *y, int incy); -extern void zhpr(char uplo, int n, double alpha, doublecomplex *x, int incx, doublecomplex *a); -extern void zhpr2(char uplo, int n, doublecomplex *alpha, doublecomplex *x, int incx, doublecomplex *y, int incy, doublecomplex *a); -extern void zrotg(doublecomplex *a, doublecomplex *b, double *c, doublecomplex *s); -extern void zscal(int n, doublecomplex *alpha, doublecomplex *y, int incy); -extern void zswap(int n, doublecomplex *x, int incx, doublecomplex *y, int incy); -extern void zsymm(char side, char uplo, int m, int n, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *beta, doublecomplex *c, int ldc); -extern void zsyr2k(char uplo, char transa, int n, int k, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *beta, doublecomplex *c, int ldc); -extern void zsyrk(char uplo, char transa, int n, int k, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *beta, doublecomplex *c, int ldc); -extern void ztbmv(char uplo, char transa, char diag, int n, int ndiag, doublecomplex *a, int lda, doublecomplex *y, int incy); -extern void ztbsv(char uplo, char transa, char diag, int n, int ndiag, doublecomplex *a, int lda, doublecomplex *y, int incy); -extern void ztpmv(char uplo, char transa, char diag, int n, doublecomplex *a, doublecomplex *y, int incy); -extern void ztpsv(char uplo, char transa, char diag, int n, doublecomplex *a, doublecomplex *y, int incy); -extern void ztrmm(char side, char uplo, char transa, char diag, int m, int n, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *b, int ldb); -extern void ztrmv(char uplo, char transa, char diag, int n, doublecomplex *a, int lda, doublecomplex *y, int incy); -extern void ztrsm(char side, char uplo, char transa, char diag, int m, int n, doublecomplex *alpha, doublecomplex *a, int lda, doublecomplex *b, int ldb); -extern void ztrsv(char uplo, char transa, char diag, int n, doublecomplex *a, int lda, doublecomplex *y, int incy); - -/* LAPACK C interfaces */ -extern int ilaenv(int ispec, const char *name, const char *opts, int n1, int n2, int n3, int n4); -extern void ilaenvset(int ispec, const char *name, const char *opts, int n1, int n2, int n3, int n4, int nvalue, int *info); -extern void cbdsqr(char uplo, int n, int ncvt, int nru, int ncc, float *d, float *e, complex *vt, int ldvt, complex *u, int ldu, complex *c, int ldc, int *info); -extern void cgbbrd(char vect, int m, int n, int ncc, int kl, int ku, complex *ab, int ldab, float *d, float *e, complex *q, int ldq, complex *pt, int ldpt, complex *c, int ldc, int *info); -extern void cgbcon(char norm, int n, int nsub, int nsuper, complex *a, int lda, int *ipiv, float anorm, float *rcond, int *info); -extern void cgbequ(int m, int n, int nsub, int nsuper, complex *a, int lda, float *rowsc, float *colsc, float *rowcnd, float *colcnd, float *amax, int *info); -extern void cgbrfs(char transa, int n, int nsub, int nsuper, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cgbsv(int n, int nsub, int nsuper, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); - -/* N.B. In this C interface to cgbsvx, rpvgrw returns what is returned in - the first element of RWORK by the FORTRAN interface */ -extern void cgbsvx(char fact, char transa, int n, int nsub, int nsuper, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, char equed, float *rowsc, float *colsc, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, float *rpvgrw, int *info); - -extern void cgbtrf(int m, int n, int nsub, int nsuper, complex *a, int lda, int *ipiv, int *info); -extern void cgbtrs(char transa, int n, int nsub, int nsuper, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); -extern void cgebak(char job, char side, int n, int ilo, int ihi, float *scale, int m, complex *v, int ldv, int *info); -extern void cgebal(char job, int n, complex *a, int lda, int *ilo, int *ihi, float *scale, int *info); -extern void cgebrd(int m, int n, complex *a, int lda, float *d, float *e, complex *tauq, complex *taup, int *info); -extern void cgecon(char norm, int n, complex *a, int lda, float anorm, float *rcond, int *info); -extern void cgeequ(int m, int n, complex *a, int lda, float *rowsc, float *colsc, float *rowcnd, float *colcnd, float *amax, int *info); -extern void cgees(char jobz, char sortev, ACML_CGEES_SELECT select, int n, complex *a, int lda, int *nout, complex *w, complex *z, int ldz, int *info); -extern void cgeesx(char jobz, char sortev, ACML_CGEESX_SELECT select, char sense, int n, complex *a, int lda, int *nout, complex *w, complex *z, int ldz, float *rcone, float *rconv, int *info); -extern void cgeev(char jobvl, char jobvr, int n, complex *a, int lda, complex *w, complex *vl, int ldvl, complex *vr, int ldvr, int *info); -extern void cgeevx(char balanc, char jobvl, char jobvr, char sense, int n, complex *a, int lda, complex *w, complex *vl, int ldvl, complex *vr, int ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, int *info); -extern void cgegs(char jobvsl, char jobvsr, int n, complex *a, int lda, complex *b, int ldb, complex *alpha, complex *beta, complex *vsl, int ldvsl, complex *vsr, int ldvsr, int *info); -extern void cgegv(char jobvl, char jobvr, int n, complex *a, int lda, complex *b, int ldb, complex *alpha, complex *beta, complex *vl, int ldvl, complex *vr, int ldvr, int *info); -extern void cgehrd(int n, int ilo, int ihi, complex *a, int lda, complex *tau, int *info); -extern void cgelqf(int m, int n, complex *a, int lda, complex *tau, int *info); -extern void cgels(char trans, int m, int n, int nrhs, complex *a, int lda, complex *b, int ldb, int *info); -extern void cgelsd(int m, int n, int nrhs, complex *a, int lda, complex *b, int ldb, float *s, float rcond, int *rank, int *info); -extern void cgelss(int m, int n, int nrhs, complex *a, int lda, complex *b, int ldb, float *sing, float rcond, int *irank, int *info); -extern void cgelsx(int m, int n, int nrhs, complex *a, int lda, complex *b, int ldb, int *jpivot, float rcond, int *irank, int *info); -extern void cgelsy(int m, int n, int nrhs, complex *a, int lda, complex *b, int ldb, int *jpvt, float rcond, int *rank, int *info); -extern void cgeqlf(int m, int n, complex *a, int lda, complex *tau, int *info); -extern void cgeqp3(int m, int n, complex *a, int lda, int *jpvt, complex *tau, int *info); -extern void cgeqpf(int m, int n, complex *a, int lda, int *jpvt, complex *tau, int *info); -extern void cgeqrf(int m, int n, complex *a, int lda, complex *tau, int *info); -extern void cgerfs(char transa, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cgerqf(int m, int n, complex *a, int lda, complex *tau, int *info); -extern void cgesdd(char jobz, int m, int n, complex *a, int lda, float *s, complex *u, int ldu, complex *vt, int ldvt, int *info); -extern void cgesv(int n, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); -extern void cgesvd(char jobu, char jobvt, int m, int n, complex *a, int lda, float *sing, complex *u, int ldu, complex *vt, int ldvt, int *info); - -/* N.B. In this C interface to cgesvx, rpvgrw returns what is returned in - the first element of RWORK by the FORTRAN interface */ -extern void cgesvx(char fact, char transa, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, char equed, float *rowsc, float *colsc, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, float *rpvgrw, int *info); - -extern void cgetrf(int m, int n, complex *a, int lda, int *ipiv, int *info); -extern void cgetri(int n, complex *a, int lda, int *ipiv, int *info); -extern void cgetrs(char transa, int n, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); -extern void cggbak(char job, char side, int n, int ilo, int ihi, float *lscale, float *rscale, int m, complex *v, int ldv, int *info); -extern void cggbal(char job, int n, complex *a, int lda, complex *b, int ldb, int *ilo, int *ihi, float *lscale, float *rscale, int *info); -extern void cgges(char jobvsl, char jobvsr, char sort, ACML_CGGES_SELCTG selctg, int n, complex *a, int lda, complex *b, int ldb, int *sdim, complex *alpha, complex *beta, complex *vsl, int ldvsl, complex *vsr, int ldvsr, int *info); -extern void cggesx(char jobvsl, char jobvsr, char sort, ACML_CGGESX_SELCTG selctg, char sense, int n, complex *a, int lda, complex *b, int ldb, int *sdim, complex *alpha, complex *beta, complex *vsl, int ldvsl, complex *vsr, int ldvsr, float *rconde, float *rcondv, int *info); -extern void cggev(char jobvl, char jobvr, int n, complex *a, int lda, complex *b, int ldb, complex *alpha, complex *beta, complex *vl, int ldvl, complex *vr, int ldvr, int *info); -extern void cggevx(char balanc, char jobvl, char jobvr, char sense, int n, complex *a, int lda, complex *b, int ldb, complex *alpha, complex *beta, complex *vl, int ldvl, complex *vr, int ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, int *info); -extern void cggglm(int n, int m, int p, complex *a, int lda, complex *b, int ldb, complex *d, complex *x, complex *y, int *info); -extern void cgghrd(char compq, char compz, int n, int ilo, int ihi, complex *a, int lda, complex *b, int ldb, complex *q, int ldq, complex *z, int ldz, int *info); -extern void cgglse(int m, int n, int p, complex *a, int lda, complex *b, int ldb, complex *c, complex *d, complex *x, int *info); -extern void cggqrf(int n, int m, int p, complex *a, int lda, complex *taua, complex *b, int ldb, complex *taub, int *info); -extern void cggrqf(int m, int p, int n, complex *a, int lda, complex *taua, complex *b, int ldb, complex *taub, int *info); -extern void cggsvd(char jobu, char jobv, char jobq, int m, int n, int p, int *k, int *l, complex *a, int lda, complex *b, int ldb, float *alpha, float *beta, complex *u, int ldu, complex *v, int ldv, complex *q, int ldq, int *iwork, int *info); -extern void cggsvp(char jobu, char jobv, char jobq, int m, int p, int n, complex *a, int lda, complex *b, int ldb, float tola, float tolb, int *k, int *l, complex *u, int ldu, complex *v, int ldv, complex *q, int ldq, int *info); -extern void cgtcon(char norm, int n, complex *low, complex *diag, complex *up1, complex *up2, int *ipiv, float anorm, float *rcond, int *info); -extern void cgtrfs(char transa, int n, int nrhs, complex *low, complex *diag, complex *up, complex *lowf, complex *diagf, complex *upf1, complex *upf2, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cgtsv(int n, int nrhs, complex *low, complex *diag, complex *up, complex *b, int ldb, int *info); -extern void cgtsvx(char fact, char transa, int n, int nrhs, complex *low, complex *diag, complex *up, complex *lowf, complex *diagf, complex *upf1, complex *upf2, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void cgttrf(int n, complex *low, complex *diag, complex *up1, complex *up2, int *ipiv, int *info); -extern void cgttrs(char transa, int n, int nrhs, complex *low, complex *diag, complex *up1, complex *up2, int *ipiv, complex *b, int ldb, int *info); -extern void chbev(char jobz, char uplo, int n, int ndiag, complex *a, int lda, float *w, complex *z, int ldz, int *info); -extern void chbevd(char jobz, char uplo, int n, int kd, complex *ab, int ldab, float *w, complex *z, int ldz, int *info); -extern void chbevx(char jobz, char range, char uplo, int n, int ndiag, complex *a, int lda, complex *q, int ldq, float vl, float vu, int il, int iu, float abtol, int *nfound, float *w, complex *z, int ldz, int *ifail, int *info); -extern void chbgst(char vect, char uplo, int n, int ka, int kb, complex *ab, int ldab, complex *bb, int ldbb, complex *x, int ldx, int *info); -extern void chbgv(char jobz, char uplo, int n, int ka, int kb, complex *ab, int ldab, complex *bb, int ldbb, float *w, complex *z, int ldz, int *info); -extern void chbgvd(char jobz, char uplo, int n, int ka, int kb, complex *ab, int ldab, complex *bb, int ldbb, float *w, complex *z, int ldz, int *info); -extern void chbgvx(char jobz, char range, char uplo, int n, int ka, int kb, complex *ab, int ldab, complex *bb, int ldbb, complex *q, int ldq, float vl, float vu, int il, int iu, float abstol, int *m, float *w, complex *z, int ldz, int *ifail, int *info); -extern void chbtrd(char vect, char uplo, int n, int kd, complex *ab, int ldab, float *d, float *e, complex *q, int ldq, int *info); -extern void checon(char uplo, int n, complex *a, int lda, int *ipiv, float anorm, float *rcond, int *info); -extern void cheev(char jobz, char uplo, int n, complex *a, int lda, float *w, int *info); -extern void cheevd(char jobz, char uplo, int n, complex *a, int lda, float *w, int *info); -extern void cheevr(char jobz, char range, char uplo, int n, complex *a, int lda, float vl, float vu, int il, int iu, float abstol, int *m, float *w, complex *z, int ldz, int *isuppz, int *info); -extern void cheevx(char jobz, char range, char uplo, int n, complex *a, int lda, float vl, float vu, int il, int iu, float abtol, int *nfound, float *w, complex *z, int ldz, int *ifail, int *info); -extern void chegst(int itype, char uplo, int n, complex *a, int lda, complex *b, int ldb, int *info); -extern void chegv(int itype, char jobz, char uplo, int n, complex *a, int lda, complex *b, int ldb, float *w, int *info); -extern void chegvd(int itype, char jobz, char uplo, int n, complex *a, int lda, complex *b, int ldb, float *w, int *info); -extern void chegvx(int itype, char jobz, char range, char uplo, int n, complex *a, int lda, complex *b, int ldb, float vl, float vu, int il, int iu, float abstol, int *m, float *w, complex *z, int ldz, int *ifail, int *info); -extern void cherfs(char uplo, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void chesv(char uplo, int n, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); -extern void chesvx(char fact, char uplo, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void chetrd(char uplo, int n, complex *a, int lda, float *d, float *e, complex *tau, int *info); -extern void chetrf(char uplo, int n, complex *a, int lda, int *ipiv, int *info); -extern void chetri(char uplo, int n, complex *a, int lda, int *ipiv, int *info); -extern void chetrs(char uplo, int n, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); -extern void chgeqz(char job, char compq, char compz, int n, int ilo, int ihi, complex *a, int lda, complex *b, int ldb, complex *alpha, complex *beta, complex *q, int ldq, complex *z, int ldz, int *info); -extern void chpcon(char uplo, int n, complex *a, int *ipiv, float anorm, float *rcond, int *info); -extern void chpev(char jobz, char uplo, int n, complex *a, float *w, complex *z, int ldz, int *info); -extern void chpevd(char jobz, char uplo, int n, complex *ap, float *w, complex *z, int ldz, int *info); -extern void chpevx(char jobz, char range, char uplo, int n, complex *a, float vl, float vu, int il, int iu, float abtol, int *nfound, float *w, complex *z, int ldz, int *ifail, int *info); -extern void chpgst(int itype, char uplo, int n, complex *ap, complex *bp, int *info); -extern void chpgv(int itype, char jobz, char uplo, int n, complex *a, complex *b, float *w, complex *z, int ldz, int *info); -extern void chpgvd(int itype, char jobz, char uplo, int n, complex *ap, complex *bp, float *w, complex *z, int ldz, int *info); -extern void chpgvx(int itype, char jobz, char range, char uplo, int n, complex *ap, complex *bp, float vl, float vu, int il, int iu, float abstol, int *m, float *w, complex *z, int ldz, int *ifail, int *info); -extern void chprfs(char uplo, int n, int nrhs, complex *a, complex *af, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void chpsv(char uplo, int n, int nrhs, complex *a, int *ipiv, complex *b, int ldb, int *info); -extern void chpsvx(char fact, char uplo, int n, int nrhs, complex *a, complex *af, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void chptrd(char uplo, int n, complex *ap, float *d, float *e, complex *tau, int *info); -extern void chptrf(char uplo, int n, complex *a, int *ipiv, int *info); -extern void chptri(char uplo, int n, complex *a, int *ipiv, int *info); -extern void chptrs(char uplo, int n, int nrhs, complex *a, int *ipiv, complex *b, int ldb, int *info); -extern void chsein(char side, char eigsrc, char initv, int *select, int n, complex *h, int ldh, complex *w, complex *vl, int ldvl, complex *vr, int ldvr, int mm, int *m, int *ifaill, int *ifailr, int *info); -extern void chseqr(char job, char compz, int n, int ilo, int ihi, complex *h, int ldh, complex *w, complex *z, int ldz, int *info); -extern void cpbcon(char uplo, int n, int ndiag, complex *a, int lda, float anorm, float *rcond, int *info); -extern void cpbequ(char uplo, int n, int ndiag, complex *a, int lda, float *scale, float *scond, float *amax, int *info); -extern void cpbrfs(char uplo, int n, int ndiag, int nrhs, complex *a, int lda, complex *af, int ldaf, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cpbstf(char uplo, int n, int kd, complex *ab, int ldab, int *info); -extern void cpbsv(char uplo, int n, int ndiag, int nrhs, complex *a, int lda, complex *b, int ldb, int *info); -extern void cpbsvx(char fact, char uplo, int n, int ndiag, int nrhs, complex *a, int lda, complex *af, int ldaf, char equed, float *scale, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void cpbtrf(char uplo, int n, int ndiag, complex *a, int lda, int *info); -extern void cpbtrs(char uplo, int n, int ndiag, int nrhs, complex *a, int lda, complex *b, int ldb, int *info); -extern void cpocon(char uplo, int n, complex *a, int lda, float anorm, float *rcond, int *info); -extern void cpoequ(int n, complex *a, int lda, float *scale, float *scond, float *amax, int *info); -extern void cporfs(char uplo, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cposv(char uplo, int n, int nrhs, complex *a, int lda, complex *b, int ldb, int *info); -extern void cposvx(char fact, char uplo, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, char equed, float *scale, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void cpotrf(char uplo, int n, complex *a, int lda, int *info); -extern void cpotri(char uplo, int n, complex *a, int lda, int *info); -extern void cpotrs(char uplo, int n, int nrhs, complex *a, int lda, complex *b, int ldb, int *info); -extern void cppcon(char uplo, int n, complex *a, float anorm, float *rcond, int *info); -extern void cppequ(char uplo, int n, complex *a, float *scale, float *scond, float *amax, int *info); -extern void cpprfs(char uplo, int n, int nrhs, complex *a, complex *af, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cppsv(char uplo, int n, int nrhs, complex *a, complex *b, int ldb, int *info); -extern void cppsvx(char fact, char uplo, int n, int nrhs, complex *a, complex *af, char equed, float *scale, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void cpptrf(char uplo, int n, complex *a, int *info); -extern void cpptri(char uplo, int n, complex *a, int *info); -extern void cpptrs(char uplo, int n, int nrhs, complex *a, complex *b, int ldb, int *info); -extern void cptcon(int n, float *diag, complex *offd, float anorm, float *rcond, int *info); -extern void cpteqr(char compz, int n, float *d, float *e, complex *z, int ldz, int *info); -extern void cptrfs(char uplo, int n, int nrhs, float *diag, complex *offd, float *diagf, complex *offdf, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cptsv(int n, int nrhs, float *diag, complex *sub, complex *b, int ldb, int *info); -extern void cptsvx(char fact, int n, int nrhs, float *diag, complex *sub, float *diagf, complex *subf, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void cpttrf(int n, float *diag, complex *offd, int *info); -extern void cpttrs(char uplo, int n, int nrhs, float *diag, complex *offd, complex *b, int ldb, int *info); -extern void cspcon(char uplo, int n, complex *a, int *ipiv, float anorm, float *rcond, int *info); -extern void csprfs(char uplo, int n, int nrhs, complex *a, complex *af, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void cspsv(char uplo, int n, int nrhs, complex *a, int *ipiv, complex *b, int ldb, int *info); -extern void cspsvx(char fact, char uplo, int n, int nrhs, complex *a, complex *af, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void csptrf(char uplo, int n, complex *a, int *ipiv, int *info); -extern void csptri(char uplo, int n, complex *a, int *ipiv, int *info); -extern void csptrs(char uplo, int n, int nrhs, complex *a, int *ipiv, complex *b, int ldb, int *info); -extern void cstedc(char compz, int n, float *d, float *e, complex *z, int ldz, int *info); -extern void cstegr(char jobz, char range, int n, float *d, float *e, float vl, float vu, int il, int iu, float abstol, int *m, float *w, complex *z, int ldz, int *isuppz, int *info); -extern void cstein(int n, float *d, float *e, int m, float *w, int *iblock, int *isplit, complex *z, int ldz, int *ifail, int *info); -extern void csteqr(char compz, int n, float *d, float *e, complex *z, int ldz, int *info); -extern void csycon(char uplo, int n, complex *a, int lda, int *ipiv, float anorm, float *rcond, int *info); -extern void csyrfs(char uplo, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void csysv(char uplo, int n, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); -extern void csysvx(char fact, char uplo, int n, int nrhs, complex *a, int lda, complex *af, int ldaf, int *ipiv, complex *b, int ldb, complex *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void csytrf(char uplo, int n, complex *a, int lda, int *ipiv, int *info); -extern void csytri(char uplo, int n, complex *a, int lda, int *ipiv, int *info); -extern void csytrs(char uplo, int n, int nrhs, complex *a, int lda, int *ipiv, complex *b, int ldb, int *info); -extern void ctbcon(char norm, char uplo, char diag, int n, int ndiag, complex *a, int lda, float *rcond, int *info); -extern void ctbrfs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, complex *a, int lda, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void ctbtrs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, complex *a, int lda, complex *b, int ldb, int *info); -extern void ctgevc(char side, char howmny, int *select, int n, complex *a, int lda, complex *b, int ldb, complex *vl, int ldvl, complex *vr, int ldvr, int mm, int *m, int *info); -extern void ctgexc(int wantq, int wantz, int n, complex *a, int lda, complex *b, int ldb, complex *q, int ldq, complex *z, int ldz, int *ifst, int *ilst, int *info); -extern void ctgsen(int ijob, int wantq, int wantz, int *select, int n, complex *a, int lda, complex *b, int ldb, complex *alpha, complex *beta, complex *q, int ldq, complex *z, int ldz, int *m, float *pl, float *pr, float *dif, int *info); -extern void ctgsja(char jobu, char jobv, char jobq, int m, int p, int n, int k, int l, complex *a, int lda, complex *b, int ldb, float tola, float tolb, float *alpha, float *beta, complex *u, int ldu, complex *v, int ldv, complex *q, int ldq, int *ncycle, int *info); -extern void ctgsna(char job, char howmnt, int *select, int n, complex *a, int lda, complex *b, int ldb, complex *vl, int ldvl, complex *vr, int ldvr, float *s, float *dif, int mm, int *m, int *info); -extern void ctgsyl(char trans, int ijob, int m, int n, complex *a, int lda, complex *b, int ldb, complex *c, int ldc, complex *d, int ldd, complex *e, int lde, complex *f, int ldf, float *scale, float *dif, int *info); -extern void ctpcon(char norm, char uplo, char diag, int n, complex *a, float *rcond, int *info); -extern void ctprfs(char uplo, char transa, char diag, int n, int nrhs, complex *a, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void ctptri(char uplo, char diag, int n, complex *a, int *info); -extern void ctptrs(char uplo, char transa, char diag, int n, int nrhs, complex *a, complex *b, int ldb, int *info); -extern void ctrcon(char norm, char uplo, char diag, int n, complex *a, int lda, float *rcond, int *info); -extern void ctrevc(char side, char howmny, int *select, int n, complex *t, int ldt, complex *vl, int ldvl, complex *vr, int ldvr, int mm, int *m, int *info); -extern void ctrexc(char compq, int n, complex *t, int ldt, complex *q, int ldq, int ifst, int ilst, int *info); -extern void ctrrfs(char uplo, char transa, char diag, int n, int nrhs, complex *a, int lda, complex *b, int ldb, complex *x, int ldx, float *ferr, float *berr, int *info); -extern void ctrsen(char job, char compq, int *select, int n, complex *t, int ldt, complex *q, int ldq, complex *w, int *m, float *s, float *sep, int *info); -extern void ctrsna(char job, char howmny, int *select, int n, complex *t, int ldt, complex *vl, int ldvl, complex *vr, int ldvr, float *s, float *sep, int mm, int *m, int *info); -extern void ctrsyl(char trana, char tranb, int isgn, int m, int n, complex *a, int lda, complex *b, int ldb, complex *c, int ldc, float *scale, int *info); -extern void ctrtri(char uplo, char diag, int n, complex *a, int lda, int *info); -extern void ctrtrs(char uplo, char transa, char diag, int n, int nrhs, complex *a, int lda, complex *b, int ldb, int *info); -extern void ctzrqf(int m, int n, complex *a, int lda, complex *tau, int *info); -extern void ctzrzf(int m, int n, complex *a, int lda, complex *tau, int *info); -extern void cungbr(char vect, int m, int n, int k, complex *a, int lda, complex *tau, int *info); -extern void cunghr(int n, int ilo, int ihi, complex *a, int lda, complex *tau, int *info); -extern void cunglq(int m, int n, int k, complex *a, int lda, complex *tau, int *info); -extern void cungql(int m, int n, int k, complex *a, int lda, complex *tau, int *info); -extern void cungqr(int m, int n, int k, complex *a, int lda, complex *tau, int *info); -extern void cungrq(int m, int n, int k, complex *a, int lda, complex *tau, int *info); -extern void cungtr(char uplo, int n, complex *a, int lda, complex *tau, int *info); -extern void cunmbr(char vect, char side, char trans, int m, int n, int k, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cunmhr(char side, char trans, int m, int n, int ilo, int ihi, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cunmlq(char side, char trans, int m, int n, int k, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cunmql(char side, char trans, int m, int n, int k, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cunmqr(char side, char trans, int m, int n, int k, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cunmrq(char side, char trans, int m, int n, int k, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cunmrz(char side, char trans, int m, int n, int k, int l, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cunmtr(char side, char uplo, char trans, int m, int n, complex *a, int lda, complex *tau, complex *c, int ldc, int *info); -extern void cupgtr(char uplo, int n, complex *ap, complex *tau, complex *q, int ldq, int *info); -extern void cupmtr(char side, char uplo, char trans, int m, int n, complex *ap, complex *tau, complex *c, int ldc, int *info); -extern void dbdsdc(char uplo, char compq, int n, double *d, double *e, double *u, int ldu, double *vt, int ldvt, double *q, int *iq, int *info); -extern void dbdsqr(char uplo, int n, int ncvt, int nru, int ncc, double *d, double *e, double *vt, int ldvt, double *u, int ldu, double *c, int ldc, int *info); -extern void ddisna(char job, int m, int n, double *d, double *sep, int *info); -extern void dgbbrd(char vect, int m, int n, int ncc, int kl, int ku, double *ab, int ldab, double *d, double *e, double *q, int ldq, double *pt, int ldpt, double *c, int ldc, int *info); -extern void dgbcon(char norm, int n, int nsub, int nsuper, double *a, int lda, int *ipiv, double anorm, double *rcond, int *info); -extern void dgbequ(int m, int n, int nsub, int nsuper, double *a, int lda, double *rowsc, double *colsc, double *rowcn, double *colcn, double *amax, int *info); -extern void dgbrfs(char transa, int n, int nsub, int nsuper, int nrhs, double *a, int lda, double *af, int ldaf, int *ipiv, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dgbsv(int n, int nsub, int nsuper, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); - -/* N.B. In this C interface to dgbsvx, rpvgrw returns what is returned in - the first element of WORK by the FORTRAN interface */ -extern void dgbsvx(char fact, char transa, int n, int nsub, int nsuper, int nrhs, double *a, int lda, double *af, int ldaf, int *ipiv, char equed, double *rowsc, double *colsc, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, double *rpvgrw, int *info); - -extern void dgbtrf(int m, int n, int nsub, int nsuper, double *a, int lda, int *ipiv, int *info); -extern void dgbtrs(char transa, int n, int nsub, int nsuper, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); -extern void dgebak(char job, char side, int n, int ilo, int ihi, double *scale, int m, double *v, int ldv, int *info); -extern void dgebal(char job, int n, double *a, int lda, int *ilo, int *ihi, double *scale, int *info); -extern void dgebrd(int m, int n, double *a, int lda, double *d, double *e, double *tauq, double *taup, int *info); -extern void dgecon(char norm, int n, double *a, int lda, double anorm, double *rcond, int *info); -extern void dgeequ(int m, int n, double *a, int lda, double *rowsc, double *colsc, double *rowcn, double *colcn, double *amax, int *info); -extern void dgees(char jobz, char sortev, ACML_DGEES_SELECT select, int n, double *a, int lda, int *nout, double *wr, double *wi, double *z, int ldz, int *info); -extern void dgeesx(char jobz, char sortev, ACML_DGEESX_SELECT select, char sense, int n, double *a, int lda, int *nout, double *wr, double *wi, double *z, int ldz, double *srcone, double *rconv, int *info); -extern void dgeev(char jobvl, char jobvr, int n, double *a, int lda, double *wr, double *wi, double *vl, int ldvl, double *vr, int ldvr, int *info); -extern void dgeevx(char balanc, char jobvl, char jobvr, char sense, int n, double *a, int lda, double *wr, double *wi, double *vl, int ldvl, double *vr, int ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rcone, double *rconv, int *info); -extern void dgegs(char jobvsl, char jobvsr, int n, double *a, int lda, double *b, int ldb, double *alphar, double *alphai, double *beta, double *vsl, int ldvsl, double *vsr, int ldvsr, int *info); -extern void dgegv(char jobvl, char jobvr, int n, double *a, int lda, double *b, int ldb, double *alphar, double *alphai, double *beta, double *vl, int ldvl, double *vr, int ldvr, int *info); -extern void dgehrd(int n, int ilo, int ihi, double *a, int lda, double *tau, int *info); -extern void dgelqf(int m, int n, double *a, int lda, double *tau, int *info); -extern void dgels(char trans, int m, int n, int nrhs, double *a, int lda, double *b, int ldb, int *info); -extern void dgelsd(int m, int n, int nrhs, double *a, int lda, double *b, int ldb, double *s, double rcond, int *rank, int *info); -extern void dgelss(int m, int n, int nrhs, double *a, int lda, double *b, int ldb, double *sing, double rcond, int *irank, int *info); -extern void dgelsx(int m, int n, int nrhs, double *a, int lda, double *b, int ldb, int *jpivot, double rcond, int *irank, int *info); -extern void dgelsy(int m, int n, int nrhs, double *a, int lda, double *b, int ldb, int *jpvt, double rcond, int *rank, int *info); -extern void dgeqlf(int m, int n, double *a, int lda, double *tau, int *info); -extern void dgeqp3(int m, int n, double *a, int lda, int *jpvt, double *tau, int *info); -extern void dgeqpf(int m, int n, double *a, int lda, int *jpivot, double *tau, int *info); -extern void dgeqrf(int m, int n, double *a, int lda, double *tau, int *info); -extern void dgerfs(char transa, int n, int nrhs, double *a, int lda, double *af, int ldaf, int *ipiv, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dgerqf(int m, int n, double *a, int lda, double *tau, int *info); -extern void dgesdd(char jobz, int m, int n, double *a, int lda, double *s, double *u, int ldu, double *vt, int ldvt, int *info); -extern void dgesv(int n, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); -extern void dgesvd(char jobu, char jobvt, int m, int n, double *a, int lda, double *sing, double *u, int ldu, double *vt, int ldvt, int *info); - -/* N.B. In this C interface to dgesvx, rpvgrw returns what is returned in - the first element of WORK by the FORTRAN interface */ -extern void dgesvx(char fact, char transa, int n, int nrhs, double *a, int lda, double *af, int ldaf, int *ipiv, char equed, double *rowsc, double *colsc, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, double *rpvgrw, int *info); - -extern void dgetrf(int m, int n, double *a, int lda, int *ipiv, int *info); -extern void dgetri(int n, double *a, int lda, int *ipiv, int *info); -extern void dgetrs(char transa, int n, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); -extern void dggbak(char job, char side, int n, int ilo, int ihi, double *lscale, double *rscale, int m, double *v, int ldv, int *info); -extern void dggbal(char job, int n, double *a, int lda, double *b, int ldb, int *ilo, int *ihi, double *lscale, double *rscale, int *info); -extern void dgges(char jobvsl, char jobvsr, char sort, ACML_DGGES_DELCTG delctg, int n, double *a, int lda, double *b, int ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int ldvsl, double *vsr, int ldvsr, int *info); -extern void dggesx(char jobvsl, char jobvsr, char sort, ACML_DGGESX_DELCTG delctg, char sense, int n, double *a, int lda, double *b, int ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int ldvsl, double *vsr, int ldvsr, double *rconde, double *rcondv, int *info); -extern void dggev(char jobvl, char jobvr, int n, double *a, int lda, double *b, int ldb, double *alphar, double *alphai, double *beta, double *vl, int ldvl, double *vr, int ldvr, int *info); -extern void dggevx(char balanc, char jobvl, char jobvr, char sense, int n, double *a, int lda, double *b, int ldb, double *alphar, double *alphai, double *beta, double *vl, int ldvl, double *vr, int ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, int *info); -extern void dggglm(int n, int m, int p, double *a, int lda, double *b, int ldb, double *d, double *x, double *y, int *info); -extern void dgghrd(char compq, char compz, int n, int ilo, int ihi, double *a, int lda, double *b, int ldb, double *q, int ldq, double *z, int ldz, int *info); -extern void dgglse(int m, int n, int p, double *a, int lda, double *b, int ldb, double *c, double *d, double *x, int *info); -extern void dggqrf(int n, int m, int p, double *a, int lda, double *taua, double *b, int ldb, double *taub, int *info); -extern void dggrqf(int m, int p, int n, double *a, int lda, double *taua, double *b, int ldb, double *taub, int *info); -extern void dggsvd(char jobu, char jobv, char jobq, int m, int n, int p, int *k, int *l, double *a, int lda, double *b, int ldb, double *alpha, double *beta, double *u, int ldu, double *v, int ldv, double *q, int ldq, int *iwork3, int *info); -extern void dggsvp(char jobu, char jobv, char jobq, int m, int p, int n, double *a, int lda, double *b, int ldb, double tola, double tolb, int *k, int *l, double *u, int ldu, double *v, int ldv, double *q, int ldq, int *info); -extern void dgtcon(char norm, int n, double *low, double *diag, double *up1, double *up2, int *ipiv, double anorm, double *rcond, int *info); -extern void dgtrfs(char transa, int n, int nrhs, double *low, double *diag, double *up, double *lowf, double *diagf, double *upf1, double *upf2, int *ipiv, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dgtsv(int n, int nrhs, double *low, double *diag, double *up, double *b, int ldb, int *info); -extern void dgtsvx(char fact, char transa, int n, int nrhs, double *low, double *diag, double *up, double *lowf, double *diagf, double *upf1, double *upf2, int *ipiv, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void dgttrf(int n, double *low, double *diag, double *up1, double *up2, int *ipiv, int *info); -extern void dgttrs(char transa, int n, int nrhs, double *low, double *diag, double *up1, double *up2, int *ipiv, double *b, int ldb, int *info); -extern void dhgeqz(char job, char compq, char compz, int n, int ilo, int ihi, double *a, int lda, double *b, int ldb, double *alphar, double *alphai, double *beta, double *q, int ldq, double *z, int ldz, int *info); -extern void dhsein(char side, char eigsrc, char initv, int *select, int n, double *h, int ldh, double *wr, double *wi, double *vl, int ldvl, double *vr, int ldvr, int mm, int *m, int *ifaill, int *ifailr, int *info); -extern void dhseqr(char job, char compz, int n, int ilo, int ihi, double *h, int ldh, double *wr, double *wi, double *z, int ldz, int *info); -extern double dlamch(char cmach); -extern void dopgtr(char uplo, int n, double *ap, double *tau, double *q, int ldq, int *info); -extern void dopmtr(char side, char uplo, char trans, int m, int n, double *ap, double *tau, double *c, int ldc, int *info); -extern void dorgbr(char vect, int m, int n, int k, double *a, int lda, double *tau, int *info); -extern void dorghr(int n, int ilo, int ihi, double *a, int lda, double *tau, int *info); -extern void dorglq(int m, int n, int k, double *a, int lda, double *tau, int *info); -extern void dorgql(int m, int n, int k, double *a, int lda, double *tau, int *info); -extern void dorgqr(int m, int n, int k, double *a, int lda, double *tau, int *info); -extern void dorgrq(int m, int n, int k, double *a, int lda, double *tau, int *info); -extern void dorgtr(char uplo, int n, double *a, int lda, double *tau, int *info); -extern void dormbr(char vect, char side, char trans, int m, int n, int k, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormhr(char side, char trans, int m, int n, int ilo, int ihi, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormlq(char side, char trans, int m, int n, int k, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormql(char side, char trans, int m, int n, int k, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormqr(char side, char trans, int m, int n, int k, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormr3(char side, char trans, int m, int n, int k, int l, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormrq(char side, char trans, int m, int n, int k, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormrz(char side, char trans, int m, int n, int k, int l, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dormtr(char side, char uplo, char trans, int m, int n, double *a, int lda, double *tau, double *c, int ldc, int *info); -extern void dpbcon(char uplo, int n, int ndiag, double *a, int lda, double anorm, double *rcond, int *info); -extern void dpbequ(char uplo, int n, int ndiag, double *a, int lda, double *scale, double *scond, double *amax, int *info); -extern void dpbrfs(char uplo, int n, int ndiag, int nrhs, double *a, int lda, double *af, int ldaf, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dpbstf(char uplo, int n, int kd, double *ab, int ldab, int *info); -extern void dpbsv(char uplo, int n, int ndiag, int nrhs, double *a, int lda, double *b, int ldb, int *info); -extern void dpbsvx(char fact, char uplo, int n, int ndiag, int nrhs, double *a, int lda, double *af, int ldaf, char equed, double *scale, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void dpbtrf(char uplo, int n, int ndiag, double *a, int lda, int *info); -extern void dpbtrs(char uplo, int n, int ndiag, int nrhs, double *a, int lda, double *b, int ldb, int *info); -extern void dpocon(char uplo, int n, double *a, int lda, double anorm, double *rcond, int *info); -extern void dpoequ(int n, double *a, int lda, double *scale, double *scond, double *amax, int *info); -extern void dporfs(char uplo, int n, int nrhs, double *a, int lda, double *af, int ldaf, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dposv(char uplo, int n, int nrhs, double *a, int lda, double *b, int ldb, int *info); -extern void dposvx(char fact, char uplo, int n, int nrhs, double *a, int lda, double *af, int ldaf, char equed, double *scale, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void dpotrf(char uplo, int n, double *a, int lda, int *info); -extern void dpotri(char uplo, int n, double *a, int lda, int *info); -extern void dpotrs(char uplo, int n, int nrhs, double *a, int lda, double *b, int ldb, int *info); -extern void dppcon(char uplo, int n, double *a, double anorm, double *rcond, int *info); -extern void dppequ(char uplo, int n, double *a, double *scale, double *scond, double *amax, int *info); -extern void dpprfs(char uplo, int n, int nrhs, double *a, double *af, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dppsv(char uplo, int n, int nrhs, double *a, double *b, int ldb, int *info); -extern void dppsvx(char fact, char uplo, int n, int nrhs, double *a, double *af, char equed, double *scale, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void dpptrf(char uplo, int n, double *a, int *info); -extern void dpptri(char uplo, int n, double *a, int *info); -extern void dpptrs(char uplo, int n, int nrhs, double *a, double *b, int ldb, int *info); -extern void dptcon(int n, double *diag, double *offd, double anorm, double *rcond, int *info); -extern void dpteqr(char compz, int n, double *d, double *e, double *z, int ldz, int *info); -extern void dptrfs(int n, int nrhs, double *diag, double *offd, double *diagf, double *offdf, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dptsv(int n, int nrhs, double *diag, double *sub, double *b, int ldb, int *info); -extern void dptsvx(char fact, int n, int nrhs, double *diag, double *sub, double *diagf, double *subf, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void dpttrf(int n, double *diag, double *offd, int *info); -extern void dpttrs(int n, int nrhs, double *diag, double *offd, double *b, int ldb, int *info); -extern void dsbev(char jobz, char uplo, int n, int ndiag, double *a, int lda, double *w, double *z, int ldz, int *info); -extern void dsbevd(char jobz, char uplo, int n, int kd, double *ab, int ldab, double *w, double *z, int ldz, int *info); -extern void dsbevx(char jobz, char range, char uplo, int n, int ndiag, double *a, int lda, double *q, int ldq, double vl, double vu, int il, int iu, double abtol, int *nfound, double *w, double *z, int ldz, int *ifail, int *info); -extern void dsbgst(char vect, char uplo, int n, int ka, int kb, double *ab, int ldab, double *bb, int ldbb, double *x, int ldx, int *info); -extern void dsbgv(char jobz, char uplo, int n, int ka, int kb, double *ab, int ldab, double *bb, int ldbb, double *w, double *z, int ldz, int *info); -extern void dsbgvd(char jobz, char uplo, int n, int ka, int kb, double *ab, int ldab, double *bb, int ldbb, double *w, double *z, int ldz, int *info); -extern void dsbgvx(char jobz, char range, char uplo, int n, int ka, int kb, double *ab, int ldab, double *bb, int ldbb, double *q, int ldq, double vl, double vu, int il, int iu, double abstol, int *m, double *w, double *z, int ldz, int *ifail, int *info); -extern void dsbtrd(char vect, char uplo, int n, int kd, double *ab, int ldab, double *d, double *e, double *q, int ldq, int *info); -extern double dsecnd(void); -extern void dspcon(char uplo, int n, double *a, int *ipiv, double anorm, double *rcond, int *info); -extern void dspev(char jobz, char uplo, int n, double *a, double *w, double *z, int ldz, int *info); -extern void dspevd(char jobz, char uplo, int n, double *ap, double *w, double *z, int ldz, int *info); -extern void dspevx(char jobz, char range, char uplo, int n, double *a, double vl, double vu, int il, int iu, double abtol, int *nfound, double *w, double *z, int ldz, int *ifail, int *info); -extern void dspgst(int itype, char uplo, int n, double *ap, double *bp, int *info); -extern void dspgv(int itype, char jobz, char uplo, int n, double *a, double *b, double *w, double *z, int ldz, int *info); -extern void dspgvd(int itype, char jobz, char uplo, int n, double *ap, double *bp, double *w, double *z, int ldz, int *info); -extern void dspgvx(int itype, char jobz, char range, char uplo, int n, double *ap, double *bp, double vl, double vu, int il, int iu, double abstol, int *m, double *w, double *z, int ldz, int *ifail, int *info); -extern void dsprfs(char uplo, int n, int nrhs, double *a, double *af, int *ipiv, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dspsv(char uplo, int n, int nrhs, double *a, int *ipiv, double *b, int ldb, int *info); -extern void dspsvx(char fact, char uplo, int n, int nrhs, double *a, double *af, int *ipiv, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void dsptrd(char uplo, int n, double *ap, double *d, double *e, double *tau, int *info); -extern void dsptrf(char uplo, int n, double *a, int *ipiv, int *info); -extern void dsptri(char uplo, int n, double *a, int *ipiv, int *info); -extern void dsptrs(char uplo, int n, int nrhs, double *a, int *ipiv, double *b, int ldb, int *info); -extern void dstebz(char range, char order, int n, double vl, double vu, int il, int iu, double abstol, double *d, double *e, int *m, int *nsplit, double *w, int *iblock, int *isplit, int *info); -extern void dstedc(char compz, int n, double *d, double *e, double *z, int ldz, int *info); -extern void dstegr(char jobz, char range, int n, double *d, double *e, double vl, double vu, int il, int iu, double abstol, int *m, double *w, double *z, int ldz, int *isuppz, int *info); -extern void dstein(int n, double *d, double *e, int m, double *w, int *iblock, int *isplit, double *z, int ldz, int *ifail, int *info); -extern void dsteqr(char compz, int n, double *d, double *e, double *z, int ldz, int *info); -extern void dsterf(int n, double *d, double *e, int *info); -extern void dstev(char jobz, int n, double *diag, double *offd, double *z, int ldz, int *info); -extern void dstevd(char jobz, int n, double *d, double *e, double *z, int ldz, int *info); -extern void dstevr(char jobz, char range, int n, double *d, double *e, double vl, double vu, int il, int iu, double abstol, int *m, double *w, double *z, int ldz, int *isuppz, int *info); -extern void dstevx(char jobz, char range, int n, double *diag, double *offd, double vl, double vu, int il, int iu, double abtol, int *nfound, double *w, double *z, int ldz, int *ifail, int *info); -extern void dsycon(char uplo, int n, double *a, int lda, int *ipiv, double anorm, double *rcond, int *info); -extern void dsyev(char jobz, char uplo, int n, double *a, int lda, double *w, int *info); -extern void dsyevd(char jobz, char uplo, int n, double *a, int lda, double *w, int *info); -extern void dsyevr(char jobz, char range, char uplo, int n, double *a, int lda, double vl, double vu, int il, int iu, double abstol, int *m, double *w, double *z, int ldz, int *isuppz, int *info); -extern void dsyevx(char jobz, char range, char uplo, int n, double *a, int lda, double vl, double vu, int il, int iu, double abtol, int *nfound, double *w, double *z, int ldz, int *ifail, int *info); -extern void dsygst(int itype, char uplo, int n, double *a, int lda, double *b, int ldb, int *info); -extern void dsygv(int itype, char jobz, char uplo, int n, double *a, int lda, double *b, int ldb, double *w, int *info); -extern void dsygvd(int itype, char jobz, char uplo, int n, double *a, int lda, double *b, int ldb, double *w, int *info); -extern void dsygvx(int itype, char jobz, char range, char uplo, int n, double *a, int lda, double *b, int ldb, double vl, double vu, int il, int iu, double abstol, int *m, double *w, double *z, int ldz, int *ifail, int *info); -extern void dsyrfs(char uplo, int n, int nrhs, double *a, int lda, double *af, int ldaf, int *ipiv, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dsysv(char uplo, int n, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); -extern void dsysvx(char fact, char uplo, int n, int nrhs, double *a, int lda, double *af, int ldaf, int *ipiv, double *b, int ldb, double *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void dsytrd(char uplo, int n, double *a, int lda, double *d, double *e, double *tau, int *info); -extern void dsytrf(char uplo, int n, double *a, int lda, int *ipiv, int *info); -extern void dsytri(char uplo, int n, double *a, int lda, int *ipiv, int *info); -extern void dsytrs(char uplo, int n, int nrhs, double *a, int lda, int *ipiv, double *b, int ldb, int *info); -extern void dtbcon(char norm, char uplo, char diag, int n, int ndiag, double *a, int lda, double *rcond, int *info); -extern void dtbrfs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, double *a, int lda, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dtbtrs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, double *a, int lda, double *b, int ldb, int *info); -extern void dtgevc(char side, char howmny, int *select, int n, double *a, int lda, double *b, int ldb, double *vl, int ldvl, double *vr, int ldvr, int mm, int *m, int *info); -extern void dtgexc(int wantq, int wantz, int n, double *a, int lda, double *b, int ldb, double *q, int ldq, double *z, int ldz, int *ifst, int *ilst, int *info); -extern void dtgsen(int ijob, int wantq, int wantz, int *select, int n, double *a, int lda, double *b, int ldb, double *alphar, double *alphai, double *beta, double *q, int ldq, double *z, int ldz, int *m, double *pl, double *pr, double *dif, int *info); -extern void dtgsja(char jobu, char jobv, char jobq, int m, int p, int n, int k, int l, double *a, int lda, double *b, int ldb, double tola, double tolb, double *alpha, double *beta, double *u, int ldu, double *v, int ldv, double *q, int ldq, int *ncycle, int *info); -extern void dtgsna(char job, char howmnt, int *select, int n, double *a, int lda, double *b, int ldb, double *vl, int ldvl, double *vr, int ldvr, double *s, double *dif, int mm, int *m, int *info); -extern void dtgsyl(char trans, int ijob, int m, int n, double *a, int lda, double *b, int ldb, double *c, int ldc, double *d, int ldd, double *e, int lde, double *f, int ldf, double *scale, double *dif, int *info); -extern void dtpcon(char norm, char uplo, char diag, int n, double *a, double *rcond, int *info); -extern void dtprfs(char uplo, char transa, char diag, int n, int nrhs, double *a, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dtptri(char uplo, char diag, int n, double *a, int *info); -extern void dtptrs(char uplo, char transa, char diag, int n, int nrhs, double *a, double *b, int ldb, int *info); -extern void dtrcon(char norm, char uplo, char diag, int n, double *a, int lda, double *rcond, int *info); -extern void dtrevc(char side, char howmny, int *select, int n, double *t, int ldt, double *vl, int ldvl, double *vr, int ldvr, int mm, int *m, int *info); -extern void dtrexc(char compq, int n, double *t, int ldt, double *q, int ldq, int *ifst, int *ilst, int *info); -extern void dtrrfs(char uplo, char transa, char diag, int n, int nrhs, double *a, int lda, double *b, int ldb, double *x, int ldx, double *ferr, double *berr, int *info); -extern void dtrsen(char job, char compq, int *select, int n, double *t, int ldt, double *q, int ldq, double *wr, double *wi, int *m, double *s, double *sep, int *info); -extern void dtrsna(char job, char howmny, int *select, int n, double *t, int ldt, double *vl, int ldvl, double *vr, int ldvr, double *s, double *sep, int mm, int *m, int *info); -extern void dtrsyl(char trana, char tranb, int isgn, int m, int n, double *a, int lda, double *b, int ldb, double *c, int ldc, double *scale, int *info); -extern void dtrtri(char uplo, char diag, int n, double *a, int lda, int *info); -extern void dtrtrs(char uplo, char transa, char diag, int n, int nrhs, double *a, int lda, double *b, int ldb, int *info); -extern void dtzrqf(int m, int n, double *a, int lda, double *tau, int *info); -extern void dtzrzf(int m, int n, double *a, int lda, double *tau, int *info); -extern void sbdsdc(char uplo, char compq, int n, float *d, float *e, float *u, int ldu, float *vt, int ldvt, float *q, int *iq, int *info); -extern void sbdsqr(char uplo, int n, int ncvt, int nru, int ncc, float *d, float *e, float *vt, int ldvt, float *u, int ldu, float *c, int ldc, int *info); -extern void sdisna(char job, int m, int n, float *d, float *sep, int *info); -extern float second(void); -extern void sgbbrd(char vect, int m, int n, int ncc, int kl, int ku, float *ab, int ldab, float *d, float *e, float *q, int ldq, float *pt, int ldpt, float *c, int ldc, int *info); -extern void sgbcon(char norm, int n, int nsub, int nsuper, float *a, int lda, int *ipiv, float anorm, float *rcond, int *info); -extern void sgbequ(int m, int n, int nsub, int nsuper, float *a, int lda, float *rowsc, float *colsc, float *rowcn, float *colcn, float *amax, int *info); -extern void sgbrfs(char transa, int n, int nsub, int nsuper, int nrhs, float *a, int lda, float *af, int ldaf, int *ipiv, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void sgbsv(int n, int nsub, int nsuper, int nrhs, float *a, int lda, int *ipiv, float *b, int ldb, int *info); - -/* N.B. In this C interface to sgbsvx, rpvgrw returns what is returned in - the first element of WORK by the FORTRAN interface */ -extern void sgbsvx(char fact, char transa, int n, int nsub, int nsuper, int nrhs, float *a, int lda, float *af, int ldaf, int *ipiv, char equed, float *rowsc, float *colsc, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, float *rpvgrw, int *info); - -extern void sgbtrf(int m, int n, int nsub, int nsuper, float *a, int lda, int *ipiv, int *info); -extern void sgbtrs(char transa, int n, int nsub, int nsuper, int nrhs, float *a, int lda, int *ipiv, float *b, int ldb, int *info); -extern void sgebak(char job, char side, int n, int ilo, int ihi, float *scale, int m, float *v, int ldv, int *info); -extern void sgebal(char job, int n, float *a, int lda, int *ilo, int *ihi, float *scale, int *info); -extern void sgebrd(int m, int n, float *a, int lda, float *d, float *e, float *tauq, float *taup, int *info); -extern void sgecon(char norm, int n, float *a, int lda, float anorm, float *rcond, int *info); -extern void sgeequ(int m, int n, float *a, int lda, float *rowsc, float *colsc, float *rowcn, float *colcn, float *amax, int *info); -extern void sgees(char jobz, char sortev, ACML_SGEES_SELECT select, int n, float *a, int lda, int *nout, float *wr, float *wi, float *z, int ldz, int *info); -extern void sgeesx(char jobz, char sortev, ACML_SGEESX_SELECT select, char sense, int n, float *a, int lda, int *nout, float *wr, float *wi, float *z, int ldz, float *srcone, float *rconv, int *info); -extern void sgeev(char jobvl, char jobvr, int n, float *a, int lda, float *wr, float *wi, float *vl, int ldvl, float *vr, int ldvr, int *info); -extern void sgeevx(char balanc, char jobvl, char jobvr, char sense, int n, float *a, int lda, float *wr, float *wi, float *vl, int ldvl, float *vr, int ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rcone, float *rconv, int *info); -extern void sgegs(char jobvsl, char jobvsr, int n, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *vsl, int ldvsl, float *vsr, int ldvsr, int *info); -extern void sgegv(char jobvl, char jobvr, int n, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *vl, int ldvl, float *vr, int ldvr, int *info); -extern void sgehrd(int n, int ilo, int ihi, float *a, int lda, float *tau, int *info); -extern void sgelqf(int m, int n, float *a, int lda, float *tau, int *info); -extern void sgels(char trans, int m, int n, int nrhs, float *a, int lda, float *b, int ldb, int *info); -extern void sgelsd(int m, int n, int nrhs, float *a, int lda, float *b, int ldb, float *s, float rcond, int *rank, int *info); -extern void sgelss(int m, int n, int nrhs, float *a, int lda, float *b, int ldb, float *sing, float rcond, int *irank, int *info); -extern void sgelsx(int m, int n, int nrhs, float *a, int lda, float *b, int ldb, int *jpivot, float rcond, int *irank, int *info); -extern void sgelsy(int m, int n, int nrhs, float *a, int lda, float *b, int ldb, int *jpvt, float rcond, int *rank, int *info); -extern void sgeqlf(int m, int n, float *a, int lda, float *tau, int *info); -extern void sgeqp3(int m, int n, float *a, int lda, int *jpvt, float *tau, int *info); -extern void sgeqpf(int m, int n, float *a, int lda, int *jpivot, float *tau, int *info); -extern void sgeqrf(int m, int n, float *a, int lda, float *tau, int *info); -extern void sgerfs(char transa, int n, int nrhs, float *a, int lda, float *af, int ldaf, int *ipiv, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void sgerqf(int m, int n, float *a, int lda, float *tau, int *info); -extern void sgesdd(char jobz, int m, int n, float *a, int lda, float *s, float *u, int ldu, float *vt, int ldvt, int *info); -extern void sgesv(int n, int nrhs, float *a, int lda, int *ipiv, float *b, int ldb, int *info); -extern void sgesvd(char jobu, char jobvt, int m, int n, float *a, int lda, float *sing, float *u, int ldu, float *vt, int ldvt, int *info); - -/* N.B. In this C interface to sgesvx, rpvgrw returns what is returned in - the first element of WORK by the FORTRAN interface */ -extern void sgesvx(char fact, char transa, int n, int nrhs, float *a, int lda, float *af, int ldaf, int *ipiv, char equed, float *rowsc, float *colsc, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, float *rpvgrw, int *info); - -extern void sgetrf(int m, int n, float *a, int lda, int *ipiv, int *info); -extern void sgetri(int n, float *a, int lda, int *ipiv, int *info); -extern void sgetrs(char transa, int n, int nrhs, float *a, int lda, int *ipiv, float *b, int ldb, int *info); -extern void sggbak(char job, char side, int n, int ilo, int ihi, float *lscale, float *rscale, int m, float *v, int ldv, int *info); -extern void sggbal(char job, int n, float *a, int lda, float *b, int ldb, int *ilo, int *ihi, float *lscale, float *rscale, int *info); -extern void sgges(char jobvsl, char jobvsr, char sort, ACML_SGGES_SELCTG selctg, int n, float *a, int lda, float *b, int ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int ldvsl, float *vsr, int ldvsr, int *info); -extern void sggesx(char jobvsl, char jobvsr, char sort, ACML_SGGESX_SELCTG selctg, char sense, int n, float *a, int lda, float *b, int ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int ldvsl, float *vsr, int ldvsr, float *rconde, float *rcondv, int *info); -extern void sggev(char jobvl, char jobvr, int n, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *vl, int ldvl, float *vr, int ldvr, int *info); -extern void sggevx(char balanc, char jobvl, char jobvr, char sense, int n, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *vl, int ldvl, float *vr, int ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, int *info); -extern void sggglm(int n, int m, int p, float *a, int lda, float *b, int ldb, float *d, float *x, float *y, int *info); -extern void sgghrd(char compq, char compz, int n, int ilo, int ihi, float *a, int lda, float *b, int ldb, float *q, int ldq, float *z, int ldz, int *info); -extern void sgglse(int m, int n, int p, float *a, int lda, float *b, int ldb, float *c, float *d, float *x, int *info); -extern void sggqrf(int n, int m, int p, float *a, int lda, float *taua, float *b, int ldb, float *taub, int *info); -extern void sggrqf(int m, int p, int n, float *a, int lda, float *taua, float *b, int ldb, float *taub, int *info); -extern void sggsvd(char jobu, char jobv, char jobq, int m, int n, int p, int *k, int *l, float *a, int lda, float *b, int ldb, float *alpha, float *beta, float *u, int ldu, float *v, int ldv, float *q, int ldq, int *iwork3, int *info); -extern void sggsvp(char jobu, char jobv, char jobq, int m, int p, int n, float *a, int lda, float *b, int ldb, float tola, float tolb, int *k, int *l, float *u, int ldu, float *v, int ldv, float *q, int ldq, int *info); -extern void sgtcon(char norm, int n, float *low, float *diag, float *up1, float *up2, int *ipiv, float anorm, float *rcond, int *info); -extern void sgtrfs(char transa, int n, int nrhs, float *low, float *diag, float *up, float *lowf, float *diagf, float *upf1, float *upf2, int *ipiv, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void sgtsv(int n, int nrhs, float *low, float *diag, float *up, float *b, int ldb, int *info); -extern void sgtsvx(char fact, char transa, int n, int nrhs, float *low, float *diag, float *up, float *lowf, float *diagf, float *upf1, float *upf2, int *ipiv, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void sgttrf(int n, float *low, float *diag, float *up1, float *up2, int *ipiv, int *info); -extern void sgttrs(char transa, int n, int nrhs, float *low, float *diag, float *up1, float *up2, int *ipiv, float *b, int ldb, int *info); -extern void shgeqz(char job, char compq, char compz, int n, int ilo, int ihi, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *q, int ldq, float *z, int ldz, int *info); -extern void shsein(char side, char eigsrc, char initv, int *select, int n, float *h, int ldh, float *wr, float *wi, float *vl, int ldvl, float *vr, int ldvr, int mm, int *m, int *ifaill, int *ifailr, int *info); -extern void shseqr(char job, char compz, int n, int ilo, int ihi, float *h, int ldh, float *wr, float *wi, float *z, int ldz, int *info); -extern float slamch(char cmach); -extern void sopgtr(char uplo, int n, float *ap, float *tau, float *q, int ldq, int *info); -extern void sopmtr(char side, char uplo, char trans, int m, int n, float *ap, float *tau, float *c, int ldc, int *info); -extern void sorgbr(char vect, int m, int n, int k, float *a, int lda, float *tau, int *info); -extern void sorghr(int n, int ilo, int ihi, float *a, int lda, float *tau, int *info); -extern void sorglq(int m, int n, int k, float *a, int lda, float *tau, int *info); -extern void sorgql(int m, int n, int k, float *a, int lda, float *tau, int *info); -extern void sorgqr(int m, int n, int k, float *a, int lda, float *tau, int *info); -extern void sorgrq(int m, int n, int k, float *a, int lda, float *tau, int *info); -extern void sorgtr(char uplo, int n, float *a, int lda, float *tau, int *info); -extern void sormbr(char vect, char side, char trans, int m, int n, int k, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormhr(char side, char trans, int m, int n, int ilo, int ihi, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormlq(char side, char trans, int m, int n, int k, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormql(char side, char trans, int m, int n, int k, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormqr(char side, char trans, int m, int n, int k, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormr3(char side, char trans, int m, int n, int k, int l, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormrq(char side, char trans, int m, int n, int k, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormrz(char side, char trans, int m, int n, int k, int l, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void sormtr(char side, char uplo, char trans, int m, int n, float *a, int lda, float *tau, float *c, int ldc, int *info); -extern void spbcon(char uplo, int n, int ndiag, float *a, int lda, float anorm, float *rcond, int *info); -extern void spbequ(char uplo, int n, int ndiag, float *a, int lda, float *scale, float *scond, float *amax, int *info); -extern void spbrfs(char uplo, int n, int ndiag, int nrhs, float *a, int lda, float *af, int ldaf, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void spbstf(char uplo, int n, int kd, float *ab, int ldab, int *info); -extern void spbsv(char uplo, int n, int ndiag, int nrhs, float *a, int lda, float *b, int ldb, int *info); -extern void spbsvx(char fact, char uplo, int n, int ndiag, int nrhs, float *a, int lda, float *af, int ldaf, char equed, float *scale, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void spbtrf(char uplo, int n, int ndiag, float *a, int lda, int *info); -extern void spbtrs(char uplo, int n, int ndiag, int nrhs, float *a, int lda, float *b, int ldb, int *info); -extern void spocon(char uplo, int n, float *a, int lda, float anorm, float *rcond, int *info); -extern void spoequ(int n, float *a, int lda, float *scale, float *scond, float *amax, int *info); -extern void sporfs(char uplo, int n, int nrhs, float *a, int lda, float *af, int ldaf, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void sposv(char uplo, int n, int nrhs, float *a, int lda, float *b, int ldb, int *info); -extern void sposvx(char fact, char uplo, int n, int nrhs, float *a, int lda, float *af, int ldaf, char equed, float *scale, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void spotrf(char uplo, int n, float *a, int lda, int *info); -extern void spotri(char uplo, int n, float *a, int lda, int *info); -extern void spotrs(char uplo, int n, int nrhs, float *a, int lda, float *b, int ldb, int *info); -extern void sppcon(char uplo, int n, float *a, float anorm, float *rcond, int *info); -extern void sppequ(char uplo, int n, float *a, float *scale, float *scond, float *amax, int *info); -extern void spprfs(char uplo, int n, int nrhs, float *a, float *af, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void sppsv(char uplo, int n, int nrhs, float *a, float *b, int ldb, int *info); -extern void sppsvx(char fact, char uplo, int n, int nrhs, float *a, float *af, char equed, float *scale, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void spptrf(char uplo, int n, float *a, int *info); -extern void spptri(char uplo, int n, float *a, int *info); -extern void spptrs(char uplo, int n, int nrhs, float *a, float *b, int ldb, int *info); -extern void sptcon(int n, float *diag, float *offd, float anorm, float *rcond, int *info); -extern void spteqr(char compz, int n, float *d, float *e, float *z, int ldz, int *info); -extern void sptrfs(int n, int nrhs, float *diag, float *offd, float *diagf, float *offdf, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void sptsv(int n, int nrhs, float *diag, float *sub, float *b, int ldb, int *info); -extern void sptsvx(char fact, int n, int nrhs, float *diag, float *sub, float *diagf, float *subf, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void spttrf(int n, float *diag, float *offd, int *info); -extern void spttrs(int n, int nrhs, float *diag, float *offd, float *b, int ldb, int *info); -extern void ssbev(char jobz, char uplo, int n, int ndiag, float *a, int lda, float *w, float *z, int ldz, int *info); -extern void ssbevd(char jobz, char uplo, int n, int kd, float *ab, int ldab, float *w, float *z, int ldz, int *info); -extern void ssbevx(char jobz, char range, char uplo, int n, int ndiag, float *a, int lda, float *q, int ldq, float vl, float vu, int il, int iu, float abtol, int *nfound, float *w, float *z, int ldz, int *ifail, int *info); -extern void ssbgst(char vect, char uplo, int n, int ka, int kb, float *ab, int ldab, float *bb, int ldbb, float *x, int ldx, int *info); -extern void ssbgv(char jobz, char uplo, int n, int ka, int kb, float *ab, int ldab, float *bb, int ldbb, float *w, float *z, int ldz, int *info); -extern void ssbgvd(char jobz, char uplo, int n, int ka, int kb, float *ab, int ldab, float *bb, int ldbb, float *w, float *z, int ldz, int *info); -extern void ssbgvx(char jobz, char range, char uplo, int n, int ka, int kb, float *ab, int ldab, float *bb, int ldbb, float *q, int ldq, float vl, float vu, int il, int iu, float abstol, int *m, float *w, float *z, int ldz, int *ifail, int *info); -extern void ssbtrd(char vect, char uplo, int n, int kd, float *ab, int ldab, float *d, float *e, float *q, int ldq, int *info); -extern void sspcon(char uplo, int n, float *a, int *ipiv, float anorm, float *rcond, int *info); -extern void sspev(char jobz, char uplo, int n, float *a, float *w, float *z, int ldz, int *info); -extern void sspevd(char jobz, char uplo, int n, float *ap, float *w, float *z, int ldz, int *info); -extern void sspevx(char jobz, char range, char uplo, int n, float *a, float vl, float vu, int il, int iu, float abtol, int *nfound, float *w, float *z, int ldz, int *ifail, int *info); -extern void sspgst(int itype, char uplo, int n, float *ap, float *bp, int *info); -extern void sspgv(int itype, char jobz, char uplo, int n, float *a, float *b, float *w, float *z, int ldz, int *info); -extern void sspgvd(int itype, char jobz, char uplo, int n, float *ap, float *bp, float *w, float *z, int ldz, int *info); -extern void sspgvx(int itype, char jobz, char range, char uplo, int n, float *ap, float *bp, float vl, float vu, int il, int iu, float abstol, int *m, float *w, float *z, int ldz, int *ifail, int *info); -extern void ssprfs(char uplo, int n, int nrhs, float *a, float *af, int *ipiv, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void sspsv(char uplo, int n, int nrhs, float *a, int *ipiv, float *b, int ldb, int *info); -extern void sspsvx(char fact, char uplo, int n, int nrhs, float *a, float *af, int *ipiv, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void ssptrd(char uplo, int n, float *ap, float *d, float *e, float *tau, int *info); -extern void ssptrf(char uplo, int n, float *a, int *ipiv, int *info); -extern void ssptri(char uplo, int n, float *a, int *ipiv, int *info); -extern void ssptrs(char uplo, int n, int nrhs, float *a, int *ipiv, float *b, int ldb, int *info); -extern void sstebz(char range, char order, int n, float vl, float vu, int il, int iu, float abstol, float *d, float *e, int *m, int *nsplit, float *w, int *iblock, int *isplit, int *info); -extern void sstedc(char compz, int n, float *d, float *e, float *z, int ldz, int *info); -extern void sstegr(char jobz, char range, int n, float *d, float *e, float vl, float vu, int il, int iu, float abstol, int *m, float *w, float *z, int ldz, int *isuppz, int *info); -extern void sstein(int n, float *d, float *e, int m, float *w, int *iblock, int *isplit, float *z, int ldz, int *ifail, int *info); -extern void ssteqr(char compz, int n, float *d, float *e, float *z, int ldz, int *info); -extern void ssterf(int n, float *d, float *e, int *info); -extern void sstev(char jobz, int n, float *diag, float *offd, float *z, int ldz, int *info); -extern void sstevd(char jobz, int n, float *d, float *e, float *z, int ldz, int *info); -extern void sstevr(char jobz, char range, int n, float *d, float *e, float vl, float vu, int il, int iu, float abstol, int *m, float *w, float *z, int ldz, int *isuppz, int *info); -extern void sstevx(char jobz, char range, int n, float *diag, float *offd, float vl, float vu, int il, int iu, float abtol, int *nfound, float *w, float *z, int ldz, int *ifail, int *info); -extern void ssycon(char uplo, int n, float *a, int lda, int *ipiv, float anorm, float *rcond, int *info); -extern void ssyev(char jobz, char uplo, int n, float *a, int lda, float *w, int *info); -extern void ssyevd(char jobz, char uplo, int n, float *a, int lda, float *w, int *info); -extern void ssyevr(char jobz, char range, char uplo, int n, float *a, int lda, float vl, float vu, int il, int iu, float abstol, int *m, float *w, float *z, int ldz, int *isuppz, int *info); -extern void ssyevx(char jobz, char range, char uplo, int n, float *a, int lda, float vl, float vu, int il, int iu, float abtol, int *nfound, float *w, float *z, int ldz, int *ifail, int *info); -extern void ssygst(int itype, char uplo, int n, float *a, int lda, float *b, int ldb, int *info); -extern void ssygv(int itype, char jobz, char uplo, int n, float *a, int lda, float *b, int ldb, float *w, int *info); -extern void ssygvd(int itype, char jobz, char uplo, int n, float *a, int lda, float *b, int ldb, float *w, int *info); -extern void ssygvx(int itype, char jobz, char range, char uplo, int n, float *a, int lda, float *b, int ldb, float vl, float vu, int il, int iu, float abstol, int *m, float *w, float *z, int ldz, int *ifail, int *info); -extern void ssyrfs(char uplo, int n, int nrhs, float *a, int lda, float *af, int ldaf, int *ipiv, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void ssysv(char uplo, int n, int nrhs, float *a, int lda, int *ipiv, float *b, int ldb, int *info); -extern void ssysvx(char fact, char uplo, int n, int nrhs, float *a, int lda, float *af, int ldaf, int *ipiv, float *b, int ldb, float *x, int ldx, float *rcond, float *ferr, float *berr, int *info); -extern void ssytrd(char uplo, int n, float *a, int lda, float *d, float *e, float *tau, int *info); -extern void ssytrf(char uplo, int n, float *a, int lda, int *ipiv, int *info); -extern void ssytri(char uplo, int n, float *a, int lda, int *ipiv, int *info); -extern void ssytrs(char uplo, int n, int nrhs, float *a, int lda, int *ipiv, float *b, int ldb, int *info); -extern void stbcon(char norm, char uplo, char diag, int n, int ndiag, float *a, int lda, float *rcond, int *info); -extern void stbrfs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, float *a, int lda, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void stbtrs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, float *a, int lda, float *b, int ldb, int *info); -extern void stgevc(char side, char howmny, int *select, int n, float *a, int lda, float *b, int ldb, float *vl, int ldvl, float *vr, int ldvr, int mm, int *m, int *info); -extern void stgexc(int wantq, int wantz, int n, float *a, int lda, float *b, int ldb, float *q, int ldq, float *z, int ldz, int *ifst, int *ilst, int *info); -extern void stgsen(int ijob, int wantq, int wantz, int *select, int n, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *q, int ldq, float *z, int ldz, int *m, float *pl, float *pr, float *dif, int *info); -extern void stgsja(char jobu, char jobv, char jobq, int m, int p, int n, int k, int l, float *a, int lda, float *b, int ldb, float tola, float tolb, float *alpha, float *beta, float *u, int ldu, float *v, int ldv, float *q, int ldq, int *ncycle, int *info); -extern void stgsna(char job, char howmnt, int *select, int n, float *a, int lda, float *b, int ldb, float *vl, int ldvl, float *vr, int ldvr, float *s, float *dif, int mm, int *m, int *info); -extern void stgsyl(char trans, int ijob, int m, int n, float *a, int lda, float *b, int ldb, float *c, int ldc, float *d, int ldd, float *e, int lde, float *f, int ldf, float *scale, float *dif, int *info); -extern void stpcon(char norm, char uplo, char diag, int n, float *a, float *rcond, int *info); -extern void stprfs(char uplo, char transa, char diag, int n, int nrhs, float *a, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void stptri(char uplo, char diag, int n, float *a, int *info); -extern void stptrs(char uplo, char transa, char diag, int n, int nrhs, float *a, float *b, int ldb, int *info); -extern void strcon(char norm, char uplo, char diag, int n, float *a, int lda, float *rcond, int *info); -extern void strevc(char side, char howmny, int *select, int n, float *t, int ldt, float *vl, int ldvl, float *vr, int ldvr, int mm, int *m, int *info); -extern void strexc(char compq, int n, float *t, int ldt, float *q, int ldq, int *ifst, int *ilst, int *info); -extern void strrfs(char uplo, char transa, char diag, int n, int nrhs, float *a, int lda, float *b, int ldb, float *x, int ldx, float *ferr, float *berr, int *info); -extern void strsen(char job, char compq, int *select, int n, float *t, int ldt, float *q, int ldq, float *wr, float *wi, int *m, float *s, float *sep, int *info); -extern void strsna(char job, char howmny, int *select, int n, float *t, int ldt, float *vl, int ldvl, float *vr, int ldvr, float *s, float *sep, int mm, int *m, int *info); -extern void strsyl(char trana, char tranb, int isgn, int m, int n, float *a, int lda, float *b, int ldb, float *c, int ldc, float *scale, int *info); -extern void strtri(char uplo, char diag, int n, float *a, int lda, int *info); -extern void strtrs(char uplo, char transa, char diag, int n, int nrhs, float *a, int lda, float *b, int ldb, int *info); -extern void stzrqf(int m, int n, float *a, int lda, float *tau, int *info); -extern void stzrzf(int m, int n, float *a, int lda, float *tau, int *info); -extern void zbdsqr(char uplo, int n, int ncvt, int nru, int ncc, double *d, double *e, doublecomplex *vt, int ldvt, doublecomplex *u, int ldu, doublecomplex *c, int ldc, int *info); -extern void zgbbrd(char vect, int m, int n, int ncc, int kl, int ku, doublecomplex *ab, int ldab, double *d, double *e, doublecomplex *q, int ldq, doublecomplex *pt, int ldpt, doublecomplex *c, int ldc, int *info); -extern void zgbcon(char norm, int n, int nsub, int nsuper, doublecomplex *a, int lda, int *ipiv, double anorm, double *rcond, int *info); -extern void zgbequ(int m, int n, int nsub, int nsuper, doublecomplex *a, int lda, double *rowsc, double *colsc, double *rowcn, double *colcn, double *amax, int *info); -extern void zgbrfs(char transa, int n, int nsub, int nsuper, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zgbsv(int n, int nsub, int nsuper, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); - -/* N.B. In this C interface to zgbsvx, rpvgrw returns what is returned in - the first element of RWORK by the FORTRAN interface */ -extern void zgbsvx(char fact, char transa, int n, int nsub, int nsuper, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, char equed, double *rowsc, double *colsc, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, double *rpvgrw, int *info); - -extern void zgbtrf(int m, int n, int nsub, int nsuper, doublecomplex *a, int lda, int *ipiv, int *info); -extern void zgbtrs(char transa, int n, int nsub, int nsuper, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zgebak(char job, char side, int n, int ilo, int ihi, double *scale, int m, doublecomplex *v, int ldv, int *info); -extern void zgebal(char job, int n, doublecomplex *a, int lda, int *ilo, int *ihi, double *scale, int *info); -extern void zgebrd(int m, int n, doublecomplex *a, int lda, double *d, double *e, doublecomplex *tauq, doublecomplex *taup, int *info); -extern void zgecon(char norm, int n, doublecomplex *a, int lda, double anorm, double *rcond, int *info); -extern void zgeequ(int m, int n, doublecomplex *a, int lda, double *rowsc, double *colsc, double *rowcn, double *colcn, double *amax, int *info); -extern void zgees(char jobvs, char sort, ACML_ZGEES_SELECT select, int n, doublecomplex *a, int lda, int *sdim, doublecomplex *w, doublecomplex *vs, int ldvs, int *info); -extern void zgeesx(char jobvs, char sort, ACML_ZGEESX_SELECT select, char sense, int n, doublecomplex *a, int lda, int *sdim, doublecomplex *w, doublecomplex *vs, int ldvs, double *rconde, double *rcondv, int *info); -extern void zgeev(char jobvl, char jobvr, int n, doublecomplex *a, int lda, doublecomplex *w, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int *info); -extern void zgeevx(char balanc, char jobvl, char jobvr, char sense, int n, doublecomplex *a, int lda, doublecomplex *w, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, int *info); -extern void zgegs(char jobvsl, char jobvsr, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, int ldvsl, doublecomplex *vsr, int ldvsr, int *info); -extern void zgegv(char jobvl, char jobvr, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int *info); -extern void zgehrd(int n, int ilo, int ihi, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zgelqf(int m, int n, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zgels(char trans, int m, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void zgelsd(int m, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, double *s, double rcond, int *rank, int *info); -extern void zgelss(int m, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, double *sing, double rcond, int *irank, int *info); -extern void zgelsx(int m, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *jpivot, double rcond, int *irank, int *info); -extern void zgelsy(int m, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *jpvt, double rcond, int *rank, int *info); -extern void zgeqlf(int m, int n, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zgeqp3(int m, int n, doublecomplex *a, int lda, int *jpvt, doublecomplex *tau, int *info); -extern void zgeqpf(int m, int n, doublecomplex *a, int lda, int *jpvt, doublecomplex *tau, int *info); -extern void zgeqrf(int m, int n, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zgerfs(char transa, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zgerqf(int m, int n, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zgesdd(char jobz, int m, int n, doublecomplex *a, int lda, double *s, doublecomplex *u, int ldu, doublecomplex *vt, int ldvt, int *info); -extern void zgesv(int n, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zgesvd(char jobu, char jobvt, int m, int n, doublecomplex *a, int lda, double *sing, doublecomplex *u, int ldu, doublecomplex *vt, int ldvt, int *info); - -/* N.B. In this C interface to zgesvx, rpvgrw returns what is returned in - the first element of RWORK by the FORTRAN interface */ -extern void zgesvx(char fact, char transa, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, char equed, double *rowsc, double *colsc, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, double *rpvgrw, int *info); - -extern void zgetrf(int m, int n, doublecomplex *a, int lda, int *ipiv, int *info); -extern void zgetri(int n, doublecomplex *a, int lda, int *ipiv, int *info); -extern void zgetrs(char transa, int n, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zggbak(char job, char side, int n, int ilo, int ihi, double *lscale, double *rscale, int m, doublecomplex *v, int ldv, int *info); -extern void zggbal(char job, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *ilo, int *ihi, double *lscale, double *rscale, int *info); -extern void zgges(char jobvsl, char jobvsr, char sort, ACML_ZGGES_DELCTG delctg, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *sdim, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, int ldvsl, doublecomplex *vsr, int ldvsr, int *info); -extern void zggesx(char jobvsl, char jobvsr, char sort, ACML_ZGGESX_DELCTG delctg, char sense, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *sdim, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, int ldvsl, doublecomplex *vsr, int ldvsr, double *rconde, double *rcondv, int *info); -extern void zggev(char jobvl, char jobvr, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int *info); -extern void zggevx(char balanc, char jobvl, char jobvr, char sense, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, int *info); -extern void zggglm(int n, int m, int p, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *d, doublecomplex *x, doublecomplex *y, int *info); -extern void zgghrd(char compq, char compz, int n, int ilo, int ihi, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *q, int ldq, doublecomplex *z, int ldz, int *info); -extern void zgglse(int m, int n, int p, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *c, doublecomplex *d, doublecomplex *x, int *info); -extern void zggqrf(int n, int m, int p, doublecomplex *a, int lda, doublecomplex *taua, doublecomplex *b, int ldb, doublecomplex *taub, int *info); -extern void zggrqf(int m, int p, int n, doublecomplex *a, int lda, doublecomplex *taua, doublecomplex *b, int ldb, doublecomplex *taub, int *info); -extern void zggsvd(char jobu, char jobv, char jobq, int m, int n, int p, int *k, int *l, doublecomplex *a, int lda, doublecomplex *b, int ldb, double *alpha, double *beta, doublecomplex *u, int ldu, doublecomplex *v, int ldv, doublecomplex *q, int ldq, int *iwork3, int *info); -extern void zggsvp(char jobu, char jobv, char jobq, int m, int p, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, double tola, double tolb, int *k, int *l, doublecomplex *u, int ldu, doublecomplex *v, int ldv, doublecomplex *q, int ldq, int *info); -extern void zgtcon(char norm, int n, doublecomplex *low, doublecomplex *diag, doublecomplex *up1, doublecomplex *up2, int *ipiv, double anorm, double *rcond, int *info); -extern void zgtrfs(char transa, int n, int nrhs, doublecomplex *low, doublecomplex *diag, doublecomplex *up, doublecomplex *lowf, doublecomplex *diagf, doublecomplex *upf1, doublecomplex *upf2, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zgtsv(int n, int nrhs, doublecomplex *low, doublecomplex *diag, doublecomplex *up, doublecomplex *b, int ldb, int *info); -extern void zgtsvx(char fact, char transa, int n, int nrhs, doublecomplex *low, doublecomplex *diag, doublecomplex *up, doublecomplex *lowf, doublecomplex *diagf, doublecomplex *upf1, doublecomplex *upf2, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zgttrf(int n, doublecomplex *low, doublecomplex *diag, doublecomplex *up1, doublecomplex *up2, int *ipiv, int *info); -extern void zgttrs(char transa, int n, int nrhs, doublecomplex *low, doublecomplex *diag, doublecomplex *up1, doublecomplex *up2, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zhbev(char jobz, char uplo, int n, int ndiag, doublecomplex *a, int lda, double *w, doublecomplex *z, int ldz, int *info); -extern void zhbevd(char jobz, char uplo, int n, int kd, doublecomplex *ab, int ldab, double *w, doublecomplex *z, int ldz, int *info); -extern void zhbevx(char jobz, char range, char uplo, int n, int ndiag, doublecomplex *a, int lda, doublecomplex *q, int ldq, double vl, double vu, int il, int iu, double abtol, int *nfound, double *w, doublecomplex *z, int ldz, int *ifail, int *info); -extern void zhbgst(char vect, char uplo, int n, int ka, int kb, doublecomplex *ab, int ldab, doublecomplex *bb, int ldbb, doublecomplex *x, int ldx, int *info); -extern void zhbgv(char jobz, char uplo, int n, int ka, int kb, doublecomplex *ab, int ldab, doublecomplex *bb, int ldbb, double *w, doublecomplex *z, int ldz, int *info); -extern void zhbgvd(char jobz, char uplo, int n, int ka, int kb, doublecomplex *ab, int ldab, doublecomplex *bb, int ldbb, double *w, doublecomplex *z, int ldz, int *info); -extern void zhbgvx(char jobz, char range, char uplo, int n, int ka, int kb, doublecomplex *ab, int ldab, doublecomplex *bb, int ldbb, doublecomplex *q, int ldq, double vl, double vu, int il, int iu, double abstol, int *m, double *w, doublecomplex *z, int ldz, int *ifail, int *info); -extern void zhbtrd(char vect, char uplo, int n, int kd, doublecomplex *ab, int ldab, double *d, double *e, doublecomplex *q, int ldq, int *info); -extern void zhecon(char uplo, int n, doublecomplex *a, int lda, int *ipiv, double anorm, double *rcond, int *info); -extern void zheev(char jobz, char uplo, int n, doublecomplex *a, int lda, double *w, int *info); -extern void zheevd(char jobz, char uplo, int n, doublecomplex *a, int lda, double *w, int *info); -extern void zheevr(char jobz, char range, char uplo, int n, doublecomplex *a, int lda, double vl, double vu, int il, int iu, double abstol, int *m, double *w, doublecomplex *z, int ldz, int *isuppz, int *info); -extern void zheevx(char jobz, char range, char uplo, int n, doublecomplex *a, int lda, double vl, double vu, int il, int iu, double abtol, int *nfound, double *w, doublecomplex *z, int ldz, int *ifail, int *info); -extern void zhegst(int itype, char uplo, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void zhegv(int itype, char jobz, char uplo, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, double *w, int *info); -extern void zhegvd(int itype, char jobz, char uplo, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, double *w, int *info); -extern void zhegvx(int itype, char jobz, char range, char uplo, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, double vl, double vu, int il, int iu, double abstol, int *m, double *w, doublecomplex *z, int ldz, int *ifail, int *info); -extern void zherfs(char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zhesv(char uplo, int n, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zhesvx(char fact, char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zhetrd(char uplo, int n, doublecomplex *a, int lda, double *d, double *e, doublecomplex *tau, int *info); -extern void zhetrf(char uplo, int n, doublecomplex *a, int lda, int *ipiv, int *info); -extern void zhetri(char uplo, int n, doublecomplex *a, int lda, int *ipiv, int *info); -extern void zhetrs(char uplo, int n, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zhgeqz(char job, char compq, char compz, int n, int ilo, int ihi, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *q, int ldq, doublecomplex *z, int ldz, int *info); -extern void zhpcon(char uplo, int n, doublecomplex *a, int *ipiv, double anorm, double *rcond, int *info); -extern void zhpev(char jobz, char uplo, int n, doublecomplex *a, double *w, doublecomplex *z, int ldz, int *info); -extern void zhpevd(char jobz, char uplo, int n, doublecomplex *ap, double *w, doublecomplex *z, int ldz, int *info); -extern void zhpevx(char jobz, char range, char uplo, int n, doublecomplex *a, double vl, double vu, int il, int iu, double abtol, int *nfound, double *w, doublecomplex *z, int ldz, int *ifail, int *info); -extern void zhpgst(int itype, char uplo, int n, doublecomplex *ap, doublecomplex *bp, int *info); -extern void zhpgv(int itype, char jobz, char uplo, int n, doublecomplex *a, doublecomplex *b, double *w, doublecomplex *z, int ldz, int *info); -extern void zhpgvd(int itype, char jobz, char uplo, int n, doublecomplex *ap, doublecomplex *bp, double *w, doublecomplex *z, int ldz, int *info); -extern void zhpgvx(int itype, char jobz, char range, char uplo, int n, doublecomplex *ap, doublecomplex *bp, double vl, double vu, int il, int iu, double abstol, int *m, double *w, doublecomplex *z, int ldz, int *ifail, int *info); -extern void zhprfs(char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *af, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zhpsv(char uplo, int n, int nrhs, doublecomplex *a, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zhpsvx(char fact, char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *af, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zhptrd(char uplo, int n, doublecomplex *ap, double *d, double *e, doublecomplex *tau, int *info); -extern void zhptrf(char uplo, int n, doublecomplex *a, int *ipiv, int *info); -extern void zhptri(char uplo, int n, doublecomplex *a, int *ipiv, int *info); -extern void zhptrs(char uplo, int n, int nrhs, doublecomplex *a, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zhsein(char side, char eigsrc, char initv, int *select, int n, doublecomplex *h, int ldh, doublecomplex *w, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int mm, int *m, int *ifaill, int *ifailr, int *info); -extern void zhseqr(char job, char compz, int n, int ilo, int ihi, doublecomplex *h, int ldh, doublecomplex *w, doublecomplex *z, int ldz, int *info); -extern void zpbcon(char uplo, int n, int ndiag, doublecomplex *a, int lda, double anorm, double *rcond, int *info); -extern void zpbequ(char uplo, int n, int ndiag, doublecomplex *a, int lda, double *scale, double *scond, double *amax, int *info); -extern void zpbrfs(char uplo, int n, int ndiag, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zpbstf(char uplo, int n, int kd, doublecomplex *ab, int ldab, int *info); -extern void zpbsv(char uplo, int n, int ndiag, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void zpbsvx(char fact, char uplo, int n, int ndiag, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, char equed, double *scale, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zpbtrf(char uplo, int n, int ndiag, doublecomplex *a, int lda, int *info); -extern void zpbtrs(char uplo, int n, int ndiag, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void zpocon(char uplo, int n, doublecomplex *a, int lda, double anorm, double *rcond, int *info); -extern void zpoequ(int n, doublecomplex *a, int lda, double *scale, double *scond, double *amax, int *info); -extern void zporfs(char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zposv(char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void zposvx(char fact, char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, char equed, double *scale, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zpotrf(char uplo, int n, doublecomplex *a, int lda, int *info); -extern void zpotri(char uplo, int n, doublecomplex *a, int lda, int *info); -extern void zpotrs(char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void zppcon(char uplo, int n, doublecomplex *a, double anorm, double *rcond, int *info); -extern void zppequ(char uplo, int n, doublecomplex *a, double *scale, double *scond, double *amax, int *info); -extern void zpprfs(char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *af, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zppsv(char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *b, int ldb, int *info); -extern void zppsvx(char fact, char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *af, char equed, double *scale, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zpptrf(char uplo, int n, doublecomplex *a, int *info); -extern void zpptri(char uplo, int n, doublecomplex *a, int *info); -extern void zpptrs(char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *b, int ldb, int *info); -extern void zptcon(int n, double *diag, doublecomplex *offd, double anorm, double *rcond, int *info); -extern void zpteqr(char compz, int n, double *d, double *e, doublecomplex *z, int ldz, int *info); -extern void zptrfs(char uplo, int n, int nrhs, double *diag, doublecomplex *offd, double *diagf, doublecomplex *offdf, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zptsv(int n, int nrhs, double *diag, doublecomplex *sub, doublecomplex *b, int ldb, int *info); -extern void zptsvx(char fact, int n, int nrhs, double *diag, doublecomplex *sub, double *diagf, doublecomplex *subf, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zpttrf(int n, double *diag, doublecomplex *offd, int *info); -extern void zpttrs(char uplo, int n, int nrhs, double *diag, doublecomplex *offd, doublecomplex *b, int ldb, int *info); -extern void zspcon(char uplo, int n, doublecomplex *a, int *ipiv, double anorm, double *rcond, int *info); -extern void zsprfs(char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *af, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zspsv(char uplo, int n, int nrhs, doublecomplex *a, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zspsvx(char fact, char uplo, int n, int nrhs, doublecomplex *a, doublecomplex *af, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zsptrf(char uplo, int n, doublecomplex *a, int *ipiv, int *info); -extern void zsptri(char uplo, int n, doublecomplex *a, int *ipiv, int *info); -extern void zsptrs(char uplo, int n, int nrhs, doublecomplex *a, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zstedc(char compz, int n, double *d, double *e, doublecomplex *z, int ldz, int *info); -extern void zstegr(char jobz, char range, int n, double *d, double *e, double vl, double vu, int il, int iu, double abstol, int *m, double *w, doublecomplex *z, int ldz, int *isuppz, int *info); -extern void zstein(int n, double *d, double *e, int m, double *w, int *iblock, int *isplit, doublecomplex *z, int ldz, int *ifail, int *info); -extern void zsteqr(char compz, int n, double *d, double *e, doublecomplex *z, int ldz, int *info); -extern void zsycon(char uplo, int n, doublecomplex *a, int lda, int *ipiv, double anorm, double *rcond, int *info); -extern void zsyrfs(char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void zsysv(char uplo, int n, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void zsysvx(char fact, char uplo, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *af, int ldaf, int *ipiv, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *rcond, double *ferr, double *berr, int *info); -extern void zsytrf(char uplo, int n, doublecomplex *a, int lda, int *ipiv, int *info); -extern void zsytri(char uplo, int n, doublecomplex *a, int lda, int *ipiv, int *info); -extern void zsytrs(char uplo, int n, int nrhs, doublecomplex *a, int lda, int *ipiv, doublecomplex *b, int ldb, int *info); -extern void ztbcon(char norm, char uplo, char diag, int n, int ndiag, doublecomplex *a, int lda, double *rcond, int *info); -extern void ztbrfs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void ztbtrs(char uplo, char transa, char diag, int n, int ndiag, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void ztgevc(char side, char howmny, int *select, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int mm, int *m, int *info); -extern void ztgexc(int wantq, int wantz, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *q, int ldq, doublecomplex *z, int ldz, int *ifst, int *ilst, int *info); -extern void ztgsen(int ijob, int wantq, int wantz, int *select, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *q, int ldq, doublecomplex *z, int ldz, int *m, double *pl, double *pr, double *dif, int *info); -extern void ztgsja(char jobu, char jobv, char jobq, int m, int p, int n, int k, int l, doublecomplex *a, int lda, doublecomplex *b, int ldb, double tola, double tolb, double *alpha, double *beta, doublecomplex *u, int ldu, doublecomplex *v, int ldv, doublecomplex *q, int ldq, int *ncycle, int *info); -extern void ztgsna(char job, char howmnt, int *select, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, double *s, double *dif, int mm, int *m, int *info); -extern void ztgsyl(char trans, int ijob, int m, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *c, int ldc, doublecomplex *d, int ldd, doublecomplex *e, int lde, doublecomplex *f, int ldf, double *scale, double *dif, int *info); -extern void ztpcon(char norm, char uplo, char diag, int n, doublecomplex *a, double *rcond, int *info); -extern void ztprfs(char uplo, char transa, char diag, int n, int nrhs, doublecomplex *a, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void ztptri(char uplo, char diag, int n, doublecomplex *a, int *info); -extern void ztptrs(char uplo, char transa, char diag, int n, int nrhs, doublecomplex *a, doublecomplex *b, int ldb, int *info); -extern void ztrcon(char norm, char uplo, char diag, int n, doublecomplex *a, int lda, double *rcond, int *info); -extern void ztrevc(char side, char howmny, int *select, int n, doublecomplex *t, int ldt, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, int mm, int *m, int *info); -extern void ztrexc(char compq, int n, doublecomplex *t, int ldt, doublecomplex *q, int ldq, int ifst, int ilst, int *info); -extern void ztrrfs(char uplo, char transa, char diag, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *x, int ldx, double *ferr, double *berr, int *info); -extern void ztrsen(char job, char compq, int *select, int n, doublecomplex *t, int ldt, doublecomplex *q, int ldq, doublecomplex *w, int *m, double *s, double *sep, int *info); -extern void ztrsna(char job, char howmny, int *select, int n, doublecomplex *t, int ldt, doublecomplex *vl, int ldvl, doublecomplex *vr, int ldvr, double *s, double *sep, int mm, int *m, int *info); -extern void ztrsyl(char trana, char tranb, int isgn, int m, int n, doublecomplex *a, int lda, doublecomplex *b, int ldb, doublecomplex *c, int ldc, double *scale, int *info); -extern void ztrtri(char uplo, char diag, int n, doublecomplex *a, int lda, int *info); -extern void ztrtrs(char uplo, char transa, char diag, int n, int nrhs, doublecomplex *a, int lda, doublecomplex *b, int ldb, int *info); -extern void ztzrqf(int m, int n, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void ztzrzf(int m, int n, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zungbr(char vect, int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zunghr(int n, int ilo, int ihi, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zunglq(int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zungql(int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zungqr(int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zungrq(int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zungtr(char uplo, int n, doublecomplex *a, int lda, doublecomplex *tau, int *info); -extern void zunmbr(char vect, char side, char trans, int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zunmhr(char side, char trans, int m, int n, int ilo, int ihi, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zunmlq(char side, char trans, int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zunmql(char side, char trans, int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zunmqr(char side, char trans, int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zunmrq(char side, char trans, int m, int n, int k, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zunmrz(char side, char trans, int m, int n, int k, int l, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zunmtr(char side, char uplo, char trans, int m, int n, doublecomplex *a, int lda, doublecomplex *tau, doublecomplex *c, int ldc, int *info); -extern void zupgtr(char uplo, int n, doublecomplex *ap, doublecomplex *tau, doublecomplex *q, int ldq, int *info); -extern void zupmtr(char side, char uplo, char trans, int m, int n, doublecomplex *ap, doublecomplex *tau, doublecomplex *c, int ldc, int *info); - -/* FFT C interfaces */ -extern void cfft1d(int mode, int n, complex *x, complex *comm, int *info); -extern void cfft1dx(int mode, float scale, int inpl, int n, complex *x, int incx, complex *y, int incy, complex *comm, int *info); -extern void cfft1m(int mode, int nseq, int n, complex *x, complex *comm, int *info); -extern void cfft1mx(int mode, float scale, int inpl, int nseq, int n, complex *x, int incx1, int incx2, complex *y, int incy1, int incy2, complex *comm, int *info); -extern void cfft2d(int mode, int m, int n, complex *x, complex *comm, int *info); -extern void cfft2dx(int mode, float scale, int ltrans, int inpl, int m, int n, complex *x, int incx1, int incx2, complex *y, int incy1, int incy2, complex *comm, int *info); -extern void cfft3d(int mode, int l, int m, int n, complex *x, complex *comm, int *info); -extern void cfft3dx(int mode, float scale, int ltrans, int inpl, int l, int m, int n, complex *x, complex *y, complex *comm, int *info); -extern void cfft3dy(int mode, float scale, int inpl, int l, int m, int n, complex *x, int incx1, int incx2, int incx3, complex *y, int incy1, int incy2, int incy3, complex *comm, int lcomm, int *info); -extern void csfft(int mode, int n, float *x, float *comm, int *info); -extern void csfftm(int nseq, int n, float *x, float *comm, int *info); -extern void dzfft(int mode, int n, double *x, double *comm, int *info); -extern void dzfftm(int nseq, int n, double *x, double *comm, int *info); -extern void scfft(int mode, int n, float *x, float *comm, int *info); -extern void scfftm(int nseq, int n, float *x, float *comm, int *info); -extern void zdfft(int mode, int n, double *x, double *comm, int *info); -extern void zdfftm(int nseq, int n, double *x, double *comm, int *info); -extern void zfft1d(int mode, int n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft1dx(int mode, double scale, int inpl, int n, doublecomplex *x, int incx, doublecomplex *y, int incy, doublecomplex *comm, int *info); -extern void zfft1m(int mode, int nseq, int n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft1mx(int mode, double scale, int inpl, int nseq, int n, doublecomplex *x, int incx1, int incx2, doublecomplex *y, int incy1, int incy2, doublecomplex *comm, int *info); -extern void zfft2d(int mode, int m, int n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft2dx(int mode, double scale, int ltrans, int inpl, int m, int n, doublecomplex *x, int incx1, int incx2, doublecomplex *y, int incy1, int incy2, doublecomplex *comm, int *info); -extern void zfft3d(int mode, int l, int m, int n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft3dx(int mode, double scale, int ltrans, int inpl, int l, int m, int n, doublecomplex *x, doublecomplex *y, doublecomplex *comm, int *info); -extern void zfft3dy(int mode, double scale, int inpl, int l, int m, int n, doublecomplex *x, int incx1, int incx2, int incx3, doublecomplex *y, int incy1, int incy2, int incy3, doublecomplex *comm, int lcomm, int *info); - -/* Sparse BLAS interfaces */ -extern void caxpyi(int nz, complex a, complex *x, int *indx, complex *y); -extern complex cdotci(int nz, complex *x, int *indx, complex *y); -extern complex cdotui(int nz, complex *x, int *indx, complex *y); -extern void cgthr(int nz, complex *y, complex *x, int *indx); -extern void cgthrz(int nz, complex *y, complex *x, int *indx); -extern void csctr(int nz, complex *x, int *indx, complex *y); -extern void daxpyi(int nz, double a, double *x, int *indx, double *y); -extern double ddoti(int nz, double *x, int *indx, double *y); -extern void dgthr(int nz, double *y, double *x, int *indx); -extern void dgthrz(int nz, double *y, double *x, int *indx); -extern void droti(int nz, double *x, int *indx, double *y, double c, double s); -extern void dsctr(int nz, double *x, int *indx, double *y); -extern void saxpyi(int nz, float a, float *x, int *indx, float *y); -extern float sdoti(int nz, float *x, int *indx, float *y); -extern void sgthr(int nz, float *y, float *x, int *indx); -extern void sgthrz(int nz, float *y, float *x, int *indx); -extern void sroti(int nz, float *x, int *indx, float *y, float c, float s); -extern void ssctr(int nz, float *x, int *indx, float *y); -extern void zaxpyi(int nz, doublecomplex a, doublecomplex *x, int *indx, doublecomplex *y); -extern doublecomplex zdotci(int nz, doublecomplex *x, int *indx, doublecomplex *y); -extern doublecomplex zdotui(int nz, doublecomplex *x, int *indx, doublecomplex *y); -extern void zgthr(int nz, doublecomplex *y, doublecomplex *x, int *indx); -extern void zgthrz(int nz, doublecomplex *y, doublecomplex *x, int *indx); -extern void zsctr(int nz, doublecomplex *x, int *indx, doublecomplex *y); - -/* Random number generators */ -extern void drandbeta(int n, double a, double b, int *state, double *x, int *info); -extern void drandbinomial(int n, int m, double p, int *state, int *x, int *info); -extern void drandbinomialreference(int m, double p, double *ref, int *lref, int *info); -extern void drandblumblumshub(int n, int *state, double *x, int *info); -extern void drandcauchy(int n, double a, double b, int *state, double *x, int *info); -extern void drandchisquared(int n, int df, int *state, double *x, int *info); -extern void dranddiscreteuniform(int n, int a, int b, int *state, int *x, int *info); -extern void drandexponential(int n, double a, int *state, double *x, int *info); -extern void drandf(int n, int df1, int df2, int *state, double *x, int *info); -extern void drandgamma(int n, double a, double b, int *state, double *x, int *info); -extern void drandgaussian(int n, double xmu, double var, int *state, double *x, int *info); -extern void drandgeneraldiscrete(int n, double *ref, int *state, int *x, int *info); -extern void drandgeometric(int n, double p, int *state, int *x, int *info); -extern void drandgeometricreference(double p, double *ref, int *lref, int *info); -extern void drandhypergeometric(int n, int np, int ns, int m, int *state, int *x, int *info); -extern void drandhypergeometricreference(int np, int ns, int m, double *ref, int *lref, int *info); -extern void drandinitialize(int genid, int subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void drandinitializebbs(int nbits, int lp, int *p, int lq, int *q, int ls, int *s, int *state, int *lstate, int *info); -extern void drandinitializeuser(ACML_DRANDINITIALIZEUSER_UINI uini, ACML_DRANDINITIALIZEUSER_UGEN ugen, int genid, int subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void drandleapfrog(int n, int k, int *state, int *info); -extern void drandlogistic(int n, double a, double b, int *state, double *x, int *info); -extern void drandlognormal(int n, double xmu, double var, int *state, double *x, int *info); -extern void drandmultinomial(int n, int m, double *p, int k, int *state, int *x, int ldx, int *info); -extern void drandmultinormalreference(int m, double *xmu, double *c, int ldc, double *ref, int *lref, int *info); -extern void drandmultinormalr(int n, double *ref, int *state, double *x, int ldx, int *info); -extern void drandmultistudentstreference(int m, int df, double *xmu, double *c, int ldc, double *ref, int *lref, int *info); -extern void drandmultistudentstr(int n, double *ref, int *state, double *x, int ldx, int *info); -extern void drandnegativebinomial(int n, int m, double p, int *state, int *x, int *info); -extern void drandnegativebinomialreference(int m, double p, double *ref, int *lref, int *info); -extern void drandpoisson(int n, double lambda, int *state, int *x, int *info); -extern void drandpoissonreference(double lambda, double *ref, int *lref, int *info); -extern void drandskipahead(int n, int *state, int *info); -extern void drandstudentst(int n, int df, int *state, double *x, int *info); -extern void drandtriangular(int n, double xmin, double xmed, double xmax, int *state, double *x, int *info); -extern void dranduniform(int n, double a, double b, int *state, double *x, int *info); -extern void drandvonmises(int n, double vk, int *state, double *x, int *info); -extern void drandweibull(int n, double a, double b, int *state, double *x, int *info); -extern void drandmultinormal(int n, int m, double *xmu, double *c, int ldc, int *state, double *x, int ldx, int *info); -extern void drandmultistudentst(int n, int m, int df, double *xmu, double *c, int ldc, int *state, double *x, int ldx, int *info); -extern void srandbeta(int n, float a, float b, int *state, float *x, int *info); -extern void srandblumblumshub(int n, int *state, float *x, int *info); -extern void srandbinomial(int n, int m, float p, int *state, int *x, int *info); -extern void srandbinomialreference(int m, float p, float *ref, int *lref, int *info); -extern void srandcauchy(int n, float a, float b, int *state, float *x, int *info); -extern void srandchisquared(int n, int df, int *state, float *x, int *info); -extern void sranddiscreteuniform(int n, int a, int b, int *state, int *x, int *info); -extern void srandexponential(int n, float a, int *state, float *x, int *info); -extern void srandf(int n, int df1, int df2, int *state, float *x, int *info); -extern void srandgamma(int n, float a, float b, int *state, float *x, int *info); -extern void srandgaussian(int n, float xmu, float var, int *state, float *x, int *info); -extern void srandgeneraldiscrete(int n, float *ref, int *state, int *x, int *info); -extern void srandgeometric(int n, float p, int *state, int *x, int *info); -extern void srandgeometricreference(float p, float *ref, int *lref, int *info); -extern void srandhypergeometric(int n, int np, int ns, int m, int *state, int *x, int *info); -extern void srandhypergeometricreference(int np, int ns, int m, float *ref, int *lref, int *info); -extern void srandinitialize(int genid, int subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void srandinitializebbs(int nbits, int lp, int *p, int lq, int *q, int ls, int *s, int *state, int *lstate, int *info); -extern void srandinitializeuser(ACML_SRANDINITIALIZEUSER_UINI uini, ACML_SRANDINITIALIZEUSER_UGEN ugen, int genid, int subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void srandleapfrog(int n, int k, int *state, int *info); -extern void srandlogistic(int n, float a, float b, int *state, float *x, int *info); -extern void srandlognormal(int n, float xmu, float var, int *state, float *x, int *info); -extern void srandmultinomial(int n, int m, float *p, int k, int *state, int *x, int ldx, int *info); -extern void srandmultinormalreference(int m, float *xmu, float *c, int ldc, float *ref, int *lref, int *info); -extern void srandmultinormalr(int n, float *ref, int *state, float *x, int ldx, int *info); -extern void srandmultistudentstreference(int m, int df, float *xmu, float *c, int ldc, float *ref, int *lref, int *info); -extern void srandmultistudentstr(int n, float *ref, int *state, float *x, int ldx, int *info); -extern void srandnegativebinomial(int n, int m, float p, int *state, int *x, int *info); -extern void srandnegativebinomialreference(int m, float p, float *ref, int *lref, int *info); -extern void srandpoisson(int n, float lambda, int *state, int *x, int *info); -extern void srandpoissonreference(float lambda, float *ref, int *lref, int *info); -extern void srandskipahead(int n, int *state, int *info); -extern void srandstudentst(int n, int df, int *state, float *x, int *info); -extern void srandtriangular(int n, float xmin, float xmed, float xmax, int *state, float *x, int *info); -extern void sranduniform(int n, float a, float b, int *state, float *x, int *info); -extern void srandvonmises(int n, float vk, int *state, float *x, int *info); -extern void srandweibull(int n, float a, float b, int *state, float *x, int *info); -extern void srandmultinormal(int n, int m, float *xmu, float *c, int ldc, int *state, float *x, int ldx, int *info); -extern void srandmultistudentst(int n, int m, int df, float *xmu, float *c, int ldc, int *state, float *x, int ldx, int *info); - -/* ACML version information */ -extern void acmlversion(int *major, int *minor, int *patch); -extern void acmlinfo(void); - -/* OMP interfaces */ -extern int acmlgetmaxthreads(void); -extern int acmlgetnumthreads(void); -extern void acmlsetnumthreads(int numthreads); -extern int acmlgetnumprocs(void); - -/* Basic complex arithmetic routines for C */ -extern complex compose_complex(float x, float y); -extern float complex_real(complex z); -extern float complex_imag(complex z); -extern complex complex_negate(complex z); -extern complex complex_conjugate(complex z); -extern complex complex_add(complex z1, complex z2); -extern complex complex_subtract(complex z1, complex z2); -extern complex complex_multiply(complex z1, complex z2); -extern complex complex_divide(complex z1, complex z2); -extern int complex_equal(complex z1, complex z2); -extern int complex_notequal(complex z1, complex z2); -extern float complex_abs(complex z); - -extern doublecomplex compose_doublecomplex(double x, double y); -extern double doublecomplex_real(doublecomplex z); -extern double doublecomplex_imag(doublecomplex z); -extern doublecomplex doublecomplex_negate(doublecomplex z); -extern doublecomplex doublecomplex_conjugate(doublecomplex z); -extern doublecomplex doublecomplex_add(doublecomplex z1, doublecomplex z2); -extern doublecomplex doublecomplex_subtract(doublecomplex z1, doublecomplex z2); -extern doublecomplex doublecomplex_multiply(doublecomplex z1, doublecomplex z2); -extern doublecomplex doublecomplex_divide(doublecomplex z1, doublecomplex z2); -extern int doublecomplex_equal(doublecomplex z1, doublecomplex z2); -extern int doublecomplex_notequal(doublecomplex z1, doublecomplex z2); -extern double doublecomplex_abs(doublecomplex z); - -/* minmax utilities */ -extern int acml_imax2(int a, int b); -extern int acml_imin2(int a, int b); -extern int acml_imax3(int a, int b, int c); -extern int acml_imin3(int a, int b, int c); -extern float acml_fmax2(float a, float b); -extern float acml_fmin2(float a, float b); -extern float acml_fmax3(float a, float b, float c); -extern float acml_fmin3(float a, float b, float c); -extern double acml_dmax2(double a, double b); -extern double acml_dmin2(double a, double b); -extern double acml_dmax3(double a, double b, double c); -extern double acml_dmin3(double a, double b, double c); - -/* ------------------------------------------------------------------ */ -/* Below are prototypes for the FORTRAN interfaces to ACML routines */ - -/* - g77 promotes the return value of FORTRAN REAL functions to DOUBLE. - Other compilers do not. If linking against a g77-compiled version - of ACML, and calling such functions via their FORTRAN interface, - (e.g. sasum_) the C programmer needs to be aware of this. Calling - the C interface should always be safe. Functions affected in this - way are the ACML BLAS functions: - - sasum_ - scasum_ - scnrm2_ - sdot_ - sdoti_ - sdsdot_ - snrm2_ - - and the ACML LAPACK functions - - second_ - slamch_ - - In order to get the expected behaviour, the macro - FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE should be defined at the time - of compilation of your C program which includes acml.h if you intend - to call such a function from your C program and link to a g77-compiled - version of ACML. - - N.B. the GNU gfortran compiler does NOT promote REAL to DOUBLE - by default. Using the -ff2c flag with gfortran forces compatibility - with g77 in this respect. - */ -/* BLAS routines */ -extern void caxpy_(int *n, complex *alpha, complex *x, int *incx, complex *y, int *incy); -extern void ccopy_(int *n, complex *x, int *incx, complex *y, int *incy); -extern complex cdotc_(complex *ret_val, int *n, complex *x, int *incx, complex *y, int *incy); -extern void cdotcsub_(complex *ret_val, int *n, complex *x, int *incx, complex *y, int *incy); -extern complex cdotu_(complex *ret_val, int *n, complex *x, int *incx, complex *y, int *incy); -extern void cdotusub_(complex *ret_val, int *n, complex *x, int *incx, complex *y, int *incy); -extern void cgbmv_(char *trans, int *m, int *n, int *kl, int *ku, complex *alpha, complex *a, int *lda, complex *x, int *incx, complex *beta, complex *y, int *incy, int trans_len); -extern void cgemm_(char *transa, char *transb, int *m, int *n, int *k, complex *alpha, complex *a, int *lda, complex *b, int *ldb, complex *beta, complex *c, int *ldc, int transa_len, int transb_len); -extern void cgemv_(char *trans, int *m, int *n, complex *alpha, complex *a, int *lda, complex *x, int *incx, complex *beta, complex *y, int *incy, int trans_len); -extern void cgerc_(int *m, int *n, complex *alpha, complex *x, int *incx, complex *y, int *incy, complex *a, int *lda); -extern void cgeru_(int *m, int *n, complex *alpha, complex *x, int *incx, complex *y, int *incy, complex *a, int *lda); -extern void chbmv_(char *uplo, int *n, int *k, complex *alpha, complex *a, int *lda, complex *x, int *incx, complex *beta, complex *y, int *incy, int uplo_len); -extern void chemm_(char *side, char *uplo, int *m, int *n, complex *alpha, complex *a, int *lda, complex *b, int *ldb, complex *beta, complex *c, int *ldc, int side_len, int uplo_len); -extern void chemv_(char *uplo, int *n, complex *alpha, complex *a, int *lda, complex *x, int *incx, complex *beta, complex *y, int *incy, int uplo_len); -extern void cher_(char *uplo, int *n, float *alpha, complex *x, int *incx, complex *a, int *lda, int uplo_len); -extern void cher2_(char *uplo, int *n, complex *alpha, complex *x, int *incx, complex *y, int *incy, complex *a, int *lda, int uplo_len); -extern void cher2k_(char *uplo, char *trans, int *n, int *k, complex *alpha, complex *a, int *lda, complex *b, int *ldb, float *beta, complex *c, int *ldc, int uplo_len, int trans_len); -extern void cherk_(char *uplo, char *trans, int *n, int *k, float *alpha, complex *a, int *lda, float *beta, complex *c, int *ldc, int uplo_len, int trans_len); -extern void chpmv_(char *uplo, int *n, complex *alpha, complex *a, complex *x, int *incx, complex *beta, complex *y, int *incy, int uplo_len); -extern void chpr_(char *uplo, int *n, float *alpha, complex *x, int *incx, complex *a, int uplo_len); -extern void chpr2_(char *uplo, int *n, complex *alpha, complex *x, int *incx, complex *y, int *incy, complex *a, int uplo_len); -extern void crotg_(complex *a, complex *b, float *c, complex *s); -extern void cscal_(int *n, complex *alpha, complex *x, int *incx); -extern void csrot_(int *n, complex *x, int *incx, complex *y, int *incy, float *c, float *s); -extern void csscal_(int *n, float *alpha, complex *x, int *incx); -extern void cswap_(int *n, complex *x, int *incx, complex *y, int *incy); -extern void csymm_(char *side, char *uplo, int *m, int *n, complex *alpha, complex *a, int *lda, complex *b, int *ldb, complex *beta, complex *c, int *ldc, int side_len, int uplo_len); -extern void csyr2k_(char *uplo, char *trans, int *n, int *k, complex *alpha, complex *a, int *lda, complex *b, int *ldb, complex *beta, complex *c, int *ldc, int uplo_len, int trans_len); -extern void csyrk_(char *uplo, char *trans, int *n, int *k, complex *alpha, complex *a, int *lda, complex *beta, complex *c, int *ldc, int uplo_len, int trans_len); -extern void ctbmv_(char *uplo, char *trans, char *diag, int *n, int *k, complex *a, int *lda, complex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ctbsv_(char *uplo, char *trans, char *diag, int *n, int *k, complex *a, int *lda, complex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ctpmv_(char *uplo, char *trans, char *diag, int *n, complex *ap, complex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ctpsv_(char *uplo, char *trans, char *diag, int *n, complex *ap, complex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ctrmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, complex *alpha, complex *a, int *lda, complex *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void ctrmv_(char *uplo, char *trans, char *diag, int *n, complex *a, int *lda, complex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ctrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, complex *alpha, complex *a, int *lda, complex *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void ctrsv_(char *uplo, char *trans, char *diag, int *n, complex *a, int *lda, complex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern double dasum_(int *n, double *x, int *incx); -extern void daxpy_(int *n, double *alpha, double *x, int *incx, double *y, int *incy); -extern double dcabs1_(doublecomplex *z); -extern void dcopy_(int *n, double *x, int *incx, double *y, int *incy); -extern double ddot_(int *n, double *x, int *incx, double *y, int *incy); -extern void dgbmv_(char *trans, int *m, int *n, int *kl, int *ku, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy, int trans_len); -extern void dgemm_(char *transa, char *transb, int *m, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc, int transa_len, int transb_len); -extern void dgemv_(char *trans, int *m, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy, int trans_len); -extern void dger_(int *m, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda); -extern double dnrm2_(int *n, double *x, int *incx); -extern void drot_(int *n, double *x, int *incx, double *y, int *incy, double *c, double *s); -extern void drotg_(double *a, double *b, double *c, double *s); -extern void drotm_(int *n, double *x, int *incx, double *y, int *incy, double *param); -extern void drotmg_(double *d1, double *d2, double *b1, double *b2, double *param); -extern void dsbmv_(char *uplo, int *n, int *k, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy, int uplo_len); -extern void dscal_(int *n, double *alpha, double *x, int *incx); -extern double dsdot_(int *n, float *sx, int *incx, float *sy, int *incy); -extern void dspmv_(char *uplo, int *n, double *alpha, double *ap, double *x, int *incx, double *beta, double *y, int *incy, int uplo_len); -extern void dspr_(char *uplo, int *n, double *alpha, double *x, int *incx, double *ap, int uplo_len); -extern void dspr2_(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *ap, int uplo_len); -extern void dswap_(int *n, double *x, int *incx, double *y, int *incy); -extern void dsymm_(char *side, char *uplo, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc, int side_len, int uplo_len); -extern void dsymv_(char *uplo, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy, int uplo_len); -extern void dsyr_(char *uplo, int *n, double *alpha, double *x, int *incx, double *a, int *lda, int uplo_len); -extern void dsyr2_(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda, int uplo_len); -extern void dsyr2k_(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc, int uplo_len, int trans_len); -extern void dsyrk_(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *beta, double *c, int *ldc, int uplo_len, int trans_len); -extern void dtbmv_(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void dtbsv_(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void dtpmv_(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void dtpsv_(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void dtrmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void dtrmv_(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void dtrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void dtrsv_(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern double dzasum_(int *n, doublecomplex *x, int *incx); -extern double dznrm2_(int *n, doublecomplex *x, int *incx); -extern int icamax_(int *n, complex *x, int *incx); -extern int idamax_(int *n, double *x, int *incx); -extern int isamax_(int *n, float *x, int *incx); -extern int izamax_(int *n, doublecomplex *x, int *incx); -extern int lsame_(char *ca, char *cb, int ca_len, int cb_len); - -#ifdef FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE -extern double sasum_(int *n, float *x, int *incx); -#else -extern float sasum_(int *n, float *x, int *incx); -#endif - -extern void saxpy_(int *n, float *alpha, float *x, int *incx, float *y, int *incy); - -#ifdef FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE -extern double scasum_(int *n, complex *x, int *incx); -extern double scnrm2_(int *n, complex *x, int *incx); -#else -extern float scasum_(int *n, complex *x, int *incx); -extern float scnrm2_(int *n, complex *x, int *incx); -#endif - -extern void scopy_(int *n, float *x, int *incx, float *y, int *incy); - -#ifdef FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE -extern double sdot_(int *n, float *x, int *incx, float *y, int *incy); -extern double sdsdot_(int *n, float *b, float *x, int *incx, float *y, int *incy); -#else -extern float sdot_(int *n, float *x, int *incx, float *y, int *incy); -extern float sdsdot_(int *n, float *b, float *x, int *incx, float *y, int *incy); -#endif - -extern void sgbmv_(char *trans, int *m, int *n, int *kl, int *ku, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy, int trans_len); -extern void sgemm_(char *transa, char *transb, int *m, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc, int transa_len, int transb_len); -extern void sgemv_(char *trans, int *m, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy, int trans_len); -extern void sger_(int *m, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda); - -#ifdef FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE -extern double snrm2_(int *n, float *x, int *incx); -#else -extern float snrm2_(int *n, float *x, int *incx); -#endif - -extern void srot_(int *n, float *x, int *incx, float *y, int *incy, float *c, float *s); -extern void srotg_(float *a, float *b, float *c, float *s); -extern void srotm_(int *n, float *x, int *incx, float *y, int *incy, float *param); -extern void srotmg_(float *d1, float *d2, float *b1, float *b2, float *param); -extern void ssbmv_(char *uplo, int *n, int *k, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy, int uplo_len); -extern void sscal_(int *n, float *alpha, float *x, int *incx); -extern void sspmv_(char *uplo, int *n, float *alpha, float *ap, float *x, int *incx, float *beta, float *y, int *incy, int uplo_len); -extern void sspr_(char *uplo, int *n, float *alpha, float *x, int *incx, float *ap, int uplo_len); -extern void sspr2_(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *ap, int uplo_len); -extern void sswap_(int *n, float *x, int *incx, float *y, int *incy); -extern void ssymm_(char *side, char *uplo, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc, int side_len, int uplo_len); -extern void ssymv_(char *uplo, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy, int uplo_len); -extern void ssyr_(char *uplo, int *n, float *alpha, float *x, int *incx, float *a, int *lda, int uplo_len); -extern void ssyr2_(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda, int uplo_len); -extern void ssyr2k_(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc, int uplo_len, int trans_len); -extern void ssyrk_(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *beta, float *c, int *ldc, int uplo_len, int trans_len); -extern void stbmv_(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void stbsv_(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void stpmv_(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void stpsv_(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void strmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void strmv_(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void strsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void strsv_(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void xerbla_(const char *srname, int *info, int srname_len); -extern void zaxpy_(int *n, doublecomplex *alpha, doublecomplex *x, int *incx, doublecomplex *y, int *incy); -extern void zcopy_(int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy); -extern doublecomplex zdotc_(doublecomplex *ret_val, int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy); -extern void zdotcsub_(doublecomplex *ret_val, int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy); -extern doublecomplex zdotu_(doublecomplex *ret_val, int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy); -extern void zdotusub_(doublecomplex *ret_val, int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy); -extern void zdrot_(int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy, double *c, double *s); -extern void zdscal_(int *n, double *alpha, doublecomplex *x, int *incx); -extern void zgbmv_(char *trans, int *m, int *n, int *kl, int *ku, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *x, int *incx, doublecomplex *beta, doublecomplex *y, int *incy, int trans_len); -extern void zgemm_(char *transa, char *transb, int *m, int *n, int *k, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *beta, doublecomplex *c, int *ldc, int transa_len, int transb_len); -extern void zgemv_(char *trans, int *m, int *n, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *x, int *incx, doublecomplex *beta, doublecomplex *y, int *incy, int trans_len); -extern void zgerc_(int *m, int *n, doublecomplex *alpha, doublecomplex *x, int *incx, doublecomplex *y, int *incy, doublecomplex *a, int *lda); -extern void zgeru_(int *m, int *n, doublecomplex *alpha, doublecomplex *x, int *incx, doublecomplex *y, int *incy, doublecomplex *a, int *lda); -extern void zhbmv_(char *uplo, int *n, int *k, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *x, int *incx, doublecomplex *beta, doublecomplex *y, int *incy, int uplo_len); -extern void zhemm_(char *side, char *uplo, int *m, int *n, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *beta, doublecomplex *c, int *ldc, int side_len, int uplo_len); -extern void zhemv_(char *uplo, int *n, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *x, int *incx, doublecomplex *beta, doublecomplex *y, int *incy, int uplo_len); -extern void zher_(char *uplo, int *n, double *alpha, doublecomplex *x, int *incx, doublecomplex *a, int *lda, int uplo_len); -extern void zher2_(char *uplo, int *n, doublecomplex *alpha, doublecomplex *x, int *incx, doublecomplex *y, int *incy, doublecomplex *a, int *lda, int uplo_len); -extern void zher2k_(char *uplo, char *trans, int *n, int *k, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *beta, doublecomplex *c, int *ldc, int uplo_len, int trans_len); -extern void zherk_(char *uplo, char *trans, int *n, int *k, double *alpha, doublecomplex *a, int *lda, double *beta, doublecomplex *c, int *ldc, int uplo_len, int trans_len); -extern void zhpmv_(char *uplo, int *n, doublecomplex *alpha, doublecomplex *a, doublecomplex *x, int *incx, doublecomplex *beta, doublecomplex *y, int *incy, int uplo_len); -extern void zhpr_(char *uplo, int *n, double *alpha, doublecomplex *x, int *incx, doublecomplex *a, int uplo_len); -extern void zhpr2_(char *uplo, int *n, doublecomplex *alpha, doublecomplex *x, int *incx, doublecomplex *y, int *incy, doublecomplex *a, int uplo_len); -extern void zrotg_(doublecomplex *a, doublecomplex *b, double *c, doublecomplex *s); -extern void zscal_(int *n, doublecomplex *alpha, doublecomplex *x, int *incx); -extern void zswap_(int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy); -extern void zsymm_(char *side, char *uplo, int *m, int *n, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *beta, doublecomplex *c, int *ldc, int side_len, int uplo_len); -extern void zsyr2k_(char *uplo, char *trans, int *n, int *k, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *beta, doublecomplex *c, int *ldc, int uplo_len, int trans_len); -extern void zsyrk_(char *uplo, char *trans, int *n, int *k, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *beta, doublecomplex *c, int *ldc, int uplo_len, int trans_len); -extern void ztbmv_(char *uplo, char *trans, char *diag, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ztbsv_(char *uplo, char *trans, char *diag, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ztpmv_(char *uplo, char *trans, char *diag, int *n, doublecomplex *ap, doublecomplex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ztpsv_(char *uplo, char *trans, char *diag, int *n, doublecomplex *ap, doublecomplex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ztrmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void ztrmv_(char *uplo, char *trans, char *diag, int *n, doublecomplex *a, int *lda, doublecomplex *x, int *incx, int uplo_len, int trans_len, int diag_len); -extern void ztrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int side_len, int uplo_len, int transa_len, int diag_len); -extern void ztrsv_(char *uplo, char *trans, char *diag, int *n, doublecomplex *a, int *lda, doublecomplex *x, int *incx, int uplo_len, int trans_len, int diag_len); - -/* LAPACK routines */ -extern int ilaenv_(int *ispec, const char *name, const char *opts, int *n1, int *n2, int *n3, int *n4, int name_len, int opts_len); -extern void ilaenvset_(int *ispec, const char *name, const char *opts, int *n1, int *n2, int *n3, int *n4, int *nvalue, int *info, int name_len, int opts_len); -extern void cbdsqr_(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, complex *vt, int *ldvt, complex *u, int *ldu, complex *c, int *ldc, float *rwork, int *info, int uplo_len); -extern void cgbbrd_(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, complex *ab, int *ldab, float *d, float *e, complex *q, int *ldq, complex *pt, int *ldpt, complex *c, int *ldc, complex *work, float *rwork, int *info, int vect_len); -extern void cgbcon_(char *norm, int *n, int *kl, int *ku, complex *ab, int *ldab, int *ipiv, float *anorm, float *rcond, complex *work, float *rwork, int *info, int norm_len); -extern void cgbequ_(int *m, int *n, int *kl, int *ku, complex *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); -extern void cgbrfs_(char *trans, int *n, int *kl, int *ku, int *nrhs, complex *ab, int *ldab, complex *afb, int *ldafb, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int trans_len); -extern void cgbsv_(int *n, int *kl, int *ku, int *nrhs, complex *ab, int *ldab, int *ipiv, complex *b, int *ldb, int *info); -extern void cgbsvx_(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, complex *ab, int *ldab, complex *afb, int *ldafb, int *ipiv, char *equed, float *r, float *c, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int trans_len, int equed_len); -extern void cgbtrf_(int *m, int *n, int *kl, int *ku, complex *ab, int *ldab, int *ipiv, int *info); -extern void cgbtrs_(char *trans, int *n, int *kl, int *ku, int *nrhs, complex *ab, int *ldab, int *ipiv, complex *b, int *ldb, int *info, int trans_len); -extern void cgebak_(char *job, char *side, int *n, int *ilo, int *ihi, float *scale, int *m, complex *v, int *ldv, int *info, int job_len, int side_len); -extern void cgebal_(char *job, int *n, complex *a, int *lda, int *ilo, int *ihi, float *scale, int *info, int job_len); -extern void cgebrd_(int *m, int *n, complex *a, int *lda, float *d, float *e, complex *tauq, complex *taup, complex *work, int *lwork, int *info); -extern void cgecon_(char *norm, int *n, complex *a, int *lda, float *anorm, float *rcond, complex *work, float *rwork, int *info, int norm_len); -extern void cgeequ_(int *m, int *n, complex *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); -extern void cgees_(char *jobvs, char *sort, ACML_CGEES_SELECT select, int *n, complex *a, int *lda, int *sdim, complex *w, complex *vs, int *ldvs, complex *work, int *lwork, float *rwork, int *bwork, int *info, int jobvs_len, int sort_len); -extern void cgeesx_(char *jobvs, char *sort, ACML_CGEESX_SELECT select, char *sense, int *n, complex *a, int *lda, int *sdim, complex *w, complex *vs, int *ldvs, float *rconde, float *rcondv, complex *work, int *lwork, float *rwork, int *bwork, int *info, int jobvs_len, int sort_len, int sense_len); -extern void cgeev_(char *jobvl, char *jobvr, int *n, complex *a, int *lda, complex *w, complex *vl, int *ldvl, complex *vr, int *ldvr, complex *work, int *lwork, float *rwork, int *info, int jobvl_len, int jobvr_len); -extern void cgeevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, complex *a, int *lda, complex *w, complex *vl, int *ldvl, complex *vr, int *ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, complex *work, int *lwork, float *rwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void cgegs_(char *jobvsl, char *jobvsr, int *n, complex *a, int *lda, complex *b, int *ldb, complex *alpha, complex *beta, complex *vsl, int *ldvsl, complex *vsr, int *ldvsr, complex *work, int *lwork, float *rwork, int *info, int jobvsl_len, int jobvsr_len); -extern void cgegv_(char *jobvl, char *jobvr, int *n, complex *a, int *lda, complex *b, int *ldb, complex *alpha, complex *beta, complex *vl, int *ldvl, complex *vr, int *ldvr, complex *work, int *lwork, float *rwork, int *info, int jobvl_len, int jobvr_len); -extern void cgehrd_(int *n, int *ilo, int *ihi, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cgelqf_(int *m, int *n, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cgels_(char *trans, int *m, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, complex *work, int *lwork, int *info, int trans_len); -extern void cgelsd_(int *m, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, float *s, float *rcond, int *rank, complex *work, int *lwork, float *rwork, int *iwork, int *info); -extern void cgelss_(int *m, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, float *s, float *rcond, int *rank, complex *work, int *lwork, float *rwork, int *info); -extern void cgelsx_(int *m, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, int *jpvt, float *rcond, int *rank, complex *work, float *rwork, int *info); -extern void cgelsy_(int *m, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, int *jpvt, float *rcond, int *rank, complex *work, int *lwork, float *rwork, int *info); -extern void cgeqlf_(int *m, int *n, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cgeqp3_(int *m, int *n, complex *a, int *lda, int *jpvt, complex *tau, complex *work, int *lwork, float *rwork, int *info); -extern void cgeqpf_(int *m, int *n, complex *a, int *lda, int *jpvt, complex *tau, complex *work, float *rwork, int *info); -extern void cgeqrf_(int *m, int *n, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cgerfs_(char *trans, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int trans_len); -extern void cgerqf_(int *m, int *n, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cgesdd_(char *jobz, int *m, int *n, complex *a, int *lda, float *s, complex *u, int *ldu, complex *vt, int *ldvt, complex *work, int *lwork, float *rwork, int *iwork, int *info, int jobz_len); -extern void cgesv_(int *n, int *nrhs, complex *a, int *lda, int *ipiv, complex *b, int *ldb, int *info); -extern void cgesvd_(char *jobu, char *jobvt, int *m, int *n, complex *a, int *lda, float *s, complex *u, int *ldu, complex *vt, int *ldvt, complex *work, int *lwork, float *rwork, int *info, int jobu_len, int jobvt_len); -extern void cgesvx_(char *fact, char *trans, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, int *ipiv, char *equed, float *r, float *c, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int trans_len, int equed_len); -extern void cgetrf_(int *m, int *n, complex *a, int *lda, int *ipiv, int *info); -extern void cgetri_(int *n, complex *a, int *lda, int *ipiv, complex *work, int *lwork, int *info); -extern void cgetrs_(char *trans, int *n, int *nrhs, complex *a, int *lda, int *ipiv, complex *b, int *ldb, int *info, int trans_len); -extern void cggbak_(char *job, char *side, int *n, int *ilo, int *ihi, float *lscale, float *rscale, int *m, complex *v, int *ldv, int *info, int job_len, int side_len); -extern void cggbal_(char *job, int *n, complex *a, int *lda, complex *b, int *ldb, int *ilo, int *ihi, float *lscale, float *rscale, float *work, int *info, int job_len); -extern void cgges_(char *jobvsl, char *jobvsr, char *sort, ACML_CGGES_SELCTG selctg, int *n, complex *a, int *lda, complex *b, int *ldb, int *sdim, complex *alpha, complex *beta, complex *vsl, int *ldvsl, complex *vsr, int *ldvsr, complex *work, int *lwork, float *rwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len); -extern void cggesx_(char *jobvsl, char *jobvsr, char *sort, ACML_CGGESX_SELCTG selctg, char *sense, int *n, complex *a, int *lda, complex *b, int *ldb, int *sdim, complex *alpha, complex *beta, complex *vsl, int *ldvsl, complex *vsr, int *ldvsr, float *rconde, float *rcondv, complex *work, int *lwork, float *rwork, int *iwork, int *liwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len, int sense_len); -extern void cggev_(char *jobvl, char *jobvr, int *n, complex *a, int *lda, complex *b, int *ldb, complex *alpha, complex *beta, complex *vl, int *ldvl, complex *vr, int *ldvr, complex *work, int *lwork, float *rwork, int *info, int jobvl_len, int jobvr_len); -extern void cggevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, complex *a, int *lda, complex *b, int *ldb, complex *alpha, complex *beta, complex *vl, int *ldvl, complex *vr, int *ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, complex *work, int *lwork, float *rwork, int *iwork, int *bwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void cggglm_(int *n, int *m, int *p, complex *a, int *lda, complex *b, int *ldb, complex *d, complex *x, complex *y, complex *work, int *lwork, int *info); -extern void cgghrd_(char *compq, char *compz, int *n, int *ilo, int *ihi, complex *a, int *lda, complex *b, int *ldb, complex *q, int *ldq, complex *z, int *ldz, int *info, int compq_len, int compz_len); -extern void cgglse_(int *m, int *n, int *p, complex *a, int *lda, complex *b, int *ldb, complex *c, complex *d, complex *x, complex *work, int *lwork, int *info); -extern void cggqrf_(int *n, int *m, int *p, complex *a, int *lda, complex *taua, complex *b, int *ldb, complex *taub, complex *work, int *lwork, int *info); -extern void cggrqf_(int *m, int *p, int *n, complex *a, int *lda, complex *taua, complex *b, int *ldb, complex *taub, complex *work, int *lwork, int *info); -extern void cggsvd_(char *jobu, char *jobv, char *jobq, int *m, int *n, int *p, int *k, int *l, complex *a, int *lda, complex *b, int *ldb, float *alpha, float *beta, complex *u, int *ldu, complex *v, int *ldv, complex *q, int *ldq, complex *work, float *rwork, int *iwork, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void cggsvp_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, complex *a, int *lda, complex *b, int *ldb, float *tola, float *tolb, int *k, int *l, complex *u, int *ldu, complex *v, int *ldv, complex *q, int *ldq, int *iwork, float *rwork, complex *tau, complex *work, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void cgtcon_(char *norm, int *n, complex *dl, complex *d, complex *du, complex *du2, int *ipiv, float *anorm, float *rcond, complex *work, int *info, int norm_len); -extern void cgtrfs_(char *trans, int *n, int *nrhs, complex *dl, complex *d, complex *du, complex *dlf, complex *df, complex *duf, complex *du2, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int trans_len); -extern void cgtsv_(int *n, int *nrhs, complex *dl, complex *d, complex *du, complex *b, int *ldb, int *info); -extern void cgtsvx_(char *fact, char *trans, int *n, int *nrhs, complex *dl, complex *d, complex *du, complex *dlf, complex *df, complex *duf, complex *du2, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int trans_len); -extern void cgttrf_(int *n, complex *dl, complex *d, complex *du, complex *du2, int *ipiv, int *info); -extern void cgttrs_(char *trans, int *n, int *nrhs, complex *dl, complex *d, complex *du, complex *du2, int *ipiv, complex *b, int *ldb, int *info, int trans_len); -extern void chbev_(char *jobz, char *uplo, int *n, int *kd, complex *ab, int *ldab, float *w, complex *z, int *ldz, complex *work, float *rwork, int *info, int jobz_len, int uplo_len); -extern void chbevd_(char *jobz, char *uplo, int *n, int *kd, complex *ab, int *ldab, float *w, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void chbevx_(char *jobz, char *range, char *uplo, int *n, int *kd, complex *ab, int *ldab, complex *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, complex *work, float *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void chbgst_(char *vect, char *uplo, int *n, int *ka, int *kb, complex *ab, int *ldab, complex *bb, int *ldbb, complex *x, int *ldx, complex *work, float *rwork, int *info, int vect_len, int uplo_len); -extern void chbgv_(char *jobz, char *uplo, int *n, int *ka, int *kb, complex *ab, int *ldab, complex *bb, int *ldbb, float *w, complex *z, int *ldz, complex *work, float *rwork, int *info, int jobz_len, int uplo_len); -extern void chbgvd_(char *jobz, char *uplo, int *n, int *ka, int *kb, complex *ab, int *ldab, complex *bb, int *ldbb, float *w, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void chbgvx_(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, complex *ab, int *ldab, complex *bb, int *ldbb, complex *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, complex *work, float *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void chbtrd_(char *vect, char *uplo, int *n, int *kd, complex *ab, int *ldab, float *d, float *e, complex *q, int *ldq, complex *work, int *info, int vect_len, int uplo_len); -extern void checon_(char *uplo, int *n, complex *a, int *lda, int *ipiv, float *anorm, float *rcond, complex *work, int *info, int uplo_len); -extern void cheev_(char *jobz, char *uplo, int *n, complex *a, int *lda, float *w, complex *work, int *lwork, float *rwork, int *info, int jobz_len, int uplo_len); -extern void cheevd_(char *jobz, char *uplo, int *n, complex *a, int *lda, float *w, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void cheevr_(char *jobz, char *range, char *uplo, int *n, complex *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, int *isuppz, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len, int uplo_len); -extern void cheevx_(char *jobz, char *range, char *uplo, int *n, complex *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void chegst_(int *itype, char *uplo, int *n, complex *a, int *lda, complex *b, int *ldb, int *info, int uplo_len); -extern void chegv_(int *itype, char *jobz, char *uplo, int *n, complex *a, int *lda, complex *b, int *ldb, float *w, complex *work, int *lwork, float *rwork, int *info, int jobz_len, int uplo_len); -extern void chegvd_(int *itype, char *jobz, char *uplo, int *n, complex *a, int *lda, complex *b, int *ldb, float *w, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void chegvx_(int *itype, char *jobz, char *range, char *uplo, int *n, complex *a, int *lda, complex *b, int *ldb, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void cherfs_(char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void chesv_(char *uplo, int *n, int *nrhs, complex *a, int *lda, int *ipiv, complex *b, int *ldb, complex *work, int *lwork, int *info, int uplo_len); -extern void chesvx_(char *fact, char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, int *lwork, float *rwork, int *info, int fact_len, int uplo_len); -extern void chetrd_(char *uplo, int *n, complex *a, int *lda, float *d, float *e, complex *tau, complex *work, int *lwork, int *info, int uplo_len); -extern void chetrf_(char *uplo, int *n, complex *a, int *lda, int *ipiv, complex *work, int *lwork, int *info, int uplo_len); -extern void chetri_(char *uplo, int *n, complex *a, int *lda, int *ipiv, complex *work, int *info, int uplo_len); -extern void chetrs_(char *uplo, int *n, int *nrhs, complex *a, int *lda, int *ipiv, complex *b, int *ldb, int *info, int uplo_len); -extern void chgeqz_(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, complex *a, int *lda, complex *b, int *ldb, complex *alpha, complex *beta, complex *q, int *ldq, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *info, int job_len, int compq_len, int compz_len); -extern void chpcon_(char *uplo, int *n, complex *ap, int *ipiv, float *anorm, float *rcond, complex *work, int *info, int uplo_len); -extern void chpev_(char *jobz, char *uplo, int *n, complex *ap, float *w, complex *z, int *ldz, complex *work, float *rwork, int *info, int jobz_len, int uplo_len); -extern void chpevd_(char *jobz, char *uplo, int *n, complex *ap, float *w, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void chpevx_(char *jobz, char *range, char *uplo, int *n, complex *ap, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, complex *work, float *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void chpgst_(int *itype, char *uplo, int *n, complex *ap, complex *bp, int *info, int uplo_len); -extern void chpgv_(int *itype, char *jobz, char *uplo, int *n, complex *ap, complex *bp, float *w, complex *z, int *ldz, complex *work, float *rwork, int *info, int jobz_len, int uplo_len); -extern void chpgvd_(int *itype, char *jobz, char *uplo, int *n, complex *ap, complex *bp, float *w, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void chpgvx_(int *itype, char *jobz, char *range, char *uplo, int *n, complex *ap, complex *bp, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, complex *work, float *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void chprfs_(char *uplo, int *n, int *nrhs, complex *ap, complex *afp, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void chpsv_(char *uplo, int *n, int *nrhs, complex *ap, int *ipiv, complex *b, int *ldb, int *info, int uplo_len); -extern void chpsvx_(char *fact, char *uplo, int *n, int *nrhs, complex *ap, complex *afp, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int uplo_len); -extern void chptrd_(char *uplo, int *n, complex *ap, float *d, float *e, complex *tau, int *info, int uplo_len); -extern void chptrf_(char *uplo, int *n, complex *ap, int *ipiv, int *info, int uplo_len); -extern void chptri_(char *uplo, int *n, complex *ap, int *ipiv, complex *work, int *info, int uplo_len); -extern void chptrs_(char *uplo, int *n, int *nrhs, complex *ap, int *ipiv, complex *b, int *ldb, int *info, int uplo_len); -extern void chsein_(char *side, char *eigsrc, char *initv, int *select, int *n, complex *h, int *ldh, complex *w, complex *vl, int *ldvl, complex *vr, int *ldvr, int *mm, int *m, complex *work, float *rwork, int *ifaill, int *ifailr, int *info, int side_len, int eigsrc_len, int initv_len); -extern void chseqr_(char *job, char *compz, int *n, int *ilo, int *ihi, complex *h, int *ldh, complex *w, complex *z, int *ldz, complex *work, int *lwork, int *info, int job_len, int compz_len); -extern void cpbcon_(char *uplo, int *n, int *kd, complex *ab, int *ldab, float *anorm, float *rcond, complex *work, float *rwork, int *info, int uplo_len); -extern void cpbequ_(char *uplo, int *n, int *kd, complex *ab, int *ldab, float *s, float *scond, float *amax, int *info, int uplo_len); -extern void cpbrfs_(char *uplo, int *n, int *kd, int *nrhs, complex *ab, int *ldab, complex *afb, int *ldafb, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void cpbstf_(char *uplo, int *n, int *kd, complex *ab, int *ldab, int *info, int uplo_len); -extern void cpbsv_(char *uplo, int *n, int *kd, int *nrhs, complex *ab, int *ldab, complex *b, int *ldb, int *info, int uplo_len); -extern void cpbsvx_(char *fact, char *uplo, int *n, int *kd, int *nrhs, complex *ab, int *ldab, complex *afb, int *ldafb, char *equed, float *s, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void cpbtrf_(char *uplo, int *n, int *kd, complex *ab, int *ldab, int *info, int uplo_len); -extern void cpbtrs_(char *uplo, int *n, int *kd, int *nrhs, complex *ab, int *ldab, complex *b, int *ldb, int *info, int uplo_len); -extern void cpocon_(char *uplo, int *n, complex *a, int *lda, float *anorm, float *rcond, complex *work, float *rwork, int *info, int uplo_len); -extern void cpoequ_(int *n, complex *a, int *lda, float *s, float *scond, float *amax, int *info); -extern void cporfs_(char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void cposv_(char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, int *info, int uplo_len); -extern void cposvx_(char *fact, char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, char *equed, float *s, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void cpotrf_(char *uplo, int *n, complex *a, int *lda, int *info, int uplo_len); -extern void cpotri_(char *uplo, int *n, complex *a, int *lda, int *info, int uplo_len); -extern void cpotrs_(char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, int *info, int uplo_len); -extern void cppcon_(char *uplo, int *n, complex *ap, float *anorm, float *rcond, complex *work, float *rwork, int *info, int uplo_len); -extern void cppequ_(char *uplo, int *n, complex *ap, float *s, float *scond, float *amax, int *info, int uplo_len); -extern void cpprfs_(char *uplo, int *n, int *nrhs, complex *ap, complex *afp, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void cppsv_(char *uplo, int *n, int *nrhs, complex *ap, complex *b, int *ldb, int *info, int uplo_len); -extern void cppsvx_(char *fact, char *uplo, int *n, int *nrhs, complex *ap, complex *afp, char *equed, float *s, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void cpptrf_(char *uplo, int *n, complex *ap, int *info, int uplo_len); -extern void cpptri_(char *uplo, int *n, complex *ap, int *info, int uplo_len); -extern void cpptrs_(char *uplo, int *n, int *nrhs, complex *ap, complex *b, int *ldb, int *info, int uplo_len); -extern void cptcon_(int *n, float *d, complex *e, float *anorm, float *rcond, float *rwork, int *info); -extern void cpteqr_(char *compz, int *n, float *d, float *e, complex *z, int *ldz, float *work, int *info, int compz_len); -extern void cptrfs_(char *uplo, int *n, int *nrhs, float *d, complex *e, float *df, complex *ef, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void cptsv_(int *n, int *nrhs, float *d, complex *e, complex *b, int *ldb, int *info); -extern void cptsvx_(char *fact, int *n, int *nrhs, float *d, complex *e, float *df, complex *ef, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len); -extern void cpttrf_(int *n, float *d, complex *e, int *info); -extern void cpttrs_(char *uplo, int *n, int *nrhs, float *d, complex *e, complex *b, int *ldb, int *info, int uplo_len); -extern void cspcon_(char *uplo, int *n, complex *ap, int *ipiv, float *anorm, float *rcond, complex *work, int *info, int uplo_len); -extern void csprfs_(char *uplo, int *n, int *nrhs, complex *ap, complex *afp, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void cspsv_(char *uplo, int *n, int *nrhs, complex *ap, int *ipiv, complex *b, int *ldb, int *info, int uplo_len); -extern void cspsvx_(char *fact, char *uplo, int *n, int *nrhs, complex *ap, complex *afp, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, float *rwork, int *info, int fact_len, int uplo_len); -extern void csptrf_(char *uplo, int *n, complex *ap, int *ipiv, int *info, int uplo_len); -extern void csptri_(char *uplo, int *n, complex *ap, int *ipiv, complex *work, int *info, int uplo_len); -extern void csptrs_(char *uplo, int *n, int *nrhs, complex *ap, int *ipiv, complex *b, int *ldb, int *info, int uplo_len); -extern void cstedc_(char *compz, int *n, float *d, float *e, complex *z, int *ldz, complex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info, int compz_len); -extern void cstegr_(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, complex *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len); -extern void cstein_(int *n, float *d, float *e, int *m, float *w, int *iblock, int *isplit, complex *z, int *ldz, float *work, int *iwork, int *ifail, int *info); -extern void csteqr_(char *compz, int *n, float *d, float *e, complex *z, int *ldz, float *work, int *info, int compz_len); -extern void csycon_(char *uplo, int *n, complex *a, int *lda, int *ipiv, float *anorm, float *rcond, complex *work, int *info, int uplo_len); -extern void csyrfs_(char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len); -extern void csysv_(char *uplo, int *n, int *nrhs, complex *a, int *lda, int *ipiv, complex *b, int *ldb, complex *work, int *lwork, int *info, int uplo_len); -extern void csysvx_(char *fact, char *uplo, int *n, int *nrhs, complex *a, int *lda, complex *af, int *ldaf, int *ipiv, complex *b, int *ldb, complex *x, int *ldx, float *rcond, float *ferr, float *berr, complex *work, int *lwork, float *rwork, int *info, int fact_len, int uplo_len); -extern void csytrf_(char *uplo, int *n, complex *a, int *lda, int *ipiv, complex *work, int *lwork, int *info, int uplo_len); -extern void csytri_(char *uplo, int *n, complex *a, int *lda, int *ipiv, complex *work, int *info, int uplo_len); -extern void csytrs_(char *uplo, int *n, int *nrhs, complex *a, int *lda, int *ipiv, complex *b, int *ldb, int *info, int uplo_len); -extern void ctbcon_(char *norm, char *uplo, char *diag, int *n, int *kd, complex *ab, int *ldab, float *rcond, complex *work, float *rwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void ctbrfs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, complex *ab, int *ldab, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void ctbtrs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, complex *ab, int *ldab, complex *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void ctgevc_(char *side, char *howmny, int *select, int *n, complex *a, int *lda, complex *b, int *ldb, complex *vl, int *ldvl, complex *vr, int *ldvr, int *mm, int *m, complex *work, float *rwork, int *info, int side_len, int howmny_len); -extern void ctgexc_(int *wantq, int *wantz, int *n, complex *a, int *lda, complex *b, int *ldb, complex *q, int *ldq, complex *z, int *ldz, int *ifst, int *ilst, int *info); -extern void ctgsen_(int *ijob, int *wantq, int *wantz, int *select, int *n, complex *a, int *lda, complex *b, int *ldb, complex *alpha, complex *beta, complex *q, int *ldq, complex *z, int *ldz, int *m, float *pl, float *pr, float *dif, complex *work, int *lwork, int *iwork, int *liwork, int *info); -extern void ctgsja_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, complex *a, int *lda, complex *b, int *ldb, float *tola, float *tolb, float *alpha, float *beta, complex *u, int *ldu, complex *v, int *ldv, complex *q, int *ldq, complex *work, int *ncycle, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void ctgsna_(char *job, char *howmny, int *select, int *n, complex *a, int *lda, complex *b, int *ldb, complex *vl, int *ldvl, complex *vr, int *ldvr, float *s, float *dif, int *mm, int *m, complex *work, int *lwork, int *iwork, int *info, int job_len, int howmny_len); -extern void ctgsyl_(char *trans, int *ijob, int *m, int *n, complex *a, int *lda, complex *b, int *ldb, complex *c, int *ldc, complex *d, int *ldd, complex *e, int *lde, complex *f, int *ldf, float *scale, float *dif, complex *work, int *lwork, int *iwork, int *info, int trans_len); -extern void ctpcon_(char *norm, char *uplo, char *diag, int *n, complex *ap, float *rcond, complex *work, float *rwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void ctprfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, complex *ap, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void ctptri_(char *uplo, char *diag, int *n, complex *ap, int *info, int uplo_len, int diag_len); -extern void ctptrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, complex *ap, complex *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void ctrcon_(char *norm, char *uplo, char *diag, int *n, complex *a, int *lda, float *rcond, complex *work, float *rwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void ctrevc_(char *side, char *howmny, int *select, int *n, complex *t, int *ldt, complex *vl, int *ldvl, complex *vr, int *ldvr, int *mm, int *m, complex *work, float *rwork, int *info, int side_len, int howmny_len); -extern void ctrexc_(char *compq, int *n, complex *t, int *ldt, complex *q, int *ldq, int *ifst, int *ilst, int *info, int compq_len); -extern void ctrrfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, complex *x, int *ldx, float *ferr, float *berr, complex *work, float *rwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void ctrsen_(char *job, char *compq, int *select, int *n, complex *t, int *ldt, complex *q, int *ldq, complex *w, int *m, float *s, float *sep, complex *work, int *lwork, int *info, int job_len, int compq_len); -extern void ctrsna_(char *job, char *howmny, int *select, int *n, complex *t, int *ldt, complex *vl, int *ldvl, complex *vr, int *ldvr, float *s, float *sep, int *mm, int *m, complex *work, int *ldwork, float *rwork, int *info, int job_len, int howmny_len); -extern void ctrsyl_(char *trana, char *tranb, int *isgn, int *m, int *n, complex *a, int *lda, complex *b, int *ldb, complex *c, int *ldc, float *scale, int *info, int trana_len, int tranb_len); -extern void ctrtri_(char *uplo, char *diag, int *n, complex *a, int *lda, int *info, int uplo_len, int diag_len); -extern void ctrtrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, complex *a, int *lda, complex *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void ctzrqf_(int *m, int *n, complex *a, int *lda, complex *tau, int *info); -extern void ctzrzf_(int *m, int *n, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cungbr_(char *vect, int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info, int vect_len); -extern void cunghr_(int *n, int *ilo, int *ihi, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cunglq_(int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cungql_(int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cungqr_(int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cungrq_(int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info); -extern void cungtr_(char *uplo, int *n, complex *a, int *lda, complex *tau, complex *work, int *lwork, int *info, int uplo_len); -extern void cunmbr_(char *vect, char *side, char *trans, int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int vect_len, int side_len, int trans_len); -extern void cunmhr_(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int side_len, int trans_len); -extern void cunmlq_(char *side, char *trans, int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int side_len, int trans_len); -extern void cunmql_(char *side, char *trans, int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int side_len, int trans_len); -extern void cunmqr_(char *side, char *trans, int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int side_len, int trans_len); -extern void cunmr3_(char *side, char *trans, int *m, int *n, int *k, int *l, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *info, int side_len, int trans_len); -extern void cunmrq_(char *side, char *trans, int *m, int *n, int *k, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int side_len, int trans_len); -extern void cunmrz_(char *side, char *trans, int *m, int *n, int *k, int *l, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int side_len, int trans_len); -extern void cunmtr_(char *side, char *uplo, char *trans, int *m, int *n, complex *a, int *lda, complex *tau, complex *c, int *ldc, complex *work, int *lwork, int *info, int side_len, int uplo_len, int trans_len); -extern void cupgtr_(char *uplo, int *n, complex *ap, complex *tau, complex *q, int *ldq, complex *work, int *info, int uplo_len); -extern void cupmtr_(char *side, char *uplo, char *trans, int *m, int *n, complex *ap, complex *tau, complex *c, int *ldc, complex *work, int *info, int side_len, int uplo_len, int trans_len); -extern void dbdsdc_(char *uplo, char *compq, int *n, double *d, double *e, double *u, int *ldu, double *vt, int *ldvt, double *q, int *iq, double *work, int *iwork, int *info, int uplo_len, int compq_len); -extern void dbdsqr_(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, double *vt, int *ldvt, double *u, int *ldu, double *c, int *ldc, double *work, int *info, int uplo_len); -extern void ddisna_(char *job, int *m, int *n, double *d, double *sep, int *info, int job_len); -extern void dgbbrd_(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, double *ab, int *ldab, double *d, double *e, double *q, int *ldq, double *pt, int *ldpt, double *c, int *ldc, double *work, int *info, int vect_len); -extern void dgbcon_(char *norm, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info, int norm_len); -extern void dgbequ_(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); -extern void dgbrfs_(char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int trans_len); -extern void dgbsv_(int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, int *ipiv, double *b, int *ldb, int *info); -extern void dgbsvx_(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info, int fact_len, int trans_len, int equed_len); -extern void dgbtrf_(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, int *info); -extern void dgbtrs_(char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, int *ipiv, double *b, int *ldb, int *info, int trans_len); -extern void dgebak_(char *job, char *side, int *n, int *ilo, int *ihi, double *scale, int *m, double *v, int *ldv, int *info, int job_len, int side_len); -extern void dgebal_(char *job, int *n, double *a, int *lda, int *ilo, int *ihi, double *scale, int *info, int job_len); -extern void dgebrd_(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *lwork, int *info); -extern void dgecon_(char *norm, int *n, double *a, int *lda, double *anorm, double *rcond, double *work, int *iwork, int *info, int norm_len); -extern void dgeequ_(int *m, int *n, double *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); -extern void dgees_(char *jobvs, char *sort, ACML_DGEES_SELECT select, int *n, double *a, int *lda, int *sdim, double *wr, double *wi, double *vs, int *ldvs, double *work, int *lwork, int *bwork, int *info, int jobvs_len, int sort_len); -extern void dgeesx_(char *jobvs, char *sort, ACML_DGEESX_SELECT select, char *sense, int *n, double *a, int *lda, int *sdim, double *wr, double *wi, double *vs, int *ldvs, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info, int jobvs_len, int sort_len, int sense_len); -extern void dgeev_(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info, int jobvl_len, int jobvr_len); -extern void dgeevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void dgegs_(char *jobvsl, char *jobvsr, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *work, int *lwork, int *info, int jobvsl_len, int jobvsr_len); -extern void dgegv_(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info, int jobvl_len, int jobvr_len); -extern void dgehrd_(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dgelqf_(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dgels_(char *trans, int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *work, int *lwork, int *info, int trans_len); -extern void dgelsd_(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *s, double *rcond, int *rank, double *work, int *lwork, int *iwork, int *info); -extern void dgelss_(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *s, double *rcond, int *rank, double *work, int *lwork, int *info); -extern void dgelsx_(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *jpvt, double *rcond, int *rank, double *work, int *info); -extern void dgelsy_(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *jpvt, double *rcond, int *rank, double *work, int *lwork, int *info); -extern void dgeqlf_(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dgeqp3_(int *m, int *n, double *a, int *lda, int *jpvt, double *tau, double *work, int *lwork, int *info); -extern void dgeqpf_(int *m, int *n, double *a, int *lda, int *jpvt, double *tau, double *work, int *info); -extern void dgeqrf_(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dgerfs_(char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int trans_len); -extern void dgerqf_(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dgesdd_(char *jobz, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *iwork, int *info, int jobz_len); -extern void dgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info); -extern void dgesvd_(char *jobu, char *jobvt, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *info, int jobu_len, int jobvt_len); -extern void dgesvx_(char *fact, char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info, int fact_len, int trans_len, int equed_len); -extern void dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv, int *info); -extern void dgetri_(int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info); -extern void dgetrs_(char *trans, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info, int trans_len); -extern void dggbak_(char *job, char *side, int *n, int *ilo, int *ihi, double *lscale, double *rscale, int *m, double *v, int *ldv, int *info, int job_len, int side_len); -extern void dggbal_(char *job, int *n, double *a, int *lda, double *b, int *ldb, int *ilo, int *ihi, double *lscale, double *rscale, double *work, int *info, int job_len); -extern void dgges_(char *jobvsl, char *jobvsr, char *sort, ACML_DGGES_DELCTG delctg, int *n, double *a, int *lda, double *b, int *ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *work, int *lwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len); -extern void dggesx_(char *jobvsl, char *jobvsr, char *sort, ACML_DGGESX_DELCTG delctg, char *sense, int *n, double *a, int *lda, double *b, int *ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len, int sense_len); -extern void dggev_(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info, int jobvl_len, int jobvr_len); -extern void dggevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *bwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void dggglm_(int *n, int *m, int *p, double *a, int *lda, double *b, int *ldb, double *d, double *x, double *y, double *work, int *lwork, int *info); -extern void dgghrd_(char *compq, char *compz, int *n, int *ilo, int *ihi, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *info, int compq_len, int compz_len); -extern void dgglse_(int *m, int *n, int *p, double *a, int *lda, double *b, int *ldb, double *c, double *d, double *x, double *work, int *lwork, int *info); -extern void dggqrf_(int *n, int *m, int *p, double *a, int *lda, double *taua, double *b, int *ldb, double *taub, double *work, int *lwork, int *info); -extern void dggrqf_(int *m, int *p, int *n, double *a, int *lda, double *taua, double *b, int *ldb, double *taub, double *work, int *lwork, int *info); -extern void dggsvd_(char *jobu, char *jobv, char *jobq, int *m, int *n, int *p, int *k, int *l, double *a, int *lda, double *b, int *ldb, double *alpha, double *beta, double *u, int *ldu, double *v, int *ldv, double *q, int *ldq, double *work, int *iwork, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void dggsvp_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, double *a, int *lda, double *b, int *ldb, double *tola, double *tolb, int *k, int *l, double *u, int *ldu, double *v, int *ldv, double *q, int *ldq, int *iwork, double *tau, double *work, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void dgtcon_(char *norm, int *n, double *dl, double *d, double *du, double *du2, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info, int norm_len); -extern void dgtrfs_(char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *dlf, double *df, double *duf, double *du2, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int trans_len); -extern void dgtsv_(int *n, int *nrhs, double *dl, double *d, double *du, double *b, int *ldb, int *info); -extern void dgtsvx_(char *fact, char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *dlf, double *df, double *duf, double *du2, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info, int fact_len, int trans_len); -extern void dgttrf_(int *n, double *dl, double *d, double *du, double *du2, int *ipiv, int *info); -extern void dgttrs_(char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *du2, int *ipiv, double *b, int *ldb, int *info, int trans_len); -extern void dhgeqz_(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *q, int *ldq, double *z, int *ldz, double *work, int *lwork, int *info, int job_len, int compq_len, int compz_len); -extern void dhsein_(char *side, char *eigsrc, char *initv, int *select, int *n, double *h, int *ldh, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *ifaill, int *ifailr, int *info, int side_len, int eigsrc_len, int initv_len); -extern void dhseqr_(char *job, char *compz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, double *z, int *ldz, double *work, int *lwork, int *info, int job_len, int compz_len); -extern double dlamch_(char *cmach, int cmach_len); -extern void dopgtr_(char *uplo, int *n, double *ap, double *tau, double *q, int *ldq, double *work, int *info, int uplo_len); -extern void dopmtr_(char *side, char *uplo, char *trans, int *m, int *n, double *ap, double *tau, double *c, int *ldc, double *work, int *info, int side_len, int uplo_len, int trans_len); -extern void dorgbr_(char *vect, int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info, int vect_len); -extern void dorghr_(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dorglq_(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dorgql_(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dorgqr_(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dorgrq_(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void dorgtr_(char *uplo, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info, int uplo_len); -extern void dormbr_(char *vect, char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int vect_len, int side_len, int trans_len); -extern void dormhr_(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int side_len, int trans_len); -extern void dormlq_(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int side_len, int trans_len); -extern void dormql_(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int side_len, int trans_len); -extern void dormqr_(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int side_len, int trans_len); -extern void dormr3_(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info, int side_len, int trans_len); -extern void dormrq_(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int side_len, int trans_len); -extern void dormrz_(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int side_len, int trans_len); -extern void dormtr_(char *side, char *uplo, char *trans, int *m, int *n, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info, int side_len, int uplo_len, int trans_len); -extern void dpbcon_(char *uplo, int *n, int *kd, double *ab, int *ldab, double *anorm, double *rcond, double *work, int *iwork, int *info, int uplo_len); -extern void dpbequ_(char *uplo, int *n, int *kd, double *ab, int *ldab, double *s, double *scond, double *amax, int *info, int uplo_len); -extern void dpbrfs_(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len); -extern void dpbstf_(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info, int uplo_len); -extern void dpbsv_(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info, int uplo_len); -extern void dpbsvx_(char *fact, char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void dpbtrf_(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info, int uplo_len); -extern void dpbtrs_(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info, int uplo_len); -extern void dpocon_(char *uplo, int *n, double *a, int *lda, double *anorm, double *rcond, double *work, int *iwork, int *info, int uplo_len); -extern void dpoequ_(int *n, double *a, int *lda, double *s, double *scond, double *amax, int *info); -extern void dporfs_(char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len); -extern void dposv_(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info, int uplo_len); -extern void dposvx_(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void dpotrf_(char *uplo, int *n, double *a, int *lda, int *info, int uplo_len); -extern void dpotri_(char *uplo, int *n, double *a, int *lda, int *info, int uplo_len); -extern void dpotrs_(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info, int uplo_len); -extern void dppcon_(char *uplo, int *n, double *ap, double *anorm, double *rcond, double *work, int *iwork, int *info, int uplo_len); -extern void dppequ_(char *uplo, int *n, double *ap, double *s, double *scond, double *amax, int *info, int uplo_len); -extern void dpprfs_(char *uplo, int *n, int *nrhs, double *ap, double *afp, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len); -extern void dppsv_(char *uplo, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info, int uplo_len); -extern void dppsvx_(char *fact, char *uplo, int *n, int *nrhs, double *ap, double *afp, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void dpptrf_(char *uplo, int *n, double *ap, int *info, int uplo_len); -extern void dpptri_(char *uplo, int *n, double *ap, int *info, int uplo_len); -extern void dpptrs_(char *uplo, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info, int uplo_len); -extern void dptcon_(int *n, double *d, double *e, double *anorm, double *rcond, double *work, int *info); -extern void dpteqr_(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info, int compz_len); -extern void dptrfs_(int *n, int *nrhs, double *d, double *e, double *df, double *ef, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *info); -extern void dptsv_(int *n, int *nrhs, double *d, double *e, double *b, int *ldb, int *info); -extern void dptsvx_(char *fact, int *n, int *nrhs, double *d, double *e, double *df, double *ef, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *info, int fact_len); -extern void dpttrf_(int *n, double *d, double *e, int *info); -extern void dpttrs_(int *n, int *nrhs, double *d, double *e, double *b, int *ldb, int *info); -extern void dsbev_(char *jobz, char *uplo, int *n, int *kd, double *ab, int *ldab, double *w, double *z, int *ldz, double *work, int *info, int jobz_len, int uplo_len); -extern void dsbevd_(char *jobz, char *uplo, int *n, int *kd, double *ab, int *ldab, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void dsbevx_(char *jobz, char *range, char *uplo, int *n, int *kd, double *ab, int *ldab, double *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void dsbgst_(char *vect, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *x, int *ldx, double *work, int *info, int vect_len, int uplo_len); -extern void dsbgv_(char *jobz, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *w, double *z, int *ldz, double *work, int *info, int jobz_len, int uplo_len); -extern void dsbgvd_(char *jobz, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void dsbgvx_(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void dsbtrd_(char *vect, char *uplo, int *n, int *kd, double *ab, int *ldab, double *d, double *e, double *q, int *ldq, double *work, int *info, int vect_len, int uplo_len); -extern double dsecnd_(void); -extern void dspcon_(char *uplo, int *n, double *ap, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info, int uplo_len); -extern void dspev_(char *jobz, char *uplo, int *n, double *ap, double *w, double *z, int *ldz, double *work, int *info, int jobz_len, int uplo_len); -extern void dspevd_(char *jobz, char *uplo, int *n, double *ap, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void dspevx_(char *jobz, char *range, char *uplo, int *n, double *ap, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void dspgst_(int *itype, char *uplo, int *n, double *ap, double *bp, int *info, int uplo_len); -extern void dspgv_(int *itype, char *jobz, char *uplo, int *n, double *ap, double *bp, double *w, double *z, int *ldz, double *work, int *info, int jobz_len, int uplo_len); -extern void dspgvd_(int *itype, char *jobz, char *uplo, int *n, double *ap, double *bp, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void dspgvx_(int *itype, char *jobz, char *range, char *uplo, int *n, double *ap, double *bp, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void dsprfs_(char *uplo, int *n, int *nrhs, double *ap, double *afp, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len); -extern void dspsv_(char *uplo, int *n, int *nrhs, double *ap, int *ipiv, double *b, int *ldb, int *info, int uplo_len); -extern void dspsvx_(char *fact, char *uplo, int *n, int *nrhs, double *ap, double *afp, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info, int fact_len, int uplo_len); -extern void dsptrd_(char *uplo, int *n, double *ap, double *d, double *e, double *tau, int *info, int uplo_len); -extern void dsptrf_(char *uplo, int *n, double *ap, int *ipiv, int *info, int uplo_len); -extern void dsptri_(char *uplo, int *n, double *ap, int *ipiv, double *work, int *info, int uplo_len); -extern void dsptrs_(char *uplo, int *n, int *nrhs, double *ap, int *ipiv, double *b, int *ldb, int *info, int uplo_len); -extern void dstebz_(char *range, char *order, int *n, double *vl, double *vu, int *il, int *iu, double *abstol, double *d, double *e, int *m, int *nsplit, double *w, int *iblock, int *isplit, double *work, int *iwork, int *info, int range_len, int order_len); -extern void dstedc_(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info, int compz_len); -extern void dstegr_(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len); -extern void dstein_(int *n, double *d, double *e, int *m, double *w, int *iblock, int *isplit, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); -extern void dsteqr_(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info, int compz_len); -extern void dsterf_(int *n, double *d, double *e, int *info); -extern void dstev_(char *jobz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info, int jobz_len); -extern void dstevd_(char *jobz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len); -extern void dstevr_(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len); -extern void dstevx_(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len); -extern void dsycon_(char *uplo, int *n, double *a, int *lda, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info, int uplo_len); -extern void dsyev_(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *info, int jobz_len, int uplo_len); -extern void dsyevd_(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void dsyevr_(char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len, int uplo_len); -extern void dsyevx_(char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void dsygst_(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info, int uplo_len); -extern void dsygv_(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *info, int jobz_len, int uplo_len); -extern void dsygvd_(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void dsygvx_(int *itype, char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void dsyrfs_(char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len); -extern void dsysv_(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, double *work, int *lwork, int *info, int uplo_len); -extern void dsysvx_(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *lwork, int *iwork, int *info, int fact_len, int uplo_len); -extern void dsytrd_(char *uplo, int *n, double *a, int *lda, double *d, double *e, double *tau, double *work, int *lwork, int *info, int uplo_len); -extern void dsytrf_(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info, int uplo_len); -extern void dsytri_(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *info, int uplo_len); -extern void dsytrs_(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info, int uplo_len); -extern void dtbcon_(char *norm, char *uplo, char *diag, int *n, int *kd, double *ab, int *ldab, double *rcond, double *work, int *iwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void dtbrfs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void dtbtrs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void dtgevc_(char *side, char *howmny, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *info, int side_len, int howmny_len); -extern void dtgexc_(int *wantq, int *wantz, int *n, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *ifst, int *ilst, double *work, int *lwork, int *info); -extern void dtgsen_(int *ijob, int *wantq, int *wantz, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *q, int *ldq, double *z, int *ldz, int *m, double *pl, double *pr, double *dif, double *work, int *lwork, int *iwork, int *liwork, int *info); -extern void dtgsja_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, double *a, int *lda, double *b, int *ldb, double *tola, double *tolb, double *alpha, double *beta, double *u, int *ldu, double *v, int *ldv, double *q, int *ldq, double *work, int *ncycle, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void dtgsna_(char *job, char *howmny, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *vl, int *ldvl, double *vr, int *ldvr, double *s, double *dif, int *mm, int *m, double *work, int *lwork, int *iwork, int *info, int job_len, int howmny_len); -extern void dtgsyl_(char *trans, int *ijob, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *d, int *ldd, double *e, int *lde, double *f, int *ldf, double *scale, double *dif, double *work, int *lwork, int *iwork, int *info, int trans_len); -extern void dtpcon_(char *norm, char *uplo, char *diag, int *n, double *ap, double *rcond, double *work, int *iwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void dtprfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *ap, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void dtptri_(char *uplo, char *diag, int *n, double *ap, int *info, int uplo_len, int diag_len); -extern void dtptrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void dtrcon_(char *norm, char *uplo, char *diag, int *n, double *a, int *lda, double *rcond, double *work, int *iwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void dtrevc_(char *side, char *howmny, int *select, int *n, double *t, int *ldt, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *info, int side_len, int howmny_len); -extern void dtrexc_(char *compq, int *n, double *t, int *ldt, double *q, int *ldq, int *ifst, int *ilst, double *work, int *info, int compq_len); -extern void dtrrfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void dtrsen_(char *job, char *compq, int *select, int *n, double *t, int *ldt, double *q, int *ldq, double *wr, double *wi, int *m, double *s, double *sep, double *work, int *lwork, int *iwork, int *liwork, int *info, int job_len, int compq_len); -extern void dtrsna_(char *job, char *howmny, int *select, int *n, double *t, int *ldt, double *vl, int *ldvl, double *vr, int *ldvr, double *s, double *sep, int *mm, int *m, double *work, int *ldwork, int *iwork, int *info, int job_len, int howmny_len); -extern void dtrsyl_(char *trana, char *tranb, int *isgn, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *scale, int *info, int trana_len, int tranb_len); -extern void dtrtri_(char *uplo, char *diag, int *n, double *a, int *lda, int *info, int uplo_len, int diag_len); -extern void dtrtrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void dtzrqf_(int *m, int *n, double *a, int *lda, double *tau, int *info); -extern void dtzrzf_(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info); -extern void sbdsdc_(char *uplo, char *compq, int *n, float *d, float *e, float *u, int *ldu, float *vt, int *ldvt, float *q, int *iq, float *work, int *iwork, int *info, int uplo_len, int compq_len); -extern void sbdsqr_(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, float *vt, int *ldvt, float *u, int *ldu, float *c, int *ldc, float *work, int *info, int uplo_len); -extern void sdisna_(char *job, int *m, int *n, float *d, float *sep, int *info, int job_len); - -#ifdef FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE -extern double second_(void); -#else -extern float second_(void); -#endif - -extern void sgbbrd_(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, float *ab, int *ldab, float *d, float *e, float *q, int *ldq, float *pt, int *ldpt, float *c, int *ldc, float *work, int *info, int vect_len); -extern void sgbcon_(char *norm, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info, int norm_len); -extern void sgbequ_(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); -extern void sgbrfs_(char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int trans_len); -extern void sgbsv_(int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, int *ipiv, float *b, int *ldb, int *info); -extern void sgbsvx_(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, int *ipiv, char *equed, float *r, float *c, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info, int fact_len, int trans_len, int equed_len); -extern void sgbtrf_(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, int *info); -extern void sgbtrs_(char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, int *ipiv, float *b, int *ldb, int *info, int trans_len); -extern void sgebak_(char *job, char *side, int *n, int *ilo, int *ihi, float *scale, int *m, float *v, int *ldv, int *info, int job_len, int side_len); -extern void sgebal_(char *job, int *n, float *a, int *lda, int *ilo, int *ihi, float *scale, int *info, int job_len); -extern void sgebrd_(int *m, int *n, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *work, int *lwork, int *info); -extern void sgecon_(char *norm, int *n, float *a, int *lda, float *anorm, float *rcond, float *work, int *iwork, int *info, int norm_len); -extern void sgeequ_(int *m, int *n, float *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info); -extern void sgees_(char *jobvs, char *sort, ACML_SGEES_SELECT select, int *n, float *a, int *lda, int *sdim, float *wr, float *wi, float *vs, int *ldvs, float *work, int *lwork, int *bwork, int *info, int jobvs_len, int sort_len); -extern void sgeesx_(char *jobvs, char *sort, ACML_SGEESX_SELECT select, char *sense, int *n, float *a, int *lda, int *sdim, float *wr, float *wi, float *vs, int *ldvs, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info, int jobvs_len, int sort_len, int sense_len); -extern void sgeev_(char *jobvl, char *jobvr, int *n, float *a, int *lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, float *work, int *lwork, int *info, int jobvl_len, int jobvr_len); -extern void sgeevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, float *a, int *lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void sgegs_(char *jobvsl, char *jobvsr, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vsl, int *ldvsl, float *vsr, int *ldvsr, float *work, int *lwork, int *info, int jobvsl_len, int jobvsr_len); -extern void sgegv_(char *jobvl, char *jobvr, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vl, int *ldvl, float *vr, int *ldvr, float *work, int *lwork, int *info, int jobvl_len, int jobvr_len); -extern void sgehrd_(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sgelqf_(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sgels_(char *trans, int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *work, int *lwork, int *info, int trans_len); -extern void sgelsd_(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *s, float *rcond, int *rank, float *work, int *lwork, int *iwork, int *info); -extern void sgelss_(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *s, float *rcond, int *rank, float *work, int *lwork, int *info); -extern void sgelsx_(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *jpvt, float *rcond, int *rank, float *work, int *info); -extern void sgelsy_(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *jpvt, float *rcond, int *rank, float *work, int *lwork, int *info); -extern void sgeqlf_(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sgeqp3_(int *m, int *n, float *a, int *lda, int *jpvt, float *tau, float *work, int *lwork, int *info); -extern void sgeqpf_(int *m, int *n, float *a, int *lda, int *jpvt, float *tau, float *work, int *info); -extern void sgeqrf_(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sgerfs_(char *trans, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int trans_len); -extern void sgerqf_(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sgesdd_(char *jobz, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *iwork, int *info, int jobz_len); -extern void sgesv_(int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info); -extern void sgesvd_(char *jobu, char *jobvt, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *info, int jobu_len, int jobvt_len); -extern void sgesvx_(char *fact, char *trans, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, char *equed, float *r, float *c, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info, int fact_len, int trans_len, int equed_len); -extern void sgetrf_(int *m, int *n, float *a, int *lda, int *ipiv, int *info); -extern void sgetri_(int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info); -extern void sgetrs_(char *trans, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info, int trans_len); -extern void sggbak_(char *job, char *side, int *n, int *ilo, int *ihi, float *lscale, float *rscale, int *m, float *v, int *ldv, int *info, int job_len, int side_len); -extern void sggbal_(char *job, int *n, float *a, int *lda, float *b, int *ldb, int *ilo, int *ihi, float *lscale, float *rscale, float *work, int *info, int job_len); -extern void sgges_(char *jobvsl, char *jobvsr, char *sort, ACML_SGGES_SELCTG selctg, int *n, float *a, int *lda, float *b, int *ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int *ldvsl, float *vsr, int *ldvsr, float *work, int *lwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len); -extern void sggesx_(char *jobvsl, char *jobvsr, char *sort, ACML_SGGESX_SELCTG selctg, char *sense, int *n, float *a, int *lda, float *b, int *ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int *ldvsl, float *vsr, int *ldvsr, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len, int sense_len); -extern void sggev_(char *jobvl, char *jobvr, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vl, int *ldvl, float *vr, int *ldvr, float *work, int *lwork, int *info, int jobvl_len, int jobvr_len); -extern void sggevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vl, int *ldvl, float *vr, int *ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *bwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void sggglm_(int *n, int *m, int *p, float *a, int *lda, float *b, int *ldb, float *d, float *x, float *y, float *work, int *lwork, int *info); -extern void sgghrd_(char *compq, char *compz, int *n, int *ilo, int *ihi, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *info, int compq_len, int compz_len); -extern void sgglse_(int *m, int *n, int *p, float *a, int *lda, float *b, int *ldb, float *c, float *d, float *x, float *work, int *lwork, int *info); -extern void sggqrf_(int *n, int *m, int *p, float *a, int *lda, float *taua, float *b, int *ldb, float *taub, float *work, int *lwork, int *info); -extern void sggrqf_(int *m, int *p, int *n, float *a, int *lda, float *taua, float *b, int *ldb, float *taub, float *work, int *lwork, int *info); -extern void sggsvd_(char *jobu, char *jobv, char *jobq, int *m, int *n, int *p, int *k, int *l, float *a, int *lda, float *b, int *ldb, float *alpha, float *beta, float *u, int *ldu, float *v, int *ldv, float *q, int *ldq, float *work, int *iwork, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void sggsvp_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, float *a, int *lda, float *b, int *ldb, float *tola, float *tolb, int *k, int *l, float *u, int *ldu, float *v, int *ldv, float *q, int *ldq, int *iwork, float *tau, float *work, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void sgtcon_(char *norm, int *n, float *dl, float *d, float *du, float *du2, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info, int norm_len); -extern void sgtrfs_(char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *dlf, float *df, float *duf, float *du2, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int trans_len); -extern void sgtsv_(int *n, int *nrhs, float *dl, float *d, float *du, float *b, int *ldb, int *info); -extern void sgtsvx_(char *fact, char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *dlf, float *df, float *duf, float *du2, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info, int fact_len, int trans_len); -extern void sgttrf_(int *n, float *dl, float *d, float *du, float *du2, int *ipiv, int *info); -extern void sgttrs_(char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *du2, int *ipiv, float *b, int *ldb, int *info, int trans_len); -extern void shgeqz_(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *q, int *ldq, float *z, int *ldz, float *work, int *lwork, int *info, int job_len, int compq_len, int compz_len); -extern void shsein_(char *side, char *eigsrc, char *initv, int *select, int *n, float *h, int *ldh, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *ifaill, int *ifailr, int *info, int side_len, int eigsrc_len, int initv_len); -extern void shseqr_(char *job, char *compz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, float *z, int *ldz, float *work, int *lwork, int *info, int job_len, int compz_len); - -#ifdef FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE -extern double slamch_(char *cmach, int cmach_len); -#else -extern float slamch_(char *cmach, int cmach_len); -#endif - -extern void sopgtr_(char *uplo, int *n, float *ap, float *tau, float *q, int *ldq, float *work, int *info, int uplo_len); -extern void sopmtr_(char *side, char *uplo, char *trans, int *m, int *n, float *ap, float *tau, float *c, int *ldc, float *work, int *info, int side_len, int uplo_len, int trans_len); -extern void sorgbr_(char *vect, int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info, int vect_len); -extern void sorghr_(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sorglq_(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sorgql_(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sorgqr_(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sorgrq_(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void sorgtr_(char *uplo, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info, int uplo_len); -extern void sormbr_(char *vect, char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int vect_len, int side_len, int trans_len); -extern void sormhr_(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int side_len, int trans_len); -extern void sormlq_(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int side_len, int trans_len); -extern void sormql_(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int side_len, int trans_len); -extern void sormqr_(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int side_len, int trans_len); -extern void sormr3_(char *side, char *trans, int *m, int *n, int *k, int *l, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info, int side_len, int trans_len); -extern void sormrq_(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int side_len, int trans_len); -extern void sormrz_(char *side, char *trans, int *m, int *n, int *k, int *l, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int side_len, int trans_len); -extern void sormtr_(char *side, char *uplo, char *trans, int *m, int *n, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info, int side_len, int uplo_len, int trans_len); -extern void spbcon_(char *uplo, int *n, int *kd, float *ab, int *ldab, float *anorm, float *rcond, float *work, int *iwork, int *info, int uplo_len); -extern void spbequ_(char *uplo, int *n, int *kd, float *ab, int *ldab, float *s, float *scond, float *amax, int *info, int uplo_len); -extern void spbrfs_(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len); -extern void spbstf_(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info, int uplo_len); -extern void spbsv_(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info, int uplo_len); -extern void spbsvx_(char *fact, char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void spbtrf_(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info, int uplo_len); -extern void spbtrs_(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info, int uplo_len); -extern void spocon_(char *uplo, int *n, float *a, int *lda, float *anorm, float *rcond, float *work, int *iwork, int *info, int uplo_len); -extern void spoequ_(int *n, float *a, int *lda, float *s, float *scond, float *amax, int *info); -extern void sporfs_(char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len); -extern void sposv_(char *uplo, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info, int uplo_len); -extern void sposvx_(char *fact, char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void spotrf_(char *uplo, int *n, float *a, int *lda, int *info, int uplo_len); -extern void spotri_(char *uplo, int *n, float *a, int *lda, int *info, int uplo_len); -extern void spotrs_(char *uplo, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info, int uplo_len); -extern void sppcon_(char *uplo, int *n, float *ap, float *anorm, float *rcond, float *work, int *iwork, int *info, int uplo_len); -extern void sppequ_(char *uplo, int *n, float *ap, float *s, float *scond, float *amax, int *info, int uplo_len); -extern void spprfs_(char *uplo, int *n, int *nrhs, float *ap, float *afp, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len); -extern void sppsv_(char *uplo, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info, int uplo_len); -extern void sppsvx_(char *fact, char *uplo, int *n, int *nrhs, float *ap, float *afp, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void spptrf_(char *uplo, int *n, float *ap, int *info, int uplo_len); -extern void spptri_(char *uplo, int *n, float *ap, int *info, int uplo_len); -extern void spptrs_(char *uplo, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info, int uplo_len); -extern void sptcon_(int *n, float *d, float *e, float *anorm, float *rcond, float *work, int *info); -extern void spteqr_(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info, int compz_len); -extern void sptrfs_(int *n, int *nrhs, float *d, float *e, float *df, float *ef, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *info); -extern void sptsv_(int *n, int *nrhs, float *d, float *e, float *b, int *ldb, int *info); -extern void sptsvx_(char *fact, int *n, int *nrhs, float *d, float *e, float *df, float *ef, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *info, int fact_len); -extern void spttrf_(int *n, float *d, float *e, int *info); -extern void spttrs_(int *n, int *nrhs, float *d, float *e, float *b, int *ldb, int *info); -extern void ssbev_(char *jobz, char *uplo, int *n, int *kd, float *ab, int *ldab, float *w, float *z, int *ldz, float *work, int *info, int jobz_len, int uplo_len); -extern void ssbevd_(char *jobz, char *uplo, int *n, int *kd, float *ab, int *ldab, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void ssbevx_(char *jobz, char *range, char *uplo, int *n, int *kd, float *ab, int *ldab, float *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void ssbgst_(char *vect, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *x, int *ldx, float *work, int *info, int vect_len, int uplo_len); -extern void ssbgv_(char *jobz, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *w, float *z, int *ldz, float *work, int *info, int jobz_len, int uplo_len); -extern void ssbgvd_(char *jobz, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void ssbgvx_(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void ssbtrd_(char *vect, char *uplo, int *n, int *kd, float *ab, int *ldab, float *d, float *e, float *q, int *ldq, float *work, int *info, int vect_len, int uplo_len); -extern void sspcon_(char *uplo, int *n, float *ap, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info, int uplo_len); -extern void sspev_(char *jobz, char *uplo, int *n, float *ap, float *w, float *z, int *ldz, float *work, int *info, int jobz_len, int uplo_len); -extern void sspevd_(char *jobz, char *uplo, int *n, float *ap, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void sspevx_(char *jobz, char *range, char *uplo, int *n, float *ap, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void sspgst_(int *itype, char *uplo, int *n, float *ap, float *bp, int *info, int uplo_len); -extern void sspgv_(int *itype, char *jobz, char *uplo, int *n, float *ap, float *bp, float *w, float *z, int *ldz, float *work, int *info, int jobz_len, int uplo_len); -extern void sspgvd_(int *itype, char *jobz, char *uplo, int *n, float *ap, float *bp, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void sspgvx_(int *itype, char *jobz, char *range, char *uplo, int *n, float *ap, float *bp, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void ssprfs_(char *uplo, int *n, int *nrhs, float *ap, float *afp, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len); -extern void sspsv_(char *uplo, int *n, int *nrhs, float *ap, int *ipiv, float *b, int *ldb, int *info, int uplo_len); -extern void sspsvx_(char *fact, char *uplo, int *n, int *nrhs, float *ap, float *afp, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info, int fact_len, int uplo_len); -extern void ssptrd_(char *uplo, int *n, float *ap, float *d, float *e, float *tau, int *info, int uplo_len); -extern void ssptrf_(char *uplo, int *n, float *ap, int *ipiv, int *info, int uplo_len); -extern void ssptri_(char *uplo, int *n, float *ap, int *ipiv, float *work, int *info, int uplo_len); -extern void ssptrs_(char *uplo, int *n, int *nrhs, float *ap, int *ipiv, float *b, int *ldb, int *info, int uplo_len); -extern void sstebz_(char *range, char *order, int *n, float *vl, float *vu, int *il, int *iu, float *abstol, float *d, float *e, int *m, int *nsplit, float *w, int *iblock, int *isplit, float *work, int *iwork, int *info, int range_len, int order_len); -extern void sstedc_(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info, int compz_len); -extern void sstegr_(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len); -extern void sstein_(int *n, float *d, float *e, int *m, float *w, int *iblock, int *isplit, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info); -extern void ssteqr_(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info, int compz_len); -extern void ssterf_(int *n, float *d, float *e, int *info); -extern void sstev_(char *jobz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info, int jobz_len); -extern void sstevd_(char *jobz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len); -extern void sstevr_(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len); -extern void sstevx_(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info, int jobz_len, int range_len); -extern void ssycon_(char *uplo, int *n, float *a, int *lda, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info, int uplo_len); -extern void ssyev_(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, int *info, int jobz_len, int uplo_len); -extern void ssyevd_(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void ssyevr_(char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len, int uplo_len); -extern void ssyevx_(char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void ssygst_(int *itype, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, int *info, int uplo_len); -extern void ssygv_(int *itype, char *jobz, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *w, float *work, int *lwork, int *info, int jobz_len, int uplo_len); -extern void ssygvd_(int *itype, char *jobz, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *w, float *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void ssygvx_(int *itype, char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void ssyrfs_(char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len); -extern void ssysv_(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, float *work, int *lwork, int *info, int uplo_len); -extern void ssysvx_(char *fact, char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *lwork, int *iwork, int *info, int fact_len, int uplo_len); -extern void ssytrd_(char *uplo, int *n, float *a, int *lda, float *d, float *e, float *tau, float *work, int *lwork, int *info, int uplo_len); -extern void ssytrf_(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info, int uplo_len); -extern void ssytri_(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *info, int uplo_len); -extern void ssytrs_(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info, int uplo_len); -extern void stbcon_(char *norm, char *uplo, char *diag, int *n, int *kd, float *ab, int *ldab, float *rcond, float *work, int *iwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void stbrfs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void stbtrs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void stgevc_(char *side, char *howmny, int *select, int *n, float *a, int *lda, float *b, int *ldb, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *info, int side_len, int howmny_len); -extern void stgexc_(int *wantq, int *wantz, int *n, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *ifst, int *ilst, float *work, int *lwork, int *info); -extern void stgsen_(int *ijob, int *wantq, int *wantz, int *select, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *q, int *ldq, float *z, int *ldz, int *m, float *pl, float *pr, float *dif, float *work, int *lwork, int *iwork, int *liwork, int *info); -extern void stgsja_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, float *a, int *lda, float *b, int *ldb, float *tola, float *tolb, float *alpha, float *beta, float *u, int *ldu, float *v, int *ldv, float *q, int *ldq, float *work, int *ncycle, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void stgsna_(char *job, char *howmny, int *select, int *n, float *a, int *lda, float *b, int *ldb, float *vl, int *ldvl, float *vr, int *ldvr, float *s, float *dif, int *mm, int *m, float *work, int *lwork, int *iwork, int *info, int job_len, int howmny_len); -extern void stgsyl_(char *trans, int *ijob, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *d, int *ldd, float *e, int *lde, float *f, int *ldf, float *scale, float *dif, float *work, int *lwork, int *iwork, int *info, int trans_len); -extern void stpcon_(char *norm, char *uplo, char *diag, int *n, float *ap, float *rcond, float *work, int *iwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void stprfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *ap, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void stptri_(char *uplo, char *diag, int *n, float *ap, int *info, int uplo_len, int diag_len); -extern void stptrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void strcon_(char *norm, char *uplo, char *diag, int *n, float *a, int *lda, float *rcond, float *work, int *iwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void strevc_(char *side, char *howmny, int *select, int *n, float *t, int *ldt, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *info, int side_len, int howmny_len); -extern void strexc_(char *compq, int *n, float *t, int *ldt, float *q, int *ldq, int *ifst, int *ilst, float *work, int *info, int compq_len); -extern void strrfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void strsen_(char *job, char *compq, int *select, int *n, float *t, int *ldt, float *q, int *ldq, float *wr, float *wi, int *m, float *s, float *sep, float *work, int *lwork, int *iwork, int *liwork, int *info, int job_len, int compq_len); -extern void strsna_(char *job, char *howmny, int *select, int *n, float *t, int *ldt, float *vl, int *ldvl, float *vr, int *ldvr, float *s, float *sep, int *mm, int *m, float *work, int *ldwork, int *iwork, int *info, int job_len, int howmny_len); -extern void strsyl_(char *trana, char *tranb, int *isgn, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *scale, int *info, int trana_len, int tranb_len); -extern void strtri_(char *uplo, char *diag, int *n, float *a, int *lda, int *info, int uplo_len, int diag_len); -extern void strtrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void stzrqf_(int *m, int *n, float *a, int *lda, float *tau, int *info); -extern void stzrzf_(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info); -extern void zbdsqr_(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, doublecomplex *vt, int *ldvt, doublecomplex *u, int *ldu, doublecomplex *c, int *ldc, double *rwork, int *info, int uplo_len); -extern void zgbbrd_(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, doublecomplex *ab, int *ldab, double *d, double *e, doublecomplex *q, int *ldq, doublecomplex *pt, int *ldpt, doublecomplex *c, int *ldc, doublecomplex *work, double *rwork, int *info, int vect_len); -extern void zgbcon_(char *norm, int *n, int *kl, int *ku, doublecomplex *ab, int *ldab, int *ipiv, double *anorm, double *rcond, doublecomplex *work, double *rwork, int *info, int norm_len); -extern void zgbequ_(int *m, int *n, int *kl, int *ku, doublecomplex *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); -extern void zgbrfs_(char *trans, int *n, int *kl, int *ku, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *afb, int *ldafb, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int trans_len); -extern void zgbsv_(int *n, int *kl, int *ku, int *nrhs, doublecomplex *ab, int *ldab, int *ipiv, doublecomplex *b, int *ldb, int *info); -extern void zgbsvx_(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *afb, int *ldafb, int *ipiv, char *equed, double *r, double *c, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int trans_len, int equed_len); -extern void zgbtrf_(int *m, int *n, int *kl, int *ku, doublecomplex *ab, int *ldab, int *ipiv, int *info); -extern void zgbtrs_(char *trans, int *n, int *kl, int *ku, int *nrhs, doublecomplex *ab, int *ldab, int *ipiv, doublecomplex *b, int *ldb, int *info, int trans_len); -extern void zgebak_(char *job, char *side, int *n, int *ilo, int *ihi, double *scale, int *m, doublecomplex *v, int *ldv, int *info, int job_len, int side_len); -extern void zgebal_(char *job, int *n, doublecomplex *a, int *lda, int *ilo, int *ihi, double *scale, int *info, int job_len); -extern void zgebrd_(int *m, int *n, doublecomplex *a, int *lda, double *d, double *e, doublecomplex *tauq, doublecomplex *taup, doublecomplex *work, int *lwork, int *info); -extern void zgecon_(char *norm, int *n, doublecomplex *a, int *lda, double *anorm, double *rcond, doublecomplex *work, double *rwork, int *info, int norm_len); -extern void zgeequ_(int *m, int *n, doublecomplex *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info); -extern void zgees_(char *jobvs, char *sort, ACML_ZGEES_SELECT select, int *n, doublecomplex *a, int *lda, int *sdim, doublecomplex *w, doublecomplex *vs, int *ldvs, doublecomplex *work, int *lwork, double *rwork, int *bwork, int *info, int jobvs_len, int sort_len); -extern void zgeesx_(char *jobvs, char *sort, ACML_ZGEESX_SELECT select, char *sense, int *n, doublecomplex *a, int *lda, int *sdim, doublecomplex *w, doublecomplex *vs, int *ldvs, double *rconde, double *rcondv, doublecomplex *work, int *lwork, double *rwork, int *bwork, int *info, int jobvs_len, int sort_len, int sense_len); -extern void zgeev_(char *jobvl, char *jobvr, int *n, doublecomplex *a, int *lda, doublecomplex *w, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, doublecomplex *work, int *lwork, double *rwork, int *info, int jobvl_len, int jobvr_len); -extern void zgeevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, doublecomplex *a, int *lda, doublecomplex *w, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, doublecomplex *work, int *lwork, double *rwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void zgegs_(char *jobvsl, char *jobvsr, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, int *ldvsl, doublecomplex *vsr, int *ldvsr, doublecomplex *work, int *lwork, double *rwork, int *info, int jobvsl_len, int jobvsr_len); -extern void zgegv_(char *jobvl, char *jobvr, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, doublecomplex *work, int *lwork, double *rwork, int *info, int jobvl_len, int jobvr_len); -extern void zgehrd_(int *n, int *ilo, int *ihi, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zgelqf_(int *m, int *n, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zgels_(char *trans, int *m, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *work, int *lwork, int *info, int trans_len); -extern void zgelsd_(int *m, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *s, double *rcond, int *rank, doublecomplex *work, int *lwork, double *rwork, int *iwork, int *info); -extern void zgelss_(int *m, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *s, double *rcond, int *rank, doublecomplex *work, int *lwork, double *rwork, int *info); -extern void zgelsx_(int *m, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *jpvt, double *rcond, int *rank, doublecomplex *work, double *rwork, int *info); -extern void zgelsy_(int *m, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *jpvt, double *rcond, int *rank, doublecomplex *work, int *lwork, double *rwork, int *info); -extern void zgeqlf_(int *m, int *n, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zgeqp3_(int *m, int *n, doublecomplex *a, int *lda, int *jpvt, doublecomplex *tau, doublecomplex *work, int *lwork, double *rwork, int *info); -extern void zgeqpf_(int *m, int *n, doublecomplex *a, int *lda, int *jpvt, doublecomplex *tau, doublecomplex *work, double *rwork, int *info); -extern void zgeqrf_(int *m, int *n, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zgerfs_(char *trans, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int trans_len); -extern void zgerqf_(int *m, int *n, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zgesdd_(char *jobz, int *m, int *n, doublecomplex *a, int *lda, double *s, doublecomplex *u, int *ldu, doublecomplex *vt, int *ldvt, doublecomplex *work, int *lwork, double *rwork, int *iwork, int *info, int jobz_len); -extern void zgesv_(int *n, int *nrhs, doublecomplex *a, int *lda, int *ipiv, doublecomplex *b, int *ldb, int *info); -extern void zgesvd_(char *jobu, char *jobvt, int *m, int *n, doublecomplex *a, int *lda, double *s, doublecomplex *u, int *ldu, doublecomplex *vt, int *ldvt, doublecomplex *work, int *lwork, double *rwork, int *info, int jobu_len, int jobvt_len); -extern void zgesvx_(char *fact, char *trans, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int trans_len, int equed_len); -extern void zgetrf_(int *m, int *n, doublecomplex *a, int *lda, int *ipiv, int *info); -extern void zgetri_(int *n, doublecomplex *a, int *lda, int *ipiv, doublecomplex *work, int *lwork, int *info); -extern void zgetrs_(char *trans, int *n, int *nrhs, doublecomplex *a, int *lda, int *ipiv, doublecomplex *b, int *ldb, int *info, int trans_len); -extern void zggbak_(char *job, char *side, int *n, int *ilo, int *ihi, double *lscale, double *rscale, int *m, doublecomplex *v, int *ldv, int *info, int job_len, int side_len); -extern void zggbal_(char *job, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *ilo, int *ihi, double *lscale, double *rscale, double *work, int *info, int job_len); -extern void zgges_(char *jobvsl, char *jobvsr, char *sort, ACML_ZGGES_DELCTG delctg, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *sdim, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, int *ldvsl, doublecomplex *vsr, int *ldvsr, doublecomplex *work, int *lwork, double *rwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len); -extern void zggesx_(char *jobvsl, char *jobvsr, char *sort, ACML_ZGGESX_DELCTG delctg, char *sense, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *sdim, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vsl, int *ldvsl, doublecomplex *vsr, int *ldvsr, double *rconde, double *rcondv, doublecomplex *work, int *lwork, double *rwork, int *iwork, int *liwork, int *bwork, int *info, int jobvsl_len, int jobvsr_len, int sort_len, int sense_len); -extern void zggev_(char *jobvl, char *jobvr, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, doublecomplex *work, int *lwork, double *rwork, int *info, int jobvl_len, int jobvr_len); -extern void zggevx_(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, doublecomplex *work, int *lwork, double *rwork, int *iwork, int *bwork, int *info, int balanc_len, int jobvl_len, int jobvr_len, int sense_len); -extern void zggglm_(int *n, int *m, int *p, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *d, doublecomplex *x, doublecomplex *y, doublecomplex *work, int *lwork, int *info); -extern void zgghrd_(char *compq, char *compz, int *n, int *ilo, int *ihi, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *q, int *ldq, doublecomplex *z, int *ldz, int *info, int compq_len, int compz_len); -extern void zgglse_(int *m, int *n, int *p, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *c, doublecomplex *d, doublecomplex *x, doublecomplex *work, int *lwork, int *info); -extern void zggqrf_(int *n, int *m, int *p, doublecomplex *a, int *lda, doublecomplex *taua, doublecomplex *b, int *ldb, doublecomplex *taub, doublecomplex *work, int *lwork, int *info); -extern void zggrqf_(int *m, int *p, int *n, doublecomplex *a, int *lda, doublecomplex *taua, doublecomplex *b, int *ldb, doublecomplex *taub, doublecomplex *work, int *lwork, int *info); -extern void zggsvd_(char *jobu, char *jobv, char *jobq, int *m, int *n, int *p, int *k, int *l, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *alpha, double *beta, doublecomplex *u, int *ldu, doublecomplex *v, int *ldv, doublecomplex *q, int *ldq, doublecomplex *work, double *rwork, int *iwork, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void zggsvp_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *tola, double *tolb, int *k, int *l, doublecomplex *u, int *ldu, doublecomplex *v, int *ldv, doublecomplex *q, int *ldq, int *iwork, double *rwork, doublecomplex *tau, doublecomplex *work, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void zgtcon_(char *norm, int *n, doublecomplex *dl, doublecomplex *d, doublecomplex *du, doublecomplex *du2, int *ipiv, double *anorm, double *rcond, doublecomplex *work, int *info, int norm_len); -extern void zgtrfs_(char *trans, int *n, int *nrhs, doublecomplex *dl, doublecomplex *d, doublecomplex *du, doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, doublecomplex *du2, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int trans_len); -extern void zgtsv_(int *n, int *nrhs, doublecomplex *dl, doublecomplex *d, doublecomplex *du, doublecomplex *b, int *ldb, int *info); -extern void zgtsvx_(char *fact, char *trans, int *n, int *nrhs, doublecomplex *dl, doublecomplex *d, doublecomplex *du, doublecomplex *dlf, doublecomplex *df, doublecomplex *duf, doublecomplex *du2, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int trans_len); -extern void zgttrf_(int *n, doublecomplex *dl, doublecomplex *d, doublecomplex *du, doublecomplex *du2, int *ipiv, int *info); -extern void zgttrs_(char *trans, int *n, int *nrhs, doublecomplex *dl, doublecomplex *d, doublecomplex *du, doublecomplex *du2, int *ipiv, doublecomplex *b, int *ldb, int *info, int trans_len); -extern void zhbev_(char *jobz, char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *info, int jobz_len, int uplo_len); -extern void zhbevd_(char *jobz, char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, double *w, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void zhbevx_(char *jobz, char *range, char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, doublecomplex *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void zhbgst_(char *vect, char *uplo, int *n, int *ka, int *kb, doublecomplex *ab, int *ldab, doublecomplex *bb, int *ldbb, doublecomplex *x, int *ldx, doublecomplex *work, double *rwork, int *info, int vect_len, int uplo_len); -extern void zhbgv_(char *jobz, char *uplo, int *n, int *ka, int *kb, doublecomplex *ab, int *ldab, doublecomplex *bb, int *ldbb, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *info, int jobz_len, int uplo_len); -extern void zhbgvd_(char *jobz, char *uplo, int *n, int *ka, int *kb, doublecomplex *ab, int *ldab, doublecomplex *bb, int *ldbb, double *w, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void zhbgvx_(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, doublecomplex *ab, int *ldab, doublecomplex *bb, int *ldbb, doublecomplex *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void zhbtrd_(char *vect, char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, double *d, double *e, doublecomplex *q, int *ldq, doublecomplex *work, int *info, int vect_len, int uplo_len); -extern void zhecon_(char *uplo, int *n, doublecomplex *a, int *lda, int *ipiv, double *anorm, double *rcond, doublecomplex *work, int *info, int uplo_len); -extern void zheev_(char *jobz, char *uplo, int *n, doublecomplex *a, int *lda, double *w, doublecomplex *work, int *lwork, double *rwork, int *info, int jobz_len, int uplo_len); -extern void zheevd_(char *jobz, char *uplo, int *n, doublecomplex *a, int *lda, double *w, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void zheevr_(char *jobz, char *range, char *uplo, int *n, doublecomplex *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, int *isuppz, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len, int uplo_len); -extern void zheevx_(char *jobz, char *range, char *uplo, int *n, doublecomplex *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void zhegst_(int *itype, char *uplo, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zhegv_(int *itype, char *jobz, char *uplo, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *w, doublecomplex *work, int *lwork, double *rwork, int *info, int jobz_len, int uplo_len); -extern void zhegvd_(int *itype, char *jobz, char *uplo, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *w, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void zhegvx_(int *itype, char *jobz, char *range, char *uplo, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void zherfs_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zhesv_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *work, int *lwork, int *info, int uplo_len); -extern void zhesvx_(char *fact, char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, int *lwork, double *rwork, int *info, int fact_len, int uplo_len); -extern void zhetrd_(char *uplo, int *n, doublecomplex *a, int *lda, double *d, double *e, doublecomplex *tau, doublecomplex *work, int *lwork, int *info, int uplo_len); -extern void zhetrf_(char *uplo, int *n, doublecomplex *a, int *lda, int *ipiv, doublecomplex *work, int *lwork, int *info, int uplo_len); -extern void zhetri_(char *uplo, int *n, doublecomplex *a, int *lda, int *ipiv, doublecomplex *work, int *info, int uplo_len); -extern void zhetrs_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, int *ipiv, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zhgeqz_(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *q, int *ldq, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *info, int job_len, int compq_len, int compz_len); -extern void zhpcon_(char *uplo, int *n, doublecomplex *ap, int *ipiv, double *anorm, double *rcond, doublecomplex *work, int *info, int uplo_len); -extern void zhpev_(char *jobz, char *uplo, int *n, doublecomplex *ap, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *info, int jobz_len, int uplo_len); -extern void zhpevd_(char *jobz, char *uplo, int *n, doublecomplex *ap, double *w, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void zhpevx_(char *jobz, char *range, char *uplo, int *n, doublecomplex *ap, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void zhpgst_(int *itype, char *uplo, int *n, doublecomplex *ap, doublecomplex *bp, int *info, int uplo_len); -extern void zhpgv_(int *itype, char *jobz, char *uplo, int *n, doublecomplex *ap, doublecomplex *bp, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *info, int jobz_len, int uplo_len); -extern void zhpgvd_(int *itype, char *jobz, char *uplo, int *n, doublecomplex *ap, doublecomplex *bp, double *w, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int jobz_len, int uplo_len); -extern void zhpgvx_(int *itype, char *jobz, char *range, char *uplo, int *n, doublecomplex *ap, doublecomplex *bp, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, doublecomplex *work, double *rwork, int *iwork, int *ifail, int *info, int jobz_len, int range_len, int uplo_len); -extern void zhprfs_(char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *afp, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zhpsv_(char *uplo, int *n, int *nrhs, doublecomplex *ap, int *ipiv, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zhpsvx_(char *fact, char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *afp, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int uplo_len); -extern void zhptrd_(char *uplo, int *n, doublecomplex *ap, double *d, double *e, doublecomplex *tau, int *info, int uplo_len); -extern void zhptrf_(char *uplo, int *n, doublecomplex *ap, int *ipiv, int *info, int uplo_len); -extern void zhptri_(char *uplo, int *n, doublecomplex *ap, int *ipiv, doublecomplex *work, int *info, int uplo_len); -extern void zhptrs_(char *uplo, int *n, int *nrhs, doublecomplex *ap, int *ipiv, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zhsein_(char *side, char *eigsrc, char *initv, int *select, int *n, doublecomplex *h, int *ldh, doublecomplex *w, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, int *mm, int *m, doublecomplex *work, double *rwork, int *ifaill, int *ifailr, int *info, int side_len, int eigsrc_len, int initv_len); -extern void zhseqr_(char *job, char *compz, int *n, int *ilo, int *ihi, doublecomplex *h, int *ldh, doublecomplex *w, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, int *info, int job_len, int compz_len); -extern void zpbcon_(char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, double *anorm, double *rcond, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zpbequ_(char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, double *s, double *scond, double *amax, int *info, int uplo_len); -extern void zpbrfs_(char *uplo, int *n, int *kd, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *afb, int *ldafb, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zpbstf_(char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, int *info, int uplo_len); -extern void zpbsv_(char *uplo, int *n, int *kd, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zpbsvx_(char *fact, char *uplo, int *n, int *kd, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *afb, int *ldafb, char *equed, double *s, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void zpbtrf_(char *uplo, int *n, int *kd, doublecomplex *ab, int *ldab, int *info, int uplo_len); -extern void zpbtrs_(char *uplo, int *n, int *kd, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zpocon_(char *uplo, int *n, doublecomplex *a, int *lda, double *anorm, double *rcond, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zpoequ_(int *n, doublecomplex *a, int *lda, double *s, double *scond, double *amax, int *info); -extern void zporfs_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zposv_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zposvx_(char *fact, char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, char *equed, double *s, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void zpotrf_(char *uplo, int *n, doublecomplex *a, int *lda, int *info, int uplo_len); -extern void zpotri_(char *uplo, int *n, doublecomplex *a, int *lda, int *info, int uplo_len); -extern void zpotrs_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zppcon_(char *uplo, int *n, doublecomplex *ap, double *anorm, double *rcond, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zppequ_(char *uplo, int *n, doublecomplex *ap, double *s, double *scond, double *amax, int *info, int uplo_len); -extern void zpprfs_(char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *afp, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zppsv_(char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zppsvx_(char *fact, char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *afp, char *equed, double *s, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int uplo_len, int equed_len); -extern void zpptrf_(char *uplo, int *n, doublecomplex *ap, int *info, int uplo_len); -extern void zpptri_(char *uplo, int *n, doublecomplex *ap, int *info, int uplo_len); -extern void zpptrs_(char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zptcon_(int *n, double *d, doublecomplex *e, double *anorm, double *rcond, double *rwork, int *info); -extern void zpteqr_(char *compz, int *n, double *d, double *e, doublecomplex *z, int *ldz, double *work, int *info, int compz_len); -extern void zptrfs_(char *uplo, int *n, int *nrhs, double *d, doublecomplex *e, double *df, doublecomplex *ef, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zptsv_(int *n, int *nrhs, double *d, doublecomplex *e, doublecomplex *b, int *ldb, int *info); -extern void zptsvx_(char *fact, int *n, int *nrhs, double *d, doublecomplex *e, double *df, doublecomplex *ef, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len); -extern void zpttrf_(int *n, double *d, doublecomplex *e, int *info); -extern void zpttrs_(char *uplo, int *n, int *nrhs, double *d, doublecomplex *e, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zspcon_(char *uplo, int *n, doublecomplex *ap, int *ipiv, double *anorm, double *rcond, doublecomplex *work, int *info, int uplo_len); -extern void zsprfs_(char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *afp, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zspsv_(char *uplo, int *n, int *nrhs, doublecomplex *ap, int *ipiv, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zspsvx_(char *fact, char *uplo, int *n, int *nrhs, doublecomplex *ap, doublecomplex *afp, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int fact_len, int uplo_len); -extern void zsptrf_(char *uplo, int *n, doublecomplex *ap, int *ipiv, int *info, int uplo_len); -extern void zsptri_(char *uplo, int *n, doublecomplex *ap, int *ipiv, doublecomplex *work, int *info, int uplo_len); -extern void zsptrs_(char *uplo, int *n, int *nrhs, doublecomplex *ap, int *ipiv, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void zstedc_(char *compz, int *n, double *d, double *e, doublecomplex *z, int *ldz, doublecomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info, int compz_len); -extern void zstegr_(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, doublecomplex *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info, int jobz_len, int range_len); -extern void zstein_(int *n, double *d, double *e, int *m, double *w, int *iblock, int *isplit, doublecomplex *z, int *ldz, double *work, int *iwork, int *ifail, int *info); -extern void zsteqr_(char *compz, int *n, double *d, double *e, doublecomplex *z, int *ldz, double *work, int *info, int compz_len); -extern void zsycon_(char *uplo, int *n, doublecomplex *a, int *lda, int *ipiv, double *anorm, double *rcond, doublecomplex *work, int *info, int uplo_len); -extern void zsyrfs_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len); -extern void zsysv_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *work, int *lwork, int *info, int uplo_len); -extern void zsysvx_(char *fact, char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *af, int *ldaf, int *ipiv, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *rcond, double *ferr, double *berr, doublecomplex *work, int *lwork, double *rwork, int *info, int fact_len, int uplo_len); -extern void zsytrf_(char *uplo, int *n, doublecomplex *a, int *lda, int *ipiv, doublecomplex *work, int *lwork, int *info, int uplo_len); -extern void zsytri_(char *uplo, int *n, doublecomplex *a, int *lda, int *ipiv, doublecomplex *work, int *info, int uplo_len); -extern void zsytrs_(char *uplo, int *n, int *nrhs, doublecomplex *a, int *lda, int *ipiv, doublecomplex *b, int *ldb, int *info, int uplo_len); -extern void ztbcon_(char *norm, char *uplo, char *diag, int *n, int *kd, doublecomplex *ab, int *ldab, double *rcond, doublecomplex *work, double *rwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void ztbrfs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void ztbtrs_(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, doublecomplex *ab, int *ldab, doublecomplex *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void ztgevc_(char *side, char *howmny, int *select, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, int *mm, int *m, doublecomplex *work, double *rwork, int *info, int side_len, int howmny_len); -extern void ztgexc_(int *wantq, int *wantz, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *q, int *ldq, doublecomplex *z, int *ldz, int *ifst, int *ilst, int *info); -extern void ztgsen_(int *ijob, int *wantq, int *wantz, int *select, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *alpha, doublecomplex *beta, doublecomplex *q, int *ldq, doublecomplex *z, int *ldz, int *m, double *pl, double *pr, double *dif, doublecomplex *work, int *lwork, int *iwork, int *liwork, int *info); -extern void ztgsja_(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, double *tola, double *tolb, double *alpha, double *beta, doublecomplex *u, int *ldu, doublecomplex *v, int *ldv, doublecomplex *q, int *ldq, doublecomplex *work, int *ncycle, int *info, int jobu_len, int jobv_len, int jobq_len); -extern void ztgsna_(char *job, char *howmny, int *select, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, double *s, double *dif, int *mm, int *m, doublecomplex *work, int *lwork, int *iwork, int *info, int job_len, int howmny_len); -extern void ztgsyl_(char *trans, int *ijob, int *m, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *c, int *ldc, doublecomplex *d, int *ldd, doublecomplex *e, int *lde, doublecomplex *f, int *ldf, double *scale, double *dif, doublecomplex *work, int *lwork, int *iwork, int *info, int trans_len); -extern void ztpcon_(char *norm, char *uplo, char *diag, int *n, doublecomplex *ap, double *rcond, doublecomplex *work, double *rwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void ztprfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, doublecomplex *ap, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void ztptri_(char *uplo, char *diag, int *n, doublecomplex *ap, int *info, int uplo_len, int diag_len); -extern void ztptrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, doublecomplex *ap, doublecomplex *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void ztrcon_(char *norm, char *uplo, char *diag, int *n, doublecomplex *a, int *lda, double *rcond, doublecomplex *work, double *rwork, int *info, int norm_len, int uplo_len, int diag_len); -extern void ztrevc_(char *side, char *howmny, int *select, int *n, doublecomplex *t, int *ldt, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, int *mm, int *m, doublecomplex *work, double *rwork, int *info, int side_len, int howmny_len); -extern void ztrexc_(char *compq, int *n, doublecomplex *t, int *ldt, doublecomplex *q, int *ldq, int *ifst, int *ilst, int *info, int compq_len); -extern void ztrrfs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *x, int *ldx, double *ferr, double *berr, doublecomplex *work, double *rwork, int *info, int uplo_len, int trans_len, int diag_len); -extern void ztrsen_(char *job, char *compq, int *select, int *n, doublecomplex *t, int *ldt, doublecomplex *q, int *ldq, doublecomplex *w, int *m, double *s, double *sep, doublecomplex *work, int *lwork, int *info, int job_len, int compq_len); -extern void ztrsna_(char *job, char *howmny, int *select, int *n, doublecomplex *t, int *ldt, doublecomplex *vl, int *ldvl, doublecomplex *vr, int *ldvr, double *s, double *sep, int *mm, int *m, doublecomplex *work, int *ldwork, double *rwork, int *info, int job_len, int howmny_len); -extern void ztrsyl_(char *trana, char *tranb, int *isgn, int *m, int *n, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, doublecomplex *c, int *ldc, double *scale, int *info, int trana_len, int tranb_len); -extern void ztrtri_(char *uplo, char *diag, int *n, doublecomplex *a, int *lda, int *info, int uplo_len, int diag_len); -extern void ztrtrs_(char *uplo, char *trans, char *diag, int *n, int *nrhs, doublecomplex *a, int *lda, doublecomplex *b, int *ldb, int *info, int uplo_len, int trans_len, int diag_len); -extern void ztzrqf_(int *m, int *n, doublecomplex *a, int *lda, doublecomplex *tau, int *info); -extern void ztzrzf_(int *m, int *n, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zungbr_(char *vect, int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info, int vect_len); -extern void zunghr_(int *n, int *ilo, int *ihi, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zunglq_(int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zungql_(int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zungqr_(int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zungrq_(int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info); -extern void zungtr_(char *uplo, int *n, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *work, int *lwork, int *info, int uplo_len); -extern void zunmbr_(char *vect, char *side, char *trans, int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int vect_len, int side_len, int trans_len); -extern void zunmhr_(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int side_len, int trans_len); -extern void zunmlq_(char *side, char *trans, int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int side_len, int trans_len); -extern void zunmql_(char *side, char *trans, int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int side_len, int trans_len); -extern void zunmqr_(char *side, char *trans, int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int side_len, int trans_len); -extern void zunmr3_(char *side, char *trans, int *m, int *n, int *k, int *l, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *info, int side_len, int trans_len); -extern void zunmrq_(char *side, char *trans, int *m, int *n, int *k, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int side_len, int trans_len); -extern void zunmrz_(char *side, char *trans, int *m, int *n, int *k, int *l, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int side_len, int trans_len); -extern void zunmtr_(char *side, char *uplo, char *trans, int *m, int *n, doublecomplex *a, int *lda, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *lwork, int *info, int side_len, int uplo_len, int trans_len); -extern void zupgtr_(char *uplo, int *n, doublecomplex *ap, doublecomplex *tau, doublecomplex *q, int *ldq, doublecomplex *work, int *info, int uplo_len); -extern void zupmtr_(char *side, char *uplo, char *trans, int *m, int *n, doublecomplex *ap, doublecomplex *tau, doublecomplex *c, int *ldc, doublecomplex *work, int *info, int side_len, int uplo_len, int trans_len); - -/* FFT routines */ -extern void cfft1d_(int *mode, int *n, complex *x, complex *comm, int *info); -extern void cfft1dx_(int *mode, float *scale, int *inpl, int *n, complex *x, int *incx, complex *y, int *incy, complex *comm, int *info); -extern void cfft1m_(int *mode, int *nseq, int *n, complex *x, complex *comm, int *info); -extern void cfft1mx_(int *mode, float *scale, int *inpl, int *nseq, int *n, complex *x, int *incx1, int *incx2, complex *y, int *incy1, int *incy2, complex *comm, int *info); -extern void cfft2d_(int *mode, int *m, int *n, complex *x, complex *comm, int *info); -extern void cfft2dx_(int *mode, float *scale, int *ltrans, int *inpl, int *m, int *n, complex *x, int *incx1, int *incx2, complex *y, int *incy1, int *incy2, complex *comm, int *info); -extern void cfft3d_(int *mode, int *l, int *m, int *n, complex *x, complex *comm, int *info); -extern void cfft3dx_(int *mode, float *scale, int *ltrans, int *inpl, int *l, int *m, int *n, complex *x, complex *y, complex *comm, int *info); -extern void cfft3dy_(int *mode, float *scale, int *inpl, int *l, int *m, int *n, complex *x, int *incx1, int *incx2, int *incx3, complex *y, int *incy1, int *incy2, int *incy3, complex *comm, int *lcomm, int *info); -extern void csfft_(int *mode, int *n, float *x, float *comm, int *info); -extern void csfftm_(int *nseq, int *n, float *x, float *comm, int *info); -extern void dzfft_(int *mode, int *n, double *x, double *comm, int *info); -extern void dzfftm_(int *nseq, int *n, double *x, double *comm, int *info); -extern void scfft_(int *mode, int *n, float *x, float *comm, int *info); -extern void scfftm_(int *nseq, int *n, float *x, float *comm, int *info); -extern void zdfft_(int *mode, int *n, double *x, double *comm, int *info); -extern void zdfftm_(int *nseq, int *n, double *x, double *comm, int *info); -extern void zfft1d_(int *mode, int *n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft1dx_(int *mode, double *scale, int *inpl, int *n, doublecomplex *x, int *incx, doublecomplex *y, int *incy, doublecomplex *comm, int *info); -extern void zfft1m_(int *mode, int *nseq, int *n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft1mx_(int *mode, double *scale, int *inpl, int *nseq, int *n, doublecomplex *x, int *incx1, int *incx2, doublecomplex *y, int *incy1, int *incy2, doublecomplex *comm, int *info); -extern void zfft2d_(int *mode, int *m, int *n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft2dx_(int *mode, double *scale, int *ltrans, int *inpl, int *m, int *n, doublecomplex *x, int *incx1, int *incx2, doublecomplex *y, int *incy1, int *incy2, doublecomplex *comm, int *info); -extern void zfft3d_(int *mode, int *l, int *m, int *n, doublecomplex *x, doublecomplex *comm, int *info); -extern void zfft3dx_(int *mode, double *scale, int *ltrans, int *inpl, int *l, int *m, int *n, doublecomplex *x, doublecomplex *y, doublecomplex *comm, int *info); -extern void zfft3dy_(int *mode, double *scale, int *inpl, int *l, int *m, int *n, doublecomplex *x, int *incx1, int *incx2, int *incx3, doublecomplex *y, int *incy1, int *incy2, int *incy3, doublecomplex *comm, int *lcomm, int *info); - -/* Sparse BLAS routines */ -extern void caxpyi_(int *nz, complex *a, complex *x, int *indx, complex *y); -extern complex cdotci_(complex *ret_val, int *nz, complex *x, int *indx, complex *y); -extern void cdotcisub_(complex *ret_val, int *nz, complex *x, int *indx, complex *y); -extern complex cdotui_(complex *ret_val, int *nz, complex *x, int *indx, complex *y); -extern void cdotuisub_(complex *ret_val, int *nz, complex *x, int *indx, complex *y); -extern void cgthr_(int *nz, complex *y, complex *x, int *indx); -extern void cgthrz_(int *nz, complex *y, complex *x, int *indx); -extern void csctr_(int *nz, complex *x, int *indx, complex *y); -extern void daxpyi_(int *nz, double *a, double *x, int *indx, double *y); -extern double ddoti_(int *nz, double *x, int *indx, double *y); -extern void dgthr_(int *nz, double *y, double *x, int *indx); -extern void dgthrz_(int *nz, double *y, double *x, int *indx); -extern void droti_(int *nz, double *x, int *indx, double *y, double *c, double *s); -extern void dsctr_(int *nz, double *x, int *indx, double *y); -extern void saxpyi_(int *nz, float *a, float *x, int *indx, float *y); - -#ifdef FORTRAN_FLOAT_FUNCTIONS_RETURN_DOUBLE -extern double sdoti_(int *nz, float *x, int *indx, float *y); -#else -extern float sdoti_(int *nz, float *x, int *indx, float *y); -#endif - -extern void sgthr_(int *nz, float *y, float *x, int *indx); -extern void sgthrz_(int *nz, float *y, float *x, int *indx); -extern void sroti_(int *nz, float *x, int *indx, float *y, float *c, float *s); -extern void ssctr_(int *nz, float *x, int *indx, float *y); -extern void zaxpyi_(int *nz, doublecomplex *a, doublecomplex *x, int *indx, doublecomplex *y); -extern doublecomplex zdotci_(doublecomplex *ret_val, int *nz, doublecomplex *x, int *indx, doublecomplex *y); -extern void zdotcisub_(doublecomplex *ret_val, int *nz, doublecomplex *x, int *indx, doublecomplex *y); -extern doublecomplex zdotui_(doublecomplex *ret_val, int *nz, doublecomplex *x, int *indx, doublecomplex *y); -extern void zdotuisub_(doublecomplex *ret_val, int *nz, doublecomplex *x, int *indx, doublecomplex *y); -extern void zgthr_(int *nz, doublecomplex *y, doublecomplex *x, int *indx); -extern void zgthrz_(int *nz, doublecomplex *y, doublecomplex *x, int *indx); -extern void zsctr_(int *nz, doublecomplex *x, int *indx, doublecomplex *y); - -/* Random number generators */ -extern void drandbeta_(int *n, double *a, double *b, int *state, double *x, int *info); -extern void drandbinomial_(int *n, int *m, double *p, int *state, int *x, int *info); -extern void drandbinomialreference_(int *m, double *p, double *ref, int *lref, int *info); -extern void drandblumblumshub_(int *n, int *state, double *x, int *info); -extern void drandcauchy_(int *n, double *a, double *b, int *state, double *x, int *info); -extern void drandchisquared_(int *n, int *df, int *state, double *x, int *info); -extern void dranddiscreteuniform_(int *n, int *a, int *b, int *state, int *x, int *info); -extern void drandexponential_(int *n, double *a, int *state, double *x, int *info); -extern void drandf_(int *n, int *df1, int *df2, int *state, double *x, int *info); -extern void drandgamma_(int *n, double *a, double *b, int *state, double *x, int *info); -extern void drandgaussian_(int *n, double *xmu, double *var, int *state, double *x, int *info); -extern void drandgeneraldiscrete_(int *n, double *ref, int *state, int *x, int *info); -extern void drandgeometric_(int *n, double *p, int *state, int *x, int *info); -extern void drandgeometricreference_(double *p, double *ref, int *lref, int *info); -extern void drandhypergeometric_(int *n, int *np, int *ns, int *m, int *state, int *x, int *info); -extern void drandhypergeometricreference_(int *np, int *ns, int *m, double *ref, int *lref, int *info); -extern void drandinitialize_(int *genid, int *subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void drandinitializebbs_(int *nbits, int *lp, int *p, int *lq, int *q, int *ls, int *s, int *state, int *lstate, int *info); -extern void drandinitializeuser_(ACML_DRANDINITIALIZEUSER_UINI uini, ACML_DRANDINITIALIZEUSER_UGEN ugen, int genid, int subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void drandleapfrog_(int *n, int *k, int *state, int *info); -extern void drandlogistic_(int *n, double *a, double *b, int *state, double *x, int *info); -extern void drandlognormal_(int *n, double *xmu, double *var, int *state, double *x, int *info); -extern void drandmultinomial_(int *n, int *m, double *p, int *k, int *state, int *x, int *ldx, int *info); -extern void drandmultinormalreference_(int *m, double *xmu, double *c, int *ldc, double *ref, int *lref, int *info); -extern void drandmultinormalr_(int *n, double *ref, int *state, double *x, int *ldx, int *info); -extern void drandmultistudentstreference_(int *m, int *df, double *xmu, double *c, int *ldc, double *ref, int *lref, int *info); -extern void drandmultistudentstr_(int *n, double *ref, int *state, double *x, int *ldx, int *info); -extern void drandnegativebinomial_(int *n, int *m, double *p, int *state, int *x, int *info); -extern void drandnegativebinomialreference_(int *m, double *p, double *ref, int *lref, int *info); -extern void drandpoisson_(int *n, double *lambda, int *state, int *x, int *info); -extern void drandpoissonreference_(double *lambda, double *ref, int *lref, int *info); -extern void drandskipahead_(int *n, int *state, int *info); -extern void drandstudentst_(int *n, int *df, int *state, double *x, int *info); -extern void drandtriangular_(int *n, double *xmin, double *xmed, double *xmax, int *state, double *x, int *info); -extern void dranduniform_(int *n, double *a, double *b, int *state, double *x, int *info); -extern void drandvonmises_(int *n, double *vk, int *state, double *x, int *info); -extern void drandweibull_(int *n, double *a, double *b, int *state, double *x, int *info); -extern void drandmultinormal_(int *n, int *m, double *xmu, double *c, int *ldc, int *state, double *x, int *ldx, int *info); -extern void drandmultistudentst_(int *n, int *m, int *df, double *xmu, double *c, int *ldc, int *state, double *x, int *ldx, int *info); -extern void srandbeta_(int *n, float *a, float *b, int *state, float *x, int *info); -extern void srandblumblumshub_(int *n, int *state, float *x, int *info); -extern void srandbinomial_(int *n, int *m, float *p, int *state, int *x, int *info); -extern void srandbinomialreference_(int *m, float *p, float *ref, int *lref, int *info); -extern void srandcauchy_(int *n, float *a, float *b, int *state, float *x, int *info); -extern void srandchisquared_(int *n, int *df, int *state, float *x, int *info); -extern void sranddiscreteuniform_(int *n, int *a, int *b, int *state, int *x, int *info); -extern void srandexponential_(int *n, float *a, int *state, float *x, int *info); -extern void srandf_(int *n, int *df1, int *df2, int *state, float *x, int *info); -extern void srandgamma_(int *n, float *a, float *b, int *state, float *x, int *info); -extern void srandgaussian_(int *n, float *xmu, float *var, int *state, float *x, int *info); -extern void srandgeneraldiscrete_(int *n, float *ref, int *state, int *x, int *info); -extern void srandgeometric_(int *n, float *p, int *state, int *x, int *info); -extern void srandgeometricreference_(float *p, float *ref, int *lref, int *info); -extern void srandhypergeometric_(int *n, int *np, int *ns, int *m, int *state, int *x, int *info); -extern void srandhypergeometricreference_(int *np, int *ns, int *m, float *ref, int *lref, int *info); -extern void srandinitialize_(int *genid, int *subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void srandinitializebbs_(int *nbits, int *lp, int *p, int *lq, int *q, int *ls, int *s, int *state, int *lstate, int *info); -extern void srandinitializeuser_(ACML_SRANDINITIALIZEUSER_UINI uini, ACML_SRANDINITIALIZEUSER_UGEN ugen, int genid, int subid, int *seed, int *lseed, int *state, int *lstate, int *info); -extern void srandleapfrog_(int *n, int *k, int *state, int *info); -extern void srandlogistic_(int *n, float *a, float *b, int *state, float *x, int *info); -extern void srandlognormal_(int *n, float *xmu, float *var, int *state, float *x, int *info); -extern void srandmultinomial_(int *n, int *m, float *p, int *k, int *state, int *x, int *ldx, int *info); -extern void srandmultinormalreference_(int *m, float *xmu, float *c, int *ldc, float *ref, int *lref, int *info); -extern void srandmultinormalr_(int *n, float *ref, int *state, float *x, int *ldx, int *info); -extern void srandmultistudentstreference_(int *m, int *df, float *xmu, float *c, int *ldc, float *ref, int *lref, int *info); -extern void srandmultistudentstr_(int *n, float *ref, int *state, float *x, int *ldx, int *info); -extern void srandnegativebinomial_(int *n, int *m, float *p, int *state, int *x, int *info); -extern void srandnegativebinomialreference_(int *m, float *p, float *ref, int *lref, int *info); -extern void srandpoisson_(int *n, float *lambda, int *state, int *x, int *info); -extern void srandpoissonreference_(float *lambda, float *ref, int *lref, int *info); -extern void srandskipahead_(int *n, int *state, int *info); -extern void srandstudentst_(int *n, int *df, int *state, float *x, int *info); -extern void srandtriangular_(int *n, float *xmin, float *xmed, float *xmax, int *state, float *x, int *info); -extern void sranduniform_(int *n, float *a, float *b, int *state, float *x, int *info); -extern void srandvonmises_(int *n, float *vk, int *state, float *x, int *info); -extern void srandweibull_(int *n, float *a, float *b, int *state, float *x, int *info); -extern void srandmultinormal_(int *n, int *m, float *xmu, float *c, int *ldc, int *state, float *x, int *ldx, int *info); -extern void srandmultistudentst_(int *n, int *m, int *df, float *xmu, float *c, int *ldc, int *state, float *x, int *ldx, int *info); - -/* ACML version information */ -extern void acmlversion_(int *major, int *minor, int *patch); -extern void acmlinfo_(void); - -/* OMP interfaces */ -extern int acmlgetmaxthreads_(void); -extern int acmlgetnumthreads_(void); -extern void acmlsetnumthreads_(int *numthreads); -extern int acmlgetnumprocs_(void); - -/* Putenv and getenv utilities */ -extern void acmlputenv_(char *name, char *value, int name_len, int value_len); -extern void acmlgetenv_(char *name, char *value, int name_len, int value_len); - -/* ------------------------------------------------------------------ */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* !defined(_ACML_H) */ diff --git a/cpp/nudg++/trunk/Makefile b/cpp/nudg++/trunk/Makefile deleted file mode 100644 index d15135e..0000000 --- a/cpp/nudg++/trunk/Makefile +++ /dev/null @@ -1,461 +0,0 @@ -include ./system.mk - -INCLUDES = -I./Include - -CXXFLAGS = $(CXXOPTIONS) $(OPTFLAGS) $(INCLUDES) -FCFLAGS = $(FCOPTIONS) $(OPTFLAGS) - -.SUFFIXES: .cpp .f - - -OBJS = \ - Src/Arrays/ArrayMacros.o \ - Src/Arrays/Mat_COL.o \ - Src/Arrays/Sort_Index.o \ - Src/Codes1D/GradJacobiP.o \ - Src/Codes1D/JacobiGL.o \ - Src/Codes1D/JacobiGQ.o \ - Src/Codes1D/JacobiP.o \ - Src/Codes1D/Vandermonde1D.o \ - Src/Codes2D/BuildBCMaps2D.o \ - Src/Codes2D/BuildCurvedOPS2D.o \ - Src/Codes2D/BuildMaps2D.o \ - Src/Codes2D/BuildPeriodicMaps2D.o \ - Src/Codes2D/ConformingHrefine2D.o \ - Src/Codes2D/Connect2D.o \ - Src/Codes2D/Cub2D.o \ - Src/Codes2D/Cubature2D.o \ - Src/Codes2D/CubatureData2D.o \ - Src/Codes2D/CubatureVolumeMesh2D.o \ - Src/Codes2D/Curl2D.o \ - Src/Codes2D/CurvedDGDiv2D.o \ - Src/Codes2D/CurvedDGGrad2D.o \ - Src/Codes2D/CurvedDGJump2D.o \ - Src/Codes2D/CurvedPoissonIPDG2D.o \ - Src/Codes2D/CurvedPoissonIPDGbc2D.o \ - Src/Codes2D/CutOffFilter2D.o \ - Src/Codes2D/Div2D.o \ - Src/Codes2D/Dmatrices2D.o \ - Src/Codes2D/dtscale2D.o \ - Src/Codes2D/Filter2D.o \ - Src/Codes2D/FindLocalCoords2D.o \ - Src/Codes2D/GaussFaceMesh2D.o \ - Src/Codes2D/GeometricFactors2D.o \ - Src/Codes2D/Globals2D.o \ - Src/Codes2D/Grad2D.o \ - Src/Codes2D/GradSimplex2DP.o \ - Src/Codes2D/GradVandermonde2D.o \ - Src/Codes2D/Hrefine2D.o \ - Src/Codes2D/InterpMatrix2D.o \ - Src/Codes2D/Lift2D.o \ - Src/Codes2D/MakeCylinder2D.o \ - Src/Codes2D/NDG2D.o \ - Src/Codes2D/NDG2D_Output.o \ - Src/Codes2D/NDG2DDriver.o \ - Src/Codes2D/Nodes2D.o \ - Src/Codes2D/Normals2D.o \ - Src/Codes2D/PhysDmatrices2D.o \ - Src/Codes2D/rstoab.o \ - Src/Codes2D/Sample2D.o \ - Src/Codes2D/Simplex2DP.o \ - Src/Codes2D/StartUp2D.o \ - Src/Codes2D/tiConnect2D.o \ - Src/Codes2D/Vandermonde2D.o \ - Src/Codes2D/Warpfactor.o \ - Src/Codes2D/xytors.o \ - Src/Codes3D/BuildBCMaps3D.o \ - Src/Codes3D/BuildMaps3D.o \ - Src/Codes3D/Cub3D.o \ - Src/Codes3D/Cubature3D.o \ - Src/Codes3D/CubatureVolumeMesh3D.o \ - Src/Codes3D/Curl3D.o \ - Src/Codes3D/Div3D.o \ - Src/Codes3D/Dmatrices3D.o \ - Src/Codes3D/dtscale3D.o \ - Src/Codes3D/EquiNodes3D.o \ - Src/Codes3D/evalshift.o \ - Src/Codes3D/evalwarp.o \ - Src/Codes3D/FaceData3D.o \ - Src/Codes3D/FindLocalCoords3D.o \ - Src/Codes3D/GeometricFactors3D.o \ - Src/Codes3D/Globals3D.o \ - Src/Codes3D/Grad3D.o \ - Src/Codes3D/GradSimplex3DP.o \ - Src/Codes3D/GradVandermonde3D.o \ - Src/Codes3D/Hrefine3D.o \ - Src/Codes3D/InterpMatrix3D.o \ - Src/Codes3D/InterpNodeShapes3D.o \ - Src/Codes3D/IntersectTest3D.o \ - Src/Codes3D/Lift3D.o \ - Src/Codes3D/Make3DCouetteGeom.o \ - Src/Codes3D/NDG3D.o \ - Src/Codes3D/NDG3DDriver.o \ - Src/Codes3D/NDG3D_Output.o \ - Src/Codes3D/Nodes3D.o \ - Src/Codes3D/Normals3D.o \ - Src/Codes3D/PartialLiftData3D.o \ - Src/Codes3D/PhysDmatrices3D.o \ - Src/Codes3D/PoissonIPDG3D.o \ - Src/Codes3D/PoissonIPDGbc3D.o \ - Src/Codes3D/Poly3D.o \ - Src/Codes3D/rsttoabc.o \ - Src/Codes3D/Sample3D.o \ - Src/Codes3D/Simplex3DP.o \ - Src/Codes3D/StartUp3D.o \ - Src/Codes3D/tiConnect3D.o \ - Src/Codes3D/TopTheta.o \ - Src/Codes3D/Vandermonde3D.o \ - Src/Codes3D/WarpShiftFace3D.o \ - Src/Codes3D/xyztorst.o \ - Src/ServiceRoutines/Global_funcs.o \ - Src/ServiceRoutines/INIT.o \ - Src/ServiceRoutines/LOG.o \ - Src/ServiceRoutines/MeshReaderGambit2D.o \ - Src/ServiceRoutines/MeshReaderGambit3D.o \ - Src/ServiceRoutines/Tokenizer.o \ - Src/Sparse/CHOLMOD_solver.o \ - Src/Sparse/CS_Cholinc.o \ - Src/Sparse/CS_Solve.o \ - Src/Sparse/CS_Utils.o - -EULOBJS = \ - Src/Examples2D/CurvedEuler2D/ChannelBC2D.o \ - Src/Examples2D/CurvedEuler2D/ChannelIC2D.o \ - Src/Examples2D/CurvedEuler2D/CouetteBC2D.o \ - Src/Examples2D/CurvedEuler2D/CouetteIC2D.o \ - Src/Examples2D/CurvedEuler2D/CurvedEuler2D.o \ - Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Driver.o \ - Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Fluxes.o \ - Src/Examples2D/CurvedEuler2D/CurvedEuler2D_RHS.o \ - Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Run.o \ - Src/Examples2D/CurvedEuler2D/EulerHLL2D.o \ - Src/Examples2D/CurvedEuler2D/EulerLF2D.o \ - Src/Examples2D/CurvedEuler2D/EulerRoe2D.o \ - Src/Examples2D/CurvedEuler2D/IsentropicVortexBC2D.o \ - Src/Examples2D/CurvedEuler2D/IsentropicVortexIC2D.o - -EULOBJS3D = \ - Src/Examples3D/Euler3D/Euler3D.o \ - Src/Examples3D/Euler3D/Euler3D_Driver.o \ - Src/Examples3D/Euler3D/Euler3D_Fluxes.o \ - Src/Examples3D/Euler3D/Euler3D_RHS.o \ - Src/Examples3D/Euler3D/Euler3D_Run.o \ - Src/Examples3D/CouetteBC3D.o \ - Src/Examples3D/CouetteIC3D.o \ - Src/Examples3D/Euler3D/IsentropicVortexBC3D.o \ - Src/Examples3D/Euler3D/IsentropicVortexIC3D.o - -CNSOBJS = \ - Src/Examples2D/CurvedCNS2D/BoxFlowBC2D.o \ - Src/Examples2D/CurvedCNS2D/BoxFlowIC2D.o \ - Src/Examples2D/CurvedCNS2D/ChannelBC2D.o \ - Src/Examples2D/CurvedCNS2D/ChannelIC2D.o \ - Src/Examples2D/CurvedCNS2D/CurvedCNS2D.o \ - Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Driver.o \ - Src/Examples2D/CurvedCNS2D/CurvedCNS2D_RHS.o \ - Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Run.o \ - Src/Examples2D/CurvedCNS2D/CylBC2D.o \ - Src/Examples2D/CurvedCNS2D/CylIC2D.o - -INSOBJS = \ - Src/Examples2D/CurvedINS2D/CurvedINS2D.o \ - Src/Examples2D/CurvedINS2D/CurvedINS2D_Driver.o \ - Src/Examples2D/CurvedINS2D/CurvedINS2D_Run.o \ - Src/Examples2D/CurvedINS2D/CurvedINSPressureSetUp2D.o \ - Src/Examples2D/CurvedINS2D/CurvedINSViscous2D.o \ - Src/Examples2D/CurvedINS2D/CurvedINSViscousSetUp2D.o \ - Src/Examples2D/CurvedINS2D/INSAdvection2D.o \ - Src/Examples2D/CurvedINS2D/INSLiftDrag2D.o \ - Src/Examples2D/CurvedINS2D/INSPressure2D.o \ - \ - Src/Examples2D/CurvedINS2D/INScylinderBC2D.o \ - Src/Examples2D/CurvedINS2D/INScylinderIC2D.o \ - Src/Examples2D/CurvedINS2D/KovasznayBC2D.o \ - Src/Examples2D/CurvedINS2D/KovasznayIC2D.o \ - Src/Examples2D/CurvedINS2D/PearsonVortexBC2D.o \ - Src/Examples2D/CurvedINS2D/PearsonVortexIC2D.o \ - Src/Examples2D/CurvedINS2D/INS_IC_BC_TODO.o - - -MAXOBJS = \ - Src/Examples2D/Maxwell2D/Maxwell2D.o \ - Src/Examples2D/Maxwell2D/Maxwell2D_Driver.o \ - Src/Examples2D/Maxwell2D/Maxwell2D_RHS.o \ - Src/Examples2D/Maxwell2D/Maxwell2D_Run.o \ - \ - Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D.o \ - Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_Driver.o \ - Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_RHS.o \ - \ - Src/Examples2D/MaxwellNonCon2D/BuildHNonCon2D.o \ - Src/Examples2D/MaxwellNonCon2D/BuildPNonCon2D.o \ - Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D.o \ - Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Driver.o \ - Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_RHS.o \ - Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Run.o \ - Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_H.o \ - Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_P.o \ - \ - Src/Examples3D/Maxwell3D/Maxwell3D.o \ - Src/Examples3D/Maxwell3D/Maxwell3D_Driver.o \ - Src/Examples3D/Maxwell3D/Maxwell3D_RHS.o \ - Src/Examples3D/Maxwell3D/Maxwell3D_Run.o - - -ARBCOBJS = \ - Src/Examples2D/MaxwellARBC/ARBCplane2D.o \ - Src/Examples2D/MaxwellARBC/ARBCplane2D_Driver.o \ - Src/Examples2D/MaxwellARBC/ARBCplane2D_Ops.o \ - Src/Examples2D/MaxwellARBC/ARBCplane2D_RHS.o \ - Src/Examples2D/MaxwellARBC/ARBCplane2D_Run.o \ - Src/Examples2D/MaxwellARBC/DG_Ops_1D.o \ - Src/Examples2D/MaxwellARBC/wts500_f.o \ - Src/Examples2D/MaxwellARBC/PECCylSolution2D.o - -SHOCKOBJS = \ - Src/Examples2D/EulerShock2D/EulerLimiter2D.o \ - Src/Examples2D/EulerShock2D/EulerShock2D.o \ - Src/Examples2D/EulerShock2D/EulerShock2D_Driver.o \ - Src/Examples2D/EulerShock2D/EulerShock2D_Run.o \ - Src/Examples2D/EulerShock2D/EulerShock2D_Run_Iter.o \ - Src/Examples2D/EulerShock2D/ForwardStepBC2D.o \ - Src/Examples2D/EulerShock2D/ForwardStepIC2D.o \ - Src/Examples2D/EulerShock2D/InletBC2D.o \ - Src/Examples2D/EulerShock2D/InletIC2D.o - -T3DOBJS = \ - Src/Examples3D/TestPoissonIPDG3D/TestPoissonIPDG3D.o \ - Src/Examples3D/NonCon3D/FindNonCon3D_V2.o \ - Src/Examples3D/NonCon3D/IPDGErrorNorm3D.o \ - Src/Examples3D/NonCon3D/NonConPoissonIPDG3D_V2.o \ - Src/Examples3D/NonCon3D/ROHOP3D.o \ - Src/Examples3D/NonCon3D/ROHOP3D_BdryTerms.o \ - Src/Examples3D/NonCon3D/ROHOP3D_Driver.o \ - Src/Examples3D/NonCon3D/ROHOP3D_Funcs.o \ - Src/Examples3D/NonCon3D/ROHOP3D_Run.o - - -BLASOBJS = \ - BlasLapack/dasum.o \ - BlasLapack/daxpy.o \ - BlasLapack/dbdsqr.o \ - BlasLapack/dcabs1.o \ - BlasLapack/dcopy.o \ - BlasLapack/ddot.o \ - BlasLapack/dgebak.o \ - BlasLapack/dgebal.o \ - BlasLapack/dgebd2.o \ - BlasLapack/dgebrd.o \ - BlasLapack/dgecon.o \ - BlasLapack/dgeev.o \ - BlasLapack/dgehd2.o \ - BlasLapack/dgehrd.o \ - BlasLapack/dgelq2.o \ - BlasLapack/dgelqf.o \ - BlasLapack/dgelss.o \ - BlasLapack/dgemm.o \ - BlasLapack/dgemv.o \ - BlasLapack/dgeqr2.o \ - BlasLapack/dgeqrf.o \ - BlasLapack/dger.o \ - BlasLapack/dgesv.o \ - BlasLapack/dgesvd.o \ - BlasLapack/dgetf2.o \ - BlasLapack/dgetrf.o \ - BlasLapack/dgetrs.o \ - BlasLapack/dhseqr.o \ - BlasLapack/dlabad.o \ - BlasLapack/dlabrd.o \ - BlasLapack/dlacon.o \ - BlasLapack/dlacpy.o \ - BlasLapack/dladiv.o \ - BlasLapack/dlae2.o \ - BlasLapack/dlaev2.o \ - BlasLapack/dlahqr.o \ - BlasLapack/dlahrd.o \ - BlasLapack/dlaln2.o \ - BlasLapack/dlamch.o \ - BlasLapack/dlange.o \ - BlasLapack/dlanhs.o \ - BlasLapack/dlanst.o \ - BlasLapack/dlansy.o \ - BlasLapack/dlanv2.o \ - BlasLapack/dlapy2.o \ - BlasLapack/dlarf.o \ - BlasLapack/dlarfb.o \ - BlasLapack/dlarfg.o \ - BlasLapack/dlarft.o \ - BlasLapack/dlarfx.o \ - BlasLapack/dlartg.o \ - BlasLapack/dlas2.o \ - BlasLapack/dlascl.o \ - BlasLapack/dlaset.o \ - BlasLapack/dlasq1.o \ - BlasLapack/dlasq2.o \ - BlasLapack/dlasq3.o \ - BlasLapack/dlasq4.o \ - BlasLapack/dlasq5.o \ - BlasLapack/dlasq6.o \ - BlasLapack/dlasr.o \ - BlasLapack/dlasrt.o \ - BlasLapack/dlassq.o \ - BlasLapack/dlasv2.o \ - BlasLapack/dlaswp.o \ - BlasLapack/dlatrd.o \ - BlasLapack/dlatrs.o \ - BlasLapack/dnrm2.o \ - BlasLapack/dorg2l.o \ - BlasLapack/dorg2r.o \ - BlasLapack/dorgbr.o \ - BlasLapack/dorghr.o \ - BlasLapack/dorgl2.o \ - BlasLapack/dorglq.o \ - BlasLapack/dorgql.o \ - BlasLapack/dorgqr.o \ - BlasLapack/dorgtr.o \ - BlasLapack/dorm2r.o \ - BlasLapack/dormbr.o \ - BlasLapack/dorml2.o \ - BlasLapack/dormlq.o \ - BlasLapack/dormqr.o \ - BlasLapack/dpbtf2.o \ - BlasLapack/dpbtrf.o \ - BlasLapack/dpbtrs.o \ - BlasLapack/dposv.o \ - BlasLapack/dpotf2.o \ - BlasLapack/dpotrf.o \ - BlasLapack/dpotrs.o \ - BlasLapack/drot.o \ - BlasLapack/drscl.o \ - BlasLapack/dscal.o \ - BlasLapack/dsteqr.o \ - BlasLapack/dsterf.o \ - BlasLapack/dstev.o \ - BlasLapack/dswap.o \ - BlasLapack/dsyev.o \ - BlasLapack/dsymv.o \ - BlasLapack/dsyr.o \ - BlasLapack/dsyr2.o \ - BlasLapack/dsyr2k.o \ - BlasLapack/dsyrfs.o \ - BlasLapack/dsyrk.o \ - BlasLapack/dsytd2.o \ - BlasLapack/dsytrd.o \ - BlasLapack/dtbsv.o \ - BlasLapack/dtrevc.o \ - BlasLapack/dtrmm.o \ - BlasLapack/dtrmv.o \ - BlasLapack/dtrsm.o \ - BlasLapack/dtrsv.o \ - BlasLapack/dzasum.o \ - BlasLapack/dzsum1.o \ - BlasLapack/idamax.o \ - BlasLapack/ieeeck.o \ - BlasLapack/ilaenv.o \ - BlasLapack/izamax.o \ - BlasLapack/izmax1.o \ - BlasLapack/lsame.o \ - BlasLapack/xerbla.o \ - BlasLapack/zaxpy.o \ - BlasLapack/zcopy.o \ - BlasLapack/zdotc.o \ - BlasLapack/zdotu.o \ - BlasLapack/zdrscl.o \ - BlasLapack/zdscal.o \ - BlasLapack/zgecon.o \ - BlasLapack/zgemm.o \ - BlasLapack/zgeru.o \ - BlasLapack/zgetf2.o \ - BlasLapack/zgetrf.o \ - BlasLapack/zlacon.o \ - BlasLapack/zladiv.o \ - BlasLapack/zlaswp.o \ - BlasLapack/zlatrs.o \ - BlasLapack/zscal.o \ - BlasLapack/zswap.o \ - BlasLapack/ztrsm.o \ - BlasLapack/ztrsv.o - - -.cpp.o: - $(CXX) $(CXXFLAGS) -o $*.o -c $*.cpp - -.f.o: - $(FC) $(FCFLAGS) -o $*.o -c $*.f - -libBlasLapack: $(BLASOBJS) - $(AR) libBlasLapack.a $(BLASOBJS) - $(RANLIB) libBlasLapack.a - $(MV) libBlasLapack.a ./Lib - -libNDG: $(OBJS) - $(AR) $@.a $(OBJS) - $(RANLIB) $@.a - $(MV) $@.a ./Lib - -libINS: $(INSOBJS) - $(AR) $@.a $(INSOBJS) - $(RANLIB) $@.a - $(MV) $@.a ./Lib - -libMAX: $(MAXOBJS) - $(AR) $@.a $(MAXOBJS) - $(RANLIB) $@.a - $(MV) $@.a ./Lib - -libARBC: $(ARBCOBJS) - $(AR) $@.a $(ARBCOBJS) - $(RANLIB) $@.a - $(MV) $@.a ./Lib - -libT3D: $(T3DOBJS) - $(AR) $@.a $(T3DOBJS) - $(RANLIB) $@.a - $(MV) $@.a ./Lib - -libEUL: $(EULOBJS) - $(AR) $@.a $(EULOBJS) - $(RANLIB) $@.a - $(MV) $@.a ./Lib - - -Maxwell2D: libNDG libMAX libBlasLapack - $(LD) $(CXXFLAGS) -o bin/Maxwell2D Src/Examples2D/Maxwell2D/Maxwell2D_main.cpp -L./Lib -lMAX -lNDG $(BLASLAPACKLIBS) -lm - -MaxwellCurved2D: libNDG libMAX libBlasLapack - $(LD) $(CXXFLAGS) -o bin/MaxwellCurved2D Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_main.cpp -L./Lib -lMAX -lNDG $(BLASLAPACKLIBS) -lm - -MaxwellNonCon2D: libNDG libMAX libBlasLapack - $(LD) $(CXXFLAGS) -o bin/MaxwellNonCon2D Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_main.cpp -L./Lib -lMAX -lNDG $(BLASLAPACKLIBS) -lm - -ARBC2D: libNDG libARBC libBlasLapack - $(LD) $(CXXFLAGS) -o bin/ARBC2D Src/Examples2D/MaxwellARBC/ARBCplane2D_main.cpp -L./Lib $(BLASLAPACKLIBS) -lARBC -lNDG $(BLASLAPACKLIBS) -lm - -CurvedINS2D: libNDG libINS libBlasLapack - $(LD) $(CXXFLAGS) -o bin/CurvedINS2D Src/Examples2D/CurvedINS2D/CurvedINS2D_main.cpp -L./Lib -lINS -lNDG $(BLASLAPACKLIBS) -lm - -Euler2D: libEUL libNDG libBlasLapack - $(LD) $(CXXFLAGS) -o bin/Euler2D Src/Examples2D/CurvedEuler2D/CurvedEuler2D_main.cpp -L./Lib -lEUL -lNDG $(BLASLAPACKLIBS) -lm - -clean: - rm -f $(OBJS) - rm -f $(EULOBJS) - rm -f $(EULOBJS3D) - rm -f $(CNSOBJS) - rm -f $(INSOBJS) - rm -f $(MAXOBJS) - rm -f $(ARBCOBJS) - rm -f $(SHOCKOBJS) - rm -f $(T3DOBJS) - -realclean: clean - rm -rf *.o ./Lib/libNDG.a ./Lib/libMAX.a ./Lib/libINS.a ./Lib/libARBC.a ./Lib/libBlasLapack.a - ($(CD) BlasLapack; rm -rf *.o ) - ($(CD) Src/Arrays; rm -rf *.o ) - ($(CD) Src/Codes1D; rm -rf *.o ) - ($(CD) Src/Codes2D; rm -rf *.o ) - ($(CD) Src/Examples2D/Maxwell2D; rm -rf *.o ) - ($(CD) Src/Examples2D/MaxwellCurved2D; rm -rf *.o ) - ($(CD) Src/Examples2D/CurvedINS2D; rm -rf *.o ) - ($(CD) Src/ServiceRoutines; rm -rf *.o ) - ($(CD) Src/Sparse; rm -rf *.o ) diff --git a/cpp/nudg++/trunk/Src/Arrays/ArrayMacros.cpp b/cpp/nudg++/trunk/Src/Arrays/ArrayMacros.cpp deleted file mode 100644 index f67cdee..0000000 --- a/cpp/nudg++/trunk/Src/Arrays/ArrayMacros.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// ArrayMacros.cpp -// -// 2006/12/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include "ArrayMacros.h" - -// global objects passed to array constructors to help -// distinguish orientation when loading ASCII data. -ArrayData gVecData; -MatRowData gRowData; -MatColData gColData; - -// Object to help Region2D return a matrix column/row -MatDimension All; - diff --git a/cpp/nudg++/trunk/Src/Arrays/Mat_COL.cpp b/cpp/nudg++/trunk/Src/Arrays/Mat_COL.cpp deleted file mode 100644 index 75ba452..0000000 --- a/cpp/nudg++/trunk/Src/Arrays/Mat_COL.cpp +++ /dev/null @@ -1,874 +0,0 @@ -// umMat_COL.cpp -// Lapack wrappers using DMat, DVec -// 2007/05/26 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Mat_COL.h" - -//--------------------------------------------------------- -void umAxB(const DMat& A, const DMat& B, DMat& C) -//--------------------------------------------------------- -{ - //------------------------- - // C = A * B - //------------------------- - // A = op(A) is (M,K) - // B = op(B) is (K,N) - // C is (M,N) - //------------------------- - int M=A.num_rows(), K=A.num_cols(), N=B.num_cols(); - int LDA=M, LDB=K, LDC=M; - double one=1.0, zero=0.0; - if (B.num_rows() != K) { umERROR("umAxB(A,B,C)", "wrong dimensions"); } - C.resize(M,N); - - GEMM ('N','N',M,N,K, one,A.data(),LDA, - B.data(),LDB, - zero,C.data(),LDC); -} - - -//--------------------------------------------------------- -void umAxB(const ZMat& A, const ZMat& B, ZMat& C) -//--------------------------------------------------------- -{ - //------------------------- - // C = A * B - //------------------------- - // A = op(A) is (M,K) - // B = op(B) is (K,N) - // C is (M,N) - //------------------------- - int M=A.num_rows(), K=A.num_cols(), N=B.num_cols(); - int LDA=M, LDB=K, LDC=M; - std::complex one=1.0, zero=0.0; - if (B.num_rows() != K) { umERROR("umAxB(A,B,C)", "wrong dimensions"); } - C.resize(M,N); - - ZGEMM ('N','N',M,N,K, one,A.data(),LDA, - B.data(),LDB, - zero,C.data(),LDC); -} - - -//--------------------------------------------------------- -void umAtransxB(const DMat& A, const DMat& B, DMat& C) -//--------------------------------------------------------- -{ - //------------------------- - // C = A^T * B - //------------------------- - // A^T = op(A) is (M,K) - // B = op(B) is (K,N) - // C is (M,N) - //------------------------- - int M=A.num_cols(), K=A.num_rows(), N=B.num_cols(); - int LDA=K, LDB=K, LDC=M; - double one=1.0, zero=0.0; - if (B.num_rows() != K) { umERROR("umAtransxB(A,B,C)", "wrong dimensions"); } - C.resize(M,N); - - GEMM ('T','N',M,N,K, one,A.data(),LDA, - B.data(),LDB, - zero,C.data(),LDC); -} - - -//--------------------------------------------------------- -void umAxBtrans(const DMat& A, const DMat& B, DMat& C) -//--------------------------------------------------------- -{ - //------------------------- - // C = A * B^T - //------------------------- - // A = op(A) is (M,K) - // B^T = op(B) is (K,N) - // C is (M,N) - //------------------------- - int M=A.num_rows(), K=A.num_cols(), N=B.num_rows(); - int LDA=M, LDB=N, LDC=M; - double one=1.0, zero=0.0; - if (B.num_cols() != K) { umERROR("umAxBtrans(A,B,C)", "wrong dimensions"); } - C.resize(M,N); - - GEMM ('N','T',M,N,K, one,A.data(),LDA, - B.data(),LDB, - zero,C.data(),LDC); -} - - -/////////////////////////////////////////////////////////// -// -// LAPACK drivers -// -/////////////////////////////////////////////////////////// - - -// Forward -DMat umSOLVE_LS(const DMat& mat, const DMat& B); - - -// DGESV computes the solution to a real system of linear -// equations, A*x = b, where A is an N-by-N matrix, and -// x and b are N-by-1 vectors. The LU decomposition -// with partial pivoting and row interchanges is used to -// factor A as A = P*L*U, where P is a permutation matrix, -// L is unit lower triangular, and U is upper triangular. -// The system is solved using this factored form of A. -//--------------------------------------------------------- -void umSOLVE(const DMat& mat, const DVec& b, DVec& x) -//--------------------------------------------------------- -{ - // Work with copies of input arrays. - DMat A(mat); - x = b; - - int NRHS = 1; - int LDA = A.num_rows(); - int rows = A.num_rows(); - int cols = A.num_cols(); - int info = 0; - - if (rows != cols) { - umERROR("umSOLVE(DMat, DVec)", - "Matrix A (%d,%d) is not square.\n" - "For a Least-Squares solution, see umSOLVE_LS(A,B).", - rows, cols); - } - - if (rows < 1) { - umLOG(1, "Empty system passed into umSOLVE().\n"); - return; - } - - IVec ipiv(rows, 0); - - GESV (rows, NRHS, A.data(), LDA, ipiv.data(), x.data(), rows, info); - - if (info < 0) { - x = 0.0; - umERROR("umSOLVE(DMat&, DVec&)", - "Error in input argument (%d)\nNo solution computed.", -info); - } else if (info > 0) { - x = 0.0; - umERROR("umSOLVE(DMat&, DVec&)", - "\nINFO = %d. U(%d,%d) was exactly zero." - "\nThe factorization has been completed, but the factor U is " - "\nexactly singular, so the solution could not be computed.", - info, info, info); - } -} - - -// DGESV uses the LU factorization to compute solution -// to a real system of linear equations, A * X = B, -// where A is square (N,N) and X, B are (N,NRHS). -// -// If the system is over or under-determined, -// (i.e. A is not square), then pass the problem -// to the Least-squares solver (DGELSS) below. -//--------------------------------------------------------- -void umSOLVE(const DMat& mat, const DMat& B, DMat& X) -//--------------------------------------------------------- -{ - if (!mat.ok()) {umWARNING("umSOLVE()", "system is empty"); return;} - if (!mat.is_square()) { - umSOLVE_LS(mat, B, X); // return a least-squares solution. - return; - } - - DMat A(mat); // work with copy of input - X = B; // initialize result with RHS - - int rows=A.num_rows(), LDA=A.num_rows(), cols=A.num_cols(); - int LDB=B.num_rows(), NRHS=B.num_cols(), info=0; - if (rows<1) {umWARNING("umSOLVE()", "system is empty"); return;} - IVec ipiv(rows); - - // Solve the system. - GESV(rows, NRHS, A.data(), LDA, ipiv.data(), X.data(), LDB, info); - - if (info < 0) { - X = 0.0; - umERROR("umSOLVE(A,B, X)", - "Error in input argument (%d)\nNo solution computed.", -info); - } else if (info > 0) { - X = 0.0; - umERROR("umSOLVE(A,B, X)", - "\nINFO = %d. U(%d,%d) was exactly zero." - "\nThe factorization has been completed, but the factor U is " - "\nexactly singular, so the solution could not be computed.", - info, info, info); - } -} - - -// DPOSV uses Cholesky factorization A=U^T*U, A=L*L^T -// to compute the solution to a real system of linear -// equations A*X=B, where A is a square, (N,N) symmetric -// positive definite matrix and X and B are (N,NRHS). -//--------------------------------------------------------- -void umSOLVE_CH(const DMat& mat, const DVec& b, DVec& x) -//--------------------------------------------------------- -{ - // check args - assert(mat.is_square()); // symmetric - assert(b.size() >= mat.num_rows()); // is b consistent? - assert(b.size() <= x.size()); // can x store solution? - - DMat A(mat); // work with copy of input - x = b; // allocate solution vector - - int rows=A.num_rows(), LDA=A.num_rows(), cols=A.num_cols(); - int LDB=b.size(), NRHS=1, info=0; - if (rows<1) {umWARNING("umSOLVE_CH()", "system is empty"); return;} - - // Solve the system. - POSV('U', rows, NRHS, A.data(), LDA, x.data(), LDB, info); - - if (info < 0) { - x = 0.0; - umERROR("umSOLVE_CH(A,b, x)", - "Error in input argument (%d)\nNo solution computed.", -info); - } else if (info > 0) { - x = 0.0; - umERROR("umSOLVE_CH(A,b, x)", - "\nINFO = %d. The leading minor of order %d of A" - "\nis not positive definite, so the factorization" - "\ncould not be completed. No solution computed.", - info, info); - } -} - - -// DPOSV uses Cholesky factorization A=U^T*U, A=L*L^T -// to compute the solution to a real system of linear -// equations A*X=B, where A is a square, (N,N) symmetric -// positive definite matrix and X and B are (N,NRHS). -// -// If the system is over or under-determined, -// (i.e. A is not square), then pass the problem -// to the Least-squares solver (DGELSS) below. -//--------------------------------------------------------- -void umSOLVE_CH(const DMat& mat, const DMat& B, DMat& X) -//--------------------------------------------------------- -{ - if (!mat.ok()) {umWARNING("umSOLVE_CH()", "system is empty"); return;} - if (!mat.is_square()) { - umSOLVE_LS(mat, B, X); // return a least-squares solution. - return; - } - - DMat A(mat); // Work with a copy of input array. - X = B; // initialize solution with rhs - - int rows=A.num_rows(), LDA=A.num_rows(), cols=A.num_cols(); - int LDB=X.num_rows(), NRHS=X.num_cols(), info=0; - assert(LDB >= rows); // enough space for solutions? - - // Solve the system. - POSV('U', rows, NRHS, A.data(), LDA, X.data(), LDB, info); - - if (info < 0) { - X = 0.0; - umERROR("umSOLVE_CH(A,B, X)", - "Error in input argument (%d)\nNo solution computed.", -info); - } else if (info > 0) { - X = 0.0; - umERROR("umSOLVE_CH(A,B, X)", - "\nINFO = %d. The leading minor of order %d of A" - "\nis not positive definite, so the factorization" - "\ncould not be completed. No solution computed.", - info, info); - } -} - - -// DGELSS computes minimum norm solution to a real linear -// least squares problem: Minimize 2-norm(| b - A*x |). -// using the singular value decomposition (SVD) of A. -// A is an M-by-N matrix which may be rank-deficient. -//--------------------------------------------------------- -void umSOLVE_LS(const DMat& mat, const DMat& B, DMat& X) -//--------------------------------------------------------- -{ - if (!mat.ok()) {umWARNING("umSOLVE_LS()", "system is empty"); return;} - - DMat A(mat); // work with copy of input. - - int rows=A.num_rows(), cols=A.num_cols(), mmn=A.min_mn(); - int LDB=A.max_mn(), NRHS=B.num_cols(); - if (rows!=B.num_rows()) {umERROR("umSOLVE_LS(A,B)", "Inconsistant matrix sizes.");} - - DVec s(mmn); // allocate array for singular values - - // X must be big enough to store various results. - // Resize X so that its leading dimension = max(M,N), - // then load the set of right hand sides. - - X.resize(LDB,NRHS, true, 0.0); - - for (int j=1; j<=NRHS; ++j) // loop across colums - for (int i=1; i<=rows; ++i) // loop down rows - X(i,j) = B(i,j); - - // RCOND is used to determine the effective rank of A. - // Singular values S(i) <= RCOND*S(1) are treated as zero. - // If RCOND < 0, machine precision is used instead. - -//double rcond = 1.0 / 1.0e16; - double rcond = -1.0; - - // NBN: ACML does not use the work vector. - int mnLo=A.min_mn(), mnHi=A.max_mn(), rank=1, info=1; - int lwork = 10*mnLo + std::max(2*mnLo, std::max(mnHi, NRHS)); - DVec work(lwork); - - // Solve the system - GELSS (rows, cols, NRHS, A.data(), rows, X.data(), LDB, s.data(), rcond, rank, work.data(), lwork, info); - - //--------------------------------------------- - // Report: - //--------------------------------------------- - - if (info == 0) { - umLOG(1, "umSOLVE_LS reports successful LS-solution." - "\nRCOND = %0.6e, " - "\nOptimal length of work array was %d\n", rcond, lwork); - } - else - { - if (info < 0) { - X = 0.0; - umERROR("umSOLVE_LS(DMat&, DMat&)", - "Error in input argument (%d)\nNo solution or error bounds computed.", -info); - - } else if (info > 0) { - X = 0.0; - umERROR("umSOLVE_LS(DMat&, DMat&)", - "\nThe algorithm for computing the SVD failed to converge.\n" - "\n%d off-diagonal elements of an intermediate " - "\nbidiagonal form did not converge to zero.\n " - "\nRCOND = %0.6e, " - "\nOptimal length of work array was %d.\n", info, rcond, lwork); - } - } -} - - - -/////////////////////////////////////////////////////////// -// -// REAL version: svd(DMat&) -// -/////////////////////////////////////////////////////////// - - -// Computes an SVD factorization of a real MxN matrix. -// Returns the vector of singular values. -// Also, factors U, VT, where A = U * D * VT. -//--------------------------------------------------------- -DVec& svd -( - const DMat& mat, // [in] - DMat& U, // [out: left singular vectors] - DMat& VT, // [out: right singular vectors] - char ju, // [in: want U?] - char jvt // [in: want VT?] -) -//--------------------------------------------------------- -{ - // Work with a copy of the input matrix. - DMat A(mat, OBJ_temp, "svd.TMP"); - - // A(MxN) - int m=A.num_rows(), n=A.num_cols(); - int mmn=A.min_mn(), xmn=A.max_mn(); - - // resize parameters - U.resize (m,m, true, 0.0); - VT.resize(n,n, true, 0.0); - DVec* s = new DVec(mmn, 0.0, OBJ_temp, "s.TMP"); - char jobu = ju; - char jobvt = jvt; - int info = 0; - - // NBN: ACML does not use the work vector. - int lwork = 2 * std::max(3*mmn+xmn, 5*mmn); - DVec work(lwork, 0.0, OBJ_temp, "work.TMP"); - GESVD (jobu, jobvt, m, n, A.data(), m, s->data(), U.data(), m, VT.data(), n, work.data(), lwork, info); - - if (info < 0) { - (*s) = 0.0; - umERROR("SVD", "Error in input argument (%d)\nNo solution computed.", -info); - } else if (info > 0) { - (*s) = 0.0; - umLOG(1, "DBDSQR did not converge." - "\n%d superdiagonals of an intermediate bidiagonal" - "\nform B did not converge to zero.\n", info); - } - - return (*s); -} - - - -// Overloaded version: Return singular values only. -//--------------------------------------------------------- -DVec& svd(const DMat& mat) -//--------------------------------------------------------- -{ - DMat U, VT; - return svd(mat, U, VT, 'N', 'N'); -} - - -// Norm: Return largest singular value for M-by-N matrix. -//--------------------------------------------------------- -double norm(const DMat& mat) -//--------------------------------------------------------- -{ - DVec s( svd(mat) ); - return s(1); -} - - -// Condition estimate: -// Return ratio of largest/smallest singular values. -//--------------------------------------------------------- -double cond(const DMat& mat) -//--------------------------------------------------------- -{ - DVec s( svd(mat) ); - int n = s.size(); - if (fabs(s(n)) < DBL_MIN) - { - umERROR("Condition estimate via SVD", - "Division by zero singular value"); - s(n) = DBL_MIN; - } - - return s(1) / s(n); -} - - -// Condition estimate: -// Return ratio of largest/smallest singular values. -//--------------------------------------------------------- -double cond(ZMat& mat) -//--------------------------------------------------------- -{ - double rcond = 1.; - - ZVec work(2*mat.num_cols(), "work"); - DVec rwork(2*mat.num_cols(), "rwork"); - - int info; - - ZMat matcopy(mat); - IVec ipiv(mat.num_rows(), "ipiv"); - - ZGETRF(mat.num_rows(), - mat.num_cols(), - matcopy.data(), - mat.num_rows(), - ipiv.data(), - info); - - - // fprintf(stdout, "zgetrf: info=%d \n", info); - - // must fix this - double anorm = 1.0; - - ZGECON('I', - mat.num_cols(), - matcopy.data(), - mat.num_rows(), - anorm, - rcond, - work.data(), - rwork.data(), - info); - - // fprintf(stdout, "zgecon: info=%d rcond=%lf\n", info, rcond); - - return 1./rcond; -} - - -//--------------------------------------------------------- -void eig(const DMat& A, DVec& Re) -//--------------------------------------------------------- -{ - // Compute eigenvalues of a real general matrix - // Currently NOT returning imaginary components - DMat VL("VL"), VR("VR"); - eig(A, Re, VL, VR, false, false); -} - - -//--------------------------------------------------------- -void eig(const DMat& A, DVec& Re, DMat& VR) -//--------------------------------------------------------- -{ - // Compute eigenvalues and RIGHT eigenvectors of a real - // general matrix. NOT returning imaginary components. - DMat VL("VL"); - eig(A, Re, VL, VR, false, true); -} - -//--------------------------------------------------------- -void eig(const DMat& A, DVec& Re, DMat& VL, DMat& VR, bool bL, bool bR) -//--------------------------------------------------------- -{ - // Compute eigensystem of a real general matrix - // Currently NOT returning imaginary components - - static DMat B; - - if (!A.is_square()) { umERROR("eig(A)", "matrix is not square."); } - - int N = A.num_rows(); - int LDA=N, LDVL=N, LDVR=N, ldwork=10*N, info=0; - - Re.resize(N); // store REAL components of eigenvalues in Re - VL.resize(N,N); // storage for LEFT eigenvectors - VR.resize(N,N); // storage for RIGHT eigenvectors - DVec Im(N); // NOT returning imaginary components - DVec work(ldwork, 0.0); - - // Work on a copy of A - B = A; - - char jobL = bL ? 'V' : 'N'; // calc LEFT eigenvectors? - char jobR = bR ? 'V' : 'N'; // calc RIGHT eigenvectors? - - GEEV (jobL,jobR, N, B.data(), LDA, Re.data(), Im.data(), - VL.data(), LDVL, VR.data(), LDVR, work.data(), ldwork, info); - - if (info < 0) { - umERROR("eig(A, Re,Im)", "Error in input argument (%d)\nNo solution computed.", -info); - } else if (info > 0) { - umLOG(1, "eig(A, Re,Im): ...\n" - "\nThe QR algorithm failed to compute all the" - "\neigenvalues, and no eigenvectors have been" - "\ncomputed; elements %d+1:N of WR and WI contain" - "\neigenvalues which have converged.\n", info); - } - -#if (0) - // Return (Re,Imag) parts of eigenvalues as columns of Ev - Ev.resize(N,2); - Ev.set_col(1, Re); - Ev.set_col(2, Im); -#endif - -#ifdef _DEBUG - //##################################################### - // Check for imaginary components in eigenvalues - //##################################################### - double im_max = Im.max_val_abs(); - if (im_max > 1e-6) { - umERROR("eig(A)", "imaginary components in eigenvalues."); - } - //##################################################### -#endif -} - - -// compute eigensystem of a real symmetric matrix -//--------------------------------------------------------- -void eig_sym(const DMat& A, DVec& ev, DMat& Q, bool bDoEVecs) -//--------------------------------------------------------- -{ - if (!A.is_square()) { umERROR("eig_sym(A)", "matrix is not square."); } - - int N = A.num_rows(); - int LDA=N, LDVL=N, LDVR=N, ldwork=10*N, info=0; - DVec work(ldwork, 0.0, OBJ_temp, "work_TMP"); - - Q = A; // Calculate eigenvectors in Q (optional) - ev.resize(N); // Calculate eigenvalues in ev - - char jobV = bDoEVecs ? 'V' : 'N'; - - SYEV (jobV,'U', N, Q.data(), LDA, ev.data(), work.data(), ldwork, info); - - if (info < 0) { - umERROR("eig_sym(A, Re,Im)", "Error in input argument (%d)\nNo solution computed.", -info); - } else if (info > 0) { - umLOG(1, "eig_sym(A, W): ...\n" - "\nthe algorithm failed to converge;" - "\n%d off-diagonal elements of an intermediate" - "\ntridiagonal form did not converge to zero.\n", info); - } -} - - -//--------------------------------------------------------- -DMat& lu(DMat& A, bool in_place) -//--------------------------------------------------------- -{ - // Given square matrix A, return its lu-factorization - // for use later in solving (multiple) linear systems. - - if (!A.is_square()) { umERROR("lu(A)", "matrix is not square."); } - int rows=A.num_rows(); int N=rows, LDA=rows, info=0; - int* ipiv = umIVector(rows); - - if (in_place) - { - // factorize arg - GETRF(N, N, A.data(), LDA, ipiv, info); - if (info) { umERROR("lu(A)", "dgetrf reports: info = %d", info); } - A.set_pivots(ipiv); // store pivots - A.set_factmode(FACT_LUP); // indicate factored state - return A; - } - else - { - // factorize copy of arg - DMat* tmp = new DMat(A, OBJ_temp, "lu(A)"); - GETRF(N, N, tmp->data(), LDA, ipiv, info); - if (info) { umERROR("lu(A)", "dgetrf reports: info = %d", info); } - tmp->set_pivots(ipiv); // store pivots - tmp->set_factmode(FACT_LUP); // indicate factored state - return (*tmp); - } -} - - -//--------------------------------------------------------- -bool lu_solve(DMat& LU, const DMat& B, DMat& X) -//--------------------------------------------------------- -{ - // Solve a set of linear systems using lu-factored square matrix. - try { - LU.solve_LU(B, X, false, false); - } catch(...) { return false; } - return true; -} - - -//--------------------------------------------------------- -DVec& lu_solve(DMat& LU, const DVec& b) -//--------------------------------------------------------- -{ - // Solve a linear system using lu-factored square matrix. - - DVec *x = new DVec("x", OBJ_temp); - try { - LU.solve_LU(b, (*x), false, false); - } catch(...) { x->Free(); } - return (*x); -} - - -// overload to allow Region1D as rhs arg -//--------------------------------------------------------- -DVec& lu_solve(DMat& LU, Region1D R) -//--------------------------------------------------------- -{ - DVec rhs(R); - return lu_solve(LU,rhs); -} - - -//--------------------------------------------------------- -DMat& chol(DMat& A, bool in_place) -//--------------------------------------------------------- -{ - // Given symmetric positive-definite matrix A, - // return its Cholesky-factorization for use - // later in solving (multiple) linear systems. - - int M=A.num_rows(), LDA=A.num_rows(), info=0; - char uplo = 'U'; - - if (in_place) - { - // factorize arg - POTRF (uplo, M, A.data(), LDA, info); - if (info) { umERROR("chol(A)", "dpotrf reports: info = %d", info); } - A.zero_below_diag(); - A.set_factmode(FACT_CHOL); // indicate factored state - return A; - } - else - { - // factorize copy of arg - DMat* tmp = new DMat(A, OBJ_temp, "chol(A)"); - POTRF (uplo, M, tmp->data(), LDA, info); - if (info) { umERROR("chol(A)", "dpotrf reports: info = %d", info); } - tmp->zero_below_diag(); - tmp->set_factmode(FACT_CHOL); // indicate factored state -#if (0) - // compare with Matlab - tmp->print(g_MSGFile, "chol", "lf", 4, 8); -#endif - return (*tmp); - } -} - - -//--------------------------------------------------------- -bool chol_solve(const DMat& ch, const DMat& B, DMat& X) -//--------------------------------------------------------- -{ - // Solve a set of linear systems using Cholesky-factored - // symmetric positive-definite matrix, A = U^T U. - - if (FACT_CHOL != ch.get_factmode()) {umERROR("chol_solve(ch,B,X)", "matrix is not factored.");} - int M =ch.num_rows(), lda=ch.num_rows(); - int ldb=B.num_rows(), nrhs=B.num_cols(); assert(ldb == M); - char uplo = 'U'; int info=0; - double* ch_data = const_cast(ch.data()); - - X = B; // overwrite X with RHS's, then solutions - POTRS (uplo, M, nrhs, ch_data, lda, X.data(), ldb, info); - - if (info) { umERROR("chol_solve(ch,B,X)", "dpotrs reports: info = %d", info); } - return true; -} - - -//--------------------------------------------------------- -DVec& chol_solve(const DMat& ch, const DVec& b) -//--------------------------------------------------------- -{ - // Solves a linear system using Cholesky-factored - // symmetric positive-definite matrix, A = U^T U. - - if (FACT_CHOL != ch.get_factmode()) {umERROR("chol_solve(ch,b)", "matrix is not factored.");} - int M=ch.num_rows(), lda=ch.num_rows(); - int nrhs=1, ldb=b.size(); assert(ldb == M); - char uplo = 'U'; int info=0; - double* ch_data = const_cast(ch.data()); - - // copy RHS into x, then overwrite x with solution - DVec* x = new DVec(b, OBJ_temp); - POTRS (uplo, M, nrhs, ch_data, lda, x->data(), ldb, info); - if (info) { umERROR("chol_solve(ch,b)", "dpotrs reports: info = %d", info); } - return (*x); -} - - -// overload to allow Region1D as rhs arg -//--------------------------------------------------------- -DVec& chol_solve(const DMat& ch, Region1D R) -//--------------------------------------------------------- -{ - DVec rhs(R); - return chol_solve(ch,rhs); -} - - -//--------------------------------------------------------- -DMat& qr(DMat& A, bool in_place) -//--------------------------------------------------------- -{ - // Form orthogonal QR factorization of A(m,n). - // The result Q is represented as a product of - // min(m, n) elementary reflectors. - - int M=A.num_rows(), N=A.num_cols(), LDA=A.num_rows(); - int min_mn = A.min_mn(), info=0; DVec tau(min_mn); - - if (in_place) - { - // factorize arg - GEQRF(M, N, A.data(), LDA, tau.data(), info); - - if (info) { umERROR("qr(A)", "dgeqrf reports: info = %d", info); } - //A.set_qrtau(tau); // H(i) = I - tau * v * v' - A.set_factmode(FACT_QR); // indicate factored state - return A; - } - else - { - // factorize copy of arg - DMat* tmp = new DMat(A, OBJ_temp, "qr(A)"); - GEQRF (M, N, tmp->data(), LDA, tau.data(), info); - - if (info) { umERROR("qr(A)", "dgeqrf reports: info = %d", info); } - //tmp->set_qrtau(tau); // H(i) = I - tau * v * v' - tmp->set_factmode(FACT_QR); // indicate factored state - return (*tmp); - } -} - - - -//--------------------------------------------------------- -void umPOLISH(DVec& V, double eps) -//--------------------------------------------------------- -{ - // round elements close to certain values - - int N = V.size(); - double *p = V.data(); - - for (int i=0; i 0.0) - { - // check for proximity to certain positive values - if (fabs (p[i] - 0.10) < eps) { p[i] = 0.10; } - else if (fabs (p[i] - 0.20) < eps) { p[i] = 0.20; } - else if (fabs (p[i] - 0.25) < eps) { p[i] = 0.25; } - else if (fabs (p[i] - 0.50) < eps) { p[i] = 0.50; } - else if (fabs (p[i] - 0.75) < eps) { p[i] = 0.75; } - else if (fabs (p[i] - 0.80) < eps) { p[i] = 0.80; } - else if (fabs (p[i] - 0.90) < eps) { p[i] = 0.90; } - else if (fabs (p[i] - 1.00) < eps) { p[i] = 1.00; } - else if (fabs (p[i] - 2.00) < eps) { p[i] = 2.00; } - else if (fabs (p[i] - 4.00) < eps) { p[i] = 4.00; } - else if (fabs (p[i] - 4.50) < eps) { p[i] = 4.50; } - else if (fabs (p[i] - 5.00) < eps) { p[i] = 5.00; } - - else if (fabs (p[i] - M_PI ) < eps) { p[i] = M_PI ; } - else if (fabs (p[i] - M_PI_2) < eps) { p[i] = M_PI_2; } - else if (fabs (p[i] - M_PI_4) < eps) { p[i] = M_PI_4; } - else if (fabs (p[i] - M_E ) < eps) { p[i] = M_E ; } - } - else - { - // check for proximity to certain negative values - if (fabs (p[i] + 0.10) < eps) { p[i] = -0.10; } - else if (fabs (p[i] + 0.20) < eps) { p[i] = -0.20; } - else if (fabs (p[i] + 0.25) < eps) { p[i] = -0.25; } - else if (fabs (p[i] + 0.50) < eps) { p[i] = -0.50; } - else if (fabs (p[i] + 0.75) < eps) { p[i] = -0.75; } - else if (fabs (p[i] + 0.80) < eps) { p[i] = -0.80; } - else if (fabs (p[i] + 0.90) < eps) { p[i] = -0.90; } - else if (fabs (p[i] + 1.00) < eps) { p[i] = -1.00; } - else if (fabs (p[i] + 2.00) < eps) { p[i] = -2.00; } - else if (fabs (p[i] + 4.00) < eps) { p[i] = -4.00; } - else if (fabs (p[i] + 4.50) < eps) { p[i] = -4.50; } - else if (fabs (p[i] + 5.00) < eps) { p[i] = -5.00; } - - else if (fabs (p[i] + M_PI ) < eps) { p[i] = -M_PI ; } - else if (fabs (p[i] + M_PI_2) < eps) { p[i] = -M_PI_2; } - else if (fabs (p[i] + M_PI_4) < eps) { p[i] = -M_PI_4; } - else if (fabs (p[i] + M_E ) < eps) { p[i] = -M_E ; } - } - } - } -} - - -//--------------------------------------------------------- -void umPOLISH(DMat& A, double eps) -//--------------------------------------------------------- -{ - DVec& V = dynamic_cast(A); - umPOLISH(V, eps); -} - diff --git a/cpp/nudg++/trunk/Src/Arrays/Sort_Index.cpp b/cpp/nudg++/trunk/Src/Arrays/Sort_Index.cpp deleted file mode 100644 index 0195878..0000000 --- a/cpp/nudg++/trunk/Src/Arrays/Sort_Index.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// Sort_Index.cpp -// enable Matlab's "indexed sort" operation -// 2007/10/14 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include "IndexSort_Type.h" - - -template -class vec_index -{ -public: - T vec; - int indx; -}; - - -template bool ascending_compare (T a, T b) -{ return (a < b); } - - -template bool descending_compare (T a, T b) -{ return (a > b); } - - -template -bool ascending_compare (vec_index *a, vec_index *b) -{ - return (a->vec < b->vec); -} - -template -bool descending_compare (vec_index *a, vec_index *b) -{ - return (a->vec > b->vec); -} - - -//--------------------------------------------------------- -//template -//void Sort_Index -//( -// const Vector& A, // [in] -// Vector& S, // [out] -// IVec& IX, // [out] -// eDir dir // =eAscend -//) -//--------------------------------------------------------- -void Sort_Index -( - const DVec& A, // [in] - DVec& S, // [out] - IVec& IX, // [out] - eDir dir // =eAscend -) -//--------------------------------------------------------- -{ - // For equal elements, the indices are such that - // the equal elements are listed in the order that - // appeared in the original list. - - int ns = A.length(), i=0; - if (ns < 1) { - S.resize(0); // [empty] sorted vector - IX.resize(0); // [empty] index array - return; - } - -//MLIndex_sort *> indexed_sort; - MLIndex_sort *> indexed_sort; - - if (eAscend == dir) { - indexed_sort.set_compare (ascending_compare); - } else { - indexed_sort.set_compare (descending_compare); - } - - //OCTAVE_LOCAL_BUFFER (vec_index *, vi, ns); - //OCTAVE_LOCAL_BUFFER (vec_index, vix, ns); - - vec_index** vi = (vec_index**) calloc(ns, sizeof(vec_index*) ); - vec_index* vix = (vec_index* ) calloc(ns, sizeof(vec_index ) ); - - for (i=0; ivec = A[i]; - vi[i]->indx = i + 1; // 1-based indices - } - - indexed_sort.sort(vi, ns); - - S.resize(ns); // the sorted vector - IX.resize(ns); // the index array - - for (i=0; ivec; // - IX[i] = vi[i]->indx; // FIXME: check base! - } -} diff --git a/cpp/nudg++/trunk/Src/Codes1D/GradJacobiP.cpp b/cpp/nudg++/trunk/Src/Codes1D/GradJacobiP.cpp deleted file mode 100644 index 403b301..0000000 --- a/cpp/nudg++/trunk/Src/Codes1D/GradJacobiP.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// GradJacobiP.m -// function [dP] = GradJacobiP(z, alpha, beta, N); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -//--------------------------------------------------------- -DVec& GradJacobiP(const DVec& z,double alpha,double beta,int N) -//--------------------------------------------------------- -{ - // function [dP] = GradJacobiP(z, alpha, beta, N); - // Purpose: Evaluate the derivative of the orthonormal Jacobi - // polynomial of type (alpha,beta)>-1, at points x - // for order N and returns dP[1:length(xp))] - - DVec* dP = new DVec(z.size(), 0.0, OBJ_temp, "dP"); - if (0 == N) { - dP->fill(0.0); - } else { - (*dP) = sqrt(N*(N+alpha+beta+1))*JacobiP(z,alpha+1,beta+1, N-1); - } - return (*dP); -} diff --git a/cpp/nudg++/trunk/Src/Codes1D/JacobiGL.cpp b/cpp/nudg++/trunk/Src/Codes1D/JacobiGL.cpp deleted file mode 100644 index 4fcac24..0000000 --- a/cpp/nudg++/trunk/Src/Codes1D/JacobiGL.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// JacobiGL.m -// function [x] = JacobiGL(alpha,beta,N); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -//--------------------------------------------------------- -DVec& JacobiGL(double alpha, double beta, int N) -//--------------------------------------------------------- -{ - // function [x] = JacobiGL(alpha,beta,N) - // Purpose: Compute the N'th order Gauss Lobatto quadrature - // points, x, associated with the Jacobi polynomial, - // of type (alpha,beta) > -1 ( <> -0.5). - - DVec* x = new DVec(N+1, 0.0, OBJ_temp); - if (N==1) { (*x)(1)=-1.0; (*x)(2)=1.0; return (*x); } - - DVec xint(1), w(1); Index1D II(2,N); - JacobiGQ(alpha+1,beta+1,N-2, xint,w, true); - - // assemble result: sandwich eigenvalues between [-1,1] - (*x)(1)=-1.0; (*x)(II)=xint; (*x)(N+1)=1.0; - return (*x); -} diff --git a/cpp/nudg++/trunk/Src/Codes1D/JacobiGQ.cpp b/cpp/nudg++/trunk/Src/Codes1D/JacobiGQ.cpp deleted file mode 100644 index 24fb9c6..0000000 --- a/cpp/nudg++/trunk/Src/Codes1D/JacobiGQ.cpp +++ /dev/null @@ -1,85 +0,0 @@ -// JacobiGQ.m -// function [x,w] = JacobiGQ(alpha,beta,N); -// Note: sort eigensystem to match Matlab. -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "VecSort_Type.h" - -//--------------------------------------------------------- -void JacobiGQ -( - double alpha, // [in] - double beta, // [in] - int N, // [in] - DVec& x, // [out] - DVec& w, // [out] - bool sort // sort eigensys? -) -//--------------------------------------------------------- -{ - // function [x,w] = JacobiGQ(alpha,beta,N) - // Purpose: Compute the N'th order Gauss quadrature points, x, - // and weights, w, associated with the Jacobi - // polynomial, of type (alpha,beta) > -1 ( <> -0.5). - - if (0==N) { x(1)=(alpha-beta)/(alpha+beta+2.0); w(1)=2.0; return; } - - double ab1 = alpha+beta+1.0, a1=alpha+1.0, b1=beta+1.0; - DMat J, Vr; - - - //####################################################### - // Note: this assembly differs from the Matlab script. - // - manual assembly of diagonals - // - sorting of LAPACK eigensystem - //####################################################### - - DVec h1 = 2.0*range(0,N)+alpha+beta, d0(N+1), d1(N); int i=0; - - // main diagonal: diag(-1/2*(alpha^2-beta^2)./(h1+2)./h1) - double fac = -0.5*(SQ(alpha)-SQ(beta)); - for (i=1; i<=N+1; ++i) { d0(i) = fac / (h1(i)+2.0) / h1(i); } - - // Handle division by zero - const double eps = 1e-16; - if (alpha+beta < 10*eps) { d0(1)=0.0; } - - // 1st upper diagonal: diag(2./(h1(1:N)+2).*sqrt((1:N).*((1:N)+alpha+beta) .* ((1:N)+alpha).*((1:N)+beta)./(h1(1:N)+1)./(h1(1:N)+3)),1); - for (i=1; i<=N; ++i) { d1(i)=2.0/(h1(i)+2.0)*sqrt(i*(i+alpha+beta)*(i+alpha)*(i+beta)/(h1(i)+1)/(h1(i)+3.0)); } - - // Form symmetric matrix from recurrence. - J.diag(d0); J.set_diag(1,d1); - J += trans(J); // J = J + J'; - - // Compute quadrature by eigenvalue solve - // [Vr,D] = eig(J); x = diag(D); - eig(J, x, Vr); - - if (sort) { - - // Note: Matlab appears to sort results from eig() - // so that the eigenvalues are in ascending order. - // Here we sort the columns of eigenvector matrix - // with the same permutation required to sort the - // eigenvalues into ascending order. Target: make - // w=1st row of eigenvector matrix match Matlab's. - - DVecSort sx=x; IVec idx; - sx.makeIndex(idx); // find sort permutation - sx.sortFromIndexVec(idx); // permute eigenvalues - Vr.sort_cols(idx); // permute eigenvectors - x = sx; // copy sorted evals to x - } - - w = Vr.get_row(1); w.SQR(); - w *= pow(2.0,ab1) / (ab1)*gamma(a1)*gamma(b1)/gamma(ab1); - -#if (0) - dumpDVec(x, "x"); - dumpDVec(w, "w"); - dumpDMat(Vr, "Vr"); - dumpDMat(J, "J"); -#endif - -} diff --git a/cpp/nudg++/trunk/Src/Codes1D/JacobiP.cpp b/cpp/nudg++/trunk/Src/Codes1D/JacobiP.cpp deleted file mode 100644 index c4e9b57..0000000 --- a/cpp/nudg++/trunk/Src/Codes1D/JacobiP.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// JacobiP.m -// function [P] = JacobiP(x,alpha,beta,N); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -DVec& JacobiP(const DVec& x, double alpha, double beta, int N) -//--------------------------------------------------------- -{ - // function [P] = JacobiP(x,alpha,beta,N) - // Purpose: Evaluate Jacobi Polynomial of type (alpha,beta) > -1 - // (alpha+beta <> -1) at points x for order N and - // returns P[1:length(x)] - // Note : They are normalized to be orthonormal. - - double aold=0.0, anew=0.0, bnew=0.0, h1=0.0; - double gamma0=0.0, gamma1=0.0; - double ab=alpha+beta, ab1=alpha+beta+1.0, a1=alpha+1.0, b1=beta+1.0; - - int Nc = x.size(); - DVec* P = new DVec(Nc, 0.0, OBJ_temp, "P"); - DMat PL(N+1, Nc, 0.0); DVec prow, x_bnew; - - // Initial values P_0(x) and P_1(x) - gamma0 = pow(2.0,ab1)/(ab1)*gamma(a1)*gamma(b1)/gamma(ab1); - - if (0==N) { (*P) = 1.0/sqrt(gamma0); return (*P); - } else { PL(1,All) = 1.0/sqrt(gamma0); } - - gamma1 = (a1)*(b1)/(ab+3.0)*gamma0; - prow = ((ab+2.0)*x/2.0 + (alpha-beta)/2.0) / sqrt(gamma1); - - if (1==N) { (*P) = prow; return (*P); - } else { PL.set_row(2,prow); } - - // Repeat value in recurrence. - aold = 2.0/(2.0+ab)*sqrt((a1)*(b1)/(ab+3.0)); - - // Forward recurrence using the symmetry of the recurrence. - for (int i=1; i<=(N-1); ++i) { - h1 = 2.0*i+ab; - anew = 2.0/(h1+2.0)*sqrt((i+1)*(i+ab1)*(i+a1)*(i+b1)/(h1+1.0)/(h1+3.0)); - bnew = - (SQ(alpha)-SQ(beta))/h1/(h1+2.0); - x_bnew = x-bnew; - PL.set_row(i+2, 1.0/anew*( -aold*PL.get_row(i) + x_bnew.dm(PL.get_row(i+1)))); - aold =anew; - } - - (*P) = PL.get_row(N+1); - return (*P); -} diff --git a/cpp/nudg++/trunk/Src/Codes1D/Vandermonde1D.cpp b/cpp/nudg++/trunk/Src/Codes1D/Vandermonde1D.cpp deleted file mode 100644 index 42fa4df..0000000 --- a/cpp/nudg++/trunk/Src/Codes1D/Vandermonde1D.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Vandermonde1D.m -// function [V1D] = Vandermonde1D(N,xp) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -//--------------------------------------------------------- -DMat& Vandermonde1D(int N, const DVec& xp) -//--------------------------------------------------------- -{ - // function [V1D] = Vandermonde1D(N,xp) - // Purpose : Initialize the 1D Vandermonde Matrix. - // V_{ij} = phi_j(xp_i); - - DMat *p1D = new DMat(xp.size(),N+1, 0.0, OBJ_temp, "V1D"); - DMat& V1D = (*p1D); // shorthand - - for (int j=1; j<=(N+1); ++j) { - V1D(All,j) = JacobiP(xp, 0, 0, j-1); - } - return V1D; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/BuildBCMaps2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/BuildBCMaps2D.cpp deleted file mode 100644 index e99ed51..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/BuildBCMaps2D.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// BuildBCMaps2D.m -// function BuildBCMaps2D() -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::BuildBCMaps2D() -//--------------------------------------------------------- -{ - // function BuildMaps2DBC - // Purpose: Build specialized nodal maps for various types of - // boundary conditions, specified in BCType. - - // Note: boundary codes are defined in Global_funcs.h - - // create label of face nodes with boundary types from BCType - IVec bct = trans(BCType), ones(Nfp, 1); - IMat bnodeM = outer(ones, bct); - IVec bnodes = bnodeM; - - // find location of boundary nodes in face and volume node lists - mapI = find(bnodes, '=', (int)BC_In); vmapI = vmapM(mapI); - mapO = find(bnodes, '=', (int)BC_Out); vmapO = vmapM(mapO); - mapW = find(bnodes, '=', (int)BC_Wall); vmapW = vmapM(mapW); - mapF = find(bnodes, '=', (int)BC_Far); vmapF = vmapM(mapF); - mapC = find(bnodes, '=', (int)BC_Cyl); vmapC = vmapM(mapC); - mapD = find(bnodes, '=', (int)BC_Dirichlet); vmapD = vmapM(mapD); - mapN = find(bnodes, '=', (int)BC_Neuman); vmapN = vmapM(mapN); - mapS = find(bnodes, '=', (int)BC_Slip); vmapS = vmapM(mapS); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/BuildCurvedOPS2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/BuildCurvedOPS2D.cpp deleted file mode 100644 index 43de380..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/BuildCurvedOPS2D.cpp +++ /dev/null @@ -1,124 +0,0 @@ -// BuildCurvedOPS2D.m -// function [cinfo] = BuildCurvedOPS2D(intN) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::BuildCurvedOPS2D(int intN) -//--------------------------------------------------------- -{ - // function [cinfo] = BuildCurvedOPS2D(intN) - // purpose: build curved info for curvilinear elements - - // Globals2D; - DVec cR,cS,cW, gz,gw, grf1,gsf1, x1,y1; - DVec crx,csx,cry,csy,cJ, grx,gsx,gry,gsy,gJ,gsJ, gnx,gny; - DMat cV,cVT,cDr,cDs, cMM; - DMat gV[4], gVT[4], gVRR[4], gDr[4], gDs[4]; - DMat_Diag cJcW, crxD,cryD,csxD,csyD, gwgsJD; - int Ncub=0, f1=0,f2=0,k1=0,k2=0,c=0; - - // 1. Create cubature information - - // 1.1 Extract cubature nodes and weights - // [cR,cS,cW,Ncub] = Cubature2D(intN); - Cubature2D(intN, cR,cS,cW,Ncub); - - // 1.1. Build interpolation matrix (nodes->cubature nodes) - cV = InterpMatrix2D(cR, cS); cVT = trans(cV); - - // 1.2 Evaluate derivatives of Lagrange interpolants at cubature nodes - // [cDr,cDs] = Dmatrices2D(N, cR, cS, V); - ::Dmatrices2D(N, cR, cS, this->V, cDr,cDs); - - // 2. Create surface quadrature information - - // 2.1 Compute Gauss nodes and weights for 1D integrals - JacobiGQ(0.0, 0.0, intN, gz, gw); - - // 2.2 Build Gauss nodes running counter-clockwise on element faces - int Ng=gz.size(); DVec mones = -ones(Ng); DMat gR(Ng,3), gS(Ng,3); - gR(All,1) = gz; gR(All,2) = -gz; gR(All,3) = mones; - gS(All,1) = mones; gS(All,2) = gz; gS(All,3) = -gz; - - // 2.3 For each face - for (f1=1; f1<=Nfaces; ++f1) { - - grf1 = gR.get_col(f1); gsf1 = gS.get_col(f1); - - // 2.3.1 build nodes->Gauss quadrature interpolation and differentiation matrices - gV[f1] = InterpMatrix2D(grf1, gsf1); - - // store transposed and reverse-row formats - gVT[f1] = trans(gV[f1]); gVRR[f1] = reverse_rows(gV[f1]); - - ::Dmatrices2D(N, grf1, gsf1, this->V, gDr[f1],gDs[f1]); - } - - // 3. For each curved element, evaluate custom operator matrices - int Ncurved = curved.size(); - - // 3.1 Store custom information in array of Matlab structs - m_cinfo.resize(Ncurved); - - for (c=1; c<=Ncurved; ++c) - { - // sets shape of {gnx,gx,gny,gy} - m_cinfo(c).resize(Ng,Nfaces); - - // find next curved element and the coordinates of its nodes - k1=curved(c); x1=x(All,k1); y1=y(All,k1); m_cinfo(c).elmt=k1; - - // compute geometric factors - ::GeometricFactors2D(x1,y1,cDr,cDs, crx,csx,cry,csy,cJ); - - // load diagonal matrices - cJcW = cJ*cW; crxD=crx; cryD=cry; csxD=csx; csyD=csy; - - // build mass matrix - //cMM = cVT* diag(cJ.*cW)*cV; cinfo(c).MM = cMM; - cMM = cVT*cJcW*cV; m_cinfo(c).MM = cMM; - - // build physical derivative matrices - //m_cinfo(c).Dx = cMM \ (cVT*diag(cW.*cJ)*(diag(crx)*cDr + diag(csx)*cDs)); - m_cinfo(c).Dx = cMM | (cVT*cJcW*(crxD*cDr + csxD*cDs)); - - //m_cinfo(c).Dy = cMM \ (cVT*diag(cW.*cJ)*(diag(cry)*cDr + diag(csy)*cDs)); - m_cinfo(c).Dy = cMM | (cVT*cJcW*(cryD*cDr + csyD*cDs)); - - // build individual lift matrices at each face - for (f1=1; f1<=Nfaces; ++f1) { - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - - // compute geometric factors - ::GeometricFactors2D(x1,y1,gDr[f1],gDs[f1], grx,gsx,gry,gsy,gJ); - - // compute normals and surface Jacobian at Gauss points on face f1 - if (1==f1) { gnx = -gsx; gny = -gsy; } - else if (2==f1) { gnx = grx+gsx; gny = gry+gsy; } - else if (3==f1) { gnx = -grx; gny = -gry; } - - gsJ = sqrt( sqr(gnx) + sqr(gny) ); - gnx /= gsJ; gny /= gsJ; gsJ *= gJ; - - // store normals and coordinates at Gauss nodes - m_cinfo(c).gnx(All,f1) = gnx; m_cinfo(c).gx(All,f1) = gV[f1]*x1; - m_cinfo(c).gny(All,f1) = gny; m_cinfo(c).gy(All,f1) = gV[f1]*y1; - - // store Vandermondes for '-' and '+' traces - m_cinfo(c).gVM[f1] = gV[f1]; - //m_cinfo(c).gVP[f1] = gV(end:-1:1,:,f2); - m_cinfo(c).gVP[f1] = gVRR[f2]; - - gwgsJD = gw*gsJ; // diagonal operator - - // compute and store matrix to lift Gauss node data - //m_cinfo(c).glift[f1] = cMM | ( trans(gV[f1]) * gwgsJD); - m_cinfo(c).glift[f1] = cMM | ( gVT[f1] * gwgsJD); - } - } -} - diff --git a/cpp/nudg++/trunk/Src/Codes2D/BuildMaps2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/BuildMaps2D.cpp deleted file mode 100644 index c9ccc23..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/BuildMaps2D.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// BuildMaps2D.m -// function [mapM, mapP, vmapM, vmapP, vmapB, mapB] = BuildMaps2D() -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - -//--------------------------------------------------------- -void NDG2D::BuildMaps2D() -//--------------------------------------------------------- -{ - // function [mapM, mapP, vmapM, vmapP, vmapB, mapB] = BuildMaps2D - // Purpose: Connectivity and boundary tables for nodes given - // in the K # of elements, each with Np degrees of freedom. - - IVec idsL, idsR, idsM,idsP, vidM,vidP, idM,idP; - IMat idMP; DMat X1,X2,Y1,Y2,D; DVec x1,x2,y1,y2; - int k1=0,f1=0, k2=0,f2=0, skL=0,skR=0, skM=0,skP=0, iL1=0,iL2=0; - int v1=0, v2=0; double refd = 0.0; - - vmapM.resize(Nfp*Nfaces*K); vmapP.resize(Nfp*Nfaces*K); - mapM.range(1,Nfp*Nfaces*K); - mapP = mapM; // .reshape(mapM, Nfp, Nfaces, K); - - int NF = Nfp*Nfaces; - - // number volume nodes consecutively - IVec nodeids = Range(1,Np*K); - - // find index of face nodes with respect to volume node ordering - for (k1=1; k1<=K; ++k1) { - iL1=(k1-1)*NF; iL2=k1*NF; // define target range in vmapM - idsL.range(iL1+1, iL2); // sequential indices for element k1 - idsR = Fmask + (k1-1)*Np; // offset Fmask for element k1 - vmapM(idsL) = nodeids(idsR); // map face nodes in element k1 - } - - DVec one(Nfp, 1.0); - for (k1=1; k1<=K; ++k1) { - for (f1=1; f1<=Nfaces; ++f1) { - - // find neighbor - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - - // reference length of edge - v1 = EToV(k1,f1); v2 = EToV(k1, 1+umMOD(f1,Nfaces)); - refd = sqrt(SQ(VX(v1)-VX(v2)) + SQ(VY(v1)-VY(v2))); - - skM = (k1-1)*NF; // offset to element k1 - skP = (k2-1)*NF; // offset to element k2 - - idsM.range((f1-1)*Nfp+1+skM, f1*Nfp+skM); - idsP.range((f2-1)*Nfp+1+skP, f2*Nfp+skP); - - // find volume node numbers of left and right nodes - vidM = vmapM(idsM); vidP = vmapM(idsP); - - x1 = x(vidM); y1 = y(vidM); x2 = x(vidP); y2 = y(vidP); - X1 = outer(x1,one); Y1 = outer(y1,one); - X2 = outer(x2,one); Y2 = outer(y2,one); - - // Compute distance matrix - D = sqr(X1-trans(X2)) + sqr(Y1-trans(Y2)); - - idMP = find2D( sqrt(abs(D)), '<', NODETOL*refd); - idM=idMP(All,1); idP=idMP(All,2); - - idM += (f1-1)*Nfp + skM; // offset ids to {f1,k1} - vmapP(idM) = vidP(idP); // set external element ids - - idP += (f2-1)*Nfp + skP; // offset ids to {f2,k2} - mapP(idM) = idP; // set external face ids - } - } - - // Create list of boundary nodes - mapB = find(vmapP, '=', vmapM); vmapB = vmapM(mapB); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/BuildPeriodicMaps2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/BuildPeriodicMaps2D.cpp deleted file mode 100644 index eb5998f..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/BuildPeriodicMaps2D.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// BuildPeriodicMaps2D.m -// function BuildPeriodicMaps2D(xperiod, yperiod) -// 2007/06/25 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::BuildPeriodicMaps2D(double xperiod, double yperiod) -//--------------------------------------------------------- -{ - // function [] = BuildPeriodicMaps2D(xperiod, yperiod); - // Purpose: Connectivity and boundary tables for with all - // maps returned in Globals2D assuming periodicity - - // Find node to node connectivity - vmapM.resize(Nfp*Nfaces*K); vmapP.resize(Nfp*Nfaces*K); - - DVec FxL,FyL,FxR,FyR; DMat x1,x2,y1,y2,D,xF1,yF1,xF2,yF2; - IMat idLR; IVec idL,idR,vidL,vidR,fidL,fidR; - int k1=0,f1=0, k2=0,f2=0; DVec onesNfp=ones(Nfp); - double dx=0.0, dy=0.0, cx1=0.0,cx2=0.0,cy1=0.0,cy2=0.0; - double dNfp=(double)Nfp; - - - for (k1=1; k1<=K; ++k1) { - for (f1=1; f1<=Nfaces; ++f1) { - - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - - vidL = Fmask(All,f1); vidL += (k1-1)*Np; - vidR = Fmask(All,f2); vidR += (k2-1)*Np; - - fidL = Range(1,Nfp) + (f1-1)*Nfp + (k1-1)*Nfp*Nfaces; - fidR = Range(1,Nfp) + (f2-1)*Nfp + (k2-1)*Nfp*Nfaces; - - vmapM(fidL) = vidL; vmapP(fidL) = vidL; - - FxL=Fx(fidL); FyL=Fy(fidL); FxR=Fx(fidR); FyR=Fy(fidR); - x1 = outer(FxL, onesNfp); y1 = outer(FyL, onesNfp); - x2 = outer(FxR, onesNfp); y2 = outer(FyR, onesNfp); - - // Compute distance matrix - D = sqr(x1-trans(x2)) + sqr(y1-trans(y2)); - - idLR = find2D(abs(D), '<', NODETOL); - idL=idLR(All,1); idR=idLR(All,2); - - vmapP(fidL(idL)) = vidR(idR); - } - } - - - - for (k1=1; k1<=K; ++k1) { - for (f1=1; f1<=Nfaces; ++f1) { - - //################################################### - xF1=x(Fmask(All,f1), k1); cx1=xF1.sum()/dNfp; - yF1=y(Fmask(All,f1), k1); cy1=yF1.sum()/dNfp; - //################################################### - - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - if (k2==k1) { - for (k2=1; k2<=K; ++k2) { - if (k1!=k2) { - for (f2=1; f2<=Nfaces; ++f2) { - if (EToE(k2,f2)==k2) { - - //######################################### - xF2=x(Fmask(All,f2), k2); cx2=xF2.sum()/dNfp; - yF2=y(Fmask(All,f2), k2); cy2=yF2.sum()/dNfp; - //######################################### - - dx = sqrt( SQ(abs(cx1-cx2)-xperiod) + SQ(cy1-cy2)); - dy = sqrt( SQ(cx1-cx2) + SQ(abs(cy1-cy2)-yperiod)); - - if (dx 28 not yet tested\n", Corder); - - DVec cuba,cubwa, cubb,cubwb; - DMat cubA, cubB, cubR, cubS, cubW, tA,tB; - - int cubNA=(int)ceil((Corder+1.0)/2.0); - int cubNB=(int)ceil((Corder+1.0)/2.0); - - JacobiGQ(0.0, 0.0, cubNA-1, cuba,cubwa); - JacobiGQ(1.0, 0.0, cubNB-1, cubb,cubwb); - - cubA = outer( ones(cubNB), cuba ); - cubB = outer( cubb, ones(cubNA) ); - - tA = 1.0+cubA; tB = 1.0-cubB; - cubR = 0.5 * tA.dm(tB) - 1.0; - cubS = cubB; - cubW = 0.5 * outer(cubwb, cubwa); - - cub.r = cubR; - cub.s = cubS; - cub.w = cubW; - cub.Ncub = cub.r.size(); - } -} - - -//--------------------------------------------------------- -void Cubature2D(int Corder, DVec& r, DVec& s, DVec& w, int& Ncub) -//--------------------------------------------------------- -{ - Cub2D cub; Cubature2D(Corder, cub); - r = cub.r; s = cub.s; w = cub.w; - Ncub = cub.Ncub; -} - - -//--------------------------------------------------------- -void Cub2D_data(int Cn, DMat& RSW) -//--------------------------------------------------------- -{ - DVec Cd; - - //------------------------------------- - // load data for nth-order cubature - //------------------------------------- - - switch (Cn) { - //------------------ # -- data --------- - case 1: Cd.copy( 3, cub2D_1); break; - case 2: Cd.copy( 9, cub2D_2); break; - case 3: Cd.copy( 18, cub2D_3); break; - case 4: Cd.copy( 18, cub2D_4); break; - case 5: Cd.copy( 21, cub2D_5); break; - case 6: Cd.copy( 36, cub2D_6); break; - case 7: Cd.copy( 45, cub2D_7); break; - case 8: Cd.copy( 48, cub2D_8); break; - case 9: Cd.copy( 57, cub2D_9); break; - - case 10: Cd.copy( 75, cub2D_10); break; - case 11: Cd.copy( 84, cub2D_11); break; - case 12: Cd.copy( 108, cub2D_12); break; - case 13: Cd.copy( 120, cub2D_13); break; - case 14: Cd.copy( 138, cub2D_14); break; - case 15: Cd.copy( 162, cub2D_15); break; - case 16: Cd.copy( 174, cub2D_16); break; - case 17: Cd.copy( 198, cub2D_17); break; - case 18: Cd.copy( 219, cub2D_18); break; - case 19: Cd.copy( 246, cub2D_19); break; - - case 20: Cd.copy( 255, cub2D_20); break; - case 21: Cd.copy( 279, cub2D_21); break; - case 22: Cd.copy( 300, cub2D_22); break; - case 23: Cd.copy( 318, cub2D_23); break; - case 24: Cd.copy( 354, cub2D_24); break; - case 25: Cd.copy( 378, cub2D_25); break; - case 26: Cd.copy( 414, cub2D_26); break; - case 27: Cd.copy( 435, cub2D_27); break; - case 28: Cd.copy( 675, cub2D_28); break; - default: - umERROR("Cubature2D(%d)", - "Invalid order for 2D cubature. Expected [1:28]", Cn); - break; - } - - // Data in Cd is stored as {r,s,w} triples. - // Load triples as columns, then transpose - // to sort data into columns for {R,S,W}. - - int Nr = Cd.size()/3; - RSW.load(3, Nr, Cd.data()); - RSW.transpose(); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/CubatureData2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CubatureData2D.cpp deleted file mode 100644 index 74b4411..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CubatureData2D.cpp +++ /dev/null @@ -1,1836 +0,0 @@ -// CubatureData2D.h -// database of precalculated cubature data -// 2006/12/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -//--------------------------------------------------------- -// -// Purpose: script to set the nodes and weights of -// multidimensional quadrature (cubature) rules -// -// Cubature formulae from: -// -// Cools, R. "Monomial Cubature Rules Since "Stroud": -// A Compilation--Part 2." -// -// J. Comput. Appl. Math. 112, 21-27, 1999. -// -// Cools, R. "Encyclopaedia of Cubature Formulas." -// http://www.cs.kuleuven.ac.be/~nines/research/ecf/ecf.html -// -//--------------------------------------------------------- - - -double cub2D_1[3] = { // 3 * 1 --0.333333333333333, -0.333333333333333, 2.000000000000000 -}; - -double cub2D_2[9] = { // 3 * 3 - -0.666666666666667, -0.666666666666667, 0.666666666666667, - 0.333333333333333, -0.666666666666667, 0.666666666666667, - -0.666666666666667, 0.333333333333333, 0.666666666666667 -}; - -double cub2D_3[18] = { // 3 * 6 - -0.816847572980458, -0.816847572980458, 0.219903487310644, - 0.633695145960917, -0.816847572980459, 0.219903487310644, - -0.816847572980459, 0.633695145960917, 0.219903487310644, - -0.108103018168070, -0.108103018168070, 0.446763179356023, - -0.783793963663860, -0.108103018168070, 0.446763179356023, - -0.108103018168070, -0.783793963663860, 0.446763179356023 -}; - -double cub2D_4[18] = { // 3 * 6 - -0.816847572980458, -0.816847572980458, 0.219903487310644, - 0.633695145960917, -0.816847572980459, 0.219903487310644, - -0.816847572980459, 0.633695145960917, 0.219903487310644, - -0.108103018168070, -0.108103018168070, 0.446763179356023, - -0.783793963663860, -0.108103018168070, 0.446763179356023, - -0.108103018168070, -0.783793963663860, 0.446763179356023 -}; - -double cub2D_5[21] = { // 3 * 7 - -0.333333333333333, -0.333333333333333, 0.450000000000000, - -0.059715871789770, -0.059715871789770, 0.264788305577012, - -0.880568256420460, -0.059715871789770, 0.264788305577012, - -0.059715871789770, -0.880568256420460, 0.264788305577012, - -0.797426985353087, -0.797426985353087, 0.251878361089654, - 0.594853970706175, -0.797426985353087, 0.251878361089654, - -0.797426985353087, 0.594853970706175, 0.251878361089654 -}; - -double cub2D_6[36] = { // 3 * 12 - -0.501426509658179, -0.501426509658179, 0.233572551452759, - 0.002853019316358, -0.501426509658179, 0.233572551452759, - -0.501426509658179, 0.002853019316358, 0.233572551452759, - -0.873821971016996, -0.873821971016996, 0.101689812740414, - 0.747643942033991, -0.873821971016996, 0.101689812740414, - -0.873821971016996, 0.747643942033991, 0.101689812740414, - -0.379295097932431, -0.893709900310366, 0.165702151236747, - -0.893709900310366, -0.379295097932431, 0.165702151236747, - 0.273004998242797, -0.893709900310366, 0.165702151236747, - -0.893709900310366, 0.273004998242797, 0.165702151236747, - 0.273004998242797, -0.379295097932431, 0.165702151236747, - -0.379295097932431, 0.273004998242797, 0.165702151236747 -}; - -double cub2D_7[45] = { // 3 * 15 - -0.158765070723907, -0.158765070723907, 0.278402959350494, - -0.682469858552186, -0.158765070723907, 0.278402959350494, - -0.158765070723907, -0.682469858552186, 0.278402959350494, - -0.901937632421608, -0.901937632421608, 0.063653882657145, - 0.803875264843215, -0.901937632421608, 0.063653882657145, - -0.901937632421608, 0.803875264843215, 0.063653882657145, - -0.696696002590528, -0.696696002590528, 0.168642646759703, - 0.393392005181056, -0.696696002590528, 0.168642646759703, - -0.696696002590528, 0.393392005181056, 0.168642646759703, - 0.348275575962283, -0.375762055856278, 0.077983588949662, - -0.375762055856278, 0.348275575962283, 0.077983588949662, - -0.972513520106005, -0.375762055856278, 0.077983588949662, - -0.375762055856278, -0.972513520106005, 0.077983588949662, - -0.972513520106005, 0.348275575962283, 0.077983588949662, - 0.348275575962283, -0.972513520106005, 0.077983588949662 -}; - -double cub2D_8[48] = { // 3 * 16 - -0.333333333333333, -0.333333333333333, 0.288631215355574, - -0.081414823414554, -0.081414823414554, 0.190183268534569, - -0.837170353170893, -0.081414823414554, 0.190183268534569, - -0.081414823414554, -0.837170353170893, 0.190183268534569, - -0.658861384496480, -0.658861384496480, 0.206434741069437, - 0.317722768992959, -0.658861384496480, 0.206434741069437, - -0.658861384496480, 0.317722768992959, 0.206434741069437, - -0.898905543365938, -0.898905543365938, 0.064916995246396, - 0.797811086731876, -0.898905543365938, 0.064916995246396, - -0.898905543365938, 0.797811086731876, 0.064916995246396, - -0.473774340730724, 0.456984785910809, 0.054460628348870, - 0.456984785910809, -0.473774340730724, 0.054460628348870, - -0.983210445180085, 0.456984785910809, 0.054460628348870, - 0.456984785910809, -0.983210445180085, 0.054460628348870, - -0.983210445180085, -0.473774340730724, 0.054460628348870, - -0.473774340730724, -0.983210445180085, 0.054460628348870 -}; - -double cub2D_9[57] = { // 3 * 19 - -0.333333333333333, -0.333333333333333, 0.194271592565598, - -0.020634961602525, -0.020634961602525, 0.062669400454278, - -0.958730076794950, -0.020634961602525, 0.062669400454278, - -0.020634961602525, -0.958730076794950, 0.062669400454278, - -0.125820817014127, -0.125820817014127, 0.155655082009549, - -0.748358365971746, -0.125820817014127, 0.155655082009549, - -0.125820817014127, -0.748358365971746, 0.155655082009549, - -0.623592928761935, -0.623592928761935, 0.159295477854420, - 0.247185857523869, -0.623592928761935, 0.159295477854420, - -0.623592928761935, 0.247185857523869, 0.159295477854420, - -0.910540973211095, -0.910540973211095, 0.051155351317396, - 0.821081946422189, -0.910540973211095, 0.051155351317396, - -0.910540973211095, 0.821081946422189, 0.051155351317396, - 0.482397197568996, -0.556074021678469, 0.086567078754579, - -0.556074021678469, 0.482397197568996, 0.086567078754579, - -0.926323175890527, -0.556074021678469, 0.086567078754579, - -0.556074021678469, -0.926323175890527, 0.086567078754579, - -0.926323175890527, 0.482397197568996, 0.086567078754579, - 0.482397197568996, -0.926323175890527, 0.086567078754579 -}; - -double cub2D_10[75] = { // 3 * 25 - -0.333333333333333, -0.333333333333333, 0.167046799610393, - -0.004269134091050, -0.004269134091050, 0.014459701184113, - -0.991461731817899, -0.004269134091050, 0.014459701184113, - -0.004269134091050, -0.991461731817899, 0.014459701184113, - -0.143975100541888, -0.143975100541888, 0.148984355841961, - -0.712049798916225, -0.143975100541888, 0.148984355841961, - -0.143975100541888, -0.712049798916225, 0.148984355841961, - -0.630487174513551, -0.630487174513551, 0.157292946806217, - 0.260974349027102, -0.630487174513551, 0.157292946806217, - -0.630487174513551, 0.260974349027102, 0.157292946806217, - -0.959037562856645, -0.959037562856645, 0.013856646174215, - 0.918075125713290, -0.959037562856645, 0.013856646174215, - -0.959037562856645, 0.918075125713290, 0.013856646174215, - -0.726852847487933, 0.656846867693389, 0.059036640669559, - 0.656846867693389, -0.726852847487933, 0.059036640669559, - -0.929994020205456, 0.656846867693389, 0.059036640669559, - 0.656846867693389, -0.929994020205456, 0.059036640669559, - -0.929994020205456, -0.726852847487933, 0.059036640669559, - -0.726852847487933, -0.929994020205456, 0.059036640669559, - -0.334512798822723, 0.259414658305837, 0.079158734392122, - 0.259414658305837, -0.334512798822723, 0.079158734392122, - -0.924901859483115, 0.259414658305837, 0.079158734392122, - 0.259414658305837, -0.924901859483115, 0.079158734392122, - -0.924901859483115, -0.334512798822723, 0.079158734392122, - -0.334512798822723, -0.924901859483115, 0.079158734392122 -}; - -double cub2D_11[84] = { // 3 * 28 - -0.333333333333333, -0.333333333333333, 0.171542269659139, - -0.008227986519701, -0.008227986519701, 0.033232309648099, - -0.983544026960598, -0.008227986519701, 0.033232309648099, - -0.008227986519701, -0.983544026960598, 0.033232309648099, - -0.123062767323470, -0.123062767323470, 0.134650934561697, - -0.753874465353061, -0.123062767323470, 0.134650934561697, - -0.123062767323470, -0.753874465353061, 0.134650934561697, - -0.579583807314522, -0.579583807314522, 0.141045284213931, - 0.159167614629044, -0.579583807314522, 0.141045284213931, - -0.579583807314522, 0.159167614629044, 0.141045284213931, - -0.794793191450311, -0.794793191450311, 0.077255352409353, - 0.589586382900622, -0.794793191450311, 0.077255352409353, - -0.794793191450311, 0.589586382900622, 0.077255352409353, - -0.943045809035533, -0.943045809035533, 0.020851693311810, - 0.886091618071066, -0.943045809035533, 0.020851693311810, - -0.943045809035533, 0.886091618071066, 0.020851693311810, - -0.701412405190965, 0.686811031831200, 0.020556454130106, - 0.686811031831200, -0.701412405190965, 0.020556454130106, - -0.985398626640235, 0.686811031831200, 0.020556454130106, - 0.686811031831200, -0.985398626640235, 0.020556454130106, - -0.985398626640235, -0.701412405190966, 0.020556454130106, - -0.701412405190966, -0.985398626640235, 0.020556454130106, - -0.420944470627256, 0.328932876191794, 0.080668713854259, - 0.328932876191794, -0.420944470627256, 0.080668713854259, - -0.907988405564538, 0.328932876191794, 0.080668713854259, - 0.328932876191794, -0.907988405564538, 0.080668713854259, - -0.907988405564538, -0.420944470627256, 0.080668713854259, - -0.420944470627256, -0.907988405564538, 0.080668713854259 -}; - -double cub2D_12[108] = { // 3 * 36 - -0.115127288420454, -0.115127288420454, 0.088694050812375, - -0.769745423159092, -0.115127288420454, 0.088694050812375, - -0.115127288420454, -0.769745423159092, 0.088694050812375, - -0.241326933740970, -0.241326933740970, 0.083486638970495, - -0.517346132518060, -0.241326933740970, 0.083486638970495, - -0.241326933740970, -0.517346132518060, 0.083486638970495, - -0.773435586772427, -0.773435586772427, 0.061949370456958, - 0.546871173544855, -0.773435586772427, 0.061949370456958, - -0.773435586772427, 0.546871173544855, 0.061949370456958, - -0.550360151853422, -0.550360151853422, 0.096926744607805, - 0.100720303706844, -0.550360151853422, 0.096926744607805, - -0.550360151853422, 0.100720303706844, 0.096926744607805, - -0.949850839686919, -0.949850839686919, 0.016284715813394, - 0.899701679373837, -0.949850839686919, 0.016284715813394, - -0.949850839686919, 0.899701679373837, 0.016284715813394, - -0.023247583079632, -0.023247583079632, 0.047730162209543, - -0.953504833840737, -0.023247583079632, 0.047730162209543, - -0.023247583079632, -0.953504833840737, 0.047730162209543, - 0.701114686742190, -0.956341185792092, 0.030740478172077, - -0.956341185792092, 0.701114686742190, 0.030740478172077, - -0.744773500950097, -0.956341185792092, 0.030740478172077, - -0.956341185792092, -0.744773500950097, 0.030740478172077, - -0.744773500950097, 0.701114686742189, 0.030740478172077, - 0.701114686742189, -0.744773500950097, 0.030740478172077, - 0.280974603820889, -0.820754518409649, 0.073364295183933, - -0.820754518409649, 0.280974603820889, 0.073364295183933, - -0.460220085411240, -0.820754518409649, 0.073364295183933, - -0.820754518409649, -0.460220085411240, 0.073364295183933, - -0.460220085411240, 0.280974603820889, 0.073364295183933, - 0.280974603820889, -0.460220085411240, 0.073364295183933, - 0.380092839755442, -0.412599349012509, 0.031692718542038, - -0.412599349012509, 0.380092839755442, 0.031692718542038, - -0.967493490742933, -0.412599349012509, 0.031692718542038, - -0.412599349012509, -0.967493490742933, 0.031692718542038, - -0.967493490742933, 0.380092839755442, 0.031692718542038, - 0.380092839755442, -0.967493490742933, 0.031692718542038 -}; - -double cub2D_13[120] = { // 3 * 40 - -0.333333333333333, -0.333333333333333, 0.097649880256618, - -0.178369512906405, -0.178369512906405, 0.090830392435257, - -0.643260974187191, -0.178369512906405, 0.090830392435257, - -0.178369512906405, -0.643260974187191, 0.090830392435257, - -0.542160866418819, -0.542160866418819, 0.093688172298398, - 0.084321732837639, -0.542160866418819, 0.093688172298398, - -0.542160866418819, 0.084321732837639, 0.093688172298398, - -0.771083702251175, -0.771083702251175, 0.062636625766914, - 0.542167404502350, -0.771083702251175, 0.062636625766914, - -0.771083702251175, 0.542167404502350, 0.062636625766914, - -0.951222762153923, -0.951222762153923, 0.015384123058757, - 0.902445524307847, -0.951222762153923, 0.015384123058757, - -0.951222762153923, 0.902445524307847, 0.015384123058757, - -0.071124044893491, -0.071124044893491, 0.063336411850675, - -0.857751910213018, -0.071124044893491, 0.063336411850675, - -0.071124044893491, -0.857751910213018, 0.063336411850675, - 0.089497598920545, -0.972567007080596, 0.017363112895214, - -0.972567007080596, 0.089497598920545, 0.017363112895214, - -0.116930591839948, -0.972567007080596, 0.017363112895214, - -0.972567007080596, -0.116930591839948, 0.017363112895214, - -0.116930591839948, 0.089497598920545, 0.017363112895214, - 0.089497598920545, -0.116930591839948, 0.017363112895214, - 0.708303576893352, -0.752827405974001, 0.030203519313196, - -0.752827405974001, 0.708303576893352, 0.030203519313196, - -0.955476170919351, -0.752827405974001, 0.030203519313196, - -0.752827405974001, -0.955476170919351, 0.030203519313196, - -0.955476170919351, 0.708303576893352, 0.030203519313196, - 0.708303576893352, -0.955476170919351, 0.030203519313196, - 0.400693795223418, -0.438009873048077, 0.032954120635442, - -0.438009873048077, 0.400693795223418, 0.032954120635442, - -0.962683922175342, -0.438009873048076, 0.032954120635442, - -0.438009873048076, -0.962683922175342, 0.032954120635442, - -0.962683922175342, 0.400693795223419, 0.032954120635442, - 0.400693795223419, -0.962683922175342, 0.032954120635442, - -0.461147708177324, -0.809703416305633, 0.073599737741711, - -0.809703416305633, -0.461147708177324, 0.073599737741711, - 0.270851124482956, -0.809703416305633, 0.073599737741711, - -0.809703416305633, 0.270851124482956, 0.073599737741711, - 0.270851124482956, -0.461147708177324, 0.073599737741711, - -0.461147708177324, 0.270851124482956, 0.073599737741711 -}; - -double cub2D_14[138] = { // 3 * 46 - -0.333333333333333, -0.333333333333333, 0.086016161940337, - -0.031437623162377, -0.031437623162377, 0.020861042581505, - -0.937124753675245, -0.031437623162377, 0.020861042581505, - -0.031437623162377, -0.937124753675245, 0.020861042581505, - -0.190179067155837, -0.190179067155837, 0.084906577433761, - -0.619641865688325, -0.190179067155837, 0.084906577433761, - -0.190179067155837, -0.619641865688325, 0.084906577433761, - -0.544945017724160, -0.544945017724160, 0.094412955694385, - 0.089890035448320, -0.544945017724160, 0.094412955694385, - -0.544945017724160, 0.089890035448320, 0.094412955694385, - -0.829084434528895, -0.829084434528895, 0.036931420530108, - 0.658168869057790, -0.829084434528895, 0.036931420530108, - -0.829084434528895, 0.658168869057790, 0.036931420530108, - -0.961731843229187, -0.961731843229187, 0.009566859223433, - 0.923463686458374, -0.961731843229187, 0.009566859223433, - -0.961731843229187, 0.923463686458374, 0.009566859223433, - -0.228055909294146, 0.200257489743243, 0.023873332102599, - 0.200257489743243, -0.228055909294146, 0.023873332102599, - -0.972201580449098, 0.200257489743243, 0.023873332102599, - 0.200257489743243, -0.972201580449098, 0.023873332102599, - -0.972201580449097, -0.228055909294146, 0.023873332102599, - -0.228055909294146, -0.972201580449097, 0.023873332102599, - -0.801926305237733, 0.769518568627872, 0.018006541968931, - 0.769518568627872, -0.801926305237733, 0.018006541968931, - -0.967592263390139, 0.769518568627872, 0.018006541968931, - 0.769518568627872, -0.967592263390139, 0.018006541968931, - -0.967592263390139, -0.801926305237733, 0.018006541968931, - -0.801926305237733, -0.967592263390139, 0.018006541968931, - -0.544893784145096, 0.504355701557747, 0.030117913357456, - 0.504355701557747, -0.544893784145096, 0.030117913357456, - -0.959461917412651, 0.504355701557747, 0.030117913357456, - 0.504355701557747, -0.959461917412651, 0.030117913357456, - -0.959461917412651, -0.544893784145095, 0.030117913357456, - -0.544893784145095, -0.959461917412651, 0.030117913357456, - -0.288429073961769, 0.109399611316741, 0.067035335144205, - 0.109399611316741, -0.288429073961769, 0.067035335144205, - -0.820970537354972, 0.109399611316741, 0.067035335144205, - 0.109399611316741, -0.820970537354972, 0.067035335144205, - -0.820970537354972, -0.288429073961769, 0.067035335144205, - -0.288429073961769, -0.820970537354972, 0.067035335144205, - -0.593507885280605, 0.397658756992448, 0.056624756038490, - 0.397658756992448, -0.593507885280605, 0.056624756038490, - -0.804150871711842, 0.397658756992447, 0.056624756038490, - 0.397658756992447, -0.804150871711842, 0.056624756038490, - -0.804150871711842, -0.593507885280605, 0.056624756038490, - -0.593507885280605, -0.804150871711842, 0.056624756038490 -}; - -double cub2D_15[162] = { // 3 * 54 - -0.083438407261750, -0.083438407261750, 0.065323637697611, - -0.833123185476500, -0.083438407261750, 0.065323637697611, - -0.083438407261750, -0.833123185476500, 0.065323637697611, - -0.192779070841739, -0.192779070841739, 0.054825636062729, - -0.614441858316522, -0.192779070841739, 0.054825636062729, - -0.192779070841739, -0.614441858316522, 0.054825636062729, - -0.413605664173949, -0.413605664173949, 0.053020073197407, - -0.172788671652101, -0.413605664173949, 0.053020073197407, - -0.413605664173949, -0.172788671652101, 0.053020073197407, - -0.707064426114454, -0.707064426114454, 0.058431924272972, - 0.414128852228908, -0.707064426114454, 0.058431924272972, - -0.707064426114454, 0.414128852228908, 0.058431924272972, - -0.887274264668793, -0.887274264668793, 0.021169216132488, - 0.774548529337586, -0.887274264668793, 0.021169216132488, - -0.887274264668793, 0.774548529337586, 0.021169216132488, - -0.966849746283259, -0.966849746283259, 0.007229286128184, - 0.933699492566519, -0.966849746283259, 0.007229286128184, - -0.966849746283259, 0.933699492566519, 0.007229286128184, - -0.520930891690411, 0.501106485071962, 0.017055496203419, - 0.501106485071962, -0.520930891690411, 0.017055496203419, - -0.980175593381550, 0.501106485071962, 0.017055496203419, - 0.501106485071962, -0.980175593381550, 0.017055496203419, - -0.980175593381550, -0.520930891690411, 0.017055496203419, - -0.520930891690411, -0.980175593381550, 0.017055496203419, - -0.190242385363320, 0.158634844102864, 0.027832353033384, - 0.158634844102864, -0.190242385363320, 0.027832353033384, - -0.968392458739544, 0.158634844102864, 0.027832353033384, - 0.158634844102864, -0.968392458739544, 0.027832353033384, - -0.968392458739544, -0.190242385363320, 0.027832353033384, - -0.190242385363320, -0.968392458739544, 0.027832353033384, - -0.809995773773910, 0.799708556139969, 0.008583865881470, - 0.799708556139969, -0.809995773773910, 0.008583865881470, - -0.989712782366059, 0.799708556139969, 0.008583865881470, - 0.799708556139969, -0.989712782366059, 0.008583865881470, - -0.989712782366059, -0.809995773773910, 0.008583865881470, - -0.809995773773910, -0.989712782366059, 0.008583865881470, - -0.700493785355452, 0.602649133849474, 0.032470658563550, - 0.602649133849474, -0.700493785355452, 0.032470658563550, - -0.902155348494022, 0.602649133849474, 0.032470658563550, - 0.602649133849474, -0.902155348494022, 0.032470658563550, - -0.902155348494023, -0.700493785355452, 0.032470658563550, - -0.700493785355452, -0.902155348494023, 0.032470658563550, - -0.426160775117330, 0.288623277852292, 0.051214681842525, - 0.288623277852292, -0.426160775117330, 0.051214681842525, - -0.862462502734962, 0.288623277852292, 0.051214681842525, - 0.288623277852292, -0.862462502734962, 0.051214681842525, - -0.862462502734962, -0.426160775117330, 0.051214681842525, - -0.426160775117330, -0.862462502734962, 0.051214681842525, - -0.436328663801831, 0.099519827552432, 0.066176391063291, - 0.099519827552432, -0.436328663801831, 0.066176391063291, - -0.663191163750602, 0.099519827552432, 0.066176391063291, - 0.099519827552432, -0.663191163750602, 0.066176391063291, - -0.663191163750602, -0.436328663801831, 0.066176391063291, - -0.436328663801831, -0.663191163750602, 0.066176391063291 -}; - -double cub2D_16[174] = { // 3 * 58 - -0.333333333333333, -0.333333333333333, 0.092421202321849, - -0.015796436959213, -0.015796436959213, 0.027991652734724, - -0.968407126081574, -0.015796436959213, 0.027991652734724, - -0.015796436959213, -0.968407126081574, 0.027991652734724, - -0.087376299046785, -0.087376299046785, 0.036406763596424, - -0.825247401906431, -0.087376299046785, 0.036406763596424, - -0.087376299046785, -0.825247401906431, 0.036406763596424, - -0.640498098534045, -0.640498098534045, 0.062729423327251, - 0.280996197068091, -0.640498098534045, 0.062729423327251, - -0.640498098534045, 0.280996197068091, 0.062729423327251, - -0.828211591878549, -0.828211591878549, 0.032217170192673, - 0.656423183757099, -0.828211591878549, 0.032217170192673, - -0.828211591878549, 0.656423183757099, 0.032217170192673, - -0.977882767295650, -0.977882767295650, 0.003676792575648, - 0.955765534591299, -0.977882767295650, 0.003676792575648, - -0.977882767295650, 0.955765534591299, 0.003676792575648, - -0.648594849699253, 0.619534954455185, 0.019075686313307, - 0.619534954455185, -0.648594849699253, 0.019075686313307, - -0.970940104755933, 0.619534954455185, 0.019075686313307, - 0.619534954455185, -0.970940104755933, 0.019075686313307, - -0.970940104755933, -0.648594849699253, 0.019075686313307, - -0.648594849699253, -0.970940104755933, 0.019075686313307, - -0.355089058161032, 0.324703448463838, 0.025111336723323, - 0.324703448463838, -0.355089058161032, 0.025111336723323, - -0.969614390302806, 0.324703448463838, 0.025111336723323, - 0.324703448463838, -0.969614390302806, 0.025111336723323, - -0.969614390302806, -0.355089058161032, 0.025111336723323, - -0.355089058161032, -0.969614390302806, 0.025111336723323, - -0.863082725186344, 0.829810165174004, 0.014134510743040, - 0.829810165174004, -0.863082725186344, 0.014134510743040, - -0.966727439987660, 0.829810165174004, 0.014134510743040, - 0.829810165174004, -0.966727439987660, 0.014134510743040, - -0.966727439987660, -0.863082725186344, 0.014134510743040, - -0.863082725186344, -0.966727439987660, 0.014134510743040, - -0.650110471151428, 0.511910525190604, 0.025255543672496, - 0.511910525190604, -0.650110471151428, 0.025255543672496, - -0.861800054039176, 0.511910525190604, 0.025255543672496, - 0.511910525190604, -0.861800054039176, 0.025255543672496, - -0.861800054039176, -0.650110471151428, 0.025255543672496, - -0.650110471151428, -0.861800054039176, 0.025255543672496, - -0.282624366842035, 0.131065359625217, 0.038432852520849, - 0.131065359625217, -0.282624366842035, 0.038432852520849, - -0.848440992783182, 0.131065359625217, 0.038432852520849, - 0.131065359625217, -0.848440992783182, 0.038432852520849, - -0.848440992783182, -0.282624366842035, 0.038432852520849, - -0.282624366842035, -0.848440992783182, 0.038432852520849, - -0.500121711290305, 0.333566061453817, 0.032993291211606, - 0.333566061453817, -0.500121711290305, 0.032993291211606, - -0.833444350163512, 0.333566061453817, 0.032993291211606, - 0.333566061453817, -0.833444350163512, 0.032993291211606, - -0.833444350163512, -0.500121711290305, 0.032993291211606, - -0.500121711290305, -0.833444350163512, 0.032993291211606, - -0.353308953197778, -0.027538833736648, 0.081415677215044, - -0.027538833736648, -0.353308953197778, 0.081415677215044, - -0.619152213065573, -0.027538833736648, 0.081415677215044, - -0.027538833736648, -0.619152213065573, 0.081415677215044, - -0.619152213065573, -0.353308953197778, 0.081415677215044, - -0.353308953197778, -0.619152213065573, 0.081415677215044 -}; - -double cub2D_17[198] = { // 3 * 66 - -0.013565183960096, -0.013565183960096, 0.022448424077156, - -0.972869632079808, -0.013565183960096, 0.022448424077156, - -0.013565183960096, -0.972869632079808, 0.022448424077156, - -0.918012666387151, -0.918012666387151, 0.011377816766740, - 0.836025332774302, -0.918012666387151, 0.011377816766740, - -0.918012666387151, 0.836025332774302, 0.011377816766740, - -0.469265478050798, -0.469265478050798, 0.056148078797670, - -0.061469043898404, -0.469265478050798, 0.056148078797670, - -0.469265478050798, -0.061469043898404, 0.056148078797670, - -0.278161974512876, -0.278161974512876, 0.031804753050686, - -0.443676050974249, -0.278161974512876, 0.031804753050686, - -0.278161974512876, -0.443676050974249, 0.031804753050686, - -0.743831619059579, -0.743831619059579, 0.042944604159838, - 0.487663238119159, -0.743831619059579, 0.042944604159838, - -0.743831619059579, 0.487663238119159, 0.042944604159838, - -0.975086972700342, -0.975086972700342, 0.004138336267131, - 0.950173945400684, -0.975086972700342, 0.004138336267131, - -0.975086972700342, 0.950173945400684, 0.004138336267131, - -0.331485915788080, 0.305875449252880, 0.020094111670483, - 0.305875449252880, -0.331485915788080, 0.020094111670483, - -0.974389533464800, 0.305875449252880, 0.020094111670483, - 0.305875449252880, -0.974389533464800, 0.020094111670483, - -0.974389533464800, -0.331485915788080, 0.020094111670483, - -0.331485915788080, -0.974389533464800, 0.020094111670483, - -0.617368143234940, 0.598534426856625, 0.013023443943004, - 0.598534426856625, -0.617368143234940, 0.013023443943004, - -0.981166283621686, 0.598534426856625, 0.013023443943004, - 0.598534426856625, -0.981166283621686, 0.013023443943004, - -0.981166283621686, -0.617368143234940, 0.013023443943004, - -0.617368143234940, -0.981166283621686, 0.013023443943004, - -0.846737941679184, 0.837351785097968, 0.005856954369545, - 0.837351785097968, -0.846737941679184, 0.005856954369545, - -0.990613843418784, 0.837351785097968, 0.005856954369545, - 0.837351785097968, -0.990613843418784, 0.005856954369545, - -0.990613843418784, -0.846737941679184, 0.005856954369545, - -0.846737941679184, -0.990613843418784, 0.005856954369545, - -0.530582382227094, 0.412831673770520, 0.037746172643499, - 0.412831673770520, -0.530582382227094, 0.037746172643499, - -0.882249291543426, 0.412831673770520, 0.037746172643499, - 0.412831673770520, -0.882249291543426, 0.037746172643499, - -0.882249291543426, -0.530582382227094, 0.037746172643499, - -0.530582382227094, -0.882249291543426, 0.037746172643499, - -0.230167008731505, 0.092655855430620, 0.048362752988591, - 0.092655855430620, -0.230167008731505, 0.048362752988591, - -0.862488846699115, 0.092655855430620, 0.048362752988591, - 0.092655855430620, -0.862488846699115, 0.048362752988591, - -0.862488846699115, -0.230167008731505, 0.048362752988591, - -0.230167008731505, -0.862488846699115, 0.048362752988591, - -0.769841956364772, 0.681416462088999, 0.023467126169388, - 0.681416462088999, -0.769841956364772, 0.023467126169388, - -0.911574505724228, 0.681416462088999, 0.023467126169388, - 0.681416462088999, -0.911574505724228, 0.023467126169388, - -0.911574505724228, -0.769841956364772, 0.023467126169388, - -0.769841956364772, -0.911574505724228, 0.023467126169388, - -0.502901760016855, 0.206946937904245, 0.054703428836887, - 0.206946937904245, -0.502901760016855, 0.054703428836887, - -0.704045177887389, 0.206946937904245, 0.054703428836887, - 0.206946937904245, -0.704045177887389, 0.054703428836887, - -0.704045177887389, -0.502901760016855, 0.054703428836887, - -0.502901760016855, -0.704045177887389, 0.054703428836887, - -0.258115377755090, -0.067105414124881, 0.045648336152327, - -0.067105414124881, -0.258115377755090, 0.045648336152327, - -0.674779208120030, -0.067105414124880, 0.045648336152327, - -0.067105414124880, -0.674779208120030, 0.045648336152327, - -0.674779208120030, -0.258115377755090, 0.045648336152327, - -0.258115377755090, -0.674779208120030, 0.045648336152327 -}; - -double cub2D_18[219] = { // 3 * 73 - -0.333333333333333, -0.333333333333333, 0.044365924378076, - -0.012131216528029, -0.012131216528029, 0.019118866558615, - -0.975737566943942, -0.012131216528029, 0.019118866558615, - -0.012131216528029, -0.975737566943942, 0.019118866558615, - -0.230136518749796, -0.230136518749796, 0.049294282264207, - -0.539726962500408, -0.230136518749796, 0.049294282264207, - -0.230136518749796, -0.539726962500408, 0.049294282264207, - -0.499402807850562, -0.499402807850562, 0.060654125981259, - -0.001194384298875, -0.499402807850563, 0.060654125981259, - -0.499402807850563, -0.001194384298875, 0.060654125981259, - -0.710045241598598, -0.710045241598598, 0.031366231844497, - 0.420090483197196, -0.710045241598598, 0.031366231844497, - -0.710045241598598, 0.420090483197196, 0.031366231844497, - -0.903019171569391, -0.903019171569391, 0.016173035699059, - 0.806038343138783, -0.903019171569391, 0.016173035699059, - -0.903019171569391, 0.806038343138783, 0.016173035699059, - -0.972866921676664, -0.972866921676664, 0.004750076743416, - 0.945733843353328, -0.972866921676664, 0.004750076743416, - -0.972866921676664, 0.945733843353328, 0.004750076743416, - -0.859848143426920, 0.852682278520227, 0.004329998364046, - 0.852682278520227, -0.859848143426920, 0.004329998364046, - -0.992834135093306, 0.852682278520227, 0.004329998364046, - 0.852682278520227, -0.992834135093306, 0.004329998364046, - -0.992834135093306, -0.859848143426920, 0.004329998364046, - -0.859848143426920, -0.992834135093306, 0.004329998364046, - -0.592208428296456, 0.573110619333459, 0.012300136592151, - 0.573110619333459, -0.592208428296456, 0.012300136592151, - -0.980902191037003, 0.573110619333459, 0.012300136592151, - 0.573110619333459, -0.980902191037003, 0.012300136592151, - -0.980902191037003, -0.592208428296456, 0.012300136592151, - -0.592208428296456, -0.980902191037003, 0.012300136592151, - -0.316660705097116, 0.294011442575493, 0.017146550496094, - 0.294011442575493, -0.316660705097116, 0.017146550496094, - -0.977350737478378, 0.294011442575493, 0.017146550496094, - 0.294011442575493, -0.977350737478378, 0.017146550496094, - -0.977350737478378, -0.316660705097116, 0.017146550496094, - -0.316660705097116, -0.977350737478378, 0.017146550496094, - -0.762708275393600, 0.720805143081058, 0.010992784367686, - 0.720805143081058, -0.762708275393600, 0.010992784367686, - -0.958096867687458, 0.720805143081058, 0.010992784367686, - 0.720805143081058, -0.958096867687458, 0.010992784367686, - -0.958096867687458, -0.762708275393600, 0.010992784367686, - -0.762708275393600, -0.958096867687458, 0.010992784367686, - -0.499464753852078, 0.389673957377540, 0.033988423627451, - 0.389673957377540, -0.499464753852078, 0.033988423627451, - -0.890209203525462, 0.389673957377540, 0.033988423627451, - 0.389673957377540, -0.890209203525462, 0.033988423627451, - -0.890209203525462, -0.499464753852078, 0.033988423627451, - -0.499464753852078, -0.890209203525462, 0.033988423627451, - -0.730193961187213, 0.595225312221749, 0.025768775250048, - 0.595225312221749, -0.730193961187213, 0.025768775250048, - -0.865031351034536, 0.595225312221749, 0.025768775250048, - 0.595225312221749, -0.865031351034536, 0.025768775250048, - -0.865031351034535, -0.730193961187213, 0.025768775250048, - -0.730193961187213, -0.865031351034535, 0.025768775250048, - -0.213662181077459, 0.092159471784540, 0.040023698716305, - 0.092159471784540, -0.213662181077459, 0.040023698716305, - -0.878497290707081, 0.092159471784540, 0.040023698716305, - 0.092159471784540, -0.878497290707081, 0.040023698716305, - -0.878497290707081, -0.213662181077459, 0.040023698716305, - -0.213662181077459, -0.878497290707081, 0.040023698716305, - -0.268906542375276, -0.010964677486621, 0.045277248097616, - -0.010964677486621, -0.268906542375276, 0.045277248097616, - -0.720128780138103, -0.010964677486621, 0.045277248097616, - -0.010964677486621, -0.720128780138103, 0.045277248097616, - -0.720128780138103, -0.268906542375276, 0.045277248097616, - -0.268906542375276, -0.720128780138103, 0.045277248097616, - -0.507963230765286, 0.233062121320884, 0.045433087546729, - 0.233062121320884, -0.507963230765286, 0.045433087546729, - -0.725098890555598, 0.233062121320884, 0.045433087546729, - 0.233062121320884, -0.725098890555598, 0.045433087546729, - -0.725098890555598, -0.507963230765286, 0.045433087546729, - -0.507963230765286, -0.725098890555598, 0.045433087546729 -}; - -double cub2D_19[246] = { // 3 * 82 - -0.333333333333333, -0.333333333333333, 0.041424760048010, - -0.121193890022463, -0.121193890022463, 0.031784855337689, - -0.757612219955075, -0.121193890022463, 0.031784855337689, - -0.121193890022463, -0.757612219955075, 0.031784855337689, - -0.227921589064499, -0.227921589064499, 0.048406599909930, - -0.544156821871001, -0.227921589064499, 0.048406599909930, - -0.227921589064499, -0.544156821871001, 0.048406599909930, - -0.480832787187258, -0.480832787187258, 0.048177661858475, - -0.038334425625484, -0.480832787187258, 0.048177661858475, - -0.480832787187258, -0.038334425625484, 0.048177661858475, - -0.607587000462791, -0.607587000462791, 0.042691162490028, - 0.215174000925582, -0.607587000462791, 0.042691162490028, - -0.607587000462791, 0.215174000925582, 0.042691162490028, - -0.728032884013154, -0.728032884013154, 0.031889013978028, - 0.456065768026307, -0.728032884013154, 0.031889013978028, - -0.728032884013154, 0.456065768026307, 0.031889013978028, - -0.884999963315497, -0.884999963315497, 0.015529272923518, - 0.769999926630994, -0.884999963315497, 0.015529272923518, - -0.884999963315497, 0.769999926630994, 0.015529272923518, - -0.973927705240279, -0.973927705240279, 0.004442852871415, - 0.947855410480559, -0.973927705240279, 0.004442852871415, - -0.973927705240279, 0.947855410480559, 0.004442852871415, - -0.419340397282846, 0.418549313572482, 0.004599409024561, - 0.418549313572482, -0.419340397282846, 0.004599409024561, - -0.999208916289636, 0.418549313572482, 0.004599409024561, - 0.418549313572482, -0.999208916289636, 0.004599409024561, - -0.999208916289636, -0.419340397282846, 0.004599409024561, - -0.419340397282846, -0.999208916289636, 0.004599409024561, - -0.154285565801825, 0.131285016869205, 0.016608327001253, - 0.131285016869205, -0.154285565801825, 0.016608327001253, - -0.976999451067380, 0.131285016869205, 0.016608327001253, - 0.131285016869205, -0.976999451067380, 0.016608327001253, - -0.976999451067380, -0.154285565801825, 0.016608327001253, - -0.154285565801825, -0.976999451067380, 0.016608327001253, - -0.864328042937615, 0.842262778125134, 0.008508350664254, - 0.842262778125134, -0.864328042937615, 0.008508350664254, - -0.977934735187519, 0.842262778125134, 0.008508350664254, - 0.842262778125134, -0.977934735187519, 0.008508350664254, - -0.977934735187519, -0.864328042937615, 0.008508350664254, - -0.864328042937615, -0.977934735187519, 0.008508350664254, - -0.676980679779850, 0.654351228666662, 0.012752760516072, - 0.654351228666662, -0.676980679779850, 0.012752760516072, - -0.977370548886812, 0.654351228666662, 0.012752760516072, - 0.654351228666662, -0.977370548886812, 0.012752760516072, - -0.977370548886812, -0.676980679779850, 0.012752760516072, - -0.676980679779850, -0.977370548886812, 0.012752760516072, - -0.451038034994882, 0.391933493150074, 0.024864731137205, - 0.391933493150074, -0.451038034994882, 0.024864731137205, - -0.940895458155192, 0.391933493150074, 0.024864731137205, - 0.391933493150074, -0.940895458155192, 0.024864731137205, - -0.940895458155192, -0.451038034994882, 0.024864731137205, - -0.451038034994882, -0.940895458155192, 0.024864731137205, - -0.755079003035426, 0.643775758022122, 0.012779469878381, - 0.643775758022122, -0.755079003035426, 0.012779469878381, - -0.888696754986697, 0.643775758022122, 0.012779469878381, - 0.643775758022122, -0.888696754986697, 0.012779469878381, - -0.888696754986697, -0.755079003035426, 0.012779469878381, - -0.755079003035426, -0.888696754986697, 0.012779469878381, - -0.668500025831376, 0.544622467980326, 0.017801502950615, - 0.544622467980326, -0.668500025831376, 0.017801502950615, - -0.876122442148950, 0.544622467980326, 0.017801502950615, - 0.544622467980326, -0.876122442148950, 0.017801502950615, - -0.876122442148950, -0.668500025831376, 0.017801502950615, - -0.668500025831376, -0.876122442148950, 0.017801502950615, - -0.205954158284095, 0.090524206162520, 0.035738233266717, - 0.090524206162520, -0.205954158284095, 0.035738233266717, - -0.884570047878425, 0.090524206162520, 0.035738233266717, - 0.090524206162520, -0.884570047878425, 0.035738233266717, - -0.884570047878425, -0.205954158284095, 0.035738233266717, - -0.205954158284095, -0.884570047878425, 0.035738233266717, - -0.488476686471250, 0.295757669634562, 0.038344199404453, - 0.295757669634562, -0.488476686471250, 0.038344199404453, - -0.807280983163311, 0.295757669634562, 0.038344199404453, - 0.295757669634562, -0.807280983163311, 0.038344199404453, - -0.807280983163311, -0.488476686471250, 0.038344199404453, - -0.488476686471250, -0.807280983163311, 0.038344199404453, - -0.342507806805715, 0.042214391480752, 0.042971513130613, - 0.042214391480752, -0.342507806805715, 0.042971513130613, - -0.699706584675037, 0.042214391480751, 0.042971513130613, - 0.042214391480751, -0.699706584675037, 0.042971513130613, - -0.699706584675037, -0.342507806805715, 0.042971513130613, - -0.342507806805715, -0.699706584675037, 0.042971513130613 -}; - -double cub2D_20[255] = { // 3 * 85 - -0.333333333333333, -0.333333333333333, 0.055220853995399, - -0.001500649324429, -0.001500649324429, 0.003558059094653, - -0.996998701351142, -0.001500649324429, 0.003558059094653, - -0.001500649324429, -0.996998701351142, 0.003558059094653, - -0.094139751938951, -0.094139751938951, 0.040224796227922, - -0.811720496122098, -0.094139751938951, 0.040224796227922, - -0.094139751938951, -0.811720496122098, 0.040224796227922, - -0.204472124089526, -0.204472124089526, 0.053635694518663, - -0.591055751820947, -0.204472124089526, 0.053635694518663, - -0.204472124089526, -0.591055751820947, 0.053635694518663, - -0.470999594934425, -0.470999594934425, 0.049046267603004, - -0.058000810131149, -0.470999594934425, 0.049046267603004, - -0.470999594934425, -0.058000810131149, 0.049046267603004, - -0.577962071815846, -0.577962071815846, 0.032789156821391, - 0.155924143631693, -0.577962071815846, 0.032789156821391, - -0.577962071815846, 0.155924143631693, 0.032789156821391, - -0.784528785657457, -0.784528785657457, 0.029591814797299, - 0.569057571314915, -0.784528785657457, 0.029591814797299, - -0.784528785657457, 0.569057571314915, 0.029591814797299, - -0.921861824324395, -0.921861824324395, 0.009158564555409, - 0.843723648648789, -0.921861824324395, 0.009158564555409, - -0.921861824324395, 0.843723648648789, 0.009158564555409, - -0.977651240541341, -0.977651240541341, 0.003303653031152, - 0.955302481082681, -0.977651240541341, 0.003303653031152, - -0.977651240541341, 0.955302481082681, 0.003303653031152, - -0.872900668183296, 0.862201431808621, 0.004698341817151, - 0.862201431808621, -0.872900668183296, 0.004698341817151, - -0.989300763625325, 0.862201431808621, 0.004698341817151, - 0.862201431808621, -0.989300763625325, 0.004698341817151, - -0.989300763625325, -0.872900668183295, 0.004698341817151, - -0.872900668183295, -0.989300763625325, 0.004698341817151, - -0.685786162118586, 0.669876527986188, 0.008931851508364, - 0.669876527986188, -0.685786162118586, 0.008931851508364, - -0.984090365867602, 0.669876527986188, 0.008931851508364, - 0.669876527986188, -0.984090365867602, 0.008931851508364, - -0.984090365867602, -0.685786162118586, 0.008931851508364, - -0.685786162118586, -0.984090365867602, 0.008931851508364, - -0.208715771271252, 0.187870974708724, 0.012199133615816, - 0.187870974708724, -0.208715771271252, 0.012199133615816, - -0.979155203437472, 0.187870974708724, 0.012199133615816, - 0.187870974708724, -0.979155203437472, 0.012199133615816, - -0.979155203437472, -0.208715771271252, 0.012199133615816, - -0.208715771271252, -0.979155203437472, 0.012199133615816, - -0.453664858574179, 0.431736028981932, 0.013782162654376, - 0.431736028981932, -0.453664858574179, 0.013782162654376, - -0.978071170407753, 0.431736028981932, 0.013782162654376, - 0.431736028981932, -0.978071170407753, 0.013782162654376, - -0.978071170407753, -0.453664858574179, 0.013782162654376, - -0.453664858574179, -0.978071170407753, 0.013782162654376, - -0.796429235029966, 0.719295810859041, 0.015994950144956, - 0.719295810859041, -0.796429235029966, 0.015994950144956, - -0.922866575829075, 0.719295810859041, 0.015994950144956, - 0.719295810859041, -0.922866575829075, 0.015994950144956, - -0.922866575829075, -0.796429235029966, 0.015994950144956, - -0.796429235029966, -0.922866575829075, 0.015994950144956, - -0.106682901647172, 0.035521886012736, 0.014772268570672, - 0.035521886012736, -0.106682901647172, 0.014772268570672, - -0.928838984365563, 0.035521886012736, 0.014772268570672, - 0.035521886012736, -0.928838984365563, 0.014772268570672, - -0.928838984365564, -0.106682901647172, 0.014772268570672, - -0.106682901647172, -0.928838984365564, 0.014772268570672, - -0.601978411700994, 0.502636778975466, 0.025598663757297, - 0.502636778975466, -0.601978411700994, 0.025598663757297, - -0.900658367274472, 0.502636778975466, 0.025598663757297, - 0.502636778975466, -0.900658367274472, 0.025598663757297, - -0.900658367274472, -0.601978411700994, 0.025598663757297, - -0.601978411700994, -0.900658367274472, 0.025598663757297, - -0.351477632615435, 0.234438182446771, 0.034516142351393, - 0.234438182446771, -0.351477632615435, 0.034516142351393, - -0.882960549831337, 0.234438182446771, 0.034516142351393, - 0.234438182446771, -0.882960549831337, 0.034516142351393, - -0.882960549831337, -0.351477632615435, 0.034516142351393, - -0.351477632615435, -0.882960549831337, 0.034516142351393, - -0.582937273579734, 0.339941699570946, 0.037345891805871, - 0.339941699570946, -0.582937273579734, 0.037345891805871, - -0.757004425991211, 0.339941699570946, 0.037345891805871, - 0.339941699570946, -0.757004425991211, 0.037345891805871, - -0.757004425991211, -0.582937273579734, 0.037345891805871, - -0.582937273579734, -0.757004425991211, 0.037345891805871, - -0.353658866927485, 0.072237177039608, 0.045636448116791, - 0.072237177039608, -0.353658866927485, 0.045636448116791, - -0.718578310112123, 0.072237177039608, 0.045636448116791, - 0.072237177039608, -0.718578310112123, 0.045636448116791, - -0.718578310112123, -0.353658866927485, 0.045636448116791, - -0.353658866927485, -0.718578310112123, 0.045636448116791 -}; - -double cub2D_21[279] = { // 3 * 93 - -0.006427416686680, -0.006427416686680, 0.009411977990382, - -0.987145166626641, -0.006427416686680, 0.009411977990382, - -0.006427416686680, -0.987145166626641, 0.009411977990382, - -0.037371238381685, -0.037371238381685, 0.023551229711283, - -0.925257523236629, -0.037371238381685, 0.023551229711283, - -0.037371238381685, -0.925257523236629, 0.023551229711283, - -0.101972641308225, -0.101972641308225, 0.041353961937512, - -0.796054717383551, -0.101972641308225, 0.041353961937512, - -0.101972641308225, -0.796054717383551, 0.041353961937512, - -0.405469125577621, -0.405469125577621, 0.045947520102707, - -0.189061748844758, -0.405469125577621, 0.045947520102707, - -0.405469125577621, -0.189061748844758, 0.045947520102707, - -0.556282620757932, -0.556282620757932, 0.047724273523632, - 0.112565241515865, -0.556282620757932, 0.047724273523632, - -0.556282620757932, 0.112565241515865, 0.047724273523632, - -0.787490889149774, -0.787490889149774, 0.019906824503099, - 0.574981778299548, -0.787490889149774, 0.019906824503099, - -0.787490889149774, 0.574981778299548, 0.019906824503099, - -0.892713038713217, -0.892713038713217, 0.014287994054933, - 0.785426077426434, -0.892713038713217, 0.014287994054933, - -0.892713038713217, 0.785426077426434, 0.014287994054933, - -0.975095902008750, 0.956581360464913, 0.001538784565604, - 0.956581360464913, -0.975095902008750, 0.001538784565604, - -0.981485458456163, 0.956581360464913, 0.001538784565604, - 0.956581360464913, -0.981485458456163, 0.001538784565604, - -0.981485458456163, -0.975095902008750, 0.001538784565604, - -0.975095902008750, -0.981485458456163, 0.001538784565604, - -0.734190363492767, 0.718759150923754, 0.007257720730941, - 0.718759150923754, -0.734190363492767, 0.007257720730941, - -0.984568787430988, 0.718759150923754, 0.007257720730941, - 0.718759150923754, -0.984568787430988, 0.007257720730941, - -0.984568787430988, -0.734190363492767, 0.007257720730941, - -0.734190363492767, -0.984568787430988, 0.007257720730941, - -0.279909645448207, 0.260066127858194, 0.013303360825119, - 0.260066127858194, -0.279909645448207, 0.013303360825119, - -0.980156482409987, 0.260066127858194, 0.013303360825119, - 0.260066127858194, -0.980156482409987, 0.013303360825119, - -0.980156482409987, -0.279909645448207, 0.013303360825119, - -0.279909645448207, -0.980156482409987, 0.013303360825119, - -0.527626383829046, 0.508213994286434, 0.011413497063052, - 0.508213994286434, -0.527626383829046, 0.011413497063052, - -0.980587610457388, 0.508213994286434, 0.011413497063052, - 0.508213994286434, -0.980587610457388, 0.011413497063052, - -0.980587610457388, -0.527626383829046, 0.011413497063052, - -0.527626383829046, -0.980587610457388, 0.011413497063052, - -0.887945885434766, 0.867094084690673, 0.006552521291655, - 0.867094084690673, -0.887945885434766, 0.006552521291655, - -0.979148199255907, 0.867094084690673, 0.006552521291655, - 0.867094084690673, -0.979148199255907, 0.006552521291655, - -0.979148199255907, -0.887945885434766, 0.006552521291655, - -0.887945885434766, -0.979148199255907, 0.006552521291655, - -0.738154400021390, 0.655149643679198, 0.017432381135646, - 0.655149643679198, -0.738154400021390, 0.017432381135646, - -0.916995243657807, 0.655149643679198, 0.017432381135646, - 0.655149643679198, -0.916995243657807, 0.017432381135646, - -0.916995243657807, -0.738154400021390, 0.017432381135646, - -0.738154400021390, -0.916995243657807, 0.017432381135646, - -0.296840355384531, 0.194393499586184, 0.027402609499462, - 0.194393499586184, -0.296840355384531, 0.027402609499462, - -0.897553144201652, 0.194393499586184, 0.027402609499462, - 0.194393499586184, -0.897553144201652, 0.027402609499462, - -0.897553144201652, -0.296840355384531, 0.027402609499462, - -0.296840355384531, -0.897553144201652, 0.027402609499462, - -0.531632641825188, 0.431035654635683, 0.025014173853794, - 0.431035654635683, -0.531632641825188, 0.025014173853794, - -0.899403012810496, 0.431035654635683, 0.025014173853794, - 0.431035654635683, -0.899403012810496, 0.025014173853794, - -0.899403012810496, -0.531632641825188, 0.025014173853794, - -0.531632641825188, -0.899403012810496, 0.025014173853794, - -0.682130525363537, 0.500223407469218, 0.008690112508894, - 0.500223407469218, -0.682130525363537, 0.008690112508894, - -0.818092882105681, 0.500223407469218, 0.008690112508894, - 0.500223407469218, -0.818092882105681, 0.008690112508894, - -0.818092882105681, -0.682130525363537, 0.008690112508894, - -0.682130525363537, -0.818092882105681, 0.008690112508894, - -0.376270450471865, 0.138207573987544, 0.037386369243416, - 0.138207573987544, -0.376270450471865, 0.037386369243416, - -0.761937123515678, 0.138207573987544, 0.037386369243416, - 0.138207573987544, -0.761937123515678, 0.037386369243416, - -0.761937123515678, -0.376270450471865, 0.037386369243416, - -0.376270450471865, -0.761937123515678, 0.037386369243416, - -0.590719081005038, 0.339375331943743, 0.032509611084921, - 0.339375331943743, -0.590719081005038, 0.032509611084921, - -0.748656250938705, 0.339375331943743, 0.032509611084921, - 0.339375331943743, -0.748656250938705, 0.032509611084921, - -0.748656250938705, -0.590719081005038, 0.032509611084921, - -0.590719081005038, -0.748656250938705, 0.032509611084921, - -0.305527033262063, -0.081590222620926, 0.043740300619054, - -0.081590222620926, -0.305527033262063, 0.043740300619054, - -0.612882744117011, -0.081590222620926, 0.043740300619054, - -0.081590222620926, -0.612882744117011, 0.043740300619054, - -0.612882744117011, -0.305527033262063, 0.043740300619054, - -0.305527033262063, -0.612882744117011, 0.043740300619054 -}; - -double cub2D_22[300] = { // 3 * 100 - -0.333333333333333, -0.333333333333333, 0.052134891986775, - -0.005980679319437, -0.005980679319437, 0.002127559342619, - -0.988038641361126, -0.005980679319437, 0.002127559342619, - -0.005980679319437, -0.988038641361126, 0.002127559342619, - -0.112289615572167, -0.112289615572167, 0.040243429730281, - -0.775420768855665, -0.112289615572167, 0.040243429730281, - -0.112289615572167, -0.775420768855665, 0.040243429730281, - -0.209082673923590, -0.209082673923590, 0.048340550896214, - -0.581834652152820, -0.209082673923590, 0.048340550896214, - -0.209082673923590, -0.581834652152820, 0.048340550896214, - -0.467712894350161, -0.467712894350161, 0.047378470721283, - -0.064574211299679, -0.467712894350161, 0.047378470721283, - -0.467712894350161, -0.064574211299679, 0.047378470721283, - -0.616276252022817, -0.616276252022817, 0.040231109011798, - 0.232552504045635, -0.616276252022817, 0.040231109011798, - -0.616276252022817, 0.232552504045635, 0.040231109011798, - -0.755246756631224, -0.755246756631224, 0.027899919845537, - 0.510493513262448, -0.755246756631224, 0.027899919845537, - -0.755246756631224, 0.510493513262448, 0.027899919845537, - -0.893562558892192, -0.893562558892192, 0.012350949744993, - 0.787125117784384, -0.893562558892192, 0.012350949744993, - -0.893562558892192, 0.787125117784384, 0.012350949744993, - -0.943105536827199, -0.943105536827199, 0.003039705316805, - 0.886211073654399, -0.943105536827199, 0.003039705316805, - -0.943105536827199, 0.886211073654399, 0.003039705316805, - -0.991786296535875, -0.991786296535875, 0.000691671630889, - 0.983572593071750, -0.991786296535875, 0.000691671630889, - -0.991786296535875, 0.983572593071750, 0.000691671630889, - -0.413667191986728, 0.401491377065593, 0.008022198405286, - 0.401491377065593, -0.413667191986728, 0.008022198405286, - -0.987824185078864, 0.401491377065593, 0.008022198405286, - 0.401491377065593, -0.987824185078864, 0.008022198405286, - -0.987824185078865, -0.413667191986728, 0.008022198405286, - -0.413667191986728, -0.987824185078865, 0.008022198405286, - -0.932052869826067, 0.918490219898898, 0.003090974933637, - 0.918490219898898, -0.932052869826067, 0.003090974933637, - -0.986437350072830, 0.918490219898898, 0.003090974933637, - 0.918490219898898, -0.986437350072830, 0.003090974933637, - -0.986437350072830, -0.932052869826067, 0.003090974933637, - -0.932052869826067, -0.986437350072830, 0.003090974933637, - -0.640599464469824, 0.623868058857117, 0.008631214056178, - 0.623868058857117, -0.640599464469824, 0.008631214056178, - -0.983268594387293, 0.623868058857116, 0.008631214056178, - 0.623868058857116, -0.983268594387293, 0.008631214056178, - -0.983268594387293, -0.640599464469824, 0.008631214056178, - -0.640599464469824, -0.983268594387293, 0.008631214056178, - -0.158411570812104, 0.140890429939385, 0.010897457944070, - 0.140890429939385, -0.158411570812104, 0.010897457944070, - -0.982478859127282, 0.140890429939385, 0.010897457944070, - 0.140890429939385, -0.982478859127282, 0.010897457944070, - -0.982478859127282, -0.158411570812104, 0.010897457944070, - -0.158411570812104, -0.982478859127282, 0.010897457944070, - -0.814806216564922, 0.793459188393794, 0.008001551263950, - 0.793459188393794, -0.814806216564922, 0.008001551263950, - -0.978652971828873, 0.793459188393795, 0.008001551263950, - 0.793459188393795, -0.978652971828873, 0.008001551263950, - -0.978652971828873, -0.814806216564922, 0.008001551263950, - -0.814806216564922, -0.978652971828873, 0.008001551263950, - -0.363960589331557, 0.295112627690632, 0.017745434082141, - 0.295112627690632, -0.363960589331557, 0.017745434082141, - -0.931152038359075, 0.295112627690632, 0.017745434082141, - 0.295112627690632, -0.931152038359075, 0.017745434082141, - -0.931152038359075, -0.363960589331557, 0.017745434082141, - -0.363960589331557, -0.931152038359075, 0.017745434082141, - -0.570323384314285, 0.491002374048080, 0.017950672107247, - 0.491002374048080, -0.570323384314285, 0.017950672107247, - -0.920678989733795, 0.491002374048080, 0.017950672107247, - 0.491002374048080, -0.920678989733795, 0.017950672107247, - -0.920678989733795, -0.570323384314285, 0.017950672107247, - -0.570323384314285, -0.920678989733795, 0.017950672107247, - -0.134636707603169, 0.047157943371727, 0.019228676191702, - 0.047157943371727, -0.134636707603169, 0.019228676191702, - -0.912521235768557, 0.047157943371727, 0.019228676191702, - 0.047157943371727, -0.912521235768557, 0.019228676191702, - -0.912521235768557, -0.134636707603169, 0.019228676191702, - -0.134636707603169, -0.912521235768557, 0.019228676191702, - -0.752804662376914, 0.649201355096884, 0.019100455942623, - 0.649201355096884, -0.752804662376914, 0.019100455942623, - -0.896396692719970, 0.649201355096884, 0.019100455942623, - 0.649201355096884, -0.896396692719970, 0.019100455942623, - -0.896396692719970, -0.752804662376914, 0.019100455942623, - -0.752804662376914, -0.896396692719970, 0.019100455942623, - -0.328638645186542, 0.161176552903625, 0.028083739150636, - 0.161176552903625, -0.328638645186542, 0.028083739150636, - -0.832537907717083, 0.161176552903625, 0.028083739150636, - 0.161176552903625, -0.832537907717083, 0.028083739150636, - -0.832537907717083, -0.328638645186542, 0.028083739150636, - -0.328638645186542, -0.832537907717083, 0.028083739150636, - -0.559939069093864, 0.361861076343249, 0.031874915632607, - 0.361861076343249, -0.559939069093864, 0.031874915632607, - -0.801922007249385, 0.361861076343249, 0.031874915632607, - 0.361861076343249, -0.801922007249385, 0.031874915632607, - -0.801922007249385, -0.559939069093864, 0.031874915632607, - -0.559939069093864, -0.801922007249385, 0.031874915632607, - -0.388196135129182, 0.068617773977901, 0.040865211838584, - 0.068617773977901, -0.388196135129182, 0.040865211838584, - -0.680421638848718, 0.068617773977901, 0.040865211838584, - 0.068617773977901, -0.680421638848718, 0.040865211838584, - -0.680421638848718, -0.388196135129182, 0.040865211838584, - -0.388196135129182, -0.680421638848718, 0.040865211838584 -}; - -double cub2D_23[318] = { // 3 * 106 - -0.333333333333333, -0.333333333333333, 0.049993627092845, - -0.023538910955543, -0.023538910955543, 0.008227775544650, - -0.952922178088914, -0.023538910955543, 0.008227775544650, - -0.023538910955543, -0.952922178088914, 0.008227775544650, - -0.112255282121933, -0.112255282121933, 0.037662477311797, - -0.775489435756134, -0.112255282121933, 0.037662477311797, - -0.112255282121933, -0.775489435756134, 0.037662477311797, - -0.212088442838205, -0.212088442838205, 0.046916667243031, - -0.575823114323591, -0.212088442838205, 0.046916667243031, - -0.212088442838205, -0.575823114323591, 0.046916667243031, - -0.467032671065063, -0.467032671065063, 0.047191879210718, - -0.065934657869875, -0.467032671065063, 0.047191879210718, - -0.467032671065063, -0.065934657869875, 0.047191879210718, - -0.602458675644835, -0.602458675644835, 0.039689081561875, - 0.204917351289670, -0.602458675644835, 0.039689081561875, - -0.602458675644835, 0.204917351289670, 0.039689081561875, - -0.729340080155585, -0.729340080155585, 0.029223692430473, - 0.458680160311169, -0.729340080155585, 0.029223692430473, - -0.729340080155585, 0.458680160311169, 0.029223692430473, - -0.835032835950571, -0.835032835950571, 0.018566057479642, - 0.670065671901142, -0.835032835950571, 0.018566057479642, - -0.835032835950571, 0.670065671901142, 0.018566057479642, - -0.916650365183127, -0.916650365183127, 0.008784960019827, - 0.833300730366254, -0.916650365183127, 0.008784960019827, - -0.916650365183127, 0.833300730366254, 0.008784960019827, - -0.982250743407210, -0.982250743407210, 0.002061552741126, - 0.964501486814420, -0.982250743407210, 0.002061552741126, - -0.982250743407210, 0.964501486814420, 0.002061552741126, - -0.105601712649592, 0.098292547426640, 0.004448377162851, - 0.098292547426640, -0.105601712649592, 0.004448377162851, - -0.992690834777047, 0.098292547426640, 0.004448377162851, - 0.098292547426640, -0.992690834777047, 0.004448377162851, - -0.992690834777047, -0.105601712649592, 0.004448377162851, - -0.105601712649592, -0.992690834777047, 0.004448377162851, - -0.775227228315076, 0.773362241907340, 0.002318973002522, - 0.773362241907340, -0.775227228315076, 0.002318973002522, - -0.998135013592264, 0.773362241907340, 0.002318973002522, - 0.773362241907340, -0.998135013592264, 0.002318973002522, - -0.998135013592264, -0.775227228315076, 0.002318973002522, - -0.775227228315076, -0.998135013592264, 0.002318973002522, - -0.399056075238285, 0.392811698367078, 0.005127488569570, - 0.392811698367078, -0.399056075238285, 0.005127488569570, - -0.993755623128794, 0.392811698367078, 0.005127488569570, - 0.392811698367078, -0.993755623128794, 0.005127488569570, - -0.993755623128794, -0.399056075238285, 0.005127488569570, - -0.399056075238285, -0.993755623128794, 0.005127488569570, - -0.907633572417643, 0.891831436837026, 0.004167853762943, - 0.891831436837026, -0.907633572417643, 0.004167853762943, - -0.984197864419384, 0.891831436837026, 0.004167853762943, - 0.891831436837026, -0.984197864419384, 0.004167853762943, - -0.984197864419383, -0.907633572417642, 0.004167853762943, - -0.907633572417642, -0.984197864419383, 0.004167853762943, - -0.610008084404048, 0.588812673873118, 0.010245094978581, - 0.588812673873118, -0.610008084404048, 0.010245094978581, - -0.978804589469070, 0.588812673873118, 0.010245094978581, - 0.588812673873118, -0.978804589469070, 0.010245094978581, - -0.978804589469070, -0.610008084404048, 0.010245094978581, - -0.610008084404048, -0.978804589469070, 0.010245094978581, - -0.243171741354056, 0.207960140279272, 0.012823590639281, - 0.207960140279272, -0.243171741354056, 0.012823590639281, - -0.964788398925216, 0.207960140279272, 0.012823590639281, - 0.207960140279272, -0.964788398925216, 0.012823590639281, - -0.964788398925216, -0.243171741354055, 0.012823590639281, - -0.243171741354055, -0.964788398925216, 0.012823590639281, - -0.789506197850739, 0.739925802118596, 0.011635516794817, - 0.739925802118596, -0.789506197850739, 0.011635516794817, - -0.950419604267857, 0.739925802118596, 0.011635516794817, - 0.739925802118596, -0.950419604267857, 0.011635516794817, - -0.950419604267857, -0.789506197850739, 0.011635516794817, - -0.789506197850739, -0.950419604267857, 0.011635516794817, - -0.455884762353173, 0.385117794610837, 0.019844273900077, - 0.385117794610837, -0.455884762353173, 0.019844273900077, - -0.929233032257664, 0.385117794610837, 0.019844273900077, - 0.385117794610837, -0.929233032257664, 0.019844273900077, - -0.929233032257664, -0.455884762353173, 0.019844273900077, - -0.455884762353173, -0.929233032257664, 0.019844273900077, - -0.112482048478797, 0.019740291196956, 0.011754407449188, - 0.019740291196956, -0.112482048478797, 0.011754407449188, - -0.907258242718159, 0.019740291196956, 0.011754407449188, - 0.019740291196956, -0.907258242718159, 0.011754407449188, - -0.907258242718159, -0.112482048478797, 0.011754407449188, - -0.112482048478797, -0.907258242718159, 0.011754407449188, - -0.664205324633765, 0.550530931038120, 0.021600208906600, - 0.550530931038120, -0.664205324633765, 0.021600208906600, - -0.886325606404355, 0.550530931038120, 0.021600208906600, - 0.550530931038120, -0.886325606404355, 0.021600208906600, - -0.886325606404354, -0.664205324633765, 0.021600208906600, - -0.664205324633765, -0.886325606404354, 0.021600208906600, - -0.295594853518405, 0.152149871080588, 0.028495796363599, - 0.152149871080588, -0.295594853518405, 0.028495796363599, - -0.856555017562183, 0.152149871080588, 0.028495796363599, - 0.152149871080588, -0.856555017562183, 0.028495796363599, - -0.856555017562183, -0.295594853518405, 0.028495796363599, - -0.295594853518405, -0.856555017562183, 0.028495796363599, - -0.525935282564036, 0.319991164262401, 0.031988381018369, - 0.319991164262401, -0.525935282564036, 0.031988381018369, - -0.794055881698366, 0.319991164262401, 0.031988381018369, - 0.319991164262401, -0.794055881698366, 0.031988381018369, - -0.794055881698366, -0.525935282564036, 0.031988381018369, - -0.525935282564036, -0.794055881698366, 0.031988381018369, - -0.368673747852155, 0.056982821883363, 0.041389027831224, - 0.056982821883363, -0.368673747852155, 0.041389027831224, - -0.688309074031208, 0.056982821883363, 0.041389027831224, - 0.056982821883363, -0.688309074031208, 0.041389027831224, - -0.688309074031208, -0.368673747852155, 0.041389027831224, - -0.368673747852155, -0.688309074031208, 0.041389027831224 -}; - -double cub2D_24[354] = { // 3 * 118 - -0.333333333333333, -0.333333333333333, 0.031330242175782, - -0.031382760283421, -0.031382760283421, 0.014717653847587, - -0.937234479433159, -0.031382760283421, 0.014717653847587, - -0.031382760283421, -0.937234479433159, 0.014717653847587, - -0.120096233850662, -0.120096233850662, 0.030963348398970, - -0.759807532298676, -0.120096233850662, 0.030963348398970, - -0.120096233850662, -0.759807532298676, 0.030963348398970, - -0.217343938317536, -0.217343938317536, 0.037986940843648, - -0.565312123364928, -0.217343938317536, 0.037986940843648, - -0.217343938317536, -0.565312123364928, 0.037986940843648, - -0.429818284439074, -0.429818284439074, 0.033466254011049, - -0.140363431121852, -0.429818284439074, 0.033466254011049, - -0.429818284439074, -0.140363431121852, 0.033466254011049, - -0.522392801883300, -0.522392801883300, 0.029203686754054, - 0.044785603766601, -0.522392801883300, 0.029203686754054, - -0.522392801883300, 0.044785603766601, 0.029203686754054, - -0.704274510649686, -0.704274510649686, 0.022147482605586, - 0.408549021299373, -0.704274510649686, 0.022147482605586, - -0.704274510649686, 0.408549021299373, 0.022147482605586, - -0.843105586121546, -0.843105586121546, 0.015827753677335, - 0.686211172243092, -0.843105586121546, 0.015827753677335, - -0.843105586121546, 0.686211172243092, 0.015827753677335, - -0.936285318267427, -0.936285318267427, 0.005897827695084, - 0.872570636534854, -0.936285318267427, 0.005897827695084, - -0.936285318267427, 0.872570636534854, 0.005897827695084, - -0.983008712604130, -0.983008712604130, 0.001905131297570, - 0.966017425208259, -0.983008712604130, 0.001905131297570, - -0.983008712604130, 0.966017425208259, 0.001905131297570, - -0.133936561710478, 0.120327965916980, 0.008627443386199, - 0.120327965916980, -0.133936561710478, 0.008627443386199, - -0.986391404206501, 0.120327965916980, 0.008627443386199, - 0.120327965916980, -0.986391404206501, 0.008627443386199, - -0.986391404206501, -0.133936561710478, 0.008627443386199, - -0.133936561710478, -0.986391404206501, 0.008627443386199, - -0.589559941056661, 0.574991625876557, 0.007292016855628, - 0.574991625876557, -0.589559941056661, 0.007292016855628, - -0.985431684819897, 0.574991625876557, 0.007292016855628, - 0.574991625876557, -0.985431684819897, 0.007292016855628, - -0.985431684819897, -0.589559941056661, 0.007292016855628, - -0.589559941056661, -0.985431684819897, 0.007292016855628, - -0.375079684130172, 0.361371712031196, 0.008117703702749, - 0.361371712031196, -0.375079684130172, 0.008117703702749, - -0.986292027901024, 0.361371712031196, 0.008117703702749, - 0.361371712031196, -0.986292027901024, 0.008117703702749, - -0.986292027901024, -0.375079684130172, 0.008117703702749, - -0.375079684130172, -0.986292027901024, 0.008117703702749, - -0.906832105591067, 0.897244066241012, 0.002858359515171, - 0.897244066241012, -0.906832105591067, 0.002858359515171, - -0.990411960649945, 0.897244066241012, 0.002858359515171, - 0.897244066241012, -0.990411960649945, 0.002858359515171, - -0.990411960649945, -0.906832105591067, 0.002858359515171, - -0.906832105591067, -0.990411960649945, 0.002858359515171, - -0.768281564078976, 0.757477531703546, 0.004596788633153, - 0.757477531703546, -0.768281564078976, 0.004596788633153, - -0.989195967624570, 0.757477531703546, 0.004596788633153, - 0.757477531703546, -0.989195967624570, 0.004596788633153, - -0.989195967624570, -0.768281564078975, 0.004596788633153, - -0.768281564078975, -0.989195967624570, 0.004596788633153, - -0.498678726055310, 0.424585822926150, 0.017097477649229, - 0.424585822926150, -0.498678726055310, 0.017097477649229, - -0.925907096870839, 0.424585822926150, 0.017097477649229, - 0.424585822926150, -0.925907096870839, 0.017097477649229, - -0.925907096870839, -0.498678726055310, 0.017097477649229, - -0.498678726055310, -0.925907096870839, 0.017097477649229, - -0.279607664483490, 0.208396882316209, 0.018575372163249, - 0.208396882316209, -0.279607664483490, 0.018575372163249, - -0.928789217832719, 0.208396882316209, 0.018575372163249, - 0.208396882316209, -0.928789217832719, 0.018575372163249, - -0.928789217832719, -0.279607664483490, 0.018575372163249, - -0.279607664483490, -0.928789217832719, 0.018575372163249, - -0.837737372642508, 0.780926628976898, 0.008711688567270, - 0.780926628976898, -0.837737372642508, 0.008711688567270, - -0.943189256334389, 0.780926628976898, 0.008711688567270, - 0.780926628976898, -0.943189256334389, 0.008711688567270, - -0.943189256334389, -0.837737372642508, 0.008711688567270, - -0.837737372642508, -0.943189256334389, 0.008711688567270, - -0.693711793201882, 0.625024627714433, 0.013292883787775, - 0.625024627714433, -0.693711793201882, 0.013292883787775, - -0.931312834512551, 0.625024627714433, 0.013292883787775, - 0.625024627714433, -0.931312834512551, 0.013292883787775, - -0.931312834512551, -0.693711793201882, 0.013292883787775, - -0.693711793201882, -0.931312834512551, 0.013292883787775, - 0.004700993829951, -0.135567929734853, 0.012281001510740, - -0.135567929734853, 0.004700993829951, 0.012281001510740, - -0.869133064095098, -0.135567929734853, 0.012281001510740, - -0.135567929734853, -0.869133064095098, 0.012281001510740, - -0.869133064095098, 0.004700993829951, 0.012281001510740, - 0.004700993829951, -0.869133064095098, 0.012281001510740, - -0.521976982650353, 0.349105045944945, 0.021820885555420, - 0.349105045944945, -0.521976982650353, 0.021820885555420, - -0.827128063294591, 0.349105045944945, 0.021820885555420, - 0.349105045944945, -0.827128063294591, 0.021820885555420, - -0.827128063294591, -0.521976982650353, 0.021820885555420, - -0.521976982650353, -0.827128063294591, 0.021820885555420, - -0.326968721136217, 0.144732602043697, 0.027371090249668, - 0.144732602043697, -0.326968721136217, 0.027371090249668, - -0.817763880907480, 0.144732602043697, 0.027371090249668, - 0.144732602043697, -0.817763880907480, 0.027371090249668, - -0.817763880907480, -0.326968721136217, 0.027371090249668, - -0.326968721136217, -0.817763880907480, 0.027371090249668, - -0.696116803866709, 0.531011336134871, 0.018737543889147, - 0.531011336134871, -0.696116803866709, 0.018737543889147, - -0.834894532268162, 0.531011336134871, 0.018737543889147, - 0.531011336134871, -0.834894532268162, 0.018737543889147, - -0.834894532268162, -0.696116803866709, 0.018737543889147, - -0.696116803866709, -0.834894532268162, 0.018737543889147, - -0.536404917748559, 0.226734558438523, 0.028700757241388, - 0.226734558438523, -0.536404917748559, 0.028700757241388, - -0.690329640689964, 0.226734558438523, 0.028700757241388, - 0.226734558438523, -0.690329640689964, 0.028700757241388, - -0.690329640689964, -0.536404917748559, 0.028700757241388, - -0.536404917748559, -0.690329640689964, 0.028700757241388, - -0.344489563789357, 0.009282127094255, 0.033972574031807, - 0.009282127094255, -0.344489563789357, 0.033972574031807, - -0.664792563304898, 0.009282127094255, 0.033972574031807, - 0.009282127094255, -0.664792563304898, 0.033972574031807, - -0.664792563304898, -0.344489563789357, 0.033972574031807, - -0.344489563789357, -0.664792563304898, 0.033972574031807 -}; - -double cub2D_25[378] = { // 3 * 126 - -0.027946483073174, -0.027946483073174, 0.016011163760041, - -0.944107033853652, -0.027946483073174, 0.016011163760041, - -0.027946483073174, -0.944107033853652, 0.016011163760041, - -0.131178601327651, -0.131178601327651, 0.031894153664781, - -0.737642797344697, -0.131178601327651, 0.031894153664781, - -0.131178601327651, -0.737642797344697, 0.031894153664781, - -0.220221729512072, -0.220221729512072, 0.026218282461591, - -0.559556540975855, -0.220221729512072, 0.026218282461591, - -0.220221729512072, -0.559556540975855, 0.026218282461591, - -0.403113531960391, -0.403113531960391, 0.039166001931271, - -0.193772936079218, -0.403113531960391, 0.039166001931271, - -0.403113531960391, -0.193772936079218, 0.039166001931271, - -0.531911655325256, -0.531911655325256, 0.032941770883075, - 0.063823310650513, -0.531911655325256, 0.032941770883075, - -0.531911655325256, 0.063823310650513, 0.032941770883075, - -0.697063330781965, -0.697063330781965, 0.017094558148184, - 0.394126661563930, -0.697063330781965, 0.017094558148184, - -0.697063330781965, 0.394126661563930, 0.017094558148184, - -0.774532212908013, -0.774532212908013, 0.016323771714453, - 0.549064425816026, -0.774532212908013, 0.016323771714453, - -0.774532212908013, 0.549064425816026, 0.016323771714453, - -0.844568615816947, -0.844568615816947, 0.012242293079968, - 0.689137231633895, -0.844568615816948, 0.012242293079968, - -0.844568615816948, 0.689137231633895, 0.012242293079968, - -0.930213812771406, -0.930213812771406, 0.005816996529873, - 0.860427625542812, -0.930213812771406, 0.005816996529873, - -0.930213812771406, 0.860427625542812, 0.005816996529873, - -0.985483630758135, -0.985483630758135, 0.001384550491324, - 0.970967261516271, -0.985483630758135, 0.001384550491324, - -0.985483630758135, 0.970967261516271, 0.001384550491324, - -0.545571095693272, 0.542986390284387, 0.002496578398555, - 0.542986390284387, -0.545571095693272, 0.002496578398555, - -0.997415294591116, 0.542986390284387, 0.002496578398555, - 0.542986390284387, -0.997415294591116, 0.002496578398555, - -0.997415294591116, -0.545571095693272, 0.002496578398555, - -0.545571095693272, -0.997415294591116, 0.002496578398555, - -0.129978890292857, 0.119179487748624, 0.006809505817606, - 0.119179487748624, -0.129978890292857, 0.006809505817606, - -0.989200597455768, 0.119179487748624, 0.006809505817606, - 0.119179487748624, -0.989200597455768, 0.006809505817606, - -0.989200597455768, -0.129978890292857, 0.006809505817606, - -0.129978890292857, -0.989200597455768, 0.006809505817606, - -0.359380801455591, 0.346612795387641, 0.006719308652128, - 0.346612795387641, -0.359380801455591, 0.006719308652128, - -0.987231993932050, 0.346612795387641, 0.006719308652128, - 0.346612795387641, -0.987231993932050, 0.006719308652128, - -0.987231993932050, -0.359380801455591, 0.006719308652128, - -0.359380801455591, -0.987231993932050, 0.006719308652128, - -0.816499355439990, 0.806442932436004, 0.003432313078994, - 0.806442932436004, -0.816499355439990, 0.003432313078994, - -0.989943576996014, 0.806442932436004, 0.003432313078994, - 0.806442932436004, -0.989943576996014, 0.003432313078994, - -0.989943576996014, -0.816499355439990, 0.003432313078994, - -0.816499355439990, -0.989943576996014, 0.003432313078994, - -0.923978328282551, 0.910324811038988, 0.002961712633431, - 0.910324811038988, -0.923978328282551, 0.002961712633431, - -0.986346482756436, 0.910324811038988, 0.002961712633431, - 0.910324811038988, -0.986346482756436, 0.002961712633431, - -0.986346482756436, -0.923978328282551, 0.002961712633431, - -0.923978328282551, -0.986346482756436, 0.002961712633431, - -0.685149563029377, 0.665117163749518, 0.007022625221457, - 0.665117163749518, -0.685149563029377, 0.007022625221457, - -0.979967600720141, 0.665117163749517, 0.007022625221457, - 0.665117163749517, -0.979967600720141, 0.007022625221457, - -0.979967600720141, -0.685149563029376, 0.007022625221457, - -0.685149563029376, -0.979967600720141, 0.007022625221457, - -0.520220680442934, 0.468705054096154, 0.014787100299413, - 0.468705054096154, -0.520220680442934, 0.014787100299413, - -0.948484373653220, 0.468705054096154, 0.014787100299413, - 0.468705054096154, -0.948484373653220, 0.014787100299413, - -0.948484373653220, -0.520220680442934, 0.014787100299413, - -0.520220680442934, -0.948484373653220, 0.014787100299413, - -0.276113763747879, 0.215657967508047, 0.015966174954753, - 0.215657967508047, -0.276113763747879, 0.015966174954753, - -0.939544203760168, 0.215657967508047, 0.015966174954753, - 0.215657967508047, -0.939544203760168, 0.015966174954753, - -0.939544203760168, -0.276113763747879, 0.015966174954753, - -0.276113763747879, -0.939544203760168, 0.015966174954753, - -0.832896078090343, 0.771886097876019, 0.008711925226316, - 0.771886097876019, -0.832896078090343, 0.008711925226316, - -0.938990019785676, 0.771886097876019, 0.008711925226316, - 0.771886097876019, -0.938990019785676, 0.008711925226316, - -0.938990019785676, -0.832896078090343, 0.008711925226316, - -0.832896078090343, -0.938990019785676, 0.008711925226316, - -0.703113558535164, 0.611200463810025, 0.014730113402836, - 0.611200463810025, -0.703113558535164, 0.014730113402836, - -0.908086905274861, 0.611200463810025, 0.014730113402836, - 0.611200463810025, -0.908086905274861, 0.014730113402836, - -0.908086905274861, -0.703113558535164, 0.014730113402836, - -0.703113558535164, -0.908086905274861, 0.014730113402836, - -0.432520582544930, 0.297634981464375, 0.021927145692839, - 0.297634981464375, -0.432520582544930, 0.021927145692839, - -0.865114398919445, 0.297634981464375, 0.021927145692839, - 0.297634981464375, -0.865114398919445, 0.021927145692839, - -0.865114398919445, -0.432520582544930, 0.021927145692839, - -0.432520582544930, -0.865114398919445, 0.021927145692839, - -0.186201249762425, 0.046111066930604, 0.023499923487082, - 0.046111066930604, -0.186201249762425, 0.023499923487082, - -0.859909817168179, 0.046111066930604, 0.023499923487082, - 0.046111066930604, -0.859909817168179, 0.023499923487082, - -0.859909817168179, -0.186201249762425, 0.023499923487082, - -0.186201249762425, -0.859909817168179, 0.023499923487082, - -0.611772025950215, 0.443948976669982, 0.020031201427597, - 0.443948976669982, -0.611772025950215, 0.020031201427597, - -0.832176950719767, 0.443948976669982, 0.020031201427597, - 0.443948976669982, -0.832176950719767, 0.020031201427597, - -0.832176950719767, -0.611772025950215, 0.020031201427597, - -0.611772025950215, -0.832176950719767, 0.020031201427597, - -0.351731305998594, 0.110980234644288, 0.026619281575257, - 0.110980234644288, -0.351731305998594, 0.026619281575257, - -0.759248928645695, 0.110980234644288, 0.026619281575257, - 0.110980234644288, -0.759248928645695, 0.026619281575257, - -0.759248928645695, -0.351731305998594, 0.026619281575257, - -0.351731305998594, -0.759248928645695, 0.026619281575257, - -0.541445032888038, 0.245311234573305, 0.028308893010452, - 0.245311234573305, -0.541445032888038, 0.028308893010452, - -0.703866201685267, 0.245311234573305, 0.028308893010452, - 0.245311234573305, -0.703866201685267, 0.028308893010452, - -0.703866201685267, -0.541445032888038, 0.028308893010452, - -0.541445032888038, -0.703866201685267, 0.028308893010452, - -0.348763754808032, -0.034779976926618, 0.029762759122336, - -0.034779976926618, -0.348763754808032, 0.029762759122336, - -0.616456268265350, -0.034779976926618, 0.029762759122336, - -0.034779976926618, -0.616456268265350, 0.029762759122336, - -0.616456268265350, -0.348763754808032, 0.029762759122336, - -0.348763754808032, -0.616456268265350, 0.029762759122336 -}; - -double cub2D_26[414] = { // 3 * 138 - -0.027285103318006, -0.027285103318006, 0.005361616431413, - -0.945429793363989, -0.027285103318006, 0.005361616431413, - -0.027285103318006, -0.945429793363989, 0.005361616431413, - -0.068629018183452, -0.068629018183452, 0.012732191427031, - -0.862741963633096, -0.068629018183452, 0.012732191427031, - -0.068629018183452, -0.862741963633096, 0.012732191427031, - -0.136174624247252, -0.136174624247252, 0.029707048808635, - -0.727650751505495, -0.136174624247252, 0.029707048808635, - -0.136174624247252, -0.727650751505495, 0.029707048808635, - -0.214440393597162, -0.214440393597162, 0.026709487358142, - -0.571119212805675, -0.214440393597162, 0.026709487358142, - -0.214440393597162, -0.571119212805675, 0.026709487358142, - -0.392927303733924, -0.392927303733924, 0.031691197689589, - -0.214145392532152, -0.392927303733924, 0.031691197689589, - -0.392927303733924, -0.214145392532152, 0.031691197689589, - -0.541283541373341, -0.541283541373341, 0.028281596577704, - 0.082567082746682, -0.541283541373341, 0.028281596577704, - -0.541283541373341, 0.082567082746682, 0.028281596577704, - -0.710171670270578, -0.710171670270578, 0.022460561269283, - 0.420343340541156, -0.710171670270578, 0.022460561269283, - -0.710171670270578, 0.420343340541156, 0.022460561269283, - -0.832251071789951, -0.832251071789951, 0.013160382318625, - 0.664502143579902, -0.832251071789951, 0.013160382318625, - -0.832251071789951, 0.664502143579902, 0.013160382318625, - -0.931928355163542, -0.931928355163542, 0.005828465225510, - 0.863856710327084, -0.931928355163542, 0.005828465225510, - -0.931928355163542, 0.863856710327084, 0.005828465225510, - -0.987078078630829, -0.987078078630829, 0.001098762787251, - 0.974156157261657, -0.987078078630829, 0.001098762787251, - -0.987078078630829, 0.974156157261657, 0.001098762787251, - -0.932113855389598, 0.919072286067742, 0.002557622023150, - 0.919072286067742, -0.932113855389598, 0.002557622023150, - -0.986958430678145, 0.919072286067742, 0.002557622023150, - 0.919072286067742, -0.986958430678145, 0.002557622023150, - -0.986958430678145, -0.932113855389597, 0.002557622023150, - -0.932113855389597, -0.986958430678145, 0.002557622023150, - -0.331832115907669, 0.318412220533634, 0.007088900226242, - 0.318412220533634, -0.331832115907669, 0.007088900226242, - -0.986580104625965, 0.318412220533634, 0.007088900226242, - 0.318412220533634, -0.986580104625965, 0.007088900226242, - -0.986580104625965, -0.331832115907669, 0.007088900226242, - -0.331832115907669, -0.986580104625965, 0.007088900226242, - -0.117284648816543, 0.105635324925259, 0.006588000446609, - 0.105635324925259, -0.117284648816543, 0.006588000446609, - -0.988350676108717, 0.105635324925259, 0.006588000446609, - 0.105635324925259, -0.988350676108717, 0.006588000446609, - -0.988350676108717, -0.117284648816543, 0.006588000446609, - -0.117284648816543, -0.988350676108717, 0.006588000446609, - -0.528179583523521, 0.515363521190658, 0.006069708653929, - 0.515363521190658, -0.528179583523521, 0.006069708653929, - -0.987183937667137, 0.515363521190658, 0.006069708653929, - 0.515363521190658, -0.987183937667137, 0.006069708653929, - -0.987183937667137, -0.528179583523521, 0.006069708653929, - -0.528179583523521, -0.987183937667137, 0.006069708653929, - -0.698183069548291, 0.685666877859863, 0.004942128706706, - 0.685666877859863, -0.698183069548291, 0.004942128706706, - -0.987483808311572, 0.685666877859863, 0.004942128706706, - 0.685666877859863, -0.987483808311572, 0.004942128706706, - -0.987483808311572, -0.698183069548291, 0.004942128706706, - -0.698183069548291, -0.987483808311572, 0.004942128706706, - -0.834663613179069, 0.821127985248516, 0.004076340070443, - 0.821127985248516, -0.834663613179069, 0.004076340070443, - -0.986464372069447, 0.821127985248516, 0.004076340070443, - 0.821127985248516, -0.986464372069447, 0.004076340070443, - -0.986464372069447, -0.834663613179069, 0.004076340070443, - -0.834663613179069, -0.986464372069447, 0.004076340070443, - -0.700166221086294, 0.634916644768372, 0.011120280239045, - 0.634916644768372, -0.700166221086294, 0.011120280239045, - -0.934750423682077, 0.634916644768372, 0.011120280239045, - 0.634916644768372, -0.934750423682077, 0.011120280239045, - -0.934750423682078, -0.700166221086294, 0.011120280239045, - -0.700166221086294, -0.934750423682078, 0.011120280239045, - -0.160245113591115, 0.096801406370527, 0.012755358640694, - 0.096801406370527, -0.160245113591115, 0.012755358640694, - -0.936556292779412, 0.096801406370527, 0.012755358640694, - 0.096801406370527, -0.936556292779412, 0.012755358640694, - -0.936556292779412, -0.160245113591115, 0.012755358640694, - -0.160245113591115, -0.936556292779412, 0.012755358640694, - -0.348814552390868, 0.279444440434072, 0.014549157045387, - 0.279444440434072, -0.348814552390868, 0.014549157045387, - -0.930629888043204, 0.279444440434072, 0.014549157045387, - 0.279444440434072, -0.930629888043204, 0.014549157045387, - -0.930629888043204, -0.348814552390868, 0.014549157045387, - -0.348814552390868, -0.930629888043204, 0.014549157045387, - -0.835149343614232, 0.764834325997890, 0.009121880355576, - 0.764834325997890, -0.835149343614232, 0.009121880355576, - -0.929684982383659, 0.764834325997890, 0.009121880355576, - 0.764834325997890, -0.929684982383659, 0.009121880355576, - -0.929684982383659, -0.835149343614232, 0.009121880355576, - -0.835149343614232, -0.929684982383659, 0.009121880355576, - -0.534046892746188, 0.466663082505331, 0.013582808914065, - 0.466663082505331, -0.534046892746188, 0.013582808914065, - -0.932616189759143, 0.466663082505331, 0.013582808914065, - 0.466663082505331, -0.932616189759143, 0.013582808914065, - -0.932616189759143, -0.534046892746188, 0.013582808914065, - -0.534046892746188, -0.932616189759143, 0.013582808914065, - -0.704373154566392, 0.546726033293271, 0.015585248954434, - 0.546726033293271, -0.704373154566392, 0.015585248954434, - -0.842352878726879, 0.546726033293271, 0.015585248954434, - 0.546726033293271, -0.842352878726879, 0.015585248954434, - -0.842352878726879, -0.704373154566392, 0.015585248954434, - -0.704373154566392, -0.842352878726879, 0.015585248954434, - -0.220224863280788, 0.060870104244893, 0.018960151369388, - 0.060870104244893, -0.220224863280788, 0.018960151369388, - -0.840645240964104, 0.060870104244893, 0.018960151369388, - 0.060870104244893, -0.840645240964104, 0.018960151369388, - -0.840645240964104, -0.220224863280788, 0.018960151369388, - -0.220224863280788, -0.840645240964104, 0.018960151369388, - -0.394989254221112, 0.230609434358343, 0.019206200353033, - 0.230609434358343, -0.394989254221112, 0.019206200353033, - -0.835620180137232, 0.230609434358343, 0.019206200353033, - 0.230609434358343, -0.835620180137232, 0.019206200353033, - -0.835620180137232, -0.394989254221112, 0.019206200353033, - -0.394989254221112, -0.835620180137232, 0.019206200353033, - -0.557563751773578, 0.393274056332418, 0.018121839059318, - 0.393274056332418, -0.557563751773578, 0.018121839059318, - -0.835710304558840, 0.393274056332418, 0.018121839059318, - 0.393274056332418, -0.835710304558840, 0.018121839059318, - -0.835710304558840, -0.557563751773578, 0.018121839059318, - -0.557563751773578, -0.835710304558840, 0.018121839059318, - -0.350522450436603, 0.060630141977535, 0.028403705951863, - 0.060630141977535, -0.350522450436603, 0.028403705951863, - -0.710107691540932, 0.060630141977535, 0.028403705951863, - 0.060630141977535, -0.710107691540932, 0.028403705951863, - -0.710107691540932, -0.350522450436603, 0.028403705951863, - -0.350522450436603, -0.710107691540932, 0.028403705951863, - -0.544246685468649, 0.246315777233803, 0.026986162760930, - 0.246315777233803, -0.544246685468649, 0.026986162760930, - -0.702069091765154, 0.246315777233803, 0.026986162760930, - 0.246315777233803, -0.702069091765154, 0.026986162760930, - -0.702069091765154, -0.544246685468649, 0.026986162760930, - -0.544246685468649, -0.702069091765154, 0.026986162760930, - -0.373996265063702, -0.064072130507071, 0.025102184615930, - -0.064072130507071, -0.373996265063702, 0.025102184615930, - -0.561931604429227, -0.064072130507071, 0.025102184615930, - -0.064072130507071, -0.561931604429227, 0.025102184615930, - -0.561931604429227, -0.373996265063702, 0.025102184615930, - -0.373996265063702, -0.561931604429227, 0.025102184615930 -}; - -double cub2D_27[435] = { // 3 * 145 - -0.333333333333333, -0.333333333333333, 0.029215421142604, - -0.029244446609137, -0.029244446609137, 0.013615273717612, - -0.941511106781726, -0.029244446609137, 0.013615273717612, - -0.029244446609137, -0.941511106781726, 0.013615273717612, - -0.132843721814340, -0.132843721814340, 0.030951102870660, - -0.734312556371321, -0.132843721814340, 0.030951102870660, - -0.132843721814340, -0.734312556371321, 0.030951102870660, - -0.224940014502969, -0.224940014502969, 0.031733186724762, - -0.550119970994063, -0.224940014502969, 0.031733186724762, - -0.224940014502969, -0.550119970994063, 0.031733186724762, - -0.427786783949924, -0.427786783949924, 0.031559855928489, - -0.144426432100151, -0.427786783949924, 0.031559855928489, - -0.427786783949924, -0.144426432100151, 0.031559855928489, - -0.532776206162091, -0.532776206162091, 0.027863700370354, - 0.065552412324182, -0.532776206162091, 0.027863700370354, - -0.532776206162091, 0.065552412324182, 0.027863700370354, - -0.690368113175391, -0.690368113175391, 0.019750305737275, - 0.380736226350782, -0.690368113175391, 0.019750305737275, - -0.690368113175391, 0.380736226350782, 0.019750305737275, - -0.781499070170348, -0.781499070170348, 0.015635498945203, - 0.562998140340695, -0.781499070170348, 0.015635498945203, - -0.781499070170348, 0.562998140340695, 0.015635498945203, - -0.862704525220276, -0.862704525220276, 0.010432865446986, - 0.725409050440551, -0.862704525220276, 0.010432865446986, - -0.862704525220276, 0.725409050440551, 0.010432865446986, - -0.932961091535336, -0.932961091535336, 0.005852724472600, - 0.865922183070671, -0.932961091535336, 0.005852724472600, - -0.932961091535336, 0.865922183070671, 0.005852724472600, - -0.986811381964774, -0.986811381964774, 0.001134879007165, - 0.973622763929549, -0.986811381964774, 0.001134879007165, - -0.986811381964774, 0.973622763929549, 0.001134879007165, - -0.717055503863097, 0.716419063026126, 0.001375795459783, - 0.716419063026126, -0.717055503863097, 0.001375795459783, - -0.999363559163030, 0.716419063026126, 0.001375795459783, - 0.716419063026126, -0.999363559163030, 0.001375795459783, - -0.999363559163030, -0.717055503863097, 0.001375795459783, - -0.717055503863097, -0.999363559163030, 0.001375795459783, - -0.838822221132805, 0.827544031058903, 0.003088879415937, - 0.827544031058903, -0.838822221132805, 0.003088879415937, - -0.988721809926098, 0.827544031058903, 0.003088879415937, - 0.827544031058903, -0.988721809926098, 0.003088879415937, - -0.988721809926098, -0.838822221132805, 0.003088879415937, - -0.838822221132805, -0.988721809926098, 0.003088879415937, - -0.537630806497654, 0.526128943172145, 0.005625149324346, - 0.526128943172145, -0.537630806497654, 0.005625149324346, - -0.988498136674491, 0.526128943172145, 0.005625149324346, - 0.526128943172145, -0.988498136674491, 0.005625149324346, - -0.988498136674491, -0.537630806497654, 0.005625149324346, - -0.537630806497654, -0.988498136674491, 0.005625149324346, - -0.113842988120976, 0.103273580134309, 0.005913105372899, - 0.103273580134309, -0.113842988120976, 0.005913105372899, - -0.989430592013333, 0.103273580134310, 0.005913105372899, - 0.103273580134310, -0.989430592013333, 0.005913105372899, - -0.989430592013333, -0.113842988120976, 0.005913105372899, - -0.113842988120976, -0.989430592013333, 0.005913105372899, - -0.330849908839651, 0.320515152715889, 0.005565783438844, - 0.320515152715889, -0.330849908839651, 0.005565783438844, - -0.989665243876238, 0.320515152715889, 0.005565783438844, - 0.320515152715889, -0.989665243876238, 0.005565783438844, - -0.989665243876238, -0.330849908839651, 0.005565783438844, - -0.330849908839651, -0.989665243876238, 0.005565783438844, - -0.931869179489789, 0.919222453867072, 0.002449540456172, - 0.919222453867072, -0.931869179489789, 0.002449540456172, - -0.987353274377283, 0.919222453867072, 0.002449540456172, - 0.919222453867072, -0.987353274377283, 0.002449540456172, - -0.987353274377283, -0.931869179489789, 0.002449540456172, - -0.931869179489789, -0.987353274377283, 0.002449540456172, - -0.695123977280935, 0.663705924287710, 0.007906643758942, - 0.663705924287710, -0.695123977280935, 0.007906643758942, - -0.968581947006775, 0.663705924287710, 0.007906643758942, - 0.663705924287710, -0.968581947006775, 0.007906643758942, - -0.968581947006775, -0.695123977280935, 0.007906643758942, - -0.695123977280935, -0.968581947006775, 0.007906643758942, - -0.831869809255826, 0.777736654895860, 0.007221969465327, - 0.777736654895860, -0.831869809255826, 0.007221969465327, - -0.945866845640035, 0.777736654895860, 0.007221969465327, - 0.777736654895860, -0.945866845640035, 0.007221969465327, - -0.945866845640035, -0.831869809255826, 0.007221969465327, - -0.831869809255826, -0.945866845640035, 0.007221969465327, - -0.423211420319719, 0.374995160760160, 0.008707930088036, - 0.374995160760160, -0.423211420319719, 0.008707930088036, - -0.951783740440441, 0.374995160760160, 0.008707930088036, - 0.374995160760160, -0.951783740440441, 0.008707930088036, - -0.951783740440441, -0.423211420319719, 0.008707930088036, - -0.423211420319719, -0.951783740440441, 0.008707930088036, - -0.223962554104902, 0.171509638849087, 0.011256464740666, - 0.171509638849087, -0.223962554104902, 0.011256464740666, - -0.947547084744185, 0.171509638849087, 0.011256464740666, - 0.171509638849087, -0.947547084744185, 0.011256464740666, - -0.947547084744185, -0.223962554104902, 0.011256464740666, - -0.223962554104902, -0.947547084744185, 0.011256464740666, - -0.566926820194262, 0.490923426439871, 0.013269437724243, - 0.490923426439871, -0.566926820194262, 0.013269437724243, - -0.923996606245609, 0.490923426439871, 0.013269437724243, - 0.490923426439871, -0.923996606245609, 0.013269437724243, - -0.923996606245609, -0.566926820194262, 0.013269437724243, - -0.566926820194262, -0.923996606245609, 0.013269437724243, - -0.350787336349322, 0.245677528944182, 0.013046146795576, - 0.245677528944182, -0.350787336349322, 0.013046146795576, - -0.894890192594860, 0.245677528944182, 0.013046146795576, - 0.245677528944182, -0.894890192594860, 0.013046146795576, - -0.894890192594860, -0.350787336349322, 0.013046146795576, - -0.350787336349322, -0.894890192594860, 0.013046146795576, - -0.729613610936203, 0.622255871516285, 0.012947418329903, - 0.622255871516285, -0.729613610936203, 0.012947418329903, - -0.892642260580081, 0.622255871516285, 0.012947418329903, - 0.622255871516285, -0.892642260580081, 0.012947418329903, - -0.892642260580081, -0.729613610936203, 0.012947418329903, - -0.729613610936203, -0.892642260580081, 0.012947418329903, - -0.176209680235251, 0.035410146457445, 0.021313811627966, - 0.035410146457445, -0.176209680235251, 0.021313811627966, - -0.859200466222194, 0.035410146457445, 0.021313811627966, - 0.035410146457445, -0.859200466222194, 0.021313811627966, - -0.859200466222194, -0.176209680235251, 0.021313811627966, - -0.176209680235251, -0.859200466222194, 0.021313811627966, - -0.469171656648510, 0.304686011244002, 0.017176891528936, - 0.304686011244002, -0.469171656648510, 0.017176891528936, - -0.835514354595492, 0.304686011244002, 0.017176891528936, - 0.304686011244002, -0.835514354595492, 0.017176891528936, - -0.835514354595492, -0.469171656648510, 0.017176891528936, - -0.469171656648510, -0.835514354595492, 0.017176891528936, - -0.623736093891471, 0.443479545725970, 0.017763399981969, - 0.443479545725970, -0.623736093891471, 0.017763399981969, - -0.819743451834499, 0.443479545725970, 0.017763399981969, - 0.443479545725970, -0.819743451834499, 0.017763399981969, - -0.819743451834499, -0.623736093891471, 0.017763399981969, - -0.623736093891471, -0.819743451834499, 0.017763399981969, - -0.336632062394500, 0.104847567508036, 0.023828398561090, - 0.104847567508036, -0.336632062394500, 0.023828398561090, - -0.768215505113536, 0.104847567508036, 0.023828398561090, - 0.104847567508036, -0.768215505113536, 0.023828398561090, - -0.768215505113536, -0.336632062394500, 0.023828398561090, - -0.336632062394500, -0.768215505113536, 0.023828398561090, - -0.530404689974552, 0.224195004863778, 0.026764788789016, - 0.224195004863778, -0.530404689974552, 0.026764788789016, - -0.693790314889227, 0.224195004863778, 0.026764788789016, - 0.224195004863778, -0.693790314889227, 0.026764788789016, - -0.693790314889227, -0.530404689974552, 0.026764788789016, - -0.530404689974552, -0.693790314889227, 0.026764788789016, - -0.350831684137242, -0.019508133770036, 0.028977845006028, - -0.019508133770036, -0.350831684137242, 0.028977845006028, - -0.629660182092722, -0.019508133770036, 0.028977845006028, - -0.019508133770036, -0.629660182092722, 0.028977845006028, - -0.629660182092722, -0.350831684137242, 0.028977845006028, - -0.350831684137242, -0.629660182092722, 0.028977845006028 -}; - -double cub2D_28[675] = { // 3 * 225 - -0.988064607832230, 0.987992518020485, 0.000005678109445, - -0.937649986705898, 0.937273392400706, 0.000067869690329, - -0.849117911767581, 0.848206583410427, 0.000250117104238, - -0.726072255922453, 0.724417731360170, 0.000591434111178, - -0.573547944561595, 0.570972172608539, 0.001096877668021, - -0.397788705468703, 0.394151347077563, 0.001734258212849, - -0.205989917758162, 0.201194093997435, 0.002437321168702, - -0.006003740989757, 0.000000000000000, 0.003114968848543, - 0.193982435778648, -0.201194093997435, 0.003665090319212, - 0.385781223489189, -0.394151347077563, 0.003990796070869, - 0.561540462582081, -0.570972172608539, 0.004016439454972, - 0.714064773942939, -0.724417731360170, 0.003700816722647, - 0.837110429788067, -0.848206583410427, 0.003045376334904, - 0.925642504726384, -0.937273392400706, 0.002096114396383, - 0.976057125852715, -0.987992518020485, 0.000940083783827, - -0.988369112325678, 0.987992518020485, 0.000012991999963, - -0.939240706051164, 0.937273392400706, 0.000155291655212, - -0.852967326449712, 0.848206583410427, 0.000572289322752, - -0.733060901773317, 0.724417731360170, 0.001353251821662, - -0.584427902697520, 0.570972172608539, 0.002509749901695, - -0.413152762435777, 0.394151347077563, 0.003968131092565, - -0.226247286304345, 0.201194093997435, 0.005576799256556, - -0.031363303799647, 0.000000000000000, 0.007127315095696, - 0.163520678705051, -0.201194093997435, 0.008386040063107, - 0.350426154836483, -0.394151347077563, 0.009131282674963, - 0.521701295098226, -0.570972172608539, 0.009189956930633, - 0.670334294174023, -0.724417731360170, 0.008467785129237, - 0.790240718850418, -0.848206583410427, 0.006968081473429, - 0.876514098451870, -0.937273392400706, 0.004796088983887, - 0.925642504726384, -0.987992518020485, 0.002150992086750, - -0.988903846377640, 0.987992518020485, 0.000019785289042, - -0.942034135439991, 0.937273392400706, 0.000236490940043, - -0.859727204070395, 0.848206583410427, 0.000871529379538, - -0.745333518414343, 0.724417731360170, 0.002060843481789, - -0.603533972474414, 0.570972172608539, 0.003822054138805, - -0.440133265559207, 0.394151347077563, 0.006042997294437, - -0.261820832829464, 0.201194093997435, 0.008492809847469, - -0.075896708294786, 0.000000000000000, 0.010854063244177, - 0.110027416239891, -0.201194093997435, 0.012770953436328, - 0.288339848969634, -0.394151347077563, 0.013905870348620, - 0.451740555884842, -0.570972172608539, 0.013995224344240, - 0.593540101824770, -0.724417731360170, 0.012895441564853, - 0.707933787480822, -0.848206583410427, 0.010611569151594, - 0.790240718850418, -0.937273392400706, 0.007303879856139, - 0.837110429788067, -0.987992518020485, 0.003275708150100, - -0.989647042582769, 0.987992518020485, 0.000025769562269, - -0.945916562813853, 0.937273392400706, 0.000308020165519, - -0.869122370464600, 0.848206583410427, 0.001135132803359, - -0.762390524754508, 0.724417731360170, 0.002684167732828, - -0.630088403599617, 0.570972172608539, 0.004978075474027, - -0.477631920189938, 0.394151347077563, 0.007870766747028, - -0.311262465886975, 0.201194093997435, 0.011061551425453, - -0.137791134319915, 0.000000000000000, 0.014136991279319, - 0.035680197247145, -0.201194093997435, 0.016633665503545, - 0.202049651550108, -0.394151347077563, 0.018111850228555, - 0.354506134959787, -0.570972172608539, 0.018228230300094, - 0.486808256114678, -0.724417731360170, 0.016795806403939, - 0.593540101824770, -0.848206583410427, 0.013821152243283, - 0.670334294174023, -0.937273392400706, 0.009513016785380, - 0.714064773942939, -0.987992518020485, 0.004266481271556, - -0.990568289973542, 0.987992518020485, 0.000030699031605, - -0.950729122489687, 0.937273392400706, 0.000366941459749, - -0.880768383276303, 0.848206583410427, 0.001352272787635, - -0.783533962351248, 0.724417731360170, 0.003197623195991, - -0.663004610946658, 0.570972172608539, 0.005930333418609, - -0.524114312723242, 0.394151347077563, 0.009376368701824, - -0.372549075177309, 0.201194093997435, 0.013177519790991, - -0.214513913695731, 0.000000000000000, 0.016841261700383, - -0.056478752214152, -0.201194093997435, 0.019815525683434, - 0.095086485331781, -0.394151347077563, 0.021576472924861, - 0.233976783555196, -0.570972172608539, 0.021715115384404, - 0.354506134959787, -0.724417731360170, 0.020008682578130, - 0.451740555884842, -0.848206583410427, 0.016465005695410, - 0.521701295098226, -0.937273392400706, 0.011332765372579, - 0.561540462582081, -0.987992518020485, 0.005082618091388, - -0.991629876411625, 0.987992518020485, 0.000034371743072, - -0.956274807758919, 0.937273392400706, 0.000410840893588, - -0.894188501892071, 0.848206583410427, 0.001514053388316, - -0.807898304472545, 0.724417731360170, 0.003580174265665, - -0.700935138254217, 0.570972172608539, 0.006639815197344, - -0.577677642201529, 0.394151347077563, 0.010498120595869, - -0.443171835046505, 0.201194093997435, 0.014754026459451, - -0.302924326461218, 0.000000000000000, 0.018856084049129, - -0.162676817875932, -0.201194093997435, 0.022186177283618, - -0.028171010720908, -0.394151347077563, 0.024157797330925, - 0.095086485331781, -0.570972172608539, 0.024313026429341, - 0.202049651550108, -0.724417731360170, 0.022402442709917, - 0.288339848969634, -0.848206583410427, 0.018434814254740, - 0.350426154836483, -0.937273392400706, 0.012688572873940, - 0.385781223489189, -0.987992518020485, 0.005690682540646, - -0.992788341781213, 0.987992518020485, 0.000036637297986, - -0.962326584707617, 0.937273392400706, 0.000437920771488, - -0.908833322242456, 0.848206583410427, 0.001613849639200, - -0.834486103249711, 0.724417731360170, 0.003816155355883, - -0.742327153788413, 0.570972172608539, 0.007077467309460, - -0.636129088126634, 0.394151347077563, 0.011190086338209, - -0.520239531729724, 0.201194093997435, 0.015726512989614, - -0.399402953001283, 0.000000000000000, 0.020098950720122, - -0.278566374272841, -0.201194093997435, 0.023648541379510, - -0.162676817875932, -0.394151347077563, 0.025750117404859, - -0.056478752214152, -0.570972172608539, 0.025915578164965, - 0.035680197247145, -0.724417731360170, 0.023879061573116, - 0.110027416239891, -0.848206583410427, 0.019649913644597, - 0.163520678705051, -0.937273392400706, 0.013524918548175, - 0.193982435778648, -0.987992518020485, 0.006065774189928, - -0.993996259010243, 0.987992518020485, 0.000037402932316, - -0.968636696200353, 0.937273392400706, 0.000447072297244, - -0.924103291705214, 0.848206583410427, 0.001647575343713, - -0.862208865680085, 0.724417731360170, 0.003895904128496, - -0.785486086304269, 0.570972172608539, 0.007225369917846, - -0.697075673538782, 0.394151347077563, 0.011423933120557, - -0.600597046998717, 0.201194093997435, 0.016055160539688, - -0.500000000000000, 0.000000000000000, 0.020518972050826, - -0.399402953001283, -0.201194093997435, 0.024142740900556, - -0.302924326461218, -0.394151347077563, 0.026288234977700, - -0.214513913695731, -0.570972172608539, 0.026457153482920, - -0.137791134319915, -0.724417731360170, 0.024378078430143, - -0.075896708294786, -0.848206583410427, 0.020060551144640, - -0.031363303799647, -0.937273392400706, 0.013807557894147, - -0.006003740989757, -0.987992518020485, 0.006192534764769, - -0.995204176239272, 0.987992518020485, 0.000036637297986, - -0.974946807693089, 0.937273392400706, 0.000437920771488, - -0.939373261167971, 0.848206583410427, 0.001613849639200, - -0.889931628110459, 0.724417731360170, 0.003816155355883, - -0.828645018820126, 0.570972172608539, 0.007077467309460, - -0.758022258950930, 0.394151347077563, 0.011190086338209, - -0.680954562267710, 0.201194093997435, 0.015726512989614, - -0.600597046998717, 0.000000000000000, 0.020098950720122, - -0.520239531729724, -0.201194093997435, 0.023648541379510, - -0.443171835046505, -0.394151347077563, 0.025750117404859, - -0.372549075177309, -0.570972172608539, 0.025915578164965, - -0.311262465886975, -0.724417731360170, 0.023879061573116, - -0.261820832829464, -0.848206583410427, 0.019649913644597, - -0.226247286304345, -0.937273392400706, 0.013524918548175, - -0.205989917758162, -0.987992518020485, 0.006065774189928, - -0.996362641608860, 0.987992518020485, 0.000034371743072, - -0.980998584641787, 0.937273392400706, 0.000410840893588, - -0.954018081518357, 0.848206583410427, 0.001514053388316, - -0.916519426887625, 0.724417731360170, 0.003580174265665, - -0.870037034354322, 0.570972172608539, 0.006639815197344, - -0.816473704876034, 0.394151347077563, 0.010498120595869, - -0.758022258950930, 0.201194093997435, 0.014754026459451, - -0.697075673538782, 0.000000000000000, 0.018856084049129, - -0.636129088126634, -0.201194093997435, 0.022186177283618, - -0.577677642201529, -0.394151347077563, 0.024157797330925, - -0.524114312723242, -0.570972172608539, 0.024313026429341, - -0.477631920189938, -0.724417731360170, 0.022402442709917, - -0.440133265559207, -0.848206583410427, 0.018434814254740, - -0.413152762435777, -0.937273392400706, 0.012688572873940, - -0.397788705468703, -0.987992518020485, 0.005690682540646, - -0.997424228046943, 0.987992518020485, 0.000030699031605, - -0.986544269911019, 0.937273392400706, 0.000366941459749, - -0.967438200134124, 0.848206583410427, 0.001352272787635, - -0.940883769008922, 0.724417731360170, 0.003197623195991, - -0.907967561661881, 0.570972172608539, 0.005930333418609, - -0.870037034354322, 0.394151347077563, 0.009376368701824, - -0.828645018820126, 0.201194093997435, 0.013177519790991, - -0.785486086304269, 0.000000000000000, 0.016841261700383, - -0.742327153788413, -0.201194093997435, 0.019815525683434, - -0.700935138254217, -0.394151347077563, 0.021576472924861, - -0.663004610946658, -0.570972172608539, 0.021715115384404, - -0.630088403599617, -0.724417731360170, 0.020008682578130, - -0.603533972474414, -0.848206583410427, 0.016465005695410, - -0.584427902697520, -0.937273392400706, 0.011332765372579, - -0.573547944561595, -0.987992518020485, 0.005082618091388, - -0.998345475437717, 0.987992518020485, 0.000025769562269, - -0.991356829586853, 0.937273392400706, 0.000308020165519, - -0.979084212945827, 0.848206583410427, 0.001135132803359, - -0.962027206605662, 0.724417731360170, 0.002684167732828, - -0.940883769008922, 0.570972172608539, 0.004978075474027, - -0.916519426887625, 0.394151347077563, 0.007870766747028, - -0.889931628110459, 0.201194093997435, 0.011061551425453, - -0.862208865680085, 0.000000000000000, 0.014136991279319, - -0.834486103249711, -0.201194093997435, 0.016633665503545, - -0.807898304472545, -0.394151347077563, 0.018111850228555, - -0.783533962351248, -0.570972172608539, 0.018228230300094, - -0.762390524754508, -0.724417731360170, 0.016795806403939, - -0.745333518414343, -0.848206583410427, 0.013821152243283, - -0.733060901773317, -0.937273392400706, 0.009513016785380, - -0.726072255922453, -0.987992518020485, 0.004266481271556, - -0.999088671642846, 0.987992518020485, 0.000019785289042, - -0.995239256960715, 0.937273392400706, 0.000236490940043, - -0.988479379340032, 0.848206583410427, 0.000871529379538, - -0.979084212945827, 0.724417731360170, 0.002060843481789, - -0.967438200134124, 0.570972172608539, 0.003822054138805, - -0.954018081518357, 0.394151347077563, 0.006042997294437, - -0.939373261167971, 0.201194093997435, 0.008492809847469, - -0.924103291705214, 0.000000000000000, 0.010854063244177, - -0.908833322242456, -0.201194093997435, 0.012770953436328, - -0.894188501892071, -0.394151347077563, 0.013905870348620, - -0.880768383276303, -0.570972172608539, 0.013995224344240, - -0.869122370464600, -0.724417731360170, 0.012895441564853, - -0.859727204070395, -0.848206583410427, 0.010611569151594, - -0.852967326449712, -0.937273392400706, 0.007303879856139, - -0.849117911767581, -0.987992518020485, 0.003275708150100, - -0.999623405694808, 0.987992518020485, 0.000012991999963, - -0.998032686349542, 0.937273392400706, 0.000155291655212, - -0.995239256960715, 0.848206583410427, 0.000572289322752, - -0.991356829586853, 0.724417731360170, 0.001353251821662, - -0.986544269911019, 0.570972172608539, 0.002509749901695, - -0.980998584641787, 0.394151347077563, 0.003968131092565, - -0.974946807693089, 0.201194093997435, 0.005576799256556, - -0.968636696200353, 0.000000000000000, 0.007127315095696, - -0.962326584707617, -0.201194093997435, 0.008386040063107, - -0.956274807758919, -0.394151347077563, 0.009131282674963, - -0.950729122489687, -0.570972172608539, 0.009189956930633, - -0.945916562813853, -0.724417731360170, 0.008467785129237, - -0.942034135439991, -0.848206583410427, 0.006968081473429, - -0.939240706051164, -0.937273392400706, 0.004796088983887, - -0.937649986705898, -0.987992518020485, 0.002150992086750, - -0.999927910188256, 0.987992518020485, 0.000005678109445, - -0.999623405694808, 0.937273392400706, 0.000067869690329, - -0.999088671642846, 0.848206583410427, 0.000250117104238, - -0.998345475437717, 0.724417731360170, 0.000591434111178, - -0.997424228046943, 0.570972172608539, 0.001096877668021, - -0.996362641608860, 0.394151347077563, 0.001734258212849, - -0.995204176239272, 0.201194093997435, 0.002437321168702, - -0.993996259010243, 0.000000000000000, 0.003114968848543, - -0.992788341781213, -0.201194093997435, 0.003665090319212, - -0.991629876411625, -0.394151347077563, 0.003990796070869, - -0.990568289973542, -0.570972172608539, 0.004016439454972, - -0.989647042582769, -0.724417731360170, 0.003700816722647, - -0.988903846377640, -0.848206583410427, 0.003045376334904, - -0.988369112325678, -0.937273392400706, 0.002096114396383, - -0.988064607832230, -0.987992518020485, 0.000940083783827 -}; diff --git a/cpp/nudg++/trunk/Src/Codes2D/CubatureVolumeMesh2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CubatureVolumeMesh2D.cpp deleted file mode 100644 index fee1c0a..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CubatureVolumeMesh2D.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// CubatureVolumeMesh2D.m -// function cub = CubatureVolumeMesh2D(Corder) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -Cub2D& NDG2D::CubatureVolumeMesh2D(int Corder) -//--------------------------------------------------------- -{ - // function cub = CubatureVolumeMesh2D(Corder) - // purpose: build cubature nodes, weights and geometric factors for all elements - // - // Note: m_cub is member of Globals2D - - // set up cubature nodes - Cubature2D(Corder, m_cub); - - // evaluate generalized Vandermonde of Lagrange interpolant functions at cubature nodes - InterpMatrix2D(m_cub); - - // evaluate local derivatives of Lagrange interpolants at cubature nodes - Dmatrices2D(this->N, m_cub); - - // evaluate the geometric factors at the cubature nodes - GeometricFactors2D(m_cub); - - // custom mass matrix per element - DMat mmk; DMat_Diag D; DVec d; - m_cub.mmCHOL.resize(Np*Np, K); - m_cub.mm .resize(Np*Np, K); - - for (int k=1; k<=K; ++k) { - d=m_cub.J(All,k); d*=m_cub.w; D.diag(d); // weighted diagonal - mmk = m_cub.VT * D * m_cub.V; // mass matrix for element k - m_cub.mm(All,k) = mmk; // store mass matrix - m_cub.mmCHOL(All,k) = chol(mmk); // store Cholesky factorization - } - - // incorporate weights and Jacobian - m_cub.W = outer(m_cub.w, ones(K)); - m_cub.W.mult_element(m_cub.J); - - // compute coordinates of cubature nodes - m_cub.x = m_cub.V * this->x; - m_cub.y = m_cub.V * this->y; - - return m_cub; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Curl2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Curl2D.cpp deleted file mode 100644 index 266c5b3..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Curl2D.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// Curl2D.m -// function [vx,vy,vz] = Curl2D(ux,uy,uz); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - -// NBN: comments -// define two overloaded versions: -// a: [--,--,vz] = C(ux,uy,--) -// b: [vx,vy,vz] = C(ux,uy,uz) - - -//--------------------------------------------------------- -void NDG2D::Curl2D -( - const DMat& ux, // [in] - const DMat& uy, // [in] - DMat& vz // [out] -) -//--------------------------------------------------------- -{ - // function [--,--,vz] = Curl2D(ux,uy,--); - // Purpose: Compute 2D curl-operator in (x,y) plane - - DMat uxr = Dr*ux, uxs = Ds*ux, - uyr = Dr*uy, uys = Ds*uy; - - vz = rx.dm(uyr) + sx.dm(uys) - ry.dm(uxr) - sy.dm(uxs); -} - - -//--------------------------------------------------------- -void NDG2D::Curl2D -( - const DMat& ux, // [in] - const DMat& uy, // [in] - const DMat& uz, // [in] - DMat& vx, // [out] - DMat& vy, // [out] - DMat& vz // [out] -) -//--------------------------------------------------------- -{ - // function [vx,vy,vz] = Curl2D(ux,uy,uz); - // Purpose: Compute 3D curl-operator - - DMat uxr = Dr*ux, uxs = Ds*ux, - uyr = Dr*uy, uys = Ds*uy, - uzr = Dr*uz, uzs = Ds*uz; - - vz = rx.dm(uyr) + sx.dm(uys) - ry.dm(uxr) - sy.dm(uxs); - vx = ry.dm(uzr) + sy.dm(uzs); - vy = -rx.dm(uzr) - sx.dm(uzs); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/CurvedDGDiv2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CurvedDGDiv2D.cpp deleted file mode 100644 index 6e2ec11..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CurvedDGDiv2D.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// CurvedDGGrad2D.m -// function [divU] = CurvedDGDiv2D(cU, cV, gU, gV, gmapN, bcNdotU) -// 2007/06/25 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -DMat& NDG2D::CurvedDGDiv2D -( - const DMat& cU, // [in] - const DMat& cV, // [in] - const DMat& gU, // [in] - const DMat& gV, // [in] - const IVec& gmapN, // [in] - const DVec& bcNdotU // [in] -) -//--------------------------------------------------------- -{ - // function [divU] = CurvedDGDiv2D(cU, cV, gU, gV, gmapN, bcNdotU) - // Purpose: compute the divergence of a vectorial function given - // at cubature and surface Gauss nodes - - DMat gFxM,gFxP,mmCHOL; DVec gUM,gUP,gVM,gVP; - DMat *tmp = new DMat("divU", OBJ_temp); - DMat &divU(*tmp); - - // shorthand references - Cub2D& cub = this->m_cub; Gauss2D& gauss = this->m_gauss; - - // Volume terms: U - divU = cub.DrT * (cub.W.dm(cub.rx.dm(cU) + cub.ry.dm(cV))) + - cub.DsT * (cub.W.dm(cub.sx.dm(cU) + cub.sy.dm(cV))); - - // Surface traces at Gauss nodes - gUM = gU(gauss.mapM); gUP = gU(gauss.mapP); - gVM = gV(gauss.mapM); gVP = gV(gauss.mapP); - - // Normal fluxes - gFxM = gauss.nx.dm(gUM) + gauss.ny.dm(gVM); - gFxP = gauss.nx.dm(gUP) + gauss.ny.dm(gVP); - - // Apply boundary conditions - if (gmapN.size()>0) { gFxP(gmapN) = bcNdotU(gmapN); } - - // Add flux terms to divergence - divU -= gauss.interpT * (gauss.W.dm(gFxM + gFxP))/2.0; - - // Multiply straight sided triangles by inverse mass matrix - divU(All,straight) = VVT * dd(divU(All,straight), J(All,straight)); - - // Multiply curvilinear faces by custom inverse mass matrix - int Ncurved = curved.size(), k=0; - for (int m=1; m<=Ncurved; ++m) { - k = curved(m); - mmCHOL.borrow(Np,Np, cub.mmCHOL.pCol(k)); - mmCHOL.set_factmode(FACT_CHOL); // indicate factored state - divU(All,k) = chol_solve(mmCHOL, divU(All,k)); - } - - // Correct sign - divU *= -1.0; - return divU; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/CurvedDGGrad2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CurvedDGGrad2D.cpp deleted file mode 100644 index 7b96378..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CurvedDGGrad2D.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// CurvedDGGrad2D.m -// function [dUdx, dUdy] = CurvedDGGrad2D(cU, gU, gmapD, bcU) -// 2007/06/25 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::CurvedDGGrad2D -( - const DMat& cU, // [in] - const DMat& gU, // [in] - const IVec& gmapD, // [in] - const DVec& bcU, // [in] - DMat& dUdx, // [out] - DMat& dUdy // [out] -) -//--------------------------------------------------------- -{ - // function [dUdx, dUdy] = CurvedDGGrad2D(cU, gU, gmapD, bcU) - // Purpose: compute DG derivative of field given at - // cubature volume and Gauss surface nodes - - // shorthand references - Cub2D& cub = this->m_cub; Gauss2D& gauss = this->m_gauss; - - DMat fx,fy,mmCHOL; DVec gUM,gUP; - - // Volume terms: dUdx and dUdy - dUdx = cub.DrT*(cub.W.dm(cub.rx.dm(cU))) + cub.DsT*(cub.W.dm(cub.sx.dm(cU))); - dUdy = cub.DrT*(cub.W.dm(cub.ry.dm(cU))) + cub.DsT*(cub.W.dm(cub.sy.dm(cU))); - - // Surface traces at Gauss nodes - gUM = gU(gauss.mapM); - gUP = gU(gauss.mapP); - - // Apply boundary conditions - if (gmapD.size()>0) { gUP(gmapD) = bcU(gmapD); } - - // Normal flux terms - fx = 0.5*(gauss.nx.dm(gUM + gUP)); - fy = 0.5*(gauss.ny.dm(gUM + gUP)); - - // Add lifted flux terms to volume terms - dUdx -= gauss.interpT*(gauss.W.dm(fx)); - dUdy -= gauss.interpT*(gauss.W.dm(fy)); - - // Multiply straight sided triangles by inverse mass matrix - dUdx(All,straight) = VVT * dd(dUdx(All,straight), J(All,straight)); - dUdy(All,straight) = VVT * dd(dUdy(All,straight), J(All,straight)); - - // Multiply curvilinear faces by custom inverse mass matrix - int Ncurved = curved.size(), k=0; - for (int m=1; m<=Ncurved; ++m) { - k = curved(m); - mmCHOL.borrow(Np,Np, cub.mmCHOL.pCol(k)); - mmCHOL.set_factmode(FACT_CHOL); // indicate factored state - dUdx(All,k) = chol_solve(mmCHOL, dUdx(All,k)); - dUdy(All,k) = chol_solve(mmCHOL, dUdy(All,k)); - } - - // Correct sign - dUdx *= -1.0; - dUdy *= -1.0; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/CurvedDGJump2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CurvedDGJump2D.cpp deleted file mode 100644 index 4a299cd..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CurvedDGJump2D.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// CurvedDGJump2D.m -// function [jumpU] = CurvedDGJump2D(gU, gmapD, bcU) -// 2007/06/25 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -DMat& NDG2D::CurvedDGJump2D -( - const DMat& gU, // [in] - const IVec& gmapD, // [in] - const DVec& bcU // [in] -) -//--------------------------------------------------------- -{ - // function [jumpU] = CurvedDGJump2D(gU, gmapD, bcU) - // purpose: compute discontinuous Galerkin jump applied - // to a field given at cubature and Gauss nodes - - DMat mmCHOL; DVec gUM,gUP,fx; - DMat *tmp = new DMat("jumpU", OBJ_temp); - DMat &jumpU(*tmp); - - // shorthand references - Cub2D& cub = this->m_cub; Gauss2D& gauss = this->m_gauss; - - // surface traces at Gauss nodes - gUM = gU(gauss.mapM); - gUP = gU(gauss.mapP); - if (gmapD.size()>0) { gUP(gmapD) = bcU(gmapD); } - - // compute jump term and lift to triangle interiors - fx = gUM - gUP; - jumpU = -gauss.interpT*(gauss.W.dm(fx)); - - // multiply straight sided triangles by inverse mass matrix - jumpU(All,straight) = VVT * dd(jumpU(All,straight), J(All,straight)); - - // multiply by custom inverse mass matrix for each curvilinear triangle - int Ncurved = curved.size(), k=0; - for (int m=1; m<=Ncurved; ++m) { - k = curved(m); - mmCHOL.borrow(Np,Np, cub.mmCHOL.pCol(k)); - mmCHOL.set_factmode(FACT_CHOL); // indicate factored state - jumpU(All,k) = chol_solve(mmCHOL, jumpU(All,k)); - } - - // these parameters may be OBJ_temp (allocated on the fly) - if (OBJ_temp == gU.get_mode()) { delete (&gU); } - if (OBJ_temp == bcU.get_mode()) { delete (&bcU); } - - return jumpU; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDG2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDG2D.cpp deleted file mode 100644 index c361a2c..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDG2D.cpp +++ /dev/null @@ -1,174 +0,0 @@ -// CurvedPoissonIPDG2D.m -// function [OP,MM] = CurvedPoissonIPDG2D(gauss, cub) -// 2007/09/01 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::CurvedPoissonIPDG2D -( - Gauss2D& gauss, // [in] - Cub2D& cub, // [in] - CSd& spOP, // [out] sparse - CSd& spMM // [out] sparse -) -//--------------------------------------------------------- -{ - // function [OP,MM] = CurvedPoissonIPDG2D(gauss, cub) - // - // Purpose: Set up the discrete Poisson matrix directly - // using LDG. The operator is set up in the weak form - - NGauss = gauss.NGauss; - - // build DG derivative matrices - int max_OP = (K*Np*Np*(1+Nfaces)); - int max_MM = (K*Np*Np); - - // "OP" triplets (i,j,x), extracted to {Ai,Aj,Ax} - IVec OPi(max_OP), OPj(max_OP), Ai,Aj; DVec OPx(max_OP), Ax; - // "MM" triplets (i,j,x) - IVec MMi(max_MM), MMj(max_MM); DVec MMx(max_MM); - - DMat gDxM, gDyM, gDxP, gDyP, gDnM, gDnP, OP11, OP12; - IVec idsPR; IMat rows1, cols1, cols2; Index1D entries, entriesMM, idsM; - DVec xk1, yk1, xk2, yk2, locmm; - DMat cDx, cDy, gVM, gVMT, gVP, gVPR; - DMat_Diag cw, gnx,gny,gw; double opti1=0.0, opti2=0.0; - int k1=0,f1=0, k2=0,f2=0; double hinv=0.0, gtau=0.0; - - // global node numbering - entries.reset(1,Np*Np); entriesMM.reset(1,Np*Np); - - umMSG(1, "\n ==> {OP,MM} assembly: "); - opti1 = timer.read(); // time assembly - - for (k1=1; k1<=K; ++k1) - { - if (! (k1%100)) { umMSG(1, "%4d, ",k1); } - - rows1 = outer( Range((k1-1)*Np+1,k1*Np), Ones(Np) ); - cols1 = trans(rows1); - - // Build local operators - locmm = cub.mm(All,k1); - cw = cub.W(All,k1); - - xk1 = x(All,k1); yk1 = y(All,k1); - PhysDmatrices2D(xk1, yk1, cub.V, cDx, cDy); - OP11 = trans(cDx)*cw*cDx + trans(cDy)*cw*cDy; - - // Build element-to-element parts of operator - for (f1=1; f1<=Nfaces; ++f1) - { - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - - idsM.reset((f1-1)*NGauss+1, f1*NGauss); - idsPR.range(NGauss,1); - - gVM = gauss.finterp[f1]; - gVP = gauss.finterp[f2]; gVP.reverse_rows(); - gVMT= trans(gVM); // store transpose - - xk1 = x(All,k1); yk1 = y(All,k1); - xk2 = x(All,k2); yk2 = y(All,k2); - PhysDmatrices2D(xk1,yk1,gVM, gDxM,gDyM); - PhysDmatrices2D(xk2,yk2,gVP, gDxP,gDyP); - gnx = gauss.nx(idsM, k1); - gny = gauss.ny(idsM, k1); - gw = gauss.W (idsM, k1); - - gDnM = gnx*gDxM + gny*gDyM; - gDnP = gnx*gDxP + gny*gDyP; - - cols2 = outer( Ones(Np), Range((k2-1)*Np+1,k2*Np)); - hinv = std::max(Fscale(1+(f1-1)*Nfp, k1), Fscale(1+(f2-1)*Nfp, k2)); - //gtau = 100*2*(N+1)*(N+1)*hinv; // set penalty scaling - gtau = ( 5*2*(N+1)*(N+1))*hinv; // set penalty scaling - - switch (BCType(k1,f1)) { - case BC_Dirichlet: - OP11 += ( gVMT*(gw*gtau)*gVM - gVMT*gw*gDnM - trans(gDnM)*gw*gVM ); - break; - case BC_Neuman: - // nada - break; - default: - // interior face variational terms - OP11 += 0.5*( gVMT*(gw*gtau)*gVM - gVMT*gw*gDnM - trans(gDnM)*gw*gVM ); - OP12 = -0.5*( gVMT*(gw*gtau)*gVP + gVMT*gw*gDnP - trans(gDnM)*gw*gVP ); - OPi(entries)=rows1; OPj(entries)=cols2; OPx(entries)=OP12; - entries += (Np*Np); - break; - } - } - - OPi(entries )=rows1; OPj(entries )=cols1; OPx(entries )=OP11; - MMi(entriesMM)=rows1; MMj(entriesMM)=cols1; MMx(entriesMM)=locmm; - entries += (Np*Np); entriesMM += (Np*Np); - } - umMSG(1, "\n ==> {OP,MM} to sparse\n"); - - entries.reset(1, entries.hi()-Np*Np); - - // Extract triplets from the large buffers. Note: this - // requires copying each array, and since these arrays - // can be HUGE(!), we force immediate deallocation: - - Ai=OPi(entries); OPi.Free(); - Aj=OPj(entries); OPj.Free(); - Ax=OPx(entries); OPx.Free(); - - // return 0-based sparse results - // Note: create strictly symmetric matrices by loading - // the upper triangle, then adding (transpose-diag) - Ai -= 1; Aj -= 1; MMi -= 1; MMj -= 1; int npk=Np*K; - -#ifdef NDG_USE_CHOLMOD - // pass only the lower triangle - spOP.load(npk,npk, Ai,Aj,Ax, sp_LT,false,1e-15,true); // {LT, false} -> TriL -#else - // pass both upper and lower triangles - spOP.load(npk,npk, Ai,Aj,Ax, sp_LT, true,1e-15,true); // LT -> enforce symmetry -//spOP.load(npk,npk, Ai,Aj,Ax, sp_All,true,1e-15,true); // All-> includes "noise" -#endif - - Ai.Free(); Aj.Free(); Ax.Free(); - - //------------------------------------------------------- - // The mass matrix operator will NOT be factorised, - // only used to build velocity system - // - // VELsystem += (*mm) * (g0/(dt*nu)); - // - // Load ALL elements (both upper and lower triangles): - //------------------------------------------------------- - spMM.load(npk,npk, MMi,MMj,MMx, sp_All,false,1e-15,true); - MMi.Free(); MMj.Free(); MMx.Free(); - - -#if (0) - //####################################################### - // NBN: checking symmetry (A-A')./abs(A) - //####################################################### - // CSd A2 = (spOP-trans(spOP)); A2.droptol(); - // A2.scale(abs(spOP)); - // double d_n = spOP.nonsymmetry(); - // umLOG(1, "\n *** max non-symmetry (scaled): %g ***\n\n", d_n); - // FILE* fp=fopen("errA.dat", "w"); errA.write_ML(fp); fclose(fp); - // umERROR("Nigel", "checking symmetry"); - //####################################################### -#endif - - opti2 = timer.read(); // time assembly - umMSG(1, " ==> {OP,MM} ready. (%g secs)\n", opti2-opti1); - -#if (1) - // check on original estimates for nnx - umMSG(1, " ==> max_OP: %12d\n", max_OP); - umMSG(1, " ==> nnz_OP: %12d\n", entries.hi()); - umMSG(1, " ==> max_MM: %12d\n", max_MM); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDGbc2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDGbc2D.cpp deleted file mode 100644 index 49bca28..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CurvedPoissonIPDGbc2D.cpp +++ /dev/null @@ -1,115 +0,0 @@ -// CurvedPoissonIPDGbc2D.m -// function [OP] = CurvedPoissonIPDGbc2D() -// 2007/09/01 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::CurvedPoissonIPDGbc2D -( - Gauss2D& gauss, // [in] - CSd& spOP // [out] sparse -) -//--------------------------------------------------------- -{ - // function [OP] = CurvedPoissonIPDGbc2D() - // Purpose: Set up the discrete Poisson matrix directly - // using LDG. The operator is set up in the weak form - - NGauss = gauss.NGauss; - - // build DG derivative matrices - int max_OP = (K*Np*Np*(1+Nfaces)); - -#if (1) - //##################################### - // NBN: how many boundary nodes? - //##################################### - max_OP /= 10; -#endif - - // "OP" triplets (i,j,x), extracted to {Ai,Aj,Ax} - IVec OPi(max_OP),OPj(max_OP), Ai,Aj; DVec OPx(max_OP), Ax; - IMat rows1, cols1; Index1D entries, idsM; - DMat VM, dVdxM, dVdyM, DnM; DVec xk1, yk1; - DMat_Diag gnx, gny, gw; DMat OP11(Np,Nfp, 0.0); - int k1=0,f1=0; double hinv=0.0, gtau=0.0; - - // global node numbering - entries.reset(1,Np*NGauss); - cols1 = outer(Ones(Np), Range(1,NGauss)); - - umMSG(1, "\n ==> {OP} assembly [bc]: "); - for (k1=1; k1<=K; ++k1) - { - if (! (k1%100)) { umMSG(1, "%d, ",k1); } - - rows1 = outer(Range((k1-1)*Np+1,k1*Np), Ones(NGauss)); - - // Build element-to-element parts of operator - for (f1=1; f1<=Nfaces; ++f1) - { - if (BCType(k1,f1)) - { - idsM.reset((f1-1)*NGauss+1,f1*NGauss); - VM = gauss.finterp[f1]; - - xk1 = x(All,k1); yk1 = y(All,k1); - PhysDmatrices2D(xk1,yk1,VM, dVdxM,dVdyM); - gnx = gauss.nx(idsM, k1); - gny = gauss.ny(idsM, k1); - gw = gauss.W (idsM, k1); - - DnM = gnx*dVdxM + gny*dVdyM; - hinv = Fscale(1+(f1-1)*Nfp, k1); - //gtau = (100*2*(N+1)*(N+1))*hinv; // set penalty scaling - gtau = ( 5*2*(N+1)*(N+1))*hinv; // set penalty scaling - - switch (BCType(k1,f1)) { - case BC_Dirichlet: OP11 = ( trans(VM)*gw*gtau - trans(DnM)*gw ); break; - case BC_Neuman: OP11 = ( trans(VM)*gw ); break; // recent sign change - default: OP11 = 0.0; // OP11=zeros(Np,Nfp); - } - - OPi(entries)=rows1; OPj(entries)=cols1; OPx(entries)=OP11; - entries += (Np*NGauss); - } - cols1 += NGauss; - } - } - - umMSG(1, "\n ==> {OPbc} to sparse\n"); - entries.reset(1, entries.hi()-(Np*NGauss)); - - // extract triplets from large buffers - Ai=OPi(entries); Aj=OPj(entries); Ax=OPx(entries); - - // These arrays can be HUGE, so force deallocation - OPi.Free(); OPj.Free(); OPx.Free(); - - // return 0-based sparse result - Ai -= 1; Aj -= 1; - - //------------------------------------------------------- - // This operator is not symmetric, and will NOT be - // factorised, only used to create reference RHS's: - // - // refrhsbcPR = spOP1 * bcPR; - // refrhsbcUx = spOP2 * bcUx; - // refrhsbcUy = spOP2 * bcUy; - // - // Load ALL elements (both upper and lower triangles): - //------------------------------------------------------- - spOP.load(Np*K, NGauss*Nfaces*K, Ai,Aj,Ax, sp_All,false, 1e-15,true); - - Ai.Free(); Aj.Free(); Ax.Free(); - umMSG(1, " ==> {OPbc} ready.\n"); - -#if (1) - // check on original estimates for nnx - umMSG(1, " ==> max_OP: %12d\n", max_OP); - umMSG(1, " ==> nnz_OP: %12d\n", entries.hi()); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/CutOffFilter2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/CutOffFilter2D.cpp deleted file mode 100644 index 86e8415..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/CutOffFilter2D.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// CutOffFilter2D.m -// function [F] = CutOffFilter2D(Nc,frac) -// 2007/07/07 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - -//--------------------------------------------------------- -DMat& NDG2D::CutOffFilter2D(int Nc, double frac) -//--------------------------------------------------------- -{ - // function [F] = CutOffFilter2D(Nc,frac) - // Purpose : Initialize 2D cut off filter matrix of order Norderin - - DMat_Diag filterdiag(Np, 1.0); - - // build cut-off filter - int sk = 1; - for (int i=0; i<=N; ++i) { - for (int j=0; j<=(N-i); ++j) { - if ((i+j) >= Nc) { - filterdiag(sk) = frac; - } - ++sk; - } - } - - DMat* F = new DMat("Filter", OBJ_temp); - (*F) = V * filterdiag * invV; - return (*F); -} - - -//--------------------------------------------------------- -void NDG2D::filter_Q(const DMat& filter, DMat& Qio) -//--------------------------------------------------------- -{ - DMat qn; int Nf=Qio.num_cols(); - for (int n=1; n<=Nf; ++n) { - qn.borrow(Np,K, Qio.pCol(n)); // wrap nth field - Qio.set_col(n, filter*qn); // store filtered data - } -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Div2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Div2D.cpp deleted file mode 100644 index 0f6f18d..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Div2D.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Div2D.m -// function [divu] = Div2D(u,v); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - -//--------------------------------------------------------- -void NDG2D::Div2D(const DMat& u, const DMat& v, DMat& divu) -//--------------------------------------------------------- -{ - // function [divu] = Div2D(u,v); - // Purpose: Compute the 2D divergence of the vectorfield (u,v) - - DMat ur=Dr*u, us=Ds*u, vr=Dr*v, vs=Ds*v; - divu = rx.dm(ur) + sx.dm(us) + ry.dm(vr) + sy.dm(vs); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Dmatrices2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Dmatrices2D.cpp deleted file mode 100644 index a4ffa5b..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Dmatrices2D.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// Dmatrices2D.m -// function [Dr,Ds] = Dmatrices2D(N,r,s,V) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -// global version -//--------------------------------------------------------- -void Dmatrices2D -( - int N, // [in] - const DVec& r, // [in] - const DVec& s, // [in] - const DMat& V, // [in] - DMat& Dr, // [out] - DMat& Ds // [out] -) -//--------------------------------------------------------- -{ - // function [Dr,Ds] = Dmatrices2D(N,r,s,V) - // Purpose : Initialize the (r,s) differentiation matrices - // on the simplex, evaluated at (r,s) at order N - - DMat Vr,Vs; GradVandermonde2D(N, r, s, Vr, Vs); - Dr = Vr/V; Ds = Vs/V; -} - - -// member version -//--------------------------------------------------------- -void NDG2D::Dmatrices2D() -//--------------------------------------------------------- -{ - DMat Vr,Vs; GradVandermonde2D(N, r, s, Vr, Vs); - this->Dr = Vr/this->V; - this->Ds = Vs/this->V; -} - - -// member version (cubature) -//--------------------------------------------------------- -void NDG2D::Dmatrices2D(int Nc, Cub2D& cub) -//--------------------------------------------------------- -{ - DMat Vr,Vs; GradVandermonde2D(Nc, cub.r, cub.s, Vr, Vs); - - cub.Dr = Vr/this->V; // cub.dphidr - cub.Ds = Vs/this->V; // cub.dphids - - // store transposes - cub.DrT = trans(cub.Dr); - cub.DsT = trans(cub.Ds); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Filter2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Filter2D.cpp deleted file mode 100644 index 264f942..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Filter2D.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// Filter2D.m -// function [F] = Filter2D(Norder,Nc,sp) -// 2007/07/07 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - -//--------------------------------------------------------- -DMat& NDG2D::Filter2D(int Norder, int Nc, double sp) -//--------------------------------------------------------- -{ - // function [F] = Filter2D(Norder,sp) - // Purpose : Initialize 2D filter matrix of order Norderin - // Order of exponential filter is sp and cutoff Nc - - DMat_Diag filterdiag((Norder+1)*(Norder+2)/2, 1.0); - double alpha = -log(eps); - - // build exponential filter - int sk = 1; - for (int i=0; i<=Norder; ++i) { - for (int j=0; j<=(Norder-i); ++j) { - if ((i+j) >= Nc) { - filterdiag(sk) = exp(-alpha * pow(double(i+j-Nc)/double(Norder-Nc), double(sp))); - } - ++sk; - } - } - - DMat* F = new DMat("Filter", OBJ_temp); - (*F) = V * filterdiag * invV; - return (*F); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/FindLocalCoords2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/FindLocalCoords2D.cpp deleted file mode 100644 index f3d8c11..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/FindLocalCoords2D.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// FindLocalCoords2D.m -// function [rOUT,sOUT] = FindLocalCoords2D(k, xout, yout) -// 2007/07/27 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::FindLocalCoords2D -( - int k, - const DVec& xout, - const DVec& yout, - DVec& rOUT, - DVec& sOUT -) -//--------------------------------------------------------- -{ - // function [rOUT,sOUT] = FindLocalCoords2D(k, xout, yout) - // purpose: find local (r,s) coordinates in the k'th element of given coordinates - // [only works for straight sided triangles] - - DVec xy1(2), xy2(2), xy3(2), xy(2), tmp(2), rhs; - DMat A(2,2); int v1=0, v2=0, v3=0; - - v1=EToV(k,1); v2=EToV(k,2); v3=EToV(k,3); - - xy1(1)=VX(v1); xy1(2)=VY(v1); - xy2(1)=VX(v2); xy2(2)=VY(v2); - xy3(1)=VX(v3); xy3(2)=VY(v3); - - A(All,1) = xy2-xy1; A(All,2) = xy3-xy1; - - int len = xout.size(); - rOUT.resize(len); sOUT.resize(len); - for (int i=1; i<=len; ++i) - { - xy(1)=xout(i); xy(2)=yout(i); - rhs = 2.0*xy - xy2 - xy3; - tmp = A|rhs; - rOUT(i) = tmp(1); - sOUT(i) = tmp(2); - } -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/GaussFaceMesh2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/GaussFaceMesh2D.cpp deleted file mode 100644 index 75096cf..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/GaussFaceMesh2D.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// GaussFaceMesh2D.m -// function gauss = GaussFaceMesh2D(NGauss) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -Gauss2D& NDG2D::GaussFaceMesh2D(int NGauss) -//--------------------------------------------------------- -{ - // function: gauss = GaussFaceMesh2D(NGauss) - // purpose: compute Gauss nodes for face term integration, and interpolation matrices - // Note: m_gauss is a member object of class NDG2D - Gauss2D& gauss = m_gauss; - - // allocate storage for geometric data for each element - gauss.resize(NGauss, K, Nfaces); - - JacobiGQ(0, 0, NGauss-1, gauss.z, gauss.w); - DVec face1r = gauss.z, face2r = -gauss.z, face3r = -ones(NGauss); - DVec face1s = -ones(NGauss), face2s = gauss.z, face3s = -gauss.z; - - DMat V1 = Vandermonde2D(N, face1r, face1s); gauss.finterp[1] = V1*invV; - DMat V2 = Vandermonde2D(N, face2r, face2s); gauss.finterp[2] = V2*invV; - DMat V3 = Vandermonde2D(N, face3r, face3s); gauss.finterp[3] = V3*invV; - - gauss.interp.concat_v(gauss.finterp[1], gauss.finterp[2], gauss.finterp[3]); - // store transpose - gauss.interpT = trans(gauss.interp); - - // correct dimensions of {mapM, mapP} set in resize() - gauss.mapM.range(1, NGauss*Nfaces*K); - gauss.mapP.range(1, NGauss*Nfaces*K); - - DMat dVMdr, dVMds; - DVec xk1, yk1, grx,gsx,gry,gsy,gJ, gnx,gny,gsJ; - int f1=0,f2=0, k1=0,k2=0; IVec mids1, mids2, gmM; - - for (f1=1; f1<=Nfaces; ++f1) - { - const DMat& VM = gauss.finterp[f1]; - dVMdr = VM*Dr; dVMds = VM*Ds; - Index1D ids1((f1-1)*NGauss+1, f1*NGauss); - for (k1=1; k1<=K; ++k1) - { - // calculate geometric factors at Gauss points - xk1 = x.get_col(k1); yk1 = y.get_col(k1); - ::GeometricFactors2D(xk1, yk1, dVMdr, dVMds, grx,gsx,gry,gsy,gJ); - - // compute normals at Gauss points - if (1==f1) { gnx = -gsx; gny = -gsy; } - else if (2==f1) { gnx = grx+gsx; gny = gry+gsy; } - else if (3==f1) { gnx = -grx; gny = -gry; } - - gsJ = sqrt( sqr(gnx) + sqr(gny) ); - gnx /= gsJ; gny /= gsJ; gsJ *= gJ; - - gauss.nx(ids1,k1) = gnx; gauss.ny(ids1,k1) = gny; gauss.sJ(ids1,k1) = gsJ; - gauss.rx(ids1,k1) = grx; gauss.ry(ids1,k1) = gry; gauss.J (ids1,k1) = gJ; - gauss.sx(ids1,k1) = gsx; gauss.sy(ids1,k1) = gsy; - - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - - if (k1!=k2) { - // update maps for non-boundary faces - mids1.range(ids1.lo(), ids1.hi()); // step by +1 - mids2.range(f2*NGauss, (f2-1)*NGauss+1); // step by -1 - gauss.mapP(mids1,k1) = gauss.mapM(mids2,k2); - } else { - // update maps for boundary faces - gmM = gauss.mapM(ids1,k1); - gauss.mapP(ids1,k1)=gmM; gauss.mapB.append(gmM); - // update BC maps - switch (BCType(k1,f1)) { - case BC_In: gauss.mapI.append(gmM); break; - case BC_Out: gauss.mapO.append(gmM); break; - case BC_Wall: gauss.mapW.append(gmM); break; - case BC_Cyl: gauss.mapC.append(gmM); break; - case BC_Dirichlet: gauss.mapD.append(gmM); break; - case BC_Neuman: gauss.mapN.append(gmM); break; - case BC_Slip: gauss.mapS.append(gmM); break; - } - } - } - } - - gauss.x = gauss.interp * this->x; - gauss.y = gauss.interp * this->y; - gauss.W = outer(concat(gauss.w,gauss.w,gauss.w), ones(K)); - gauss.W.mult_element(gauss.sJ); - - return gauss; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/GeometricFactors2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/GeometricFactors2D.cpp deleted file mode 100644 index cc41e28..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/GeometricFactors2D.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// GeometricFactors2D.m -// function [rx,sx,ry,sy,J] = GeometricFactors2D(x,y,Dr,Ds) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -// overloaded global version: matrix args -//--------------------------------------------------------- -void GeometricFactors2D -( - const DMat& x, const DMat& y, - const DMat& Dr, const DMat& Ds, - DMat& rx, DMat& sx, - DMat& ry, DMat& sy, - DMat& J -) -//--------------------------------------------------------- -{ - // function [rx,sx,ry,sy,J] = GeometricFactors2D(x,y,Dr,Ds) - // Purpose : Compute the metric elements for the local - // mappings of the elements - - // Calculate geometric factors - DMat xr=Dr*x, xs=Ds*x, yr=Dr*y, ys=Ds*y; - J = xr.dm(ys) - xs.dm(yr); - rx = ys.dd(J); sx = -yr.dd(J); ry = -xs.dd(J); sy = xr.dd(J); -} - - -// overloaded global version: vector args -//--------------------------------------------------------- -void GeometricFactors2D -( - const DVec& x, const DVec& y, - const DMat& Dr, const DMat& Ds, - DVec& rx, DVec& sx, - DVec& ry, DVec& sy, - DVec& J -) -//--------------------------------------------------------- -{ - // function [rx,sx,ry,sy,J] = GeometricFactors2D(x,y,Dr,Ds) - // Purpose : Compute the metric elements for the local - // mappings of the elements - - // Calculate geometric factors - DVec xr=Dr*x, xs=Ds*x, yr=Dr*y, ys=Ds*y; - J = xr.dm(ys) - xs.dm(yr); - rx = ys.dd(J); sx = -yr.dd(J); ry = -xs.dd(J); sy = xr.dd(J); -} - - -// member version -//--------------------------------------------------------- -void NDG2D::GeometricFactors2D() -//--------------------------------------------------------- -{ - // Calculate geometric factors - DMat xr=Dr*x, xs=Ds*x, yr=Dr*y, ys=Ds*y; - J = xr.dm(ys) - xs.dm(yr); - rx = ys.dd(J); sx = -yr.dd(J); ry = -xs.dd(J); sy = xr.dd(J); -} - - -// member version (cubature) -//--------------------------------------------------------- -void NDG2D::GeometricFactors2D(Cub2D& cub) -//--------------------------------------------------------- -{ - // Calculate geometric factors - DMat xr = cub.Dr*this->x, xs = cub.Ds*this->x, - yr = cub.Dr*this->y, ys = cub.Ds*this->y; - - cub.J = xr.dm(ys) - xs.dm(yr); - cub.rx = ys.dd(cub.J); cub.sx = -yr.dd(cub.J); - cub.ry = -xs.dd(cub.J); cub.sy = xr.dd(cub.J); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Globals2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Globals2D.cpp deleted file mode 100644 index c67d66c..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Globals2D.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// Globals2D.cpp -// -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Globals2D.h" - - -//--------------------------------------------------------- -Globals2D::Globals2D() -//--------------------------------------------------------- -: - //------------------------------------- - // initialize member data - //------------------------------------- - Np(0), Nfp(0), N(0), K(0), Nfaces(3), - NODETOL(1e-12), - r("r"), s("s"), - Dr("Dr"), Ds("Ds"), LIFT("LIFT"), Drw("Drw"), Dsw("Dsw"), MassMatrix("MassMatrix"), - Fx("Fx"), Fy("Fy"), nx("nx"), ny("ny"), jac("jac"), Fscale("Fscale"), - vmapB("vmapB"), mapB("mapB"), Fmask("Fmask"), BCType("BCType"), saveBCType("saveBCType"), - mapI( "mapI"), mapO( "mapO"), mapW( "mapW"), mapF( "mapF"), mapC( "mapC"), mapS( "mapS"), mapM( "mapM"), mapP( "mapP"), mapD( "mapD"), mapN( "mapN"), - vmapI("vmapI"), vmapO("vmapO"), vmapW("vmapW"), vmapF("vmapF"), vmapC("vmapC"), vmapS("vmapS"), vmapM("vmapM"), vmapP("vmapP"), vmapD("vmapD"), vmapN("vmapN"), - rx("rx"), ry("ry"), sx("sx"), sy("sy"), J("J"), sJ("sJ"), - rk4a("rk4a"), rk4b("rk4b"), rk4c("rk4c"), - EToE("EToE"), EToF("EToF"), EToV("EToV"), - V("V"), invV("invV"), VVT("VVT"), - VX("VX"), VY("VY"), VZ("VZ"), x("x"), y("y"), z("z"), - - // +NBN: added - materialVals("materialVals"), epsilon("epsilon"), - tstep(0), Nsteps(0), - dt(0.001), time(0.0), FinalTime(0.0), RKtime(0.0), - pi(M_PI), eps(2.2204e-16), // NBN: Matlab @ AMD64 - Xmin(0.0), Xmax(0.0), Ymin(0.0), Ymax(0.0), Zmin(0.0), Zmax(0.0), - Nv(0), Nmats(0), Nbcs(0), Nsd(0), - bIs3D(false), bCoord3D(false), bElement3D(false) - //------------------------------------------------------- -{ - init(); -} - - -//--------------------------------------------------------- -Globals2D::~Globals2D() -//--------------------------------------------------------- -{} - - -//--------------------------------------------------------- -void Globals2D::init() -//--------------------------------------------------------- -{ - pi = 4.0*atan(1.0); // set pi to machine precision - eps = 2.2204e-16; // match 32-bit Matlab on AMD64 - - rk4a.resize(5); - rk4b.resize(5); - rk4c.resize(6); - - // Low storage Runge-Kutta coefficients - rk4a(1) = 0.0; - rk4a(2) = -567301805773.0 / 1357537059087.0; - rk4a(3) = -2404267990393.0 / 2016746695238.0; - rk4a(4) = -3550918686646.0 / 2091501179385.0; - rk4a(5) = -1275806237668.0 / 842570457699.0; - - rk4b(1) = 1432997174477.0 / 9575080441755.0; - rk4b(2) = 5161836677717.0 / 13612068292357.0; - rk4b(3) = 1720146321549.0 / 2090206949498.0; - rk4b(4) = 3134564353537.0 / 4481467310338.0; - rk4b(5) = 2277821191437.0 / 14882151754819.0; - - rk4c(1) = 0.0; - rk4c(2) = 1432997174477.0 / 9575080441755.0; - rk4c(3) = 2526269341429.0 / 6820363962896.0; - rk4c(4) = 2006345519317.0 / 3224310063776.0; - rk4c(5) = 2802321613138.0 / 2924317926251.0; - rk4c(6) = 1.0; -} - - -//--------------------------------------------------------- -void Globals2D::reset() -//--------------------------------------------------------- -{} - - -//--------------------------------------------------------- -void Globals2D::clear() -//--------------------------------------------------------- -{} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Grad2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Grad2D.cpp deleted file mode 100644 index 62ef613..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Grad2D.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// Grad2D.m -// function [ux,uy] = Grad2D(u); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::Grad2D -( - const DMat& u, // [in] - DMat& ux, // [out] - DMat& uy // [out] -) -//--------------------------------------------------------- -{ - // function [ux,uy] = Grad2D(u); - // Purpose: Compute 2D gradient field of scalar u - - DVec ur = Dr*u, us = Ds*u; - ux = rx.dm(ur) + sx.dm(us); uy = ry.dm(ur) + sy.dm(us); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/GradSimplex2DP.cpp b/cpp/nudg++/trunk/Src/Codes2D/GradSimplex2DP.cpp deleted file mode 100644 index a42c877..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/GradSimplex2DP.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// GradSimplex2DP.cpp -// function [dmodedr, dmodeds] = GradSimplex2DP(a,b,id,jd) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void GradSimplex2DP -( - const DVec& a, // [in] - const DVec& b, // [in] - int id, // [in] - int jd, // [in] - DVec& dmodedr, // [out] - DVec& dmodeds // [out] -) -//--------------------------------------------------------- -{ - // function [dmodedr, dmodeds] = GradSimplex2DP(a,b,id,jd) - // Purpose: Return the derivatives of the modal basis (id,jd) - // on the 2D simplex at (a,b). - - DVec fa, dfa, gb, dgb, tmp; - - fa = JacobiP(a, 0, 0, id); dfa = GradJacobiP(a, 0, 0, id); - gb = JacobiP(b, 2*id+1,0, jd); dgb = GradJacobiP(b, 2*id+1,0, jd); - - // r-derivative - // d/dr = da/dr d/da + db/dr d/db = (2/(1-s)) d/da = (2/(1-b)) d/da - dmodedr = dfa.dm(gb); - if (id>0) { - dmodedr *= pow(0.5*(1.0-b), (id-1.0)); - } - - // s-derivative - // d/ds = ((1+a)/2)/((1-b)/2) d/da + d/db - dmodeds = dfa.dm(gb.dm(0.5*(1.0+a))); - if (id>0) { - dmodeds *= pow(0.5*(1.0-b), (id-1.0)); - } - - tmp = dgb.dm(pow(0.5*(1.0-b), double(id))); - if (id>0) { - tmp -= (0.5*id)*gb.dm(pow(0.5*(1.0-b), (id-1.0))); - } - dmodeds += fa.dm(tmp); - - // Normalize - dmodedr *= pow(2.0, (id+0.5)); dmodeds *= pow(2.0, (id+0.5)); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/GradVandermonde2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/GradVandermonde2D.cpp deleted file mode 100644 index e369a17..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/GradVandermonde2D.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// GradVandermonde2D.m -// function [V2Dr,V2Ds] = GradVandermonde2D(N,r,s) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void GradVandermonde2D -( - int N, // [in] - const DVec& r, // [in] - const DVec& s, // [in] - DMat& V2Dr, // [out] - DMat& V2Ds // [out] -) -//--------------------------------------------------------- -{ - // function [V2Dr,V2Ds] = GradVandermonde2D(N,r,s) - // Purpose : Initialize the gradient of the modal basis (i,j) - // at (r,s) at order N - - DVec a,b, ddr,dds; - V2Dr.resize(r.size(), (N+1)*(N+2)/2); - V2Ds.resize(r.size(), (N+1)*(N+2)/2); - - // find tensor-product coordinates - rstoab(r,s, a,b); - - // Initialize matrices - int sk = 1; - for (int i=0; i<=N; ++i) { - for (int j=0; j<=(N-i); ++j) { - GradSimplex2DP(a,b,i,j, ddr,dds); - V2Dr(All,sk)=ddr; V2Ds(All,sk)=dds; - ++sk; - } - } -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Hrefine2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Hrefine2D.cpp deleted file mode 100644 index 2b0dc10..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Hrefine2D.cpp +++ /dev/null @@ -1,98 +0,0 @@ -// Hrefine2D.cpp -// function Hrefine2D(refineflag) -// 2007/07/31 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::Hrefine2D(IVec& refineflag) -//--------------------------------------------------------- -{ - // function Hrefine2D(refineflag) - // purpose: apply non-conforming refinement to the set - // of elements labelled in refineflag - - IVec v1,v2,v3, v4,v5,v6, tv4,tv5,tv6, ids,newids; - IMat mv1,mv2,mv3; DVec x1,x2,x3, y1,y2,y3; - - // 1.1 Count vertices - int Nv = VX.length(); - - // 1.2 Find and count elements to be refined - IVec ref = sort(find(refineflag, '!', 0), true); - int Nrefine = ref.length(); - - // 1.3 Extract vertex numbers of elements to refine - // NBN: extract "Region2D" as IMat, then convert to IVec - mv1 = EToV(ref,1); mv2 = EToV(ref,2); mv3 = EToV(ref,3); - v1 = mv1; v2 = mv2; v3 = mv3; - - IVec range0 = Nfaces*Range(0, K-1); - - // 1.4 Uniquely number all face centers - v4 = max( 1+range0, EToF.get_col(1)+Nfaces*(EToE.get_col(1)-1) ); - v5 = max( 2+range0, EToF.get_col(2)+Nfaces*(EToE.get_col(2)-1) ); - v6 = max( 3+range0, EToF.get_col(3)+Nfaces*(EToE.get_col(3)-1) ); - - // 2.0 Extract face center vertices for elements to refine - tv4 = v4(ref); tv5 = v5(ref); tv6 = v6(ref); - - // 2.1 Renumber face centers contiguously from Nv+1 - ids = unique(concat(tv4,tv5,tv6)); - newids.resize(ids.max_val()); - newids(ids) = Range(1,ids.length()); - v4=Nv+newids(tv4); v5=Nv+newids(tv5); v6=Nv+newids(tv6); - - // 2.2 Replace original triangle with triangle connecting edge centers -//EToV(ref,All) = [v4,v5,v6]; - EToV(ref,1)=v4.data(); - EToV(ref,2)=v5.data(); - EToV(ref,3)=v6.data(); - - IVec v1v2v3 = concat(v1,v2,v3), - v4v5v6 = concat(v4,v5,v6), - v6v4v5 = concat(v6,v4,v5); - - // 3.0 Add extra triangles to EToV - IVec newR = Range(K+1,K+3*Nrefine); - EToV.realloc(K+3*Nrefine, 3); - - EToV(newR,1) = v1v2v3.data(); // 1st vertices of new elements - EToV(newR,2) = v4v5v6.data(); // 2nd vertices of new elements - EToV(newR,3) = v6v4v5.data(); // 3rd vertices of new elements - - // 3.1 Create boundary condition type for refined elements - IMat bcsave = BCType(ref,All); - BCType(ref, All) = 0; // now internal faces - - // set index ranges - Index1D I1(K+1,K+Nrefine), I2(K+Nrefine+1,K+2*Nrefine), I3(K+2*Nrefine+1,K+3*Nrefine); - - // extend BCType to store faces for new elements - BCType.realloc(K+3*Nrefine, 3); - - BCType(I1, 1) = bcsave(All, 1); - BCType(I1, 3) = bcsave(All, 3); - - BCType(I2, 1) = bcsave(All, 2); - BCType(I2, 3) = bcsave(All, 1); - - BCType(I3, 1) = bcsave(All, 3); - BCType(I3, 3) = bcsave(All, 2); - - // 3.2 Find vertex locations of elements to be refined - x1 = VX(v1); x2 = VX(v2); x3 = VX(v3); - y1 = VY(v1); y2 = VY(v2); y3 = VY(v3); - - // extend {VX,VY} to store new vertices - int max_vid=EToV.max_val(); VX.realloc(max_vid); VY.realloc(max_vid); - - // 3.3 Add coordinates for refined edge centers - VX(v4) = 0.5*(x1+x2); VX(v5) = 0.5*(x2+x3); VX(v6) = 0.5*(x3+x1); - VY(v4) = 0.5*(y1+y2); VY(v5) = 0.5*(y2+y3); VY(v6) = 0.5*(y3+y1); - - // 3.4 Increase element count - K = K+3*Nrefine; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/InterpMatrix2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/InterpMatrix2D.cpp deleted file mode 100644 index 55732dd..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/InterpMatrix2D.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// InterpMatrix2D.m -// function [IM] = InterpMatrix2D(rout, sout) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -DMat& NDG2D::InterpMatrix2D(const DVec& rout, const DVec& sout) -//--------------------------------------------------------- -{ - // function [IM] = InterpMatrix2D(rout, sout) - // purpose: compute local elemental interpolation matrix - - DMat *IM = new DMat("IM", OBJ_temp), Vout; - - // compute Vandermonde at (rout,sout) - Vout = Vandermonde2D(N, rout, sout); - - // build interpolation matrix - (*IM) = Vout * this->invV; - return (*IM); -} - - -//--------------------------------------------------------- -void NDG2D::InterpMatrix2D(Cub2D& cub) -//--------------------------------------------------------- -{ - // compute Vandermonde at (rout,sout) - DMat Vout = Vandermonde2D(this->N, cub.r, cub.s); - - // build interpolation matrix - cub.V = Vout * this->invV; - - // store transpose - cub.VT = trans(cub.V); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Lift2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Lift2D.cpp deleted file mode 100644 index a80159e..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Lift2D.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// Lift2D.m -// function [LIFT] = Lift2D() -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -DMat& NDG2D::Lift2D() -//--------------------------------------------------------- -{ - // function [LIFT] = Lift2D() - // Purpose : Compute surface to volume lift term for DG formulation - - DMat V1D,massEdge1,massEdge2,massEdge3; DVec faceR,faceS; - Index1D J1(1,Nfp), J2(Nfp+1,2*Nfp), J3(2*Nfp+1,3*Nfp); - - DMat Emat(Np, Nfaces*Nfp); - - // face 1 - faceR = r(Fmask(All,1)); - V1D = Vandermonde1D(N, faceR); - massEdge1 = inv(V1D*trans(V1D)); - Emat(Fmask(All,1), J1) = massEdge1; - - // face 2 - faceR = r(Fmask(All,2)); - V1D = Vandermonde1D(N, faceR); - massEdge2 = inv(V1D*trans(V1D)); - Emat(Fmask(All,2), J2) = massEdge2; - - // face 3 - faceS = s(Fmask(All,3)); - V1D = Vandermonde1D(N, faceS); - massEdge3 = inv(V1D*trans(V1D)); - Emat(Fmask(All,3), J3) = massEdge3; - - // inv(mass matrix)*\I_n (L_i,L_j)_{edge_n} - LIFT = V*(trans(V)*Emat); - return LIFT; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.cpp deleted file mode 100644 index 77f4c7e..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.cpp +++ /dev/null @@ -1,128 +0,0 @@ -// MakeCylinder2D.m -// function MakeCylinder2D(faces, ra,xo,yo) -// 2007/10/16 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::MakeCylinder2D -( - const IMat& faces, - double ra, - double xo, - double yo -) -//--------------------------------------------------------- -{ - // Function: MakeCylinder2D(faces, ra, xo, yo) - // Purpose: Use Gordon-Hall blending with an isoparametric - // map to modify a list of faces so they conform - // to a cylinder of radius r centered at (xo,yo) - - int NCurveFaces = faces.num_rows(); - IVec vflag(VX.size()); IMat VFlag(EToV.num_rows(),EToV.num_cols()); - int n=0,k=0,f=0,v1=0,v2=0; - double theta1=0.0,theta2=0.0,x1=0.0,x2=0.0,y1=0.0,y2=0.0; - double newx1=0.0,newx2=0.0,newy1=0.0,newy2=0.0; - DVec vr, fr, theta, fdx,fdy, vdx, vdy, blend,numer,denom; - IVec va,vb,vc, ks, Fm_f, ids; DMat Vface, Vvol; - - for (n=1; n<=NCurveFaces; ++n) - { - // move vertices of faces to be curved onto circle - k = faces(n,1); f = faces(n,2); - v1 = EToV(k, f); v2 = EToV(k, umMOD(f,Nfaces)+1); - theta1 = atan2(VY(v1),VX(v1)); theta2 = atan2(VY(v2),VX(v2)); - newx1 = xo + ra*cos(theta1); newy1 = yo + ra*sin(theta1); - newx2 = xo + ra*cos(theta2); newy2 = yo + ra*sin(theta2); - - // update mesh vertex locations - VX(v1) = newx1; VX(v2) = newx2; VY(v1) = newy1; VY(v2) = newy2; - - // store modified vertex numbers - vflag(v1) = 1; vflag(v2) = 1; - } - - // map modified vertex flag to each element -//vflag = vflag(EToV); - VFlag.set_map(EToV, vflag); // (map, values) - - // locate elements with at least one modified vertex -//ks = find(sum(vflag,2)>0); - ks = find(VFlag.row_sums(), '>', 0); - - // build coordinates of all the corrected nodes - IMat VA=EToV(ks,1), VB=EToV(ks,2), VC=EToV(ks,3); - - // FIXME: loading 2D mapped data into 1D vectors - int Nr=VA.num_rows(); - va.copy(Nr,VA.data()); - vb.copy(Nr,VB.data()); - vc.copy(Nr,VC.data()); - - // Note: outer products of (Vector,MappedRegion1D) - x(All,ks) = 0.5*(-(r+s)*VX(va)+(1.0+r)*VX(vb)+(1.0+s)*VX(vc)); - y(All,ks) = 0.5*(-(r+s)*VY(va)+(1.0+r)*VY(vb)+(1.0+s)*VY(vc)); - - // deform specified faces - for (n=1; n<=NCurveFaces; ++n) - { - k = faces(n,1); f = faces(n,2); - - // find vertex locations for this face and tangential coordinate - if (f==1) { v1=EToV(k,1); v2=EToV(k,2); vr=r; } - else if (f==2) { v1=EToV(k,2); v2=EToV(k,3); vr=s; } - else if (f==3) { v1=EToV(k,1); v2=EToV(k,3); vr=s; } - - fr = vr(Fmask(All,f)); - x1 = VX(v1); y1 = VY(v1); x2 = VX(v2); y2 = VY(v2); - - // move vertices at end points of this face to the cylinder - theta1 = atan2(y1-yo, x1-xo); theta2 = atan2(y2-yo, x2-xo); - - // check to make sure they are in the same quadrant - if ((theta2 > 0.0) && (theta1 < 0.0)) { theta1 += 2*pi; } - if ((theta1 > 0.0) && (theta2 < 0.0)) { theta2 += 2*pi; } - - // distribute N+1 nodes by arc-length along edge - theta = 0.5*theta1*(1.0-fr) + 0.5*theta2*(1.0+fr); - - // evaluate deformation of coordinates - fdx = xo + ra*apply(cos,theta) - x(Fmask(All,f),k); - fdy = yo + ra*apply(sin,theta) - y(Fmask(All,f),k); - - // build 1D Vandermonde matrix for face nodes and volume nodes - Vface = Vandermonde1D(N, fr); Vvol = Vandermonde1D(N, vr); - - // compute unblended volume deformations - vdx = Vvol * (Vface|fdx); vdy = Vvol * (Vface|fdy); - - // blend deformation and increment node coordinates - ids = find(abs(1.0-vr), '>', 1e-7); // warp and blend - - denom = 1.0-vr(ids); - if (1==f) { numer = -(r(ids)+s(ids)); } - else if (2==f) { numer = (r(ids)+1.0 ); } - else if (3==f) { numer = -(r(ids)+s(ids)); } - blend = numer.dd(denom); - - //----------------------------------- - // x(ids,k) += blend.dm(vdx(ids)); // VC++ compiler specific? - // y(ids,k) += blend.dm(vdy(ids)); - //----------------------------------- - // unroll the above operator - int Nr = ids.size(), id=0; - for (int m=1; m<=Nr; ++m) { - id=ids(m); - x(id,k) += blend(m)*vdx(id); - y(id,k) += blend(m)*vdy(id); - } - } - - // repair other coordinate dependent information - Fx = x(Fmask, All); Fy = y(Fmask, All); - ::GeometricFactors2D(x,y,Dr,Ds, rx,sx,ry,sy,J); - Normals2D(); Fscale = sJ.dd(J(Fmask,All)); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.new.cpp b/cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.new.cpp deleted file mode 100644 index f3afc81..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/MakeCylinder2D.new.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// MakeCylinder2D.m -// function MakeCylinder2D(faces, ra,xo,yo) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::MakeCylinder2D -( - const IMat& faces, - double ra, - double xo, - double yo -) -//--------------------------------------------------------- -{ - // Function: MakeCylinder2D(faces, ra, xo, yo) - // Purpose: Use Gordon-Hall blending with an isoparametric - // map to modify a list of faces so they conform - // to a cylinder of radius r centered at (xo,yo) - - int NCurveFaces = faces.num_rows(); - IVec vflag(VX.size()); IMat VFlag(EToV.num_rows(),EToV.num_cols()); - int n=0,k=0,f=0,v1=0,v2=0; - double theta1=0.0,theta2=0.0,x1=0.0,x2=0.0,y1=0.0,y2=0.0; - double newx1=0.0,newx2=0.0,newy1=0.0,newy2=0.0; - DVec vr, fr, theta, fdx,fdy, vdx, vdy, blend,numer,denom; - IVec va,vb,vc, ks, Fm_f, ids; DMat Vface, Vvol; - - for (n=1; n<=NCurveFaces; ++n) - { - // move vertices of faces to be curved onto circle - k = faces(n,1); f = faces(n,2); - v1 = EToV(k, f); v2 = EToV(k, umMOD(f,Nfaces)+1); - theta1 = atan2(VY(v1),VX(v1)); theta2 = atan2(VY(v2),VX(v2)); - newx1 = xo + ra*cos(theta1); newy1 = yo + ra*sin(theta1); - newx2 = xo + ra*cos(theta2); newy2 = yo + ra*sin(theta2); - - // update mesh vertex locations - VX(v1) = newx1; VX(v2) = newx2; VY(v1) = newy1; VY(v2) = newy2; - - // store modified vertex numbers - vflag(v1) = 1; vflag(v2) = 1; - } - - // map modified vertex flag to each element -//vflag = vflag(EToV); - VFlag.resize(EToV); - VFlag.set_map(EToV, vflag); // (map, values) - - // locate elements with at least one modified vertex -//ks = find(sum(vflag,2)>0); - ks = find(VFlag.row_sums(), '>', 0); - - // build coordinates of all the corrected nodes - IMat VA=EToV(ks,1), VB=EToV(ks,2), VC=EToV(ks,3); - - // FIXME: loading 2D mapped data into 1D vectors - int Nr=VA.num_rows(); - va.copy(Nr,VA.data()); - vb.copy(Nr,VB.data()); - vc.copy(Nr,VC.data()); - - // Note: outer products of (Vector,MappedRegion1D) - x(All,ks) = 0.5*(-(r+s)*VX(va)+(1.0+r)*VX(vb)+(1.0+s)*VX(vc)); - y(All,ks) = 0.5*(-(r+s)*VY(va)+(1.0+r)*VY(vb)+(1.0+s)*VY(vc)); - - // deform specified faces - for (n=1; n<=NCurveFaces; ++n) - { - k = faces(n,1); f = faces(n,2); - - // find vertex locations for this face and tangential coordinate - if (f==1) { v1=EToV(k,1); v2=EToV(k,2); vr=r; } - else if (f==2) { v1=EToV(k,2); v2=EToV(k,3); vr=s; } - else if (f==3) { v1=EToV(k,1); v2=EToV(k,3); vr=s; } - - fr = vr(Fmask(All,f)); - x1 = VX(v1); y1 = VY(v1); x2 = VX(v2); y2 = VY(v2); - - // move vertices at end points of this face to the cylinder - theta1 = atan2(y1-yo, x1-xo); theta2 = atan2(y2-yo, x2-xo); - - // check to make sure they are in the same quadrant - if ((theta2 > 0.0) && (theta1 < 0.0)) { theta1 += 2*pi; } - if ((theta1 > 0.0) && (theta2 < 0.0)) { theta2 += 2*pi; } - - // distribute N+1 nodes by arc-length along edge - theta = 0.5*theta1*(1.0-fr) + 0.5*theta2*(1.0+fr); - - // evaluate deformation of coordinates - fdx = xo + ra*apply(cos,theta) - x(Fmask(All,f),k); - fdy = yo + ra*apply(sin,theta) - y(Fmask(All,f),k); - - // build 1D Vandermonde matrix for face nodes and volume nodes - Vface = Vandermonde1D(N, fr); Vvol = Vandermonde1D(N, vr); - - // compute unblended volume deformations - vdx = Vvol * (Vface|fdx); vdy = Vvol * (Vface|fdy); - - // blend deformation and increment node coordinates - ids = find(abs(1.0-vr), '>', 1e-7); // warp and blend - - denom = 1.0-vr(ids); - if (1==f) { numer = -(r(ids)+s(ids)); } - else if (2==f) { numer = (r(ids)+1.0 ); } - else if (3==f) { numer = -(r(ids)+s(ids)); } - blend = numer.dd(denom); - - x(ids,k) += (blend.dm(vdx(ids))); - y(ids,k) += (blend.dm(vdy(ids))); - } - - // repair other coordinate dependent information - Fx = x(Fmask, All); Fy = y(Fmask, All); - ::GeometricFactors2D(x,y,Dr,Ds, rx,sx,ry,sy,J); - Normals2D(); Fscale = sJ.dd(J(Fmask,All)); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/NDG2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/NDG2D.cpp deleted file mode 100644 index e65f216..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/NDG2D.cpp +++ /dev/null @@ -1,269 +0,0 @@ -// NDG2D.cpp -// -// 2007/07/03 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" -#include "VecSort_Type.h" - -NDG2D* g_D2 = NULL; // global pointer - -int NDG2D::N2Dobjects=0; // static counter -int NDG2D::PlotNumber=0; // accumulate plot count -double NDG2D::TotalSimTime=0.0; // accumulate sim time - -//--------------------------------------------------------- -NDG2D::NDG2D() -//--------------------------------------------------------- -: - //------------------------------------- - // initialize member data - //------------------------------------- - ti0(0.0), ti1(0.0) - -{ - ++N2Dobjects; // track allocation of NDG2D objects - timer.start(); // initialize the timer - g_D2 = this; // set global simulation pointer - - // useful totals - m_Np_K=0; - m_Nfp_Nfaces_K=0; - m_Nfp_Nfaces=0; - m_Np_Nfields=0; - - // reporting parameters - Nreport = 10; // frequency of reporting - Nrender = 10; // frequency of rendering - Nplotfield = 1; // selected field to plot - NvtkInterp = 6; // Vtk interpolation order - - // boolean flags - m_bMenuLoaded = false; - m_bStationary = false; - m_bHasAnalyticSol = false; - m_bArgsSet = false; - m_bSummaryShown = false; - m_bHeaderShown = false; - m_bContinue = true; - m_bUserStop = false; - m_bDoTest = false; - m_bUseAMR = false; - m_bAdapted = false; - m_bApplyFilter = false; - - // get machine precision for relative tol. tests - m_eps = 1e-12; - double tol1 = 1.0 + m_eps; - while (tol1 > 1.0) { - m_eps = 0.5*m_eps; - tol1 = 1.0 + m_eps; - } - - // default: no h-refinement of mesh - Nrefine = 0; refine_count = 0; - - // only valid if this->HasAnalyticSol(); - m_maxAbsError = -9.9e9; - - class_name = "NDG2DSim"; - umTRC(3, "Created NDG2D object (no. %d) \n", N2Dobjects); -} - - -//--------------------------------------------------------- -NDG2D::~NDG2D() -//--------------------------------------------------------- -{ - timer.stop(); // finished timing - --N2Dobjects; // decrement count of 2D simulators - - if (g_D2 == this) { - // invalidate global pointer - g_D2 = NULL; - } - - umTRC(3, "Deleted NDG2D object (%d remain).\n", N2Dobjects); -} - - -//--------------------------------------------------------- -void NDG2D::InitRun() -//--------------------------------------------------------- -{ - // perform any initializations that should - // be done between multiple runs: - - time = 0.0; // reset time - RKtime = 0.0; // reset RKtime - tstep = 1; // reset current step -//Nsteps = 0; // reset number of steps -//Nreport = 2; // set frequency of reporting (param) -//Nreport = 5; // set frequency of reporting (param) - Nreport = 20; // set frequency of reporting (param) -//Nreport = 1000; // no reports when timing - Nrender = Nreport; // output frequency (param) - - // reset time counters - ti0 = ti1 = 0.0; - time_rhs = 0.0; - time_rhs_c = 0.0; - time_flux = 0.0; - time_upw = 0.0; - time_bc = 0.0; - time_source = 0.0; - time_iter = 0.0; - time_limit = 0.0; - time_work = 0.0; - time_total = 0.0; -} - - -//--------------------------------------------------------- -void NDG2D::Summary() -//--------------------------------------------------------- -{ - if (m_bSummaryShown) { - return; - } - - //------------------------------------- - // default summary of current simulator - //------------------------------------- - umLOG(1, "\nNuDG++ 2D simulation:\n" - " Model type = %s\n" - " Order (N) = %d\n" - " Np = %d\n" - " K = %d\n" - " FileName = %s\n" - " report freq = %d\n" - " render freq = %d\n" - " plot field = %d\n" - " Vtk interp = %d\n", - this->GetClassName(), this->N, this->Np, - this->K, GetMeshFileName(), - Nreport, Nrender, Nplotfield, NvtkInterp); - - if (this->Stationary()) { - umLOG(1, " Stationary = true\n\n"); - } else { - umLOG(1, " Finaltime = %0.2g\n" - " time-step = %0.5g (inital dt)\n" - " num. steps = %d\n\n\n", - this->FinalTime, this->dt, this->Nsteps); - } - - m_bSummaryShown = true; -} - - -//--------------------------------------------------------- -void NDG2D::Report(bool bForce) -//--------------------------------------------------------- -{} - -//--------------------------------------------------------- -void NDG2D::FinalReport() -//--------------------------------------------------------- -{} - - -//--------------------------------------------------------- -double NDG2D::GetAnalyticError() -//--------------------------------------------------------- -{ - // only valid if this->HasAnalyticSol(); - return m_maxAbsError; -} - - -//--------------------------------------------------------- -void NDG2D::AdjustCylBC -( - double radius, // radius - double Cx, // center x - double Cy, // center y - int bc, // select boundary faces - bool toWall // convert faces to BC_Wall? - -) -//--------------------------------------------------------- -{ - // Adjust elements with faces on circular boundaries so that - // their nodes lie precisely on the circle of given radius. - // - // Note that this routine accommodates multiple circular - // boundaries, but that each distinct circle must have a - // distinct boundary condition. Sets of curved elements - // are extracted in temp vector "curvedBC" and accumulated - // in member array "curved". - - // store original BC data (assumes 1 call to "AdjustCylBC") - // TODO: adjust for multiple circular boundaries (e.g. Couette) - saveBCType = BCType; - - IMat cylfaces; - if (BC_All == bc) { - // faces marked with any boundary condition - cylfaces = find2D(BCType, '>', (int)BC_None); - } else { - // faces marked with selected bc - cylfaces = find2D(BCType, '=', bc); - } - if (cylfaces.num_rows()>0) - { - //##################################################### - // FIXME: accommodate multiple circular boundaries - // curved.append(curvedBC) - // straight.append(straightBC) - //##################################################### - - IVec k=cylfaces(All,1); // elem indices - //IVec f=cylfaces(All,2); // face indices - IVec curvedBC = sort(k,true); // curved elements on this boundary - - MakeCylinder2D(cylfaces, radius, Cx, Cy); - if (toWall) { - // turn cylinders into walls - IVec ids = find(BCType, '=', (int)BC_Cyl); - BCType(ids) = BC_Wall; - } - - // accumlate sets of curved boundaries - curved.append(curvedBC); - if (curved.size() > curvedBC.size()) { - curved = sort(curved,true); - } - - straight = setdiff( Range(1,K), curved ); - } - - else - { - if (curved.size() > 0) - { - umERROR("NDG2D::AdjustCylBC", ""); - straight = setdiff( Range(1,K), curved ); - } - straight.range(1,K); - curved.resize(0); - } - -} - - -//--------------------------------------------------------- -void NDG2D::CalcElemCentroids(DMat& centroid) -//--------------------------------------------------------- -{ - // Calculate element centroids for volume, face nodes - centroid.resize (K, 2); - double x1,x2,x3, y1,y2,y3; - for (int k=1; k<=K; ++k) { - x1 = this->VX(EToV(k,1)); x2 = this->VX(EToV(k,2)); x3 = this->VX(EToV(k,3)); - y1 = this->VY(EToV(k,1)); y2 = this->VY(EToV(k,2)); y3 = this->VY(EToV(k,3)); - // assign a centroid for element k - centroid(k,1) = (x1+x2+x3)/3.0; - centroid(k,2) = (y1+y2+y3)/3.0; - } -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/NDG2DDriver.cpp b/cpp/nudg++/trunk/Src/Codes2D/NDG2DDriver.cpp deleted file mode 100644 index 40a43fc..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/NDG2DDriver.cpp +++ /dev/null @@ -1,91 +0,0 @@ -// NDG2DDriver.cpp -// -// 2007/07/25 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -// declare available simulators -#include "Maxwell2D.h" -#include "MaxwellCurved2D.h" -#include "MaxwellNonCon2D.h" -#include "ARBCplane2D.h" // Maxwell ARBC - -#include "CurvedEuler2D.h" -#include "CurvedINS2D.h" -#include "CurvedCNS2D.h" - -#include "EulerShock2D.h" -//#include "PDEWiz2D.h" -//#include "ShockBubble.h" -//#include "Euler2D.h" - - -//--------------------------------------------------------- -void NDG2DDriver(int Nsim) -//--------------------------------------------------------- -{ -//Nsim = 1; // Maxwell2D -//Nsim = 2; // MaxwellCurved2D -//Nsim = 3; // MaxwellNonCon2D - Nsim = 4; // Maxwell-ARBC:plane2D *** -//Nsim = 5; // CurvedEuler2D -//Nsim = 6; // CurvedINS2D -//Nsim = 7; // CurvedCNS2D -//Nsim = 8; // EulerShock2D -//Nsim = 11; // PDEWiz - - NDG2D* p=NULL; - -#if (0) - g_PDE2D =NULL; // PDEWiz2D -#endif - - try - { - switch (Nsim) { - case 1: p = new Maxwell2D; break; // 2D Maxwell - case 2: p = new MaxwellCurved2D; break; // 2D Maxwell: curved elements - case 3: p = new MaxwellNonCon2D; break; // 2D Maxwell: non-conforming elements - case 4: p = new ARBCplane2D; break; // 2D Maxwell: ARBC (plane2D) - case 5: p = new CurvedEuler2D; break; // 2D Euler - case 6: p = new CurvedINS2D; break; // 2D INS simulator - case 7: p = new CurvedCNS2D; break; // 2D CNS simulator - case 8: p = new EulerShock2D; break; // 2D Euler (WENO limiter) - - //case x: p = new CurvedCNS2D; break; // 2D CNS simulator - //case x: p = new ViscousBurgers2D; break; // 2D Viscous Burgers eqn - //case x: p = new AdvectDiff2D; break; // 2D Advection-Diffusion - //case x: p = new ShockBubble; break; // CLAW ShockBubble - -#if (0) - //##################################################### - case 11: // MODEL_PDE_WIZ 2D PDE Wizard - //----------------------------------------------------- - // 1. Construct the simulator object - g_PDE2D = new PDEWiz2D; - p = g_PDE2D; - - // 2. Create system of equations, etc. - //p = (g_PDE2D->Create() ? g_PDE2D : NULL); - //if (!p) {umWARNING("NDG2DDriver","An error occured in PDEWiz2D::Create()");return;} - break; - //##################################################### -#endif - - - default: p = NULL; break; - } - - if (p) - { - p->Driver(); // call driver - delete p; // delete simulator - umLOG(1, "\nSimulation complete.\n\n"); - } - else { - umWARNING("NDG2DDriver", "No simulator created"); - } - } catch (...) {umWARNING("NDG2DDriver", "exception caught from sim %d", Nsim);} - -} - diff --git a/cpp/nudg++/trunk/Src/Codes2D/NDG2D_Output.cpp b/cpp/nudg++/trunk/Src/Codes2D/NDG2D_Output.cpp deleted file mode 100644 index 194211a..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/NDG2D_Output.cpp +++ /dev/null @@ -1,860 +0,0 @@ -// NDG2D_Output.cpp -// write selected fields to file -// 2007/10/03 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -// Utility routines -//--------------------------------------------------------- - -// find number of triangles per element -int OutputSampleNelmt2D(int sample_N) -{ - return (sample_N)*(sample_N+1)/2 + (sample_N-1)*(sample_N)/2; -} - -// find number of nodes per face -int OutputSampleNpts2D(int sample_N) -{ - return (sample_N+1) * (sample_N+2) / 2; -} - -// load {R,S} output nodes -void OutputSampleNodes2D(int sample_N, DVec &R, DVec &S) -{ - int Npts = OutputSampleNpts2D(sample_N); - R.resize(Npts); S.resize(Npts); - double denom = (double)(sample_N); - int sampleNq = sample_N+1; - for (int sk=0, i=0; iK * Npts; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNuDG++ 2D simulation"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - int newNpts=0; - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - - DMat newX, newY, newZ, newFData; - - // Build new {X,Y,Z} vertices that regularize the - // elements, then interpolate solution fields onto - // this new set of elements: - OutputSampleXYZ(Output_N, newX, newY, newZ, FData, newFData, zfield); -//double maxF1 = newFData.max_col_val_abs(1), scaleF=1.0; -//if (maxF1 != 0.0) { scaleF = 1.0/maxF1; } - - newNpts = newX.num_rows(); - - if (zfield>0) - { - // write 2D vertex data, with z-elevation - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=newNpts; ++n) { - // use exponential format to allow for - // arbitrary (astro, nano) magnitudes: - fprintf(fp, "\n%20.12e %20.12e %20.12e", - newX(n, k), newY(n, k), newZ(n,k)); //*scaleF); - } - } - } else { - // write 2D vertex data to file - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=newNpts; ++n) { - // use exponential format to allow for - // arbitrary (astro, nano) magnitudes: - fprintf(fp, "\n%20.12e %20.12e 0.0", - newX(n, k), newY(n, k)); - } - } - } - - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - IMat newELMT; - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, vtkTotalConns); - - // build regularized tri elements at selected order - OutputSampleELMT2D(Output_N, newELMT); - newNpts = OutputSampleNpts2D(Output_N); - - int newNTri = newELMT.num_rows(); - int newNVert = newELMT.num_cols(); - - // write element connectivity to file - for (int k=0; kK; ++k) { - int nodesk = k*newNpts; - for (int n=1; n<=newNTri; ++n) { - fprintf(fp, "\n%d", newNVert); - for (int i=1; i<=newNVert; ++i) { - fprintf(fp, " %5d", nodesk+newELMT(n, i)); - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d", vtkTotalCells); - - for (int k=0; kK; ++k) { - fprintf(fp, "\n"); - for (int i=1; i<=Ncells; ++i) { - fprintf(fp, "5 "); // 5:VTK_TRIANGLE - if (! (i%10)) - fprintf(fp, "\n"); - } - } - - //------------------------------------- - // 5. Write the scalar "vtkPointData" - //------------------------------------- - - fprintf(fp, "\n\nPOINT_DATA %d", vtkTotalPoints); - - // For each field, write POINT DATA for each point - // in the vtkUnstructuredGrid. - - int Nfields = FData.num_cols(); - for (int fld=1; fld<=Nfields; ++fld) - { - fprintf(fp, "\nSCALARS field%d double 1", fld); - fprintf(fp, "\nLOOKUP_TABLE default"); - - // Write the scalar data, using exponential format - // to allow for arbitrary (astro, nano) magnitudes: - for (int n=1; n<=newFData.num_rows(); ++n) { - fprintf(fp, "\n%20.12e ", newFData(n, fld)); - } - } - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG2D::Output_DG_tris() -//--------------------------------------------------------- -{ - static int count = 0; - string output_dir = "."; - - // Write the current set of DG elements (triangles) - // in vtk format. Very similar to OutputVTK(), but - // here we write the actual traingles used by the DG - // solver without regularization. Use to record the - // mesh state, e.g. during adaptive mesh refinement. - - string buf = umOFORM("%s/mesh_N%02d_%04d.vtk", output_dir.c_str(), this->N, ++count); - FILE *fp = fopen(buf.c_str(), "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", buf.c_str()); - return; - } - - // Set flags and totals - int Output_N = this->N; - int Ncells=0, Npts=0; - - Ncells = OutputSampleNelmt2D(Output_N); - Npts = OutputSampleNpts2D (Output_N); - - // set totals for Vtk output - int vtkTotalPoints = this->K * Npts; - int vtkTotalCells = this->K * Ncells; -//int vtkTotalConns = (this->ElmtToNode.num_cols()+1) * um->Nel * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNuDG++ mesh"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - int newNpts=0; - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - - // write 2D vertex data to file - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=this->Np; ++n) { - // use exponential format to allow for - // arbitrary (astro, nano) magnitudes: - fprintf(fp, "\n%20.12e %20.12e 0.0", - x(n, k), y(n, k)); - } - } - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - IMat newELMT; - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, vtkTotalConns); - - // build connectivity for tri elements at order N - OutputSampleELMT2D(Output_N, newELMT); - - int newNTri = newELMT.num_rows(); - int newNVert = newELMT.num_cols(); - - // write element connectivity to file - for (int k=0; kK; ++k) { - int nodesk = k*Np; - for (int n=1; n<=newNTri; ++n) { - fprintf(fp, "\n%d", newNVert); - for (int i=1; i<=newNVert; ++i) { - fprintf(fp, " %5d", nodesk+newELMT(n, i)); - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d", vtkTotalCells); - - for (int k=0; kK; ++k) { - fprintf(fp, "\n"); - for (int i=1; i<=Ncells; ++i) { - fprintf(fp, "5 "); // 5:VTK_TRIANGLE - if (! (i%10)) - fprintf(fp, "\n"); - } - } - - //------------------------------------- - // 5. Write scalar "vtkCellData" - //------------------------------------- - - // TODO: output "cell data" such as element area, - // or quality measures such as min/max angles, etc. - - // ... - // ... - - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG2D::Output_Mesh() -//--------------------------------------------------------- -{ - static int count = 0; - string output_dir = "."; - - // Write the triangles that underlie current DG mesh - // in vtk format. Here we write the basic triangles - // either read from the original .neu file, or as - // adapted during adaptive mesh refinement (AMR). - - string buf = umOFORM("%s/mesh2D_N%d_%04d.vtk", output_dir.c_str(), this->N, ++count); - FILE *fp = fopen(buf.c_str(), "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", buf.c_str()); - return; - } - - // Set flags and totals - - int Ncells = 1; // 1 "cell" per triangle - int Npts = 3; // 3 vertices per triangle - - this->Nv = this->VX.length(); - - // set totals for Vtk output - int vtkTotalPoints = this->Nv; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNuDG++ mesh"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - // write 2D vertex data to file - for (int i=1; i<=this->Nv; ++i) { - fprintf(fp, "\n%20.12e %20.12e 0.0", VX(i), VY(i)); - } - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, vtkTotalConns); - - // write element connectivity to file - for (int k=1; k<=this->K; ++k) { - fprintf(fp, "\n3 %5d %5d %5d", - EToV(k,1)-1, EToV(k,2)-1, EToV(k,3)-1); - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d\n", vtkTotalCells); - - for (int k=1; k<=this->K; ++k) { - fprintf(fp, "5 "); // 5:VTK_TRIANGLE - if (! (k%10)) - fprintf(fp, "\n"); - } - - //------------------------------------- - // 5. Write scalar "vtkCellData" - //------------------------------------- - - // TODO: output "cell data" such as element area, - // or quality measures such as min/max angles, etc. - - // TODO: "FaceData" i.e. boundary conditions - // ... - - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG2D::OutputSampleXYZ -( - int sample_N, - DMat &newX, - DMat &newY, - DMat &newZ, // e.g. triangles on a sphere - const DMat &FData, // old field data - DMat &newFData, // new field data - int zfield // if>0, use as z-elevation -) -//--------------------------------------------------------- -{ - DVec newR, newS, newT; - DMat newVDM; - int newNpts = 0; - - // Triangles - OutputSampleNodes2D(sample_N, newR, newS); - newNpts = newR.size(); - newVDM = Vandermonde2D(this->N, newR, newS); - - const DMat& oldV = this->V; - DMat oldtonew(newNpts, this->Np, "OldToNew"); - oldtonew = trans(trans(oldV) | trans(newVDM)); - - //----------------------------------- - // interpolate the field data - //----------------------------------- - int Nfields = FData.num_cols(); - newFData.resize(newNpts*this->K, Nfields); - //DVec scales(Nfields); - - // For each field, use tOldF to wrap field i. - // Use tNewF to load the interpolated field - // directly into column i of the output array. - DMat tOldF, tNewF; - for (int i=1; i<=Nfields; ++i) { - tOldF.borrow(this->Np, this->K, (double*) FData.pCol(i)); - tNewF.borrow(newNpts, this->K, (double*)newFData.pCol(i)); - tNewF = oldtonew * tOldF; - //scales(i) = tNewF.max_col_val_abs(i); - } - - //----------------------------------- - // interpolate the vertices - //----------------------------------- - newX = oldtonew * this->x; - newY = oldtonew * this->y; - - if (this->bCoord3D) { - newZ = oldtonew * this->z; - } - else - { - if (zfield>=1 && zfield<=Nfields) { - // use field data for z-height - newZ.load(newNpts, K, newFData.pCol(Nfields)); - } else { - // set z-data to 0.0 - newZ.resize(newNpts, K, true, 0.0); - } - } -} - - -//--------------------------------------------------------- -void NDG2D::OutputSampleELMT2D(int sample_N, IMat& ELMT) -//--------------------------------------------------------- -{ - int Nel = OutputSampleNelmt2D(sample_N); - int Nvert=3, sk=0, i=0, j=0; - int sampleNq = sample_N+1; - IVec startrow(sampleNq); - - sk=0; - for (i=0; iNfp, ++count); - - FILE *fp = fopen(buf.c_str(), "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", buf.c_str()); - return; - } - - // Set flags and totals - - int Npoints = this->Np; // volume nodes per element - if (bFaceNodes) - Npoints = Nfp*Nfaces; // face nodes per element - - - // set totals for Vtk output -#if (1) - // FIXME: no connectivity - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = vtkTotalPoints; - int vtkTotalConns = vtkTotalPoints; - int Ncells = Npoints; -#else - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - int Ncells = this->N * this->N; -#endif - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNDGFem simulation nodes"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - int newNpts=0; - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - if (bFaceNodes) { - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%20.12e %20.12e %6.1lf", Fx(n,k), Fy(n,k), 0.0); - } - } - } else { - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%20.12e %20.12e %6.1lf", x(n,k), y(n,k), 0.0); - } - } - } - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, 2*vtkTotalConns); - - - // TODO: write element connectivity to file - // FIXME: out-putting as VTK_VERTEX - int nodesk=0; - for (int k=0; kK; ++k) { // for each element - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%d", 1); // for each triangle - for (int i=1; i<=1; ++i) { // FIXME: no connectivity - fprintf(fp, " %5d", nodesk); // nodes in nth triangle - nodesk++; // indexed from 0 - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d", vtkTotalCells); - - for (int k=0; kK; ++k) { - fprintf(fp, "\n"); - for (int i=1; i<=Ncells; ++i) { - //fprintf(fp, "5 "); // 5:VTK_TRIANGLE - fprintf(fp, "1 "); // 1:VTK_VERTEX - if (! (i%10)) - fprintf(fp, "\n"); - } - } - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG2D::OutputNodes_cub() -//--------------------------------------------------------- -{ - static int count = 0; - string output_dir = "."; - - string buf = umOFORM("%s/cub_N%02d_%04d.vtk", - output_dir.c_str(), m_cub.Ncub, ++count); - - FILE *fp = fopen(buf.c_str(), "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", buf.c_str()); - return; - } - - // Set flags and totals - - int Npoints = m_cub.Ncub; // cubature nodes per element - - // set totals for Vtk output -#if (1) - // FIXME: no connectivity - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = vtkTotalPoints; - int vtkTotalConns = vtkTotalPoints; - int Ncells = Npoints; -#else - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - int Ncells = this->N * this->N; -#endif - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNDGFem simulation nodes (high-order cubature)"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - int newNpts=0; - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - const DMat& cx=m_cub.x; - const DMat& cy=m_cub.y; - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%20.12e %20.12e %6.1lf", cx(n,k), cy(n,k), 0.0); - } - } - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, 2*vtkTotalConns); - - - // TODO: write element connectivity to file - // FIXME: out-putting as VTK_VERTEX - int nodesk=0; - for (int k=0; kK; ++k) { // for each element - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%d", 1); // for each triangle - for (int i=1; i<=1; ++i) { // FIXME: no connectivity - fprintf(fp, " %5d", nodesk); // nodes in nth triangle - nodesk++; // indexed from 0 - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d", vtkTotalCells); - - for (int k=0; kK; ++k) { - fprintf(fp, "\n"); - for (int i=1; i<=Ncells; ++i) { - //fprintf(fp, "5 "); // 5:VTK_TRIANGLE - fprintf(fp, "1 "); // 1:VTK_VERTEX - if (! (i%10)) - fprintf(fp, "\n"); - } - } - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG2D::OutputNodes_gauss() -//--------------------------------------------------------- -{ - static int count = 0; - string output_dir = "."; - - string buf = umOFORM("%s/gauss_N%02d_%04d.vtk", - output_dir.c_str(), m_gauss.NGauss, ++count); - - FILE *fp = fopen(buf.c_str(), "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", buf.c_str()); - return; - } - - // Set flags and totals - - int Npoints = 3*m_gauss.NGauss; // quadrature nodes per element - - // set totals for Vtk output -#if (1) - // FIXME: no connectivity - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = vtkTotalPoints; - int vtkTotalConns = vtkTotalPoints; - int Ncells = Npoints; -#else - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - int Ncells = this->N * this->N; -#endif - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNDGFem simulation nodes (surface quadrature)"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - int newNpts=0; - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - const DMat& gx=m_gauss.x; - const DMat& gy=m_gauss.y; - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%20.12e %20.12e %6.1lf", gx(n,k), gy(n,k), 0.0); - } - } - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, 2*vtkTotalConns); - - - // TODO: write element connectivity to file - // FIXME: out-putting as VTK_VERTEX - int nodesk=0; - for (int k=0; kK; ++k) { // for each element - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%d", 1); // for each triangle - for (int i=1; i<=1; ++i) { // FIXME: no connectivity - fprintf(fp, " %5d", nodesk); // nodes in nth triangle - nodesk++; // indexed from 0 - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d", vtkTotalCells); - - for (int k=0; kK; ++k) { - fprintf(fp, "\n"); - for (int i=1; i<=Ncells; ++i) { - //fprintf(fp, "5 "); // 5:VTK_TRIANGLE - fprintf(fp, "1 "); // 1:VTK_VERTEX - if (! (i%10)) - fprintf(fp, "\n"); - } - } - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Nodes2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Nodes2D.cpp deleted file mode 100644 index c24c60f..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Nodes2D.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// Nodes2D.m -// function [x,y] = Nodes2D(N); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void Nodes2D(int N, DVec& x, DVec& y) -//--------------------------------------------------------- -{ - // function [x,y] = Nodes2D(N); - // Purpose : Compute (x,y) nodes in equilateral triangle for - // polynomial of order N - - DVec blend1,blend2,blend3,warp1,warp2,warp3,warpf1,warpf2,warpf3; - DVec alpopt(gVecData, 15, - " 0.0000 0.0000 1.4152 0.1001 0.2751 " - " 0.9800 1.0999 1.2832 1.3648 1.4773 " - " 1.4959 1.5743 1.5770 1.6223 1.6258"); - - // Set optimized parameter, alpha, depending on order N - double alpha = 5.0/3.0; - if (N<16) { - alpha = alpopt(N); - } - - // total number of nodes - int Np = (N+1)*(N+2)/2; double NN = double(N); - - // Create equidistributed nodes on equilateral triangle - DVec L1(Np), L2(Np), L3(Np); - - int sk = 1; - for (int n=1; n<=(N+1); ++n) { - for (int m=1; m<=(N+2-n); ++m) { - L1(sk) = (n-1)/NN; L3(sk) = (m-1)/NN; - ++sk; - } - } - - L2 = 1.0 - L1 - L3; - - x = -L2+L3; - y = (-L2-L3 + 2.0*L1)/sqrt(3.0); - - // Compute blending function at each node for each edge - blend1 = 4.0 * L2.dm(L3); - blend2 = 4.0 * L1.dm(L3); - blend3 = 4.0 * L1.dm(L2); - - // Amount of warp for each node, for each edge - warpf1 = Warpfactor(N, L3-L2); - warpf2 = Warpfactor(N, L1-L3); - warpf3 = Warpfactor(N, L2-L1); - - // Combine blend & warp - warp1 = blend1.dm(warpf1); warp1 *= (1.0 + sqr(alpha*L1)); - warp2 = blend2.dm(warpf2); warp2 *= (1.0 + sqr(alpha*L2)); - warp3 = blend3.dm(warpf3); warp3 *= (1.0 + sqr(alpha*L3)); - - // Accumulate deformations associated with each edge - x += (1.0*warp1 + cos(2.0*PI/3.0)*warp2 + cos(4.0*PI/3.0)*warp3); - y += (0.0*warp1 + sin(2.0*PI/3.0)*warp2 + sin(4.0*PI/3.0)*warp3); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Normals2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Normals2D.cpp deleted file mode 100644 index 70f267d..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Normals2D.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// Normals2D.m -// function [nx, ny, sJ] = Normals2D() -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::Normals2D() // [nx, ny, sJ] -//--------------------------------------------------------- -{ - // function [nx, ny, sJ] = Normals2D() - // Purpose : Compute outward pointing normals at - // elements faces as well as surface Jacobians - - DMat xr=Dr*x, yr=Dr*y, xs=Ds*x, ys=Ds*y; - this->J = xr.dm(ys) - xs.dm(yr); - - // interpolate geometric factors to face nodes - DMat fxr = xr(Fmask, All), fxs = xs(Fmask, All), - fyr = yr(Fmask, All), fys = ys(Fmask, All); - - // build normals - nx.resize(3*Nfp, K); ny.resize(3*Nfp, K); - Index1D fid1(1,Nfp), fid2(Nfp+1,2*Nfp), fid3(2*Nfp+1,3*Nfp); - - // face 1 - nx(fid1, All) = fyr(fid1, All); - ny(fid1, All) = -fxr(fid1, All); - - // face 2 - nx(fid2, All) = fys(fid2, All)-fyr(fid2, All); - ny(fid2, All) = -fxs(fid2, All)+fxr(fid2, All); - - // face 3 - nx(fid3, All) = -fys(fid3, All); - ny(fid3, All) = fxs(fid3, All); - - // normalise - sJ = sqrt(sqr(nx)+sqr(ny)); // nx=nx.dd(sJ); ny=ny.dd(sJ); - nx.div_element(sJ); ny.div_element(sJ); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/PhysDmatrices2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/PhysDmatrices2D.cpp deleted file mode 100644 index 803ef3c..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/PhysDmatrices2D.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// PhysDmatrices2D.m -// function [Dx,Dy] = PhysDmatrices2D(x1, y1, interp) -// 2007/10/07 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::PhysDmatrices2D -( - const DVec& x1, // [in] - const DVec& y1, // [in] - const DMat& interp, // [in] - DMat& Dx, // [out] - DMat& Dy // [out] -) -//--------------------------------------------------------- -{ - // function [Dr,Ds] = PhysDmatrices2D(x1, y1, interp) - // Purpose : Initialize the (x,y) differentiation matrices - // on the simplex, evaluated at (x1,y1) at order N - - DMat_Diag RX, SX, RY, SY; - DVec rx1,sx1,ry1,sy1, J1; - - DMat IDr=interp*Dr, IDs=interp*Ds; - - ::GeometricFactors2D(x1, y1, IDr, IDs, // [in] - rx1,sx1,ry1,sy1,J1); // [out] - - // load vectors as diagonal matrices - RX = rx1; SX = sx1; - RY = ry1; SY = sy1; - - Dx = RX*IDr + SX*IDs; - Dy = RY*IDr + SY*IDs; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Sample2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Sample2D.cpp deleted file mode 100644 index 4b7c91c..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Sample2D.cpp +++ /dev/null @@ -1,124 +0,0 @@ -// Sample2D.m -// function [sampleweights,sampletri] = Sample2D(xout, yout) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -void tsearch2D (DVec& X, DVec& Y, IMat& EtoV, // [in] - double xout, double yout, // [in] - int& id, // [out] element number containing vertex - DVec& bary); // [out] barycentric coords of vertex in element - - - -//--------------------------------------------------------- -void NDG2D::Sample2D -( - double xout, // [in] - double yout, // [in] - DVec& sampleweights, // [out] - int& sampletri // [out] -) -//--------------------------------------------------------- -{ - // function [sampleweights,sampletri] = Sample2D(xout, yout) - // purpose: input = coordinates of output data point - // output = number of containing tri and interpolation weights - // [ only works for straight sided triangles ] - - DVec sout(1), rout(1); - - // find containing tri - // [sampletri,tribary] = tsearchn([VX', VY'], EToV, [xout,yout]); - - DVec tribary(3); - tsearch2D(VX, VY, EToV, xout, yout, sampletri,tribary); - if (sampletri<1) { - umERROR("NDG2D::Sample2D", "point (%g,%g) not in mesh (%d triangles)", xout, yout, EToV.num_rows()); - } - - // Matlab barycentric coordinates -> biunit triangle coordinates - sout = 2.0*tribary(3)-1.0; - rout = 2.0*tribary(2)-1.0; - - //------------------------------------------------------- - // If (xout,yout) is a vertex, then {rout,sout} should - // be in {-1,0,1}. Here we try to clean numerical noise - // before building the generalized Vandermonde matrix - double bary_tol=1e-10; - //------------------------------------------------------- - if (fabs( sout(1)+1.0 ) < bary_tol) {sout = -1.0;} - else if (fabs( sout(1) ) < bary_tol) {sout = 0.0;} - else if (fabs( sout(1)-1.0 ) < bary_tol) {sout = 1.0;} - //------------------------------------------------------- - if (fabs( rout(1)+1.0 ) < bary_tol) {rout = -1.0;} - else if (fabs( rout(1) ) < bary_tol) {rout = 0.0;} - else if (fabs( rout(1)-1.0 ) < bary_tol) {rout = 1.0;} - //------------------------------------------------------- - - // build generalized Vandermonde for the sample point - DMat Vout = Vandermonde2D(N, rout, sout); - - // build interpolation matrix for the sample point - // Note: return as a vector - sampleweights = Vout*this->invV; -} - - - -//--------------------------------------------------------- -void tsearch2D -( - DVec& X, // [in] - DVec& Y, // [in] - IMat& EtoV, // [in] - double xout, // [in] - double yout, // [in] - int& id, // [out] element number containing vertex - DVec& bary // [out] barycentric coords of vertex in element -) -//--------------------------------------------------------- -{ - // return the index of an element containing the node - // xi, together with the barycentric coordinates of - // xi in the selected element. If xi is not found in - // the mesh, return idx <= 0. - - assert(EtoV.num_cols() == 3); // 3 vertex ids for each triangle - int ntri = EtoV.num_rows(); // num elements in mesh - bool done=false; - double t_eps = -1.0e-8; // set tolerance -//double t_eps = -sqrt(eps); - - id = -1; bary.resize(3); IVec vids; DMat A=ones(3,3); - DVec q, b(3); b(1)=1.0; b(2)=xout; b(3)=yout; - - // find triangle containing point (xout,yout) - for (int i=1; i<=ntri; ++i) - { - // [1 x1 y1 ] - // A = [1 x2 y2 ] update A(:,2) A(:,3) - // [1 x3 y3 ] - - vids=EtoV.get_row(i); - A(All,2)=X(vids); A(All,3)=Y(vids); - - // Compute barycentric coordinate of each point - q = b/A; - - // if barycentric coords are all non-negative, then - // target point lies in element, or on its boundary - if (q.min_val() > t_eps) { - id = i; // set element index - bary = q; // set barycentric coordinates - done=true; // set flag to indicate succcess - break; // finished searching - } - } - if (!done) { - id = -1; // force invalid index - umLOG(1, "tsearch2D: failed to locate point (%g,%g) in mesh (%d triangles)", xout, yout, ntri); - } -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Simplex2DP.cpp b/cpp/nudg++/trunk/Src/Codes2D/Simplex2DP.cpp deleted file mode 100644 index 0d50712..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Simplex2DP.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// Simplex2DP.m -// function [P] = Simplex2DP(a,b,i,j); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -DVec& Simplex2DP(const DVec& a, const DVec& b, int i, int j) -//--------------------------------------------------------- -{ - // function [P] = Simplex2DP(a,b,i,j); - // Purpose : Evaluate 2D orthonormal polynomial - // on simplex at (a,b) of order (i,j). - - DVec* P = new DVec("P", OBJ_temp); - DVec h1 = JacobiP(a,0.0,0.0,i), h2 = JacobiP(b,2.0*i+1,0.0,j); - DVec tv1=sqrt(2.0)*h1.dm(h2), tv2=pow(1.0-b,(double)i); - (*P) = tv1.dm(tv2); - return (*P); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/StartUp2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/StartUp2D.cpp deleted file mode 100644 index e7f5719..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/StartUp2D.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// StartUp2D.m -// -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -bool NDG2D::StartUp2D() -//--------------------------------------------------------- -{ - // Purpose : Setup script, building operators, grid, metric, - // and connectivity tables. - - // Definition of constants - Nfp = N+1; Np = (N+1)*(N+2)/2; Nfaces=3; NODETOL = 1e-12; - - // Compute nodal set - DVec x1,y1; Nodes2D(N, x1,y1); xytors(x1,y1, r,s); - - // Build reference element matrices - V = Vandermonde2D(N,r,s); invV = inv(V); - MassMatrix = trans(invV)*invV; - ::Dmatrices2D(N,r,s,V, Dr,Ds); - - // build coordinates of all the nodes - IVec va = EToV(All,1), vb = EToV(All,2), vc = EToV(All,3); - - // Note: outer products of (Vector,MappedRegion1D) - x = 0.5 * (-(r+s)*VX(va) + (1.0+r)*VX(vb) + (1.0+s)*VX(vc)); - y = 0.5 * (-(r+s)*VY(va) + (1.0+r)*VY(vb) + (1.0+s)*VY(vc)); - - // find all the nodes that lie on each edge - IVec fmask1,fmask2,fmask3; - fmask1 = find( abs(s+1.0), '<', NODETOL); - fmask2 = find( abs(r+s ), '<', NODETOL); - fmask3 = find( abs(r+1.0), '<', NODETOL); - Fmask.resize(Nfp,3); // set shape (M,N) before concat() - Fmask = concat(fmask1,fmask2,fmask3); // load vector into shaped matrix - - Fx = x(Fmask, All); Fy = y(Fmask, All); - - // Create surface integral terms - Lift2D(); - - // calculate geometric factors - ::GeometricFactors2D(x,y,Dr,Ds, rx,sx,ry,sy,J); - - // calculate geometric factors - Normals2D(); - Fscale = sJ.dd(J(Fmask,All)); - - -#if (0) - OutputNodes(false); // volume nodes - OutputNodes(true); // face nodes - umERROR("Exiting early", "Check {volume,face} nodes"); -#endif - - // Build connectivity matrix - tiConnect2D(EToV, EToE,EToF); - - // Build connectivity maps - BuildMaps2D(); - - // Compute weak operators (could be done in preprocessing to save time) - DMat Vr,Vs; GradVandermonde2D(N, r, s, Vr, Vs); - VVT = V*trans(V); - Drw = (V*trans(Vr))/VVT; Dsw = (V*trans(Vs))/VVT; - - return true; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Vandermonde2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/Vandermonde2D.cpp deleted file mode 100644 index 8c325c7..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Vandermonde2D.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// Vandermonde2D.cpp -// function [V2D] = Vandermonde2D(N, r, s); -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -DMat& Vandermonde2D(int N, const DVec& r, const DVec& s) -//--------------------------------------------------------- -{ - // function [V2D] = Vandermonde2D(N, r, s); - // Purpose : Initialize the 2D Vandermonde Matrix. - // V_{ij} = phi_j(r_i, s_i); - - DMat *p2D = new DMat(r.size(),(N+1)*(N+2)/2, 0.0, OBJ_temp, "V2D"); - DMat& V2D = (*p2D); // shorthand - - // Transfer to (a,b) coordinates - DVec a,b; rstoab(r,s, a,b); - - // build the Vandermonde matrix - int sk = 1; - for (int i=0; i<=N; ++i) { - for (int j=0; j<=(N-i); ++j) { - V2D(All,sk) = Simplex2DP(a,b,i,j); - ++sk; - } - } - - return V2D; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/Warpfactor.cpp b/cpp/nudg++/trunk/Src/Codes2D/Warpfactor.cpp deleted file mode 100644 index 1b53fb5..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/Warpfactor.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// Warpfactor.m -// function warp = Warpfactor(N, rout) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -DVec& Warpfactor(int N, const DVec& rout_arg) -//--------------------------------------------------------- -{ - DVec rout(rout_arg); // transfers ownership of temp arg - - // function warp = Warpfactor(N, rout) - // Purpose : Compute scaled warp function at order N - // based on rout interpolation nodes - - int Nr = rout.size(); DMat Pmat(N+1,Nr), Lmat, Veq; - DVec LGLr, req, zerof, sf; int i=0; - // Note: create as "OBJ_real" to avoid deletion, then adjust below - DVec *ret = new DVec("warp", OBJ_real); DVec& warp=(*ret); // "reference" - - // Compute LGL and equidistant node distribution - LGLr = JacobiGL(0,0,N); req.linspace(-1.0, 1.0, N+1); - - // Compute V based on req - Veq = Vandermonde1D(N,req); - - // Evaluate Lagrange polynomial at rout - for (i=1; i<=(N+1); ++i) { - Pmat.set_row(i, JacobiP(rout, 0, 0, i-1)); - } - Lmat = trans(Veq)|Pmat; - - // Compute warp factor - warp = trans(Lmat)*(LGLr - req); - - // Scale factor - zerof = rout.lt_abs(1.0 - 1e-10); sf = 1.0 - sqr(zerof.dm(rout)); - warp = warp.dd(sf) + warp.dm(zerof-1.0); - - warp.set_mode(OBJ_temp); // adjust mode flag - return warp; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/dtscale2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/dtscale2D.cpp deleted file mode 100644 index 3b5a095..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/dtscale2D.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// dtscale2D.m -// function dtscale = dtscale2D; -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG2D.h" - - -//--------------------------------------------------------- -void NDG2D::dtscale2D(DVec& dtscale) -//--------------------------------------------------------- -{ - // function dtscale = dtscale2D; - // Purpose : Compute inscribed circle diameter as characteristic - // for grid to choose timestep - - DMat vx, vy; DVec len1,len2,len3,sper,s1,s2,s3,Area; - IVec vmask1, vmask2, vmask3, vmask; - - // Find vertex nodes - vmask1 = find( abs(s+r+2.0), '<', NODETOL); - vmask2 = find( abs( r-1.0), '<', NODETOL); - vmask3 = find( abs( s-1.0), '<', NODETOL); - vmask = concat(vmask1,vmask2,vmask3); - assert(vmask.size()==3); // expect 1 node in each vmask[i] - vx = x(vmask,All); vy = y(vmask,All); - - // Compute semi-perimeter and area - len1 = sqrt( sqr(vx(1,All)-vx(2,All)) + sqr(vy(1,All)-vy(2,All))); - len2 = sqrt( sqr(vx(2,All)-vx(3,All)) + sqr(vy(2,All)-vy(3,All))); - len3 = sqrt( sqr(vx(3,All)-vx(1,All)) + sqr(vy(3,All)-vy(1,All))); - sper = 0.5 * (len1 + len2 + len3); - -//Area = sqrt( sper.* (sper-len1).* (sper-len2).* (sper-len3) ); -//Area = sqrt( sper.dm(sper-len1).dm(sper-len2).dm(sper-len3) ); - - s1=(sper-len1); s2=(sper-len2); s3=(sper-len3); - Area = sqrt( sper.dm(s1.dm(s2.dm(s3))) ); - - // Compute scale using radius of inscribed circle - dtscale = Area.dd(sper); -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/rstoab.cpp b/cpp/nudg++/trunk/Src/Codes2D/rstoab.cpp deleted file mode 100644 index 6815853..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/rstoab.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// rstoab.m -// function [a,b] = rstoab(r,s) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void rstoab -( - const DVec& r, // [in] - const DVec& s, // [in] - DVec& a, // [out] - DVec& b // [out] -) -//--------------------------------------------------------- -{ - // function [a,b] = rstoab(r,s) - // Purpose : Transfer from (r,s) -> (a,b) coordinates in triangle - - int Np = r.size(); a.resize(Np); - for (int n=1; n<=Np; ++n) { - if (s(n) != 1.0) { - a(n) = 2.0*(1.0+r(n))/(1.0-s(n))-1.0; - } else { - a(n) = -1.0; - } - } - b = s; -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/tiConnect2D.cpp b/cpp/nudg++/trunk/Src/Codes2D/tiConnect2D.cpp deleted file mode 100644 index 568394b..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/tiConnect2D.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// tiConnect2D.m -// function [EToE,EToF]= tiConnect2D(EToV) -// 2007/08/02 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -//--------------------------------------------------------- -void tiConnect2D -( - IMat& EToV, // [in] - IMat& EToE, // [out] - IMat& EToF // [out] -) -//--------------------------------------------------------- -{ - // function [EToE,EToF]= tiConnect2D(EToV) - // Purpose: triangle face connect algorithm due to Toby Isaac - - int Nfaces=3, K = EToV.num_rows(), Nnodes = EToV.max_val(); - int Nr = 3*K; IMat spNodeToNode, sorted; - - IMat fnodes(Nr,2,"fnodes"); - Index1D I1(1,K), I2(K+1,2*K), I3(2*K+1,3*K); - IVec J1(gVecData, 2, "1 2"), J2(gVecData, 2, "2 3"), J3(gVecData, 2, "3 1"); - - // create list of all faces 1, then 2, & 3 - fnodes(I1, All) = EToV(All, J1); - fnodes(I2, All) = EToV(All, J2); - fnodes(I3, All) = EToV(All, J3); - - // sort each row in ascending order, then decrement each entry - fnodes.sort(2); fnodes -= 1; - - // set up default element to element and Element to faces connectivity - EToE = outer(Range(1,K), Ones(Nfaces)); - EToF = outer(Ones(K), Range(1,Nfaces)); - - // uniquely number each set of three faces by their node numbers - IVec id = fnodes.get_col(1)*Nnodes + fnodes.get_col(2)+1; - -//spNodeToNode=[id, (1:Nfaces*K)', EToE(:), EToF(:)]; - spNodeToNode.resize(Nr, 4); - spNodeToNode.set_col(1, id); - spNodeToNode.set_col(2, Range(1,Nfaces*K)); - spNodeToNode.set_col(3, EToE); - spNodeToNode.set_col(4, EToF); - - // Now we sort by global face number. - sorted = sortrows(spNodeToNode,1); - - // find matches in the sorted face list - // [indices,dummy]=find( sorted(1:(end-1),1)==sorted(2:end,1) ); - - Index1D II1(1, Nr-1), II2(2, Nr); - IVec ids1=sorted(II1,1), ids2=sorted(II2,1); - IVec indices = find(ids1, '=', ids2); - - int Ni=indices.size(); - - if (Ni>0) { - - II1.reset(1,Ni), II2.reset(Ni+1,2*Ni); - IMat matchL(2*Ni, 4), matchR(2*Ni, 4); - - // make links reflexive - matchL(II1, All) = sorted(indices ,All); - matchL(II2, All) = sorted(indices+1,All); - - matchR(II1, All) = sorted(indices+1,All); - matchR(II2, All) = sorted(indices ,All); - - // insert matches - EToE(matchL(All,2)) = matchR(All,3); - EToF(matchL(All,2)) = matchR(All,4); - } -} diff --git a/cpp/nudg++/trunk/Src/Codes2D/xytors.cpp b/cpp/nudg++/trunk/Src/Codes2D/xytors.cpp deleted file mode 100644 index d72bcc7..0000000 --- a/cpp/nudg++/trunk/Src/Codes2D/xytors.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// xytors.m -// function [r,s] = xytors(x,y) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void xytors -( - const DVec& x, // [in] - const DVec& y, // [in] - DVec& r, // [out] - DVec& s // [out] -) -//--------------------------------------------------------- -{ - // function [r,s] = xytors(x,y) - // Purpose : Transfer from (x,y) in equilateral triangle - // to (r,s) coordinates in standard triangle - DVec L1,L2,L3; - - L1 = (sqrt(3.0)*y + 1.0)/3.0; - L2 = (-3.0*x - sqrt(3.0)*y + 2.0)/6.0; - L3 = ( 3.0*x - sqrt(3.0)*y + 2.0)/6.0; - - r = -L2 + L3 - L1; s = -L2 - L3 + L1; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/BuildBCMaps3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/BuildBCMaps3D.cpp deleted file mode 100644 index 7755185..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/BuildBCMaps3D.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// BuildBCMaps3D.m -// function BuildBCMaps3D() -// 2007/07/07 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -void NDG3D::BuildBCMaps3D() -//--------------------------------------------------------- -{ - // function BuildBCMaps3D - // Purpose: Build specialized nodal maps for various types of - // boundary conditions, specified in BCType. - - // Note: boundary codes are defined in Global_funcs.h - - // create label of face nodes with boundary types from BCType - IVec bct = trans(BCType), onesNfp(Nfp, 1); - IMat bnodeM = outer(onesNfp, bct); - IVec bnodes = bnodeM; - - // find location of boundary nodes in face and volume node lists - mapI = find(bnodes, '=', (int)BC_In); vmapI = vmapM(mapI); - mapO = find(bnodes, '=', (int)BC_Out); vmapO = vmapM(mapO); - mapW = find(bnodes, '=', (int)BC_Wall); vmapW = vmapM(mapW); - mapF = find(bnodes, '=', (int)BC_Far); vmapF = vmapM(mapF); - mapC = find(bnodes, '=', (int)BC_Cyl); vmapC = vmapM(mapC); - mapD = find(bnodes, '=', (int)BC_Dirichlet); vmapD = vmapM(mapD); - mapN = find(bnodes, '=', (int)BC_Neuman); vmapN = vmapM(mapN); - mapS = find(bnodes, '=', (int)BC_Slip); vmapS = vmapM(mapS); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/BuildMaps3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/BuildMaps3D.cpp deleted file mode 100644 index 2a3f6dd..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/BuildMaps3D.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// BuildMaps3D.m -// function [vmapM, vmapP, vmapB, mapB] = BuildMaps3D -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - -//--------------------------------------------------------- -void NDG3D::BuildMaps3D() -//--------------------------------------------------------- -{ - // function [vmapM, vmapP, vmapB, mapB] = BuildMaps3D - // Purpose: Connectivity and boundary tables for nodes given - // in the K # of elements, each with N+1 degrees of freedom. - - // Find node to node connectivity - - IVec idsL, idsR, idsM,idsP, vidM,vidP, idM,idP; - IMat idMP; DMat xM,xP,yM,yP,zM,zP,D; DVec x1,x2,y1,y2,z1,z2; - int k1=0,f1=0, k2=0,f2=0, skL=0,skR=0, skM=0,skP=0, iL1=0,iL2=0; - int v1=0, v2=0; double refd = 0.0; - - vmapM.resize(Nfp*Nfaces*K); vmapP.resize(Nfp*Nfaces*K); - mapM.range(1,Nfp*Nfaces*K); mapP = mapM; - - int NF = Nfp*Nfaces; - - // number volume nodes consecutively - IVec nodeids = Range(1,Np*K); - - // find index of face nodes with respect to volume node ordering - for (k1=1; k1<=K; ++k1) { - iL1=(k1-1)*NF; iL2=k1*NF; // define target range in vmapM - idsL.range(iL1+1, iL2); // sequential indices for element k1 - idsR = Fmask + (k1-1)*Np; // offset Fmask for element k1 - vmapM(idsL) = nodeids(idsR); // map face nodes in element k1 - } - - DVec one(Nfp, 1.0); - for (k1=1; k1<=K; ++k1) { - for (f1=1; f1<=Nfaces; ++f1) { - - // find neighbor - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - - skM = (k1-1)*NF; // offset to element k1 - skP = (k2-1)*NF; // offset to element k2 - - idsM.range((f1-1)*Nfp+1+skM, f1*Nfp+skM); - idsP.range((f2-1)*Nfp+1+skP, f2*Nfp+skP); - - // find find volume node numbers of left and right nodes - vidM = vmapM(idsM); vidP = vmapM(idsP); - - x1=x(vidM); y1=y(vidM); z1=z(vidM); - x2=x(vidP); y2=y(vidP); z2=z(vidP); - - xM=outer(x1,one); yM=outer(y1,one); zM=outer(z1,one); - xP=outer(x2,one); yP=outer(y2,one); zP=outer(z2,one); - - // Compute distance matrix - D = sqr(xM-trans(xP)) + sqr(yM-trans(yP)) + sqr(zM-trans(zP)); - - idMP = find2D(abs(D), '<', NODETOL); - idM=idMP(All,1); idP=idMP(All,2); - - idM += (f1-1)*Nfp + skM; // offset ids to {f1,k1} - vmapP(idM) = vidP(idP); // set external element ids - - idP += (f2-1)*Nfp + skP; // offset ids to {f2,k2} - mapP(idM) = idP; // set external face ids - } - } - - // Create list of boundary nodes - mapB = find(vmapP, '=', vmapM); vmapB = vmapM(mapB); - -#if (0) - dumpIVec(vmapM, "vmapM"); - dumpIVec(vmapP, "vmapP"); - dumpIVec(mapB, "mapB"); - dumpIVec(vmapB, "vmapB"); - umERROR("Testing", "Nigel, check arrays"); -#endif - -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Cub3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Cub3D.cpp deleted file mode 100644 index a3adf36..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Cub3D.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// Cub3D.cpp -// 3D Cubature data -// 2007/09/23 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Cub3D.h" - - -//--------------------------------------------------------- -Cub3D::Cub3D() -//--------------------------------------------------------- -: Ncub(0), - R("cub.R"), S("cub.S"), T("cub.T"), w("cub.w"), W("cub.W"), - V ("cub.V"), Dr("cub.Dr"), Ds("cub.Ds"), Dt("cub.Dt"), - VT("cub.V' "), DrT("cub.Dr' "), DsT("cub.Ds' "), DtT("cub.Dt' "), - x("cub.x"), y("cub.y"), z("cub.z"), - rx("cub.rx"), sx("cub.sx"), tx("cub.tx"), - ry("cub.ry"), sy("cub.sy"), ty("cub.ty"), - rz("cub.rz"), sz("cub.sz"), tz("cub.tz"), - J("cub.J"), - mm("cub.mm"), mmCHOL("cub.mmCHOL") -{ -} - - -//--------------------------------------------------------- -Gauss3D::Gauss3D() -//--------------------------------------------------------- -: NGauss(0), - //z("gauss.z"), w("gauss.w"), - //x("gauss.x"), y("gauss.y"), W("gauss.W"), - mapM("gauss.mapM"), mapP("gauss.mapP"), - mapI("gauss.mapI"), mapO("gauss.mapO"), mapW("gauss.mapW"), - mapC("gauss.mapC"), mapS("gauss.mapS"), mapD("gauss.mapD"), - mapN("gauss.mapN"), mapB("gauss.mapB"), - nx("gauss.nx"), ny("gauss.ny"), J("gauss.J"), sJ("gauss.sJ"), - rx("gauss.rx"), ry("gauss.ry"), sx("gauss.sx"), sy("gauss.sy"), - interp("gauss.interp"), interpT("gauss.interp' ") -{ -#if (1) - umERROR("Gauss3D", "Nigel, implement Gauss3D"); -#endif -} - - -//--------------------------------------------------------- -void Gauss3D::resize(int Ng, int K, int Nfaces) -//--------------------------------------------------------- -{ -#if (1) - - umERROR("Gauss3D::resize", "Nigel, implement Gauss3D"); - -#else - NGauss = Ng; - int Nr = NGauss*Nfaces; - nx.resize(Nr,K); ny.resize(Nr,K); sJ.resize(Nr,K); - rx.resize(Nr,K); ry.resize(Nr,K); J.resize(Nr,K); - sx.resize(Nr,K); sy.resize(Nr,K); - - // MUST set correct dimensions here! - mapM.resize(NGauss*Nfaces, K); - mapP.resize(NGauss*Nfaces, K); - - // but these are filled as required. - mapI.resize(0); mapO.resize(0); - mapW.resize(0); mapB.resize(0); - mapS.resize(0); mapD.resize(0); - mapN.resize(0); mapC.resize(0); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Cubature3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Cubature3D.cpp deleted file mode 100644 index ca59a0c..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Cubature3D.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// Cubature3D.cpp -// function [cubR,cubS,cubT, cubW, Ncub] = Cubature3D(Corder) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -//#include "CubatureData3D.h" - - -//--------------------------------------------------------- -void Cubature3D(int Corder, Cub3D& cub) -//--------------------------------------------------------- -{ - // function [cubR,cubS,cubT, cubW, Ncub] = Cubature3D(Corder) - // Purpose: provide multidimensional quadrature (i.e. cubature) - // rules to integrate up to Corder polynomials - - DVec gA,wA, gB,wB, gC,wC, cubA,cubB,cubC, cubW; - - int gNA=(int)ceil((Corder+1.0)/2.0); JacobiGQ(0.0, 0.0, gNA-1, gA,wA); - int gNB=(int)ceil((Corder+1.0)/2.0); JacobiGQ(1.0, 0.0, gNB-1, gB,wB); - int gNC=(int)ceil((Corder+1.0)/2.0); JacobiGQ(2.0, 0.0, gNC-1, gC,wC); - - int Nval = gNA*gNB*gNC; - cubA.resize(Nval); cubB.resize(Nval); cubC.resize(Nval); cubW.resize(Nval); - - cub.w.resize(Nval); - - int sk = 1; - for (int a=1; a<=gNA; ++a) { - for (int b=1; b<=gNB; ++b) { - for (int c=1; c<=gNC; ++c) { - cubA(sk) = gA(a); - cubB(sk) = gB(b); - cubC(sk) = gC(c); - cub.w(sk) = 0.125*wA(a)*wB(b)*wC(c); - ++sk; - } - } - } - - cub.R = 0.25*(1.0+cubA).dm(1.0-cubB).dm(1.0-cubC) - 1.0; - cub.S = 0.5 *(1.0+cubB).dm(1.0-cubC) - 1.0; - cub.T = cubC; - - cub.Ncub = cub.w.size(); -} - - -//--------------------------------------------------------- -void Cubature3D(int Corder, DVec& r, DVec& s, DVec& t, DVec& w, int& Ncub) -//--------------------------------------------------------- -{ - Cub3D cub; Cubature3D(Corder, cub); - r = cub.R; - s = cub.S; - t = cub.T; - - w = cub.w; - - Ncub = cub.Ncub; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/CubatureVolumeMesh3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/CubatureVolumeMesh3D.cpp deleted file mode 100644 index fce942b..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/CubatureVolumeMesh3D.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// CubatureVolumeMesh3D.m -// function cub = CubatureVolumeMesh3D(Corder) -// 2007/10/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -void NDG3D::CubatureVolumeMesh3D(int Corder, Cub3D& cub) -//--------------------------------------------------------- -{ - // function cub = CubatureVolumeMesh3D(Corder) - // purpose: build cubature nodes, weights and geometric factors for all elements - // - // Note: m_cub is member of Globals3D - - // set up cubature nodes - Cubature3D(Corder, cub); - - // evaluate generalized Vandermonde of Lagrange interpolant functions at cubature nodes - InterpMatrix3D(cub); // Note: stores cub.V and cub.VT - - // evaluate local derivatives of Lagrange interpolants at cubature nodes - Dmatrices3D(this->N, cub); - - // evaluate the geometric factors at the cubature nodes - GeometricFactors3D(cub); - - umTRC(1, "NDG3D::CubatureVolumeMesh3D -- only creating chol factors for curved elements\n"); - - // build a custom mass matrix for each curved element - int Ncurved = curved.size(), k=0; - - DMat mmk; DMat_Diag D; DVec d; - cub.mmCHOL.resize(Np*Np, Ncurved); - cub.mm .resize(Np*Np, Ncurved); - - for (int m=1; m<=Ncurved; ++m) { - k = curved(m); - d=cub.J(All,k); d*=cub.w; - D.diag(d); // weighted diagonal - mmk = cub.VT * D * cub.V; // mass matrix for element k - cub.mm(All,m) = mmk; // store mass matrix - cub.mmCHOL(All,m) = chol(mmk); // store Cholesky factorization - - // cub.mm(:,:,k) = cub.VT* diag( cub.J(All,k).*cub.W)*cub.V; - } - - // incorporate weights and Jacobian - cub.W = outer(cub.w, ones(K)); - cub.W.mult_element(cub.J); - - // compute coordinates of cubature nodes - cub.x = cub.V * this->x; - cub.y = cub.V * this->y; - cub.z = cub.V * this->z; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Curl3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Curl3D.cpp deleted file mode 100644 index 653487e..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Curl3D.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// Curl3D.m -// function [curlx, curly, curlz] = CurlH3D(Ux, Uy, Uz) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - -//--------------------------------------------------------- -void NDG3D::Curl3D -( - const DMat& Ux, // [in] - const DMat& Uy, // [in] - const DMat& Uz, // [in] - DMat& curlx, // [out] - DMat& curly, // [out] - DMat& curlz // [out] -) -//--------------------------------------------------------- -{ - // function [curlx, curly, curlz] = CurlH3D(Ux, Uy, Uz) - // purpose: compute local elemental physical spatial curl of (Ux,Uy,Uz) - - // compute local derivatives of Ux on reference tetrahedron - DMat ddr = Dr*Ux, dds = Ds*Ux, ddt = Dt*Ux; - - // increment curl components - curly = (rz.dm(ddr) + sz.dm(dds) + tz.dm(ddt)); - curlz = -(ry.dm(ddr) + sy.dm(dds) + ty.dm(ddt)); - - // compute local derivatives of Uy on reference tetrahedron - ddr = Dr*Uy; dds = Ds*Uy; ddt = Dt*Uy; - - // increment curl components - curlx = -(rz.dm(ddr) + sz.dm(dds) + tz.dm(ddt)); - curlz += (rx.dm(ddr) + sx.dm(dds) + tx.dm(ddt)); - - // compute local derivatives of Uz on reference tetrahedron - ddr = Dr*Uz; dds = Ds*Uz; ddt = Dt*Uz; - - // increment curl components - curlx += (ry.dm(ddr) + sy.dm(dds) + ty.dm(ddt)); - curly -= (rx.dm(ddr) + sx.dm(dds) + tx.dm(ddt)); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/CutOffFilter3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/CutOffFilter3D.cpp deleted file mode 100644 index d4da299..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/CutOffFilter3D.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// CutOffFilter3D.m -// function [F] = CutOffFilter3D(Nc,frac) -// 2007/07/07 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - -//--------------------------------------------------------- -DMat& NDG3D::CutOffFilter3D(int Nc, double frac) -//--------------------------------------------------------- -{ - // function [F] = CutOffFilter3D(Nc,frac) - // Purpose : Initialize 3D cut off filter matrix of order Norderin - - DMat_Diag filterdiag(Np, 1.0); - - // build cut-off filter - int sk = 1; - for (int i=0; i<=N; ++i) { - for (int j=0; j<=(N-i); ++j) { - for (int k=0; k<=(N-i-j); ++k) { - if ((i+j+k) >= Nc) { - filterdiag(sk) = frac; - } - ++sk; - } - } - } - - DMat* F = new DMat("Filter", OBJ_temp); - (*F) = V * filterdiag * invV; - return (*F); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Div3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Div3D.cpp deleted file mode 100644 index b6a2537..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Div3D.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// Div3D.m -// function [divU] = DivH3D(Ux, Uy, Uz) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - -//--------------------------------------------------------- -void NDG3D::Div3D -( - const DMat& Ux, - const DMat& Uy, - const DMat& Uz, - DMat& divU -) -//--------------------------------------------------------- -{ - // function [divU] = DivH3D(Ux, Uy, Uz) - // purpose: compute local elemental physical spatial divergence of (Ux,Uy,Uz) - - // compute local derivatives of Ux on reference tetrahedron - DMat ddr = Dr*Ux, dds = Ds*Ux, ddt = Dt*Ux; - - // dUx/dx - divU = (rx.dm(ddr) + sx.dm(dds) + tx.dm(ddt)); - - // compute local derivatives of Uy on reference tetrahedron - ddr = Dr*Uy; dds = Ds*Uy; ddt = Dt*Uy; - - // add dUy/dy to divergence - divU = divU + (ry.dm(ddr) + sy.dm(dds) + ty.dm(ddt)); - - // compute local derivatives of Uz on reference tetrahedron - ddr = Dr*Uz; dds = Ds*Uz; ddt = Dt*Uz; - - // add dUz/dz to divergence - divU = divU + (rz.dm(ddr) + sz.dm(dds) + tz.dm(ddt)); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Dmatrices3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Dmatrices3D.cpp deleted file mode 100644 index bc054bf..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Dmatrices3D.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// Dmatrices3D.m -// function [Dr,Ds,Dt] = Dmatrices3D(N,r,s,t,V) -// 2007/09/23 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -// global version -//--------------------------------------------------------- -void Dmatrices3D -( - int N, // [in] - const DVec& r, // [in] - const DVec& s, // [in] - const DVec& t, // [in] - const DMat& V, // [in] - DMat& Dr, // [out] - DMat& Ds, // [out] - DMat& Dt // [out] -) -//--------------------------------------------------------- -{ - // function [Dr,Ds,Dt] = Dmatrices3D(N,r,s,t,V) - // Purpose : Initialize the (r,s,t) differentiation matrices - // on the simplex, evaluated at (r,s,t) at order N - - DMat Vr,Vs,Vt; GradVandermonde3D(N, r,s,t, Vr,Vs,Vt); - Dr = Vr/V; Ds = Vs/V; Dt = Vt/V; -} - - -// member version -//--------------------------------------------------------- -void NDG3D::Dmatrices3D() -//--------------------------------------------------------- -{ - DMat Vr,Vs,Vt; GradVandermonde3D(N, r,s,t, Vr,Vs,Vt); - this->Dr = Vr/this->V; - this->Ds = Vs/this->V; - this->Dt = Vt/this->V; -} - - -// member version (cubature) -//--------------------------------------------------------- -void NDG3D::Dmatrices3D(int Nc, Cub3D& cub) -//--------------------------------------------------------- -{ - DMat Vr,Vs,Vt; - GradVandermonde3D(Nc, cub.R,cub.S,cub.T, Vr,Vs,Vt); - - cub.Dr = Vr/this->V; // cub.dphidr - cub.Ds = Vs/this->V; // cub.dphids - cub.Dt = Vt/this->V; // cub.dphids - - // store transposes - cub.DrT = trans(cub.Dr); - cub.DsT = trans(cub.Ds); - cub.DtT = trans(cub.Dt); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/EquiNodes3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/EquiNodes3D.cpp deleted file mode 100644 index de37e40..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/EquiNodes3D.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// EquiNodes3D.m -// function [X,Y,Z] = EquiNodes3D(N) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void EquiNodes3D(int N, DVec& X, DVec& Y, DVec& Z) -//--------------------------------------------------------- -{ - // function [X,Y,Z] = EquiNodes3D(N) - // Purpose: compute the equidistributed nodes on the - // reference tetrahedron - - // total number of nodes - int Np = (N+1)*(N+2)*(N+3)/6; double dN = double(N); - - // create equidistributed nodes on equilateral triangle - X.resize(Np); Y.resize(Np); Z.resize(Np); - - int sk = 1; - for (int n=1; n<=(N+1); ++n) { - for (int m=1; m<=(N+2-n); ++m) { - for (int q=1; q<=(N+3-n-m); ++q) { - X(sk) = -1.0 + (q-1.0)*2.0/dN; - Y(sk) = -1.0 + (m-1.0)*2.0/dN; - Z(sk) = -1.0 + (n-1.0)*2.0/dN; - ++sk; - } - } - } -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/FaceData3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/FaceData3D.cpp deleted file mode 100644 index ba055ba..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/FaceData3D.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// FaceData3D.cpp -// -// 2007/10/04 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include "FaceData3D.h" - - -//--------------------------------------------------------- -FaceData3D::FaceData3D() -//--------------------------------------------------------- -{ - bcflag = 0; - - // testing pointer version: init to NULL - for (int i=0; i= N ) { - Nc = N-1; - } - - // build exponential filter - int sk = 1; - for (int i=0; i<=N; ++i) { - for (int j=0; j<=(N-i); ++j) { - for (int k=0; k<=(N-i-j); ++k) { - if ((i+j+k) >= Nc) { - filterdiag(sk) = exp(-alpha * pow(double(i+j-Nc)/double(N-Nc), sp)); - } - ++sk; - } - } - } - -dumpDVec(filterdiag, "filterdiag"); - - DMat* F = new DMat("Filter", OBJ_temp); - (*F) = V * filterdiag * invV; - return (*F); -} - - -//--------------------------------------------------------- -DMat& NDG3D::Filter3D_cutoff(int Nc, double frac) -//--------------------------------------------------------- -{ - // Initialize 3D cut off filter matrix of order N - - DMat_Diag filterdiag(Np, 1.0); - - // build cut-off filter - int sk = 1; - for (int i=0; i<=N; ++i) { - for (int j=0; j<=(N-i); ++j) { - for (int k=0; k<=(N-i-j); ++k) { - if ((i+j+k) >= Nc) { - filterdiag(sk) = frac; - } - ++sk; - } - } - } - - DMat* F = new DMat("Filter", OBJ_temp); - (*F) = V * filterdiag * invV; - return (*F); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/FindLocalCoords3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/FindLocalCoords3D.cpp deleted file mode 100644 index e5c9bd6..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/FindLocalCoords3D.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// FindLocalCoords3D.cpp -// function [rOUT, sOUT, tOUT] = FindLocalCoords3D(k, xi, yi, zi) -// 2007/10/03 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -void NDG3D::FindLocalCoords3D -( - int k, - const DVec& xi, - const DVec& yi, - const DVec& zi, - DVec& rOUT, - DVec& sOUT, - DVec& tOUT -) -//--------------------------------------------------------- -{ - // Globals3D; - - int v1=EToV(k,1), v2=EToV(k,2), v3=EToV(k,3), v4=EToV(k,4); - - double v1x=VX(v1), v2x=VX(v2), v3x=VX(v3), v4x=VX(v4); - double v1y=VY(v1), v2y=VY(v2), v3y=VY(v3), v4y=VY(v4); - double v1z=VZ(v1), v2z=VZ(v2), v3z=VZ(v3), v4z=VZ(v4); - - // x = v1x*(-1-r-s-t)/2 + v2x*(1+r)/2 + v3x*(1+s)/2 + v4x*(1+t)/2 - // y = v1y*(-1-r-s-t)/2 + v2y*(1+r)/2 + v3y*(1+s)/2 + v4y*(1+t)/2 - // z = v1z*(-1-r-s-t)/2 + v2z*(1+r)/2 + v3z*(1+s)/2 + v4z*(1+t)/2 - // - // (v2x-v1x) (v3x-v1x) (v4x-v1x) * (r) = 2*x + v1x - v2x - v3x - v4x - // (v2y-v1y) (v3y-v1y) (v4y-v1y) * (s) = 2*y + v1y - v2y - v3y - v4y - // (v2z-v1z) (v3z-v1z) (v4z-v1z) * (t) = 2*z + v1z - v2z - v3z - v4z - - DMat A(3,3); - A(1,1) = v2x-v1x; A(1,2) = v3x-v1x; A(1,3) = v4x-v1x; - A(2,1) = v2y-v1y; A(2,2) = v3y-v1y; A(2,3) = v4y-v1y; - A(3,1) = v2z-v1z; A(3,2) = v3z-v1z; A(3,3) = v4z-v1z; - - int len = xi.length(); - DMat rhs(3,len, "rhs"), rst("rst"); - - rhs.set_row(1, 2.0*xi + (v1x-v2x-v3x-v4x) ); - rhs.set_row(2, 2.0*yi + (v1y-v2y-v3y-v4y) ); - rhs.set_row(3, 2.0*zi + (v1z-v2z-v3z-v4z) ); - -#if (0) - dumpDMat(A, "A"); - dumpDMat(rhs, "rhs"); -#endif - - rst = A|rhs; - -#if (0) - dumpDMat(rst, "rst"); -#endif - - - rOUT = rst.get_row(1); - sOUT = rst.get_row(2); - tOUT = rst.get_row(3); - -#if (0) - dumpDVec(rOUT, "rOUT"); - dumpDVec(sOUT, "sOUT"); - dumpDVec(tOUT, "tOUT"); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/GeometricFactors3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/GeometricFactors3D.cpp deleted file mode 100644 index 68ae0ce..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/GeometricFactors3D.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// GeometricFactors3D.m -// function [rx,sx,tx,ry,sy,ty,rz,sz,tz,J] = ... -// GeometricFactors3D(x,y,z,Dr,Ds,Dt) -// 2007/10/07 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -// overloaded global version: matrix args -//--------------------------------------------------------- -void GeometricFactors3D -( - const DMat& x, const DMat& y, const DMat& z, - const DMat& Dr, const DMat& Ds, const DMat& Dt, - DMat& rx, DMat& sx, DMat& tx, - DMat& ry, DMat& sy, DMat& ty, - DMat& rz, DMat& sz, DMat& tz, - DMat& J -) -//--------------------------------------------------------- -{ - // function [rx,sx,tx,ry,sy,ty,rz,sz,tz,J] = ... - // GeometricFactors3D(x,y,z,Dr,Ds,Dt) - // Purpose : Compute the metric elements for the local - // mappings of the elements - - // calculate geometric factors - DMat xr=Dr*x, xs=Ds*x, xt=Dt*x; - DMat yr=Dr*y, ys=Ds*y, yt=Dt*y; - DMat zr=Dr*z, zs=Ds*z, zt=Dt*z, tmp; - - J = xr.dm(ys.dm(zt)-zs.dm(yt)) - - yr.dm(xs.dm(zt)-zs.dm(xt)) + - zr.dm(xs.dm(yt)-ys.dm(xt)); - - rx = (ys.dm(zt) - zs.dm(yt)).dd(J); - ry = -(xs.dm(zt) - zs.dm(xt)).dd(J); - rz = (xs.dm(yt) - ys.dm(xt)).dd(J); - - sx = -(yr.dm(zt) - zr.dm(yt)).dd(J); - sy = (xr.dm(zt) - zr.dm(xt)).dd(J); - sz = -(xr.dm(yt) - yr.dm(xt)).dd(J); - - tx = (yr.dm(zs) - zr.dm(ys)).dd(J); - ty = -(xr.dm(zs) - zr.dm(xs)).dd(J); - tz = (xr.dm(ys) - yr.dm(xs)).dd(J); -} - - -// overloaded global version: vector args -//--------------------------------------------------------- -void GeometricFactors3D -( - const DVec& x, const DVec& y, const DVec& z, - const DMat& Dr, const DMat& Ds, const DMat& Dt, - DVec& rx, DVec& sx, DVec& tx, - DVec& ry, DVec& sy, DVec& ty, - DVec& rz, DVec& sz, DVec& tz, - DVec& J -) -//--------------------------------------------------------- -{ - // function [rx,sx,tx,ry,sy,ty,rz,sz,tz,J] = ... - // GeometricFactors3D(x,y,z,Dr,Ds,Dt) - // Purpose : Compute the metric elements for the local - // mappings of the elements - - // calculate geometric factors - DVec xr = Dr*x, xs = Ds*x, xt = Dt*x; - DVec yr = Dr*y, ys = Ds*y, yt = Dt*y; - DVec zr = Dr*z, zs = Ds*z, zt = Dt*z; - - J = xr.dm(ys.dm(zt)-zs.dm(yt)) - - yr.dm(xs.dm(zt)-zs.dm(xt)) + - zr.dm(xs.dm(yt)-ys.dm(xt)); - - rx = (ys.dm(zt) - zs.dm(yt)).dd(J); - ry = -(xs.dm(zt) - zs.dm(xt)).dd(J); - rz = (xs.dm(yt) - ys.dm(xt)).dd(J); - - sx = -(yr.dm(zt) - zr.dm(yt)).dd(J); - sy = (xr.dm(zt) - zr.dm(xt)).dd(J); - sz = -(xr.dm(yt) - yr.dm(xt)).dd(J); - - tx = (yr.dm(zs) - zr.dm(ys)).dd(J); - ty = -(xr.dm(zs) - zr.dm(xs)).dd(J); - tz = (xr.dm(ys) - yr.dm(xs)).dd(J); -} - - - -// member version: matrix args -//--------------------------------------------------------- -void NDG3D::GeometricFactors3D() -//--------------------------------------------------------- -{ - // function [rx,sx,tx,ry,sy,ty,rz,sz,tz,J] = ... - // GeometricFactors3D(x,y,z,Dr,Ds,Dt) - // Purpose : Compute the metric elements for the local - // mappings of the elements - - // calculate geometric factors - DMat xr=Dr*x, xs=Ds*x, xt=Dt*x; - DMat yr=Dr*y, ys=Ds*y, yt=Dt*y; - DMat zr=Dr*z, zs=Ds*z, zt=Dt*z, tmp; - - J = xr.dm(ys.dm(zt)-zs.dm(yt)) - - yr.dm(xs.dm(zt)-zs.dm(xt)) + - zr.dm(xs.dm(yt)-ys.dm(xt)); - - rx = (ys.dm(zt) - zs.dm(yt)).dd(J); - ry = -(xs.dm(zt) - zs.dm(xt)).dd(J); - rz = (xs.dm(yt) - ys.dm(xt)).dd(J); - - sx = -(yr.dm(zt) - zr.dm(yt)).dd(J); - sy = (xr.dm(zt) - zr.dm(xt)).dd(J); - sz = -(xr.dm(yt) - yr.dm(xt)).dd(J); - - tx = (yr.dm(zs) - zr.dm(ys)).dd(J); - ty = -(xr.dm(zs) - zr.dm(xs)).dd(J); - tz = (xr.dm(ys) - yr.dm(xs)).dd(J); -} - - -// member version (cubature) -//--------------------------------------------------------- -void NDG3D::GeometricFactors3D(Cub3D& cub) -//--------------------------------------------------------- -{ - // Calculate geometric factors - DMat xr=cub.Dr*this->x, xs=cub.Ds*this->x, xt=cub.Dt*this->x; - DMat yr=cub.Dr*this->y, ys=cub.Ds*this->y, yt=cub.Dt*this->y; - DMat zr=cub.Dr*this->z, zs=cub.Ds*this->z, zt=cub.Dt*this->z; - - cub.J = xr.dm(ys.dm(zt) - zs.dm(yt)) - - yr.dm(xs.dm(zt) - zs.dm(xt)) + - zr.dm(xs.dm(yt) - ys.dm(xt)); - - cub.rx = (ys.dm(zt) - zs.dm(yt)).dd(cub.J); - cub.ry = -(xs.dm(zt) - zs.dm(xt)).dd(cub.J); - cub.rz = (xs.dm(yt) - ys.dm(xt)).dd(cub.J); - - cub.sx = -(yr.dm(zt) - zr.dm(yt)).dd(cub.J); - cub.sy = (xr.dm(zt) - zr.dm(xt)).dd(cub.J); - cub.sz = -(xr.dm(yt) - yr.dm(xt)).dd(cub.J); - - cub.tx = (yr.dm(zs) - zr.dm(ys)).dd(cub.J); - cub.ty = -(xr.dm(zs) - zr.dm(xs)).dd(cub.J); - cub.tz = (xr.dm(ys) - yr.dm(xs)).dd(cub.J); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Globals3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Globals3D.cpp deleted file mode 100644 index d32d4dc..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Globals3D.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// Globals3D.cpp -// -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Globals3D.h" - - -//--------------------------------------------------------- -Globals3D::Globals3D() -//--------------------------------------------------------- -: - //------------------------------------- - // initialize member data - //------------------------------------- - Np(0), Nfp(0), N(0), K(0), Nfaces(4), - NODETOL(1e-12), - r("r"), s("s"), t("t"), - Dr("Dr"), Ds("Ds"), Dt("Dt"), LIFT("LIFT"), - Drw("Drw"), Dsw("Dsw"), Dtw("Dtw"), MassMatrix("MassMatrix"), - Fx("Fx"), Fy("Fy"), Fz("Fz"), nx("nx"), ny("ny"), nz("nz"), Fscale("Fscale"), sJ("sJ"), - vmapB("vmapB"), mapB("mapB"), Fmask("Fmask"), BCType("BCType"), saveBCType("saveBCType"), - mapI( "mapI"), mapO( "mapO"), mapW( "mapW"), mapF( "mapF"), mapC( "mapC"), mapS( "mapS"), mapM( "mapM"), mapP( "mapP"), mapD( "mapD"), mapN( "mapN"), - vmapI("vmapI"), vmapO("vmapO"), vmapW("vmapW"), vmapF("vmapF"), vmapC("vmapC"), vmapS("vmapS"), vmapM("vmapM"), vmapP("vmapP"), vmapD("vmapD"), vmapN("vmapN"), - rx("rx"), ry("ry"), rz("rz"), sx("sx"), sy("sy"), sz("sz"), tx("tx"), ty("ty"), tz("tz"), J("J"), - rk4a("rk4a"), rk4b("rk4b"), rk4c("rk4c"), - EToE("EToE"), EToF("EToF"), EToV("EToV"), - V("V"), invV("invV"), VVT("VVT"), - VX("VX"), VY("VY"), VZ("VZ"), x("x"), y("y"), z("z"), - - // +NBN: added - materialVals("materialVals"), epsilon("epsilon"), - tstep(0), Nsteps(0), - dt(0.001), time(0.0), FinalTime(0.0), RKtime(0.0), - pi(M_PI), eps(2.2204e-16), // NBN: Matlab @ AMD64 - Xmin(0.0), Xmax(0.0), Ymin(0.0), Ymax(0.0), Zmin(0.0), Zmax(0.0), - Nv(0), Nmats(0), Nbcs(0), Nsd(0), - bIs3D(false), bCoord3D(false), bElement3D(false) - //------------------------------------------------------- -{ - init(); -} - - -//--------------------------------------------------------- -Globals3D::~Globals3D() -//--------------------------------------------------------- -{} - - -//--------------------------------------------------------- -void Globals3D::init() -//--------------------------------------------------------- -{ - pi = 4.0*atan(1.0); // set pi to machine precision - eps = 2.2204e-16; // match 32-bit Matlab on AMD64 - - rk4a.resize(5); - rk4b.resize(5); - rk4c.resize(6); - - // Low storage Runge-Kutta coefficients - rk4a(1) = 0.0; - rk4a(2) = -567301805773.0 / 1357537059087.0; - rk4a(3) = -2404267990393.0 / 2016746695238.0; - rk4a(4) = -3550918686646.0 / 2091501179385.0; - rk4a(5) = -1275806237668.0 / 842570457699.0; - - rk4b(1) = 1432997174477.0 / 9575080441755.0; - rk4b(2) = 5161836677717.0 / 13612068292357.0; - rk4b(3) = 1720146321549.0 / 2090206949498.0; - rk4b(4) = 3134564353537.0 / 4481467310338.0; - rk4b(5) = 2277821191437.0 / 14882151754819.0; - - rk4c(1) = 0.0; - rk4c(2) = 1432997174477.0 / 9575080441755.0; - rk4c(3) = 2526269341429.0 / 6820363962896.0; - rk4c(4) = 2006345519317.0 / 3224310063776.0; - rk4c(5) = 2802321613138.0 / 2924317926251.0; - rk4c(6) = 1.0; -} - - -//--------------------------------------------------------- -void Globals3D::reset() -//--------------------------------------------------------- -{} - - -//--------------------------------------------------------- -void Globals3D::clear() -//--------------------------------------------------------- -{} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Grad3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Grad3D.cpp deleted file mode 100644 index 86ed5fa..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Grad3D.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Grad3D.m -// function [dUdx, dUdy, dUdz] = GradH3D(U) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -void NDG3D::Grad3D -( - const DMat& U, // [in] - DMat& dUdx, // [out] - DMat& dUdy, // [out] - DMat& dUdz // [out] -) -//--------------------------------------------------------- -{ - // function [dUdx, dUdy, dUdz] = GradH3D(U) - // purpose: compute local elemental physical spatial derivatives of U - - // compute local derivatives on reference tetrahedron - DMat dUdr = Dr*U, dUds = Ds*U, dUdt = Dt*U; - - // compute physical spatial derivatives using the chain rule - dUdx = rx.dm(dUdr) + sx.dm(dUds) + tx.dm(dUdt); - dUdy = ry.dm(dUdr) + sy.dm(dUds) + ty.dm(dUdt); - dUdz = rz.dm(dUdr) + sz.dm(dUds) + tz.dm(dUdt); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/GradSimplex3DP.cpp b/cpp/nudg++/trunk/Src/Codes3D/GradSimplex3DP.cpp deleted file mode 100644 index 5fe6fce..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/GradSimplex3DP.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// GradSimplex3DP.m -// function [V3Dr, V3Ds, V3Dt] = GradSimplex3DP(a,b,c,id,jd,kd) -// 2007/06/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void GradSimplex3DP -( - const DVec& a, // [in] - const DVec& b, // [in] - const DVec& c, // [in] - int id, // [in] - int jd, // [in] - int kd, // [in] - DVec& V3Dr, // [out] - DVec& V3Ds, // [out] - DVec& V3Dt // [out] -) -//--------------------------------------------------------- -{ - // function [V3Dr, V3Ds, V3Dt] = GradSimplex3DP(a,b,c,id,jd,kd) - // Purpose: Return the derivatives of the modal basis (id,jd,kd) - // on the 3D simplex at (a,b,c) - - DVec fa, dfa, gb, dgb, hc, dhc, tmp; - - - fa = JacobiP(a,0,0,id); dfa = GradJacobiP(a,0,0,id); - gb = JacobiP(b,2*id+1,0,jd); dgb = GradJacobiP(b,2*id+1,0,jd); - hc = JacobiP(c,2*(id+jd)+2,0,kd); dhc = GradJacobiP(c,2*(id+jd)+2,0,kd); - - // r-derivative - V3Dr = dfa.dm(gb.dm(hc)); - if (id>0) { V3Dr *= pow(0.5*(1.0-b), double(id-1)); } - if (id+jd>0) { V3Dr *= pow(0.5*(1.0-c), double(id+jd-1)); } - - // s-derivative - V3Ds = V3Dr.dm(0.5*(1.0+a)); - tmp = dgb.dm(pow(0.5*(1.0-b), double(id))); - - if (id>0) { tmp -= (0.5*id) * gb.dm(pow(0.5*(1.0-b), (id-1.0))); } - if (id+jd>0) { tmp *= pow(0.5*(1.0-c),(id+jd-1.0)); } - tmp = fa.dm(tmp.dm(hc)); - V3Ds += tmp; - - // t-derivative - V3Dt = V3Dr.dm(0.5*(1.0+a)) + tmp.dm(0.5*(1.0+b)); - tmp = dhc.dm(pow(0.5*(1.0-c), double(id+jd))); - if (id+jd>0) { tmp -= (0.5*(id+jd)) * hc.dm(pow(0.5*(1.0-c), (id+jd-1.0))); } - tmp = fa.dm(gb.dm(tmp)); - tmp *= pow(0.5*(1.0-b), double(id)); - V3Dt += tmp; - - // normalize - double fac = pow(2.0, (2.0*id + jd+1.5)); - V3Dr *= fac; V3Ds *= fac; V3Dt *= fac; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/GradVandermonde3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/GradVandermonde3D.cpp deleted file mode 100644 index 6e0b333..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/GradVandermonde3D.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// GradVandermonde3D.m -// function [V3Dr,V3Ds,V3Dt] = GradVandermonde3D(N,r,s,t) -// 2007/06/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void GradVandermonde3D -( - int N, // [in] - const DVec& r, // [in] - const DVec& s, // [in] - const DVec& t, // [in] - DMat& V3Dr, // [out] - DMat& V3Ds, // [out] - DMat& V3Dt // [out] -) -//--------------------------------------------------------- -{ - // function [V3Dr,V3Ds,V3Dt] = GradVandermonde3D(N,r,s,t) - // Purpose : Initialize the gradient of the modal basis (i,j,k) - // at (r,s,t) at order N - - int Nr=r.size(), Nc=(N+1)*(N+2)*(N+3)/6; - V3Dr.resize(Nr,Nc); V3Ds.resize(Nr,Nc); V3Dt.resize(Nr,Nc); - DVec a,b,c, ddr,dds,ddt; - - // find tensor-product coordinates - rsttoabc(r,s,t, a,b,c); - - // Initialize matrices - int sk = 1; - for (int i=0; i<=N; ++i) { - for (int j=0; j<=(N-i); ++j) { - for (int k=0; k<=(N-i-j); ++k) { - GradSimplex3DP(a,b,c,i,j,k, ddr,dds,ddt); - V3Dr(All,sk)=ddr; V3Ds(All,sk)=dds; V3Dt(All,sk)=ddt; - ++sk; - } - } - } -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Hrefine3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Hrefine3D.cpp deleted file mode 100644 index d1f38c9..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Hrefine3D.cpp +++ /dev/null @@ -1,249 +0,0 @@ -// Hrefine3D.cpp -// function Hrefine3D(refineflag) -// 2007/10/13 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -/////////////////////////////////////////////////////////// -// -// temporary helper/utility routines -// -/////////////////////////////////////////////////////////// - -// void Mat_COL::set(int Nr, int Nc, ...) - -template void set84 -( - Mat_COL& A, int Nr, int Nc, - T i11, T i12, T i13, T i14, - T i21, T i22, T i23, T i24, - T i31, T i32, T i33, T i34, - T i41, T i42, T i43, T i44, - T i51, T i52, T i53, T i54, - T i61, T i62, T i63, T i64, - T i71, T i72, T i73, T i74, - T i81, T i82, T i83, T i84 -) -{ - A.resize(8,4, false); - A(1,1)=i11; A(1,2)=i12; A(1,3)=i13; A(1,4)=i14; - A(2,1)=i21; A(2,2)=i22; A(2,3)=i23; A(2,4)=i24; - A(3,1)=i31; A(3,2)=i32; A(3,3)=i33; A(3,4)=i34; - A(4,1)=i41; A(4,2)=i42; A(4,3)=i43; A(4,4)=i44; - A(5,1)=i51; A(5,2)=i52; A(5,3)=i53; A(5,4)=i54; - A(6,1)=i61; A(6,2)=i62; A(6,3)=i63; A(6,4)=i64; - A(7,1)=i71; A(7,2)=i72; A(7,3)=i73; A(7,4)=i74; - A(8,1)=i81; A(8,2)=i82; A(8,3)=i83; A(8,4)=i84; -} - - -template void set46 -( - Mat_COL& A, int Nr, int Nc, - T i11, T i12, T i13, T i14, T i15, T i16, - T i21, T i22, T i23, T i24, T i25, T i26, - T i31, T i32, T i33, T i34, T i35, T i36, - T i41, T i42, T i43, T i44, T i45, T i46 -) -{ - A.resize(4,6, false); - A(1,1)=i11; A(1,2)=i12; A(1,3)=i13; A(1,4)=i14; A(1,5)=i15; A(1,6)=i16; - A(2,1)=i21; A(2,2)=i22; A(2,3)=i23; A(2,4)=i24; A(2,5)=i25; A(2,6)=i26; - A(3,1)=i31; A(3,2)=i32; A(3,3)=i33; A(3,4)=i34; A(3,5)=i35; A(3,6)=i36; - A(4,1)=i41; A(4,2)=i42; A(4,3)=i43; A(4,4)=i44; A(4,5)=i45; A(4,6)=i46; -} - - - -//--------------------------------------------------------- -void NDG3D::Hrefine3D(IVec& refineflag) -//--------------------------------------------------------- -{ - DVec lVX("lVX"), lVY("lVY"), lVZ("lVZ"); - - int a=1, b=2, c=3, d=4, e=5, - f=6, g=7, h=8, i=9, j=10; - - // a b c d e f g h i j - lVX.load(10, " 0 1 0 0 0.5 0.5 0.0 0.0 0.5 0.0 "); - lVY.load(10, " 0 0 1 0 0.0 0.5 0.5 0.0 0.0 0.5 "); - lVZ.load(10, " 0 0 0 1 0.0 0.0 0.0 0.5 0.5 0.5 "); - - assert(4 == Nfaces); - - IMat lEToV(8,4, "lEToV"), im84(8,4, "im84"), oFnodes(4,6, "oFnodes"); - - set84(lEToV, 8,4, - a, e, g, h, - e, b, f, i, - g, f, c, j, - h, i, j, d, - e, g, h, i, - h, i, g, j, - e, f, g, i, - g, i, f, j); - - set46(oFnodes, 4,6, - a, e, b, f, c, g, - a, e, b, i, d, h, - b, f, c, j, d, i, - a, g, c, j, d, h); - - IMat vnum(gRowData, 4,3, "1 2 3 1 2 4 2 3 4 3 1 4"); - - int lK = lEToV.num_rows(); - IMat lBCType(lK, Nfaces), tm1, tm2; - IVec tv(3),tv1,tv2, oFn,vnp,ksids; - int kk=0,ff=0,oo=0; - for (kk=1; kk<=lK; ++kk) { - for (ff=1; ff<=Nfaces; ++ff) { - for (oo=1; oo<=Nfaces; ++oo) - { - oFn = oFnodes.get_row(oo); - vnp = vnum.get_row(ff); - tm1 = lEToV(kk, vnp); const IVec& knodes = dynamic_cast(tm1); - - //tv = intersect(lEToV(k, vnum(p,All)), oFnodes(o,All)); - tv = intersect(knodes, oFn); - - if ( tv.length()==3 ) { - lBCType(kk, ff) = oo; - } - } - } - } - - int NV = VX.length()+1; - int sp_len = NV + NV*NV; - - // sparse buffers nnz vals,triplet - CSd newVX(sp_len,1, NV, 1, 1); - CSd newVY(sp_len,1, NV, 1, 1); - CSd newVZ(sp_len,1, NV, 1, 1); - - Index1D II(1, NV-1); - newVX(II,1) = VX; - newVY(II,1) = VY; - newVZ(II,1) = VZ; - - IVec ids("ids"); - int oldK = K, f1=0; - - for (int k1=1; k1<=oldK; ++k1) { - if (refineflag(k1)) - { - a = EToV(k1,1); - b = EToV(k1,2); - c = EToV(k1,3); - d = EToV(k1,4); - - e = NV + std::max(a*NV+b, b*NV + a); - f = NV + std::max(b*NV+c, c*NV + b); - g = NV + std::max(a*NV+c, c*NV + a); - h = NV + std::max(a*NV+d, d*NV + a); - i = NV + std::max(b*NV+d, d*NV + b); - j = NV + std::max(c*NV+d, d*NV + c); - - //ks = [k1, K+1:K+7]; - IVec ks(1, k1); ks.append(Range(K+1,K+7)); - - //-------------------------- - // EToV(ks,:) = [a e g h; - // e b f i; - // g f c j; - // h i j d; - // e g h i; - // h i g j; - // e f g i; - // g i f j]; - //-------------------------- - - set84(im84, 8,4, - a, e, g, h, - e, b, f, i, - g, f, c, j, - h, i, j, d, - e, g, h, i, - h, i, g, j, - e, f, g, i, - g, i, f, j); - - //EToV(ks,All) = im84; - EToV.merge_rows(ks, im84); - - for (f1=1; f1<=Nfaces; ++f1) - { - tv = lBCType(All,f1); - ids = find(tv, '!', 0); - ksids = ks(ids); - tm1 = lBCType(ids,f1); - tm2 = BCType(k1, (const IVec&)tm1); - - // expand BCType to accommodate new range - int maxI=ksids.max_val(), maxR=BCType.num_rows(); - if (maxI>maxR) {BCType.realloc(maxI, BCType.num_cols());} - - BCType(ksids,f1) = trans(tm2); - } - - K += 7; - - newVX.set1(e,1, 0.5*(VX(a)+VX(b))); - newVX.set1(f,1, 0.5*(VX(b)+VX(c))); - newVX.set1(g,1, 0.5*(VX(c)+VX(a))); - newVX.set1(h,1, 0.5*(VX(a)+VX(d))); - newVX.set1(i,1, 0.5*(VX(b)+VX(d))); - newVX.set1(j,1, 0.5*(VX(c)+VX(d))); - - newVY.set1(e,1, 0.5*(VY(a)+VY(b))); - newVY.set1(f,1, 0.5*(VY(b)+VY(c))); - newVY.set1(g,1, 0.5*(VY(c)+VY(a))); - newVY.set1(h,1, 0.5*(VY(a)+VY(d))); - newVY.set1(i,1, 0.5*(VY(b)+VY(d))); - newVY.set1(j,1, 0.5*(VY(c)+VY(d))); - - newVZ.set1(e,1, 0.5*(VZ(a)+VZ(b))); - newVZ.set1(f,1, 0.5*(VZ(b)+VZ(c))); - newVZ.set1(g,1, 0.5*(VZ(c)+VZ(a))); - newVZ.set1(h,1, 0.5*(VZ(a)+VZ(d))); - newVZ.set1(i,1, 0.5*(VZ(b)+VZ(d))); - newVZ.set1(j,1, 0.5*(VZ(c)+VZ(d))); - } - } - - //------------------------------------- - // drop duplicates and sort - //------------------------------------- - newVX.compress(true); - newVY.compress(true); - newVZ.compress(true); - -//ids = sort(unique(EToV(:)), 'ascend'); - ids = unique(EToV); - - - int len=ids.max_val(); - IVec gnum(len); - gnum(ids) = Range(1,ids.length()); - - VX = full( newVX, ids ); - VY = full( newVY, ids ); - VZ = full( newVZ, ids ); - - // EToV = gnum(EToV); - EToV.set_map(EToV, gnum); - - int NV_old = NV-1; // local counters - this->Nv = VX.length(); // update member variable - - umLOG(1, "Hrefine3D [%d] : old Nv = %4d, new Nv = %4d\n", ++refine_count, NV_old, Nv); - umLOG(1, " old K = %4d, new K = %4d\n\n", oldK, K); - - -#if (0) - tetramesh(EToV, [VX', VY', VZ']) -#endif - -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/InterpMatrix3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/InterpMatrix3D.cpp deleted file mode 100644 index 27df7a6..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/InterpMatrix3D.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// InterpMatrix3D.cpp -// function [IM] = InterpMatrix3D(rout, sout, tout) -// 2007/09/23 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -DMat& NDG3D::InterpMatrix3D(const DVec& rout, const DVec& sout, const DVec& tout) -//--------------------------------------------------------- -{ - // function [IM] = InterpMatrix3D(rout, sout, tout) - // purpose: compute local elemental interpolation matrix - - DMat *IM = new DMat("IM", OBJ_temp), Vout; - - // compute Vandermonde at (rout,sout,tout) - Vout = Vandermonde3D(N, rout, sout, tout); - - // build interpolation matrix - (*IM) = Vout * this->invV; - return (*IM); -} - - -//--------------------------------------------------------- -void NDG3D::InterpMatrix3D(Cub3D& cub) -//--------------------------------------------------------- -{ - // compute Vandermonde at (rout,sout) - DMat Vout = Vandermonde3D(this->N, cub.R, cub.S, cub.T); - - // build interpolation matrix - cub.V = Vout * this->invV; - - // store transpose - cub.VT = trans(cub.V); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/InterpNodeShapes3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/InterpNodeShapes3D.cpp deleted file mode 100644 index acbee51..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/InterpNodeShapes3D.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// InterpNodeShapes3D.cpp -// function interpmat = InterpNodeShapes3D(k, xi, yi, zi) -// 2007/10/03 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -DMat& NDG3D::InterpNodeShapes3D -( - int k, - const DVec& xi, - const DVec& yi, - const DVec& zi -) -//--------------------------------------------------------- -{ - DVec rOUT, sOUT, tOUT; - FindLocalCoords3D(k, xi, yi, zi, rOUT, sOUT, tOUT); - - DMat *tmp = new DMat("(outV/V)", OBJ_temp); - DMat& interpmat=(*tmp); - - DMat outV = Vandermonde3D(N, rOUT, sOUT, tOUT); - interpmat = outV/this->V; - return interpmat; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/IntersectTest3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/IntersectTest3D.cpp deleted file mode 100644 index ac2d4a3..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/IntersectTest3D.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// IntersectTest3D.cpp -// function [retval,poly] = IntersectTest3D(x1, x2) -// 2007/10/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include "Poly3D.h" - - -// returns true if polygons intersect -//--------------------------------------------------------- -bool IntersectTest3D(const DM& X1, const DM& X2, Poly3D& poly) -//--------------------------------------------------------- -{ - bool retval = false; - - int Nverts=3, i=0,j=0; DVec point,v1,v2,v3; - - // make "non-const" to allow "borrow" - DM& x1 = const_cast(X1); - DM& x2 = const_cast(X2); - - // Clear any existing polynomial - poly.Clear(); - - // find nodes of triangle 1 which lie in triangle 2 - for (i=1; i<=Nverts; ++i) { - point.borrow(3, x1.pCol(i)); - if (PointInTri3D(x2, point)) { - poly.AddPoint(point); - } - } - - // triangle 1 is totally inside triangle 2 - if (3 == poly.m_N) { - - v1.borrow(3, x1.pCol(1)); - v2.borrow(3, x1.pCol(2)); - v3.borrow(3, x1.pCol(3)); - - poly.AddTriangle(v1, v2, v3); - return true; - } - - // find nodes of triangle 2 which lie in triangle 1 - int cnt1 = 0; - for (i=1; i<=Nverts; ++i) { - point.borrow(3, x2.pCol(i)); - if (PointInTri3D(x1, point)) { - poly.AddPoint(point); - ++cnt1; - } - } - - // triangle 2 is totally inside 1 - if (3 == cnt1) { - - v1.borrow(3, x2.pCol(1)); - v2.borrow(3, x2.pCol(2)); - v3.borrow(3, x2.pCol(3)); - - poly.AddTriangle(v1, v2, v3); - return true; - } - - // now check edge intersections - DVec res(3), vert11,vert12,vert21,vert22; - int cnt2=0, idx=0,jdx=0; bool btest=false; - for (i=1; i<=Nverts; ++i) { - for (j=1; j<=Nverts; ++j) { - idx = 1+(i%Nverts); jdx = 1+(j%Nverts); - vert11.borrow(3, x1.pCol(i)); vert12.borrow(3, x1.pCol(idx)); - vert21.borrow(3, x2.pCol(j)); vert22.borrow(3, x2.pCol(jdx)); - btest = EdgeIntersect3D(vert11, vert12, vert21, vert22, res); - if (btest) { - poly.AddPoint(res); - ++cnt2; - } - } - } - - if (poly.m_N <=2) { - return false; // There is no 2 dimensional intersection - } - else if (3 == poly.m_N) - { - v1.borrow(3, poly.m_xyz.pCol(1)); - v2.borrow(3, poly.m_xyz.pCol(2)); - v3.borrow(3, poly.m_xyz.pCol(3)); - poly.AddTriangle(v1, v2, v3); // There is one triangle - return true; - } - else - { - poly.BuildTriangles(); // There is more than one triangle - return true; - } -} - diff --git a/cpp/nudg++/trunk/Src/Codes3D/Lift3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Lift3D.cpp deleted file mode 100644 index c69c9b2..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Lift3D.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// Lift3D.m -// function [LIFT] = Lift3D(N,R,S,T) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -DMat& NDG3D::Lift3D() -//--------------------------------------------------------- -{ - // function [LIFT] = Lift3D(N, r, s, t) - // Purpose : Compute 3D surface to volume lift operator used in DG formulation - - DMat Emat(Np, Nfaces*Nfp),VFace,massFace; - DVec faceR,faceS; IVec idr; Index1D JJ; - - for (int face=1; face<=Nfaces; ++face) { - // process face - if (1==face) {faceR = r(Fmask(All,1)); faceS = s(Fmask(All,1));} - else if (2==face) {faceR = r(Fmask(All,2)); faceS = t(Fmask(All,2));} - else if (3==face) {faceR = s(Fmask(All,3)); faceS = t(Fmask(All,3));} - else if (4==face) {faceR = s(Fmask(All,4)); faceS = t(Fmask(All,4));} - - VFace = Vandermonde2D(N, faceR, faceS); - massFace = inv(VFace*trans(VFace)); - - idr = Fmask(All,face); - //idc = (face-1)*Nfp+1: face*Nfp; - JJ.reset((face-1)*Nfp+1, face*Nfp); - - //Emat(idr, JJ) = Emat(idr, JJ) + massFace; - Emat(idr, JJ) = massFace; // TW: += -> = - } - - // inv(mass matrix)*\I_n (L_i,L_j)_{edge_n} - LIFT = V*(trans(V)*Emat); - return LIFT; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Make3DCouetteGeom.cpp b/cpp/nudg++/trunk/Src/Codes3D/Make3DCouetteGeom.cpp deleted file mode 100644 index d1e86df..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Make3DCouetteGeom.cpp +++ /dev/null @@ -1,193 +0,0 @@ -// Make3DCouetteGeom.cpp -// -// 2007/07/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void Make3DCouetteGeom -( - double r1, int Ntheta1, // inner cylinder - double r2, int Ntheta2, // outer cylinder - double zh, int Nz // height and vert. slices -) -//--------------------------------------------------------- -{ - if (Ntheta1<3 || Ntheta1>1024) { umWARNING("Make3DCouetteGeom", "Please set Ntheta1 in {3:1024}. Was %d", Ntheta1); return; } - if (Ntheta2<3 || Ntheta2>1024) { umWARNING("Make3DCouetteGeom", "Please set Ntheta2 in {3:1024}. Was %d", Ntheta2); return; } - - // allocate storage - DMat c1Top(3,Ntheta1), c1Bse(3,Ntheta1); - DMat c2Top(3,Ntheta2), c2Bse(3,Ntheta2); - double x=0.0; int i=0,j=0,Nv=0,face=0,sk=0; - - //------------------------------------- - // Build inner circle - //------------------------------------- - - // set angle increment (resolution) for inner circle - double dtheta1 = TWOPI/double(Ntheta1); - for (i=1; i<=Ntheta1; ++i) { - x=(i-1)*dtheta1; - c1Top(1,i)=r1*cos(x); c1Top(2,i)=r1*sin(x);c1Top(3,i)=zh; - c1Bse(1,i)=r1*cos(x); c1Bse(2,i)=r1*sin(x);c1Bse(3,i)=0.0; - } - - //------------------------------------- - // Build outer circle - //------------------------------------- - - // set angle increment (resolution) for outer circle - double dtheta2 = TWOPI/double(Ntheta2); - for (i=1; i<=Ntheta2; ++i) { - x=(i-1)*dtheta2; - c2Top(1,i)=r2*cos(x); c2Top(2,i)=r2*sin(x); c2Top(3,i)=zh; - c2Bse(1,i)=r2*cos(x); c2Bse(2,i)=r2*sin(x); c2Bse(3,i)=0.0; - } - - //dumpDMat(trans(c1Top), "c1Top"); - //dumpDMat(trans(c2Top), "c2Top"); - - //------------------------------------- - // Write GRUMMP .bdry format - //------------------------------------- - int Nvert = (2*Ntheta2) + (2*Ntheta1); - int Npoly = Ntheta2 + Ntheta1; - - string fname("Couette.bdry"); - FILE* fp=fopen(fname.c_str(), "w"); - fprintf(fp, "#\n# Boundary geometry defining concentric cylinders \n"); - fprintf(fp, "# for cylindrical Taylor-Couette flow simulation:\n#\n"); - fprintf(fp, "# %d vertices %d boundary polygons\n#\n", Nvert, Npoly+4); - fprintf(fp, "%d %d\n", Nvert, Npoly+4); - fprintf(fp, "#\n# Vertex coordinates\n#\n"); - - // write top of outer cylinder - for (i=1; i<=Ntheta2; ++i) { fprintf(fp, "%16.12lf %16.12lf %16.12lf\n", c2Top(1,i), c2Top(2,i), c2Top(3,i)); } - // write base of outer cylinder - for (i=1; i<=Ntheta2; ++i) { fprintf(fp, "%16.12lf %16.12lf %16.12lf\n", c2Bse(1,i), c2Bse(2,i), c2Bse(3,i)); } - - // write top of inner cylinder - for (i=1; i<=Ntheta1; ++i) { fprintf(fp, "%16.12lf %16.12lf %16.12lf\n", c1Top(1,i), c1Top(2,i), c1Top(3,i)); } - // write base of inner cylinder - for (i=1; i<=Ntheta1; ++i) { fprintf(fp, "%16.12lf %16.12lf %16.12lf\n", c1Bse(1,i), c1Bse(2,i), c1Bse(3,i)); } - - //------------------------------------- - // Set ids of the 4 verts in each face - //------------------------------------- - - // 1: outer cylinder wall - IVec id(Ntheta2*(4+1) + Ntheta1*(4+1)); - sk=1; - for (face=0; face 1.0) { - m_eps = 0.5*m_eps; - tol1 = 1.0 + m_eps; - } - - // default: no h-refinement of mesh - Nrefine = 0; refine_count = 0; - - // only valid if this->HasAnalyticSol(); - m_maxAbsError = -9.9e9; - - class_name = "NDG3DSim"; - umTRC(3, "Created NDG3D object (no. %d) \n", N3Dobjects); -} - - -//--------------------------------------------------------- -NDG3D::~NDG3D() -//--------------------------------------------------------- -{ - timer.stop(); // finished timing - --N3Dobjects; // decrement count of 2D simulators - - if (g_D3 == this) { - // invalidate global pointer - g_D3 = NULL; - } - - umTRC(3, "Deleted NDG3D object (%d remain).\n", N3Dobjects); -} - - -//--------------------------------------------------------- -void NDG3D::InitRun() -//--------------------------------------------------------- -{ - // perform any initializations that should - // be done between multiple runs: - - time = 0.0; // reset time - RKtime = 0.0; // reset RKtime - tstep = 1; // reset current step -//Nsteps = 0; // reset number of steps -//Nreport = 2; // set frequency of reporting (param) -//Nreport = 5; // set frequency of reporting (param) - Nreport = 20; // set frequency of reporting (param) -//Nreport = 1000; // no reports when timing - Nrender = Nreport; // output frequency (param) - - // reset time counters - ti0 = ti1 = 0.0; - time_rhs = 0.0; - time_rhs_c = 0.0; - time_flux = 0.0; - time_upw = 0.0; - time_bc = 0.0; - time_source = 0.0; - time_iter = 0.0; - time_limit = 0.0; - time_work = 0.0; - time_total = 0.0; -} - - -//--------------------------------------------------------- -void NDG3D::Summary() -//--------------------------------------------------------- -{ - //------------------------------------- - // default summary of current simulator - //------------------------------------- - umLOG(1, "\nNuDG++ 3D simulation:\n" - " Model type = %s\n" - " Order (N) = %d\n" - " Np = %d\n" - " K = %d\n" - " FileName = %s\n" - " report freq = %d\n" - " render freq = %d\n" - " plot field = %d\n" - " Vtk interp = %d\n", - this->GetClassName(), this->N, this->Np, - this->K, GetMeshFileName(), - Nreport, Nrender, Nplotfield, NvtkInterp); - - if (this->Stationary()) { - umLOG(1, " Stationary = true\n\n"); - } else { - umLOG(1, " Finaltime = %0.2g\n" - " time-step = %0.5g (inital dt)\n" - " num. steps = %d\n\n\n", - this->FinalTime, this->dt, this->Nsteps); - } - - m_bSummaryShown = true; -} - - -//--------------------------------------------------------- -void NDG3D::Report(bool bForce) -//--------------------------------------------------------- -{} - -//--------------------------------------------------------- -void NDG3D::FinalReport() -//--------------------------------------------------------- -{} - - -//--------------------------------------------------------- -double NDG3D::GetAnalyticError() -//--------------------------------------------------------- -{ - // only valid if this->HasAnalyticSol(); - return m_maxAbsError; -} - - -#if (0) -//######################################################### -void NDG3D::AdjustSphBC -( - double radius, // radius - double Cx, // center x - double Cy, // center y - double Cz, // center z - int bc // select boundary faces -) -//######################################################### -{ - // Store original BC data - saveBCType = BCType; - - IMat sphfaces; - if (BC_All == bc) { - // faces marked with any boundary condition - sphfaces = find2D(BCType, '>', (int)BC_None); - } else { - // faces marked with selected bc - sphfaces = find2D(BCType, '=', bc); - } - if (sphfaces.num_rows()>0) - { - IVec k=sphfaces(All,1); // elem indices - //IVec f=sphfaces(All,2); // face indices - curved = sort(k,true); - straight = setdiff( Range(1,K), curved ); - MakeSphere3D(sphfaces, radius, Cx, Cy, Cz); - // turn cylinders into walls - //IVec ids = find(BCType, '=', (int)BC_Cyl); - //BCType(ids) = BC_Wall; - } else { - straight.range(1,K); - curved.resize(0); - } - -} -//######################################################### -#endif - - -//--------------------------------------------------------- -void NDG3D::CalcElemCentroids(DMat& centroid) -//--------------------------------------------------------- -{ - // Calculate element centroids for volume, face nodes - centroid.resize (K, 3); - double x1,x2,x3,x4, y1,y2,y3,y4, z1,z2,z3,z4; - for (int k=1; k<=K; ++k) { - x1 = this->VX(EToV(k,1)); x2 = this->VX(EToV(k,2)); x3 = this->VX(EToV(k,3)); x4 = this->VX(EToV(k,4)); - y1 = this->VY(EToV(k,1)); y2 = this->VY(EToV(k,2)); y3 = this->VY(EToV(k,3)); y4 = this->VY(EToV(k,4)); - z1 = this->VZ(EToV(k,1)); z2 = this->VZ(EToV(k,2)); z3 = this->VZ(EToV(k,3)); z4 = this->VZ(EToV(k,4)); - // assign a centroid for element k - centroid(k,1) = (x1+x2+x3+x4)/4.0; - centroid(k,2) = (y1+y2+y3+y4)/4.0; - centroid(k,3) = (z1+z2+z3+z4)/4.0; - } -} - diff --git a/cpp/nudg++/trunk/Src/Codes3D/NDG3DDriver.cpp b/cpp/nudg++/trunk/Src/Codes3D/NDG3DDriver.cpp deleted file mode 100644 index 33ef734..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/NDG3DDriver.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// NDG3DDriver.cpp -// -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -// declare available simulators -#include "Maxwell3D.h" -#include "Euler3D.h" -#include "TestPoissonIPDG3D.h" -#include "ROHOP3D.h" - - - -//--------------------------------------------------------- -void NDG3DDriver(int Nsim) -//--------------------------------------------------------- -{ -//Nsim = 1; // Maxwell3D -//Nsim = 2; // Euler3D - Nsim = 3; // ROHOP3D -//Nsim = 10; // Test: PoissonIPDG3D - - NDG3D* p=NULL; - - try - { - switch (Nsim) { - case 1: p = new Maxwell3D; break; // 3D Maxwell simulator - case 2: p = new Euler3D; break; // 3D Euler simulator - case 3: p = new ROHOP3D; break; // 3D ROHOP3D simulator - // Test drivers ------------------------------------------------- - case 10: p = new TestPoissonIPDG3D; break; // PoissonIPDG3D - //--------------------------------------------------------------- - default: p = NULL; break; - } - - if (p) - { - p->Driver(); // call driver - delete p; // delete simulator - umLOG(1, "\nSimulation complete.\n\n"); - } - else { - umWARNING("NDG3DDriver", "No simulator created"); - } - } catch (...) {umWARNING("NDG3DDriver", "exception caught from sim %d", Nsim);} - -} - diff --git a/cpp/nudg++/trunk/Src/Codes3D/NDG3D_Output.cpp b/cpp/nudg++/trunk/Src/Codes3D/NDG3D_Output.cpp deleted file mode 100644 index 7a2b61a..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/NDG3D_Output.cpp +++ /dev/null @@ -1,540 +0,0 @@ -// NDG3D_Output.cpp -// write selected fields to file -// 2007/10/16 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -// Utility routines -//--------------------------------------------------------- - -// find number of tetrahedra per element -int OutputSampleNelmt3D(int sample_N) -{ - return (sample_N-1)*(sample_N-1)*(sample_N-1); -} - -// find number of nodes per face -int OutputSampleNpts3D(int sample_N) -{ - return sample_N*(sample_N+1)*(sample_N+2)/6; -} - -// load {R,S,T} output nodes -void OutputSampleNodes3D(int sample_N, DVec& R, DVec& S, DVec& T) -{ - int Npts = OutputSampleNpts3D(sample_N); - R.resize(Npts); S.resize(Npts); T.resize(Npts); - double denom = (double)(sample_N-1); - for (int sk=1, i=0; iK * Npts; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNuDG++ 3D simulation"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - int newNpts=0; - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - - DMat newX, newY, newZ, newFData; - - // Build new {X,Y,Z} vertices that regularize the - // elements, then interpolate solution fields onto - // this new set of elements: - OutputSampleXYZ(Output_N, newX, newY, newZ, FData, newFData, zfield); -//double maxF1 = newFData.max_col_val_abs(1), scaleF=1.0; -//if (maxF1 != 0.0) { scaleF = 1.0/maxF1; } - - newNpts = newX.num_rows(); - - // write 3D vertex data - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=newNpts; ++n) { - // use exponential format to allow for - // arbitrary (astro, nano) magnitudes: - fprintf(fp, "\n%20.12e %20.12e %20.12e", - newX(n, k), newY(n, k), newZ(n,k)); - } - } - - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - IMat newELMT; - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, vtkTotalConns); - - // build regularized tri elements at selected order - OutputSampleELMT3D(Output_N, newELMT); - newNpts = OutputSampleNpts3D(Output_N); - - int newNTet = newELMT.num_rows(); - int newNVert = newELMT.num_cols(); - - // write element connectivity to file - for (int k=0; kK; ++k) { - int nodesk = k*newNpts; - for (int n=1; n<=newNTet; ++n) { - fprintf(fp, "\n%d", newNVert); - for (int i=1; i<=newNVert; ++i) { - fprintf(fp, " %5d", nodesk+newELMT(n, i)); - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d", vtkTotalCells); - - for (int k=0; kK; ++k) { - fprintf(fp, "\n"); - for (int i=1; i<=Ncells; ++i) { - fprintf(fp, "10 "); // 10:VTK_TETRA - if (! (i%10)) - fprintf(fp, "\n"); - } - } - - //------------------------------------- - // 5. Write the scalar "vtkPointData" - //------------------------------------- - - fprintf(fp, "\n\nPOINT_DATA %d", vtkTotalPoints); - - // For each field, write POINT DATA for each point - // in the vtkUnstructuredGrid. - - int Nfields = FData.num_cols(); - for (int fld=1; fld<=Nfields; ++fld) - { - fprintf(fp, "\nSCALARS field%d double 1", fld); - fprintf(fp, "\nLOOKUP_TABLE default"); - - // Write the scalar data, using exponential format - // to allow for arbitrary (astro, nano) magnitudes: - for (int n=1; n<=newFData.num_rows(); ++n) { - fprintf(fp, "\n%20.12e ", newFData(n, fld)); - } - } - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG3D::Output_Mesh() -//--------------------------------------------------------- -{ - static int count = 0; - string output_dir = "."; - - // Write the tetrahedra that underlie current DG mesh - // in vtk format. Here we write the basic tetrahedra - // either read from the original .neu file, or as - // adapted during adaptive mesh refinement (AMR). - - string buf = umOFORM("%s/mesh3D_N%d_%04d.vtk", output_dir.c_str(), this->N, ++count); - FILE *fp = fopen(buf.c_str(), "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", buf.c_str()); - return; - } - - // Set flags and totals - - int Ncells = 1; // 1 "cell" per tetrahedron - int Npts = 4; // 4 vertices per tetrahedron - - this->Nv = this->VX.length(); - - // set totals for Vtk output - int vtkTotalPoints = this->Nv; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNuDG++ 3D mesh"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - // write 3D vertex data to file - for (int i=1; i<=this->Nv; ++i) { - fprintf(fp, "\n%20.12e %20.12e %20.12e", VX(i), VY(i), VZ(i)); - } - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, vtkTotalConns); - - // write element connectivity to file - for (int k=1; k<=this->K; ++k) { - fprintf(fp, "\n4 %5d %5d %5d %5d", - EToV(k,1)-1, EToV(k,2)-1, - EToV(k,3)-1, EToV(k,4)-1); - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d\n", vtkTotalCells); - - for (int k=1; k<=this->K; ++k) { - fprintf(fp, "10 "); // 10:VTK_TETRA - if (! (k%10)) - fprintf(fp, "\n"); - } - - //------------------------------------- - // 5. Write scalar "vtkCellData" - //------------------------------------- - - // TODO: output "cell data" such as element area, - // or quality measures such as min/max angles, etc. - - // TODO: "FaceData" i.e. boundary conditions - // ... - - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG3D::OutputSampleXYZ -( - int sample_N, - DMat &newX, - DMat &newY, - DMat &newZ, // e.g. triangles on a sphere - const DMat &FData, // old field data - DMat &newFData, // new field data - int zfield // if>0, use as z-elevation -) -//--------------------------------------------------------- -{ - DVec newR, newS, newT; - DMat newVDM; - int newNpts = 0; - - // Tetrahedra - OutputSampleNodes3D(sample_N, newR, newS, newT); - newNpts = newR.size(); - newVDM = Vandermonde3D(this->N, newR,newS,newT); - - const DMat& oldV = this->V; - DMat oldtonew(newNpts, this->Np, "OldToNew"); - oldtonew = trans(trans(oldV) | trans(newVDM)); - - //----------------------------------- - // interpolate the field data - //----------------------------------- - int Nfields = FData.num_cols(); - newFData.resize(newNpts*this->K, Nfields); - //DVec scales(Nfields); - - // For each field, use tOldF to wrap field i. - // Use tNewF to load the interpolated field - // directly into column i of the output array. - DMat tOldF, tNewF; - for (int i=1; i<=Nfields; ++i) { - tOldF.borrow(this->Np, this->K, (double*) FData.pCol(i)); - tNewF.borrow(newNpts, this->K, (double*)newFData.pCol(i)); - tNewF = oldtonew * tOldF; - //scales(i) = tNewF.max_col_val_abs(i); - } - - //----------------------------------- - // interpolate the vertices - //----------------------------------- - newX = oldtonew * this->x; - newY = oldtonew * this->y; - newZ = oldtonew * this->z; -} - - -//--------------------------------------------------------- -void NDG3D::OutputSampleELMT3D(int sample_N, IMat& ELMT) -//--------------------------------------------------------- -{ - int Nel = OutputSampleNelmt3D(sample_N); - int Nvert = 4; - - IMat startrow(sample_N, sample_N); - - for(int sk=0, i=0; iNfp, ++count); - - FILE *fp = fopen(buf.c_str(), "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", buf.c_str()); - return; - } - - // Set flags and totals - - int Npoints = this->Np; // volume nodes per element - if (bFaceNodes) { - Npoints = Nfp*Nfaces; // face nodes per element - } - - // set totals for Vtk output -#if (1) - // FIXME: no connectivity - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = vtkTotalPoints; - int vtkTotalConns = vtkTotalPoints; - int Ncells = Npoints; -#else - int vtkTotalPoints = this->K * Npoints; - int vtkTotalCells = this->K * Ncells; - int vtkTotalConns = (this->EToV.num_cols()+1) * this->K * Ncells; - int Ncells = this->N * this->N; -#endif - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nNDGFem simulation nodes"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", vtkTotalPoints); - - int newNpts=0; - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - if (bFaceNodes) { - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%20.12e %20.12e %6.1lf", Fx(n,k), Fy(n,k), Fz(n,k)); - } - } - } else { - for (int k=1; k<=this->K; ++k) { - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%20.12e %20.12e %6.1lf", x(n,k), y(n,k), z(n,k)); - } - } - } - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", vtkTotalCells, 2*vtkTotalConns); - - - // TODO: write element connectivity to file - // FIXME: out-putting as VTK_VERTEX - int nodesk=0; - for (int k=0; kK; ++k) { // for each element - for (int n=1; n<=Npoints; ++n) { - fprintf(fp, "\n%d", 1); // for each tetrahedron - for (int i=1; i<=1; ++i) { // FIXME: no connectivity - fprintf(fp, " %5d", nodesk); // nodes in nth tetrahedron - nodesk++; // indexed from 0 - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d", vtkTotalCells); - - for (int k=0; kK; ++k) { - fprintf(fp, "\n"); - for (int i=1; i<=Ncells; ++i) { - //fprintf(fp, "10 "); // 10: VTK_TETRA - //fprintf(fp, "5 "); // 5:VTK_TRIANGLE - fprintf(fp, "1 "); // 1:VTK_VERTEX - if (! (i%10)) - fprintf(fp, "\n"); - } - } - - // add final newline to output - fprintf(fp, "\n"); - fclose(fp); -} - - -//--------------------------------------------------------- -void NDG3D::PlotContour3D -( - int nn, - const DVec& field, - const DVec& cntrs -) -//--------------------------------------------------------- -{ - umWARNING("NDG3D::PlotContour3D", "TODO: not implemented"); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Nodes3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Nodes3D.cpp deleted file mode 100644 index 2736c65..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Nodes3D.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// Nodes3D.m -// function [X,Y,Z] = Nodes3D(p) -// 2007/06/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void Nodes3D(int p, DVec& X, DVec& Y, DVec& Z) -//--------------------------------------------------------- -{ - // function [X,Y,Z] = Nodes3D(p) - // Purpose: compute Warp & Blend nodes - // input: p = polynomial order of interpolant - // output: X,Y,Z vectors of node coordinates in equilateral tetrahedron - - // choose optimized blending parameter - DVec alphastore(gVecData, 15, - " 0.0000 0.0000 0.0000 0.1002 1.1332 " - " 1.5608 1.3413 1.2577 1.1603 1.10153 " - " 0.6080 0.4523 0.8856 0.8717 0.9655 "); - - double alpha = 1.0; - if (p<=15) { alpha = alphastore(p); } - - // total number of nodes and tolerance - // int N = (p+1)*(p+2)*(p+3)/6; - double tol=1e-10, sqrt3=sqrt(3.0), sqrt6=sqrt(6.0); - DVec r("r"),s("s"),t("t"), v1(3),v2(3),v3(3),v4(3), r1,r2; - DVec L1,L2,L3,L4, La,Lb,Lc,Ld, warp1, warp2, blend, denom, tv1,tv2; - IVec ids,ids1,ids2; DMat t1(4,3), t2(4,3), XYZ, shift; - - EquiNodes3D(p, r,s,t); // create equidistributed nodes - L1=(1.0+t)/2.0; L2=(1.0+s)/2.0; L3=(-(1.0+r+s+t)/2.0); L4=(1.0+r)/2.0; - - // set vertices of tetrahedron - v1(1)=(-1.0); v1(2)=(-1.0/sqrt3); v1(3)=(-1.0/sqrt6); - v2(1)=( 1.0); v2(2)=(-1.0/sqrt3); v2(3)=(-1.0/sqrt6); - v3(1)=( 0.0); v3(2)=( 2.0/sqrt3); v3(3)=(-1.0/sqrt6); - v4(1)=( 0.0); v4(2)=( 0.0 ); v4(3)=( 3.0/sqrt6); - - - // orthogonal axis tangents on faces 1-4 - t1(1,All) = v2-v1; t1(2,All) = v2-v1; - t1(3,All) = v3-v2; t1(4,All) = v3-v1; - t2(1,All) = v3-0.5*(v1+v2); t2(2,All) = v4-0.5*(v1+v2); - t2(3,All) = v4-0.5*(v2+v3); t2(4,All) = v4-0.5*(v1+v3); - - - // normalize tangents - for (int n=1; n<=4; ++n) { - r1 = t1.get_row(n); t1.set_row(n, r1/r1.norm()); - r2 = t2.get_row(n); t2.set_row(n, r2/r2.norm()); - } - - - // Warp and blend for each face (accumulated in shiftXYZ) - // form undeformed coordinates - XYZ = outer(L3,v1) + outer(L4,v2) + outer(L2,v3) + outer(L1,v4); - shift.resize(XYZ); - - for (int face=1; face<=4; ++face) { - - if (1==face) { La = L1; Lb = L2; Lc = L3; Ld = L4; } - else if (2==face) { La = L2; Lb = L1; Lc = L3; Ld = L4; } - else if (3==face) { La = L3; Lb = L1; Lc = L4; Ld = L2; } - else if (4==face) { La = L4; Lb = L1; Lc = L3; Ld = L2; } - - // compute warp tangential to face - WarpShiftFace3D(p, alpha, alpha, La, Lb, Lc, Ld, warp1, warp2); - - blend = Lb.dm(Lc); blend *= Ld; // compute volume blending - - //denom = (Lb+0.5*La) .*(Lc+0.5*La) .*(Ld+0.5*La); // modify linear blend - denom = (Lb+0.5*La); denom*=(Lc+0.5*La); denom*=(Ld+0.5*La); // modify linear blend - - ids = find(denom, '>', tol); - //blend(ids) = (1.0+(alpha*La(ids)).^2) .* blend(ids)./ denom(ids); - - tv1 = 1.0+sqr(alpha*La(ids)); tv2 = dd(blend(ids), denom(ids)); - blend(ids) = tv1.dm(tv2); - - // compute warp & blend - shift += outer( blend.dm(warp1), t1.get_row(face) ) + - outer( blend.dm(warp2), t2.get_row(face) ); - - // fix face warp - //ids = find(Latol) + (Lc>tol) + (Ld>tol) < 3)); - ids1 = find( La, '<', tol); - ids2 = find((Lb.gt(tol)+Lc.gt(tol)+Ld.gt(tol)), '<', 3.0); - ids = find(ids1, '&', ids2); - - //shift(ids,All) = outer(warp1(ids), t1.get_row(face)) + - // outer(warp2(ids), t2.get_row(face)); - - DVec tv1a = warp1(ids), tv1b = t1.get_row(face); - DVec tv2a = warp2(ids), tv2b = t2.get_row(face); - shift(ids,All) = outer(tv1a, tv1b) + outer(tv2a, tv2b); - } - - XYZ += shift; - X = XYZ(All,1); Y = XYZ(All,2); Z = XYZ(All,3); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Normals3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Normals3D.cpp deleted file mode 100644 index ea7f7c3..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Normals3D.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// Normals3D.m -// function [nx, ny, nz, sJ] = Normals3D() -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -void NDG3D::Normals3D() -//--------------------------------------------------------- -{ - // function [nx, ny, nz, sJ] = Normals3D() - // Purpose : Compute outward pointing normals at - // elements faces as well as surface Jacobians - - GeometricFactors3D(); - - // interpolate geometric factors to face nodes - DMat frx=rx(Fmask,All), fsx=sx(Fmask,All), ftx=tx(Fmask,All); - DMat fry=ry(Fmask,All), fsy=sy(Fmask,All), fty=ty(Fmask,All); - DMat frz=rz(Fmask,All), fsz=sz(Fmask,All), ftz=tz(Fmask,All); - - // build normals - nx.resize(4*Nfp, K); ny.resize(4*Nfp, K); nz.resize(4*Nfp, K); - Index1D fid1(1,Nfp), fid2(Nfp+1,2*Nfp), fid3(2*Nfp+1,3*Nfp), fid4(3*Nfp+1,4*Nfp); - - // face 1 - nx(fid1, All) = -ftx(fid1,All); - ny(fid1, All) = -fty(fid1,All); - nz(fid1, All) = -ftz(fid1,All); - - // face 2 - nx(fid2, All) = -fsx(fid2,All); - ny(fid2, All) = -fsy(fid2,All); - nz(fid2, All) = -fsz(fid2,All); - - // face 3 - nx(fid3, All) = frx(fid3,All) + fsx(fid3,All) + ftx(fid3,All); - ny(fid3, All) = fry(fid3,All) + fsy(fid3,All) + fty(fid3,All); - nz(fid3, All) = frz(fid3,All) + fsz(fid3,All) + ftz(fid3,All); - - // face 4 - nx(fid4, All) = -frx(fid4,All); - ny(fid4, All) = -fry(fid4,All); - nz(fid4, All) = -frz(fid4,All); - - // normalise - sJ = sqrt(sqr(nx) + sqr(ny) + sqr(nz)); - - nx.div_element(sJ); ny.div_element(sJ); nz.div_element(sJ); - sJ.mult_element(J(Fmask, All)); //sJ=sJ.*J(Fmask(:),:); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/PartialLiftData3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/PartialLiftData3D.cpp deleted file mode 100644 index 39d9029..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/PartialLiftData3D.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// PartialLiftData3D.cpp -// function [VM, gradVM, VP, gradVP] = ... -// PartialLiftData3D(k1, f1, k2, f2, xg, yg, zg) -// 2007/10/08 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -void NDG3D::PartialLiftData3D -( - int k1, int f1, // [in] - int k2, int f2, // [in] - const DVec& xg, // [in] - const DVec& yg, // [in] - const DVec& zg, // [in] - DMat& VM, // [out] - DMat gradVM[4], // [out] - DMat& VP, // [out] - DMat gradVP[4] // [out] -) -//--------------------------------------------------------- -{ - // function [VM, gradVM, VP, gradVP]=... - // PartialLiftData3D(k1, f1, k2, f2, xg, yg, zg) - // purpose: compute traces of basis functions and their gradients - - DMat_Diag Dgrx,Dgsx,Dgtx, Dgry,Dgsy,Dgty, Dgrz,Dgsz,Dgtz; - DVec grx,gsx,gtx,gry,gsy,gty,grz,gsz,gtz,gJ; - DVec xki,yki,zki, r1,s1,t1, r2,s2,t2; - - // find local coordinates of Gauss nodes on each neighbor - FindLocalCoords3D(k1, xg, yg, zg, r1,s1,t1); - FindLocalCoords3D(k2, xg, yg, zg, r2,s2,t2); - - // evaluate Lagrange interpolants and derivatives at Gauss points - VM = Vandermonde3D(N, r1,s1,t1)*invV; - VP = Vandermonde3D(N, r2,s2,t2)*invV; - - //------------------------------------------------------- - // calc. geometric factors at minus limit Gauss points - //------------------------------------------------------- - DMat DrM = VM*Dr, DsM = VM*Ds, DtM = VM*Dt; - xki.borrow(Np,x.pCol(k1)); yki.borrow(Np,y.pCol(k1)); zki.borrow(Np,z.pCol(k1)); - ::GeometricFactors3D(xki,yki,zki, DrM,DsM,DtM, grx,gsx,gtx, gry,gsy,gty, grz,gsz,gtz, gJ); - - int Nr = grx.length(); - // wrap {-} vectors as diagonal matrices - Dgrx.borrow(grx); Dgsx.borrow(gsx); Dgtx.borrow(gtx); - Dgry.borrow(gry); Dgsy.borrow(gsy); Dgty.borrow(gty); - Dgrz.borrow(grz); Dgsz.borrow(gsz); Dgtz.borrow(gtz); - - // use chain rule for computing - gradient in physical coordinates - gradVM[1] = Dgrx*DrM + Dgsx*DsM + Dgtx*DtM; - gradVM[2] = Dgry*DrM + Dgsy*DsM + Dgty*DtM; - gradVM[3] = Dgrz*DrM + Dgsz*DsM + Dgtz*DtM; - - //------------------------------------------------------- - // calc. geometric factors at plus limit Gauss points - //------------------------------------------------------- - DMat DrP = VP*Dr, DsP = VP*Ds, DtP = VP*Dt; - xki.borrow(Np,x.pCol(k2)); yki.borrow(Np,y.pCol(k2)); zki.borrow(Np,z.pCol(k2)); - ::GeometricFactors3D(xki,yki,zki, DrP,DsP,DtP, grx,gsx,gtx, gry,gsy,gty, grz,gsz,gtz, gJ); - - // wrap {+} vectors as diagonal matrices - Dgrx.borrow(grx); Dgsx.borrow(gsx); Dgtx.borrow(gtx); - Dgry.borrow(gry); Dgsy.borrow(gsy); Dgty.borrow(gty); - Dgrz.borrow(grz); Dgsz.borrow(gsz); Dgtz.borrow(gtz); - - // use chain rule for computing + gradient in physical coordinates - gradVP[1] = Dgrx*DrP + Dgsx*DsP + Dgtx*DtP; - gradVP[2] = Dgry*DrP + Dgsy*DsP + Dgty*DtP; - gradVP[3] = Dgrz*DrP + Dgsz*DsP + Dgtz*DtP; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/PhysDmatrices3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/PhysDmatrices3D.cpp deleted file mode 100644 index 06d4d02..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/PhysDmatrices3D.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// PhysDmatrices3D.cpp -// function [Dx,Dy,Dz] = PhysDmatrices3D(x1, y1, z1, interp) -// 2007/10/07 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -void NDG3D::PhysDmatrices3D -( - const DVec& x1, // [in] - const DVec& y1, // [in] - const DVec& z1, // [in] - const DMat& interp, // [in] - DMat& Dx, // [out] - DMat& Dy, // [out] - DMat& Dz // [out] -) -//--------------------------------------------------------- -{ - // function [Dx,Dy,Dz] = PhysDmatrices3D(x1, y1, z1, interp) - // Purpose : Initialize the (x,y,z) differentiation matrices - // on the simplex, evaluated at (x1,y1,z1) at order N - - DMat_Diag RX, SX, TX, RY, SY, TY, RZ, SZ, TZ; - DVec rx1,sx1,tx1, ry1,sy1,ty1, rz1,sz1,tz1, J1; - - DMat IDr=interp*Dr, IDs=interp*Ds, IDt=interp*Dt; - - ::GeometricFactors3D(x1,y1,z1,IDr,IDs,IDt, // [in] - rx1,sx1,tx1, // [out] - ry1,sy1,ty1, // [out] - rz1,sz1,tz1, J1); // [out] - - // load vectors as diagonal matrices - RX = rx1, SX = sx1, TX = tx1; - RY = ry1, SY = sy1, TY = ty1; - RZ = rz1, SZ = sz1, TZ = tz1; - - Dx = RX*IDr + SX*IDs + TX*IDt; - Dy = RY*IDr + SY*IDs + TY*IDt; - Dz = RZ*IDr + SZ*IDs + TZ*IDt; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/PoissonIPDG3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/PoissonIPDG3D.cpp deleted file mode 100644 index 96367ad..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/PoissonIPDG3D.cpp +++ /dev/null @@ -1,207 +0,0 @@ -// CurvedPoissonIPDG2D.m -// function [OP,MM] = PoissonIPDG3D() -// 2007/10/16 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -#define NDG_New_CHOLINC 1 - -//--------------------------------------------------------- -void NDG3D::PoissonIPDG3D(CSd& spOP, CSd& spMM) -//--------------------------------------------------------- -{ - // function [OP,MM] = PoissonIPDG3D() - // - // Purpose: Set up the discrete Poisson matrix directly - // using LDG. The operator is set up in the weak form - - - DVec faceR("faceR"), faceS("faceS"), faceT("faceT"); - DMat V2D; IVec Fm("Fm"); IVec i1_Nfp = Range(1,Nfp); - double opti1=0.0, opti2=0.0; int i=0; - - umLOG(1, "\n ==> {OP,MM} assembly: "); - opti1 = timer.read(); // time assembly - - // build local face matrices - DMat massEdge[5]; // = zeros(Np,Np,Nfaces); - for (i=1; i<=Nfaces; ++i) { - massEdge[i].resize(Np,Np); - } - - // face mass matrix 1 - Fm = Fmask(All,1); faceR=r(Fm); faceS=s(Fm); - V2D = Vandermonde2D(N, faceR, faceS); - massEdge[1](Fm,Fm) = inv(V2D*trans(V2D)); - - // face mass matrix 2 - Fm = Fmask(All,2); faceR = r(Fm); faceT = t(Fm); - V2D = Vandermonde2D(N, faceR, faceT); - massEdge[2](Fm,Fm) = inv(V2D*trans(V2D)); - - // face mass matrix 3 - Fm = Fmask(All,3); faceS = s(Fm); faceT = t(Fm); - V2D = Vandermonde2D(N, faceS, faceT); - massEdge[3](Fm,Fm) = inv(V2D*trans(V2D)); - - // face mass matrix 4 - Fm = Fmask(All,4); faceS = s(Fm); faceT = t(Fm); - V2D = Vandermonde2D(N, faceS, faceT); - massEdge[4](Fm,Fm) = inv(V2D*trans(V2D)); - - // build local volume mass matrix - MassMatrix = trans(invV)*invV; - - DMat Dx("Dx"),Dy("Dy"),Dz("Dz"), Dx2("Dx2"),Dy2("Dy2"),Dz2("Dz2"); - DMat Dn1("Dn1"),Dn2("Dn2"), mmE("mmE"), OP11("OP11"), OP12("OP12"); - DMat mmE_All_Fm1, mmE_Fm1_Fm1, Dn2_Fm2_All; - IMat rows1,cols1,rows2,cols2; int k1=0,f1=0,k2=0,f2=0,id=0; - Index1D entries, entriesMM, idsM; IVec fidM,vidM,Fm1,vidP,Fm2; - double lnx=0.0,lny=0.0,lnz=0.0,lsJ=0.0,hinv=0.0,gtau=0.0; - double N1N1 = double((N+1)*(N+1)); int NpNp = Np*Np; - - // build DG derivative matrices - int max_OP = (K*Np*Np*(1+Nfaces)); - int max_MM = (K*Np*Np); - - // "OP" triplets (i,j,x), extracted to {Ai,Aj,Ax} - IVec OPi(max_OP), OPj(max_OP), Ai,Aj; DVec OPx(max_OP), Ax; - // "MM" triplets (i,j,x) - IVec MMi(max_MM), MMj(max_MM); DVec MMx(max_MM); - IVec OnesNp = Ones(Np); - - // global node numbering - entries.reset(1,NpNp); entriesMM.reset(1,NpNp); - - OP12.resize(Np,Np); - - for (k1=1; k1<=K; ++k1) - { - if (! (k1%250)) { umLOG(1, "%d, ",k1); } - - rows1 = outer( Range((k1-1)*Np+1,k1*Np), OnesNp ); - cols1 = trans(rows1); - - // Build local operators - Dx = rx(1,k1)*Dr + sx(1,k1)*Ds + tx(1,k1)*Dt; - Dy = ry(1,k1)*Dr + sy(1,k1)*Ds + ty(1,k1)*Dt; - Dz = rz(1,k1)*Dr + sz(1,k1)*Ds + tz(1,k1)*Dt; - - OP11 = J(1,k1)*(trans(Dx)*MassMatrix*Dx + - trans(Dy)*MassMatrix*Dy + - trans(Dz)*MassMatrix*Dz); - - // Build element-to-element parts of operator - for (f1=1; f1<=Nfaces; ++f1) { - k2 = EToE(k1,f1); f2 = EToF(k1,f1); - - rows2 = outer( Range((k2-1)*Np+1, k2*Np), OnesNp ); - cols2 = trans(rows2); - - fidM = (k1-1)*Nfp*Nfaces + (f1-1)*Nfp + i1_Nfp; - vidM = vmapM(fidM); Fm1 = mod(vidM-1,Np)+1; - vidP = vmapP(fidM); Fm2 = mod(vidP-1,Np)+1; - - id = 1+(f1-1)*Nfp + (k1-1)*Nfp*Nfaces; - lnx = nx(id); lny = ny(id); lnz = nz(id); lsJ = sJ(id); - hinv = std::max(Fscale(id), Fscale(1+(f2-1)*Nfp, k2)); - - Dx2 = rx(1,k2)*Dr + sx(1,k2)*Ds + tx(1,k2)*Dt; - Dy2 = ry(1,k2)*Dr + sy(1,k2)*Ds + ty(1,k2)*Dt; - Dz2 = rz(1,k2)*Dr + sz(1,k2)*Ds + tz(1,k2)*Dt; - - Dn1 = lnx*Dx + lny*Dy + lnz*Dz; - Dn2 = lnx*Dx2 + lny*Dy2 + lnz*Dz2; - - mmE = lsJ*massEdge[f1]; - - gtau = 2.0 * N1N1 * hinv; // set penalty scaling - - if (EToE(k1,f1)==k1) { - OP11 += ( gtau*mmE - mmE*Dn1 - trans(Dn1)*mmE ); // ok - } - else - { - // interior face variational terms - OP11 += 0.5*( gtau*mmE - mmE*Dn1 - trans(Dn1)*mmE ); - - // extract mapped regions: - mmE_All_Fm1 = mmE(All,Fm1); - mmE_Fm1_Fm1 = mmE(Fm1,Fm1); - Dn2_Fm2_All = Dn2(Fm2,All); - - OP12 = 0.0; // reset to zero - OP12(All,Fm2) = -0.5*( gtau*mmE_All_Fm1 ); - OP12(Fm1,All) -= 0.5*( mmE_Fm1_Fm1*Dn2_Fm2_All ); - //OP12(All,Fm2) -= 0.5*(-trans(Dn1)*mmE_All_Fm1 ); - OP12(All,Fm2) += 0.5*( trans(Dn1)*mmE_All_Fm1 ); - - // load this set of triplets -#if (1) - OPi(entries)=rows1; OPj(entries)=cols2, OPx(entries)=OP12; - entries += (NpNp); -#else - //########################################################### - // load only the lower triangle (after droptol test?) - sk=0; start=entries(1); - for (int i=1; i<=NpNp; ++i) { - eid = start+i; - id=entries(eid); rid=rows1(i); cid=cols2(i); - if (rows1(rid) >= cid) { // take lower triangle - if ( fabs(OP12(id)) > 1e-15) { // drop small entries - ++sk; OPi(id)=rid; OPj(id)=cid, OPx(id)=OP12(id); - } - } - } - entries += sk; - //########################################################### -#endif - } - } - - OPi(entries )=rows1; OPj(entries )=cols1, OPx(entries )=OP11; - MMi(entriesMM)=rows1; MMj(entriesMM)=cols1; MMx(entriesMM)=J(1,k1)*MassMatrix; - entries += (NpNp); entriesMM += (NpNp); - } - umLOG(1, "\n ==> {OP,MM} to sparse\n"); - - entries.reset(1, entries.hi()-Np*Np); - - // Extract triplets from the large buffers. Note: this - // requires copying each array, and since these arrays - // can be HUGE(!), we force immediate deallocation: - - Ai=OPi(entries); OPi.Free(); - Aj=OPj(entries); OPj.Free(); - Ax=OPx(entries); OPx.Free(); - umLOG(1, " ==> triplets ready (OP) nnz = %10d\n", entries.hi()); - - // adjust triplet indices for 0-based sparse operators - Ai -= 1; Aj -= 1; MMi -= 1; MMj -= 1; int npk=Np*K; - -#if defined(NDG_USE_CHOLMOD) || defined(NDG_New_CHOLINC) - // load only the lower triangle tril(OP) free args? - spOP.load(npk,npk, Ai,Aj,Ax, sp_LT, false,1e-15, true); // {LT, false} -> TriL -#else - // select {upper,lower,both} triangles -//spOP.load(npk,npk, Ai,Aj,Ax, sp_LT, true,1e-15,true); // LT -> enforce symmetry -//spOP.load(npk,npk, Ai,Aj,Ax, sp_All,true,1e-15,true); // All-> includes "noise" -//spOP.load(npk,npk, Ai,Aj,Ax, sp_UT, false,1e-15,true); // UT -> triu(OP) only -#endif - - Ai.Free(); Aj.Free(); Ax.Free(); - - umLOG(1, " ==> triplets ready (MM) nnz = %10d\n", entriesMM.hi()); - - //------------------------------------------------------- - // The mass matrix operator will NOT be factorised, - // Load ALL elements (both upper and lower triangles): - //------------------------------------------------------- - spMM.load(npk,npk, MMi,MMj,MMx, sp_All,false,1.00e-15,true); - MMi.Free(); MMj.Free(); MMx.Free(); - - opti2 = timer.read(); // time assembly - umLOG(1, " ==> {OP,MM} converted to csc. (%g secs)\n", opti2-opti1); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/PoissonIPDGbc3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/PoissonIPDGbc3D.cpp deleted file mode 100644 index f1b3dd1..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/PoissonIPDGbc3D.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// PoissonIPDGbc3D.cpp -// function [bc] = PoissonIPDGbc3D(ubc) -// 2007/09/22 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -DMat& NDG3D::PoissonIPDGbc3D(DVec& ubc) -//--------------------------------------------------------- -{ - // function [bc] = PoissonIPDGbc3D(ubc) - // - // Purpose: Set up the discrete Poisson matrix directly - // using LDG. The operator is set up in the weak form - - - DVec faceR("faceR"), faceS("faceS"), faceT("faceT"); - DMat V2D("V2D"), Dx("Dx"),Dy("Dy"),Dz("Dz"), Dn1("Dn1"), mmE_Fm1("mmE(:,Fm1)"); - IVec Fm("Fm"), Fm1("Fm1"), fidM("fidM"); - double lnx=0.0,lny=0.0,lnz=0.0,lsJ=0.0,hinv=0.0,gtau=0.0; - int i=0,k1=0,f1=0,id=0; - IVec i1_Nfp = Range(1,Nfp); - double N1N1 = double((N+1)*(N+1)); - - // build local face matrices - DMat massEdge[5]; // = zeros(Np,Np,Nfaces); - for (i=1; i<=Nfaces; ++i) { - massEdge[i].resize(Np,Np); - } - - // face mass matrix 1 - Fm = Fmask(All,1); faceR = r(Fm); faceS = s(Fm); - V2D = Vandermonde2D(N, faceR, faceS); - massEdge[1](Fm,Fm) = inv(V2D*trans(V2D)); - - // face mass matrix 2 - Fm = Fmask(All,2); faceR = r(Fm); faceT = t(Fm); - V2D = Vandermonde2D(N, faceR, faceT); - massEdge[2](Fm,Fm) = inv(V2D*trans(V2D)); - - // face mass matrix 3 - Fm = Fmask(All,3); faceS = s(Fm); faceT = t(Fm); - V2D = Vandermonde2D(N, faceS, faceT); - massEdge[3](Fm,Fm) = inv(V2D*trans(V2D)); - - // face mass matrix 4 - Fm = Fmask(All,4); faceS = s(Fm); faceT = t(Fm); - V2D = Vandermonde2D(N, faceS, faceT); - massEdge[4](Fm,Fm) = inv(V2D*trans(V2D)); - - // build DG right hand side - DMat* pBC = new DMat(Np, K, "bc", OBJ_temp); - DMat& bc = (*pBC); // reference, for syntax - - for (k1=1; k1<=K; ++k1) - { - if (! (k1%100)) { umMSG(1, "%d, ",k1); } - - for (f1=1; f1<=Nfaces; ++f1) { - - if (EToE(k1,f1)==k1) - { - Fm1 = Fmask(All,f1); - fidM = (k1-1)*Nfp*Nfaces + (f1-1)*Nfp + i1_Nfp; - id = 1+(f1-1)*Nfp + (k1-1)*Nfp*Nfaces; - - lnx = nx(id); lny = ny(id); lnz = nz(id); - lsJ = sJ(id); hinv = Fscale(id); - - Dx = rx(1,k1)*Dr + sx(1,k1)*Ds + tx(1,k1)*Dt; - Dy = ry(1,k1)*Dr + sy(1,k1)*Ds + ty(1,k1)*Dt; - Dz = rz(1,k1)*Dr + sz(1,k1)*Ds + tz(1,k1)*Dt; - Dn1 = lnx*Dx + lny*Dy +lnz*Dz; - - //mmE = lsJ*massEdge(:,:,f1); - //bc(All,k1) += (gtau*mmE(All,Fm1) - Dn1'*mmE(All,Fm1))*ubc(fidM); - - mmE_Fm1 = massEdge[f1](All,Fm1); mmE_Fm1 *= lsJ; - - gtau = 2.0*N1N1*hinv; // set penalty scaling - bc(All,k1) += (gtau*mmE_Fm1 - trans(Dn1)*mmE_Fm1) * ubc(fidM); - } - } - } - umMSG(1, "\n"); - - return bc; -} - - diff --git a/cpp/nudg++/trunk/Src/Codes3D/Poly3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Poly3D.cpp deleted file mode 100644 index cead4e3..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Poly3D.cpp +++ /dev/null @@ -1,367 +0,0 @@ -// Poly3D.cpp -// utility class for polygons in 3D -// 2007/10/17 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include "Poly3D.h" - -int Poly3D::s_Npolys=0; - -//--------------------------------------------------------- -Poly3D::Poly3D() : m_N(0), m_Ntri(0) -//--------------------------------------------------------- -{ - ++s_Npolys; - -#ifndef NDEBUG - umTRC(1, "++Poly3D: %6d\n", s_Npolys); -#endif -} - - -//--------------------------------------------------------- -Poly3D::~Poly3D() -//--------------------------------------------------------- -{ - --s_Npolys; - -#ifndef NDEBUG - umTRC(1, "--Poly3D: %6d\n", s_Npolys); -#endif -} - - -//--------------------------------------------------------- -Poly3D::Poly3D(const Poly3D& p) -//--------------------------------------------------------- -{ - ++s_Npolys; - -#ifndef NDEBUG - umTRC(1, "++Poly3D: %6d (copy ctor)\n", s_Npolys); -#endif - - (*this) = p; -} - - -//--------------------------------------------------------- -Poly3D& Poly3D::operator=(const Poly3D& p) -//--------------------------------------------------------- -{ - if (this == &p) { return (*this); } - - if ((p.m_N<1) || (p.m_Ntri<1)) - { - this->Clear(); // p is empty? - } - else - { - m_N = p.m_N; // deep-copy data from p - m_Ntri = p.m_Ntri; - m_xyz = p.m_xyz; - m_x = p.m_x; - m_y = p.m_y; - m_z = p.m_z; - m_areas = p.m_areas; - } - return (*this); -} - - -//--------------------------------------------------------- -void Poly3D::Clear() -//--------------------------------------------------------- -{ - m_N = 0; m_Ntri = 0; - m_xyz.destroy(); m_x.destroy(); m_y.destroy(); - m_z.destroy(); m_areas.destroy(); -} - - -//--------------------------------------------------------- -bool Poly3D::HavePoint(const DVec& point) -//--------------------------------------------------------- -{ - const double* p1 = point.data(); - - double tol = 1e-6, normi=0.0; DVec pnti,tv; - for (int i=1; i<=m_N; ++i) - { - const double* p2 = m_xyz.pCol(i); - normi = sqrt( SQ(p1[0]-p2[0]) + - SQ(p1[1]-p2[1]) + - SQ(p1[2]-p2[2]) ); - if (normi < tol) { return true; } - } - return false; -} - - -//--------------------------------------------------------- -void Poly3D::AddPoint(const DVec& point) -//--------------------------------------------------------- -{ - if (!HavePoint(point)) { - // append this point - m_xyz.append_col(3, (double*)point.data()); - ++m_N; - } -} - - -//--------------------------------------------------------- -void Poly3D::AddTriangle(const DVec& v1, const DVec& v2, const DVec& v3) -//--------------------------------------------------------- -{ - // Get the area of the triangle to be added - double a = TriArea3D(v1, v2, v3); - double tol = 1e-6; - - // Check to make sure that we have a nondegenerate triangle - if (a > tol) - { - DVec x_vals, y_vals, z_vals; - x_vals.set(v1(1), v2(1), v3(1)); - y_vals.set(v1(2), v2(2), v3(2)); - z_vals.set(v1(3), v2(3), v3(3)); - - m_x.append_col(3, x_vals.data()); - m_y.append_col(3, y_vals.data()); - m_z.append_col(3, z_vals.data()); - - m_areas.append(a); - ++m_Ntri; - } -} - - -//--------------------------------------------------------- -void Poly3D::BuildTriangles() -//--------------------------------------------------------- -{ - // Calculate the center of the polygon - - umWARNING("Poly3D::BuildTriangles()", "TODO: Check from where this is called!"); - - int Nr=m_xyz.num_rows(), Nc=m_xyz.num_cols(); - DMat t_xyz; t_xyz.borrow(Nr,Nc, m_xyz.data()); - DVec cent = t_xyz.row_sums() / (double)m_N; -//DVec cent = sum(poly.m_xyz,2) / (double)m_N; - - // Sort the points by angle where the angle is - // measured from the center of the polygon - SortPoints(cent); - - // now build triangles - DVec a,b; double totalarea = 0.0; - for (int i=1; i<=m_N; ++i) { - a = t_xyz(All,i); - //b = poly.m_xyz(All, mod(i,poly.m_N)+1); - b = t_xyz(All, 1 + (i%m_N)); - AddTriangle(cent, a, b); - totalarea += m_areas(i); - } - - // Clear the polygon if the total area - // of the polygon is too small. - double tol = 1e-6; - if (totalarea < tol) { - Clear(); - } -} - - -//--------------------------------------------------------- -void Poly3D::SortPoints(const DVec& cent) -//--------------------------------------------------------- -{ - // Sort the points by angle from cent which is - // a point in the plane of the polygon. This - // is done in a counter-clockwise direction. - - // If less than 2 points, no need to sort - if (m_N < 2) { - return; - } - - // create local cartesian axis - DVec ref1,ref2,nor,axis1,axis2,vI,vJ,tmp; - - // wrap DM with DMat for utility routines - int Nr=m_xyz.num_rows(), Nc=m_xyz.num_cols(); - DMat t_xyz; t_xyz.borrow(Nr, Nc, m_xyz.data()); - - t_xyz.get_col(1) - cent; ref1 /= ref1.norm(); - - - // get two lines in the plane - ref1 = t_xyz.get_col(1) - cent; ref1 /= ref1.norm(); - ref2 = t_xyz.get_col(2) - cent; ref2 /= ref2.norm(); - - // normal to the plane (norm = ref1 X ref2) - nor(1) = ref1(2)*ref2(3) - ref1(3)*ref2(2); - nor(2) = ref1(3)*ref2(1) - ref1(1)*ref2(3); - nor(3) = ref1(1)*ref2(2) - ref1(2)*ref2(1); - - nor /= nor.norm(); - - // axis definition - axis1 = ref1; - - // axis2 = norm x axis1 - axis2(1) = nor(2)*axis1(3) - nor(3)*axis1(2); - axis2(2) = nor(3)*axis1(1) - nor(1)*axis1(3); - axis2(3) = nor(1)*axis1(2) - nor(2)*axis1(1); - - double costhetaI,sinthetaI, costhetaJ,sinthetaJ, thetaI,thetaJ; - - for (int i=1; i<=m_N; ++i) { - for (int j=(i+1); j<=m_N; ++j) { - vI = t_xyz.get_col(i) - cent; - vJ = t_xyz.get_col(j) - cent; - - costhetaI = vI.inner(axis1); - sinthetaI = vI.inner(axis2); - - costhetaJ = vJ.inner(axis1); - sinthetaJ = vJ.inner(axis2); - - thetaI = atan2(sinthetaI, costhetaI); - thetaJ = atan2(sinthetaJ, costhetaJ); - - // sort minimum angle difference first - if (thetaJ < thetaI) - { - // swap I and J - //t_xyz(All, [i j]) = t_xyz(All, [j i]); - - tmp = t_xyz.get_col(i); // copy column i - t_xyz.set_col(i, t_xyz.get_col(j)); // overwrite col i - t_xyz.set_col(j, tmp); // overwrite col j - } - } - } -} - - - - -/////////////////////////////////////////////////////////// -// -// helper routines (used by class Poly3D) -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -bool PointInTri3D(const DM& TRI, const DVec& point) -//--------------------------------------------------------- -{ - DVec va, vb, vc; - - DM& tri = const_cast(TRI); - va.borrow(3, tri.pCol(1)); vb.borrow(3, tri.pCol(2)); vc.borrow(3, tri.pCol(3)); - - double area = TriArea3D(va, vb, vc); - double area1 = TriArea3D(va, vb, point); - double area2 = TriArea3D(va, vc, point); - double area3 = TriArea3D(vb, vc, point); - - double tol = 1e-6; - double val = fabs(area1+area2+area3 - area); - return (val < tol) ? true : false; -} - - -//--------------------------------------------------------- -double TriArea3D(const DVec& Xa, const DVec& Xb, const DVec& Xc) -//--------------------------------------------------------- -{ - double x1 = Xb(1)-Xa(1); - double y1 = Xb(2)-Xa(2); - double z1 = Xb(3)-Xa(3); - - double x2 = Xc(1)-Xa(1); - double y2 = Xc(2)-Xa(2); - double z2 = Xc(3)-Xa(3); - - double c1 = y1*z2-z1*y2; - double c2 = z1*x2-x1*z2; - double c3 = x1*y2-y1*x2; - - double area = 0.5*sqrt(c1*c1 + c2*c2 + c3*c3); - return area; -} - - -//--------------------------------------------------------- -bool EdgeIntersect3D -( - const DVec& a1, // [in] - const DVec& b1, // [in] - const DVec& a2, // [in] - const DVec& b2, // [in] - DVec& xint // [out] -) -//--------------------------------------------------------- -{ - bool test = false; - xint = -999.0; // set xint to dummy vaklue - - double cx,cy,cz, dx,dy,dz, ex,ey,ez, t1,t2,mag,d; - - cx = (b2(2)-a2(2))*(b1(3)-a1(3)) - (b2(3)-a2(3))*(b1(2)-a1(2)); - cy = (b2(3)-a2(3))*(b1(1)-a1(1)) - (b2(1)-a2(1))*(b1(3)-a1(3)); - cz = (b2(1)-a2(1))*(b1(2)-a1(2)) - (b2(2)-a2(2))*(b1(1)-a1(1)); - - dx = (b2(2)-a2(2))*(a1(3)-a2(3)) - (b2(3)-a2(3))*(a1(2)-a2(2)); - dy = (b2(3)-a2(3))*(a1(1)-a2(1)) - (b2(1)-a2(1))*(a1(3)-a2(3)); - dz = (b2(1)-a2(1))*(a1(2)-a2(2)) - (b2(2)-a2(2))*(a1(1)-a2(1)); - - ex = (b1(2)-a1(2))*(a2(3)-a1(3)) - (b1(3)-a1(3))*(a2(2)-a1(2)); - ey = (b1(3)-a1(3))*(a2(1)-a1(1)) - (b1(1)-a1(1))*(a2(3)-a1(3)); - ez = (b1(1)-a1(1))*(a2(2)-a1(2)) - (b1(2)-a1(2))*(a2(1)-a1(1)); - - t1 = -(cx*dx + cy*dy + cz*dz); - t2 = cx*ex + cy*ey + cz*ez; - mag = cx*cx + cy*cy + cz*cz; - - double tol1 = 1e-6; - if (mag < tol1) { - // lines are colinear -- should be caught by "in" test - return false; - } - - t1/=mag; t2/=mag; - - DVec x1(3), x2(3); - - x1(1) = a1(1) + t1*(b1(1)-a1(1)); - x1(2) = a1(2) + t1*(b1(2)-a1(2)); - x1(3) = a1(3) + t1*(b1(3)-a1(3)); - - x2(1) = a2(1) + t2*(b2(1)-a2(1)); - x2(2) = a2(2) + t2*(b2(2)-a2(2)); - x2(3) = a2(3) + t2*(b2(3)-a2(3)); - - // make sure the segments really intersect. - d = SQ(x1(1)-x2(1)) + SQ(x1(2)-x2(2)) + SQ(x1(3)-x2(3)); - - double tol2 = 1e-6; - if (d>tol2) { - return false; - } - - if ( (t1 > -tol2 ) && - (t2 > -tol2 ) && - (t1 < (1.0+tol2)) && - (t2 < (1.0+tol2)) ) - { - xint = x1; // we have intersection! - return true; - } - return false; -} - diff --git a/cpp/nudg++/trunk/Src/Codes3D/Sample3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Sample3D.cpp deleted file mode 100644 index 2ea935a..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Sample3D.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// Sample3D.m -// function [sampleweights,sampletet] = Sample3D(xout, yout, zout) -// 2007/06/14 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -void tsearch3D (DVec& X, DVec& Y, DVec& Z, IMat& EtoV, // [in] - double xout, double yout, double zout, // [in] - int& id, // [out] element number containing vertex - DVec& bary); // [out] barycentric coords of vertex in element - - - -//--------------------------------------------------------- -void NDG3D::Sample3D -( - double xout, // [in] - double yout, // [in] - double zout, // [in] - DVec& sampleweights, // [out] - int& sampletet // [out] -) -//--------------------------------------------------------- -{ - // function [sampleweights,sampletet] = Sample3D(xout, yout, zout) - // purpose: input = coordinates of output data point - // output = number of containing tet and interpolation weights - - DVec sout(1), rout(1), tout(1); - -#if (0) - // find containing tet - [sampletet,tetbary] = tsearchn([VX', VY', VZ'], EToV, [xout,yout,zout]); -#else - //####################################################### - DVec tetbary(4); - tsearch3D(VX, VY, VZ, EToV, xout, yout, zout, sampletet,tetbary); - if (sampletet<1) { - umERROR("NDG3D::Sample3D", "point (%g,%g,%g) not in mesh (%d tets)", xout, yout, yout, EToV.num_rows()); - } - //####################################################### -#endif - - // Matlab barycentric coordinates -> biunit triangle coordinates - tout = 2.0*tetbary(4)-1.0; - sout = 2.0*tetbary(3)-1.0; - rout = 2.0*tetbary(2)-1.0; - - //------------------------------------------------------- - // If (xo,yo,zo) is a vertex, then {ro,so,to} should - // be in {-1,0,1}. Here we try to clean numerical noise - // before building the generalized Vandermonde matrix - double bary_tol=1e-10; - //------------------------------------------------------- - if (fabs( sout(1)+1.0 ) < bary_tol) {sout = -1.0;} - else if (fabs( sout(1) ) < bary_tol) {sout = 0.0;} - else if (fabs( sout(1)-1.0 ) < bary_tol) {sout = 1.0;} - //------------------------------------------------------- - if (fabs( rout(1)+1.0 ) < bary_tol) {rout = -1.0;} - else if (fabs( rout(1) ) < bary_tol) {rout = 0.0;} - else if (fabs( rout(1)-1.0 ) < bary_tol) {rout = 1.0;} - //------------------------------------------------------- - if (fabs( tout(1)+1.0 ) < bary_tol) {tout = -1.0;} - else if (fabs( tout(1) ) < bary_tol) {tout = 0.0;} - else if (fabs( tout(1)-1.0 ) < bary_tol) {tout = 1.0;} - //------------------------------------------------------- - - // build generalized Vandermonde for the sample point - DMat Vout = Vandermonde3D(N, rout, sout, tout); - - // build interpolation matrix for the sample point - sampleweights = Vout*this->invV; - // Note: return as a vector - -#if (0) - dumpDMat(Vout, "Vout"); - dumpDVec(sampleweights, "sampleweights"); - umERROR("Testing", "Nigel, check arrays"); -#endif - -} - - -//--------------------------------------------------------- -void tsearch3D -( - DVec& X, // [in] - DVec& Y, // [in] - DVec& Z, // [in] - IMat& EtoV, // [in] - double xout, // [in] - double yout, // [in] - double zout, // [in] - int& id, // [out] element number containing vertex - DVec& bary // [out] barycentric coords of vertex in element -) -//--------------------------------------------------------- -{ - // return the index of an element containing the node - // xi, together with the barycentric coordinates of - // xi in the selected element. If xi is not found in - // the mesh, return idx <= 0. - - assert(EtoV.num_cols() == 4); // 4 vertex ids for each tet. - int ntet = EtoV.num_rows(); // num elements in mesh - bool done=false; - double t_eps = -1.0e-8; // set tolerance -//double t_eps = -sqrt(eps); - - id = -1; bary.resize(4); IVec vids; DMat A=ones(4,4); - DVec q, b(4); b(1)=1.0; b(2)=xout; b(3)=yout; b(4)=zout; - - // find triangle containing point (xout,yout) - for (int i=1; i<=ntet; ++i) - { - // [1 x1 y1 z1] - // A = [1 x2 y2 z2] update A(:,2) A(:,3) A(:,4) - // [1 x3 y3 z3] - // [1 x4 y4 z4] - - vids=EtoV.get_row(i); - A(All,2)=X(vids); - A(All,3)=Y(vids); - A(All,4)=Z(vids); - - // Compute barycentric coordinate of each point - q = b/A; - - // if barycentric coords are all non-negative, then - // target point lies in element, or on its boundary - if (q.min_val() > t_eps) { - id = i; // set element index - bary = q; // set barycentric coordinates - done=true; // set flag to indicate succcess - break; // finished searching - } - } - if (!done) { - id = -1; // force invalid index - umLOG(1, "tsearch3D: failed to locate point (%g,%g,%g) in mesh (%d tets)", xout, yout, yout, ntet); - } -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Simplex3DP.cpp b/cpp/nudg++/trunk/Src/Codes3D/Simplex3DP.cpp deleted file mode 100644 index e576393..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Simplex3DP.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// Simplex3DP.m -// function [P] = Simplex3DP(a,b,c,i,j,k); -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -DVec& Simplex3DP(const DVec& a, const DVec& b, const DVec& c, int i, int j, int k) -//--------------------------------------------------------- -{ - // function [P] = Simplex3DP(a,b,c,i,j,k); - // Purpose : Evaluate 3D orthonormal polynomial - // on simplex at (a,b,c) of order (i,j,k). - - DVec* P = new DVec("P", OBJ_temp); - - DVec h1 = JacobiP(a,0.0,0.0,i), h2 = JacobiP(b,(2.0*i+1),0.0,j), h3 = JacobiP(c,(2.0*(i+j)+2),0.0,k); - -//P = 2.0*sqrt(2.0)*h1 .* h2 .* ((1.0-b).^i).*h3 .* ((1.0-c).^(i+j)); - - DVec tv1 = 2.0*sqrt(2.0)*h1.dm(h2); - DVec tv2 = pow(1.0-b,(double)i); - DVec tv3 = h3.dm(pow(1.0-c,(double)(i+j))); - - (*P) = tv1.dm( tv2.dm(tv3) ); - return (*P); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/StartUp3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/StartUp3D.cpp deleted file mode 100644 index 7f6972f..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/StartUp3D.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// StartUp3D.m -// -// 2007/06/14 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -bool NDG3D::StartUp3D() -//--------------------------------------------------------- -{ - // Purpose : Setup script, building operators, grid, metric, - // and connectivity tables for 3D meshes of tetrahedra. - - // Definition of constants - Np = (N+1)*(N+2)*(N+3)/6; Nfp = (N+1)*(N+2)/2; Nfaces=4; NODETOL = 1e-7; - - // Compute nodal set - DVec x1,y1,z1; - Nodes3D(N, x1,y1,z1); - xyztorst(x1,y1,z1, r,s,t); - - // Build reference element matrices - V = Vandermonde3D(N,r,s,t); invV = inv(V); - MassMatrix = trans(invV)*invV; - ::Dmatrices3D(N, r, s, t, V, Dr, Ds, Dt); - - - // build coordinates of all the nodes - IVec va = EToV(All,1), vb = EToV(All,2), vc = EToV(All,3), vd = EToV(All,4); - x = 0.5*(-(1.0+r+s+t)*VX(va) + (1.0+r)*VX(vb) + (1.0+s)*VX(vc) + (1.0+t)*VX(vd)); - y = 0.5*(-(1.0+r+s+t)*VY(va) + (1.0+r)*VY(vb) + (1.0+s)*VY(vc) + (1.0+t)*VY(vd)); - z = 0.5*(-(1.0+r+s+t)*VZ(va) + (1.0+r)*VZ(vb) + (1.0+s)*VZ(vc) + (1.0+t)*VZ(vd)); - - // find all the nodes that lie on each edge - IVec fmask1,fmask2,fmask3,fmask4; - fmask1 = find( abs(1.0+t), '<', NODETOL); - fmask2 = find( abs(1.0+s), '<', NODETOL); - fmask3 = find( abs(1.0+r+s+t), '<', NODETOL); - fmask4 = find( abs(1.0+r), '<', NODETOL); - Fmask.resize(Nfp,4); // set shape (M,N) before concat() - Fmask = concat(fmask1,fmask2,fmask3,fmask4); // load vector into shaped matrix - - Fx=x(Fmask,All); Fy=y(Fmask,All); Fz=z(Fmask,All); - - // Create surface integral terms - Lift3D(); - - // calculate geometric factors and normals - Normals3D(); - - Fscale = sJ.dd(J(Fmask,All)); - - // Build connectivity matrix - tiConnect3D(EToV, EToE, EToF); - - // Build connectivity maps - BuildMaps3D(); - - // Compute weak operators (could be done in preprocessing to save time) - DMat Vr,Vs,Vt; GradVandermonde3D(N, r, s, t, Vr, Vs, Vt); - - VVT = V*trans(V); - Drw = (V*trans(Vr))/VVT; Dsw = (V*trans(Vs))/VVT; Dtw = (V*trans(Vt))/VVT; - - return true; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/TopTheta.cpp b/cpp/nudg++/trunk/Src/Codes3D/TopTheta.cpp deleted file mode 100644 index 6f4204c..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/TopTheta.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// TopTheta.cpp -// function topu = TopTheta(u, theta) -// 2007/10/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -// template void Sort_Index(const Vector& A, Vector& S, IVec& IX, eDir dir); // =eAscend -void Sort_Index(const DVec& A, DVec& S, IVec& IX, eDir dir); // =eAscend - - -//--------------------------------------------------------- -IVec& TopTheta(const DVec& u, double theta, bool do_print) -//--------------------------------------------------------- -{ - DVec sortu("sortu"); IVec indu("indu"); - - IVec* tmp = new IVec("topu", OBJ_temp); IVec& topu=(*tmp); - - // [sortu,indu] = sort(u(:), eDescend); -//sort (u, sortu, indu, eDescend); -//Sort_Index(u, sortu, indu, eDescend); - Sort_Index (u, sortu, indu, eDescend); - - - //####################################################### - // FIXME: ask Tim if this should be u.sum_abs(); - // NBN: check for numerical noise: - double u_sum = u.sum(); - if (fabs(u_sum)<5e-14) -//if (0.0 == u_sum) - { - return topu; // return empty vector - } - //####################################################### - - DVec cumsortu = cumsum(sortu) / u_sum; - - topu = find(cumsortu, '<', theta); - - if (topu.size()<1) { - if (cumsortu(1)>1e-10) { - // topu.resize(1); topu(1)=indu(1); - topu.append(indu(1)); - } - } else { - topu = indu.get_map(topu); - } - - if (do_print) - { - //static int cntx=0; char buf[20]={""}; - //sprintf(buf, "topu_%d", ++cntx); - - //dumpDVec(u, "u"); - //dumpDVec(sortu, "sortu"); - //dumpIVec(indu, "indu"); - //dumpDVec(cumsortu, "cumsortu"); - //dumpIVec(topu, buf); - } - - - return topu; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/Vandermonde3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/Vandermonde3D.cpp deleted file mode 100644 index 321f5c2..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/Vandermonde3D.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// Vandermonde2D.cpp -// function [V3D] = Vandermonde3D(N, r, s, t); -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -DMat& Vandermonde3D(int N, const DVec& r, const DVec& s, const DVec& t) -//--------------------------------------------------------- -{ - // function [V3D] = Vandermonde3D(N, r, s, t); - // Purpose : Initialize the 3D Vandermonde Matrix. - // V_{ij} = phi_j(r_i, s_i, t_i); - - DMat *p3D = new DMat(r.size(),(N+1)*(N+2)*(N+3)/6, 0.0, OBJ_temp, "V3D"); - DMat& V3D = (*p3D); // shorthand - - // Transfer to (a,b,c) coordinates - DVec a,b,c; rsttoabc(r,s,t, a,b,c); - - // build the Vandermonde matrix - int sk = 1; - for (int i=0; i<=N; ++i) { // old ordering - for (int j=0; j<=(N-i); ++j) { - for (int k=0; k<=(N-i-j); ++k) { - V3D(All,sk) = Simplex3DP(a,b,c, i,j,k); - ++sk; - } - } - } - return V3D; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/WarpShiftFace3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/WarpShiftFace3D.cpp deleted file mode 100644 index acf27aa..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/WarpShiftFace3D.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// WarpShiftFace3D.m -// function [warpx, warpy] = WarpShiftFace3D(p,pval, pval2, L1,L2,L3,L4) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void WarpShiftFace3D -( - int p, - double pval, - double pval2, - const DVec& L1, - const DVec& L2, - const DVec& L3, - const DVec& L4, - DVec& warpx, - DVec& warpy -) -//--------------------------------------------------------- -{ - // function [warpx, warpy] = WarpShiftFace3D(p,pval, pval2, L1,L2,L3,L4) - // Purpose: compute warp factor used in creating 3D Warp & Blend nodes - - DVec dtan1,dtan2; - evalshift(p, pval, L2, L3, L4, dtan1,dtan2); - warpx = dtan1; - warpy = dtan2; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/dtscale3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/dtscale3D.cpp deleted file mode 100644 index 8d69f6f..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/dtscale3D.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// dtscale3D.m -// function dtscale = dtscale3D; -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG3D.h" - - -//--------------------------------------------------------- -double NDG3D::dtscale3D() const -//--------------------------------------------------------- -{ - // function dtscale = dtscale3D; - // Purpose : Compute inscribed sphere diameter as characteristic - // for grid to choose timestep - - return 1.0 / (Fscale.max_val()*N*N); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/evalshift.cpp b/cpp/nudg++/trunk/Src/Codes3D/evalshift.cpp deleted file mode 100644 index ca19639..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/evalshift.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// evalshift.m -// function [dx, dy] = evalshift(p, pval, L1, L2, L3) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void evalshift -( - int p, - double pval, - const DVec& L1, - const DVec& L2, - const DVec& L3, - DVec& dx, - DVec& dy -) -//--------------------------------------------------------- -{ - // function [dx, dy] = evalshift(p, pval, L1, L2, L3) - // Purpose: compute two-dimensional Warp & Blend transform - - // 1) compute Gauss-Lobatto-Legendre node distribution - DVec gaussX = -JacobiGL(0,0,p); DVec warp1,warp2,warp3; - - // 3) compute blending function at each node for each edge - DVec blend1 = L2.dm(L3); - DVec blend2 = L1.dm(L3); - DVec blend3 = L1.dm(L2); - - // 4) amount of warp for each node, for each edge - DVec tv1=L3-L2, tv2=L1-L3, tv3=L2-L1; // cannot pass OBJ_temp - DVec warpfactor1 = 4.0 * evalwarp(p, gaussX, tv1); - DVec warpfactor2 = 4.0 * evalwarp(p, gaussX, tv2); - DVec warpfactor3 = 4.0 * evalwarp(p, gaussX, tv3); - - // 5) combine blend & warp - warp1 = blend1.dm(warpfactor1); warp1 *= (1.0 + sqr(pval*L1)); - warp2 = blend2.dm(warpfactor2); warp2 *= (1.0 + sqr(pval*L2)); - warp3 = blend3.dm(warpfactor3); warp3 *= (1.0 + sqr(pval*L3)); - - // 6) evaluate shift in equilateral triangle - dx = 1.0*warp1 + cos(TWOPI/3.0)*warp2 + cos(FOURPI/3.0)*warp3; - dy = 0.0*warp1 + sin(TWOPI/3.0)*warp2 + sin(FOURPI/3.0)*warp3; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/evalwarp.cpp b/cpp/nudg++/trunk/Src/Codes3D/evalwarp.cpp deleted file mode 100644 index fdef785..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/evalwarp.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// evalwarp.cpp -// function warp = evalwarp(p, xnodes, xout) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -DVec& evalwarp(int p, const DVec& xnodes, const DVec& xout) -//--------------------------------------------------------- -{ - // function warp = evalwarp(p, xnodes, xout) - // Purpose: compute one-dimensional edge warping function - - DVec* warp = new DVec(xout.size(), 0.0, OBJ_temp, "warp"); - DVec xeq(p+1); int i=0, j=0; - - for (i=1; i<=(p+1); ++i) { - xeq(i) = -1.0 + 2.0*(p+1.0-i)/double(p); - } - - DVec d(xout.size()); - for (i=1; i<=(p+1); ++i) { - d = (xnodes(i)-xeq(i)); - for (j=2; j<=p; ++j) { - if (i!=j) { - //d = d*(xout-xeq(j))/(xeq(i)-xeq(j)); - d *= ((xout-xeq(j)) / (xeq(i)-xeq(j))); - } - } - - if (i!= 1 ) { d = -d/(xeq(i)-xeq(1 )); } - if (i!=(p+1)) { d = d/(xeq(i)-xeq(p+1)); } - - (*warp) += d; - } - - return (*warp); -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/rsttoabc.cpp b/cpp/nudg++/trunk/Src/Codes3D/rsttoabc.cpp deleted file mode 100644 index c9fc634..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/rsttoabc.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// rsttoabc.m -// function [a,b,c] = rsttoabc(r,s,t) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void rsttoabc -( - const DVec& r, // [in] - const DVec& s, // [in] - const DVec& t, // [in] - DVec& a, // [out] - DVec& b, // [out] - DVec& c // [out] -) -//--------------------------------------------------------- -{ - // function [a,b,c] = rsttoabc(r,s,t) - // Purpose: Transfer from (r,s,t) -> (a,b,c) coordinates in triangle - - int Np = r.size(); a.resize(Np); b.resize(Np); - for (int n=1; n<=Np; ++n) { - if (s(n)+t(n) != 0.0) { - a(n) = 2.0*(1.0+r(n))/(-s(n)-t(n))-1.0; - } else { - a(n) = -1.0; - } - if (t(n) != 1.0) { - b(n) = 2.0*(1.0+s(n))/(1.0-t(n))-1.0; - } else { - b(n) = -1.0; - } - } - c = t; - return; -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/tiConnect3D.cpp b/cpp/nudg++/trunk/Src/Codes3D/tiConnect3D.cpp deleted file mode 100644 index fc0dd0c..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/tiConnect3D.cpp +++ /dev/null @@ -1,80 +0,0 @@ -// tiConnect3D.m -// function [EToE,EToF]= tiConnect3D(EToV) -// 2007/06/13 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void tiConnect3D -( - IMat& EToV, // [in] - IMat& EToE, // [out] - IMat& EToF // [out] -) -//--------------------------------------------------------- -{ - // function [EToE,EToF]= tiConnect3D(EToV) - // Purpose: tetrahedral face connect algorithm due to Toby Isaac - - int Nfaces=4, K = EToV.num_rows(), Nnodes = EToV.max_val(); - int Nr = 4*K; IMat spNodeToNode, sorted; - - IMat fnodes(Nr,3, "fnodes"); - Index1D I1(1,K), I2(K+1,2*K), I3(2*K+1,3*K), I4(3*K+1,4*K); - IVec J1(gVecData, 3, "1 2 3"), J2(gVecData, 3, "1 2 4"), - J3(gVecData, 3, "2 3 4"), J4(gVecData, 3, "1 3 4"); - - // create list of all faces 1, then 2, 3 & 4 - fnodes(I1, All) = EToV(All, J1); - fnodes(I2, All) = EToV(All, J2); - fnodes(I3, All) = EToV(All, J3); - fnodes(I4, All) = EToV(All, J4); - - // sort each row in ascending order, then decrement each entry - fnodes.sort(2); fnodes -= 1; - - // set up default element to element and Element to faces connectivity - EToE = outer(Range(1,K), Ones(Nfaces)); - EToF = outer(Ones(K), Range(1,Nfaces)); - - // uniquely number each set of three faces by their node numbers - IVec id = fnodes.get_col(1)*Nnodes*Nnodes + fnodes.get_col(2)*Nnodes + fnodes.get_col(3)+1; - - spNodeToNode.resize(Nr, 4); - spNodeToNode.set_col(1, id); - spNodeToNode.set_col(2, Range(1,Nfaces*K)); - spNodeToNode.set_col(3, EToE); - spNodeToNode.set_col(4, EToF); - - // Now we sort by global face number. - sorted = sortrows(spNodeToNode,1); - - // find matches in the sorted face list - // [indices,dummy]=find( sorted(1:(end-1),1)==sorted(2:end,1) ); - - Index1D II1(1, Nr-1), II2(2, Nr); - IVec ids1=sorted(II1,1), ids2=sorted(II2,1); - IVec indices = find(ids1, '=', ids2); - - int Ni=indices.size(); - II1.reset(1,Ni), II2.reset(Ni+1,2*Ni); - IMat matchL(2*Ni, 4), matchR(2*Ni, 4); - - // make links reflexive - matchL(II1, All) = sorted(indices ,All); - matchL(II2, All) = sorted(indices+1,All); - - matchR(II1, All) = sorted(indices+1,All); - matchR(II2, All) = sorted(indices ,All); - - // insert matches - EToE(matchL(All,2)) = matchR(All,3); - EToF(matchL(All,2)) = matchR(All,4); - -#if (0) - dumpIMat(EToE, "EToE"); - dumpIMat(EToF, "EToF"); - umERROR("Testing", "Nigel, check arrays"); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Codes3D/xyztorst.cpp b/cpp/nudg++/trunk/Src/Codes3D/xyztorst.cpp deleted file mode 100644 index c8d360e..0000000 --- a/cpp/nudg++/trunk/Src/Codes3D/xyztorst.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// xyztorst.m -// function [r, s, t] = xyztorst(X, Y, Z) -// 2007/06/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -//--------------------------------------------------------- -void xyztorst -( - const DVec& X, // [in] - const DVec& Y, // [in] - const DVec& Z, // [in] - DVec& r, // [out] - DVec& s, // [out] - DVec& t // [out] -) -//--------------------------------------------------------- -{ - // function [r,s,t] = xyztorst(x, y, z) - // Purpose : Transfer from (x,y,z) in equilateral tetrahedron - // to (r,s,t) coordinates in standard tetrahedron - - double sqrt3=sqrt(3.0), sqrt6=sqrt(6.0); int Nc=X.size(); - DVec v1(3),v2(3),v3(3),v4(3); - DMat tmat1(3,Nc), A(3,3), rhs; - - v1(1)=(-1.0); v1(2)=(-1.0/sqrt3); v1(3)=(-1.0/sqrt6); - v2(1)=( 1.0); v2(2)=(-1.0/sqrt3); v2(3)=(-1.0/sqrt6); - v3(1)=( 0.0); v3(2)=( 2.0/sqrt3); v3(3)=(-1.0/sqrt6); - v4(1)=( 0.0); v4(2)=( 0.0 ); v4(3)=( 3.0/sqrt6); - - // back out right tet nodes - tmat1.set_row(1,X); tmat1.set_row(2,Y); tmat1.set_row(3,Z); - rhs = tmat1 - 0.5*outer(v2+v3+v4-v1, ones(Nc)); - A.set_col(1,0.5*(v2-v1)); A.set_col(2,0.5*(v3-v1)); A.set_col(3,0.5*(v4-v1)); - - DMat RST = A|rhs; - - r=RST.get_row(1); s=RST.get_row(2); t=RST.get_row(3); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowBC2D.cpp deleted file mode 100644 index 1b2998e..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowBC2D.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// BoxFlowBC2D.m -// function [rho,rhou,rhov,Ener] = BoxFlowBC2D(rho, rhou, rhov, Ener, ti) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - -//--------------------------------------------------------- -void CurvedCNS2D::BoxFlowBC2D -( - const DVec& rho, - const DVec& rhou, - const DVec& rhov, - const DVec& Ener, - double rkti, - DVec& brho, - DVec& brhou, - DVec& brhov, - DVec& bEner -) -//--------------------------------------------------------- -{ - // function function [rho,rhou,rhov,Ener] = ... - // BoxFlowBC2D(rho, rhou, rhov, Ener, time) - // - // Purpose: compute plane flow configuration - - // nothing - int Nr = rho.size(); - brho.zeros (Nr); - brhou.zeros(Nr); - brhov.zeros(Nr); - bEner.zeros(Nr); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowIC2D.cpp deleted file mode 100644 index 600f260..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/BoxFlowIC2D.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// BoxFlowIC2D.m -// function [rho, rhou, rhov, Ener] = BoxFlowIC2D(x, y, time) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -void CurvedCNS2D::BoxFlowIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function Q = BoxFlowIC2D(x, y, time) - // - // Purpose: compute plane flow configuration - - //------------------------------------- - // adjust parameters - //------------------------------------- - this->gamma = 1.4; - this->gm1 = 0.4; // (gamma-1) - - //------------------------------------- - // use wrappers to update Qo in-place - //------------------------------------- - DVec rho,rhou,rhov,Ener; int Nr=Np*K; - rho.borrow (Nr, Qo.pCol(1)); - rhou.borrow(Nr, Qo.pCol(2)); - rhov.borrow(Nr, Qo.pCol(3)); - Ener.borrow(Nr, Qo.pCol(4)); - - if (1) - { - this->pref = 12.0; - - rho = 1.0; - rhou = -sin(2.0*pi*y); - rhov = sin(4.0*pi*x); - Ener = pref/gm1 + 0.5*(sqr(rhou) + sqr(rhov)).dd(rho); - } - else - { - this->pref = 12.0; - - rho = 1.0; - rhou = 0.0; - rhov = 0.0; - Ener = pref/gm1 + 0.5 * rho.dm(exp(-4.0*(sqr(cos(pi*x))+sqr(cos(pi*y))))); - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelBC2D.cpp deleted file mode 100644 index 0d32570..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelBC2D.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// ChannelBC2D.m -// function [rho,rhou,rhov,Ener] = ChannelBC2D(rho, rhou, rhov, Ener, time) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - -//--------------------------------------------------------- -void CurvedCNS2D::ChannelBC2D -( - const DVec& rho, - const DVec& rhou, - const DVec& rhov, - const DVec& Ener, - double rkti, - DVec& brho, - DVec& brhou, - DVec& brhov, - DVec& bEner -) -//--------------------------------------------------------- -{ - // function [rho,rhou,rhov,Ener] = ChannelBC2D(rho, rhou, rhov, Ener, time) - // Purpose: Impose channel boundary conditions on 2D Euler equations on weak form - // - // Quadratic shear flow, relies on gamma=1.5 - - //------------------------------------- - // adjust parameters - //------------------------------------- - this->mu = 1e-2; - this->pbar = 10.0; - this->gamma = 1.5; - this->gm1 = 0.5; // gamma-1 - - DVec xB = m_gauss.x(m_gauss.mapB); - DVec yB = m_gauss.y(m_gauss.mapB); - IVec gmapB = m_gauss.mapB; - - // Quadratic shear flow, relies on gamma=1.5 - brho (gmapB) = 1.0; - brhou(gmapB) = sqr(yB); - brhov(gmapB) = 0.0; - bEner(gmapB) = (2.0*mu*xB + pbar)/gm1 + 0.5*pow(yB,4.0); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelIC2D.cpp deleted file mode 100644 index 0d43b47..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/ChannelIC2D.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// ChannelIC2D.m -// function [Q] = ChannelIC2D(x, y, time); -// 2007/06/26 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -void CurvedCNS2D::ChannelIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function [Q] = ChannelIC2D(x, y, time) - // Purpose: Impose uniform plane flow - // - // Quadratic shear flow, relies on gamma=1.5 - - //------------------------------------- - // adjust parameters - //------------------------------------- - this->mu = 1e-2; - this->pbar = 10.0; - this->gamma = 1.5; - this->gm1 = 0.5; // gamma-1 - - //------------------------------------- - // use wrappers to update Qo in-place - //------------------------------------- - DVec rho,rhou,rhov,Ener; int Nr=Np*K; - rho.borrow (Nr,Qo.pCol(1)); rhou.borrow(Nr,Qo.pCol(2)); - rhov.borrow(Nr,Qo.pCol(3)); Ener.borrow(Nr,Qo.pCol(4)); - - rho = 1.0; - rhou = sqr(y); - rhov = 0.0; - Ener = (2*mu*x + pbar)/gm1 + 0.5*pow(y,4.0); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteBC2D.cpp deleted file mode 100644 index 5864c68..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteBC2D.cpp +++ /dev/null @@ -1,110 +0,0 @@ -// CouetteBC2D.m -// function [Q] = CouetteBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -void CurvedCNS2D::CouetteBC2D -( - const DVec& rho, - const DVec& rhou, - const DVec& rhov, - const DVec& Ener, - double rkti, - DVec& brho, - DVec& brhou, - DVec& brhov, - DVec& bEner -) -//--------------------------------------------------------- -{ - // gmapB = concat(mapI,mapO,mapW, ...); - // Check for no boundary faces - if (gmapB.size() < 1) { return; } - - // function [Q] = CouetteBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); - // Purpose: evaluate solution for Couette flow - - // Couette flow (mach .2 at inner cylinder) - // gamma = 1.4; - - - // load return arrays with state data - brho = rho; - brhou = rhou; - brhov = rhov; - bEner = Ener; - -#if (1) - // update boundary nodes with pre-calculated boundary data - brho (gmapB) = rhoB; - brhou(gmapB) = rhouB; - brhov(gmapB) = rhovB; - bEner(gmapB) = EnerB; -#else - - //------------------------------------------------------- - // Set boundary conditions for the two cylinders - //------------------------------------------------------- - gmapB = concat(m_gauss.mapI, m_gauss.mapO); - gxB = m_gauss.x(gmapB); - gyB = m_gauss.y(gmapB); - - DVec rad2B = sqr(gxB) + sqr(gyB); - DVec radB = sqrt(rad2B); - DVec thetaB = atan2(gyB, gxB); - DVec uthetaB = (-radB + 16.0/radB)/75.0; - DVec pB = 1.0 + (1.0/SQ(75.0)) * (rad2B/2.0 - 32.0*log(radB) - 128.0/rad2B); - - // store constant boundary data - rhoB = ones(gmapB.size()); - rhouB = (-sin(thetaB)).dm(uthetaB); - rhovB = ( cos(thetaB)).dm(uthetaB); - EnerB = pB/gm1 + 0.5*(sqr(rhouB)+sqr(rhovB)).dd(rhoB); - - brho (gmapB) = rhoB; - brhou(gmapB) = rhouB; - brhov(gmapB) = rhovB; - bEner(gmapB) = EnerB; - - - //------------------------------------------------------- - // Set BCs for the internal wall-circles: - // reflective, isothermal, i.e., n.u=0, T=T(t=0) - //------------------------------------------------------- - -//const DMat& gnx=m_gauss.nx, gny=m_gauss.ny; - DMat& gnx=m_gauss.nx, gny=m_gauss.ny; - const IVec& gmapW=m_gauss.mapW; - - DVec gxW = m_gauss.x(gmapW); - DVec gyW = m_gauss.y(gmapW); - DVec rad2W = sqr(gxW) + sqr(gyW); - DVec radW = sqrt(rad2W); - DVec thetaW = atan2(gyW, gxW); - DVec uthetaW = (-radW + 16.0/radW)/75.0; - DVec pW = 1.0 + (1.0/SQ(75.0)) * (rad2W/2.0 - 32.0*log(radW) - 128.0/rad2W); - - - DVec t_rhoW = rho; - DVec t_rhouW = rhou; - DVec t_rhovW = rhov; - DVec t_EnerW = Ener; - - DVec rhoW = t_rhoW (gmapW); - DVec rhouW = t_rhouW(gmapW); - DVec rhovW = t_rhovW(gmapW); - DVec EnerW = t_EnerW(gmapW); - - DVec nxW=gnx(gmapW), nyW=gny(gmapW); - - brhou(gmapW) = -rhouW; - brhov(gmapW) = -rhovW; - bEner(gmapW) = pW/gm1 + 0.5*(sqr(rhouW)+sqr(rhovW)).dd(rhoW); - - -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteIC2D.cpp deleted file mode 100644 index e570f3c..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CouetteIC2D.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// CouetteIC2D.m -// function [Q] = CouetteIC2D(x, y, time) -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -void CurvedCNS2D::CouetteIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function [Q] = CouetteIC2D(x, y, time) - // Purpose: evaluat solution for Couette flow - - // gamma = 1.4; - int Nr = Qo.num_rows(); DVec rho,rhou,rhov,Ener, q1,q2,q3; - - DVec rad2 = sqr(xi) + sqr(yi); - DVec rad = sqrt(rad2); - DVec theta = atan2(yi, xi); - DVec utheta = (-rad + 16.0/rad)/75.0; - DVec p = 1.0 + (1.0/SQ(75.0)) * (rad2/2.0 - 32.0*log(rad) - 128.0/rad2); - -#if (0) - // set initial {rho,rhou,rhov} to steady-state solution - Qo(All,1) = 1.0; - Qo(All,2) = (-sin(theta)).dm(utheta); - Qo(All,3) = ( cos(theta)).dm(utheta); -#else - // set initial {rho,rhou,rhov} with zero momentum - Qo(All,1) = 1.0; - Qo(All,2) = 0.0; - Qo(All,3) = 0.0; -#endif - - // extract initial {rho,rhou,rhov} from Q(:,1:3) - q1.borrow(Nr,Qo.pCol(1)); q2.borrow(Nr,Qo.pCol(2)); q3.borrow(Nr,Qo.pCol(3)); - - // use initial {rho,rhou,rhov} to calculate initial {Ener} - Qo(All,4) = p/gm1 + 0.5*(sqr(q2)+sqr(q3)).dd(q1); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D.cpp deleted file mode 100644 index 6644e74..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D.cpp +++ /dev/null @@ -1,322 +0,0 @@ -// CurvedCNS2D.cpp -// member routines for class CurvedCNS2D -// 2007/07/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -CurvedCNS2D::CurvedCNS2D() -//--------------------------------------------------------- -{ - class_name = "CurvedCNS2D"; - - //------------------------------------- - // set default parameters - //------------------------------------- - gamma = 1.4; // Gas constant - gm1 = 0.4; // (gamma-1) - - mu = 1e-2; // - pbar = 10.0; - pref = 12.0; -} - - -//--------------------------------------------------------- -CurvedCNS2D::~CurvedCNS2D() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void CurvedCNS2D::Resize() -//--------------------------------------------------------- -{ - // set default maps for {straight,curved} elements - straight.range(1,K); curved.resize(0); - - - // Allocate member arrays - Q.resize (Np*K, 4); // solution fields - rhsQ.resize(Np*K, 4); // Runge-Kutta stage values - resQ.resize(Np*K, 4); // Runge-Kutta residual -} - - -//--------------------------------------------------------- -void CurvedCNS2D::Resize_cub() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void CurvedCNS2D::MapGaussFaceData() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void CurvedCNS2D::PreCalcBdryData() -//--------------------------------------------------------- -{ - gmapB = m_gauss.mapB; - gxB = m_gauss.x(gmapB); - gyB = m_gauss.y(gmapB); - - //--------------------------------------------- - // pre-calculate bdry conds. for CouetteFlow - //--------------------------------------------- - if (eCouetteFlow == sim_type) { - gmapB = concat(m_gauss.mapI, m_gauss.mapO); - gxB = m_gauss.x(gmapB); - gyB = m_gauss.y(gmapB); - - DVec rad2B = sqr(gxB) + sqr(gyB); - DVec radB = sqrt(rad2B); - DVec thetaB = atan2(gyB, gxB); - DVec uthetaB = (-radB + 16.0/radB)/75.0; - DVec pB = 1.0 + (1.0/SQ(75.0)) * (rad2B/2.0 - 32.0*log(radB) - 128.0/rad2B); - - // store constant boundary data - rhoB = ones(gmapB.size()); - rhouB = (-sin(thetaB)).dm(uthetaB); - rhovB = ( cos(thetaB)).dm(uthetaB); - EnerB = pB/gm1 + 0.5*(sqr(rhouB)+sqr(rhovB)).dd(rhoB); - } - - //--------------------------------------------- - // pre-calculate data for other simulations - //--------------------------------------------- - // else if (eCylinderFlow == sim_type) { } - // else if (eChannelFlow == sim_type) { } - // else if (eBoxFlow == sim_type) { } - -} - - -//--------------------------------------------------------- -void CurvedCNS2D::SetIC() -//--------------------------------------------------------- -{ - // compute initial condition (time=0) - // Q = feval(InitialSolution, x, y, 0.0); - (this->*InitialSolution)( x, y, 0.0, Q); -} - - -//--------------------------------------------------------- -void CurvedCNS2D::SetStepSize() -//--------------------------------------------------------- -{ - // compute stable time step size for - // compressible Navier-Stokes solver - // dt = 0.25*CurvedCNSdt2D(Q, gamma, mu); - - DVec rho,rhou,rhov,Ener, u,v,p,c,h,lam, q1,q2,q3,q4,rsqr,invsp; - double N1p2 = double(SQ(N+1)); // (N+1)^2 - double N1p4 = N1p2*N1p2; // (N+1)^4 - - // extract field variables - // since "self-mapping" of arrays is illegal, - // e.g. rho = rho(vmapM), use temp wrappers - q1.borrow(Np*K,Q.pCol(1)); q2.borrow(Np*K,Q.pCol(2)); - q3.borrow(Np*K,Q.pCol(3)); q4.borrow(Np*K,Q.pCol(4)); - - // evaluate fields at surface nodes - rho=q1(vmapM); rhou=q2(vmapM); rhov=q3(vmapM); Ener=q4(vmapM); - - // compute primitive variables - u = rhou.dd(rho); v = rhov.dd(rho); rsqr = sqr(u)+sqr(v); - p = gm1 * (Ener - rho.dm(rsqr)/2.0); - c = sqrt(abs(gamma*p.dd(rho))); - - h = 2.0/Fscale; - lam = sqrt(rsqr) + c; - invsp = 1.0 / ( N1p2*lam.dd(h) + (N1p4*mu)/sqr(h) ); - dt = 0.5 * invsp.min_val(); - - if (eBoxFlow!=sim_type) { - dt *= 1.00; // keep full stepsize - //dt *= 0.50; // reduce default stepsize - //dt *= 0.25; // reduce default stepsize - } else { - dt *= 0.25; // reduce default stepsize - } - - Nsteps = (int)ceil(FinalTime/dt); - dt = FinalTime/(double)Nsteps; -} - - -//--------------------------------------------------------- -void CurvedCNS2D::InitRun() -//--------------------------------------------------------- -{ - // construct grid and metric - StartUp2D(); - - // Optional mesh refinement: split each parent - // element into 4 conforming "child" elements - - if (Nrefine>0) { - umLOG(1, "before refine : K = %5d\n", K); - DMat Q2(Np*K, 1); IMat refineflag; - refineflag = Ones(K,Nfaces); - for (int i=1; i<=Nrefine; ++i) { - Q2 = ConformingHrefine2D(refineflag, Q2); - umLOG(1, "after refine %d: K = %5d\n", i, K); - } - } - - // Adjust faces on circular boundaries, - // and perform any sim-specific setup: - - switch (sim_type) { - - case eCylinderFlow: - // move Cylinder bdry faces to radius 1.0 - //AdjustCylBC(1.0, 0.0, 0.0, BC_Cyl); // test mesh 1: r=1.0 - AdjustCylBC(0.05, 0.,0., BC_Cyl); // Volker John: move Cyl faces to r=0.05 - break; - - case eBoxFlow: - // no cylinder faces - straight.range(1,K); curved.resize(0); - // but set up periodic maps - BuildPeriodicMaps2D(1.0, 1.0); - break; - - case eChannelFlow: - // no cylinder faces - straight.range(1,K); curved.resize(0); - break; - - case eCouetteFlow: - -#if (0) - // move inflow faces to r=4.0 - AdjustCylBC(4.0, 0.0, 0.0, BC_In); // outer cylinder - // move outflow faces to r=1.0 - AdjustCylBC(1.0, 0.0, 0.0, BC_Out); // inner cylinder -#else - // move inflow faces to r=4.0 - AdjustCylBC(2.0, 0.0, 0.0, BC_Out); // outer cylinder - // move outflow faces to r=1.0 - AdjustCylBC(1.0, 0.0, 0.0, BC_In); // inner cylinder -#endif - break; - } - - - BuildBCMaps2D(); // build boundary condition maps - Resize(); // allocate arrays - SetIC(); // set initial conditions - SetStepSize(); // calculate step size (dt) - - - //--------------------------------------------- - // base class version sets counters and flags - //--------------------------------------------- - NDG2D::InitRun(); - - //--------------------------------------------- - // set frequency of reporting - //--------------------------------------------- -//Nreport = Nsteps/50; - Nreport = 1; -//Nreport = 5; -//Nreport = 10; -//Nreport = 50; - Nreport = 100; -//Nreport = 1000; -//Nreport = 10000; - - //--------------------------------------------- - // set frequency of rendering - //--------------------------------------------- -//Nrender = Nreport; - Nrender = 5*Nreport; -//Nrender = 100; -//Nrender = 10000; - - NvtkInterp = 6; // set output resolution - - Summary(); // show simulation details -} - - -//--------------------------------------------------------- -void CurvedCNS2D::Summary() -//--------------------------------------------------------- -{ - // TODO: add details of sim_type, flux_type, operators - NDG2D::Summary(); -} - - -//--------------------------------------------------------- -void CurvedCNS2D::Report(bool bForce) -//--------------------------------------------------------- -{ - if (1 == tstep) { - // print header - umLOG(1, "\n step time rho(min) rho(max) En(min) En(max) dt \n" - "------------------------------------------------------------------\n"); - } - - if (!umMOD(tstep,Nreport) || bForce || (1==tstep)) - { - double r_min=Q.min_col_val(1), r_max=Q.max_col_val(1); - double e_min=Q.min_col_val(4), e_max=Q.max_col_val(4); - - umLOG(1, "%8d %6.3lf %8.5lf %8.5lf %8.5lf %8.5lf %11.3e\n", - tstep, time, r_min, r_max, e_min, e_max, dt); - } - - if (!umMOD(tstep,Nrender) || bForce) - { - -#if (1) - - Q_plot = Q; - - // extract conserved variables, calculate - // vorticity, and load this as 4th field: - DMat rho, rhou, rhov, u,v, curl; - rho.borrow(Np,K,Q.pCol(1)); rhou.borrow(Np,K,Q.pCol(2)); rhov.borrow(Np,K,Q.pCol(3)); - u = rhou.dd(rho); v = rhov.dd(rho); - Curl2D(u, v, curl); - Q_plot(All,4) = curl; - OutputVTK(Q_plot, NvtkInterp); - -#else - - OutputVTK(Q, NvtkInterp); - -#endif - } -} - - -//--------------------------------------------------------- -void CurvedCNS2D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - this->Report(true); - - // Report error and work info - // if (HasAnalyticSol()) { - // umLOG(1, "\n Max analytic error : %12.4e\n", this->GetAnalyticError()); - // umLOG(1, "----------------------------------\n"); - // } - - umLOG(1, "\n time for NDG work: %0.2lf secs\n", time_work); - umLOG(1, " rhs work: %0.2lf\n", time_rhs); - umLOG(1, " time for main loop: %0.2lf secs\n\n",time_total); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Driver.cpp deleted file mode 100644 index 32a4851..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Driver.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// CurvedCNS2D_Driver.m -// Driver script for solving the 2D compressible Navier-Stokes equations -// 2007/06/24 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -void CurvedCNS2D::Driver() -//--------------------------------------------------------- -{ - //-------------------------------------------------- - // select order of polynomial approximation (N) - //-------------------------------------------------- -//N = 3; -//N = 4; -//N = 5; - N = 6; -//N = 7; -//N = 8; -//N = 9; -//N = 10; - - //-------------------------------------------------- - // select simulation type - //-------------------------------------------------- -//sim_type = eCylinderFlow; - sim_type = eChannelFlow; -//sim_type = eBoxFlow; -//sim_type = eCouetteFlow; - - //-------------------------------------------------- - // select flux type - //-------------------------------------------------- -//flux_type = FT_LaxF; - flux_type = FT_Roe; -//flux_type = FT_HLL; - - - //-------------------------------------------------- - // select mesh, initial conditions, and BC function - //-------------------------------------------------- - - switch (sim_type) { - case eCylinderFlow: - //FileName = "Grid/CFD/cylinderA00075b.neu"; - FileName = "Grid/CFD/Volker_374.neu"; - InitialSolution = &CurvedCNS2D::CylIC2D; - ExactSolution = NULL; - BCSolution = &CurvedCNS2D::CylBC2D; - break; - - case eChannelFlow: - FileName = "Grid/CNS2D/otboxA01.neu"; - InitialSolution = &CurvedCNS2D::ChannelIC2D; - ExactSolution = &CurvedCNS2D::ChannelIC2D; - BCSolution = &CurvedCNS2D::ChannelBC2D; - break; - - case eBoxFlow: - FileName = "Grid/CNS2D/otboxA01.neu"; - InitialSolution = &CurvedCNS2D::BoxFlowIC2D; - ExactSolution = NULL; - BCSolution = &CurvedCNS2D::BoxFlowBC2D; - break; - - case eCouetteFlow: - //FileName = "Grid/CNS2D/Couette_K082.neu"; - //FileName = "Grid/CNS2D/Couette_K242.neu"; - //FileName = "Grid/CNS2D/Couette_K856.neu"; - FileName = "Grid/CNS2D/C_1_2_K1662.neu"; - //FileName = "Grid/CNS2D/Couette_K1514_8Balls.neu"; - //FileName = "Grid/CNS2D/Couette_K2600_8Balls.neu"; - //FileName = "Grid/CNS2D/Couette_K5003_8Balls.neu"; - InitialSolution = &CurvedCNS2D::CouetteIC2D; - ExactSolution = &CurvedCNS2D::CouetteIC2D; - BCSolution = &CurvedCNS2D::CouetteBC2D; - break; - - default: - umERROR("CurvedCNS2D::Driver()", "Simulation case unknown"); - break; - } - - - //-------------------------------------------------- - // read mesh: vertices, elements, materials, BC's - //-------------------------------------------------- - if (!MeshReaderGambit2D(FileName)) { - umWARNING("CurvedCNS2D::Driver", "Error loading mesh (file: %s)\nExiting.\n", FileName.c_str()); - return; - } - - try { - //FinalTime = 0.005; - FinalTime = 15.0; - //FinalTime = 0.5; - //FinalTime = 50.0; - Run(); // Solve Problem - } catch (...) { - umWARNING("CurvedCNS2D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_RHS.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_RHS.cpp deleted file mode 100644 index a6fcfc4..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_RHS.cpp +++ /dev/null @@ -1,168 +0,0 @@ -// CurvedCNS2DRHS.m -// function [rhsQ] = CurvedCNSRHS2D(Q, mu, rkti, SolutionBC, fluxtype) -// 2007/06/25 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - - -//--------------------------------------------------------- -void CurvedCNS2D::RHS(double rkti, fp_BC SolutionBC) -//--------------------------------------------------------- -{ - // function [rhsQ] = CurvedCNSRHS2D(Q, mu, rkti, SolutionBC, fluxtype) - // Purpose: evaluate right hand side residual of the - // compressible Navier-Stokes equations - - trhs = timer.read(); // time RHS work - - DMat rho, rhou, rhov, Ener; // state data - DMat crho, crhou, crhov, cEner; // ... at cubature nodes - DMat grho, grhou, grhov, gEner; // ... at quadrature nodes - DMat gu,gv,gu2gv2,gPr, cu,cv,cPr; // primitive variables - - DMat drhodx, drhoudx, drhovdx, drhody, drhoudy, drhovdy; - DMat cdrhodx,cdrhovdx,cdrhoudx, cdrhody,cdrhoudy,cdrhovdy, cdudx,cdudy,cdvdx,cdvdy; - DMat gdrhodx,gdrhoudx,gdrhovdx, gdrhody,gdrhoudy,gdrhovdy, gdudx,gdudy,gdvdx,gdvdy; - - DVec bu,bv,bPr,buB,bvB,bcNdotU , sqrB; - static DVec brho, brhou, brhov, bEner; // ... adjusted for boundary conditions - DVec brhoB,brhouB,brhovB,bEnerB; // mapped subset of boundary nodes - - // shorthand references - Cub2D& cub = this->m_cub; Gauss2D& gauss = this->m_gauss; - - // Extract fields from two dimensional array of state data - rho.borrow (Np,K, Q.pCol(1)); - rhou.borrow(Np,K, Q.pCol(2)); - rhov.borrow(Np,K, Q.pCol(3)); - Ener.borrow(Np,K, Q.pCol(4)); - - // Interpolate fields to volume cubature nodes & Gauss quadrature surface nodes - crho = cub.V*rho; grho = gauss.interp*rho; - crhou = cub.V*rhou; grhou = gauss.interp*rhou; - crhov = cub.V*rhov; grhov = gauss.interp*rhov; - cEner = cub.V*Ener; gEner = gauss.interp*Ener; - - // Compute primitive fields at Gauss quadrature surface nodes - gu=grhou.dd(grho); gv=grhov.dd(grho); gu2gv2 = sqr(gu)+sqr(gv); - gPr=gm1*(gEner-0.5*grho.dm(gu2gv2)); - - if (this->BCSolution) { - - // create boundary condition variables - (this->*BCSolution)(grho, grhou, grhov, gEner, rkti, brho,brhou,brhov,bEner); - - if (eCouetteFlow == sim_type) { - // use pre-calculated boundary data - brhoB=rhoB; brhouB=rhouB; brhovB=rhovB; bEnerB=EnerB; - } else { - // gmapB = gauss.mapB; - brhoB=brho(gmapB); brhouB=brhou(gmapB); brhovB=brhov(gmapB); bEnerB=bEner(gmapB); - } - - // compute primitive variables of boundary data - bu = gu; bu (gmapB) = brhouB.dd(brhoB); buB=bu(gmapB); - bv = gv; bv (gmapB) = brhovB.dd(brhoB); bvB=bv(gmapB); - bPr = gPr; bPr(gmapB) = gm1*(bEnerB - 0.5*brhoB.dm(sqr(buB)+sqr(bvB))); - } - - // Compute gradients of the conserved variables - CurvedDGGrad2D(crho, grho, gmapB, brho, drhodx, drhody); - CurvedDGGrad2D(crhou, grhou, gmapB, brhou, drhoudx, drhoudy); - CurvedDGGrad2D(crhov, grhov, gmapB, brhov, drhovdx, drhovdy); - - //------------------------------------------------------- - - // Compute primitive fields at cubature nodes & Gauss quadrature surface nodes - cu = crhou.dd(crho); cv=crhov.dd(crho); cPr = gm1*(cEner - 0.5*crho.dm(sqr(cu)+sqr(cv))); - - // Interpolate derivatives of conserved variables to cubature nodes - cdrhodx = cub.V*drhodx; cdrhody = cub.V*drhody; - cdrhoudx = cub.V*drhoudx; cdrhoudy = cub.V*drhoudy; - cdrhovdx = cub.V*drhovdx; cdrhovdy = cub.V*drhovdy; - - // Use product-rule to evaluate gradients of velocity components at cubature nodes - cdudx = (cdrhoudx - cdrhodx.dm(cu)).dd(crho); - cdudy = (cdrhoudy - cdrhody.dm(cu)).dd(crho); - cdvdx = (cdrhovdx - cdrhodx.dm(cv)).dd(crho); - cdvdy = (cdrhovdy - cdrhody.dm(cv)).dd(crho); - - // Compute viscous stress tensor at cubature nodes - DMat ct11 = mu * (2.0*cdudx - TWOTHIRD*(cdudx+cdvdy)); - DMat ct12 = mu * ( cdudy + cdvdx); - DMat ct22 = mu * (2.0*cdvdy - TWOTHIRD*(cdudx+cdvdy)); - DMat ct31 = cu.dm(ct11) + cv.dm(ct12); - DMat ct32 = cu.dm(ct12) + cv.dm(ct22); - - //------------------------------------------------------- - - // Interpolate derivatives of conserved variables to Gauss nodes - gdrhodx = gauss.interp*drhodx; gdrhody = gauss.interp*drhody; - gdrhoudx = gauss.interp*drhoudx; gdrhoudy = gauss.interp*drhoudy; - gdrhovdx = gauss.interp*drhovdx; gdrhovdy = gauss.interp*drhovdy; - - // Use product-rule to evaluate gradients of velocity components at Gauss nodes - gdudx = (gdrhoudx - gdrhodx.dm(gu)).dd(grho); - gdudy = (gdrhoudy - gdrhody.dm(gu)).dd(grho); - gdvdx = (gdrhovdx - gdrhodx.dm(gv)).dd(grho); - gdvdy = (gdrhovdy - gdrhody.dm(gv)).dd(grho); - - // Compute viscous stress tensor at Gauss nodes - DMat gt11 = mu * (2.0*gdudx - TWOTHIRD*(gdudx + gdvdy)); - DMat gt12 = mu * (gdudy + gdvdx); - DMat gt22 = mu * (2.0*gdvdy - TWOTHIRD*(gdudx + gdvdy)); - DMat gt31 = gu.dm(gt11) + gv.dm(gt12); - DMat gt32 = gu.dm(gt12) + gv.dm(gt22); - - //------------------------------------------------------- - - // Local copy of normals at Gauss nodes - DMat gnx=gauss.nx, gny=gauss.ny; - - // Add mass conservation terms together and compute divergence - DMat cF = -crhou, cG = -crhov; - DMat gF = -grhou, gG = -grhov; - DVec bF = -brhou, bG = -brhov; - bcNdotU = gnx.dm(bF)+gny.dm(bG); - rhsQ(All,1) = CurvedDGDiv2D(cF, cG, gF, gG, gmapB, bcNdotU); - - // Add x-momentum conservation terms together and compute divergence - cF = -(crhou.dm(cu) + cPr) + ct11; cG = -(crhou.dm(cv)) + ct12; - gF = -(grhou.dm(gu) + gPr) + gt11; gG = -(grhou.dm(gv)) + gt12; - bF = -(brhou.dm(bu) + bPr) + gt11; bG = -(brhou.dm(bv)) + gt12; - bcNdotU = gnx.dm(bF)+gny.dm(bG); - rhsQ(All,2) = CurvedDGDiv2D(cF, cG, gF, gG, gmapB, bcNdotU); - - // Add y-momentum conservation terms together and compute divergence - cF = -(crhou.dm(cv)) + ct12; cG = -(crhov.dm(cv) + cPr) + ct22; - gF = -(grhou.dm(gv)) + gt12; gG = -(grhov.dm(gv) + gPr) + gt22; - bF = -(brhou.dm(bv)) + gt12; bG = -(brhov.dm(bv) + bPr) + gt22; - bcNdotU = gnx.dm(bF) +gny.dm(bG); - rhsQ(All,3) = CurvedDGDiv2D(cF, cG, gF, gG, gmapB, bcNdotU); - - // Add Energy conservation terms together and compute divergence - cF = cu.dm(-cEner - cPr) + ct31; cG = cv.dm(-cEner - cPr) + ct32; - gF = gu.dm(-gEner - gPr) + gt31; gG = gv.dm(-gEner - gPr) + gt32; - bF = bu.dm(-bEner - bPr) + gt31; bG = bv.dm(-bEner - bPr) + gt32; - bcNdotU = gnx.dm(bF)+gny.dm(bG); - rhsQ(All,4) = CurvedDGDiv2D(cF, cG, gF, gG, gmapB, bcNdotU); - - //------------------------------------------------------- - - // Add Lax-Friedrichs jump stabilization - NGauss = gauss.NGauss; DMat glambda("glambda"); - glambda = sqrt(gu2gv2) + sqrt(abs(gamma*gPr.dd(grho))); - glambda = max(glambda(gauss.mapM), glambda(gauss.mapP)); - glambda.reshape(NGauss, Nfaces*K); - glambda = outer(ones(NGauss), glambda.max_col_vals()); - glambda.reshape(NGauss*Nfaces, K); - - rhsQ(All,1) += CurvedDGJump2D(glambda.dm(grho), gmapB, glambda.dm(brho) )/2.0; - rhsQ(All,2) += CurvedDGJump2D(glambda.dm(grhou), gmapB, glambda.dm(brhou))/2.0; - rhsQ(All,3) += CurvedDGJump2D(glambda.dm(grhov), gmapB, glambda.dm(brhov))/2.0; - rhsQ(All,4) += CurvedDGJump2D(glambda.dm(gEner), gmapB, glambda.dm(bEner))/2.0; - - time_rhs += (timer.read() - trhs); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Run.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Run.cpp deleted file mode 100644 index 0e2fa99..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CurvedCNS2D_Run.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// CurvedCNS2D.m -// function Q = CurvedCNS2D(Q, FinalTime, ExactSolution, ExactSolutionBC) -// 2007/07/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -void CurvedCNS2D::Run() -//--------------------------------------------------------- -{ - // function Q = CurvedCNS2D(Q, FinalTime, ExactSolution, ExactSolutionBC) - // Purpose : Integrate 2D compressible Navier-Stokes using a 4th order low storage RK - - InitRun(); - - CubatureOrder = 3*(N+1); - NGauss = (int)ceil(double(3*(N+1)/2)); - - CubatureVolumeMesh2D(CubatureOrder); // build cubature information - GaussFaceMesh2D(NGauss); // build Gauss node data - - Resize_cub(); // resize cubature arrays - MapGaussFaceData(); // {nx = gauss.nx}, etc. - PreCalcBdryData(); // gmapB = concat(mapI, mapO), etc. - ti0=timer.read(); // time simulation loop - - -#if (0) - //------------------------------------- - // check all node sets - //------------------------------------- - OutputNodes(false); // volume nodes - OutputNodes(true); // face nodes - OutputNodes_cub(); // cubature - OutputNodes_gauss(); // quadrature - Report(true); // show initial conditions - umLOG(1, "\n*** Exiting after Cub, Gauss\n\n"); - return; -#endif - - - // outer time step loop - while (time FinalTime) { dt = FinalTime-time; } - tw1=timer.read(); // time NDG work - - for (int INTRK=1; INTRK<=5; ++INTRK) { - RKtime = time + dt*rk4c(INTRK); - - // compute right hand side of compressible Navier-Stokes equations - CurvedCNS2D::RHS(RKtime, BCSolution); // -> rhsQ - - // initiate and increment Runge-Kutta residuals - resQ *= rk4a(INTRK); resQ += dt*rhsQ; - - // update fields - Q += rk4b(INTRK)*resQ; - } - - time_work += timer.read() - tw1; // accumulate cost of NDG work - time += dt; // increment time - SetStepSize(); // compute new timestep - Report(); // optional reporting - ++tstep; // increment timestep - - //if (tstep>=10) break; - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylBC2D.cpp deleted file mode 100644 index 0127b6a..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylBC2D.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// CylBC2D.m -// function [rho,rhou,rhov,Ener] = CylBC2D(rho, rhou, rhov, Ener, ti) -// 2007/06/25 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - -//--------------------------------------------------------- -void CurvedCNS2D::CylBC2D -( - const DVec& rho, - const DVec& rhou, - const DVec& rhov, - const DVec& Ener, - double rkti, - DVec& brho, - DVec& brhou, - DVec& brhov, - DVec& bEner -) -//--------------------------------------------------------- -{ - // function [rho,rhou,rhov,Ener] = CylBC2D(rho, rhou, rhov, Ener, time) - // Purpose: Impose channel boundary conditions on 2D CNS equations on weak form - // - // Example is Mach ** 0.4 ** flow in wind tunnel (gamma = 1.4) - - const DMat& gx=m_gauss.x, gy=m_gauss.y, gnx=m_gauss.nx, gny=m_gauss.ny; - const IVec& gmapI=m_gauss.mapI, gmapW=m_gauss.mapW, gmapC=m_gauss.mapC; - DVec yI,rhouI,rhovI, rhoW,rhouW,rhovW,EnerW,nxW,nyW, rhoC,rhouC,rhovC,EnerC,nxC,nyC; - -#if (1) - // NBN: init all boundary nodes to current state values - brho = rho; - brhou = rhou; - brhov = rhov; - bEner = Ener; -#endif - - //------------------------------------------------------- - // Inflow conditions -- uniform inflow - //------------------------------------------------------- - double rhoin=1.4, uin=0.4, vin=0.0, pin=1.0, Temp=0.0; - double Ein = pin/gm1 + 0.5*rhoin*(SQ(uin)+SQ(vin)); - - yI = gy(gmapI); yI += 0.20; - rhouI = rhoin * SQ(1.0/0.41)*6.0*yI.dm(0.41-yI); - rhovI.resize(gmapI.size(),true,0.0); - - brho (gmapI) = rhoin; - brhou(gmapI) = rhouI; - brhov(gmapI) = rhovI; - bEner(gmapI) = Ein + 0.5*(sqr(rhouI)+sqr(rhovI))/rhoin; - - - //------------------------------------------------------- - // Outflow conditions -- supersonic outflow ( do nothing ) - //------------------------------------------------------- - - - //------------------------------------------------------- - // Wall conditions -- reflective, isothermal, i.e., n.u=0, T=T(t=0) - //------------------------------------------------------- - Temp = pin/rhoin/gm1; - rhoW=rho(gmapW); rhouW=rhou(gmapW); rhovW=rhov(gmapW); EnerW=Ener(gmapW); - nxW=gnx(gmapW); nyW=gny(gmapW); - - brhou(gmapW) = -rhouW; - brhov(gmapW) = -rhovW; - bEner(gmapW) = rhoW*Temp + 0.5*(sqr(rhouW)+sqr(rhovW)).dd(rhoW); - - - //------------------------------------------------------- - // cylinder conditions -- reflective, isothermal, i.e., n.u=0, T=T(t=0) - //------------------------------------------------------- - Temp = pin/rhoin/gm1; - rhoC=rho(gmapC); rhouC=rhou(gmapC); rhovC=rhov(gmapC); EnerC=Ener(gmapC); nxC=gnx(gmapC); nyC=gny(gmapC); - - brhou(gmapC) = -rhouC; - brhov(gmapC) = -rhovC; - bEner(gmapC) = rhoC*Temp + 0.5*(sqr(rhouC)+sqr(rhovC)).dd(rhoC); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylIC2D.cpp deleted file mode 100644 index fbcbca5..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedCNS2D/CylIC2D.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// CylIC2D.m -// function [Q] = CylIC2D(xi, yi, time); -// 2007/06/26 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedCNS2D.h" - - -//--------------------------------------------------------- -void CurvedCNS2D::CylIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function Q = CylIC2D(xi, yi, time); - // Purpose: Impose uniform plane flow - - // Example is Mach ** 0.4 ** flow in wind tunnel (gamma=1.4) - - //------------------------------------- - // adjust parameters - //------------------------------------- - this->gamma = 1.4; - this->gm1 = 0.4; // (gamma-1) - - //------------------------------------- - // Inflow conditions -- uniform inflow - //------------------------------------- - double rhoin=1.4, uin=0.4, vin=0.0, pin=1.0; - double Ein = pin/gm1 + 0.5*rhoin*(SQ(uin)+SQ(vin)); - - //------------------------------------- - // use wrappers to update Qo in-place - //------------------------------------- - DVec rho,rhou,rhov,Ener; int Nr=Np*K; - rho.borrow (Nr,Qo.pCol(1)); rhou.borrow(Nr,Qo.pCol(2)); - rhov.borrow(Nr,Qo.pCol(3)); Ener.borrow(Nr,Qo.pCol(4)); - -#if (0) - rho = rhoin; - rhou = rhoin * SQ(1.0/0.41)*6.0*(yi+0.2).dm(0.41-(yi+0.2)); - rhov = 0.0; - Ener = Ein + 0.5*(sqr(rhou)+sqr(rhov)).dd(rho); -#else - rho = rhoin; - rhou = 0.0; - rhov = 0.0; - Ener = Ein + 0.5*(sqr(rhou)+sqr(rhov)).dd(rho); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelBC2D.cpp deleted file mode 100644 index bfe68b9..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelBC2D.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// ChannelBC2D.cpp -// function [rho,rhou,rhov,Ener] = ChannelBC2D(rho, rhou, rhov, Ener, time) -// 2007/06/30 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::ChannelBC2D -( - const DVec& xi, - const DVec& yi, - const DVec& nxi, - const DVec& nyi, - const IVec& tmapI, - const IVec& tmapO, - const IVec& tmapW, - const IVec& tmapC, - double ti, - DMat& Qio -) -//--------------------------------------------------------- -{ - // function [rho,rhou,rhov,Ener] = ChannelBC2D(time) - // Purpose: Impose channel boundary conditions on 2D Euler equations on weak form - - double mu = 1e-2, pbar=10.0, gamma15 = 1.5; - DVec rho, rhou, rhov, Ener; - - // See: MapGaussFaceData() - // gxB = gauss.x(gauss.mapB); gyB = gauss.y(gauss.mapB); - - int Nr = Qio.num_rows(); - rho.borrow (Nr, Qio.pCol(1)); - rhou.borrow(Nr, Qio.pCol(2)); - rhov.borrow(Nr, Qio.pCol(3)); - Ener.borrow(Nr, Qio.pCol(4)); - - - // Quadratic shear flow, relies on gamma=1.5 - rho (m_gauss.mapB) = 1.0; - rhou(m_gauss.mapB) = sqr(gyB); - rhov(m_gauss.mapB) = 0.0; - Ener(m_gauss.mapB) = (2.0*mu*gxB + pbar)/(gamma15-1) + 0.5* pow(gyB,4.0); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelIC2D.cpp deleted file mode 100644 index c8d3e55..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/ChannelIC2D.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// ChannelIC2D.cpp -// function [rho,rhou,rhov,Ener] = ChannelIC2D(xi, yi, ti); -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::ChannelIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function [Q] = ChannelIC2D(x, y, time) - // Purpose: Impose uniform plane flow - - // Note: relies on gamma=1.5 - - double mu = 1e-2, pbar=10.0, gamma15 = 1.5; - - Qo(All,1) = 1.0; - Qo(All,2) = sqr(yi); - Qo(All,3) = 0.0; - Qo(All,4) = (2.0*mu*xi + pbar)/(gamma15-1.0) + 0.5*pow(yi,4.0); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteBC2D.cpp deleted file mode 100644 index cce6653..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteBC2D.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// CouetteBC2D.m -// function [Q] = CouetteBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); -// 2007/06/30 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::CouetteBC2D -( - const DVec& xi, - const DVec& yi, - const DVec& nxi, - const DVec& nyi, - const IVec& tmapI, - const IVec& tmapO, - const IVec& tmapW, - const IVec& tmapC, - double ti, - DMat& Qio -) -//--------------------------------------------------------- -{ - // gmapB = concat(mapI,mapO,mapW, ...); - // Check for no boundary faces - if (gmapB.size() < 1) { return; } - - // function [Q] = CouetteBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); - // Purpose: evaluate solution for Couette flow - - // Couette flow (mach .2 at inner cylinder) - // gamma = 1.4; - - int Nr = Qio.num_rows(); DVec rho,rhou,rhov,Ener; - - // wrap current state data (columns of Qio) - rho.borrow (Nr, Qio.pCol(1)); - rhou.borrow(Nr, Qio.pCol(2)); - rhov.borrow(Nr, Qio.pCol(3)); - Ener.borrow(Nr, Qio.pCol(4)); - - // update boundary nodes of Qio with boundary data - // pre-calculated in function MapGaussFaceData() - - rho (gmapB) = rhoB; - rhou(gmapB) = rhouB; - rhov(gmapB) = rhovB; - Ener(gmapB) = EnerB; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteIC2D.cpp deleted file mode 100644 index 2804fcb..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CouetteIC2D.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// CouetteIC2D.m -// function [Q] = CouetteIC2D(x, y, time) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::CouetteIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function [Q] = CouetteIC2D(x, y, time) - // Purpose: evaluat solution for Couette flow - - // gamma = 1.4; - int Nr = Qo.num_rows(); DVec rho,rhou,rhov,Ener, q1,q2,q3; - double gm1 = gamma-1.0; - - DVec rad2 = sqr(xi) + sqr(yi); - DVec rad = sqrt(rad2); - DVec theta = atan2(yi, xi); - DVec utheta = (-rad + 16.0/rad)/75.0; - DVec p = 1.0 + (1.0/SQ(75.0)) * (rad2/2.0 - 32.0*log(rad) - 128.0/rad2); - -#if (0) - // set initial {rho,rhou,rhov} to steady-state solution - Qo(All,1) = 1.0; - Qo(All,2) = (-sin(theta)).dm(utheta); - Qo(All,3) = ( cos(theta)).dm(utheta); -#else - // set initial {rho,rhou,rhov} with zero momentum - Qo(All,1) = 1.0; - Qo(All,2) = 0.0; - Qo(All,3) = 0.0; -#endif - - // extract initial {rho,rhou,rhov} from Q(:,1:3) - q1.borrow(Nr,Qo.pCol(1)); q2.borrow(Nr,Qo.pCol(2)); q3.borrow(Nr,Qo.pCol(3)); - - // use initial {rho,rhou,rhov} to calculate initial {Ener} - Qo(All,4) = p/gm1 + 0.5*(sqr(q2)+sqr(q3)).dd(q1); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D.cpp deleted file mode 100644 index 1f9bbfc..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D.cpp +++ /dev/null @@ -1,293 +0,0 @@ -// CurvedEuler2D.cpp -// member routines for class CurvedEuler2D -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -CurvedEuler2D::CurvedEuler2D() -//--------------------------------------------------------- -{ - class_name = "CurvedEuler2D"; - - // set simulation parameters - gamma = 1.4; - gm1 = gamma - 1.0; -} - - -//--------------------------------------------------------- -CurvedEuler2D::~CurvedEuler2D() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void CurvedEuler2D::Resize() -//--------------------------------------------------------- -{ - // Allocate member arrays - Q.resize (Np*K, 4); // solution fields - rhsQ.resize(Np*K, 4); // Runge-Kutta stage values - resQ.resize(Np*K, 4); // Runge-Kutta residual -} - - -//--------------------------------------------------------- -void CurvedEuler2D::Resize_cub() -//--------------------------------------------------------- -{ - // resize cubature arrays - int Nc = m_cub.Ncub, Ng=m_gauss.NGauss; int Ngf=Ng*Nfaces*K; - // assumes cub and gauss are ready - assert(Nc>0 && Ng>0 && Ngf>0); - cQ.resize(Nc*K,4); cF.resize(Nc*K,4); cG.resize(Nc*K,4); - gQ.resize(Ngf,4); gQM.resize(Ngf,4); gQP.resize(Ngf,4); - flux.resize(Ngf,4); -} - - -//--------------------------------------------------------- -void CurvedEuler2D::MapGaussFaceData() -//--------------------------------------------------------- -{ - // override nodal face information with - // Gauss nodal face information - - this->nx = m_gauss.nx; this->ny = m_gauss.ny; - this->mapW = m_gauss.mapW; this->mapI = m_gauss.mapI; - this->mapO = m_gauss.mapO; this->mapB = m_gauss.mapB; - this->mapC = m_gauss.mapC;//this->mapS = m_gauss.mapS; -} - - - -//--------------------------------------------------------- -void CurvedEuler2D::PreCalcBdryData() -//--------------------------------------------------------- -{ - - //--------------------------------------------- - // pre-calculated data for IsentropicVortex - //--------------------------------------------- - if (eIsentropicVortex == sim_type) { - gmapB = concat(mapI, mapO, mapW); - gxB = m_gauss.x(gmapB); - gyB = m_gauss.y(gmapB); - } - - //--------------------------------------------- - // pre-calculated data for ChannelFlow - //--------------------------------------------- - else if (eChannelFlow == sim_type) { - gmapB = m_gauss.mapB; - gxB = m_gauss.x(m_gauss.mapB); - gyB = m_gauss.y(m_gauss.mapB); - } - - //--------------------------------------------- - // pre-calculated data for CouetteFlow - //--------------------------------------------- - else if (eCouetteFlow == sim_type) { - gmapB = concat(mapI, mapO); - gxB = m_gauss.x(gmapB); - gyB = m_gauss.y(gmapB); - - DVec rad2B = sqr(gxB) + sqr(gyB); - DVec radB = sqrt(rad2B); - DVec thetaB = atan2(gyB, gxB); - DVec uthetaB = (-radB + 16.0/radB)/75.0; - DVec pB = 1.0 + (1.0/SQ(75.0)) * (rad2B/2.0 - 32.0*log(radB) - 128.0/rad2B); - - // store constant boundary data - rhoB = ones(gmapB.size()); - rhouB = (-sin(thetaB)).dm(uthetaB); - rhovB = ( cos(thetaB)).dm(uthetaB); - EnerB = pB/gm1 + 0.5*(sqr(rhouB)+sqr(rhovB)).dd(rhoB); - } - - //... - -} - - -//--------------------------------------------------------- -void CurvedEuler2D::SetIC() -//--------------------------------------------------------- -{ - // compute initial condition (time=0) - (this->*InitialSolution)(x, y, 0.0, Q); -} - - -//--------------------------------------------------------- -void CurvedEuler2D::SetStepSize() -//--------------------------------------------------------- -{ - // function dt = Euler2Ddt(Q, gamma) - // compute time step for the compressible Euler equations - DVec rho,rhou,rhov,Ener, u,v,p,c,squv,Fscale_2,w_speeds, q1,q2,q3,q4; - - // since "self-mapping" of arrays is illegal, - // e.g. rho = rho(vmapM), use temp wrappers - q1.borrow(Np*K,Q.pCol(1)); q2.borrow(Np*K,Q.pCol(2)); - q3.borrow(Np*K,Q.pCol(3)); q4.borrow(Np*K,Q.pCol(4)); - - rho=q1(vmapM); rhou=q2(vmapM); rhov=q3(vmapM); Ener=q4(vmapM); - u = rhou.dd(rho); v = rhov.dd(rho); squv=sqr(u)+sqr(v); - - p = gm1 * (Ener - rho.dm(squv)/2.0); - c = sqrt(abs(gamma*p.dd(rho))); - - Fscale_2 = 0.5*Fscale; - w_speeds=SQ(N+1)*Fscale_2.dm(sqrt(squv)+c); - dt = 1.0/w_speeds.max_val(); - - Nsteps = (int)ceil(FinalTime/dt); - dt = FinalTime/(double)Nsteps; -} - - -//--------------------------------------------------------- -void CurvedEuler2D::InitRun() -//--------------------------------------------------------- -{ - StartUp2D(); // construct grid and metric - - //------------------------------------- - // Adjust faces on circular boundaries - //------------------------------------- - switch (sim_type) { - - case eIsentropicVortex: - // no cylinder faces - straight.range(1,K); curved.resize(0); - break; - - case eChannelFlow: - // no cylinder faces - straight.range(1,K); curved.resize(0); - break; - - case eCouetteFlow: - // move inflow faces to r=4.0 - AdjustCylBC(4.0, 0.0, 0.0, BC_In); // outer cylinder - // move outflow faces to r=1.0 - AdjustCylBC(1.0, 0.0, 0.0, BC_Out); // inner cylinder - break; - - default: - // set default maps for {straight,curved} elements - straight.range(1,K); curved.resize(0); - break; - } - - - BuildBCMaps2D(); // map faces subject to boundary conditions - Resize(); // allocate arrays - SetIC(); // set initial conditions - SetStepSize(); // compute initial timestep (using IC's) - - // storage for residual at each time-step - resid.resize(Nsteps+1); - - //--------------------------------------------- - // base class version sets counters and flags - //--------------------------------------------- - NDG2D::InitRun(); - - -//Nreport = 1; // set frequency of reporting -//Nreport = 5; // set frequency of reporting -//Nreport = 20; // set frequency of reporting - Nreport = 50; // set frequency of reporting -//Nreport = 100; // no reports when timing -//Nreport = 500; // no reports when timing - - Nrender = Nreport; // output frequency -//Nrender = 100; // output frequency -//Nrender = 10000; // output frequency - -//NvtkInterp = 16; // set output resolution -//NvtkInterp = 10; // set output resolution - NvtkInterp = 8; // set output resolution -//NvtkInterp = 6; // set output resolution - - - Summary(); // Show simulation details -} - - -//--------------------------------------------------------- -void CurvedEuler2D::Summary() -//--------------------------------------------------------- -{ - // TODO: add details of operators and sparse solvers - NDG2D::Summary(); -} - - -//--------------------------------------------------------- -void CurvedEuler2D::Report(bool bForce) -//--------------------------------------------------------- -{ - if (1 == tstep) { - // print header - umLOG(1, "\n step time rho(min) rho(max) En(min) En(max) dt \n" - "----------------------------------------------------------------\n"); - } - - if (!umMOD(tstep,Nreport) || bForce || (1==tstep)) - { - double r_min=Q.min_col_val(1), r_max=Q.max_col_val(1); - double e_min=Q.min_col_val(4), e_max=Q.max_col_val(4); - - umLOG(1, "%5d %6.3lf %8.5lf %8.5lf %8.5lf %8.5lf %8.6lf\n", - tstep, time, r_min, r_max, e_min, e_max, dt); - } - - if (!umMOD(tstep,Nrender) || bForce) - { - -#if (0) - - Q_plot = Q; - - // extract conserved variables, calculate - // vorticity, and load this as 4th field: - DMat rho, rhou, rhov, u,v, curl; - rho.borrow(Np,K,Q.pCol(1)); rhou.borrow(Np,K,Q.pCol(2)); rhov.borrow(Np,K,Q.pCol(3)); - u = rhou.dd(rho); v = rhov.dd(rho); - Curl2D(u, v, curl); - Q_plot(All,4) = curl; - OutputVTK(Q_plot, NvtkInterp); - -#else - - OutputVTK(Q, NvtkInterp); - -#endif - } -} - - -//--------------------------------------------------------- -void CurvedEuler2D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - this->Report(true); - - // Report error and work info - if (HasAnalyticSol()) { - umLOG(1, "\n Max analytic error : %12.4e\n", this->GetAnalyticError()); - umLOG(1, "----------------------------------\n"); - } - - umLOG(1, "\n time for NDG work: %0.2lf secs\n", time_work); - umLOG(1, " rhs work: %0.2lf\n", time_rhs); - umLOG(1, " time for main loop: %0.2lf secs\n\n",time_total); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Driver.cpp deleted file mode 100644 index ec412bd..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Driver.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// CurvedEuler2DDriver.m -// Driver script for solving the 2D vacuum Euler's equations -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::Driver() -//--------------------------------------------------------- -{ - //-------------------------------------------------- - // select order of polynomial approximation (N) - //-------------------------------------------------- -//N = 3; -//N = 4; -//N = 6; - N = 8; -//N = 10; - - //-------------------------------------------------- - // select simulation type - //-------------------------------------------------- - sim_type = eIsentropicVortex; -//sim_type = eChannelFlow; -//sim_type = eCouetteFlow; - - //-------------------------------------------------- - // select flux type - //-------------------------------------------------- -//flux_type = FT_LaxF; - flux_type = FT_Roe; -//flux_type = FT_HLL; - - //-------------------------------------------------- - // select mesh, initial conditions, and BC function - //-------------------------------------------------- - - switch (sim_type) { - case eIsentropicVortex: - FileName = "Grid/Euler2D/vortexA04.neu"; - InitialSolution = &CurvedEuler2D::IsentropicVortexIC2D; - ExactSolution = &CurvedEuler2D::IsentropicVortexIC2D; - BCSolution = &CurvedEuler2D::IsentropicVortexBC2D; - break; - - case eChannelFlow: - FileName = "Grid/Euler2D/Euler01.neu"; - InitialSolution = &CurvedEuler2D::ChannelIC2D; - ExactSolution = NULL; - BCSolution = &CurvedEuler2D::ChannelBC2D; - break; - - case eCouetteFlow: - //FileName = "Grid/Euler2D/Couette_K082.neu"; - FileName = "Grid/Euler2D/Couette_K242.neu"; - //FileName = "Grid/Euler2D/Couette_K856.neu"; - InitialSolution = &CurvedEuler2D::CouetteIC2D; - ExactSolution = NULL; - BCSolution = &CurvedEuler2D::CouetteBC2D; - break; - - default: - umERROR("CurvedEuler2D::Driver()", "Simulation case unknown"); - return; - } - - //-------------------------------------------------- - // read mesh: vertices, elements, materials, BC's - //-------------------------------------------------- - if (!MeshReaderGambit2D(FileName)) { - umWARNING("CurvedEuler2D::Driver", "Error loading mesh (file: %s)\nExiting.\n",FileName.c_str()); - return; - } - - try { - //FinalTime = 0.1; - FinalTime = 10.0; - //FinalTime = 2.0; - //FinalTime = 1.0; - Run(); // Solve Problem - } catch (...) { - umWARNING("CurvedEuler2D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Fluxes.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Fluxes.cpp deleted file mode 100644 index 8e9093b..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Fluxes.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// Euler2D_Fluxes.m -// function [F,G,rho,u,v,p] = EulerFluxes2D(Q, gamma) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::Fluxes(DMat& Qin, DMat& F, DMat& G) -//--------------------------------------------------------- -{ - // function [F,G,rho,u,v,p] = EulerFluxes(Qin, gamma) - // Purpose: evaluate primitive variables and Euler flux functions - - int Nr=Qin.num_rows(); DVec rho, rhou, rhov, Ener, u, v, p; - - // extract conserved variables - rho.borrow (Nr,Qin.pCol(1)); rhou.borrow(Nr,Qin.pCol(2)); - rhov.borrow(Nr,Qin.pCol(3)); Ener.borrow(Nr,Qin.pCol(4)); - - // compute primitive variables - u=rhou.dd(rho); v=rhov.dd(rho); p=gm1*(Ener-0.5*(rhou.dm(u)+rhov.dm(v))); - - // compute flux functions - F(All,1) = rhou; - F(All,2) = rhou.dm(u) + p; - F(All,3) = rhov.dm(u); - F(All,4) = u.dm(Ener+p); - - G(All,1) = rhov; - G(All,2) = rhou.dm(v); - G(All,3) = rhov.dm(v) + p; - G(All,4) = v.dm(Ener+p); -} - - -//--------------------------------------------------------- -void CurvedEuler2D::Fluxes -( - DMat& Qin, // [in] - double gamma, // [in] - DMat& F, // [out] - DMat& G, // [out] - DVec& rho, // [out] - DVec& u, // [out] - DVec& v, // [out] - DVec& p // [out] -) -//--------------------------------------------------------- -{ - // function [F,G,rho,u,v,p] = EulerFluxes(Q, gamma) - // Purpose: evaluate primitive variables and Euler flux functions - - // extract conserved variables - int Nr=Qin.num_rows(); DVec rhou, rhov, Ener; - rho = Qin(All,1); // deep copy rho for return - rhou.borrow(Nr,Qin.pCol(2)); // but borrow {ru,rv,E} - rhov.borrow(Nr,Qin.pCol(3)); - Ener.borrow(Nr,Qin.pCol(4)); - - // compute primitive variables - u=rhou.dd(rho); v=rhov.dd(rho); p=(gamma-1)*(Ener-0.5*(rhou.dm(u)+rhov.dm(v))); - - // compute flux functions - F(All,1) = rhou; - F(All,2) = rhou.dm(u) + p; - F(All,3) = rhov.dm(u); - F(All,4) = u.dm(Ener+p); - - G(All,1) = rhov; - G(All,2) = rhou.dm(v); - G(All,3) = rhov.dm(v) + p; - G(All,4) = v.dm(Ener+p); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_RHS.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_RHS.cpp deleted file mode 100644 index 92b3120..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_RHS.cpp +++ /dev/null @@ -1,97 +0,0 @@ -// CurvedEuler2DRHS.m -// CurvedEuler2DRHS.m -// function [rhsQ] = CurvedEulerRHS2D(Qin, time, SolutionBC, fluxtype) -// 2007/06/22 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::RHS(DMat& Qin, double ti, fp_BC SolutionBC) -//--------------------------------------------------------- -{ - // function [rhsQ] = CurvedEulerRHS2D(Qin, time, SolutionBC, fluxtype) - // purpose: compute right hand side residual for the compressible Euler gas dynamics equations - - DMat qn, ddr, dds, Fn, Gn, mmCHOL, tm1; - trhs = timer.read(); // time RHS work - - Cub2D& cub = this->m_cub; - Gauss2D& gauss = this->m_gauss; - - int Nc=cub.Ncub, Ng=gauss.NGauss, n=0, i=0, m=0, k=0; - int Nstraight=straight.size(), Ncurved=curved.size(); Index1D II; - - // 1.1 Interpolate solution to cubature nodes - for (n=1; n<=4; ++n) { - qn.borrow(Np,K, Qin.pCol(n)); - cQ(All,n) = cub.V*qn; - } - - // 1.2 Evaluate flux function at cubature nodes - this->Fluxes(cQ, cF, cG); - - // 1.3 Compute volume terms (dphidx, F) + (dphidy, G) - for (n=1; n<=4; ++n) { - Fn.borrow(Nc,K, cF.pCol(n)); Gn.borrow(Nc,K, cG.pCol(n)); - ddr = cub.DrT * (cub.W.dm(cub.rx.dm(Fn) + cub.ry.dm(Gn))); - dds = cub.DsT * (cub.W.dm(cub.sx.dm(Fn) + cub.sy.dm(Gn))); - rhsQ(All,n) = ddr + dds; - } - - // 2.1 SURFACE TERMS (using Gauss nodes on element faces) - // See MapGaussFaceData() - - // 2.2 Interpolate solution to Gauss surface nodes - for (n=1; n<=4; ++n) { - qn.borrow(Np,K, Qin.pCol(n)); - gQ = gauss.interp*qn; - gQM(All,n) = gQ(gauss.mapM); - gQP(All,n) = gQ(gauss.mapP); - } - - // 2.3 Apply boundary conditions to '+' traces - if (SolutionBC) { - (this->*BCSolution)(gauss.x, gauss.y, gauss.nx, gauss.ny, - gauss.mapI, gauss.mapO, gauss.mapW, gauss.mapC, - ti, gQP); - } - - // 2.4 Evaluate surface flux functions with stabilization - switch (flux_type) { - - case FT_LaxF: this->LF2D (gauss.nx, gauss.ny, gQM, gQP, gamma, flux); break; - case FT_Roe: this->Roe2D (gauss.nx, gauss.ny, gQM, gQP, gamma, flux); break; - case FT_HLL: this->HLL2D (gauss.nx, gauss.ny, gQM, gQP, gamma, flux); break; - - default: umERROR("CurvedEuler2D::RHS", - "unknown flux_type: %d", flux_type); break; - } - - // 2.5 Compute surface integral terms - for (n=1; n<=4; ++n) { - tm1 = gauss.interpT*(gauss.W.dm(flux(All,n))); - rhsQ(All,n) -= tm1; - } - - // 3.1 Multiply by inverse mass matrix - for (n=1; n<=4; ++n) - { - // 3.1.a Multiply straight sided elements by inverse mass matrix - for (m=1; m<=Nstraight; ++m) { - k = straight(m); II.reset((k-1)*Np+1, k*Np); - rhsQ(II, n) = VVT * dd(rhsQ(II,n), J(II)); - } - - // 3.1.b Multiply curvilinear elements by custom inverse mass matrices - for (m=1; m<=Ncurved; ++m) { - k = curved(m); II.reset((k-1)*Np+1, k*Np); - mmCHOL.borrow(Np,Np, cub.mmCHOL.pCol(k)); - mmCHOL.set_factmode(FACT_CHOL); // indicate factored state - rhsQ(II, n) = chol_solve(mmCHOL, rhsQ(II, n)); - } - } - - time_rhs += (timer.read() - trhs); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Run.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Run.cpp deleted file mode 100644 index d57d18b..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_Run.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// CurvedEuler2D.m -// function Q = CurvedEuler2D(Q, FinalTime, ExactSolution, ExactSolutionBC, fluxtype) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::Run() -//--------------------------------------------------------- -{ - // function Q = CurvedEuler2D(Q, FinalTime, ExactSolution, ExactSolutionBC, fluxtype) - // Purpose : Integrate 2D Euler equations using a 4th order low storage RK - - InitRun(); - - // choose order to integrate exactly - CubatureOrder = (int)floor(2.0*(N+1)*3.0/2.0); - NGauss = (int)floor(2.0*(N+1)); - - // build cubature node data for all elements - CubatureVolumeMesh2D(CubatureOrder); - - // build Gauss node data for all element faces - GaussFaceMesh2D(NGauss); - - Resize_cub(); // resize cubature arrays - MapGaussFaceData(); // {nx = gauss.nx}, etc. - PreCalcBdryData(); // gmapB = concat(mapI, mapO), etc. - ti0=timer.read(); // time simulation loop - - // outer time step loop - while (time FinalTime) {dt=FinalTime-time;} - tw1=timer.read(); // time NDG work - - // 3rd order SSP Runge-Kutta - this->RHS(Q, time,BCSolution); Q1 = Q + dt*rhsQ; - this->RHS(Q1,time,BCSolution); Q2 = (3.0*Q + Q1 + dt*rhsQ)/4.0; - this->RHS(Q2,time,BCSolution); Q = (Q + 2.0*Q2 + 2.0*dt*rhsQ)/3.0; - - time += dt; // increment time - SetStepSize(); // compute new timestep - - time_work += timer.read() - tw1; // accumulate cost of NDG work - Report(); // optional reporting - ++tstep; // increment timestep - - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_main.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_main.cpp deleted file mode 100644 index e8448f7..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/CurvedEuler2D_main.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// NDG.cpp: entry point for the NDG (console version) -// Note: reduced version (Curved Euler2D only) -// 2007/05/26 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG_headers.h" -#include "CurvedEuler2D.h" - -//--------------------------------------------------------- -int main(int argc, char* argv[]) -//--------------------------------------------------------- -{ - InitGlobalInfo(); // create global data and open logs - - umLOG(1, "\n"); - umLOG(1, "--------------------------------\n"); - umLOG(1, " NuDG++ \n"); - umLOG(1, " Nodal Discontinuous Galerkin \n"); - umLOG(1, " Method for non-linear \n"); - umLOG(1, " PDE systems \n"); - umLOG(1, " \n"); - umLOG(1, " o version 3.0.0 \n"); - umLOG(1, " o June 6, 2007 \n"); - umLOG(1, " o Dr Tim Warburton \n"); - umLOG(1, " o tim.warburton@gmail.com \n"); - umLOG(1, "--------------------------------\n\n"); - - NDG2D *p = new CurvedEuler2D; - - if (p) - { - p->Driver(); // call driver - delete p; // delete simulator - - umLOG(1, "\nSimulation complete.\n\n"); - } else { - umWARNING("NDGDriver", "No simulator created"); - } - - FreeGlobalInfo(); // release global data and close logs - return 0; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerHLL2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerHLL2D.cpp deleted file mode 100644 index 15db1c1..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerHLL2D.cpp +++ /dev/null @@ -1,85 +0,0 @@ -// EulerHLL2D.m -// function flux = EulerHLL2D(lnx, lny, QM, QP, gamma) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::HLL2D -( - const DMat& lnx, - const DMat& lny, - DMat& QM, - DMat& QP, - double gamma, - DMat& flux -) -//--------------------------------------------------------- -{ - // function flux = EulerHLL2D(lnx, lny, QM, QP, gamma) - // Purpose: compute surface fluxes for Euler's equations using - // an approximate Riemann solver based on Roe averages - - static DMat fxQM,fyQM, fxQP,fyQP, fx; - - DVec rhouM,rhovM,EnerM, rhoM,uM,vM,pM; - DVec rhouP,rhovP,EnerP, rhoP,uP,vP,pP; - DVec HM,HP,H, rho,u,v, c2,c,cM,cP,rhoMs,rhoPs, rhoMsPs; - DVec SL,SR, t1,t2,t3, fx2,fx3, vzero; - - int Ngf=QM.num_rows(); vzero.zeros(Ngf); - fxQM.resize(Ngf,4, false); fyQM.resize(Ngf,4, false); - fxQP.resize(Ngf,4, false); fyQP.resize(Ngf,4, false); - fx.resize (Ngf,4, false); - - - // Deep-copy {rhouM/P,rhovM/P}, but just borrow {EnerM/P} - rhouM = QM(All,2); rhovM=QM(All,3); EnerM.borrow(Ngf,QM.pCol(4)); - rhouP = QP(All,2); rhovP=QP(All,3); EnerP.borrow(Ngf,QP.pCol(4)); - - // Rotate "-" trace momentum to face normal-tangent coordinates - QM(All,2) = lnx.dm(rhouM) + lny.dm(rhovM); - QM(All,3) = -lny.dm(rhouM) + lnx.dm(rhovM); - - // Rotate "+" trace momentum to face normal-tangent coordinates - QP(All,2) = lnx.dm(rhouP) + lny.dm(rhovP); - QP(All,3) = -lny.dm(rhouP) + lnx.dm(rhovP); - - // Compute fluxes and primitive variables in rotated coordinates - this->Fluxes(QM, gamma, fxQM,fyQM, rhoM,uM,vM,pM); - this->Fluxes(QP, gamma, fxQP,fyQP, rhoP,uP,vP,pP); - - HM = (EnerM+pM).dd(rhoM); cM = sqrt(gamma*pM.dd(rhoM)); - HP = (EnerP+pP).dd(rhoP); cP = sqrt(gamma*pP.dd(rhoP)); - - // Compute Roe average variables - rhoMs = sqrt(rhoM); rhoPs = sqrt(rhoP); - rhoMsPs = rhoMs + rhoPs; - - rho = rhoMs.dm(rhoPs); - u = (rhoMs.dm(uM) + rhoPs.dm(uP)).dd(rhoMsPs); - v = (rhoMs.dm(vM) + rhoPs.dm(vP)).dd(rhoMsPs); - H = (rhoMs.dm(HM) + rhoPs.dm(HP)).dd(rhoMsPs); - - c2 = gm1 * (H - 0.5*(sqr(u)+sqr(v))); c = sqrt(c2); - - // Compute estimate of waves speeds - SL = min(uM-cM, u-c); - SR = max(uP+cP, u+c); - - // Compute HLL flux - t1 = (min(SR,vzero) - min(vzero,SL)).dd(SR-SL); - t2 = 1.0 - t1; - t3 = (SR.dm(abs(SL))-SL.dm(abs(SR))).dd(2.0*(SR-SL)); - - for (int n=1; n<=4; ++n) { - fx(All,n) = t1.dm(fxQP(All,n)) + t2.dm(fxQM(All,n)) - t3.dm(QP(All,n)-QM(All,n)); - } - - // rotate flux back into Cartesian coordinates - flux = fx; fx2.borrow(Ngf, fx.pCol(2)); fx3.borrow(Ngf, fx.pCol(3)); - flux(All,2) = lnx.dm(fx2) - lny.dm(fx3); - flux(All,3) = lny.dm(fx2) + lnx.dm(fx3); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerLF2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerLF2D.cpp deleted file mode 100644 index 3c9adde..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerLF2D.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// EulerLF2D.m -// function flux = EulerLF2D(lnx, lny, QM, QP, gamma) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::LF2D -( - const DMat& lnx, - const DMat& lny, - DMat& QM, - DMat& QP, - double gamma, - DMat& flux -) -//--------------------------------------------------------- -{ - // Function flux = EulerLF2D(nx, ny, QM, QP, gamma) - // Purpose: compute Local Lax-Friedrichs/Rusonov fluxes for Euler equations - - static DMat fxM,fyM, fxP,fyP; int Ngf=QM.num_rows(); - fxM.resize(Ngf,4, false); fyM.resize(Ngf,4, false); - fxP.resize(Ngf,4, false); fyP.resize(Ngf,4, false); - - DMat maxvel; DVec rhoM,uM,vM,pM, rhoP,uP,vP,pP; - - // Evaluate primitive variables & flux functions at '-' and '+' traces - this->Fluxes(QM, gamma, fxM,fyM, rhoM,uM,vM,pM); - this->Fluxes(QP, gamma, fxP,fyP, rhoP,uP,vP,pP); - - // Compute wave speed for Lax-Friedrichs/Rusonov numerical fluxes - maxvel = max( sqrt(sqr(uM)+sqr(vM)) + sqrt(abs(gamma*pM.dd(rhoM))), - sqrt(sqr(uP)+sqr(vP)) + sqrt(abs(gamma*pP.dd(rhoP)))); - - NGauss = m_gauss.NGauss; - maxvel.reshape(NGauss, Nfaces*K); - maxvel = outer( ones(NGauss), maxvel.max_col_vals()); - maxvel.reshape(NGauss*Nfaces, K); - - // Compute + lift fluxes to volume residual - for (int n=1; n<=4; ++n) { - flux(All,n) = 0.5*(lnx.dm(fxP(All,n) + fxM(All,n)) + - lny.dm(fyP(All,n) + fyM(All,n)) + - maxvel.dm(QM(All,n) - QP(All,n))); - } - -#if (0) - dumpDMat(flux, "flux"); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerRoe2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerRoe2D.cpp deleted file mode 100644 index c0235d9..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/EulerRoe2D.cpp +++ /dev/null @@ -1,102 +0,0 @@ -// EulerRoe2D.m -// function flux = EulerRoe2D(lnx, lny, QM, QP, gamma) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::Roe2D -( - const DMat& lnx, - const DMat& lny, - DMat& QM, - DMat& QP, - double gamma, - DMat& flux -) -//--------------------------------------------------------- -{ - //--------------------------- - double tf1 = timer.read(); - //--------------------------- - - // function flux = EulerRoe2D(lnx, lny, QM, QP, gamma) - // Purpose: compute surface fluxes for Euler's equations using an - // approximate Riemann solver based on Roe averages - - static DMat fxQM,fyQM, fxQP,fyQP; - - DVec rhouM,rhovM,EnerM, rhoM,uM,vM,pM; - DVec rhouP,rhovP,EnerP, rhoP,uP,vP,pP; - DVec HM,HP,H, rho,u,v,h, c2,c, rhoMs,rhoPs, rhoMsPs; - DVec dW1,dW2,dW3,dW4, fx2,fx3; - - int Ngf=QM.num_rows(); - fxQM.resize(Ngf,4, false); fyQM.resize(Ngf,4, false); - fxQP.resize(Ngf,4, false); fyQP.resize(Ngf,4, false); - - // Deep-copy {rhouM/P,rhovM/P}, but just borrow {EnerM/P} - rhouM = QM(All,2); rhovM=QM(All,3); EnerM.borrow(Ngf,QM.pCol(4)); - rhouP = QP(All,2); rhovP=QP(All,3); EnerP.borrow(Ngf,QP.pCol(4)); - - // Rotate "-" trace momentum to face normal-tangent coordinates - QM(All,2) = lnx.dm(rhouM) + lny.dm(rhovM); - QM(All,3) = -lny.dm(rhouM) + lnx.dm(rhovM); - - // Rotate "+" trace momentum to face normal-tangent coordinates - QP(All,2) = lnx.dm(rhouP) + lny.dm(rhovP); - QP(All,3) = -lny.dm(rhouP) + lnx.dm(rhovP); - - // Compute fluxes and primitive variables in rotated coordinates - this->Fluxes(QM, gamma, fxQM,fyQM, rhoM,uM,vM,pM); - this->Fluxes(QP, gamma, fxQP,fyQP, rhoP,uP,vP,pP); - - // Compute enthalpy - HM = (EnerM+pM).dd(rhoM); HP = (EnerP+pP).dd(rhoP); - - // Compute Roe average variables - rhoMs = sqrt(rhoM); rhoPs = sqrt(rhoP); - rhoMsPs = rhoMs + rhoPs; - - rho = rhoMs.dm(rhoPs); - u = (rhoMs.dm(uM) + rhoPs.dm(uP)).dd(rhoMsPs); - v = (rhoMs.dm(vM) + rhoPs.dm(vP)).dd(rhoMsPs); - H = (rhoMs.dm(HM) + rhoPs.dm(HP)).dd(rhoMsPs); - - c2 = gm1 * (H - 0.5*(sqr(u)+sqr(v))); c = sqrt(c2); - - // Riemann fluxes - dW1 = -0.5*(rho.dm(uP-uM)).dd(c) + 0.5*(pP-pM).dd(c2); - dW2 = (rhoP-rhoM) - (pP-pM).dd(c2); - dW3 = rho.dm(vP-vM); - dW4 = 0.5*(rho.dm(uP-uM)).dd(c) + 0.5*(pP-pM).dd(c2); - - dW1 = abs(u-c).dm(dW1); - dW2 = abs(u ).dm(dW2); - dW3 = abs(u ).dm(dW3); - dW4 = abs(u+c).dm(dW4); - - // Form Roe fluxes - DMat fx = (fxQP+fxQM)/2.0; - -//fx(All,1) -= (dW1.*1 + dW2.*1 + dW3.*0 + dW4.*1 )/2.0; -//fx(All,2) -= (dW1.*(u-c) + dW2.*u + dW3.*0 + dW4.*(u+c) )/2.0; -//fx(All,3) -= (dW1.*v + dW2.*v + dW3.*1 + dW4.*v )/2.0; -//fx(All,4) -= (dW1.*(H-u.*c) + dW2.*(u.^2+v.^2)/2 + dW3.*v + dW4.*(H+u.*c))/2.0; - - fx(All,1) -= (dW1 + dW2 + dW4 )/2.0; - fx(All,2) -= (dW1.dm(u-c) + dW2.dm(u) + dW4.dm(u+c) )/2.0; - fx(All,3) -= (dW1.dm(v) + dW2.dm(v) + dW3 + dW4.dm(v) )/2.0; - fx(All,4) -= (dW1.dm(H-u.dm(c)) + dW2.dm(sqr(u)+sqr(v))/2.0 + dW3.dm(v) + dW4.dm(H+u.dm(c)))/2.0; - - // rotate back to Cartesian - flux = fx; fx2.borrow(Ngf, fx.pCol(2)); fx3.borrow(Ngf, fx.pCol(3)); - flux(All,2) = lnx.dm(fx2) - lny.dm(fx3); - flux(All,3) = lny.dm(fx2) + lnx.dm(fx3); - - //--------------------------- - time_flux += timer.read() - tf1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexBC2D.cpp deleted file mode 100644 index b4a9312..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexBC2D.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// IsentropicVortexBC2D.m -// function [Q] = IsentropicVortexBC2D(Q); -// 2007/06/30 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::IsentropicVortexBC2D -( - const DVec& xi, - const DVec& yi, - const DVec& nxi, - const DVec& nyi, - const IVec& tmapI, - const IVec& tmapO, - const IVec& tmapW, - const IVec& tmapC, - double ti, - DMat& Qio -) -//--------------------------------------------------------- -{ - // function [Q] = Euler2Dbc(Q) - // Purpose: Impose boundary conditions on 2D Euler equations on weak form - - // Example is static isentropic vortex - - static DMat Qbc; Qbc.resize(Qio); DVec qn, qbcn; - - // Load Qbc with IsentropicVortex2D for time=ti - IsentropicVortexIC2D(xi, yi, ti, Qbc); - - // map isentropic vortex values onto boundary nodes - // Note: this loop updates Qio(:,n) in-place: - int Nr=Qio.num_rows(); - for (int n=1; n<=4; ++n) { - qn.borrow (Nr, Qio.pCol(n)); // qn -> Q(:,n) - qbcn.borrow(Nr, Qbc.pCol(n)); - qn(gmapB) = qbcn(gmapB); - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexIC2D.cpp deleted file mode 100644 index 1ab8fe8..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexIC2D.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// IsentropicVortexIC2D.m -// function Q = IsentropicVortexIC2D(xi, yi, ti) -// 2007/06/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedEuler2D.h" - - -//--------------------------------------------------------- -void CurvedEuler2D::IsentropicVortexIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function Q = IsentropicVortexIC2D(xi, yi) - // - // Purpose: compute flow configuration given by - // http://www.cfd-online.com/Wiki/2-D_vortex_in_isentropic_flow - // Y.C. Zhou, G.W. Wei / Journal of Computational Physics 189 (2003) 159 (TW: p96.pdf) - - static DVec u, v; DVec xmut, ymvt, rsqr, ex1r, tv1, rho1, p1; - int Nr = Qo.num_rows(); u.resize(Nr); v.resize(Nr); - - // reset static arrays to constant values - u=1.0; v=0.0; - - // base flow parameters - double xo=5.0, yo=0.0, beta=5.0; - double fac = 16.0*gamma*pi*pi; - - xmut = xi - u*ti; ymvt = yi - v*ti; - rsqr = sqr(xmut-xo)+sqr(ymvt-yo); - ex1r = exp(1.0-rsqr); - - // perturbed density - u -= beta * ex1r.dm(ymvt-yo)/(2.0*pi); - v += beta * ex1r.dm(xmut-xo)/(2.0*pi); - - tv1 = (1.0-(gm1*SQ(beta)*exp(2.0*(1.0-rsqr))/fac)); - rho1 = pow(tv1, 1.0/gm1); - p1 = pow(rho1, gamma); - - Qo(All,1) = rho1; - Qo(All,2) = rho1.dm(u); - Qo(All,3) = rho1.dm(v); - Qo(All,4) = p1/gm1 + 0.5*rho1.dm(sqr(u)+sqr(v)); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropBC2D.cpp deleted file mode 100644 index 21f55e2..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropBC2D.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// BackdropBC2D.cpp -// function [bcUx, bcUy, bcPR, bcdUndt] = -// BackdropBC2D(x, y, nx, ny, mapI, mapO, mapW, mapC, time, nu) -// 2007/07/23 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::BackdropBC2D -( - const DVec& xin, // [in] - const DVec& yin, // [in] - const DVec& nxi, // [in] - const DVec& nyi, // [in] - const IVec& MAPI, // [in] - const IVec& MAPO, // [in] - const IVec& MAPW, // [in] - const IVec& MAPC, // [in] - double ti, // [in] - double nu, // [in] - DVec& BCUX, // [out] - DVec& BCUY, // [out] - DVec& BCPR, // [out] - DVec& BCDUNDT // [out] -) -//--------------------------------------------------------- -{ - // function [bcUx, bcUy, bcPR, bcdUndt] = BackdropBC2D(x, y, nx, ny, mapI, mapO, mapW, mapC, time, nu) - // Purpose: evaluate boundary conditions for "Backdrop" configuration - - int len = xin.size(); - - BCUX.resize(len); BCUY.resize(len); // resize result arrays - BCPR.resize(len); BCDUNDT.resize(len); // and set to zero - - // enforce inflow boundary conditions - BCUX(MAPI) = 1.0; - BCUY(MAPI) = 0.0; - -#if (1) - // ... ?? - BCDUNDT(MAPI) = 0.0; -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropIC2D.cpp deleted file mode 100644 index 0c9d1b0..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/BackdropIC2D.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// BackdropIC2D.cpp -// function [Ux, Uy, PR] = BackdropIC2D(x, y, time, nu) -// 2007/07/23 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::BackdropIC2D -( - const DVec& xi, - const DVec& yi, - double ti, // [in] - double nu, // [in] - DMat& Uxo, // [out] - DMat& Uyo, // [out] - DMat& PRo // [out] -) -//--------------------------------------------------------- -{ - // function [Ux, Uy, PR] = BackdropIC2D(x, y, time, nu) - // Purpose: evaluate solution for "Backdrop" configuration - - Uxo.fill(0.0); - Uyo.fill(0.0); - PRo.fill(0.0); -} - diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D.cpp deleted file mode 100644 index 36b80a2..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D.cpp +++ /dev/null @@ -1,364 +0,0 @@ -// CurvedINS2D.cpp -// member routines for class CurvedINS2D -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -CurvedINS2D::CurvedINS2D() -//--------------------------------------------------------- -{ - class_name = "CurvedINS2D"; - - // Set system parameters and constants - sim_type = eNone; - nu = 1.0/40.0; - - // dual splitting scheme coefficients -//g0= 1.5; a0= 2.0; a1= -0.5; b0= 2.0; b1= -1.0; // high order - g0= 1.0; a0= 1.0; a1= 0.0; b0= 1.0; b1= 0.0; // init order - - // clear Cholesky solvers - create_solvers(); -} - - -//--------------------------------------------------------- -CurvedINS2D::~CurvedINS2D() -//--------------------------------------------------------- -{ - // clear Cholesky solvers - free_solvers(); -} - - -//--------------------------------------------------------- -void CurvedINS2D::Resize() -//--------------------------------------------------------- -{ - // Allocate storage for member arrays - Ux.resize(Np, K); Uy.resize(Np, K); PR.resize(Np, K); - bcUx.resize(Np*K); bcUy.resize(Np*K); bcPR.resize(Np*K); - bcdUndt.resize(Np*K); - - // storage for output - Q_plot.resize(Np*K, 4); -//Q_plot.resize(Np*K, 3); - - // storage for history of fields and nonlinear terms - Uxold.resize(Np,K); NUx.resize(Np,K); - Uyold.resize(Np,K); NUy.resize(Np,K); - - // storage for pressure Neumann boundary data - dpdn.resize(Nfp*Nfaces,K); -} - - -//--------------------------------------------------------- -void CurvedINS2D::PreCalcBdryData() -//--------------------------------------------------------- -{ - //gmapB = m_gauss.mapB; - //gxB = m_gauss.x(gmapB); - //gyB = m_gauss.y(gmapB); - - if (eBackdrop == sim_type) { - nbcmapD.resize(0); - vbcmapD.resize(0); - } else { - nbcmapD = concat( mapI, mapW, mapC); - vbcmapD = concat(vmapI, vmapW, vmapC); - } - - //--------------------------------------------- - // pre-calculate data for other simulations - //--------------------------------------------- - // if (eChannel == sim_type) { } - // else if (eKovasznay == sim_type) { } - // else if (eStep == sim_type) { } - // else if (eVolkerCylinder == sim_type) { } - // else if (ePearsonVortex == sim_type) { } - // else if (eChannel == sim_type) { } - // else if (eStirer == sim_type) { } - -} - - -//--------------------------------------------------------- -void CurvedINS2D::SetIC() -//--------------------------------------------------------- -{ - // evaluate initial data - //feval(ExactSolution, x, y, 0.0, nu, Ux,Uy,PR); - (this->*ExactSolution)(x, y, 0.0, nu, Ux,Uy,PR); -} - - -//--------------------------------------------------------- -void CurvedINS2D::SetStepSize() -//--------------------------------------------------------- -{ - //------------------------------------- - // time step parameter - //------------------------------------- - dtscale2D(dtscale); - dt = dtscale.min_val()/ double (SQ(N+1)); - - // Note: constraints on penalty methods - // if(N>1), dt = 2*dt; end; - // if(N>11) dt = .75*dt; end; - // if(strmatch(simtype,'PearsonVortex')) dt = .1*dt, end - - // Adjust stepsize for selected sim_type - // dt = 2.0*dt; // works for Volker cylinder - // dt = 0.1*dt; // ... - - if (ePearsonVortex == sim_type) { - // reduce stepsize for the vortex test case - //dt /= 10.0; - dt /= 5.0; - } - - Nsteps = (int)ceil(FinalTime/dt); - dt = FinalTime/(double)Nsteps; -} - - -//--------------------------------------------------------- -void CurvedINS2D::InitRun() -//--------------------------------------------------------- -{ - // construct grid and metric - StartUp2D(); - - // Optional mesh refinement: split each parent - // element into 4 conforming "child" elements - - if (Nrefine>0) { - umLOG(1, "before refine : K = %5d\n", K); - DMat Q2(Np*K, 1); IMat refineflag; - refineflag = Ones(K,Nfaces); - for (int i=1; i<=Nrefine; ++i) { - Q2 = ConformingHrefine2D(refineflag, Q2); - umLOG(1, "after refine %d: K = %5d\n", i, K); - } - } - - // Adjust faces on circular boundaries, - // and perform any sim-specific setup: - - switch (sim_type) { - - case eVolkerCylinder: - // move Cylinder bdry faces to radius 0.05 - AdjustCylBC(0.05, 0.,0., BC_Cyl); - break; - - default: - // set default maps for {straight,curved} elements - straight.range(1,K); curved.resize(0); - break; - } - - Resize(); // allocate arrays - BuildBCMaps2D(); // build boundary condition maps - SetIC(); // set initial conditions - SetStepSize(); // calculate step size (dt) - - // reset various work timers - time_setup = time_advection = 0.0; - time_viscous = time_viscous_sol = 0.0; - time_pressure = time_pressure_sol = 0.0; - - //--------------------------------------------- - // base class version sets counters and flags - //--------------------------------------------- - NDG2D::InitRun(); - - //--------------------------------------------- - // set frequency of reporting - //--------------------------------------------- -//Nreport = Nsteps/150; -//Nreport = 10; -//Nreport = 2; - - Nreport = 10; -//Nreport = 250; - -//Nreport = 1000; -//Nreport = 10000; - - //--------------------------------------------- - // set frequency of rendering - //--------------------------------------------- - Nrender = Nreport; -//Nrender = 250; -//Nrender = 1000; - -//NvtkInterp = 12; // set output resolution -//NvtkInterp = 5; // set output resolution - NvtkInterp = this->N; // use original nodes - - Summary(); // show simulation details -} - - -//--------------------------------------------------------- -void CurvedINS2D::create_solvers() -//--------------------------------------------------------- -{ - -#ifdef NDG_USE_CHOLMOD - // allocate CHOLMOD solvers - PRsystemC = new CHOLMOD_solver; - VELsystemC = new CHOLMOD_solver; -#else - // allocate Cholesky solvers - PRsystemC = new CS_Chol; - VELsystemC = new CS_Chol; -#endif - - // TODO: allow sparse LU solver for non-sym-pos-def - -} - - -//--------------------------------------------------------- -void CurvedINS2D::free_solvers() -//--------------------------------------------------------- -{ - // clear Cholesky solvers - if (PRsystemC) { delete PRsystemC; PRsystemC=NULL; } - if (VELsystemC) { delete VELsystemC; VELsystemC=NULL; } -} - - -//--------------------------------------------------------- -void CurvedINS2D::reset_solvers() -//--------------------------------------------------------- -{ - // release and recreate Cholesky solvers - free_solvers(); - create_solvers(); -} - - -//--------------------------------------------------------- -void CurvedINS2D::TimeScaleBCData() -//--------------------------------------------------------- -{ - // apply temporal scaling factors to bc data - - double tfac=1.0, tfac1=1.0, tpfac=1.0, tpfac1=1.0, tpfac2=1.0; - - if (eVolkerCylinder == sim_type) { - tfac = sin(pi* time/8.0); - tfac1 = sin(pi*(time+dt)/8.0); - tpfac = (pi/8.0)*cos(pi* time/8.0); - tpfac1= (pi/8.0)*cos(pi*(time)/8.0); - tpfac2= (pi/8.0)*cos(pi*(time)/8.0); - } - else if (ePearsonVortex == sim_type) { - double piSq=pi*pi; - tfac = exp(-nu*4*piSq*time); - tfac1 = exp(-nu*4*piSq*(time+dt)); - tpfac = -4*nu* piSq*exp(-nu*4*piSq*time); - tpfac1= exp(-nu*8*piSq*(time)); - tpfac2= exp(-nu*8*piSq*(time+dt)); - } - - bcUx = tfac*refbcUx; rhsbcUx = tfac1*refrhsbcUx; - bcUy = tfac*refbcUy; rhsbcUy = tfac1*refrhsbcUy; - bcPR = tpfac1*refbcPR; rhsbcPR = tpfac2*refrhsbcPR; - - bcdUndt = tpfac*refbcdUndt; -} - - - -//--------------------------------------------------------- -void CurvedINS2D::Summary() -//--------------------------------------------------------- -{ - // TODO: add details of operators and sparse solvers - NDG2D::Summary(); -} - - -//--------------------------------------------------------- -void CurvedINS2D::Report(bool bForce) -//--------------------------------------------------------- -{ - static DMat vort; - bool normal_report=true; - if (eVolkerCylinder == sim_type) {normal_report=false;} - -#if (1) - normal_report=true; -#endif - - // print report header on first step - if (1 == tstep) { - if (normal_report) { - umLOG(1, "\n step time min(Ux) max(Ux) min(Vort) max(Vort)\n" - "--------------------------------------------------------------------\n"); - } else { - umLOG(1, "\n step time Cd/ra Cl/ra dP \n" - "---------------------------------------------------\n"); - } - } - - if (normal_report) { - if (!umMOD(tstep,Nreport)||(1==tstep)||(tstep==Nsteps)||bForce) { - - Curl2D(Ux, Uy, vort); - - umLOG(1, "%7d %6.3lf %10.5lf %10.5lf %10.2lf %10.2lf\n", - tstep, time, Ux.min_val(), Ux.max_val(), vort.min_val(), vort.max_val()); - } - } else { - // VolkerCylinder: compute coefficients of drag and lift, - // as well as the pressure drop at the two sample points. - INSLiftDrag2D(0.05); - } - - - if (!umMOD(tstep,Nrender)||(1==tstep)||(tstep==Nsteps)||bForce) - { - // (this->*ExactSolution)(x, y, time, nu, exUx, exUy, exPR); - - Curl2D(Ux, Uy, vort); - - // load render data - Q_plot.set_col(1, Ux); // -exUx); - Q_plot.set_col(2, Uy); // -exUy); - Q_plot.set_col(3, PR); // -exPR); - Q_plot.set_col(4, vort); - - OutputVTK(Q_plot, NvtkInterp); - } -} - - -//--------------------------------------------------------- -void CurvedINS2D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - // this->Report(true); - - // Report error and work info - //if (HasAnalyticSol()) { - // umLOG(1, "\n Max analytic error : %12.4e\n", this->GetAnalyticError()); - // umLOG(1, "----------------------------------\n"); - //} - - umLOG(1, "\n operator setup : %8.2lf seconds\n", time_setup); - umLOG(1, " advection : %8.2lf\n", time_advection); - umLOG(1, " viscous : %8.2lf (chol %0.2lf)\n", time_viscous, time_viscous_sol); - umLOG(1, " pressure : %8.2lf (chol %0.2lf)\n", time_pressure, time_pressure_sol); - umLOG(1, " total NDG work : %8.2lf\n", time_work); - umLOG(1, " total sim time : %8.2lf\n\n",time_total); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Driver.cpp deleted file mode 100644 index 835a025..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Driver.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// CurvedINS2D_Driver.cpp -// Driver for computing the solution of the -// incompressible Navier-Stokes equations -// 2007/07/23 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::Driver() -//--------------------------------------------------------- -{ - umLOG(1, "CurvedINS2D::Driver()\n"); - - //------------------------------------- - // Choose simulation type, domain, - // initial solution and BC functions - //------------------------------------- -//sim_type = eChannel; -//sim_type = eKovasznay; -//sim_type = eStep; - sim_type = eVolkerCylinder; -//sim_type = ePearsonVortex; -//sim_type = eStirer; -//sim_type = eBackdrop; -//sim_type = eWedge; - - switch (sim_type) { - - case eChannel: - //FileName = "Grid/CFD/channelA1.neu"; - FileName = "Grid/CFD/cylinderA00075b.neu"; - ExactSolution = &CurvedINS2D::INSchannelIC2D; - ExactSolutionBC = &CurvedINS2D::INSchannelBC2D; - FinalTime = 1.0; nu = 1.0/40.0; - break; - - case eKovasznay: - FileName = "Grid/CFD/kovA02.neu"; - ExactSolution = &CurvedINS2D::KovasznayIC2D; - ExactSolutionBC = &CurvedINS2D::KovasznayBC2D; - FinalTime = 1.0; nu = 1.0/40.0; - break; - - case eVolkerCylinder: - //FileName = "Grid/CFD/cylinderA00075b.neu"; - //FileName = "Grid/CFD/cylinderCA0015.neu"; - //FileName = "Grid/CFD/Volker_306.neu"; - FileName = "Grid/CFD/Volker_374.neu"; - ExactSolution = &CurvedINS2D::INScylinderIC2D; - ExactSolutionBC = &CurvedINS2D::INScylinderBC2D; - FinalTime = 8.0; nu = 1e-3; - break; - - case ePearsonVortex: - //FileName = "Grid/CFD/pvortex4A01.neu"; - //FileName = "Grid/CFD/pv_0014.neu"; - //FileName = "Grid/CFD/pv_0036.neu"; - //FileName = "Grid/CFD/pv_0080.neu"; - //FileName = "Grid/CFD/pv_0156.neu"; - //FileName = "Grid/CFD/pv_0300.neu"; - FileName = "Grid/CFD/pv_0600.neu"; - //FileName = "Grid/CFD/pv_0999.neu"; - ExactSolution = &CurvedINS2D::PearsonVortexIC2D; - ExactSolutionBC = &CurvedINS2D::PearsonVortexBC2D; - FinalTime = 0.1; nu = 1e-2; - break; - - case eStirer: - break; - - case eBackdrop: - break; - - case eWedge: - break; - } - - //--------------------------------------------- - // Order of polynomial approximation (N) - //--------------------------------------------- -//N = 5; - N = 8; // Note: Volker_374.neu - very coarse at outflow! -//N = 12; - -//FinalTime = 1.0; - FinalTime = 8.0; -//FinalTime = 0.005; - - // Read in Mesh: [vertices, elements, materials, BC's] - if (!MeshReaderGambit2D(FileName)) { - umWARNING("CurvedINS2D::Driver", "Error loading mesh (file: %s)\nExiting.\n", FileName.c_str()); - return; - } - - try { - Run(); // Solve Problem - } catch (...) { - umWARNING("CurvedINS2D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Run.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Run.cpp deleted file mode 100644 index 3f03888..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_Run.cpp +++ /dev/null @@ -1,112 +0,0 @@ -// CurvedINS2D.m -// function [Ux, Uy, PR, time] = CurvedINS2D(... -// Ux, Uy, PR, FinalTime, nu, simtype, ExactSolution, BCfunction); -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::Run() -//--------------------------------------------------------- -{ - ti0=timer.read(); - - // function [Ux, Uy, PR, time] = CurvedINS2D(... - // Ux, Uy, PR, FinalTime, nu, simtype, ExactSolution, BCfunction); - // Purpose: integrate the incompressible Navier-Stokes equations to FinalTime - - InitRun(); // initialize timers & counters - - // choose order to integrate exactly - int Nint = (int)ceil(3.0*N/2.0); - - // build cubature nodes for all elements - CubatureOrder = 2*(Nint+1); CubatureVolumeMesh2D(CubatureOrder); - - // build Gauss node data for all element faces - NGauss = (Nint+1); GaussFaceMesh2D(NGauss); - -#if (1) - //------------------------------------- - // check all node sets - //------------------------------------- - Output_Mesh(); -//OutputNodes(false); // volume nodes -//OutputNodes(true); // face nodes -//OutputNodes_cub(); // cubature -//OutputNodes_gauss(); // quadrature -//umLOG(1, "\n*** Exiting after CUb, Gauss\n\n"); -//return; -#endif - - // recover memory from registry - NDG_garbage_collect(); - - // prepare data... - PreCalcBdryData(); - - // dual splitting scheme coefficients - g0 = 1.0; a0 = 1.0; a1 = 0.0; b0 = 1.0; b1 = 0.0; - - CurvedINSPressureSetUp2D(); // Build pressure matrix and boundary forcing (IPDG) - NDG_garbage_collect(); // recover memory from registry - - CurvedINSViscousSetUp2D(); // Build viscous matrix and boundary forcing (IPDG) - NDG_garbage_collect(); // recover memory from registry - - (this->*ExactSolutionBC) // Form inhomogeneous boundary term for rhs data - (Fx, Fy, nx,ny, mapI, mapO, mapW, mapC, 0.0, nu, - refbcUx, refbcUy, refbcPR, refbcdUndt); - - - // storage for history of fields and nonlinear terms - Uxold=Ux; NUx=0.0; Uyold=Uy; NUy=0.0; dpdn=0.0; - - time_work += timer.read() - ti0; // add cost of NDG setup - - // start time stepping - time = 0.0; - for (tstep=1; tstep<=Nsteps; ++tstep) - { - tw1=timer.read(); // time NDG work - - // update dual splitting scheme coefficients after - // first time step, then recalculate operators - if (2 == tstep) - { - // release and recreate Cholesky solvers - reset_solvers(); - - g0 = 1.5; a0 = 2.0; a1 = -0.5; b0 = 2.0; b1 = -1.0; - - // Rebuild pressure and viscous matrixes for new g0 - CurvedINSPressureSetUp2D(); - CurvedINSViscousSetUp2D(); - - NDG_garbage_collect(); - umMSG(1, "2nd sparse setup completed\n"); - //umERROR("Testing", "Exiting early"); - } - - TimeScaleBCData(); // apply temporal scaling factors to bc data - - INSAdvection2D(); // compute nonlinear terms NUx, NUy - //CurvedINSAdvection2D; // curved version - - INSPressure2D(); // compute pressure PR and intermediate UxTT, UyTT - //CurvedINSPressure2D; // curved version - - CurvedINSViscous2D(); // compute viscous solves and update velocity - - time_work += timer.read() - tw1; // accumulate cost of NDG work - time = tstep*dt; // increment time - Report(); // report results - - // if (tstep>100) break; - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_main.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_main.cpp deleted file mode 100644 index 8581f6e..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINS2D_main.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// NDG.cpp: entry point for the NDG (console version) -// Note: reduced version (Maxwell2D only) -// 2007/05/26 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -int main(int argc, char* argv[]) -//--------------------------------------------------------- -{ - InitGlobalInfo(); // create global data and open logs - - umLOG(1, "\n"); - umLOG(1, "--------------------------------\n"); - umLOG(1, " NuDG++ \n"); - umLOG(1, " Nodal Discontinuous Galerkin \n"); - umLOG(1, " Method for non-linear \n"); - umLOG(1, " PDE systems \n"); - umLOG(1, " \n"); - umLOG(1, " o version 3.0.0 \n"); - umLOG(1, " o June 6, 2007 \n"); - umLOG(1, " o Dr Tim Warburton \n"); - umLOG(1, " o tim.warburton@gmail.com \n"); - umLOG(1, "--------------------------------\n\n"); - - NDG2D *p = new CurvedINS2D; // 2D incompressible Navier-Stokes simulator - - if (p) - { - p->Driver(); // call driver - delete p; // delete simulator - - umLOG(1, "\nSimulation complete.\n\n"); - } else { - umWARNING("NDGDriver", "No simulator created"); - } - - FreeGlobalInfo(); // release global data and close logs - return 0; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSPressureSetUp2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSPressureSetUp2D.cpp deleted file mode 100644 index 0dc8bef..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSPressureSetUp2D.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// CurvedINSPressureSetUp2D.m -// function [PRperm, PRsystemC, PRsystemCT, rhsbcPR] = ... -// CurvedINSPressureSetUp2D(dt, nu, BCfunction) -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::CurvedINSPressureSetUp2D() -//--------------------------------------------------------- -{ - //--------------------------- - double t1 = timer.read(); - //--------------------------- - - // Note: assumes {m_cub,m_gauss} have been defined - Cub2D& cub = this->m_cub; - Gauss2D& gauss = this->m_gauss; - - // function [PRperm, PRsystemC, PRsystemCT, rhsbcPR] = ... - // CurvedINSPressureSetUp2D(dt, nu, BCfunction) - // - // Purpose: build pressure system and boundary forcing term - - CSd *PRsystemBC = new CSd("PRbc"); // NBN: delete before chol() - CSd *mm = new CSd("mmP"); // NBN: delete before chol() - CSd PRsystem("PR"); IVec ids; // NBN: passed to chol() - - // save original boundary types - saveBCType = BCType; - - // Convert {Out} boundary conditions to Dirichlet - ids = find(saveBCType, '=', (int)BC_Out); BCType(ids) = BC_Dirichlet; - - // Convert {In,Wall,Cyl} boundary conditions to Neumann - ids = find(saveBCType, '=', (int)BC_In ); BCType(ids) = BC_Neuman; - ids = find(saveBCType, '=', (int)BC_Wall); BCType(ids) = BC_Neuman; - ids = find(saveBCType, '=', (int)BC_Cyl); BCType(ids) = BC_Neuman; - - // Check: dumpIMat(BCType, "Pressure BCType"); - - // Form inhomogeneous boundary term for rhs data - (this->*ExactSolutionBC)(gauss.x, gauss.y, gauss.nx, gauss.ny, - gauss.mapI, gauss.mapO, gauss.mapW, gauss.mapC, 0.0, nu, - bcUx, bcUy, bcPR, bcdUndt); - - // Build pressure boundary condition forcing vector - CurvedPoissonIPDGbc2D(m_gauss, (*PRsystemBC)); - refrhsbcPR = (*PRsystemBC) * bcPR; - delete PRsystemBC; PRsystemBC=NULL; - - // Build pressure system (all Neumann, excluding outflow) - CurvedPoissonIPDG2D(m_gauss, m_cub, PRsystem, (*mm)); - delete mm; mm=NULL; - - -#if (0) - // check against Matlab - FILE* fp = fopen("nnP.dat", "w"); - PRsystem.write_ML(fp); fclose(fp); -#endif - - //------------------------------------- - // factor Pressure Op - //------------------------------------- - PRsystemC->chol(PRsystem, 4); // 4=CS_Chol option - - PRsystem.reset(); // force immediate deallocation - BCType = saveBCType; // Restore original boundary types - - //--------------------------- - time_setup += timer.read() - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscous2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscous2D.cpp deleted file mode 100644 index 5b1218b..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscous2D.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// CurvedINSViscous2D.m -// compute right hand side for viscous step solves -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::CurvedINSViscous2D() -//--------------------------------------------------------- -{ - double t1 = timer.read(), t2,t3; - - // compute right hand side for viscous step solves - DMat mmUxTT = (m_cub.VT)*(m_cub.W.dm(m_cub.V*UxTT)); - Uxrhs = mmUxTT*(g0/(nu*dt)) + rhsbcUx; - - DMat mmUyTT = (m_cub.VT)*(m_cub.W.dm(m_cub.V*UyTT)); - Uyrhs = mmUyTT*(g0/(nu*dt)) + rhsbcUy; - - // save Ux,Uy - Uxold = Ux; Uyold = Uy; - - // viscous solves (Cholesky, CG, LU, GMRES solvers) - t2 = timer.read(); - Ux = VELsystemC->solve(Uxrhs); - Uy = VELsystemC->solve(Uyrhs); - t3 = timer.read(); - - //--------------------------- - time_viscous_sol += t3 - t2; - time_viscous += t3 - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscousSetUp2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscousSetUp2D.cpp deleted file mode 100644 index 73279d3..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/CurvedINSViscousSetUp2D.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// CurvedINSViscousSetUp2D.m -// function [VELperm, VELsystemC, VELsystemCT, rhsbcUx, rhsbcUy] = ... -// CurvedINSViscousSetUp2D(dt, nu, g0, BCfunction) -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::CurvedINSViscousSetUp2D() -//--------------------------------------------------------- -{ - //--------------------------- - double t1 = timer.read(); - //--------------------------- - - // Note: assumes {cub,gauss} have been defined - Cub2D& cub = this->m_cub; - Gauss2D& gauss = this->m_gauss; - - // function [VELperm, VELsystemC, VELsystemCT, rhsbcUx, rhsbcUy] = ... - // CurvedINSViscousSetUp2D(dt, nu, g0, BCfunction) - // - // Purpose: build velocity system and boundary forcing terms - - CSd *VELsystemBC = new CSd("VELbc"); // NBN: delete before chol() - CSd *mm = new CSd("mmV"); // NBN: delete before chol() - CSd VELsystem("VEL"); IVec ids; // NBN: passed to chol() - - // save original boundary types - saveBCType = BCType; - - // Convert {In,Wall,Cyl} boundary conditions to Dirichlet - ids = find(saveBCType, '=', (int)BC_In ); BCType(ids) = BC_Dirichlet; - ids = find(saveBCType, '=', (int)BC_Wall); BCType(ids) = BC_Dirichlet; - ids = find(saveBCType, '=', (int)BC_Cyl); BCType(ids) = BC_Dirichlet; - - // Convert {Out} boundary conditions to Neuman - ids = find(saveBCType, '=', (int)BC_Out); BCType(ids) = BC_Neuman; - - // Check: dumpIMat(BCType, "Viscous BCType"); - - // Form inhomogeneous boundary term for rhs data (assumes time independent forcing) - (this->*ExactSolutionBC)(gauss.x, gauss.y, gauss.nx, gauss.ny, - gauss.mapI, gauss.mapO, gauss.mapW, gauss.mapC, 0, nu, - bcUx, bcUy, bcPR, bcdUndt); - - // Build viscous boundary condition forcing vector - CurvedPoissonIPDGbc2D(gauss, (*VELsystemBC)); - refrhsbcUx = (*VELsystemBC) * bcUx; - refrhsbcUy = (*VELsystemBC) * bcUy; - delete VELsystemBC; VELsystemBC=NULL; - - // Build velocity system - CurvedPoissonIPDG2D(gauss, cub, VELsystem, (*mm)); - VELsystem += (*mm) * (g0/(dt*nu)); - delete mm; mm=NULL; - -#if (0) - // check against Matlab - FILE* fp = fopen("nnV.dat", "w"); - VELsystem.write_ML(fp); fclose(fp); -#endif - - //------------------------------------- - // factor Velocity Op - //------------------------------------- - VELsystemC->chol(VELsystem, 4); // 4=CS_Chol option - - VELsystem.reset(); // force deallocation - BCType = saveBCType; // Restore original boundary types - - //--------------------------- - time_setup += timer.read() - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSAdvection2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSAdvection2D.cpp deleted file mode 100644 index 06a1923..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSAdvection2D.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// INSAdvection2D.m -// compute the advection terms for incompressible Navier-Stokes -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::INSAdvection2D() -//--------------------------------------------------------- -{ - // reuse 4 static allocations (set size before use!) - static DMat UxM, UxP, UyM, UyP; - UxM.resize(Nfp*Nfaces, K); UxP.resize(Nfp*Nfaces, K); - UyM.resize(Nfp*Nfaces, K); UyP.resize(Nfp*Nfaces, K); - - DMat fxUx,fyUx,fxUy,fyUy, fxUxM,fyUxM,fxUyM,fyUyM, fxUxP,fyUxP,fxUyP,fyUyP; - DMat UDotNM,UDotNP,maxvel, fluxUx,fluxUy; - double t1 = timer.read(); - - // evaluate flux vectors - fxUx=sqr(Ux); fyUx=Ux.dm(Uy); fxUy=Ux.dm(Uy); fyUy=sqr(Uy); - - // save old nonlinear terms - NUxold = NUx; NUyold = NUy; - - // evaluate inner-product of test function gradient and flux functions - Div2D(fxUx,fyUx, NUx); Div2D(fxUy,fyUy, NUy); - - // interpolate velocity to face nodes on element faces - UxM = Ux(vmapM); UyM = Uy(vmapM); - UxP = Ux(vmapP); UyP = Uy(vmapP); - - // set '+' trace of velocity at boundary face nodes - UxP(mapI) = bcUx(mapI); UyP(mapI) = bcUy(mapI); - UxP(mapW) = bcUx(mapW); UyP(mapW) = bcUy(mapW); - UxP(mapC) = bcUx(mapC); UyP(mapC) = bcUy(mapC); - - // evaluate flux vectors at '-' and '+' traces at face nodes - fxUxM=sqr(UxM); fyUxM=UxM.dm(UyM); fxUyM=UxM.dm(UyM); fyUyM=sqr(UyM); - fxUxP=sqr(UxP); fyUxP=UxP.dm(UyP); fxUyP=UxP.dm(UyP); fyUyP=sqr(UyP); - - // evaluate dot product of normal and velocity at face nodes - UDotNM = UxM.dm(nx) + UyM.dm(ny); UDotNP = UxP.dm(nx) + UyP.dm(ny); - maxvel = max(abs(UDotNM), abs(UDotNP)); - - // evaluate maximum normal velocity at face face nodes - maxvel.reshape(Nfp, Nfaces*K); - maxvel = outer(ones(Nfp), maxvel.max_col_vals()); - maxvel.reshape(Nfp*Nfaces, K); - - // form local Lax-Friedrichs/Rusonov fluxes - fluxUx = 0.5*( -nx.dm(fxUxM-fxUxP) - ny.dm(fyUxM-fyUxP) - maxvel.dm(UxP-UxM) ); - fluxUy = 0.5*( -nx.dm(fxUyM-fxUyP) - ny.dm(fyUyM-fyUyP) - maxvel.dm(UyP-UyM) ); - - // put volume and surface terms together - NUx += LIFT*(Fscale.dm(fluxUx)); - NUy += LIFT*(Fscale.dm(fluxUy)); - - // compute (U~,V~) - UxT = ((a0*Ux + a1*Uxold) - dt*(b0*NUx + b1*NUxold))/g0; - UyT = ((a0*Uy + a1*Uyold) - dt*(b0*NUy + b1*NUyold))/g0; - - //--------------------------- - time_advection += timer.read() - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSLiftDrag2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSLiftDrag2D.cpp deleted file mode 100644 index 8ed2b34..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSLiftDrag2D.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// INSLiftDrag2D.m -// function [Cd, Cl, dP, sw, stri] = -// INSLiftDrag2D(Ux, Uy, PR, ra, nu, time, tstep, Nsteps) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::INSLiftDrag2D(double ra) -//--------------------------------------------------------- -{ - // function [Cd, Cl, dP, sw, stri] = INSLiftDrag2D(Ux, Uy, PR, ra, nu, time, tstep, Nsteps) - // Purpose: compute coefficients of lift, drag and pressure drop at cylinder - - static FILE* fid; - static DVec sw1, sw2; - static int Nc=0, stri1=0, stri2=0; - - if (1 == tstep) { - char buf[50]; sprintf(buf, "liftdraghistory%d.dat", N); - fid = fopen(buf, "w"); - fprintf(fid, "timeCdCldP = [...\n"); - - // Sample location and weights for pressure drop - // Note: the VolkerCylinder test assumes the 2 - // sample points (-ra, 0), (ra, 0), are vertices - // located on the internal cylinder boundary - - Sample2D(-ra, 0.0, sw1, stri1); - Sample2D( ra, 0.0, sw2, stri2); - - Nc = mapC.size()/Nfp; - } - - bool bDo=false; - if (1==tstep || tstep==Nsteps || !umMOD(tstep,10)) { bDo=true; } - else if (time > 3.90 && time < 3.96) { bDo=true; } // catch C_d (3.9362) - else if (time > 5.65 && time < 5.73) { bDo=true; } // catch C_l (5.6925) - else if (time > 7.999) { bDo=true; } // catch dP (8.0) - if (!bDo) return; - - DVec PRC, nxC, nyC, wv, tv; - DMat dUxdx,dUxdy, dUydx,dUydy, MM1D, V1D; - DMat dUxdxC,dUxdyC, dUydxC,dUydyC, hforce, vforce, sJC; - double dP=0.0, Cd=0.0, Cl=0.0; - - dP = sw1.inner(PR(All,stri1)) - sw2.inner(PR(All,stri2)); - - // compute derivatives - Grad2D(Ux, dUxdx,dUxdy); dUxdxC=dUxdx(vmapC); dUxdyC=dUxdy(vmapC); - Grad2D(Uy, dUydx,dUydy); dUydxC=dUydx(vmapC); dUydyC=dUydy(vmapC); - - PRC=PR(vmapC); nxC=nx(mapC); nyC=ny(mapC); sJC=sJ(mapC); - hforce = -PRC.dm(nxC) + nu*( nxC.dm( 2.0 *dUxdxC) + nyC.dm(dUydxC+dUxdyC) ); - vforce = -PRC.dm(nyC) + nu*( nxC.dm(dUydxC+dUxdyC) + nyC.dm( 2.0 *dUydyC) ); - - hforce.reshape(Nfp, Nc); - vforce.reshape(Nfp, Nc); - sJC .reshape(Nfp, Nc); - - // compute weights for integrating (1,hforce) and (1,vforce) - V1D = Vandermonde1D(N, r(Fmask(All,1))); - MM1D = trans(inv(V1D)) / V1D; - - wv = MM1D.col_sums(); - tv = wv*(sJC.dm(hforce)); Cd=tv.sum(); // Compute drag coefficient - tv = wv*(sJC.dm(vforce)); Cl=tv.sum(); // Compute lift coefficient - - // Output answers for plotting - fprintf(fid, "%15.14f %15.14f %15.14f %15.14f;...\n", time, Cd/ra, Cl/ra, dP); - fflush(fid); - - // LOG report - if (1==tstep || tstep==Nsteps || !umMOD(tstep,Nreport)) { - umLOG(1, "%7d %6.3lf %9.5lf %10.6lf %9.5lf\n", - tstep, time, Cd/ra, Cl/ra, dP); - } - - if (tstep==Nsteps) { - fprintf(fid, "];\n"); - fclose(fid); fid=NULL; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSPressure2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSPressure2D.cpp deleted file mode 100644 index f590da4..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INSPressure2D.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// INSPressure2D.m -// perform the pressure step for the incompressible Navier-Stokes solver -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::INSPressure2D() -//--------------------------------------------------------- -{ - DMat DivUT,CurlU,dCurlUdx,dCurlUdy,res1,res2,dPRdx,dPRdy; - DVec PRrhs; double t1 = timer.read(), t2,t3,t4; - - // compute divergence of UxT and UyT - Div2D(UxT, UyT, DivUT); - - // dp/dn = -n.(u.grad u + curl curl u) - Curl2D(Ux,Uy, CurlU); - Grad2D(CurlU, dCurlUdx, dCurlUdy); - - // NBN: reordered to reduce flops - res1 = -nu*dCurlUdy - NUx; - res2 = nu*dCurlUdx - NUy; - - // save old and compute new dp/dn - dpdnold = dpdn; dpdn = 0.0; - - // apply Neumann boundary conditions for pressure - // to boundary nodes mapped by {nbcmapD,vbcmapD}. - // these arrays are set in precalc_data(). - - // NBN: FiXME: - if (eBackdrop != sim_type) { - dpdn(nbcmapD) = dm(nx(nbcmapD), res1(vbcmapD)) + dm(ny(nbcmapD), res2(vbcmapD)); - dpdn -= bcdUndt; - } - - // Evaluate right hand side term for Poisson equation for pressure - PRrhs = MassMatrix*(J.dm(-DivUT*(g0/dt)) + LIFT*(sJ.dm(b0*dpdn + b1*dpdnold))); - - // Add Dirichlet boundary condition forcing - PRrhs += rhsbcPR; - - // Pressure Solve (select Cholesky, CG, LU, GMRES solvers) - // [-laplace PR = +(div UT)/dt + LIFT*dpdn] on boundaries - t2 = timer.read(); - PR = PRsystemC->solve(PRrhs); - t3 = timer.read(); - - // compute (U~~,V~~) = (U~,V~) - dt*grad PR - Grad2D(PR, dPRdx,dPRdy); - - // increment (Ux~,Uy~) to (Ux~~,Uy~~) - UxTT = UxT - dPRdx*(dt/g0); - UyTT = UyT - dPRdy*(dt/g0); - - //--------------------------- - t4 = timer.read(); - time_pressure_sol += t3 - t2; - time_pressure += t4 - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INS_IC_BC_TODO.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INS_IC_BC_TODO.cpp deleted file mode 100644 index c866365..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INS_IC_BC_TODO.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// Stubbs for CurvedINS -// initial and boundary conditions -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -// Channel: -//--------------------------------------------------------- -void CurvedINS2D::INSchannelIC2D -( - const DVec& xi, - const DVec& yi, - double ti, // [in] - double nu, // [in] - DMat& Uxo, // [out] - DMat& Uyo, // [out] - DMat& PRo // [out] -) -//--------------------------------------------------------- -{ - umERROR("CurvedINS2D::INSchannelIC2D", "Not yet implemented"); -} - - -//--------------------------------------------------------- -void CurvedINS2D::INSchannelBC2D -( - const DVec& xin, // [in] - const DVec& yin, // [in] - const DVec& nxi, // [in] - const DVec& nyi, // [in] - const IVec& MAPI, // [in] - const IVec& MAPO, // [in] - const IVec& MAPW, // [in] - const IVec& MAPC, // [in] - double ti, // [in] - double nu, // [in] - DVec& BCUX, // [out] - DVec& BCUY, // [out] - DVec& BCPR, // [out] - DVec& BCDUNDT // [out] -) -//--------------------------------------------------------- -{ - umERROR("CurvedINS2D::INSchannelBC2D", "Not yet implemented"); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteBC2D.cpp deleted file mode 100644 index 5bfeda3..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteBC2D.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// INScouetteBC2D.cpp -// function [bcUx, bcUy, bcPR, bcdUndt] = -// INScouetteBC2D(x, y, nx, ny, mapI, mapO, mapW, mapC, time, nu) -// 2007/07/14 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::INScouetteBC2D -( - const DVec& xin, // [in] - const DVec& yin, // [in] - const DVec& nxi, // [in] - const DVec& nyi, // [in] - const IVec& MAPI, // [in] - const IVec& MAPO, // [in] - const IVec& MAPW, // [in] - const IVec& MAPC, // [in] - double ti, // [in] - double nu, // [in] - DVec& BCUX, // [out] - DVec& BCUY, // [out] - DVec& BCPR, // [out] - DVec& BCDUNDT // [out] -) -//--------------------------------------------------------- -{ - // function [bcUx, bcUy, bcPR, bcdUdn] = INScouetteBC2D(x, y, nx, ny, mapI, mapO, mapW, time, nu) - // Purpose: evaluate boundary conditions for Taylor-Couette - // flow with inner/outer cylinders at {r=1,r=4} - - int len = xin.size(); - BCUX.resize(len); BCUY.resize(len); // resize result arrays - BCPR.resize(len); BCDUNDT.resize(len); // and set to zero - - // set boundary nodes to pre-calculated exact (inital) solution - -#if (0) - BCUX(gmapB) = uB; - BCUY(gmapB) = vB; - BCPR(gmapB) = pB; -//BCDUNDT(gmapB) = 0.0; -#else - - gmapB = concat(MAPI,MAPO,MAPW); - gxB = xin(gmapB); gyB = yin(gmapB); - - DVec rad2B = sqr(gxB) + sqr(gyB); - DVec radB = sqrt(rad2B); - DVec thetaB = atan2(gyB, gxB); - DVec uthetaB = (-radB + 16.0/radB)/75.0; - - // store constant boundary data - uB = (-sin(thetaB)).dm(uthetaB); - vB = ( cos(thetaB)).dm(uthetaB); - pB = 1.0 + (1.0/SQ(75.0)) * (rad2B/2.0 - 32.0*log(radB) - 128.0/rad2B); - - BCUX(gmapB) = uB; - BCUY(gmapB) = vB; - BCPR(gmapB) = pB; - -#endif - -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteIC2D.cpp deleted file mode 100644 index 2db9358..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScouetteIC2D.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// INScouetteIC2D.cpp -// function [Ux, Uy, PR] = INScouetteIC2D(x, y, time, nu) -// 2007/07/14 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::INScouetteIC2D -( - const DVec& xi, - const DVec& yi, - double ti, // [in] - double nu, // [in] - DMat& Uxo, // [out] - DMat& Uyo, // [out] - DMat& PRo // [out] -) -//--------------------------------------------------------- -{ - // function [Ux, Uy, PR] = INScouetteIC2D(x, y, time, nu) - // Purpose: evaluate initial solution for Taylor-Couette - // flow with inner/outer cylinders at {r=1,r=4} - // (gamma = 1.4) - - DVec rad2 = sqr(xi) + sqr(yi); - DVec rad = sqrt(rad2); - DVec theta = atan2(yi, xi); - DVec utheta = (-rad + 16.0/rad)/75.0; - -#if (0) - // set initial velocity {u,v} to steady-state solution - Uxo = (-sin(theta)).dm(utheta); // ? / rho; - Uyo = ( cos(theta)).dm(utheta); - PRo = 1.0 + (1.0/SQ(75.0)) * (rad2/2.0 - 32.0*log(rad) - 128.0/rad2); -#else - // set initial velocity {u,v} to zero - Uxo.zeros(Np,K); // = 0.0; - Uyo.zeros(Np,K); // = 0.0; - PRo = 1.0 + (1.0/SQ(75.0)) * (rad2/2.0 - 32.0*log(rad) - 128.0/rad2); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderBC2D.cpp deleted file mode 100644 index 14bfa44..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderBC2D.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// INScylinderBC2D.m -// function [bcUx, bcUy, bcPR, bcdUndt] = -// INScylinderBC2D(x, y, nx, ny, mapI, mapO, mapW, mapC, time, nu) -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::INScylinderBC2D -( - const DVec& xin, // [in] - const DVec& yin, // [in] - const DVec& nxi, // [in] - const DVec& nyi, // [in] - const IVec& MAPI, // [in] - const IVec& MAPO, // [in] - const IVec& MAPW, // [in] - const IVec& MAPC, // [in] - double ti, // [in] - double nu, // [in] - DVec& BCUX, // [out] - DVec& BCUY, // [out] - DVec& BCPR, // [out] - DVec& BCDUNDT // [out] -) -//--------------------------------------------------------- -{ - // function [bcUx, bcUy, bcPR, bcdUndt] = INScylinderBC2D(x, y, nx, ny, mapI, mapO, mapW, mapC, time, nu) - // Purpose: evaluate boundary conditions for channel bounded cylinder flow with walls at y=+/- .15 - - // TEST CASE: from - // V. John "Reference values for drag and lift of a two-dimensional time dependent flow around a cylinder", - // Int. J. Numer. Meth. Fluids 44, 777 - 788, 2004 - - DVec yI("yI"); int len = xin.size(); - BCUX.resize(len); BCUY.resize(len); // resize result arrays - BCPR.resize(len); BCDUNDT.resize(len); // and set to zero - - // inflow -#ifdef _MSC_VER - yI = yin(MAPI); yI += 0.20; -#else - int Ni=MAPI.size(); yI.resize(Ni); - for(int n=1;n<=Ni;++n) {yI(n)=yin(MAPI(n))+0.2;} -#endif - - BCUX(MAPI) = SQ(1.0/0.41)*6.0 * yI.dm(0.41 - yI); - BCUY(MAPI) = 0.0; - BCDUNDT(MAPI) = -SQ(1.0/0.41)*6.0 * yI.dm(0.41 - yI); - - // wall - BCUX(MAPW) = 0.0; - BCUY(MAPW) = 0.0; - - // cylinder - BCUX(MAPC) = 0.0; - BCUY(MAPC) = 0.0; - - // outflow - BCUX(MAPO) = 0.0; - BCUY(MAPO) = 0.0; - BCDUNDT(MAPO) = 0.0; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderIC2D.cpp deleted file mode 100644 index d30b91a..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/INScylinderIC2D.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// INScylinderIC2D.m -// function [Ux, Uy, PR] = INScylinderIC2D(x, y, time, nu) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::INScylinderIC2D -( - const DVec& xi, - const DVec& yi, - double ti, // [in] - double nu, // [in] - DMat& Uxo, // [out] - DMat& Uyo, // [out] - DMat& PRo // [out] -) -//--------------------------------------------------------- -{ - // function [Ux, Uy, PR] = INScylinderIC2D(x, y, time, nu) - // Purpose: evaluate solution for channel bounded - // cylinder flow with walls at y = +/- 0.15 - - Uxo.fill(0.0); - Uyo.fill(0.0); - PRo.fill(0.0); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayBC2D.cpp deleted file mode 100644 index 8f5c591..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayBC2D.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// KovasznayBC2D.m -// function [bcUx, bcUy, bcPR, bcdUndt] = -// KovasznayBC2D(x, y, nx, ny, MAPI, MAPO, MAPW, MAPC, time, nu) -// 2007/06/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::KovasznayBC2D -( - const DVec& xin, // [in] - const DVec& yin, // [in] - const DVec& nxi, // [in] - const DVec& nyi, // [in] - const IVec& MAPI, // [in] - const IVec& MAPO, // [in] - const IVec& MAPW, // [in] - const IVec& MAPC, // [in] - double ti, // [in] - double nu, // [in] - DVec& BCUX, // [out] - DVec& BCUY, // [out] - DVec& BCPR, // [out] - DVec& BCDUNDT // [out] -) -//--------------------------------------------------------- -{ - // function [bcUx, bcUy, bcPR, bcdUndt] = KovasznayBC2D(x, y, nx, ny, MAPI, MAPO, MAPW, MAPC, time, nu) - // Purpose: evaluate boundary conditions for Kovasznay flow - - static DVec xI("xI"), yI("yI"), xO("xO"), yO("yO"); - - int len = xin.size(); - BCUX.resize(len); BCUY.resize(len); // resize result arrays - BCPR.resize(len); BCDUNDT.resize(len); // and set to zero - - double lam = (0.5/nu) - sqrt( (0.25/SQ(nu)) + 4.0*SQ(pi)); - - // inflow -#ifdef _MSC_VER - xI = xin(MAPI); yI = yin(MAPI); -#else - int Ni=MAPI.size(), n=0; xI.resize(Ni); yI.resize(Ni); - for (n=1;n<=Ni;++n) {xI(n)=xin(MAPI(n));} - for (n=1;n<=Ni;++n) {yI(n)=yin(MAPI(n));} -#endif - - DVec elamXI = exp(lam*xI), twopiyI = 2.0*pi*yI; - - BCUX(MAPI) = 1.0 - elamXI.dm(cos(twopiyI)); - BCUY(MAPI) = (0.5*lam/pi) * elamXI.dm(sin(twopiyI)); - - - // outflow -#ifdef _MSC_VER - xO = xin(MAPO); yO = yin(MAPO); -#else - int No=MAPO.size(); xO.resize(No); yO.resize(No); - for (n=1;n<=No;++n) {xO(n)=xin(MAPO(n));} - for (n=1;n<=No;++n) {yO(n)=yin(MAPO(n));} -#endif - - DVec elamXO = exp(lam*xO), twopiyO = 2.0*pi*yO; - - BCPR (MAPO) = 0.5*(1.0-exp(2.0*lam*xO)); -//BCDUNDT(MAPO) = -lam*elamXO.dm(cos(twopiyO)); - - if (0) { - // THIS WORKED - BCUX(MAPO) = 1.0 - elamXO.dm(cos(twopiyO)); - BCUY(MAPO) = (0.5*lam/pi) * elamXO.dm(sin(twopiyO)); - } else { - // Neumann data for each velocity - BCUX(MAPO) = -lam* elamXO.dm(cos(twopiyO)); - BCUY(MAPO) = lam*(0.5*lam/pi) * elamXO.dm(sin(twopiyO)); - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayIC2D.cpp deleted file mode 100644 index 512d96d..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/KovasznayIC2D.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// KovasznayIC2D.m -// function [Ux, Uy, PR] = INScylinderIC2D(x, y, time, nu) -// 2007/06/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::KovasznayIC2D -( - const DVec& xi, - const DVec& yi, - double ti, // [in] - double nu, // [in] - DMat& Uxo, // [out] - DMat& Uyo, // [out] - DMat& PRo // [out] -) -//--------------------------------------------------------- -{ - // function [Ux, Uy, PR] = KovasznayIC2D(x, y, time, nu) - // Purpose: evaluate solution for Kovasznay flow - - double lam = (0.5/nu) - sqrt( (0.25/SQ(nu)) + 4.0*SQ(pi)); - DVec elamX = exp(lam*xi), twopiy = 2.0*pi*yi; - - Uxo = 1.0 - elamX.dm(cos(twopiy)); - Uyo = (0.5*lam/pi) * elamX.dm(sin(twopiy)); - PRo = 0.5 * (1.0 - exp(2.0*lam*xi)); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexBC2D.cpp deleted file mode 100644 index 8b6af0d..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexBC2D.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// PearsonVortexBC2D.m -// function [bcUx, bcUy, bcPR, bcdUndt] = -// PearsonVortexBC2D(x, y, nx, ny, mapI, mapO, mapW, mapC, time, nu) -// 2007/06/16 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - - -//--------------------------------------------------------- -void CurvedINS2D::PearsonVortexBC2D -( - const DVec& xin, // [in] - const DVec& yin, // [in] - const DVec& nxi, // [in] - const DVec& nyi, // [in] - const IVec& MAPI, // [in] - const IVec& MAPO, // [in] - const IVec& MAPW, // [in] - const IVec& MAPC, // [in] - double ti, // [in] - double nu, // [in] - DVec& BCUX, // [out] - DVec& BCUY, // [out] - DVec& BCPR, // [out] - DVec& BCDUNDT // [out] -) -//--------------------------------------------------------- -{ - // function [bcUx, bcUy, bcPR, bcdUdn] = PearsonVortexBC2D(x, y, nx, ny, mapI, mapO, mapW, time, nu) - // Purpose: evaluate boundary conditions for Pearson's vortex exact solution - - static DVec xI( "xI"), yI( "yI"), xO( "xO"), yO( "yO"); - static DVec nxI("nxI"), nyI("nyI"), nxO("nxO"), nyO("nyO"); - - int len = xin.size(); - BCUX.resize(len); BCUY.resize(len); // resize result arrays - BCPR.resize(len); BCDUNDT.resize(len); // and set to zero - - ti = 0; - - double en4pit = exp(-nu*4.0*SQ(pi)*ti); - double en8pit = exp(-nu*8.0*SQ(pi)*ti); - double twopi = 2.0*pi; - - // Dirichlet velocity, condition on inflow - xI = xin(mapI); yI = yin(mapI); nxI = nxi(mapI); nyI = nyi(mapI); - - BCUX(mapI)= -sin(twopi*yI) * en4pit; - BCUY(mapI)= sin(twopi*xI) * en4pit; -#if (1) - // NBN: original was the other way - BCPR(mapI) = (-cos(twopi*xI)).dm(cos(twopi*yI)) * en8pit; -#else - BCDUNDT(mapI) = ( -nxI.dm(sin(twopi*yI)) + nyI.dm(sin(twopi*xI)) ) * en4pit; -#endif - - // Neumann velocity, Dirichlet pressure, condition on outflow - xO = xin(mapO); yO = yin(mapO); nxO = nxi(mapO); nyO = nyi(mapO); - - BCUX(mapO) = nyO.dm( twopi * (-cos(twopi*yO) * en4pit) ); - BCUY(mapO) = nxO.dm( twopi * ( cos(twopi*xO) * en4pit) ); - BCPR(mapO) = (-cos(twopi*xO)).dm(cos(twopi*yO)) * en8pit; -} - - diff --git a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexIC2D.cpp deleted file mode 100644 index 12632c9..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/CurvedINS2D/PearsonVortexIC2D.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// PearsonVortexIC2D.m -// function [Ux, Uy, PR] = PearsonVortexIC2D(x, y, time, nu) -// 2007/06/16 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CurvedINS2D.h" - -//--------------------------------------------------------- -void CurvedINS2D::PearsonVortexIC2D -( - const DVec& xi, - const DVec& yi, - double ti, // [in] - double nu, // [in] - DMat& Uxo, // [out] - DMat& Uyo, // [out] - DMat& PRo // [out] -) -//--------------------------------------------------------- -{ - // function [Ux, Uy, PR] = PearsonVortexIC2D(x, y, time, nu) - // Purpose: evaluate solution for channel flow with walls at y=0,2 - - Uxo = -sin(2.0*pi*y) * exp(-nu*4.0*SQ(pi)*ti); - Uyo = sin(2.0*pi*x) * exp(-nu*4.0*SQ(pi)*ti); - PRo = -cos(2.0*pi*x).dm(cos(2.0*pi*y)) * exp(-nu*8.0*SQ(pi)*ti); -} \ No newline at end of file diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerLimiter2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerLimiter2D.cpp deleted file mode 100644 index 369492e..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerLimiter2D.cpp +++ /dev/null @@ -1,225 +0,0 @@ -// EulerLimiter2D.m -// function [LQ] = EulerLimiter2D(Q, SolutionBC, time) -// 2007/07/03 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -DMat& EulerShock2D::EulerLimiter2D(const DMat& Qin, double ti) -//--------------------------------------------------------- -{ - //--------------------------- - double t1 = timer.read(); - //--------------------------- - - // function [LQ] = EulerLimiter2D(Q, SolutionBC, time) - // Purpose: limit the Euler solution using slope limiting adapted from - // A SLOPE LIMITING PROCEDURE IN DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD FOR - // GASDYNAMICS APPLICATIONS. SHUANGZHANG TU AND SHAHROUZ ALIABADI - // INTERNATIONAL JOURNAL OF NUMERICAL ANALYSIS AND MODELING, Volume 2, Number 2, Pages 163 - // - // Gass constant, gamma = 1.4; - -//const double epse = 1e-10; - const double epse = 1e-14; - - // 1. compute geometric information for 4 element patch containing each element - // Build average matrix, AVE = sum(MassMatrix)/2; - - // Compute displacements from center of nodes for Taylor expansion of limited fields - - // Note: these factors are precalculated in InitRun() - const DVec &AVE=Lim_AVE; const DMat &dx=Lim_dx, &dy=Lim_dy; - const DVec &xv1=Lim_xv1, &xv2=Lim_xv2, &xv3=Lim_xv3; - const DVec &yv1=Lim_yv1, &yv2=Lim_yv2, &yv3=Lim_yv3; - const DMat &fnx=Lim_fnx, &fny=Lim_fny, &fL=Lim_fL; - const DMat &ctx=Lim_ctx, &cty=Lim_cty; - const IVec &E1 =Lim_E1, &E2 =Lim_E2, &E3=Lim_E3; - const IVec &id1=Lim_id1, &id2=Lim_id2, &id3=Lim_id3; - DMat& Qref = const_cast(Qin); - - static DMat PC0, pc, pva; - - DMat rho, rhou, rhov, Ener; // borrow columns of Qin as (Np,K) matrices - DVec onesNp = ones(Np); - - // 2. Find cell averages of conserved & primitive variables in each 4 element patch - // extract fields from Q - - rho.borrow (Np,K,Qref.pCol(1)); rhou.borrow(Np,K,Qref.pCol(2)); - rhov.borrow(Np,K,Qref.pCol(3)); Ener.borrow(Np,K,Qref.pCol(4)); - - // Compute cell averages of conserved variables - DVec rhoC=AVE*rho, rhouC=AVE*rhou, rhovC=AVE*rhov, EnerC=AVE*Ener; - - DMat averhou = outer(onesNp,rhouC), averhov = outer(onesNp,rhovC); - DMat averho = outer(onesNp,rhoC), aveEner = outer(onesNp,EnerC); - - // Compute primitive variables from cell averages of conserved variables - PC0.resize(rhoC.size(),4); - PC0(All,1)=rhoC; PC0(All,2)=rhouC/rhoC; PC0(All,3)=rhovC/rhoC; - PC0(All,4)=gm1*(EnerC - 0.5*(sqr(rhouC) + sqr(rhovC))/rhoC); - - // Find neighbor values of conserved variables - IMat e2eT = trans(EToE); pc.resize(e2eT.size(),4); - pc(All,1)=rhoC(e2eT); pc(All,2)=rhouC(e2eT); pc(All,3)=rhovC(e2eT); pc(All,4)=EnerC(e2eT); - - // Apply boundary conditions to cell averages of ghost cells at boundary faces - (this->*BCSolution)(Lim_ctx, Lim_cty, Lim_fnx, Lim_fny, Lim_idI, Lim_idO, Lim_idW, Lim_idC, ti, pc); - - DMat PC[5], PVA[5], aV[5], dV[5]; - PC[1].borrow(3,K, pc.pCol(1)); PC[2].borrow(3,K, pc.pCol(2)); - PC[3].borrow(3,K, pc.pCol(3)); PC[4].borrow(3,K, pc.pCol(4)); - - PC[2].div_element(PC[1]); - PC[3].div_element(PC[1]); - PC[4]=gm1*(PC[4] - 0.5*PC[1].dm(sqr(PC[2]) + sqr(PC[3]))); - - DMat t_rA,t_ruA,t_rvA,t_EnA, rhoA,rhouA,rhovA,EnerA; - DMat uA("uA"), vA("vA"), pA("pA"); - - // 3. Compute average of primitive variables at face nodes - - t_rA = (0.5*(rho (vmapP) + rho (vmapM))); t_rA.reshape (Nfp*Nfaces, K); rhoA = t_rA (Lim_ids,All); - t_ruA = (0.5*(rhou(vmapP) + rhou(vmapM))); t_ruA.reshape(Nfp*Nfaces, K); rhouA = t_ruA(Lim_ids,All); - t_rvA = (0.5*(rhov(vmapP) + rhov(vmapM))); t_rvA.reshape(Nfp*Nfaces, K); rhovA = t_rvA(Lim_ids,All); - t_EnA = (0.5*(Ener(vmapP) + Ener(vmapM))); t_EnA.reshape(Nfp*Nfaces, K); EnerA = t_EnA(Lim_ids,All); - - uA = rhouA.dd(rhoA); vA = rhovA.dd(rhoA); - pA = gm1*(EnerA - 0.5*rhoA.dm(sqr(uA) + sqr(vA))); - - int Nff = Nfp*Nfaces; - pva.resize(Nff*K,4); - pva(All,1)=rhoA; pva(All,2)=uA; pva(All,3)=vA; pva(All,4)=pA; - PVA[1].borrow(Nff,K, pva.pCol(1)); PVA[2].borrow(Nff,K, pva.pCol(2)); - PVA[3].borrow(Nff,K, pva.pCol(3)); PVA[4].borrow(Nff,K, pva.pCol(4)); - - - // 4. Apply limiting procedure to each of the primitive variables - - // Storage for cell averagse and limited gradients at each node of each element - // aV = zeros(Np,K,4); dV = zeros(Np,K,4); - - DVec dVdxE1,dVdyE1,dVdxE2,dVdyE2,dVdxE3,dVdyE3; - DVec dVdxC0, dVdxC1, dVdxC2, dVdxC3, LdVdxC0; - DVec dVdyC0, dVdyC1, dVdyC2, dVdyC3, LdVdyC0; - DVec va1,va2,va3,va4,va5,va6, g1,g2,g3, w1,w2,w3, fac,fac3e; - - - // Loop over primitive variables - for (int n=1; n<=4; ++n) - { - DVec VC0,VC1,VC2,VC3; DMat VA; - - // find value of primitive variables in patches - VC0 = PC0(All,n); // PC0(1,:,n); - VC1 = PC[n].get_row(1); // PC (1,:,n); - VC2 = PC[n].get_row(2); // PC (2,:,n); - VC3 = PC[n].get_row(3); // PC (3,:,n); - VA = PVA[n]; // PVA(:,:,n); - - va1=VA.get_row(1); va2=VA.get_row(2); va3=VA.get_row(3); - va4=VA.get_row(4); va5=VA.get_row(5); va6=VA.get_row(6); - - // Compute face gradients - dVdxE1 = 0.5*( (VC1-VC0)*(yv2-yv1) + (va1-va2)*(yc1-yc0) )/A1; - dVdyE1 = -0.5*( (VC1-VC0)*(xv2-xv1) + (va1-va2)*(xc1-xc0) )/A1; - dVdxE2 = 0.5*( (VC2-VC0)*(yv3-yv2) + (va3-va4)*(yc2-yc0) )/A2; - dVdyE2 = -0.5*( (VC2-VC0)*(xv3-xv2) + (va3-va4)*(xc2-xc0) )/A2; - dVdxE3 = 0.5*( (VC3-VC0)*(yv1-yv3) + (va5-va6)*(yc3-yc0) )/A3; - dVdyE3 = -0.5*( (VC3-VC0)*(xv1-xv3) + (va5-va6)*(xc3-xc0) )/A3; - - dVdxC0 = (A1*dVdxE1 + A2*dVdxE2 + A3*dVdxE3) / (A1_A2_A3); - dVdyC0 = (A1*dVdyE1 + A2*dVdyE2 + A3*dVdyE3) / (A1_A2_A3); - - dVdxC1 = dVdxC0(E1); dVdxC2 = dVdxC0(E2); dVdxC3 = dVdxC0(E3); - dVdyC1 = dVdyC0(E1); dVdyC2 = dVdyC0(E2); dVdyC3 = dVdyC0(E3); - - // Use face gradients at ghost elements - dVdxC1(id1) = dVdxE1(id1); dVdxC2(id2) = dVdxE2(id2); dVdxC3(id3) = dVdxE3(id3); - dVdyC1(id1) = dVdyE1(id1); dVdyC2(id2) = dVdyE2(id2); dVdyC3(id3) = dVdyE3(id3); - - // Build weights used in limiting - g1 = (sqr(dVdxC1) + sqr(dVdyC1)); - g2 = (sqr(dVdxC2) + sqr(dVdyC2)); - g3 = (sqr(dVdxC3) + sqr(dVdyC3)); - - fac = sqr(g1)+sqr(g2)+sqr(g3); fac3e = fac+3.0*epse; - - w1 = (g2*g3 + epse) / fac3e; - w2 = (g1*g3 + epse) / fac3e; - w3 = (g1*g2 + epse) / fac3e; - - // Limit gradients - LdVdxC0 = w1*dVdxC1 + w2*dVdxC2 + w3*dVdxC3; - LdVdyC0 = w1*dVdyC1 + w2*dVdyC2 + w3*dVdyC3; - - // Evaluate limited gradient and cell averages at all nodes of each element - dV[n] = dx.dm(outer(onesNp,LdVdxC0)) + dy.dm(outer(onesNp,LdVdyC0)); - aV[n] = outer(onesNp,VC0); - } - - DMat aveu,avev,avep, drho,du,dv,dp, Lrho,Lrhou,Lrhov,Lp; - IVec rids, pids; - - // 5. Reconstruct conserved variables using cell averages and limited gradients - averho = aV[1]; aveu = aV[2]; avev = aV[3]; avep = aV[4]; - drho = dV[1]; du = dV[2]; dv = dV[3]; dp = dV[4]; - - // Reconstruct and check for small densities and/or pressures - double rtol = 1e-2; // tolerance for density - double ptol = 1e-2; // tolerance for pressure - - Lrho = averho + drho; rids = find(Lrho.min_col_vals(),'<',rtol); - int riter=0; - while (rids.size()>0) { - umMSG(1, "warning: correcting negative Rho ** in [%3d] elements\n", rids.size()); - drho(All,rids) *= 0.5; - Lrho = averho + drho; rids = find(Lrho.min_col_vals(),'<',rtol); - if (++riter>3 && rids.size()>0) { - umMSG(1, "*** forcing average density in [%3d] elements\n", rids.size()); - Lrho(All,rids) = averho(All,rids); - break; - } - } - - // Reconstruct momentum - Lrhou = averhou + averho.dm(du) + drho.dm(aveu); - Lrhov = averhov + averho.dm(dv) + drho.dm(avev); - - // Reconstruct energy - DMat dEner = (1.0/gm1)*dp + 0.5*drho.dm(sqr(aveu)+sqr(avev)) + averho.dm(aveu.dm(du)+avev.dm(dv)); - DMat LEner = aveEner + dEner; - - // Check for negative pressures => zero gradient - Lp = gm1*(LEner - 0.5*(sqr(Lrhou) + sqr(Lrhov)).dd(Lrho)); - pids = find(Lp.min_col_vals(),'<',ptol); - if (pids.size() > 0) { - umMSG(1, "correcting negative pressure in [%3d] elements\n", pids.size()); - int piter = 0; - while (pids.size()>0 && piter<3) { - // NBN reduce the change in pressure, and recalc energy - dp(All,pids) *= 0.5; - dEner = (1.0/gm1)*dp + 0.5*drho.dm(sqr(aveu)+sqr(avev)) + averho.dm(aveu.dm(du)+avev.dm(dv)); - LEner = aveEner + dEner; - Lp = gm1*(LEner - 0.5*(sqr(Lrhou) + sqr(Lrhov)).dd(Lrho)); - pids = find(Lp.min_col_vals(),'<',ptol); - ++piter; - if (piter>=3 && pids.size()>0) { - umMSG(1, "*** forcing average pressure in [%3d] elements\n", pids.size()); - LEner(All,pids) = aveEner(All,pids); - } - } - } - - // Replace limited gradients with face gradient at boundary faces - limQ(All,1)=Lrho; limQ(All,2)=Lrhou; limQ(All,3)=Lrhov; limQ(All,4)=LEner; - - //--------------------------- - time_limit += timer.read() - t1; - //--------------------------- - - return limQ; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D.cpp deleted file mode 100644 index eae0a91..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D.cpp +++ /dev/null @@ -1,334 +0,0 @@ -// EulerShock2D.cpp -// member routines for class EulerShock2D -// 2007/08/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -EulerShock2D::EulerShock2D() -//--------------------------------------------------------- -{ - class_name = "EulerShock2D"; - - // set simulation parameters - gamma = 1.4; - gm1 = gamma - 1.0; - - // number of h-refinements of default mesh - Nrefine = 0; - - // use IC routine for first iteration - bDoCalcIC = true; - mesh_level = 0; -} - - -//--------------------------------------------------------- -EulerShock2D::~EulerShock2D() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void EulerShock2D::Resize() -//--------------------------------------------------------- -{ - // (re)allocate member arrays - - if (mesh_level <= 1) { // only resize on first iteration - Q.resize (Np*K, 4); // solution fields - } - rhsQ.resize(Np*K, 4); // Runge-Kutta stage values - resQ.resize(Np*K, 4); // Runge-Kutta residual -} - - -//--------------------------------------------------------- -void EulerShock2D::SetIC() -//--------------------------------------------------------- -{ - if (bDoCalcIC) - { - // compute initial condition (time=0) - // Q = feval(InitialSolution, x, y, 0.0); - (this->*InitialSolution)( x, y, 0.0, Q); - - // next iteration we will use simulation state - bDoCalcIC = false; - } -} - - -//--------------------------------------------------------- -void EulerShock2D::SetStepSize() -//--------------------------------------------------------- -{ - // call base class version - CurvedEuler2D::SetStepSize(); -} - - -//--------------------------------------------------------- -void EulerShock2D::InitRun() -//--------------------------------------------------------- -{ - // base class performs usual startup sequence - // CurvedEuler2D::InitRun(); - - //------------------------------------- - // construct grid and metric - //------------------------------------- - StartUp2D(); - - //------------------------------------- - // refine default mesh - //------------------------------------- - if (Nrefine>=1) { - umLOG(1, "before refinement K = %6d\n", K); - for (int i=1; i<=Nrefine; ++i) { - DMat Qtmp(Np*K, 1); IMat refineflag; - refineflag = Ones(K,Nfaces); Qtmp = ConformingHrefine2D(refineflag, Qtmp); - umLOG(1, "after h-refine %d: K = %6d\n", i,K); - } - } - - // store original BC types before adjusting, - // (e.g. BC_Cyl faces may be set to BC_Wall) - saveBCType = BCType; - - //------------------------------------- - // Adjust faces on circular boundaries - //------------------------------------- - switch (sim_type) { - - case eForwardStep: - // no cylinder faces - straight.range(1,K); curved.resize(0); - break; - - case eScramInlet: - // no cylinder faces - straight.range(1,K); curved.resize(0); - break; - - default: - // set default maps for {straight,curved} elements - straight.range(1,K); curved.resize(0); - break; - } - - BuildBCMaps2D(); // map faces subject to boundary conditions - Resize(); // allocate arrays - SetIC(); // set initial conditions - -#if (1) - OutputNodes(false); // volume nodes -#endif - - -#if (0) - tstep = -1; - Report(true); -#endif - - SetStepSize(); // compute initial timestep (using IC's) - - // storage for residual at each time-step, - // allowing for variable step size - resid.resize(2*Nsteps); - - // base class version sets counters and flags - NDG2D::InitRun(); - - // pre-calculate constant data for limiter routine - precalc_limiter_data(); - - //--------------------------------------------- - // Adjust reporting and render frequencies - //--------------------------------------------- - - switch (sim_type) { - - case eForwardStep: - Nreport = 100; // frequency of reporting - Nrender = 300; // frequency of rendering - NvtkInterp = 3; // resolution of vtk output - break; - - case eScramInlet: - NvtkInterp = 2; - switch (mesh_level) { - case 1: Nreport = 100; Nrender = 100; break; - case 2: Nreport = 250; Nrender = 250; break; - case 3: Nreport = 500; Nrender = 500; break; - case 4: Nreport = 1000; Nrender = 1000; break; - default: Nreport = 1000; Nrender = 1000; break; - } - break; - } - - // Show simulation details - Summary(); -} - - -//--------------------------------------------------------- -void EulerShock2D::precalc_limiter_data() -//--------------------------------------------------------- -{ - - //--------------------------------------------- - // pre-calculate element geometry and constant - // factors for use in this->EulerLimiter2D() - //--------------------------------------------- - - Lim_AVE = 0.5 * MassMatrix.col_sums(); - DMat dropAVE = eye(Np) - outer(ones(Np),Lim_AVE); - Lim_dx = dropAVE*x; - Lim_dy = dropAVE*y; - - // Extract coordinates of vertices of elements - IVec v1=EToV(All,1); Lim_xv1=VX(v1); Lim_yv1=VY(v1); - IVec v2=EToV(All,2); Lim_xv2=VX(v2); Lim_yv2=VY(v2); - IVec v3=EToV(All,3); Lim_xv3=VX(v3); Lim_yv3=VY(v3); - - const DVec &xv1=Lim_xv1,&xv2=Lim_xv2,&xv3=Lim_xv3; - const DVec &yv1=Lim_yv1,&yv2=Lim_yv2,&yv3=Lim_yv3; - DMat &fnx=Lim_fnx, &fny=Lim_fny, &fL=Lim_fL; - - // Compute face unit normals and lengths - fnx.resize(3,K); fny.resize(3,K); - - // fnx = (3,K) = [yv2-yv1; yv3-yv2; yv1-yv3]; - fnx.set_row(1, yv2-yv1); fnx.set_row(2, yv3-yv2); fnx.set_row(3, yv1-yv3); - - // fny = (3,K) = -[xv2-xv1;xv3-xv2;xv1-xv3]; -//fny.set_row(1, xv2-xv1); fny.set_row(2, xv3-xv2); fny.set_row(3, xv1-xv3); - fny.set_row(1, xv1-xv2); fny.set_row(2, xv2-xv3); fny.set_row(3, xv3-xv1); - - fL = sqrt(sqr(fnx)+sqr(fny)); fnx.div_element(fL); fny.div_element(fL); - - //------------------------------------------------------- - // Compute coords of element centers and face weights - //------------------------------------------------------- - - // Find neighbors in patch - Lim_E1=EToE(All,1); Lim_E2=EToE(All,2); Lim_E3=EToE(All,3); - - // Compute coordinates of element centers - xc0=Lim_AVE*x; xc1=xc0(Lim_E1); xc2=xc0(Lim_E2); xc3=xc0(Lim_E3); - yc0=Lim_AVE*y; yc1=yc0(Lim_E1); yc2=yc0(Lim_E2); yc3=yc0(Lim_E3); - - // Compute weights for face gradients - A0=Lim_AVE*J*TWOTHIRD; - A1=A0+A0(Lim_E1); A2=A0+A0(Lim_E2); A3=A0+A0(Lim_E3); - A1_A2_A3 = A1+A2+A3; - - // Find boundary faces for each face - Lim_id1=find(BCType.get_col(1),'!',0); - Lim_id2=find(BCType.get_col(2),'!',0); - Lim_id3=find(BCType.get_col(3),'!',0); - - // Compute location of centers of reflected ghost elements at boundary faces - if (1) { - DMat FL1=fL(1,Lim_id1), Fnx1=fnx(1,Lim_id1), Fny1=fny(1,Lim_id1); - DVec fL1=FL1, fnx1=Fnx1, fny1=Fny1; - DVec H1 = 2.0*(dd(A0(Lim_id1),fL1)); - xc1(Lim_id1) += 2.0*fnx1.dm(H1); - yc1(Lim_id1) += 2.0*fny1.dm(H1); - - DMat FL2=fL(2,Lim_id2), Fnx2=fnx(2,Lim_id2), Fny2=fny(2,Lim_id2); - DVec fL2=FL2, fnx2=Fnx2, fny2=Fny2; - DVec H2 = 2.0*(dd(A0(Lim_id2),fL2)); - xc2(Lim_id2) += 2.0*fnx2.dm(H2); - yc2(Lim_id2) += 2.0*fny2.dm(H2); - - DMat FL3=fL(3,Lim_id3), Fnx3=fnx(3,Lim_id3), Fny3=fny(3,Lim_id3); - DVec fL3=FL3, fnx3=Fnx3, fny3=Fny3; - DVec H3 = 2.0*(dd(A0(Lim_id3),fL3)); - xc3(Lim_id3) += 2.0*fnx3.dm(H3); - yc3(Lim_id3) += 2.0*fny3.dm(H3); - } - - // Find boundary faces - IVec bct = trans(BCType); - Lim_idI = find(bct, '=', (int)BC_In); - Lim_idO = find(bct, '=', (int)BC_Out); - Lim_idW = find(bct, '=', (int)BC_Wall); - Lim_idC = find(bct, '=', (int)BC_Cyl); - - Lim_ctx.resize(3,K); Lim_cty.resize(3,K); - Lim_ctx.set_row(1,xc1); Lim_ctx.set_row(2,xc2); Lim_ctx.set_row(3,xc3); - Lim_cty.set_row(1,yc1); Lim_cty.set_row(2,yc2); Lim_cty.set_row(3,yc3); - - // load the set of ids - Lim_ids.resize(6); - Lim_ids(1)=1; Lim_ids(2)=Nfp; Lim_ids(3)=Nfp+1; - Lim_ids(4)=2*Nfp; Lim_ids(5)=3*Nfp; Lim_ids(6)=2*Nfp+1; - - limQ = Q; -} - - -//--------------------------------------------------------- -void EulerShock2D::Summary() -//--------------------------------------------------------- -{ - // TODO: add details of operators and sparse solvers - - // call base class version - CurvedEuler2D::Summary(); -} - - -//--------------------------------------------------------- -void EulerShock2D::Report(bool bForce) -//--------------------------------------------------------- -{ - CurvedEuler2D::Report(bForce); - - if (tstep>=1 && tstep <= resid.size()) - { - // calculate residual - // resid(tstep) = sqrt(sum(sum(sum((Q-oldQ).^2)))/(4*K*Np)); - // resid(tstep) = sqrt(sum(sum(sum((Q-oldQ).^2)))/(4*K*Np))/dt; - - - DMat Qresid = sqr(Q-oldQ); double d4KNp = double(4*K*Np); - resid(tstep) = sqrt(Qresid.sum()/d4KNp); - - if (eScramInlet == sim_type) { - // scale residual - resid(tstep) /= dt; - } - } -} - - -//--------------------------------------------------------- -void EulerShock2D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - this->Report(true); - - // Report error and work info - if (HasAnalyticSol()) { - umLOG(1, "\n Max analytic error : %12.4e\n", this->GetAnalyticError()); - umLOG(1, "----------------------------------\n"); - } - - umLOG(1, "\n time for NDG work : %12.5lf secs\n", time_work); - umLOG(1, " rhs work : %12.5lf\n", time_rhs); - umLOG(1, "\n time for Flux calc : %12.5lf secs\n", time_flux); - umLOG(1, " time for RHS - Flux: %12.5lf secs\n", time_rhs-time_flux); - umLOG(1, " time for Limiter : %12.5lf secs\n", time_limit); - umLOG(1, " time for main loop : %0.2lf secs\n\n", time_total); - -#if (0) - resid.print(stderr, "resid", "e", 4, 12, false, 3); -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Driver.cpp deleted file mode 100644 index 156f55a..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Driver.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// EulerShock2D_Driver.m -// Driver script for solving the 2D vacuum Euler's equations -// specialization of CurvedEuler2D for handling shocks. -// 2007/08/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -void EulerShock2D::Driver() -//--------------------------------------------------------- -{ - //-------------------------------------------------- - // select order of polynomial approximation (N) - //-------------------------------------------------- - N = 1; - - //-------------------------------------------------- - // select number of h-refinements of default mesh - //-------------------------------------------------- - Nrefine = 0; // no global refinement - -//Nrefine = 1; // K: 381 -> 1524 (fstepA001.neu) -//Nrefine = 2; // K: 1524 -> 6096 -//Nrefine = 3; // K: 6096 -> 24384 - - //-------------------------------------------------- - // select simulation type - //-------------------------------------------------- -//sim_type = eForwardStep; - sim_type = eScramInlet; - - //-------------------------------------------------- - // select flux type - //-------------------------------------------------- - flux_type = FT_Roe; -//flux_type = FT_HLL; -//flux_type = FT_Eigen; - - //-------------------------------------------------- - // select mesh, initial conditions, and BC function - //-------------------------------------------------- - - switch (sim_type) { - - case eForwardStep: - FileName = "Grid/Euler2D/fstepA001.neu"; - InitialSolution = (fp_IC)(&EulerShock2D::ForwardStepIC2D); - ExactSolution = NULL; - BCSolution = (fp_BC)(&EulerShock2D::ForwardStepBC2D); - break; - - case eScramInlet: - FileName = "Grid/Euler2D/Scram_0977.neu"; - InitialSolution = (fp_IC)(&EulerShock2D::InletIC2D); - ExactSolution = NULL; - BCSolution = (fp_BC)(&EulerShock2D::InletBC2D); - break; - - - // See http://www.lcp.nrl.navy.mil/cfd-cta/CFD3/problems/inlet/index.html - - default: - umERROR("EulerShock2D::Driver()", "Simulation case not implemented"); - return; - } - - //-------------------------------------------------- - // read mesh: vertices, elements, materials, BC's - //-------------------------------------------------- - if (!MeshReaderGambit2D(FileName)) { - umWARNING("EulerShock2D::Driver", "Error loading mesh (file: %s)\nExiting.\n",FileName.c_str()); - return; - } - - try { - - switch (sim_type) { - case eForwardStep: - FinalTime = 4.0; - Run(); // Solve Problem - break; - - case eScramInlet: - Run_Iter(); // "iterative" Run() - break; - } - - } catch (...) { - umWARNING("EulerShock2D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run.cpp deleted file mode 100644 index 0ee6623..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// CurvedEuler2D.m -// function Q = EulerShock2D(Q, FinalTime, ExactSolution, ExactSolutionBC, fluxtype) -// 2007/06/30 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -void EulerShock2D::Run() -//--------------------------------------------------------- -{ - // function Q = EulerShock2D(Q,FinalTime, ExactSolution, ExactSolutionBC, fluxtype) - // Purpose : Integrate 2D Euler equations using a 2nd order SSP Runge-Kutta time integrator - - InitRun(); - - // choose order to integrate exactly - CubatureOrder = (int)floor(2.0*(N+1)*3.0/2.0); - NGauss = (int)floor(2.0*(N+1)); - - // build cubature node data for all elements - CubatureVolumeMesh2D(CubatureOrder); - - // build Gauss node data for all element faces - GaussFaceMesh2D(NGauss); - - Resize_cub(); // resize cubature arrays -//MapGaussFaceData(); // {nx = gauss.nx}, etc. - ti0=timer.read(); // time simulation loop - -#if (0) - //------------------------------------- - // check all node sets - //------------------------------------- - OutputNodes(false); // volume nodes - OutputNodes(true); // face nodes - OutputNodes_cub(); // cubature - OutputNodes_gauss(); // quadrature - Report(true); // show initial conditions - umLOG(1, "\n*** Exiting after Cub, Gauss\n\n"); - return; -#endif - - - // limit initial condition - Q = EulerLimiter2D(Q, time); - - // outer time step loop - while (time FinalTime) {dt=FinalTime-time;} - tw1=timer.read(); // time NDG work - oldQ = Q; // store solutuion from previous step - - // 2nd order SSP Runge-Kutta - this->RHS(Q, time, BCSolution); Q1 = Q + dt*rhsQ; Q1 = EulerLimiter2D(Q1, time); - this->RHS(Q1, time, BCSolution); Q = (Q + Q1 + dt*rhsQ)/2.0; Q = EulerLimiter2D(Q, time); - - time += dt; // increment time - SetStepSize(); // compute new timestep - time_work += timer.read() - tw1; // accumulate cost of NDG work - Report(); // optional reporting - ++tstep; // increment timestep - - // if (tstep>=10) break; // testing - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run_Iter.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run_Iter.cpp deleted file mode 100644 index eef0a56..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/EulerShock2D_Run_Iter.cpp +++ /dev/null @@ -1,152 +0,0 @@ -// EulerShock2D_Run_Iter.cpp -// function [Q,resid] = AdaptiveEuler2D(tol, fluxtype) -// Purpose : Integrate 2D Euler equations using a -// 2nd order SSP Runge-Kutta time integrator -// Stop if residual drops below tol -// 2007/08/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - -// http://www.lcp.nrl.navy.mil/cfd-cta/CFD3/problems/inlet/index.html - -//--------------------------------------------------------- -void EulerShock2D::Run_Iter() -//--------------------------------------------------------- -{ - bool bStart = 1; - int change = 1; - double residtol = 5e-4; // 1e-5; - double jumptol = 7.5e-3; // 5e-3 - -//FinalTime = 15; // 2007/08/15 - FinalTime = 5; // d(max rho) ~1e3 near t=5.0 - - for (mesh_level=1; mesh_level<=6; ++mesh_level) - { - switch (mesh_level) { - case 1: FinalTime = 5; break; - case 2: FinalTime = 3; break; - case 3: FinalTime = 1; break; - case 4: FinalTime = 1; break; - case 5: FinalTime = 1; break; - case 6: FinalTime = 1; break; - default: FinalTime = 1; break; - } - - InitRun(); - - // choose order to integrate exactly - CubatureOrder = (int)floor(2.0*(N+1)*3.0/2.0); - NGauss = (int)floor(2.0*(N+1)); - - // build cubature node data for all elements - CubatureVolumeMesh2D(CubatureOrder); - - // build Gauss node data for all element faces - GaussFaceMesh2D(NGauss); - - Resize_cub(); // resize cubature arrays - //MapGaussFaceData(); // {nx = gauss.nx}, etc. - ti0=timer.read(); // time simulation loop - - #if (0) - //------------------------------------- - // check all node sets - //------------------------------------- - OutputNodes(false); // volume nodes - OutputNodes(true); // face nodes - OutputNodes_cub(); // cubature - OutputNodes_gauss(); // quadrature - Report(true); // show initial conditions - umLOG(1, "\n*** Exiting after Cub, Gauss\n\n"); - return; - #endif - - - // limit initial condition - Q = EulerLimiter2D(Q, time); - - // outer time step loop - while (time FinalTime) {dt=FinalTime-time;} - tw1=timer.read(); // time NDG work - oldQ = Q; // store solutuion from previous step - - // 2nd order SSP Runge-Kutta - this->RHS(Q, time, BCSolution); Q1 = Q + dt*rhsQ; Q1 = EulerLimiter2D(Q1, time); - this->RHS(Q1, time, BCSolution); Q = (Q + Q1 + dt*rhsQ)/2.0; Q = EulerLimiter2D(Q, time); - - time += dt; // increment time - SetStepSize(); // compute new timestep - time_work += timer.read() - tw1; // accumulate cost of NDG work - - Report(); // optional reporting - if (resid(tstep)=10) break; // testing - } - - // setup for next iteration - AdaptMesh_Mach(jumptol); - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} - - -//--------------------------------------------------------- -void EulerShock2D::AdaptMesh_Mach(double jumptol) -//--------------------------------------------------------- -{ - // adapt the mesh based on jumps in mach number - - DVec rho,rhou,rhov,Ener,p,sqrurv,mach; - DMat jumpmach; IVec jumpIds; IMat refineflag; - int Nr = Q.num_rows(); - rho.borrow (Nr, Q.pCol(1)); rhou.borrow(Nr, Q.pCol(2)); - rhov.borrow(Nr, Q.pCol(3)); Ener.borrow(Nr, Q.pCol(4)); - - sqrurv = sqr(rhou) + sqr(rhov); - p = gm1*(Ener-0.5*(sqrurv)/rho); - mach = sqrt(sqrurv)/(gamma*p); - - // compute relative jumps and compare with allowed tolerance - jumpmach = (abs(mach(vmapP)-mach(vmapM)) + 1e-20) / (abs(mach(vmapM))+1e-10); - jumpmach.reshape(Nfp*Nfaces, K); - - // tolvec = (max(jumpmach, [], 1)>jumptol); -//jumpIds = find(jumpmach.max_col_vals(), '>', jumptol); - jumpIds.assign((jumpmach.max_col_vals()).gt(jumptol)); - - // Flag all faces of any element with any face in default of jump tolerance - refineflag = outer(Ones(Nfaces), jumpIds); - - -#if (0) - dumpIVec(jumpIds, "jumpIds"); - dumpIMat(refineflag, "refineflag"); - umERROR("Nigel", "Check jumpIds"); -#endif - - -#if (0) - //####################################################### - // extend refinement to neighbors of elements flagged to be refined - ids = find(refineflag(1,:)); - refineflag(:,EToE(ids,:)) = 1; - //####################################################### -#endif - - int Korig = K; BCType = saveBCType; - Q = ConformingHrefine2D(trans(refineflag), Q); - - int change = K - Korig; - umMSG(1, "K(old) = %d K(new) = %d change = %d\n", Korig, K, change); -} \ No newline at end of file diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepBC2D.cpp deleted file mode 100644 index 801003c..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepBC2D.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// ForwardStepBC2D.m -// function Q = ForwardStepBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); -// 2007/07/02 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -void EulerShock2D::ForwardStepBC2D -( - const DVec& xi, - const DVec& yi, - const DVec& nxi, - const DVec& nyi, - const IVec& tmapI, - const IVec& tmapO, - const IVec& tmapW, - const IVec& tmapC, - double ti, - DMat& Qio -) -//--------------------------------------------------------- -{ - // function [Q] = ForwardStepBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); - // Purpose: Impose channel boundary conditions on 2D Euler equations on weak form - - // Example is Mach ** 3.0 ** flow in wind tunnel - // gamma = 1.4; - - int Nr = Qio.num_rows(); DVec rho,rhou,rhov,Ener; - DVec& nxin = const_cast(nxi); - DVec& nyin = const_cast(nyi); - - // extract conserved variables -#if (0) - rho=Qio(All,1); rhou=Qio(All,2); rhov=Qio(All,3); Ener=Qio(All,4); -#else - // wrap current state data (columns of Qio) - rho.borrow (Nr, Qio.pCol(1)); - rhou.borrow(Nr, Qio.pCol(2)); - rhov.borrow(Nr, Qio.pCol(3)); - Ener.borrow(Nr, Qio.pCol(4)); -#endif - - //------------------------------------------------------- - // Inflow conditions -- uniform inflow - //------------------------------------------------------- - double rhoin=gamma, uin=3.0, vin=0.0, pin=1.0; - double Ein = pin/gm1 + 0.5*rhoin*(SQ(uin)+SQ(vin)); - rho(tmapI)=rhoin; rhou(tmapI)=rhoin*uin; rhov(tmapI)=rhoin*vin; Ener(tmapI)=Ein; - - //------------------------------------------------------- - // Outflow conditions -- supersonic outflow ( do nothing ) - //------------------------------------------------------- - - //------------------------------------------------------- - // Wall conditions -- reflective, isothermal, i.e., n.u=0, T=T(t=0) - //------------------------------------------------------- - DVec rhoW=rho(tmapW), rhouW=rhou(tmapW), rhovW=rhov(tmapW); - DVec nxW=nxin(tmapW), nyW=nyin(tmapW); - - // reverse flow in normal direction in ghost elements - rhou(tmapW) = rhouW - 2.0*nxW.dm(nxW.dm(rhouW) + nyW.dm(rhovW)); - rhov(tmapW) = rhovW - 2.0*nyW.dm(nxW.dm(rhouW) + nyW.dm(rhovW)); - - // NBN: conserved variables are modified in-place. -#if (0) - // pack modified conserved variables - Qio(All,1)=rho; Qio(All,2)=rhou; Qio(All,3)=rhov; Qio(All,4)=Ener; -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepIC2D.cpp deleted file mode 100644 index 63f649c..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/ForwardStepIC2D.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// ForwardStepIC2D.m -// function Q = ForwardStepIC2D(x2d, y2d, time) -// 2007/06/30 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -void EulerShock2D::ForwardStepIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function Q = ForwardStepIC2D(x2d, y2d, time) - // - // Purpose: compute plane flow configuration - - double rho,u,v,p, rhou,rhov,Ener; - - rho = gamma; - u = 3.0; - v = 0.0; - p = 1.0; - - // M = |u|/c, c = sqrt(gamma*p/rho) - rhou = rho * u; - rhov = rho * v; - Ener = p/gm1 + (SQ(rhou)+SQ(rhov))/(2.0*rho); - - assert(Qo.num_rows() == Np*K); - Qo(All,1) = rho; - Qo(All,2) = rhou; - Qo(All,3) = rhov; - Qo(All,4) = Ener; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletBC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletBC2D.cpp deleted file mode 100644 index c806a24..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletBC2D.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// InletBC2D.cpp -// function Q = InletBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); -// 2007/08/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -void EulerShock2D::InletBC2D -( - const DVec& xi, - const DVec& yi, - const DVec& nxi, - const DVec& nyi, - const IVec& tmapI, - const IVec& tmapO, - const IVec& tmapW, - const IVec& tmapC, - double ti, - DMat& Qio -) -//--------------------------------------------------------- -{ - // function [Q] = InletBC2D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); - // Purpose: Impose channel boundary conditions on 2D Euler equations on weak form - - // Example is Mach ** 3.0 ** flow in wind tunnel - // gamma = 1.4; - - int Nr = Qio.num_rows(); DVec rho,rhou,rhov,Ener; - DVec& nxin = const_cast(nxi); - DVec& nyin = const_cast(nyi); - - // extract conserved variables -#if (0) - rho=Qio(All,1); rhou=Qio(All,2); rhov=Qio(All,3); Ener=Qio(All,4); -#else - // wrap current state data (columns of Qio) - rho.borrow (Nr, Qio.pCol(1)); - rhou.borrow(Nr, Qio.pCol(2)); - rhov.borrow(Nr, Qio.pCol(3)); - Ener.borrow(Nr, Qio.pCol(4)); -#endif - - //------------------------------------------------------- - // Inflow conditions -- uniform inflow - //------------------------------------------------------- - double rhoin=gamma, uin=3.0, vin=0.0, pin=1.0; - double Ein = pin/gm1 + 0.5*rhoin*(SQ(uin)+SQ(vin)); - rho(tmapI)=rhoin; rhou(tmapI)=rhoin*uin; rhov(tmapI)=rhoin*vin; Ener(tmapI)=Ein; - - //------------------------------------------------------- - // Outflow conditions -- supersonic outflow ( do nothing ) - //------------------------------------------------------- - - //------------------------------------------------------- - // Wall conditions -- reflective, isothermal, i.e., n.u=0, T=T(t=0) - //------------------------------------------------------- - DVec rhoW=rho(tmapW), rhouW=rhou(tmapW), rhovW=rhov(tmapW); - DVec nxW=nxin(tmapW), nyW=nyin(tmapW); - - // reverse flow in normal direction in ghost elements - rhou(tmapW) = rhouW - 2.0*nxW.dm(nxW.dm(rhouW) + nyW.dm(rhovW)); - rhov(tmapW) = rhovW - 2.0*nyW.dm(nxW.dm(rhouW) + nyW.dm(rhovW)); - - // NBN: conserved variables are modified in-place. -#if (0) - // pack modified conserved variables - Qio(All,1)=rho; Qio(All,2)=rhou; Qio(All,3)=rhov; Qio(All,4)=Ener; -#endif -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletIC2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletIC2D.cpp deleted file mode 100644 index ffe666e..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/EulerShock2D/InletIC2D.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// InletIC2D.cpp -// function Q = InletIC2D(x2d, y2d, time) -// 2007/08/15 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "EulerShock2D.h" - - -//--------------------------------------------------------- -void EulerShock2D::InletIC2D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function Q = ForwardStepIC2D(x2d, y2d, time) - // - // Purpose: compute plane flow configuration - - double rho,u,v,p, rhou,rhov,Ener; - - rho = gamma; - u = 3.0; - v = 0.0; - p = 1.0; - - // M = |u|/c, c = sqrt(gamma*p/rho) - rhou = rho * u; - rhov = rho * v; - Ener = p/gm1 + (SQ(rhou)+SQ(rhov))/(2.0*rho); - - assert(Qo.num_rows() == Np*K); - Qo(All,1) = rho; - Qo(All,2) = rhou; - Qo(All,3) = rhov; - Qo(All,4) = Ener; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D.cpp deleted file mode 100644 index 2ffb550..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D.cpp +++ /dev/null @@ -1,165 +0,0 @@ -// Maxwell2D.cpp -// member routines for class Maxwell2D -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell2D.h" - - -//--------------------------------------------------------- -Maxwell2D::Maxwell2D() -//--------------------------------------------------------- -{ - class_name = "Maxwell2D-TM"; -} - - -//--------------------------------------------------------- -Maxwell2D::~Maxwell2D() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void Maxwell2D::Resize() -//--------------------------------------------------------- -{ - // Allocate storage for member arrays - - // storage for solution - Hx.resize(Np, K); - Hy.resize(Np, K); - Ez.resize(Np, K); - Ezinit.resize(Np, K); - - // Runge-Kutta residual storage - resHx.resize(Np,K); - resHy.resize(Np,K); - resEz.resize(Np,K); - - // field differences at faces - dHx.resize(Nfp*Nfaces,K); - dHy.resize(Nfp*Nfaces,K); - dEz.resize(Nfp*Nfaces,K); - - // storage for output - Q_plot.resize(Np*K, 3); -} - - -//--------------------------------------------------------- -void Maxwell2D::SetIC() -//--------------------------------------------------------- -{ - // Set initial conditions for simulation - - mmode = 1.0; nmode = 1.0; - - //Ez = sin(mmode*pi*x) .* sin(nmode*pi*y); - DVec tsinx = apply(sin, (mmode*pi*x)), - tsiny = apply(sin, (nmode*pi*y)); - - Ezinit = tsinx.dm(tsiny); - - Ez = Ezinit; - Hx = 0.0; - Hy = 0.0; -} - - -//--------------------------------------------------------- -void Maxwell2D::SetStepSize() -//--------------------------------------------------------- -{ - // compute time step size (dt) - JacobiGQ(0.0, 0.0, N, rLGL, w); - double rmin = std::abs(rLGL(1)-rLGL(2)); - dtscale2D(dtscale); dt = dtscale.min_val() * rmin * 2.0/3.0; - - Nsteps = (int)ceil(FinalTime/dt); - dt = FinalTime/(double)Nsteps; - -#ifndef NDEBUG - string msg = rLGL.display("rLGL", 6, 10, true, 1, 'F'); - umLOG(1, "\n %s: N = %d, dt = %8.6lf \n", this->GetClassName(), N, dt); - umLOG(1, "\n ev = %s \n", msg.c_str()); -#endif -} - - -//--------------------------------------------------------- -void Maxwell2D::InitRun() -//--------------------------------------------------------- -{ - StartUp2D(); // construct grid and metric - - Resize(); // allocate work arrays - SetIC(); // set initial conditions - SetStepSize(); // calculate step size (dt) - - // just call base class version - NDG2D::InitRun(); - - //--------------------------------------------- - // Adjust reporting and render frequencies - //--------------------------------------------- - Nreport = Nsteps/20; - Nrender = Nreport; // output frequency (param) - - NvtkInterp = 12; // set output resolution - - Summary(); // show simulation details -} - - -//--------------------------------------------------------- -void Maxwell2D::Summary() -//--------------------------------------------------------- -{ - NDG2D::Summary(); -} - - -//--------------------------------------------------------- -void Maxwell2D::Report(bool bForce) -//--------------------------------------------------------- -{ - if (1 == tstep) { - // print header - umLOG(1, "\n step time Ezmin Ezmax\n" - "----------------------------------\n"); - } - - if (1 == tstep || !umMOD(tstep,Nreport) || bForce) { - umLOG(1, "%5d %7.3lf %8.5lf %8.5lf\n", - tstep, time, Ez.min_val(), Ez.max_val()); - } - - //##################################### - // skip field output for timing tests - //##################################### - //return; - - - if (!umMOD(tstep,Nrender) || bForce) { - Q_plot.set_col(1, Hx); // load plot data - Q_plot.set_col(2, Hy); - Q_plot.set_col(3, Ez); - OutputVTK(Q_plot, NvtkInterp); - } -} - - -//--------------------------------------------------------- -void Maxwell2D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - this->Report(true); - - // report work times (in seconds) - umLOG(1, "\n time for NDG work : %12.2lf secs\n", time_work); - umLOG(1, " time for RHS : %12.2lf secs\n", time_rhs); - umLOG(1, " time for main loop : %12.2lf secs\n\n", time_total); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Driver.cpp deleted file mode 100644 index 2b6dfd9..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Driver.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// Maxwell2D_Driver.cpp -// Driver for solving the 2D vacuum Maxwell's equations on TM form -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell2D.h" - - -//--------------------------------------------------------- -void Maxwell2D::Driver() -//--------------------------------------------------------- -{ - umLOG(1, "Maxwell2D::Driver()\n"); - - // Polynomial order used for approximation -//N = 3; - N = 8; -//N = 10; - -//FileName = "Grid/Maxwell2D/Maxwell00625.neu"; -//FileName = "Grid/Maxwell2D/Maxwell0125.neu"; - FileName = "Grid/Maxwell2D/Maxwell025.neu"; -//FileName = "Grid/Maxwell2D/Maxwell05.neu"; -//FileName = "Grid/Maxwell2D/Maxwell1.neu"; -//FileName = "Grid/Maxwell2D/Maxwell2.neu"; -//FileName = "Grid/Maxwell2D/maxmesh.neu"; -//FileName = "Grid/Other/circA01.neu"; - - // Read in Mesh: [vertices, elements, materials, BC's] - if (!MeshReaderGambit2D(FileName)) { - umWARNING("Maxwell2D::Driver", "Error loading mesh (file: %s)\nExiting.\n", FileName.c_str()); - return; - } - - try { - // Solve Problem - //FinalTime = 2*pi; - FinalTime = 1.0; - Run(); - } catch (...) { - umWARNING("Maxwell2D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_RHS.cpp b/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_RHS.cpp deleted file mode 100644 index 9296755..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_RHS.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// Maxwell2D_RHS.m -// function [rhsHx, rhsHy, rhsEz] = MaxwellRHS2D(Hx,Hy,Ez) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell2D.h" - -//--------------------------------------------------------- -void Maxwell2D::RHS() -//--------------------------------------------------------- -{ - // function [rhsHx, rhsHy, rhsEz] = MaxwellRHS2D(Hx,Hy,Ez) - // Purpose : Evaluate RHS flux in 2D Maxwell TM form - - //--------------------------- - double t1 = timer.read(); - //--------------------------- - - // Define field differences at faces - dHx = Hx(vmapM)-Hx(vmapP); - dHy = Hy(vmapM)-Hy(vmapP); - dEz = Ez(vmapM)-Ez(vmapP); - - // Impose reflective boundary conditions (Ez+ = -Ez-) - dHx(mapB)=0.0; dHy(mapB)=0.0; dEz(mapB)=2.0*Ez(vmapB); - - // evaluate upwind fluxes - alpha = 1.0; - ndotdH = nx.dm(dHx) + ny.dm(dHy); - fluxHx = ny.dm(dEz) + alpha*(ndotdH.dm(nx) - dHx); - fluxHy = -nx.dm(dEz) + alpha*(ndotdH.dm(ny) - dHy); - fluxEz = -nx.dm(dHy) + ny.dm(dHx) - alpha*dEz; - - // local derivatives of fields - Grad2D(Ez, Ezx,Ezy); Curl2D(Hx,Hy, CuHz); - - // compute right hand sides of the PDE's - rhsHx = -Ezy + LIFT*(Fscale.dm(fluxHx))/2.0; - rhsHy = Ezx + LIFT*(Fscale.dm(fluxHy))/2.0; - rhsEz = CuHz + LIFT*(Fscale.dm(fluxEz))/2.0; - - //--------------------------- - time_rhs += timer.read() - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Run.cpp b/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Run.cpp deleted file mode 100644 index c502080..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Run.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// Maxwell2D.m -// function [Hx,Hy,Ez,time] = Maxwell2D(Hx, Hy, Ez, FinalTime) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell2D.h" - -//--------------------------------------------------------- -void Maxwell2D::Run() -//--------------------------------------------------------- -{ - // function [Hx,Hy,Ez] = Maxwell2D(Hx, Hy, Ez, FinalTime) - // Purpose : Integrate TM-mode Maxwell's until FinalTime - // starting with initial conditions Hx,Hy,Ez - - InitRun(); // prepare simulation - ti0=timer.read(); // start timing - - // outer time step loop - while (time FinalTime) { dt = FinalTime-time; } - - for (int INTRK=1; INTRK<=5; ++INTRK) { - - // compute rhs of TM-mode Maxwell's equations - this->RHS(); - - // initiate and increment Runge-Kutta residuals - resHx *= rk4a(INTRK); resHx += dt*rhsHx; - resHy *= rk4a(INTRK); resHy += dt*rhsHy; - resEz *= rk4a(INTRK); resEz += dt*rhsEz; - - // update fields - Hx += rk4b(INTRK)*resHx; - Hy += rk4b(INTRK)*resHy; - Ez += rk4b(INTRK)*resEz; - } - - time_work += timer.read() - tw1; - - time += dt; // increment current time - Report(); // optional reporting - tstep++; // increment timestep - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_main.cpp b/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_main.cpp deleted file mode 100644 index 9be20b2..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/Maxwell2D/Maxwell2D_main.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// NDG.cpp: entry point for the NDG (console version) -// Note: reduced version (Maxwell2D only) -// 2007/05/26 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG_headers.h" -#include "Maxwell2D.h" // Maxwell2D -- TM - -//--------------------------------------------------------- -int main(int argc, char* argv[]) -//--------------------------------------------------------- -{ - InitGlobalInfo(); // create global data and open logs - - umLOG(1, "\n"); - umLOG(1, "--------------------------------\n"); - umLOG(1, " NuDG++ \n"); - umLOG(1, " Nodal Discontinuous Galerkin \n"); - umLOG(1, " Method for non-linear \n"); - umLOG(1, " PDE systems \n"); - umLOG(1, " \n"); - umLOG(1, " o version 3.0.0 \n"); - umLOG(1, " o June 6, 2007 \n"); - umLOG(1, " o Dr Tim Warburton \n"); - umLOG(1, " o tim.warburton@gmail.com \n"); - umLOG(1, "--------------------------------\n\n"); - - NDG2D *p = new Maxwell2D; // 2D Maxwell simulator - - if (p) - { - p->Driver(); // call driver - delete p; // delete simulator - - umLOG(1, "\nSimulation complete.\n\n"); - } else { - umWARNING("NDGDriver", "No simulator created"); - } - - FreeGlobalInfo(); // release global data and close logs - return 0; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D.cpp deleted file mode 100644 index 46dc1b6..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// MaxwellCurved2D.cpp -// member routines for class MaxwellCurved2D -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "MaxwellCurved2D.h" - - -//--------------------------------------------------------- -MaxwellCurved2D::MaxwellCurved2D() -//--------------------------------------------------------- -{ - class_name = "MaxwellCurved2D-TM"; -} - - -//--------------------------------------------------------- -MaxwellCurved2D::~MaxwellCurved2D() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void MaxwellCurved2D::SetIC() -//--------------------------------------------------------- -{ -#if (0) - // NBN: to compare with base version - // Maxwell2D::SetIC(); - // return; -#endif - - // Set initial conditions for simulation - - // First 6 modes of eigenmodes with 6 azimuthal periods - m_alpha.resize(6); - m_alpha(1) = 9.936109524217684; - m_alpha(2) = 13.589290170541217; - m_alpha(3) = 17.003819667816014; - m_alpha(4) = 20.320789213566506; - m_alpha(5) = 23.586084435581391; - m_alpha(6) = 26.820151983411403; - - // this configuration has an analytic solution - // Note: analytic sol. depends on m_Ezinit: - m_bHasAnalyticSol = true; - - // choose radial mode - alpha0 = m_alpha(2); - m_theta = atan2(y,x); - m_rad = sqrt(sqr(x) + sqr(y)); - -//Ez = besselj(6, alpha0*rad).*cos(6*theta); - DVec tbsslj = besselj(6, alpha0 * m_rad); - DVec tcosth = apply(cos, (6.0 * m_theta)); - Ezinit = tbsslj.dm(tcosth); - - Ez = Ezinit; - Hx = 0.0; - Hy = 0.0; -} - - -//--------------------------------------------------------- -void MaxwellCurved2D::InitRun() -//--------------------------------------------------------- -{ - StartUp2D(); // construct grid and metric - -#if (0) - umLOG(1, "before refine : K = %5d\n", K); - //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - DMat Q2(Np*K, 1); IMat refineflag; - refineflag = Ones(K,Nfaces); Q2 = ConformingHrefine2D(refineflag, Q2); - umLOG(1, "after refine 1: K = %5d\n", K); - //refineflag = Ones(K,Nfaces); Q2 = ConformingHrefine2D(refineflag, Q2); - //umLOG(1, "after refine 1: K = %5d\n", K); - //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -#endif - - - BuildBCMaps2D(); // build boundary condition maps -//OutputNodes(true); // face nodes - AdjustCylBC(1., 0.,0., BC_All); // Push all boundary faces to unit cylinder -//OutputNodes(true); // face nodes - Resize(); // allocate work arrays - SetIC(); // set initial conditions - SetStepSize(); // calculate step size (dt) - - BuildCurvedOPS2D(3*N); - - //--------------------------------------------- - // base class version sets counters and flags - //--------------------------------------------- - NDG2D::InitRun(); - - //--------------------------------------------- - // Adjust reporting and render frequencies - //--------------------------------------------- - Nreport = Nsteps/20; -//Nreport = 2; // set frequency of reporting (param) -//Nreport = 10; // set frequency of reporting (param) -//Nreport = 50; // set frequency of reporting (param) - Nrender = Nreport; // output frequency (param) -//Nrender = 10; // output frequency (param) -//Nrender = 100000; // output frequency (param) - - NvtkInterp = 12; // set output resolution -//NvtkInterp = 6; // set output resolution - - Summary(); // Show simulation details -} - - -//--------------------------------------------------------- -void MaxwellCurved2D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - this->Report(true); - - // Report error and work info - if (HasAnalyticSol()) { - umLOG(1, "\n Max analytic error : %12.4e\n", this->GetAnalyticError()); - umLOG(1, "----------------------------------\n"); - } - - umLOG(1, "\n time for NDG work: %0.2lf secs\n", time_work); - umLOG(1, " rhs work - base : %0.2lf\n", time_rhs); - umLOG(1, " - curve: %0.2lf\n", time_rhs_c); - umLOG(1, " - total: %0.2lf secs\n", time_rhs+time_rhs_c); - umLOG(1, " time for main loop: %0.2lf secs\n\n",time_total); -} - - -//--------------------------------------------------------- -double MaxwellCurved2D::GetAnalyticError() -//--------------------------------------------------------- -{ - double tfac = time * cos(alpha0*time); - m_ErrAnalytic = Ez - (tfac*Ezinit); - m_maxAbsError = m_ErrAnalytic.max_val_abs(); - return m_maxAbsError; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_Driver.cpp deleted file mode 100644 index 7535d7a..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_Driver.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// MaxwellCurved2D_Driver.cpp -// -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "MaxwellCurved2D.h" - - -//--------------------------------------------------------- -void MaxwellCurved2D::Driver() -//--------------------------------------------------------- -{ - umLOG(1, "MaxwellCurved2D::Driver()\n"); - - // Set polynomial order to use - N = 8; - - // Read and initiate circular mesh - FileName = "Grid/Other/circA01.neu"; - - if (!MeshReaderGambit2D(FileName)) { - umWARNING("MaxwellCurved2D::Driver", "Error loading mesh (file: %s)\nExiting.\n", FileName.c_str()); - return; - } - - try { - // Solve Problem for exactly one period - FinalTime = 0.1; - Run(); - } catch (...) { - umWARNING("MaxwellCurved2D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_RHS.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_RHS.cpp deleted file mode 100644 index 5a95015..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_RHS.cpp +++ /dev/null @@ -1,91 +0,0 @@ -// MaxwellCurved2D_RHS.m -// function [rhsHx, rhsHy, rhsEz] = MaxwellCurvedRHS2D(cinfo, Hx,Hy,Ez) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "MaxwellCurved2D.h" - -//--------------------------------------------------------- -void MaxwellCurved2D::RHS() -//--------------------------------------------------------- -{ - // function [rhsHx, rhsHy, rhsEz] = MaxwellCurvedRHS2D(cinfo, Hx,Hy,Ez) - // Purpose : Evaluate RHS flux in 2D Maxwell TM form - - //--------------------------------------------- - // Call base class version to initialize rhs: - //--------------------------------------------- - Maxwell2D::RHS(); - - //--------------------------------------------- - // then correct residuals at each curved element - //--------------------------------------------- - - static DVec gdHx, gdHy, gdEz; - static DVec ezk1,hxk1,hyk1, ezk2,hxk2,hyk2, gnx,gny; - static DVec gndotdH, cfluxHx,cfluxHy,cfluxEz; - - int n=0,f1=0,f2=0,k1=0,k2=0; - int Ncinfo = m_cinfo.size(), Ng=m_cinfo(1).gnx.size(); - // must set size before "map" operations can be used - gdHx.resize(Ng); gdHy.resize(Ng); gdEz.resize(Ng); - double t1 = timer.read(); - - // correct residuals at each curved element - for (n=1; n<=Ncinfo; ++n) { - - // for each curved element computed L2 derivatives via cubature - const CInfo2D& cur = m_cinfo(n); - k1 = cur.elmt; const DMat& cDx=cur.Dx, cDy=cur.Dy; - - // pre-load (k1) columns as vectors - ezk1.borrow(Np,Ez.pCol(k1)); - hxk1.borrow(Np,Hx.pCol(k1)); - hyk1.borrow(Np,Hy.pCol(k1)); - - rhsHx(All,k1) = -cDy*ezk1; - rhsHy(All,k1) = cDx*ezk1; - rhsEz(All,k1) = cDx*hyk1 - cDy*hxk1; - - // for each face of each curved element use Gauss quadrature based lifts - for (f1=1; f1<=Nfaces; ++f1) { - - k2 = EToE(k1,f1); - - // pre-load (k2) columns as vectors - ezk2.borrow(Np,Ez.pCol(k2)); - hxk2.borrow(Np,Hx.pCol(k2)); - hyk2.borrow(Np,Hy.pCol(k2)); - - gnx = cur.gnx(All,f1); gny = cur.gny(All,f1); - const DMat& gVM=cur.gVM[f1], gVP=cur.gVP[f1], glift=cur.glift[f1]; - - if (k1 != k2) { - // compute difference of solution traces at Gauss nodes - gdHx = gVM*hxk1 - gVP*hxk2; - gdHy = gVM*hyk1 - gVP*hyk2; - gdEz = gVM*ezk1 - gVP*ezk2; - } else { - // (k1==k2): correct jump at Gauss nodes on domain boundary faces - gdHx = 0.0; - gdHy = 0.0; - gdEz = 2.0*gVM*ezk1; - } - - // perform upwinding - gndotdH = gnx.dm(gdHx) + gny.dm(gdHy); - cfluxHx = gny.dm(gdEz) + gndotdH.dm(gnx) - gdHx; - cfluxHy = -gnx.dm(gdEz) + gndotdH.dm(gny) - gdHy; - cfluxEz = -gnx.dm(gdHy) + gny.dm(gdHx) - gdEz; - - // lift flux terms using Gauss based lift operator - rhsHx(All,k1) += glift*cfluxHx/2.0; - rhsHy(All,k1) += glift*cfluxHy/2.0; - rhsEz(All,k1) += glift*cfluxEz/2.0; - } - } - - //--------------------------- - time_rhs_c += timer.read() - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_main.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_main.cpp deleted file mode 100644 index 6cc7640..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellCurved2D/MaxwellCurved2D_main.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// NDG.cpp: entry point for the NDG (console version) -// Note: reduced version (Maxwell2D only) -// 2007/05/26 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "NDG_headers.h" -#include "MaxwellCurved2D.h" // Maxwell2D -- TM - -//--------------------------------------------------------- -int main(int argc, char* argv[]) -//--------------------------------------------------------- -{ - InitGlobalInfo(); // create global data and open logs - - umLOG(1, "\n"); - umLOG(1, "--------------------------------\n"); - umLOG(1, " NuDG++ \n"); - umLOG(1, " Nodal Discontinuous Galerkin \n"); - umLOG(1, " Method for non-linear \n"); - umLOG(1, " PDE systems \n"); - umLOG(1, " \n"); - umLOG(1, " o version 3.0.0 \n"); - umLOG(1, " o June 6, 2007 \n"); - umLOG(1, " o Dr Tim Warburton \n"); - umLOG(1, " o tim.warburton@gmail.com \n"); - umLOG(1, "--------------------------------\n\n"); - - NDG2D *p = new MaxwellCurved2D; // 2D Maxwell simulator - - if (p) - { - p->Driver(); // call driver - delete p; // delete simulator - - umLOG(1, "\nSimulation complete.\n\n"); - } else { - umWARNING("NDGDriver", "No simulator created"); - } - - FreeGlobalInfo(); // release global data and close logs - return 0; -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildHNonCon2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildHNonCon2D.cpp deleted file mode 100644 index 3822964..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildHNonCon2D.cpp +++ /dev/null @@ -1,150 +0,0 @@ -// BuildHNonCon2D.m -// function [neighbors] = BuildHNonCon2D(NGauss, tol) -// 2007/08/04 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -//#include "NDG2D.h" -#include "MaxwellNonCon2D.h" - -//######################################################### -// TODO: migrate back to class NDG2D -//######################################################### - - -//--------------------------------------------------------- -void MaxwellNonCon2D::BuildHNonCon2D -( - int NGauss, // [in] - double tol, // [in] - FInfoV& fInfo // [out] -) -//--------------------------------------------------------- -{ - // function [fInfo] = BuildHNonCon2D(NGauss, tol) - // purpose: find element to element connections through - // non-conforming interfaces (** elements assumed straight sided **) - - // TODO: estimate max_cons - size_t max_cons=1000+1; - fInfo.resize(max_cons, NULL); - - DVec gz,gw, xg,yg, vx1,vx2,vy1,vy2, x1,x2,y1,y2, v11(2),v12(2); - DVec area1, area2, r21, r22, r1,r2,tr1,tr2, flag, rg1,sg1,rg2,sg2; - IVec evmap1, evmap2, idB, elmtsB, facesB, matches; - IMat idEF; DMat xy11,xy12; DMat_Diag dgw; - int n=0,k1=0,f1=0,k2=0,f2=0, Nbc=0, b1=0, Nmatches=0; - double x11=0.0,y11=0.0,x12=0.0,y12=0.0,L=0.0,partsJ; - - // 1. Build Gauss nodes - JacobiGQ(0.0, 0.0, NGauss-1, gz, gw); - - evmap1 = concat(EToV.get_col(1), EToV.get_col(2), EToV.get_col(3)); - evmap2 = concat(EToV.get_col(2), EToV.get_col(3), EToV.get_col(1)); - - // 1.1 Find location of vertices of boundary faces - vx1 = VX(evmap1); vx2 = VX(evmap2); - vy1 = VY(evmap1); vy2 = VY(evmap2); - -//idB = find(EToE==((1:K)'*ones(1,Nfaces))); - idB = find( EToE, '=', outer(Range(1,K), Ones(Nfaces)) ); - - x1 = vx1(idB); y1 = vy1(idB); - x2 = vx2(idB); y2 = vy2(idB); - - // 1.2 Find those element-faces that are on boundary faces -//[elmtsB,facesB] = find(EToE==((1:K)'*ones(1,Nfaces))); - idEF = find2D(EToE, '=', outer(Range(1,K), Ones(Nfaces))); - elmtsB = idEF(All,1); facesB = idEF(All,2); - - - Nbc = elmtsB.length(); - - int sk = 0; - // 2.1 For each boundary face - for (b1=1; b1<=Nbc; ++b1) { - - // 2.2 Find element and face of this boundary face - k1 = elmtsB(b1); f1 = facesB(b1); - - // 2.3 Find end coordinates of b1'th boundary face - x11 = x1(b1); y11 = y1(b1); x12 = x2(b1); y12 = y2(b1); - - // 2.4 Compute areas, lengths and face coordinates used in intersection - // tests comparing b1'th boundary face with all boundary faces - area1 = abs((x12-x11)*(y1-y11) - (y12-y11)*(x1-x11)); // scale - area2 = abs((x12-x11)*(y2-y11) - (y12-y11)*(x2-x11)); - L = SQ(x12-x11) + SQ(y12-y11); - r21 = ((2.0*x1-x11-x12)*(x12-x11) + (2.0*y1-y11-y12)*(y12-y11))/L; - r22 = ((2.0*x2-x11-x12)*(x12-x11) + (2.0*y2-y11-y12)*(y12-y11))/L; - - // 2.5 Find range of local face coordinate (bracketed between -1 and 1) - r1 = max(-1.0,min(r21,r22)); r2 = min(1.0,max(r21,r22)); - - // 2.6 Compute flag for overlap of b1 face with all other boundary faces - //flag = area1+area2+(r1<= -1 & r2<= -1)+(r1>=1 & r2>=1)+(r2-r10) - { - // 3.1 Find matches - tr1 = r1(matches); tr2 = r2(matches); - - v11(1) = x11; v12(1) = x12; - v11(2) = y11; v12(2) = y12; - - // 3.2 Find end points of boundary-boundary intersections - // xy11 = 0.5*[x11;y11]*(1-r1) + 0.5*[x12;y12]*(1+r1); - // xy12 = 0.5*[x11;y11]*(1-r2) + 0.5*[x12;y12]*(1+r2); - - xy11 = 0.5*outer(v11,(1.0-tr1)) + 0.5*outer(v12,(1.0+tr1)); - xy12 = 0.5*outer(v11,(1.0-tr2)) + 0.5*outer(v12,(1.0+tr2)); - - // 3.3 For each face-face match - for (n=1; n<=Nmatches; ++n) { - - // add new neighbor info - fInfo[++sk] = new FInfo; - - // 3.4 Store which elements intersect - k2 = elmtsB(matches(n)); f2 = facesB(matches(n)); - - fInfo[sk]->elmtM = k1; fInfo[sk]->faceM = f1; - fInfo[sk]->elmtP = k2; fInfo[sk]->faceP = f2; - - // 3.5 Build physical Gauss nodes on face fragment - xg = 0.5*(1.0-gz)*xy11(1,n) + 0.5*(1.0+gz)*xy12(1,n); - yg = 0.5*(1.0-gz)*xy11(2,n) + 0.5*(1.0+gz)*xy12(2,n); - - // 3.6 Find local coordinates of Gauss nodes - FindLocalCoords2D(k1, xg, yg, rg1,sg1); - FindLocalCoords2D(k2, xg, yg, rg2,sg2); - - // 3.7 Build interpolation matrices for volume nodes ->Gauss nodes - fInfo[sk]->gVM = InterpMatrix2D(rg1,sg1); - fInfo[sk]->gVP = InterpMatrix2D(rg2,sg2); - - // 3.8 Find face normal - fInfo[sk]->nx = nx(1+(f1-1)*Nfp,k1); - fInfo[sk]->ny = ny(1+(f1-1)*Nfp,k1); - - // 4.0 Build partial face data lift operator - // 4.1 Compute weights for lifting - partsJ = 0.5 * sqrt(SQ(xy11(1,n)-xy12(1,n)) + SQ(xy11(2,n)-xy12(2,n))); - dgw = gw*partsJ/J(1,k1); - - // 4.2 Build matrix to lift Gauss data to volume data - fInfo[sk]->lift = VVT*(trans(fInfo[sk]->gVM))*dgw; - } - } - } - - Nnoncon = sk; - - // use elements [1:sk], ignore element [0] - fInfo.resize(sk+1); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildPNonCon2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildPNonCon2D.cpp deleted file mode 100644 index 4df880b..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/BuildPNonCon2D.cpp +++ /dev/null @@ -1,250 +0,0 @@ -// BuildPNonCon2D.cpp -// function pinfo = BuildPNonCon2D(Norder, pK, pVX, pVY, pEToV, pBCType) -// 2007/08/04 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -//#include "NDG2D.h" -#include "MaxwellNonCon2D.h" - -//######################################################### -// TODO: migrate back to class NDG2D -//######################################################### - - -//--------------------------------------------------------- -void MaxwellNonCon2D::BuildPNonCon2D -( - int Norder, // [in] single integer - int pK, // [in] - DVec& pVX, // [in] - DVec& pVY, // [in] - IMat& pEToV, // [in] - IMat& pBCType, // [in] - PInfoV& pinfo // [out] -) -//--------------------------------------------------------- -{ - // load Norder as a list of {N} values - IVec NList(1); NList(1) = Norder; - BuildPNonCon2D(NList,pK,pVX,pVY,pEToV,pBCType,pinfo); -} - - - -//--------------------------------------------------------- -void MaxwellNonCon2D::BuildPNonCon2D -( - IVec& Norder, // [in] integer array - int pK, // [in] - DVec& pVX, // [in] - DVec& pVY, // [in] - IMat& pEToV, // [in] - IMat& pBCType, // [in] - PInfoV& pinfo // [out] -) -//--------------------------------------------------------- -{ - // function pinfo = BuildPNonCon2D(Norder, pK, pVX, pVY, pEToV, pBCType) - // - // Purpose: construct info necessary for DGTD on P-nonconforming meshes - // Globals2D; - - // Find maximum requested polynomial order - this->Nmax = Norder.max_val(); - - // store original boundary conditions - saveBCType = pBCType; - - // allow for one PInfo object for each order N - pinfo.resize(Nmax+1, NULL); - - // Mesh details - Nfaces = 3; NODETOL = 1e-12; VX = pVX; VY = pVY; - - DVec x1,y1,foo,rids1,rids2,sids3, gz,gw, rM,rP,gzr; - IVec tids,ids,ids1,ids2,ids3,idsM,idsP; - IVec KR,ksN, va,vb,vc, fN1,fN2,fmask; - IMat kmap(pK,2), EToV_N, idsPM; DMat interpM,interpP,mmM; - DMat_Diag Dgw; - int N1=0,N2=0,k=0,offset=0,f1=0,f2=0,k1=0,k2=0; - int k1orig=0,k2orig=0,pi1Nfp=0; - - // Perform a mini StartUp2D for the elements of each order - int sk = 1; - for (N=1; N<=Nmax; ++N) - { - // load N'th order polynomial nodes - Np = (N+1)*(N+2)/2; Nfp = N+1; - Nodes2D(N, x1,y1); xytors(x1,y1, r,s); - - // Find list of N'th order nodes on each face of the reference element - tids = find(abs(s+1.0), '<', NODETOL); rids1=r(tids); - sort(rids1, foo, ids, eAscend); ids1=tids(ids); - - tids = find(abs(r+s ), '<', NODETOL); rids2=r(tids); - sort(rids2, foo, ids, eDescend); ids2=tids(ids); - - tids = find(abs(r+1.0), '<', NODETOL); sids3=s(tids); - sort(sids3, foo, ids, eDescend); ids3=tids(ids); - - // Fmask = [ids1,ids2,ids3]; - Fmask.resize(Nfp,3); // set shape (M,N) before concat() - Fmask = concat(ids1,ids2,ids3); // load vector into shaped matrix - - // Build reference element matrices - V = Vandermonde2D(N,r,s); invV = inv(V); - MassMatrix = trans(invV)*invV; - ::Dmatrices2D(N,r,s,V, Dr,Ds); - Lift2D(); - - // store information for N'th order elements - pinfo[N] = new PInfo(Nmax); PInfo& pinfo_N = *(pinfo[N]); - pinfo_N.Np=Np; pinfo_N.Nfp=Nfp; pinfo_N.Fmask=Fmask; pinfo_N.r=r; pinfo_N.s=s; - pinfo_N.Dr=Dr; pinfo_N.Ds=Ds; pinfo_N.LIFT=LIFT; pinfo_N.V=V; - - // Find elements of polynomial order N - ksN = find(Norder, '=', N); - K = ksN.length(); - - pinfo_N.K = K; - pinfo_N.ks = ksN; - - if (K>0) { - - // Use the subset of elements of order N - EToV_N = pEToV(ksN,All); BCType = saveBCType(ksN,All); KR=Range(1,K); - kmap(ksN,1) = KR.data(); kmap(ksN,2) = N; - - // Build coordinates of all the nodes - va = EToV_N(All,1); vb = EToV_N(All,2); vc = EToV_N(All,3); - - x = 0.5 * (-(r+s)*VX(va) + (1.0+r)*VX(vb) + (1.0+s)*VX(vc)); - y = 0.5 * (-(r+s)*VY(va) + (1.0+r)*VY(vb) + (1.0+s)*VY(vc)); - - // Calculate geometric factors - ::GeometricFactors2D(x,y,Dr,Ds, rx,sx,ry,sy,J); - Normals2D(); - Fscale = sJ.dd(J(Fmask,All)); - - // Calculate element connections on this mesh - tiConnect2D(EToV_N, EToE,EToF); - BuildMaps2D(); - BuildBCMaps2D(); - - pinfo_N.mapW = mapW; - - //--------------------------------------------------- - // Compute triangulation of N'th order nodes on mesh - // - // triN = delaunay(r, s); alltri = []; - // for (k=1; k<=K; ++k) { alltri = [alltri; triN+(k-1)*Np]; } - // pinfo_N.tri = alltri; - //--------------------------------------------------- - IMat triN, alltri; - Triangulation2D(N, triN); - for (k=1; k<=K; ++k) { - // append copies of reference triangulation, - // with ids shifted by (k-1)*Np - alltri.append_rows( triN + (k-1)*Np ); - } - pinfo_N.tri = alltri; - //--------------------------------------------------- - - - // Store geometric information in pinfo struct - pinfo_N.rx = rx; pinfo_N.sx = sx; pinfo_N.ry = ry; pinfo_N.sy = sy; - pinfo_N.nx = nx; pinfo_N.ny = ny; pinfo_N.sJ = sJ; pinfo_N.J = J; - pinfo_N.x = x; pinfo_N.y = y; pinfo_N.Fscale = Fscale; - - // (current) total number of DG nodes - max_pinf_id = sk+K*Np-1; - - // Store location of the N'th order nodes in a global vector - // pinfo_N.ids = reshape(sk:sk+K*Np-1, Np, K); - pinfo_N.ids.load(Np,K, Range(sk,max_pinf_id)); - - sk += K*Np; - } - } - - // For each possible order - for (N1=1; N1<=Nmax; ++N1) { - // generate face L2projection matrices (from order N2 to order N1 face space) - for (N2=1; N2<=Nmax; ++N2) { - - // Set up sufficient Gauss quadrature to exactly perform surface integrals - JacobiGQ(0, 0, std::max(N1,N2), gz, gw); - - const PInfo &piN1 = *(pinfo[N1]), &piN2 = *(pinfo[N2]); - fN1=piN1.Fmask(All,1); fN2=piN2.Fmask(All,1); - - // All edges have same distribution (note special Fmask) - rM = piN1.r(fN1); - rP = piN2.r(fN2); - - // gzr = gz(end:-1:1); - gzr = gz(Range(gz.size(),1)); Dgw.diag(gw); - - // Build N2 to N1 projection matrices for '+' trace data - interpM = Vandermonde1D(N1, gz )/Vandermonde1D(N1, rM); - interpP = Vandermonde1D(N2, gzr)/Vandermonde1D(N2, rP); - - // Face mass matrix used in projection - mmM = trans(interpM) * Dgw * interpM; - piN1.interpP[N2] = mmM | ( trans(interpM) * Dgw * interpP); - } - } - - // Generate neighbor information for all faces - tiConnect2D(pEToV, EToE, EToF); - - // For each possible polynomial order - for (N1=1; N1<=Nmax; ++N1) { - - const PInfo &piN1 = *(pinfo[N1]); - - // Create a set of indexing arrays, one for each possible neighbor order - for (N2=1; N2<=Nmax; ++N2) { - (piN1.fmapM[N2]).resize(0); // used as vector of ids - (piN1.vmapP[N2]).resize(0,0); // used as (Nfp,K) matrix - } - - // Loop through all elements of order N1 - for (k1=1; k1<=piN1.K; ++k1) { - - // Find element in original mesh - k1orig = piN1.ks(k1); - - // Check all it's faces - for (f1=1; f1<=Nfaces; ++f1) - { - // Find neighboring element (i.e. it's order and location in N2 mesh) - k2orig = EToE(k1orig,f1); - f2 = EToF(k1orig,f1); - k2 = kmap(k2orig,1); - N2 = kmap(k2orig,2); - pi1Nfp = piN1.Nfp; - - // Compute location of face nodes of '-' trace - offset = (k1-1)*pi1Nfp*Nfaces + (f1-1)*pi1Nfp; - idsM = Range(offset+1, offset+pi1Nfp); - - // Find location of volume nodes on '+' trace of (k1orig,f1) - fmask = pinfo[N2]->Fmask(All,f2); - idsPM = pinfo[N2]->ids(fmask, k2); // extract as IMat - idsP = idsPM; // convert to Ivec - - // Store node locations in cell arrays - - // piN1.fmapM[N2] = [pinfo(N1).fmapM{N2}, idsM]; - // piN1.vmapP[N2] = [pinfo(N1).vmapP{N2}, idsP]; - - piN1.fmapM[N2].append(idsM); // used as vector of ids - piN1.vmapP[N2].append_col(idsP); // used as (Nfp,K) matrix - } - } - } - - umMSG(1, "BuildPNonCon2D() complete.\n"); -} - diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D.cpp deleted file mode 100644 index 879caef..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D.cpp +++ /dev/null @@ -1,564 +0,0 @@ -// MaxwellNonCon2D.cpp -// member routines for class MaxwellNonCon2D -// 2007/08/04 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "MaxwellNonCon2D.h" - - -//--------------------------------------------------------- -MaxwellNonCon2D::MaxwellNonCon2D() -//--------------------------------------------------------- -{ - class_name = "MaxwellNonCon2D"; - - m_PInfo.clear(); // P - m_FInfo.clear(); // H -} - - -//--------------------------------------------------------- -MaxwellNonCon2D::~MaxwellNonCon2D() -//--------------------------------------------------------- -{ - // explicitly delete any "face info" objects - if (m_FInfo.size()>0 && Nnoncon>0) - { - // Note: using 1-based index into vector - for (int n=1; n<=Nnoncon; ++n) { - if (m_FInfo[n]) { - // delete face info object - delete m_FInfo[n]; - m_FInfo[n]=NULL; - } - } - // clear vector of pointers - m_FInfo.clear(); - } - - // explicitly delete any "P-info" objects - if (m_PInfo.size() > 0) - { - // TODO: select {0,1} as base - for (size_t n=0; nK > 0) { - fscalN = 0.5 * (m_PInfo[N]->Fscale).max_val(); - dt = std::min(dt, 2.0/(SQ(N)*fscalN)); - } - } - } - - Nsteps = (int)ceil(FinalTime/dt); - dt = FinalTime/(double)Nsteps; - -#if (0) - umLOG(1, "\n %s: N = %d, dt = %8.6lf \n", - this->GetClassName(), N, dt); -#endif -} - - -//--------------------------------------------------------- -void MaxwellNonCon2D::InitRun() -//--------------------------------------------------------- -{ - - if (eModeH == noncon_mode) { - StartUp2D(); // construct grid and metric - AdjustMesh_H(); // create non-conforming (H) elements - } else { - AdjustMesh_P(); // create non-conforming (H) elements - } - - Resize(); // allocate arrays - SetIC(); // set initial conditions - SetStepSize(); // compute initial timestep (using IC's) - - //--------------------------------------------- - // base class version sets counters and flags - //--------------------------------------------- - NDG2D::InitRun(); - - time_rhs_H = 0.0; - time_rhs_P = 0.0; - - //--------------------------------------------- - // Adjust reporting and render frequencies - //--------------------------------------------- - Nreport = 100; // set frequency of reporting (param) - Nrender = Nreport; // output frequency (param) - - NvtkInterp = 8; // set output resolution - - Summary(); // show simulation details -} - - -//--------------------------------------------------------- -void MaxwellNonCon2D::Summary() -//--------------------------------------------------------- -{ - //------------------------------------- - // Summary of current simulator - //------------------------------------- - if (eModeH == noncon_mode) - { - umLOG(1, "\nMaxwellNonCon2D: non-conforming (H) elements\n\n"); - umLOG(1, " Order (N) : %d\n" - " Np : %d\n" - " K : %d\n", this->N, this->Np, this->K); - } - else - { - umLOG(1, "\nMaxwellNonCon2D: non-conforming (P) elements\n\n"); - umLOG(1, " poly. order elmts \n"); - umLOG(1, "-------------------------\n"); - - int total_K = 0; - for (N=1; N<=Nmax; ++N) - { - // report data for polynomial order N - const PInfo& pinf = *(m_PInfo[N]); - if (pinf.K>0) { - total_K += pinf.K; - umLOG(1, " N = %2d : %5d\n", N, pinf.K); - } - } - umLOG(1, "-------------------------\n" - "Tot. elements %6d\n" - "-------------------------\n", total_K); - } - - umLOG(1, "\n mesh file : %s\n" - " report freq : %d\n" - " render freq : %d\n", GetMeshFileName(), Nreport, Nrender); - - //------------------------------------- - // time data - //------------------------------------- - umLOG(1, " Finaltime : %0.2g\n" - " time-step : %0.5g (inital dt)\n" - " num. steps : %d\n\n\n", - this->FinalTime, this->dt, this->Nsteps); - - m_bSummaryShown = true; -} - - -//--------------------------------------------------------- -void MaxwellNonCon2D::ShowMesh() -//--------------------------------------------------------- -{ - //------------------------------------- - // check node sets and connectivity - //------------------------------------- - - if (eModeH == noncon_mode) - { - OutputNodes(false); // volume nodes - OutputNodes(true); // face nodes - } - else - { - // write elements of each polynomial order - ::Output_DG_tris(m_PInfo); - } -} - - -//--------------------------------------------------------- -void MaxwellNonCon2D::Report(bool bForce) -//--------------------------------------------------------- -{ - static bool header_shown = false; - if (1 == tstep && ! header_shown) { - // print header - umLOG(1, "\n step time Ezmin Ezmax\n" - "----------------------------------\n"); - header_shown = true; - } - - if (1 == tstep || !umMOD(tstep,Nreport) || bForce) - { - if (eModeH == noncon_mode) { - umLOG(1, "%5d %7.3lf %8.5lf %8.5lf\n", tstep, time, Ez.min_val(), Ez.max_val()); - } else { - umLOG(1, "%5d %7.3lf %8.5lf %8.5lf\n", tstep, time, Ez.min_val(), Ez.max_val()); - } - } - - //##################################### - // skip field output for timing tests - //##################################### - //return; - - if (!umMOD(tstep,Nrender) || bForce) - { - if (eModeH == noncon_mode) - { - Q_plot.set_col(1, Hx); // load plot data - Q_plot.set_col(2, Hy); - Q_plot.set_col(3, Ez); - OutputVTK(Q_plot, NvtkInterp); - } - else // eModeP - { - Q_plot.set_col(1, Hx); - Q_plot.set_col(2, Hy); - Q_plot.set_col(3, Ez); - Output_DG_sol(m_PInfo, Q_plot); - } - } -} - - -//--------------------------------------------------------- -void MaxwellNonCon2D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - this->Report(true); - - // exactEz = sin(mmode*pi*x).*sin(nmode*pi*y); - // maxabserror = max(max(abs(Ez-exactEz))) - - // report work times (in seconds) - if (eModeH == noncon_mode) { - umLOG(1, "\n time for NDG work : %12.2lf secs\n", time_work); - umLOG(1, " time for RHS base : %12.2lf secs\n", time_rhs); - umLOG(1, " time for RHS H-non : %12.2lf secs\n", time_rhs_H); - umLOG(1, " time for main loop : %12.2lf secs\n\n", time_total); - } else { - umLOG(1, "\n time for NDG work : %12.2lf secs\n", time_work); - umLOG(1, " time for RHS P-non : %12.2lf secs\n", time_rhs_P); - umLOG(1, " time for main loop : %12.2lf secs\n\n", time_total); - } -} - - -//--------------------------------------------------------- -void Output_DG_tris(const PInfoV& pinfo) -//--------------------------------------------------------- -{ - int Nverts=0, Ncells=0, n=0,i=0,k=0; - int Nmax = (int)pinfo.size() - 1; - for (n=1; n<=Nmax; ++n) { - if (pinfo[n]->K>0) { - Nverts += pinfo[n]->x.size(); - Ncells += pinfo[n]->tri.num_rows(); - } - } - - if (Nverts<3 || Ncells<1) { - umMSG(1, "OutputDGTris: no data to plot\n"); - return; - } - - // manage output file - char fdataname[BUFSIZ]; - sprintf(fdataname, "dg_tri_%d.vtk", Ncells); - FILE *fp = fopen(fdataname, "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", fdataname); - return; - } - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nDG node connectivity"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", Nverts); - - int offs=0; IVec offset(Nmax+1); - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - // trisurf(pinfo(N).tri, pinfo(N).x, pinfo(N).y, Ez(pinfo(N).ids)); - for (n=1; n<=Nmax; ++n) { - if (pinfo[n]->K>0) { - const DMat &X=pinfo[n]->x, &Y=pinfo[n]->y; - int Nv = X.size(); - offs += Nv; offset(n+1) = offs; - for (i=1; i<=Nv; ++i) { - fprintf(fp, "\n%20.12e %20.12e 0.00", X(i), Y(i)); - } - } else { - // no elements at order N=n, so just update the offset array - offset(n+1) = offset(n); - } - } - - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", Ncells, 4*Ncells); - - int max_id=0; - for (n=1; n<=Nmax; ++n) { - if (pinfo[n]->K>0) { - offs = offset(n); - const IMat &tris=pinfo[n]->tri; - int Nc = tris.num_rows(); - for (k=1; k<=Nc; ++k) { - fprintf(fp, "\n3 %5d %5d %5d", - tris(k,1)-1+offs, - tris(k,2)-1+offs, - tris(k,3)-1+offs); - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d\n", Ncells); - for (int k=0; kK>0) { - Nverts += pinfo[n]->x.size(); - Ncells += pinfo[n]->tri.num_rows(); - } - } - - if (Nverts<3 || Ncells<1) { - umMSG(1, "OutputDGTris: no data to plot\n"); - return; - } - - // manage output file - char fdataname[BUFSIZ]; -//sprintf(fdataname, "dg_sol_%d_%04d.vtk", Ncells, cnt); - sprintf(fdataname, "dg_sol_%04d.vtk", cnt); - FILE *fp = fopen(fdataname, "w"); - if (!fp) { - umLOG(1, "Could no open %s for output!\n", fdataname); - return; - } - - //------------------------------------- - // 1. Write the VTK header details - //------------------------------------- - fprintf(fp, "# vtk DataFile Version 2"); - fprintf(fp, "\nDG node connectivity"); - fprintf(fp, "\nASCII"); - fprintf(fp, "\nDATASET UNSTRUCTURED_GRID\n"); - fprintf(fp, "\nPOINTS %d double", Nverts); - - int offs=0; IVec offset(Nmax+1); - - //------------------------------------- - // 2. Write the vertex data - //------------------------------------- - // trisurf(pinfo(N).tri, pinfo(N).x, pinfo(N).y, Ez(pinfo(N).ids)); - for (n=1; n<=Nmax; ++n) { - if (pinfo[n]->K>0) { - const DMat &X=pinfo[n]->x, &Y=pinfo[n]->y; - int Nv = X.size(); - offs += Nv; offset(n+1) = offs; - for (i=1; i<=Nv; ++i) { - fprintf(fp, "\n%20.12e %20.12e 0.00", X(i), Y(i)); - } - } else { - // no elements at order N=n, so just update the offset array - offset(n+1) = offset(n); - } - } - - - //------------------------------------- - // 3. Write the element connectivity - //------------------------------------- - - // Number of indices required to define connectivity - fprintf(fp, "\n\nCELLS %d %d", Ncells, 4*Ncells); - - int max_id=0; - for (n=1; n<=Nmax; ++n) { - if (pinfo[n]->K>0) { - offs = offset(n); - const IMat &tris=pinfo[n]->tri; - int Nc = tris.num_rows(); - for (k=1; k<=Nc; ++k) { - fprintf(fp, "\n3 %5d %5d %5d", - tris(k,1)-1+offs, - tris(k,2)-1+offs, - tris(k,3)-1+offs); - } - } - } - - - //------------------------------------- - // 4. Write the cell types - //------------------------------------- - - // For each element (cell) write a single integer - // identifying the cell type. The integer should - // correspond to the enumeration in the vtk file: - // /VTK/Filtering/vtkCellType.h - - fprintf(fp, "\n\nCELL_TYPES %d\n", Ncells); - for (int k=0; kRHS_base(); - - // 1.2 Restore original boundary node lists - mapB = savemapB; vmapB = savevmapB; - - int k1=0,k2=0; double lnx=0.0,lny=0.0; - - DVec ldHx,ldHy,ldEz, lndotdH,fluxHx,fluxHy,fluxEz; - - //--------------------------- - double t1 = timer.read(); - //--------------------------- - - // 2.0 Correct lifted fluxes at each non-conforming face fragment - for (int n=1; n<=Nnoncon; ++n) - { - const FInfo& neigh = (*m_FInfo[n]); - - // 2.1 Extract information about this non-conforming face fragment - k1=neigh.elmtM; k2=neigh.elmtP; lnx=neigh.nx; lny=neigh.ny; - const DMat &gVM=neigh.gVM, &gVP=neigh.gVP; - - // 2.2 Compute difference of traces at Gauss nodes on face fragment - ldHx = gVM*Hx(All,k1) - gVP*Hx(All,k2); - ldHy = gVM*Hy(All,k1) - gVP*Hy(All,k2); - ldEz = gVM*Ez(All,k1) - gVP*Ez(All,k2); - - // 2.3 Compute flux terms at Gauss nodes on face fragment - lndotdH = lnx*ldHx + lny*ldHy; - fluxHx = lny*ldEz + lnx*lndotdH - ldHx; - fluxHy = -lnx*ldEz + lny*lndotdH - ldHy; - fluxEz = -lnx*ldHy + lny*ldHx - ldEz; - - // 2.4 Lift fluxes for non-conforming face fragments and update residuals - const DMat& lift = neigh.lift; - rhsHx(All,k1) += 0.5*(lift*fluxHx); - rhsHy(All,k1) += 0.5*(lift*fluxHy); - rhsEz(All,k1) += 0.5*(lift*fluxEz); - } - - //--------------------------- - time_rhs_H += timer.read() - t1; - //--------------------------- -} - - -//--------------------------------------------------------- -void MaxwellNonCon2D::RHS_P() -//--------------------------------------------------------- -{ - //--------------------------- - double t3 = timer.read(); - //--------------------------- - - // function [rhsHx, rhsHy, rhsEz] = MaxwellPNonConRHS2D(pinfo, Hx,Hy,Ez) - // Purpose : Evaluate RHS flux in 2D Maxwell TM form - - // For each possible polynomial order - for (N=1; N<=Nmax; ++N) - { - // Extract information for this polynomial order - const PInfo& pinf = *(m_PInfo[N]); - - K = pinf.K; - - // Check to see if any elements of this order exist - if (K>0) { - - // Find location of N'th order nodes - const IMat &ids=pinf.ids, &Fmask=pinf.Fmask; int Nr=0,Nc=0; - DMat dR, dHxdr,dHydr,dEzdr, dHxds,dHyds,dEzds, dHxdy,dHydx,dEzdx,dEzdy; - - - // Extract N'th order nodes - DMat HxN=Hx.get_map(ids), HyN=Hy.get_map(ids), EzN=Ez.get_map(ids); - - // Extract '-' traces of N'th order nodal data - DMat HxM=HxN(Fmask,All), HyM=HyN(Fmask,All), EzM=EzN(Fmask,All); - - // Storage for '+' traces - HxM.size(Nr,Nc); DMat HxP(Nr,Nc), HyP(Nr,Nc), EzP(Nr,Nc); - - // For each possible order - for (int N2=1; N2<=Nmax; ++N2) { - - // Check to see if any neighbor nodes of this order were located - if ( pinf.fmapM[N2].length() > 0) { - - // L2 project N2'th order neighbor data onto N'th order trace space - const DMat& interp = pinf.interpP[N2]; - const IVec& fmapM = pinf.fmapM[N2]; - const IMat& vmapP = pinf.vmapP[N2]; - - HxP(fmapM) = interp*Hx.get_map(vmapP); - HyP(fmapM) = interp*Hy.get_map(vmapP); - EzP(fmapM) = interp*Ez.get_map(vmapP); - } - } - - // Compute jumps of trace data at faces - dHx = HxM-HxP; dHy = HyM-HyP; dEz = EzM-EzP; - - if (pinf.mapW.size() > 0) { - // Apply PEC boundary condition at wall boundary faces - dHx(pinf.mapW) = 0.0; - dHy(pinf.mapW) = 0.0; - dEz(pinf.mapW) = 2.0*EzM(pinf.mapW); - } - - // evaluate jump in incoming characteristic variable - dR = -pinf.ny.dm(dHx) + pinf.nx.dm(dHy) + dEz; - - // Compute flux terms - fluxHx = pinf.ny.dm(dR); - fluxHy = -pinf.nx.dm(dR); - fluxEz = -dR; - - // Evaluate local derivatives of fields - dHxdr = pinf.Dr*HxN; dHxds = pinf.Ds*HxN; - dHydr = pinf.Dr*HyN; dHyds = pinf.Ds*HyN; - dEzdr = pinf.Dr*EzN; dEzds = pinf.Ds*EzN; - - // Compute physical derivatives of fields - dHxdy = pinf.ry.dm(dHxdr) + pinf.sy.dm(dHxds); - dHydx = pinf.rx.dm(dHydr) + pinf.sx.dm(dHyds); - dEzdx = pinf.rx.dm(dEzdr) + pinf.sx.dm(dEzds); - dEzdy = pinf.ry.dm(dEzdr) + pinf.sy.dm(dEzds); - - // Compute right hand sides of the PDE's - rhsHx(ids) = -dEzdy + pinf.LIFT*(pinf.Fscale.dm(fluxHx))/2.0; - rhsHy(ids) = dEzdx + pinf.LIFT*(pinf.Fscale.dm(fluxHy))/2.0; - rhsEz(ids) = dHydx - dHxdy + pinf.LIFT*(pinf.Fscale.dm(fluxEz))/2.0; - } - } - - //--------------------------- - time_rhs_P += timer.read() - t3; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Run.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Run.cpp deleted file mode 100644 index d724c6e..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Run.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// MaxwellNonCon2D_Run.cpp -// -// 2007/08/04 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "MaxwellNonCon2D.h" - - -//--------------------------------------------------------- -void MaxwellNonCon2D::Run() -//--------------------------------------------------------- -{ - // function [Hx,Hy,Ez] = MaxwellPNonCon2D(pinfo, Hx, Hy, Ez, FinalTime) - // function [Hx,Hy,Ez] = MaxwellHNonCon2D(Hx, Hy, Ez, FinalTime) - // - // Purpose : Integrate TM-mode Maxwell's until FinalTime - // starting with initial conditions Hx,Hy,Ez - - - //------------------------------------- - // prepare simulation - //------------------------------------- - InitRun(); - - if (1) { - ShowMesh(); // dump mesh to file, - Report(true); // show initial conditions - } - - // start timing - ti0=timer.read(); - - //------------------------------------- - // outer time step loop - //------------------------------------- - while (time FinalTime) { dt = FinalTime-time; } - - for (int INTRK=1; INTRK<=5; ++INTRK) { - - // compute right hand side of TM-mode Maxwell's equations - this->RHS(); - - // initiate and increment Runge-Kutta residuals - resHx *= rk4a(INTRK); resHx += dt*rhsHx; - resHy *= rk4a(INTRK); resHy += dt*rhsHy; - resEz *= rk4a(INTRK); resEz += dt*rhsEz; - - // update fields - Hx += rk4b(INTRK)*resHx; - Hy += rk4b(INTRK)*resHy; - Ez += rk4b(INTRK)*resEz; - } - - time_work += timer.read() - tw1; - - time += dt; // increment current time - Report(); // optional reporting - tstep++; // increment timestep - - //if (tstep>=5) break; - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_H.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_H.cpp deleted file mode 100644 index 5df51b7..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_H.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// MaxwellNonCon2D_Test_H.cpp -// -// 2007/08/04 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "MaxwellNonCon2D.h" - - -//--------------------------------------------------------- -void MaxwellNonCon2D::AdjustMesh_H() -//--------------------------------------------------------- -{ - umMSG(1, "Adjusting mesh for non-conforming (H) elements\n"); - - // make boundary conditions all "Wall" type - BCType = int(BC_Wall) * EToE.eq(outer(Range(1,K),Ones(Nfaces))); - - //-------------------------------------------------- - // create a non-conforming interface by refinement - //-------------------------------------------------- - IVec refineflag(K); - - // 1st test refinement - refineflag(Range(1,5)) = 1; // select elements to refine - Hrefine2D(refineflag); // refine elements {1:5} - StartUp2D(); // rebuild grid and metric - BuildBCMaps2D(); // map boundary faces - - // 2nd test refinement - refineflag.resize(K,true,0); // extend and clear flag array - refineflag(K) = 1; // select elements to refine - Hrefine2D(refineflag); // refine element {K} - StartUp2D(); // rebuild grid and metric - BuildBCMaps2D(); // map boundary faces - - // build face (neighbor) info - BuildHNonCon2D(N+1, 1e-6, m_FInfo); -} diff --git a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_P.cpp b/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_P.cpp deleted file mode 100644 index b568418..0000000 --- a/cpp/nudg++/trunk/Src/Examples2D/MaxwellNonCon2D/MaxwellNonCon2D_Test_P.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// MaxwellNonCon2D_Test_P.cpp -// -// 2007/08/04 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "MaxwellNonCon2D.h" - - -//--------------------------------------------------------- -void MaxwellNonCon2D::AdjustMesh_P() -//--------------------------------------------------------- -{ - umMSG(1, "Adjusting mesh for non-conforming (P) elements\n"); - - Nfaces = 3; - tiConnect2D(EToV, EToE,EToF); - - // make boundary conditions all "Wall" type - BCType = int(BC_Wall) * EToE.eq(outer(Range(1,K),Ones(Nfaces))); - - IVec Norder(K); - - if (1) { - // generate a random order for each element - Norder = ceil(10.0*rand(K)); - } else if (0) { - Norder = 5; - } else { - Norder(1) = 1; - Norder(2) = 1; - Norder(3) = 2; - Norder(4) = 2; - Norder(5) = 3; - Norder(6) = 3; - Norder(Range(7,K)) = 4; - } - - // Build mesh, each element having arbitrary order - BuildPNonCon2D(Norder, K, VX, VY, EToV, BCType, m_PInfo); - - xx.resize(max_pinf_id); - yy.resize(max_pinf_id); - for (int N1=1; N1<=Nmax; ++N1) { - const PInfo& pinf = (*m_PInfo[N1]); - if (pinf.K > 0) { - const IVec& pids = dynamic_cast(pinf.ids); - xx(pids) = pinf.x; - yy(pids) = pinf.y; - } - } -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteBC3D.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteBC3D.cpp deleted file mode 100644 index b9a292c..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteBC3D.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// CouetteBC3D.cpp -// function Q = CouetteBC3D(xin, yin, zin, nxin, nyin, nzin, mapI, mapO, mapW, mapC, t, Q); -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -//--------------------------------------------------------- -void Euler3D::CouetteBC3D -( - const DVec& xi, - const DVec& yi, - const DVec& zi, - const DVec& nxi, - const DVec& nyi, - const DVec& nzi, - const IVec& tmapI, - const IVec& tmapO, - const IVec& tmapW, - const IVec& tmapC, - double ti, - DMat& Qio -) -//--------------------------------------------------------- -{ - //####################################################### - // FIXME: what about top and bottom of 3D annulus? - //####################################################### - - - // gmapB = concat(mapI,mapO,mapW, ...); - // Check for no boundary faces - if (gmapB.size() < 1) { return; } - - // function [Q] = CouetteBC3D(xin, yin, nxin, nyin, mapI, mapO, mapW, mapC, Q, time); - // Purpose: evaluate solution for Couette flow - - // Couette flow (mach .2 at inner cylinder) - // gamma = 1.4; - - int Nr = Qio.num_rows(); DVec rho,rhou,rhov,rhow,Ener; - - // wrap current state data (columns of Qio) - rho.borrow (Nr, Qio.pCol(1)); - rhou.borrow(Nr, Qio.pCol(2)); - rhov.borrow(Nr, Qio.pCol(3)); - rhow.borrow(Nr, Qio.pCol(4)); - Ener.borrow(Nr, Qio.pCol(5)); - - // update boundary nodes of Qio with boundary data - // pre-calculated in function precalc_bdry_data() - - rho (gmapB) = rhoB; - rhou(gmapB) = rhouB; - rhov(gmapB) = rhovB; - rhow(gmapB) = rhowB; - Ener(gmapB) = EnerB; -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteIC3D.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteIC3D.cpp deleted file mode 100644 index 8cabe87..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/CouetteIC3D.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// CouetteIC3D.cpp -// function Q = CouetteIC3D(x, y, z, ti) -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -//--------------------------------------------------------- -void Euler3D::CouetteIC3D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - const DVec& zi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - //####################################################### - // FIXME: what about top and bottom of 3D annulus? - //####################################################### - - - // function [Q] = CouetteIC2D(x, y, time) - // Purpose: evaluat solution for Couette flow - - // gamma = 1.4; - int Nr = Qo.num_rows(); DVec rho,rhou,rhov,rhow,Ener, q1,q2,q3,q4; - - DVec rad2 = sqr(xi) + sqr(yi); - DVec rad = sqrt(rad2); - -#if (1) - // FIXME: atan2(y, 0.0); - DVec xi_fix = xi; - for (int i=1; i<=xi.size(); ++i) { - if (fabs(xi_fix(i))<1e-22) - { - if ( xi_fix(i) >= 0.0 ) - xi_fix(i) = 1e-22; - else xi_fix(i) = -1e-22; - } - } -#endif - -//DVec theta = atan2(yi, xi); - DVec theta = atan2(yi, xi_fix); - DVec utheta = (-rad + 16.0/rad)/75.0; - DVec p = 1.0 + (1.0/SQ(75.0)) * (rad2/2.0 - 32.0*log(rad) - 128.0/rad2); - -#if (0) - // set initial {rho,rhou,rhov,rhow} to steady-state solution - Qo(All,1) = 1.0; - Qo(All,2) = (-sin(theta)).dm(utheta); - Qo(All,3) = ( cos(theta)).dm(utheta); - Qo(All,4) = 0.0; -#else - // set initial {rho,rhou,rhov,rhow} with zero momentum - Qo(All,1) = 1.0; - Qo(All,2) = 0.0; - Qo(All,3) = 0.0; - Qo(All,4) = 0.0; -#endif - - // extract initial {rho,rhou,rhov} from Q(:,1:3) - q1.borrow(Nr,Qo.pCol(1)); - q2.borrow(Nr,Qo.pCol(2)); - q3.borrow(Nr,Qo.pCol(3)); - q4.borrow(Nr,Qo.pCol(4)); - - // use initial {rho,rhou,rhov} to calculate initial {Ener} - Qo(All,5) = p/gm1 + 0.5*(sqr(q2)+sqr(q3)+sqr(q4)).dd(q1); -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D.cpp deleted file mode 100644 index 478ac9b..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D.cpp +++ /dev/null @@ -1,269 +0,0 @@ -// Euler3D.cpp -// member routines for class Euler3D -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -//--------------------------------------------------------- -Euler3D::Euler3D() -//--------------------------------------------------------- -{ - class_name = "Euler3D-TM"; - - // set simulation parameters - gamma = 1.4; - gm1 = gamma - 1.0; - - // toggle use of cut-off filter - m_bApplyFilter = false; -} - - -//--------------------------------------------------------- -Euler3D::~Euler3D() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void Euler3D::Resize() -//--------------------------------------------------------- -{ - // Allocate storage for member arrays - - int Nr = Np*K; // volume arrays - int Nrf = Nfp*Nfaces*K; // face arrays - - // storage for solution, RHS and residual - Q.resize (Np*K, 5); - resQ.resize(Np*K, 5); - rhsQ.resize(Np*K, 5); - - // allocate storage for volume flux data. - // Note: not using high-order cubature nodes - cF.resize(Nr,5); cG.resize(Nr,5); cH.resize(Nr,5); - - QM.resize(Nrf,5); QP.resize(Nrf,5); flux.resize(Nrf,5); - fM.resize(Nrf,5); gM.resize(Nrf,5); hM.resize(Nrf,5); - fP.resize(Nrf,5); gP.resize(Nrf,5); hP.resize(Nrf,5); -} - - -//--------------------------------------------------------- -void Euler3D::SetIC() -//--------------------------------------------------------- -{ - // Set initial conditions for simulation - (this->*InitialSolution)(x, y, z, 0.0, Q); -} - - -//--------------------------------------------------------- -void Euler3D::SetStepSize() -//--------------------------------------------------------- -{ - // function dt = EulerDT3D(Q, gamma) - // purpose: compute the time step dt for the compressible Euler equations - - DVec q1,q2,q3,q4,q5, u,v,w,p,c, rho,rhou,rhov,rhow,Ener; - DVec squvw, Fscale_2,w_speeds; - int Nr = Q.num_rows(); - - // wrap current state data (columns of Q) - q1.borrow(Nr, Q.pCol(1)); q2.borrow(Nr, Q.pCol(2)); - q3.borrow(Nr, Q.pCol(3)); q4.borrow(Nr, Q.pCol(4)); - q5.borrow(Nr, Q.pCol(5)); - - rho = q1(vmapM); rhou = q2(vmapM); rhov = q3(vmapM); rhow = q4(vmapM); Ener = q5(vmapM); - u = rhou.dd(rho); v = rhov.dd(rho); w = rhow.dd(rho); squvw = sqr(u)+sqr(v)+sqr(w); - - p = gm1*(Ener - rho.dm(squvw)/2.0); - c = sqrt(abs(gamma*p.dd(rho))); - - Fscale_2 = 0.5*Fscale; - - w_speeds=SQ(N+1)*Fscale_2.dm(sqrt(squvw)+c); - dt = 1.0/w_speeds.max_val(); - - Nsteps = (int)ceil(FinalTime/dt); - //dt = FinalTime/(double)Nsteps; -} - - -//--------------------------------------------------------- -void Euler3D::PrecalcBdryData() -//--------------------------------------------------------- -{ - - //--------------------------------------------- - // pre-calculate data for IsentropicVortexBC3D - //--------------------------------------------- - if (eIsentropicVortex == sim_type) { - gmapB = concat(mapI, mapO, mapW); - //gxB = m_gauss.x(gmapB); - //gyB = m_gauss.y(gmapB); - gxB = this->Fx(gmapB); - gyB = this->Fy(gmapB); - gzB = this->Fz(gmapB); - } - - //--------------------------------------------- - // pre-calculate data for CouetteBC3D - //--------------------------------------------- - else if (eCouetteFlow == sim_type) { - - //##################################################### - // FIXME: what about top and bottom of 3D annulus? - //##################################################### - gmapB = concat(mapI, mapO); - - //gxB = m_gauss.x(gmapB); - //gyB = m_gauss.y(gmapB); - gxB = this->Fx(gmapB); - gyB = this->Fy(gmapB); - gzB = this->Fz(gmapB); - - -#if (1) - // FIXME: atan2(y, 0.0); - for (int i=1; i<=gxB.size(); ++i) { - if (fabs(gxB(i))<1e-22) - { - if ( gxB(i) >= 0.0 ) - gxB(i) = 1e-22; - else gxB(i) = -1e-22; - } - } -#endif - - - DVec rad2B = sqr(gxB) + sqr(gyB); - DVec radB = sqrt(rad2B); - DVec thetaB = atan2(gyB, gxB); - DVec uthetaB = (-radB + 16.0/radB)/75.0; - DVec pB = 1.0 + (1.0/SQ(75.0)) * (rad2B/2.0 - 32.0*log(radB) - 128.0/rad2B); - - // store constant boundary data - int Nr= gmapB.size(); - rhoB = ones(Nr); - rhouB = (-sin(thetaB)).dm(uthetaB); - rhovB = ( cos(thetaB)).dm(uthetaB); - rhowB.zeros(Nr); - EnerB = pB/gm1 + 0.5*(sqr(rhouB)+sqr(rhovB)+sqr(rhowB)).dd(rhoB); - - } -} - - -//--------------------------------------------------------- -void Euler3D::InitRun() -//--------------------------------------------------------- -{ - StartUp3D(); // construct grid and metric - Resize(); // allocate work arrays - BuildBCMaps3D(); // map boundary nodes - SetIC(); // set initial conditions - SetStepSize(); // calculate step size (dt) - - PrecalcBdryData(); // precalculate any constant BC data - - NDG3D::InitRun(); // base class sets timers/counters - -//Nreport = 10; // set frequency of reporting (param) - Nreport = 20; // set frequency of reporting (param) -//Nreport = 50; // set frequency of reporting (param) -//Nrender = Nreport; // output frequency (param) - Nrender = 100000; // output frequency (param) - - Summary(); // show simulation details -} - - -//--------------------------------------------------------- -void Euler3D::Summary() -//--------------------------------------------------------- -{ - NDG3D::Summary(); -} - - -//--------------------------------------------------------- -void Euler3D::Report(bool bForce) -//--------------------------------------------------------- -{ - if (1 == tstep) { - // print header - //umLOG(1, "\n step time dt min(ro) max(ro) min(En) max(En)\n" - // "----------------------------------------------------------------\n"); - umLOG(1, "\n step time dt min(ro) max(ro) min(En) max(En)\n" - "----------------------------------------------------------------------\n"); - } - - if (!umMOD(tstep,Nreport) || bForce) // || (1==tstep)) - { - double r_min=Q.min_col_val(1), r_max=Q.max_col_val(1); - double e_min=Q.min_col_val(5), e_max=Q.max_col_val(5); - //umLOG(1, "[%4d] %0.4f %0.4f %6.4f %6.4f %6.4f %6.4f\n", - umLOG(1, "[%4d] %0.5lf %0.5lf %8.6lf %8.6lf %8.6lf %8.6lf\n", - tstep,time, dt, r_min, r_max, e_min, e_max); - } - - -#if (0) - //####################################################### - timeanddt = [tstep, time, dt] - %EulerRender3D(Q, gamma, time, ExactSolution); - clf; - subplot(1,2,1); PlotContour3D(N, Q(:,:,1), linspace(.1, .95, 10)); colorbar; axis on; - title(sprintf('Density @ t=%f',time)); drawnow; pause(.05); - - p = (gamma-1)*(Q(:,:,5) - 0.5*(Q(:,:,2).^2+Q(:,:,3).^2+Q(:,:,4).^2)./Q(:,:,1)); - subplot(1,2,2); PlotContour3D(N, p, linspace(-.5, .5, 10)); colorbar; axis on; - title(sprintf('Pressure @ t=%f',time)); drawnow; pause(.05); - - exactQ = feval(ExactSolution, x, y, z, time); - - densError = max(max(abs(exactQ(:,:,1)-Q(:,:,1)))) - momxError = max(max(abs(exactQ(:,:,2)-Q(:,:,2)))) - momyError = max(max(abs(exactQ(:,:,3)-Q(:,:,3)))) - momzError = max(max(abs(exactQ(:,:,4)-Q(:,:,4)))) - enerError = max(max(abs(exactQ(:,:,5)-Q(:,:,5)))) - //####################################################### -#endif - - - if (!umMOD(tstep,Nrender) || bForce) { - -#if (0) - Q_plot = Q; - // extract conserved variables, calculate - // vorticity, and load this as 4th field: - DMat rho, rhou,rhov,rhow, u,v,w, curl; - rho.borrow(Np,K,Q.pCol(1)); rhou.borrow(Np,K,Q.pCol(2)); rhov.borrow(Np,K,Q.pCol(3)); - u = rhou.dd(rho); v = rhov.dd(rho); - Curl3D(u,v,w, curl); - Q_plot(All,5) = curl; - OutputVTK(Q_plot, NvtkInterp); -#elif (0) - OutputVTK(Q, NvtkInterp); -#endif - - } -} - - -//--------------------------------------------------------- -void Euler3D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - //this->Report(true); - - // report work times (in seconds) - umLOG(1, "\n time for NDG work : %12.2lf secs\n", time_work); - umLOG(1, " time for RHS : %12.2lf secs\n", time_rhs); - umLOG(1, " time for main loop : %12.2lf secs\n\n", time_total); -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Driver.cpp deleted file mode 100644 index 3637efa..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Driver.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// Euler3D_Driver.cpp -// Driver script for solving the 3D Euler equations -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -//--------------------------------------------------------- -void Euler3D::Driver() -//--------------------------------------------------------- -{ - umLOG(1, "Euler3D::Driver()\n"); - - // Order of polynomials used for approximation - N = 4; -//N = 6; - N = 8; - - sim_type = eIsentropicVortex; -//sim_type = eCouetteFlow; - - switch (sim_type) { - case eIsentropicVortex: - //FileName = "Grid/3D/cubeK6.neu"; - FileName = "Grid/3D/cubeK268.neu"; - InitialSolution = &Euler3D::IsentropicVortexIC3D; - ExactSolution = &Euler3D::IsentropicVortexIC3D; - BCSolution = &Euler3D::IsentropicVortexBC3D; - m_bApplyFilter = false; // toggle use of filter - break; - - case eCouetteFlow: - //FileName = "Grid/Euler3D/C_18_16_1469.neu"; - FileName = "Grid/Euler3D/C_42_64_3200.neu"; - InitialSolution = &Euler3D::CouetteIC3D; - ExactSolution = &Euler3D::CouetteIC3D; - BCSolution = &Euler3D::CouetteBC3D; - m_bApplyFilter = true; // toggle use of filter - break; - - - default: - umERROR("Euler3D::Driver()", "Simulation case unknown"); - return; - } - - // Read in Mesh: [vertices, elements, materials, BC's] - if (!MeshReaderGambit3D(FileName)) { - umWARNING("Euler3D::Driver", "Error loading mesh (file: %s)\nExiting.\n", FileName.c_str()); - return; - } - - // VX = VX*5; VY = VY*5; VZ = VZ*5; - - try { - // Solve Problem - //FinalTime = 5.0; - FinalTime = 0.1; - Run(); - } catch (...) { - umWARNING("Euler3D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Fluxes.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Fluxes.cpp deleted file mode 100644 index 3b0a15a..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Fluxes.cpp +++ /dev/null @@ -1,97 +0,0 @@ -// EulerFluxes3D.m -// function [F,G,H,rho,u,v,w,p] = EulerFluxes3D(Q, gamma) -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -//--------------------------------------------------------- -void Euler3D::Fluxes(DMat& Qin, DMat& F, DMat& G, DMat& H) -//--------------------------------------------------------- -{ - // function [F,G,H,rho,u,v,w,p] = EulerFluxes3D(Q, gamma) - // Purpose: evaluate primitive variables and Euler flux functions - - DVec q1,q2,q3,q4,q5, u,v,w,p, rho,rhou,rhov,rhow,Ener; - int Nr = Qin.num_rows(); - - // extract conserved variables - rho.borrow (Nr,Qin.pCol(1)); rhou.borrow(Nr,Qin.pCol(2)); - rhov.borrow(Nr,Qin.pCol(3)); rhow.borrow(Nr,Qin.pCol(4)); - Ener.borrow(Nr,Qin.pCol(5)); - - // compute primitive variables - u = rhou.dd(rho); v = rhov.dd(rho); w = rhow.dd(rho); - p = gm1*(Ener - 0.5*(rhou.dm(u) + rhov.dm(v) + rhow.dm(w))); - - // compute flux functions - F(All,1) = rhou; - F(All,2) = rhou.dm(u) + p; - F(All,3) = rhov.dm(u); - F(All,4) = rhow.dm(u); - F(All,5) = u.dm(Ener+p); - - G(All,1) = rhov; - G(All,2) = rhou.dm(v); - G(All,3) = rhov.dm(v) + p; - G(All,4) = rhow.dm(v); - G(All,5) = v.dm(Ener+p); - - H(All,1) = rhow; - H(All,2) = rhou.dm(w); - H(All,3) = rhov.dm(w); - H(All,4) = rhow.dm(w) + p; - H(All,5) = w.dm(Ener+p); -} - - -//--------------------------------------------------------- -void Euler3D::Fluxes -( - DMat& Qin, // [in] - DMat& F, // [out] - DMat& G, // [out] - DMat& H, // [out] - DVec& rho, // [out] - DVec& u, // [out] - DVec& v, // [out] - DVec& w, // [out] - DVec& p // [out] -) -//--------------------------------------------------------- -{ - // function [F,G,H,rho,u,v,w,p] = EulerFluxes(Q, gamma) - // Purpose: evaluate primitive variables and Euler flux functions - - // extract conserved variables - int Nr=Qin.num_rows(); DVec rhou,rhov,rhow, Ener; - rho = Qin(All,1); // deep copy rho for return - rhou.borrow(Nr,Qin.pCol(2)); // but borrow {ru,rv,rw,E} - rhov.borrow(Nr,Qin.pCol(3)); - rhow.borrow(Nr,Qin.pCol(4)); - Ener.borrow(Nr,Qin.pCol(5)); - - // compute primitive variables - u = rhou.dd(rho); v = rhov.dd(rho); w = rhow.dd(rho); - p = gm1*(Ener - 0.5*(rhou.dm(u) + rhov.dm(v) + rhow.dm(w))); - - // compute flux functions - F(All,1) = rhou; - F(All,2) = rhou.dm(u) + p; - F(All,3) = rhov.dm(u); - F(All,4) = rhow.dm(u); - F(All,5) = u.dm(Ener+p); - - G(All,1) = rhov; - G(All,2) = rhou.dm(v); - G(All,3) = rhov.dm(v) + p; - G(All,4) = rhow.dm(v); - G(All,5) = v.dm(Ener+p); - - H(All,1) = rhow; - H(All,2) = rhou.dm(w); - H(All,3) = rhov.dm(w); - H(All,4) = rhow.dm(w) + p; - H(All,5) = w.dm(Ener+p); -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_RHS.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_RHS.cpp deleted file mode 100644 index 137cdf0..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_RHS.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// Euler3D_RHS.m -// function [rhsQ] = EulerRHS3D(Qin,time, ExactSolutionBC); -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - -//--------------------------------------------------------- -void Euler3D::RHS(DMat& Qin, double ti, fp_BC SolutionBC) -//--------------------------------------------------------- -{ - // function [rhsQ] = EulerRHS3D(Qin,time); - // Purpose: Evaluate RHS in 3D Euler equations, discretized - // on weak form with a local Lax-Friedrich flux - - trhs = timer.read(); // time RHS work - - DMat dFdr,dFds,dFdt, dGdr,dGds,dGdt, dHdr,dHds,dHdt; int n=0; - DMat Fn,Gn,Hn,lambda,nflux; DVec rhoM,uM,vM,wM,pM, rhoP,uP,vP,wP,pP; - - // 1. Compute volume contributions (INDEPENDENT OF SURFACE TERMS) - this->Fluxes(Qin, cF,cG,cH); - - // Compute weak derivatives - for (n=1; n<=5; ++n) { - Fn.borrow(Np,K, cF.pCol(n)); Gn.borrow(Np,K, cG.pCol(n)); Hn.borrow(Np,K, cH.pCol(n)); - - dFdr = Drw*Fn; dFds = Dsw*Fn; dFdt = Dtw*Fn; - dGdr = Drw*Gn; dGds = Dsw*Gn; dGdt = Dtw*Gn; - dHdr = Drw*Hn; dHds = Dsw*Hn; dHdt = Dtw*Hn; - - rhsQ(All,n) = - ( rx.dm(dFdr) + sx.dm(dFds) + tx.dm(dFdt) ) + - ( ry.dm(dGdr) + sy.dm(dGds) + ty.dm(dGdt) ) + - ( rz.dm(dHdr) + sz.dm(dHds) + tz.dm(dHdt) ); - } - - // 2. Compute surface contributions - // 2.1 evaluate '-' and '+' traces of conservative variables - int Nr = Qin.num_rows(); DVec Qn("Qn"); - for (n=1; n<=5; ++n) { - Qn.borrow (Nr,Qin.pCol(n)); - QM(All,n) = Qn(vmapM); - QP(All,n) = Qn(vmapP); - } - - // 2.2 set boundary conditions by modifying positive traces - if (SolutionBC) { - (this->*BCSolution)(Fx,Fy,Fz, nx,ny,nz, mapI,mapO,mapW,mapC, ti, QP); - } - - // 2.3 evaluate primitive variables & flux functions at '-' and '+' traces - this->Fluxes(QM, fM,gM,hM, rhoM,uM,vM,wM,pM); - this->Fluxes(QP, fP,gP,hP, rhoP,uP,vP,wP,pP); - - // 2.4 Compute local Lax-Friedrichs/Rusonov numerical fluxes - lambda = max( sqrt(sqr(uM)+sqr(vM)+sqr(wM)) + sqrt(abs(gamma*pM.dd(rhoM))), - sqrt(sqr(uP)+sqr(vP)+sqr(wP)) + sqrt(abs(gamma*pP.dd(rhoP)))); - - lambda.reshape(Nfp, Nfaces*K); - lambda = outer(ones(Nfp), lambda.max_col_vals()); - lambda.reshape(Nfp*Nfaces, K); - - // 2.5 Lift fluxes - for (n=1; n<=5; ++n) { - nflux = - nx.dm(fP(All,n) + fM(All,n)) + - ny.dm(gP(All,n) + gM(All,n)) + - nz.dm(hP(All,n) + hM(All,n)) + - lambda.dm(QM(All,n) - QP(All,n)); - - rhsQ(All,n) -= 0.5*LIFT*(Fscale.dm(nflux)); - } - - time_rhs += (timer.read() - trhs); -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Run.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Run.cpp deleted file mode 100644 index 458c801..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/Euler3D_Run.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// Euler3D_Run.cpp -// function [Q] = Euler3D(Q, FinalTime, ExactSolution, ExactSolutionBC) -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -void Make3DCouetteGeom ( - double r1, int Ntheta1, // inner cylinder - double r2, int Ntheta2, // outer cylinder - double zh, int Nz // height and vert. slices -); - -//--------------------------------------------------------- -void Euler3D::Run() -//--------------------------------------------------------- -{ - // function [rho,rhou,rhov,rhow,Ener] = Euler3D(rho,rhou,rhov,rhow,Ener,FinalTime); - // Purpose : Integrate 3D Euler equations using a 4th order low storage RK - -#if (0) -//Make3DCouetteGeom(1.0, 16, 1.5, 16, 1.0, 1); - Make3DCouetteGeom(1.0, 42, 1.5, 64, 0.5, 1); -//Make3DCouetteGeom(1.0, 8, 1.5, 16, 1.0, 1); - return; -#endif - - ti0=timer.read(); // start timing - InitRun(); // prepare simulation - - int n=0; DMat Qn("Qn"), rhsQn("rhsQn"); - - // Initialize filter? - if (m_bApplyFilter) - { - //m_Filter = Filter3D_cutoff(N, 0.95); - //m_Filter = Filter3D_cutoff(N, 0.90); - - //m_Filter = Filter3D_exp (0, 16.); - m_Filter = Filter3D_exp (3, 10.); - //m_Filter = Filter3D_exp (4, 4.); - //m_Filter = Filter3D_exp (4, 2.); - //m_Filter = Filter3D_exp (0, 6.); - //m_Filter = Filter3D_exp (0, 4.); - //return; - } - - // filter initial solution? - if (m_bApplyFilter) { for(n=1;n<=5;++n) {Qn.borrow(Np,K, Q.pCol(n)); Q(All,n)=m_Filter*Qn;}} - - - //-------------------------------------------------- - // outer time step loop - //-------------------------------------------------- - while (time FinalTime) { dt = FinalTime-time; } - - for (int INTRK=1; INTRK<=5; ++INTRK) { - - //---------------------------------------------- - // compute RHS of compressible Euler equations - //---------------------------------------------- - this->RHS(Q, time, BCSolution); - - // filter residual ? - if (m_bApplyFilter) { for (n=1; n<=5; ++n) { rhsQn.borrow(Np,K, rhsQ.pCol(n)); rhsQ(All,n)=m_Filter*rhsQn; } } - - // initiate and increment Runge-Kutta residuals - resQ *= rk4a(INTRK); resQ += dt*rhsQ; - - // update fields - Q += rk4b(INTRK)*resQ; - } - - time += dt; // increment current time - SetStepSize(); // compute new timestep - - time_work += timer.read() - tw1; // accumulate cost of NDG work - Report(); // optional reporting - ++tstep; // increment timestep - - // if (tstep>=5) break; - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexBC3D.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexBC3D.cpp deleted file mode 100644 index 1c97829..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexBC3D.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// IsentropicVortexBC2D.m -// function Q = IsentropicVortexBC3D(xin, yin, zin, nxin, nyin, nzin, -// mapI, mapO, mapW, t, Q); -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -//--------------------------------------------------------- -void Euler3D::IsentropicVortexBC3D -( - const DVec& xi, - const DVec& yi, - const DVec& zi, - const DVec& nxi, - const DVec& nyi, - const DVec& nzi, - const IVec& tmapI, - const IVec& tmapO, - const IVec& tmapW, - const IVec& tmapC, - double ti, - DMat& Qio -) -//--------------------------------------------------------- -{ - // gmapB = concat(mapI,mapO,mapW); // See Euler3D::Resize() - if (gmapB.size() < 1) { - // no boundary faces - return; - } - - // function [Q] = IsentropicVortexBC3D(xin, yin, zin, nxin, nyin, nzin, mapI, mapO, mapW, Q, time); - // Purpose: Impose boundary conditions on 3D Euler equations on weak form - - // Example is static isentropic vortex - - static DMat Qbc; Qbc.resize(Qio); DVec qn, qbcn; - - - // Load Qbc with IsentropicVortex2D for time=ti - IsentropicVortexIC3D(xi, yi, zi, ti, Qbc); - - // map isentropic vortex values onto boundary nodes - // Note: this loop updates Qio(:,n) in-place: - int Nr=Qio.num_rows(); - for (int n=1; n<=5; ++n) { - qn.borrow (Nr, Qio.pCol(n)); // qn -> Q(:,n) - qbcn.borrow(Nr, Qbc.pCol(n)); - qn(gmapB) = qbcn(gmapB); - } -} \ No newline at end of file diff --git a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexIC3D.cpp b/cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexIC3D.cpp deleted file mode 100644 index 1da00dd..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Euler3D/IsentropicVortexIC3D.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// IsentropicVortexIC3D.m -// function Q = IsentropicVortexIC3D(x, y, z, ti) -// 2007/07/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Euler3D.h" - - -//--------------------------------------------------------- -void Euler3D::IsentropicVortexIC3D -( - const DVec& xi, // [in] - const DVec& yi, // [in] - const DVec& zi, // [in] - double ti, // [in] - DMat& Qo // [out] -) -//--------------------------------------------------------- -{ - // function Q = IsentropicVortexIC3D(x, y, z, ti) - // - // Purpose: compute flow configuration given by - // http://www.cfd-online.com/Wiki/2-D_vortex_in_isentropic_flow - // Y.C. Zhou, G.W. Wei / Journal of Computational Physics 189 (2003) 159 (TW: p96.pdf) - - static DVec u,v,w; DVec xmut, ymvt, rsqr, ex1r, tv1, rho1, p1; - int Nr = Qo.num_rows(); u.resize(Nr); v.resize(Nr); w.resize(Nr); - - // reset static arrays to constant values - u=1.0; v=0.0; w=0.0; - - // base flow parameters - double xo=0.0, yo=0.0, beta=5.0; - double fac = 16.0*gamma*pi*pi; - - xmut = xi - u*ti; ymvt = yi - v*ti; - rsqr = sqr(xmut-xo)+sqr(ymvt-yo); - ex1r = exp(1.0-rsqr); - - // perturbed density - u -= beta * ex1r.dm(ymvt-yo)/(2.0*pi); - v += beta * ex1r.dm(xmut-xo)/(2.0*pi); - w = 0.0; - - tv1 = (1.0-(gm1*SQ(beta)*exp(2.0*(1.0-rsqr))/fac)); - rho1 = pow(tv1, 1.0/gm1); - p1 = pow(rho1, gamma); - - Qo(All,1) = rho1; - Qo(All,2) = rho1.dm(u); - Qo(All,3) = rho1.dm(v); - Qo(All,4) = rho1.dm(w); - Qo(All,5) = p1/gm1 + 0.5*rho1.dm(sqr(u)+sqr(v)+sqr(w)); -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D.cpp b/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D.cpp deleted file mode 100644 index 6c4ded3..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D.cpp +++ /dev/null @@ -1,197 +0,0 @@ -// Maxwell3D.cpp -// member routines for class Maxwell3D -// 2007/06/10 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell3D.h" - - -//--------------------------------------------------------- -Maxwell3D::Maxwell3D() -//--------------------------------------------------------- -{ - class_name = "Maxwell3D-TM"; -} - - -//--------------------------------------------------------- -Maxwell3D::~Maxwell3D() -//--------------------------------------------------------- -{ -} - - -//--------------------------------------------------------- -void Maxwell3D::Resize() -//--------------------------------------------------------- -{ - // Allocate storage for member arrays - - // storage for solution - Hx.resize(Np, K); Hy.resize(Np, K); Hz.resize(Np, K); - Ex.resize(Np, K); Ey.resize(Np, K); Ez.resize(Np, K); - Ezinit.resize(Np, K); - - // Runge-Kutta residual storage - resHx.resize(Np,K); resHy.resize(Np,K); resHz.resize(Np,K); - resEx.resize(Np,K); resEy.resize(Np,K); resEz.resize(Np,K); - - // field differences at faces - int Nr = Nfp*Nfaces; - dHx.resize(Nr,K); dHy.resize(Nr,K); dHz.resize(Nr,K); - dEx.resize(Nr,K); dEy.resize(Nr,K); dEz.resize(Nr,K); - - // storage for output - Q_plot.resize(Np*K, 3); -} - - -//--------------------------------------------------------- -void Maxwell3D::SetIC() -//--------------------------------------------------------- -{ - // Set initial conditions for simulation - - // Set initial conditions - mmode = 1.0; nmode = 1.0; - - // Use TM mode Maxwell's initial condition - - xmode = 1.0; ymode = 1.0; - DVec tsinx = apply(sin, (xmode*pi*x)), - tsiny = apply(sin, (ymode*pi*y)); - - Ezinit = tsinx.dm(tsiny); -//Ezinit = exp(-20.0 * (sqr(x) + sqr(y))); - - Hx=0.0; Hy=0.0; Hz=0.0; - Ex=0.0; Ey=0.0; Ez=Ezinit; -} - - -//--------------------------------------------------------- -void Maxwell3D::SetStepSize() -//--------------------------------------------------------- -{ - // compute time step size (dt) - - dt = dtscale3D(); // TW: buggy - - // correct dt for integer # of time steps - Nsteps = (int)ceil(FinalTime/dt); - dt = FinalTime/(double)Nsteps; -} - - -//--------------------------------------------------------- -void Maxwell3D::InitRun() -//--------------------------------------------------------- -{ - StartUp3D(); // construct grid and metric - Resize(); // allocate work arrays - SetIC(); // set initial conditions - SetStepSize(); // calculate step size (dt) - - int Ns = Nsteps+10; // expected number of samples - sampleEz.resize(Ns); // Ez(t) at sample point - sampleT.resize(Ns); // time for each Ez(t) - - - // just call base class version - NDG3D::InitRun(); - - Nreport = 1; // set frequency of reporting (param) -//Nreport = 50; // set frequency of reporting (param) -//Nrender = Nreport; // output frequency (param) - Nrender = 100000; // output frequency (param) - - Summary(); // show simulation details -} - - -//--------------------------------------------------------- -void Maxwell3D::Summary() -//--------------------------------------------------------- -{ - NDG3D::Summary(); -} - - -//--------------------------------------------------------- -void Maxwell3D::Report(bool bForce) -//--------------------------------------------------------- -{ - if (1 == tstep) { - // print header - //umLOG(1, "\n** Adjust Nreport when timing **\n\n"); - umLOG(1, "\n step time Ezmin Ezmax Ezerr\n" - "--------------------------------------------\n"); - } - - // sample Ez by interpolation - DVec ev = Ez(All,sampletet); - sampleEz(tstep) = inner(sampleweights, ev); - sampleT(tstep) = tstep*dt; - - if (1 == tstep || !umMOD(tstep,Nreport) || bForce || Nsteps == tstep) { - - EzAnal = Ezinit * (cos(pi*sqrt(2.0)*time)); - errEz = Ez - EzAnal; - m_maxAbsError = m_ErrAnalytic.max_val_abs(); - - umLOG(1, "%5d %7.3lf %8.5lf %8.5lf %g\n", - tstep, time, Ez.min_val(), Ez.max_val(), m_maxAbsError); - } - - //##################################### - // skip field output for timing tests - //##################################### - //return; - - - if (!umMOD(tstep,Nrender) || bForce) { - -#if (0) - - DMat MM = trans(invV)*invV; - L2errEz(tstep) = 0.0; - for (k=1:K) { - ev = errEz(All,k); - L2errEz(tstep) += ev*MM*(dm(J(All,k),ev)); - } - - if (!mod(tstep,40)) { - clf; PlotContour3D(2*N, Ez, linspace(-.9, .9, 10)); - drawnow; pause(.02); - } - - //########################################### -#elif (0) - //########################################### - - Q_plot.set_col(1, Hx); // load plot data - Q_plot.set_col(2, Hy); - Q_plot.set_col(3, Ez); - NvtkInterp = 12; // set output resolution - //NvtkInterp = this->N; // set output resolution - OutputVTK(Q_plot, NvtkInterp); - - //########################################### -#endif - - } -} - - -//--------------------------------------------------------- -void Maxwell3D::FinalReport() -//--------------------------------------------------------- -{ - // force report on final step - // this->Report(true); - - // report work times (in seconds) - umLOG(1, "\n time for NDG work : %12.2lf secs\n", time_work); - umLOG(1, " time for RHS : %12.2lf secs\n", time_rhs); - umLOG(1, " time for main loop : %12.2lf secs\n\n", time_total); -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Driver.cpp b/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Driver.cpp deleted file mode 100644 index 7b9483d..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Driver.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// Maxwell3D_Driver.cpp -// Driver for solving the 3D vacuum Maxwell's equations -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell3D.h" - - -//--------------------------------------------------------- -void Maxwell3D::Driver() -//--------------------------------------------------------- -{ - umLOG(1, "Maxwell3D::Driver()\n"); - - // Polynomial order of approximation -//N = 9; -//N = 4; -//N = 5; -//N = 6; -//N = 7; - N = 8; - -//FileName = "Grid/3D/cubeK6.neu"; - FileName = "Grid/3D/cubeK268.neu"; -//FileName = "Grid/Euler3D/C_16_12_1574.neu"; -//FileName = "Grid/Euler3D/C_18_16_1469.neu"; -//FileName = "Grid/Euler3D/C_42_64_3200.neu"; - - // Read in Mesh: [vertices, elements, materials, BC's] - if (!MeshReaderGambit3D(FileName)) { - umWARNING("Maxwell3D::Driver", "Error loading mesh (file: %s)\nExiting.\n", FileName.c_str()); - return; - } - - try { - // Solve Problem - //FinalTime = 10.0; - //FinalTime = 1.0; - FinalTime = 0.1; - Run(); - } catch (...) { - umWARNING("Maxwell3D::Driver", "Caught exception from Run()"); - return; - } -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_RHS.cpp b/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_RHS.cpp deleted file mode 100644 index c5d163e..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_RHS.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// Maxwell2D_RHS.m -// function [rhsHx, rhsHy, rhsHz, rhsEx, rhsEy, rhsEz] = ... -// MaxwellRHS3D(Hx,Hy,Hz,Ex,Ey,Ez) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell3D.h" - -//--------------------------------------------------------- -void Maxwell3D::RHS() -//--------------------------------------------------------- -{ - // function [rhsHx, rhsHy, rhsHz, rhsEx, rhsEy, rhsEz] = ... - // MaxwellRHS3D(Hx,Hy,Hz,Ex,Ey,Ez) - // Purpose : Evaluate RHS flux in 3D Maxwell equations - - //--------------------------- - double t1 = timer.read(); - //--------------------------- - - // form field differences at faces - dHx = Hx(vmapP)-Hx(vmapM); dEx = Ex(vmapP)-Ex(vmapM); - dHy = Hy(vmapP)-Hy(vmapM); dEy = Ey(vmapP)-Ey(vmapM); - dHz = Hz(vmapP)-Hz(vmapM); dEz = Ez(vmapP)-Ez(vmapM); - - // make boundary conditions all reflective (Ez+ = -Ez-) - dHx(mapB) = 0.0; dEx(mapB) = -2.0*Ex(vmapB); - dHy(mapB) = 0.0; dEy(mapB) = -2.0*Ey(vmapB); - dHz(mapB) = 0.0; dEz(mapB) = -2.0*Ez(vmapB); - - alpha=1.0; // => full upwinding - - ndotdH = nx.dm(dHx) + ny.dm(dHy) + nz.dm(dHz); - ndotdE = nx.dm(dEx) + ny.dm(dEy) + nz.dm(dEz); - - fluxHx = -ny.dm(dEz) + nz.dm(dEy) + alpha*(dHx - ndotdH.dm(nx)); - fluxHy = -nz.dm(dEx) + nx.dm(dEz) + alpha*(dHy - ndotdH.dm(ny)); - fluxHz = -nx.dm(dEy) + ny.dm(dEx) + alpha*(dHz - ndotdH.dm(nz)); - - fluxEx = ny.dm(dHz) - nz.dm(dHy) + alpha*(dEx - ndotdE.dm(nx)); - fluxEy = nz.dm(dHx) - nx.dm(dHz) + alpha*(dEy - ndotdE.dm(ny)); - fluxEz = nx.dm(dHy) - ny.dm(dHx) + alpha*(dEz - ndotdE.dm(nz)); - - // evaluate local spatial derivatives - Curl3D(Hx,Hy,Hz, curlHx,curlHy,curlHz); - Curl3D(Ex,Ey,Ez, curlEx,curlEy,curlEz); - - // calculate Maxwell's right hand side - rhsHx = -curlEx + LIFT*(Fscale.dm(fluxHx)/2.0); - rhsHy = -curlEy + LIFT*(Fscale.dm(fluxHy)/2.0); - rhsHz = -curlEz + LIFT*(Fscale.dm(fluxHz)/2.0); - - rhsEx = curlHx + LIFT*(Fscale.dm(fluxEx)/2.0); - rhsEy = curlHy + LIFT*(Fscale.dm(fluxEy)/2.0); - rhsEz = curlHz + LIFT*(Fscale.dm(fluxEz)/2.0); - - //--------------------------- - time_rhs += timer.read() - t1; - //--------------------------- -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Run.cpp b/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Run.cpp deleted file mode 100644 index 395b82a..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/Maxwell3D/Maxwell3D_Run.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// Maxwell3D.m -// function [Hx,Hy,Hz,Ex,Ey,Ez,sampleEz,sampleT,L2errEz] = -// Maxwell3D(Hx, Hy, Hz, Ex, Ey, Ez, FinalTime) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Maxwell3D.h" - -//--------------------------------------------------------- -void Maxwell3D::Run() -//--------------------------------------------------------- -{ - // function [Hx,Hy,Hz,Ex,Ey,Ez,sampleEz,sampleT] = ... - // Maxwell3D(Hx, Hy, Hz, Ex, Ey, Ez, FinalTime) - // - // Purpose : Integrate 3D Maxwell's until FinalTime starting with - // initial conditions Hx,Hy,Hz, Ex,Ey,Ez - - ti0=timer.read(); // start timing - InitRun(); // prepare simulation - -#if (0) - OutputNodes(false); - OutputNodes(true); - return; -#endif - - - // sample point -//Sample3D(0.1, 0.2, 0.3, sampleweights, sampletet); - Sample3D(1.25, 0.0, 0.25, sampleweights, sampletet); - - - // outer time step loop - while (time FinalTime) { dt = FinalTime-time; } - - // inner multi-stage Runge-Kutta loop - for (int INTRK=1; INTRK<=5; ++INTRK) { - - // compute right hand side of TM-mode Maxwell's equations - //[rhsHx, rhsHy, rhsHz, rhsEx, rhsEy, rhsEz] = - this->RHS(); // (Hx,Hy,Hz, Ex, Ey, Ez); - - // initiate, increment Runge-Kutta residuals and update fields - resHx *= rk4a(INTRK); resHx += dt*rhsHx; - resHy *= rk4a(INTRK); resHy += dt*rhsHy; - resHz *= rk4a(INTRK); resHz += dt*rhsHz; - resEx *= rk4a(INTRK); resEx += dt*rhsEx; - resEy *= rk4a(INTRK); resEy += dt*rhsEy; - resEz *= rk4a(INTRK); resEz += dt*rhsEz; - - Hx += rk4b(INTRK)*resHx; - Hy += rk4b(INTRK)*resHy; - Hz += rk4b(INTRK)*resHz; - - Ex += rk4b(INTRK)*resEx; - Ey += rk4b(INTRK)*resEy; - Ez += rk4b(INTRK)*resEz; - } - - time_work += timer.read() - tw1; - - time += dt; // increment current time - Report(); // optional reporting - tstep++; // increment timestep - - if (tstep>=10) {break;} - } - - time_total = timer.read()-ti0; // stop timing - FinalReport(); // final report -} diff --git a/cpp/nudg++/trunk/Src/Examples3D/TestPoissonIPDG3D/TestPoissonIPDG3D.cpp b/cpp/nudg++/trunk/Src/Examples3D/TestPoissonIPDG3D/TestPoissonIPDG3D.cpp deleted file mode 100644 index 0dcd772..0000000 --- a/cpp/nudg++/trunk/Src/Examples3D/TestPoissonIPDG3D/TestPoissonIPDG3D.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// TestPoissonIPDG3D.cpp -// Driver script for solving the 3D Poisson equation -// 2007/10/16 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "TestPoissonIPDG3D.h" - - -//--------------------------------------------------------- -void TestPoissonIPDG3D::Driver() -//--------------------------------------------------------- -{ - umLOG(1, "TestPoissonIPDG3D::Driver()\n"); - - // polynomial order to use in each element -//N = 3; - N = 4; -//N = 5; - N = 6; - - //------------------------------------------------------- - // Generate Mesh - // figure(1); h = .33; - // [Nv, VX, VY, VZ, K, EToV] = MeshGenDistMesh3D(h); - //------------------------------------------------------- -//FileName = "Grid/3D/Sphere_0448.neu"; -//FileName = "Grid/3D/Sphere_1074.neu"; - FileName = "Grid/3D/F072.neu"; -//FileName = "Grid/3D/cubeK6.neu"; -//FileName = "Grid/3D/cubeK268.neu"; -//FileName = "Grid/3D/cubeK1585.neu"; - //------------------------------------------------------- - - // Read in Mesh: [vertices, elements, materials, BC's] - if (!MeshReaderGambit3D(FileName)) { - umWARNING("TestPoissonIPDG3D::Driver", "Error loading mesh (file: %s)\nExiting.\n", FileName.c_str()); - return; - } - - try { - Run(); - } catch (...) { - umWARNING("TestPoissonIPDG3D::Driver", "Caught exception from Run()"); - return; - } -} - - -//--------------------------------------------------------- -void TestPoissonIPDG3D::Run() -//--------------------------------------------------------- -{ - umLOG(1, "TestPoissonIPDG3D::Run()\n"); - double wt1=timer.read(); - - // Initialize solver and construct grid and metric - StartUp3D(); - -#if (0) - //------------------------------------- - // check the mesh - //------------------------------------- - Output_Mesh(); - umLOG(1, "\n*** Exiting after writing mesh\n\n"); - return; -#endif - - // sparse operators - CSd A("OP"), M("MM"); - - // build 3D IPDG Poisson matrix (assuming all Dirichlet) - PoissonIPDG3D(A, M); - - if (0) { - // NBN: experiment with diagonal strength - int Nz=0; - for (int j=0; j - -// for debug printing {DM,IM} and {DV,IV} arrays -#include "MatObj_Type.h" -#include "VecObj_Type.h" - - -// free unused allocations in the array registries -//--------------------------------------------------------- -void NDG_garbage_collect() -//--------------------------------------------------------- -{ - DVec dv; dv.compact(); umTRC(2, "*** compacted *** \n"); - IVec iv; iv.compact(); umTRC(2, "*** compacted *** \n"); -} - - -// return n! as a double -//--------------------------------------------------------- -double gamma(int n) -//--------------------------------------------------------- -{ - assert (n>=1); - double tmp = factorial(n-1); - return tmp; -} - - -// Returns log(gamma(x)) for x > 0. -//--------------------------------------------------------- -double lgamma(const double x) -//--------------------------------------------------------- -{ - assert (x>0.0); - static double cof[6] = { - 76.18009172947146, - -86.50532032941677, - 24.01409824083091, - -1.231739572450155, - 0.1208650973866179e-2, - -0.5395239384953e-5}; - - double z=x, y=x, tmp=x+5.5; - tmp -= (z+0.5)*log(tmp); - double ser = 1.000000000190015; - for (int j=0; j<=5; ++j) { - ser += cof[j]/++y; - } - - return -tmp+log(2.5066282746310005*ser/z); -} - - -// Returns gamma(x) for x > 0. -//--------------------------------------------------------- -double gamma(const double x) -//--------------------------------------------------------- -{ - assert (x>0.0); // check input valid - int ix = int(x); // check for integral arg - if (x == ix) { // handle integer cases, - return gamma(ix); // gamma(n) = factorial(n-1) - } else { - double tmp = lgamma(x); // calculate lgamma(x) - assert (tmp < log(DBL_MAX)); // check for overflow - return exp(tmp); // exponentiate - } -} - - -//--------------------------------------------------------- -double factorial(int n) -//--------------------------------------------------------- -{ - static int ntop=6; - static double a[33] = { - // table of precalculated results. - // 0! 1! 2! 3! 4! 5! 6! - 1.0, 1.0, 2.0, 6.0, 24.0, 120.0, 720.0 }; - - int j=0; - assert (n>=0); - - // Note: large values will overflow - if (n>32) { - return exp(lgamma(double(n+1.0))); - } - - // Manage a table of results. Both ntop and a[] - // are static, so multiple calls reuse results. - - while (ntopidentity(N); - return (*tmp); -} - - -// v = rand(N); -//--------------------------------------------------------- -DVec& rand(int N) -//--------------------------------------------------------- -{ - DVec *tmp=new DVec(N, "rand(N)", OBJ_temp); - tmp->randomize(0.0, 1.0); - return (*tmp); -} - - -// A = rand(M,N); -//--------------------------------------------------------- -DMat& rand(int M, int N) -//--------------------------------------------------------- -{ - DMat *tmp=new DMat(M,N, "rand(M,N)", OBJ_temp); - tmp->randomize(0.0, 1.0); - return (*tmp); -} - - -//--------------------------------------------------------- -IVec& ceil(const DVec& V) -//--------------------------------------------------------- -{ - int N = V.length(); - IVec *tmp=new IVec(N, "ceil(V)", OBJ_temp); - for (int i=1; i<=N; ++i) { - (*tmp)(i) = (int) (::ceil(V(i))); - } - if (V.get_mode() == OBJ_temp) { delete (&V); } - return (*tmp); -} - - -//--------------------------------------------------------- -// Matlab "intersect" operation -//--------------------------------------------------------- -IVec& intersect(const IVec& A, const IVec& B) -{ - // return integer values contained in both - // A and B, sorted and without duplicates - IVec *tmp = new IVec("(A)&(B)", OBJ_temp); - - int Na=A.size(), Nb=B.size(), i=0, val=0, sk=0; - if (Na<1 || Nb<1) { - // degenerate case: one array is empty - tmp->resize(0); - } - else - { - typedef std::set::iterator SetIt; - - // sort and remove duplicates from A and B by loading into sets - std::set sA, sB, sC; - for (i=1; i<=Na; ++i) {sA.insert(A(i));} int lenA = (int) sA.size(); - for (i=1; i<=Nb; ++i) {sB.insert(B(i));} int lenB = (int) sB.size(); - - // Use set "C" to store unique values from the - // smaller set which also occur in larger set - SetIt it, it2; - if (lenA <= lenB) { - //--------------------------------- - // find values in A that occur in B - //--------------------------------- - for (it=sA.begin(); it!=sA.end(); it++) { - val = (*it); - it2=sB.find(val); - if (it2 != sB.end()) { - sC.insert(val); - } - } - } else { - //--------------------------------- - // find values in B that occur in A - //--------------------------------- - for (it=sB.begin(); it!=sB.end(); it++) { - val = (*it); - it2=sA.find(val); - if (it2 != sA.end()) { - sC.insert(val); - } - } - } - - int lenC = (int) sC.size(); tmp->resize(lenC); - for (it=sC.begin(), sk=1; it!=sC.end(); it++, sk++) { - (*tmp)(sk) = (*it); - } - } - if (A.get_mode() == OBJ_temp) { delete (&A); } - if (B.get_mode() == OBJ_temp) { delete (&B); } - return (*tmp); -} - - - -//--------------------------------------------------------- -bool isInf(const DVec& V) -//--------------------------------------------------------- -{ - for (int i=1; i<=V.size(); ++i) { - - double Vi = V(i); - if (isinf(Vi)) { - return true; // v has a non-finite element - } - } - return false; // all elements are finite -} - - -//--------------------------------------------------------- -bool file_exists(string& fname) -//--------------------------------------------------------- -{ - FILE *fp = fopen(fname.c_str(), "r"); - if (!fp) { - return false; - } else { - fclose(fp); - return true; - } -} - - -// check if "bc_name" contains "szbc" -//--------------------------------------------------------- -bool match_BC(string& bc_name, const char* szbc) -//--------------------------------------------------------- -{ - using std::string; - - // trim - string sn = trim(bc_name.c_str()); - string st = trim(szbc); - - // convert to lower case - makelower(sn); - makelower(st); - - if (sn.find(st.c_str()) != string::npos) - return true; - - return false; -} - - - -//--------------------------------------------------------- -// debug utilities: print arrays to the MSG file -//--------------------------------------------------------- - -// bump up details -void dumpDMat2(const DMat& M, const char* s) { - M.print(g_MSGFile, s, "E", 2, 10, 101,0,100); -} - - -// Numerical {DMat,IMat} and {DVec,IVec} -void dumpDMat(const DMat& M, const char* s) { M.print(g_MSGFile, s, "lf", 4, 8, 51,0,50); } -void dumpIMat(const IMat& M, const char* s) { M.print(g_MSGFile, s, "d", 0, 4, 51,0,50); } - -void dumpDVec(const DVec& V, const char* s) { V.print(g_MSGFile, s, "lf", 4, 8, true); } -void dumpIVec(const IVec& V, const char* s) { V.print(g_MSGFile, s, "d", 0, 4, true); } - -void dumpIMap(const IMap& V, const char* s) { V.print(g_MSGFile, s, "d", 0, 4, true); } - - -// simple {DM,IM} and {DV,IV} arrays -void dumpDM(const DM& A, const char* s) { - DMat M; M.load(A.num_rows(),A.num_cols(), A.data()); - M.print(g_MSGFile, s, "lf", 4, 8, 51,0,50); -} -void dumpIM(const IM& A, const char* s) { - IMat M; M.load(A.num_rows(),A.num_cols(), A.data()); - M.print(g_MSGFile, s, "d", 0, 4, 51,0,50); -} - -void dumpDV(const DV& X, const char* s) { - DVec V; V.copy(X.size(), X.data()); - V.print(g_MSGFile, s, "lf", 4, 8, true); -} -void dumpIV(const IV& X, const char* s) { - IVec V; V.copy(X.size(), X.data()); - V.print(g_MSGFile, s, "d", 0, 4, true); -} - - - -//--------------------------------------------------------- -// special functions -//--------------------------------------------------------- -#ifdef _MSC_VER -#define _jn jn -#endif - -DVec& besselj(int N, const DVec& X) -{ - char buf[22]={""}; - snprintf(buf, (size_t)20, "besselj(%d)", N); - int len = X.size(); - DVec* tmp = new DVec(len, 0.0, OBJ_temp, buf); - for (int i=1; i<=len; ++i) { - (*tmp)(i) = jn(N, X(i)); - } - - if (X.get_mode() == OBJ_temp) { delete (&X); } - - return (*tmp); -} - - -#ifdef _MSC_VER -#undef jn -#endif - - -// tex "table" output -//--------------------------------------------------------- -void textable -( - string& capt, - FILE* fid, - string* titles, - DMat& entries, - string* form -) -//--------------------------------------------------------- -{ - int Nrows=entries.num_rows(), Ncols=entries.num_cols(), n=0,m=0; - - fprintf(fid, "\\begin{table} \n"); - fprintf(fid, "\\caption{%s} \n", capt.c_str()); - - fprintf(fid, "\\begin{center} \n"); - fprintf(fid, "\\begin{tabular}{|"); - for (n=1; n<=Ncols; ++n) { - fprintf(fid, "c|"); - if (2==n) { - fprintf(fid, "|"); - } - } - fprintf(fid, "} \\hline \n "); - - for (n=1; n<=(Ncols-1); ++n) { - fprintf(fid, "%s & ", titles[n].c_str()); - } - fprintf(fid, " %s \\\\ \\hline \n ", titles[Ncols].c_str()); - - for (m=1; m<=Nrows; ++m) { - for (n=1; n<=(Ncols-1); ++n) { - fprintf(fid, form[n].c_str(), entries(m,n)); fprintf(fid, " & "); - } - if (m show most - g_MSG_FLAG = 4; // [0:10] 5 -> show most - g_TRC_FLAG = 5; // [0:10] 1 -> show crucial -#else - g_LOG_FLAG = 1; // [0:10] 5 -> show most - g_MSG_FLAG = 1; // [0:10] 5 -> show most - g_TRC_FLAG = 1; // [0:10] 1 -> show crucial -#endif - - - try { - - // Clear existing data - FreeGlobalInfo(); - bInitial = false; - - srand((unsigned)time(NULL)); // seed random number system - - //------------------------------------------------ - // Assume: sequence of initialization matters. - //------------------------------------------------ - InitLogBuffers(); // 1: logging subsystem - InitCmdLineArgs(); // 2: command line args -#if (THIS_IS_READY) - InitPDEWizInfo(); // 4: PDE-Wizard parameters -#endif - } - catch (...) { - printf("\n\n>>> Caught exception from InitGlobalInfo() <<<\n\n"); - return false; - } - - return true; -} - - -//--------------------------------------------------------- -void FreeGlobalInfo() -//--------------------------------------------------------- -{ - // Delete global data objects - -#if (THIS_IS_READY) - - if (g_Info_PDEWiz) { // 4: PDE-Wiz info - delete g_Info_PDEWiz; - g_Info_PDEWiz = NULL; - } - -#endif - - - // g_Info_PDEWiz writes messages during dtor, - // so delete message buffers AFTER the above! - - if (g_LOGFile) { fclose(g_LOGFile); g_LOGFile = NULL; } - if (g_MSGFile) { fclose(g_MSGFile); g_MSGFile = NULL; } - - // Expression compiler logs - if (EC_fout) { fclose(EC_fout); EC_fout = NULL; } - if (EC_ferr) { fclose(EC_ferr); EC_ferr = NULL; } - - CloseTraceFile(); -} - - -// -// TODO: Use atexit() to register this routine. -// -// -// bool umGUIApp::OnInit(void) -// { -// // Global access -// theApp = this; -// -// atexit(CloseTraceFile); -// ... -// } -// - -///--------------------------------------------------------- -void CloseTraceFile() -//--------------------------------------------------------- -{ - -#if (0) - //------------------------------------- - // Check state of array registries - //------------------------------------- - DVec A( 10, "Sml. RegDump"); - DVec B( 200, "Med. RegDump"); - DVec C(1000, "Big RegDump"); - A.show_registry(); - B.show_registry(); - C.show_registry(); -#endif - - if (0) //g_TRCFile) - { - fclose(g_TRCFile); - g_TRCFile = NULL; - } -} - - -//--------------------------------------------------------- -void InitCmdLineArgs() -//--------------------------------------------------------- -{ - //------------------------------------- - // Check cl_argc/v have been assigned - //------------------------------------- - //assert (cl_argc>0); - //assert (cl_argv ); -} - - -//--------------------------------------------------------- -void InitPDEWizInfo() -//--------------------------------------------------------- -{ -#if (THIS_IS_READY) - - // PDE-Wizard parameters - try { - g_Info_PDEWiz = new Info_PDEWiz2D; - assert(g_Info_PDEWiz); - -#if (1) - //################################### - // NBN: testing demo 2D Euler system - //g_Info_PDEWiz->LoadEulerTest(); - //g_Info_PDEWiz->LoadFile("Wiz/Euler/Euler_WALL.eqw"); - //g_Info_PDEWiz->LoadFile("Wiz/Euler/Euler_FLOW.eqw"); - //g_Info_PDEWiz->LoadFile("Wiz/Euler/Euler_Mach3.eqw"); - //g_Info_PDEWiz->LoadFile("Wiz/CEM/Maxwell_1.eqw"); - //g_Info_PDEWiz->SaveFile("E_M3_out"); - //################################### -#endif - - } catch(...) { - umWARNING("InitPDEWizInfo", "error creating g_Info_PDEWiz"); - } - -#endif -} - - -//--------------------------------------------------------- -void InitLogBuffers() -//--------------------------------------------------------- -{ - g_pStdErr = ::freopen("gp_stderr.txt", "w", stderr); // reassign stderr - assert(g_pStdErr); - fprintf(stderr, "Printing to stderr\n"); - fprintf(g_pStdErr, "Printing to g_pStdErr\n"); - fflush (g_pStdErr); - -#if (1) - // for console mode version, send log to console - fprintf(g_pStdErr, "Sending LOG output to console\n"); -#else - g_pStdOut = ::freopen("gp_stdout.txt", "w", stdout); // reassign stdout - assert(g_pStdOut); - fprintf(stdout, "Printing to stdout\n"); - fprintf(g_pStdOut, "Printing to g_pStdOut\n"); - fflush (g_pStdOut); -#endif - - // Redirect expression compiler messages to file - EC_fout = ::fopen("EC_Log.txt","w"); assert(EC_fout); - EC_ferr = ::fopen("EC_Err.txt","w"); assert(EC_ferr); - - // Redirect logs to files in console mode - g_LOGFile = ::fopen("UMLOG_log.txt","w"); assert(g_LOGFile); - g_MSGFile = ::fopen("UMLOG_msg.txt","w"); assert(g_MSGFile); - g_TRCFile = ::fopen("UMLOG_trc.txt","w"); assert(g_TRCFile); -} diff --git a/cpp/nudg++/trunk/Src/ServiceRoutines/LOG.cpp b/cpp/nudg++/trunk/Src/ServiceRoutines/LOG.cpp deleted file mode 100644 index 1f8b156..0000000 --- a/cpp/nudg++/trunk/Src/ServiceRoutines/LOG.cpp +++ /dev/null @@ -1,515 +0,0 @@ -// LOG.cpp -// -// 2006/12/12 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include // for transform - -#ifndef WIN32 -#include // for back_inserter -#include -#include -#include -// LCW The following is a fix for a broken gcc with the transform functions -struct Toupper { - Toupper (std::locale const& l) : loc(l) {;} - char operator() (char c) { return std::toupper(c,loc); } - private: - std::locale const& loc; -}; -struct Tolower { - Tolower (std::locale const& l) : loc(l) {;} - char operator() (char c) { return std::tolower(c,loc); } - private: - std::locale const& loc; -}; -#endif // !WIN32 - - -//--------------------------------------------------------- -// Global log targets -//--------------------------------------------------------- - -// Redirect messages to file in console mode -FILE* g_LOGFile = NULL; -FILE* g_MSGFile = NULL; - -// trace allocation of arrays -FILE* g_TRCFile = NULL; - -// Redirect EC printf() to file in console mode -FILE* EC_fout = NULL; -FILE* EC_ferr = NULL; - -// Redirect printf() to file -FILE* g_pStdOut = NULL; -FILE* g_pStdErr = NULL; - -int g_LOG_FLAG = 5; // [0:10] -int g_MSG_FLAG = 5; // [0:10] -int g_TRC_FLAG = 5; // [0:10] - - -//--------------------------------------------------------- -// Manage display of warnings: -//--------------------------------------------------------- - -bool g_SimAborted = false; - -// Allow this number of warnings before forcing exit -int g_nMax_Warnings = 1000; -void setMaxWarnings (int maxw) { g_nMax_Warnings = maxw; } - -// Toggle warnings at run time: -bool g_bShowMessages = true; -bool g_bShowWarnings = true; -void toggleWarnings (bool onoff) { g_bShowWarnings = onoff; } - - -//--------------------------------------------------------- -void umLOG(int n, const char* format_str, ...) -//--------------------------------------------------------- -{ - static char buf1[1024]; - - if (n <= g_LOG_FLAG) - { - va_list arglist; - va_start(arglist, format_str); - int nUsed = -1; - nUsed = vsnprintf(buf1, 1023, format_str, arglist); - assert(nUsed>=0); - va_end(arglist); - -//#if (wxUSE_GUI) -// if (g_pPage1) { g_pPage1->Msg( buf1 ); } -//#endif - - if (g_LOGFile) { - fprintf(g_LOGFile, "%s", buf1); - fflush (g_LOGFile); - printf("%s", buf1); - } - } -} - -void umLOG(const std::string& msg, int n) -{ - umLOG(n, msg.c_str()); -} - - -//--------------------------------------------------------- -void umMSG(int n, const char* format_str, ...) -//--------------------------------------------------------- -{ - static char buf1[1024]; - - if (n <= g_MSG_FLAG) - { - va_list arglist; - va_start(arglist, format_str); - int nUsed = -1; - nUsed = vsnprintf(buf1, 1023, format_str, arglist); - assert(nUsed>=0); - va_end(arglist); - -//#if (wxUSE_GUI) -// if (g_pPage2) { g_pPage2->Msg( buf1 ); } -//#endif - - if (g_MSGFile) { - fprintf(g_MSGFile, "%s", buf1); - fflush (g_MSGFile); - #ifdef _DEBUG - printf("%s", buf1); // echo to stdout - #endif - } - - } -} - -void umMSG(const std::string& msg, int n) -{ - umMSG(n, msg.c_str()); -} - - -//--------------------------------------------------------- -void umTRC(int n, const char* format_str, ...) -//--------------------------------------------------------- -{ - static char buf1[1024]; - static int once=0; - - if (g_TRCFile) - { - if (n <= g_TRC_FLAG) - { - va_list arglist; - va_start(arglist, format_str); - int nUsed = -1; - nUsed = vsnprintf(buf1, 1023, format_str, arglist); - assert(nUsed>=0); - va_end(arglist); - - fprintf(g_TRCFile, "%s", buf1); - fflush (g_TRCFile); - } - } - else - { - if (!once) - { - printf("WARNING: g_TRCFile closed early\n"); - once = 1; - } - } -} - -void umTRC(const std::string& msg, int n) -{ - umTRC(n, msg.c_str()); -} - - -//--------------------------------------------------------- -void umWARNING (char* function_name, ...) -//--------------------------------------------------------- -{ - // only g_nMax_Warnings warnings are allowed: - static char buf[2048]; - static int nwarnings = 0; - nwarnings++; - if (nwarnings > g_nMax_Warnings) - umERROR("umWARNING", "More than %d calls to the warning functions.", g_nMax_Warnings); - - if (!g_bShowWarnings) - return; - - va_list ap; - char* fmt; - va_start(ap, function_name); - fmt = va_arg(ap, char*); - vsprintf(buf, fmt, ap); - va_end(ap); - - stringstream ss; - ss << "\n>>>> WARNING: << " << function_name - << " reports: (warning no. " << nwarnings - << ")\n" << buf - << "\n" << ends; - - umLOG(1, ss.str().c_str()); -} - - -//--------------------------------------------------------- -void umERROR (char* function_name, ...) -//--------------------------------------------------------- -{ - static char buf[2048]; - va_list ap; - char* fmt; - va_start(ap, function_name); - fmt = va_arg(ap, char*); - vsprintf(buf, fmt, ap); - va_end(ap); - - stringstream ss; - ss << "\n\n>>>>> Handling an exception: " - << function_name << " reports: \n" - << buf << "\n\n" << ends; - - umLOG(1, ss.str().c_str()); - - // throw exception to try block in user's code - //throw umException (function_name, ss.str(), false, __FILE__, __LINE__); - throw ss.str(); -} - - -//--------------------------------------------------------- -void umQUIT() -//--------------------------------------------------------- -{ - stringstream ss; - ss << "\n\n >>>>> A fatal error condition has developed <<<<<" - "\n\nTo find the source of this error, #define _DEBUG" - "\nand run the application under a debugger.\n\n" << ends; - - g_SimAborted = true; - - umLOG(1, ss.str().c_str()); - -#if (0) - DWORD dwExitCode = 3; - ExitThread(dwExitCode); -#else - exit(3); -#endif -} - - -void Clear_AP_Log() { } -void Clear_umLOG() { } -void Clear_umMSG() { } - - - -//--------------------------------------------------------- -std::string umAFORM (const char* fmt, ...) -//--------------------------------------------------------- -{ - // Uses cyclic buffers - - va_list ap; - va_start(ap, fmt); - static int ncalls = 0; - const int repeat_cycle = 8; - static char s [repeat_cycle][999]; - - if (++ncalls == 8) - ncalls = 0; // start with the first buffer again - - vsprintf (s[ncalls], fmt, ap); - va_end(ap); - - return std::string(s[ncalls]); -} - - -// Internal formatting of small strings using -// internal buffer (no alloc calls required) -//--------------------------------------------------------- -char* umOFORM (const char* fmt, ...) -//--------------------------------------------------------- -{ - va_list ap; - va_start(ap, fmt); - static int ncalls = 0; - const int repeat_cycle = 8; - static char s [repeat_cycle][999]; - - if (++ncalls == 8) - ncalls = 0; - - vsprintf (s[ncalls], fmt, ap); - va_end(ap); - - return s[ncalls]; -} - - -/////////////////////////////////////////////////////////// -// -// Some string utilities -// -/////////////////////////////////////////////////////////// - - -// strip blanks, tabs, newlines and EOF -//--------------------------------------------------------- -void umEATWHITE(ifstream& ins) -//--------------------------------------------------------- -{ - while (isspace(ins.peek())) - ins.ignore(); - if (ins.peek() == EOF) - ins.ignore(); - return; -} - - -// Size of buffer used for EC expressions. -// How long can an expression be? -#define eqnBUfSIZE 2000 -//--------------------------------------------------------- -bool getNextDataLine(ifstream& is, char* buf) -//--------------------------------------------------------- -{ - // Skip comment lines - bool bDataFound = false; - while (!bDataFound && is.good()) { - umEATWHITE(is); - //is.eatwhite(); - is.getline(buf, eqnBUfSIZE, '\n'); - if (buf[0] != '#' && strlen(buf)>0) - { - bDataFound = true; - } - } - return (bDataFound && (is.good() || is.eof())); -} - - -// Return zero-based index of the first character in source -// that is also in marks. Return -1 if there is no match. -//--------------------------------------------------------- -int findOneOf(const char* source, const char* marks) -//--------------------------------------------------------- -{ - int len = (int) strlen(source); - for (int i=0; i>>>> Handling an exception from Gnuplot subsystem: " - << function_name << " reports: \n" - << buf << "\n\n" << ends; - - umMSG(1, "\n%s\n", ss.str().c_str()); - - // throw exception to try block in user's code - //throw "NDG Error"; - umERROR("gpTHROW()","See Gnuplot's bail_to_command_line()"); -} - - -//--------------------------------------------------------- -void gpPAUSE(const char* msg) -//--------------------------------------------------------- -{ - // do nothing -} - -} // extern "C" - - - -//--------------------------------------------------------- -void umPAUSE(const char* msg) -//--------------------------------------------------------- -{ - // do nothing -} - diff --git a/cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit2D.cpp b/cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit2D.cpp deleted file mode 100644 index af3fbab..0000000 --- a/cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit2D.cpp +++ /dev/null @@ -1,321 +0,0 @@ -// MeshReaderGambit2D.cpp -// function [Nv, VX, VY, K, EToV] = MeshReaderGambit2D(FileName) -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include "NDG2D.h" - - -//--------------------------------------------------------- -bool NDG2D::MeshReaderGambit2D(const string& fname) -//--------------------------------------------------------- -{ - // function [Nv, VX, VY, K, EToV] = MeshReaderGambit2D(FileName) - // Purpose : Read in basic grid information to build grid - // - // NOTE : gambit(Fluent, Inc) *.neu format is assumed - - this->FileName = fname; // store filename - if (! file_exists(FileName)) { - umWARNING("NDG2D::MeshReaderGambit2D()", "cannot find file %s", fname.c_str()); - return false; - } - - // Nfp=N+1; Np=(N+1)*(N+2)/2; Nfaces=3; - - ifstream is(FileName.c_str(), std::ios::in); - if (!is) { - umWARNING("NDG2D::MeshReaderGambit2D()", "failed to load file %s", fname.c_str()); - return false; - } - - umTRC(1, "loading geometry from file %s\n", fname.c_str()); - - char buf[BUFSIZ]={""}; - bIs3D=false; bCoord3D=false; bElement3D=false; - int i=0, id=0; - - // Skip 6-line header - for (i=1; i<=6; ++i) - is.getline(buf, BUFSIZ); - - //--------------------------------------------- - // Find number of nodes and number of elements - // [NUMNP NELEM NGRPS NBSETS NDFCD NDFVL] - //--------------------------------------------- - is >> Nv // num nodes in mesh - >> K // num elements - >> Nmats // num material groups - >> Nbcs // num boundary groups - >> Nsd; // num space dimensions - - is.getline(buf, BUFSIZ); // clear rest of line - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - is.getline(buf, BUFSIZ); // Skip "NODAL COORDINATES 1.3.0" - - //--------------------------------------------- - // Manage number of space dimensions - //--------------------------------------------- - if (Nsd<2 || Nsd>3) { - umWARNING("NDG2D::load_mesh()", "Number of space dimensions was %d?", Nsd); - return false; - } - - bIs3D = (3 == Nsd); - - // Allow 3D-coords for 2D elements, e.g. triangles on a sphere - bool tri_in_3D = false; - if (false) - tri_in_3D = true; - - if (bIs3D && !tri_in_3D) { - Nfaces = 4; // Tetrahedra - bCoord3D = true; - bElement3D = true; - } else { - Nfaces = 3; // Triangles - bCoord3D = (tri_in_3D ? true : false); - bElement3D = false; - } - - // Triangles or Tetrahedra? - bool bTET = (bElement3D ? true : false); - - // resize arrays - VX.resize(Nv); VY.resize(Nv); VZ.resize(bCoord3D ? Nv : 0); - - // read node coords (order not assumed) - for (i=1; i<=Nv; ++i) - { - is >> id; // read id before using it - is >> VX(id) >> VY(id); - if (bCoord3D) { is >> VZ(id); } - is.getline(buf,BUFSIZ); - } - - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - is.getline(buf, BUFSIZ); // Skip "ELEMENTS/CELLS 1.3.0" - - - //------------------------------------- - // Triangles in 3D: - //------------------------------------- - // ENDOFSECTION - // ELEMENTS/CELLS 1.3.0 - // 1 3 3 1 2 3 - // 2 3 3 3 2 4 - //--------------------------------------------- - // Tetrahedra in 3D: - //--------------------------------------------- - // ENDOFSECTION - // ELEMENTS/CELLS 1.3.0 - // 1 6 4 248 247 385 265 - // 2 6 4 248 249 273 397 - //--------------------------------------------- - - if (bTET) - EToV.resize(K, 4); // Tetrahedra - else - EToV.resize(K, 3); // Triangles - - int etype=0, nface=0, n1=0, n2=0, n3=0, n4=0; - - // read element to node connectivity - for (i=1; i<=K; ++i) - { - is >> id >> etype >> nface >> n1 >> n2 >> n3; - assert(3==nface || (4==nface && bTET)); - if (4==nface) { is >> n4; } - is.getline(buf, BUFSIZ); - - EToV(id,1) = n1; - EToV(id,2) = n2; - EToV(id,3) = n3; - if (4==nface) { EToV(id,4) = n4; } - } - - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - is.getline(buf, BUFSIZ); // Skip "ELEMENT GROUP 1.3.0" - - -#ifndef NDEBUG - // Find bounding box for the mesh - Xmin=VX.min_val(); Xmax=VX.max_val(); - Ymin=VY.min_val(); Ymax=VY.max_val(); - if (bCoord3D) {Zmin=VZ.min_val(); Zmax=VZ.max_val();} - - umTRC(4, "umMESH : Bounding Box for %d-D mesh\n", Nsd); - umTRC(4, " x (%8.3lf, %8.3lf)\n", Xmin,Xmax); - umTRC(4, " y (%8.3lf, %8.3lf)\n", Ymin,Ymax); - if (bCoord3D) { - umTRC(4, " z (%8.3lf, %8.3lf)\n", Zmin,Zmax);} -#endif - - - ///////////////////////////////////////////////////////// - // - // if present, load material "epsilon" for each element - // - ///////////////////////////////////////////////////////// - - //------------------------------------------------------- - // ENDOFSECTION - // ELEMENT GROUP 1.3.0 - // GROUP: 1 ELEMENTS: 512 MATERIAL: 1.000 NFLAGS: 0 - // epsilon: 1.000 - // 0 - // 1 2 3 4 5 6 7 8 9 10 - // 11 12 13 14 15 16 17 18 19 20 - // 21 22 23 24 25 26 27 28 29 30 - //------------------------------------------------------ - - double gepsln = 6.5; // [0:13] Map colors to BC type -//double gepsln = 3.0; // [0:6] Map colors to AMR cell status - - // Allocate a scalar for each element - epsilon.resize(K, true, gepsln); - - //--------------------------------------------- - // Each element belongs to a "material group" - // with a scalar "epsilon" value. Associate - // this scalar with each element in the group: - // AMR: - // Adaptive meshes track element material! - //--------------------------------------------- - materialVals.resize(Nmats); - - std::string gname; - int nread=0, gnum=0, gnel=0; - - for (i=1; i<=Nmats; ++i) - { - //----------------------------------- - // Read group ID, nel, epsilon - //----------------------------------- - is.getline(buf, BUFSIZ); - // > GROUP: 1 ELEMENTS: 698 MATERIAL: 12.000 - nread = sscanf(buf,"%*s%d%*s%d%*s%lf", &gnum,&gnel,&gepsln); - assert(3==nread); - - if (gepsln <= 0.0) { - //gepsln = 1.0; - umMSG(1, "umMESH : epsilon for material %d was <= 0.0\n", i); - } else if (gepsln < 1.0) { - umMSG(1, "umMESH : epsilon for material %d was < 1.0\n", i); - } - - // TODO: Map multiple materials under transparent fields - materialVals(i) = gepsln; - //materialVals(i) = i; - - umTRC(3, "umMESH : Region %2d has %6d elements, with epsilon = %7.3lf\n", gnum, gnel, gepsln); - - // Read group name - is.getline(buf, BUFSIZ); - gname = trim(buf); - - // Skip solver-dependent flags - is.getline(buf, BUFSIZ); - - // Load epsilon for elements in group - for (int k=1; k<=gnel; ++k) { - is >> id; - epsilon(id) = gepsln; - } - - is.getline(buf, BUFSIZ); // Clear end of line - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - if (! strstr(buf, "ENDOFSECTION")) { - umWARNING("NDG2D::load_mesh()", "Expected [ENDOFSECTION]"); - return false; - } - is.getline(buf, BUFSIZ); // Skip "ELEMENT GROUP 1.3.0" - } - - - ///////////////////////////////////////////////////////// - // - // Boundary groups - // - ///////////////////////////////////////////////////////// - - // boundary codes (defined in Globals2D) - if (bTET) { - BCType.resize(K, 4); // Tetrahedra - } else { - BCType.resize(K, 3); // Triangles - } - - for (i=1; i<=Nbcs; ++i) - { - is.getline(buf, BUFSIZ); // Load ith boundary group - if (strstr(buf, "ENDOFSECTION")) { - continue; // demos may have no boundary info - } - - if (! load_BF_group(is, buf)) { - umWARNING("NDG2D::load_mesh()", "Error loading boundary face group: %s\n", buf); - return false; - } - - is.getline(buf, BUFSIZ); // Clear "end of line" - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - if (! strstr(buf, "ENDOFSECTION")) { - umWARNING("NDG2D::load_mesh()", "Expected [ENDOFSECTION]"); - return false; - } - is.getline(buf, BUFSIZ); // Skip "ELEMENT GROUP 1.3.0" - } - - is.close(); // Finished reading from the file stream. - return true; // mesh data loaded successfully -} - - -//--------------------------------------------------------- -bool NDG2D::load_BF_group(istream& is, char* buf) -//--------------------------------------------------------- -{ - int bcNF=0, bcCNT=0, bcflag = BC_None; - int nread=0, elmt=0, dum=0, face=0, bcID=0; - double radius=0.0; char bcTXT[100]; std::string name; - - //--------------------------------------------- - // Examine group header (1 line held in buf) - //--------------------------------------------- - // > Far 1 64 0 0 - //--------------------------------------------- - if (strstr(buf, "Cyl")) { - nread = sscanf(buf,"%s %lf %d", bcTXT, &radius, &bcNF); - } else {nread = sscanf(buf,"%s %d %d", bcTXT, &bcID, &bcNF);} - assert(3==nread); - - // Extract name of boundary condition - name = trim(bcTXT); - - umTRC(3, "Loading %4d faces with BC %s\n", bcNF, name.c_str()); - if (match_BC(name, "Infl")) bcflag = BC_In; - else if (match_BC(name, "Outf")) bcflag = BC_Out; - else if (match_BC(name, "Wall")) bcflag = BC_Wall; - else if (match_BC(name, "Far" )) bcflag = BC_Far; - else if (match_BC(name, "Cyl" )) bcflag = BC_Cyl; - else if (match_BC(name, "Diri")) bcflag = BC_Dirichlet; - else if (match_BC(name, "Neum")) bcflag = BC_Neuman; - else if (match_BC(name, "Slip")) bcflag = BC_Slip; - else { - umWARNING("NDG2D::load_BF_group()", "Unexpected boundary condition group, '%s' ", name.c_str()); - return false; - } - - bcCNT = 0; - for (int bf=1; bf<=bcNF; ++bf) { - is >> elmt >> dum >> face; // read data - BCType(elmt, face) = bcflag; // mark face with BC - ++bcCNT; // adjust counter - if (! is.good()) break; // check stream - assert((elmt<=K) && (face<=4)); // check values (tri/tet) - } - - return (bcCNT==bcNF) ? true : false; -} diff --git a/cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit3D.cpp b/cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit3D.cpp deleted file mode 100644 index 03bab7e..0000000 --- a/cpp/nudg++/trunk/Src/ServiceRoutines/MeshReaderGambit3D.cpp +++ /dev/null @@ -1,321 +0,0 @@ -// MeshReaderGambit3D.cpp -// function [Nv, VX, VY, VZ, K, EToV] = MeshReaderGambit3D(FileName) -// 2007/06/11 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - -#include "NDG3D.h" - - -//--------------------------------------------------------- -bool NDG3D::MeshReaderGambit3D(const string& fname) -//--------------------------------------------------------- -{ - // function [Nv, VX, VY, K, EToV] = MeshReaderGambit3D(FileName) - // Purpose : Read in basic grid information to build grid - // - // NOTE : gambit(Fluent, Inc) *.neu format is assumed - - this->FileName = fname; // store filename - if (! file_exists(FileName)) { - umWARNING("NDG3D::MeshReaderGambit3D()", "cannot find file %s", fname.c_str()); - return false; - } - - // Nfp=N+1; Np=(N+1)*(N+2)/2; Nfaces=3; - - ifstream is(FileName.c_str(), std::ios::in); - if (!is) { - umWARNING("NDG3D::MeshReaderGambit3D()", "failed to load file %s", fname.c_str()); - return false; - } - - umTRC(1, "loading geometry from file %s\n", fname.c_str()); - - char buf[BUFSIZ]={""}; - bIs3D=false; bCoord3D=false; bElement3D=false; - int i=0, id=0; - - // Skip 6-line header - for (i=1; i<=6; ++i) - is.getline(buf, BUFSIZ); - - //--------------------------------------------- - // Find number of nodes and number of elements - // [NUMNP NELEM NGRPS NBSETS NDFCD NDFVL] - //--------------------------------------------- - is >> Nv // num nodes in mesh - >> K // num elements - >> Nmats // num material groups - >> Nbcs // num boundary groups - >> Nsd; // num space dimensions - - is.getline(buf, BUFSIZ); // clear rest of line - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - is.getline(buf, BUFSIZ); // Skip "NODAL COORDINATES 1.3.0" - - //--------------------------------------------- - // Manage number of space dimensions - //--------------------------------------------- - if (Nsd<2 || Nsd>3) { - umWARNING("NDG3D::load_mesh()", "Number of space dimensions was %d?", Nsd); - return false; - } - - bIs3D = (3 == Nsd); - - // Allow 3D-coords for 2D elements, e.g. triangles on a sphere - bool tri_in_3D = false; - if (false) - tri_in_3D = true; - - if (bIs3D && !tri_in_3D) { - Nfaces = 4; // Tetrahedra - bCoord3D = true; - bElement3D = true; - } else { - Nfaces = 3; // Triangles - bCoord3D = (tri_in_3D ? true : false); - bElement3D = false; - } - - // Triangles or Tetrahedra? - bool bTET = (bElement3D ? true : false); - - // resize arrays - VX.resize(Nv); VY.resize(Nv); VZ.resize(bCoord3D ? Nv : 0); - - // read node coords (order not assumed) - for (i=1; i<=Nv; ++i) - { - is >> id; // read id before using it - is >> VX(id) >> VY(id); - if (bCoord3D) { is >> VZ(id); } - is.getline(buf,BUFSIZ); - } - - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - is.getline(buf, BUFSIZ); // Skip "ELEMENTS/CELLS 1.3.0" - - - //------------------------------------- - // Triangles in 3D: - //------------------------------------- - // ENDOFSECTION - // ELEMENTS/CELLS 1.3.0 - // 1 3 3 1 2 3 - // 2 3 3 3 2 4 - //--------------------------------------------- - // Tetrahedra in 3D: - //--------------------------------------------- - // ENDOFSECTION - // ELEMENTS/CELLS 1.3.0 - // 1 6 4 248 247 385 265 - // 2 6 4 248 249 273 397 - //--------------------------------------------- - - if (bTET) - EToV.resize(K, 4); // Tetrahedra - else - EToV.resize(K, 3); // Triangles - - int etype=0, nface=0, n1=0, n2=0, n3=0, n4=0; - - // read element to node connectivity - for (i=1; i<=K; ++i) - { - is >> id >> etype >> nface >> n1 >> n2 >> n3; - assert(3==nface || (4==nface && bTET)); - if (4==nface) { is >> n4; } - is.getline(buf, BUFSIZ); - - EToV(id,1) = n1; - EToV(id,2) = n2; - EToV(id,3) = n3; - if (4==nface) { EToV(id,4) = n4; } - } - - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - is.getline(buf, BUFSIZ); // Skip "ELEMENT GROUP 1.3.0" - - -#ifndef NDEBUG - // Find bounding box for the mesh - Xmin=VX.min_val(); Xmax=VX.max_val(); - Ymin=VY.min_val(); Ymax=VY.max_val(); - if (bCoord3D) {Zmin=VZ.min_val(); Zmax=VZ.max_val();} - - umTRC(4, "umMESH : Bounding Box for %d-D mesh\n", Nsd); - umTRC(4, " x (%8.3lf, %8.3lf)\n", Xmin,Xmax); - umTRC(4, " y (%8.3lf, %8.3lf)\n", Ymin,Ymax); - if (bCoord3D) { - umTRC(4, " z (%8.3lf, %8.3lf)\n", Zmin,Zmax);} -#endif - - - ///////////////////////////////////////////////////////// - // - // if present, load material "epsilon" for each element - // - ///////////////////////////////////////////////////////// - - //------------------------------------------------------- - // ENDOFSECTION - // ELEMENT GROUP 1.3.0 - // GROUP: 1 ELEMENTS: 512 MATERIAL: 1.000 NFLAGS: 0 - // epsilon: 1.000 - // 0 - // 1 2 3 4 5 6 7 8 9 10 - // 11 12 13 14 15 16 17 18 19 20 - // 21 22 23 24 25 26 27 28 29 30 - //------------------------------------------------------ - - double gepsln = 6.5; // [0:13] Map colors to BC type -//double gepsln = 3.0; // [0:6] Map colors to AMR cell status - - // Allocate a scalar for each element - epsilon.resize(K, true, gepsln); - - //--------------------------------------------- - // Each element belongs to a "material group" - // with a scalar "epsilon" value. Associate - // this scalar with each element in the group: - // AMR: - // Adaptive meshes track element material! - //--------------------------------------------- - materialVals.resize(Nmats); - - std::string gname; - int nread=0, gnum=0, gnel=0; - - for (i=1; i<=Nmats; ++i) - { - //----------------------------------- - // Read group ID, nel, epsilon - //----------------------------------- - is.getline(buf, BUFSIZ); - // > GROUP: 1 ELEMENTS: 698 MATERIAL: 12.000 - nread = sscanf(buf,"%*s%d%*s%d%*s%lf", &gnum,&gnel,&gepsln); - assert(3==nread); - - if (gepsln <= 0.0) { - //gepsln = 1.0; - umMSG(1, "umMESH : epsilon for material %d was <= 0.0\n", i); - } else if (gepsln < 1.0) { - umMSG(1, "umMESH : epsilon for material %d was < 1.0\n", i); - } - - // TODO: Map multiple materials under transparent fields - materialVals(i) = gepsln; - //materialVals(i) = i; - - umTRC(3, "umMESH : Region %2d has %6d elements, with epsilon = %7.3lf\n", gnum, gnel, gepsln); - - // Read group name - is.getline(buf, BUFSIZ); - gname = trim(buf); - - // Skip solver-dependent flags - is.getline(buf, BUFSIZ); - - // Load epsilon for elements in group - for (int k=1; k<=gnel; ++k) { - is >> id; - epsilon(id) = gepsln; - } - - is.getline(buf, BUFSIZ); // Clear end of line - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - if (! strstr(buf, "ENDOFSECTION")) { - umWARNING("NDG3D::load_mesh()", "Expected [ENDOFSECTION]"); - return false; - } - is.getline(buf, BUFSIZ); // Skip "ELEMENT GROUP 1.3.0" - } - - - ///////////////////////////////////////////////////////// - // - // Boundary groups - // - ///////////////////////////////////////////////////////// - - // boundary codes (defined in Globals2D) - if (bTET) { - BCType.resize(K, 4); // Tetrahedra - } else { - BCType.resize(K, 3); // Triangles - } - - for (i=1; i<=Nbcs; ++i) - { - is.getline(buf, BUFSIZ); // Load ith boundary group - if (strstr(buf, "ENDOFSECTION")) { - continue; // demos may have no boundary info - } - - if (! load_BF_group(is, buf)) { - umWARNING("NDG3D::load_mesh()", "Error loading boundary face group: %s\n", buf); - return false; - } - - is.getline(buf, BUFSIZ); // Clear "end of line" - is.getline(buf, BUFSIZ); // Skip "ENDOFSECTION" - if (! strstr(buf, "ENDOFSECTION")) { - umWARNING("NDG3D::load_mesh()", "Expected [ENDOFSECTION]"); - return false; - } - is.getline(buf, BUFSIZ); // Skip "ELEMENT GROUP 1.3.0" - } - - is.close(); // Finished reading from the file stream. - return true; // mesh data loaded successfully -} - - -//--------------------------------------------------------- -bool NDG3D::load_BF_group(istream& is, char* buf) -//--------------------------------------------------------- -{ - int bcNF=0, bcCNT=0, bcflag = BC_None; - int nread=0, elmt=0, dum=0, face=0, bcID=0; - double radius=0.0; char bcTXT[100]; std::string name; - - //--------------------------------------------- - // Examine group header (1 line held in buf) - //--------------------------------------------- - // > Far 1 64 0 0 - //--------------------------------------------- - if (strstr(buf, "Cyl")) { - nread = sscanf(buf,"%s %lf %d", bcTXT, &radius, &bcNF); - } else {nread = sscanf(buf,"%s %d %d", bcTXT, &bcID, &bcNF);} - assert(3==nread); - - // Extract name of boundary condition - name = trim(bcTXT); - - umTRC(3, "Loading %4d faces with BC %s\n", bcNF, name.c_str()); - if (match_BC(name, "Infl")) bcflag = BC_In; - else if (match_BC(name, "Outf")) bcflag = BC_Out; - else if (match_BC(name, "Wall")) bcflag = BC_Wall; - else if (match_BC(name, "Far" )) bcflag = BC_Far; - else if (match_BC(name, "Cyl" )) bcflag = BC_Cyl; - else if (match_BC(name, "Diri")) bcflag = BC_Dirichlet; - else if (match_BC(name, "Neum")) bcflag = BC_Neuman; - else if (match_BC(name, "Slip")) bcflag = BC_Slip; - else { - umWARNING("NDG3D::load_BF_group()", "Unexpected boundary condition group, '%s' ", name.c_str()); - return false; - } - - bcCNT = 0; - for (int bf=1; bf<=bcNF; ++bf) { - is >> elmt >> dum >> face; // read data - BCType(elmt, face) = bcflag; // mark face with BC - ++bcCNT; // adjust counter - if (! is.good()) break; // check stream - assert((elmt<=K) && (face<=4)); // check values (tri/tet) - } - - return (bcCNT==bcNF) ? true : false; -} diff --git a/cpp/nudg++/trunk/Src/ServiceRoutines/Tokenizer.cpp b/cpp/nudg++/trunk/Src/ServiceRoutines/Tokenizer.cpp deleted file mode 100644 index 689facd..0000000 --- a/cpp/nudg++/trunk/Src/ServiceRoutines/Tokenizer.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// Tokenizer.cpp -// "strtok" for std::string, using a table lookup -// that only works for single byte characters -// 2007/01/21 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "Tokenizer.h" - -typedef unsigned char BYTE; - - -//--------------------------------------------------------- -Tokenizer::Tokenizer(const char* cs, const char* csDelim) -//--------------------------------------------------------- - : m_cs(cs), m_nCurPos(0) -{ - SetDelimiters(csDelim); -} - - -//--------------------------------------------------------- -void Tokenizer::SetDelimiters(const char* csDelim) -//--------------------------------------------------------- -{ - size_t N = strlen(csDelim); - for (size_t i=0; i(csDelim[i])); -} - - -//--------------------------------------------------------- -int Tokenizer::Next(std::string& cs) -//--------------------------------------------------------- -{ - // Note: must return signed int, not size_t - - cs.clear(); - - while (m_nCurPos < m_cs.size() && m_delim[static_cast(m_cs.at(m_nCurPos))]) - ++m_nCurPos; - - if (m_nCurPos >= m_cs.size()) - return -1; - - size_t nStartPos = m_nCurPos; - while (m_nCurPos < m_cs.size() && !m_delim[static_cast(m_cs.at(m_nCurPos))]) - ++m_nCurPos; - - cs = m_cs.substr(nStartPos, m_nCurPos - nStartPos); - - int nRet = (int)(nStartPos); - return nRet; -} - - -//--------------------------------------------------------- -std::string Tokenizer::Tail() -//--------------------------------------------------------- -{ - size_t nCurPos = m_nCurPos; - - while (nCurPos < m_cs.size() && m_delim[(size_t)static_cast(m_cs.at(nCurPos))]) - ++nCurPos; - - std::string csResult; - - if (nCurPos < m_cs.size()) - csResult = m_cs.substr(nCurPos); - - return csResult; -} diff --git a/cpp/nudg++/trunk/Src/Sparse/CHOLMOD_solver.cpp b/cpp/nudg++/trunk/Src/Sparse/CHOLMOD_solver.cpp deleted file mode 100644 index 30085d0..0000000 --- a/cpp/nudg++/trunk/Src/Sparse/CHOLMOD_solver.cpp +++ /dev/null @@ -1,216 +0,0 @@ -// CHOLMOD_solver.cpp -// -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" - - -#ifdef NDG_USE_CHOLMOD - -#include "CHOLMOD_solver.h" -#include "Stopwatch.h" - -stopwatch chol_timer; - - -// halt if an error occurs -//--------------------------------------------------------- -static void CHOLMOD_ehandler(int status, char *file, int line, char *message) -//--------------------------------------------------------- -{ - umLOG(1, "cholmod error: file: %s line: %d status: %d: %s\n", - file, line, status, message); - if (status < 0) { - umERROR("CHOLMOD_ehandler", "Unrecoverable error in CHOLMOD"); - } -} - - -//--------------------------------------------------------- -CHOLMOD_solver::CHOLMOD_solver() -//--------------------------------------------------------- - : initialized(false), drop_tol(0.0), - m_status(0), m_NNZ(0), m_M(0), m_N(0), - A(NULL), L(NULL), x(NULL), b(NULL) -{ - init_common(); -} - - -//--------------------------------------------------------- -CHOLMOD_solver::CHOLMOD_solver -( - const CSd &mat, // the matrix to factor - double droptol // optional droptol -) -//--------------------------------------------------------- - : initialized(false), drop_tol(0.0), - m_status(0), m_NNZ(0), m_M(0), m_N(0), - A(NULL), L(NULL), x(NULL), b(NULL) -{ - init_common(); - chol(mat, 0, droptol); -} - - -//--------------------------------------------------------- -CHOLMOD_solver::~CHOLMOD_solver() -//--------------------------------------------------------- -{ - reset(); -} - - -//--------------------------------------------------------- -void CHOLMOD_solver::reset() -//--------------------------------------------------------- -{ - initialized = false; - m_NNZ = m_M = m_N = 0; - - cholmod_free_factor(&L, cm); // free matrices - cholmod_free_sparse(&A, cm); - cholmod_free_dense (&x, cm); -#if (0) - // Note: b points into the allocation for B, so do NOT free! - //cholmod_free_dense (&b, cm); -#endif - - cholmod_finish(cm); // clear workspace - L=NULL; A=NULL; x=NULL; b=NULL; // invalidate pointers - cm=&Common; // but Common is a member struct -} - - -//--------------------------------------------------------- -void CHOLMOD_solver::init_common() -//--------------------------------------------------------- -{ - cm = &Common; - cholmod_start(cm); - cm->error_handler = CHOLMOD_ehandler; - chol_timer.reset(); chol_timer.start(); - - this->b = cholmod_allocate_dense(1,1,1,CHOLMOD_REAL, cm); -} - - -//--------------------------------------------------------- -void CHOLMOD_solver::chol(const CSd& mat, int dummy, double droptol) -//--------------------------------------------------------- -{ - - if (initialized) { - reset(); // clear previous system - init_common(); // reset common defaults - } - - // check that matrix arg is valid - if (!mat.ok()) { umERROR("CHOLMOD_solver(CSd&)", "matrix arg is empty"); return; } - - // load CSd into CHOLMOD structures - load(mat); - - // analyze - double t1 = chol_timer.read(), ta=0.0, tf=0.0; - this->L = cholmod_analyze(this->A, this->cm); - ta = chol_timer.read() - t1; - umMSG(1, "Analyze: flop %g lnz %g time %g\n", cm->fl, cm->lnz, ta); - - // factorize - t1 = chol_timer.read(); - cholmod_factorize(this->A, this->L, this->cm); - tf = chol_timer.read() - t1; - umMSG(1, "Factor : flop %g lnz %g time %g\n", cm->fl, cm->lnz, tf); - - initialized = true; -} - - -//--------------------------------------------------------- -DVec& CHOLMOD_solver::solve(const DVec &rhs) -//--------------------------------------------------------- -{ - int n=rhs.size(); this->B=rhs; this->X.resize(n); - if (!B.ok()||!X.ok()) {umERROR("CHOLMOD_solver::solve", "out of memory"); return X;} - - // update member data in (struct cholmod_dense) b. - // Note that b->x borrows raw allocation in DVec B - - b->x=B.data(); b->nrow=n; b->ncol=1; b->nzmax=n; b->d=n; b->z=NULL; - x = cholmod_solve(CHOLMOD_A, this->L, this->b, this->cm); - - X.copy(n, (double*)(x->x)); // copy "cholmod_dense" to "DVec" - cholmod_free_dense (&x, cm); // release this allocation - return X; -} - - -//--------------------------------------------------------- -void CHOLMOD_solver::write_matlab(const char* sz) const -//--------------------------------------------------------- -{ -#if (0) - //####################################################### - - IVec Acol(m_NNZ, "Acol"); - col_to_triplet(m_N, Ap.data(), Acol.data()); - - ofstream os(sz); - for (int i=0; iA) { - cholmod_free_sparse(&A, cm); - A = NULL; - } - - this->cm->status = CHOLMOD_OK; - - // get inputs - int nrow = mat.num_cols(); - int ncol = mat.num_cols(); - int nzmax = mat.nnz(); - int packed = mat.is_csc(); - int sorted = 1; // FIXME: is mat->sorted? - int stype = -1; // store lower triangle only - int xtype = CHOLMOD_REAL; - - // allocate the cholmod_sparse structure - A = cholmod_allocate_sparse (nrow, ncol, nzmax, sorted, packed, stype, xtype, this->cm); - - if (cm->status < CHOLMOD_OK) { - umERROR("CHOLMOD_solver::load(CSd&)", "out of memory"); - return false; - } - - // copy the matrix - int *Ap=(int*)(A->p), *Ai=(int*)(A->i), p=0,j=0,nz=0; - double* Ax = (double*)(A->x); - - for (j=0; j<=ncol; ++j) {Ap[j]=mat.P[j];} nz=Ap[ncol]; - for (p=0; p= j ); // A must be lower triangular - indices[next] = i; - values [i ] = Aij; - bitmap [i ] = j; - next++; - } - length = next; -} - - -//--------------------------------------------------------- -void Spa::scale_add(int j, CSd& A, int k, double alpha) -//--------------------------------------------------------- -{ - assert(k < A.n); - -#if (TRACE_CHOL>=5) - umMSG(1, "spa::scale_add: updating column %d with column %d\n",j,k); - umMSG(1, "spa::scale_add: colptr %d to %d-1\n",A.P[k],A.P[k+1]); -#endif - - int next=0, i=0, ip=0; double Aik=0.0; - for (int ip = A.P[k]; ip < A.P[k+1]; ++ip) - { - i = A.I[ip]; - if (i < j) continue; - Aik = A.X[ip]; - if ((this->bitmap)[i] < j) - { -#if (TRACE_CHOL>=3) - umMSG(1, "fill in (%d,%d)\n",i,j); -#endif - bitmap [ i ] = j; - values [ i ] = 0.0; - indices[length] = i; - length++; - } - - values[i] += alpha*Aik; - -#if (TRACE_CHOL>=5) - umMSG(1, "spa::scale_add: A(%d,%d) -= %lg * %lg ==> %lg\n", i,j, alpha, Aik, values[i]); -#endif - } -} - - -/////////////////////////////////////////////////////////// -// -// RowList : linked lists for mapping row dependencies -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -class RowList -//--------------------------------------------------------- -{ -public: - - RowList(int n); - ~RowList() {} - - int create(int n); - int add(int i, int j, double v); - - bool ok() const { return (m_status != 0) ? false : true; } - int getfirst (int rl) { return rowlist [ rl ]; } - int getnext (int rl) { return next [ rl ]; } - int getcolind(int rl) { return colind[ rl ]; } - double getvalue (int rl) { return values[ rl ]; } - -protected: - IVec rowlist, next, colind; - DVec values; - int rowlist_size, freelist, next_expansion; - int m_status; -}; - - -//--------------------------------------------------------- -RowList::RowList(int n) -//--------------------------------------------------------- -: rowlist_size(0), freelist(0), next_expansion(0), m_status(0) -{ - // allocate initial rowlist structure - m_status = create(n); -} - - -//--------------------------------------------------------- -int RowList::create(int n) -//--------------------------------------------------------- -{ - freelist = 0; - rowlist_size = 1000; next_expansion = 1000; - - rowlist.resize(n); // system is (n,n) - - next.resize (rowlist_size); // rowlist_size will grow - colind.resize(rowlist_size); - values.resize(rowlist_size); - - if (!rowlist.ok() || !next.ok() || !colind.ok() || !values.ok()) - { m_status = -1; return -1; } - - rowlist.fill(-1); // -1 indicates: no list for row[i] - - for (int i=0; i CS_Cholinc: n=%d droptol=%0.1e modified? %d\n", n, droptol, modified); - - // Avoid frequent L.realloc() with large inital alloc - // TODO: tune initial allocation for incomplete factor: - int Lnnz = A.size(); - if (droptol>=9.9e-3) { Lnnz = 1*Lnnz; } // L.nnz = 1.0*A.nnz - else if (droptol>=9.9e-4) { Lnnz = (3*Lnnz)/2; } // L.nnz = 1.5*A.nnz - else if (droptol>=9.9e-5) { Lnnz = (9*Lnnz)/5; } // L.nnz = 1.8*A.nnz - else if (droptol>=9.9e-6) { Lnnz = 2*Lnnz; } // L.nnz = 2.0*A.nnz - else { Lnnz = (5*Lnnz)/2; } // L.nnz = 2.5*A.nnz - - int init_Lnnz = Lnnz; - L.resize(n,n,Lnnz, 1, 0); - if (!L.ok()) { return L; } - - // factor is lower triangular - L.set_shape(sp_TRIANGULAR | sp_LOWER); - - int next=0, Aj_nnz, i,j,k,ip; double Lkj,pivot,v,norm; - double flops = 0.0, Lj_nnz=0.0; - - Spa spa(n); // allocate buffer for sparse columns - RowList rowlist(n); // allocate initial rowlist structure - DVec dropped(n); // allocate buffer for dropped values - - if (!spa.ok() || !rowlist.ok() || !dropped.ok()) { - umWARNING("CS_Cholinc", "out of memory"); - return L; - } - - umLOG(1, " ==> CS_Cholinc: (n=%d) ", n); - for (j=0; j Lnnz ) - { - int inc = std::max((int)floor(1.25*(double)Lnnz), std::max(8192, spa.length)); - Lnnz += inc; - - if (!L.realloc(Lnnz)) { - return L; - } - } - L.P[j] = next; - - norm = 0.0; - for (ip=0; ip < spa.length; ++ip) { - i = (spa.indices)[ip]; - v = (spa.values)[i]; - norm += v*v; - } - norm = sqrt(norm); - - Aj_nnz = A.P[j+1] - A.P[j]; - - for (ip=0; ip < spa.length; ++ip) { - i = (spa.indices)[ip]; - v = (spa.values )[i ]; - - //################################################### - // FIXME (a): test if L(i,j) is in pattern of A - //################################################### - - //if (i==j || fabs(v) > droptol * norm) - if (i==j || fabs(v) > droptol * norm || ip < Aj_nnz) - { - // nothing - } - else { - dropped[i] -= v; - dropped[j] -= v; - } - } - - if (modified) { - pivot = sqrt((spa.values)[j] - dropped[j]); - } else { - pivot = sqrt((spa.values)[j]); - } - -#if (TRACE_CHOL>=2) - umMSG(1, "pivot=%.4e, sqrt=%.4e\n", (spa.values)[j], pivot); -#endif - - if (0.0 == pivot) { - umLOG(1, " ==> CS_Cholinc: zero pivot in column %d\n",j); - umLOG(1, " ==> CS_Cholinc: Ajj in spa = %lg dropped[j] = %lg Aj_nnz=%d\n", (spa.values)[j],dropped[j],Aj_nnz); - } else if (fabs(pivot) < 1e-12) { - umLOG(1, " ==> CS_Cholinc: small pivot in column %d (%le)\n",j,pivot); - } - - //----------------------------------------------------- - // 1st pass: find the diagonal entry for column j then - // store entry L(j,j) first in each compressed column: - //----------------------------------------------------- - for (ip=0; ip < spa.length; ++ip) - { - i = (spa.indices)[ip]; - v = (spa.values )[i ]; - - if (i==j) - { - // must include diagonal entry in the droptol factor - - if (modified) v = (spa.values)[j] - dropped[j]; - - v /= pivot; - L.I[next] = i; - L.X[next] = v; - - next++; - if (rowlist.add(i,j,v) == -1) { - return L; - } - break; - } - } - - //----------------------------------------------------- - // 2nd pass: build column L(:,j) applying droptol - // criteria to manage fill-in below the diagonal - //----------------------------------------------------- - for (ip=0; ip < spa.length; ++ip) - { - i = (spa.indices)[ip]; - v = (spa.values )[i ]; - - if (i==j) continue; // diagonal was set above - - //################################################### - // FIXME (b): test if L(i,j) is in pattern of A - //################################################### - - //if (modified && i==j) v = (spa.values)[j] - dropped[j]; - if (i==j || fabs(v) > droptol*norm || ip < Aj_nnz) - { - // include this entry in the droptol factor - v /= pivot; - L.I[next] = i; - L.X[next] = v; - - next++; - if (rowlist.add(i,j,v) == -1) { - return L; - } - } - } - L.P[j+1] = next; // set column count - Lj_nnz = (double)(L.P[j+1]-L.P[j]); // accumulate flop count - flops += 2.0 * Lj_nnz * Lj_nnz; - } - L.P[n] = next; // finalize column counts - - umLOG(1, "\n"); - -//umMSG(1, " ==> CS_Cholinc: nnz(L) = %d (init: %d), flops=%.1le\n", L.P[n],init_Lnnz,flops); - umMSG(1, " ==> CS_Cholinc: nnz(L) = %d (init: %d)\n", L.P[n],init_Lnnz); - - // resize allocation - L.realloc(0); - - return L; -} diff --git a/cpp/nudg++/trunk/Src/Sparse/CS_Solve.cpp b/cpp/nudg++/trunk/Src/Sparse/CS_Solve.cpp deleted file mode 100644 index 881e316..0000000 --- a/cpp/nudg++/trunk/Src/Sparse/CS_Solve.cpp +++ /dev/null @@ -1,814 +0,0 @@ -// CS_Solve.cpp -// Implementation of various sparse solvers using class CSd -// 2007/10/16 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CS_Type.h" - -#include "stopwatch.h" - - -/////////////////////////////////////////////////////////// -// -// class CSS (CS Symbolic) -// -/////////////////////////////////////////////////////////// - -//--------------------------------------------------------- -CSS::CSS() -//--------------------------------------------------------- - : pinv("CSS.pinv"), Q("CSS.Q"), parent("CSS.parent"), - cp("CSS.cp"), leftmost("leftmost"), m2(0), - lnz(0.0),unz(0.0),m_mode(OBJ_real) -{} - - -//--------------------------------------------------------- -CSS::~CSS() -//--------------------------------------------------------- -{ - Free(); -} - - -//--------------------------------------------------------- -void CSS::Free() -//--------------------------------------------------------- -{ - // force deallocation of arrays from registry - pinv.Free(); Q.Free(); parent.Free(); - cp.Free(); leftmost.Free(); -} - - -//--------------------------------------------------------- -void CSS::show_alloc() const -//--------------------------------------------------------- -{ - umMSG(1, "\nAllocations in Symbolic object:\n"); - umMSG(1, " pinv : %8d (int) \n", pinv.size()); - umMSG(1, " Q : %8d (int) \n", Q.size()); - umMSG(1, " parent: %8d (int) \n", parent.size()); - umMSG(1, " cp : %8d (int) \n", cp.size()); - umMSG(1, " leftmost: %8d (int) \n", leftmost.size()); - umMSG(1, " m2: %d lnz: %g unz: %g \n\n", m2, lnz, unz); -} - - -//--------------------------------------------------------- -bool CSS::ok() const -//--------------------------------------------------------- -{ - if (!cp.ok()) { return false; } // check column pointers - if (!parent.ok()) { return false; } // check elimination tree - // ... - return true; -} - - - -/////////////////////////////////////////////////////////// -// -// class CSN (CS Numeric) -// -/////////////////////////////////////////////////////////// - -//--------------------------------------------------------- -CSN::CSN() -//--------------------------------------------------------- - : L("CSN.L"),U("CSN.U"),C(NULL),E(NULL),m_mode(OBJ_real) -{} - - -//--------------------------------------------------------- -CSN::~CSN() -//--------------------------------------------------------- -{ - Free(); -} - - -//--------------------------------------------------------- -void CSN::Free() -//--------------------------------------------------------- -{ - // force deallocation of arrays from registry - L.reset(); U.reset(); pinv.Free(); B.Free(); -} - - -//--------------------------------------------------------- -void CSN::show_alloc() const -//--------------------------------------------------------- -{ - umMSG(1, "\nAllocations in Numeric object:\n"); - umMSG(1, " L : %8d (csc) \n", L.size()); - umMSG(1, " U : %8d (csc) \n", U.size()); - umMSG(1, " pinv : %8d (int) \n", pinv.size()); - umMSG(1, " B : %8d (dbl) \n\n", B.size()); -} - - -//--------------------------------------------------------- -bool CSN::ok() const -//--------------------------------------------------------- -{ - if (!L.ok()) return false; -//if (!U.ok()) return false; -//if (!pinv.ok()) return false; -//if (!B.ok()) return false; - return true; -} - - - -/////////////////////////////////////////////////////////// -// -// Cholesky factorization -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -CS_Chol::CS_Chol() -//--------------------------------------------------------- - : S(NULL), N(NULL) -{ -} - -//--------------------------------------------------------- -CS_Chol::~CS_Chol() -//--------------------------------------------------------- -{ - if (S) { delete S; S=NULL; } - if (N) { delete N; N=NULL; } -} - - -//--------------------------------------------------------- -int CS_Chol::chol(CSd& A, int order, double dummy) -//--------------------------------------------------------- -{ - // Perform Cholesky factorization using - // appropriate AMD re-ordering mode: - //--------------------------------------- - // 0: natural: C = A (no reordering) - // 1: Chol : C = A+A' - // 2: LU : C = A'*A (drop dense rows) - // 3: QR : C = A'*A - // 4: Chol#2 : C = A (A is symmetric) - //--------------------------------------- - - // clear existing system - if (S) { delete S; S = NULL; } - if (N) { delete N; N = NULL; } - - // check matrix input - if (!A.ok()) {umERROR("CS_Chol::chol", "empty matrix"); return 0;} - if (!A.is_csc()) {umERROR("CS_Chol::chol", "expected csc form"); return 0;} - if (!A.is_square()) {umERROR("CS_Chol::chol", "matrix must be square"); return 0;} - - umLOG(1, "\nCS_Chol:chol -- starting symbolic phase\n"); - try { - // ordering and symbolic analysis - S = CS_schol(order, A); - if (!S) { umERROR("CS_Chol::chol", "error building symbolic info"); return -1;} - } catch(...) { - umERROR("CS_Chol:chol", "exception in symbolic phase"); return -1; - } - umLOG(1, "CS_Chol:chol -- symbolic phase complete\n"); - umLOG(1, "CS_Chol:chol -- size of full Cholesky L = %1.0lf\n\n", S->lnz); - try { - // numeric Cholesky factorization - N = CS_chol(A, S, true); // take ownership of A's data - if (!N) { umERROR("CS_Chol::chol", "error building numeric data"); return -2;} - } catch(...) { - umERROR("CS_Chol:chol", "exception in numeric phase"); return -2; - } - - return 1; -} - - -//--------------------------------------------------------- -DVec& CS_Chol::solve(const DVec& rhs) -//--------------------------------------------------------- -{ - // use factored form to solve for rhs, return x=A\rhs - - // check {symbolic, numeric} data is ready - if (!S || !N) {umERROR("CS_Chol::solve", "system not factorized"); return x;} - - // allocate arrays - int n=rhs.size(); b=rhs; x.resize(n); - if (!b.ok()||!x.ok()) {umERROR("CS_Chol::solve", "out of memory"); return x;} - - CS_ipvec (S->pinv, b, x, n); // x = P*b - CS_lsolve (N->L, x); // x = L\x - CS_ltsolve(N->L, x); // x = L'\x - CS_pvec (S->pinv, x, b, n); // b = P'*x - return b; -} - - -//--------------------------------------------------------- -DVec& CS_Chol::chol_solve(int order, CSd& A, DVec& rhs) -//--------------------------------------------------------- -{ - // factor and solve for rhs, return x=A\rhs - assert(A.ok() && A.is_csc() && A.is_square()); - int n=A.n; b=rhs; x.resize(n); - if (!x.ok()||!b.ok()) { umERROR("CS_Chol::chol_solve", "out of memory"); } - - S = CS_schol(order, A); // ordering and symbolic analysis - N = CS_chol(A, S); // numeric Cholesky factorization - if (!S || !N) { umERROR("CS_Chol::chol_solve", "setup failed"); } - - CS_ipvec (S->pinv, b, x, n); // x = P*b - CS_lsolve (N->L, x); // x = L\x - CS_ltsolve(N->L, x); // x = L'\x - CS_pvec (S->pinv, x, b, n); // b = P'*x - delete S; delete N; - return b; -} - - -/////////////////////////////////////////////////////////// -// -// LU factorization -// -/////////////////////////////////////////////////////////// - -//--------------------------------------------------------- -CS_LU::CS_LU() -//--------------------------------------------------------- - : S(NULL), N(NULL) -{ -} - -//--------------------------------------------------------- -CS_LU::~CS_LU() -//--------------------------------------------------------- -{ - if (S) { delete S; S=NULL; } - if (N) { delete N; N=NULL; } -} - - -//--------------------------------------------------------- -int CS_LU::lu(const CSd& A, int order, double tol) -//--------------------------------------------------------- -{ - // Perform LU factorization using - // appropriate AMD re-ordering mode: - //--------------------------------------- - // 0: natural: C = A (no reordering) - // 1: Chol : C = A+A' - // 2: LU : C = A'*A (drop dense rows) - // 3: QR : C = A'*A - // 4: Chol#2 : C = A (A is symmetric) - //--------------------------------------- - - // clear existing system - if (S) { delete S; S = NULL; } - if (N) { delete N; N = NULL; } - - // check matrix input - if (!A.ok()) {umERROR("CS_LU::lu", "empty matrix"); return 0;} - if (!A.is_csc()) {umERROR("CS_LU::lu", "expected csc form"); return 0;} - if (!A.is_square()) {umERROR("CS_LU::lu", "matrix must be square"); return 0;} - - try { - // ordering and symbolic analysis - S = CS_sqr(order, A, 0); - if (!S) { umERROR("CS_LU::lu", "error building symbolic info"); return -1;} - } catch(...) { - umERROR("CS_LU::lu", "exception in symbolic phase"); return -1; - } - - try { - // numeric LU factorization - N = CS_lu(A, S, tol); - if (!N) { umERROR("CS_LU::lu", "error building numeric data"); return -2;} - } catch(...) { - umERROR("CS_LU::lu", "exception in numeric phase"); return -2; - } - - return 1; -} - - -//--------------------------------------------------------- -DVec& CS_LU::solve(const DVec& rhs) -//--------------------------------------------------------- -{ - // use factored form to solve for rhs, return x=A\rhs - - // check {symbolic, numeric} data is ready - if (!S || !N) {umERROR("CS_LU::solve", "system not factorized");} - - // allocate arrays - int n=rhs.size(); b=rhs; x.resize(n); - if (!b.ok()||!x.ok()) {umERROR("CS_LU::solve", "out of memory");} - if (N->L.n != n) {umERROR("CS_LU::solve", "rhs not compatible");} - - CS_ipvec (N->pinv, b, x, n); // x = b(p) - CS_lsolve(N->L, x); // x = L\x - CS_usolve(N->U, x); // x = U\x - CS_ipvec (S->Q, x, b, n); // b(q) = x - return b; -} - - -//--------------------------------------------------------- -DMat& CS_LU::solve(const DMat& RHS) -//--------------------------------------------------------- -{ - // use factored form to solve for MULTIPLE rhs's. - // return X=A\RHS - - if (!RHS.ok()) {umERROR("CS_LU::solve", "empty RHS");} - int n=RHS.num_rows(), Nrhs=RHS.num_cols(); - // check {symbolic, numeric} data is ready - if (!S || !N) {umERROR("CS_LU::solve", "system not factorized");} - if (N->L.n != n) {umERROR("CS_LU::solve", "RHS not compatible");} - - // allocate workspace and result - x.resize(n); if (!x.ok()) {umERROR("CS_LU::solve", "out of memory");} - DMat* B=new DMat(RHS, OBJ_temp,"A|B"); // copy rhs - - // FIXME: Check for zero matrix - - for (int j=1; j<=Nrhs; ++j) - { - b.borrow(n, B->pCol(j)); // get B(j) as jth RHS - CS_ipvec (N->pinv, b, x, n); // x = b(p) - CS_lsolve(N->L, x); // x = L\x - CS_usolve(N->U, x); // x = U\x - CS_ipvec (S->Q, x, b, n); // b(q) = x - } - return (*B); -} - - -/////////////////////////////////////////////////////////// -// -// Conjugate Gradients using cholinc preconditioner -// -/////////////////////////////////////////////////////////// - -// File: CS_Utils.cpp -void CS_symamd(CSd& cs_A, IVec& perm, IVec& pinv); - -// CSd& taucs_dccs_factor_llt(CSd& userA, double droptol, int modified); -CSd& CS_Cholinc(CSd& userA, double droptol, int modified); - - -#define OUT_TO_MATLAB 0 -#define APPLY_PERM 0 - -//--------------------------------------------------------- -int CS_PCG::cholinc(CSd &sp, double droptol) -//--------------------------------------------------------- -{ - m_droptol = droptol; - // take ownership of input matrix - this->A.own(sp); - - -#if (OUT_TO_MATLAB) - { - FILE* fp=fopen("z_A1.dat", "w"); - A.write_ML(fp); - fclose(fp); - } -#endif - - // check system - if (!A.ok()) { umERROR("CS_PCG::cholinc", "empty coefficient matrix."); } - if (!A.is_square()) { umERROR("CS_PCG::cholinc", "Matrix must be square."); } - - // new factorization: invalidate previous factor and solution - m_oldsol = false; - m_factor = false; - - // 1. find fill-reducing ordering - // 2. permute system (tril(A)) - // 3. build incomplete Cholesky preconditioner - - stopwatch timer; timer.start(); - double t1=0.0,t2=0.0; - - if (1) - { - int n = A.n, modified_flag = 0; - //double unit = (n-1.)+n; - double unit = A.P[n]; - umLOG(1, "\n -----------------------------------------------\n"); - umLOG(1, " ==> CS_PCG fac: incomplete Cholesky factorization\n"); - -#if (APPLY_PERM) - //----------------------------------- - // 1. find fill-reducing ordering - //----------------------------------- - t1=timer.read(); CS_symamd(A,perm,pinv); t2=timer.read(); - if (!perm.ok()) { umERROR("CS_PCG::cholinc", "symamd failed\n"); return -1; } - else { umLOG(1, "\tOrdering time = %10.3lf seconds\n", t2-t1); } -#endif - - -#if (APPLY_PERM) - //----------------------------------- - // 2. permute system (tril(A)) - //----------------------------------- - // FIXME: transpose - // CS_symperm expects triu(A) - // CS_symamd returns tril(A) -#if (1) - umLOG(1, "\ttransposing A before symperm... "); - t1 = timer.read(); A.transpose(1); umLOG(1, "(%.3lf secs)\n",timer.read()-t1); -#endif - - // uses inverse permutation - //PAPT = taucs_dccs_permute_symmetrically(A, pinv.data()); - t1=timer.read(); CSd PAPT = CS_symperm(A, pinv, 1); t2=timer.read(); - if (!PAPT.ok()) { umERROR("CS_PCG::cholinc", "symperm failed\n"); return -1; } - else { umLOG(1, "\tPermute time = %10.3lf seconds\n",t2-t1); } - -#if (OUT_TO_MATLAB) - { - FILE* fp=fopen("z_PAPT1.dat", "w"); - PAPT.write_ML(fp); - fclose(fp); - } -#endif // output -#endif // perm - - - -#if (APPLY_PERM) - //----------------------------------- - // 3. calc cholinc preconditioner - //----------------------------------- - // FIXME: undo transpose - // CS_Cholinc expects tril(PAPT) -#if (1) - umLOG(1, "\ttransposing PAP' before factorize... "); - t1=timer.read(); PAPT.transpose(1); umLOG(1, "(%.3lf secs)\n",timer.read()-t1); -#endif - - -#if (OUT_TO_MATLAB) - { - FILE* fp=fopen("z_PAPT2.dat", "w"); - PAPT.write_ML(fp); - fclose(fp); - } -#endif // output -#endif // perm - - - t1 = timer.read(); - //this->L = CS_Cholinc(PAPT,droptol,modified_flag); - this->L = CS_Cholinc(this->A,droptol,modified_flag); - t2 = timer.read(); - if (!this->L.ok()) { umERROR("CS_PCG::cholinc", "factor_llt failed\n"); return -1; } - double curr = L.P[n]; - umLOG(1, " ==> CS_PCG fac: nnz(A): %11.0lf\n" - " nnz(L): %11.0lf d.tol %0.1e\n" - " fillin: %11.0lf ratio %0.3lf\n" - " time: %11.2lf seconds\n", - unit, curr, droptol, curr-unit, curr/unit, t2-t1); - umLOG(1, " -----------------------------------------------\n\n"); - } - -#if (OUT_TO_MATLAB) - { - FILE* fp=fopen("z_L.dat", "w"); - this->L.write_ML(fp); - fclose(fp); - } - umERROR("Nigel", "Compare with Matlab"); -#endif - - m_factor = true; // cholinc() factor is now ready - return 0; -} - - -#define SHOW_ITER_CONVERG 1 - -//--------------------------------------------------------- -DVec& CS_PCG::solve(const DVec& rhs, double tol, int maxit) -//--------------------------------------------------------- -{ - // Use a preconditioned Conjugate Gradient method - // to return an iterative solution to: x = A\rhs. - // - // 1. permute rhs - // 2. solve using pcg - // 3. unpermute result - -#if (APPLY_PERM) - m_permute = true; -#else - m_permute = false; -#endif - - - // check system - if (!m_factor || !L.ok()) { umERROR("CS_PCG::solve", "cholinc factor not ready."); } - - // store user args - m_tol=tol; m_maxit=maxit; - - // store permuted rhs in pb - int n=rhs.size(); pb.resize(n); - if (m_permute) { - CS_ipvec(this->pinv, rhs, pb, n); // pb = P*rhs - } else { - pb = rhs; // pb = rhs - } - - if (!pb.ok()) { umERROR("CS_PCG::solve", "failed to permute rhs"); } - if (this->L.n != n) { umERROR("CS_PCG::solve", "rhs not compatible"); } - - //--------------------------------------------- - // When used during time-dependent simulations, - // set the initial solution vector to zero, but - // reuse previous solution on subsequent calls. - //--------------------------------------------- - - // work with permuted px = P(x), - // return unpermuted x = P(px), - - px.resize(n, false); // false -> don't bother initialising - if (!m_oldsol) { - px.fill(0.0); // initial guess is zero vector - x.resize(n); // allocate return vector - } - else - { - if (m_permute) { - // reapply permutation and use old solution as inital guess - CS_ipvec(this->pinv, x, px, n); // px = P*x - } else { - px = x; // px = x - } - } - - if (!px.ok() || !x.ok()) { umERROR("CS_PCG::solve", "out of memory"); } - - // check parameters - if (m_tol<=0.0) { m_tol = 1e-6; umWARNING("pcg", "resetting tol to %g (was %g).", m_tol, tol); } - if (m_maxit>n) { m_maxit=std::min(n,20); umWARNING("pcg", "setting maxit to %d (was %d).", m_maxit, maxit); } - - // Check for all zero right hand side vector => all zero solution - double n2b = pb.norm2(); // Norm of rhs vector, b - if (0.0 == n2b) { // if rhs vector is all zeros - x.resize(n,true,0.0); // then solution is all zeros - m_flag = 0; // a valid solution has been obtained - m_relres = 0; // the relative residual is actually 0/0 - m_iter = 0; // no iterations need be performed - m_resvec = 0; // resvec(1) = norm(b-A*x) = norm(0) - //if (m_verbose) {itermsg("pcg", m_tol,m_maxit,0,m_flag,m_iter,NaN);} - return x; - } - - // local variables - DVec xmin("xmin"), r("r"), z("z"), p("p"), q("q"), b_Ax("b-Ax"); - double tolb=0.0,normr=0.0,normrmin=0.0,rho=0.0,rho1=0.0,pq=0.0; - double alpha=0.0,beta=0.0; int i=0, imin=0; - // IVec stagtest(n, "stagtest"), ind("ind"); - - //------------------------------------------------------- - // Set up for pcg method - //------------------------------------------------------- - m_flag = 1; - imin = 0; // iteration at which xmin was computed - xmin = px; // iterate which has minimal residual so far - tolb = m_tol * n2b; // relative tolerance - r = pb - A*px; - normr = r.norm2(); // norm of residual - - if (normr <= tolb) { - m_flag = 0; // initial guess "x0" was good enough. - m_relres = normr / n2b; // since we have made no changes to x, - m_iter = 0; // just return old x without permuting - m_resvec = normr; - //if (m_verbose) {itermsg("pcg", m_tol,m_maxit,0,m_flag,m_iter,relres);} - //CS_pvec(this->pinv, px, x, n); // unpermute solution - m_oldsol = true; - return x; - } - - m_resvec.resize(m_maxit+1); // Preallocate vector for norm of residuals - m_resvec(1) = normr; // resvec(1) = norm(b-A*x0) - normrmin = normr; // Norm of minimum residual - rho = 1.0; - bool stag = false; // stagnation: flag failure to converge - bool bOk = true; // stagnation: flag failure to converge - - //------------------------------------------------------- - // loop for maxit iters, unless convergence or failure: - //------------------------------------------------------- - for (i=1; i<=m_maxit; ++i) - { - // apply cholinc preconditioner - z = solve_LLT(r); // z = LLT\r - //bOk = solve_LLT(r,z); // z = LLT\r - if (isInf(z)) - //if (!bOk) - { - m_flag = 2; break; - } - - rho1=rho; rho=inner(r,z); - - if ((0.0==rho) || isinf(rho)) { - m_flag = 4; break; - } - - if (1 == i) { - p = z; - } else { - beta = rho / rho1; - if ((0.0 == beta) || isinf(beta)) { - m_flag = 4; break; - } - //p = z + beta * p; - p*=beta; p+=z; - } - - q = A*p; - pq = inner(p,q); - - if ((pq <= 0) || isinf(pq)) { - m_flag = 4; break; - } else { - alpha = rho / pq; - } - - if (isinf(alpha)) { - m_flag = 4; break; - } - - // Check for stagnation of the method - if (0.0 == alpha) { stag = true; } - -#if (0) - //##################################################### - // TODO: Check for stagnation of the method - //##################################################### - if (!stag) { - stagtest.fill(0); - ind = find(x, '!', 0.0); - stagtest(ind) = dd(p(ind), x(ind)); - stagtest(~ind & p ~= 0) = Inf; - if (abs(alpha)*norm(stagtest,inf) < eps) {stag = true;} - } - //##################################################### -#endif - - // form new iterate - px += alpha * p; - b_Ax = pb - A*px; - normr = b_Ax.norm2(); - m_resvec(i+1) = normr; - - // check for convergence - if (normr <= tolb) { - m_flag = 0; m_iter = i; - -#if 1 - umLOG(1, " ==> CS_PCG sol: %3d %15.12lf\n", i, normr); -#endif - - break; - } - - // check for stagnation - if (stag) { - m_flag = 3; - break; - } - - // update minimal norm quantities - if (normr < normrmin) { - normrmin = normr; xmin = px; imin = i; - } - - r -= alpha * q; - -#if (SHOW_ITER_CONVERG) - umLOG(1, " ==> CS_PCG sol: %3d %15.12lf\n", i, normr); -#endif - - } // for i=1:m_maxit - - // returned solution is first with minimal residual - if (0 == m_flag) { - m_relres = normr / n2b; - } else { - px = xmin; - m_iter = imin; - m_relres = normrmin/n2b; - } - - // truncate the zeros from resvec - if ((m_flag <= 1) || (m_flag == 3)) { - m_resvec.truncate(i+1); - } else { - m_resvec.truncate(i); - } - - // optional report - if (m_verbose) { - // itermsg('pcg',m_tol,m_maxit,i,m_flag,m_iter,relres); - } - - if (m_permute) { - // unpermute the solution - CS_pvec(this->pinv, px, x, n); - } else { - x = px; - } - -#if (SHOW_ITER_CONVERG) - umLOG(1, "\n"); -#endif - - m_oldsol = true; - return x; -} - - -//--------------------------------------------------------- -DVec& CS_PCG::solve_LLT(const DVec& rhs) -//--------------------------------------------------------- -{ - // return x = [LL']\rhs - // - // Note: the system and the incomplete factor may or - // may not be permuted. This routine is called by the - // pcg method to accelerate convergence, so we don't - // want to permute and unpermute the rhs vector. The - // calling pcg driver manages permutation of the rhs. - -//assert(this->pinv.ok()); - assert(rhs.ok()); - assert(this->L.ok()); - assert(this->L.num_cols() == rhs.size()); - - this->prec_x = rhs; assert(prec_x.ok()); - -//CS_ipvec (this->pinv, b, x, n); // x = P*b - CS_lsolve (this->L, prec_x); // x = L\x - CS_ltsolve(this->L, prec_x); // x = L'\x -//CS_pvec (this->pinv, x, b, n); // b = P'*x - return prec_x; -} - - - -/////////////////////////////////////////////////////////// -// -// GMRES using incomplete LU preconditioner -// -/////////////////////////////////////////////////////////// - - -//--------------------------------------------------------- -int CS_GMRES::luinc(CSd &A, int order, double droptol) -//--------------------------------------------------------- -{ - umERROR("CS_GMRES::luinc", "Not yet implemented"); - - return 0; -} - - -//--------------------------------------------------------- -DVec& CS_GMRES::solve(const DVec& rhs) -//--------------------------------------------------------- -{ - // Use a preconditioned GMRES method - // to return an iterative solution to: x = A\rhs. - // - // 1. permute rhs - // 2. solve using gmres - // 3. unpermute result - - // CS_ipvec(S->pinv, b, x, n); // x = P*b - // CS_pcg (A, pCh, ...); // x = pcg(A, LLT, ...) - // CS_pvec (S->pinv, x, b, n); // b = P'*x - - // allocate solution (reference for syntax) - DVec* pX = new DVec("x", OBJ_temp); DVec& x = *pX; - x.set_mode(OBJ_real); // avoid premature delete - - umERROR("CS_GMRES::solve", "Not yet implemented"); - - return x; -} - diff --git a/cpp/nudg++/trunk/Src/Sparse/CS_Utils.cpp b/cpp/nudg++/trunk/Src/Sparse/CS_Utils.cpp deleted file mode 100644 index 39617df..0000000 --- a/cpp/nudg++/trunk/Src/Sparse/CS_Utils.cpp +++ /dev/null @@ -1,2116 +0,0 @@ -// CS_Utils.cpp -// utility routines used by sparse CS matrices -// 2007/10/08 -//--------------------------------------------------------- -#include "NDGLib_headers.h" -#include "CS_Type.h" - - - -//--------------------------------------------------------- -// column counts of LL'=A or LL'=A'A, given parent & post ordering -//--------------------------------------------------------- -#define HEAD(k,j) (ata ? head [k] : j) -#define NEXT(J) (ata ? next [J] : -1) -// helper routine for CS_counts -static void init_ata(const CSd& AT, const IVec& post, int *wd, int **head, int **next) -{ - int m=AT.n, n=AT.m, i=0,k=0,p=0; - *head = wd+4*n, *next = wd+5*n+1; - for (k=0; kresize(n); // allocate result - IVec& delta = (*colcount); // reference - IVec& ccnt = (*colcount); // reference - - IVec w(s); // workspace - CSd AT = trans(A, 0); // AT = A' - if (!AT.ok() || !colcount->ok() || !w.ok()) - { umERROR("CS_counts", "out of memory"); return (*colcount); } - int *wd=w.data(); - int *ancestor=wd, *maxfirst=wd+n, *prevleaf=wd+2*n, *first=wd+3*n; - w.fill(-1); // clear workspace w [0..s-1] - for (k=0; k= 1) delta[j]++ ; // A(i,j) is in skeleton - if (jleaf == 2) delta[q]-- ; // account for overlap in q - } - } - if (parent[j] != -1) ancestor[j] = parent[j]; - } - // sum up delta's of each child - for (j=0; j= n) && (b.size() >= n)); - if (p.size()>0) { - for (int k=0; k= n) && (b.size() >= n)); - if (p.size()>0) { - for (int k=0; kresize(n); assert(pinv->ok()); // allocate result - int* pid = pinv->data(); - for (int k=0; kresize(n); // allocate result - IVec w(3*n); // allocate workspace - if (!w.ok() || !post->ok()) {umWARNING("CS_post", "out of memory"); return (*post); } - int *wd=w.data(); int *head=wd, *next=wd+n, *stack=wd+2*n; - - int j=0, k=0; - for (j=0; j=0; j--) { // traverse nodes in reverse order - if (parent[j] == -1) continue; // j is a root - next[j] = head[parent[j]]; // add j to list of its parent - head[parent[j]] = j ; - } - for (j=0; jdata(), stack); - } - return (*post); // success; return post -} - - -/////////////////////////////////////////////////////////// -// -// triangular solves: CS_[l,lt,u,ut]solve -// -/////////////////////////////////////////////////////////// - -// solve Lx=b where x and b are dense. -// x=b on input, solution on output. -//--------------------------------------------------------- -int CS_lsolve(const CSd& L, DVec& x) -//--------------------------------------------------------- -{ - assert( L.ok() && L.is_csc() && x.ok() ); - - int n = L.n; - for (int j=0; j=0; j--) { - for (int p=L.P[j]+1; p=0; j--) { - x[j] /= U.X[U.P[j+1]-1]; - for (int p=U.P[j]; p= rr[1] && i < rr[2]); -} - - -//--------------------------------------------------------- -// helper routine for CSd::dmperm() -// collect matched rows and columns into p and q -//--------------------------------------------------------- -void CS_matched -( - int n, - const int *wj, - const int *imatch, - IVec& p, IVec& q, - int *cc, int *rr, - int set, int mark -) -//--------------------------------------------------------- -{ - int kc = cc[set]; - int kr = rr[set-1]; - for (int j=0; j=0) continue; // skip j if matched - wj[j] = 0; // j in set C0 (R0 if transpose) - queue[tail++] = j; // place unmatched col j in queue - } - if (0 == tail) return true; // quick return if no unmatched nodes - - // select either A or At - CSd *C = NULL; bool use_trans=false; - if (1==mark) { - C = const_cast(&A); - } else { - use_trans = true; // bfs of C=A' to find R3,C3 from R0 - C = new CSd(trans(A,0)); // copy structure only - if (!C->ok()) { delete C; return false; } - } - - const IVec& Ap=C->P, &Ai=C->I; // use references - while (head < tail) // while queue is not empty - { - j = queue[head++]; // get the head of the queue - for (p=Ap[j]; p= 0) continue; // skip if i is marked - wi[i] = mark; // i in set R1 (C3 if transpose) - j2 = jmatch[i]; // traverse alternating path to j2 - if (wj[j2] >= 0) continue; // skip j2 if it is marked - wj[j2] = mark; // j2 in set C1 (R3 if transpose) - queue[tail++] = j2; // add j2 to queue - } - } - if (use_trans) { delete C; } // free A' if created - - return true; -} - - -//--------------------------------------------------------- -// helper routine for CSd::SCC() -// depth-first-search of matrix graph, starting at node j -//--------------------------------------------------------- -int CS_dfs -( - int j, CSd& G, int top, IVec& xi, - int *pstack, const int *pinv -) -//--------------------------------------------------------- -{ - if (!G.ok() || !G.is_csc() || !xi.ok() || !pstack) - { umWARNING("CS_dfs", "invalid args"); return -1; } - - int i=0, p=0, p2=0, done=0, jnew=0; - int head=0; - xi[0] = j; // initialize the recursion stack - while (head >= 0) - { - j = xi[head]; // get j from the top of the recursion stack - jnew = pinv ? (pinv[j]) : j; - if (! CS_MARKED (G.P,j)) { - CS_MARK (G.P, j); // mark node j as visited - pstack[head] = (jnew<0) ? 0 : CS_UNFLIP (G.P[jnew]); - } - done = 1; // node j done if no unvisited neighbors - p2 = (jnew<0) ? 0 : CS_UNFLIP (G.P[jnew+1]); - for (p=pstack[head]; p= 0) // while (stack is not empty) - { - p = stack[top]; // p = top of stack - i = head [p]; // i = youngest child of p - if (i == -1) { - top-- ; // p has no unordered children left - post[k++] = p; // node p is the kth postordered node - } else { - head [p] = next[i]; // remove i from children of p - stack[++top] = i; // start dfs on child node i - } - } - return k; -} - - -//--------------------------------------------------------- -// helper routine for CSd::maxtrans() -// -// find an augmenting path starting at column k -// and extend the match if found -//--------------------------------------------------------- -void CS_augment -( - int k, const CSd &A, - int *jmatch, int *cheap, - IVec& w, int *js, int *is, int *ps -) -//--------------------------------------------------------- -{ - int found=0, i = -1, head=0, j=0, p=0; - const IVec &Ap=A.P, &Ai=A.I; - js[0] = k; // start with just node k in jstack - while (head >= 0) - { - //----------------------------------------------------- - // Start (or continue) depth-first-search at node j - //----------------------------------------------------- - j = js[head]; // get j from top of jstack - if (w[j] != k) // 1st time j visited for kth path - { - w[j] = k; // mark j as visited for kth path - for (p=cheap[j]; p=0; p--) { jmatch[is[p]] = js[p]; } - } -} - - -//--------------------------------------------------------- -// helper routine for CSd::qrsym() -// -// compute nnz(V) = S->lnz, S->pinv, S->leftmost, S->m2 -// from A and S->parent -//--------------------------------------------------------- -int CS_vcount(const CSd &A, CSS *S) -//--------------------------------------------------------- -{ - int n=A.n, m=A.m; // dimensions - S->pinv.resize(m+n); // allocate pinv, - S->leftmost.resize(m); // and leftmost - IVec w(m+3*n); // workspace - if (!S->pinv.ok() || !w.ok() || !S->leftmost.ok()) - { umERROR("CS_vcount", "out of memory."); return 0; } - int *wd = w.data(); - int *next=wd, *head=wd+m, *tail=wd+m+n, *nque=wd+m+2*n; - - int i=0, k=0, p=0, pa=0; - for (k=0; kleftmost[i] = -1; - for (k=n-1; k >=0; k--) { - for (p=A.P[k]; pleftmost[A.I[p]] = k; // leftmost[i] = min(find(A(i,:))) - } - } - for (i=m-1; i>=0; i--) { // scan rows in reverse order - S->pinv[i] = -1; // row i is not yet ordered - k = S->leftmost[i]; - if (-1 == k) continue; // row i is empty - if (nque[k]++ == 0) tail[k]=i; // first row in queue k - next[i] = head[k]; // put i at head of queue k - head[k] = i; - } - S->lnz = 0; - S->m2 = m; - for (k=0; klnz++; // count V(k,k) as nonzero - if (i<0) i = S->m2++; // add a fictitious row - S->pinv[i] = k; // associate row i with V(:,k) - if (--nque[k]<=0) continue; // skip if V(k+1:m,k) is empty - S->lnz += nque[k]; // nque [k] is nnz (V(k+1:m,k)) - if ((pa=S->parent[k]) != -1) // move all rows to parent of k - { - if (nque[pa] == 0) tail[pa] = tail[k]; - next[tail [k]] = head[pa]; - head[pa] = next[i]; - nque[pa] += nque[k]; - } - } - for (i=0; ipinv[i]<0) { - S->pinv[i] = k++; - } - } - return 1; -} - - - -/////////////////////////////////////////////////////////// -// -// qr factorization/solve -// -/////////////////////////////////////////////////////////// - - - -// x=A\b where A can be rectangular; -// b is overwritten with solution -//--------------------------------------------------------- -bool CS_qrsol(int order, const CSd& A, DVec& b) -//--------------------------------------------------------- -{ - if (!A.is_csc()) {umWARNING("CS_qrsol", "expected csc matrix"); return false;} - if (!b.ok()) {umWARNING("CS_qrsol", "empty rhs"); return false;} - - CSS *S=NULL; CSN *N=NULL; - bool bOk=false; int k=0; - - int n=A.n, m=A.m; - if (m >= n) { - S = CS_sqr(order, A, 1); // ordering and symbolic analysis - N = CS_qr(A, S); // numeric QR factorization - DVec x(S ? S->m2 : 1); // get workspace - bOk = (S && N && x.ok()); - if (bOk) - { - CS_ipvec(S->pinv, b, x, m); // x(0:m-1) = b(p(0:m-1). x is workspace - for (k=0; kL, k, N->B[k], x); - } - CS_usolve(N->U, x); // x = R\x - CS_ipvec(S->Q, x, b, n); // b(q(0:n-1)) = x(0:n-1) - } - } - else - { - CSd AT = trans(A,1); // Ax=b is underdetermined - S = CS_sqr(order, AT, 1); // ordering and symbolic analysis - N = CS_qr(AT, S); // numeric QR factorization of A' - DVec x(S?S->m2:1); // workspace - bOk = (AT.ok() && S && N && x.ok()); - if (bOk) - { - CS_pvec(S->Q, b, x, m); // x(q(0:m-1)) = b(0:m-1) - CS_utsolve(N->U, x); // x = R'\x - for (k=m-1; k>=0; k--) { // apply Householder refl. to x - CS_happly(N->L, k, N->B[k], x); - } - CS_pvec(S->pinv, x, b, n); // b(0:n-1) = x(p(0:n-1)) - } - } - if (S) { delete S; } - if (N) { delete N; } - - return bOk; -} - - -// symbolic ordering and analysis for QR or LU -//--------------------------------------------------------- -CSS* CS_sqr(int order, const CSd& A, int qr) -//--------------------------------------------------------- -{ - if (!A.is_csc()) {umERROR("CS_sqr","expected csc matrix"); return NULL;} - - CSS *S=new CSS; // allocate result S - if (!S) return NULL; // out of memory - int n=A.n, k=0; bool bOk = true; - - S->Q = CS_amd(order, A); // fill-reducing ordering - if (order && !S->Q.ok()) { - umERROR("CS_sqr","amd ordering failed"); - delete S; return NULL; - } - - if (qr) // QR symbolic analysis - { - CSd *C=NULL; - bool freeC=false; - if (order) { - C = new CSd("t.CS_sqr"); - freeC = true; // C is locally allocated - C->copy(A, 0); - C->permuteQ(S->Q, 0); - } else { - C = const_cast(&A); // C points to external object - } - S->parent = C->etree(1); // etree of C'*C, where C=A(:,q) - IVec post = CS_post(S->parent, n); - S->cp = CS_counts((*C), S->parent, post, 1); // col counts chol(C'*C) - bOk = (C->ok() && S->parent.ok() && S->cp.ok()); - bOk = bOk && CS_vcount((*C),S); - if (bOk) { - for (S->unz=0, k=0; kunz += S->cp[k]; - } - } - bOk = bOk && (S->lnz>=0 && S->unz>=0); // int overflow guard - if (C && freeC) { delete C; } - } - else - { - S->unz = 4*(A.P[n])+n; // for LU factorization only, - S->lnz = S->unz; // guess nnz(L) and nnz(U) - } - - if (bOk) { - return S; // return result S - } else { - delete S; - return NULL; // failed - } -} - - -// sparse QR factorization [V,beta,pinv,R] = qr (A) -//--------------------------------------------------------- -CSN* CS_qr(const CSd& A, const CSS *S) -//--------------------------------------------------------- -{ - if (!A.is_csc()) {umWARNING("CS_qr","expected csc matrix"); return NULL;} - if (!S) {umTRC(1, "CS_qr: invalid symbolic data\n"); return NULL;} - - int i=0, k=0, p=0, p1=0, top=0, len=0, col=0; - int m=A.m, n=A.n, m2=S->m2, vnz=(int)S->lnz, rnz=(int)S->unz; - const IVec &q=S->Q, &parent=S->parent, &pinv=S->pinv, &leftmost=S->leftmost; - IVec w(m2+n); DVec x(m2); // workspaces - CSN *N = new CSN; // allocate result - if (!w.ok() || !x.ok() || !N) { umERROR("CS_qr","out of memory"); delete N; return NULL; } - - int *wd = w.data(); - int *s = wd + m2; // s is size n - x.fill(0.0); // clear workspace x - - N->L.resize(m2, n, vnz, 1, 0); // allocate result V - N->U.resize(m2, n, rnz, 1, 0); // allocate result R - N->B.resize(n); // allocate result Beta - - if (!N->ok()) { - umERROR("CS_qr", "failed to allocate CSN structure"); - delete N; return NULL; - } - - // create references into the CSN object - CSd &V=N->L, &R=N->U; - - IVec &Rp=R.P, &Ri=R.I; DVec &Rx=R.X; - IVec &Vp=V.P, &Vi=V.I; DVec &Vx=V.X; - for (i=0; iB.data(); - double *Vxd = Vx.data(); - - bool bQ = q.ok(); // check for col permutation - rnz = 0; vnz = 0; - for (k=0; k 0) s[--top] = s[--len]; // push path on stack - i = pinv[A.I[p]]; // i = permuted row of A(:,col) - x [i] = A.X[p]; // x (i) = A(:,col) - if (i>k && w[i]ok()); - return N; // success -} - - - - -/////////////////////////////////////////////////////////// -// -// lu factorization/solve -// -/////////////////////////////////////////////////////////// - - -// operator version: x = A\b (single RHS) -//--------------------------------------------------------- -DVec& operator | (const CSd& A, const DVec& b) -//--------------------------------------------------------- -{ - int len=A.num_rows(); - assert(A.is_square() && (b.size() == len)); - - DVec *x=new DVec(b,OBJ_temp,"A|b"); // copy rhs - - // Select solver depending on shape/symmetry - int shape = A.get_shape(); - - if (sp_NONE == shape) { // use LU for general matrix - int order=2; // AMD reordering: C = A'*A (drop dense rows) - double tol=1.0; // partial pivoting scale factor - CS_lusol(order,A,(*x),tol); // overwrites x with solution - } - else if ((sp_LOWER & shape) && (sp_SYMMETRIC & shape)) { - CSd A2 = trans(A); // currently expects upper tri - int order=1; // AMD reordering: C = A+A' - CS_cholsol(order, A2, (*x)); // overwrites x with solution - } - else if (sp_SYMMETRIC & shape) { - CSd& A2 = const_cast(A); // expects non-const arg - int order=1; // AMD reordering: C = A+A' - CS_cholsol(order, A2, (*x)); // overwrites x with solution - } - else { - umERROR("operator | (CSd&, DVec&)", - "The shape of this sparse matrix is set to %d\n" - "Please adjust solver to handle this shape.\n", shape); - } - return (*x); -} - - -// operator version: X = A\B (multiple RHS's) -//--------------------------------------------------------- -DMat& operator | (const CSd& A, const DMat& B) -//--------------------------------------------------------- -{ - int len=A.num_rows(); - assert(A.is_square() && (B.num_rows() == len)); - - DMat *X=new DMat(B,OBJ_temp,"A|B"); // copy rhs - int order=2; // AMD reordering mode - double tol=1.0; // partial pivoting scale factor - CS_lusol(order, A, (*X), tol); // overwrites X with solution - return (*X); -} - - - - -// x=A\b where A is unsymmetric; -// b overwritten with solution (single RHS) -// tol: partial pivoting "scale factor" -//--------------------------------------------------------- -bool CS_lusol(int order, const CSd& A, DVec& b, double tol) -//--------------------------------------------------------- -{ - assert(A.ok() && A.is_csc() && A.is_square()); - int n = A.n; CSS *S=NULL; CSN *N=NULL; bool bOk=false; - - S = CS_sqr(order, A, 0); // ordering and symbolic analysis - N = CS_lu(A, S, tol); // numeric LU factorization - DVec x(n); // workspace - bOk = (S && N && x.ok()); - if (bOk) { - CS_ipvec (N->pinv, b, x, n); // x = b(p) - CS_lsolve(N->L, x); // x = L\x - CS_usolve(N->U, x); // x = U\x - CS_ipvec (S->Q, x, b, n); // b(q) = x - } - if (S) { delete S; } - if (N) { delete N; } - - return bOk; -} - - -// X=A\B where A is unsymmetric; -// B overwritten with solution (multiple RHS's) -// tol: partial pivoting "scale factor" -//--------------------------------------------------------- -bool CS_lusol(int order, const CSd& A, DMat& B, double tol) -//--------------------------------------------------------- -{ - assert(A.ok() && A.is_csc() && A.is_square()); - int n = A.n; CSS *S=NULL; CSN *N=NULL; bool bOk=false; - int Nrhs = B.num_cols(); - - S = CS_sqr(order, A, 0); // ordering and symbolic analysis - N = CS_lu(A, S, tol); // numeric LU factorization - DVec x(n), b; // workspace - bOk = (S && N && x.ok()); - if (bOk) { - for (int j=1; j<=Nrhs; ++j) - { - b.borrow(n, B.pCol(j)); // get B(j) as jth RHS - CS_ipvec (N->pinv, b, x, n); // x = b(p) - CS_lsolve(N->L, x); // x = L\x - CS_usolve(N->U, x); // x = U\x - CS_ipvec (S->Q, x, b, n); // b(q) = x - } - } - if (S) { delete S; } - if (N) { delete N; } - - return bOk; -} - - - -// [L,U,pinv]=lu(A, [q lnz unz]). lnz and unz can be guess -// tol: partial pivoting "scale factor" -//--------------------------------------------------------- -CSN* CS_lu(const CSd& A, const CSS *S, double tol) -//--------------------------------------------------------- -{ - if (!A.is_square()) {umWARNING("CS_lu","matrix is not square"); return NULL;} - if (!A.is_csc()) {umWARNING("CS_lu","expected csc matrix"); return NULL;} - if (!S) {umTRC(1, "CS_lu: invalid symbolic data"); return NULL;} - - int n = A.n, lnz=(int)S->lnz, unz=(int)S->unz; - int ipiv=0, k=0, top=0, p=0, i=0, col=0; - double pivot=0.0, a=0.0, t=0.0; - const IVec &q=S->Q; DVec x(n); IVec xi(2*n); // {x,xi} are workspaces - CSN *N = new CSN; // allocate result - if (!x.ok() || !xi.ok() || !N) { umERROR("CS_lu","out of memory"); delete N; return NULL; } - - N->L.resize(n, n, lnz, 1, 0); // allocate result L - N->U.resize(n, n, unz, 1, 0); // allocate result U - N->pinv.resize(n); // allocate result pinv - - if (!N->ok()) { - umERROR("CS_lu", "failed to allocate CSN structure"); - delete N; N=NULL; return NULL; - } - - // create references into the CSN object - CSd &L=N->L, &U=N->U; IVec &pinv=N->pinv, &Lp=L.P, &Up=U.P; - - x.fill(0.0); // clear workspace - pinv.fill(-1); // no rows pivotal yet - L.P.fill(0); // no cols of L yet - bool bQ = q.ok(); // check for col permutation - lnz = unz = 0; // reset nnz estimates - - for (k=0; k L.nzmax) { if (!L.realloc(2*L.nzmax+n)) {delete N; return NULL;} } - if (unz+n > U.nzmax) { if (!U.realloc(2*U.nzmax+n)) {delete N; return NULL;} } - IVec& Li=L.I, &Ui=U.I; DVec& Lx=L.X, &Ux=U.X; - col = bQ ? (q[k]) : k; - top = CS_spsolve(L, A, col, xi, x, pinv, 1) ; // x = L\A(:,col) - //----------------------------------------------------- - // Find pivot - //----------------------------------------------------- - ipiv = -1; - a = -1.0; - for (p=top; p a) { - a = t; // largest pivot candidate so far - ipiv = i; - } - } else { // x(i) is the entry U(pinv[i],k) - Ui[unz] = pinv[i]; - Ux[unz++] = x[i]; - } - } - if (ipiv == -1 || a <= 0.0) { - umWARNING("CS_lu","no pivot for row %d", k); - delete N; return NULL; - } - if (pinv[col]<0 && fabs(x[col]) >= a*tol) { - ipiv = col; - } - //----------------------------------- - // Divide by pivot - //----------------------------------- - pivot = x[ipiv]; // the chosen pivot - Ui[unz] = k; // last entry in U(:,k) is U(k,k) - Ux[unz++] = pivot; - pinv[ipiv] = k; // ipiv is the kth pivot row - Li[lnz] = ipiv; // first entry in L(:,k) is L(k,k) = 1 - Lx[lnz++] = 1; - for (p=top; ppinv, b, x, n); // x = P*b - CS_lsolve (N->L, x); // x = L\x - CS_ltsolve(N->L, x); // x = L'\x - CS_pvec (S->pinv, x, b, n); // b = P'*x - } - if (S) { delete S; } - if (N) { delete N; } - - return bOk; -} - - -// ordering and symbolic analysis for a Cholesky factorization -//--------------------------------------------------------- -CSS* CS_schol(int order, const CSd& A) -//--------------------------------------------------------- -{ - if (!A.is_square()) {umERROR("CS_schol","matrix must be square"); return NULL;} - if (!A.is_csc()) {umERROR("CS_schol","expected csc matrix"); return NULL;} - - CSS *S=new CSS; // allocate result S - if (!S) return NULL; // out of memory - int n=A.n; - IVec post,c; - - IVec P = CS_amd(order, A); // P = amd(A+A'), or natural - S->pinv = CS_pinv(P, n); // find inverse permutation - P.Free(); // release workspace - if (order && !S->pinv.ok()) { - umERROR("CS_schol","error creating amd permutation"); - delete S; return NULL; - } - - CSd C = CS_symperm(A, S->pinv, 0); // C = spones(triu(A(P,P))) - S->parent = C.etree(0); // find etree of C - post = CS_post(S->parent, n); // postorder the etree - c = CS_counts(C,S->parent,post,0); // find column counts of chol(C) - - S->cp.resize(n+1); // allocate result S->cp - S->lnz = CS_cumsum(S->cp, c, n); // find column pointers for L - S->unz = S->lnz; // estimate nnz in {L,U} - - C.reset(); // force deallocation - - if (S->lnz >= 0) { - return S; // return result S - } else { - delete S; - return NULL; // failed - } -} - - -// L = chol (A, [pinv parent cp]), pinv is optional -//--------------------------------------------------------- -CSN* CS_chol(CSd& A, const CSS *S, bool own_A) -//--------------------------------------------------------- -{ - if (!A.is_csc()) {umWARNING("CS_chol","expected csc matrix"); return NULL;} - if (!S) {umWARNING("CS_chol","empty symbolic data"); return NULL;} - if (!S->cp.ok() || !S->parent.ok()) {umWARNING("CS_chol", "symbolic data not ready"); return NULL;} - - double d=0.0, lki=0.0; - int n=A.n, top=0,i=0,p=0,k=0; - CSd *C = new CSd("t.CS_chol"); - const IVec &cp=S->cp, &pinv=S->pinv, &parent=S->parent; - bool bPi = pinv.ok(), freeC=false; - - if (own_A) - { - // NBN: attempting to reduce memory overhead. - // Let C take ownership of A's data, resetting A to empty. - // Since only the upper triangle is stored, and C - // is also deleted once factorization is complete, - // larger (symmetric) operators may be factorized. - - freeC = true; // release C after factorization - C->own(A); - if (bPi) { - C->symperm(pinv,1); // permute in-place - } - } - else - { - if (bPi) { - (*C) = CS_symperm(A,pinv,1); // C is locally allocated - freeC = true; // ... so relese after use - } else { - C = const_cast(&A); // C points to external object - } - } - - CSN *N = new CSN; // allocate result - IVec c(2*n); DVec x(n); // get workspaces - if (!N || !c.ok() || !x.ok() || !C->ok()) { - umWARNING("CS_chol", "error allocating arrays"); - if (freeC) { delete C; } - delete N; return NULL; - } - - umLOG(1, "\n ==> CS_chol: resize N->L(%d,%d), nnz = %d\n", n,n,cp[n]); - N->L.resize(n, n, cp[n], 1, 0); // allocate result -//umLOG(1, "*** CS_chol: resized.\n"); - - if (!N->L.ok()) { - umWARNING("CS_chol", "error allocating N->L(%d)", n); - if (freeC) { delete C; } - delete N; return NULL; - } - - CSd& L=N->L; int *cd=c.data(); int *s=cd+n; - IVec &Lp=L.P, &Li=L.I; DVec &Lx=L.X; - IVec &Cp=C->P, &Ci=C->I; DVec &Cx=C->X; - for (k=0; k CS_chol: (n=%d) ", n); - for (k=0; kereach(k, parent, s, cd); // find pattern of L(k,:) - x[k] = 0; // x (0:k) is now zero - for (p=Cp[k]; p=n); // check for (optional) permutation - IVec w(n); // workspace - C->resize(n,n,A.P[n],values,0); // resize csc result - if (!C->ok() || !w.ok()) {umERROR("CS_symperm(CSd, ...)", "out of memory"); return (*C);} - - for (j=0; jj) continue; // skip lower triangle of A - i2 = bp ? pinv[i]: i; // row i of A is row i2 of C - w[std::max(i2,j2)]++ ; // column count of C - } - } - C->cumsum(w, n); // compute column pointers of C - for (j=0; jj) continue; // skip lower triangle of A - i2 = bp ? pinv[i] : i; // row i of A is row i2 of C - C->I[q=w[std::max(i2,j2)]++] = std::min(i2,j2); - if (values) C->X[q] = A.X[p]; - } - } - return (*C); // success -} - - -//--------------------------------------------------------- -// AMD reordering -//--------------------------------------------------------- - -// helper for CS_amd: clear w -static int CS_wclear(int mark, int lemax, int *w, int n) -{ - if (mark < 2 || (mark + lemax < 0)) { - for (int k=0; k 4) { umWARNING("CS_amd(order:%d)", "expected order[0:4]", order); return (*P); } - if (!A.is_csc() || !A.ok()) {umERROR("CS_amd(order:%d)", "expected csc form", order); return (*P); } - - int i=0, j=0, k=0, k1=0, k2=0, k3=0, mark=0; - int p=0,p1=0,p2=0,p3=0,p4=0,pj=0,pk=0,pk1=0,pk2=0,pn=0,q=0,t=0; - int d=0,dk=0,dext=0,e=0,elenk=0,eln=0,jlast=0,ln=0; - int nvi=0, nvj=0, nvk=0, wnvi=0; - int lemax=0, mindeg=0, nel=0; - unsigned int h=0; - bool bOk=false; - - CSd C("C.amd"), AT("AT.amd"); - - if (4 != order) - { - // need to compute A' - AT = trans(A, 0); - if (!AT.ok()) { - umERROR("CS_amd(order:%d)", "failed to create transpose", order); - return (*P); - } - } - - int m=A.m, n=A.n; - // find dense threshold - int dense = (int)std::max(16.0, 10*sqrt((double)n)); - dense = std::min(n-2, dense); - - //------------------------------------- - // assemble matrix C according to order - //------------------------------------- - - if (1==order && n==m) - { - C = A + AT; // enforce symmetry - } - else if (2 == order) - { - // drop dense columns from AT - for (p2=0, j=0; j dense) continue; // skip dense col j - for ( ; presize(n+1); // allocate result - IVec W(8*(n+1)); // workspace - if (!P->ok() || !W.ok()) { - umERROR("CS_amd(order:%d)", "out of memory", order); - return (*P); - } - t = cnz + cnz/5 + 2*n; // expand (nnz) capacity in C - if (!C.realloc(t)) { - umERROR("CS_amd(order:%d)", "failed to realloc C (%g)", order, t); - return (*P); - } - - int *wd =W.data(); - int *len =wd , *nv =wd+ (n+1), *next =wd+2*(n+1); - int *head=wd+3*(n+1), *elen =wd+4*(n+1), *degree=wd+5*(n+1); - int *w =wd+6*(n+1), *hhead=wd + 7*(n+1); - int *last=P->data(); // use P as workspace for last - - //------------------------------------------------------- - // Initialize quotient graph - //------------------------------------------------------- - for (k=0; kdense) { // node i is dense - nv[i] = 0; // absorb i into element n - elen[i] = -1; // node i is dead - nel++; - Cp[i] = CS_FLIP (n); - nv[n]++; - } else { - if (head[d] != -1) last[head[d]] = i; - next[i] = head[d]; // put node i in degree list d - head[d] = i; - } - } - - while (nel < n) // while (selecting pivots) do - { - //----------------------------------------------------- - // Select node of minimum approximate degree - //----------------------------------------------------- - for (k = -1; mindeg0 && (cnz+mindeg)>=nzmax) { - for (j=0; j= 0) // j is a live node or element - { - Cp[j] = Ci[p]; // save first entry of object - Ci[p] = CS_FLIP (j); // first entry is now CS_FLIP(j) - } - } - for (q=0, p=0; p= 0) // found object j - { - Ci[q] = Cp[j]; // restore first entry of object - Cp[j] = q++; // new pointer to object j - for (k3=0; k3 elenk) { - e = k; // search the nodes in k - pj = p; // list of nodes starts at Ci[pj] - ln = len[k]-elenk; // length of list of nodes in k - } else { - e = Ci[p++]; // search the nodes in e - pj = Cp[e]; - ln = len[e]; // length of list of nodes in e - } - for (k2=1; k2<=ln; ++k2) - { - i = Ci[pj++]; - if ((nvi = nv[i]) <= 0) - continue; // node i dead, or seen - dk += nvi; // degree[Lk] += size of node i - nv[i] = -nvi; // negate nv[i] to denote i in Lk - Ci[pk2++] = i; // place i in Lk - if (next[i] != -1) last [next[i]] = last[i]; - if (last[i] != -1) { // remove i from degree list - next[last[i]] = next[i]; - } else { - head[degree[i]] = next[i]; - } - } - if (e != k) { - Cp[e] = CS_FLIP (k); // absorb e into k - w [e] = 0; // e is now a dead element - } - } - if (elenk != 0) cnz = pk2; // Ci [cnz...nzmax] is free - degree[k] = dk; // external degree of k - |Lk\i| - Cp [k] = pk1; // element k is in Ci[pk1..pk2-1] - len [k] = pk2 - pk1; - elen[k] = -2; // k is now an element - //----------------------------------------------------- - // Find set differences - //----------------------------------------------------- - mark = CS_wclear(mark, lemax, w, n); // clear w if necessary - for (pk=pk1; pk= mark) { - w[e] -= nvi; // decrement |Le\Lk| - } else if (w[e] != 0) { // ensure e is a live element - w[e] = degree[e] + wnvi; // 1st time e seen in scan 1 - } - } - } - - //----------------------------------------------------- - // Degree update - //----------------------------------------------------- - for (pk=pk1; pk0) { - d += dext; // sum up the set differences - Ci[pn++] = e; // keep e in Ei - h += e; // compute the hash of node i - } else { - Cp[e] = CS_FLIP (k); // aggressive absorb. e->k - w [e] = 0; // e is a dead element - } - } - } - elen[i] = pn-p1+1; // elen[i] = |Ei| - p3 = pn; - p4 = p1 + len [i]; - for (p = p2 + 1; p < p4; p++) // prune edges in Ai - { - j = Ci [p]; - if ((nvj = nv [j]) <= 0) continue; // node j dead or in Lk - d += nvj; // degree(i) += |j| - Ci [pn++] = j; // place j in node list of i - h += j; // compute hash for node i - } - if (d == 0) // check for mass elimination - { - Cp[i] = CS_FLIP (k); // absorb i into k - nvi = -nv [i]; - dk -= nvi; // |Lk| -= |i| - nvk += nvi; // |k| += nv[i] - nel += nvi; - nv[i] = 0; - elen[i] = -1; // node i is dead - } - else - { - degree [i] = std::min(degree [i], d); // update degree(i) - Ci[pn] = Ci[p3]; // move first node to end - Ci[p3] = Ci[p1]; // move 1st el. to end of Ei - Ci[p1] = k; // add k as 1st element in of Ei - len[i] = pn-p1+1; // new len of adj. list of node i - h %= n; // finalize hash of i - next[i] = hhead[h]; // place i in hash bucket - hhead[h] = i; - last[i] = h; // save hash of i in last[i] - } - } // scan2 is done - - degree[k] = dk; // finalize |Lk| - lemax = std::max(lemax, dk); - mark = CS_wclear(mark+lemax, lemax, w, n); // clear w - //----------------------------------------------------- - // Supernode detection - //----------------------------------------------------- - for (pk=pk1; pk= 0) continue; // skip if i is dead - h = last[i]; // scan hash bucket of node i - i = hhead[h]; - hhead[h] = -1; // hash bucket will be empty - for ( ; i != -1 && next[i] != -1; i=next[i], mark++) - { - ln = len[i]; - eln = elen[i]; - for (p=Cp[i]+1; p<=Cp[i]+ln-1; ++p) w[Ci[p]] = mark; - jlast = i; - for (j=next[i]; j != -1; ) // compare i with all j - { - bOk = (len[j] == ln) && (elen[j] == eln); - for (p=Cp[j]+1; bOk && p<=Cp[j]+ln-1; ++p) - { - if (w[Ci[p]] != mark) // compare i and j - bOk = false; - } - if (bOk) { // i and j are identical - Cp[j] = CS_FLIP (i); // absorb j into i - nv[i] += nv[j]; - nv[j] = 0; - elen[j] = -1; // node j is dead - j = next[j]; // delete j from hash bucket - next[jlast] = j; - } else { - jlast = j; // j and i are different - j = next[j]; - } - } - } - } - //----------------------------------------------------- - // Finalize new element - //----------------------------------------------------- - for (p=pk1, pk=pk1; pk=0; j--) // place unordered nodes in lists - { - if (nv[j] > 0) continue; // skip if j is an element - next[j] = head[Cp[j]]; // place j in list of its parent - head[Cp[j]] = j; - } - for (e=n; e>=0; e--) // place elements in lists - { - if (nv[e] <= 0) continue; // skip unless e is an element - if (Cp[e] != -1) { - next[e] = head[Cp[e]]; // place e in list of its parent - head[Cp[e]] = e; - } - } - for (k=0, i=0; i<=n; ++i) // postorder the assembly tree - { - if (Cp[i] == -1) { - k = CS_tdfs(i, k, head, next, P->data(), w); - } - } - - C.reset(); // force deallocation of C - return (*P); // success -} - - -//--------------------------------------------------------- -// Interface to SYMAMD -//--------------------------------------------------------- - -/* - -#define USE_SYMAMD 0 -#if (USE_SYMAMD) - -#include "D:\_TW\SuiteSparse\COLAMD\Include\colamd.h" - -//--------------------------------------------------------- -void CS_symamd(CSd& cs_A, IVec& perm, IVec& iperm) -//--------------------------------------------------------- -{ - // symmetric matrices: only tril(A) used - - umMSG(1, "CS_symamd -- starting\n"); - int stats[COLAMD_STATS], rc=0; - int m=cs_A.num_rows(), n=cs_A.num_cols(), nnz=cs_A.P[n]; - IVec &P=cs_A.P, &I=cs_A.I; - - umMSG(1, "CS_symamd -- matrix is (%d,%d), nnz=%d\n", m,n,nnz); - perm.resize(n+1); assert(perm.ok()); - - rc = symamd (m, I.data(), P.data(), // [in ] not changed - perm.data(), // [out] permutation - NULL, stats, // [out] statistics - &calloc, &free); // [in ] mem funcs to use - - if (!rc) { - // invalidate the return arrays - perm.destroy(); iperm.destroy(); - umWARNING("CS_symamd", "symamd failed, returned %d\n", rc); - } else { - symamd_report(stats); - iperm.resize(perm.size()); assert(iperm.ok()); - for (int i=0; i S[0:nleft+nright-1] -//--------------------------------------------------------- -static void merge -( - int S[], // output of length nleft + nright - const int Left[], // left input of length nleft - const int nleft, - const int Right[], // right input of length nright - const int nright -) -//--------------------------------------------------------- -{ - int p=0, pleft=0, pright=0; - // merge the two inputs, Left and Right, while both inputs exist - for (p=0, pleft=0, pright=0; pleft b) { t = a ; a = b ; b = t ; } } - -// BUBBLE(a,b) sorts [a b] in ascending order, and sets done to 0 if it swaps -#define BUBBLE(a,b) { if (a > b) { t = a ; a = b ; b = t ; done = 0 ; } } - - -//--------------------------------------------------------- -// mergesort (A, W, n) sorts an int array A of length n -// in ascending order. W is a workspace array of size n. -// Used this function for sorting row indices in columns -// of a compressed (csc-form) sparse matrix. Lists with -// length <= SMALL are sorted using a "bubble" sort. -//--------------------------------------------------------- - -#define SMALL 10 - -//--------------------------------------------------------- -static void mergesort -( - int A[], // array to sort, of size n - int W[], // workspace of size n - int n -) -//--------------------------------------------------------- -{ - if (n <= SMALL) - { - //----------------------------------------------------- - // bubble sort for small lists of length SMALL or less - //----------------------------------------------------- - - int t=0, done=0; - switch (n) - { - -#if SMALL >= 10 - case 10: - // 10-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - BUBBLE (A [2], A [3]) ; - BUBBLE (A [3], A [4]) ; - BUBBLE (A [4], A [5]) ; - BUBBLE (A [5], A [6]) ; - BUBBLE (A [6], A [7]) ; - BUBBLE (A [7], A [8]) ; - BUBBLE (A [8], A [9]) ; - if (done) return ; -#endif - -#if SMALL >= 9 - case 9: - // 9-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - BUBBLE (A [2], A [3]) ; - BUBBLE (A [3], A [4]) ; - BUBBLE (A [4], A [5]) ; - BUBBLE (A [5], A [6]) ; - BUBBLE (A [6], A [7]) ; - BUBBLE (A [7], A [8]) ; - if (done) return ; -#endif - -#if SMALL >= 8 - case 8: - // 8-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - BUBBLE (A [2], A [3]) ; - BUBBLE (A [3], A [4]) ; - BUBBLE (A [4], A [5]) ; - BUBBLE (A [5], A [6]) ; - BUBBLE (A [6], A [7]) ; - if (done) return ; -#endif - -#if SMALL >= 7 - case 7: - // 7-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - BUBBLE (A [2], A [3]) ; - BUBBLE (A [3], A [4]) ; - BUBBLE (A [4], A [5]) ; - BUBBLE (A [5], A [6]) ; - if (done) return ; -#endif - -#if SMALL >= 6 - case 6: - // 6-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - BUBBLE (A [2], A [3]) ; - BUBBLE (A [3], A [4]) ; - BUBBLE (A [4], A [5]) ; - if (done) return ; -#endif - -#if SMALL >= 5 - case 5: - // 5-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - BUBBLE (A [2], A [3]) ; - BUBBLE (A [3], A [4]) ; - if (done) return ; -#endif - - case 4: - // 4-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - BUBBLE (A [2], A [3]) ; - if (done) return ; - - case 3: - // 3-element bubble sort - done = 1 ; - BUBBLE (A [0], A [1]) ; - BUBBLE (A [1], A [2]) ; - if (done) return ; - - case 2: - // 2-element bubble sort - SORT (A [0], A [1]) ; - - case 1: - case 0: - // nothing to do - ; - } - } - else - { - //------------------------------------------- - // recursive mergesort if length A > SMALL - //------------------------------------------- - int n1, n2, n3, n4, n12, n34, n123; - - n12 = n / 2; n34 = n - n12; // split n into n12 and n34 - n1 = n12 / 2; n2 = n12 - n1; // split n12 into n1 and n2 - n3 = n34 / 2; n4 = n34 - n3; // split n34 into n3 and n4 - - n123 = n12 + n3; // start of 4th subset = n1 + n2 + n3 - - mergesort (A, W, n1); // sort A [0 ... n1-1] - mergesort (A + n1, W, n2); // sort A [n1 ... n12-1] - mergesort (A + n12, W, n3); // sort A [n12 ... n123-1] - mergesort (A + n123, W, n4); // sort A [n123 ... n-1] - - merge (W, A, n1, A+n1, n2 ); // merge A[0 : n1-1] and A[n1 :n12-1] into W [0 :n12-1] - merge (W+n12, A+n12, n3, A+n123,n4 ); // merge A[n12:n123-1] and A[n123: n-1] into W [n12: n-1] - merge (A, W, n12,W+n12, n34); // merge W[0 : n12-1] and W[n12 : n-1] into A [0 : n-1] - } -} - -#undef SORT -#undef BUBBLE -#undef SMALL - -#endif // USE_CSC_SORT diff --git a/cpp/nudg++/trunk/System/system.mk.gnu b/cpp/nudg++/trunk/System/system.mk.gnu deleted file mode 100644 index 4fe897b..0000000 --- a/cpp/nudg++/trunk/System/system.mk.gnu +++ /dev/null @@ -1,60 +0,0 @@ -# -# Sample system.mk file for gnu compilers -# -CP = cp -MV = mv -CD = cd -MAKE = make - -# c++ compiler -CXX = g++ -# fortran compiler -FC = g77 -# loader -LD = g++ - -# optimization flags passed to all compilers -OPTFLAGS = -O2 -DNDEBUG -# OPTFLAGS = -g -DDEBUG -D_DEBUG -#OPTFLAGS = -Wall - -# c++ compiler options -CXXOPTIONS = -DUNDERSCORE - -# fortran compiler options -FCOPTIONS = -O2 -ffloat-store - -# loader options -LDOPTIONS = - -# command to archive the libraries -AR = ar rv - -# command to generate an index to the contents of an -# archive -RANLIB = ar -ts -# other possibilities for ranlib -#RANLIB = ranlib -#RANLIB = echo - -# indicate that we want to compile the local blas -# and lapack library by setting LOCAL_BLASLAPACK to -# 'libBlasLapack' -# LOCAL_BLASLAPACK = libBlasLapack -# link the local blas and lapack library -BLASLAPACKLIBS = -lBlasLapack -lg2c -# BLASLAPACKLIBS = -framework Accelerate -# BLASLAPACKLIBS = -llapack -lblas -lf77blas -latlas -# BLASLAPACKLIBS = -L/Library/Frameworks/Intel_MKL.framework/Libraries/32 -lmkl_lapack32 -lmkl_ia32 - -# indicate that we do not want to compile the local blas -# and lapack library by setting LOCAL_BLASLAPACK to '' -#LOCAL_BLASLAPACK = -# link the blas and lapack from ATLAS -#BLASLAPACKLIBS = -L/opt/local/ATLAS/lib/Linux_P4SSE2 \ -# -llapack -lf77blas -lcblas -latlas - -# these are the fortran libs needed to link fortran with -# c++ -FORTRANLIBS = -lg2c -lm - diff --git a/cpp/nudg++/trunk/System/system.mk.osx b/cpp/nudg++/trunk/System/system.mk.osx deleted file mode 100644 index cbb79c6..0000000 --- a/cpp/nudg++/trunk/System/system.mk.osx +++ /dev/null @@ -1,59 +0,0 @@ -# -# Sample system.mk file for gnu compilers -# -CP = cp -MV = mv -CD = cd -MAKE = make - -# c++ compiler -CXX = g++ -# fortran compiler -FC = g77 -# loader -LD = g++ - -# optimization flags passed to all compilers -OPTFLAGS = -O3 -DNDEBUG -#OPTFLAGS = -g -DDEBUG -D_DEBUG -#OPTFLAGS = -Wall - -# c++ compiler options -CXXOPTIONS = -DUNDERSCORE - -# fortran compiler options -FCOPTIONS = - -# loader options -LDOPTIONS = - -# command to archive the libraries -AR = ar rv - -# command to generate an index to the contents of an -# archive -RANLIB = ar -ts -# other possibilities for ranlib -#RANLIB = ranlib -#RANLIB = echo - -# indicate that we want to compile the local blas -# and lapack library by setting LOCAL_BLASLAPACK to -# 'libBlasLapack' -LOCAL_BLASLAPACK = libBlasLapack -# link the local blas and lapack library -# BLASLAPACKLIBS = -lBlasLapack -BLASLAPACKLIBS = -framework Accelerate -# BLASLAPACKLIBS = -llapack -lblas -lf77blas -latlas -# BLASLAPACKLIBS = -L/Library/Frameworks/Intel_MKL.framework/Libraries/32 -lmkl_lapack32 -lmkl_ia32 - -# indicate that we do not want to compile the local blas -# and lapack library by setting LOCAL_BLASLAPACK to '' -#LOCAL_BLASLAPACK = -# link the blas and lapack from ATLAS -#BLASLAPACKLIBS = -L/opt/local/ATLAS/lib/Linux_P4SSE2 \ -# -llapack -lf77blas -lcblas -latlas - -# these are the fortran libs needed to link fortran with -# c++ -FORTRANLIBS = -lg2c -lm diff --git a/cpp/nudg++/trunk/VC8/NDG.sln b/cpp/nudg++/trunk/VC8/NDG.sln deleted file mode 100644 index 9a49dd7..0000000 --- a/cpp/nudg++/trunk/VC8/NDG.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NDG", "NDG\NDG.vcproj", "{75838FE3-A815-4021-8E25-D2BEF9B9A805}" - ProjectSection(ProjectDependencies) = postProject - {083192DA-3FC0-4A50-9BA6-5A0C6DC04B6B} = {083192DA-3FC0-4A50-9BA6-5A0C6DC04B6B} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NDGLib", "NDGLib\NDGLib.vcproj", "{083192DA-3FC0-4A50-9BA6-5A0C6DC04B6B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {75838FE3-A815-4021-8E25-D2BEF9B9A805}.Debug|Win32.ActiveCfg = Debug|Win32 - {75838FE3-A815-4021-8E25-D2BEF9B9A805}.Debug|Win32.Build.0 = Debug|Win32 - {75838FE3-A815-4021-8E25-D2BEF9B9A805}.Release|Win32.ActiveCfg = Release|Win32 - {75838FE3-A815-4021-8E25-D2BEF9B9A805}.Release|Win32.Build.0 = Release|Win32 - {083192DA-3FC0-4A50-9BA6-5A0C6DC04B6B}.Debug|Win32.ActiveCfg = Debug|Win32 - {083192DA-3FC0-4A50-9BA6-5A0C6DC04B6B}.Debug|Win32.Build.0 = Debug|Win32 - {083192DA-3FC0-4A50-9BA6-5A0C6DC04B6B}.Release|Win32.ActiveCfg = Release|Win32 - {083192DA-3FC0-4A50-9BA6-5A0C6DC04B6B}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/cpp/nudg++/trunk/VC8/NDG/NDG.vcproj b/cpp/nudg++/trunk/VC8/NDG/NDG.vcproj deleted file mode 100644 index 2b09d9d..0000000 --- a/cpp/nudg++/trunk/VC8/NDG/NDG.vcproj +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/nudg++/trunk/VC8/NDG/NDG_headers.h b/cpp/nudg++/trunk/VC8/NDG/NDG_headers.h deleted file mode 100644 index cca53a2..0000000 --- a/cpp/nudg++/trunk/VC8/NDG/NDG_headers.h +++ /dev/null @@ -1,23 +0,0 @@ -// NDG_headers.h -// -// 2006/12/15 -//--------------------------------------------------------- -#ifndef NDG__headers_H__INCLUDED -#define NDG__headers_H__INCLUDED - - -#include "LOG_funcs.h" - -// forward declarations -bool InitGlobalInfo(); -void FreeGlobalInfo(); - -#ifdef WIN32 -// process management routines -#include -// clear {min,max} macros -#undef min -#undef max -#endif - -#endif // NDG__headers_H__INCLUDED diff --git a/cpp/nudg++/trunk/VC8/NDG/NDG_pragma.cpp b/cpp/nudg++/trunk/VC8/NDG/NDG_pragma.cpp deleted file mode 100644 index b39acdf..0000000 --- a/cpp/nudg++/trunk/VC8/NDG/NDG_pragma.cpp +++ /dev/null @@ -1,170 +0,0 @@ -// NGD_pragma.cpp -// -// 2007/06/06 -//--------------------------------------------------------- -#include "NDG_headers.h" - - -//--------------------------------------------------------- -// Link with CHOLMOD -//--------------------------------------------------------- -#ifdef _DEBUG -#pragma message("Linking with CHOLMOD v1.5.0 (Debug Build)") -#pragma comment(lib,"AMDd.lib") -#pragma comment(lib,"CAMDd.lib") -#pragma comment(lib,"CHOLMODd.lib") -#pragma comment(lib,"COLAMDd.lib") -#pragma comment(lib,"Metis4d.lib") -#else -#pragma message("Linking with CHOLMOD v1.5.0 (Release Build)") -#pragma comment(lib,"AMD.lib") -#pragma comment(lib,"CAMD.lib") -#pragma comment(lib,"CHOLMOD.lib") -#pragma comment(lib,"COLAMD.lib") -#pragma comment(lib,"Metis4.lib") -#endif - - -//--------------------------------------------------------- -// Link with Sledge++ modules -//--------------------------------------------------------- -#ifdef _DEBUG -#pragma message("Linking with project libraries (Debug Build)") -//#pragma comment(lib,"NDGLibd.lib") -//#pragma comment(lib,"CSparsed.lib") -//#pragma comment(lib,"UMFPACK5xd.lib") -#else -#pragma message("Linking with project libraries (Release Build)") -//#pragma comment(lib,"NDGLib.lib") -//#pragma comment(lib,"CSparse.lib") -//#pragma comment(lib,"UMFPACK5x.lib") -#endif - - -//--------------------------------------------------------- -// Link with wxWindows -//--------------------------------------------------------- -#ifdef _DEBUG -#pragma message("Linking with project libraries (Debug Build)") -//#pragma comment(lib,"wxbase26d.lib") -//#pragma comment(lib,"wxmsw26d_core.lib") -//#pragma comment(lib,"wxmsw26d_adv.lib") -//#pragma comment(lib,"wxmsw26d_html.lib") -//#pragma comment(lib,"wxjpegd.lib") -//#pragma comment(lib,"wxtiffd.lib") -//#pragma comment(lib,"wxpngd.lib") -//#pragma comment(lib,"wxregexd.lib") -//#pragma comment(lib,"wxzlibd.lib") -#else -#pragma message("Linking with project libraries (Release Build)") -//#pragma comment(lib,"wxbase26.lib") -//#pragma comment(lib,"wxmsw26_core.lib") -//#pragma comment(lib,"wxmsw26_adv.lib") -//#pragma comment(lib,"wxmsw26_html.lib") -//#pragma comment(lib,"wxjpeg.lib") -//#pragma comment(lib,"wxtiff.lib") -//#pragma comment(lib,"wxpng.lib") -//#pragma comment(lib,"wxregex.lib") -//#pragma comment(lib,"wxzlib.lib") -#endif - - - -//--------------------------------------------------------- -// Link with OpenCascade -//--------------------------------------------------------- -//#pragma message("Linking with OpenCascade Libs (Default Build)") - - -//--------------------------------------------------------- -// Link with GRUMMP 0.3.0 -//--------------------------------------------------------- -#ifdef _DEBUG -#pragma message("Linking with GRUMMP 0.3.3 libraries (Debug Build)") -//# pragma comment(lib,"GR_baseD.lib") -//# pragma comment(lib,"GR_2DD.lib") -//# pragma comment(lib,"GR_3DD.lib") -//# pragma comment(lib,"GR_surfD.lib") -//# pragma comment(lib,"OptMSD.lib") -//# pragma comment(lib,"SUMAAlogD.lib") -#else -#pragma message("Linking with GRUMMP 0.3.3 libraries (Release Build)") -//# pragma comment(lib,"GR_base.lib") -//# pragma comment(lib,"GR_2D.lib") -//# pragma comment(lib,"GR_3D.lib") -//# pragma comment(lib,"GR_surf.lib") -//# pragma comment(lib,"OptMS.lib") -//# pragma comment(lib,"SUMAAlog.lib") -#endif - - - -//--------------------------------------------------------- -// link with OpenGL and Vtk libraries -//--------------------------------------------------------- -#pragma message("Linking with OpenGL/Vtk libs (Default Build)") - -//#pragma comment(lib,"GLU32.LIB") -//#pragma comment(lib,"OPENGL32.LIB") - -//#pragma comment(lib,"vtkCommon.lib") -//#pragma comment(lib,"vtkFiltering.lib") -//#pragma comment(lib,"vtkfreetype.lib") -//#pragma comment(lib,"vtkftgl.lib") -//#pragma comment(lib,"vtkGraphics.lib") -//#pragma comment(lib,"vtkHybrid.lib") -//#pragma comment(lib,"vtkImaging.lib") -//#pragma comment(lib,"vtkIO.lib") -//#pragma comment(lib,"vtkjpeg.lib") -//#pragma comment(lib,"vtkpng.lib") -//#pragma comment(lib,"vtkRendering.lib") -//#pragma comment(lib,"vtktiff.lib") -//#pragma comment(lib,"vtkWidgets.lib") -//#pragma comment(lib,"vtkzlib.lib") - - -//--------------------------------------------------------- -// link with Multimedia libraries -//--------------------------------------------------------- -//#pragma comment(lib,"vfw32.lib") - - -//--------------------------------------------------------- -// Link with Intel MKL 5.1 library -//--------------------------------------------------------- -#define USE_DYN_ACML -#undef USE_STATIC_MKL -#undef USE_ATLAS - -//--------------------------------------------------------- -#if defined(USE_STATIC_MKL) -# pragma message("Linking with Intel MKL 5.1 library (Static linkage)") -//# pragma comment(lib,"mkl_c.lib") -//# pragma comment(lib,"mkl_lapack.lib") -//# pragma comment(lib,"mkl_p3.lib") // faster with PIII -//--------------------------------------------------------- -#elif defined(USE_DYN_ACML) -# pragma message("Linking with ACML OpenMP/32 library (Dynamic linkage)") -# pragma comment(lib,"libacml_dll.lib") // single threaded -//# pragma comment(lib,"libacml_mp_dll.lib") // OpenMP -//--------------------------------------------------------- -#elif defined(USE_ATLAS) -# pragma message("Linking with ATLAS Opteron-32/ SSE2 (Dynamic linkage)") -//# pragma comment(lib,"atlas.lib") -//--------------------------------------------------------- -#else -# pragma message("Linking with ARPACK BLAS/LAPACK (Dynamic linkage)") -//# pragma comment(lib,"IVFBLAS.lib") -//# pragma comment(lib,"IVFLAPACK.lib") -//# pragma comment(lib,"BlasLapack.lib") -//# pragma comment(lib,"IVFARPACK.lib") -#endif - -//#pragma message("Linking with GOTO Opteron/32 library (Dynamic linkage)") -//#pragma comment(lib,"libgoto_opt32-r0.94.lib") - - -//--------------------------------------------------------- -// XDR: ntohl,htonl -//--------------------------------------------------------- -//#pragma comment(lib,"Ws2_32.lib") diff --git a/cpp/nudg++/trunk/VC8/NDG/NDG_prepro.cpp b/cpp/nudg++/trunk/VC8/NDG/NDG_prepro.cpp deleted file mode 100644 index fd7e79d..0000000 --- a/cpp/nudg++/trunk/VC8/NDG/NDG_prepro.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// NDG_prepro.cpp -// -// 2006/12/12 -//--------------------------------------------------------- -#include "NDG_headers.h" diff --git a/cpp/nudg++/trunk/VC8/NDGLib/NDGLib.vcproj b/cpp/nudg++/trunk/VC8/NDGLib/NDGLib.vcproj deleted file mode 100644 index 1e6fb70..0000000 --- a/cpp/nudg++/trunk/VC8/NDGLib/NDGLib.vcproj +++ /dev/null @@ -1,1251 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/nudg++/trunk/VC8/NDGLib/NDGLib_prepro.cpp b/cpp/nudg++/trunk/VC8/NDGLib/NDGLib_prepro.cpp deleted file mode 100644 index 46cbf61..0000000 --- a/cpp/nudg++/trunk/VC8/NDGLib/NDGLib_prepro.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// NDGLib_prepro.cpp -// used by VC++ for precompiling headers -// 2007/06/06 -//--------------------------------------------------------- -#include "NDGLib_headers.h" diff --git a/cpp/nudg++/trunk/license.csparse b/cpp/nudg++/trunk/license.csparse deleted file mode 100644 index 388fd27..0000000 --- a/cpp/nudg++/trunk/license.csparse +++ /dev/null @@ -1,20 +0,0 @@ - -CSparse: a Concise Sparse matrix package. -Copyright (c) 2006, Timothy A. Davis. -http://www.cise.ufl.edu/research/sparse/CSparse - --------------------------------------------------------------------------------- - -CSparse 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. - -CSparse is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this Module; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/cpp/nudg++/trunk/license.lgpl b/cpp/nudg++/trunk/license.lgpl deleted file mode 100644 index fd10ef8..0000000 --- a/cpp/nudg++/trunk/license.lgpl +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/cpp/nudg++/trunk/license.nudg++ b/cpp/nudg++/trunk/license.nudg++ deleted file mode 100644 index b34a241..0000000 --- a/cpp/nudg++/trunk/license.nudg++ +++ /dev/null @@ -1,20 +0,0 @@ - -Nudg++: a Nodal Unstructured Discontinuous Galerkin framework -Copyright (c) 2007, Nigel Nunn & Tim Warburton -http://www.nudg.org - --------------------------------------------------------------------------------- - -Nudg++ 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. - -Nudg++ is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this Module; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/cpp/nudg++/trunk/system.mk b/cpp/nudg++/trunk/system.mk deleted file mode 100644 index 7dbd5db..0000000 --- a/cpp/nudg++/trunk/system.mk +++ /dev/null @@ -1,59 +0,0 @@ -# -# Sample system.mk file for gnu compilers -# -CP = cp -MV = mv -CD = cd -MAKE = make - -# c++ compiler -CXX = g++ -# fortran compiler -FC = g77 -# loader -LD = g++ - -# optimization flags passed to all compilers -OPTFLAGS = -O3 -DNDEBUG -# OPTFLAGS = -g -DDEBUG -D_DEBUG -#OPTFLAGS = -Wall - -# c++ compiler options -CXXOPTIONS = -DUNDERSCORE - -# fortran compiler options -FCOPTIONS = - -# loader options -LDOPTIONS = - -# command to archive the libraries -AR = ar rv - -# command to generate an index to the contents of an -# archive -RANLIB = ar -ts -# other possibilities for ranlib -#RANLIB = ranlib -#RANLIB = echo - -# indicate that we want to compile the local blas -# and lapack library by setting LOCAL_BLASLAPACK to -# 'libBlasLapack' -# LOCAL_BLASLAPACK = libBlasLapack -# link the local blas and lapack library -BLASLAPACKLIBS = -lBlasLapack -$ BLASLAPACKLIBS = -framework Accelerate -# BLASLAPACKLIBS = -llapack -lblas -lf77blas -latlas -# BLASLAPACKLIBS = -L/Library/Frameworks/Intel_MKL.framework/Libraries/32 -lmkl_lapack32 -lmkl_ia32 - -# indicate that we do not want to compile the local blas -# and lapack library by setting LOCAL_BLASLAPACK to '' -#LOCAL_BLASLAPACK = -# link the blas and lapack from ATLAS -#BLASLAPACKLIBS = -L/opt/local/ATLAS/lib/Linux_P4SSE2 \ -# -llapack -lf77blas -lcblas -latlas - -# these are the fortran libs needed to link fortran with -# c++ -FORTRANLIBS = -lg2c -lm