00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "LOCA_Homotopy_DeflatedGroup.H"
00043
00044 #include "Teuchos_ParameterList.hpp"
00045 #include "LOCA_Homotopy_AbstractGroup.H"
00046 #include "LOCA_GlobalData.H"
00047 #include "LOCA_Factory.H"
00048 #include "LOCA_Parameter_SublistParser.H"
00049 #include "LOCA_BorderedSolver_AbstractStrategy.H"
00050 #include "LOCA_ErrorCheck.H"
00051 #include "NOX_Utils.H"
00052 #include "LOCA_Parameter_Vector.H"
00053 #include "LOCA_Abstract_TransposeSolveGroup.H"
00054 #include "LOCA_BorderedSolver_JacobianOperator.H"
00055
00056 LOCA::Homotopy::DeflatedGroup::
00057 DeflatedGroup(
00058 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00059 const Teuchos::RCP<Teuchos::ParameterList>& topParams,
00060 const Teuchos::RCP<Teuchos::ParameterList>& hParams,
00061 const Teuchos::RCP<LOCA::Homotopy::AbstractGroup>& g,
00062 const Teuchos::RCP<const NOX::Abstract::Vector>& start_vec,
00063 const std::vector< Teuchos::RCP<const NOX::Abstract::Vector> >& prev_solns,
00064 const double identity_sign)
00065 : globalData(global_data),
00066 parsedParams(),
00067 homotopyParams(hParams),
00068 grpPtr(g),
00069 bordered_grp(),
00070 xMultiVec(globalData, g->getX(), 1, 1, NOX::DeepCopy),
00071 fMultiVec(globalData, g->getX(), 1, 1, NOX::ShapeCopy),
00072 newtonMultiVec(globalData, g->getX(), 1, 1, NOX::ShapeCopy),
00073 gradientMultiVec(globalData, g->getX(), 1, 1, NOX::ShapeCopy),
00074 xVec(),
00075 fVec(),
00076 newtonVec(),
00077 gradientVec(),
00078 startVec(start_vec),
00079 identitySign(identity_sign),
00080 solns(prev_solns),
00081 distVec(startVec->clone(NOX::ShapeCopy)),
00082 totalDistMultiVec(startVec->createMultiVector(1, NOX::ShapeCopy)),
00083 underlyingF(startVec->createMultiVector(1, NOX::ShapeCopy)),
00084 jacOp(),
00085 borderedSolver(),
00086 minusOne(),
00087 numSolns(solns.size()),
00088 distances(numSolns),
00089 distProd(0.0),
00090 index_f(1),
00091 paramVec(grpPtr->getParams()),
00092 conParam(0.0),
00093 conParamID(-1),
00094 conParamLabel("Homotopy Continuation Parameter"),
00095 augmentJacForHomotopyNotImplemented(false),
00096 isValidF(false),
00097 isValidJacobian(false),
00098 isValidNewton(false),
00099 isValidGradient(false),
00100 isBordered(false)
00101 {
00102
00103 setupViews();
00104
00105
00106
00107
00108 paramVec.addParameter(conParamLabel, conParam);
00109 grpPtr->setParams(paramVec);
00110
00111
00112 conParamID = paramVec.getIndex(conParamLabel);
00113
00114 setStepperParameters(*topParams);
00115
00116
00117 parsedParams = Teuchos::rcp(new LOCA::Parameter::SublistParser(globalData));
00118 parsedParams->parseSublists(topParams);
00119
00120
00121 grpPtr->setX(*startVec);
00122 *(xVec->getXVec()) = *startVec;
00123 xVec->getScalar(0) = conParam;
00124
00125
00126 minusOne = Teuchos::rcp(new NOX::Abstract::MultiVector::DenseMatrix(1, 1));
00127 (*minusOne)(0,0) = -1.0;
00128
00129
00130 borderedSolver = globalData->locaFactory->createBorderedSolverStrategy(
00131 parsedParams,
00132 homotopyParams);
00133
00134
00135 bordered_grp =
00136 Teuchos::rcp_dynamic_cast<LOCA::BorderedSystem::AbstractGroup>(grpPtr);
00137 isBordered = (bordered_grp != Teuchos::null);
00138
00139
00140 jacOp = Teuchos::rcp(new LOCA::BorderedSolver::JacobianOperator(grpPtr));
00141 }
00142
00143 LOCA::Homotopy::DeflatedGroup::
00144 DeflatedGroup(const LOCA::Homotopy::DeflatedGroup& source,
00145 NOX::CopyType type)
00146 : globalData(source.globalData),
00147 parsedParams(source.parsedParams),
00148 homotopyParams(source.homotopyParams),
00149 grpPtr(Teuchos::rcp_dynamic_cast<LOCA::Homotopy::AbstractGroup>(source.grpPtr->clone(type))),
00150 bordered_grp(),
00151 xMultiVec(source.xMultiVec, type),
00152 fMultiVec(source.fMultiVec, type),
00153 newtonMultiVec(source.newtonMultiVec, type),
00154 gradientMultiVec(source.gradientMultiVec, type),
00155 xVec(),
00156 fVec(),
00157 newtonVec(),
00158 gradientVec(),
00159 startVec(source.startVec),
00160 identitySign(source.identitySign),
00161 solns(source.solns),
00162 distVec(source.distVec->clone(type)),
00163 totalDistMultiVec(source.totalDistMultiVec->clone(type)),
00164 underlyingF(source.underlyingF->clone(type)),
00165 jacOp(),
00166 borderedSolver(source.borderedSolver),
00167 minusOne(Teuchos::rcp(new NOX::Abstract::MultiVector::DenseMatrix(*source.minusOne))),
00168 numSolns(source.numSolns),
00169 distances(source.distances),
00170 distProd(source.distProd),
00171 index_f(1),
00172 paramVec(source.paramVec),
00173 conParam(source.conParam),
00174 conParamID(source.conParamID),
00175 conParamLabel(source.conParamLabel),
00176 augmentJacForHomotopyNotImplemented(source.augmentJacForHomotopyNotImplemented),
00177 isValidF(source.isValidF),
00178 isValidJacobian(source.isValidJacobian),
00179 isValidNewton(source.isValidNewton),
00180 isValidGradient(source.isValidGradient),
00181 isBordered(false)
00182 {
00183
00184 setupViews();
00185
00186
00187 borderedSolver = globalData->locaFactory->createBorderedSolverStrategy(
00188 parsedParams,
00189 homotopyParams);
00190
00191 if (type == NOX::ShapeCopy) {
00192 isValidF = false;
00193 isValidJacobian = false;
00194 isValidNewton = false;
00195 isValidGradient = false;
00196 }
00197
00198
00199 bordered_grp =
00200 Teuchos::rcp_dynamic_cast<LOCA::BorderedSystem::AbstractGroup>(grpPtr);
00201 isBordered = (bordered_grp != Teuchos::null);
00202
00203
00204 jacOp = Teuchos::rcp(new LOCA::BorderedSolver::JacobianOperator(grpPtr));
00205
00206
00207 if (isValidJacobian) {
00208 borderedSolver->setMatrixBlocksMultiVecConstraint(jacOp,
00209 underlyingF,
00210 totalDistMultiVec,
00211 minusOne);
00212 NOX::Abstract::Group::ReturnType status = borderedSolver->initForSolve();
00213 globalData->locaErrorCheck->checkReturnType(status,
00214 "LOCA::Homotopy::DeflatedGroup()");
00215 }
00216 }
00217
00218
00219 LOCA::Homotopy::DeflatedGroup::
00220 ~DeflatedGroup()
00221 {
00222 }
00223
00224 double
00225 LOCA::Homotopy::DeflatedGroup::
00226 getHomotopyParam() const
00227 {
00228 return conParam;
00229 }
00230
00231 NOX::Abstract::Group&
00232 LOCA::Homotopy::DeflatedGroup::
00233 operator=(const NOX::Abstract::Group& source)
00234 {
00235 copy(source);
00236 return *this;
00237 }
00238
00239 Teuchos::RCP<NOX::Abstract::Group>
00240 LOCA::Homotopy::DeflatedGroup::
00241 clone(NOX::CopyType type) const
00242 {
00243 return Teuchos::rcp(new DeflatedGroup(*this, type));
00244 }
00245
00246 void
00247 LOCA::Homotopy::DeflatedGroup::
00248 setX(const NOX::Abstract::Vector& y)
00249 {
00250 const LOCA::MultiContinuation::ExtendedVector& my =
00251 dynamic_cast<const LOCA::MultiContinuation::ExtendedVector&>(y);
00252
00253 grpPtr->setX( *(my.getXVec()) );
00254 *xVec = my;
00255
00256 resetIsValid();
00257 }
00258
00259 void
00260 LOCA::Homotopy::DeflatedGroup::
00261 computeX(const NOX::Abstract::Group& g,
00262 const NOX::Abstract::Vector& d,
00263 double step)
00264 {
00265 const LOCA::Homotopy::DeflatedGroup& mg =
00266 dynamic_cast<const LOCA::Homotopy::DeflatedGroup&>(g);
00267 const LOCA::MultiContinuation::ExtendedVector& md =
00268 dynamic_cast<const LOCA::MultiContinuation::ExtendedVector&>(d);
00269
00270 grpPtr->computeX(*(mg.grpPtr), *(md.getXVec()), step);
00271 xVec->update(1.0, mg.getX(), step, md, 0.0);
00272
00273 resetIsValid();
00274 }
00275
00276 NOX::Abstract::Group::ReturnType
00277 LOCA::Homotopy::DeflatedGroup::
00278 computeF()
00279 {
00280 if (isValidF)
00281 return NOX::Abstract::Group::Ok;
00282
00283 string callingFunction =
00284 "LOCA::Homotopy::DeflatedGroup::computeF()";
00285 NOX::Abstract::Group::ReturnType status;
00286 NOX::Abstract::Group::ReturnType finalStatus = NOX::Abstract::Group::Ok;
00287
00288
00289 if (!grpPtr->isF()) {
00290 status = grpPtr->computeF();
00291 finalStatus =
00292 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00293 finalStatus,
00294 callingFunction);
00295 }
00296
00297 distProd = 1.0;
00298 for (int i=0; i<numSolns; i++) {
00299 distVec->update(1.0, grpPtr->getX(), -1.0, *(solns[i]), 0.0);
00300 distances[i] = distVec->norm();
00301 distProd *= distances[i];
00302 }
00303 distVec->update(identitySign, grpPtr->getX(), -identitySign, *startVec, 0.0);
00304 fVec->getXVec()->update(conParam / distProd, grpPtr->getF(),
00305 1.0 - conParam, *distVec, 0.0);
00306 fVec->getScalar(0) = 0.0;
00307 (*underlyingF)[0] = grpPtr->getF();
00308
00309 isValidF = true;
00310
00311 return finalStatus;
00312 }
00313
00314 NOX::Abstract::Group::ReturnType
00315 LOCA::Homotopy::DeflatedGroup::
00316 computeJacobian()
00317 {
00318 if (isValidJacobian)
00319 return NOX::Abstract::Group::Ok;
00320
00321 string callingFunction =
00322 "LOCA::Homotopy::DeflatedGroup::computeJacobian()";
00323 NOX::Abstract::Group::ReturnType finalStatus = NOX::Abstract::Group::Ok;
00324 NOX::Abstract::Group::ReturnType status;
00325
00326
00327 if (!grpPtr->isJacobian()) {
00328 status = grpPtr->computeJacobian();
00329 finalStatus =
00330 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00331 finalStatus,
00332 callingFunction);
00333 }
00334
00335 distProd = 1.0;
00336 totalDistVec->init(0.0);
00337 for (int i=0; i<numSolns; i++) {
00338 distVec->update(1.0, grpPtr->getX(), -1.0, *(solns[i]), 0.0);
00339 distances[i] = distVec->norm();
00340 distProd *= distances[i];
00341 totalDistVec->update(-1.0 / (distances[i]*distances[i]), *distVec, 1.0);
00342 }
00343 totalDistVec->scale(conParam / distProd);
00344
00345 NOX::Abstract::Group::ReturnType augHomTest =
00346 grpPtr->augmentJacobianForHomotopy(conParam/distProd, identitySign*(1.0-conParam));
00347
00348
00349
00350 if (augHomTest == NOX::Abstract::Group::NotDefined)
00351 augmentJacForHomotopyNotImplemented = true;
00352
00353
00354 borderedSolver->setMatrixBlocksMultiVecConstraint(jacOp,
00355 underlyingF,
00356 totalDistMultiVec,
00357 minusOne);
00358 status = borderedSolver->initForSolve();
00359 finalStatus =
00360 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00361 finalStatus,
00362 callingFunction);
00363
00364 isValidJacobian = true;
00365
00366 return finalStatus;
00367 }
00368
00369 NOX::Abstract::Group::ReturnType
00370 LOCA::Homotopy::DeflatedGroup::
00371 computeGradient()
00372 {
00373 if (isValidGradient)
00374 return NOX::Abstract::Group::Ok;
00375
00376 string callingFunction =
00377 "LOCA::Homotopy::DeflatedGroup::computeGradient()";
00378 NOX::Abstract::Group::ReturnType finalStatus = NOX::Abstract::Group::Ok;
00379 NOX::Abstract::Group::ReturnType status;
00380
00381
00382 if (!isF()) {
00383 status = computeF();
00384 finalStatus =
00385 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00386 finalStatus,
00387 callingFunction);
00388 }
00389
00390
00391 if (!isJacobian()) {
00392 status = computeJacobian();
00393 finalStatus =
00394 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00395 finalStatus,
00396 callingFunction);
00397 }
00398
00399
00400 status = applyJacobianTranspose(*fVec, *gradientVec);
00401 finalStatus =
00402 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00403 finalStatus,
00404 callingFunction);
00405
00406 isValidGradient = true;
00407
00408 return finalStatus;
00409 }
00410
00411 NOX::Abstract::Group::ReturnType
00412 LOCA::Homotopy::DeflatedGroup::
00413 computeNewton(Teuchos::ParameterList& params)
00414 {
00415 if (isValidNewton)
00416 return NOX::Abstract::Group::Ok;
00417
00418 string callingFunction =
00419 "LOCA::Homotopy::DeflatedGroup::computeNewton()";
00420 NOX::Abstract::Group::ReturnType finalStatus = NOX::Abstract::Group::Ok;
00421 NOX::Abstract::Group::ReturnType status;
00422
00423
00424 if (!isF()) {
00425 status = computeF();
00426 finalStatus =
00427 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00428 finalStatus,
00429 callingFunction);
00430 }
00431
00432
00433 if (!isJacobian()) {
00434 status = computeJacobian();
00435 finalStatus =
00436 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00437 finalStatus,
00438 callingFunction);
00439 }
00440
00441
00442 newtonMultiVec.init(0.0);
00443
00444 status = applyJacobianInverseMultiVector(params, fMultiVec,
00445 newtonMultiVec);
00446 finalStatus =
00447 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00448 finalStatus,
00449 callingFunction);
00450
00451 newtonMultiVec.scale(-1.0);
00452
00453 isValidNewton = true;
00454
00455 return finalStatus;
00456 }
00457
00458 NOX::Abstract::Group::ReturnType
00459 LOCA::Homotopy::DeflatedGroup::
00460 applyJacobian(const NOX::Abstract::Vector& input,
00461 NOX::Abstract::Vector& result) const
00462 {
00463
00464 Teuchos::RCP<NOX::Abstract::MultiVector> mv_input =
00465 input.createMultiVector(1, NOX::DeepCopy);
00466 Teuchos::RCP<NOX::Abstract::MultiVector> mv_result =
00467 result.createMultiVector(1, NOX::DeepCopy);
00468
00469
00470 NOX::Abstract::Group::ReturnType status =
00471 applyJacobianMultiVector(*mv_input, *mv_result);
00472
00473
00474 result = (*mv_result)[0];
00475
00476 return status;
00477 }
00478
00479 NOX::Abstract::Group::ReturnType
00480 LOCA::Homotopy::DeflatedGroup::
00481 applyJacobianTranspose(const NOX::Abstract::Vector& input,
00482 NOX::Abstract::Vector& result) const
00483 {
00484
00485 Teuchos::RCP<NOX::Abstract::MultiVector> mv_input =
00486 input.createMultiVector(1, NOX::DeepCopy);
00487 Teuchos::RCP<NOX::Abstract::MultiVector> mv_result =
00488 result.createMultiVector(1, NOX::DeepCopy);
00489
00490
00491 NOX::Abstract::Group::ReturnType status =
00492 applyJacobianTransposeMultiVector(*mv_input, *mv_result);
00493
00494
00495 result = (*mv_result)[0];
00496
00497 return status;
00498 }
00499
00500 NOX::Abstract::Group::ReturnType
00501 LOCA::Homotopy::DeflatedGroup::
00502 applyJacobianInverse(Teuchos::ParameterList& params,
00503 const NOX::Abstract::Vector& input,
00504 NOX::Abstract::Vector& result) const
00505 {
00506
00507 Teuchos::RCP<NOX::Abstract::MultiVector> mv_input =
00508 input.createMultiVector(1, NOX::DeepCopy);
00509 Teuchos::RCP<NOX::Abstract::MultiVector> mv_result =
00510 result.createMultiVector(1, NOX::DeepCopy);
00511
00512
00513 NOX::Abstract::Group::ReturnType status =
00514 applyJacobianInverseMultiVector(params, *mv_input, *mv_result);
00515
00516
00517 result = (*mv_result)[0];
00518
00519 return status;
00520 }
00521
00522 NOX::Abstract::Group::ReturnType
00523 LOCA::Homotopy::DeflatedGroup::
00524 applyJacobianMultiVector(const NOX::Abstract::MultiVector& input,
00525 NOX::Abstract::MultiVector& result) const
00526 {
00527 string callingFunction =
00528 "LOCA::Homotopy::DeflatedGroup::applyJacobianMultiVector()";
00529
00530 if (!isJacobian()) {
00531 globalData->locaErrorCheck->throwError(callingFunction,
00532 "Called with invalid Jacobian!");
00533 }
00534
00535
00536 const LOCA::MultiContinuation::ExtendedMultiVector& c_input =
00537 dynamic_cast<const LOCA::MultiContinuation::ExtendedMultiVector&>(input);
00538 LOCA::MultiContinuation::ExtendedMultiVector& c_result =
00539 dynamic_cast<LOCA::MultiContinuation::ExtendedMultiVector&>(result);
00540
00541
00542 Teuchos::RCP<const NOX::Abstract::MultiVector> input_x =
00543 c_input.getXMultiVec();
00544 Teuchos::RCP<const NOX::Abstract::MultiVector::DenseMatrix> input_param = c_input.getScalars();
00545
00546
00547 Teuchos::RCP<NOX::Abstract::MultiVector> result_x =
00548 c_result.getXMultiVec();
00549 Teuchos::RCP<NOX::Abstract::MultiVector::DenseMatrix> result_param =
00550 c_result.getScalars();
00551
00552 NOX::Abstract::Group::ReturnType status =
00553 grpPtr->applyJacobianMultiVector(*input_x, *result_x);
00554
00555
00556
00557 if (augmentJacForHomotopyNotImplemented)
00558 result_x->update(1.0-conParam, *input_x, conParam/distProd);
00559
00560
00561 if (numSolns > 0) {
00562 NOX::Abstract::MultiVector::DenseMatrix tmp(1, input.numVectors());
00563 input_x->multiply(1.0, *totalDistMultiVec, tmp);
00564 result_x->update(Teuchos::NO_TRANS, 1.0, *underlyingF, tmp, 1.0);
00565 }
00566
00567
00568 result_param->putScalar(0.0);
00569
00570 return status;
00571 }
00572
00573 NOX::Abstract::Group::ReturnType
00574 LOCA::Homotopy::DeflatedGroup::
00575 applyJacobianTransposeMultiVector(const NOX::Abstract::MultiVector& input,
00576 NOX::Abstract::MultiVector& result) const
00577 {
00578 string callingFunction =
00579 "LOCA::Homotopy::DeflatedGroup::applyJacobianTransposeMultiVector()";
00580
00581 if (!isJacobian()) {
00582 globalData->locaErrorCheck->throwError(callingFunction,
00583 "Called with invalid Jacobian!");
00584 }
00585
00586
00587 const LOCA::MultiContinuation::ExtendedMultiVector& c_input =
00588 dynamic_cast<const LOCA::MultiContinuation::ExtendedMultiVector&>(input);
00589 LOCA::MultiContinuation::ExtendedMultiVector& c_result =
00590 dynamic_cast<LOCA::MultiContinuation::ExtendedMultiVector&>(result);
00591
00592
00593 Teuchos::RCP<const NOX::Abstract::MultiVector> input_x =
00594 c_input.getXMultiVec();
00595 Teuchos::RCP<const NOX::Abstract::MultiVector::DenseMatrix> input_param = c_input.getScalars();
00596
00597
00598 Teuchos::RCP<NOX::Abstract::MultiVector> result_x =
00599 c_result.getXMultiVec();
00600 Teuchos::RCP<NOX::Abstract::MultiVector::DenseMatrix> result_param =
00601 c_result.getScalars();
00602
00603 NOX::Abstract::Group::ReturnType status =
00604 grpPtr->applyJacobianTransposeMultiVector(*input_x, *result_x);
00605
00606
00607
00608 if (augmentJacForHomotopyNotImplemented)
00609 result_x->update(1.0-conParam, *input_x, conParam/distProd);
00610
00611
00612 if (numSolns > 0) {
00613 NOX::Abstract::MultiVector::DenseMatrix tmp(1, input.numVectors());
00614 input_x->multiply(1.0, *underlyingF, tmp);
00615 result_x->update(Teuchos::NO_TRANS, 1.0, *totalDistMultiVec, tmp, 1.0);
00616 }
00617
00618
00619 result_param->putScalar(0.0);
00620
00621 return status;
00622 }
00623
00624 NOX::Abstract::Group::ReturnType
00625 LOCA::Homotopy::DeflatedGroup::
00626 applyJacobianInverseMultiVector(Teuchos::ParameterList& params,
00627 const NOX::Abstract::MultiVector& input,
00628 NOX::Abstract::MultiVector& result) const
00629 {
00630 string callingFunction =
00631 "LOCA::Homotopy::DeflatedGroup::applyJacobianInverseMultiVector()";
00632
00633 if (!isJacobian()) {
00634 globalData->locaErrorCheck->throwError(callingFunction,
00635 "Called with invalid Jacobian!");
00636 }
00637
00638
00639 const LOCA::MultiContinuation::ExtendedMultiVector& c_input =
00640 dynamic_cast<const LOCA::MultiContinuation::ExtendedMultiVector&>(input);
00641 LOCA::MultiContinuation::ExtendedMultiVector& c_result =
00642 dynamic_cast<LOCA::MultiContinuation::ExtendedMultiVector&>(result);
00643
00644
00645 Teuchos::RCP<const NOX::Abstract::MultiVector> input_x =
00646 c_input.getXMultiVec();
00647 Teuchos::RCP<const NOX::Abstract::MultiVector::DenseMatrix> input_param = c_input.getScalars();
00648
00649
00650 Teuchos::RCP<NOX::Abstract::MultiVector> result_x =
00651 c_result.getXMultiVec();
00652 Teuchos::RCP<NOX::Abstract::MultiVector::DenseMatrix> result_param =
00653 c_result.getScalars();
00654
00655 NOX::Abstract::Group::ReturnType status;
00656 if (numSolns > 0) {
00657
00658 status =
00659 borderedSolver->applyInverse(params, input_x.get(), input_param.get(),
00660 *result_x, *result_param);
00661 }
00662 else {
00663 status =
00664 grpPtr->applyJacobianInverseMultiVector(params, *input_x, *result_x);
00665 result_param->putScalar(0.0);
00666 }
00667
00668 return status;
00669 }
00670
00671 bool
00672 LOCA::Homotopy::DeflatedGroup::
00673 isF() const
00674 {
00675 return isValidF;
00676 }
00677
00678 bool
00679 LOCA::Homotopy::DeflatedGroup::
00680 isJacobian() const
00681 {
00682 return isValidJacobian;
00683 }
00684
00685 bool
00686 LOCA::Homotopy::DeflatedGroup::
00687 isGradient() const
00688 {
00689 return isValidGradient;
00690 }
00691
00692 bool
00693 LOCA::Homotopy::DeflatedGroup::
00694 isNewton() const
00695 {
00696 return isValidNewton;
00697 }
00698
00699 const NOX::Abstract::Vector&
00700 LOCA::Homotopy::DeflatedGroup::
00701 getX() const
00702 {
00703 return *xVec;
00704 }
00705
00706 const NOX::Abstract::Vector&
00707 LOCA::Homotopy::DeflatedGroup::
00708 getF() const
00709 {
00710 return *fVec;
00711 }
00712
00713 double
00714 LOCA::Homotopy::DeflatedGroup::
00715 getNormF() const
00716 {
00717 return fVec->norm();
00718 }
00719
00720 const NOX::Abstract::Vector&
00721 LOCA::Homotopy::DeflatedGroup::
00722 getGradient() const
00723 {
00724 return *gradientVec;
00725 }
00726
00727 const NOX::Abstract::Vector&
00728 LOCA::Homotopy::DeflatedGroup::
00729 getNewton() const
00730 {
00731 return *newtonVec;
00732 }
00733
00734 double
00735 LOCA::Homotopy::DeflatedGroup::
00736 getNormNewtonSolveResidual() const
00737 {
00738 string callingFunction =
00739 "LOCA::Homotopy::DeflatedGroup::getNormNewtonSolveResidual()";
00740 NOX::Abstract::Group::ReturnType finalStatus;
00741 LOCA::MultiContinuation::ExtendedVector residual = *fVec;
00742
00743 finalStatus = applyJacobian(*newtonVec, residual);
00744 globalData->locaErrorCheck->checkReturnType(finalStatus, callingFunction);
00745
00746 residual = residual.update(1.0, *fVec, 1.0);
00747 return residual.norm();
00748 }
00749
00750 Teuchos::RCP<const LOCA::MultiContinuation::AbstractGroup>
00751 LOCA::Homotopy::DeflatedGroup::
00752 getUnderlyingGroup() const
00753 {
00754 return grpPtr;
00755 }
00756
00757 Teuchos::RCP<LOCA::MultiContinuation::AbstractGroup>
00758 LOCA::Homotopy::DeflatedGroup::
00759 getUnderlyingGroup()
00760 {
00761 return grpPtr;
00762 }
00763
00764 void
00765 LOCA::Homotopy::DeflatedGroup::
00766 copy(const NOX::Abstract::Group& src)
00767 {
00768
00769 const LOCA::Homotopy::DeflatedGroup& source =
00770 dynamic_cast<const LOCA::Homotopy::DeflatedGroup&>(src);
00771
00772
00773 if (this != &source) {
00774 globalData = source.globalData;
00775 parsedParams = source.parsedParams;
00776 homotopyParams = source.homotopyParams;
00777 grpPtr->copy(*source.grpPtr);
00778 xMultiVec = source.xMultiVec;
00779 fMultiVec = source.fMultiVec;
00780 newtonMultiVec = source.newtonMultiVec;
00781 gradientMultiVec = source.gradientMultiVec;
00782 startVec = source.startVec;
00783 identitySign = source.identitySign;
00784 solns = source.solns;
00785 *distVec = *source.distVec;
00786 *totalDistMultiVec = *source.totalDistMultiVec;
00787 *underlyingF = *source.underlyingF;
00788 numSolns = source.numSolns;
00789 distances = source.distances;
00790 distProd = source.distProd;
00791 index_f = source.index_f;
00792 paramVec = source.paramVec;
00793 conParam = source.conParam;
00794 conParamID = source.conParamID;
00795 augmentJacForHomotopyNotImplemented = source.augmentJacForHomotopyNotImplemented;
00796 isValidF = source.isValidF;
00797 isValidJacobian = source.isValidJacobian;
00798 isValidNewton = source.isValidNewton;
00799 isValidGradient = source.isValidGradient;
00800
00801
00802 setupViews();
00803
00804
00805 borderedSolver =
00806 globalData->locaFactory->createBorderedSolverStrategy(parsedParams,
00807 homotopyParams);
00808
00809
00810 if (isValidJacobian) {
00811 borderedSolver->setMatrixBlocksMultiVecConstraint(jacOp,
00812 underlyingF,
00813 totalDistMultiVec,
00814 minusOne);
00815 NOX::Abstract::Group::ReturnType status = borderedSolver->initForSolve();
00816 globalData->locaErrorCheck->checkReturnType(status,
00817 "LOCA::Homotopy::copy()");
00818 }
00819 }
00820 }
00821
00822 void
00823 LOCA::Homotopy::DeflatedGroup::
00824 setParamsMulti(const vector<int>& paramIDs,
00825 const NOX::Abstract::MultiVector::DenseMatrix& vals)
00826 {
00827 grpPtr->setParamsMulti(paramIDs, vals);
00828
00829 for (unsigned int i=0; i<paramIDs.size(); i++) {
00830 paramVec[paramIDs[i]] = vals(i,0);
00831 if (paramIDs[i] == conParamID)
00832 conParam = vals(i,0);
00833 }
00834
00835 resetIsValid();
00836 }
00837
00838 void
00839 LOCA::Homotopy::DeflatedGroup::
00840 setParams(const LOCA::ParameterVector& p)
00841 {
00842 grpPtr->setParams(p);
00843 xVec->getScalar(0) = p[conParamID];
00844
00845 resetIsValid();
00846 }
00847
00848 void
00849 LOCA::Homotopy::DeflatedGroup::
00850 setParam(int paramID, double val)
00851 {
00852 grpPtr->setParam(paramID, val);
00853 paramVec[paramID] = val;
00854 if (paramID == conParamID)
00855 conParam = val;
00856
00857 resetIsValid();
00858 }
00859
00860 void
00861 LOCA::Homotopy::DeflatedGroup::
00862 setParam(string paramID, double val)
00863 {
00864 int id = paramVec.getIndex(paramID);
00865 setParam(id, val);
00866 }
00867
00868 const LOCA::ParameterVector&
00869 LOCA::Homotopy::DeflatedGroup::
00870 getParams() const
00871 {
00872 return paramVec;
00873 }
00874
00875 double
00876 LOCA::Homotopy::DeflatedGroup::
00877 getParam(int paramID) const{
00878 return paramVec[paramID];
00879 }
00880
00881 double
00882 LOCA::Homotopy::DeflatedGroup::
00883 getParam(string paramID) const
00884 {
00885 return paramVec.getValue(paramID);
00886 }
00887
00888 NOX::Abstract::Group::ReturnType
00889 LOCA::Homotopy::DeflatedGroup::
00890 computeDfDpMulti(const vector<int>& paramIDs,
00891 NOX::Abstract::MultiVector& dfdp,
00892 bool isValid_F)
00893 {
00894 string callingFunction =
00895 "LOCA::Homotopy::DeflatedGroup::computeDfDpMulti()";
00896 NOX::Abstract::Group::ReturnType finalStatus = NOX::Abstract::Group::Ok;
00897 NOX::Abstract::Group::ReturnType status;
00898
00899
00900 LOCA::MultiContinuation::ExtendedMultiVector& e_dfdp =
00901 dynamic_cast<LOCA::MultiContinuation::ExtendedMultiVector&>(dfdp);
00902
00903 Teuchos::RCP<NOX::Abstract::MultiVector> dfdp_x =
00904 e_dfdp.getXMultiVec();
00905
00906 if (!isValid_F) {
00907 status = grpPtr->computeF();
00908 finalStatus =
00909 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00910 finalStatus,
00911 callingFunction);
00912 (*dfdp_x)[0].update(conParam / distProd, grpPtr->getF(), 0.0);
00913 }
00914
00915 std::vector<int> index_c, index_p, p_IDs;
00916 index_p.push_back(0);
00917 for (unsigned int i=0; i<paramIDs.size(); i++) {
00918 if (paramIDs[i] == conParamID)
00919 index_c.push_back(i+1);
00920 else {
00921 index_p.push_back(i+1);
00922 p_IDs.push_back(paramIDs[i]);
00923 }
00924 }
00925
00926 Teuchos::RCP<NOX::Abstract::MultiVector> dfdp_c, dfdp_p;
00927 if (index_c.size() > 0) {
00928 dfdp_c = dfdp_x->subView(index_c);
00929 distVec->update(1.0, grpPtr->getX(), -1.0, *startVec, 0.0);
00930
00931 (*dfdp_c)[0].update(1.0/distProd, grpPtr->getF(), -1.0, *distVec, 0.0);
00932 }
00933
00934 if (index_p.size() > 1) {
00935 dfdp_p = dfdp_x->subView(index_p);
00936 status = grpPtr->computeDfDpMulti(p_IDs, *(dfdp_p), true);
00937 finalStatus =
00938 globalData->locaErrorCheck->combineAndCheckReturnTypes(status,
00939 finalStatus,
00940 callingFunction);
00941 for (unsigned int i=0; i<p_IDs.size(); i++) {
00942 (*dfdp_p)[i+1].scale(conParam / distProd);
00943 }
00944 }
00945
00946
00947 e_dfdp.getScalars()->putScalar(0.0);
00948
00949 return finalStatus;
00950 }
00951
00952 void
00953 LOCA::Homotopy::DeflatedGroup::
00954 preProcessContinuationStep(LOCA::Abstract::Iterator::StepStatus stepStatus)
00955 {
00956 grpPtr->preProcessContinuationStep(stepStatus);
00957 }
00958
00959 void
00960 LOCA::Homotopy::DeflatedGroup::
00961 postProcessContinuationStep(LOCA::Abstract::Iterator::StepStatus stepStatus)
00962 {
00963 grpPtr->postProcessContinuationStep(stepStatus);
00964 }
00965
00966 void
00967 LOCA::Homotopy::DeflatedGroup::
00968 projectToDraw(const NOX::Abstract::Vector& x,
00969 double *px) const
00970 {
00971 const LOCA::MultiContinuation::ExtendedVector& mx =
00972 dynamic_cast<const LOCA::MultiContinuation::ExtendedVector&>(x);
00973
00974 grpPtr->projectToDraw(*mx.getXVec(), px);
00975 px[grpPtr->projectToDrawDimension()] = mx.getScalar(0);
00976 }
00977
00978 int
00979 LOCA::Homotopy::DeflatedGroup::
00980 projectToDrawDimension() const
00981 {
00982 return grpPtr->projectToDrawDimension() + 1;
00983 }
00984
00985 double
00986 LOCA::Homotopy::DeflatedGroup::
00987 computeScaledDotProduct(const NOX::Abstract::Vector& a,
00988 const NOX::Abstract::Vector& b) const
00989 {
00990 const LOCA::MultiContinuation::ExtendedVector& ma =
00991 dynamic_cast<const LOCA::MultiContinuation::ExtendedVector&>(a);
00992 const LOCA::MultiContinuation::ExtendedVector& mb =
00993 dynamic_cast<const LOCA::MultiContinuation::ExtendedVector&>(b);
00994
00995 double val = grpPtr->computeScaledDotProduct(*ma.getXVec(), *mb.getXVec());
00996 val += ma.getScalar(0) * mb.getScalar(0);
00997
00998 return val;
00999 }
01000
01001 void
01002 LOCA::Homotopy::DeflatedGroup::
01003 printSolution(const double conParam_) const
01004 {
01005 if (globalData->locaUtils->isPrintType(NOX::Utils::StepperDetails)) {
01006 globalData->locaUtils->out() <<
01007 "\tPrinting Solution Vector for homotopy parameter = " <<
01008 globalData->locaUtils->sciformat(conParam_) << std::endl;
01009 }
01010 grpPtr->printSolution(conParam_);
01011 return;
01012 }
01013
01014 void
01015 LOCA::Homotopy::DeflatedGroup::
01016 printSolution(const NOX::Abstract::Vector& x,
01017 const double conParam_) const
01018 {
01019 if (globalData->locaUtils->isPrintType(NOX::Utils::StepperDetails)) {
01020 globalData->locaUtils->out() <<
01021 "\tPrinting Solution Vector for homotopy parameter = " <<
01022 globalData->locaUtils->sciformat(conParam_) << std::endl;
01023 }
01024 grpPtr->printSolution(x, conParam_);
01025 return;
01026 }
01027
01028 void
01029 LOCA::Homotopy::DeflatedGroup::
01030 scaleVector(NOX::Abstract::Vector& x) const
01031 {
01032 LOCA::MultiContinuation::ExtendedVector& mx =
01033 dynamic_cast<LOCA::MultiContinuation::ExtendedVector&>(x);
01034
01035 grpPtr->scaleVector(*mx.getXVec());
01036 }
01037
01038 int
01039 LOCA::Homotopy::DeflatedGroup::
01040 getBorderedWidth() const
01041 {
01042 int my_width = 1;
01043 if (isBordered)
01044 return my_width + bordered_grp->getBorderedWidth();
01045 else
01046 return my_width;
01047 }
01048
01049 Teuchos::RCP<const NOX::Abstract::Group>
01050 LOCA::Homotopy::DeflatedGroup::
01051 getUnborderedGroup() const
01052 {
01053 if (isBordered)
01054 return bordered_grp->getUnborderedGroup();
01055 else
01056 return grpPtr;
01057 }
01058
01059 bool
01060 LOCA::Homotopy::DeflatedGroup::
01061 isCombinedAZero() const
01062 {
01063 return false;
01064 }
01065
01066 bool
01067 LOCA::Homotopy::DeflatedGroup::
01068 isCombinedBZero() const
01069 {
01070 return false;
01071 }
01072
01073 bool
01074 LOCA::Homotopy::DeflatedGroup::
01075 isCombinedCZero() const
01076 {
01077 return false;
01078 }
01079
01080 void
01081 LOCA::Homotopy::DeflatedGroup::
01082 extractSolutionComponent(const NOX::Abstract::MultiVector& v,
01083 NOX::Abstract::MultiVector& v_x) const
01084 {
01085
01086 const LOCA::MultiContinuation::ExtendedMultiVector& mc_v =
01087 dynamic_cast<const LOCA::MultiContinuation::ExtendedMultiVector&>(v);
01088
01089
01090 Teuchos::RCP<const NOX::Abstract::MultiVector> mc_v_x =
01091 mc_v.getXMultiVec();
01092
01093
01094 if (!isBordered) {
01095 v_x = *mc_v_x;
01096 return;
01097 }
01098
01099
01100 bordered_grp->extractSolutionComponent(*mc_v_x, v_x);
01101 }
01102
01103 void
01104 LOCA::Homotopy::DeflatedGroup::
01105 extractParameterComponent(bool use_transpose,
01106 const NOX::Abstract::MultiVector& v,
01107 NOX::Abstract::MultiVector::DenseMatrix& v_p) const
01108 {
01109
01110 const LOCA::MultiContinuation::ExtendedMultiVector& mc_v =
01111 dynamic_cast<const LOCA::MultiContinuation::ExtendedMultiVector&>(v);
01112
01113
01114 Teuchos::RCP<const NOX::Abstract::MultiVector> mc_v_x =
01115 mc_v.getXMultiVec();
01116 Teuchos::RCP<const NOX::Abstract::MultiVector::DenseMatrix> mc_v_p =
01117 mc_v.getScalars();
01118
01119
01120 if (!isBordered) {
01121 if (!use_transpose)
01122 v_p.assign(*mc_v_p);
01123 else
01124 for (int j=0; j<v_p.numCols(); j++)
01125 for (int i=0; i<v_p.numRows(); i++)
01126 v_p(i,j) = (*mc_v_p)(j,i);
01127 return;
01128 }
01129
01130 int w = bordered_grp->getBorderedWidth();
01131 if (!use_transpose) {
01132
01133
01134 int num_cols = v_p.numCols();
01135 NOX::Abstract::MultiVector::DenseMatrix v_p_1(Teuchos::View, v_p,
01136 w, num_cols, 0, 0);
01137 NOX::Abstract::MultiVector::DenseMatrix v_p_2(Teuchos::View, v_p,
01138 1, num_cols, w, 0);
01139
01140
01141 bordered_grp->extractParameterComponent(use_transpose,*mc_v_x, v_p_1);
01142 v_p_2.assign(*mc_v_p);
01143 }
01144 else {
01145
01146
01147 int num_rows = v_p.numRows();
01148 NOX::Abstract::MultiVector::DenseMatrix v_p_1(Teuchos::View, v_p,
01149 num_rows, w, 0, 0);
01150 NOX::Abstract::MultiVector::DenseMatrix v_p_2(Teuchos::View, v_p,
01151 num_rows, 1, 0, w);
01152
01153
01154 bordered_grp->extractParameterComponent(use_transpose,*mc_v_x, v_p_1);
01155 for (int j=0; j<1; j++)
01156 for (int i=0; i<num_rows; i++)
01157 v_p_2(i,j) = (*mc_v_p)(j,i);
01158 }
01159 }
01160
01161 void
01162 LOCA::Homotopy::DeflatedGroup::
01163 loadNestedComponents(const NOX::Abstract::MultiVector& v_x,
01164 const NOX::Abstract::MultiVector::DenseMatrix& v_p,
01165 NOX::Abstract::MultiVector& v) const
01166 {
01167
01168 LOCA::MultiContinuation::ExtendedMultiVector& mc_v =
01169 dynamic_cast<LOCA::MultiContinuation::ExtendedMultiVector&>(v);
01170
01171
01172 Teuchos::RCP<NOX::Abstract::MultiVector> mc_v_x =
01173 mc_v.getXMultiVec();
01174 Teuchos::RCP<NOX::Abstract::MultiVector::DenseMatrix> mc_v_p =
01175 mc_v.getScalars();
01176
01177
01178 if (!isBordered) {
01179 *mc_v_x = v_x;
01180 mc_v_p->assign(v_p);
01181 return;
01182 }
01183
01184
01185 int num_cols = v_p.numCols();
01186 int w = bordered_grp->getBorderedWidth();
01187 NOX::Abstract::MultiVector::DenseMatrix v_p_1(Teuchos::View, v_p,
01188 w, num_cols, 0, 0);
01189 NOX::Abstract::MultiVector::DenseMatrix v_p_2(Teuchos::View, v_p,
01190 1, num_cols, w, 0);
01191
01192
01193 bordered_grp->loadNestedComponents(v_x, v_p_1, *mc_v_x);
01194
01195
01196 mc_v_p->assign(v_p_2);
01197 }
01198
01199 void
01200 LOCA::Homotopy::DeflatedGroup::
01201 fillA(NOX::Abstract::MultiVector& A) const
01202 {
01203 string callingFunction =
01204 "LOCA::Homotopy::DeflatedGroup::fillA";
01205
01206 Teuchos::RCP<const NOX::Abstract::MultiVector> my_A =
01207 underlyingF;
01208
01209
01210 if (!isBordered) {
01211 A = *my_A;
01212 return;
01213 }
01214
01215
01216 int w = bordered_grp->getBorderedWidth();
01217 std::vector<int> idx1(w);
01218 for (int i=0; i<w; i++)
01219 idx1[i] = i;
01220 Teuchos::RCP<NOX::Abstract::MultiVector> underlyingA =
01221 A.subView(idx1);
01222
01223
01224 bordered_grp->fillA(*underlyingA);
01225
01226
01227 std::vector<int> idx2(1);
01228 for (int i=0; i<1; i++)
01229 idx2[i] = w+i;
01230 Teuchos::RCP<NOX::Abstract::MultiVector> my_A_x =
01231 A.subView(idx2);
01232
01233
01234 bordered_grp->extractSolutionComponent(*my_A, *my_A_x);
01235 }
01236
01237 void
01238 LOCA::Homotopy::DeflatedGroup::
01239 fillB(NOX::Abstract::MultiVector& B) const
01240 {
01241 string callingFunction =
01242 "LOCA::Homotopy::DeflatedGroup::fillB";
01243
01244 Teuchos::RCP<const NOX::Abstract::MultiVector> my_B =
01245 totalDistMultiVec;
01246
01247
01248 if (!isBordered) {
01249 B = *my_B;
01250 return;
01251 }
01252
01253
01254 int w = bordered_grp->getBorderedWidth();
01255 std::vector<int> idx1(w);
01256 for (int i=0; i<w; i++)
01257 idx1[i] = i;
01258 Teuchos::RCP<NOX::Abstract::MultiVector> underlyingB =
01259 B.subView(idx1);
01260
01261
01262 bordered_grp->fillB(*underlyingB);
01263
01264
01265 std::vector<int> idx2(2);
01266 for (int i=0; i<1; i++)
01267 idx2[i] = w+i;
01268 Teuchos::RCP<NOX::Abstract::MultiVector> my_B_x =
01269 B.subView(idx2);
01270
01271
01272 bordered_grp->extractSolutionComponent(*my_B, *my_B_x);
01273 }
01274
01275 void
01276 LOCA::Homotopy::DeflatedGroup::
01277 fillC(NOX::Abstract::MultiVector::DenseMatrix& C) const
01278 {
01279 string callingFunction =
01280 "LOCA::Homotopy::DeflatedGroup::fillC";
01281
01282 Teuchos::RCP<const NOX::Abstract::MultiVector::DenseMatrix> my_C =
01283 minusOne;
01284
01285
01286 if (!isBordered) {
01287 C.assign(*my_C);
01288 return;
01289 }
01290
01291 Teuchos::RCP<const NOX::Abstract::MultiVector> my_B =
01292 totalDistMultiVec;
01293
01294 Teuchos::RCP<const NOX::Abstract::MultiVector> my_A =
01295 underlyingF;
01296
01297
01298 int w = bordered_grp->getBorderedWidth();
01299 NOX::Abstract::MultiVector::DenseMatrix underlyingC(Teuchos::View, C,
01300 w, w, 0, 0);
01301
01302
01303 bordered_grp->fillC(underlyingC);
01304
01305
01306 NOX::Abstract::MultiVector::DenseMatrix my_A_p(Teuchos::View, C,
01307 w, 1, 0, w);
01308 NOX::Abstract::MultiVector::DenseMatrix my_B_p(Teuchos::View, C,
01309 1, w, w, 0);
01310 NOX::Abstract::MultiVector::DenseMatrix my_CC(Teuchos::View, C,
01311 1, 1, w, w);
01312
01313
01314 bordered_grp->extractParameterComponent(false, *my_A, my_A_p);
01315
01316
01317 bordered_grp->extractParameterComponent(true, *my_B, my_B_p);
01318
01319
01320 my_CC.assign(*my_C);
01321 }
01322
01323 void
01324 LOCA::Homotopy::DeflatedGroup::
01325 resetIsValid()
01326 {
01327 isValidF = false;
01328 isValidJacobian = false;
01329 isValidNewton = false;
01330 isValidGradient = false;
01331 }
01332
01333 void
01334 LOCA::Homotopy::DeflatedGroup::
01335 setupViews()
01336 {
01337 index_f[0] = 0;
01338
01339 xVec = Teuchos::rcp_dynamic_cast<LOCA::MultiContinuation::ExtendedVector>(xMultiVec.getVector(0),true);
01340 fVec = Teuchos::rcp_dynamic_cast<LOCA::MultiContinuation::ExtendedVector>(fMultiVec.getVector(0),true);
01341 newtonVec = Teuchos::rcp_dynamic_cast<LOCA::MultiContinuation::ExtendedVector>(newtonMultiVec.getVector(0),true);
01342 gradientVec = Teuchos::rcp_dynamic_cast<LOCA::MultiContinuation::ExtendedVector>(gradientMultiVec.getVector(0),true);
01343 totalDistVec = Teuchos::rcp(&(*totalDistMultiVec)[0], false);
01344 }
01345
01346 void
01347 LOCA::Homotopy::DeflatedGroup::
01348 setHomotopyParam(double val)
01349 {
01350 xVec->getScalar(0) = val;
01351 paramVec[conParamID] = val;
01352
01353 resetIsValid();
01354 }
01355
01356 void
01357 LOCA::Homotopy::DeflatedGroup::
01358 setStepperParameters(Teuchos::ParameterList& topParams)
01359 {
01360 Teuchos::ParameterList& params = topParams.sublist("LOCA");
01361
01362
01363 Teuchos::ParameterList& stepperList = params.sublist("Stepper");
01364 stepperList.set("Continuation Method", "Natural");
01365 stepperList.set("Continuation Parameter", conParamLabel);
01366 stepperList.set("Initial Value", 0.0);
01367 stepperList.set("Max Value", 1.0);
01368 stepperList.set("Min Value", -1.0);
01369 stepperList.set("Max Steps", 50);
01370
01371
01372 Teuchos::ParameterList& predictorList = params.sublist("Predictor");
01373 predictorList.set("Method", "Constant");
01374
01375
01376 Teuchos::ParameterList& stepSizeList = params.sublist("Step Size");
01377
01378 stepSizeList.set("Method", "Adaptive");
01379 stepSizeList.set("Initial Step Size", 0.1);
01380 stepSizeList.set("Min Step Size", 1.0e-2);
01381 stepSizeList.set("Max Step Size", 1.0);
01382 stepSizeList.set("Aggressiveness", 0.5);
01383 return;
01384 }