mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: conflict resolution
This commit is contained in:
@ -3,7 +3,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
|
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
@ -11,4 +12,5 @@ EXE_LIBS = \
|
|||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp \
|
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-lmeshTools
|
-lmeshTools \
|
||||||
|
-lregionModels
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,13 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude
|
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lreconstruct
|
-lreconstruct \
|
||||||
|
-lregionModels
|
||||||
|
|||||||
@ -25,7 +25,7 @@ Application
|
|||||||
reconstructPar
|
reconstructPar
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Reconstructs a mesh and fields of a case that is decomposed for parallel
|
Reconstructs fields of a case that is decomposed for parallel
|
||||||
execution of OpenFOAM.
|
execution of OpenFOAM.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -36,6 +36,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
#include "processorMeshes.H"
|
#include "processorMeshes.H"
|
||||||
|
#include "regionProperties.H"
|
||||||
#include "fvFieldReconstructor.H"
|
#include "fvFieldReconstructor.H"
|
||||||
#include "pointFieldReconstructor.H"
|
#include "pointFieldReconstructor.H"
|
||||||
#include "reconstructLagrangian.H"
|
#include "reconstructLagrangian.H"
|
||||||
@ -44,11 +45,21 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::addNote
|
||||||
|
(
|
||||||
|
"Reconstruct fields of a parallel case"
|
||||||
|
);
|
||||||
|
|
||||||
// enable -constant ... if someone really wants it
|
// enable -constant ... if someone really wants it
|
||||||
// enable -zeroTime to prevent accidentally trashing the initial fields
|
// enable -zeroTime to prevent accidentally trashing the initial fields
|
||||||
timeSelector::addOptions(true, true);
|
timeSelector::addOptions(true, true);
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"allRegions",
|
||||||
|
"operate on all regions in regionProperties"
|
||||||
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"fields",
|
"fields",
|
||||||
@ -101,7 +112,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool newTimes = args.optionFound("newTimes");
|
const bool newTimes = args.optionFound("newTimes");
|
||||||
|
const bool allRegions = args.optionFound("allRegions");
|
||||||
|
|
||||||
|
|
||||||
// determine the processor count directly
|
// determine the processor count directly
|
||||||
@ -159,414 +171,487 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# include "createNamedMesh.H"
|
|
||||||
word regionDir = word::null;
|
|
||||||
if (regionName != fvMesh::defaultRegion)
|
|
||||||
{
|
|
||||||
regionDir = regionName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set all times on processor meshes equal to reconstructed mesh
|
// Set all times on processor meshes equal to reconstructed mesh
|
||||||
forAll(databases, procI)
|
forAll(databases, procI)
|
||||||
{
|
{
|
||||||
databases[procI].setTime(runTime.timeName(), runTime.timeIndex());
|
databases[procI].setTime(runTime.timeName(), runTime.timeIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read all meshes and addressing to reconstructed mesh
|
|
||||||
processorMeshes procMeshes(databases, regionName);
|
|
||||||
|
|
||||||
|
wordList regionNames;
|
||||||
// check face addressing for meshes that have been decomposed
|
wordList regionDirs;
|
||||||
// with a very old foam version
|
if (allRegions)
|
||||||
# include "checkFaceAddressingComp.H"
|
|
||||||
|
|
||||||
// Loop over all times
|
|
||||||
forAll(timeDirs, timeI)
|
|
||||||
{
|
{
|
||||||
if (newTimes)
|
Info<< "Reconstructing for all regions in regionProperties" << nl
|
||||||
|
<< endl;
|
||||||
|
regionProperties rp(runTime);
|
||||||
|
forAllConstIter(HashTable<wordList>, rp, iter)
|
||||||
{
|
{
|
||||||
// Compare on timeName, not value
|
const wordList& regions = iter();
|
||||||
bool foundTime = false;
|
forAll(regions, i)
|
||||||
forAll(masterTimeDirs, i)
|
|
||||||
{
|
{
|
||||||
if (masterTimeDirs[i].name() == timeDirs[timeI].name())
|
if (findIndex(regionNames, regions[i]) == -1)
|
||||||
{
|
{
|
||||||
foundTime = true;
|
regionNames.append(regions[i]);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (foundTime)
|
}
|
||||||
|
regionDirs = regionNames;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
word regionName;
|
||||||
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
|
{
|
||||||
|
regionNames = wordList(1, regionName);
|
||||||
|
regionDirs = regionNames;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
regionNames = wordList(1, fvMesh::defaultRegion);
|
||||||
|
regionDirs = wordList(1, word::null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
forAll(regionNames, regionI)
|
||||||
|
{
|
||||||
|
const word& regionName = regionNames[regionI];
|
||||||
|
const word& regionDir = regionDirs[regionI];
|
||||||
|
|
||||||
|
Info<< "\n\nReconstructing fields for mesh " << regionName << nl
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
fvMesh mesh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
regionName,
|
||||||
|
runTime.timeName(),
|
||||||
|
runTime,
|
||||||
|
Foam::IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Read all meshes and addressing to reconstructed mesh
|
||||||
|
processorMeshes procMeshes(databases, regionName);
|
||||||
|
|
||||||
|
|
||||||
|
// check face addressing for meshes that have been decomposed
|
||||||
|
// with a very old foam version
|
||||||
|
# include "checkFaceAddressingComp.H"
|
||||||
|
|
||||||
|
// Loop over all times
|
||||||
|
forAll(timeDirs, timeI)
|
||||||
|
{
|
||||||
|
if (newTimes)
|
||||||
{
|
{
|
||||||
Info<< "Skipping time " << timeDirs[timeI].name()
|
// Compare on timeName, not value
|
||||||
<< endl << endl;
|
bool foundTime = false;
|
||||||
continue;
|
forAll(masterTimeDirs, i)
|
||||||
}
|
{
|
||||||
}
|
if (masterTimeDirs[i].name() == timeDirs[timeI].name())
|
||||||
|
{
|
||||||
|
foundTime = true;
|
||||||
// Set time for global database
|
break;
|
||||||
runTime.setTime(timeDirs[timeI], timeI);
|
}
|
||||||
|
}
|
||||||
Info<< "Time = " << runTime.timeName() << endl << endl;
|
if (foundTime)
|
||||||
|
{
|
||||||
// Set time for all databases
|
Info<< "Skipping time " << timeDirs[timeI].name()
|
||||||
forAll(databases, procI)
|
<< endl << endl;
|
||||||
{
|
continue;
|
||||||
databases[procI].setTime(timeDirs[timeI], timeI);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Check if any new meshes need to be read.
|
|
||||||
fvMesh::readUpdateState meshStat = mesh.readUpdate();
|
|
||||||
|
|
||||||
fvMesh::readUpdateState procStat = procMeshes.readUpdate();
|
|
||||||
|
|
||||||
if (procStat == fvMesh::POINTS_MOVED)
|
|
||||||
{
|
|
||||||
// Reconstruct the points for moving mesh cases and write them out
|
|
||||||
procMeshes.reconstructPoints(mesh);
|
|
||||||
}
|
|
||||||
else if (meshStat != procStat)
|
|
||||||
{
|
|
||||||
WarningIn(args.executable())
|
|
||||||
<< "readUpdate for the reconstructed mesh:" << meshStat << nl
|
|
||||||
<< "readUpdate for the processor meshes :" << procStat << nl
|
|
||||||
<< "These should be equal or your addressing"
|
|
||||||
<< " might be incorrect."
|
|
||||||
<< " Please check your time directories for any "
|
|
||||||
<< "mesh directories." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Get list of objects from processor0 database
|
|
||||||
IOobjectList objects(procMeshes.meshes()[0], databases[0].timeName());
|
|
||||||
|
|
||||||
{
|
|
||||||
// If there are any FV fields, reconstruct them
|
|
||||||
Info<< "Reconstructing FV fields" << nl << endl;
|
|
||||||
|
|
||||||
fvFieldReconstructor fvReconstructor
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
procMeshes.meshes(),
|
|
||||||
procMeshes.faceProcAddressing(),
|
|
||||||
procMeshes.cellProcAddressing(),
|
|
||||||
procMeshes.boundaryProcAddressing()
|
|
||||||
);
|
|
||||||
|
|
||||||
fvReconstructor.reconstructFvVolumeInternalFields<scalar>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeInternalFields<vector>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeInternalFields<sphericalTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeInternalFields<symmTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeInternalFields<tensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
|
|
||||||
fvReconstructor.reconstructFvVolumeFields<scalar>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeFields<vector>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeFields<sphericalTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeFields<symmTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvVolumeFields<tensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
|
|
||||||
fvReconstructor.reconstructFvSurfaceFields<scalar>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvSurfaceFields<vector>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvSurfaceFields<sphericalTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvSurfaceFields<symmTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
fvReconstructor.reconstructFvSurfaceFields<tensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
|
|
||||||
if (fvReconstructor.nReconstructed() == 0)
|
|
||||||
{
|
|
||||||
Info<< "No FV fields" << nl << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
Info<< "Reconstructing point fields" << nl << endl;
|
|
||||||
|
|
||||||
const pointMesh& pMesh = pointMesh::New(mesh);
|
|
||||||
PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
|
|
||||||
|
|
||||||
forAll(pMeshes, procI)
|
|
||||||
{
|
|
||||||
pMeshes.set(procI, new pointMesh(procMeshes.meshes()[procI]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pointFieldReconstructor pointReconstructor
|
|
||||||
(
|
|
||||||
pMesh,
|
|
||||||
pMeshes,
|
|
||||||
procMeshes.pointProcAddressing(),
|
|
||||||
procMeshes.boundaryProcAddressing()
|
|
||||||
);
|
|
||||||
|
|
||||||
pointReconstructor.reconstructFields<scalar>
|
// Set time for global database
|
||||||
(
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
pointReconstructor.reconstructFields<vector>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
pointReconstructor.reconstructFields<sphericalTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
pointReconstructor.reconstructFields<symmTensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
pointReconstructor.reconstructFields<tensor>
|
|
||||||
(
|
|
||||||
objects,
|
|
||||||
selectedFields
|
|
||||||
);
|
|
||||||
|
|
||||||
if (pointReconstructor.nReconstructed() == 0)
|
Info<< "Time = " << runTime.timeName() << endl << endl;
|
||||||
{
|
|
||||||
Info<< "No point fields" << nl << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// If there are any clouds, reconstruct them.
|
|
||||||
// The problem is that a cloud of size zero will not get written so
|
|
||||||
// in pass 1 we determine the cloud names and per cloud name the
|
|
||||||
// fields. Note that the fields are stored as IOobjectList from
|
|
||||||
// the first processor that has them. They are in pass2 only used
|
|
||||||
// for name and type (scalar, vector etc).
|
|
||||||
|
|
||||||
if (!noLagrangian)
|
|
||||||
{
|
|
||||||
HashTable<IOobjectList> cloudObjects;
|
|
||||||
|
|
||||||
|
// Set time for all databases
|
||||||
forAll(databases, procI)
|
forAll(databases, procI)
|
||||||
{
|
{
|
||||||
fileNameList cloudDirs
|
databases[procI].setTime(timeDirs[timeI], timeI);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if any new meshes need to be read.
|
||||||
|
fvMesh::readUpdateState meshStat = mesh.readUpdate();
|
||||||
|
|
||||||
|
fvMesh::readUpdateState procStat = procMeshes.readUpdate();
|
||||||
|
|
||||||
|
if (procStat == fvMesh::POINTS_MOVED)
|
||||||
|
{
|
||||||
|
// Reconstruct the points for moving mesh cases and write
|
||||||
|
// them out
|
||||||
|
procMeshes.reconstructPoints(mesh);
|
||||||
|
}
|
||||||
|
else if (meshStat != procStat)
|
||||||
|
{
|
||||||
|
WarningIn(args.executable())
|
||||||
|
<< "readUpdate for the reconstructed mesh:"
|
||||||
|
<< meshStat << nl
|
||||||
|
<< "readUpdate for the processor meshes :"
|
||||||
|
<< procStat << nl
|
||||||
|
<< "These should be equal or your addressing"
|
||||||
|
<< " might be incorrect."
|
||||||
|
<< " Please check your time directories for any "
|
||||||
|
<< "mesh directories." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get list of objects from processor0 database
|
||||||
|
IOobjectList objects
|
||||||
|
(
|
||||||
|
procMeshes.meshes()[0],
|
||||||
|
databases[0].timeName()
|
||||||
|
);
|
||||||
|
|
||||||
|
{
|
||||||
|
// If there are any FV fields, reconstruct them
|
||||||
|
Info<< "Reconstructing FV fields" << nl << endl;
|
||||||
|
|
||||||
|
fvFieldReconstructor fvReconstructor
|
||||||
(
|
(
|
||||||
readDir
|
mesh,
|
||||||
(
|
procMeshes.meshes(),
|
||||||
databases[procI].timePath() / regionDir / cloud::prefix,
|
procMeshes.faceProcAddressing(),
|
||||||
fileName::DIRECTORY
|
procMeshes.cellProcAddressing(),
|
||||||
)
|
procMeshes.boundaryProcAddressing()
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(cloudDirs, i)
|
fvReconstructor.reconstructFvVolumeInternalFields<scalar>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeInternalFields<vector>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeInternalFields
|
||||||
|
<sphericalTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeInternalFields<symmTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeInternalFields<tensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
|
||||||
|
fvReconstructor.reconstructFvVolumeFields<scalar>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeFields<vector>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeFields<sphericalTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeFields<symmTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvVolumeFields<tensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
|
||||||
|
fvReconstructor.reconstructFvSurfaceFields<scalar>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvSurfaceFields<vector>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvSurfaceFields<sphericalTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvSurfaceFields<symmTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
fvReconstructor.reconstructFvSurfaceFields<tensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
|
||||||
|
if (fvReconstructor.nReconstructed() == 0)
|
||||||
{
|
{
|
||||||
// Check if we already have cloud objects for this cloudname
|
Info<< "No FV fields" << nl << endl;
|
||||||
HashTable<IOobjectList>::const_iterator iter =
|
}
|
||||||
cloudObjects.find(cloudDirs[i]);
|
}
|
||||||
|
|
||||||
if (iter == cloudObjects.end())
|
{
|
||||||
{
|
Info<< "Reconstructing point fields" << nl << endl;
|
||||||
// Do local scan for valid cloud objects
|
|
||||||
IOobjectList sprayObjs
|
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||||
|
PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
|
||||||
|
|
||||||
|
forAll(pMeshes, procI)
|
||||||
|
{
|
||||||
|
pMeshes.set
|
||||||
|
(
|
||||||
|
procI,
|
||||||
|
new pointMesh(procMeshes.meshes()[procI])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
pointFieldReconstructor pointReconstructor
|
||||||
|
(
|
||||||
|
pMesh,
|
||||||
|
pMeshes,
|
||||||
|
procMeshes.pointProcAddressing(),
|
||||||
|
procMeshes.boundaryProcAddressing()
|
||||||
|
);
|
||||||
|
|
||||||
|
pointReconstructor.reconstructFields<scalar>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
pointReconstructor.reconstructFields<vector>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
pointReconstructor.reconstructFields<sphericalTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
pointReconstructor.reconstructFields<symmTensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
pointReconstructor.reconstructFields<tensor>
|
||||||
|
(
|
||||||
|
objects,
|
||||||
|
selectedFields
|
||||||
|
);
|
||||||
|
|
||||||
|
if (pointReconstructor.nReconstructed() == 0)
|
||||||
|
{
|
||||||
|
Info<< "No point fields" << nl << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// If there are any clouds, reconstruct them.
|
||||||
|
// The problem is that a cloud of size zero will not get written so
|
||||||
|
// in pass 1 we determine the cloud names and per cloud name the
|
||||||
|
// fields. Note that the fields are stored as IOobjectList from
|
||||||
|
// the first processor that has them. They are in pass2 only used
|
||||||
|
// for name and type (scalar, vector etc).
|
||||||
|
|
||||||
|
if (!noLagrangian)
|
||||||
|
{
|
||||||
|
HashTable<IOobjectList> cloudObjects;
|
||||||
|
|
||||||
|
forAll(databases, procI)
|
||||||
|
{
|
||||||
|
fileNameList cloudDirs
|
||||||
|
(
|
||||||
|
readDir
|
||||||
(
|
(
|
||||||
procMeshes.meshes()[procI],
|
databases[procI].timePath()
|
||||||
databases[procI].timeName(),
|
/ regionDir
|
||||||
cloud::prefix/cloudDirs[i]
|
/ cloud::prefix,
|
||||||
);
|
fileName::DIRECTORY
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
forAll(cloudDirs, i)
|
||||||
|
{
|
||||||
|
// Check if we already have cloud objects for this
|
||||||
|
// cloudname
|
||||||
|
HashTable<IOobjectList>::const_iterator iter =
|
||||||
|
cloudObjects.find(cloudDirs[i]);
|
||||||
|
|
||||||
if (positionsPtr)
|
if (iter == cloudObjects.end())
|
||||||
{
|
{
|
||||||
cloudObjects.insert(cloudDirs[i], sprayObjs);
|
// Do local scan for valid cloud objects
|
||||||
|
IOobjectList sprayObjs
|
||||||
|
(
|
||||||
|
procMeshes.meshes()[procI],
|
||||||
|
databases[procI].timeName(),
|
||||||
|
cloud::prefix/cloudDirs[i]
|
||||||
|
);
|
||||||
|
|
||||||
|
IOobject* positionsPtr = sprayObjs.lookup
|
||||||
|
(
|
||||||
|
"positions"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (positionsPtr)
|
||||||
|
{
|
||||||
|
cloudObjects.insert(cloudDirs[i], sprayObjs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (cloudObjects.size())
|
if (cloudObjects.size())
|
||||||
{
|
|
||||||
// Pass2: reconstruct the cloud
|
|
||||||
forAllConstIter(HashTable<IOobjectList>, cloudObjects, iter)
|
|
||||||
{
|
{
|
||||||
const word cloudName = string::validate<word>(iter.key());
|
// Pass2: reconstruct the cloud
|
||||||
|
forAllConstIter(HashTable<IOobjectList>, cloudObjects, iter)
|
||||||
|
{
|
||||||
|
const word cloudName = string::validate<word>
|
||||||
|
(
|
||||||
|
iter.key()
|
||||||
|
);
|
||||||
|
|
||||||
// Objects (on arbitrary processor)
|
// Objects (on arbitrary processor)
|
||||||
const IOobjectList& sprayObjs = iter();
|
const IOobjectList& sprayObjs = iter();
|
||||||
|
|
||||||
Info<< "Reconstructing lagrangian fields for cloud "
|
Info<< "Reconstructing lagrangian fields for cloud "
|
||||||
<< cloudName << nl << endl;
|
<< cloudName << nl << endl;
|
||||||
|
|
||||||
reconstructLagrangianPositions
|
reconstructLagrangianPositions
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
cloudName,
|
cloudName,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
procMeshes.faceProcAddressing(),
|
procMeshes.faceProcAddressing(),
|
||||||
procMeshes.cellProcAddressing()
|
procMeshes.cellProcAddressing()
|
||||||
);
|
);
|
||||||
reconstructLagrangianFields<label>
|
reconstructLagrangianFields<label>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFieldFields<label>
|
reconstructLagrangianFieldFields<label>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFields<scalar>
|
reconstructLagrangianFields<scalar>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFieldFields<scalar>
|
reconstructLagrangianFieldFields<scalar>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFields<vector>
|
reconstructLagrangianFields<vector>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFieldFields<vector>
|
reconstructLagrangianFieldFields<vector>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFields<sphericalTensor>
|
reconstructLagrangianFields<sphericalTensor>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFieldFields<sphericalTensor>
|
reconstructLagrangianFieldFields<sphericalTensor>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFields<symmTensor>
|
reconstructLagrangianFields<symmTensor>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFieldFields<symmTensor>
|
reconstructLagrangianFieldFields<symmTensor>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFields<tensor>
|
reconstructLagrangianFields<tensor>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
reconstructLagrangianFieldFields<tensor>
|
reconstructLagrangianFieldFields<tensor>
|
||||||
(
|
(
|
||||||
cloudName,
|
cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
procMeshes.meshes(),
|
procMeshes.meshes(),
|
||||||
sprayObjs,
|
sprayObjs,
|
||||||
selectedLagrangianFields
|
selectedLagrangianFields
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "No lagrangian fields" << nl << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Info<< "No lagrangian fields" << nl << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If there are any "uniform" directories copy them from
|
// If there are any "uniform" directories copy them from
|
||||||
// the master processor
|
// the master processor
|
||||||
|
forAll(timeDirs, timeI)
|
||||||
|
{
|
||||||
fileName uniformDir0 = databases[0].timePath()/"uniform";
|
fileName uniformDir0 = databases[0].timePath()/"uniform";
|
||||||
if (isDir(uniformDir0))
|
if (isDir(uniformDir0))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -107,7 +107,6 @@
|
|||||||
<BooleanDomain name="bool"/>
|
<BooleanDomain name="bool"/>
|
||||||
<Documentation>
|
<Documentation>
|
||||||
Use vtkPolyhedron instead of decomposing polyhedra.
|
Use vtkPolyhedron instead of decomposing polyhedra.
|
||||||
!!Actually uses vtkConvexPointSet until this is properly supported in VTK!!
|
|
||||||
</Documentation>
|
</Documentation>
|
||||||
</IntVectorProperty>
|
</IntVectorProperty>
|
||||||
|
|
||||||
@ -154,6 +153,20 @@
|
|||||||
</Documentation>
|
</Documentation>
|
||||||
</IntVectorProperty>
|
</IntVectorProperty>
|
||||||
|
|
||||||
|
<!-- Show Groups Only check-box -->
|
||||||
|
<IntVectorProperty
|
||||||
|
name="UiShowGroupsOnly"
|
||||||
|
command="SetShowGroupsOnly"
|
||||||
|
number_of_elements="1"
|
||||||
|
default_values="0"
|
||||||
|
is_internal="1"
|
||||||
|
animateable="0">
|
||||||
|
<BooleanDomain name="bool"/>
|
||||||
|
<Documentation>
|
||||||
|
Show groups only
|
||||||
|
</Documentation>
|
||||||
|
</IntVectorProperty>
|
||||||
|
|
||||||
<!-- Force GUI update check box -->
|
<!-- Force GUI update check box -->
|
||||||
<IntVectorProperty
|
<IntVectorProperty
|
||||||
name="UpdateGUI"
|
name="UpdateGUI"
|
||||||
@ -193,7 +206,8 @@
|
|||||||
</RequiredProperties>
|
</RequiredProperties>
|
||||||
</ArraySelectionDomain>
|
</ArraySelectionDomain>
|
||||||
<Documentation>
|
<Documentation>
|
||||||
This property contains a list of the mesh parts (patches, sets, zones).
|
This property contains a list of the mesh parts
|
||||||
|
(patches, groups, sets, zones).
|
||||||
</Documentation>
|
</Documentation>
|
||||||
</StringVectorProperty>
|
</StringVectorProperty>
|
||||||
|
|
||||||
@ -281,6 +295,7 @@
|
|||||||
<Property name="UiZeroTime" show="0"/>
|
<Property name="UiZeroTime" show="0"/>
|
||||||
<Property name="UiRefresh" show="0"/>
|
<Property name="UiRefresh" show="0"/>
|
||||||
<Property name="UiShowPatchNames" show="0"/>
|
<Property name="UiShowPatchNames" show="0"/>
|
||||||
|
<Property name="UiShowGroupsOnly" show="0"/>
|
||||||
<Property name="UiIncludeSets" show="0"/>
|
<Property name="UiIncludeSets" show="0"/>
|
||||||
<Property name="UiIncludeZones" show="0"/>
|
<Property name="UiIncludeZones" show="0"/>
|
||||||
</Hints>
|
</Hints>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,7 +109,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
|
|
||||||
QFrame* hline1 = new QFrame(this);
|
QFrame* hline1 = new QFrame(this);
|
||||||
hline1->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
hline1->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
||||||
form->addWidget(hline1, 1, 0, 1, 2);
|
form->addWidget(hline1, 1, 0, 1, 3);
|
||||||
|
|
||||||
// checkbox for caching mesh
|
// checkbox for caching mesh
|
||||||
if ((prop = this->proxy()->GetProperty("UiCacheMesh")) != 0)
|
if ((prop = this->proxy()->GetProperty("UiCacheMesh")) != 0)
|
||||||
@ -166,6 +166,34 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// checkbox for Groups Only
|
||||||
|
if ((prop = this->proxy()->GetProperty("UiShowGroupsOnly")) != 0)
|
||||||
|
{
|
||||||
|
// immediate update on the Server Manager side
|
||||||
|
prop->SetImmediateUpdate(true);
|
||||||
|
|
||||||
|
ShowGroupsOnly_ = new QCheckBox("Groups Only");
|
||||||
|
ShowGroupsOnly_->setChecked
|
||||||
|
(
|
||||||
|
vtkSMIntVectorProperty::SafeDownCast(prop)->GetElement(0)
|
||||||
|
);
|
||||||
|
ShowGroupsOnly_->setToolTip
|
||||||
|
(
|
||||||
|
"Show patchGroups only."
|
||||||
|
);
|
||||||
|
|
||||||
|
// row/col 2, 2
|
||||||
|
form->addWidget(ShowGroupsOnly_, 2, 2, Qt::AlignLeft);
|
||||||
|
connect
|
||||||
|
(
|
||||||
|
ShowGroupsOnly_,
|
||||||
|
SIGNAL(stateChanged(int)),
|
||||||
|
this,
|
||||||
|
SLOT(ShowGroupsOnlyToggled())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// checkbox for include sets
|
// checkbox for include sets
|
||||||
if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0)
|
if ((prop = this->proxy()->GetProperty("UiIncludeSets")) != 0)
|
||||||
{
|
{
|
||||||
@ -278,7 +306,7 @@ pqPV3FoamReaderPanel::pqPV3FoamReaderPanel
|
|||||||
|
|
||||||
QFrame* hline2 = new QFrame(this);
|
QFrame* hline2 = new QFrame(this);
|
||||||
hline2->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
hline2->setFrameStyle(QFrame::HLine | QFrame::Sunken);
|
||||||
form->addWidget(hline2, 5, 0, 1, 2);
|
form->addWidget(hline2, 5, 0, 1, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -336,6 +364,22 @@ void pqPV3FoamReaderPanel::ShowPatchNamesToggled()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void pqPV3FoamReaderPanel::ShowGroupsOnlyToggled()
|
||||||
|
{
|
||||||
|
vtkSMProperty* prop;
|
||||||
|
|
||||||
|
vtkSMIntVectorProperty::SafeDownCast
|
||||||
|
(
|
||||||
|
this->proxy()->GetProperty("UiShowGroupsOnly")
|
||||||
|
)->SetElement(0, ShowGroupsOnly_->isChecked());
|
||||||
|
|
||||||
|
if ((prop = this->proxy()->GetProperty("PartArrayStatus")) != 0)
|
||||||
|
{
|
||||||
|
this->proxy()->UpdatePropertyInformation(prop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void pqPV3FoamReaderPanel::IncludeSetsToggled()
|
void pqPV3FoamReaderPanel::IncludeSetsToggled()
|
||||||
{
|
{
|
||||||
vtkSMProperty* prop;
|
vtkSMProperty* prop;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,6 +71,9 @@ class pqPV3FoamReaderPanel
|
|||||||
//- Show Patch Names checkbox
|
//- Show Patch Names checkbox
|
||||||
QCheckBox* ShowPatchNames_;
|
QCheckBox* ShowPatchNames_;
|
||||||
|
|
||||||
|
//- Show Groups Only checkbox
|
||||||
|
QCheckBox* ShowGroupsOnly_;
|
||||||
|
|
||||||
//- IncludeSets checkbox
|
//- IncludeSets checkbox
|
||||||
QCheckBox* IncludeSets_;
|
QCheckBox* IncludeSets_;
|
||||||
|
|
||||||
@ -90,6 +93,7 @@ protected slots:
|
|||||||
void ZeroTimeToggled();
|
void ZeroTimeToggled();
|
||||||
void RefreshPressed();
|
void RefreshPressed();
|
||||||
void ShowPatchNamesToggled();
|
void ShowPatchNamesToggled();
|
||||||
|
void ShowGroupsOnlyToggled();
|
||||||
void IncludeSetsToggled();
|
void IncludeSetsToggled();
|
||||||
void IncludeZonesToggled();
|
void IncludeZonesToggled();
|
||||||
void InterpolateVolFieldsToggled();
|
void InterpolateVolFieldsToggled();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -85,6 +85,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
|
|||||||
IncludeSets = 0;
|
IncludeSets = 0;
|
||||||
IncludeZones = 0;
|
IncludeZones = 0;
|
||||||
ShowPatchNames = 0;
|
ShowPatchNames = 0;
|
||||||
|
ShowGroupsOnly = 0;
|
||||||
InterpolateVolFields = 1;
|
InterpolateVolFields = 1;
|
||||||
|
|
||||||
UpdateGUI = 0;
|
UpdateGUI = 0;
|
||||||
@ -463,6 +464,19 @@ void vtkPV3FoamReader::SetShowPatchNames(int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void vtkPV3FoamReader::SetShowGroupsOnly(int val)
|
||||||
|
{
|
||||||
|
if (ShowGroupsOnly != val)
|
||||||
|
{
|
||||||
|
ShowGroupsOnly = val;
|
||||||
|
if (foamData_)
|
||||||
|
{
|
||||||
|
foamData_->updateInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void vtkPV3FoamReader::updatePatchNamesView(const bool show)
|
void vtkPV3FoamReader::updatePatchNamesView(const bool show)
|
||||||
{
|
{
|
||||||
pqApplicationCore* appCore = pqApplicationCore::instance();
|
pqApplicationCore* appCore = pqApplicationCore::instance();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -121,6 +121,11 @@ public:
|
|||||||
virtual void SetShowPatchNames(int);
|
virtual void SetShowPatchNames(int);
|
||||||
vtkGetMacro(ShowPatchNames, int);
|
vtkGetMacro(ShowPatchNames, int);
|
||||||
|
|
||||||
|
// Description:
|
||||||
|
// OpenFOAM display patchGroups
|
||||||
|
virtual void SetShowGroupsOnly(int);
|
||||||
|
vtkGetMacro(ShowGroupsOnly, int);
|
||||||
|
|
||||||
// Description:
|
// Description:
|
||||||
// OpenFOAM volField interpolation
|
// OpenFOAM volField interpolation
|
||||||
vtkSetMacro(InterpolateVolFields, int);
|
vtkSetMacro(InterpolateVolFields, int);
|
||||||
@ -231,6 +236,7 @@ private:
|
|||||||
int IncludeSets;
|
int IncludeSets;
|
||||||
int IncludeZones;
|
int IncludeZones;
|
||||||
int ShowPatchNames;
|
int ShowPatchNames;
|
||||||
|
int ShowGroupsOnly;
|
||||||
int InterpolateVolFields;
|
int InterpolateVolFields;
|
||||||
|
|
||||||
//- Dummy variable/switch to invoke a reader update
|
//- Dummy variable/switch to invoke a reader update
|
||||||
|
|||||||
@ -2,7 +2,6 @@ vtkPV3Foam.C
|
|||||||
vtkPV3FoamFields.C
|
vtkPV3FoamFields.C
|
||||||
vtkPV3FoamMesh.C
|
vtkPV3FoamMesh.C
|
||||||
vtkPV3FoamMeshLagrangian.C
|
vtkPV3FoamMeshLagrangian.C
|
||||||
vtkPV3FoamMeshPatch.C
|
|
||||||
vtkPV3FoamMeshSet.C
|
vtkPV3FoamMeshSet.C
|
||||||
vtkPV3FoamMeshVolume.C
|
vtkPV3FoamMeshVolume.C
|
||||||
vtkPV3FoamMeshZone.C
|
vtkPV3FoamMeshZone.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,7 +33,7 @@ SourceFiles
|
|||||||
vtkPV3FoamFields.C
|
vtkPV3FoamFields.C
|
||||||
vtkPV3FoamMesh.C
|
vtkPV3FoamMesh.C
|
||||||
vtkPV3FoamMeshLagrangian.C
|
vtkPV3FoamMeshLagrangian.C
|
||||||
vtkPV3FoamMeshPatch.C
|
vtkPV3FoamTemplates.C
|
||||||
vtkPV3FoamMeshSet.C
|
vtkPV3FoamMeshSet.C
|
||||||
vtkPV3FoamMeshVolume.C
|
vtkPV3FoamMeshVolume.C
|
||||||
vtkPV3FoamMeshZone.C
|
vtkPV3FoamMeshZone.C
|
||||||
@ -443,7 +443,8 @@ class vtkPV3Foam
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Add patch mesh
|
//- Add patch mesh
|
||||||
vtkPolyData* patchVTKMesh(const polyPatch&);
|
template<class PatchType>
|
||||||
|
vtkPolyData* patchVTKMesh(const word& name, const PatchType&);
|
||||||
|
|
||||||
//- Add face zone mesh
|
//- Add face zone mesh
|
||||||
vtkPolyData* faceZoneVTKMesh
|
vtkPolyData* faceZoneVTKMesh
|
||||||
@ -736,6 +737,12 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "vtkPV3FoamTemplates.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,6 +31,7 @@ License
|
|||||||
#include "pointSet.H"
|
#include "pointSet.H"
|
||||||
#include "fvMeshSubset.H"
|
#include "fvMeshSubset.H"
|
||||||
#include "vtkPV3FoamReader.h"
|
#include "vtkPV3FoamReader.h"
|
||||||
|
#include "uindirectPrimitivePatch.H"
|
||||||
|
|
||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkDataArraySelection.h"
|
#include "vtkDataArraySelection.h"
|
||||||
@ -171,21 +172,50 @@ void Foam::vtkPV3Foam::convertMeshPatches
|
|||||||
|
|
||||||
for (int partId = range.start(); partId < range.end(); ++partId)
|
for (int partId = range.start(); partId < range.end(); ++partId)
|
||||||
{
|
{
|
||||||
const word patchName = getPartName(partId);
|
if (!partStatus_[partId])
|
||||||
const label patchId = patches.findPatchID(patchName);
|
|
||||||
|
|
||||||
if (!partStatus_[partId] || patchId < 0)
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const word patchName = getPartName(partId);
|
||||||
|
|
||||||
|
labelHashSet patchIds(patches.patchSet(List<wordRe>(1, patchName)));
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "Creating VTK mesh for patch[" << patchId <<"] "
|
Info<< "Creating VTK mesh for patches [" << patchIds <<"] "
|
||||||
<< patchName << endl;
|
<< patchName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = patchVTKMesh(patches[patchId]);
|
vtkPolyData* vtkmesh = NULL;
|
||||||
|
if (patchIds.size() == 1)
|
||||||
|
{
|
||||||
|
vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Patch group. Collect patch faces.
|
||||||
|
label sz = 0;
|
||||||
|
forAllConstIter(labelHashSet, patchIds, iter)
|
||||||
|
{
|
||||||
|
sz += patches[iter.key()].size();
|
||||||
|
}
|
||||||
|
labelList meshFaceLabels(sz);
|
||||||
|
sz = 0;
|
||||||
|
forAllConstIter(labelHashSet, patchIds, iter)
|
||||||
|
{
|
||||||
|
const polyPatch& pp = patches[iter.key()];
|
||||||
|
forAll(pp, i)
|
||||||
|
{
|
||||||
|
meshFaceLabels[sz++] = pp.start()+i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UIndirectList<face> fcs(mesh.faces(), meshFaceLabels);
|
||||||
|
uindirectPrimitivePatch pp(fcs, mesh.points());
|
||||||
|
|
||||||
|
vtkmesh = patchVTKMesh(patchName, pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (vtkmesh)
|
if (vtkmesh)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,13 +37,18 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh(const polyPatch& p)
|
template<class PatchType>
|
||||||
|
vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const PatchType& p
|
||||||
|
)
|
||||||
{
|
{
|
||||||
vtkPolyData* vtkmesh = vtkPolyData::New();
|
vtkPolyData* vtkmesh = vtkPolyData::New();
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::patchVTKMesh - " << p.name() << endl;
|
Info<< "<beg> Foam::vtkPV3Foam::patchVTKMesh - " << name << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +88,7 @@ vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh(const polyPatch& p)
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV3Foam::patchVTKMesh - " << p.name() << endl;
|
Info<< "<end> Foam::vtkPV3Foam::patchVTKMesh - " << name << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -241,7 +241,6 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
|||||||
{
|
{
|
||||||
const polyBoundaryMesh& patches = meshPtr_->boundaryMesh();
|
const polyBoundaryMesh& patches = meshPtr_->boundaryMesh();
|
||||||
const HashTable<labelList, word>& groups = patches.groupPatchIDs();
|
const HashTable<labelList, word>& groups = patches.groupPatchIDs();
|
||||||
|
|
||||||
const wordList allPatchNames = patches.names();
|
const wordList allPatchNames = patches.names();
|
||||||
|
|
||||||
// Add patch groups
|
// Add patch groups
|
||||||
@ -273,13 +272,19 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
|||||||
|
|
||||||
if (enabledEntriesSet.found(vtkGrpName))
|
if (enabledEntriesSet.found(vtkGrpName))
|
||||||
{
|
{
|
||||||
forAll(patchIDs, i)
|
if (!reader_->GetShowGroupsOnly())
|
||||||
{
|
{
|
||||||
const polyPatch& pp = patches[patchIDs[i]];
|
enabledEntriesSet.erase(vtkGrpName);
|
||||||
string vtkPatchName = pp.name() + " - patch";
|
forAll(patchIDs, i)
|
||||||
enabledEntriesSet.insert(vtkPatchName);
|
{
|
||||||
|
const polyPatch& pp = patches[patchIDs[i]];
|
||||||
|
if (pp.size())
|
||||||
|
{
|
||||||
|
string vtkPatchName = pp.name() + " - patch";
|
||||||
|
enabledEntriesSet.insert(vtkPatchName);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
enabledEntriesSet.erase(vtkGrpName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -288,19 +293,22 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
|||||||
// Add patches
|
// Add patches
|
||||||
// ~~~~~~~~~~~
|
// ~~~~~~~~~~~
|
||||||
|
|
||||||
forAll(patches, patchI)
|
if (!reader_->GetShowGroupsOnly())
|
||||||
{
|
{
|
||||||
const polyPatch& pp = patches[patchI];
|
forAll(patches, patchI)
|
||||||
|
|
||||||
if (pp.size())
|
|
||||||
{
|
{
|
||||||
// Add patch to GUI list
|
const polyPatch& pp = patches[patchI];
|
||||||
arraySelection->AddArray
|
|
||||||
(
|
|
||||||
(pp.name() + " - patch").c_str()
|
|
||||||
);
|
|
||||||
|
|
||||||
++nPatches;
|
if (pp.size())
|
||||||
|
{
|
||||||
|
// Add patch to GUI list
|
||||||
|
arraySelection->AddArray
|
||||||
|
(
|
||||||
|
(pp.name() + " - patch").c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
++nPatches;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -356,6 +364,7 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
|||||||
|
|
||||||
wordList groupNames;
|
wordList groupNames;
|
||||||
patchDict.readIfPresent("inGroups", groupNames);
|
patchDict.readIfPresent("inGroups", groupNames);
|
||||||
|
|
||||||
forAll(groupNames, groupI)
|
forAll(groupNames, groupI)
|
||||||
{
|
{
|
||||||
HashTable<labelList, word>::iterator iter = groups.find
|
HashTable<labelList, word>::iterator iter = groups.find
|
||||||
@ -394,20 +403,25 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
|||||||
if (nFaces)
|
if (nFaces)
|
||||||
{
|
{
|
||||||
string vtkGrpName = groupName + " - group";
|
string vtkGrpName = groupName + " - group";
|
||||||
|
|
||||||
arraySelection->AddArray(vtkGrpName.c_str());
|
arraySelection->AddArray(vtkGrpName.c_str());
|
||||||
|
|
||||||
++nPatches;
|
++nPatches;
|
||||||
|
|
||||||
if (enabledEntriesSet.found(vtkGrpName))
|
if (enabledEntriesSet.found(vtkGrpName))
|
||||||
{
|
{
|
||||||
forAll(patchIDs, i)
|
if (!reader_->GetShowGroupsOnly())
|
||||||
{
|
{
|
||||||
string vtkPatchName =
|
enabledEntriesSet.erase(vtkGrpName);
|
||||||
names[patchIDs[i]] + " - patch";
|
forAll(patchIDs, i)
|
||||||
enabledEntriesSet.insert(vtkPatchName);
|
{
|
||||||
|
if (sizes[patchIDs[i]])
|
||||||
|
{
|
||||||
|
string vtkPatchName =
|
||||||
|
names[patchIDs[i]] + " - patch";
|
||||||
|
enabledEntriesSet.insert(vtkPatchName);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
enabledEntriesSet.erase(vtkGrpName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -416,17 +430,20 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
|||||||
// Add (non-zero) patches to the list of mesh parts
|
// Add (non-zero) patches to the list of mesh parts
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
forAll(names, patchI)
|
if (!reader_->GetShowGroupsOnly())
|
||||||
{
|
{
|
||||||
// Valid patch if nFace > 0 - add patch to GUI list
|
forAll(names, patchI)
|
||||||
if (sizes[patchI])
|
|
||||||
{
|
{
|
||||||
arraySelection->AddArray
|
// Valid patch if nFace > 0 - add patch to GUI list
|
||||||
(
|
if (sizes[patchI])
|
||||||
(names[patchI] + " - patch").c_str()
|
{
|
||||||
);
|
arraySelection->AddArray
|
||||||
|
(
|
||||||
|
(names[patchI] + " - patch").c_str()
|
||||||
|
);
|
||||||
|
|
||||||
++nPatches;
|
++nPatches;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,18 +73,18 @@ extern "C"
|
|||||||
makeRemovablePatchTypeField
|
makeRemovablePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatch${FieldType},
|
fvPatch${FieldType},
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const char* const ${typeName}FixedValueFvPatch${FieldType}::SHA1sum =
|
const char* const ${typeName}MixedValueFvPatch${FieldType}::SHA1sum =
|
||||||
"${SHA1sum}";
|
"${SHA1sum}";
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
${typeName}FixedValueFvPatch${FieldType}::
|
${typeName}MixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||||
@ -100,10 +100,10 @@ ${typeName}FixedValueFvPatch${FieldType}
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatch${FieldType}::
|
${typeName}MixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
const ${typeName}MixedValueFvPatch${FieldType}& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
@ -119,8 +119,8 @@ ${typeName}FixedValueFvPatch${FieldType}
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatch${FieldType}::
|
${typeName}MixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||||
@ -137,10 +137,10 @@ ${typeName}FixedValueFvPatch${FieldType}
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatch${FieldType}::
|
${typeName}MixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf
|
const ${typeName}MixedValueFvPatch${FieldType}& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchField<${TemplateType}>(ptf)
|
mixedFvPatchField<${TemplateType}>(ptf)
|
||||||
@ -153,10 +153,10 @@ ${typeName}FixedValueFvPatch${FieldType}
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
${typeName}FixedValueFvPatch${FieldType}::
|
${typeName}MixedValueFvPatch${FieldType}::
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
const ${typeName}MixedValueFvPatch${FieldType}& ptf,
|
||||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
@ -172,8 +172,8 @@ ${typeName}FixedValueFvPatch${FieldType}
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
${typeName}FixedValueFvPatch${FieldType}::
|
${typeName}MixedValueFvPatch${FieldType}::
|
||||||
~${typeName}FixedValueFvPatch${FieldType}()
|
~${typeName}MixedValueFvPatch${FieldType}()
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -184,7 +184,7 @@ ${typeName}FixedValueFvPatch${FieldType}::
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void ${typeName}FixedValueFvPatch${FieldType}::updateCoeffs()
|
void ${typeName}MixedValueFvPatch${FieldType}::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -43,10 +43,10 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
A templated FixedValueFvPatch
|
A templated MixedValueFvPatchField
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class ${typeName}FixedValueFvPatch${FieldType}
|
class ${typeName}MixedValueFvPatch${FieldType}
|
||||||
:
|
:
|
||||||
public mixedFvPatchField<${TemplateType}>
|
public mixedFvPatchField<${TemplateType}>
|
||||||
{
|
{
|
||||||
@ -62,14 +62,14 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<${TemplateType}, volMesh>&
|
const DimensionedField<${TemplateType}, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and dictionary
|
//- Construct from patch, internal field and dictionary
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<${TemplateType}, volMesh>&,
|
const DimensionedField<${TemplateType}, volMesh>&,
|
||||||
@ -77,18 +77,18 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping a copy onto a new patch
|
//- Construct by mapping a copy onto a new patch
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatch${FieldType}&,
|
const ${typeName}MixedValueFvPatch${FieldType}&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<${TemplateType}, volMesh>&,
|
const DimensionedField<${TemplateType}, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatch${FieldType}&
|
const ${typeName}MixedValueFvPatch${FieldType}&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
@ -96,14 +96,14 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp< fvPatch${FieldType} >
|
return tmp< fvPatch${FieldType} >
|
||||||
(
|
(
|
||||||
new ${typeName}FixedValueFvPatch${FieldType}(*this)
|
new ${typeName}MixedValueFvPatch${FieldType}(*this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
${typeName}FixedValueFvPatch${FieldType}
|
${typeName}MixedValueFvPatch${FieldType}
|
||||||
(
|
(
|
||||||
const ${typeName}FixedValueFvPatch${FieldType}&,
|
const ${typeName}MixedValueFvPatch${FieldType}&,
|
||||||
const DimensionedField<${TemplateType}, volMesh>&
|
const DimensionedField<${TemplateType}, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -115,13 +115,13 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp< fvPatch${FieldType} >
|
return tmp< fvPatch${FieldType} >
|
||||||
(
|
(
|
||||||
new ${typeName}FixedValueFvPatch${FieldType}(*this, iF)
|
new ${typeName}MixedValueFvPatch${FieldType}(*this, iF)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~${typeName}FixedValueFvPatch${FieldType}();
|
virtual ~${typeName}MixedValueFvPatch${FieldType}();
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -989,7 +989,7 @@ DimensionSets
|
|||||||
|
|
||||||
// Set of units used for printing. Can be any basic or derived
|
// Set of units used for printing. Can be any basic or derived
|
||||||
// but not scaled (only supported for dimensionedScalar, etc)
|
// but not scaled (only supported for dimensionedScalar, etc)
|
||||||
printUnits (kg m s K mol A Cd);
|
writeUnits (kg m s K mol A Cd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,11 +104,8 @@ Foam::functionEntries::codeStream::getFunction
|
|||||||
|
|
||||||
// codeName: codeStream + _<sha1>
|
// codeName: codeStream + _<sha1>
|
||||||
// codeDir : _<sha1>
|
// codeDir : _<sha1>
|
||||||
dynamicCode dynCode
|
std::string sha1Str(context.sha1().str(true));
|
||||||
(
|
dynamicCode dynCode("codeStream" + sha1Str, sha1Str);
|
||||||
"codeStream" + context.sha1().str(true),
|
|
||||||
context.sha1().str(true)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Load library if not already loaded
|
// Load library if not already loaded
|
||||||
// Version information is encoded in the libPath (encoded with the SHA1)
|
// Version information is encoded in the libPath (encoded with the SHA1)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,7 +104,7 @@ protected:
|
|||||||
virtual void prepare
|
virtual void prepare
|
||||||
(
|
(
|
||||||
dynamicCode&,
|
dynamicCode&,
|
||||||
const dynamicCodeContext &
|
const dynamicCodeContext&
|
||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
// Return a description (type + name) for the output
|
// Return a description (type + name) for the output
|
||||||
|
|||||||
@ -43,7 +43,9 @@ Description
|
|||||||
|
|
||||||
code
|
code
|
||||||
#{
|
#{
|
||||||
this->refValue() = min(10, 0.1*this->db().time().value());
|
this->refValue() =
|
||||||
|
vector(1, 0, 0)
|
||||||
|
*min(10, 0.1*this->db().time().value());
|
||||||
this->refGrad() = vector::zero;
|
this->refGrad() = vector::zero;
|
||||||
this->valueFraction() = 1.0;
|
this->valueFraction() = 1.0;
|
||||||
#};
|
#};
|
||||||
|
|||||||
@ -26,6 +26,7 @@ License
|
|||||||
#include "writeDictionary.H"
|
#include "writeDictionary.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
#include "HashSet.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -108,7 +109,9 @@ Foam::writeDictionary::~writeDictionary()
|
|||||||
|
|
||||||
void Foam::writeDictionary::read(const dictionary& dict)
|
void Foam::writeDictionary::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
dict.lookup("dictNames") >> dictNames_;
|
wordList dictNames(dict.lookup("dictNames"));
|
||||||
|
HashSet<word> uniqueNames(dictNames);
|
||||||
|
dictNames_ = uniqueNames.toc();
|
||||||
|
|
||||||
digests_.setSize(dictNames_.size(), SHA1Digest());
|
digests_.setSize(dictNames_.size(), SHA1Digest());
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,11 @@ Class
|
|||||||
regionProperties
|
regionProperties
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple class to hold region information for coupled region simulations
|
Simple class to hold region information for coupled region simulations.
|
||||||
|
|
||||||
|
Gives per physics ('fluid', 'solid') the names of the regions. There
|
||||||
|
is no assumption on this level that one region should only have one
|
||||||
|
set of physics.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
regionProperties.C
|
regionProperties.C
|
||||||
|
|||||||
@ -31,27 +31,18 @@ done
|
|||||||
#runApplication `getApplication`
|
#runApplication `getApplication`
|
||||||
|
|
||||||
# Decompose
|
# Decompose
|
||||||
for i in bottomAir topAir heater leftSolid rightSolid
|
runApplication decomposePar -allRegions
|
||||||
do
|
|
||||||
decomposePar -region $i > log.decomposePar.$i 2>&1
|
|
||||||
done
|
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
runParallel `getApplication` 4
|
runParallel `getApplication` 4
|
||||||
|
|
||||||
# Reconstruct
|
# Reconstruct
|
||||||
for i in bottomAir topAir heater leftSolid rightSolid
|
runApplication reconstructPar -allRegions
|
||||||
do
|
|
||||||
reconstructPar -region $i > log.reconstructPar.$i2 >&1
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "creating files for paraview post-processing"
|
echo "creating files for paraview post-processing"
|
||||||
echo
|
echo
|
||||||
for i in bottomAir topAir heater leftSolid rightSolid
|
paraFoam -touchAll
|
||||||
do
|
|
||||||
paraFoam -touch -region $i
|
|
||||||
done
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -31,19 +31,13 @@ done
|
|||||||
#runApplication chtMultiRegionFoam
|
#runApplication chtMultiRegionFoam
|
||||||
|
|
||||||
# Decompose
|
# Decompose
|
||||||
for i in bottomWater topAir heater leftSolid rightSolid
|
runApplication decomposePar -allRegions
|
||||||
do
|
|
||||||
decomposePar -region $i > log.decomposePar.$i 2>&1
|
|
||||||
done
|
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
runParallel `getApplication` 4
|
runParallel `getApplication` 4
|
||||||
|
|
||||||
# Reconstruct
|
# Reconstruct
|
||||||
for i in bottomWater topAir heater leftSolid rightSolid
|
runApplication reconstructPar -allRegions
|
||||||
do
|
|
||||||
reconstructPar -region $i > log.reconstructPar.$i 2>&1
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
@ -36,27 +36,18 @@ runApplication `getApplication`
|
|||||||
|
|
||||||
|
|
||||||
## Decompose
|
## Decompose
|
||||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
#runApplication decomposePar -allRegions
|
||||||
#do
|
|
||||||
# decomposePar -region $i > log.decomposePar.$i 2>&1
|
|
||||||
#done
|
|
||||||
#
|
#
|
||||||
## Run
|
## Run
|
||||||
#runParallel `getApplication` 4
|
#runParallel `getApplication` 4
|
||||||
#
|
#
|
||||||
## Reconstruct
|
## Reconstruct
|
||||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
#runApplication reconstructPar -allRegions
|
||||||
#do
|
|
||||||
# reconstructPar -region $i > log.reconstructPar.$i 2>&1
|
|
||||||
#done
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "creating files for paraview post-processing"
|
echo "creating files for paraview post-processing"
|
||||||
echo
|
echo
|
||||||
for i in bottomAir topAir heater leftSolid rightSolid
|
paraFoam -touchAll
|
||||||
do
|
|
||||||
paraFoam -touch -region $i
|
|
||||||
done
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -31,19 +31,13 @@ done
|
|||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
## Decompose
|
## Decompose
|
||||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
#runApplication decomposePar -allRegions
|
||||||
#do
|
|
||||||
# decomposePar -region $i > log.decomposePar.$i 2>&1
|
|
||||||
#done
|
|
||||||
#
|
#
|
||||||
## Run
|
## Run
|
||||||
#runParallel `getApplication` 4
|
#runParallel `getApplication` 4
|
||||||
#
|
#
|
||||||
## Reconstruct
|
## Reconstruct
|
||||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
#runApplication reconstructPar -allRegions
|
||||||
#do
|
|
||||||
# reconstructPar -region $i > log.reconstructPar.$i 2>&1
|
|
||||||
#done
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
@ -44,10 +44,7 @@ runApplication `getApplication`
|
|||||||
|
|
||||||
## Run in parallel
|
## Run in parallel
|
||||||
## Decompose
|
## Decompose
|
||||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
#runApplication decomposePar -allRegions
|
||||||
#do
|
|
||||||
# decomposePar -region $i > log.decomposePar.$i 2>&1
|
|
||||||
#done
|
|
||||||
#
|
#
|
||||||
#for i in bottomAir topAir
|
#for i in bottomAir topAir
|
||||||
#do
|
#do
|
||||||
@ -63,10 +60,7 @@ runApplication `getApplication`
|
|||||||
#runParallel `getApplication` 4
|
#runParallel `getApplication` 4
|
||||||
#
|
#
|
||||||
## Reconstruct
|
## Reconstruct
|
||||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
#runApplication reconstructPar -allRegions
|
||||||
#do
|
|
||||||
# reconstructPar -region $i > log.reconstructPar.$i 2>&1
|
|
||||||
#done
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user