Commit 8014716b authored by Franjo's avatar Franjo
Browse files

Merge branch 'development' into release

parents 5cc5c1c2 944c8360
......@@ -1344,6 +1344,8 @@ void extrudeLayer::updateBoundary()
PtrList<boundaryPatch>& boundaries = meshModifier.boundariesAccess();
forAll(boundaries, patchI)
boundaries[patchI].patchType() = patchTypes[patchI];
meshModifier.clearAll();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
......@@ -1375,6 +1377,8 @@ extrudeLayer::extrudeLayer
updateBoundary();
mesh_.clearAddressingData();
# ifdef DEBUGExtrudeLayer
polyMeshGenChecks::checkMesh(mesh_, true);
# endif
......
......@@ -107,7 +107,7 @@ void meshOctree::findNearestSurfacePoint
if( !found )
sizeVec *= 2.0;
} while( !found && (iterationI++ < 5) );
} while( !found && (iterationI++ < 100) );
# ifdef DEBUGSearch
forAll(surface_, triI)
......
......@@ -54,6 +54,14 @@ label meshOctree::findLeafContainingVertex
# ifdef OCTREE_DEBUG
Info << "Vertex " << p << " is not in the initial cube" << endl;
# endif
FatalErrorIn
(
"label meshOctree::findLeafContainingVertex(const point&) const"
) << "Point " << p << " is not inside the initial cube" << endl;
throw "Found invalid locations of points";
return -1;
}
......
......@@ -36,7 +36,11 @@ Description
#include <omp.h>
# endif
// #define DEBUGSearch
//#define DEBUGSheets
# ifdef DEBUGSheets
#include "helperFunctions.H"
# endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -69,8 +73,6 @@ void createFundamentalSheetsJFS::createInitialSheet()
boundaries[boundaries.size()-1].patchSize()
);
faceListPMG::subList bFaces(mesh_.faces(), end-start, start);
const labelList& owner = mesh_.owner();
LongList<labelPair> extrudeFaces(end-start);
......@@ -99,8 +101,43 @@ void createFundamentalSheetsJFS::createSheetsAtFeatureEdges()
);
faceListPMG::subList bFaces(mesh_.faces(), end-start, start);
labelList facePatch(bFaces.size());
forAll(boundaries, patchI)
{
const label patchStart = boundaries[patchI].patchStart();
const label patchEnd = patchStart + boundaries[patchI].patchSize();
for(label faceI=patchStart;faceI<patchEnd;++faceI)
{
facePatch[faceI-start] = patchI;
}
}
List<DynList<label, 3> > patchCell(mesh_.cells().size());
forAll(facePatch, bfI)
patchCell[owner[start+bfI]].appendIfNotIn(facePatch[bfI]);
labelList patchCell(mesh_.cells().size());
# ifdef DEBUGSheets
labelList patchSheetId(boundaries.size());
forAll(patchSheetId, patchI)
patchSheetId[patchI] =
mesh_.addCellSubset("sheetPatch_"+help::labelToText(patchI));
forAll(patchCell, cellI)
{
if( patchCell[cellI].size() > 1 )
Warning << "Cell " << cellI
<< " is in patches " << patchCell[cellI] << endl;
forAll(patchCell[cellI], patchI)
mesh_.addCellToSubset
(
patchSheetId[patchCell[cellI][patchI]],
cellI
);
}
# endif
LongList<labelPair> front;
......@@ -129,10 +166,13 @@ void createFundamentalSheetsJFS::createSheetsAtFeatureEdges()
# ifdef USE_OMP
# pragma omp for
# endif
for(label faceI=start;faceI<end;++faceI)
forAll(facePatch, bfI)
{
const cell& c = cells[owner[faceI]];
const label patchI = mesh_.faceIsInPatch(faceI);
const label faceI = start + bfI;
const label cellI = owner[faceI];
const cell& c = cells[cellI];
const label patchI = facePatch[bfI];
forAll(c, fI)
{
......@@ -140,11 +180,11 @@ void createFundamentalSheetsJFS::createSheetsAtFeatureEdges()
continue;
label nei = owner[c[fI]];
if( nei == owner[faceI] )
if( nei == cellI )
nei = neighbour[c[fI]];
if( patchCell[nei] != patchI )
localFront.append(labelPair(c[fI], owner[faceI]));
if( !patchCell[nei].contains(patchI) )//patchCell[nei] != patchI )
localFront.append(labelPair(c[fI], cellI));
}
}
......@@ -166,6 +206,19 @@ void createFundamentalSheetsJFS::createSheetsAtFeatureEdges()
front[frontStart+lfI] = localFront[lfI];
}
# ifdef DEBUGSheets
const label fId = mesh_.addFaceSubset("facesForFundamentalSheets");
const label cId = mesh_.addCellSubset("cellsForFundamentalSheets");
forAll(front, fI)
{
mesh_.addFaceToSubset(fId, front[fI].first());
mesh_.addCellToSubset(cId, front[fI].second());
}
mesh_.write();
# endif
//- extrude the layer
extrudeLayer(mesh_, front);
}
......
......@@ -876,6 +876,7 @@ void edgeExtractor::distributeBoundaryFaces()
}
else
{
pointPatch_[bpI] = nPatches;
FatalErrorIn
(
"void meshSurfaceEdgeExtractorNonTopo::"
......@@ -909,6 +910,8 @@ void edgeExtractor::distributeBoundaryFaces()
}
else
{
facePatch_[bfI] = nPatches;
FatalErrorIn
(
"void meshSurfaceEdgeExtractorNonTopo::"
......
......@@ -16,7 +16,7 @@ object meshDict;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
maxCellSize 40;
surfaceFile "surfaceMeshes/bunnyWrapped.fms";
surfaceFile "bunnyWrapped.stl";
objectRefinements
{
......
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