Commit 260ee334 authored by Andrew Heather's avatar Andrew Heather
Browse files
parents e71993f8 559ceb3b
......@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
+ aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg)
+ aSf*p_pos - aSf*p_neg;
volTensorField tauMC("tauMC", mu*dev2(fvc::grad(U)().T()));
volTensorField tauMC("tauMC", mu*dev2(Foam::T(fvc::grad(U))));
// --- Solve density
Info<< max(rho) << " " << min(rho) << endl;
......
......@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
+ aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg)
+ aSf*p_pos - aSf*p_neg;
volTensorField tauMC("tauMC", mu*dev2(fvc::grad(U)().T()));
volTensorField tauMC("tauMC", mu*dev2(Foam::T(fvc::grad(U))));
// --- Solve density
solve(fvm::ddt(rho) + fvc::div(phi));
......
......@@ -482,7 +482,7 @@ bool doCommand
topoSet& currentSet = currentSetPtr();
Info<< " Set:" << currentSet.name()
<< " Size:" << currentSet.size()
<< " Size:" << returnReduce(currentSet.size(), sumOp<label>())
<< " Action:" << actionName
<< endl;
......@@ -579,7 +579,9 @@ bool doCommand
);
Info<< " Writing " << currentSet.name()
<< " (size " << currentSet.size() << ") to "
<< " (size "
<< returnReduce(currentSet.size(), sumOp<label>())
<< ") to "
<< currentSet.instance()/currentSet.local()
/currentSet.name()
<< " and to vtk file " << vtkName << endl << endl;
......@@ -589,7 +591,9 @@ bool doCommand
else
{
Info<< " Writing " << currentSet.name()
<< " (size " << currentSet.size() << ") to "
<< " (size "
<< returnReduce(currentSet.size(), sumOp<label>())
<< ") to "
<< currentSet.instance()/currentSet.local()
/currentSet.name() << endl << endl;
}
......@@ -642,9 +646,9 @@ enum commandStatus
void printMesh(const Time& runTime, const polyMesh& mesh)
{
Info<< "Time:" << runTime.timeName()
<< " cells:" << mesh.nCells()
<< " faces:" << mesh.nFaces()
<< " points:" << mesh.nPoints()
<< " cells:" << mesh.globalData().nTotalCells()
<< " faces:" << mesh.globalData().nTotalFaces()
<< " points:" << mesh.globalData().nTotalPoints()
<< " patches:" << mesh.boundaryMesh().size()
<< " bb:" << mesh.bounds() << nl;
}
......
......@@ -561,10 +561,6 @@ int main(int argc, char *argv[])
mkDir(args.path());
}
// Switch timeStamp checking to one which does not do any
// parallel sync for same reason
regIOobject::fileModificationChecking = regIOobject::timeStamp;
# include "createTime.H"
......
......@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
// write bounding box corners
if (args.optionFound("blockMesh"))
{
pointField cornerPts = boundBox(surf.points()).corners();
pointField cornerPts = boundBox(surf.points()).points();
Info<<"// blockMeshDict info" << nl;
......
......@@ -51,7 +51,7 @@ using namespace Foam;
void massPropertiesSolid
(
const pointField& pts,
const triFaceList triFaces,
const triFaceList& triFaces,
scalar density,
scalar& mass,
vector& cM,
......@@ -208,7 +208,7 @@ void massPropertiesSolid
void massPropertiesShell
(
const pointField& pts,
const triFaceList triFaces,
const triFaceList& triFaces,
scalar density,
scalar& mass,
vector& cM,
......
......@@ -593,6 +593,7 @@ DebugSwitches
muSgsSpalartAllmarasWallFunction 0;
multiDirRefinement 0;
multiHoleInjector 0;
multiLevel 1;
multivariateSelection 0;
mutRoughWallFunction 0;
mutSpalartAllmarasStandardRoughWallFunction 0;
......
......@@ -259,7 +259,8 @@ unset MPI_ARCH_PATH MPI_HOME
case "$WM_MPLIB" in
OPENMPI)
mpi_version=openmpi-1.4.1
#mpi_version=openmpi-1.4.1
mpi_version=openmpi-1.5
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mpi_version
# Tell OpenMPI where to find its install directory
......
......@@ -40,8 +40,7 @@ const Foam::scalar
Foam::FaceCellWave<Type, TrackingData>::geomTol_ = 1e-6;
template <class Type, class TrackingData>
const Foam::scalar
Foam::FaceCellWave<Type, TrackingData>::propagationTol_ = 0.01;
Foam::scalar Foam::FaceCellWave<Type, TrackingData>::propagationTol_ = 0.01;
template <class Type, class TrackingData>
Foam::label Foam::FaceCellWave<Type, TrackingData>::dummyTrackData_ = 12345;
......@@ -516,8 +515,8 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
refCast<const processorPolyPatch>(patch);
// Allocate buffers
labelList receiveFaces(patch.size());
List<Type> receiveFacesInfo(patch.size());
labelList receiveFaces;
List<Type> receiveFacesInfo;
{
UIPstream fromNeighbour(procPatch.neighbProcNo(), pBufs);
......@@ -675,8 +674,7 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
hasCyclicPatches_(hasCyclicPatch()),
nEvals_(0),
nUnvisitedCells_(mesh_.nCells()),
nUnvisitedFaces_(mesh_.nFaces()),
iter_(0)
nUnvisitedFaces_(mesh_.nFaces())
{}
......@@ -707,16 +705,15 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
hasCyclicPatches_(hasCyclicPatch()),
nEvals_(0),
nUnvisitedCells_(mesh_.nCells()),
nUnvisitedFaces_(mesh_.nFaces()),
iter_(0)
nUnvisitedFaces_(mesh_.nFaces())
{
// Copy initial changed faces data
setFaceInfo(changedFaces, changedFacesInfo);
// Iterate until nothing changes
iterate(maxIter);
label iter = iterate(maxIter);
if ((maxIter > 0) && (iter_ >= maxIter))
if ((maxIter > 0) && (iter >= maxIter))
{
FatalErrorIn
(
......@@ -796,7 +793,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
);
}
// Neighbour. Hack for check if face has neighbour.
// Neighbour.
if (faceI < nInternalFaces)
{
cellI = neighbour[faceI];
......@@ -927,11 +924,13 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::iterate(const label maxIter)
handleProcPatches();
}
while (iter_ < maxIter)
label iter = 0;
while (iter < maxIter)
{
if (debug)
{
Pout<< " Iteration " << iter_ << endl;
Pout<< " Iteration " << iter << endl;
}
nEvals_ = 0;
......@@ -963,10 +962,11 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::iterate(const label maxIter)
break;
}
++iter_;
++iter;
}
return nUnvisitedCells_;
return iter;
}
// ************************************************************************* //
......@@ -114,9 +114,6 @@ class FaceCellWave
label nUnvisitedCells_;
label nUnvisitedFaces_;
//- Iteration counter
label iter_;
// Private Member Functions
......@@ -232,7 +229,7 @@ class FaceCellWave
// Private static data
static const scalar geomTol_;
static const scalar propagationTol_;
static scalar propagationTol_;
//- Used as default trackdata value to satisfy default template
// argument.
......@@ -340,8 +337,8 @@ public:
// counted double)
label cellToFace();
//- Iterate until no changes or maxIter reached. Returns number of
// unset cells (see getUnsetCells)
//- Iterate until no changes or maxIter reached. Returns actual
// number of iterations.
label iterate(const label maxIter);
};
......
......@@ -134,8 +134,8 @@ public:
return calc_.data();
}
//- Iterate until no changes or maxIter reached. Returns number of
// unset cells (see getUnsetCells)
//- Iterate until no changes or maxIter reached. Returns actual
// number of iterations.
label iterate(const label maxIter)
{
return calc_.iterate(maxIter);
......
......@@ -66,6 +66,10 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
: Pstream::treeCommunication()
);
// Master reads headerclassname from file. Make sure this gets
// transfered as well as contents.
Pstream::scatter(comms, const_cast<word&>(headerClassName()));
Pstream::scatter(comms, note());
// Get my communication order
const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()];
......
......@@ -201,6 +201,11 @@ bool Foam::regIOobject::read()
: Pstream::treeCommunication()
);
// Master reads headerclassname from file. Make sure this gets
// transfered as well as contents.
Pstream::scatter(comms, const_cast<word&>(headerClassName()));
Pstream::scatter(comms, note());
// Get my communication order
const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()];
......
......@@ -36,6 +36,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
UNARY_FUNCTION(tensor, tensor, T, transform)
UNARY_FUNCTION(scalar, tensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, tensor, sph, transform)
UNARY_FUNCTION(symmTensor, tensor, symm, transform)
......
......@@ -49,6 +49,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
UNARY_FUNCTION(tensor, tensor, T, transform)
UNARY_FUNCTION(scalar, tensor, tr, transform)
UNARY_FUNCTION(sphericalTensor, tensor, sph, transform)
UNARY_FUNCTION(symmTensor, tensor, symm, transform)
......
......@@ -736,7 +736,7 @@ Foam::argList::argList
{
Info<< "Slaves : " << slaveProcs << nl;
if (roots.size())
{
{
Info<< "Roots : " << roots << nl;
}
Info<< "Pstream initialized with:" << nl
......@@ -770,7 +770,8 @@ Foam::argList::argList
if (bannerEnabled)
{
Info<< "Monitoring run-time modified files using "
Info<< "fileModificationChecking : "
<< "Monitoring run-time modified files using "
<< regIOobject::fileCheckTypesNames
[
regIOobject::fileModificationChecking
......
......@@ -284,10 +284,8 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
case interpolationTable::REPEAT:
{
// adjust lookupValue to >= minLimit
while (lookupValue < minLimit)
{
lookupValue += maxLimit;
}
scalar span = maxLimit-minLimit;
lookupValue = fmod(lookupValue-minLimit, span) + minLimit;
break;
}
}
......@@ -325,10 +323,8 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
case interpolationTable::REPEAT:
{
// adjust lookupValue <= maxLimit
while (lookupValue > maxLimit)
{
lookupValue -= maxLimit;
}
scalar span = maxLimit-minLimit;
lookupValue = fmod(lookupValue-minLimit, span) + minLimit;
break;
}
}
......@@ -540,11 +536,9 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
}
case interpolationTable::REPEAT:
{
// adjust lookupValue to >= minLimin
while (lookupValue < minLimit)
{
lookupValue += maxLimit;
}
// adjust lookupValue to >= minLimit
scalar span = maxLimit-minLimit;
lookupValue = fmod(lookupValue-minLimit, span) + minLimit;
break;
}
}
......@@ -582,10 +576,8 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
case interpolationTable::REPEAT:
{
// adjust lookupValue <= maxLimit
while (lookupValue > maxLimit)
{
lookupValue -= maxLimit;
}
scalar span = maxLimit-minLimit;
lookupValue = fmod(lookupValue-minLimit, span) + minLimit;
break;
}
}
......
......@@ -84,7 +84,11 @@ Foam::solution::solution
dictName,
obr.time().system(),
obr,
IOobject::MUST_READ_IF_MODIFIED,
(
obr.readOpt() == IOobject::MUST_READ
? IOobject::MUST_READ_IF_MODIFIED
: obr.readOpt()
),
IOobject::NO_WRITE
)
),
......@@ -94,7 +98,14 @@ Foam::solution::solution
defaultRelaxationFactor_(0),
solvers_(ITstream("solvers", tokenList())())
{
read(solutionDict());
if
(
readOpt() == IOobject::MUST_READ
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
)
{
read(solutionDict());
}
}
......
......@@ -111,7 +111,7 @@ Foam::boundBox::boundBox(Istream& is)
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::pointField> Foam::boundBox::corners() const
Foam::tmp<Foam::pointField> Foam::boundBox::points() const
{
tmp<pointField> tPts = tmp<pointField>(new pointField(8));
pointField& pt = tPts();
......
......@@ -177,7 +177,7 @@ public:
}
//- Return corner points in an order corresponding to a 'hex' cell
tmp<pointField> corners() const;
tmp<pointField> points() const;
// Query
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment