mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into splitCyclic
Conflicts: applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H src/OpenFOAM/meshes/polyMesh/syncTools/dummyTransform.H src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C src/edgeMesh/edgeFormats/vtk/VTKedgeFormat.H src/mesh/blockMesh/curvedEdges/spline.H src/meshTools/PointEdgeWave/PointEdgeWave.C src/meshTools/sets/topoSets/faceSet.C
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
decomposeMesh.C
|
||||
decomposePar.C
|
||||
domainDecomposition.C
|
||||
distributeCells.C
|
||||
domainDecompositionMesh.C
|
||||
domainDecompositionDistribute.C
|
||||
fvFieldDecomposer.C
|
||||
pointFieldDecomposer.C
|
||||
lagrangianFieldDecomposer.C
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompositionMethods/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
@ -87,26 +87,44 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
argList::validOptions.insert("cellDist", "");
|
||||
argList::validOptions.insert("copyUniform", "");
|
||||
argList::validOptions.insert("fields", "");
|
||||
argList::validOptions.insert("filterPatches", "");
|
||||
argList::validOptions.insert("force", "");
|
||||
argList::validOptions.insert("ifRequired", "");
|
||||
argList::addBoolOption("cellDist");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"copyUniform",
|
||||
"copy any uniform/ directories too"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"fields",
|
||||
"use existing geometry decomposition and convert fields only"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"filterPatches",
|
||||
"remove empty patches when decomposing the geometry"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"force",
|
||||
"remove existing processor*/ subdirs before decomposing the geometry"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"ifRequired",
|
||||
"only decompose geometry if the number of domains has changed"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
word regionName = fvMesh::defaultRegion;
|
||||
word regionDir = word::null;
|
||||
|
||||
if (args.optionFound("region"))
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
{
|
||||
regionName = args.option("region");
|
||||
regionDir = regionName;
|
||||
Info<< "Decomposing mesh " << regionName << nl << endl;
|
||||
}
|
||||
|
||||
|
||||
bool writeCellDist = args.optionFound("cellDist");
|
||||
bool copyUniform = args.optionFound("copyUniform");
|
||||
bool decomposeFieldsOnly = args.optionFound("fields");
|
||||
@ -125,10 +143,10 @@ int main(int argc, char *argv[])
|
||||
isDir
|
||||
(
|
||||
runTime.path()
|
||||
/(word("processor") + name(nProcs))
|
||||
/runTime.constant()
|
||||
/regionDir
|
||||
/polyMesh::meshSubDir
|
||||
/ (word("processor") + name(nProcs))
|
||||
/ runTime.constant()
|
||||
/ regionDir
|
||||
/ polyMesh::meshSubDir
|
||||
)
|
||||
)
|
||||
{
|
||||
|
||||
@ -82,7 +82,7 @@ manualCoeffs
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
|
||||
@ -38,7 +38,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void domainDecomposition::mark
|
||||
void Foam::domainDecomposition::mark
|
||||
(
|
||||
const labelList& zoneElems,
|
||||
const label zoneI,
|
||||
@ -66,7 +66,7 @@ void domainDecomposition::mark
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
domainDecomposition::domainDecomposition(const IOobject& io)
|
||||
Foam::domainDecomposition::domainDecomposition(const IOobject& io)
|
||||
:
|
||||
fvMesh(io),
|
||||
decompositionDict_
|
||||
@ -105,13 +105,13 @@ domainDecomposition::domainDecomposition(const IOobject& io)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
domainDecomposition::~domainDecomposition()
|
||||
Foam::domainDecomposition::~domainDecomposition()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool domainDecomposition::writeDecomposition()
|
||||
bool Foam::domainDecomposition::writeDecomposition()
|
||||
{
|
||||
Info<< "\nConstructing processor meshes" << endl;
|
||||
|
||||
@ -165,7 +165,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
|
||||
pointField procPoints(curPointLabels.size());
|
||||
|
||||
forAll (curPointLabels, pointi)
|
||||
forAll(curPointLabels, pointi)
|
||||
{
|
||||
procPoints[pointi] = meshPoints[curPointLabels[pointi]];
|
||||
|
||||
@ -181,7 +181,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
|
||||
faceList procFaces(curFaceLabels.size());
|
||||
|
||||
forAll (curFaceLabels, facei)
|
||||
forAll(curFaceLabels, facei)
|
||||
{
|
||||
// Mark the original face as used
|
||||
// Remember to decrement the index by one (turning index)
|
||||
@ -208,7 +208,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
|
||||
procFaceLabels.setSize(origFaceLabels.size());
|
||||
|
||||
forAll (origFaceLabels, pointi)
|
||||
forAll(origFaceLabels, pointi)
|
||||
{
|
||||
procFaceLabels[pointi] = pointLookup[origFaceLabels[pointi]];
|
||||
}
|
||||
@ -221,7 +221,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
|
||||
cellList procCells(curCellLabels.size());
|
||||
|
||||
forAll (curCellLabels, celli)
|
||||
forAll(curCellLabels, celli)
|
||||
{
|
||||
const labelList& origCellLabels = meshCells[curCellLabels[celli]];
|
||||
|
||||
@ -229,7 +229,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
|
||||
curCell.setSize(origCellLabels.size());
|
||||
|
||||
forAll (origCellLabels, cellFaceI)
|
||||
forAll(origCellLabels, cellFaceI)
|
||||
{
|
||||
curCell[cellFaceI] = faceLookup[origCellLabels[cellFaceI]];
|
||||
}
|
||||
@ -302,7 +302,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
|
||||
label nPatches = 0;
|
||||
|
||||
forAll (curPatchSizes, patchi)
|
||||
forAll(curPatchSizes, patchi)
|
||||
{
|
||||
// Get the face labels consistent with the field mapping
|
||||
// (reuse the patch field mappers)
|
||||
@ -333,7 +333,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
nPatches++;
|
||||
}
|
||||
|
||||
forAll (curProcessorPatchSizes, procPatchI)
|
||||
forAll(curProcessorPatchSizes, procPatchI)
|
||||
{
|
||||
procPatches[nPatches] =
|
||||
new processorPolyPatch
|
||||
@ -386,7 +386,7 @@ forAll(procPatches, patchI)
|
||||
|
||||
// Use the pointToZone map to find out the single zone (if any),
|
||||
// use slow search only for shared points.
|
||||
forAll (curPointLabels, pointi)
|
||||
forAll(curPointLabels, pointi)
|
||||
{
|
||||
label curPoint = curPointLabels[pointi];
|
||||
|
||||
@ -457,7 +457,7 @@ forAll(procPatches, patchI)
|
||||
// Go through all the zoned faces and find out if they
|
||||
// belong to a zone. If so, add it to the zone as
|
||||
// necessary
|
||||
forAll (curFaceLabels, facei)
|
||||
forAll(curFaceLabels, facei)
|
||||
{
|
||||
// Remember to decrement the index by one (turning index)
|
||||
//
|
||||
@ -544,7 +544,7 @@ forAll(procPatches, patchI)
|
||||
zoneCells[zoneI].setCapacity(cz[zoneI].size() / nProcs_);
|
||||
}
|
||||
|
||||
forAll (curCellLabels, celli)
|
||||
forAll(curCellLabels, celli)
|
||||
{
|
||||
label curCellI = curCellLabels[celli];
|
||||
|
||||
@ -607,7 +607,7 @@ forAll(procPatches, patchI)
|
||||
label nProcPatches = 0;
|
||||
label nProcFaces = 0;
|
||||
|
||||
forAll (procMesh.boundaryMesh(), patchi)
|
||||
forAll(procMesh.boundaryMesh(), patchi)
|
||||
{
|
||||
if
|
||||
(
|
||||
|
||||
@ -26,7 +26,7 @@ Class
|
||||
Foam::domainDecomposition
|
||||
|
||||
Description
|
||||
Automatic domain decomposition class for FOAM meshes
|
||||
Automatic domain decomposition class for finite-volume meshes
|
||||
|
||||
SourceFiles
|
||||
domainDecomposition.C
|
||||
@ -43,13 +43,11 @@ SourceFiles
|
||||
#include "PtrList.H"
|
||||
#include "point.H"
|
||||
|
||||
#ifndef namespaceFoam
|
||||
#define namespaceFoam
|
||||
using namespace Foam;
|
||||
#endif
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class domainDecomposition Declaration
|
||||
Class domainDecomposition Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class domainDecomposition
|
||||
@ -183,6 +181,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
@ -32,7 +32,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void domainDecomposition::distributeCells()
|
||||
void Foam::domainDecomposition::distributeCells()
|
||||
{
|
||||
Info<< "\nCalculating distribution of cells" << endl;
|
||||
|
||||
@ -121,7 +121,7 @@ void domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||
// Cells per processor
|
||||
procCellAddressing_ = invertOneToMany(nProcs_, cellToProc_);
|
||||
|
||||
Info << "\nDistributing faces to processors" << endl;
|
||||
Info<< "\nDistributing faces to processors" << endl;
|
||||
|
||||
// Loop through all internal faces and decide which processor they belong to
|
||||
// First visit all internal faces. If cells at both sides belong to the
|
||||
@ -479,25 +479,25 @@ void domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||
|
||||
|
||||
|
||||
Info << "\nDistributing points to processors" << endl;
|
||||
Info<< "\nDistributing points to processors" << endl;
|
||||
// For every processor, loop through the list of faces for the processor.
|
||||
// For every face, loop through the list of points and mark the point as
|
||||
// used for the processor. Collect the list of used points for the
|
||||
// processor.
|
||||
|
||||
forAll (procPointAddressing_, procI)
|
||||
forAll(procPointAddressing_, procI)
|
||||
{
|
||||
boolList pointLabels(nPoints(), false);
|
||||
|
||||
// Get reference to list of used faces
|
||||
const labelList& procFaceLabels = procFaceAddressing_[procI];
|
||||
|
||||
forAll (procFaceLabels, facei)
|
||||
forAll(procFaceLabels, facei)
|
||||
{
|
||||
// Because of the turning index, some labels may be negative
|
||||
const labelList& facePoints = fcs[mag(procFaceLabels[facei]) - 1];
|
||||
|
||||
forAll (facePoints, pointi)
|
||||
forAll(facePoints, pointi)
|
||||
{
|
||||
// Mark the point as used
|
||||
pointLabels[facePoints[pointi]] = true;
|
||||
@ -511,7 +511,7 @@ void domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||
|
||||
label nUsedPoints = 0;
|
||||
|
||||
forAll (pointLabels, pointi)
|
||||
forAll(pointLabels, pointi)
|
||||
{
|
||||
if (pointLabels[pointi])
|
||||
{
|
||||
@ -525,3 +525,5 @@ void domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
||||
procPointLabels.setSize(nUsedPoints);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -26,14 +26,10 @@ License
|
||||
|
||||
#include "fvFieldDecomposer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
fvFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
Foam::fvFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
(
|
||||
const unallocLabelList& addressingSlice,
|
||||
const label addressingOffset
|
||||
@ -41,15 +37,15 @@ fvFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
:
|
||||
directAddressing_(addressingSlice)
|
||||
{
|
||||
forAll (directAddressing_, i)
|
||||
forAll(directAddressing_, i)
|
||||
{
|
||||
// Subtract one to align addressing.
|
||||
// Subtract one to align addressing.
|
||||
directAddressing_[i] -= addressingOffset + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fvFieldDecomposer::processorVolPatchFieldDecomposer::
|
||||
Foam::fvFieldDecomposer::processorVolPatchFieldDecomposer::
|
||||
processorVolPatchFieldDecomposer
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
@ -61,9 +57,9 @@ processorVolPatchFieldDecomposer
|
||||
const labelList& own = mesh.faceOwner();
|
||||
const labelList& neighb = mesh.faceNeighbour();
|
||||
|
||||
forAll (directAddressing_, i)
|
||||
forAll(directAddressing_, i)
|
||||
{
|
||||
// Subtract one to align addressing.
|
||||
// Subtract one to align addressing.
|
||||
label ai = mag(addressingSlice[i]) - 1;
|
||||
|
||||
if (ai < neighb.size())
|
||||
@ -97,7 +93,7 @@ processorVolPatchFieldDecomposer
|
||||
}
|
||||
|
||||
|
||||
fvFieldDecomposer::processorSurfacePatchFieldDecomposer::
|
||||
Foam::fvFieldDecomposer::processorSurfacePatchFieldDecomposer::
|
||||
processorSurfacePatchFieldDecomposer
|
||||
(
|
||||
const unallocLabelList& addressingSlice
|
||||
@ -106,7 +102,7 @@ processorSurfacePatchFieldDecomposer
|
||||
addressing_(addressingSlice.size()),
|
||||
weights_(addressingSlice.size())
|
||||
{
|
||||
forAll (addressing_, i)
|
||||
forAll(addressing_, i)
|
||||
{
|
||||
addressing_[i].setSize(1);
|
||||
weights_[i].setSize(1);
|
||||
@ -117,7 +113,7 @@ processorSurfacePatchFieldDecomposer
|
||||
}
|
||||
|
||||
|
||||
fvFieldDecomposer::fvFieldDecomposer
|
||||
Foam::fvFieldDecomposer::fvFieldDecomposer
|
||||
(
|
||||
const fvMesh& completeMesh,
|
||||
const fvMesh& procMesh,
|
||||
@ -147,7 +143,7 @@ fvFieldDecomposer::fvFieldDecomposer
|
||||
static_cast<processorSurfacePatchFieldDecomposer*>(NULL)
|
||||
)
|
||||
{
|
||||
forAll (boundaryAddressing_, patchi)
|
||||
forAll(boundaryAddressing_, patchi)
|
||||
{
|
||||
if (boundaryAddressing_[patchi] >= 0)
|
||||
{
|
||||
@ -162,14 +158,14 @@ fvFieldDecomposer::fvFieldDecomposer
|
||||
}
|
||||
else
|
||||
{
|
||||
processorVolPatchFieldDecomposerPtrs_[patchi] =
|
||||
processorVolPatchFieldDecomposerPtrs_[patchi] =
|
||||
new processorVolPatchFieldDecomposer
|
||||
(
|
||||
completeMesh_,
|
||||
procMesh_.boundary()[patchi].patchSlice(faceAddressing_)
|
||||
);
|
||||
|
||||
processorSurfacePatchFieldDecomposerPtrs_[patchi] =
|
||||
processorSurfacePatchFieldDecomposerPtrs_[patchi] =
|
||||
new processorSurfacePatchFieldDecomposer
|
||||
(
|
||||
static_cast<const unallocLabelList&>
|
||||
@ -187,9 +183,9 @@ fvFieldDecomposer::fvFieldDecomposer
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
fvFieldDecomposer::~fvFieldDecomposer()
|
||||
Foam::fvFieldDecomposer::~fvFieldDecomposer()
|
||||
{
|
||||
forAll (patchFieldDecomposerPtrs_, patchi)
|
||||
forAll(patchFieldDecomposerPtrs_, patchi)
|
||||
{
|
||||
if (patchFieldDecomposerPtrs_[patchi])
|
||||
{
|
||||
@ -197,7 +193,7 @@ fvFieldDecomposer::~fvFieldDecomposer()
|
||||
}
|
||||
}
|
||||
|
||||
forAll (processorVolPatchFieldDecomposerPtrs_, patchi)
|
||||
forAll(processorVolPatchFieldDecomposerPtrs_, patchi)
|
||||
{
|
||||
if (processorVolPatchFieldDecomposerPtrs_[patchi])
|
||||
{
|
||||
@ -205,7 +201,7 @@ fvFieldDecomposer::~fvFieldDecomposer()
|
||||
}
|
||||
}
|
||||
|
||||
forAll (processorSurfacePatchFieldDecomposerPtrs_, patchi)
|
||||
forAll(processorSurfacePatchFieldDecomposerPtrs_, patchi)
|
||||
{
|
||||
if (processorSurfacePatchFieldDecomposerPtrs_[patchi])
|
||||
{
|
||||
@ -214,9 +210,4 @@ fvFieldDecomposer::~fvFieldDecomposer()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -200,10 +200,10 @@ private:
|
||||
//- List of patch field decomposers
|
||||
List<patchFieldDecomposer*> patchFieldDecomposerPtrs_;
|
||||
|
||||
List<processorVolPatchFieldDecomposer*>
|
||||
List<processorVolPatchFieldDecomposer*>
|
||||
processorVolPatchFieldDecomposerPtrs_;
|
||||
|
||||
List<processorSurfacePatchFieldDecomposer*>
|
||||
List<processorSurfacePatchFieldDecomposer*>
|
||||
processorSurfacePatchFieldDecomposerPtrs_;
|
||||
|
||||
|
||||
|
||||
@ -28,16 +28,11 @@ License
|
||||
#include "processorFvPatchField.H"
|
||||
#include "processorFvsPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||
fvFieldDecomposer::decomposeField
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::fvFieldDecomposer::decomposeField
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& field
|
||||
) const
|
||||
@ -48,7 +43,7 @@ fvFieldDecomposer::decomposeField
|
||||
// Create and map the patch field values
|
||||
PtrList<fvPatchField<Type> > patchFields(boundaryAddressing_.size());
|
||||
|
||||
forAll (boundaryAddressing_, patchi)
|
||||
forAll(boundaryAddressing_, patchi)
|
||||
{
|
||||
if (boundaryAddressing_[patchi] >= 0)
|
||||
{
|
||||
@ -106,8 +101,8 @@ fvFieldDecomposer::decomposeField
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
|
||||
fvFieldDecomposer::decomposeField
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
|
||||
Foam::fvFieldDecomposer::decomposeField
|
||||
(
|
||||
const GeometricField<Type, fvsPatchField, surfaceMesh>& field
|
||||
) const
|
||||
@ -120,7 +115,7 @@ fvFieldDecomposer::decomposeField
|
||||
procMesh_.nInternalFaces()
|
||||
)
|
||||
);
|
||||
forAll (mapAddr, i)
|
||||
forAll(mapAddr, i)
|
||||
{
|
||||
mapAddr[i] -= 1;
|
||||
}
|
||||
@ -139,18 +134,18 @@ fvFieldDecomposer::decomposeField
|
||||
// (i.e. using slices)
|
||||
Field<Type> allFaceField(field.mesh().nFaces());
|
||||
|
||||
forAll (field.internalField(), i)
|
||||
forAll(field.internalField(), i)
|
||||
{
|
||||
allFaceField[i] = field.internalField()[i];
|
||||
}
|
||||
|
||||
forAll (field.boundaryField(), patchi)
|
||||
forAll(field.boundaryField(), patchi)
|
||||
{
|
||||
const Field<Type> & p = field.boundaryField()[patchi];
|
||||
|
||||
const label patchStart = field.mesh().boundaryMesh()[patchi].start();
|
||||
|
||||
forAll (p, i)
|
||||
forAll(p, i)
|
||||
{
|
||||
allFaceField[patchStart + i] = p[i];
|
||||
}
|
||||
@ -159,7 +154,7 @@ fvFieldDecomposer::decomposeField
|
||||
// Create and map the patch field values
|
||||
PtrList<fvsPatchField<Type> > patchFields(boundaryAddressing_.size());
|
||||
|
||||
forAll (boundaryAddressing_, patchi)
|
||||
forAll(boundaryAddressing_, patchi)
|
||||
{
|
||||
if (boundaryAddressing_[patchi] >= 0)
|
||||
{
|
||||
@ -217,20 +212,16 @@ fvFieldDecomposer::decomposeField
|
||||
|
||||
|
||||
template<class GeoField>
|
||||
void fvFieldDecomposer::decomposeFields
|
||||
void Foam::fvFieldDecomposer::decomposeFields
|
||||
(
|
||||
const PtrList<GeoField>& fields
|
||||
) const
|
||||
{
|
||||
forAll (fields, fieldI)
|
||||
forAll(fields, fieldI)
|
||||
{
|
||||
decomposeField(fields[fieldI])().write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -29,16 +29,10 @@ Description
|
||||
|
||||
#include "lagrangianFieldDecomposer.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
lagrangianFieldDecomposer::lagrangianFieldDecomposer
|
||||
Foam::lagrangianFieldDecomposer::lagrangianFieldDecomposer
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const polyMesh& procMesh,
|
||||
@ -88,6 +82,4 @@ lagrangianFieldDecomposer::lagrangianFieldDecomposer
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -27,15 +27,10 @@ License
|
||||
#include "lagrangianFieldDecomposer.H"
|
||||
#include "IOobjectList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void lagrangianFieldDecomposer::readFields
|
||||
void Foam::lagrangianFieldDecomposer::readFields
|
||||
(
|
||||
const label cloudI,
|
||||
const IOobjectList& lagrangianObjects,
|
||||
@ -70,7 +65,8 @@ void lagrangianFieldDecomposer::readFields
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<IOField<Type> > lagrangianFieldDecomposer::decomposeField
|
||||
Foam::tmp<Foam::IOField<Type> >
|
||||
Foam::lagrangianFieldDecomposer::decomposeField
|
||||
(
|
||||
const word& cloudName,
|
||||
const IOField<Type>& field
|
||||
@ -100,7 +96,7 @@ tmp<IOField<Type> > lagrangianFieldDecomposer::decomposeField
|
||||
|
||||
|
||||
template<class GeoField>
|
||||
void lagrangianFieldDecomposer::decomposeFields
|
||||
void Foam::lagrangianFieldDecomposer::decomposeFields
|
||||
(
|
||||
const word& cloudName,
|
||||
const PtrList<GeoField>& fields
|
||||
@ -108,7 +104,7 @@ void lagrangianFieldDecomposer::decomposeFields
|
||||
{
|
||||
if (particleIndices_.size())
|
||||
{
|
||||
forAll (fields, fieldI)
|
||||
forAll(fields, fieldI)
|
||||
{
|
||||
decomposeField(cloudName, fields[fieldI])().write();
|
||||
}
|
||||
@ -116,8 +112,4 @@ void lagrangianFieldDecomposer::decomposeFields
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -26,14 +26,9 @@ License
|
||||
|
||||
#include "pointFieldDecomposer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
|
||||
Foam::pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
(
|
||||
const pointPatch& completeMeshPatch,
|
||||
const pointPatch& procMeshPatch,
|
||||
@ -52,7 +47,7 @@ pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
|
||||
const labelList& completeMeshPatchPoints = completeMeshPatch.meshPoints();
|
||||
|
||||
forAll (completeMeshPatchPoints, pointi)
|
||||
forAll(completeMeshPatchPoints, pointi)
|
||||
{
|
||||
pointMap[completeMeshPatchPoints[pointi]] = pointi;
|
||||
}
|
||||
@ -61,7 +56,7 @@ pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
// patch
|
||||
const labelList& procMeshPatchPoints = procMeshPatch.meshPoints();
|
||||
|
||||
forAll (procMeshPatchPoints, pointi)
|
||||
forAll(procMeshPatchPoints, pointi)
|
||||
{
|
||||
directAddressing_[pointi] =
|
||||
pointMap[directAddr[procMeshPatchPoints[pointi]]];
|
||||
@ -79,7 +74,7 @@ pointFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer
|
||||
}
|
||||
|
||||
|
||||
pointFieldDecomposer::pointFieldDecomposer
|
||||
Foam::pointFieldDecomposer::pointFieldDecomposer
|
||||
(
|
||||
const pointMesh& completeMesh,
|
||||
const pointMesh& procMesh,
|
||||
@ -97,7 +92,7 @@ pointFieldDecomposer::pointFieldDecomposer
|
||||
static_cast<patchFieldDecomposer*>(NULL)
|
||||
)
|
||||
{
|
||||
forAll (boundaryAddressing_, patchi)
|
||||
forAll(boundaryAddressing_, patchi)
|
||||
{
|
||||
if (boundaryAddressing_[patchi] >= 0)
|
||||
{
|
||||
@ -114,9 +109,9 @@ pointFieldDecomposer::pointFieldDecomposer
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
pointFieldDecomposer::~pointFieldDecomposer()
|
||||
Foam::pointFieldDecomposer::~pointFieldDecomposer()
|
||||
{
|
||||
forAll (patchFieldDecomposerPtrs_, patchi)
|
||||
forAll(patchFieldDecomposerPtrs_, patchi)
|
||||
{
|
||||
if (patchFieldDecomposerPtrs_[patchi])
|
||||
{
|
||||
@ -128,6 +123,4 @@ pointFieldDecomposer::~pointFieldDecomposer()
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -28,16 +28,11 @@ License
|
||||
#include "processorPointPatchFields.H"
|
||||
#include "globalPointPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh> >
|
||||
pointFieldDecomposer::decomposeField
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
|
||||
Foam::pointFieldDecomposer::decomposeField
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& field
|
||||
) const
|
||||
@ -53,7 +48,7 @@ pointFieldDecomposer::decomposeField
|
||||
);
|
||||
|
||||
// Create and map the patch field values
|
||||
forAll (boundaryAddressing_, patchi)
|
||||
forAll(boundaryAddressing_, patchi)
|
||||
{
|
||||
if (patchFieldDecomposerPtrs_[patchi])
|
||||
{
|
||||
@ -117,12 +112,12 @@ pointFieldDecomposer::decomposeField
|
||||
|
||||
|
||||
template<class GeoField>
|
||||
void pointFieldDecomposer::decomposeFields
|
||||
void Foam::pointFieldDecomposer::decomposeFields
|
||||
(
|
||||
const PtrList<GeoField>& fields
|
||||
) const
|
||||
{
|
||||
forAll (fields, fieldI)
|
||||
forAll(fields, fieldI)
|
||||
{
|
||||
decomposeField(fields[fieldI])().write();
|
||||
}
|
||||
@ -131,6 +126,4 @@ void pointFieldDecomposer::decomposeFields
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user