Patches contributed by Mattijs Janssens:

splitMeshRegions: handle flipping of faces for surface fields

subsetMesh: subset dimensionedFields

decomposePar: use run-time selection of decomposition constraints. Used to
    keep cells on particular processors. See the decomposeParDict in

$FOAM_UTILITIES/parallel/decomposePar:
  - preserveBaffles: keep baffle faces on same processor
  - preserveFaceZones: keep faceZones owner and neighbour on same processor
  - preservePatches: keep owner and neighbour on same processor. Note: not
    suitable for cyclicAMI since these are not coupled on the patch level
  - singleProcessorFaceSets: keep complete faceSet on a single processor
  - refinementHistory: keep cells originating from a single cell on the
    same processor.

decomposePar: clean up decomposition of refinement data from snappyHexMesh

reconstructPar: reconstruct refinement data (refineHexMesh, snappyHexMesh)

reconstructParMesh: reconstruct refinement data (refineHexMesh, snappyHexMesh)

redistributePar:
  - corrected mapping surfaceFields
  - adding processor patches in order consistent with decomposePar

argList: check that slaves are running same version as master

fvMeshSubset: move to dynamicMesh library

fvMeshDistribute:
  - support for mapping dimensionedFields
  - corrected mapping of surfaceFields

parallel routines: allow parallel running on single processor

Field: support for
  - distributed mapping
  - mapping with flipping

mapDistribute: support for flipping

AMIInterpolation: avoid constructing localPoints
This commit is contained in:
Henry Weller
2016-05-15 16:36:48 +01:00
parent 274d1df8a4
commit ce0cd35185
93 changed files with 9230 additions and 2650 deletions

View File

@ -200,6 +200,7 @@ void subsetSurfaceFields
(
const fvMesh& mesh,
const fvMesh& subMesh,
const labelList& cellMap,
const labelList& faceMap,
const labelHashSet& addedPatches
)
@ -223,6 +224,7 @@ void subsetSurfaceFields
fld,
subMesh,
patchMap,
cellMap,
faceMap
)
);
@ -828,6 +830,7 @@ void createAndWriteRegion
(
mesh,
newMesh(),
map().cellMap(),
map().faceMap(),
addedPatches
);
@ -835,6 +838,7 @@ void createAndWriteRegion
(
mesh,
newMesh(),
map().cellMap(),
map().faceMap(),
addedPatches
);
@ -842,6 +846,7 @@ void createAndWriteRegion
(
mesh,
newMesh(),
map().cellMap(),
map().faceMap(),
addedPatches
);
@ -849,6 +854,7 @@ void createAndWriteRegion
(
mesh,
newMesh(),
map().cellMap(),
map().faceMap(),
addedPatches
);
@ -856,6 +862,7 @@ void createAndWriteRegion
(
mesh,
newMesh(),
map().cellMap(),
map().faceMap(),
addedPatches
);

View File

@ -1,8 +1,8 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-ldynamicMesh \
-lgenericPatchFields

View File

@ -150,6 +150,40 @@ void subsetPointFields
}
template<class Type>
void subsetDimensionedFields
(
const fvMeshSubset& subsetter,
const wordList& fieldNames,
PtrList<DimensionedField<Type, volMesh> >& subFields
)
{
const fvMesh& baseMesh = subsetter.baseMesh();
forAll(fieldNames, i)
{
const word& fieldName = fieldNames[i];
Info<< "Subsetting field " << fieldName << endl;
DimensionedField<Type, volMesh> fld
(
IOobject
(
fieldName,
baseMesh.time().timeName(),
baseMesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
baseMesh
);
subFields.set(i, subsetter.interpolate(fld));
}
}
int main(int argc, char *argv[])
{
@ -361,6 +395,42 @@ int main(int argc, char *argv[])
subsetPointFields(subsetter, pMesh, pointTensorNames, pointTensorFlds);
// Read dimensioned fields and subset
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typedef volScalarField::Internal dimScalType;
wordList scalarDimNames(objects.names(dimScalType::typeName));
PtrList<dimScalType> scalarDimFlds(scalarDimNames.size());
subsetDimensionedFields(subsetter, scalarDimNames, scalarDimFlds);
typedef volVectorField::Internal dimVecType;
wordList vectorDimNames(objects.names(dimVecType::typeName));
PtrList<dimVecType> vectorDimFlds(vectorDimNames.size());
subsetDimensionedFields(subsetter, vectorDimNames, vectorDimFlds);
typedef volSphericalTensorField::Internal dimSphereType;
wordList sphericalTensorDimNames(objects.names(dimSphereType::typeName));
PtrList<dimSphereType> sphericalTensorDimFlds
(
sphericalTensorDimNames.size()
);
subsetDimensionedFields
(
subsetter,
sphericalTensorDimNames,
sphericalTensorDimFlds
);
typedef volSymmTensorField::Internal dimSymmTensorType;
wordList symmTensorDimNames(objects.names(dimSymmTensorType::typeName));
PtrList<dimSymmTensorType> symmTensorDimFlds(symmTensorDimNames.size());
subsetDimensionedFields(subsetter, symmTensorDimNames, symmTensorDimFlds);
typedef volTensorField::Internal dimTensorType;
wordList tensorDimNames(objects.names(dimTensorType::typeName));
PtrList<dimTensorType> tensorDimFlds(tensorDimNames.size());
subsetDimensionedFields(subsetter, tensorDimNames, tensorDimFlds);
// Write mesh and fields to new time
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -461,6 +531,33 @@ int main(int argc, char *argv[])
pointTensorFlds[i].write();
}
// DimensionedFields
forAll(scalarDimFlds, i)
{
scalarDimFlds[i].rename(scalarDimNames[i]);
scalarDimFlds[i].write();
}
forAll(vectorDimFlds, i)
{
vectorDimFlds[i].rename(vectorDimNames[i]);
vectorDimFlds[i].write();
}
forAll(sphericalTensorDimFlds, i)
{
sphericalTensorDimFlds[i].rename(sphericalTensorDimNames[i]);
sphericalTensorDimFlds[i].write();
}
forAll(symmTensorDimFlds, i)
{
symmTensorDimFlds[i].rename(symmTensorDimNames[i]);
symmTensorDimFlds[i].write();
}
forAll(tensorDimFlds, i)
{
tensorDimFlds[i].rename(tensorDimNames[i]);
tensorDimFlds[i].write();
}
Info<< "End\n" << endl;