Commit 3ccb4cd7 authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

Don't ask to create ghost layers after modification if there was none, comment...

Don't ask to create ghost layers after modification if there was none, comment redundant code in K-means clustering
parent 9fd98c6f
......@@ -26,7 +26,7 @@ typedef Storage::real_array real_array;
typedef Storage::var_array var_array;
bool print_niter = false; //save file on nonlinear iterations
bool output_matrix = true;
bool output_matrix = false;
bool norne_wells = true;
//data for wells
......
......@@ -27,8 +27,7 @@ namespace INMOST
TagInteger level; //< Refinement level of the cell
//TagReferenceArray ref_tag; //<Link to the set that contains an element.
Storage::integer GetLevel(const Storage & e) {return level[e];}
void SynchronizeSet(ElementSet set);
AdaptiveMesh(Mesh & m);
AdaptiveMesh(Mesh & m);
~AdaptiveMesh();
/// Indicator must be 1 on cells to be refined
/// and 0 on all other cells
......
......@@ -1793,7 +1793,8 @@ namespace INMOST
std::cout << GetProcessorRank() << " before exchange ghost new " << n << " hidden " << h << " both " << hn << std::endl;
*/
//std::cout << "layers " << Integer(GetHandle(),tag_layers) << " bridge " << ElementTypeName(ElementType(Integer(GetHandle(),tag_bridge))) << std::endl;
ExchangeGhost(Integer(GetHandle(),tag_layers),Integer(GetHandle(),tag_bridge));//,NewMarker()); //TODO!!!!
if( Integer(GetHandle(),tag_layers) )
ExchangeGhost(Integer(GetHandle(),tag_layers),Integer(GetHandle(),tag_bridge));//,NewMarker()); //TODO!!!!
//ReportParallelStorage();
//CheckCentroids(__FILE__,__LINE__);
//Save("after_exchange_ghost.pvtk");
......
......@@ -1297,7 +1297,7 @@ namespace INMOST
Cell n = m->CellByLocalID(q);
if( n->GetStatus() != Element::Ghost ) points_node[k++] = n->LocalID();
}
/*
double pmax[3] = {-1.0e+100,-1.0e+100,-1.0e+100};
double pmin[3] = {+1.0e+100,+1.0e+100,+1.0e+100};
......@@ -1345,6 +1345,7 @@ namespace INMOST
double mesh_dist = (pmax[0]-pmin[0])*(pmax[0]-pmin[0]) + (pmax[1]-pmin[1])*(pmax[1]-pmin[1]) + (pmax[2]-pmin[2])*(pmax[2]-pmin[2]);
mesh_dist /= (double)K*3.0;
*/
//mesh_dist *= 10;
/*
if( m->GetProcessorRank() == 0)
......@@ -1546,6 +1547,9 @@ namespace INMOST
{
std::vector< double > local_sum(K*3,0.0);
std::vector< int > local_npoints(K,0);
#if defined(USE_OMP)
#pragma omp for
#endif
for(int j = 0; j < total_points; ++j)
{
local_sum[points_cluster[j]*3+0] += points_center[j*3+0];
......
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