Commit 26f0d171 authored by Phillip Lino Rall's avatar Phillip Lino Rall
Browse files

increased efficiency of iterpolator. trilinear interpolation not worth it, as...

increased efficiency of iterpolator. trilinear interpolation not worth it, as it increases computational effort quiet a lot, while barely being more accurate
parent 01bc6394
...@@ -53,10 +53,11 @@ bool contained_in_tet(D3vector lam) { ...@@ -53,10 +53,11 @@ bool contained_in_tet(D3vector lam) {
} }
bool contained_in_tet_strong(D3vector lam) { bool contained_in_tet_strong(D3vector lam) {
if(lam.x < -0.2) return false; double limit = 0.2; // 0.2
if(lam.y < -0.2) return false; if(lam.x < -limit) return false;
if(lam.z < -0.2) return false; if(lam.y < -limit) return false;
if(lam.x + lam.y + lam.z > 1.2) return false; if(lam.z < -limit) return false;
if(lam.x + lam.y + lam.z > 1+limit) return false;
return true; return true;
} }
...@@ -65,8 +66,10 @@ bool new_lam_better(D3vector lam_old, D3vector lam_new) { ...@@ -65,8 +66,10 @@ bool new_lam_better(D3vector lam_old, D3vector lam_new) {
if (MIN(lam_new ) < -0.2 || MAX(lam_new) > 1.2) return false; if (MIN(lam_new ) < -0.2 || MAX(lam_new) > 1.2) return false;
if (MIN(lam_old ) < -0.2 || MAX(lam_old) > 1.2) return true; if (MIN(lam_old ) < -0.2 || MAX(lam_old) > 1.2) return true;
if (MIN(lam_new) < MIN(lam_old)) return true; if( (MIN(lam_new ) < 0 || MAX(lam_new) >1 )&& (MIN(lam_old ) >= 0 || MAX(lam_old) <=1 )) return false;
if (MIN(lam_new) > MIN(lam_old)) return true;
if (MAX(lam_new) < MAX(lam_old)) return true; if (MAX(lam_new) < MAX(lam_old)) return true;
return false;
} }
bool new_lam_worse(D3vector lam_old, D3vector lam_new) { bool new_lam_worse(D3vector lam_old, D3vector lam_new) {
...@@ -2694,15 +2697,14 @@ void Interpolate_direct::find_cell(D3vector v) ...@@ -2694,15 +2697,14 @@ void Interpolate_direct::find_cell(D3vector v)
counterSamePoint++; counterSamePoint++;
return; return;
} }
badLambdaFound = false;
bool badIsBestLambda = false;
bool previousBadLambda = false;
idHexNow = -1;
vNow = v; vNow = v;
lambda = D3vector(-1,-1,-1); lambda = D3vector(-1,-1,-1);
D3vector cWSD, cESD;
D3vector cWND, cEND;
D3vector cWST, cEST;
D3vector cWNT, cENT;
D3vector boxWSD, boxENT; D3vector boxWSD, boxENT;
...@@ -2711,58 +2713,98 @@ void Interpolate_direct::find_cell(D3vector v) ...@@ -2711,58 +2713,98 @@ void Interpolate_direct::find_cell(D3vector v)
int Nx, Ny, Nz; int Nx, Ny, Nz;
// prev // prev
if (checkBox(idHexPrev,iPrev, jPrev, kPrev, v) != -1){ if (checkBox(idHexPrev,iPrev, jPrev, kPrev, v) != -1){
counterFastest++; if (!badLambdaFound)
setPrevIndex(); {
counterFastest++;
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl; setPrevIndex();
return; return;
}
else
{
previousBadLambda = true;
//std::cout << "should be in next or is at boundary!" << std::endl;
}
} }
//std::cout << idHexPrev<< " " <<iPrev<< " " << jPrev<< " " << kPrev << std::endl;
if (checkBoxSurroundingOptimized(idHexPrev,iPrev, jPrev, kPrev, v) != -1)
{
if ((previousBadLambda && badLambdaFound ) || !badLambdaFound)
{
//will stay bad : probably at the boundary!
counterFast++;
setPrevIndex();
return;
}
if (checkBoxSurroundingOptimized(idHexPrev,iPrev, jPrev, kPrev, v) != -1){
counterFast++; }
setPrevIndex();
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl;
return;}
// prev prev // prev prev
if (checkBox(idHexPrevPrev,iPrevPrev, jPrevPrev, kPrevPrev, v) != -1){ if (checkBox(idHexPrevPrev,iPrevPrev, jPrevPrev, kPrevPrev, v) != -1)
//counterFastest++; {
setPrevIndex(); if (!badLambdaFound)
setPrevPrevIndex(); {
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl; setPrevIndex();
counterSecondTry++; setPrevPrevIndex();
return;} //cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl;
counterSecondTry++;
if (checkBoxSurroundingOptimized(idHexPrevPrev,iPrevPrev, jPrevPrev, kPrevPrev, v) != -1){ return;
//counterFast++; }
setPrevIndex(); else
setPrevPrevIndex(); {
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl; previousBadLambda = true;
counterSecondTry++; //std::cout << "should be in next or is at boundary!" << std::endl;
return;} }
}
if (checkBoxSurroundingOptimized(idHexPrevPrev,iPrevPrev, jPrevPrev, kPrevPrev, v) != -1)
{
if ((previousBadLambda && badLambdaFound ) || !badLambdaFound)
{
setPrevIndex();
setPrevPrevIndex();
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl;
counterSecondTry++;
return;
}
}
// prev prev prev // prev prev prev
if (checkBox(idHexPrevPrevPrev,iPrevPrevPrev, jPrevPrevPrev, kPrevPrevPrev, v) != -1){ if (checkBox(idHexPrevPrevPrev,iPrevPrevPrev, jPrevPrevPrev, kPrevPrevPrev, v) != -1)
//counterFastest++; {
setPrevIndex(); if (!badLambdaFound)
setPrevPrevPrevIndex(); {
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl; setPrevIndex();
counterThirdTry++; setPrevPrevIndex();
return;} setPrevPrevPrevIndex();
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl;
counterThirdTry++;
return;
}
else
{
previousBadLambda = true;
//std::cout << "should be in next or is at boundary!" << std::endl;
}
if (checkBoxSurroundingOptimized(idHexPrevPrevPrev,iPrevPrevPrev, jPrevPrevPrev, kPrevPrevPrev, v) != -1){
//counterFast++;
setPrevIndex();
setPrevPrevIndex();
setPrevPrevPrevIndex();
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl;
counterThirdTry++;
return;}
}
if (checkBoxSurroundingOptimized(idHexPrevPrevPrev,iPrevPrevPrev, jPrevPrevPrev, kPrevPrevPrev, v) != -1)
{
if ((previousBadLambda && badLambdaFound ) || !badLambdaFound)
{
setPrevIndex();
setPrevPrevIndex();
setPrevPrevPrevIndex();
//cout << " n.: " << idHexNow << " " << kNow << " " << jNow << " " << kNow << endl;
counterThirdTry++;
return;
}
idHexNow = -1; }
// cout << "Point looking for :";v.Print();cout<<endl;
for(int id_hex=0;id_hex<blockgrid->Give_unstructured_grid()->Give_number_hexahedra();++id_hex) { for(int id_hex=0;id_hex<blockgrid->Give_unstructured_grid()->Give_number_hexahedra();++id_hex) {
Nx = blockgrid->Give_Nx_hexahedron(id_hex); Nx = blockgrid->Give_Nx_hexahedron(id_hex);
...@@ -2774,13 +2816,30 @@ void Interpolate_direct::find_cell(D3vector v) ...@@ -2774,13 +2816,30 @@ void Interpolate_direct::find_cell(D3vector v)
for(int i=0;i<Nx;++i) { for(int i=0;i<Nx;++i) {
if (0 < checkBox(id_hex,i, j, k, v)) if (0 < checkBox(id_hex,i, j, k, v))
{ {
if (abs(iNow - iPrev) < 2 && abs(jNow - jPrev) < 2 && abs(kNow - kPrev) < 2)
{
std::cout<<std::endl;
std::cout << "why not found?!\n";
}
int babsdbas=0;
babsdbas = 1;
// k =Nz; // k =Nz;
// j =Ny; // j =Ny;
// i =Nx; // i =Nx;
// id_hex = blockgrid->Give_unstructured_grid()->Give_number_hexahedra(); // id_hex = blockgrid->Give_unstructured_grid()->Give_number_hexahedra();
} }
}
} }
if (badLambdaFound)
{
if (MIN(lambda) < 0 || MAX(lambda)>1)
{
}
else
{
assert(false && "must not happen!");
}
//lambda.Print();std::cout<<std::flush;
} }
// cout << " pp: " << idHexPrevPrevPrev << " " << iPrevPrevPrev << " " << jPrevPrevPrev << " " << kPrevPrevPrev << endl; // cout << " pp: " << idHexPrevPrevPrev << " " << iPrevPrevPrev << " " << jPrevPrevPrev << " " << kPrevPrevPrev << endl;
// cout << " pp: " << idHexPrevPrev << " " << iPrevPrev << " " << jPrevPrev << " " << kPrevPrev << endl; // cout << " pp: " << idHexPrevPrev << " " << iPrevPrev << " " << jPrevPrev << " " << kPrevPrev << endl;
...@@ -2935,76 +2994,112 @@ int Interpolate_direct::checkBox(int id_Hex, int i, int j, int k, D3vector v) ...@@ -2935,76 +2994,112 @@ int Interpolate_direct::checkBox(int id_Hex, int i, int j, int k, D3vector v)
cWNT = blockgrid->Give_coord_hexahedron(id_Hex,i, j+1,k+1); cWNT = blockgrid->Give_coord_hexahedron(id_Hex,i, j+1,k+1);
cENT = blockgrid->Give_coord_hexahedron(id_Hex,i+1,j+1,k+1); cENT = blockgrid->Give_coord_hexahedron(id_Hex,i+1,j+1,k+1);
// std::cout << "delete line below " << std::endl;
// k = 1;
// i = 3;
// j = 3;
// cWSD = blockgrid->Give_coord_hexahedron(0,i, j, k );
// cESD = blockgrid->Give_coord_hexahedron(0,i+1,j ,k );
// cWND = blockgrid->Give_coord_hexahedron(0,i, j+1,k );
// cEND = blockgrid->Give_coord_hexahedron(0,i+1,j+1,k );
// cWST = blockgrid->Give_coord_hexahedron(0,i, j, k+1);
// cEST = blockgrid->Give_coord_hexahedron(0,i+1,j ,k+1);
// cWNT = blockgrid->Give_coord_hexahedron(0,i, j+1,k+1);
// cENT = blockgrid->Give_coord_hexahedron(0,i+1,j+1,k+1);
cWSD.Print();std::cout<<std::endl;
cESD.Print();std::cout<<std::endl;
cWND.Print();std::cout<<std::endl;
cEND.Print();std::cout<<std::endl;
cWST.Print();std::cout<<std::endl;
cEST.Print();std::cout<<std::endl;
cWNT.Print();std::cout<<std::endl;
cENT.Print();std::cout<<std::endl;
D3vector lam, lamTemp ; D3vector lam, lamTemp ;
if (trilinearInterpolationFlag)
{
D3vector lamTrilinar = trilinarInterpolation(v,id_Hex,i, j, k );
D3vector lamTrilinar = trilinarInterpolation(v,id_Hex,i, j, k ); if (lamTrilinar != -1)
{
typ = 6;
lambda = lamTrilinar;
lam = lambda_of_p_in_tet(v,cWND,cWNT,cWST,cEST); typ_tet = typ;
lamTemp = lam; idHexNow = id_Hex;
if (contained_in_tet_strong(lam) && new_lam_better(lambda,lam)){typ=0;typCounter0++;} iNow = i;
jNow = j;
lam = lambda_of_p_in_tet(v,cEST,cWND,cWST,cESD); kNow = k;
if (contained_in_tet_strong(lam) && new_lam_better(lambda,lam)){typ=1;typCounter1++;lamTemp = lam;} return typ;
}
}
else
{
//std::cout << "\n\nstart of tet search\n\n";
lam = lambda_of_p_in_tet(v,cWND,cWNT,cWST,cEST);
//lam.Print();
//std::cout << "lambda bef :";lambda.Print();
lamTemp = lambda;
//std::cout << "new better : " << new_lam_better(lamTemp,lam) << std::endl;
//std::cout << "\nnew lam : "; lam.Print();
//std::cout << "old lam : "; lamTemp.Print();
if (contained_in_tet_strong(lam) && new_lam_better(lamTemp,lam)){typ=0;typCounter0++;lamTemp = lam;}
//std::cout << "new best : "; lamTemp.Print();
lam = lambda_of_p_in_tet(v,cEST,cWND,cWST,cESD);
//std::cout << "\nnew lam : "; lam.Print();
//std::cout << "old lam : "; lamTemp.Print();
//std::cout << "new better : " << new_lam_better(lamTemp,lam) << std::endl;
if (contained_in_tet_strong(lam) && new_lam_better(lamTemp,lam)){typ=1;typCounter1++;lamTemp = lam;}
//std::cout << "new best : "; lamTemp.Print();
lam = lambda_of_p_in_tet(v,cWND,cWSD,cWST,cESD);
//std::cout << "\nnew lam : "; lam.Print();
//std::cout << "old lam : "; lamTemp.Print();
//std::cout << "new better : " << new_lam_better(lamTemp,lam) << std::endl;
if (contained_in_tet_strong(lam) && new_lam_better(lamTemp,lam)){typ=2;typCounter2++;lamTemp = lam;}
//std::cout << "new best : "; lamTemp.Print();
lam = lambda_of_p_in_tet(v,cEST,cWND,cESD,cEND);
//std::cout << "\nnew lam : "; lam.Print();
//std::cout << "old lam : "; lamTemp.Print();
//std::cout << "new better : " << new_lam_better(lamTemp,lam) << std::endl;
if (contained_in_tet_strong(lam) && new_lam_better(lamTemp,lam)){typ=3;typCounter3++;lamTemp = lam;}
//std::cout << "new best : "; lamTemp.Print();
lam = lambda_of_p_in_tet(v,cENT,cWNT,cEST,cEND);
//std::cout << "\nnew lam : "; lam.Print();
//std::cout << "old lam : "; lamTemp.Print();
//std::cout << "new better : " << new_lam_better(lamTemp,lam) << std::endl;
if (contained_in_tet_strong(lam) && new_lam_better(lamTemp,lam)){typ=4;typCounter4++;lamTemp = lam;}
//std::cout << "new best : "; lamTemp.Print();
lam = lambda_of_p_in_tet(v,cWNT,cWND,cEST,cEND);
//std::cout << "\nnew lam : "; lam.Print();
//std::cout << "old lam : "; lamTemp.Print();
//std::cout << "new better : " << new_lam_better(lamTemp,lam) << std::endl;
if (contained_in_tet_strong(lam) && new_lam_better(lamTemp,lam)){typ=5;typCounter5++;lamTemp = lam;}
//std::cout << "new best : "; lamTemp.Print();
if( typ != -1 && new_lam_better(lambda,lamTemp))
{
if (MIN(lamTemp) < 0.0 || MAX(lamTemp) >1.0 )
{
badLambdaFound = true;
//lamTemp.Print();
}
else
{
badLambdaFound = false;
}
//lambda = lam;
// if (D3VectorNorm(lamTemp - D3vector(-0.184893695657936, 0.215428315449784, 0.533250940577171)) < 1e-5)
// {
// std::cout << "stop" << std::endl;
// }
// if (D3VectorNorm(lamTemp - D3vector(0.357354990724203, 0.152269993258782, 0.41683241494242)) < 1e-5)
// {
// std::cout << "stop" << std::endl;
// }
lambda = lamTemp;
typ_tet = typ;
idHexNow = id_Hex;
iNow = i;
jNow = j;
kNow = k;
lam = lambda_of_p_in_tet(v,cWND,cWSD,cWST,cESD);
if (contained_in_tet_strong(lam) && new_lam_better(lambda,lam)){typ=2;typCounter2++;lamTemp = lam;}
lam = lambda_of_p_in_tet(v,cEST,cWND,cESD,cEND);
if (contained_in_tet_strong(lam) && new_lam_better(lambda,lam)){typ=3;typCounter3++;lamTemp = lam;}
lam = lambda_of_p_in_tet(v,cENT,cWNT,cEST,cEND); }
if (contained_in_tet_strong(lam) && new_lam_better(lambda,lam)){typ=4;typCounter4++;lamTemp = lam;} }
lam = lambda_of_p_in_tet(v,cWNT,cWND,cEST,cEND);
if (contained_in_tet_strong(lam) && new_lam_better(lambda,lam)){typ=5;typCounter5++;lamTemp = lam;}
if( typ != -1 && new_lam_better(lambda,lamTemp))
{
if (MIN(lamTemp) < -0.2)
{
cout << "error !" << endl;
}
//lambda = lam;
lambda = lamTemp;
typ_tet = typ;
idHexNow = id_Hex;
iNow = i;
jNow = j;
kNow = k;
}
} }
return typ; return typ;
} }
...@@ -3025,28 +3120,44 @@ int Interpolate_direct::checkBoxSurrounding(int idHex, int i, int j, int k, D3ve ...@@ -3025,28 +3120,44 @@ int Interpolate_direct::checkBoxSurrounding(int idHex, int i, int j, int k, D3ve
return -1; return -1;
} }
int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, int k, D3vector v) int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, int k, D3vector v, bool neglectBadLambda)
{ {
bool temp = badLambdaFound;
badLambdaFound = false;
int iterationPerSurrounding = 0; int iterationPerSurrounding = 0;
//std::vector< //std::vector<
for(int iIter=i-1;iIter<i+2;iIter+=2){ for(int kIter=k+1;kIter>k-2;kIter-=2){
if (checkBox(idHex,iIter, j, k, v) != -1){//cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl; if (checkBox(idHex,i, j, kIter, v) != -1 && !badLambdaFound){//cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl;
return 0;} return 0;}
else { iterationPerSurrounding++;} else { iterationPerSurrounding++;}
} }
for(int jIter=j-1;jIter<j+2;jIter+=2){ if (badLambdaFound && !neglectBadLambda)
if (checkBox(idHex,i, jIter, k, v) != -1){//cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl; {
if (checkBoxSurroundingOptimized(idHexNow,iNow, jNow, kNow, v,true) != -1) return 0; else return -1;
}
for(int iIter=i-1;iIter<i+2;iIter+=2){
if (checkBox(idHex,iIter, j, k, v) != -1 && !badLambdaFound){//cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl;
return 0;} return 0;}
else { iterationPerSurrounding++;} else { iterationPerSurrounding++;}
} }
for(int kIter=k-1;kIter<k+2;kIter+=2){ if (badLambdaFound && !neglectBadLambda)
if (checkBox(idHex,i, j, kIter, v) != -1){//cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl; {
if (checkBoxSurroundingOptimized(idHexNow,iNow, jNow, kNow, v,true) != -1) return 0; else return -1;
}
for(int jIter=j-1;jIter<j+2;jIter+=2){
if (checkBox(idHex,i, jIter, k, v) != -1 && !badLambdaFound){//cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl;
return 0;} return 0;}
else { iterationPerSurrounding++;} else { iterationPerSurrounding++;}
} }
if (badLambdaFound && !neglectBadLambda)
{
if (checkBoxSurroundingOptimized(idHexNow,iNow, jNow, kNow, v,true) != -1) return 0; else return -1;
}
for(int kIter=k-1;kIter<k+2;kIter+=2) for(int kIter=k-1;kIter<k+2;kIter+=2)
for(int jIter=j-1;jIter<j+2;jIter+=2) { for(int jIter=j-1;jIter<j+2;jIter+=2) {
if (checkBox(idHex,i, jIter, kIter, v) != -1){ if (checkBox(idHex,i, jIter, kIter, v) != -1 && !badLambdaFound){
//counterFast++; //counterFast++;
//setPrevIndex(); //setPrevIndex();
...@@ -3054,9 +3165,13 @@ int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, in ...@@ -3054,9 +3165,13 @@ int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, in
return 0;} return 0;}
else { iterationPerSurrounding++;} else { iterationPerSurrounding++;}
} }
if (badLambdaFound && !neglectBadLambda)
{
if (checkBoxSurroundingOptimized(idHexNow,iNow, jNow, kNow, v,true) != -1) return 0; else return -1;
}
for(int kIter=k-1;kIter<k+2;kIter+=2) for(int kIter=k-1;kIter<k+2;kIter+=2)
for(int iIter=i-1;iIter<i+2;iIter+=2) { for(int iIter=i-1;iIter<i+2;iIter+=2) {
if (checkBox(idHex,iIter, j, kIter, v) != -1){ if (checkBox(idHex,iIter, j, kIter, v) != -1 && !badLambdaFound){ //here
//counterFast++; //counterFast++;
//setPrevIndex(); //setPrevIndex();
...@@ -3064,9 +3179,13 @@ int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, in ...@@ -3064,9 +3179,13 @@ int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, in
return 0;} return 0;}
else { iterationPerSurrounding++;} else { iterationPerSurrounding++;}
} }
if (badLambdaFound && !neglectBadLambda)
{
if (checkBoxSurroundingOptimized(idHexNow,iNow, jNow, kNow, v,true) != -1) return 0; else return -1;
}
for(int jIter=j-1;jIter<j+2;jIter+=2) for(int jIter=j-1;jIter<j+2;jIter+=2)
for(int iIter=i-1;iIter<i+2;iIter+=2) { for(int iIter=i-1;iIter<i+2;iIter+=2) {
if (checkBox(idHex,iIter, jIter, k, v) != -1){ if (checkBox(idHex,iIter, jIter, k, v) != -1 && !badLambdaFound){
//counterFast++; //counterFast++;
//setPrevIndex(); //setPrevIndex();
...@@ -3074,23 +3193,30 @@ int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, in ...@@ -3074,23 +3193,30 @@ int Interpolate_direct::checkBoxSurroundingOptimized(int idHex, int i, int j, in
return 0;} return 0;}
else { iterationPerSurrounding++;} else { iterationPerSurrounding++;}
} }
if (badLambdaFound && !neglectBadLambda)
{
if (checkBoxSurroundingOptimized(idHexNow,iNow, jNow, kNow, v,true) != -1) return 0; else return -1;
}
for(int kIter=k-1;kIter<k+2;kIter+=2) for(int kIter=k-1;kIter<k+2;kIter+=2)
for(int jIter=j-1;jIter<j+2;jIter+=2) for(int jIter=j-1;jIter<j+2;jIter+=2)
for(int iIter=i-1;iIter<i+2;iIter+=2) { for(int iIter=i-1;iIter<i+2;iIter+=2) {
if (checkBox(idHex,iIter, jIter, kIter, v) != -1){ if (checkBox(idHex,iIter, jIter, kIter, v) != -1 && !badLambdaFound){
//counterFast++; //counterFast++;
//setPrevIndex(); //setPrevIndex();
//cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl; //cout << "iterationPerSurrounding " << iterationPerSurrounding+1<< endl;
return 0;} return 0;}
else { iterationPerSurrounding++;} else { iterationPerSurrounding++;}
} }
if (badLambdaFound && !neglectBadLambda)
{
if (checkBoxSurroundingOptimized(idHexNow,iNow, jNow, kNow, v,true) != -1) return 0; else return -1;
}
badLambdaFound = temp;
return -1; return -1;
} }
...