Definition at line 1853 of file solver.cc.
References LineSearchParameters::ABORT_AT_LAMBDA_MIN, SolverDiagnostics::AddOutputFlags(), AFTER_ASSEMBLY, AFTER_DERIVATIVES, AFTER_DUMMY_STEPS, AFTER_INPUT, LineSearchParameters::ALGORITHM_CUBIC, LineSearchParameters::ALGORITHM_FACTOR, Solver::EigenAnalysis::Analyses, Solver::EigenAnalysis::arpack, ASSERT, Solver::EigenAnalysis::bAnalysis, NonlinearSolverOptions::bHonorJacRequest, MatrixFreeSolver::BICGSTAB, bKeepJac, bParallel, bScale, bTrueNewtonRaphson, Solver::EigenAnalysis::currAnalysis, CurrIntSolver, CurrLinearSolver, LineSearchParameters::dAlpha, dDefaultDerivativesCoefficient, dDefaultDummyStepsTolerance, dDefaultTol, dDerivativesCoef, LineSearchParameters::dDivergenceCheck, dDummyStepsRatio, DEBUGCOUTFNAME, DEBUGLCOUT, MatrixFreeSolver::DEFAULT, NonlinearSolver::DEFAULT, SolverDiagnostics::DelOutputFlags(), dFinalTime, DriveOwner::dGet(), dGetInitialMaxTimeStep(), dInitialTime, dInitialTimeStep, dIterertiveEtaMax, dIterertiveTau, dIterTol, LineSearchParameters::DIVERGENCE_CHECK, LineSearchParameters::dLambdaFactMin, LineSearchParameters::dLambdaMin, Solver::EigenAnalysis::dLowerFreq, dMaxResidual, dMaxResidualDiff, LineSearchParameters::dMaxStep, LineSearchParameters::dMinStepScale, dMinTimeStep, Solver::EigenAnalysis::dParam, NonlinearSolverOptions::dScaleAlgebraic, Solver::EigenAnalysis::ARPACK::dTOL, LineSearchParameters::dTolMin, LineSearchParameters::dTolX, DummyType, Solver::EigenAnalysis::dUpperFreq, eAbortAfter, Solver::EigenAnalysis::EIG_BALANCE, Solver::EigenAnalysis::EIG_OUTPUT_EIGENVECTORS, Solver::EigenAnalysis::EIG_OUTPUT_FULL_MATRICES, Solver::EigenAnalysis::EIG_OUTPUT_GEOMETRY, Solver::EigenAnalysis::EIG_OUTPUT_MATRICES, Solver::EigenAnalysis::EIG_OUTPUT_SPARSE_MATRICES, Solver::EigenAnalysis::EIG_PERMUTE, Solver::EigenAnalysis::EIG_SCALE, Solver::EigenAnalysis::EIG_SOLVE, Solver::EigenAnalysis::EIG_USE_ARPACK, Solver::EigenAnalysis::EIG_USE_JDQZ, Solver::EigenAnalysis::EIG_USE_LAPACK, Solver::EigenAnalysis::EIG_USE_MASK, EigAn, Solver::EigenAnalysis::EIGAN_WIDTH_COMPUTE, END, Solver::EigenAnalysis::JDQZ::eps, NonlinearSolverOptions::eScaleFlags, eTimeStepLimit, Preconditioner::FULLJACOBIANMATRIX, HighParser::ErrValueOutOfRange< T >::Get(), get_nprocs(), HighParser::GetDescription(), MBDynParser::GetDriveCaller(), HighParser::GetInt(), IncludeParser::GetLineData(), HighParser::GetReal(), LinSol::GetSolverName(), HighParser::GetStringWithDelims(), HighParser::GetWord(), HighParser::GetYesNoOrBool(), MatrixFreeSolver::GMRES, iDefaultDummyStepsNumber, iDefaultIterationsBeforeAssembly, iDefaultMaxIterations, iDummyStepsNumber, Solver::EigenAnalysis::iFNameFormat, Solver::EigenAnalysis::iFNameWidth, iIterationsBeforeAssembly, iIterativeMaxSteps, Solver::EigenAnalysis::iMatrixPrecision, LineSearchParameters::iMaxIterations, iMaxIterations, Solver::EigenAnalysis::ARPACK::iNCV, Solver::EigenAnalysis::ARPACK::iNEV, INT_CRANKNICOLSON, INT_HOPE, INT_IMPLICITEULER, INT_MS2, INT_THIRDORDER, INT_UNKNOWN, iPrecondSteps, Solver::EigenAnalysis::iResultsPrecision, HighParser::IsArg(), HighParser::IsKeyWord(), Solver::EigenAnalysis::jdqz, Solver::EigenAnalysis::JDQZ::jmax, Solver::EigenAnalysis::JDQZ::jmin, Solver::EigenAnalysis::JDQZ::kmax, LASTKEYWORD, NonlinearSolver::LINESEARCH, LineSearch, NonlinearSolver::MATRIXFREE, MaxTimeStep, MBDYN_EXCEPT_ARGS, MFSolverType, NonlinearSolverTest::MINMAX, MYDEBUG_INPUT, NonlinearSolver::NEWTONRAPHSON, LineSearchParameters::NON_NEGATIVE_SLOPE_CONTINUE, NonlinearSolverTest::NONE, NonlinearSolverType, NonlinearSolverTest::NORM, OUTPUT, SolverDiagnostics::OUTPUT_BAILOUT, SolverDiagnostics::OUTPUT_COUNTER, SolverDiagnostics::OUTPUT_CPU_TIME, SolverDiagnostics::OUTPUT_DEFAULT, SolverDiagnostics::OUTPUT_ITERS, SolverDiagnostics::OUTPUT_JAC, SolverDiagnostics::OUTPUT_MAT_COND_NUM, SolverDiagnostics::OUTPUT_MAT_COND_NUM_1, SolverDiagnostics::OUTPUT_MAT_COND_NUM_INF, SolverDiagnostics::OUTPUT_MSG, SolverDiagnostics::OUTPUT_NONE, SolverDiagnostics::OUTPUT_RES, SolverDiagnostics::OUTPUT_SOL, SolverDiagnostics::OUTPUT_SOLVER_COND_NUM, SolverDiagnostics::OUTPUT_SOLVER_COND_STAT, DriveCaller::pCopy(), PcType, pDerivativeSteps, pDummySteps, pFirstDummyStep, pFirstRegularStep, DriveOwner::pGetDriveCaller(), pRegularSteps, pRhoAlgebraicDummy, pRhoAlgebraicRegular, pRhoDummy, pRhoRegular, LineSearchParameters::PRINT_CONVERGENCE_INFO, pRTSolver, pTSC, ReadLinSol(), ReadRTSolver(), ReadTimeStepData(), RegularType, LineSearchParameters::RELATIVE_LAMBDA_MIN, ResTest, SAFENEW, SAFENEWWITHCONSTRUCTOR, NonlinearSolverOptions::SCALE_ALGEBRAIC_EQUATIONS_NO, NonlinearSolverOptions::SCALE_ALGEBRAIC_EQUATIONS_YES, LineSearchParameters::SCALE_NEWTON_STEP, DriveOwner::Set(), LinSol::SetNumThreads(), SolverDiagnostics::SetOutputFlags(), SolverDiagnostics::SetOutputMeter(), SolTest, TS_HARD_LIMIT, TS_SOFT_LIMIT, LineSearchParameters::uFlags, Solver::EigenAnalysis::uFlags, LineSearchParameters::VERBOSE_MODE, MBDynErrBase::what(), and LineSearchParameters::ZERO_GRADIENT_CONTINUE.
Referenced by Prepare().
1858 static const char*
const sKeyWords[] = {
1867 "min" "time" "step",
1868 "max" "time" "step",
1872 "modify" "residual" "test",
1873 "enforce" "constraint" "equations",
1875 "fictitious" "steps" "number",
1876 "fictitious" "steps" "ratio",
1877 "fictitious" "steps" "tolerance",
1878 "fictitious" "steps" "max" "iterations",
1881 "dummy" "steps" "number",
1882 "dummy" "steps" "ratio",
1883 "dummy" "steps" "tolerance",
1884 "dummy" "steps" "max" "iterations",
1891 "fictitious" "steps" ,
1900 "jacobian" "matrix",
1904 "matrix" "condition" "number",
1905 "solver" "condition" "number",
1910 "fictitious" "steps" "method" ,
1911 "dummy" "steps" "method",
1914 "Crank" "Nicholson" ,
1922 "derivatives" "coefficient",
1923 "derivatives" "tolerance",
1924 "derivatives" "max" "iterations",
1941 "interface" "solver",
1944 "interface" "linear" "solver",
1950 "nonlinear" "solver",
1958 "full" "jacobian" "matrix",
1986 ENFORCE_CONSTRAINT_EQUATIONS,
1987 FICTITIOUSSTEPSNUMBER,
1988 FICTITIOUSSTEPSRATIO,
1989 FICTITIOUSSTEPSTOLERANCE,
1990 FICTITIOUSSTEPSMAXITERATIONS,
1994 DUMMYSTEPSTOLERANCE,
1995 DUMMYSTEPSMAXITERATIONS,
2020 FICTITIOUSSTEPSMETHOD,
2031 DERIVATIVESCOEFFICIENT,
2032 DERIVATIVESTOLERANCE,
2033 DERIVATIVESMAXITERATIONS,
2053 INTERFACELINEARSOLVER,
2082 silent_cerr(
"Error: <begin> expected at line "
2083 << HP.
GetLineData() <<
"; aborting..." << std::endl);
2089 pedantic_cout(
"warning: \"begin: multistep\" is deprecated; "
2090 "use \"begin: initial value;\" instead." << std::endl);
2095 silent_cerr(
"Error: \"begin: initial value;\" expected at line "
2096 << HP.
GetLineData() <<
"; aborting..." << std::endl);
2100 bool bMethod(
false);
2101 bool bDummyStepsMethod(
false);
2110 bool bModResTest =
false;
2111 bool bSetScaleAlgebraic =
false;
2121 integer iDerivativesCoefMaxIter = 0;
2124 #ifdef USE_MULTITHREAD
2125 bool bSolverThreads(
false);
2126 unsigned nSolverThreads = 0;
2134 switch (CurrKeyWord) {
2143 dFinalTime = std::numeric_limits<doublereal>::max();
2151 silent_cerr(
"warning: final time " <<
dFinalTime
2152 <<
" is less than initial time "
2154 <<
"this will cause the simulation"
2155 " to abort" << std::endl);
2165 silent_cerr(
"warning, null initial time step"
2166 " is not allowed" << std::endl);
2169 silent_cerr(
"warning, negative initial time step"
2170 " is not allowed;" << std::endl
2172 <<
" will be considered" << std::endl);
2181 silent_cerr(
"invalid min time step " << e.
Get() <<
" (must be positive) [" << e.
what() <<
"] at line " << HP.
GetLineData() << std::endl);
2211 silent_cout(
"no max time step limit will be"
2212 " considered" << std::endl);
2215 silent_cerr(
"negative max time step"
2216 " is not allowed" << std::endl);
2221 case FICTITIOUSSTEPSNUMBER:
2222 case DUMMYSTEPSNUMBER:
2227 silent_cerr(
"negative dummy steps number"
2228 " is illegal" << std::endl);
2232 silent_cerr(
"warning, a single dummy step"
2233 " may be useless" << std::endl);
2240 case FICTITIOUSSTEPSRATIO:
2241 case DUMMYSTEPSRATIO:
2244 silent_cerr(
"negative dummy steps ratio"
2245 " is illegal" << std::endl);
2250 silent_cerr(
"warning, dummy steps ratio"
2251 " is larger than one." << std::endl
2252 <<
"Something like 1.e-3 should"
2253 " be safer ..." << std::endl);
2260 case FICTITIOUSSTEPSTOLERANCE:
2261 case DUMMYSTEPSTOLERANCE:
2262 dDummyStepsTolerance = HP.
GetReal();
2263 if (dDummyStepsTolerance <= 0.) {
2264 silent_cerr(
"negative dummy steps"
2265 " tolerance is illegal" << std::endl);
2269 "Dummy steps tolerance: "
2270 << dDummyStepsTolerance << std::endl);
2275 switch (WhenToAbort) {
2279 "Simulation will abort after"
2280 " data input" << std::endl);
2286 "Simulation will abort after"
2287 " initial assembly" << std::endl);
2293 "Simulation will abort after"
2294 " derivatives solution" << std::endl);
2297 case FICTITIOUSSTEPS:
2301 "Simulation will abort after"
2302 " dummy steps solution" << std::endl);
2306 silent_cerr(
"Don't know when to abort,"
2307 " so I'm going to abort now" << std::endl);
2314 bool setOutput =
false;
2316 while (HP.
IsArg()) {
2318 switch (OutputFlag) {
2337 case JACOBIANMATRIX:
2353 case MATRIX_COND_NUM:
2359 const double P = HP.
GetReal();
2361 silent_cerr(
"Only inf or 1 norm are supported for condition numbers at line " << HP.
GetLineData() << std::endl);
2371 case SOLVER_COND_NUM:
2386 silent_cerr(
"Warning, unknown output flag "
2388 <<
"; ignored" << std::endl);
2407 silent_cerr(
"error: multiple definition"
2408 " of integration method at line "
2416 case CRANKNICHOLSON:
2417 silent_cout(
"warning: \"crank nicolson\" is the correct spelling "
2428 int iOrder = HP.
GetInt();
2439 silent_cerr(
"unhandled BDF order " << iOrder << std::endl);
2451 silent_cerr(
"integration method \"nostro\" "
2452 "is deprecated; use \"ms\" "
2496 silent_cerr(
"Unknown integration method at line "
2503 case FICTITIOUSSTEPSMETHOD:
2504 case DUMMYSTEPSMETHOD: {
2505 if (bDummyStepsMethod) {
2506 silent_cerr(
"error: multiple definition "
2507 "of dummy steps integration method "
2512 bDummyStepsMethod =
true;
2516 case CRANKNICHOLSON:
2517 silent_cout(
"warning: \"crank nicolson\" is the correct spelling" << std::endl);
2527 int iOrder = HP.
GetInt();
2538 silent_cerr(
"unhandled BDF order " << iOrder << std::endl);
2589 silent_cerr(
"Unknown integration method at line " << HP.
GetLineData() << std::endl);
2608 silent_cerr(
"warning, residual tolerance "
2610 "using default value " << dTol
2629 silent_cerr(
"unknown test "
2638 silent_cerr(
"it's a nonsense "
2639 "to scale a disabled test; "
2656 if (dSolutionTol != 0.) {
2669 silent_cerr(
"unknown test "
2678 }
else if (dTol == 0.) {
2679 silent_cerr(
"need solution tolerance "
2680 "with null residual tolerance"
2685 if (dSolutionTol < 0.) {
2687 silent_cerr(
"warning, solution tolerance "
2689 "solution test is disabled"
2693 if (dTol == 0. && dSolutionTol == 0.) {
2694 silent_cerr(
"both residual and solution "
2695 "tolerances are zero" << std::endl);
2700 <<
", " << dSolutionTol << std::endl);
2705 if (HP.
IsKeyWord(
"differential" "equations")) {
2709 silent_cerr(
"error: max residual for differential equations "
2710 "must be greater than zero at line "
2720 silent_cerr(
"error: max residual must be greater than zero at line "
2728 case DERIVATIVESTOLERANCE: {
2729 dDerivativesTol = HP.
GetReal();
2730 if (dDerivativesTol <= 0.) {
2732 silent_cerr(
"warning, derivatives "
2733 "tolerance <= 0.0 is illegal; "
2734 "using default value "
2739 "Derivatives tolerance = "
2745 case MAXITERATIONS: {
2749 silent_cerr(
"warning, max iterations "
2750 "< 1 is illegal; using default value "
2763 case MODIFY_RES_TEST:
2765 silent_cerr(
"\"modify residual test\" "
2766 "not supported by schur data manager "
2768 <<
"; ignored" << std::endl);
2772 "Modify residual test" << std::endl);
2776 case ENFORCE_CONSTRAINT_EQUATIONS:
2777 if (HP.
IsKeyWord(
"constraint" "violations")) {
2780 bSetScaleAlgebraic = !HP.
IsKeyWord(
"scale" "factor");
2782 if (!bSetScaleAlgebraic) {
2785 }
else if (HP.
IsKeyWord(
"constraint" "violation" "rates")) {
2788 silent_cerr(
"Keyword \"constraint violations\" or "
2789 "\"constraint violation rates\" expected at line "
2796 case DERIVATIVESMAXITERATIONS: {
2797 iDerivativesMaxIterations = HP.
GetInt();
2798 if (iDerivativesMaxIterations < 1) {
2800 silent_cerr(
"warning, derivatives "
2801 "max iterations < 1 is illegal; "
2802 "using default value "
2803 << iDerivativesMaxIterations
2808 << iDerivativesMaxIterations
2813 case FICTITIOUSSTEPSMAXITERATIONS:
2814 case DUMMYSTEPSMAXITERATIONS: {
2815 iDummyStepsMaxIterations = HP.
GetInt();
2816 if (iDummyStepsMaxIterations < 1) {
2818 silent_cerr(
"warning, dummy steps "
2819 "max iterations < 1 is illegal; "
2820 "using default value "
2821 << iDummyStepsMaxIterations
2826 << iDummyStepsMaxIterations
2831 case DERIVATIVESCOEFFICIENT: {
2832 const bool bAutoDerivCoef = HP.
IsKeyWord(
"auto");
2834 if (!bAutoDerivCoef) {
2838 silent_cerr(
"warning, derivatives "
2839 "coefficient <= 0. is illegal; "
2840 "using default value "
2848 if (bAutoDerivCoef || HP.
IsKeyWord(
"auto")) {
2850 iDerivativesCoefMaxIter = HP.
GetInt();
2851 if (iDerivativesCoefMaxIter < 0) {
2852 silent_cerr(
"number of iterations must be greater than or equal to zero at line " << HP.
GetLineData() << std::endl);
2857 iDerivativesCoefMaxIter = 6;
2861 dDerivativesCoefFactor = HP.
GetReal();
2863 if (dDerivativesCoefFactor <= 1.) {
2864 silent_cerr(
"factor must be greater than one at line " << HP.
GetLineData() << std::endl);
2873 case NEWTONRAPHSON: {
2874 pedantic_cout(
"Newton Raphson is deprecated; use "
2875 "\"nonlinear solver: newton raphson "
2876 "[ , modified, <steps> ]\" instead"
2888 "Newton-Raphson will be used; "
2889 "matrix will be assembled "
2892 <<
" iterations" << std::endl);
2896 silent_cerr(
"warning: unknown case; "
2897 "using default" << std::endl);
2911 pedantic_cout(
"\"end: multistep;\" is deprecated; "
2912 "use \"end: initial value;\" instead." << std::endl);
2917 silent_cerr(
"\"end: initial value;\" expected "
2919 <<
"; aborting..." << std::endl);
2930 <<
": POD analysis not supported (ignored)"
2932 for (; HP.
IsArg();) {
2944 int iNumTimes = HP.
GetInt();
2945 if (iNumTimes <= 0) {
2946 silent_cerr(
"invalid number of eigenanalysis times "
2953 for (std::vector<doublereal>::iterator i =
EigAn.
Analyses.begin();
2958 silent_cerr(
"eigenanalysis times must be in strict ascending order "
2978 while (HP.
IsArg()) {
2982 }
else if (HP.
IsKeyWord(
"output" "matrices")) {
2985 }
else if (HP.
IsKeyWord(
"output" "full" "matrices")) {
2987 silent_cerr(
"\"output full matrices\" needs eigenanalysis support" << std::endl);
2992 }
else if (HP.
IsKeyWord(
"output" "sparse" "matrices")) {
2995 }
else if (HP.
IsKeyWord(
"output" "eigenvectors")) {
2997 silent_cerr(
"\"output eigenvectors\" needs eigenanalysis support" << std::endl);
3002 }
else if (HP.
IsKeyWord(
"output" "geometry")) {
3005 }
else if (HP.
IsKeyWord(
"matrix" "output" "precision")) {
3008 silent_cerr(
"negative or null \"matrix output precision\" "
3014 }
else if (HP.
IsKeyWord(
"results" "output" "precision")) {
3017 silent_cerr(
"negative or null \"results output precision\" "
3023 }
else if (HP.
IsKeyWord(
"upper" "frequency" "limit")) {
3026 silent_cerr(
"invalid \"upper frequency limit\" "
3032 }
else if (HP.
IsKeyWord(
"lower" "frequency" "limit")) {
3035 silent_cerr(
"invalid \"lower frequency limit\" "
3041 }
else if (HP.
IsKeyWord(
"use" "lapack")) {
3043 silent_cerr(
"eigenanalysis routine already selected "
3050 #else // !USE_LAPACK
3051 silent_cerr(
"\"use lapack\" "
3052 "needs to configure --with-lapack "
3056 #endif // !USE_LAPACK
3058 }
else if (HP.
IsKeyWord(
"use" "arpack")) {
3060 silent_cerr(
"eigenanalysis routine already selected "
3070 silent_cerr(
"invalid number of eigenvalues "
3080 silent_cerr(
"invalid number of Arnoldi vectors "
3081 "(must be > NEV+2) "
3088 silent_cerr(
"warning, possibly incorrect number of Arnoldi vectors "
3089 "(should be > 2*NEV) "
3096 silent_cerr(
"tolerance must be non-negative "
3101 #else // !USE_ARPACK
3102 silent_cerr(
"\"use arpack\" "
3103 "needs to configure --with-arpack "
3107 #endif // !USE_ARPACK
3109 }
else if (HP.
IsKeyWord(
"use" "jdqz")) {
3111 silent_cerr(
"eigenanalysis routine already selected "
3121 silent_cerr(
"invalid number of eigenvalues "
3131 silent_cerr(
"invalid size of the search space "
3132 "(must be >= 20 && >= 2*kmax) "
3142 silent_cerr(
"tolerance must be non-negative "
3145 EigAn.
jdqz.
eps = std::numeric_limits<doublereal>::epsilon();
3148 silent_cerr(
"\"use jdqz\" "
3149 "needs to configure --with-jdqz "
3169 silent_cerr(
"unknown balance option "
3175 }
else if (HP.
IsKeyWord(
"suffix" "width")) {
3183 }
else if (HP.
IsKeyWord(
"suffix" "format")) {
3188 silent_cerr(
"unknown option "
3211 silent_cerr(
"sparse matrices output "
3212 "incompatible with lapack "
3224 silent_cerr(
"full matrices output "
3225 "incompatible with arpack "
3237 silent_cerr(
"full matrices output "
3238 "incompatible with jdqz "
3276 silent_cerr(
"warning: \"eigenanalysis\" not supported; ignored" << std::endl);
3281 silent_cerr(
"\"solver\" keyword at line "
3283 <<
" is deprecated; "
3284 "use \"linear solver\" instead"
3290 case INTERFACESOLVER:
3291 silent_cerr(
"\"interface solver\" keyword at line "
3293 <<
" is deprecated; "
3294 "use \"interface linear solver\" "
3295 "instead" << std::endl);
3296 case INTERFACELINEARSOLVER:
3300 silent_cerr(
"Interface solver only allowed "
3301 "when compiled with MPI support" << std::endl);
3305 case NONLINEARSOLVER:
3324 silent_cerr(
"unknown nonlinear solver "
3346 pedantic_cout(
"Use of deprecated \"keep jacobian\" "
3350 }
else if (HP.
IsKeyWord(
"keep" "jacobian" "matrix")) {
3358 "assembled at most "
3363 if (HP.
IsKeyWord(
"honor" "element" "requests")) {
3367 "request to update "
3368 "the preconditioner"
3374 while (HP.
IsArg()) {
3378 silent_cerr(
"tolerance x must be greater than or equal to zero at line " << HP.
GetLineData() << std::endl);
3381 }
else if (HP.
IsKeyWord(
"tolerance" "min")) {
3384 silent_cerr(
"tolerance min must be greater than or equal to zero at line " << HP.
GetLineData() << std::endl);
3387 }
else if (HP.
IsKeyWord(
"max" "iterations")) {
3390 silent_cerr(
"max iterations must be greater than or equal to zero at line " << HP.
GetLineData() << std::endl);
3396 silent_cerr(
"alpha must be greater than or equal to zero at line " << HP.
GetLineData() << std::endl);
3399 }
else if (HP.
IsKeyWord(
"lambda" "min")) {
3402 silent_cerr(
"lambda min must be greater than or equal to zero at line " << HP.
GetLineData() << std::endl);
3412 }
else if (HP.
IsKeyWord(
"lambda" "factor" "min")) {
3415 silent_cerr(
"lambda factor min must be in between zero and one at line" << HP.
GetLineData() << std::endl);
3418 }
else if (HP.
IsKeyWord(
"max" "step")) {
3421 silent_cerr(
"max step must be greater than zero at line " << HP.
GetLineData() << std::endl);
3424 }
else if (HP.
IsKeyWord(
"zero" "gradient")) {
3433 silent_cerr(
"Keyword \"continue\" expected at line " << HP.
GetLineData() << std::endl);
3436 }
else if (HP.
IsKeyWord(
"divergence" "check")) {
3445 silent_cerr(
"divergence check factor must be greater than zero at line " << HP.
GetLineData() << std::endl);
3456 silent_cerr(
"Keyword \"cubic\" or \"factor\" expected at line " << HP.
GetLineData() << std::endl);
3459 }
else if (HP.
IsKeyWord(
"scale" "newton" "step")) {
3468 silent_cerr(
"min scale must be in range [0-1] at line " << HP.
GetLineData() << std::endl);
3472 }
else if (HP.
IsKeyWord(
"print" "convergence" "info")) {
3484 }
else if (HP.
IsKeyWord(
"abort" "at" "lambda" "min")) {
3490 }
else if (HP.
IsKeyWord(
"non" "negative" "slope" "continue")) {
3497 silent_cerr(
"Keyword \"tolerance x\", "
3498 "\"tolerance min\", \"max iterations\", \"alpha\", "
3499 "\"lambda min\" \"lambda factor min\", \"max step\" "
3500 "\"divergence check\", \"algorithm\", \"scale newton step\" "
3501 "\"print convergence info\", \"verbose\", "
3502 "\"abort at lambda min\" "
3503 "or \"zero gradient\" expected at line " << HP.
GetLineData() << std::endl);
3526 silent_cerr(
"unknown iterative "
3546 "steps for iterative "
3577 case FULLJACOBIANMATRIX:
3583 "before recomputing "
3584 "the preconditioner: "
3588 if (HP.
IsKeyWord(
"honor" "element" "requests")) {
3592 "request to update "
3593 "the preconditioner"
3602 silent_cerr(
"unknown "
3625 #ifdef USE_MULTITHREAD
3629 silent_cerr(
"got " << n <<
" CPUs "
3638 silent_cerr(
"configure with "
3639 "--enable-multithread "
3640 "for multithreaded assembly"
3645 #ifdef USE_MULTITHREAD
3650 #ifdef USE_MULTITHREAD
3651 bool bAssembly =
false;
3652 bool bSolver =
false;
3655 #endif // USE_MULTITHREAD
3658 #ifdef USE_MULTITHREAD
3661 #endif // USE_MULTITHREAD
3664 #ifdef USE_MULTITHREAD
3667 #endif // USE_MULTITHREAD
3670 #ifdef USE_MULTITHREAD
3672 #endif // USE_MULTITHREAD
3675 #ifdef USE_MULTITHREAD
3676 if (bAll || bAssembly) {
3680 if (bAll || bSolver) {
3681 bSolverThreads =
true;
3682 nSolverThreads = nt;
3685 silent_cerr(
"configure with "
3686 "--enable-multithread "
3687 "for multithreaded assembly"
3695 silent_cerr(
"unknown description at line "
3705 pedantic_cout(
"No time step control strategy defined; defaulting to NoChange time step control" );
3749 iDerivativesMaxIterations,
3751 iDerivativesCoefMaxIter,
3752 dDerivativesCoefFactor));
3760 iDummyStepsMaxIterations,
3770 iDummyStepsMaxIterations,
3779 iDummyStepsMaxIterations,
3790 iDummyStepsMaxIterations,
3802 iDummyStepsMaxIterations,
3809 iDummyStepsMaxIterations,
3819 dSolutionTol, iDummyStepsMaxIterations,
3824 silent_cerr(
"unknown dummy steps integration method"
3900 silent_cerr(
"Unknown integration method" << std::endl);
3905 if (bSetScaleAlgebraic) {
3909 #ifdef USE_MULTITHREAD
3910 if (bSolverThreads) {
3912 silent_cerr(
"linear solver "
3914 <<
" does not support "
3915 "threaded solution" << std::endl);
void ReadLinSol(LinSol &cs, HighParser &HP, bool bAllowEmpty)
RTSolverBase * ReadRTSolver(Solver *pS, MBDynParser &HP)
struct EigenAnalysis EigAn
enum NonlinearSolverOptions::ScaleFlags eScaleFlags
std::vector< doublereal > Analyses
#define MBDYN_EXCEPT_ARGS
void SetOutputMeter(DriveCaller *pOM)
#define DEBUGCOUTFNAME(fname)
virtual integer GetInt(integer iDefval=0)
void SetOutputFlags(unsigned OF)
StepIntegratorType RegularType
std::vector< doublereal >::iterator currAnalysis
doublereal dScaleAlgebraic
StepIntegrator * pFirstRegularStep
const char * what(void) const
enum Solver::TimeStepFlags eTimeStepLimit
integer iDummyStepsNumber
doublereal dDummyStepsRatio
bool SetNumThreads(unsigned nt)
StepIntegrator * pDerivativeSteps
NonlinearSolver::Type NonlinearSolverType
integer iIterationsBeforeAssembly
static const doublereal dDefaultDerivativesCoefficient
virtual bool GetYesNoOrBool(bool bDefval=false)
struct LineSearchParameters LineSearch
MatrixFreeSolver::SolverType MFSolverType
static const integer iDefaultMaxIterations
doublereal dDivergenceCheck
NonlinearSolverTest::Type SolTest
static const integer iDefaultDummyStepsNumber
void AddOutputFlags(unsigned OF)
#define SAFENEW(pnt, item)
static const integer iDefaultIterationsBeforeAssembly
struct Solver::EigenAnalysis::JDQZ jdqz
virtual bool IsKeyWord(const char *sKeyWord)
StepIntegrator * pRegularSteps
void DelOutputFlags(unsigned OF)
doublereal dInitialTimeStep
virtual const char * GetStringWithDelims(enum Delims Del=DEFAULTDELIM, bool escape=true)
StepIntegrator * pFirstDummyStep
doublereal dIterertiveTau
static const doublereal dDefaultDummyStepsTolerance
DriveCaller * pRhoRegular
doublereal dIterertiveEtaMax
#define ASSERT(expression)
StepIntegrator * pDummySteps
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
DriveCaller * pGetDriveCaller(void) const
virtual DriveCaller * pCopy(void) const =0
static const doublereal dDefaultTol
doublereal dMaxResidualDiff
StepIntegratorType DummyType
virtual int GetWord(void)
NonlinearSolverTest::Type ResTest
Preconditioner::PrecondType PcType
void Set(const DriveCaller *pDC)
doublereal dGet(const doublereal &dVar) const
TimeStepControl * ReadTimeStepData(Solver *s, MBDynParser &HP)
DriveCaller * GetDriveCaller(bool bDeferred=false)
doublereal dGetInitialMaxTimeStep() const
doublereal dLambdaFactMin
DriveCaller * pRhoAlgebraicDummy
const char *const GetSolverName(void) const
integer iIterativeMaxSteps
struct Solver::EigenAnalysis::ARPACK arpack
virtual HighParser::ErrOut GetLineData(void) const
DriveCaller * pRhoAlgebraicRegular
doublereal dDerivativesCoef
#define DEBUGLCOUT(level, msg)
virtual doublereal GetReal(const doublereal &dDefval=0.0)