Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/repositories/OpenFOAM-dev

This commit is contained in:
Henry
2014-01-27 13:00:37 +00:00
42 changed files with 131 additions and 168 deletions

View File

@ -4,7 +4,7 @@ set -x
wclean libso conformalVoronoiMesh wclean libso conformalVoronoiMesh
wclean wclean
wclean cvMeshSurfaceSimplify wclean foamyHexMeshSurfaceSimplify
wclean cvMeshBackgroundMesh wclean foamyHexMeshBackgroundMesh
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -6,8 +6,8 @@ if [ -d "$CGAL_ARCH_PATH" ]
then then
wmake libso conformalVoronoiMesh wmake libso conformalVoronoiMesh
wmake wmake
#wmake cvMeshBackgroundMesh #wmake foamyHexMeshBackgroundMesh
#(cd cvMeshSurfaceSimplify && ./Allwmake) #(cd foamyHexMeshSurfaceSimplify && ./Allwmake)
#wmake cellSizeAndAlignmentGrid #wmake cellSizeAndAlignmentGrid
fi fi

View File

@ -21,8 +21,9 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(FOAM_UTILITIES)/mesh/generation/cvMesh/conformalVoronoiMesh/lnInclude \ -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
-I$(FOAM_UTILITIES)/mesh/generation/cvMesh/vectorTools -I$(FOAM_UTILITIES)/mesh/generation/foamyHexMesh/conformalVoronoiMesh/lnInclude \
-I$(FOAM_UTILITIES)/mesh/generation/foamyHexMesh/vectorTools
EXE_LIBS = \ EXE_LIBS = \
$(CGAL_LIBS) \ $(CGAL_LIBS) \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -285,11 +285,11 @@ int main(int argc, char *argv[])
// - type should be optional // - type should be optional
cellShapeControlMesh mesh(runTime); cellShapeControlMesh mesh(runTime);
IOdictionary cvMeshDict IOdictionary foamyHexMeshDict
( (
IOobject IOobject
( (
"cvMeshDict", "foamyHexMeshDict",
runTime.system(), runTime.system(),
runTime, runTime,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -310,7 +310,8 @@ int main(int argc, char *argv[])
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
cvMeshDict.subDict("geometry") foamyHexMeshDict.subDict("geometry"),
foamyHexMeshDict.lookupOrDefault("singleRegionName", true)
); );
conformationSurfaces geometryToConformTo conformationSurfaces geometryToConformTo
@ -318,7 +319,7 @@ int main(int argc, char *argv[])
runTime, runTime,
rndGen, rndGen,
allGeometry, allGeometry,
cvMeshDict.subDict("surfaceConformation") foamyHexMeshDict.subDict("surfaceConformation")
); );
autoPtr<backgroundMeshDecomposition> bMesh; autoPtr<backgroundMeshDecomposition> bMesh;
@ -331,7 +332,7 @@ int main(int argc, char *argv[])
runTime, runTime,
rndGen, rndGen,
geometryToConformTo, geometryToConformTo,
cvMeshDict.subDict("backgroundMeshDecomposition") foamyHexMeshDict.subDict("backgroundMeshDecomposition")
) )
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -855,7 +855,8 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
foamyHexMeshDict.subDict("geometry") foamyHexMeshDict.subDict("geometry"),
foamyHexMeshDict.lookupOrDefault("singleRegionName", true)
), ),
geometryToConformTo_ geometryToConformTo_
( (

View File

@ -1,3 +0,0 @@
cvMeshBackgroundMesh.C
EXE = $(FOAM_APPBIN)/cvMeshBackgroundMesh

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -88,7 +88,8 @@ int main(int argc, char *argv[])
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
foamyHexMeshDict.subDict("geometry") foamyHexMeshDict.subDict("geometry"),
foamyHexMeshDict.lookupOrDefault("singleRegionName", true)
); );
// Write some stats // Write some stats

View File

@ -0,0 +1,3 @@
foamyHexMeshBackgroundMesh.C
EXE = $(FOAM_APPBIN)/foamyHexMeshBackgroundMesh

View File

@ -11,9 +11,12 @@ EXE_INC = \
-I../conformalVoronoiMesh/lnInclude \ -I../conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/mesh/autoMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I../vectorTools -I../vectorTools

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,10 +22,10 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
cvMeshBackGroundMesh foamyHexMeshBackGroundMesh
Description Description
Writes out background mesh as constructed by cvMesh and constructs Writes out background mesh as constructed by foamyHexMesh and constructs
distanceSurface. distanceSurface.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -346,7 +346,7 @@ tmp<scalarField> signedDistance
// Calculate sideness of these surface points // Calculate sideness of these surface points
label geomI = surfaces[surfI]; label geomI = surfaces[surfI];
List<searchableSurface::volumeType> volType; List<volumeType> volType;
geometry[geomI].getVolumeType(surfPoints, volType); geometry[geomI].getVolumeType(surfPoints, volType);
// Push back to original // Push back to original
@ -355,13 +355,13 @@ tmp<scalarField> signedDistance
label pointI = surfIndices[i]; label pointI = surfIndices[i];
scalar dist = mag(points[pointI] - nearest[pointI].hitPoint()); scalar dist = mag(points[pointI] - nearest[pointI].hitPoint());
searchableSurface::volumeType vT = volType[i]; volumeType vT = volType[i];
if (vT == searchableSurface::OUTSIDE) if (vT == volumeType::OUTSIDE)
{ {
fld[pointI] = dist; fld[pointI] = dist;
} }
else if (vT == searchableSurface::INSIDE) else if (vT == volumeType::INSIDE)
{ {
fld[i] = -dist; fld[i] = -dist;
} }
@ -385,7 +385,7 @@ int main(int argc, char *argv[])
{ {
argList::addNote argList::addNote
( (
"Generate cvMesh-consistent representation of surfaces" "Generate foamyHexMesh-consistent representation of surfaces"
); );
argList::addBoolOption argList::addBoolOption
( (
@ -413,11 +413,11 @@ int main(int argc, char *argv[])
} }
IOdictionary cvMeshDict IOdictionary foamyHexMeshDict
( (
IOobject IOobject
( (
"cvMeshDict", "foamyHexMeshDict",
runTime.system(), runTime.system(),
runTime, runTime,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -437,7 +437,8 @@ int main(int argc, char *argv[])
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
cvMeshDict.subDict("geometry") foamyHexMeshDict.subDict("geometry"),
foamyHexMeshDict.lookupOrDefault("singleRegionName", true)
); );
Random rndGen(64293*Pstream::myProcNo()); Random rndGen(64293*Pstream::myProcNo());
@ -447,18 +448,15 @@ int main(int argc, char *argv[])
runTime, runTime,
rndGen, rndGen,
allGeometry, allGeometry,
cvMeshDict.subDict("surfaceConformation") foamyHexMeshDict.subDict("surfaceConformation")
); );
autoPtr<cellShapeControl> cellShapeControls cellShapeControl cellShapeControls
( (
cellShapeControl::New runTime,
( foamyHexMeshDict.subDict("motionControl"),
runTime, allGeometry,
cvMeshDict.subDict("motionControl"), geometryToConformTo
allGeometry,
geometryToConformTo
)
); );
@ -587,7 +585,7 @@ int main(int argc, char *argv[])
geometryToConformTo, geometryToConformTo,
cellShapeControls(), cellShapeControls(),
rndGen, rndGen,
cvMeshDict foamyHexMeshDict
); );
if (writeMesh) if (writeMesh)

View File

@ -75,6 +75,12 @@ geometry
} }
} }
//Optional: single region surfaces get patch names according to
// surface only. Multi-region surfaces get patch name
// surface "_ "region. Default is true
//singleRegionName false;
// Controls for conforming to the surfaces. // Controls for conforming to the surfaces.
surfaceConformation surfaceConformation

View File

@ -1,5 +1,5 @@
/* /*
cvMeshSurfaceSimplify_non_octree.C foamyHexMeshSurfaceSimplify_non_octree.C
MarchingCubes/MarchingCubes.cpp MarchingCubes/MarchingCubes.cpp
MarchingCubes/ply.c MarchingCubes/ply.c
*/ */
@ -17,6 +17,6 @@ $(MarchingCubes)/opt_octree.cpp
$(MarchingCubes)/hash_octree.cpp $(MarchingCubes)/hash_octree.cpp
*/ */
cvMeshSurfaceSimplify.C foamyHexMeshSurfaceSimplify.C
EXE = $(FOAM_APPBIN)/cvMeshSurfaceSimplify EXE = $(FOAM_APPBIN)/foamyHexMeshSurfaceSimplify

View File

@ -9,6 +9,7 @@ EXE_INC = \
-I$(FASTDUALOCTREE_SRC_PATH) \ -I$(FASTDUALOCTREE_SRC_PATH) \
-I../conformalVoronoiMesh/lnInclude \ -I../conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/mesh/autoMesh/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
cvMeshSurfaceSimplify foamyHexMeshSurfaceSimplify
Description Description
Simplifies surfaces by resampling. Simplifies surfaces by resampling.
@ -112,7 +112,7 @@ class distanceCalc
surfaces, surfaces,
samples, samples,
scalarField(1, GREAT), scalarField(1, GREAT),
searchableSurface::OUTSIDE, volumeType::OUTSIDE,
nearestSurfaces, nearestSurfaces,
distance distance
); );
@ -366,7 +366,7 @@ int main(int argc, char *argv[])
{ {
argList::addNote argList::addNote
( (
"Re-sample surfaces used in cvMesh operation" "Re-sample surfaces used in foamyHexMesh operation"
); );
argList::validArgs.append("outputName"); argList::validArgs.append("outputName");
@ -376,17 +376,17 @@ int main(int argc, char *argv[])
const fileName exportName = args.args()[1]; const fileName exportName = args.args()[1];
Info<< "Reading surfaces as specified in the cvMeshDict and" Info<< "Reading surfaces as specified in the foamyHexMeshDict and"
<< " writing a re-sampled surface to " << exportName << " writing a re-sampled surface to " << exportName
<< nl << endl; << nl << endl;
cpuTime timer; cpuTime timer;
IOdictionary cvMeshDict IOdictionary foamyHexMeshDict
( (
IOobject IOobject
( (
"cvMeshDict", "foamyHexMeshDict",
runTime.system(), runTime.system(),
runTime, runTime,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -406,7 +406,8 @@ int main(int argc, char *argv[])
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
cvMeshDict.subDict("geometry") foamyHexMeshDict.subDict("geometry"),
foamyHexMeshDict.lookupOrDefault("singleRegionName", true)
); );
Info<< "Geometry read in = " Info<< "Geometry read in = "
@ -420,7 +421,7 @@ int main(int argc, char *argv[])
runTime, runTime,
rndGen, rndGen,
allGeometry, allGeometry,
cvMeshDict.subDict("surfaceConformation") foamyHexMeshDict.subDict("surfaceConformation")
); );
Info<< "Set up geometry in = " Info<< "Set up geometry in = "

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application Application
cvMeshSurfaceSimplify foamyHexMeshSurfaceSimplify
Description Description
Simplifies surfaces by resampling. Simplifies surfaces by resampling.
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
{ {
argList::addNote argList::addNote
( (
"Re-sample surfaces used in cvMesh operation" "Re-sample surfaces used in foamyHexMesh operation"
); );
//argList::validArgs.append("inputFile"); //argList::validArgs.append("inputFile");
argList::validArgs.append("(nx ny nz)"); argList::validArgs.append("(nx ny nz)");
@ -63,17 +63,17 @@ int main(int argc, char *argv[])
const Vector<label> n(IStringStream(args.args()[1])()); const Vector<label> n(IStringStream(args.args()[1])());
const fileName exportName = args.args()[2]; const fileName exportName = args.args()[2];
Info<< "Reading surfaces as specified in the cvMeshDict and" Info<< "Reading surfaces as specified in the foamyHexMeshDict and"
<< " writing re-sampled " << n << " to " << exportName << " writing re-sampled " << n << " to " << exportName
<< nl << endl; << nl << endl;
cpuTime timer; cpuTime timer;
IOdictionary cvMeshDict IOdictionary foamyHexMeshDict
( (
IOobject IOobject
( (
"cvMeshDict", "foamyHexMeshDict",
runTime.system(), runTime.system(),
runTime, runTime,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -93,7 +93,8 @@ int main(int argc, char *argv[])
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
cvMeshDict.subDict("geometry") foamyHexMeshDict.subDict("geometry"),
foamyHexMeshDict.lookupOrDefault("singleRegionName", true)
); );
Info<< "Geometry read in = " Info<< "Geometry read in = "
@ -107,7 +108,7 @@ int main(int argc, char *argv[])
runTime, runTime,
rndGen, rndGen,
allGeometry, allGeometry,
cvMeshDict.subDict("surfaceConformation") foamyHexMeshDict.subDict("surfaceConformation")
); );
Info<< "Set up geometry in = " Info<< "Set up geometry in = "

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -123,7 +123,8 @@ Foam::CV2D::CV2D
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
cvMeshDict.subDict("geometry") cvMeshDict.subDict("geometry"),
cvMeshDict.lookupOrDefault("singleRegionName", true)
), ),
qSurf_ qSurf_
( (

View File

@ -11,7 +11,7 @@ EXE_INC = \
${CGAL_INC} \ ${CGAL_INC} \
${c++CGALWARN} \ ${c++CGALWARN} \
-I$(FOAM_APP)/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/lnInclude \ -I$(FOAM_APP)/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/lnInclude \
-I../cvMesh/vectorTools \ /* -I../cvMesh/vectorTools */\
-IconformalVoronoi2DMesh/lnInclude \ -IconformalVoronoi2DMesh/lnInclude \
-I$(FOAM_APP)/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/lnInclude \ -I$(FOAM_APP)/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \

View File

@ -927,7 +927,8 @@ int main(int argc, char *argv[])
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
geometryDict geometryDict,
meshDict.lookupOrDefault("singleRegionName", true)
); );

View File

@ -19,6 +19,13 @@ castellatedMesh true;
snap true; snap true;
addLayers false; addLayers false;
//Optional: single region surfaces get patch names according to
// surface only. Multi-region surfaces get patch name
// surface "_ "region. Default is true
//singleRegionName false;
// Geometry. Definition of all surfaces. All surfaces are of class // Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface. // searchableSurface.
// Surfaces are used // Surfaces are used

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -205,7 +205,7 @@ int main(int argc, char *argv[])
runTime runTime
); );
// cvMesh vertices // foamyHexMesh vertices
writeMeshObject<pointIOField> writeMeshObject<pointIOField>
( (
"internalDelaunayVertices", "internalDelaunayVertices",

View File

@ -816,7 +816,7 @@ int main(int argc, char *argv[])
); );
// Now add turning index to faceProcAddressing. // Now add turning index to faceProcAddressing.
// See reconstrurPar for meaning of turning index. // See reconstructPar for meaning of turning index.
forAll(faceProcAddr, procFaceI) forAll(faceProcAddr, procFaceI)
{ {
label masterFaceI = faceProcAddr[procFaceI]; label masterFaceI = faceProcAddr[procFaceI];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -305,7 +305,8 @@ int main(int argc, char *argv[])
"triSurface", "triSurface",
runTime runTime
), ),
dict dict,
true // assume single-region names get surface name
); );
Info<< nl << "Reading surfaces: " << endl; Info<< nl << "Reading surfaces: " << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -315,10 +315,12 @@ void Foam::primitiveMeshTools::cellClosedness
scalar aspectRatio = maxCmpt/(minCmpt + VSMALL); scalar aspectRatio = maxCmpt/(minCmpt + VSMALL);
if (nDims == 3) if (nDims == 3)
{ {
scalar v = max(VSMALL, vols[cellI]);
aspectRatio = max aspectRatio = max
( (
aspectRatio, aspectRatio,
1.0/6.0*cmptSum(sumMagClosed[cellI])/pow(vols[cellI], 2.0/3.0) 1.0/6.0*cmptSum(sumMagClosed[cellI])/pow(v, 2.0/3.0)
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -422,7 +422,8 @@ surfaceDisplacementPointPatchVectorField::surfaces() const
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
surfacesDict_ surfacesDict_,
true // allow single-region shortcut
) )
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -399,7 +399,8 @@ surfaceSlipDisplacementPointPatchVectorField::surfaces() const
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
surfacesDict_ surfacesDict_,
true // use single region naming shortcut
) )
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -175,7 +175,8 @@ Foam::searchableSurfaces::searchableSurfaces(const label size)
Foam::searchableSurfaces::searchableSurfaces Foam::searchableSurfaces::searchableSurfaces
( (
const IOobject& io, const IOobject& io,
const dictionary& topDict const dictionary& topDict,
const bool singleRegionName
) )
: :
PtrList<searchableSurface>(topDict.size()), PtrList<searchableSurface>(topDict.size()),
@ -233,9 +234,16 @@ Foam::searchableSurfaces::searchableSurfaces
wordList& rNames = regionNames_[surfI]; wordList& rNames = regionNames_[surfI];
rNames.setSize(localNames.size()); rNames.setSize(localNames.size());
forAll(localNames, regionI) if (singleRegionName && localNames.size() == 1)
{ {
rNames[regionI] = names_[surfI] + '_' + localNames[regionI]; rNames[0] = names_[surfI];
}
else
{
forAll(localNames, regionI)
{
rNames[regionI] = names_[surfI] + '_' + localNames[regionI];
}
} }
// See if dictionary provides any global region names. // See if dictionary provides any global region names.

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -101,8 +101,16 @@ public:
////- Construct from list of dictionaries ////- Construct from list of dictionaries
//searchableSurfaces(const IOobject&, const PtrList<dictionary>&); //searchableSurfaces(const IOobject&, const PtrList<dictionary>&);
//- Construct from dictionary //- Construct from dictionary and whether to construct names always
searchableSurfaces(const IOobject&, const dictionary&); // as surfaceName "_" regionName (singleRegionName false) or
// for single region surfaces as surfaceName only (singleRegionName
// true)
searchableSurfaces
(
const IOobject&,
const dictionary&,
const bool singleRegionName
);
// Member Functions // Member Functions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -223,7 +223,7 @@ Foam::Ostream& Foam::OBJstream::write(const point& pt, const vector& n)
} }
Foam::Ostream& Foam::OBJstream::write(const edge& e, const pointField& points) Foam::Ostream& Foam::OBJstream::write(const edge& e, const UList<point>& points)
{ {
write(points[e[0]]); write(points[e[0]]);
write(points[e[1]]); write(points[e[1]]);
@ -290,7 +290,7 @@ Foam::Ostream& Foam::OBJstream::write
Foam::Ostream& Foam::OBJstream::write Foam::Ostream& Foam::OBJstream::write
( (
const face& f, const face& f,
const pointField& points, const UList<point>& points,
const bool lines const bool lines
) )
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -130,7 +130,7 @@ public:
Ostream& write(const point&, const vector&); Ostream& write(const point&, const vector&);
//- Write edge as points with line //- Write edge as points with line
Ostream& write(const edge&, const pointField&); Ostream& write(const edge&, const UList<point>&);
//- Write line //- Write line
Ostream& write(const linePointRef&); Ostream& write(const linePointRef&);
@ -150,7 +150,7 @@ public:
Ostream& write Ostream& write
( (
const face&, const face&,
const pointField&, const UList<point>&,
const bool lines = true const bool lines = true
); );

View File

@ -8,7 +8,6 @@ runApplication surfaceFeatureExtract
runApplication blockMesh runApplication blockMesh
runApplication snappyHexMesh -overwrite runApplication snappyHexMesh -overwrite
sed -i 's/_solid//g' constant/polyMesh/boundary
if [ -d 0 ] ; then if [ -d 0 ] ; then
rm -rf 0 rm -rf 0

View File

@ -268,7 +268,6 @@ meshQualityControls
} }
} }
debug 0;
mergeTolerance 1e-6; mergeTolerance 1e-6;
// ************************************************************************* // // ************************************************************************* //

View File

@ -363,14 +363,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6; mergeTolerance 1e-6;

View File

@ -352,14 +352,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6; mergeTolerance 1e-6;

View File

@ -312,14 +312,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6; mergeTolerance 1e-6;

View File

@ -315,14 +315,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6; mergeTolerance 1E-6;

View File

@ -386,14 +386,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6; mergeTolerance 1e-6;

View File

@ -294,14 +294,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6; mergeTolerance 1e-6;

View File

@ -303,14 +303,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6; mergeTolerance 1E-6;

View File

@ -370,14 +370,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6; mergeTolerance 1E-6;

View File

@ -557,13 +557,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6; mergeTolerance 1e-6;

View File

@ -335,14 +335,6 @@ meshQualityControls
// Advanced // Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6; mergeTolerance 1e-6;