diff --git a/Source/IO/mesh_ecl_file.cpp b/Source/IO/mesh_ecl_file.cpp index 485b4451a8c193c64b15ccf02ebc57218cf74081..5d8b79f0464a24d311da36a570ea690d24d77afa 100644 --- a/Source/IO/mesh_ecl_file.cpp +++ b/Source/IO/mesh_ecl_file.cpp @@ -1212,7 +1212,9 @@ namespace INMOST { if (file_options[k].first == "ECL_SPLIT_GLUED") { - if (file_options[k].second == "TRUE") + if (file_options[k].second == "ALL") + perform_splitting = 2; + else if (file_options[k].second == "TRUE") perform_splitting = 1; else perform_splitting = 0; @@ -4369,56 +4371,57 @@ namespace INMOST //TODO4: crack up the mesh along degenerate active cells //compute cell centers that lay inside - if (false) //TODO16 + if (true) //TODO16 { - - if (verbosity > 0) - { - ttt = Timer(); - std::cout << "Compute geometric data for cell centers" << std::endl; - } - GeomParam table; - table[CENTROID] = CELL; - PrepareGeometricData(table); - if (verbosity) - std::cout << "Finished computing geometric data time " << Timer() - ttt << std::endl; - //overwrite centroid info - if (verbosity > 0) + if( true ) { - ttt = Timer(); - std::cout << "Started rewriting cell centers" << std::endl; - } + if (verbosity > 0) + { + ttt = Timer(); + std::cout << "Compute geometric data for cell centers" << std::endl; + } + GeomParam table; + table[CENTROID] = CELL; + PrepareGeometricData(table); + if (verbosity) + std::cout << "Finished computing geometric data time " << Timer() - ttt << std::endl; + //overwrite centroid info + if (verbosity > 0) + { + ttt = Timer(); + std::cout << "Started rewriting cell centers" << std::endl; + } #if defined(USE_OMP) #pragma omp parallel for #endif - for (integer it = 0; it < CellLastLocalID(); ++it) if (isValidCell(it)) - { - Cell c = CellByLocalID(it); - integer bnum = c->Integer(cell_number) - 1; - if (bnum >= 0) //maybe this cell existed before + for (integer it = 0; it < CellLastLocalID(); ++it) if (isValidCell(it)) { - real ctop[3] = { 0.0, 0.0, 0.0 }, cbottom[3] = { 0.0, 0.0, 0.0 }; - for (int l = 0; l < 4; ++l) + Cell c = CellByLocalID(it); + integer bnum = c->Integer(cell_number) - 1; + if (bnum >= 0) //maybe this cell existed before { - real_array bc = Node(this, block_nodes[bnum * 8 + l + 0]).Coords(); - real_array tc = Node(this, block_nodes[bnum * 8 + l + 4]).Coords(); - cbottom[0] += bc[0] * 0.25; - cbottom[1] += bc[1] * 0.25; - cbottom[2] += bc[2] * 0.25; - ctop[0] += tc[0] * 0.25; - ctop[1] += tc[1] * 0.25; - ctop[2] += tc[2] * 0.25; - } - real_array cnt = c->RealArray(centroid_tag); - cnt[0] = (cbottom[0] + ctop[0])*0.5; - cnt[1] = (cbottom[1] + ctop[1])*0.5; - cnt[2] = (cbottom[2] + ctop[2])*0.5; + real ctop[3] = { 0.0, 0.0, 0.0 }, cbottom[3] = { 0.0, 0.0, 0.0 }; + for (int l = 0; l < 4; ++l) + { + real_array bc = Node(this, block_nodes[bnum * 8 + l + 0]).Coords(); + real_array tc = Node(this, block_nodes[bnum * 8 + l + 4]).Coords(); + cbottom[0] += bc[0] * 0.25; + cbottom[1] += bc[1] * 0.25; + cbottom[2] += bc[2] * 0.25; + ctop[0] += tc[0] * 0.25; + ctop[1] += tc[1] * 0.25; + ctop[2] += tc[2] * 0.25; + } + real_array cnt = c->RealArray(centroid_tag); + cnt[0] = (cbottom[0] + ctop[0])*0.5; + cnt[1] = (cbottom[1] + ctop[1])*0.5; + cnt[2] = (cbottom[2] + ctop[2])*0.5; + } } + if (verbosity) + std::cout << "Finished rewriting cell centers time " << Timer() - ttt << std::endl; } - if (verbosity) - std::cout << "Finished rewriting cell centers time " << Timer() - ttt << std::endl; - if (verbosity > 0) { @@ -4677,8 +4680,34 @@ namespace INMOST K(0, 0) = perm[3 * q + 0]; K(1, 1) = perm[3 * q + 1]; K(2, 2) = perm[3 * q + 2]; + + //double norm1 = K.FrobeniusNorm(); K = V*Sinv*U.Transpose()*K*U*Sinv*V.Transpose(); + + //double norm2 = K.FrobeniusNorm(); + /* + if( norm2/norm1 > 100 ) + { + std::cout << "#####" << std::endl; + std::cout << "norm1 " << norm1 << " norm2 " << norm2 << std::endl; + std::cout << "K:" << std::endl; + K.Print(); + std::cout << "axis: " << std::endl; + block_axis(c, 3, 3).Print(); + std::cout << "Sinv: " << std::endl; + Sinv.Print(); + std::cout << "U: " << std::endl; + U.Print(); + std::cout << "V: " << std::endl; + V.Print(); + K.SVD(U,S,V); + std::cout << "KS:" << std::endl; + S.Print(); + std::cout << "kx ky kz: " << std::endl; + std::cout << perm[3*q+0] << " " << perm[3*q+1] << " " << perm[3*q+2] << std::endl; + } + */ arr_perm[0] = K(0, 0); arr_perm[1] = K(0, 1); diff --git a/Source/Solver/solver_inner/SolverInner.h b/Source/Solver/solver_inner/SolverInner.h index ccd5580b55b8d7136c52b428c7abb3e0fbd4b7b0..3d36821878a693d8593bbb502d34a9fdef496087 100644 --- a/Source/Solver/solver_inner/SolverInner.h +++ b/Source/Solver/solver_inner/SolverInner.h @@ -5,7 +5,7 @@ #include "../Misc/utils.h" #include "solver_prototypes.hpp" #include "solver_bcgsl.hpp" -#define KSOLVER BCGSL_solver +#define KSOLVER BCGS_solver namespace INMOST {