Commit d3a02e3e authored by Franjo's avatar Franjo
Browse files

Fixes for bad settings

parent 8d1c13ea
......@@ -107,7 +107,7 @@ void meshOctree::findNearestSurfacePoint
if( !found )
sizeVec *= 2.0;
} while( !found && (iterationI++ < 5) );
} while( !found /*&& (iterationI++ < 5)*/ );
# 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,7 @@ Description
#include <omp.h>
# endif
// #define DEBUGSearch
#define DEBUGSheets
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -69,8 +69,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,6 +97,22 @@ 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)
{
# ifdef USE_OMP
# pragma omp task firstprivate(faceI) shared(facePatch)
# endif
{
facePatch[faceI] = patchI;
}
}
}
labelList patchCell(mesh_.cells().size());
......@@ -132,7 +146,7 @@ void createFundamentalSheetsJFS::createSheetsAtFeatureEdges()
for(label faceI=start;faceI<end;++faceI)
{
const cell& c = cells[owner[faceI]];
const label patchI = mesh_.faceIsInPatch(faceI);
const label patchI = facePatch[faceI - start];
forAll(c, fI)
{
......@@ -166,6 +180,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::"
......
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