diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index cf5b4b0976..a13be9eb16 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ + -I${LIB_SRC}/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 2f40670abd..c65d8618f1 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -107,7 +107,7 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField if (dict.found("refValue") && dict.found("valueFraction")) { this->refValue() = vectorField("refValue", dict, p.size()); - this->valueFraction() = + this->valueFraction() = scalarField("valueFraction", dict, p.size()); } else diff --git a/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options index 0c40e89430..94bad3527b 100644 --- a/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options @@ -3,6 +3,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/finiteVolume/cfdTools \ diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options index 6af3735d63..8d15f96a68 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options @@ -16,4 +16,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lincompressibleRASModels \ -lincompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -lAMIInterpolation diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options index 36e9c44270..0a39f85de5 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ + -I${LIB_SRC}/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index e8a8718373..249770edda 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ + -I${LIB_SRC}/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options index 0786933541..028b94748a 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options @@ -11,6 +11,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options index 58d80278f8..a78bf84fb8 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options @@ -10,6 +10,7 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options index 1abdd72178..baeb756a8c 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ + -I${LIB_SRC}/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index 3f762b6bd0..2e838974ac 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ + -I${LIB_SRC}/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index e406727104..90f455bf4c 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ + -I${LIB_SRC}/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ diff --git a/applications/solvers/lagrangian/sprayFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/Make/options index f4c66f06f9..a7faafdf69 100644 --- a/applications/solvers/lagrangian/sprayFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ + -I${LIB_SRC}/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index 7a7ddc0432..0926a980e1 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -8,6 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/AMIInterpolation/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude diff --git a/applications/test/router/Gather/Gather.H b/applications/test/router/Gather/Gather.H index dc847d1894..337f7a6908 100644 --- a/applications/test/router/Gather/Gather.H +++ b/applications/test/router/Gather/Gather.H @@ -25,7 +25,7 @@ Class Foam::Gather Description - Gather data from all processors onto all processors. + Gather data from all processors onto all processors. SourceFiles Gather.C diff --git a/applications/test/router/Gather/GatherBase.C b/applications/test/router/Gather/GatherBase.C index 50d2143ab7..ecba2768b9 100644 --- a/applications/test/router/Gather/GatherBase.C +++ b/applications/test/router/Gather/GatherBase.C @@ -79,7 +79,7 @@ IndexType GatherBase::offset << " indices:" << indices.size() << abort(FatalError); } - + label sum = 0; diff --git a/applications/test/router/router.H b/applications/test/router/router.H index 7b675ac223..cbddd9a35b 100644 --- a/applications/test/router/router.H +++ b/applications/test/router/router.H @@ -56,7 +56,7 @@ Description | | ------+B - + But: + A diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 454e355b94..e65a5beefa 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -136,7 +136,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation // Surface protrusion conformation is done in two steps. - // 1. the dual edges (of all internal vertices) can stretch to + // 1. the dual edges (of all internal vertices) can stretch to // 'infinity' so any intersection would be badly behaved. So // just find the nearest point on the geometry and insert point // pairs. diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index b5d73ae9e5..6430eab8ce 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -310,15 +310,15 @@ void Foam::conformalVoronoiMesh::writeMesh { // 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(..)") @@ -330,14 +330,14 @@ void Foam::conformalVoronoiMesh::writeMesh } 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(..)") @@ -348,7 +348,7 @@ void Foam::conformalVoronoiMesh::writeMesh << 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; @@ -389,7 +389,7 @@ void Foam::conformalVoronoiMesh::writeMesh // Calculate map from tet points to dual mesh cells/patch faces // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - + labelIOList pointDualAddressing ( IOobject @@ -408,7 +408,7 @@ void Foam::conformalVoronoiMesh::writeMesh pointToDelaunayVertex )() ); - + label pointI = findIndex(pointDualAddressing, -1); if (pointI != -1) { @@ -422,13 +422,13 @@ void Foam::conformalVoronoiMesh::writeMesh ) << "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 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { @@ -457,11 +457,11 @@ void Foam::conformalVoronoiMesh::writeMesh ), points ); - + forAll(pointDualAddressing, pointI) { label index = pointDualAddressing[pointI]; - + if (index > 0) { label cellI = index-1; @@ -476,7 +476,7 @@ void Foam::conformalVoronoiMesh::writeMesh } } } - + Info<< "Writing new tetDualMesh points mapped onto Voronoi mesh to " << dualPoints.objectPath() << endl << "Replace the polyMesh/points with these." << endl; diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index ebd3a6cb47..b80fde8654 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -687,7 +687,7 @@ void getInterfaceSizes } } - // Rework + // Rework Pstream::scatter(regionsToSize); diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict index e60757fffd..c5b5c45135 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict +++ b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 8; +numberOfSubdomains 2; //- Keep owner and neighbour on same processor for faces in zones: // preserveFaceZones (heater solid1 solid3); @@ -24,13 +24,22 @@ numberOfSubdomains 8; // (makes sense only for cyclic patches) //preservePatches (cyclic_half0 cyclic_half1); +//- Keep all of faceZone on a single processor. This puts all cells +// connected with a point, edge or face on the same processor. +// (just having face connected cells might not guarantee a balanced +// decomposition) +// The processor can be -1 (the decompositionMethod chooses the processor +// for a good load balance) or explicitly provided (upsets balance). +//singleProcessorFaceZones ((f0 -1)); + + //- Use the volScalarField named here as a weight for each cell in the // decomposition. For example, use a particle population field to decompose // for a balanced number of particles in a lagrangian simulation. // weightField dsmcRhoNMean; method scotch; -// method hierarchical; +//method hierarchical; // method simple; // method metis; // method manual; @@ -70,7 +79,7 @@ simpleCoeffs hierarchicalCoeffs { - n (2 2 1); + n (1 2 1); delta 0.001; order xyz; } diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C index 4ee3c7555e..e8b6997bc4 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C @@ -28,6 +28,7 @@ License #include "cpuTime.H" #include "cellSet.H" #include "regionSplit.H" +#include "Tuple2.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,7 +48,8 @@ void Foam::domainDecomposition::distributeCells() { wordList pNames(decompositionDict_.lookup("preservePatches")); - Info<< "Keeping owner of faces in patches " << pNames + Info<< nl + << "Keeping owner of faces in patches " << pNames << " on same processor. This only makes sense for cyclics." << endl; const polyBoundaryMesh& patches = boundaryMesh(); @@ -76,7 +78,8 @@ void Foam::domainDecomposition::distributeCells() { wordList zNames(decompositionDict_.lookup("preserveFaceZones")); - Info<< "Keeping owner and neighbour of faces in zones " << zNames + Info<< nl + << "Keeping owner and neighbour of faces in zones " << zNames << " on same processor" << endl; const faceZoneMesh& fZones = faceZones(); @@ -103,6 +106,65 @@ void Foam::domainDecomposition::distributeCells() } + // Specified processor for owner and neighbour of faces + Map