mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
Info<< "Reading field p\n" << endl;
|
Info<< "Reading field p\n" << endl;
|
||||||
volScalarField p
|
volScalarField p
|
||||||
(
|
(
|
||||||
@ -33,7 +32,7 @@
|
|||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
Application
|
||||||
turbDyMFoam
|
pimpleDyMFoam.C
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Transient solver for incompressible, flow of Newtonian fluids
|
Transient solver for incompressible, flow of Newtonian fluids
|
||||||
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createDynamicFvMesh.H"
|
# include "createDynamicFvMesh.H"
|
||||||
# include "readPISOControls.H"
|
# include "readPIMPLEControls.H"
|
||||||
# include "initContinuityErrs.H"
|
# include "initContinuityErrs.H"
|
||||||
# include "createFields.H"
|
# include "createFields.H"
|
||||||
# include "readTimeControls.H"
|
# include "readTimeControls.H"
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
# include "readTimeControls.H"
|
# include "readTimeControls.H"
|
||||||
# include "readPISOControls.H"
|
# include "readPIMPLEControls.H"
|
||||||
|
|
||||||
bool correctPhi = false;
|
bool correctPhi = false;
|
||||||
if (piso.found("correctPhi"))
|
if (pimple.found("correctPhi"))
|
||||||
{
|
{
|
||||||
correctPhi = Switch(piso.lookup("correctPhi"));
|
correctPhi = Switch(pimple.lookup("correctPhi"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool checkMeshCourantNo = false;
|
bool checkMeshCourantNo = false;
|
||||||
if (piso.found("checkMeshCourantNo"))
|
if (pimple.found("checkMeshCourantNo"))
|
||||||
{
|
{
|
||||||
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
|
checkMeshCourantNo = Switch(pimple.lookup("checkMeshCourantNo"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,8 @@ Description
|
|||||||
|
|
||||||
#include "UIndirectList.H"
|
#include "UIndirectList.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
#include "ListOps.H"
|
||||||
|
#include "OFstream.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -52,29 +54,32 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
UIndirectList<double> idl(completeList, addresses);
|
UIndirectList<double> idl(completeList, addresses);
|
||||||
|
|
||||||
forAll(idl, i)
|
Info<< idl << "\n";
|
||||||
{
|
|
||||||
Info<< idl[i] << token::SPACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
|
|
||||||
idl[1] = -666;
|
idl[1] = -666;
|
||||||
|
|
||||||
Info<< "idl[1] changed:" << idl() << endl;
|
Info<< "idl[1] changed:" << idl << endl;
|
||||||
|
|
||||||
idl = -999;
|
idl = -999;
|
||||||
|
|
||||||
Info<< "idl changed:" << idl() << endl;
|
Info<< "idl changed:" << idl << endl;
|
||||||
|
|
||||||
UIndirectList<double> idl2(idl);
|
UIndirectList<double> idl2(idl);
|
||||||
|
|
||||||
Info<< "idl2:" << idl2() << endl;
|
Info<< "idl2: " << idl2 << endl;
|
||||||
|
|
||||||
idl = idl2();
|
|
||||||
|
|
||||||
Info<< "idl assigned from UList:" << idl() << endl;
|
{
|
||||||
|
List<double> ident(idl.size());
|
||||||
|
|
||||||
|
forAll(ident, i)
|
||||||
|
{
|
||||||
|
ident[i] = ident.size() - i;
|
||||||
|
}
|
||||||
|
idl = ident;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "idl assigned from UList:" << idl << endl;
|
||||||
|
|
||||||
List<double> realList = UIndirectList<double>(completeList, addresses);
|
List<double> realList = UIndirectList<double>(completeList, addresses);
|
||||||
|
|
||||||
|
|||||||
@ -70,6 +70,28 @@ int main(int argc, char *argv[])
|
|||||||
string test2("~OpenFOAM/controlDict");
|
string test2("~OpenFOAM/controlDict");
|
||||||
Info<< test2 << " => " << test2.expand() << endl;
|
Info<< test2 << " => " << test2.expand() << endl;
|
||||||
|
|
||||||
|
// replace controlDict with "newName"
|
||||||
|
{
|
||||||
|
string::size_type i = test2.rfind('/');
|
||||||
|
|
||||||
|
if (i == string::npos)
|
||||||
|
{
|
||||||
|
test2 = "newName";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// this uses the std::string::replace
|
||||||
|
test2.replace(i+1, string::npos, "newName");
|
||||||
|
}
|
||||||
|
Info<< "after replace: " << test2 << endl;
|
||||||
|
|
||||||
|
// do another replace
|
||||||
|
// this uses the Foam::string::replace
|
||||||
|
test2.replace("OpenFOAM", "openfoam");
|
||||||
|
|
||||||
|
Info<< "after replace: " << test2 << endl;
|
||||||
|
}
|
||||||
|
|
||||||
string s;
|
string s;
|
||||||
Sin.getLine(s);
|
Sin.getLine(s);
|
||||||
|
|
||||||
@ -78,8 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
cout<< "output string with " << s2.length() << " characters\n";
|
cout<< "output string with " << s2.length() << " characters\n";
|
||||||
cout<< "ostream<< >" << s2 << "<\n";
|
cout<< "ostream<< >" << s2 << "<\n";
|
||||||
Info<< "Ostream<< >" << s2 << "<\n";
|
Info<< "Ostream<< >" << s2 << "<\n";
|
||||||
Info<< "hash:" << unsigned(string::hash()(s2)) << endl;
|
Info<< "hash:" << hex << string::hash()(s2) << endl;
|
||||||
|
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info << "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -68,8 +68,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
const volPointInterpolation& pInterp = volPointInterpolation::New(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
pointScalarField pp(pInterp.interpolate(p));
|
pointScalarField pp(pInterp.interpolate(p));
|
||||||
pp.write();
|
pp.write();
|
||||||
|
|||||||
@ -39,24 +39,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
Info<< "\nEstimating error in scalar transport equation\n" << endl;
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "\nEstimating error in scalar transport equation\n"
|
||||||
|
<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
IOdictionary transportProperties
|
||||||
(
|
(
|
||||||
@ -79,9 +72,9 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -38,25 +38,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
Info<< "\nEstimating error in the incompressible momentum equation\n"
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "\nEstimating error in the incompressible momentum equation\n"
|
||||||
|
<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
IOdictionary transportProperties
|
||||||
(
|
(
|
||||||
@ -75,9 +67,9 @@ int main(int argc, char *argv[])
|
|||||||
transportProperties.lookup("nu")
|
transportProperties.lookup("nu")
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -39,25 +39,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
Info<< "\nEstimating error in the incompressible momentum equation\n"
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "\nEstimating error in the incompressible momentum equation\n"
|
||||||
|
<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
IOdictionary transportProperties
|
||||||
(
|
(
|
||||||
@ -76,9 +68,9 @@ int main(int argc, char *argv[])
|
|||||||
transportProperties.lookup("nu")
|
transportProperties.lookup("nu")
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -40,24 +40,17 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
Info<< "\nEstimating error in scalar transport equation\n" << endl;
|
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "\nEstimating error in scalar transport equation\n"
|
||||||
|
<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
IOdictionary transportProperties
|
||||||
(
|
(
|
||||||
@ -80,9 +73,9 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -61,6 +61,7 @@ See Also
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
|
#include "timeSelector.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "STARCDMeshWriter.H"
|
#include "STARCDMeshWriter.H"
|
||||||
@ -73,20 +74,17 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
argList::validOptions.insert("scale", "scale");
|
argList::validOptions.insert("scale", "scale");
|
||||||
argList::validOptions.insert("noBnd", "");
|
argList::validOptions.insert("noBnd", "");
|
||||||
argList::validOptions.insert("tri", "");
|
argList::validOptions.insert("tri", "");
|
||||||
argList::validOptions.insert("surface", "");
|
argList::validOptions.insert("surface", "");
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
// Get times list
|
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
bool surfaceOnly = false;
|
bool surfaceOnly = false;
|
||||||
if (args.options().found("surface") or args.options().found("tri"))
|
if (args.options().found("surface") or args.options().found("tri"))
|
||||||
@ -118,17 +116,16 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
|
|
||||||
// bool firstCheck = true;
|
|
||||||
|
|
||||||
for (label timeI = startTime; timeI < endTime; ++timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
# include "getTimeIndex.H"
|
# include "getTimeIndex.H"
|
||||||
|
|
||||||
polyMesh::readUpdateState state = mesh.readUpdate();
|
polyMesh::readUpdateState state = mesh.readUpdate();
|
||||||
|
|
||||||
if (timeI == startTime || state != polyMesh::UNCHANGED)
|
if (!timeI || state != polyMesh::UNCHANGED)
|
||||||
{
|
{
|
||||||
meshWriters::STARCD writer(mesh, scaleFactor);
|
meshWriters::STARCD writer(mesh, scaleFactor);
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
meshDualiser.C
|
meshDualiser.C
|
||||||
makePolyDualMesh.C
|
polyDualMeshApp.C
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/polyDualMesh
|
EXE = $(FOAM_APPBIN)/polyDualMesh
|
||||||
|
|||||||
@ -348,8 +348,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
// Get times list
|
||||||
instantList Times = runTime.times();
|
instantList Times = runTime.times();
|
||||||
|
|
||||||
# include "checkTimeOptions.H"
|
# include "checkTimeOptions.H"
|
||||||
runTime.setTime(Times[startTime], startTime);
|
runTime.setTime(Times[startTime], startTime);
|
||||||
|
|
||||||
@ -37,6 +37,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
|
#include "timeSelector.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
@ -336,6 +337,7 @@ void writePointCells
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
argList::validOptions.insert("patchFaces", "");
|
argList::validOptions.insert("patchFaces", "");
|
||||||
argList::validOptions.insert("cell", "cellI");
|
argList::validOptions.insert("cell", "cellI");
|
||||||
argList::validOptions.insert("face", "faceI");
|
argList::validOptions.insert("face", "faceI");
|
||||||
@ -343,7 +345,6 @@ int main(int argc, char *argv[])
|
|||||||
argList::validOptions.insert("cellSet", "setName");
|
argList::validOptions.insert("cellSet", "setName");
|
||||||
argList::validOptions.insert("faceSet", "setName");
|
argList::validOptions.insert("faceSet", "setName");
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
@ -361,31 +362,23 @@ int main(int argc, char *argv[])
|
|||||||
<< "(for points, faces, cells) is consistent with"
|
<< "(for points, faces, cells) is consistent with"
|
||||||
<< " Foam numbering (starting from 0)." << endl << endl;
|
<< " Foam numbering (starting from 0)." << endl << endl;
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
|
|
||||||
bool firstCheck = true;
|
forAll(timeDirs, timeI)
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
polyMesh::readUpdateState state = mesh.readUpdate();
|
polyMesh::readUpdateState state = mesh.readUpdate();
|
||||||
|
|
||||||
if (firstCheck || state != polyMesh::UNCHANGED)
|
if (!timeI || state != polyMesh::UNCHANGED)
|
||||||
{
|
{
|
||||||
if (patchFaces)
|
if (patchFaces)
|
||||||
{
|
{
|
||||||
writePatchFaces(mesh, runTime.timeName());
|
writePatchFaces(mesh, runTime.timeName());
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (doCell)
|
else if (doCell)
|
||||||
{
|
{
|
||||||
@ -487,9 +480,7 @@ int main(int argc, char *argv[])
|
|||||||
Info << "No mesh." << endl;
|
Info << "No mesh." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
firstCheck = false;
|
Info << nl << endl;
|
||||||
|
|
||||||
Info << endl << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,8 +30,7 @@ Description
|
|||||||
|
|
||||||
#include "arcEdge.H"
|
#include "arcEdge.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathematicalConstants.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -40,8 +39,7 @@ namespace Foam
|
|||||||
defineTypeNameAndDebug(arcEdge, 0);
|
defineTypeNameAndDebug(arcEdge, 0);
|
||||||
|
|
||||||
// Add the curvedEdge constructor functions to the hash tables
|
// Add the curvedEdge constructor functions to the hash tables
|
||||||
curvedEdge::addIstreamConstructorToTable<arcEdge>
|
addToRunTimeSelectionTable(curvedEdge, arcEdge, Istream);
|
||||||
addArcEdgeIstreamConstructorToTable_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -41,26 +41,7 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(curvedEdge, 0);
|
defineTypeNameAndDebug(curvedEdge, 0);
|
||||||
|
defineRunTimeSelectionTable(curvedEdge, Istream);
|
||||||
// Define the constructor function hash tables
|
|
||||||
HashTable<curvedEdge::IstreamConstructorPtr_>*
|
|
||||||
curvedEdge::IstreamConstructorTablePtr_;
|
|
||||||
|
|
||||||
|
|
||||||
// Hash table Constructor called from the table add functions.
|
|
||||||
|
|
||||||
void curvedEdge::constructTables()
|
|
||||||
{
|
|
||||||
static bool constructed = false;
|
|
||||||
|
|
||||||
if (!constructed)
|
|
||||||
{
|
|
||||||
curvedEdge::IstreamConstructorTablePtr_
|
|
||||||
= new HashTable<curvedEdge::IstreamConstructorPtr_>;
|
|
||||||
|
|
||||||
constructed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -117,10 +98,11 @@ autoPtr<curvedEdge> curvedEdge::New(const pointField& points, Istream& is)
|
|||||||
|
|
||||||
word curvedEdgeType(is);
|
word curvedEdgeType(is);
|
||||||
|
|
||||||
HashTable<IstreamConstructorPtr_>::iterator curvedEdgeConstructorIter =
|
IstreamConstructorTable::iterator cstrIter =
|
||||||
IstreamConstructorTablePtr_->find(curvedEdgeType);
|
IstreamConstructorTablePtr_
|
||||||
|
->find(curvedEdgeType);
|
||||||
|
|
||||||
if (curvedEdgeConstructorIter == IstreamConstructorTablePtr_->end())
|
if (cstrIter == IstreamConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
FatalErrorIn("curvedEdge::New(const pointField&, Istream&)")
|
FatalErrorIn("curvedEdge::New(const pointField&, Istream&)")
|
||||||
<< "Unknown curvedEdge type " << curvedEdgeType << endl << endl
|
<< "Unknown curvedEdge type " << curvedEdgeType << endl << endl
|
||||||
@ -129,7 +111,7 @@ autoPtr<curvedEdge> curvedEdge::New(const pointField& points, Istream& is)
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<curvedEdge>(curvedEdgeConstructorIter()(points, is));
|
return autoPtr<curvedEdge>(cstrIter()(points, is));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -177,7 +159,6 @@ Ostream& operator<<(Ostream& os, const curvedEdge& p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -63,51 +63,23 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor Hash tables
|
//- Runtime type information
|
||||||
|
TypeName("curvedEdge");
|
||||||
//- Construct from Istream function pointer type
|
|
||||||
typedef autoPtr<curvedEdge> (*IstreamConstructorPtr_)
|
|
||||||
(const pointField&, Istream&);
|
|
||||||
|
|
||||||
//- Construct from Istream function pointer table pointer
|
|
||||||
static HashTable<IstreamConstructorPtr_>*
|
|
||||||
IstreamConstructorTablePtr_;
|
|
||||||
|
|
||||||
|
|
||||||
// Hash table constructor classes and functions
|
// Declare run-time constructor selection tables
|
||||||
|
|
||||||
//- Hash table Constructor.
|
declareRunTimeSelectionTable
|
||||||
// Must be called from the table add functions below.
|
(
|
||||||
static void constructTables();
|
autoPtr,
|
||||||
|
curvedEdge,
|
||||||
|
Istream,
|
||||||
//- Class to add constructor from Istream to Hash table
|
|
||||||
template<class curvedEdgeType>
|
|
||||||
class addIstreamConstructorToTable
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
static autoPtr<curvedEdge> New
|
|
||||||
(
|
(
|
||||||
const pointField& points,
|
const pointField& points,
|
||||||
Istream& is
|
Istream& is
|
||||||
)
|
),
|
||||||
{
|
(points, is)
|
||||||
return autoPtr<curvedEdge>(new curvedEdgeType(points, is));
|
);
|
||||||
}
|
|
||||||
|
|
||||||
addIstreamConstructorToTable()
|
|
||||||
{
|
|
||||||
curvedEdge::constructTables();
|
|
||||||
|
|
||||||
curvedEdge::IstreamConstructorTablePtr_
|
|
||||||
->insert(curvedEdgeType::typeName, New);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("curvedEdge");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -26,6 +26,7 @@ License
|
|||||||
|
|
||||||
#include "polySplineEdge.H"
|
#include "polySplineEdge.H"
|
||||||
#include "BSpline.H"
|
#include "BSpline.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -34,8 +35,7 @@ namespace Foam
|
|||||||
defineTypeNameAndDebug(polySplineEdge, 0);
|
defineTypeNameAndDebug(polySplineEdge, 0);
|
||||||
|
|
||||||
// Add the curvedEdge constructor functions to the hash tables
|
// Add the curvedEdge constructor functions to the hash tables
|
||||||
curvedEdge::addIstreamConstructorToTable<polySplineEdge>
|
addToRunTimeSelectionTable(curvedEdge, polySplineEdge, Istream);
|
||||||
addPolySplineEdgeIstreamConstructorToTable_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,9 +27,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "error.H"
|
|
||||||
|
|
||||||
#include "simpleSplineEdge.H"
|
#include "simpleSplineEdge.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -39,10 +38,8 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(simpleSplineEdge, 0);
|
defineTypeNameAndDebug(simpleSplineEdge, 0);
|
||||||
|
addToRunTimeSelectionTable(curvedEdge, simpleSplineEdge, Istream);
|
||||||
|
|
||||||
// Add the curvedEdge constructor functions to the hash tables
|
|
||||||
curvedEdge::addIstreamConstructorToTable<simpleSplineEdge>
|
|
||||||
addSimpleSplineEdgeIstreamConstructorToTable_;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,9 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
|
#include "timeSelector.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "globalMeshData.H"
|
#include "globalMeshData.H"
|
||||||
|
|
||||||
@ -45,48 +47,34 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions(false); // no constant
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
# include "addTimeOptionsNoConstant.H"
|
|
||||||
|
|
||||||
argList::validOptions.insert("noTopology", "");
|
argList::validOptions.insert("noTopology", "");
|
||||||
argList::validOptions.insert("allGeometry", "");
|
argList::validOptions.insert("allGeometry", "");
|
||||||
argList::validOptions.insert("allTopology", "");
|
argList::validOptions.insert("allTopology", "");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
# include "createTime.H"
|
||||||
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
# include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
const bool noTopology = args.options().found("noTopology");
|
const bool noTopology = args.options().found("noTopology");
|
||||||
const bool allGeometry = args.options().found("allGeometry");
|
const bool allGeometry = args.options().found("allGeometry");
|
||||||
const bool allTopology = args.options().found("allTopology");
|
const bool allTopology = args.options().found("allTopology");
|
||||||
|
|
||||||
# include "createTime.H"
|
forAll(timeDirs, timeI)
|
||||||
|
|
||||||
// Get times list
|
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
# include "checkTimeOptionsNoConstant.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createNamedPolyMesh.H"
|
|
||||||
|
|
||||||
bool firstCheck = true;
|
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
polyMesh::readUpdateState state = mesh.readUpdate();
|
polyMesh::readUpdateState state = mesh.readUpdate();
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
firstCheck
|
!timeI
|
||||||
|| state == polyMesh::TOPO_CHANGE
|
|| state == polyMesh::TOPO_CHANGE
|
||||||
|| state == polyMesh::TOPO_PATCH_CHANGE
|
|| state == polyMesh::TOPO_PATCH_CHANGE
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
firstCheck = false;
|
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// Clear mesh before checking
|
// Clear mesh before checking
|
||||||
@ -110,32 +98,30 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (noFailedChecks == 0)
|
if (noFailedChecks == 0)
|
||||||
{
|
{
|
||||||
Info<< "\nMesh OK."
|
Info<< "\nMesh OK.\n" << endl;
|
||||||
<< nl << endl;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "\nFailed " << noFailedChecks << " mesh checks."
|
Info<< "\nFailed " << noFailedChecks << " mesh checks.\n"
|
||||||
<< nl << endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (state == polyMesh::POINTS_MOVED)
|
else if (state == polyMesh::POINTS_MOVED)
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
label noFailedChecks = checkGeometry(mesh, allGeometry);
|
label nFailedChecks = checkGeometry(mesh, allGeometry);
|
||||||
|
|
||||||
reduce(noFailedChecks, sumOp<label>());
|
reduce(nFailedChecks, sumOp<label>());
|
||||||
|
|
||||||
if (noFailedChecks == 0)
|
if (nFailedChecks)
|
||||||
{
|
{
|
||||||
Info << "\nMesh OK."
|
Info<< "\nFailed " << nFailedChecks << " mesh checks.\n"
|
||||||
<< nl << endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "\nFailed " << noFailedChecks << " mesh checks."
|
Info << "\nMesh OK.\n" << endl;
|
||||||
<< nl << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
|
#include "timeSelector.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
@ -66,7 +67,8 @@ void RotateFields
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addTimeOptions.H"
|
timeSelector::addOptions();
|
||||||
|
|
||||||
argList::validArgs.append("n1");
|
argList::validArgs.append("n1");
|
||||||
argList::validArgs.append("n2");
|
argList::validArgs.append("n2");
|
||||||
|
|
||||||
@ -105,19 +107,15 @@ int main(int argc, char *argv[])
|
|||||||
points.write();
|
points.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get times list
|
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
|
||||||
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -48,6 +48,7 @@ Description
|
|||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
|
#include "SortableList.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -107,6 +108,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
// Not in memory. Load it.
|
// Not in memory. Load it.
|
||||||
pointSet set(*iter());
|
pointSet set(*iter());
|
||||||
|
SortableList<label> pointLabels(set.toc());
|
||||||
|
|
||||||
label zoneID = mesh.pointZones().findZoneID(set.name());
|
label zoneID = mesh.pointZones().findZoneID(set.name());
|
||||||
if (zoneID == -1)
|
if (zoneID == -1)
|
||||||
@ -120,7 +122,7 @@ int main(int argc, char *argv[])
|
|||||||
new pointZone
|
new pointZone
|
||||||
(
|
(
|
||||||
set.name(), //name
|
set.name(), //name
|
||||||
set.toc(), //addressing
|
pointLabels, //addressing
|
||||||
sz, //index
|
sz, //index
|
||||||
mesh.pointZones() //pointZoneMesh
|
mesh.pointZones() //pointZoneMesh
|
||||||
)
|
)
|
||||||
@ -131,7 +133,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Overwriting contents of existing pointZone " << zoneID
|
Info<< "Overwriting contents of existing pointZone " << zoneID
|
||||||
<< " with that of set " << set.name() << "." << endl;
|
<< " with that of set " << set.name() << "." << endl;
|
||||||
mesh.pointZones()[zoneID] = set.toc();
|
mesh.pointZones()[zoneID] = pointLabels;
|
||||||
mesh.pointZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.pointZones().writeOpt() = IOobject::AUTO_WRITE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,6 +152,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
// Not in memory. Load it.
|
// Not in memory. Load it.
|
||||||
cellSet set(*iter());
|
cellSet set(*iter());
|
||||||
|
SortableList<label> cellLabels(set.toc());
|
||||||
|
|
||||||
label zoneID = mesh.cellZones().findZoneID(set.name());
|
label zoneID = mesh.cellZones().findZoneID(set.name());
|
||||||
if (zoneID == -1)
|
if (zoneID == -1)
|
||||||
@ -163,7 +166,7 @@ int main(int argc, char *argv[])
|
|||||||
new cellZone
|
new cellZone
|
||||||
(
|
(
|
||||||
set.name(), //name
|
set.name(), //name
|
||||||
set.toc(), //addressing
|
cellLabels, //addressing
|
||||||
sz, //index
|
sz, //index
|
||||||
mesh.cellZones() //pointZoneMesh
|
mesh.cellZones() //pointZoneMesh
|
||||||
)
|
)
|
||||||
@ -174,7 +177,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Overwriting contents of existing cellZone " << zoneID
|
Info<< "Overwriting contents of existing cellZone " << zoneID
|
||||||
<< " with that of set " << set.name() << "." << endl;
|
<< " with that of set " << set.name() << "." << endl;
|
||||||
mesh.cellZones()[zoneID] = set.toc();
|
mesh.cellZones()[zoneID] = cellLabels;
|
||||||
mesh.cellZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.cellZones().writeOpt() = IOobject::AUTO_WRITE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,6 +196,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
// Not in memory. Load it.
|
// Not in memory. Load it.
|
||||||
faceSet set(*iter());
|
faceSet set(*iter());
|
||||||
|
SortableList<label> faceLabels(set.toc());
|
||||||
|
|
||||||
DynamicList<label> addressing(set.size());
|
DynamicList<label> addressing(set.size());
|
||||||
DynamicList<bool> flipMap(set.size());
|
DynamicList<bool> flipMap(set.size());
|
||||||
@ -214,9 +218,9 @@ int main(int argc, char *argv[])
|
|||||||
// Load corresponding cells
|
// Load corresponding cells
|
||||||
cellSet cells(mesh, setName);
|
cellSet cells(mesh, setName);
|
||||||
|
|
||||||
forAllConstIter(faceSet, set, iter)
|
forAll(faceLabels, i)
|
||||||
{
|
{
|
||||||
label faceI = iter.key();
|
label faceI = faceLabels[i];
|
||||||
|
|
||||||
bool flip = false;
|
bool flip = false;
|
||||||
|
|
||||||
@ -273,9 +277,10 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No flip map.
|
// No flip map.
|
||||||
forAllConstIter(faceSet, set, iter)
|
forAll(faceLabels, i)
|
||||||
{
|
{
|
||||||
addressing.append(iter.key());
|
label faceI = faceLabels[i];
|
||||||
|
addressing.append(faceI);
|
||||||
flipMap.append(false);
|
flipMap.append(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,9 @@ Description
|
|||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
|
#include "IFstream.H"
|
||||||
|
#include "IOobject.H"
|
||||||
|
#include "HashSet.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -38,18 +41,108 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
|
argList::validOptions.insert("new", "");
|
||||||
|
argList::validOptions.insert("old", "");
|
||||||
|
|
||||||
wordList ds(debug::debugSwitches().toc());
|
Foam::argList args(argc, argv);
|
||||||
sort(ds);
|
|
||||||
Info<< "debug switches: " << ds << endl;
|
wordList currDebug(debug::debugSwitches().toc());
|
||||||
|
wordList currInfo(debug::infoSwitches().toc());
|
||||||
|
wordList currOpt(debug::optimisationSwitches().toc());
|
||||||
|
|
||||||
|
if (args.options().found("old") || args.options().found("new"))
|
||||||
|
{
|
||||||
|
dictionary controlDict(IFstream(findEtcFile("controlDict", true))());
|
||||||
|
|
||||||
|
wordHashSet oldDebug
|
||||||
|
(
|
||||||
|
controlDict.subDict("DebugSwitches").toc()
|
||||||
|
);
|
||||||
|
|
||||||
|
wordHashSet oldInfo
|
||||||
|
(
|
||||||
|
controlDict.subDict("InfoSwitches").toc()
|
||||||
|
);
|
||||||
|
|
||||||
|
wordHashSet oldOpt
|
||||||
|
(
|
||||||
|
controlDict.subDict("OptimisationSwitches").toc()
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
wordHashSet hashset;
|
||||||
|
wordList listing;
|
||||||
|
|
||||||
|
|
||||||
|
// list old switches - but this can't work since the (old) inserted
|
||||||
|
// switches are in both sets
|
||||||
|
// Workaround:
|
||||||
|
// 1. run without any options (get complete list)
|
||||||
|
// 2. comment out DebugSwitches, run again with -new to find new ones
|
||||||
|
// and do a diff
|
||||||
|
if (args.options().found("old"))
|
||||||
|
{
|
||||||
|
IOobject::writeDivider(Info);
|
||||||
|
|
||||||
|
hashset = oldDebug;
|
||||||
|
hashset -= currDebug;
|
||||||
|
listing = hashset.toc();
|
||||||
|
sort(listing);
|
||||||
|
Info<< "old DebugSwitches: " << listing << endl;
|
||||||
|
|
||||||
|
hashset = oldInfo;
|
||||||
|
hashset -= currInfo;
|
||||||
|
listing = hashset.toc();
|
||||||
|
sort(listing);
|
||||||
|
Info<< "old InfoSwitches: " << listing << endl;
|
||||||
|
|
||||||
|
hashset = oldOpt;
|
||||||
|
hashset -= currOpt;
|
||||||
|
listing = hashset.toc();
|
||||||
|
sort(listing);
|
||||||
|
Info<< "old OptimisationSwitches: " << listing << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// list new switches
|
||||||
|
if (args.options().found("new"))
|
||||||
|
{
|
||||||
|
IOobject::writeDivider(Info);
|
||||||
|
|
||||||
|
hashset = currDebug;
|
||||||
|
hashset -= oldDebug;
|
||||||
|
|
||||||
|
listing = hashset.toc();
|
||||||
|
sort(listing);
|
||||||
|
Info<< "new DebugSwitches: " << listing << endl;
|
||||||
|
|
||||||
|
hashset = currInfo;
|
||||||
|
hashset -= oldInfo;
|
||||||
|
listing = hashset.toc();
|
||||||
|
sort(listing);
|
||||||
|
Info<< "new InfoSwitches: " << listing << endl;
|
||||||
|
|
||||||
|
hashset = currOpt;
|
||||||
|
hashset -= oldOpt;
|
||||||
|
listing = hashset.toc();
|
||||||
|
sort(listing);
|
||||||
|
Info<< "new OptimisationSwitches: " << listing << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IOobject::writeDivider(Info);
|
||||||
|
|
||||||
|
sort(currDebug);
|
||||||
|
Info<< "DebugSwitches: " << currDebug << endl;
|
||||||
|
|
||||||
|
sort(currInfo);
|
||||||
|
Info<< "InfoSwitches: " << currInfo << endl;
|
||||||
|
|
||||||
|
sort(currOpt);
|
||||||
|
Info<< "OptimisationSwitches: " << currOpt << endl;
|
||||||
|
}
|
||||||
|
|
||||||
wordList is(debug::infoSwitches().toc());
|
|
||||||
sort(is);
|
|
||||||
Info<< "info switches: " << is << endl;
|
|
||||||
|
|
||||||
wordList os(debug::optimisationSwitches().toc());
|
|
||||||
sort(os);
|
|
||||||
Info<< "optimisation switches: " << os << endl;
|
|
||||||
|
|
||||||
Info<< "done" << endl;
|
Info<< "done" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -40,25 +40,19 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createNamedMesh.H"
|
# include "createNamedMesh.H"
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -312,7 +312,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
fileNameList cloudDirs
|
fileNameList cloudDirs
|
||||||
(
|
(
|
||||||
readDir(runTime.timePath()/"lagrangian", fileName::DIRECTORY)
|
readDir(runTime.timePath()/cloud::prefix, fileName::DIRECTORY)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Particles
|
// Particles
|
||||||
@ -344,7 +344,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian"/cloudDirs[i]
|
cloud::prefix/cloudDirs[i]
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
||||||
@ -418,7 +418,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian"/cloudDirs[cloudI]
|
cloud::prefix/cloudDirs[cloudI]
|
||||||
);
|
);
|
||||||
|
|
||||||
lagrangianFieldDecomposer::readFields
|
lagrangianFieldDecomposer::readFields
|
||||||
|
|||||||
@ -88,7 +88,7 @@ tmp<IOField<Type> > lagrangianFieldDecomposer::decomposeField
|
|||||||
(
|
(
|
||||||
field.name(),
|
field.name(),
|
||||||
procMesh_.time().timeName(),
|
procMesh_.time().timeName(),
|
||||||
"lagrangian"/cloudName,
|
cloud::prefix/cloudName,
|
||||||
procMesh_,
|
procMesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -36,6 +36,7 @@ SourceFiles
|
|||||||
#ifndef reconstructLagrangian_H
|
#ifndef reconstructLagrangian_H
|
||||||
#define reconstructLagrangian_H
|
#define reconstructLagrangian_H
|
||||||
|
|
||||||
|
#include "cloud.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
|
|||||||
@ -47,7 +47,7 @@ Foam::tmp<Foam::IOField<Type> > Foam::reconstructLagrangianField
|
|||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
"lagrangian"/cloudName,
|
cloud::prefix/cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
@ -64,7 +64,7 @@ Foam::tmp<Foam::IOField<Type> > Foam::reconstructLagrangianField
|
|||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
meshes[i].time().timeName(),
|
meshes[i].time().timeName(),
|
||||||
"lagrangian"/cloudName,
|
cloud::prefix/cloudName,
|
||||||
meshes[i],
|
meshes[i],
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -51,6 +51,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("fields", "\"(list of fields)\"");
|
argList::validOptions.insert("fields", "\"(list of fields)\"");
|
||||||
|
argList::validOptions.insert("noLagrangian", "");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -61,6 +62,8 @@ int main(int argc, char *argv[])
|
|||||||
IStringStream(args.options()["fields"])() >> selectedFields;
|
IStringStream(args.options()["fields"])() >> selectedFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool noLagrangian = args.options().found("noLagrangian");
|
||||||
|
|
||||||
// determine the processor count directly
|
// determine the processor count directly
|
||||||
label nProcs = 0;
|
label nProcs = 0;
|
||||||
while (isDir(args.path()/(word("processor") + name(nProcs))))
|
while (isDir(args.path()/(word("processor") + name(nProcs))))
|
||||||
@ -269,6 +272,8 @@ int main(int argc, char *argv[])
|
|||||||
// the first processor that has them. They are in pass2 only used
|
// the first processor that has them. They are in pass2 only used
|
||||||
// for name and type (scalar, vector etc).
|
// for name and type (scalar, vector etc).
|
||||||
|
|
||||||
|
if (!noLagrangian)
|
||||||
|
{
|
||||||
HashTable<IOobjectList> cloudObjects;
|
HashTable<IOobjectList> cloudObjects;
|
||||||
|
|
||||||
forAll (databases, procI)
|
forAll (databases, procI)
|
||||||
@ -277,25 +282,25 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
readDir
|
readDir
|
||||||
(
|
(
|
||||||
databases[procI].timePath()/regionPrefix/"lagrangian",
|
databases[procI].timePath()/regionPrefix/cloud::prefix,
|
||||||
fileName::DIRECTORY
|
fileName::DIRECTORY
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll (cloudDirs, i)
|
forAll (cloudDirs, i)
|
||||||
{
|
{
|
||||||
// Check if we already have cloud objects for this cloudname.
|
// Check if we already have cloud objects for this cloudname
|
||||||
HashTable<IOobjectList>::const_iterator iter =
|
HashTable<IOobjectList>::const_iterator iter =
|
||||||
cloudObjects.find(cloudDirs[i]);
|
cloudObjects.find(cloudDirs[i]);
|
||||||
|
|
||||||
if (iter == cloudObjects.end())
|
if (iter == cloudObjects.end())
|
||||||
{
|
{
|
||||||
// Do local scan for valid cloud objects.
|
// Do local scan for valid cloud objects
|
||||||
IOobjectList sprayObjs
|
IOobjectList sprayObjs
|
||||||
(
|
(
|
||||||
procMeshes.meshes()[procI],
|
procMeshes.meshes()[procI],
|
||||||
databases[procI].timeName(),
|
databases[procI].timeName(),
|
||||||
"lagrangian"/cloudDirs[i]
|
cloud::prefix/cloudDirs[i]
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
||||||
@ -378,9 +383,10 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info << "No lagrangian fields" << nl << endl;
|
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
|
||||||
|
|
||||||
fileName uniformDir0 = databases[0].timePath()/"uniform";
|
fileName uniformDir0 = databases[0].timePath()/"uniform";
|
||||||
if (isDir(uniformDir0))
|
if (isDir(uniformDir0))
|
||||||
|
|||||||
@ -38,26 +38,22 @@ Description
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
# include "addTimeOptions.H"
|
timeSelector::addOptions(false); // no constant
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
instantList Times = runTime.times();
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptionsNoConstant.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
// make a directory called proInterface in the case
|
// make a directory called proInterface in the case
|
||||||
mkDir(runTime.rootPath()/runTime.caseName()/"fluentInterface");
|
mkDir(runTime.rootPath()/runTime.caseName()/"fluentInterface");
|
||||||
|
|
||||||
for (label timeI = startTime; timeI < endTime; timeI++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
if (mesh.readUpdate())
|
if (mesh.readUpdate())
|
||||||
|
|||||||
@ -35,6 +35,7 @@ SourceFiles
|
|||||||
#ifndef ensightCloudField_H
|
#ifndef ensightCloudField_H
|
||||||
#define ensightCloudField_H
|
#define ensightCloudField_H
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
#include "IOobject.H"
|
#include "IOobject.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -211,7 +211,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
fileNameList cloudDirs = readDir
|
fileNameList cloudDirs = readDir
|
||||||
(
|
(
|
||||||
runTime.timePath()/regionPrefix/"lagrangian",
|
runTime.timePath()/regionPrefix/cloud::prefix,
|
||||||
fileName::DIRECTORY
|
fileName::DIRECTORY
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian"/cloudDirs[cloudI]
|
cloud::prefix/cloudDirs[cloudI]
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject* positionsPtr = cloudObjs.lookup("positions");
|
IOobject* positionsPtr = cloudObjs.lookup("positions");
|
||||||
@ -266,7 +266,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian"/cloudIter.key()
|
cloud::prefix/cloudIter.key()
|
||||||
);
|
);
|
||||||
|
|
||||||
forAllConstIter(IOobjectList, cloudObjs, fieldIter)
|
forAllConstIter(IOobjectList, cloudObjs, fieldIter)
|
||||||
@ -426,7 +426,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
fileNameList currentCloudDirs = readDir
|
fileNameList currentCloudDirs = readDir
|
||||||
(
|
(
|
||||||
runTime.timePath()/regionPrefix/"lagrangian",
|
runTime.timePath()/regionPrefix/cloud::prefix,
|
||||||
fileName::DIRECTORY
|
fileName::DIRECTORY
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -449,7 +449,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
"lagrangian"/cloudName,
|
cloud::prefix/cloudName,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
);
|
);
|
||||||
|
|||||||
@ -42,7 +42,7 @@ forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter)
|
|||||||
|
|
||||||
caseFile
|
caseFile
|
||||||
<< setw(16) << "measured: 2"
|
<< setw(16) << "measured: 2"
|
||||||
<< fileName(dataMask/"lagrangian"/cloudName/"positions").c_str()
|
<< fileName(dataMask/cloud::prefix/cloudName/"positions").c_str()
|
||||||
<< nl;
|
<< nl;
|
||||||
}
|
}
|
||||||
caseFile
|
caseFile
|
||||||
@ -122,7 +122,7 @@ forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter)
|
|||||||
ensightType,
|
ensightType,
|
||||||
fieldName,
|
fieldName,
|
||||||
dataMask,
|
dataMask,
|
||||||
"lagrangian"/cloudName,
|
cloud::prefix/cloudName,
|
||||||
cloudNo,
|
cloudNo,
|
||||||
2
|
2
|
||||||
);
|
);
|
||||||
|
|||||||
@ -27,7 +27,6 @@ License
|
|||||||
#include "ensightOutputFunctions.H"
|
#include "ensightOutputFunctions.H"
|
||||||
|
|
||||||
#include "passiveParticle.H"
|
#include "passiveParticle.H"
|
||||||
#include "Cloud.H"
|
|
||||||
#include "IOField.H"
|
#include "IOField.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
@ -101,7 +100,7 @@ void ensightParticlePositions
|
|||||||
{
|
{
|
||||||
Cloud<passiveParticle> parcels(mesh, cloudName, false);
|
Cloud<passiveParticle> parcels(mesh, cloudName, false);
|
||||||
|
|
||||||
fileName cloudDir = subDir/"lagrangian"/cloudName;
|
fileName cloudDir = subDir/cloud::prefix/cloudName;
|
||||||
fileName postFileName = cloudDir/"positions";
|
fileName postFileName = cloudDir/"positions";
|
||||||
|
|
||||||
// the ITER/lagrangian subdirectory must exist
|
// the ITER/lagrangian subdirectory must exist
|
||||||
@ -165,7 +164,7 @@ void ensightLagrangianField
|
|||||||
{
|
{
|
||||||
Info<< " " << fieldObject.name() << flush;
|
Info<< " " << fieldObject.name() << flush;
|
||||||
|
|
||||||
fileName cloudDir = subDir/"lagrangian"/cloudName;
|
fileName cloudDir = subDir/cloud::prefix/cloudName;
|
||||||
fileName postFileName = cloudDir/fieldObject.name();
|
fileName postFileName = cloudDir/fieldObject.name();
|
||||||
|
|
||||||
string title =
|
string title =
|
||||||
|
|||||||
@ -23,9 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Miscellaneous collection of functions and template related to Ensight data
|
||||||
miscellaneous collection of functions and template related
|
|
||||||
to Ensight data
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
ensightOutputFunctions.C
|
ensightOutputFunctions.C
|
||||||
@ -36,6 +34,7 @@ SourceFiles
|
|||||||
#define ensightOutputFunctions_H
|
#define ensightOutputFunctions_H
|
||||||
|
|
||||||
#include "ensightFile.H"
|
#include "ensightFile.H"
|
||||||
|
#include "Cloud.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "IOobject.H"
|
#include "IOobject.H"
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (timeDirs.size() > 1)
|
|||||||
runTime.path()
|
runTime.path()
|
||||||
/ timeDirs[timeDirs.size() - 1].name()
|
/ timeDirs[timeDirs.size() - 1].name()
|
||||||
/ regionPrefix
|
/ regionPrefix
|
||||||
/ "lagrangian",
|
/ cloud::prefix,
|
||||||
fileName::DIRECTORY
|
fileName::DIRECTORY
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ if (timeDirs.size() > 1)
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
timeDirs[timeDirs.size() - 1].name(),
|
timeDirs[timeDirs.size() - 1].name(),
|
||||||
"lagrangian"/cloudName
|
cloud::prefix/cloudName
|
||||||
);
|
);
|
||||||
|
|
||||||
bool hasPositions = false;
|
bool hasPositions = false;
|
||||||
|
|||||||
@ -324,7 +324,14 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const word& cloudName = cloudIter.key();
|
const word& cloudName = cloudIter.key();
|
||||||
|
|
||||||
if (!isDir(runTime.timePath()/regionPrefix/"lagrangian"/cloudName))
|
if
|
||||||
|
(
|
||||||
|
!isDir
|
||||||
|
(
|
||||||
|
runTime.timePath()/regionPrefix/
|
||||||
|
cloud::prefix/cloudName
|
||||||
|
)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -333,7 +340,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian"/cloudName
|
cloud::prefix/cloudName
|
||||||
);
|
);
|
||||||
|
|
||||||
// check that the positions field is present for this time
|
// check that the positions field is present for this time
|
||||||
@ -365,7 +372,8 @@ int main(int argc, char *argv[])
|
|||||||
if (!fieldObject)
|
if (!fieldObject)
|
||||||
{
|
{
|
||||||
Info<< "missing "
|
Info<< "missing "
|
||||||
<< runTime.timeName()/"lagrangian"/cloudName/fieldName
|
<< runTime.timeName()/cloud::prefix/cloudName
|
||||||
|
/ fieldName
|
||||||
<< endl;
|
<< endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ List<IOField<vector>* > sprayVectorFieldPtrs
|
|||||||
(
|
(
|
||||||
sprayScalarNames[fieldI],
|
sprayScalarNames[fieldI],
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
@ -53,7 +53,7 @@ List<IOField<vector>* > sprayVectorFieldPtrs
|
|||||||
(
|
(
|
||||||
sprayVectorNames[fieldI],
|
sprayVectorNames[fieldI],
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -42,7 +42,7 @@ forAll(Times, timeI)
|
|||||||
|
|
||||||
|
|
||||||
// Same for spray
|
// Same for spray
|
||||||
IOobjectList sprayObjects(mesh, runTime.timeName(), "lagrangian");
|
IOobjectList sprayObjects(mesh, runTime.timeName(), cloud::prefix);
|
||||||
{
|
{
|
||||||
wordList fieldNames(sprayObjects.names(scalarIOField::typeName));
|
wordList fieldNames(sprayObjects.names(scalarIOField::typeName));
|
||||||
forAll(fieldNames, fieldI)
|
forAll(fieldNames, fieldI)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
|||||||
"volScalarField",
|
"volScalarField",
|
||||||
"volVectorField",
|
"volVectorField",
|
||||||
"surfaceScalarField",
|
"surfaceScalarField",
|
||||||
"lagrangian"
|
cloud::prefix
|
||||||
};
|
};
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|||||||
@ -60,13 +60,13 @@ for(label i=0; i < nTypes; i++)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fieldTypes[i] == "lagrangian")
|
if (fieldTypes[i] == cloud::prefix)
|
||||||
{
|
{
|
||||||
IOobject lagrangianHeader
|
IOobject lagrangianHeader
|
||||||
(
|
(
|
||||||
"positions",
|
"positions",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ
|
IOobject::NO_READ
|
||||||
);
|
);
|
||||||
@ -75,7 +75,7 @@ for(label i=0; i < nTypes; i++)
|
|||||||
{
|
{
|
||||||
Cloud<passiveParticle> particles(mesh);
|
Cloud<passiveParticle> particles(mesh);
|
||||||
|
|
||||||
IOobjectList objects(mesh, runTime.timeName(), "lagrangian");
|
IOobjectList objects(mesh, runTime.timeName(), cloud::prefix);
|
||||||
|
|
||||||
wordList lagrangianScalarNames = objects.names("scalarField");
|
wordList lagrangianScalarNames = objects.names("scalarField");
|
||||||
wordList lagrangianVectorNames = objects.names("vectorField");
|
wordList lagrangianVectorNames = objects.names("vectorField");
|
||||||
|
|||||||
@ -42,7 +42,7 @@ forAll(lagrangianScalarNames, i)
|
|||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
@ -73,7 +73,7 @@ forAll(lagrangianVectorNames, i)
|
|||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -40,7 +40,7 @@ forAll(lagrangianScalarNames, i)
|
|||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -225,8 +225,10 @@ labelList getSelectedPatches
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addTimeOptions.H"
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
argList::validOptions.insert("fields", "fields");
|
argList::validOptions.insert("fields", "fields");
|
||||||
argList::validOptions.insert("cellSet", "cellSet name");
|
argList::validOptions.insert("cellSet", "cellSet name");
|
||||||
argList::validOptions.insert("faceSet", "faceSet name");
|
argList::validOptions.insert("faceSet", "faceSet name");
|
||||||
@ -244,7 +246,6 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|
||||||
bool doWriteInternal = !args.options().found("noInternal");
|
bool doWriteInternal = !args.options().found("noInternal");
|
||||||
bool doFaceZones = !args.options().found("noFaceZones");
|
bool doFaceZones = !args.options().found("noFaceZones");
|
||||||
bool doLinks = !args.options().found("noLinks");
|
bool doLinks = !args.options().found("noLinks");
|
||||||
@ -312,14 +313,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
instantList Times = runTime.times();
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
// Current mesh.
|
|
||||||
# include "createNamedMesh.H"
|
# include "createNamedMesh.H"
|
||||||
|
|
||||||
// VTK/ directory in the case
|
// VTK/ directory in the case
|
||||||
@ -359,11 +354,11 @@ int main(int argc, char *argv[])
|
|||||||
// mesh wrapper; does subsetting and decomposition
|
// mesh wrapper; does subsetting and decomposition
|
||||||
vtkMesh vMesh(mesh, cellSetName);
|
vtkMesh vMesh(mesh, cellSetName);
|
||||||
|
|
||||||
for (label timeI = startTime; timeI < endTime; timeI++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time " << Times[timeI].name() << endl;
|
Info<< "Time: " << runTime.timeName() << endl;
|
||||||
|
|
||||||
// Check for new polyMesh/ and update mesh, fvMeshSubset and cell
|
// Check for new polyMesh/ and update mesh, fvMeshSubset and cell
|
||||||
// decomposition.
|
// decomposition.
|
||||||
@ -914,7 +909,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
readDir
|
readDir
|
||||||
(
|
(
|
||||||
runTime.timePath()/regionPrefix/"lagrangian",
|
runTime.timePath()/regionPrefix/cloud::prefix,
|
||||||
fileName::DIRECTORY
|
fileName::DIRECTORY
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -925,18 +920,18 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian"/cloudDirs[i]
|
cloud::prefix/cloudDirs[i]
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
||||||
|
|
||||||
if (positionsPtr)
|
if (positionsPtr)
|
||||||
{
|
{
|
||||||
mkDir(fvPath/"lagrangian"/cloudDirs[i]);
|
mkDir(fvPath/cloud::prefix/cloudDirs[i]);
|
||||||
|
|
||||||
fileName lagrFileName
|
fileName lagrFileName
|
||||||
(
|
(
|
||||||
fvPath/"lagrangian"/cloudDirs[i]/cloudDirs[i]
|
fvPath/cloud::prefix/cloudDirs[i]/cloudDirs[i]
|
||||||
+ "_" + name(timeI) + ".vtk"
|
+ "_" + name(timeI) + ".vtk"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "globalPointPatch.H"
|
#include "globalPointPatch.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
#include "Cloud.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "vtkMesh.H"
|
#include "vtkMesh.H"
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void Foam::lagrangianWriter::writeIOField(const wordList& objects)
|
|||||||
(
|
(
|
||||||
object,
|
object,
|
||||||
vMesh_.mesh().time().timeName(),
|
vMesh_.mesh().time().timeName(),
|
||||||
"lagrangian"/cloudName_,
|
cloud::prefix/cloudName_,
|
||||||
vMesh_.mesh(),
|
vMesh_.mesh(),
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
|
|||||||
@ -50,14 +50,15 @@ vtkPV3FoamReader::vtkPV3FoamReader()
|
|||||||
|
|
||||||
output0_ = NULL;
|
output0_ = NULL;
|
||||||
|
|
||||||
|
#ifdef VTKPV3FOAM_DUALPORT
|
||||||
// Add second output for the Lagrangian
|
// Add second output for the Lagrangian
|
||||||
this->SetNumberOfOutputPorts(2);
|
this->SetNumberOfOutputPorts(2);
|
||||||
vtkMultiBlockDataSet *lagrangian;
|
vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New();
|
||||||
lagrangian = vtkMultiBlockDataSet::New();
|
|
||||||
lagrangian->ReleaseData();
|
lagrangian->ReleaseData();
|
||||||
|
|
||||||
this->GetExecutive()->SetOutputData(1, lagrangian);
|
this->GetExecutive()->SetOutputData(1, lagrangian);
|
||||||
lagrangian->Delete();
|
lagrangian->Delete();
|
||||||
|
#endif
|
||||||
|
|
||||||
TimeStepRange[0] = 0;
|
TimeStepRange[0] = 0;
|
||||||
TimeStepRange[1] = 0;
|
TimeStepRange[1] = 0;
|
||||||
@ -204,9 +205,9 @@ int vtkPV3FoamReader::RequestInformation
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
double timeRange[2];
|
|
||||||
if (nTimeSteps)
|
if (nTimeSteps)
|
||||||
{
|
{
|
||||||
|
double timeRange[2];
|
||||||
timeRange[0] = timeSteps[0];
|
timeRange[0] = timeSteps[0];
|
||||||
timeRange[1] = timeSteps[nTimeSteps-1];
|
timeRange[1] = timeSteps[nTimeSteps-1];
|
||||||
|
|
||||||
@ -273,46 +274,53 @@ int vtkPV3FoamReader::RequestData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// take port0 as the lead for other outputs
|
// Get the requested time step.
|
||||||
vtkInformation *outInfo = outputVector->GetInformationObject(0);
|
// We only support requests for a single time step
|
||||||
|
|
||||||
|
int nRequestTime = 0;
|
||||||
|
double requestTime[nInfo];
|
||||||
|
|
||||||
|
// taking port0 as the lead for other outputs would be nice, but fails when
|
||||||
|
// a filter is added - we need to check everything
|
||||||
|
// but since PREVIOUS_UPDATE_TIME_STEPS() is protected, relay the logic
|
||||||
|
// to the vtkPV3Foam::setTime() method
|
||||||
|
for (int infoI = 0; infoI < nInfo; ++infoI)
|
||||||
|
{
|
||||||
|
vtkInformation *outInfo = outputVector->GetInformationObject(infoI);
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
outInfo->Has
|
||||||
|
(
|
||||||
|
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()
|
||||||
|
)
|
||||||
|
&& outInfo->Length
|
||||||
|
(
|
||||||
|
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()
|
||||||
|
) >= 1
|
||||||
|
)
|
||||||
|
{
|
||||||
|
requestTime[nRequestTime++] = outInfo->Get
|
||||||
|
(
|
||||||
|
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()
|
||||||
|
)[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nRequestTime)
|
||||||
|
{
|
||||||
|
foamData_->setTime(nRequestTime, requestTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
|
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
|
||||||
(
|
(
|
||||||
outInfo->Get
|
outputVector->GetInformationObject(0)->Get
|
||||||
(
|
(
|
||||||
vtkMultiBlockDataSet::DATA_OBJECT()
|
vtkMultiBlockDataSet::DATA_OBJECT()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
vtkMultiBlockDataSet* lagrangianOutput = vtkMultiBlockDataSet::SafeDownCast
|
|
||||||
(
|
|
||||||
outputVector->GetInformationObject(1)->Get
|
|
||||||
(
|
|
||||||
vtkMultiBlockDataSet::DATA_OBJECT()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
|
|
||||||
{
|
|
||||||
// Get the requested time step.
|
|
||||||
// We only support requests for a single time step
|
|
||||||
int nRequestedTimeSteps = outInfo->Length
|
|
||||||
(
|
|
||||||
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()
|
|
||||||
);
|
|
||||||
if (nRequestedTimeSteps >= 1)
|
|
||||||
{
|
|
||||||
double *requestedTimeSteps = outInfo->Get
|
|
||||||
(
|
|
||||||
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()
|
|
||||||
);
|
|
||||||
|
|
||||||
foamData_->setTime(requestedTimeSteps[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Foam::vtkPV3Foam::debug)
|
if (Foam::vtkPV3Foam::debug)
|
||||||
{
|
{
|
||||||
cout<< "update output with "
|
cout<< "update output with "
|
||||||
@ -361,7 +369,21 @@ int vtkPV3FoamReader::RequestData
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
foamData_->Update(output, lagrangianOutput);
|
#ifdef VTKPV3FOAM_DUALPORT
|
||||||
|
foamData_->Update
|
||||||
|
(
|
||||||
|
output,
|
||||||
|
vtkMultiBlockDataSet::SafeDownCast
|
||||||
|
(
|
||||||
|
outputVector->GetInformationObject(1)->Get
|
||||||
|
(
|
||||||
|
vtkMultiBlockDataSet::DATA_OBJECT()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
);
|
||||||
|
#else
|
||||||
|
foamData_->Update(output, output);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ShowPatchNames)
|
if (ShowPatchNames)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -90,12 +90,21 @@ void Foam::vtkPV3Foam::reduceMemory()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int Foam::vtkPV3Foam::setTime(const double& requestedTime)
|
int Foam::vtkPV3Foam::setTime(int nRequest, const double requestTimes[])
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::setTime(" << requestedTime << ")"
|
Info<< "<beg> Foam::vtkPV3Foam::setTime(";
|
||||||
<< endl;
|
for (int requestI = 0; requestI < nRequest; ++requestI)
|
||||||
|
{
|
||||||
|
if (requestI)
|
||||||
|
{
|
||||||
|
Info<< ", ";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< requestTimes[requestI];
|
||||||
|
}
|
||||||
|
Info << ") - previousIndex = " << timeIndex_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Time& runTime = dbPtr_();
|
Time& runTime = dbPtr_();
|
||||||
@ -103,12 +112,26 @@ int Foam::vtkPV3Foam::setTime(const double& requestedTime)
|
|||||||
// Get times list
|
// Get times list
|
||||||
instantList Times = runTime.times();
|
instantList Times = runTime.times();
|
||||||
|
|
||||||
int nearestIndex = Time::findClosestTimeIndex(Times, requestedTime);
|
int nearestIndex = timeIndex_;
|
||||||
|
|
||||||
|
for (int requestI = 0; requestI < nRequest; ++requestI)
|
||||||
|
{
|
||||||
|
int index = Time::findClosestTimeIndex(Times, requestTimes[requestI]);
|
||||||
|
|
||||||
|
if (index >= 0 && index != timeIndex_)
|
||||||
|
{
|
||||||
|
nearestIndex = index;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (nearestIndex < 0)
|
if (nearestIndex < 0)
|
||||||
{
|
{
|
||||||
nearestIndex = 0;
|
nearestIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// see what has changed
|
// see what has changed
|
||||||
if (timeIndex_ != nearestIndex)
|
if (timeIndex_ != nearestIndex)
|
||||||
{
|
{
|
||||||
@ -138,10 +161,11 @@ int Foam::vtkPV3Foam::setTime(const double& requestedTime)
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<end> Foam::vtkPV3Foam::setTime() - selected time "
|
Info<< "<end> Foam::vtkPV3Foam::setTime() - selectedTime="
|
||||||
<< Times[nearestIndex].name() << " index=" << nearestIndex
|
<< Times[nearestIndex].name() << " index=" << timeIndex_
|
||||||
<< " meshChanged=" << meshChanged_
|
<< "/" << Times.size()
|
||||||
<< " fieldsChanged=" << fieldsChanged_ << endl;
|
<< " meshChanged=" << Switch(meshChanged_)
|
||||||
|
<< " fieldsChanged=" << Switch(fieldsChanged_) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nearestIndex;
|
return nearestIndex;
|
||||||
@ -441,7 +465,6 @@ void Foam::vtkPV3Foam::Update
|
|||||||
cout<< "<beg> Foam::vtkPV3Foam::Update - output with "
|
cout<< "<beg> Foam::vtkPV3Foam::Update - output with "
|
||||||
<< output->GetNumberOfBlocks() << " and "
|
<< output->GetNumberOfBlocks() << " and "
|
||||||
<< lagrangianOutput->GetNumberOfBlocks() << " blocks\n";
|
<< lagrangianOutput->GetNumberOfBlocks() << " blocks\n";
|
||||||
|
|
||||||
output->Print(cout);
|
output->Print(cout);
|
||||||
lagrangianOutput->Print(cout);
|
lagrangianOutput->Print(cout);
|
||||||
printMemory();
|
printMemory();
|
||||||
@ -480,8 +503,10 @@ void Foam::vtkPV3Foam::Update
|
|||||||
reader_->UpdateProgress(0.7);
|
reader_->UpdateProgress(0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VTKPV3FOAM_DUALPORT
|
||||||
// restart port1 at block=0
|
// restart port1 at block=0
|
||||||
blockNo = 0;
|
blockNo = 0;
|
||||||
|
#endif
|
||||||
convertMeshLagrangian(lagrangianOutput, blockNo);
|
convertMeshLagrangian(lagrangianOutput, blockNo);
|
||||||
|
|
||||||
reader_->UpdateProgress(0.8);
|
reader_->UpdateProgress(0.8);
|
||||||
|
|||||||
@ -58,6 +58,11 @@ SourceFiles
|
|||||||
#ifndef vtkPV3Foam_H
|
#ifndef vtkPV3Foam_H
|
||||||
#define vtkPV3Foam_H
|
#define vtkPV3Foam_H
|
||||||
|
|
||||||
|
// do not include legacy strstream headers
|
||||||
|
#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
|
||||||
|
# define VTK_EXCLUDE_STRSTREAM_HEADERS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "className.H"
|
#include "className.H"
|
||||||
#include "fileName.H"
|
#include "fileName.H"
|
||||||
#include "stringList.H"
|
#include "stringList.H"
|
||||||
@ -66,6 +71,8 @@ SourceFiles
|
|||||||
#include "PrimitivePatchInterpolation.H"
|
#include "PrimitivePatchInterpolation.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
|
#undef VTKPV3FOAM_DUALPORT
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
|
||||||
|
|
||||||
class vtkDataArraySelection;
|
class vtkDataArraySelection;
|
||||||
@ -128,6 +135,7 @@ class vtkPV3Foam
|
|||||||
return block_;
|
return block_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Assign block number, return previous value
|
||||||
int block(int blockNo)
|
int block(int blockNo)
|
||||||
{
|
{
|
||||||
int prev = block_;
|
int prev = block_;
|
||||||
@ -713,9 +721,11 @@ public:
|
|||||||
//- Remove patch names from the display
|
//- Remove patch names from the display
|
||||||
void removePatchNames(vtkRenderer* renderer);
|
void removePatchNames(vtkRenderer* renderer);
|
||||||
|
|
||||||
//- set the runTime to the requested time, returns the timeIndex
|
//- set the runTime to the first plausible request time,
|
||||||
// sets to "constant" on error and returns -1
|
// returns the timeIndex
|
||||||
int setTime(const double& requestedTime);
|
// sets to "constant" on error
|
||||||
|
int setTime(int count, const double requestTimes[]);
|
||||||
|
|
||||||
|
|
||||||
//- The current time index
|
//- The current time index
|
||||||
int timeIndex() const
|
int timeIndex() const
|
||||||
|
|||||||
@ -266,7 +266,7 @@ void Foam::vtkPV3Foam::convertLagrangianFields
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
dbPtr_().timeName(),
|
dbPtr_().timeName(),
|
||||||
"lagrangian"/cloudName
|
cloud::prefix/cloudName
|
||||||
);
|
);
|
||||||
pruneObjectList(objects, selectedFields);
|
pruneObjectList(objects, selectedFields);
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,8 @@ InClass
|
|||||||
#ifndef vtkPV3FoamLagrangianFields_H
|
#ifndef vtkPV3FoamLagrangianFields_H
|
||||||
#define vtkPV3FoamLagrangianFields_H
|
#define vtkPV3FoamLagrangianFields_H
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -53,7 +53,7 @@ vtkPolyData* Foam::vtkPV3Foam::lagrangianVTKMesh
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::lagrangianVTKMesh - timePath "
|
Info<< "<beg> Foam::vtkPV3Foam::lagrangianVTKMesh - timePath "
|
||||||
<< mesh.time().timePath()/"lagrangian"/cloudName << endl;
|
<< mesh.time().timePath()/cloud::prefix/cloudName << endl;
|
||||||
printMemory();
|
printMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ vtkPolyData* Foam::vtkPV3Foam::lagrangianVTKMesh
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
"lagrangian"/cloudName
|
cloud::prefix/cloudName
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
IOobject* positionsPtr = sprayObjs.lookup("positions");
|
||||||
|
|||||||
@ -34,6 +34,7 @@ License
|
|||||||
#include "IOPtrList.H"
|
#include "IOPtrList.H"
|
||||||
#include "polyBoundaryMeshEntries.H"
|
#include "polyBoundaryMeshEntries.H"
|
||||||
#include "entry.H"
|
#include "entry.H"
|
||||||
|
#include "Cloud.H"
|
||||||
#include "vtkPV3FoamReader.h"
|
#include "vtkPV3FoamReader.h"
|
||||||
|
|
||||||
// local headers
|
// local headers
|
||||||
@ -148,16 +149,16 @@ void Foam::vtkPV3Foam::updateInfoLagrangian()
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::updateInfoLagrangian" << nl
|
Info<< "<beg> Foam::vtkPV3Foam::updateInfoLagrangian" << nl
|
||||||
<< " " << dbPtr_->timePath()/"lagrangian" << endl;
|
<< " " << dbPtr_->timePath()/cloud::prefix << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// use the db directly since this might be called without a mesh,
|
// use the db directly since this might be called without a mesh,
|
||||||
// but the region must get added back in
|
// but the region must get added back in
|
||||||
fileName lagrangianPrefix("lagrangian");
|
fileName lagrangianPrefix(cloud::prefix);
|
||||||
if (meshRegion_ != polyMesh::defaultRegion)
|
if (meshRegion_ != polyMesh::defaultRegion)
|
||||||
{
|
{
|
||||||
lagrangianPrefix = meshRegion_/"lagrangian";
|
lagrangianPrefix = meshRegion_/cloud::prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search for list of lagrangian objects for this time
|
// Search for list of lagrangian objects for this time
|
||||||
@ -463,10 +464,10 @@ void Foam::vtkPV3Foam::updateInfoLagrangianFields()
|
|||||||
|
|
||||||
// use the db directly since this might be called without a mesh,
|
// use the db directly since this might be called without a mesh,
|
||||||
// but the region must get added back in
|
// but the region must get added back in
|
||||||
fileName lagrangianPrefix("lagrangian");
|
fileName lagrangianPrefix(cloud::prefix);
|
||||||
if (meshRegion_ != polyMesh::defaultRegion)
|
if (meshRegion_ != polyMesh::defaultRegion)
|
||||||
{
|
{
|
||||||
lagrangianPrefix = meshRegion_/"lagrangian";
|
lagrangianPrefix = meshRegion_/cloud::prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
IOobjectList objects
|
IOobjectList objects
|
||||||
|
|||||||
@ -40,7 +40,10 @@ void Foam::vtkPV3Foam::updateInfoFields
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::updateInfoFields" << endl;
|
Info<< "<beg> Foam::vtkPV3Foam::updateInfoFields <"
|
||||||
|
<< meshType::Mesh::typeName
|
||||||
|
<< "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
|
||||||
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
stringList enabledEntries;
|
stringList enabledEntries;
|
||||||
|
|||||||
@ -137,7 +137,12 @@ int USERD_get_gold_part_build_info
|
|||||||
|
|
||||||
if (Numparts_available > nPatches+1)
|
if (Numparts_available > nPatches+1)
|
||||||
{
|
{
|
||||||
strncpy(part_descriptions[nPatches+1], sprayName.c_str(), Z_BUFL);
|
strncpy
|
||||||
|
(
|
||||||
|
part_descriptions[nPatches+1],
|
||||||
|
cloud::prefix.c_str(),
|
||||||
|
Z_BUFL
|
||||||
|
);
|
||||||
number_of_elements[nPatches+1][Z_POINT] = sprayPtr->size();
|
number_of_elements[nPatches+1][Z_POINT] = sprayPtr->size();
|
||||||
number_of_nodes[nPatches+1] = sprayPtr->size();
|
number_of_nodes[nPatches+1] = sprayPtr->size();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,7 +164,7 @@ int USERD_set_filenames
|
|||||||
(
|
(
|
||||||
"positions",
|
"positions",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
runTime,
|
runTime,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
@ -179,7 +179,7 @@ int USERD_set_filenames
|
|||||||
|
|
||||||
sprayPtr = new Cloud<passiveParticle>(*meshPtr);
|
sprayPtr = new Cloud<passiveParticle>(*meshPtr);
|
||||||
|
|
||||||
IOobjectList objects(*meshPtr, runTime.timeName(), "lagrangian");
|
IOobjectList objects(*meshPtr, runTime.timeName(), cloud::prefix);
|
||||||
|
|
||||||
lagrangianScalarNames =
|
lagrangianScalarNames =
|
||||||
(const wordList&)objects.names(sprayScalarFieldName);
|
(const wordList&)objects.names(sprayScalarFieldName);
|
||||||
|
|||||||
@ -12,7 +12,7 @@ if (nVar >= 0)
|
|||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -14,7 +14,7 @@ if (nVar >= 0)
|
|||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
"lagrangian",
|
cloud::prefix,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
|
|||||||
@ -32,7 +32,6 @@ static bool isSpray[maxNames];
|
|||||||
static word scalarName = "volScalarField";
|
static word scalarName = "volScalarField";
|
||||||
static word vectorName = "volVectorField";
|
static word vectorName = "volVectorField";
|
||||||
static word tensorName = "volTensorField";
|
static word tensorName = "volTensorField";
|
||||||
static word sprayName = "lagrangian";
|
|
||||||
static word sprayScalarFieldName = "scalarField";
|
static word sprayScalarFieldName = "scalarField";
|
||||||
static word sprayVectorFieldName = "vectorField";
|
static word sprayVectorFieldName = "vectorField";
|
||||||
static word sprayTensorFieldName = "tensorField";
|
static word sprayTensorFieldName = "tensorField";
|
||||||
|
|||||||
@ -40,45 +40,38 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createEngineTime.H"
|
#include "createEngineTime.H"
|
||||||
#include "createEngineMesh.H"
|
#include "createEngineMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
scalar eps = 1.0e-10;
|
scalar eps = 1.0e-10;
|
||||||
scalar fullCycle = 360.0;
|
scalar fullCycle = 360.0;
|
||||||
|
|
||||||
scalar ca0 = -180.0;
|
scalar ca0 = -180.0;
|
||||||
scalar ca1 = 0.0;
|
scalar ca1 = 0.0;
|
||||||
scalar ca = runTime.theta();
|
|
||||||
|
|
||||||
while (ca > ca0)
|
while (runTime.theta() > ca0)
|
||||||
{
|
{
|
||||||
ca0 += fullCycle;
|
ca0 += fullCycle;
|
||||||
ca1 += fullCycle;
|
ca1 += fullCycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mag(ca - ca0) > eps)
|
while (mag(runTime.theta() - ca0) > eps)
|
||||||
{
|
{
|
||||||
while(mag(ca - ca0) > eps)
|
scalar t0 = runTime.userTimeToTime(ca0 - runTime.theta());
|
||||||
{
|
|
||||||
ca = runTime.theta();
|
|
||||||
scalar t0 = runTime.userTimeToTime(ca0 - ca);
|
|
||||||
runTime.setDeltaT(t0);
|
runTime.setDeltaT(t0);
|
||||||
runTime++;
|
runTime++;
|
||||||
Info << "CA = " << ca << endl;
|
Info<< "CA = " << runTime.theta() << endl;
|
||||||
mesh.move();
|
mesh.move();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
scalar Vmax = sum(mesh.V().field());
|
scalar Vmax = sum(mesh.V().field());
|
||||||
|
|
||||||
while(mag(ca-ca1) > eps)
|
while (mag(runTime.theta()-ca1) > eps)
|
||||||
{
|
{
|
||||||
ca = runTime.theta();
|
scalar t1 = runTime.userTimeToTime(ca1-runTime.theta());
|
||||||
scalar t1 = runTime.userTimeToTime(ca1-ca);
|
|
||||||
runTime.setDeltaT(t1);
|
runTime.setDeltaT(t1);
|
||||||
runTime++;
|
runTime++;
|
||||||
Info<< "CA = " << runTime.theta() << endl;
|
Info<< "CA = " << runTime.theta() << endl;
|
||||||
@ -90,7 +83,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "\nVmax = " << Vmax;
|
Info<< "\nVmax = " << Vmax;
|
||||||
Info<< ", Vmin = " << Vmin << endl;
|
Info<< ", Vmin = " << Vmin << endl;
|
||||||
Info<< "Vmax/Vmin = " << Vmax/Vmin << endl;
|
Info<< "Vmax/Vmin = " << Vmax/Vmin << endl;
|
||||||
Info << "\n end\n";
|
Info<< "\nEnd" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,25 +36,18 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -37,25 +37,18 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
mesh.readUpdate();
|
mesh.readUpdate();
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,8 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
|
#include "timeSelector.H"
|
||||||
|
#include "Time.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "vectorIOField.H"
|
#include "vectorIOField.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
@ -41,23 +43,18 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addTimeOptions.H"
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
// Get times list
|
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
@ -104,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << nl << "End" << endl;
|
Info<< "\nEnd" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,10 +39,12 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
# include "createMesh.H"
|
# include "createNamedMesh.H"
|
||||||
|
|
||||||
IOprobes sniff
|
IOprobes sniff
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,6 +2,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
|
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||||
|
|
||||||
@ -9,5 +10,6 @@ EXE_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
|
-lsurfMesh \
|
||||||
-ltriSurface \
|
-ltriSurface \
|
||||||
-llagrangian
|
-llagrangian
|
||||||
|
|||||||
@ -40,6 +40,7 @@ Description
|
|||||||
- dx : DX scalar or vector format
|
- dx : DX scalar or vector format
|
||||||
- vtk : VTK ascii format
|
- vtk : VTK ascii format
|
||||||
- raw : x y z value format for use with e.g. gnuplot 'splot'.
|
- raw : x y z value format for use with e.g. gnuplot 'splot'.
|
||||||
|
- obj : Wavefron stl. Does not contain values!
|
||||||
- stl : ascii stl. Does not contain values!
|
- stl : ascii stl. Does not contain values!
|
||||||
|
|
||||||
@param interpolationScheme : interpolation scheme, choice of \n
|
@param interpolationScheme : interpolation scheme, choice of \n
|
||||||
|
|||||||
@ -30,7 +30,10 @@ setFormat raw;
|
|||||||
// dx : DX scalar or vector format
|
// dx : DX scalar or vector format
|
||||||
// vtk : VTK ascii format
|
// vtk : VTK ascii format
|
||||||
// raw : x y z value format for use with e.g. gnuplot 'splot'.
|
// raw : x y z value format for use with e.g. gnuplot 'splot'.
|
||||||
// stl : ascii stl. Does not contain values!
|
//
|
||||||
|
// Note:
|
||||||
|
// other formats such as obj, stl, etc can also be written (by proxy)
|
||||||
|
// but without any values!
|
||||||
surfaceFormat vtk;
|
surfaceFormat vtk;
|
||||||
|
|
||||||
// interpolationScheme. choice of
|
// interpolationScheme. choice of
|
||||||
|
|||||||
@ -38,23 +38,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
runTime.setTime(Times[endTime-1], endTime-1);
|
runTime.setTime(timeDirs[timeDirs.size()-1], timeDirs.size()-1);
|
||||||
|
|
||||||
volScalarField pMean
|
volScalarField pMean
|
||||||
(
|
(
|
||||||
@ -68,9 +61,9 @@ int main(int argc, char *argv[])
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -35,30 +35,22 @@ Description
|
|||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -42,24 +42,19 @@ Source files:
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "addTimeOptions.H"
|
timeSelector::addOptions();
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
#include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -42,27 +42,20 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
timeSelector::addOptions();
|
||||||
|
|
||||||
# include "addTimeOptions.H"
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
// Get times list
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
instantList Times = runTime.times();
|
|
||||||
|
|
||||||
// set startTime and endTime depending on -time and -latestTime options
|
|
||||||
# include "checkTimeOptions.H"
|
|
||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
|
||||||
|
|
||||||
# include "createMeshNoClear.H"
|
# include "createMeshNoClear.H"
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
pointMesh pMesh(mesh);
|
||||||
|
|
||||||
for (label i=startTime; i<endTime; i++)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(Times[i], i);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
|
|
||||||
Info<< nl << "Time: " << runTime.timeName() << endl;
|
Info<< nl << "Time: " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ Description
|
|||||||
#ifndef MapLagrangianFields_H
|
#ifndef MapLagrangianFields_H
|
||||||
#define MapLagrangianFields_H
|
#define MapLagrangianFields_H
|
||||||
|
|
||||||
|
#include "cloud.H"
|
||||||
#include "GeometricField.H"
|
#include "GeometricField.H"
|
||||||
#include "meshToMesh.H"
|
#include "meshToMesh.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
@ -60,8 +61,7 @@ void MapLagrangianFields
|
|||||||
|
|
||||||
forAllIter(IOobjectList, fields, fieldIter)
|
forAllIter(IOobjectList, fields, fieldIter)
|
||||||
{
|
{
|
||||||
Info<< " mapping lagrangian field "
|
Info<< " mapping lagrangian field " << fieldIter()->name() << endl;
|
||||||
<< fieldIter()->name() << endl;
|
|
||||||
|
|
||||||
// Read field (does not need mesh)
|
// Read field (does not need mesh)
|
||||||
IOField<Type> fieldSource(*fieldIter());
|
IOField<Type> fieldSource(*fieldIter());
|
||||||
@ -73,7 +73,7 @@ void MapLagrangianFields
|
|||||||
(
|
(
|
||||||
fieldIter()->name(),
|
fieldIter()->name(),
|
||||||
meshTarget.time().timeName(),
|
meshTarget.time().timeName(),
|
||||||
"lagrangian"/cloudName,
|
cloud::prefix/cloudName,
|
||||||
meshTarget,
|
meshTarget,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
|
|||||||
@ -94,7 +94,7 @@ void mapLagrangian(const meshToMesh& meshToMeshInterp)
|
|||||||
(
|
(
|
||||||
readDir
|
readDir
|
||||||
(
|
(
|
||||||
meshSource.time().timePath()/"lagrangian",
|
meshSource.time().timePath()/cloud::prefix,
|
||||||
fileName::DIRECTORY
|
fileName::DIRECTORY
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -106,7 +106,7 @@ void mapLagrangian(const meshToMesh& meshToMeshInterp)
|
|||||||
(
|
(
|
||||||
meshSource,
|
meshSource,
|
||||||
meshSource.time().timeName(),
|
meshSource.time().timeName(),
|
||||||
"lagrangian"/cloudDirs[cloudI]
|
cloud::prefix/cloudDirs[cloudI]
|
||||||
);
|
);
|
||||||
|
|
||||||
IOobject* positionsPtr = objects.lookup("positions");
|
IOobject* positionsPtr = objects.lookup("positions");
|
||||||
|
|||||||
@ -271,13 +271,57 @@ int main(int argc, char *argv[])
|
|||||||
args.caseName()
|
args.caseName()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// start with "constant"
|
||||||
|
runTime.setTime(instant(0, runTime.constant()), 0);
|
||||||
|
|
||||||
|
Info<< "runTime.instance() = " << runTime.instance() << endl;
|
||||||
|
Info<< "runTime.timeName() = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "write MeshedSurface 'yetAnother' via proxy as surfMesh"
|
||||||
|
<< endl;
|
||||||
|
surf.write
|
||||||
|
(
|
||||||
|
runTime,
|
||||||
|
"yetAnother"
|
||||||
|
);
|
||||||
|
|
||||||
|
surfMesh surfIn
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"default",
|
||||||
|
runTime.timeName(),
|
||||||
|
runTime,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
MeshedSurface<face> surfIn2(runTime, "foobar");
|
||||||
|
|
||||||
|
Info<<"surfIn2 = " << surfIn2.size() << endl;
|
||||||
|
|
||||||
|
Info<< "surfIn = " << surfIn.size() << endl;
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "writing surfMesh as obj = oldSurfIn.obj" << endl;
|
||||||
|
surfIn.write("oldSurfIn.obj");
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "runTime.instance() = " << runTime.instance() << endl;
|
||||||
|
|
||||||
surfMesh surfOut
|
surfMesh surfOut
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"mySurf",
|
"mySurf",
|
||||||
runTime.instance(),
|
runTime.instance(),
|
||||||
runTime
|
runTime,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
),
|
),
|
||||||
surf.xfer()
|
surf.xfer()
|
||||||
);
|
);
|
||||||
@ -299,6 +343,25 @@ int main(int argc, char *argv[])
|
|||||||
dimless
|
dimless
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Info<<" surf name= " << surfOut.name() <<nl;
|
||||||
|
Info<< "rename to anotherSurf" << endl;
|
||||||
|
surfOut.rename("anotherSurf");
|
||||||
|
|
||||||
|
Info<<" surf name= " << surfOut.name() <<nl;
|
||||||
|
|
||||||
|
// advance time to 1
|
||||||
|
runTime.setTime(instant(1), 1);
|
||||||
|
surfOut.setInstance(runTime.timeName());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "writing surfMesh again well: " << surfOut.objectPath() << endl;
|
||||||
|
surfOut.write();
|
||||||
|
|
||||||
|
// write directly
|
||||||
|
surfOut.write("someName.ofs");
|
||||||
|
|
||||||
|
#if 1
|
||||||
const surfZoneList& zones = surfOut.surfZones();
|
const surfZoneList& zones = surfOut.surfZones();
|
||||||
forAll(zones, zoneI)
|
forAll(zones, zoneI)
|
||||||
{
|
{
|
||||||
@ -318,9 +381,10 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"pointIds",
|
"zoneIds.",
|
||||||
|
// "pointIds",
|
||||||
surfOut.instance(),
|
surfOut.instance(),
|
||||||
"pointFields",
|
// "pointFields",
|
||||||
surfOut,
|
surfOut,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
@ -337,6 +401,10 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "write pointIds (for testing only): "
|
Info<< "write pointIds (for testing only): "
|
||||||
<< pointIds.objectPath() << endl;
|
<< pointIds.objectPath() << endl;
|
||||||
pointIds.write();
|
pointIds.write();
|
||||||
|
|
||||||
|
Info<<"surfMesh with these names: " << surfOut.names() << endl;
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,12 +77,6 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
|
|||||||
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty
|
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty
|
||||||
|
|
||||||
|
|
||||||
# Operating System/Platform from Unix or MSWindows
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# WM_OS = Unix | MSWindows
|
|
||||||
: ${WM_OS:=Unix}; export WM_OS
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc)
|
# Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc)
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
: ${WM_COMPILER:=Gcc}; export WM_COMPILER
|
: ${WM_COMPILER:=Gcc}; export WM_COMPILER
|
||||||
@ -105,7 +99,7 @@ export WM_COMPILER_LIB_ARCH=
|
|||||||
# WM_JAVAC_OPTION = Opt | Debug
|
# WM_JAVAC_OPTION = Opt | Debug
|
||||||
: ${WM_JAVAC_OPTION:=Opt}; export WM_JAVAC_OPTION
|
: ${WM_JAVAC_OPTION:=Opt}; export WM_JAVAC_OPTION
|
||||||
|
|
||||||
# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI
|
# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
|
||||||
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
|
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
146
etc/controlDict
146
etc/controlDict
@ -34,6 +34,7 @@ Documentation
|
|||||||
|
|
||||||
DebugSwitches
|
DebugSwitches
|
||||||
{
|
{
|
||||||
|
Analytical 0;
|
||||||
APIdiffCoefFunc 0;
|
APIdiffCoefFunc 0;
|
||||||
Ar 0;
|
Ar 0;
|
||||||
BICCG 0;
|
BICCG 0;
|
||||||
@ -57,18 +58,25 @@ DebugSwitches
|
|||||||
C8H18 0;
|
C8H18 0;
|
||||||
C9H20 0;
|
C9H20 0;
|
||||||
CH3OH 0;
|
CH3OH 0;
|
||||||
CallbackRegistry 0;
|
CH4N2O 0;
|
||||||
CarnahanStarling 0;
|
CarnahanStarling 0;
|
||||||
|
CallbackRegistry 0;
|
||||||
|
CentredFitData<biLinearFitPolynomial> 0;
|
||||||
|
CentredFitData<linearFitPolynomial> 0;
|
||||||
|
CentredFitData<quadraticFitPolynomial> 0;
|
||||||
|
CentredFitData<quadraticLinearFitPolynomial> 0;
|
||||||
ChomiakInjector 0;
|
ChomiakInjector 0;
|
||||||
|
Cloud<basicKinematicParcel> 0;
|
||||||
|
Cloud<basicReactingParcel> 0;
|
||||||
|
Cloud<basicThermoParcel> 0;
|
||||||
Cloud<indexedParticle> 0;
|
Cloud<indexedParticle> 0;
|
||||||
Cloud<kinematicParcel> 0;
|
|
||||||
Cloud<parcel> 0;
|
Cloud<parcel> 0;
|
||||||
Cloud<passiveParticle> 0;
|
Cloud<passiveParticle> 0;
|
||||||
Cloud<reactingParcel> 0;
|
|
||||||
Cloud<thermoParcel> 0;
|
|
||||||
Cloud<trackedParticle> 0;
|
Cloud<trackedParticle> 0;
|
||||||
CoEuler 0;
|
CoEuler 0;
|
||||||
CompositionModel 0;
|
CompositionModel 0;
|
||||||
|
ConeInjection 0;
|
||||||
|
Constant 0;
|
||||||
ConstantRateDevolatilisation 0;
|
ConstantRateDevolatilisation 0;
|
||||||
CrankNicholson 0;
|
CrankNicholson 0;
|
||||||
CrossPowerLaw 0;
|
CrossPowerLaw 0;
|
||||||
@ -77,6 +85,7 @@ DebugSwitches
|
|||||||
DICGaussSeidel 0;
|
DICGaussSeidel 0;
|
||||||
DILU 0;
|
DILU 0;
|
||||||
DILUGaussSeidel 0;
|
DILUGaussSeidel 0;
|
||||||
|
DataEntry 0;
|
||||||
DeardorffDiffStress 0;
|
DeardorffDiffStress 0;
|
||||||
DispersionModel 0;
|
DispersionModel 0;
|
||||||
DispersionRASModel 0;
|
DispersionRASModel 0;
|
||||||
@ -107,39 +116,40 @@ DebugSwitches
|
|||||||
H2O 0;
|
H2O 0;
|
||||||
HashTable 0;
|
HashTable 0;
|
||||||
HeatTransferModel 0;
|
HeatTransferModel 0;
|
||||||
|
HerschelBulkley 0;
|
||||||
HrenyaSinclair 0;
|
HrenyaSinclair 0;
|
||||||
IC8H18 0;
|
IC8H18 0;
|
||||||
ICCG 0;
|
ICCG 0;
|
||||||
|
IDDESDelta 0;
|
||||||
IDEA 0;
|
IDEA 0;
|
||||||
IFstream 0;
|
IFstream 0;
|
||||||
|
IOMap<dictionary> 0;
|
||||||
IOPtrList<MRFZone> 0;
|
IOPtrList<MRFZone> 0;
|
||||||
IOPtrList<coordinateSystem> 0;
|
IOPtrList<coordinateSystem> 0;
|
||||||
IOPtrList<injector> 0;
|
IOPtrList<injector> 0;
|
||||||
IOPtrList<porousZone> 0;
|
IOPtrList<porousZone> 0;
|
||||||
IOobject 0;
|
IOobject 0;
|
||||||
InjectionModel 0;
|
InjectionModel 0;
|
||||||
|
IntegrationScheme 0;
|
||||||
JohnsonJackson 0;
|
JohnsonJackson 0;
|
||||||
KRR4 0;
|
KRR4 0;
|
||||||
KinematicCloud<kinematicParcel> 0;
|
KinematicCloud<basicKinematicParcel> 0;
|
||||||
KinematicCloud<reactingParcel> 0;
|
KinematicCloud<basicReactingParcel> 0;
|
||||||
KinematicCloud<thermoParcel> 0;
|
KinematicCloud<basicThermoParcel> 0;
|
||||||
KinematicParcel<reactingParcel> 0;
|
KinematicParcel<basicReactingParcel> 0;
|
||||||
KinematicParcel<thermoParcel> 0;
|
KinematicParcel<basicThermoParcel> 0;
|
||||||
|
LESModel 0;
|
||||||
LESdelta 0;
|
LESdelta 0;
|
||||||
LESfilter 0;
|
LESfilter 0;
|
||||||
LESmodel 0;
|
|
||||||
LISA 0;
|
LISA 0;
|
||||||
LRR 0;
|
LRR 0;
|
||||||
LRRDiffStress 0;
|
LRRDiffStress 0;
|
||||||
LamBremhorstKE 0;
|
LamBremhorstKE 0;
|
||||||
LaunderGibsonRSTM 0;
|
LaunderGibsonRSTM 0;
|
||||||
LaunderSharmaKE 0;
|
LaunderSharmaKE 0;
|
||||||
LduMatrix 1;
|
|
||||||
LienCubicKE 0;
|
LienCubicKE 0;
|
||||||
LienCubicKELowRe 0;
|
LienCubicKELowRe 0;
|
||||||
LienLeschzinerLowRe 0;
|
LienLeschzinerLowRe 0;
|
||||||
Lun 0;
|
|
||||||
LunSavage 0;
|
|
||||||
MB 0;
|
MB 0;
|
||||||
MC 0;
|
MC 0;
|
||||||
MCV 0;
|
MCV 0;
|
||||||
@ -191,11 +201,12 @@ DebugSwitches
|
|||||||
QUICK 0;
|
QUICK 0;
|
||||||
QUICKV 0;
|
QUICKV 0;
|
||||||
QZeta 0;
|
QZeta 0;
|
||||||
|
RASModel 0;
|
||||||
RK 0;
|
RK 0;
|
||||||
RNGkEpsilon 0;
|
RNGkEpsilon 0;
|
||||||
RanzMarshall 0;
|
RanzMarshall 0;
|
||||||
ReactingCloud<reactingParcel> 0;
|
ReactingCloud<basicReactingParcel> 0;
|
||||||
ReactingParcel<reactingParcel> 0;
|
ReactingParcel<basicReactingParcel> 0;
|
||||||
Rebound 0;
|
Rebound 0;
|
||||||
ReitzDiwakar 0;
|
ReitzDiwakar 0;
|
||||||
ReitzKHRT 0;
|
ReitzKHRT 0;
|
||||||
@ -208,6 +219,8 @@ DebugSwitches
|
|||||||
SIBS 0;
|
SIBS 0;
|
||||||
SKA 0;
|
SKA 0;
|
||||||
SLTS 0;
|
SLTS 0;
|
||||||
|
SRFModel 0;
|
||||||
|
SRFVelocity 0;
|
||||||
STARCDRotation 0;
|
STARCDRotation 0;
|
||||||
Schaeffer 0;
|
Schaeffer 0;
|
||||||
SchillerNaumann 0;
|
SchillerNaumann 0;
|
||||||
@ -215,8 +228,9 @@ DebugSwitches
|
|||||||
SingleKineticRateDevolatilisation 0;
|
SingleKineticRateDevolatilisation 0;
|
||||||
SingleMixtureFraction 0;
|
SingleMixtureFraction 0;
|
||||||
Smagorinsky 0;
|
Smagorinsky 0;
|
||||||
SmoothSolver 0;
|
|
||||||
SpalartAllmaras 0;
|
SpalartAllmaras 0;
|
||||||
|
SpalartAllmarasDDES 0;
|
||||||
|
SpalartAllmarasIDDES 0;
|
||||||
SphereDrag 0;
|
SphereDrag 0;
|
||||||
StandardWallInteraction 0;
|
StandardWallInteraction 0;
|
||||||
StaticHashTable 0;
|
StaticHashTable 0;
|
||||||
@ -228,13 +242,17 @@ DebugSwitches
|
|||||||
SyamlalOBrien 0;
|
SyamlalOBrien 0;
|
||||||
SyamlalRogersOBrien 0;
|
SyamlalRogersOBrien 0;
|
||||||
TAB 0;
|
TAB 0;
|
||||||
ThermoCloud<reactingParcel> 0;
|
Table 0;
|
||||||
ThermoCloud<thermoParcel> 0;
|
ThermoCloud<basicReactingParcel> 0;
|
||||||
ThermoParcel<reactingParcel> 0;
|
ThermoCloud<basicThermoParcel> 0;
|
||||||
ThermoParcel<thermoParcel> 0;
|
ThermoParcel<basicReactingParcel> 0;
|
||||||
|
ThermoParcel<basicThermoParcel> 0;
|
||||||
UMIST 0;
|
UMIST 0;
|
||||||
UMISTV 0;
|
UMISTV 0;
|
||||||
Unix 0;
|
Unix 0;
|
||||||
|
UpwindFitData<cubicUpwindFitPolynomial> 0;
|
||||||
|
UpwindFitData<quadraticLinearUpwindFitPolynomial> 0;
|
||||||
|
UpwindFitData<quadraticUpwindFitPolynomial> 0;
|
||||||
WallInteractionModel 0;
|
WallInteractionModel 0;
|
||||||
WenYu 0;
|
WenYu 0;
|
||||||
aC11H10 0;
|
aC11H10 0;
|
||||||
@ -245,6 +263,9 @@ DebugSwitches
|
|||||||
addPoint 0;
|
addPoint 0;
|
||||||
advective 0;
|
advective 0;
|
||||||
algebraicPair 0;
|
algebraicPair 0;
|
||||||
|
alphaContactAngle 0;
|
||||||
|
alphaFixedPressure 0;
|
||||||
|
alphatWallFunction 0;
|
||||||
angularOscillatingDisplacement 0;
|
angularOscillatingDisplacement 0;
|
||||||
angularOscillatingVelocity 0;
|
angularOscillatingVelocity 0;
|
||||||
anisotropic 0;
|
anisotropic 0;
|
||||||
@ -252,14 +273,21 @@ DebugSwitches
|
|||||||
atomizationModel 0;
|
atomizationModel 0;
|
||||||
attachDetach 0;
|
attachDetach 0;
|
||||||
autoHexMeshDriver 0;
|
autoHexMeshDriver 0;
|
||||||
|
autoLayerDriver 0;
|
||||||
|
autoRefineDriver 0;
|
||||||
|
autoSnapDriver 0;
|
||||||
bC11H10 0;
|
bC11H10 0;
|
||||||
backward 0;
|
backward 0;
|
||||||
basePatch 0;
|
basePatch 0;
|
||||||
basicKinematicCloud 0;
|
basicKinematicCloud 0;
|
||||||
|
basicKinematicParcel 0;
|
||||||
basicMixture 0;
|
basicMixture 0;
|
||||||
basicReactingCloud 0;
|
basicReactingCloud 0;
|
||||||
|
basicReactingParcel 0;
|
||||||
basicThermo 0;
|
basicThermo 0;
|
||||||
basicThermoCloud 0;
|
basicThermoCloud 0;
|
||||||
|
basicThermoParcel 0;
|
||||||
|
biLinearFit 0;
|
||||||
binaryAbsorptionEmission 0;
|
binaryAbsorptionEmission 0;
|
||||||
blended 0;
|
blended 0;
|
||||||
blobsSheetAtomization 0;
|
blobsSheetAtomization 0;
|
||||||
@ -274,7 +302,6 @@ DebugSwitches
|
|||||||
boxToPoint 0;
|
boxToPoint 0;
|
||||||
breakupModel 0;
|
breakupModel 0;
|
||||||
calculated 0;
|
calculated 0;
|
||||||
cartesian 0;
|
|
||||||
cell 0;
|
cell 0;
|
||||||
cellClassification 0;
|
cellClassification 0;
|
||||||
cellCuts 0;
|
cellCuts 0;
|
||||||
@ -292,6 +319,8 @@ DebugSwitches
|
|||||||
cellToFace 0;
|
cellToFace 0;
|
||||||
cellToPoint 0;
|
cellToPoint 0;
|
||||||
cellZone 0;
|
cellZone 0;
|
||||||
|
centredCECStencil 0;
|
||||||
|
centredCFCStencil 0;
|
||||||
chemistryReader 0;
|
chemistryReader 0;
|
||||||
chemistrySolver 0;
|
chemistrySolver 0;
|
||||||
chemkinReader 0;
|
chemkinReader 0;
|
||||||
@ -304,24 +333,25 @@ DebugSwitches
|
|||||||
commSchedule 0;
|
commSchedule 0;
|
||||||
commonRailInjector 0;
|
commonRailInjector 0;
|
||||||
compound 0;
|
compound 0;
|
||||||
conductivityModel 0;
|
|
||||||
constInjector 0;
|
constInjector 0;
|
||||||
constant 0;
|
constant 0;
|
||||||
constantAbsorptionEmission 0;
|
constantAbsorptionEmission 0;
|
||||||
constantGammaContactAngle 0;
|
constantAlphaContactAngle 0;
|
||||||
constantScatter 0;
|
constantScatter 0;
|
||||||
coordinateRotation 0;
|
coordinateRotation 0;
|
||||||
coordinateSystem 0;
|
coordinateSystem 0;
|
||||||
|
coordinateSystems 0;
|
||||||
corrected 0;
|
corrected 0;
|
||||||
coupled 0;
|
coupled 0;
|
||||||
cubeRootVol 0;
|
cubeRootVol 0;
|
||||||
cubic 0;
|
cubic 0;
|
||||||
|
cubicUpwindFit 0;
|
||||||
curve 0;
|
curve 0;
|
||||||
cyclic 0;
|
cyclic 0;
|
||||||
cyclicLduInterface 0;
|
cyclicLduInterface 0;
|
||||||
cyclicLduInterfaceField 0;
|
cyclicLduInterfaceField 0;
|
||||||
|
cylinderToCell 0;
|
||||||
cylindrical 0;
|
cylindrical 0;
|
||||||
dataSchedule 0;
|
|
||||||
decompositionMethod 0;
|
decompositionMethod 0;
|
||||||
definedHollowConeInjector 0;
|
definedHollowConeInjector 0;
|
||||||
definedInjector 0;
|
definedInjector 0;
|
||||||
@ -332,6 +362,7 @@ DebugSwitches
|
|||||||
dimensionSet 1;
|
dimensionSet 1;
|
||||||
directMapped 0;
|
directMapped 0;
|
||||||
directMappedPatch 0;
|
directMappedPatch 0;
|
||||||
|
directMappedVelocityFlux 0;
|
||||||
directionMixed 0;
|
directionMixed 0;
|
||||||
directional 0;
|
directional 0;
|
||||||
disallowDefaultFvsPatchField 0;
|
disallowDefaultFvsPatchField 0;
|
||||||
@ -345,6 +376,7 @@ DebugSwitches
|
|||||||
displacementInterpolation 0;
|
displacementInterpolation 0;
|
||||||
displacementLaplacian 0;
|
displacementLaplacian 0;
|
||||||
displacementSBRStress 0;
|
displacementSBRStress 0;
|
||||||
|
distanceSurface 0;
|
||||||
downwind 0;
|
downwind 0;
|
||||||
dragModel 0;
|
dragModel 0;
|
||||||
duplicatePoints 0;
|
duplicatePoints 0;
|
||||||
@ -352,8 +384,8 @@ DebugSwitches
|
|||||||
dynMixedSmagorinsky 0;
|
dynMixedSmagorinsky 0;
|
||||||
dynOneEqEddy 0;
|
dynOneEqEddy 0;
|
||||||
dynSmagorinsky 0;
|
dynSmagorinsky 0;
|
||||||
|
dynamicAlphaContactAngle 0;
|
||||||
dynamicFvMesh 0;
|
dynamicFvMesh 0;
|
||||||
dynamicGammaContactAngle 0;
|
|
||||||
dynamicInkJetFvMesh 0;
|
dynamicInkJetFvMesh 0;
|
||||||
dynamicMotionSolverFvMesh 0;
|
dynamicMotionSolverFvMesh 0;
|
||||||
dynamicRefineFvMesh 0;
|
dynamicRefineFvMesh 0;
|
||||||
@ -363,6 +395,7 @@ DebugSwitches
|
|||||||
empty 0;
|
empty 0;
|
||||||
engineMesh 0;
|
engineMesh 0;
|
||||||
enrichedPatch 0;
|
enrichedPatch 0;
|
||||||
|
epsilonWallFunction 0;
|
||||||
errorDrivenRefinement 0;
|
errorDrivenRefinement 0;
|
||||||
evaporationModel 0;
|
evaporationModel 0;
|
||||||
exponential 0;
|
exponential 0;
|
||||||
@ -387,13 +420,20 @@ DebugSwitches
|
|||||||
filteredLinear 0;
|
filteredLinear 0;
|
||||||
filteredLinear2 0;
|
filteredLinear2 0;
|
||||||
filteredLinear2V 0;
|
filteredLinear2V 0;
|
||||||
|
filteredLinear3 0;
|
||||||
|
filteredLinear3V 0;
|
||||||
fixedEnthalpy 0;
|
fixedEnthalpy 0;
|
||||||
fixedFluxBuoyantPressure 0;
|
fixedFluxBuoyantPressure 0;
|
||||||
|
fixedFluxBoussinesqBuoyantPressure 0;
|
||||||
fixedFluxPressure 0;
|
fixedFluxPressure 0;
|
||||||
fixedGradient 0;
|
fixedGradient 0;
|
||||||
|
fixedInternalEnergy 0;
|
||||||
|
fixedInternalValue 0;
|
||||||
fixedNormalSlip 0;
|
fixedNormalSlip 0;
|
||||||
|
fixedPressureCompressibleDensity 0;
|
||||||
fixedUnburntEnthalpy 0;
|
fixedUnburntEnthalpy 0;
|
||||||
fixedValue 0;
|
fixedValue 0;
|
||||||
|
flowRateInletVelocity 0;
|
||||||
fluxCorrectedVelocity 0;
|
fluxCorrectedVelocity 0;
|
||||||
foamChemistryReader 0;
|
foamChemistryReader 0;
|
||||||
foamFile 0;
|
foamFile 0;
|
||||||
@ -416,8 +456,6 @@ DebugSwitches
|
|||||||
fvTensorMatrix 0;
|
fvTensorMatrix 0;
|
||||||
fvVectorMatrix 0;
|
fvVectorMatrix 0;
|
||||||
fvsPatchField 0;
|
fvsPatchField 0;
|
||||||
gammaContactAngle 0;
|
|
||||||
gammaFixedPressure 0;
|
|
||||||
general 0;
|
general 0;
|
||||||
generic 0;
|
generic 0;
|
||||||
genericPatch 0;
|
genericPatch 0;
|
||||||
@ -429,6 +467,7 @@ DebugSwitches
|
|||||||
gnuplot 0;
|
gnuplot 0;
|
||||||
gradientDispersionRAS 0;
|
gradientDispersionRAS 0;
|
||||||
gradientEnthalpy 0;
|
gradientEnthalpy 0;
|
||||||
|
gradientInternalEnergy 0;
|
||||||
gradientUnburntEnthalpy 0;
|
gradientUnburntEnthalpy 0;
|
||||||
granularPressureModel 0;
|
granularPressureModel 0;
|
||||||
hCombustionThermo 0;
|
hCombustionThermo 0;
|
||||||
@ -459,25 +498,29 @@ DebugSwitches
|
|||||||
hhuMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
|
hhuMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
|
||||||
hierarchical 0;
|
hierarchical 0;
|
||||||
hollowConeInjector 0;
|
hollowConeInjector 0;
|
||||||
|
iC3H8O 0;
|
||||||
indexedOctree 0;
|
indexedOctree 0;
|
||||||
indexedParticle 0;
|
indexedParticle 0;
|
||||||
injectorModel 0;
|
injectorModel 0;
|
||||||
injectorType 0;
|
injectorType 0;
|
||||||
inletOutlet 0;
|
inletOutlet 0;
|
||||||
inletOutletTotalTemperature 0;
|
inletOutletTotalTemperature 0;
|
||||||
inputMode 0;
|
|
||||||
interfaceCompression 0;
|
interfaceCompression 0;
|
||||||
intersectedSurface 0;
|
intersectedSurface 0;
|
||||||
inverseDistance 0;
|
inverseDistance 0;
|
||||||
inverseFaceDistance 0;
|
inverseFaceDistance 0;
|
||||||
inversePointDistance 0;
|
inversePointDistance 0;
|
||||||
inverseVolume 0;
|
inverseVolume 0;
|
||||||
|
isoSurface 0;
|
||||||
|
isoSurfaceCell 0;
|
||||||
jplot 0;
|
jplot 0;
|
||||||
jumpCyclic 0;
|
jumpCyclic 0;
|
||||||
kEpsilon 0;
|
kEpsilon 0;
|
||||||
|
kOmega 0;
|
||||||
kOmegaSST 0;
|
kOmegaSST 0;
|
||||||
|
kOmegaSSTSAS 0;
|
||||||
|
kQRWallFunction 0;
|
||||||
kinematicCloud 0;
|
kinematicCloud 0;
|
||||||
kinematicParcel 0;
|
|
||||||
labelField 0;
|
labelField 0;
|
||||||
labelList 0;
|
labelList 0;
|
||||||
labelListList 0;
|
labelListList 0;
|
||||||
@ -496,6 +539,7 @@ DebugSwitches
|
|||||||
leastSquares 0;
|
leastSquares 0;
|
||||||
leastSquaresVectors 0;
|
leastSquaresVectors 0;
|
||||||
level 2;
|
level 2;
|
||||||
|
limitWith 0;
|
||||||
limited 0;
|
limited 0;
|
||||||
limitedCubic 0;
|
limitedCubic 0;
|
||||||
limitedCubic01 0;
|
limitedCubic01 0;
|
||||||
@ -510,6 +554,7 @@ DebugSwitches
|
|||||||
limitedSurfaceInterpolationScheme 0;
|
limitedSurfaceInterpolationScheme 0;
|
||||||
limitedVanLeer 0;
|
limitedVanLeer 0;
|
||||||
linear 0;
|
linear 0;
|
||||||
|
linearFit 0;
|
||||||
linearUpwind 0;
|
linearUpwind 0;
|
||||||
linearUpwindV 0;
|
linearUpwindV 0;
|
||||||
liquid 0;
|
liquid 0;
|
||||||
@ -520,7 +565,6 @@ DebugSwitches
|
|||||||
localPointRegion 0;
|
localPointRegion 0;
|
||||||
lowReOneEqEddy 0;
|
lowReOneEqEddy 0;
|
||||||
manual 0;
|
manual 0;
|
||||||
massFlowRateInletVelocity 0;
|
|
||||||
meshCutAndRemove 0;
|
meshCutAndRemove 0;
|
||||||
meshCutter 0;
|
meshCutter 0;
|
||||||
meshModifier 0;
|
meshModifier 0;
|
||||||
@ -532,6 +576,7 @@ DebugSwitches
|
|||||||
midPointAndFace 0;
|
midPointAndFace 0;
|
||||||
mixed 0;
|
mixed 0;
|
||||||
mixedEnthalpy 0;
|
mixedEnthalpy 0;
|
||||||
|
mixedInternalEnergy 0;
|
||||||
mixedSmagorinsky 0;
|
mixedSmagorinsky 0;
|
||||||
mixedUnburntEnthalpy 0;
|
mixedUnburntEnthalpy 0;
|
||||||
mixerFvMesh 0;
|
mixerFvMesh 0;
|
||||||
@ -544,22 +589,32 @@ DebugSwitches
|
|||||||
motionSolver 0;
|
motionSolver 0;
|
||||||
movingConeTopoFvMesh 0;
|
movingConeTopoFvMesh 0;
|
||||||
movingWallVelocity 0;
|
movingWallVelocity 0;
|
||||||
muSgsWallFunction 0;
|
muSgsSpalartAllmarasWallFunction 0;
|
||||||
multiDirRefinement 0;
|
multiDirRefinement 0;
|
||||||
|
multiHoleInjector 0;
|
||||||
multivariateSelection 0;
|
multivariateSelection 0;
|
||||||
mutStandardRoughWallFunction 0;
|
mutRoughWallFunction 0;
|
||||||
|
mutSpalartAllmarasStandardRoughWallFunction 0;
|
||||||
|
mutSpalartAllmarasStandardWallFunction 0;
|
||||||
|
mutSpalartAllmarasWallFunction 0;
|
||||||
|
mutWallFunction 0;
|
||||||
|
nC3H8O 0;
|
||||||
nbrToCell 0;
|
nbrToCell 0;
|
||||||
nearestToCell 0;
|
nearestToCell 0;
|
||||||
|
nearestToPoint 0;
|
||||||
noAbsorptionEmission 0;
|
noAbsorptionEmission 0;
|
||||||
noDragModel 0;
|
noDragModel 0;
|
||||||
noRadiation 0;
|
noRadiation 0;
|
||||||
none 0;
|
none 0;
|
||||||
normal 0;
|
normal 0;
|
||||||
normalToFace 0;
|
normalToFace 0;
|
||||||
nuSgsWallFunction 0;
|
nuSgsSpalartAllmarasWallFunction 0;
|
||||||
nutStandardRoughWallFunction 0;
|
nutRoughWallFunction 0;
|
||||||
nutStandardWallFunction 0;
|
nutSpalartAllmarasStandardRoughWallFunction 0;
|
||||||
|
nutSpalartAllmarasStandardWallFunction 0;
|
||||||
|
nutSpalartAllmarasWallFunction 0;
|
||||||
nutWallFunction 0;
|
nutWallFunction 0;
|
||||||
|
obj 0;
|
||||||
objectRegistry 0;
|
objectRegistry 0;
|
||||||
octree 0;
|
octree 0;
|
||||||
octreeDataEdges 0;
|
octreeDataEdges 0;
|
||||||
@ -567,7 +622,7 @@ DebugSwitches
|
|||||||
octreeDataFaceList 0;
|
octreeDataFaceList 0;
|
||||||
octreeDataTriSurface 0;
|
octreeDataTriSurface 0;
|
||||||
off 0;
|
off 0;
|
||||||
offsetTriSurfaceMesh 0;
|
omegaWallFunction 0;
|
||||||
oneEqEddy 0;
|
oneEqEddy 0;
|
||||||
orientedSurface 0;
|
orientedSurface 0;
|
||||||
oscillatingDisplacement 0;
|
oscillatingDisplacement 0;
|
||||||
@ -609,11 +664,13 @@ DebugSwitches
|
|||||||
polyMeshInfo 0;
|
polyMeshInfo 0;
|
||||||
polyTopoChange 0;
|
polyTopoChange 0;
|
||||||
polyTopoChanger 0;
|
polyTopoChanger 0;
|
||||||
|
powerLaw 0;
|
||||||
pressureDirectedInletOutletVelocity 0;
|
pressureDirectedInletOutletVelocity 0;
|
||||||
pressureDirectedInletVelocity 0;
|
pressureDirectedInletVelocity 0;
|
||||||
pressureInletOutletVelocity 0;
|
pressureInletOutletVelocity 0;
|
||||||
pressureInletUniformVelocity 0;
|
pressureInletUniformVelocity 0;
|
||||||
pressureInletVelocity 0;
|
pressureInletVelocity 0;
|
||||||
|
pressureNormalInletOutletVelocity 0;
|
||||||
pressureSwirlInjector 0;
|
pressureSwirlInjector 0;
|
||||||
primitiveMesh 0;
|
primitiveMesh 0;
|
||||||
primitiveMeshGeometry 0;
|
primitiveMeshGeometry 0;
|
||||||
@ -625,11 +682,13 @@ DebugSwitches
|
|||||||
pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>> 0;
|
pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>> 0;
|
||||||
pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>> 0;
|
pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>> 0;
|
||||||
quadratic 0;
|
quadratic 0;
|
||||||
radialModel 0;
|
quadraticFit 0;
|
||||||
|
quadraticLinearFit 0;
|
||||||
|
quadraticLinearUpwindFit 0;
|
||||||
|
quadraticUpwindFit 0;
|
||||||
radiationModel 0;
|
radiationModel 0;
|
||||||
raw 0;
|
raw 0;
|
||||||
reactingCloud 0;
|
reactingCloud 0;
|
||||||
reactingParcel 0;
|
|
||||||
reaction 0;
|
reaction 0;
|
||||||
realizableKE 0;
|
realizableKE 0;
|
||||||
refinementHistory 0;
|
refinementHistory 0;
|
||||||
@ -637,6 +696,7 @@ DebugSwitches
|
|||||||
reflect 0;
|
reflect 0;
|
||||||
regIOobject 0;
|
regIOobject 0;
|
||||||
regionSplit 0;
|
regionSplit 0;
|
||||||
|
regionToCell 0;
|
||||||
remove 0;
|
remove 0;
|
||||||
removeCell 0;
|
removeCell 0;
|
||||||
removeCells 0;
|
removeCells 0;
|
||||||
@ -720,11 +780,12 @@ DebugSwitches
|
|||||||
tensorAverageField 0;
|
tensorAverageField 0;
|
||||||
tensorField 0;
|
tensorField 0;
|
||||||
thermoCloud 0;
|
thermoCloud 0;
|
||||||
thermoParcel 0;
|
|
||||||
thermophysicalFunction 0;
|
thermophysicalFunction 0;
|
||||||
time 0;
|
time 0;
|
||||||
timeVaryingGammaContactAngle 0;
|
timeVaryingAlphaContactAngle 0;
|
||||||
|
timeVaryingFlowRateInletVelocity 0;
|
||||||
timeVaryingMappedFixedValue 0;
|
timeVaryingMappedFixedValue 0;
|
||||||
|
timeVaryingTotalPressure 0;
|
||||||
timeVaryingUniformFixedValue 0;
|
timeVaryingUniformFixedValue 0;
|
||||||
timer 0;
|
timer 0;
|
||||||
topoAction 0;
|
topoAction 0;
|
||||||
@ -745,17 +806,19 @@ DebugSwitches
|
|||||||
treeNode 0;
|
treeNode 0;
|
||||||
triSurface 0;
|
triSurface 0;
|
||||||
triSurfaceMesh 0;
|
triSurfaceMesh 0;
|
||||||
triSurfaceMeshes 0;
|
|
||||||
turbulenceModel 0;
|
turbulenceModel 0;
|
||||||
|
turbulentHeatFluxTemperature 0;
|
||||||
turbulentInlet 0;
|
turbulentInlet 0;
|
||||||
turbulentIntensityKineticEnergyInlet 0;
|
turbulentIntensityKineticEnergyInlet 0;
|
||||||
turbulentMixingLengthDissipationRateInlet 0;
|
turbulentMixingLengthDissipationRateInlet 0;
|
||||||
|
turbulentMixingLengthFrequencyInlet 0;
|
||||||
uncorrected 0;
|
uncorrected 0;
|
||||||
undoableMeshCutter 0;
|
undoableMeshCutter 0;
|
||||||
uniform 0;
|
uniform 0;
|
||||||
uniformFixedValue 0;
|
uniformFixedValue 0;
|
||||||
unitInjector 0;
|
unitInjector 0;
|
||||||
upwind 0;
|
upwind 0;
|
||||||
|
upwindCFCStencil 0;
|
||||||
value 0;
|
value 0;
|
||||||
vanAlbada 0;
|
vanAlbada 0;
|
||||||
vanAlbadaV 0;
|
vanAlbadaV 0;
|
||||||
@ -828,7 +891,6 @@ DimensionedConstants
|
|||||||
//- Stefan-Boltzmann constant [J/(K4 m2 s)]
|
//- Stefan-Boltzmann constant [J/(K4 m2 s)]
|
||||||
sigmaSB sigmaSB [1 0 -3 -4 0 0 0] 5.670e-08;
|
sigmaSB sigmaSB [1 0 -3 -4 0 0 0] 5.670e-08;
|
||||||
|
|
||||||
|
|
||||||
/* USCS units
|
/* USCS units
|
||||||
|
|
||||||
//- Universal gas constant [lbm ft2/(s2 kmol R)]
|
//- Universal gas constant [lbm ft2/(s2 kmol R)]
|
||||||
|
|||||||
@ -71,12 +71,6 @@ setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
|
|||||||
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty
|
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty
|
||||||
|
|
||||||
|
|
||||||
# Operating System/Platform from Unix or MSWindows
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# WM_OS = Unix | MSWindows
|
|
||||||
if ( ! $?WM_OS ) setenv WM_OS Unix
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc)
|
# Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc)
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
if ( ! $?WM_COMPILER ) setenv WM_COMPILER Gcc
|
if ( ! $?WM_COMPILER ) setenv WM_COMPILER Gcc
|
||||||
@ -99,7 +93,7 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt
|
|||||||
# WM_JAVAC_OPTION = Opt | Debug
|
# WM_JAVAC_OPTION = Opt | Debug
|
||||||
if ( ! $?WM_JAVAC_OPTION ) setenv WM_JAVAC_OPTION Opt
|
if ( ! $?WM_JAVAC_OPTION ) setenv WM_JAVAC_OPTION Opt
|
||||||
|
|
||||||
# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI
|
# WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
|
||||||
if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI
|
if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -87,8 +87,8 @@ switch ("$compilerInstall")
|
|||||||
case OpenFOAM:
|
case OpenFOAM:
|
||||||
switch ("$WM_COMPILER")
|
switch ("$WM_COMPILER")
|
||||||
case Gcc:
|
case Gcc:
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||||
breaksw
|
breaksw
|
||||||
case Gcc42:
|
case Gcc42:
|
||||||
@ -231,6 +231,15 @@ case FJMPI:
|
|||||||
_foamAddLib /opt/FJSVpnidt/lib
|
_foamAddLib /opt/FJSVpnidt/lib
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
|
case QSMPI:
|
||||||
|
setenv MPI_ARCH_PATH /usr/lib/mpi
|
||||||
|
setenv FOAM_MPI_LIBBIN FOAM_LIBBIN/qsmpi
|
||||||
|
|
||||||
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
|
breaksw
|
||||||
|
|
||||||
default:
|
default:
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/dummy
|
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/dummy
|
||||||
breaksw
|
breaksw
|
||||||
|
|||||||
@ -111,8 +111,8 @@ case "$compilerInstall" in
|
|||||||
OpenFOAM)
|
OpenFOAM)
|
||||||
case "$WM_COMPILER" in
|
case "$WM_COMPILER" in
|
||||||
Gcc)
|
Gcc)
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||||
;;
|
;;
|
||||||
Gcc42)
|
Gcc42)
|
||||||
@ -259,6 +259,15 @@ FJMPI)
|
|||||||
_foamAddLib /opt/FJSVpnidt/lib
|
_foamAddLib /opt/FJSVpnidt/lib
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
QSMPI)
|
||||||
|
export MPI_ARCH_PATH=/usr/lib/mpi
|
||||||
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/qsmpi
|
||||||
|
|
||||||
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/dummy
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/dummy
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -152,17 +152,12 @@ inline void Foam::FixedList<T, Size>::checkSize(const label size) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check index i is within valid range (0 ... size-1).
|
// Check index i is within valid range (0 ... size-1)
|
||||||
|
// The check for zero-sized list is already done in static assert
|
||||||
template<class T, unsigned Size>
|
template<class T, unsigned Size>
|
||||||
inline void Foam::FixedList<T, Size>::checkIndex(const label i) const
|
inline void Foam::FixedList<T, Size>::checkIndex(const label i) const
|
||||||
{
|
{
|
||||||
if (!Size)
|
if (i < 0 || unsigned(i) >= Size)
|
||||||
{
|
|
||||||
FatalErrorIn("FixedList<T, Size>::checkIndex(const label)")
|
|
||||||
<< "attempt to access element from zero-sized list"
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
else if (i < 0 || i >= label(Size))
|
|
||||||
{
|
{
|
||||||
FatalErrorIn("FixedList<T, Size>::checkIndex(const label)")
|
FatalErrorIn("FixedList<T, Size>::checkIndex(const label)")
|
||||||
<< "index " << i << " out of range 0 ... " << (Size-1)
|
<< "index " << i << " out of range 0 ... " << (Size-1)
|
||||||
|
|||||||
@ -58,10 +58,6 @@ Foam::List<T>::List(const label s)
|
|||||||
{
|
{
|
||||||
this->v_ = new T[this->size_];
|
this->v_ = new T[this->size_];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -87,10 +83,6 @@ Foam::List<T>::List(const label s, const T& a)
|
|||||||
List_ELEM((*this), vp, i) = a;
|
List_ELEM((*this), vp, i) = a;
|
||||||
List_END_FOR_ALL
|
List_END_FOR_ALL
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -119,10 +111,6 @@ Foam::List<T>::List(const List<T>& a)
|
|||||||
List_END_FOR_ALL
|
List_END_FOR_ALL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -165,10 +153,6 @@ Foam::List<T>::List(List<T>& a, bool reUse)
|
|||||||
List_END_FOR_ALL
|
List_END_FOR_ALL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -188,10 +172,6 @@ Foam::List<T>::List(const UList<T>& a, const unallocLabelList& map)
|
|||||||
List_ELEM((*this), vp, i) = List_ELEM(a, ap, (map[i]));
|
List_ELEM((*this), vp, i) = List_ELEM(a, ap, (map[i]));
|
||||||
List_END_FOR_ALL
|
List_END_FOR_ALL
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -234,7 +214,7 @@ Foam::List<T>::List(const FixedList<T, Size>& lst)
|
|||||||
:
|
:
|
||||||
UList<T>(NULL, Size)
|
UList<T>(NULL, Size)
|
||||||
{
|
{
|
||||||
if (Size)
|
if (this->size_)
|
||||||
{
|
{
|
||||||
this->v_ = new T[this->size_];
|
this->v_ = new T[this->size_];
|
||||||
|
|
||||||
@ -243,10 +223,6 @@ Foam::List<T>::List(const FixedList<T, Size>& lst)
|
|||||||
this->operator[](i) = lst[i];
|
this->operator[](i) = lst[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -265,10 +241,6 @@ Foam::List<T>::List(const PtrList<T>& lst)
|
|||||||
this->operator[](i) = lst[i];
|
this->operator[](i) = lst[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -293,10 +265,6 @@ Foam::List<T>::List(const SLList<T>& lst)
|
|||||||
this->operator[](i++) = iter();
|
this->operator[](i++) = iter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -315,10 +283,6 @@ Foam::List<T>::List(const IndirectList<T>& lst)
|
|||||||
this->operator[](i) = lst[i];
|
this->operator[](i) = lst[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -337,10 +301,6 @@ Foam::List<T>::List(const UIndirectList<T>& lst)
|
|||||||
this->operator[](i) = lst[i];
|
this->operator[](i) = lst[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -359,10 +319,6 @@ Foam::List<T>::List(const BiIndirectList<T>& lst)
|
|||||||
this->operator[](i) = lst[i];
|
this->operator[](i) = lst[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->v_ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,8 +26,8 @@ Class
|
|||||||
Foam::UIndirectList
|
Foam::UIndirectList
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A List with indirect addressing. Like IndirectList but does not store
|
A List with indirect addressing.
|
||||||
addressing.
|
Like IndirectList but does not store addressing.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
UIndirectListI.H
|
UIndirectListI.H
|
||||||
@ -44,6 +44,10 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward declaration of friend functions and operators
|
||||||
|
template<class T> class UIndirectList;
|
||||||
|
template<class T> Ostream& operator<<(Ostream&, const UIndirectList<T>&);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class UIndirectList Declaration
|
Class UIndirectList Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -92,6 +96,17 @@ public:
|
|||||||
|
|
||||||
//- Assignment of all entries to the given value
|
//- Assignment of all entries to the given value
|
||||||
inline void operator=(const T&);
|
inline void operator=(const T&);
|
||||||
|
|
||||||
|
// Ostream operator
|
||||||
|
|
||||||
|
//- Write UIndirectList to Ostream
|
||||||
|
// Binary output is currently still a bit of a problem
|
||||||
|
friend Ostream& operator<<
|
||||||
|
#ifndef __CINT__
|
||||||
|
<T>
|
||||||
|
#endif
|
||||||
|
(Ostream&, const UIndirectList<T>&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -103,6 +118,10 @@ public:
|
|||||||
|
|
||||||
#include "UIndirectListI.H"
|
#include "UIndirectListI.H"
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "UIndirectListIO.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
126
src/OpenFOAM/containers/Lists/UIndirectList/UIndirectListIO.C
Normal file
126
src/OpenFOAM/containers/Lists/UIndirectList/UIndirectListIO.C
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "UIndirectList.H"
|
||||||
|
#include "Ostream.H"
|
||||||
|
#include "token.H"
|
||||||
|
#include "contiguous.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Foam::Ostream& os,
|
||||||
|
const Foam::UIndirectList<T>& L
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Write list contents depending on data format
|
||||||
|
if (os.format() == IOstream::ASCII || !contiguous<T>())
|
||||||
|
{
|
||||||
|
bool uniform = false;
|
||||||
|
|
||||||
|
if (L.size() > 1 && contiguous<T>())
|
||||||
|
{
|
||||||
|
uniform = true;
|
||||||
|
|
||||||
|
forAll(L, i)
|
||||||
|
{
|
||||||
|
if (L[i] != L[0])
|
||||||
|
{
|
||||||
|
uniform = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uniform)
|
||||||
|
{
|
||||||
|
// Write size and start delimiter
|
||||||
|
os << L.size() << token::BEGIN_BLOCK;
|
||||||
|
|
||||||
|
// Write contents
|
||||||
|
os << L[0];
|
||||||
|
|
||||||
|
// Write end delimiter
|
||||||
|
os << token::END_BLOCK;
|
||||||
|
}
|
||||||
|
else if (L.size() < 11 && contiguous<T>())
|
||||||
|
{
|
||||||
|
// Write size and start delimiter
|
||||||
|
os << L.size() << token::BEGIN_LIST;
|
||||||
|
|
||||||
|
// Write contents
|
||||||
|
forAll(L, i)
|
||||||
|
{
|
||||||
|
if (i) os << token::SPACE;
|
||||||
|
os << L[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write end delimiter
|
||||||
|
os << token::END_LIST;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Write size and start delimiter
|
||||||
|
os << nl << L.size() << nl << token::BEGIN_LIST;
|
||||||
|
|
||||||
|
// Write contents
|
||||||
|
forAll(L, i)
|
||||||
|
{
|
||||||
|
os << nl << L[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write end delimiter
|
||||||
|
os << nl << token::END_LIST << nl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// this is annoying, and wasteful, but there's currently no alternative
|
||||||
|
|
||||||
|
os << nl << L.size() << nl;
|
||||||
|
|
||||||
|
if (L.size())
|
||||||
|
{
|
||||||
|
List<T> lst = L();
|
||||||
|
|
||||||
|
os.write
|
||||||
|
(
|
||||||
|
reinterpret_cast<const char*>(lst.cdata()),
|
||||||
|
lst.byteSize()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check state of IOstream
|
||||||
|
os.check("Ostream& operator<<(Ostream&, const UIndirectList&)");
|
||||||
|
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -359,6 +359,10 @@ public:
|
|||||||
template<class Stream>
|
template<class Stream>
|
||||||
static inline Stream& writeDivider(Stream& os);
|
static inline Stream& writeDivider(Stream& os);
|
||||||
|
|
||||||
|
//- Write the standard end file divider
|
||||||
|
template<class Stream>
|
||||||
|
static inline Stream& writeEndDivider(Stream& os);
|
||||||
|
|
||||||
//- Write header
|
//- Write header
|
||||||
bool writeHeader(Ostream&) const;
|
bool writeHeader(Ostream&) const;
|
||||||
|
|
||||||
|
|||||||
@ -82,5 +82,14 @@ inline Stream& Foam::IOobject::writeDivider(Stream& os)
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Stream>
|
||||||
|
inline Stream& Foam::IOobject::writeEndDivider(Stream& os)
|
||||||
|
{
|
||||||
|
os << "\n\n"
|
||||||
|
"// ************************************************************************* //\n";
|
||||||
|
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
//- Read a hex label from an input stream
|
//- Read a hex label from an input stream
|
||||||
label readHexLabel(ISstream& is);
|
label readHexLabel(ISstream&);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -36,16 +36,16 @@ const char* const Foam::instant::typeName = "instant";
|
|||||||
Foam::instant::instant()
|
Foam::instant::instant()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Foam::instant::instant(const scalar tval, const word& tname)
|
Foam::instant::instant(const scalar val, const word& tname)
|
||||||
:
|
:
|
||||||
value_(tval),
|
value_(val),
|
||||||
name_(tname)
|
name_(tname)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Foam::instant::instant(const scalar tval)
|
Foam::instant::instant(const scalar val)
|
||||||
:
|
:
|
||||||
value_(tval),
|
value_(val),
|
||||||
name_(Time::timeName(tval))
|
name_(Time::timeName(val))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Foam::instant::instant(const word& tname)
|
Foam::instant::instant(const word& tname)
|
||||||
@ -57,20 +57,19 @@ Foam::instant::instant(const word& tname)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
int Foam::operator==(const instant& I1, const instant& I2)
|
bool Foam::operator==(const instant& a, const instant& b)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
I1.value_ < I2.value_ + SMALL
|
a.value_ < b.value_ + SMALL
|
||||||
&& I1.value_ > I2.value_ - SMALL
|
&& a.value_ > b.value_ - SMALL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Foam::operator != (const instant& I1, const instant& I2)
|
bool Foam::operator!=(const instant& a, const instant& b)
|
||||||
{
|
{
|
||||||
// Invert the '==' operator ('0'='false')
|
return !operator==(a, b);
|
||||||
return I1 == I2 ? 0 : 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -50,8 +50,8 @@ class instant;
|
|||||||
|
|
||||||
// Friend Operators
|
// Friend Operators
|
||||||
|
|
||||||
int operator==(const instant&, const instant&);
|
bool operator==(const instant&, const instant&);
|
||||||
int operator!=(const instant&, const instant&);
|
bool operator!=(const instant&, const instant&);
|
||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
@ -79,9 +79,9 @@ public:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool operator()(const instant& one, const instant& two) const
|
bool operator()(const instant& a, const instant& b) const
|
||||||
{
|
{
|
||||||
return one.value() < two.value();
|
return a.value() < b.value();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -137,8 +137,8 @@ public:
|
|||||||
|
|
||||||
// Friend Operators
|
// Friend Operators
|
||||||
|
|
||||||
friend int operator==(const instant&, const instant&);
|
friend bool operator==(const instant&, const instant&);
|
||||||
friend int operator!=(const instant&, const instant&);
|
friend bool operator!=(const instant&, const instant&);
|
||||||
|
|
||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|||||||
@ -117,12 +117,7 @@ Foam::dictionary::dictionary
|
|||||||
name_(dict.name()),
|
name_(dict.name()),
|
||||||
parent_(parentDict)
|
parent_(parentDict)
|
||||||
{
|
{
|
||||||
for
|
forAllIter(IDLList<entry>, *this, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::iterator iter = begin();
|
|
||||||
iter != end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
hashedEntries_.insert(iter().keyword(), &iter());
|
hashedEntries_.insert(iter().keyword(), &iter());
|
||||||
|
|
||||||
@ -147,12 +142,7 @@ Foam::dictionary::dictionary
|
|||||||
name_(dict.name()),
|
name_(dict.name()),
|
||||||
parent_(dictionary::null)
|
parent_(dictionary::null)
|
||||||
{
|
{
|
||||||
for
|
forAllIter(IDLList<entry>, *this, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::iterator iter = begin();
|
|
||||||
iter != end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
hashedEntries_.insert(iter().keyword(), &iter());
|
hashedEntries_.insert(iter().keyword(), &iter());
|
||||||
|
|
||||||
@ -238,12 +228,7 @@ Foam::SHA1Digest Foam::dictionary::digest() const
|
|||||||
OSHA1stream os;
|
OSHA1stream os;
|
||||||
|
|
||||||
// process entries
|
// process entries
|
||||||
for
|
forAllConstIter(IDLList<entry>, *this, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = begin();
|
|
||||||
iter != end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
os << *iter;
|
os << *iter;
|
||||||
}
|
}
|
||||||
@ -262,7 +247,8 @@ bool Foam::dictionary::found(const word& keyword, bool recursive) const
|
|||||||
{
|
{
|
||||||
if (patternEntries_.size())
|
if (patternEntries_.size())
|
||||||
{
|
{
|
||||||
DLList<entry*>::const_iterator wcLink = patternEntries_.begin();
|
DLList<entry*>::const_iterator wcLink =
|
||||||
|
patternEntries_.begin();
|
||||||
DLList<autoPtr<regExp> >::const_iterator reLink =
|
DLList<autoPtr<regExp> >::const_iterator reLink =
|
||||||
patternRegexps_.begin();
|
patternRegexps_.begin();
|
||||||
|
|
||||||
@ -475,12 +461,7 @@ Foam::wordList Foam::dictionary::toc() const
|
|||||||
wordList keys(size());
|
wordList keys(size());
|
||||||
|
|
||||||
label nKeys = 0;
|
label nKeys = 0;
|
||||||
for
|
forAllConstIter(IDLList<entry>::const_iterator, *this, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = begin();
|
|
||||||
iter != end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
keys[nKeys++] = iter().keyword();
|
keys[nKeys++] = iter().keyword();
|
||||||
}
|
}
|
||||||
@ -494,12 +475,7 @@ Foam::List<Foam::keyType> Foam::dictionary::keys(bool patterns) const
|
|||||||
List<keyType> keys(size());
|
List<keyType> keys(size());
|
||||||
|
|
||||||
label nKeys = 0;
|
label nKeys = 0;
|
||||||
for
|
forAllConstIter(IDLList<entry>, *this, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = begin();
|
|
||||||
iter != end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (iter().keyword().isPattern() ? patterns : !patterns)
|
if (iter().keyword().isPattern() ? patterns : !patterns)
|
||||||
{
|
{
|
||||||
@ -553,7 +529,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IOWarningIn("dictionary::add(entry*)", (*this))
|
IOWarningIn("dictionary::add(entry*, bool)", (*this))
|
||||||
<< "problem replacing entry "<< entryPtr->keyword()
|
<< "problem replacing entry "<< entryPtr->keyword()
|
||||||
<< " in dictionary " << name() << endl;
|
<< " in dictionary " << name() << endl;
|
||||||
|
|
||||||
@ -582,7 +558,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IOWarningIn("dictionary::add(entry* entryPtr)", (*this))
|
IOWarningIn("dictionary::add(entry*, bool)", (*this))
|
||||||
<< "attempt to add entry "<< entryPtr->keyword()
|
<< "attempt to add entry "<< entryPtr->keyword()
|
||||||
<< " which already exists in dictionary " << name()
|
<< " which already exists in dictionary " << name()
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -598,11 +574,13 @@ void Foam::dictionary::add(const entry& e, bool mergeEntry)
|
|||||||
add(e.clone(*this).ptr(), mergeEntry);
|
add(e.clone(*this).ptr(), mergeEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::dictionary::add(const keyType& k, const word& w, bool overwrite)
|
void Foam::dictionary::add(const keyType& k, const word& w, bool overwrite)
|
||||||
{
|
{
|
||||||
add(new primitiveEntry(k, token(w)), overwrite);
|
add(new primitiveEntry(k, token(w)), overwrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::dictionary::add
|
void Foam::dictionary::add
|
||||||
(
|
(
|
||||||
const keyType& k,
|
const keyType& k,
|
||||||
@ -613,16 +591,19 @@ void Foam::dictionary::add
|
|||||||
add(new primitiveEntry(k, token(s)), overwrite);
|
add(new primitiveEntry(k, token(s)), overwrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::dictionary::add(const keyType& k, const label l, bool overwrite)
|
void Foam::dictionary::add(const keyType& k, const label l, bool overwrite)
|
||||||
{
|
{
|
||||||
add(new primitiveEntry(k, token(l)), overwrite);
|
add(new primitiveEntry(k, token(l)), overwrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::dictionary::add(const keyType& k, const scalar s, bool overwrite)
|
void Foam::dictionary::add(const keyType& k, const scalar s, bool overwrite)
|
||||||
{
|
{
|
||||||
add(new primitiveEntry(k, token(s)), overwrite);
|
add(new primitiveEntry(k, token(s)), overwrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::dictionary::add
|
void Foam::dictionary::add
|
||||||
(
|
(
|
||||||
const keyType& k,
|
const keyType& k,
|
||||||
@ -652,6 +633,7 @@ void Foam::dictionary::set(const entry& e)
|
|||||||
set(e.clone(*this).ptr());
|
set(e.clone(*this).ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::dictionary::set(const keyType& k, const dictionary& d)
|
void Foam::dictionary::set(const keyType& k, const dictionary& d)
|
||||||
{
|
{
|
||||||
set(new dictionaryEntry(k, *this, d));
|
set(new dictionaryEntry(k, *this, d));
|
||||||
@ -665,8 +647,10 @@ bool Foam::dictionary::remove(const word& Keyword)
|
|||||||
if (iter != hashedEntries_.end())
|
if (iter != hashedEntries_.end())
|
||||||
{
|
{
|
||||||
// Delete from patterns first
|
// Delete from patterns first
|
||||||
DLList<entry*>::iterator wcLink = patternEntries_.begin();
|
DLList<entry*>::iterator wcLink =
|
||||||
DLList<autoPtr<regExp> >::iterator reLink = patternRegexps_.begin();
|
patternEntries_.begin();
|
||||||
|
DLList<autoPtr<regExp> >::iterator reLink =
|
||||||
|
patternRegexps_.begin();
|
||||||
|
|
||||||
// Find in pattern using exact match only
|
// Find in pattern using exact match only
|
||||||
if (findInPatterns(false, Keyword, wcLink, reLink))
|
if (findInPatterns(false, Keyword, wcLink, reLink))
|
||||||
@ -792,12 +776,7 @@ bool Foam::dictionary::merge(const dictionary& dict)
|
|||||||
|
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
for
|
forAllConstIter(IDLList<entry>, dict, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = dict.begin();
|
|
||||||
iter != dict.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
HashTable<entry*>::iterator fnd = hashedEntries_.find(iter().keyword());
|
HashTable<entry*>::iterator fnd = hashedEntries_.find(iter().keyword());
|
||||||
|
|
||||||
@ -882,12 +861,7 @@ void Foam::dictionary::operator=(const dictionary& rhs)
|
|||||||
// Create clones of the entries in the given dictionary
|
// Create clones of the entries in the given dictionary
|
||||||
// resetting the parentDict to this dictionary
|
// resetting the parentDict to this dictionary
|
||||||
|
|
||||||
for
|
forAllConstIter(IDLList<entry>, rhs, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = rhs.begin();
|
|
||||||
iter != rhs.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
add(iter().clone(*this).ptr());
|
add(iter().clone(*this).ptr());
|
||||||
}
|
}
|
||||||
@ -904,12 +878,7 @@ void Foam::dictionary::operator+=(const dictionary& rhs)
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
forAllConstIter(IDLList<entry>, rhs, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = rhs.begin();
|
|
||||||
iter != rhs.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
add(iter().clone(*this).ptr());
|
add(iter().clone(*this).ptr());
|
||||||
}
|
}
|
||||||
@ -926,12 +895,7 @@ void Foam::dictionary::operator|=(const dictionary& rhs)
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
forAllConstIter(IDLList<entry>, rhs, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = rhs.begin();
|
|
||||||
iter != rhs.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!found(iter().keyword()))
|
if (!found(iter().keyword()))
|
||||||
{
|
{
|
||||||
@ -951,12 +915,7 @@ void Foam::dictionary::operator<<=(const dictionary& rhs)
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
forAllConstIter(IDLList<entry>, rhs, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = rhs.begin();
|
|
||||||
iter != rhs.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
set(iter().clone(*this).ptr());
|
set(iter().clone(*this).ptr());
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user