MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / debug

Method debug

SRC/reliability/analysis/analysis/BivariateDecomposition.cpp:563–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561
562
563double BivariateDecomposition::debug(Vector * point, Vector * dp2prime, Vector * gradG2){
564
565
566/////////////////////////////// ------------------- for debug only by Quan ----
567
568 static int iii =1;
569 if (iii==1){
570 iii++;
571 ofstream file_coeff_2("Bivariate_surface_fitting_debug.out");
572
573 int numOfGridPlanes = numAxes*(numAxes-1)/2;
574
575 for (int ii=0; ii<numOfGridPlanes; ii++) {
576
577 file_coeff_2 <<"\n the "<<ii<<" th plane: "<<endln;
578 PrincipalAxis * axis_1 = theGridPlanes[ii]->getAxisPtr(1); // first axis
579 PrincipalAxis * axis_2 = theGridPlanes[ii]->getAxisPtr(2); // second axis
580
581 int m = axis_1->getExperimentalPointRule()->getNumberOfPoints();
582 int n = axis_2->getExperimentalPointRule()->getNumberOfPoints();
583
584
585
586
587 Matrix * valueOnGrid = theGridPlanes[ii]->getGridValuesPtr();
588 Matrix * valueG2OnGrid=0;
589
590 if(isTimeVariant){
591 valueG2OnGrid = theGridPlanes[ii]->getGridValuesG2Ptr();
592 }
593
594 double x_begin = axis_1->getExperimentalPointRule()->getBeginOfGrid();
595 double x_end = axis_1->getExperimentalPointRule()->getEndOfGrid();
596 double x_interval = (x_end-x_begin)/(m-1);
597
598 double y_begin= axis_2->getExperimentalPointRule()->getBeginOfGrid();
599 double y_end = axis_2->getExperimentalPointRule()->getEndOfGrid();
600 double y_interval = (y_end-y_begin)/(n-1);
601
602 Vector * vector1 = axis_1->getAxisDirection();
603 Vector * vector2 = axis_2->getAxisDirection();
604
605 Vector tmpp(50); tmpp.Zero();
606 file_coeff_2.precision(16);
607 for( int pointX = 0; pointX < m; pointX++){
608
609
610 for( int pointY = 0; pointY < n; pointY++){
611
612 double x = x_begin + pointX*x_interval;
613 double y = y_begin + pointY*y_interval;
614
615
616 tmpp = x*(*vector1)/vector1->Norm()+y*(*vector2)/vector2->Norm();
617
618
619
620 file_coeff_2<<"x:"<<x<<"y:"<<y<<endln;

Callers

nothing calls this directly

Calls 14

getFunctionValueMethod · 0.95
getFunctionValue2Method · 0.95
getAxisPtrMethod · 0.80
getNumberOfPointsMethod · 0.80
getGridValuesG2PtrMethod · 0.80
getBeginOfGridMethod · 0.80
getEndOfGridMethod · 0.80
getAxisDirectionMethod · 0.80
getGridValuesPtrMethod · 0.45
ZeroMethod · 0.45
precisionMethod · 0.45

Tested by

no test coverage detected