Commit fe9f12fb by Kevin Jacques

square up for serial simu

parent 4be0ecbd
Pipeline #1641 passed with stage
in 18 minutes 35 seconds
......@@ -702,7 +702,8 @@ void DlalaAdaptation(double *M)
double maxdiag=MAX(MAX(M[diagcoord[0]],M[diagcoord[1]]),M[diagcoord[2]]);
double avediag=0.5*(mindiag+maxdiag);
for (int k=0; k<6; k++)
int ncomp = ::NCOMP;
for (int k=0; k<ncomp; k++)
M[k]=0.;
for (int k=0; k<3; k++)
M[diagcoord[k]]=avediag;
......
......@@ -677,6 +677,7 @@ Resolution {
Evaluate[$relaxcounttot=0];
Evaluate[$dnccount=0];
Evaluate[$itertot=0];
Evaluate[$itermax=0];
//Save TimeStep 0
SaveSolution[A];
......@@ -733,10 +734,10 @@ Resolution {
//*****Choose between one of the 3 following possibilities:*****
//System { { A , Reltol_Mag, Abstol_Mag, Solution MeanL2Norm }} ]{ //1a) //dx=x-xp; x=x
//System { { A , Reltol_Mag, Abstol_Mag, RecalcResidual MeanL2Norm }} ]{ //1b) //dx=res=b-Ax; x=b
//System { { A , Reltol_Mag, Abstol_Mag, Residual MeanL2Norm }} ]{ //1c) //dx=res=b-Ax; x=b #(default for square) #CHECK here
System { { A , Reltol_Mag, Abstol_Mag, Residual MeanL2Norm }} ]{ //1c) //dx=res=b-Ax; x=b #(default for square) #CHECK here
//PostOperation { { az_only , Reltol_Mag, Abstol_Mag, MeanL2Norm }} ]{ //2)
//PostOperation { { b_only , Reltol_Mag, Abstol_Mag, MeanL2Norm }} ]{ //3)
PostOperation { { h_only , Reltol_Mag, Abstol_Mag, MeanL2Norm }} ]{ //4) //(default for t32) #CHECK here //Need the above "INIT" for square with EnergHyst or JA because h_only = 0 at iter 1
//PostOperation { { h_only , Reltol_Mag, Abstol_Mag, MeanL2Norm }} ]{ //4) //(default for t32) #CHECK here //Need the above "INIT" for square with EnergHyst or JA because h_only = 0 at iter 1
//**************************************************************
Evaluate[$res = $ResidualN, $resL = $Residual,$resN = $ResidualN,$iter = $Iteration-1];
......@@ -768,6 +769,10 @@ Resolution {
//...............................................................
EndIf
Test[$iter>$itermax]{
Evaluate[$itermax = $iter];
}
Evaluate[$itertot = $itertot+$iter];
Test[ (Flag_NLRes==NLRES_ITERATIVELOOPPRO && $iter == Nb_max_iter) ||
(Flag_NLRes==NLRES_ITERATIVELOOP && $res > Abstol_Mag ) ||
......@@ -797,6 +802,10 @@ Resolution {
Print[{$dnccount}, Format "Total number of non converged TimeStep: %g"];
Print["--------------------------------------------------------------"];
EndIf // End Flag_AnalysisType==AN_TIME (Time domain)
Print["syscount relaxcounttot meanrelaxcount iterFEtot meaniterFE maxiterFE dnccount CPUtime"];
Print[{$syscount, $relaxcounttot, $relaxcounttot/$TimeStep, $itertot,$itertot/$TimeStep, $itermax, $dnccount,GetCpuTime[]}, Format "%g %g %g %g %g %g %g %g"];
}
}
}
......
///*//default for t32 #CHECK here
/*//default for t32 #CHECK here
dim00 = (Flag_3Dmodel==1)?3:2;
N00 = 3;
FLAG_TANORLANG00 = 1;
......@@ -20,7 +20,7 @@ FLAG_HOMO00 = 1;
//*/
//default for square #CHECK here
/*
///*
dim00 = (Flag_3Dmodel==1)?3:2;
N00 = 3;
FLAG_TANORLANG00 = 1;
......
......@@ -36,6 +36,7 @@ Physical Line(15) = {1,2,3,4};
Physical Surface(16)={6};
Recursive Color LightGrey { Surface{ 6}; }
// Post-processing point
......@@ -51,3 +52,4 @@ For k In {1:num_postop_points}
EndFor
EndIf
//-------------------------------------------------------------------------
// Default Parameters
//-------------------------------------------------------------------------
If (FileExists("square_data.dat"))
Printf('square_data.dat is used');
Include "square_data.dat";
Else
// GEO parameters .............................
THICKNESS_00 = 1; // thickness of the sample
......@@ -64,6 +68,8 @@ TestAllFactors00 = 2; // 0 : try first relaxation factors (from the list) an
// - the relaxation factor is multiplied by a ratio as long as the residual decreases
// - the relaxation factor is decreased by a ratio until a decreasing residual is found
// [3 : Build a parabola based on three relaxation factors and deduce a minimizing relaxation factor (NOT WORKING!!)]
EndIf
Reltol_Mag00 = stop_criterion00; // 0 before with IterativeLoopN
Abstol_Mag00 = stop_criterion00;
Reltoldx_Mag00 = 1e-5*stop_criterion00;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment