Commit 853d2462 authored by franjo.juretic@c-fields.com's avatar franjo.juretic@c-fields.com
Browse files

Imporovement of boundary layer for pMesh + cleaning up


git-svn-id: https://pl5.projectlocker.com/igui/meshGeneration/svn@70 fdcce57e-7e00-11e2-b579-49867b4cea03
parent 604598da
......@@ -6,6 +6,5 @@
EXE_INC = \
$(OMP_FLAGS) \
-g -ggdb -DFULLDEBUG -O0 \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
......@@ -169,6 +169,16 @@ void refineBoundaryLayers::refineFace
Pout << "dir1Edges " << dir1Edges << endl;
# endif
if( (dir0 < 0) && (dir1 < 0) )
{
FatalErrorIn
(
"void refineBoundaryLayers::refineFace(const face&,"
" const FixedList<label, 2>&, DynList<DynList<label, 4> >&)"
) << "Cannot splitting directions for a face"
<< abort(FatalError);
}
//- in case of only one refinement direction, it must direction 0
if( (dir1 != -1) && (dir0 == -1) )
{
......
......@@ -2389,8 +2389,6 @@ bool edgeExtractor::untangleSurface()
void edgeExtractor::extractEdges()
{
meshOctree_.surface().writeSurface("surf.fms");
distributeBoundaryFaces();
distributeBoundaryFacesNormalAlignment();
......
......@@ -37,7 +37,7 @@ SourceFiles
#define meshSurfacePartitioner_H
#include "meshSurfaceEngine.H"
#include "VRWGRaph.H"
#include "VRWGraph.H"
#include "HashSet.H"
#include <map>
......
......@@ -177,26 +177,26 @@ void voronoiMeshGenerator::generateBoudaryLayers()
if( meshDict_.found("boundaryLayers") )
{
wordList createLayers;
boundaryLayers bl(mesh_);
if( meshDict_.isDict("boundaryLayers") )
const dictionary& bndLayers = meshDict_.subDict("boundaryLayers");
if( bndLayers.found("nLayers") )
{
const dictionary& dict = meshDict_.subDict("boundaryLayers");
createLayers = dict.toc();
const label nLayers = readLabel(bndLayers.lookup("nLayers"));
if( nLayers > 0 )
bl.addLayerForAllPatches();
}
else
else if( bndLayers.found("patchBoundaryLayers") )
{
wordList bndLayers(meshDict_.lookup("boundaryLayers"));
createLayers.transfer(bndLayers);
}
const dictionary& patchLayers =
bndLayers.subDict("patchBoundaryLayers");
const wordList createLayers = patchLayers.toc();
forAll(createLayers, patchI)
bl.addLayerForPatch(createLayers[patchI]);
}
else
{
//bl.createOTopologyLayers();
bl.addLayerForAllPatches();
forAll(createLayers, patchI)
bl.addLayerForPatch(createLayers[patchI]);
}
}
# ifdef DEBUG
......@@ -207,8 +207,6 @@ void voronoiMeshGenerator::generateBoudaryLayers()
void voronoiMeshGenerator::refBoundaryLayers()
{
mesh_.write();
if( meshDict_.isDict("boundaryLayers") )
{
refineBoundaryLayers refLayers(mesh_);
......
EXE_INC = -I$(LIB_SRC)/triSurface/lnInclude -I$(LIB_SRC)/meshTools/lnInclude -I../../meshLibrary/lnInclude
EXE_LIBS = -lMeshLibrary -ltriSurface -lmeshTools
EXE_LIBS = -lmeshLibrary -ltriSurface -lmeshTools
......@@ -75,86 +75,7 @@ int main(int argc, char *argv[])
refineBoundaryLayers refLayers(pmg);
if( meshDict.isDict("boundaryLayers") )
{
const dictionary& bndLayers = meshDict.subDict("boundaryLayers");
//- read global properties
if( bndLayers.found("nLayers") )
{
const label nLayers = readLabel(bndLayers.lookup("nLayers"));
refLayers.setGlobalNumberOfLayers(nLayers);
}
if( bndLayers.found("thicknessRatio") )
{
const scalar ratio = readScalar(bndLayers.lookup("thicknessRatio"));
refLayers.setGlobalThicknessRatio(ratio);
}
if( bndLayers.found("maxFirstLayerThickness") )
{
const scalar maxFirstThickness =
readScalar(bndLayers.lookup("maxFirstLayerThickness"));
refLayers.setGlobalMaxThicknessOfFirstLayer(maxFirstThickness);
}
//- patch-based properties
if( bndLayers.isDict("patchBoundaryLayers") )
{
const dictionary& patchBndLayers =
bndLayers.subDict("patchBoundaryLayers");
const wordList patchNames = patchBndLayers.toc();
forAll(patchNames, patchI)
{
const word pName = patchNames[patchI];
if( patchBndLayers.isDict(pName) )
{
const dictionary& patchDict =
patchBndLayers.subDict(pName);
if( patchDict.found("nLayers") )
{
const label nLayers =
readLabel(patchDict.lookup("nLayers"));
refLayers.setNumberOfLayersForPatch(pName, nLayers);
}
if( patchDict.found("thicknessRatio") )
{
const scalar ratio =
readScalar(patchDict.lookup("thicknessRatio"));
refLayers.setThicknessRatioForPatch(pName, ratio);
}
if( patchDict.found("maxFirstLayerThickness") )
{
const scalar maxFirstThickness =
readScalar
(
patchDict.lookup("maxFirstLayerThickness")
);
refLayers.setMaxThicknessOfFirstLayerForPatch
(
pName,
maxFirstThickness
);
}
if( patchDict.found("allowDiscontinuity") )
{
const bool allowDiscontinuity =
readBool(patchDict.lookup("allowDiscontinuity"));
if( allowDiscontinuity )
refLayers.setInteruptForPatch(pName);
}
}
else
{
Warning << "Cannot refine layer for patch "
<< patchNames[patchI] << endl;
}
}
}
}
refineBoundaryLayers::readSettings(meshDict, refLayers);
refLayers.refineLayers();
......
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