Commit cdacff87 authored by Franjo Juretic's avatar Franjo Juretic

Updated meshUntangler

parent 97346d06
......@@ -272,7 +272,7 @@ void meshUntangler::cutRegion::createPolyMeshFromRegion
fEdges.append(edges[f[eI]]);
Info << "Edges forming face " << fI << " are " << fEdges << endl;
labelListList sf = sortEdgesIntoChains(fEdges).sortedChains();
const DynList<DynList<label> > sf = sortEdgesIntoChains(fEdges).sortedChains();
if( sf.size() != 1 )
FatalErrorIn
(
......@@ -280,7 +280,10 @@ void meshUntangler::cutRegion::createPolyMeshFromRegion
"cutRegion::createPolyMeshFromRegion(polyMesgGen&)"
) << "More than one face created!" << abort(FatalError);
faces[fI] = face(sf[0]);
faces[fI].setSize(sf[0].size());
forAll(sf[0], pI)
faces[fI][pI] = sf[0][pI];
cells[0][fI] = fI;
}
}
......
......@@ -56,16 +56,14 @@ void meshUntangler::cutRegion::tieBreak(const DynList<label, 8>& f)
deleteDemandDrivenData(cEdgesPtr_);
deleteDemandDrivenData(cFacesPtr_);
//- remove coincident vertices
//removeCoincidentVertices();
const DynList<edge, 128>& edges = *edgesPtr_;
DynList<edge> faceEdges;
forAll(f, eI)
faceEdges.append(edges[f[eI]]);
labelListList fvertices = sortEdgesIntoChains(faceEdges).sortedChains();
const DynList<DynList<label> > fvertices =
sortEdgesIntoChains(faceEdges).sortedChains();
if( fvertices.size() != 1 )
{
valid_ = false;
......@@ -79,7 +77,7 @@ void meshUntangler::cutRegion::tieBreak(const DynList<label, 8>& f)
<< fvertices.size() << abort(FatalError);
}
const labelList& fv = fvertices[0];
const DynList<label>& fv = fvertices[0];
DynList<label, 64> vertexRegion;
vertexRegion.setSize(fv.size());
......
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