| 199 | } |
| 200 | |
| 201 | int DP_RSM_Sim_TimeVariant::analyze() |
| 202 | { |
| 203 | //1 form Hessian; |
| 204 | //2 get eigenvectors & eigenvalues |
| 205 | //3 order eigenVectors |
| 206 | //4. grid values computation |
| 207 | //5. fit curve |
| 208 | //6. simulation |
| 209 | |
| 210 | |
| 211 | // --1.1. create grid planes, set grid info ---- |
| 212 | |
| 213 | int numOfGridPlanes = (numOfPrincipalAxes+1)*numOfPrincipalAxes/2; |
| 214 | |
| 215 | |
| 216 | ofstream output( outputFileName, ios::out ); |
| 217 | |
| 218 | |
| 219 | |
| 220 | //1. --- compute and form Hessian by FDM; compute A, Rotation R, A=R*H*R'/|dG|, but one dim less. |
| 221 | |
| 222 | int numRV = theReliabilityDomain->getNumberOfRandomVariables(); |
| 223 | |
| 224 | //if (theHessian ==0){ |
| 225 | //theHessian = new Hessian(numRV,theReliabilityDomain,theProbabilityTransformation, |
| 226 | // theGFunEvaluator,theGradGEvaluator, 1.0e-3); |
| 227 | //theHessian->formReducedHessian(theDesignPtXSpace); |
| 228 | //} |
| 229 | |
| 230 | if (HessianFileName !=0){ //recorder Hessian |
| 231 | |
| 232 | Matrix tmpHessian(numRV, numRV); |
| 233 | //tmpHessian.addMatrix(0.0, theHessian->getHessianApproximation(), 1.0); |
| 234 | |
| 235 | ofstream output(HessianFileName); |
| 236 | |
| 237 | int ii=0; |
| 238 | int jj=0; |
| 239 | |
| 240 | for(ii=0; ii<numRV; ii++){ |
| 241 | for (jj=0; jj<numRV;jj++){ |
| 242 | output << tmpHessian(jj,ii)<<endln ; |
| 243 | } |
| 244 | |
| 245 | } |
| 246 | output.close(); |
| 247 | |
| 248 | } |
| 249 | |
| 250 | //theRespSurfaceSimulation->setNormOfGradientU(theHessian->getNormOfGradientU()); |
| 251 | |
| 252 | |
| 253 | |
| 254 | if (HessianMatrix !=0) delete HessianMatrix; |
| 255 | if (rotation !=0) delete rotation; |
| 256 | |
| 257 | //HessianMatrix = new Matrix(theHessian->getReducedHessian()); //A matrix, one dim less the nrv |
| 258 | HessianMatrix = new Matrix(1,1); |
nothing calls this directly
no test coverage detected