Commit 9b984278 authored by Kirill Terekhov's avatar Kirill Terekhov

Sync updates

algorithm for small elements elemenation via edge collapse

new comparator to sort elements by their measure

slice_func delete the other zone
parent de8259b3
Pipeline #169 failed with stages
in 10 minutes and 1 second
This diff is collapsed.
...@@ -1174,15 +1174,15 @@ int main(int argc, char ** argv) ...@@ -1174,15 +1174,15 @@ int main(int argc, char ** argv)
} }
/*
for(Mesh::iteratorCell it = m.BeginCell(); it != m.EndCell(); ++it) for(Mesh::iteratorCell it = m.BeginCell(); it != m.EndCell(); ++it)
if( material[*it] == 0 || it->Integer(collapse) ) if( material[*it] == 0 )//|| it->Integer(collapse) )
it->Delete(); it->Delete();
for(ElementType etype = FACE; etype >= NODE; etype = PrevElementType(etype) ) for(ElementType etype = FACE; etype >= NODE; etype = PrevElementType(etype) )
for(Mesh::iteratorElement it = m.BeginElement(etype); it != m.EndElement(); ++it) for(Mesh::iteratorElement it = m.BeginElement(etype); it != m.EndElement(); ++it)
if( it->nbAdjElements(CELL) == 0 ) it->Delete(); if( it->nbAdjElements(CELL) == 0 ) it->Delete();
*/
m.ReleaseMarker(slice,NODE|EDGE); m.ReleaseMarker(slice,NODE|EDGE);
m.ReleaseMarker(original,NODE|EDGE); m.ReleaseMarker(original,NODE|EDGE);
......
...@@ -3327,6 +3327,32 @@ namespace INMOST ...@@ -3327,6 +3327,32 @@ namespace INMOST
bool operator() (HandleType a, bulk b) const {if( a == InvalidHandle() ) return true; return m->BulkDF(a,t) < b;} bool operator() (HandleType a, bulk b) const {if( a == InvalidHandle() ) return true; return m->BulkDF(a,t) < b;}
}; };
class MeasureComparator
{
Mesh * m;
public:
MeasureComparator(Mesh * m) :m(m) {}
MeasureComparator(const MeasureComparator & other) :m(other.m) {}
MeasureComparator & operator = (MeasureComparator const & other) { m = other.m; return *this;}
bool operator() (HandleType a, HandleType b) const
{
if( a == InvalidHandle() || b == InvalidHandle() )
return a > b;
double ma, mb;
m->GetGeometricData(a,MEASURE,&ma);
m->GetGeometricData(b,MEASURE,&mb);
return ma < mb;
}
bool operator() (HandleType a, bulk b) const
{
if( a == InvalidHandle() )
return true;
double ma;
m->GetGeometricData(a,MEASURE,&ma);
return ma < b;
}
};
class MarkerComparator class MarkerComparator
{ {
Mesh * m; MarkerType mrk; bool inverse; Mesh * m; MarkerType mrk; bool inverse;
......
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