diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C index 00aa92630fcafe1d853c3208508484f7f10c9427..d78011c9db4ce3fbb157feffd44999abe19cdace 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C @@ -26,6 +26,10 @@ License #include "DelaunayMesh.H" #include "labelPair.H" #include "PrintTable.H" +#include "pointIOField.H" +#include "scalarIOField.H" +#include "labelIOField.H" +#include "pointConversion.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -36,14 +40,121 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Triangulation> -Foam::DelaunayMesh<Triangulation>::DelaunayMesh() +Foam::DelaunayMesh<Triangulation>::DelaunayMesh(const Time& runTime) : Triangulation(), vertexCount_(0), - cellCount_(0) + cellCount_(0), + runTime_(runTime) {} +template<class Triangulation> +Foam::DelaunayMesh<Triangulation>::DelaunayMesh +( + const Time& runTime, + const word& meshName +) +: + Triangulation(), + vertexCount_(0), + cellCount_(0), + runTime_(runTime) +{ + pointIOField pts + ( + IOobject + ( + "points", + runTime.timeName(), + meshName/polyMesh::meshSubDir, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField types + ( + IOobject + ( + "types", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField indices + ( + IOobject + ( + "indices", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField processorIndices + ( + IOobject + ( + "processorIndices", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + if (pts.headerOk()) + { + forAll(pts, ptI) + { + Vertex_handle vh = this->insert(toPoint<Point>(pts[ptI])); + + if (indices.headerOk()) + { + vh->index() = indices[ptI]; + vertexCount()++; + } + else + { + vh->index() = getNewVertexIndex(); + } + + if (processorIndices.headerOk()) + { + vh->procIndex() = processorIndices[ptI]; + } + else + { + vh->procIndex() = Pstream::myProcNo(); + } + + if (types.headerOk()) + { + vh->type() = + static_cast<Foam::indexedVertexEnum::vertexType> + ( + types[ptI] + ); + } + else + { + vh->type() = Vb::vtUnassigned; + } + } + } +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class Triangulation> diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H index 383ee64baeeef0862b92aa70faa8fd1a5c9d65e9..1fbf19c1d6957cdc69fabcf678fd13071faac0f8 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H @@ -43,6 +43,7 @@ SourceFiles #include "boundBox.H" #include "indexedVertex.H" #include "CGALTriangulation3Ddefs.H" +#include "Time.H" #include "autoPtr.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,6 +83,12 @@ public: FixedList<label, 2>::Hash<> > labelPairHashSet; + typedef HashTable + < + label, + labelPair, + FixedList<label, 2>::Hash<> + > labelTolabelPairHashTable; private: @@ -95,6 +102,9 @@ private: // This allows a unique index to be assigned to each cell. mutable label cellCount_; + //- Reference to Time + const Time& runTime_; + //- Spatial sort traits to use with a pair of point pointers and an int. // Taken from a post on the CGAL lists: 2010-01/msg00004.html by // Sebastien Loriot (Geometry Factory). @@ -159,7 +169,13 @@ public: // Constructors //- Construct from components - DelaunayMesh(); + explicit DelaunayMesh(const Time& runTime); + + DelaunayMesh + ( + const Time& runTime, + const word& meshName + ); //- Destructor @@ -168,6 +184,14 @@ public: // Member Functions + inline const Time& time() const; + + inline void timeCheck + ( + const string& description, + const bool check = true + ) const; + inline label getNewVertexIndex() const; inline label getNewCellIndex() const; @@ -177,6 +201,7 @@ public: inline void resetCellCount(); inline label vertexCount() const; + inline label& vertexCount(); inline void resetVertexCount(); @@ -209,12 +234,12 @@ public: //- Create an fvMesh from the triangulation. // The mesh is not parallel consistent - only used for viewing - autoPtr<fvMesh> createMesh + autoPtr<polyMesh> createMesh ( const fileName& name, - const Time& runTime, - labelList& vertexMap, - labelList& cellMap + labelTolabelPairHashTable& vertexMap, + labelList& cellMap, + const bool writeDelaunayData = true ) const; }; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H index 733f1230f7202e774321b5c9e325aa4f45a74857..bf2277e356da608452c1b3c47cf8db1d90bc2a08 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H @@ -36,6 +36,40 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class Triangulation> +inline const Foam::Time& Foam::DelaunayMesh<Triangulation>::time() const +{ + return runTime_; +} + + +template<class Triangulation> +void Foam::DelaunayMesh<Triangulation>::timeCheck +( + const string& description, + const bool check +) const +{ + if (check) + { + Info<< nl << "--- [ cpuTime " + << time().elapsedCpuTime() << " s, " + << "delta " << time().cpuTimeIncrement()<< " s"; + + if (description != word::null) + { + Info<< ", " << description << " "; + } + else + { + Info<< " "; + } + + Info<< "] --- " << endl; + } +} + + template<class Triangulation> inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const { @@ -90,6 +124,12 @@ Foam::label Foam::DelaunayMesh<Triangulation>::vertexCount() const return vertexCount_; } +template<class Triangulation> +Foam::label& Foam::DelaunayMesh<Triangulation>::vertexCount() +{ + return vertexCount_; +} + template<class Triangulation> void Foam::DelaunayMesh<Triangulation>::resetVertexCount() diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C index bed42012cf7981ca2db868cadecf1ea86f35563e..1a341348b1a1d948a31a195672f888d515e871d9 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C @@ -28,6 +28,7 @@ License #include "pointConversion.H" #include "wallPolyPatch.H" #include "processorPolyPatch.H" +#include "labelIOField.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -331,13 +332,13 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const template<class Triangulation> -Foam::autoPtr<Foam::fvMesh> +Foam::autoPtr<Foam::polyMesh> Foam::DelaunayMesh<Triangulation>::createMesh ( const fileName& name, - const Time& runTime, - labelList& vertexMap, - labelList& cellMap + labelTolabelPairHashTable& vertexMap, + labelList& cellMap, + const bool writeDelaunayData ) const { pointField points(Triangulation::number_of_vertices()); @@ -354,12 +355,54 @@ Foam::DelaunayMesh<Triangulation>::createMesh List<DynamicList<face> > patchFaces(1, DynamicList<face>()); List<DynamicList<label> > patchOwners(1, DynamicList<label>()); - vertexMap.setSize(vertexCount(), -1); + vertexMap.resize(vertexCount()); cellMap.setSize(Triangulation::number_of_finite_cells(), -1); // Calculate pts and a map of point index to location in pts. label vertI = 0; + labelIOField indices + ( + IOobject + ( + "indices", + time().timeName(), + name, + time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Triangulation::number_of_vertices() + ); + + labelIOField types + ( + IOobject + ( + "types", + time().timeName(), + name, + time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Triangulation::number_of_vertices() + ); + + labelIOField processorIndices + ( + IOobject + ( + "processorIndices", + time().timeName(), + name, + time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Triangulation::number_of_vertices() + ); + for ( Finite_vertices_iterator vit = Triangulation::finite_vertices_begin(); @@ -369,13 +412,20 @@ Foam::DelaunayMesh<Triangulation>::createMesh { if (!vit->farPoint()) { - vertexMap[vit->index()] = vertI; + vertexMap(labelPair(vit->index(), vit->procIndex())) = vertI; points[vertI] = topoint(vit->point()); + indices[vertI] = vit->index(); + types[vertI] = static_cast<label>(vit->type()); + processorIndices[vertI] = vit->procIndex(); vertI++; } } points.setSize(vertI); + indices.setSize(vertI); + types.setSize(vertI); + processorIndices.setSize(vertI); + // Index the cells label cellI = 0; @@ -391,6 +441,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh ( !cit->hasFarPoint() && !Triangulation::is_infinite(cit) + && cit->real() ) { cellMap[cit->cellIndex()] = cellI++; @@ -424,7 +475,12 @@ Foam::DelaunayMesh<Triangulation>::createMesh label c1I = Cb::ctFar; bool c1Real = false; - if (!c1->hasFarPoint() && !Triangulation::is_infinite(c1)) + if + ( + !c1->hasFarPoint() + && !Triangulation::is_infinite(c1) + && c1->real() + ) { c1I = cellMap[c1->cellIndex()]; c1Real = true; @@ -432,7 +488,12 @@ Foam::DelaunayMesh<Triangulation>::createMesh label c2I = Cb::ctFar; bool c2Real = false; - if (!c2->hasFarPoint() && !Triangulation::is_infinite(c2)) + if + ( + !c2->hasFarPoint() + && !Triangulation::is_infinite(c2) + && c2->real() + ) { c2I = cellMap[c2->cellIndex()]; c2Real = true; @@ -451,10 +512,17 @@ Foam::DelaunayMesh<Triangulation>::createMesh { verticesOnTriFace[i] = vertexMap [ - c1->vertex + labelPair ( - Triangulation::vertex_triple_index(oppositeVertex, i) - )->index() + c1->vertex + ( + Triangulation::vertex_triple_index(oppositeVertex, i) + )->index(), + c1->vertex + ( + Triangulation::vertex_triple_index(oppositeVertex, i) + )->procIndex() + ) ]; } @@ -524,15 +592,15 @@ Foam::DelaunayMesh<Triangulation>::createMesh Info<< "Creating mesh" << endl; - autoPtr<fvMesh> meshPtr + autoPtr<polyMesh> meshPtr ( - new fvMesh + new polyMesh ( IOobject ( name, - runTime.timeName(), - runTime, + time().timeName(), + time(), IOobject::NO_READ, IOobject::NO_WRITE ), @@ -565,7 +633,14 @@ Foam::DelaunayMesh<Triangulation>::createMesh patches.setSize(nValidPatches); - meshPtr().addFvPatches(patches); + meshPtr().addPatches(patches); + + if (writeDelaunayData) + { + indices.write(); + types.write(); + processorIndices.write(); + } Info<< "Mesh created" << endl; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index 7b316e5c44f34f64867b09f3662e2473bee92999..4f7a07fab92de412ec0b49d0534e93dbf6a9c2f4 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -126,9 +126,24 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Triangulation> -Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh() +Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh +( + const Time& runTime +) +: + DelaunayMesh<Triangulation>(runTime), + allBackgroundMeshBounds_() +{} + + +template<class Triangulation> +Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh +( + const Time& runTime, + const word& meshName +) : - DelaunayMesh<Triangulation>(), + DelaunayMesh<Triangulation>(runTime, meshName), allBackgroundMeshBounds_() {} diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H index 1eaa483c74ba9965c84368d1797b97b6c6e11b7c..c2acbf8a089476fc8e85c4034e52d965843bcbd2 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H @@ -135,13 +135,25 @@ public: // Constructors //- Construct from components - DistributedDelaunayMesh(); + explicit DistributedDelaunayMesh(const Time& runTime); + + DistributedDelaunayMesh + ( + const Time& runTime, + const word& meshName + ); //- Destructor ~DistributedDelaunayMesh(); + // Queries + + //- Use DelaunayMesh timeCheck function + using DelaunayMesh<Triangulation>::timeCheck; + + // Member Functions //- Build a mapDistribute for the supplied destination processor data diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index a9770b50dac866981519df8a64ed91af4d6622d0..e14100cd0039c9d51059788051eadf6c0c7acda6 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -791,10 +791,11 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition ( IOobject ( - fvMesh::defaultRegion, + "backgroundMeshDecomposition", runTime_.timeName(), runTime_, - IOobject::MUST_READ + IOobject::MUST_READ, + IOobject::AUTO_WRITE ) ), meshCutter_ diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C index 42e8a161f911eebc9c26f1104d977357b45e4463..52d14633b4312341aa6acc2bf8c12cc5c074a0cd 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C @@ -27,7 +27,7 @@ License #include "cellSizeAndAlignmentControls.H" #include "pointIOField.H" #include "scalarIOField.H" -#include "tensorIOField.H" +#include "triadIOField.H" #include "tetrahedron.H" #include "plane.H" #include "transform.H" @@ -38,6 +38,8 @@ License namespace Foam { defineTypeNameAndDebug(cellShapeControlMesh, 0); + +word cellShapeControlMesh::meshSubDir = "cellShapeControlMesh"; } @@ -366,9 +368,89 @@ void Foam::cellShapeControlMesh::writeTriangulation() Foam::cellShapeControlMesh::cellShapeControlMesh(const Time& runTime) : + DistributedDelaunayMesh<CellSizeDelaunay> + ( + runTime, + meshSubDir + ), runTime_(runTime), defaultCellSize_(0.0) -{} +{ + if (this->vertexCount()) + { + fvMesh mesh + ( + IOobject + ( + meshSubDir, + runTime.timeName(), + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + if (mesh.nPoints() == this->vertexCount()) + { + pointScalarField sizes + ( + IOobject + ( + "sizes", + runTime.timeName(), + meshSubDir, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + pointMesh::New(mesh) + ); + + triadIOField alignments + ( + IOobject + ( + "alignments", + mesh.time().timeName(), + meshSubDir, + mesh.time(), + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ) + ); + + if + ( + sizes.size() == this->vertexCount() + && alignments.size() == this->vertexCount() + ) + { + label count = 0; + for + ( + Finite_vertices_iterator vit = finite_vertices_begin(); + vit != finite_vertices_end(); + ++vit + ) + { + vit->targetCellSize() = sizes[count]; + vit->alignment() = alignments[count]; + count++; + } + } + else + { + FatalErrorIn + ( + "Foam::cellShapeControlMesh::cellShapeControlMesh" + "(const Time&)" + ) << "Cell size point field is not the same size as the " + << "mesh." + << abort(FatalError); + } + } + } +} //Foam::triangulatedMesh::triangulatedMesh @@ -744,9 +826,7 @@ void Foam::cellShapeControlMesh::insertBoundingPoints void Foam::cellShapeControlMesh::write() const { - Info<< "Writing cell size and alignment mesh" << endl; - - const fileName name("cellSizeAndAlignmentMesh"); + Info<< "Writing " << meshSubDir << endl; // Reindex the cells label cellCount = 0; @@ -763,17 +843,16 @@ void Foam::cellShapeControlMesh::write() const } } - labelList vertexMap; + DelaunayMesh<CellSizeDelaunay>::labelTolabelPairHashTable vertexMap; labelList cellMap; - autoPtr<fvMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh + autoPtr<polyMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh ( - name, - runTime_, + meshSubDir, vertexMap, cellMap ); - const fvMesh& mesh = meshPtr(); + const polyMesh& mesh = meshPtr(); pointScalarField sizes ( @@ -781,7 +860,8 @@ void Foam::cellShapeControlMesh::write() const ( "sizes", mesh.time().timeName(), - mesh, + meshSubDir, + mesh.time(), IOobject::NO_READ, IOobject::AUTO_WRITE ), @@ -789,7 +869,22 @@ void Foam::cellShapeControlMesh::write() const scalar(0) ); - OFstream str(runTime_.path()/"alignments.obj"); + triadIOField alignments + ( + IOobject + ( + "alignments", + mesh.time().timeName(), + meshSubDir, + mesh.time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sizes.size() + ); + + // Write alignments +// OFstream str(runTime_.path()/"alignments.obj"); for ( @@ -801,35 +896,41 @@ void Foam::cellShapeControlMesh::write() const if (!vit->farPoint()) { // Populate sizes - sizes[vertexMap[vit->index()]] = vit->targetCellSize(); - - // Write alignments - const tensor& alignment = vit->alignment(); - pointFromPoint pt = topoint(vit->point()); - - if - ( - alignment.x() == triad::unset[0] - || alignment.y() == triad::unset[0] - || alignment.z() == triad::unset[0] - ) - { - Info<< "Bad alignment = " << vit->info(); + sizes[vertexMap[labelPair(vit->index(), vit->procIndex())]] = + vit->targetCellSize(); - vit->alignment() = tensor::I; + alignments[vertexMap[labelPair(vit->index(), vit->procIndex())]] = + vit->alignment(); - Info<< "New alignment = " << vit->info(); - - continue; - } - - meshTools::writeOBJ(str, pt, alignment.x() + pt); - meshTools::writeOBJ(str, pt, alignment.y() + pt); - meshTools::writeOBJ(str, pt, alignment.z() + pt); +// // Write alignments +// const tensor& alignment = vit->alignment(); +// pointFromPoint pt = topoint(vit->point()); +// +// if +// ( +// alignment.x() == triad::unset[0] +// || alignment.y() == triad::unset[0] +// || alignment.z() == triad::unset[0] +// ) +// { +// Info<< "Bad alignment = " << vit->info(); +// +// vit->alignment() = tensor::I; +// +// Info<< "New alignment = " << vit->info(); +// +// continue; +// } +// +// meshTools::writeOBJ(str, pt, alignment.x() + pt); +// meshTools::writeOBJ(str, pt, alignment.y() + pt); +// meshTools::writeOBJ(str, pt, alignment.z() + pt); } } mesh.write(); + sizes.write(); + alignments.write(); } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H index effb7ee4482289d239b9ee40d409af6f5316522d..e6af5bde0f6520065df2c8b264cb1aa3461e71a1 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H @@ -95,6 +95,9 @@ public: //- Runtime type information ClassName("cellShapeControlMesh"); + //- Return the mesh sub-directory name (usually "cellShapeControlMesh") + static word meshSubDir; + // Constructors diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C index 8d4cac11ba2ec90cf08bb519de5f11aa359fb725..5a4b0c785a8b4821f40d45063975ee8ce605f324 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C @@ -223,6 +223,13 @@ void Foam::controlMeshRefinement::initialMeshPopulation const autoPtr<backgroundMeshDecomposition>& decomposition ) { + if (shapeController_.shapeControlMesh().vertexCount() > 0) + { + // Mesh already populated. + Info<< "Cell size and alignment mesh already populated." << endl; + return; + } + autoPtr<boundBox> overallBoundBox; // Need to pass in the background mesh decomposition so that can test if @@ -268,7 +275,7 @@ void Foam::controlMeshRefinement::initialMeshPopulation controlFunction.initialVertices(pts, sizes, alignments); - Info<< " Got initial vertices list" << endl; + Info<< " Got initial vertices list of size " << pts.size() << endl; List<Vb> vertices(pts.size()); diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 577d81cdcb21e21359d834788a54a4216527d903..0c983bfdd8c30eb9acdd8568ccabaa8321589e40 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -981,7 +981,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh const dictionary& foamyHexMeshDict ) : - DistributedDelaunayMesh<Delaunay>(), + DistributedDelaunayMesh<Delaunay>(runTime), runTime_(runTime), rndGen_(64293*Pstream::myProcNo()), foamyHexMeshControls_(foamyHexMeshDict), @@ -1135,8 +1135,6 @@ void Foam::conformalVoronoiMesh::initialiseForMotion() Foam::indexedVertexEnum::vtExternalFeaturePoint ); } - - //writeFixedPoints("fixedPointsStart.obj"); } @@ -1814,32 +1812,6 @@ void Foam::conformalVoronoiMesh::move() if (time().outputTime()) { writeMesh(time().timeName()); - -// label cellI = 0; -// for -// ( -// Finite_cells_iterator cit = finite_cells_begin(); -// cit != finite_cells_end(); -// ++cit -// ) -// { -// if -// ( -// !cit->hasFarPoint() -// && !is_infinite(cit) -// ) -// { -// cit->cellIndex() = cellI++; -// } -// } -// -// labelList vertexMap; -// labelList cellMap; -// autoPtr<fvMesh> tetMesh = -// createMesh("tetMesh", runTime_, vertexMap, cellMap); -// -// tetMesh().write(); - //writeFixedPoints("fixedPointsStart_" + runTime_.timeName() + ".obj"); } updateSizesAndAlignments(pointsToInsert); diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 07d93d9f879c59992c2137f3b85381d9670b7f95..b5810855dfb1e6a652f607d522c5e4baadc70d60 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -2808,7 +2808,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches patchPointPairSlaves[patchI].transfer(patchPPSlaves[patchI]); } -// if (foamyHexMeshControls().objOutput()) + if (foamyHexMeshControls().objOutput()) { Info<< "Writing processor interfaces" << endl; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H index a669871e04eaa41ec81eb3cd59e04c228ef11452..a912515fb311b84588d33f190f6e51ca5b510dc5 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H @@ -337,11 +337,10 @@ inline void Foam::conformalVoronoiMesh::createPointPair const Foam::point internalPt = surfPt - ppDistn; const Foam::point externalPt = surfPt + ppDistn; - if - ( - geometryToConformTo_.inside(internalPt) - && geometryToConformTo_.outside(externalPt) - ) + bool internalInside = geometryToConformTo_.inside(internalPt); + bool externalOutside = geometryToConformTo_.outside(externalPt); + + if (internalInside && externalOutside) { pts.append ( @@ -369,11 +368,8 @@ inline void Foam::conformalVoronoiMesh::createPointPair { Info<< "Warning: point pair not inside/outside" << nl << " surfPt = " << surfPt << nl - << " internal = " - << internalPt << " " << geometryToConformTo_.inside(internalPt) - << nl - << " external = " - << externalPt << " " << geometryToConformTo_.outside(externalPt) + << " internal = " << internalPt << " " << internalInside << nl + << " external = " << externalPt << " " << externalOutside << endl; } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index d60cae8c2207d17f348fdbb8267ef03124e65d9a..3cef2304d6792e64a97b0746183391d5b06cdbb5 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -421,202 +421,247 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) } } - if (foamyHexMeshControls().writeTetDualMesh()) + if (foamyHexMeshControls().writeCellShapeControlMesh()) { - // Determine map from Delaunay vertex to Dual mesh - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - // From all Delaunay vertices to cell (positive index) - // or patch face (negative index) - labelList vertexToDualAddressing(number_of_vertices(), 0); - - forAll(cellToDelaunayVertex, cellI) - { - label vertI = cellToDelaunayVertex[cellI]; - - if (vertexToDualAddressing[vertI] != 0) - { - FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") - << "Delaunay vertex " << vertI - << " from cell " << cellI - << " is already mapped to " - << vertexToDualAddressing[vertI] - << exit(FatalError); - } - vertexToDualAddressing[vertI] = cellI+1; - } - - forAll(patchToDelaunayVertex, patchI) - { - const labelList& patchVertices = patchToDelaunayVertex[patchI]; - - forAll(patchVertices, i) - { - label vertI = patchVertices[i]; - - if (vertexToDualAddressing[vertI] > 0) - { - FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") - << "Delaunay vertex " << vertI - << " from patch " << patchI - << " local index " << i - << " is already mapped to cell " - << vertexToDualAddressing[vertI]-1 - << exit(FatalError); - } - - // Vertex might be used by multiple faces. Which one to - // use? For now last one wins. - label dualFaceI = dualPatchStarts[patchI]+i; - vertexToDualAddressing[vertI] = -dualFaceI-1; - } - } - - - // Calculate tet mesh addressing - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cellShapeControls().shapeControlMesh().write(); + } - pointField points; - labelList boundaryPts(number_of_finite_cells(), -1); - // From tet point back to Delaunay vertex index - labelList pointToDelaunayVertex; - faceList faces; - labelList owner; - labelList neighbour; - wordList patchTypes; - wordList patchNames; - PtrList<dictionary> patchDicts; - pointField cellCentres; + if (foamyHexMeshControls().writeBackgroundMeshDecomposition()) + { + Info<< nl << "Writing " << "backgroundMeshDecomposition" << endl; - calcTetMesh + // Have to explicitly update the mesh instance. + const_cast<fvMesh&>(decomposition_().mesh()).setInstance ( - points, - pointToDelaunayVertex, - faces, - owner, - neighbour, - patchTypes, - patchNames, - patchDicts + time().timeName() ); + decomposition_().mesh().write(); + } - - // Calculate map from tet points to dual mesh cells/patch faces - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - labelIOList pointDualAddressing + if (foamyHexMeshControls().writeTetDualMesh()) + { + label cellI = 0; + for ( - IOobject - ( - "pointDualAddressing", - instance, - "tetDualMesh"/polyMesh::meshSubDir, - runTime_, - IOobject::NO_READ, - IOobject::AUTO_WRITE, - false - ), - UIndirectList<label> - ( - vertexToDualAddressing, - pointToDelaunayVertex - )() - ); - - label pointI = findIndex(pointDualAddressing, -1); - if (pointI != -1) - { - WarningIn - ( - "conformalVoronoiMesh::writeMesh\n" - "(\n" - " const fileName& instance,\n" - " bool filterFaces\n" - ")\n" - ) << "Delaunay vertex " << pointI - << " does not have a corresponding dual cell." << endl; - } - - Info<< "Writing map from tetDualMesh points to Voronoi mesh to " - << pointDualAddressing.objectPath() << endl; - pointDualAddressing.write(); - - - - // Write tet points corresponding to the Voronoi cell/face centre - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Finite_cells_iterator cit = finite_cells_begin(); + cit != finite_cells_end(); + ++cit + ) { - // Read Voronoi mesh - fvMesh mesh - ( - IOobject - ( - Foam::polyMesh::defaultRegion, - instance, - runTime_, - IOobject::MUST_READ - ) - ); - pointIOField dualPoints + if ( - IOobject - ( - "dualPoints", - instance, - "tetDualMesh"/polyMesh::meshSubDir, - runTime_, - IOobject::NO_READ, - IOobject::AUTO_WRITE, - false - ), - points - ); - - forAll(pointDualAddressing, pointI) + !cit->hasFarPoint() + && !is_infinite(cit) + ) { - label index = pointDualAddressing[pointI]; - - if (index > 0) - { - label cellI = index-1; - dualPoints[pointI] = mesh.cellCentres()[cellI]; - } - else if (index < 0) - { - label faceI = -index-1; - if (faceI >= mesh.nInternalFaces()) - { - dualPoints[pointI] = mesh.faceCentres()[faceI]; - } - } + cit->cellIndex() = cellI++; } - - Info<< "Writing new tetDualMesh points mapped onto Voronoi mesh to " - << dualPoints.objectPath() << endl - << "Replace the polyMesh/points with these." << endl; - dualPoints.write(); } + Info<< nl << "Writing " << "tetDualMesh" << endl; - Info<< nl << "Writing tetDualMesh to " << instance << endl; + DistributedDelaunayMesh<Delaunay>::labelTolabelPairHashTable vertexMap; + labelList cellMap; + autoPtr<polyMesh> tetMesh = + createMesh("tetDualMesh", vertexMap, cellMap); - PackedBoolList boundaryFacesToRemove; - writeMesh - ( - "tetDualMesh", - instance, - points, - boundaryPts, - faces, - owner, - neighbour, - patchTypes, - patchNames, - patchDicts, - cellCentres, - boundaryFacesToRemove - ); + tetMesh().write(); + +// // Determine map from Delaunay vertex to Dual mesh +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// // From all Delaunay vertices to cell (positive index) +// // or patch face (negative index) +// labelList vertexToDualAddressing(number_of_vertices(), 0); +// +// forAll(cellToDelaunayVertex, cellI) +// { +// label vertI = cellToDelaunayVertex[cellI]; +// +// if (vertexToDualAddressing[vertI] != 0) +// { +// FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") +// << "Delaunay vertex " << vertI +// << " from cell " << cellI +// << " is already mapped to " +// << vertexToDualAddressing[vertI] +// << exit(FatalError); +// } +// vertexToDualAddressing[vertI] = cellI+1; +// } +// +// forAll(patchToDelaunayVertex, patchI) +// { +// const labelList& patchVertices = patchToDelaunayVertex[patchI]; +// +// forAll(patchVertices, i) +// { +// label vertI = patchVertices[i]; +// +// if (vertexToDualAddressing[vertI] > 0) +// { +// FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") +// << "Delaunay vertex " << vertI +// << " from patch " << patchI +// << " local index " << i +// << " is already mapped to cell " +// << vertexToDualAddressing[vertI]-1 +// << exit(FatalError); +// } +// +// // Vertex might be used by multiple faces. Which one to +// // use? For now last one wins. +// label dualFaceI = dualPatchStarts[patchI]+i; +// vertexToDualAddressing[vertI] = -dualFaceI-1; +// } +// } +// +// +// // Calculate tet mesh addressing +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// pointField points; +// labelList boundaryPts(number_of_finite_cells(), -1); +// // From tet point back to Delaunay vertex index +// labelList pointToDelaunayVertex; +// faceList faces; +// labelList owner; +// labelList neighbour; +// wordList patchTypes; +// wordList patchNames; +// PtrList<dictionary> patchDicts; +// pointField cellCentres; +// +// calcTetMesh +// ( +// points, +// pointToDelaunayVertex, +// faces, +// owner, +// neighbour, +// patchTypes, +// patchNames, +// patchDicts +// ); +// +// +// +// // Calculate map from tet points to dual mesh cells/patch faces +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// labelIOList pointDualAddressing +// ( +// IOobject +// ( +// "pointDualAddressing", +// instance, +// "tetDualMesh"/polyMesh::meshSubDir, +// runTime_, +// IOobject::NO_READ, +// IOobject::AUTO_WRITE, +// false +// ), +// UIndirectList<label> +// ( +// vertexToDualAddressing, +// pointToDelaunayVertex +// )() +// ); +// +// label pointI = findIndex(pointDualAddressing, -1); +// if (pointI != -1) +// { +// WarningIn +// ( +// "conformalVoronoiMesh::writeMesh\n" +// "(\n" +// " const fileName& instance,\n" +// " bool filterFaces\n" +// ")\n" +// ) << "Delaunay vertex " << pointI +// << " does not have a corresponding dual cell." << endl; +// } +// +// Info<< "Writing map from tetDualMesh points to Voronoi mesh to " +// << pointDualAddressing.objectPath() << endl; +// pointDualAddressing.write(); +// +// +// +// // Write tet points corresponding to the Voronoi cell/face centre +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// { +// // Read Voronoi mesh +// fvMesh mesh +// ( +// IOobject +// ( +// Foam::polyMesh::defaultRegion, +// instance, +// runTime_, +// IOobject::MUST_READ +// ) +// ); +// pointIOField dualPoints +// ( +// IOobject +// ( +// "dualPoints", +// instance, +// "tetDualMesh"/polyMesh::meshSubDir, +// runTime_, +// IOobject::NO_READ, +// IOobject::AUTO_WRITE, +// false +// ), +// points +// ); +// +// forAll(pointDualAddressing, pointI) +// { +// label index = pointDualAddressing[pointI]; +// +// if (index > 0) +// { +// label cellI = index-1; +// dualPoints[pointI] = mesh.cellCentres()[cellI]; +// } +// else if (index < 0) +// { +// label faceI = -index-1; +// if (faceI >= mesh.nInternalFaces()) +// { +// dualPoints[pointI] = mesh.faceCentres()[faceI]; +// } +// } +// } +// +// Info<< "Writing tetDualMesh points mapped onto Voronoi mesh to " +// << dualPoints.objectPath() << endl +// << "Replace the polyMesh/points with these." << endl; +// dualPoints.write(); +// } +// +// +// Info<< nl << "Writing tetDualMesh to " << instance << endl; +// +// PackedBoolList boundaryFacesToRemove; +// writeMesh +// ( +// "tetDualMesh", +// instance, +// points, +// boundaryPts, +// faces, +// owner, +// neighbour, +// patchTypes, +// patchNames, +// patchDicts, +// cellCentres, +// boundaryFacesToRemove +// ); } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C index 48cd76c23df3ae37f42cb69426d9542b942da966..04eb4f36634d6680bd933cc2f9f69b73d3645fc5 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C @@ -247,6 +247,20 @@ Foam::cvControls::cvControls } writeTetDualMesh_ = Switch(filteringDict.lookup("writeTetDualMesh")); + + writeCellShapeControlMesh_ = + Switch(filteringDict.lookup("writeCellShapeControlMesh")); + + if (Pstream::parRun()) + { + writeBackgroundMeshDecomposition_ = + Switch(filteringDict.lookup("writeBackgroundMeshDecomposition")); + } + else + { + writeBackgroundMeshDecomposition_ = Switch(false); + } + } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H index 6c1c83e05ba1d3ed9fd47d19a8671fa367e9b7df..1f1fe356cda55357114c046bdc60d43cf7654aeb 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H @@ -202,6 +202,10 @@ class cvControls //- Write tet mesh at output time (it always writes the Voronoi) Switch writeTetDualMesh_; + Switch writeCellShapeControlMesh_; + + Switch writeBackgroundMeshDecomposition_; + // Private Member Functions @@ -335,6 +339,12 @@ public: //- Write tetMesh at output time inline Switch writeTetDualMesh() const; + + //- Write cellShapeControlMesh at output time + inline Switch writeCellShapeControlMesh() const; + + //- Write backgroundMeshDecomposition at output time + inline Switch writeBackgroundMeshDecomposition() const; }; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H index ae05b421e207a4a6af8b08adb007e118397bb469..f4408f204e9d9fb7997313b604d8a4026aeecff1 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H @@ -215,5 +215,15 @@ inline Foam::Switch Foam::cvControls::writeTetDualMesh() const return writeTetDualMesh_; } +inline Foam::Switch Foam::cvControls::writeCellShapeControlMesh() const +{ + return writeCellShapeControlMesh_; +} + +inline Foam::Switch Foam::cvControls::writeBackgroundMeshDecomposition() const +{ + return writeBackgroundMeshDecomposition_; +} + // ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 6fb8e69b9694d21261a44b8513f033386f6cbc7e..21ba1cdfa1c7bbb13dc7d3cdc05710323cb8afd6 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -55,6 +55,9 @@ Usage \param -fields \n Use existing geometry decomposition and convert fields only. + \param -sets \n + Decompose cellSets, faceSets, pointSets. + \param -force \n Remove any existing \a processor subdirectories before decomposing the geometry. @@ -127,6 +130,11 @@ int main(int argc, char *argv[]) "use existing geometry decomposition and convert fields only" ); argList::addBoolOption + ( + "sets", + "decompose cellSets, faceSets, pointSets" + ); + argList::addBoolOption ( "force", "remove existing processor*/ subdirs before decomposing the geometry" @@ -146,6 +154,7 @@ int main(int argc, char *argv[]) bool writeCellDist = args.optionFound("cellDist"); bool copyUniform = args.optionFound("copyUniform"); bool decomposeFieldsOnly = args.optionFound("fields"); + bool decomposeSets = args.optionFound("sets"); bool forceOverwrite = args.optionFound("force"); bool ifRequiredDecomposition = args.optionFound("ifRequired"); @@ -312,7 +321,7 @@ int main(int argc, char *argv[]) { mesh.decomposeMesh(); - mesh.writeDecomposition(); + mesh.writeDecomposition(decomposeSets); if (writeCellDist) { diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 15cbd85d11eae6b7bc74b968312f7bdffab3d333..4eda411482090d25f72fd88f4f2c209d0f6a5fb7 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -34,6 +34,10 @@ License #include "globalMeshData.H" #include "DynamicList.H" #include "fvFieldDecomposer.H" +#include "IOobjectList.H" +#include "cellSet.H" +#include "faceSet.H" +#include "pointSet.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -123,7 +127,7 @@ Foam::domainDecomposition::~domainDecomposition() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::domainDecomposition::writeDecomposition() +bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) { Info<< "\nConstructing processor meshes" << endl; @@ -160,6 +164,37 @@ bool Foam::domainDecomposition::writeDecomposition() } + PtrList<const cellSet> cellSets; + PtrList<const faceSet> faceSets; + PtrList<const pointSet> pointSets; + if (decomposeSets) + { + // Read sets + IOobjectList objects(*this, facesInstance(), "polyMesh/sets"); + { + IOobjectList cSets(objects.lookupClass(cellSet::typeName)); + forAllConstIter(IOobjectList, cSets, iter) + { + cellSets.append(new cellSet(*iter())); + } + } + { + IOobjectList fSets(objects.lookupClass(faceSet::typeName)); + forAllConstIter(IOobjectList, fSets, iter) + { + faceSets.append(new faceSet(*iter())); + } + } + { + IOobjectList pSets(objects.lookupClass(pointSet::typeName)); + forAllConstIter(IOobjectList, pSets, iter) + { + pointSets.append(new pointSet(*iter())); + } + } + } + + label maxProcCells = 0; label totProcFaces = 0; label maxProcPatches = 0; @@ -732,6 +767,52 @@ bool Foam::domainDecomposition::writeDecomposition() procMesh.write(); + + + if (decomposeSets) + { + forAll(cellSets, i) + { + const cellSet& cs = cellSets[i]; + cellSet set(procMesh, cs.name(), cs.size()/nProcs_); + forAll(curCellLabels, i) + { + if (cs.found(curCellLabels[i])) + { + set.insert(i); + } + } + set.write(); + } + forAll(faceSets, i) + { + const faceSet& cs = faceSets[i]; + faceSet set(procMesh, cs.name(), cs.size()/nProcs_); + forAll(curFaceLabels, i) + { + if (cs.found(mag(curFaceLabels[i])-1)) + { + set.insert(i); + } + } + set.write(); + } + forAll(pointSets, i) + { + const pointSet& cs = pointSets[i]; + pointSet set(procMesh, cs.name(), cs.size()/nProcs_); + forAll(curPointLabels, i) + { + if (cs.found(curPointLabels[i])) + { + set.insert(i); + } + } + set.write(); + } + } + + // Write points if pointsInstance differing from facesInstance if (facesInstancePointsPtr_.valid()) { diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H index e5fb53808605fc5db2fe797881726cb8289dfc38..9487aefef0322164300a47041eaf35b57ef53e6b 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -172,7 +172,7 @@ public: void decomposeMesh(); //- Write decomposition - bool writeDecomposition(); + bool writeDecomposition(const bool decomposeSets); //- Cell-processor decomposition labels const labelList& cellToProc() const diff --git a/applications/utilities/parallelProcessing/reconstructPar/Make/options b/applications/utilities/parallelProcessing/reconstructPar/Make/options index e63099c8f5ffef3deafb479939a78366019a7a13..ece7c8b030bee4fab556a964b9da1eec4c51a64d 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/Make/options +++ b/applications/utilities/parallelProcessing/reconstructPar/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index c4a15f97b673128ca0563250efb4b8bea1f81fcc..7c82ef91a2a572ec0264c670e6a106d80ca4b1dc 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -41,6 +41,10 @@ Description #include "pointFieldReconstructor.H" #include "reconstructLagrangian.H" +#include "cellSet.H" +#include "faceSet.H" +#include "pointSet.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // bool haveAllTimes @@ -99,6 +103,11 @@ int main(int argc, char *argv[]) "skip reconstructing lagrangian positions and fields" ); argList::addBoolOption + ( + "sets", + "reconstruct cellSets, faceSets, pointSets" + ); + argList::addBoolOption ( "newTimes", "only reconstruct new times (i.e. that do not exist already)" @@ -113,6 +122,9 @@ int main(int argc, char *argv[]) args.optionLookup("fields")() >> selectedFields; } + const bool reconstructSets = args.optionFound("sets"); + + const bool noLagrangian = args.optionFound("noLagrangian"); HashSet<word> selectedLagrangianFields; @@ -668,6 +680,148 @@ int main(int argc, char *argv[]) Info<< "No lagrangian fields" << nl << endl; } } + + + if (reconstructSets) + { + // Scan to find all sets + HashTable<label> cSetNames; + HashTable<label> fSetNames; + HashTable<label> pSetNames; + + forAll(procMeshes.meshes(), procI) + { + const fvMesh& procMesh = procMeshes.meshes()[procI]; + + IOobjectList objects + ( + procMesh, procMesh.facesInstance(), "polyMesh/sets" + ); + IOobjectList cSets(objects.lookupClass(cellSet::typeName)); + forAllConstIter(IOobjectList, cSets, iter) + { + cSetNames.insert(iter.key(), cSetNames.size()); + } + + IOobjectList fSets(objects.lookupClass(faceSet::typeName)); + forAllConstIter(IOobjectList, fSets, iter) + { + fSetNames.insert(iter.key(), fSetNames.size()); + } + IOobjectList pSets(objects.lookupClass(pointSet::typeName)); + forAllConstIter(IOobjectList, pSets, iter) + { + pSetNames.insert(iter.key(), pSetNames.size()); + } + } + + // Construct all sets + PtrList<cellSet> cellSets(cSetNames.size()); + PtrList<faceSet> faceSets(fSetNames.size()); + PtrList<pointSet> pointSets(pSetNames.size()); + + // Load sets + forAll(procMeshes.meshes(), procI) + { + const fvMesh& procMesh = procMeshes.meshes()[procI]; + + IOobjectList objects + ( + procMesh, procMesh.facesInstance(), "polyMesh/sets" + ); + + // cellSets + const labelList& cellMap = + procMeshes.cellProcAddressing()[procI]; + + IOobjectList cSets(objects.lookupClass(cellSet::typeName)); + forAllConstIter(IOobjectList, cSets, iter) + { + // Load cellSet + const cellSet procSet(*iter()); + label setI = cSetNames[iter.key()]; + if (!cellSets.set(setI)) + { + cellSets.set + ( + setI, + new cellSet(mesh, iter.key(), procSet.size()) + ); + } + cellSet& cSet = cellSets[setI]; + + forAllConstIter(cellSet, procSet, iter) + { + cSet.insert(cellMap[iter.key()]); + } + } + + // faceSets + const labelList& faceMap = + procMeshes.faceProcAddressing()[procI]; + + IOobjectList fSets(objects.lookupClass(faceSet::typeName)); + forAllConstIter(IOobjectList, fSets, iter) + { + // Load faceSet + const faceSet procSet(*iter()); + label setI = fSetNames[iter.key()]; + if (!faceSets.set(setI)) + { + faceSets.set + ( + setI, + new faceSet(mesh, iter.key(), procSet.size()) + ); + } + faceSet& fSet = faceSets[setI]; + + forAllConstIter(faceSet, procSet, iter) + { + fSet.insert(mag(faceMap[iter.key()])-1); + } + } + // pointSets + const labelList& pointMap = + procMeshes.pointProcAddressing()[procI]; + + IOobjectList pSets(objects.lookupClass(pointSet::typeName)); + forAllConstIter(IOobjectList, pSets, iter) + { + // Load pointSet + const pointSet propSet(*iter()); + label setI = pSetNames[iter.key()]; + if (!pointSets.set(setI)) + { + pointSets.set + ( + setI, + new pointSet(mesh, iter.key(), propSet.size()) + ); + } + pointSet& pSet = pointSets[setI]; + + forAllConstIter(pointSet, propSet, iter) + { + pSet.insert(pointMap[iter.key()]); + } + } + } + + // Write sets + forAll(cellSets, i) + { + cellSets[i].write(); + } + forAll(faceSets, i) + { + faceSets[i].write(); + } + forAll(pointSets, i) + { + pointSets[i].write(); + } + } } } diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index 254f5e4380ff7273d682b41e311b20ada7787d86..34c6fc200431223d26407fbbefe37d22ff7f78f4 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -41,6 +41,8 @@ usage: ${0##*/} --archOption arch specify architecture option (only 32 or 64 applicable) --paraviewInstall dir specify ParaView_DIR (e.g. /opt/paraviewopenfoam3120) --paraviewVersion ver specify ParaView_VERSION (e.g. 3.12.0) + --scotchArchPath dir specify SCOTCH_ARCH_PATH (e.g. /opt/OpenFOAM-scotch-6.0.0/) + --scotchVersion ver specify SCOTCH_VERSION (e.g. 6.0.0) * hardcode paths to installation @@ -49,32 +51,6 @@ USAGE } -# Function to do replacement on file. Checks if any replacement has been done. -# inlineSed <file> <sedCommand> <description> -#_inlineSed() -#{ -# [ -f "$1" ] || { -# echo "Missing file: $1" -# exit 1 -# } -# -# backup="temp.$$" -# cp $1 $backup -# sed -i -e "$2" $1 -# -# if cmp $1 $backup > /dev/null 2>&1 -# then -# echo "Failed: $3 in $1" -# rm $backup 2>/dev/null -# exit 1 -# else -# echo "Okay: $3 in $1" -# rm $backup 2>/dev/null -# fi -# -# return 0 -#} - # Function to do replacement on file. Checks if any replacement has been done. # _inlineSed <file> <regexp> <replacement> <msg> _inlineSed() @@ -103,7 +79,8 @@ _inlineSed() [ -f etc/bashrc ] || usage "Please run from top-level directory of installation" -unset foamInstall projectName projectVersion archOption paraviewInstall +unset foamInstall projectName projectVersion archOption +unset paraviewInstall scotchArchPath # parse options while [ "$#" -gt 0 ] @@ -172,7 +149,7 @@ do etc/config/paraview.sh \ 'ParaView_DIR=.*' \ 'ParaView_DIR='"$paraviewInstall" \ - "Replacing ParaView_DIR setting by '$paraviewInstall'" + "Replacing ParaView_DIR setting by '$paraviewInstall'" shift 2 ;; -paraviewVersion | --paraviewVersion) @@ -186,13 +163,36 @@ do "Replacing ParaView_VERSION setting by '$paraviewVersion'" shift 2 ;; + -scotchVersion | --scotchVersion) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + scotchVersion="$2" + _inlineSed \ + etc/config/scotch.sh \ + 'SCOTCH_VERSION=.*' \ + 'SCOTCH_VERSION='"$scotchVersion" \ + "Replacing SCOTCH_VERSION setting by '$scotchVersion'" + shift 2 + ;; + -scotchArchPath | --scotchArchPath) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + scotchArchPath="$2" + _inlineSed \ + etc/config/scotch.sh \ + 'SCOTCH_ARCH_PATH=.*' \ + 'SCOTCH_ARCH_PATH='"$scotchArchPath" \ + "Replacing SCOTCH_ARCH_PATH setting by '$scotchArchPath'" + shift 2 + ;; *) usage "unknown option/argument: '$*'" ;; esac done -[ -n "$foamInstall" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" -o -n "$paraviewInstall" -o -n "$paraviewVersion" ] || usage "Please specify at least one configure option" +[ -n "$foamInstall" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" \ +-o -n "$paraviewInstall" -o -n "$paraviewVersion" \ +-o -n "$scotchVersion" -o -n "$scotchArchPath" \ +] || usage "Please specify at least one configure option" #echo "Replacing WM_PROJECT setting by '$projectName'" #sed -i -e 's@WM_PROJECT=.*@WM_PROJECT='"$projectName@" etc/bashrc diff --git a/etc/caseDicts/foamyHexMeshDict b/etc/caseDicts/foamyHexMeshDict index cd0c9367a3041bb5e30ef65831dedd1dd6bc3962..c866c832adc595f601186d31873d2f7469f09410 100644 --- a/etc/caseDicts/foamyHexMeshDict +++ b/etc/caseDicts/foamyHexMeshDict @@ -107,9 +107,11 @@ motionControl polyMeshFiltering { - filterEdges on; - filterFaces off; - writeTetDualMesh false; + filterEdges on; + filterFaces off; + writeTetDualMesh true; + writeCellShapeControlMesh true; + writeBackgroundMeshDecomposition true; } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H index 7dfd4717e79635af6aa131d625e102bafdbd984f..94f7f89dbc751a48ce9390fd89c7278e498dec1f 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -189,6 +189,11 @@ public: // allocated entries. void clear(); + //- Append an element at the end of the list + inline void append(const T*); + inline void append(const autoPtr<T>&); + inline void append(const tmp<T>&); + //- Transfer the contents of the argument PtrList into this PtrList // and annul the argument list. void transfer(PtrList<T>&); diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H index 979e862d4a7c59e8eeb26e69d741bcbf750cd19e..74fafa6da5344b5e8e5804bb74a5ab4e2d05fb0d 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H @@ -79,6 +79,32 @@ inline void Foam::PtrList<T>::resize(const label newSize) } +template<class T> +inline void Foam::PtrList<T>::append(const T* ptr) +{ + label sz = size(); + this->setSize(sz+1); + ptrs_[sz] = ptr; +} + + +template<class T> +inline void Foam::PtrList<T>::append(const autoPtr<T>& aptr) +{ + return append(const_cast<autoPtr<T>&>(aptr).ptr()); +} + + +template<class T> +inline void Foam::PtrList<T>::append +( + const tmp<T>& t +) +{ + return append(const_cast<tmp<T>&>(t).ptr()); +} + + template<class T> inline bool Foam::PtrList<T>::set(const label i) const { diff --git a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C index 638d3e209505df01596b77ccd532268e8afe47a0..5c9fd3210ddbd335194458b0fabece9916696d16 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C +++ b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,6 +28,7 @@ Description \*---------------------------------------------------------------------------*/ #include "IOobject.H" +#include "objectRegistry.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,7 +54,7 @@ bool Foam::IOobject::writeHeader(Ostream& os, const word& type) const os << " note " << note() << ";\n"; } - os << " location " << instance()/local() << ";\n" + os << " location " << instance()/db().dbDir()/local() << ";\n" << " object " << name() << ";\n" << "}" << nl; diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H index 1900aee38728abaebbf70ea16e6596969a47ebcc..6ecdfddbabfc8d07d8fbf2dc445efbf951a65ee8 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H +++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -252,7 +252,7 @@ public: List<scalar>& bary ) const; - //- Return nearest point to p on tetrahedron. Is p itself + //- Return nearest point to p on tetrahedron. Is p itself // if inside. inline pointHit nearestPoint(const point& p) const; diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C index dcc268c238cbef33baac0706b021a64ea75374a8..014c616287793e99bca6a09c88b28e2e5672e454 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -955,6 +955,17 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells } } + + // Because of isCollapsedFace one side can decide not to baffle whereas + // the other side does so sync. Baffling is prefered over not baffling. + syncTools::syncFaceList + ( + mesh_, + facePatch, + maxEqOp<label>() + ); + + Info<< "markFacesOnProblemCells : marked " << returnReduce(nBaffleFaces, sumOp<label>()) << " additional internal faces to be converted into baffles." diff --git a/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H b/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H index 7ecbb075eb479127c9bfaf4baf44b3d4683f7bf2..b7eac0fc3f97dfbcd1abb3dd3b77fa7d9b376fe6 100644 --- a/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H +++ b/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H @@ -77,7 +77,7 @@ namespace Foam > hExponentialSolidThermoPhysics; - typedef + typedef polynomialSolidTransport < species::thermo diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C index e2c5ae6719a8de95a351eeac612b8f8ad2ff1981..bef81029444b61d4c39cd3f8570406c93d4e3b36 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,26 +28,26 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class thermo> -Foam::constAnIsoSolidTransport<thermo>::constAnIsoSolidTransport +template<class Thermo> +Foam::constAnIsoSolidTransport<Thermo>::constAnIsoSolidTransport ( const dictionary& dict ) : - thermo(dict), + Thermo(dict), kappa_(dict.subDict("transport").lookup("kappa")) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class thermo> -void Foam::constAnIsoSolidTransport<thermo>::constAnIsoSolidTransport::write +template<class Thermo> +void Foam::constAnIsoSolidTransport<Thermo>::constAnIsoSolidTransport::write ( Ostream& os ) const { - thermo::write(os); + Thermo::write(os); dictionary dict("transport"); dict.add("kappa", kappa_); @@ -57,14 +57,14 @@ void Foam::constAnIsoSolidTransport<thermo>::constAnIsoSolidTransport::write // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -template<class thermo> +template<class Thermo> Foam::Ostream& Foam::operator<< ( Ostream& os, - const constAnIsoSolidTransport<thermo>& ct + const constAnIsoSolidTransport<Thermo>& ct ) { - operator<<(os, static_cast<const thermo&>(ct)); + operator<<(os, static_cast<const Thermo&>(ct)); os << tab << ct.kappa_; os.check diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C index 10070c48ba43c9a200674caa7976591c08b666c7..24abeac8ae772d4e2f458c71d1f0efee2dca8f0c 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,13 +28,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class thermo> -Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport +template<class Thermo> +Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport ( const dictionary& dict ) : - thermo(dict), + Thermo(dict), kappa0_(0.0), n0_(0.0), Tref_(0.0) @@ -48,13 +48,13 @@ Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class thermo> -void Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport::write +template<class Thermo> +void Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport::write ( Ostream& os ) const { - thermo::write(os); + Thermo::write(os); dictionary dict("transport"); dict.add("kappa0", kappa0_); @@ -66,13 +66,13 @@ void Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport::write // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -template<class thermo> +template<class Thermo> Foam::Ostream& Foam::operator<< ( - Ostream& os, const exponentialSolidTransport<thermo>& et + Ostream& os, const exponentialSolidTransport<Thermo>& et ) { - operator<<(os, static_cast<const thermo&>(et)); + operator<<(os, static_cast<const Thermo&>(et)); os << tab << et.kappa0_ << tab << et.n0_ << tab << et.Tref_; os.check diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H index 547c2e0be9435bc9f3978a9ad06e55ee6c204816..36105ceb449ec3d757f5314338c8132fbc821ae0 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,30 +25,30 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class thermo> -inline Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport ( - const thermo& t, + const Thermo& t, const scalar kappa0, const scalar n0, const scalar Tref ) : - thermo(t), + Thermo(t), kappa0_(kappa0), n0_(n0), Tref_(Tref) {} -template<class thermo> -inline Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport ( const word& name, const exponentialSolidTransport& ct ) : - thermo(name, ct), + Thermo(name, ct), kappa0_(ct.kappa0_), n0_(ct.n0_), Tref_(ct.Tref_) @@ -70,8 +70,8 @@ Foam::exponentialSolidTransport<Thermo>::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class thermo> -inline Foam::scalar Foam::exponentialSolidTransport<thermo>::kappa +template<class Thermo> +inline Foam::scalar Foam::exponentialSolidTransport<Thermo>::kappa ( const scalar p, const scalar T ) const @@ -80,8 +80,8 @@ inline Foam::scalar Foam::exponentialSolidTransport<thermo>::kappa } -template<class thermo> -inline Foam::vector Foam::exponentialSolidTransport<thermo>::Kappa +template<class Thermo> +inline Foam::vector Foam::exponentialSolidTransport<Thermo>::Kappa ( const scalar p, const scalar T ) const @@ -91,13 +91,13 @@ inline Foam::vector Foam::exponentialSolidTransport<thermo>::Kappa } -template<class thermo> -inline Foam::scalar Foam::exponentialSolidTransport<thermo>:: +template<class Thermo> +inline Foam::scalar Foam::exponentialSolidTransport<Thermo>:: mu(const scalar p, const scalar T) const { notImplemented ( - "Foam::scalar Foam::exponentialSolidTransport<thermo>mu::" + "Foam::scalar Foam::exponentialSolidTransport<Thermo>mu::" "(" " const scalar p, const scalar T" ") const" @@ -106,8 +106,8 @@ mu(const scalar p, const scalar T) const } -template<class thermo> -inline Foam::scalar Foam::exponentialSolidTransport<thermo>:: +template<class Thermo> +inline Foam::scalar Foam::exponentialSolidTransport<Thermo>:: alphah(const scalar p, const scalar T) const { return kappa(p, T)/this->Cpv(p, T); @@ -116,33 +116,28 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class thermo> -inline Foam::exponentialSolidTransport<thermo>& -Foam::exponentialSolidTransport<thermo>::operator= +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo>& +Foam::exponentialSolidTransport<Thermo>::operator= ( - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { - //thermo::operator=(ct); - kappa0_ = ct.kappa0_; n0_ = ct.n0_; Tref_ = ct.Tref_; - return *this; } -template<class thermo> -inline void Foam::exponentialSolidTransport<thermo>::operator+= +template<class Thermo> +inline void Foam::exponentialSolidTransport<Thermo>::operator+= ( - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { scalar molr1 = this->nMoles(); - //thermo::operator+=(ct); - molr1 /= this->nMoles(); scalar molr2 = ct.nMoles()/this->nMoles(); @@ -152,16 +147,14 @@ inline void Foam::exponentialSolidTransport<thermo>::operator+= } -template<class thermo> -inline void Foam::exponentialSolidTransport<thermo>::operator-= +template<class Thermo> +inline void Foam::exponentialSolidTransport<Thermo>::operator-= ( - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { scalar molr1 = this->nMoles(); - //thermo::operator-=(ct); - molr1 /= this->nMoles(); scalar molr2 = ct.nMoles()/this->nMoles(); @@ -173,16 +166,16 @@ inline void Foam::exponentialSolidTransport<thermo>::operator-= // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // -template<class thermo> -inline Foam::exponentialSolidTransport<thermo> Foam::operator* +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo> Foam::operator* ( const scalar s, - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { - return exponentialSolidTransport<thermo> + return exponentialSolidTransport<Thermo> ( - s*static_cast<const thermo&>(ct), + s*static_cast<const Thermo&>(ct), ct.kappa0_, ct.n0_, ct.Tref_ diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.C index 7bddd6d82209bf644417711baa7c4358101e0c6e..e43b30a2e8997156f0b8a47575f8afa94a1340dd 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.C @@ -63,9 +63,6 @@ Foam::polynomialSolidTransport<Thermo, PolySize>::polynomialSolidTransport template<class Thermo, int PolySize> void Foam::polynomialSolidTransport<Thermo, PolySize>::write(Ostream& os) const { - os << this->name() << endl; - os << token::BEGIN_BLOCK << incrIndent << nl; - Thermo::write(os); dictionary dict("transport"); @@ -76,8 +73,6 @@ void Foam::polynomialSolidTransport<Thermo, PolySize>::write(Ostream& os) const kappaCoeffs_ ); os << indent << dict.dictName() << dict; - - os << decrIndent << token::END_BLOCK << nl; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh index 26fa39b2553d6f9632bba0bfd73a4ec90aa02ca3..9fa4a5a2c89276d1c85bae95012c74d2463039f4 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh @@ -38,7 +38,7 @@ boundaryField } outlet { - type fixedFluxPressure; + type fixedValue; value $internalField; } fixedWalls diff --git a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel index dcb5474b1367094e55d1255c6f107326161c988f..3113b19787164c7bc76f5c6d889b8eb45b971a5c 100755 --- a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel +++ b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel @@ -10,8 +10,8 @@ nProc=$(getNumberOfProcessors) # copy flange surface from resources folder cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/ -runApplication blockMesh -runApplication decomposePar +runApplication blockMesh -region backgroundMeshDecomposition +runApplication decomposePar -region backgroundMeshDecomposition runParallel foamyHexMesh $nProc runParallel collapseEdges $nProc -latestTime -collapseFaces diff --git a/tutorials/mesh/foamyHexMesh/blob/constant/polyMesh/blockMeshDict b/tutorials/mesh/foamyHexMesh/blob/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict similarity index 100% rename from tutorials/mesh/foamyHexMesh/blob/constant/polyMesh/blockMeshDict rename to tutorials/mesh/foamyHexMesh/blob/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict diff --git a/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/decomposeParDict b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..3d3806e87382b1f4fef074e2aad6f535c98881b6 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/decomposeParDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method scotch; +//method ptscotch; +// method hierarchical; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 1 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSchemes b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..288d536c8b0f5fc598f73b75a3b34168659b9df5 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSchemes @@ -0,0 +1 @@ +../fvSchemes \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSolution b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..4a4e96ba76f1b7aa611bd7956bfcaef773bbfa44 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSolution @@ -0,0 +1 @@ +../fvSolution \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict deleted file mode 100644 index 3d3806e87382b1f4fef074e2aad6f535c98881b6..0000000000000000000000000000000000000000 --- a/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object decomposeParDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -numberOfSubdomains 2; - -method scotch; -//method ptscotch; -// method hierarchical; - -simpleCoeffs -{ - n ( 2 2 1 ); - delta 0.001; -} - -hierarchicalCoeffs -{ - n ( 2 1 1 ); - delta 0.001; - order xyz; -} - -manualCoeffs -{ - dataFile ""; -} - -distributed no; - -roots ( ); - - -// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..6fe38b15ec13cdd9b1d68fbf890f865afd36d644 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict @@ -0,0 +1 @@ +backgroundMeshDecomposition/decomposeParDict \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel index 2542d324d9d807af91c453e319d01015079c3fad..237296826d54b95fa01b1298bdc5425a333ca772 100755 --- a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel +++ b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel @@ -11,12 +11,8 @@ nProc=$(getNumberOfProcessors) cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/ # Create tight-fitting background mesh -runApplication blockMesh -runApplication topoSet -dict system/topoSetDict-background -mv log.topoSet log.topoSet.background -runApplication subsetMesh background -patch walls -overwrite - -runApplication decomposePar +runApplication blockMesh -region backgroundMeshDecomposition +runApplication decomposePar -region backgroundMeshDecomposition runParallel foamyHexMesh $nProc runParallel collapseEdges $nProc -latestTime -collapseFaces diff --git a/tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/blockMeshDict b/tutorials/mesh/foamyHexMesh/flange/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict similarity index 100% rename from tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/blockMeshDict rename to tutorials/mesh/foamyHexMesh/flange/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict diff --git a/tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/boundary b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/decomposeParDict similarity index 64% rename from tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/boundary rename to tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/decomposeParDict index efe6bfe832fedad4de807c79b291f6dcc2b14dde..afb5d8a226cc699ab6db67b043e65ba01103f2d7 100644 --- a/tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/boundary +++ b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/decomposeParDict @@ -9,20 +9,38 @@ FoamFile { version 2.0; format ascii; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; + class dictionary; + location "system"; + object decomposeParDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -1 -( - walls - { - type wall; - nFaces 126; - startFace 207; - } -) +numberOfSubdomains 8; + +//method scotch; +method hierarchical; + +simpleCoeffs +{ + n ( 2 2 2 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 2 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSchemes b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..288d536c8b0f5fc598f73b75a3b34168659b9df5 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSchemes @@ -0,0 +1 @@ +../fvSchemes \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSolution b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..4a4e96ba76f1b7aa611bd7956bfcaef773bbfa44 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSolution @@ -0,0 +1 @@ +../fvSolution \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict deleted file mode 100644 index afb5d8a226cc699ab6db67b043e65ba01103f2d7..0000000000000000000000000000000000000000 --- a/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict +++ /dev/null @@ -1,46 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object decomposeParDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -numberOfSubdomains 8; - -//method scotch; -method hierarchical; - -simpleCoeffs -{ - n ( 2 2 2 ); - delta 0.001; -} - -hierarchicalCoeffs -{ - n ( 2 2 2 ); - delta 0.001; - order xyz; -} - -manualCoeffs -{ - dataFile ""; -} - -distributed no; - -roots ( ); - - -// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..6fe38b15ec13cdd9b1d68fbf890f865afd36d644 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict @@ -0,0 +1 @@ +backgroundMeshDecomposition/decomposeParDict \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun index bbe4923241e286dd7e5319f63cdfce46c6ac0a18..865325d1b802fec1ab0e46aaaa2087d93715283e 100755 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun @@ -43,8 +43,8 @@ mv log.surfaceBooleanFeatures log.surfaceBooleanFeatures.stirrer_shaftRotating runApplication surfaceFeatureExtract -runApplication blockMesh -runApplication decomposePar +runApplication blockMesh -region backgroundMeshDecomposition +runApplication decomposePar -region backgroundMeshDecomposition runParallel foamyHexMesh $nProcs diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/polyMesh/blockMeshDict b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict similarity index 100% rename from tutorials/mesh/foamyHexMesh/mixerVessel/constant/polyMesh/blockMeshDict rename to tutorials/mesh/foamyHexMesh/mixerVessel/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/decomposeParDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..24853f860c83fa3934d4a639a8cd06eef84ab905 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/decomposeParDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method ptscotch; +//method hierarchical; +method scotch; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 2 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSchemes b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..288d536c8b0f5fc598f73b75a3b34168659b9df5 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSchemes @@ -0,0 +1 @@ +../fvSchemes \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSolution b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..4a4e96ba76f1b7aa611bd7956bfcaef773bbfa44 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSolution @@ -0,0 +1 @@ +../fvSolution \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict deleted file mode 100644 index 24853f860c83fa3934d4a639a8cd06eef84ab905..0000000000000000000000000000000000000000 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object decomposeParDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -numberOfSubdomains 8; - -//method ptscotch; -//method hierarchical; -method scotch; - -simpleCoeffs -{ - n ( 2 2 1 ); - delta 0.001; -} - -hierarchicalCoeffs -{ - n ( 2 2 2 ); - delta 0.001; - order xyz; -} - -manualCoeffs -{ - dataFile ""; -} - -distributed no; - -roots ( ); - - -// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..6fe38b15ec13cdd9b1d68fbf890f865afd36d644 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict @@ -0,0 +1 @@ +backgroundMeshDecomposition/decomposeParDict \ No newline at end of file