Commit e430729c authored by Christophe Geuzaine's avatar Christophe Geuzaine

new SetExtrapolationOrder[] function to choose how we initialize solution in time loops

parent 57412bd7
Pipeline #1460 passed with stage
in 11 minutes and 17 seconds
......@@ -1164,6 +1164,9 @@ struct Operation {
struct {
char *residual;
} OptimizerUpdate;
struct {
int order;
} SetExtrapolationOrder;
} Case;
};
......@@ -1317,6 +1320,7 @@ struct IterativeLoopSystem {
#define OPERATION_OPTIMIZER_INITIALIZE 107
#define OPERATION_OPTIMIZER_UPDATE 108
#define OPERATION_OPTIMIZER_FINALIZE 109
#define OPERATION_SETEXTRAPOLATIONORDER 110
/* ChangeOfState.Type */
#define CHANGEOFSTATE_NOCHANGE 0
......
......@@ -388,6 +388,7 @@ SendToServer return tSendToServer;
SetCommSelf return tSetCommSelf;
SetCommWorld return tSetCommWorld;
SetDTime return tSetDTime;
SetExtrapolationOrder return tSetExtrapolationOrder;
SetFrequency return tSetFrequency;
SetGlobalSolverOptions return tSetGlobalSolverOptions;
SetNumber return tSetNumber;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -298,132 +298,133 @@
tBarrier = 514,
tBroadcastFields = 515,
tBroadcastVariables = 516,
tSleep = 517,
tDivisionCoefficient = 518,
tChangeOfState = 519,
tChangeOfCoordinates = 520,
tChangeOfCoordinates2 = 521,
tSystemCommand = 522,
tError = 523,
tGmshRead = 524,
tGmshMerge = 525,
tGmshOpen = 526,
tGmshWrite = 527,
tGmshClearAll = 528,
tDelete = 529,
tDeleteFile = 530,
tRenameFile = 531,
tCreateDir = 532,
tGenerateOnly = 533,
tGenerateOnlyJac = 534,
tSolveJac_AdaptRelax = 535,
tSaveSolutionExtendedMH = 536,
tSaveSolutionMHtoTime = 537,
tSaveSolutionWithEntityNum = 538,
tInitMovingBand2D = 539,
tMeshMovingBand2D = 540,
tGenerateMHMoving = 541,
tGenerateMHMovingSeparate = 542,
tAddMHMoving = 543,
tGenerateGroup = 544,
tGenerateJacGroup = 545,
tGenerateRHSGroup = 546,
tGenerateGroupCumulative = 547,
tGenerateJacGroupCumulative = 548,
tGenerateRHSGroupCumulative = 549,
tSaveMesh = 550,
tDeformMesh = 551,
tFrequencySpectrum = 552,
tPostProcessing = 553,
tNameOfSystem = 554,
tPostOperation = 555,
tNameOfPostProcessing = 556,
tUsingPost = 557,
tResampleTime = 558,
tPlot = 559,
tPrint = 560,
tPrintGroup = 561,
tEcho = 562,
tSendMergeFileRequest = 563,
tWrite = 564,
tAdapt = 565,
tOnGlobal = 566,
tOnRegion = 567,
tOnElementsOf = 568,
tOnGrid = 569,
tOnSection = 570,
tOnPoint = 571,
tOnLine = 572,
tOnPlane = 573,
tOnBox = 574,
tWithArgument = 575,
tFile = 576,
tDepth = 577,
tDimension = 578,
tComma = 579,
tTimeStep = 580,
tHarmonicToTime = 581,
tCosineTransform = 582,
tTimeToHarmonic = 583,
tValueIndex = 584,
tValueName = 585,
tFormat = 586,
tHeader = 587,
tFooter = 588,
tSkin = 589,
tSmoothing = 590,
tTarget = 591,
tSort = 592,
tIso = 593,
tNoNewLine = 594,
tNoTitle = 595,
tDecomposeInSimplex = 596,
tChangeOfValues = 597,
tTimeLegend = 598,
tFrequencyLegend = 599,
tEigenvalueLegend = 600,
tEvaluationPoints = 601,
tStoreInRegister = 602,
tStoreInVariable = 603,
tStoreInField = 604,
tStoreInMeshBasedField = 605,
tStoreMaxInRegister = 606,
tStoreMaxXinRegister = 607,
tStoreMaxYinRegister = 608,
tStoreMaxZinRegister = 609,
tStoreMinInRegister = 610,
tStoreMinXinRegister = 611,
tStoreMinYinRegister = 612,
tStoreMinZinRegister = 613,
tLastTimeStepOnly = 614,
tAppendTimeStepToFileName = 615,
tTimeValue = 616,
tTimeImagValue = 617,
tTimeInterval = 618,
tAppendExpressionToFileName = 619,
tAppendExpressionFormat = 620,
tOverrideTimeStepValue = 621,
tNoMesh = 622,
tSendToServer = 623,
tDate = 624,
tOnelabAction = 625,
tCodeName = 626,
tFixRelativePath = 627,
tAppendToExistingFile = 628,
tAppendStringToFileName = 629,
tDEF = 630,
tOR = 631,
tAND = 632,
tAPPROXEQUAL = 633,
tNOTEQUAL = 634,
tEQUAL = 635,
tGREATERGREATER = 636,
tLESSLESS = 637,
tGREATEROREQUAL = 638,
tLESSOREQUAL = 639,
tCROSSPRODUCT = 640,
UNARYPREC = 641,
tSHOW = 642
tSetExtrapolationOrder = 517,
tSleep = 518,
tDivisionCoefficient = 519,
tChangeOfState = 520,
tChangeOfCoordinates = 521,
tChangeOfCoordinates2 = 522,
tSystemCommand = 523,
tError = 524,
tGmshRead = 525,
tGmshMerge = 526,
tGmshOpen = 527,
tGmshWrite = 528,
tGmshClearAll = 529,
tDelete = 530,
tDeleteFile = 531,
tRenameFile = 532,
tCreateDir = 533,
tGenerateOnly = 534,
tGenerateOnlyJac = 535,
tSolveJac_AdaptRelax = 536,
tSaveSolutionExtendedMH = 537,
tSaveSolutionMHtoTime = 538,
tSaveSolutionWithEntityNum = 539,
tInitMovingBand2D = 540,
tMeshMovingBand2D = 541,
tGenerateMHMoving = 542,
tGenerateMHMovingSeparate = 543,
tAddMHMoving = 544,
tGenerateGroup = 545,
tGenerateJacGroup = 546,
tGenerateRHSGroup = 547,
tGenerateGroupCumulative = 548,
tGenerateJacGroupCumulative = 549,
tGenerateRHSGroupCumulative = 550,
tSaveMesh = 551,
tDeformMesh = 552,
tFrequencySpectrum = 553,
tPostProcessing = 554,
tNameOfSystem = 555,
tPostOperation = 556,
tNameOfPostProcessing = 557,
tUsingPost = 558,
tResampleTime = 559,
tPlot = 560,
tPrint = 561,
tPrintGroup = 562,
tEcho = 563,
tSendMergeFileRequest = 564,
tWrite = 565,
tAdapt = 566,
tOnGlobal = 567,
tOnRegion = 568,
tOnElementsOf = 569,
tOnGrid = 570,
tOnSection = 571,
tOnPoint = 572,
tOnLine = 573,
tOnPlane = 574,
tOnBox = 575,
tWithArgument = 576,
tFile = 577,
tDepth = 578,
tDimension = 579,
tComma = 580,
tTimeStep = 581,
tHarmonicToTime = 582,
tCosineTransform = 583,
tTimeToHarmonic = 584,
tValueIndex = 585,
tValueName = 586,
tFormat = 587,
tHeader = 588,
tFooter = 589,
tSkin = 590,
tSmoothing = 591,
tTarget = 592,
tSort = 593,
tIso = 594,
tNoNewLine = 595,
tNoTitle = 596,
tDecomposeInSimplex = 597,
tChangeOfValues = 598,
tTimeLegend = 599,
tFrequencyLegend = 600,
tEigenvalueLegend = 601,
tEvaluationPoints = 602,
tStoreInRegister = 603,
tStoreInVariable = 604,
tStoreInField = 605,
tStoreInMeshBasedField = 606,
tStoreMaxInRegister = 607,
tStoreMaxXinRegister = 608,
tStoreMaxYinRegister = 609,
tStoreMaxZinRegister = 610,
tStoreMinInRegister = 611,
tStoreMinXinRegister = 612,
tStoreMinYinRegister = 613,
tStoreMinZinRegister = 614,
tLastTimeStepOnly = 615,
tAppendTimeStepToFileName = 616,
tTimeValue = 617,
tTimeImagValue = 618,
tTimeInterval = 619,
tAppendExpressionToFileName = 620,
tAppendExpressionFormat = 621,
tOverrideTimeStepValue = 622,
tNoMesh = 623,
tSendToServer = 624,
tDate = 625,
tOnelabAction = 626,
tCodeName = 627,
tFixRelativePath = 628,
tAppendToExistingFile = 629,
tAppendStringToFileName = 630,
tDEF = 631,
tOR = 632,
tAND = 633,
tAPPROXEQUAL = 634,
tNOTEQUAL = 635,
tEQUAL = 636,
tGREATERGREATER = 637,
tLESSLESS = 638,
tGREATEROREQUAL = 639,
tLESSOREQUAL = 640,
tCROSSPRODUCT = 641,
UNARYPREC = 642,
tSHOW = 643
};
#endif
/* Tokens. */
......@@ -686,132 +687,133 @@
#define tBarrier 514
#define tBroadcastFields 515
#define tBroadcastVariables 516
#define tSleep 517
#define tDivisionCoefficient 518
#define tChangeOfState 519
#define tChangeOfCoordinates 520
#define tChangeOfCoordinates2 521
#define tSystemCommand 522
#define tError 523
#define tGmshRead 524
#define tGmshMerge 525
#define tGmshOpen 526
#define tGmshWrite 527
#define tGmshClearAll 528
#define tDelete 529
#define tDeleteFile 530
#define tRenameFile 531
#define tCreateDir 532
#define tGenerateOnly 533
#define tGenerateOnlyJac 534
#define tSolveJac_AdaptRelax 535
#define tSaveSolutionExtendedMH 536
#define tSaveSolutionMHtoTime 537
#define tSaveSolutionWithEntityNum 538
#define tInitMovingBand2D 539
#define tMeshMovingBand2D 540
#define tGenerateMHMoving 541
#define tGenerateMHMovingSeparate 542
#define tAddMHMoving 543
#define tGenerateGroup 544
#define tGenerateJacGroup 545
#define tGenerateRHSGroup 546
#define tGenerateGroupCumulative 547
#define tGenerateJacGroupCumulative 548
#define tGenerateRHSGroupCumulative 549
#define tSaveMesh 550
#define tDeformMesh 551
#define tFrequencySpectrum 552
#define tPostProcessing 553
#define tNameOfSystem 554
#define tPostOperation 555
#define tNameOfPostProcessing 556
#define tUsingPost 557
#define tResampleTime 558
#define tPlot 559
#define tPrint 560
#define tPrintGroup 561
#define tEcho 562
#define tSendMergeFileRequest 563
#define tWrite 564
#define tAdapt 565
#define tOnGlobal 566
#define tOnRegion 567
#define tOnElementsOf 568
#define tOnGrid 569
#define tOnSection 570
#define tOnPoint 571
#define tOnLine 572
#define tOnPlane 573
#define tOnBox 574
#define tWithArgument 575
#define tFile 576
#define tDepth 577
#define tDimension 578
#define tComma 579
#define tTimeStep 580
#define tHarmonicToTime 581
#define tCosineTransform 582
#define tTimeToHarmonic 583
#define tValueIndex 584
#define tValueName 585
#define tFormat 586
#define tHeader 587
#define tFooter 588
#define tSkin 589
#define tSmoothing 590
#define tTarget 591
#define tSort 592
#define tIso 593
#define tNoNewLine 594
#define tNoTitle 595
#define tDecomposeInSimplex 596
#define tChangeOfValues 597
#define tTimeLegend 598
#define tFrequencyLegend 599
#define tEigenvalueLegend 600
#define tEvaluationPoints 601
#define tStoreInRegister 602
#define tStoreInVariable 603
#define tStoreInField 604
#define tStoreInMeshBasedField 605
#define tStoreMaxInRegister 606
#define tStoreMaxXinRegister 607
#define tStoreMaxYinRegister 608
#define tStoreMaxZinRegister 609
#define tStoreMinInRegister 610
#define tStoreMinXinRegister 611
#define tStoreMinYinRegister 612
#define tStoreMinZinRegister 613
#define tLastTimeStepOnly 614
#define tAppendTimeStepToFileName 615
#define tTimeValue 616
#define tTimeImagValue 617
#define tTimeInterval 618
#define tAppendExpressionToFileName 619
#define tAppendExpressionFormat 620
#define tOverrideTimeStepValue 621
#define tNoMesh 622
#define tSendToServer 623
#define tDate 624
#define tOnelabAction 625
#define tCodeName 626
#define tFixRelativePath 627
#define tAppendToExistingFile 628
#define tAppendStringToFileName 629
#define tDEF 630
#define tOR 631
#define tAND 632
#define tAPPROXEQUAL 633
#define tNOTEQUAL 634
#define tEQUAL 635
#define tGREATERGREATER 636
#define tLESSLESS 637
#define tGREATEROREQUAL 638
#define tLESSOREQUAL 639
#define tCROSSPRODUCT 640
#define UNARYPREC 641
#define tSHOW 642
#define tSetExtrapolationOrder 517
#define tSleep 518
#define tDivisionCoefficient 519
#define tChangeOfState 520
#define tChangeOfCoordinates 521
#define tChangeOfCoordinates2 522
#define tSystemCommand 523
#define tError 524
#define tGmshRead 525
#define tGmshMerge 526
#define tGmshOpen 527
#define tGmshWrite 528
#define tGmshClearAll 529
#define tDelete 530
#define tDeleteFile 531
#define tRenameFile 532
#define tCreateDir 533
#define tGenerateOnly 534
#define tGenerateOnlyJac 535
#define tSolveJac_AdaptRelax 536
#define tSaveSolutionExtendedMH 537
#define tSaveSolutionMHtoTime 538
#define tSaveSolutionWithEntityNum 539
#define tInitMovingBand2D 540
#define tMeshMovingBand2D 541
#define tGenerateMHMoving 542
#define tGenerateMHMovingSeparate 543
#define tAddMHMoving 544
#define tGenerateGroup 545
#define tGenerateJacGroup 546
#define tGenerateRHSGroup 547
#define tGenerateGroupCumulative 548
#define tGenerateJacGroupCumulative 549
#define tGenerateRHSGroupCumulative 550
#define tSaveMesh 551
#define tDeformMesh 552
#define tFrequencySpectrum 553
#define tPostProcessing 554
#define tNameOfSystem 555
#define tPostOperation 556
#define tNameOfPostProcessing 557
#define tUsingPost 558
#define tResampleTime 559
#define tPlot 560
#define tPrint 561
#define tPrintGroup 562
#define tEcho 563
#define tSendMergeFileRequest 564
#define tWrite 565
#define tAdapt 566
#define tOnGlobal 567
#define tOnRegion 568
#define tOnElementsOf 569
#define tOnGrid 570
#define tOnSection 571
#define tOnPoint 572
#define tOnLine 573
#define tOnPlane 574
#define tOnBox 575
#define tWithArgument 576
#define tFile 577
#define tDepth 578
#define tDimension 579
#define tComma 580
#define tTimeStep 581
#define tHarmonicToTime 582
#define tCosineTransform 583
#define tTimeToHarmonic 584
#define tValueIndex 585
#define tValueName 586
#define tFormat 587
#define tHeader 588
#define tFooter 589
#define tSkin 590
#define tSmoothing 591
#define tTarget 592
#define tSort 593
#define tIso 594
#define tNoNewLine 595
#define tNoTitle 596
#define tDecomposeInSimplex 597
#define tChangeOfValues 598
#define tTimeLegend 599
#define tFrequencyLegend 600
#define tEigenvalueLegend 601
#define tEvaluationPoints 602
#define tStoreInRegister 603
#define tStoreInVariable 604
#define tStoreInField 605
#define tStoreInMeshBasedField 606
#define tStoreMaxInRegister 607
#define tStoreMaxXinRegister 608
#define tStoreMaxYinRegister 609
#define tStoreMaxZinRegister 610
#define tStoreMinInRegister 611
#define tStoreMinXinRegister 612
#define tStoreMinYinRegister 613
#define tStoreMinZinRegister 614
#define tLastTimeStepOnly 615
#define tAppendTimeStepToFileName 616
#define tTimeValue 617
#define tTimeImagValue 618
#define tTimeInterval 619
#define tAppendExpressionToFileName 620
#define tAppendExpressionFormat 621
#define tOverrideTimeStepValue 622
#define tNoMesh 623
#define tSendToServer 624
#define tDate 625
#define tOnelabAction 626
#define tCodeName 627
#define tFixRelativePath 628
#define tAppendToExistingFile 629
#define tAppendStringToFileName 630
#define tDEF 631
#define tOR 632
#define tAND 633
#define tAPPROXEQUAL 634
#define tNOTEQUAL 635
#define tEQUAL 636
#define tGREATERGREATER 637
#define tLESSLESS 638
#define tGREATEROREQUAL 639
#define tLESSOREQUAL 640
#define tCROSSPRODUCT 641
#define UNARYPREC 642
#define tSHOW 643
......@@ -828,7 +830,7 @@ typedef union YYSTYPE
struct TwoChar c2;
}
/* Line 1529 of yacc.c. */
#line 832 "ProParser.tab.hpp"
#line 834 "ProParser.tab.hpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
......
......@@ -321,6 +321,7 @@ struct doubleXstring{
%token tNbrMaxIteration tRelaxationFactor
%token tIterativeTimeReduction
%token tSetCommSelf tSetCommWorld tBarrier tBroadcastFields tBroadcastVariables
%token tSetExtrapolationOrder
%token tSleep
%token tDivisionCoefficient tChangeOfState
%token tChangeOfCoordinates tChangeOfCoordinates2 tSystemCommand tError
......@@ -4650,6 +4651,13 @@ OperationTerm :
Operation_P->Case.Sleep.ExpressionIndex = $3;
}
| tSetExtrapolationOrder '[' FExpr ']' tEND
{ Operation_P = (struct Operation*)
List_Pointer(Operation_L, List_Nbr(Operation_L)-1);
Operation_P->Type = OPERATION_SETEXTRAPOLATIONORDER;
Operation_P->Case.SetExtrapolationOrder.order = (int)$3;
}
| tSetCommSelf tEND
{ Operation_P = (struct Operation*)
List_Pointer(Operation_L, List_Nbr(Operation_L)-1);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -78,6 +78,8 @@ int Flag_AddMHMoving = 0 ; //one more :-)
Tree_T * DofTree_MH_moving ;
int Flag_ExtrapolationOrder = 0;
// For Cal_SolutionErrorRatio...
// Changed in OPERATION_ITERATIVELOOP
// double reltol = 1e-7;
......@@ -108,6 +110,11 @@ void Free_UnusedSolutions(struct DofData * DofData_P)
case TIME_NEWMARK :
index = List_Nbr(DofData_P->Solutions)-4 ;
break;
default:
// FIXME: when doing a handmade loop in the pro file - we (@julien.dular
// :-) should clearly introduce a parameter for this.
index = List_Nbr(DofData_P->Solutions) - (Flag_ExtrapolationOrder + 3);
break;
}
if(index >= 0){
......@@ -187,7 +194,7 @@ static void ZeroMatrix(gMatrix *M, gSolver *S, int N)
LinAlg_CreateMatrix(M, S, N, N);
}
void ExtrapolatingPolynomial(int degreewanted,struct DofData * DofData_P,
void ExtrapolatingPolynomial(int degreewanted, struct DofData * DofData_P,
struct Solution * Solution_S)
{
// Build Lagrange Interpolating Polynomial to predict current solution
......@@ -197,8 +204,8 @@ void ExtrapolatingPolynomial(int degreewanted,struct DofData * DofData_P,
// degree 1 ==> linear extrapolation from the 2 previous Time Solutions
// degree 2 ==> quadratic extrapolation from the 3 previous Time Solutions
// ...
// NB: The more data points that are used in the interpolation,
// the higher the degree of the resulting polynomial,
// NB: The more data points that are used in the interpolation,
// the higher the degree of the resulting polynomial,
// thus the greater oscillation it will exhibit between the data points,
// and therefore the poorest the prediction may be ...
......@@ -207,25 +214,25 @@ void ExtrapolatingPolynomial(int degreewanted,struct DofData * DofData_P,
double Pj=1., x = Solution_S->Time;
//Vector to save the valid previous Time Solutions that will be interpolated
xi = new double[degreewanted+1];
jvalid = new int[degreewanted+1];
xi = new double[degreewanted+1];
jvalid = new int[degreewanted+1];
//Select the last Time Solution => degree 0 is achieved at least
xi[0]=((struct Solution *)
List_Pointer(DofData_P->Solutions,
List_Nbr(DofData_P->Solutions)-1))->Time;
xi[0]=((struct Solution *)
List_Pointer(DofData_P->Solutions,
List_Nbr(DofData_P->Solutions)-1))->Time;
jvalid[0]=0;
Message::Info("ExtrapolatingPolynomial: Using previous "
"Theta Time = %g s (TimeStep %d)",
xi[0],Solution_S->TimeStep-1-jvalid[0]);
int degree=0, j=1;
//Found other valid Time Solutions in order to reach
//Found other valid Time Solutions in order to reach
//the desired polynomial degree [degreewanted] (if possible)
while(degree<degreewanted && j<=List_Nbr(DofData_P->Solutions)-1) {
xi[degree+1]=((struct Solution *)
List_Pointer(DofData_P->Solutions,
List_Nbr(DofData_P->Solutions)-1-j))->Time;
while(degree<degreewanted && j<=List_Nbr(DofData_P->Solutions)-1) {
xi[degree+1]=((struct Solution *)
List_Pointer(DofData_P->Solutions,
List_Nbr(DofData_P->Solutions)-1-j))->Time;
if (xi[degree+1]<xi[degree]){
jvalid[degree+1]=j;
degree++;
......@@ -245,7 +252,7 @@ void ExtrapolatingPolynomial(int degreewanted,struct DofData * DofData_P,
Message::Info("ExtrapolatingPolynomial: "
"Impossible to build polynomial of degree %d "
"(%d usable previous solution%s found "
"while %d needed for degree %d)"
"while %d needed for degree %d)"
,degreewanted, degree+1
,((degree+1)==1)?"":"s"
,degreewanted+1,degreewanted) ;
......@@ -253,7 +260,7 @@ void ExtrapolatingPolynomial(int degreewanted,struct DofData * DofData_P,
Message::Info("ExtrapolatingPolynomial: "
">> Polynomial of degree %d "
"based on %d previous solution%s (out of %d existing)"
"based on %d previous solution%s (out of %d existing)"
,degree, degree+1
, ((degree+1)==1)?"":"s"
, List_Nbr(DofData_P->Solutions)) ;
......@@ -268,10 +275,10 @@ void ExtrapolatingPolynomial(int degreewanted,struct DofData * DofData_P,
Pj=Pj*(x-xi[k])/(xi[j]-xi[k]);
}
}
LinAlg_AddVectorProdVectorDouble(&Solution_S->x,
LinAlg_AddVectorProdVectorDouble(&Solution_S->x,
&((struct Solution *)
List_Pointer(DofData_P->Solutions,
List_Nbr(DofData_P->Solutions)-1-jvalid[j]))->x,
List_Nbr(DofData_P->Solutions)-1-jvalid[j]))->x,
Pj, &Solution_S->x);
}
......@@ -308,13 +315,15 @@ void Generate_System(struct DefineSystem * DefineSystem_P,
Solution_S.SolutionExist = 1 ;
LinAlg_CreateVector(&Solution_S.x, &DofData_P->Solver, DofData_P->NbrDof) ;
if (List_Nbr(DofData_P->Solutions)) {
/*
LinAlg_CopyVector(&((struct Solution *)
List_Pointer(DofData_P->Solutions,
List_Nbr(DofData_P->Solutions)-1))->x,
&Solution_S.x) ;
*/
ExtrapolatingPolynomial(2,DofData_P,&Solution_S);
if(Flag_ExtrapolationOrder <= 0){
LinAlg_CopyVector(&((struct Solution *)
List_Pointer(DofData_P->Solutions,
List_Nbr(DofData_P->Solutions)-1))->x,
&Solution_S.x) ;
}
else{
ExtrapolatingPolynomial(Flag_ExtrapolationOrder, DofData_P, &Solution_S);
}
}
else {
LinAlg_ZeroVector(&Solution_S.x) ;
......@@ -1566,7 +1575,7 @@ void Treatment_Operation(struct Resolution * Resolution_P,
/*===============================================================================
CheckAll Meaning:
0 : try first relaxation factors (from the list) and stops when the residual goes up
0 : try first relaxation factors (from the list) and stops when the residual goes up
1 : try every relaxation factors (from the list) and keep the optimal one
2 : find the maximum relaxation factor that decreases the residual:
- start with the relaxation factor from the previous time step or from the previous iteration
......@@ -1576,7 +1585,7 @@ void Treatment_Operation(struct Resolution * Resolution_P,
=================================================================================*/
/* init Frelax for CheckAll==2: */
if (Operation_P->Case.SolveJac_AdaptRelax.CheckAll==2) {
if (Operation_P->Case.SolveJac_AdaptRelax.CheckAll==2) {
if (Current.Residual>0) {
// if the residual is not 0, a previous TimeStep or iteration has been done
// ==> Take the last RelaxFactor used from the previous TimeStep or iteration
......@@ -1673,17 +1682,17 @@ void Treatment_Operation(struct Resolution * Resolution_P,
Current.NbrTestedFac=istep+1; //+++
/*
if (Norm < Error_Prev )
Message::Warning("SolveJacAdapt: relaxation factor = %8f"
if (Norm < Error_Prev )
Message::Warning("SolveJacAdapt: relaxation factor = %8f"
" Residual norm = %10.4e"
" (BETTER than %10.4e)",
Frelax, Norm, Error_Prev) ;
else
Message::Warning("SolveJacAdapt: relaxation factor = %8f"
Message::Warning("SolveJacAdapt: relaxation factor = %8f"
" Residual norm = %10.4e"