Merge branch 'master' of /home/dm4/OpenFOAM/repositories/OpenFOAM-dev

This commit is contained in:
william
2014-01-03 11:53:07 +00:00
63 changed files with 497 additions and 497 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -57,6 +57,26 @@ Foam::messageStream::messageStream(const dictionary& dict)
{} {}
Foam::OSstream& Foam::messageStream::masterStream(const label communicator)
{
if (UPstream::warnComm != -1 && communicator != UPstream::warnComm)
{
Pout<< "** messageStream with comm:" << communicator
<< endl;
error::printStack(Pout);
}
if (communicator == UPstream::worldComm)
{
return operator()();
}
else
{
return operator()(UPstream::master(communicator));
}
}
Foam::OSstream& Foam::messageStream::operator() Foam::OSstream& Foam::messageStream::operator()
( (
const char* functionName, const char* functionName,
@ -166,53 +186,37 @@ Foam::OSstream& Foam::messageStream::operator()
} }
Foam::OSstream& Foam::messageStream::operator()(const label communicator) Foam::OSstream& Foam::messageStream::operator()(const bool output)
{ {
if (UPstream::warnComm != -1 && communicator != UPstream::warnComm) if (output && level)
{ {
Pout<< "** messageStream with comm:" << communicator bool collect = (severity_ == INFO || severity_ == WARNING);
<< endl;
error::printStack(Pout);
}
if (communicator == UPstream::worldComm) // Report the error
{ if (collect)
return operator()();
}
else
{
bool master = UPstream::master(communicator);
if (level)
{ {
bool collect = (severity_ == INFO || severity_ == WARNING); return Snull;
}
// Report the error else
if (!master && collect) {
if (title().size())
{ {
return Snull; Pout<< title().c_str();
} }
else
if (maxErrors_)
{ {
if (title().size()) errorCount_++;
if (errorCount_ >= maxErrors_)
{ {
Pout<< title().c_str(); FatalErrorIn("messageStream::operator OSstream&()")
<< "Too many errors"
<< abort(FatalError);
} }
if (maxErrors_)
{
errorCount_++;
if (errorCount_ >= maxErrors_)
{
FatalErrorIn("messageStream::operator OSstream&()")
<< "Too many errors"
<< abort(FatalError);
}
}
return Pout;
} }
return Pout;
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -134,6 +134,11 @@ public:
return maxErrors_; return maxErrors_;
} }
//- Convert to OSstream
// Prints to Pout for the master stream
OSstream& masterStream(const label communicator);
//- Convert to OSstream //- Convert to OSstream
// Prints basic message and returns OSstream for further info. // Prints basic message and returns OSstream for further info.
OSstream& operator() OSstream& operator()
@ -185,9 +190,8 @@ public:
); );
//- Convert to OSstream //- Convert to OSstream
// Use Info for default communicator, use Pout // Use Info for default communicator, control output using bool flag
// on master for non-default one. OSstream& operator()(const bool output);
OSstream& operator()(const label communicator);
//- Convert to OSstream for << operations //- Convert to OSstream for << operations
operator OSstream&(); operator OSstream&();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -131,7 +131,7 @@ Foam::solverPerformance Foam::GAMGSolver::solve
if (debug >= 2) if (debug >= 2)
{ {
solverPerf.print(Info(matrix().mesh().comm())); solverPerf.print(Info.masterStream(matrix().mesh().comm()));
} }
} while } while
( (
@ -631,7 +631,7 @@ void Foam::GAMGSolver::solveCoarsestLevel
// //
// if (debug >= 2) // if (debug >= 2)
// { // {
// coarseSolverPerf.print(Info(coarseComm)); // coarseSolverPerf.print(Info.masterStream(coarseComm));
// } // }
// //
// Pout<< "procAgglom: coarsestSource :" << coarsestSource << endl; // Pout<< "procAgglom: coarsestSource :" << coarsestSource << endl;
@ -679,7 +679,7 @@ void Foam::GAMGSolver::solveCoarsestLevel
if (debug >= 2) if (debug >= 2)
{ {
coarseSolverPerf.print(Info(coarseComm)); coarseSolverPerf.print(Info.masterStream(coarseComm));
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -132,7 +132,7 @@ Foam::solverPerformance Foam::smoothSolver::solve
if (lduMatrix::debug >= 2) if (lduMatrix::debug >= 2)
{ {
Info(matrix().mesh().comm()) Info.masterStream(matrix().mesh().comm())
<< " Normalisation factor = " << normFactor << endl; << " Normalisation factor = " << normFactor << endl;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -60,7 +60,7 @@ Foam::solverPerformance Foam::fvMatrix<Type>::solve
{ {
if (debug) if (debug)
{ {
Info(this->mesh().comm()) Info.masterStream(this->mesh().comm())
<< "fvMatrix<Type>::solve(const dictionary& solverControls) : " << "fvMatrix<Type>::solve(const dictionary& solverControls) : "
"solving fvMatrix<Type>" "solving fvMatrix<Type>"
<< endl; << endl;
@ -108,7 +108,7 @@ Foam::solverPerformance Foam::fvMatrix<Type>::solveSegregated
{ {
if (debug) if (debug)
{ {
Info(this->mesh().comm()) Info.masterStream(this->mesh().comm())
<< "fvMatrix<Type>::solveSegregated" << "fvMatrix<Type>::solveSegregated"
"(const dictionary& solverControls) : " "(const dictionary& solverControls) : "
"solving fvMatrix<Type>" "solving fvMatrix<Type>"
@ -202,7 +202,7 @@ Foam::solverPerformance Foam::fvMatrix<Type>::solveSegregated
if (solverPerformance::debug) if (solverPerformance::debug)
{ {
solverPerf.print(Info(this->mesh().comm())); solverPerf.print(Info.masterStream(this->mesh().comm()));
} }
solverPerfVec = max(solverPerfVec, solverPerf); solverPerfVec = max(solverPerfVec, solverPerf);
@ -228,7 +228,7 @@ Foam::solverPerformance Foam::fvMatrix<Type>::solveCoupled
{ {
if (debug) if (debug)
{ {
Info(this->mesh().comm()) Info.masterStream(this->mesh().comm())
<< "fvMatrix<Type>::solveCoupled" << "fvMatrix<Type>::solveCoupled"
"(const dictionary& solverControls) : " "(const dictionary& solverControls) : "
"solving fvMatrix<Type>" "solving fvMatrix<Type>"
@ -269,7 +269,7 @@ Foam::solverPerformance Foam::fvMatrix<Type>::solveCoupled
if (SolverPerformance<Type>::debug) if (SolverPerformance<Type>::debug)
{ {
solverPerf.print(Info(this->mesh().comm())); solverPerf.print(Info.masterStream(this->mesh().comm()));
} }
psi.correctBoundaryConditions(); psi.correctBoundaryConditions();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ Foam::fvMatrix<Foam::scalar>::solver
{ {
if (debug) if (debug)
{ {
Info(this->mesh().comm()) Info.masterStream(this->mesh().comm())
<< "fvMatrix<scalar>::solver(const dictionary& solverControls) : " << "fvMatrix<scalar>::solver(const dictionary& solverControls) : "
"solver for fvMatrix<scalar>" "solver for fvMatrix<scalar>"
<< endl; << endl;
@ -120,7 +120,7 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::fvSolver::solve
if (solverPerformance::debug) if (solverPerformance::debug)
{ {
solverPerf.print(Info(fvMat_.mesh().comm())); solverPerf.print(Info.masterStream(fvMat_.mesh().comm()));
} }
fvMat_.diag() = saveDiag; fvMat_.diag() = saveDiag;
@ -141,7 +141,7 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::solveSegregated
{ {
if (debug) if (debug)
{ {
Info(this->mesh().comm()) Info.masterStream(this->mesh().comm())
<< "fvMatrix<scalar>::solveSegregated" << "fvMatrix<scalar>::solveSegregated"
"(const dictionary& solverControls) : " "(const dictionary& solverControls) : "
"solving fvMatrix<scalar>" "solving fvMatrix<scalar>"
@ -170,7 +170,7 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::solveSegregated
if (solverPerformance::debug) if (solverPerformance::debug)
{ {
solverPerf.print(Info(mesh().comm())); solverPerf.print(Info.masterStream(mesh().comm()));
} }
diag() = saveDiag; diag() = saveDiag;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -98,7 +98,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions
injectorCells.append(cellI); injectorCells.append(cellI);
injectorTetFaces.append(cellTetIs[tetI].face()); injectorTetFaces.append(cellTetIs[tetI].face());
injectorTetPts.append(cellTetIs[tetI].faceBasePt()); injectorTetPts.append(cellTetIs[tetI].tetPt());
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,7 +91,8 @@ Foam::AveragingMethod<Type>::New
( (
"Foam::AveragingMethod<Type>::New" "Foam::AveragingMethod<Type>::New"
"(" "("
"const dictionary&" "const IOobject&, "
"const dictionary&, "
"const fvMesh&" "const fvMesh&"
")" ")"
) << "Unknown averaging method " << averageType ) << "Unknown averaging method " << averageType
@ -243,10 +244,10 @@ bool Foam::AveragingMethod<Type>::write() const
pointGrad.internalField() /= pointVolume; pointGrad.internalField() /= pointVolume;
// write // write
if(!cellValue.write()) return false; if (!cellValue.write()) return false;
if(!cellGrad.write()) return false; if (!cellGrad.write()) return false;
if(!pointValue.write()) return false; if (!pointValue.write()) return false;
if(!pointGrad.write()) return false; if (!pointGrad.write()) return false;
return true; return true;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,7 +58,7 @@ namespace AveragingMethods
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class Dual Declaration Class Dual Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,7 +55,7 @@ namespace AveragingMethods
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class Moment Declaration Class Moment Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -69,7 +69,6 @@ Foam::CorrectionLimitingMethod::New
( (
"CorrectionLimitingMethod::New" "CorrectionLimitingMethod::New"
"(" "("
"const word&, "
"const dictionary&" "const dictionary&"
")" ")"
) << "Unknown correction limiter type " << modelType ) << "Unknown correction limiter type " << modelType

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,7 +45,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class CorrectionLimitingMethod Declaration Class CorrectionLimitingMethod Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class CorrectionLimitingMethod class CorrectionLimitingMethod

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ namespace CorrectionLimitingMethods
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class absolute Declaration Class absolute Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class absolute class absolute

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,7 +44,7 @@ namespace CorrectionLimitingMethods
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class noCorrectionLimiting Declaration Class noCorrectionLimiting Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class noCorrectionLimiting class noCorrectionLimiting

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ namespace CorrectionLimitingMethods
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class relative Declaration Class relative Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class relative class relative

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,7 +51,7 @@ namespace Foam
class TimeScaleModel; class TimeScaleModel;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class IsotropyModel Declaration Class IsotropyModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class CloudType> template<class CloudType>
@ -129,27 +129,27 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeIsotropyModel(CloudType) \ #define makeIsotropyModel(CloudType) \
\ \
typedef CloudType::MPPICCloudType MPPICCloudType; \ typedef CloudType::MPPICCloudType MPPICCloudType; \
defineNamedTemplateTypeNameAndDebug \ defineNamedTemplateTypeNameAndDebug \
( \ ( \
IsotropyModel<MPPICCloudType>, \ IsotropyModel<MPPICCloudType>, \
0 \ 0 \
); \ ); \
defineTemplateRunTimeSelectionTable \ defineTemplateRunTimeSelectionTable \
( \ ( \
IsotropyModel<MPPICCloudType>, \ IsotropyModel<MPPICCloudType>, \
dictionary \ dictionary \
); );
#define makeIsotropyModelType(SS, CloudType) \ #define makeIsotropyModelType(SS, CloudType) \
\ \
typedef CloudType::MPPICCloudType MPPICCloudType; \ typedef CloudType::MPPICCloudType MPPICCloudType; \
defineNamedTemplateTypeNameAndDebug(SS<MPPICCloudType>, 0); \ defineNamedTemplateTypeNameAndDebug(SS<MPPICCloudType>, 0); \
\ \
IsotropyModel<MPPICCloudType>:: \ IsotropyModel<MPPICCloudType>:: \
adddictionaryConstructorToTable<SS<MPPICCloudType> > \ adddictionaryConstructorToTable<SS<MPPICCloudType> > \
add##SS##CloudType##MPPICCloudType##ConstructorToTable_; add##SS##CloudType##MPPICCloudType##ConstructorToTable_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ namespace PackingModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class Implicit Declaration Class Implicit Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class CloudType> template<class CloudType>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,7 +45,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class ParticleStressModel Declaration Class ParticleStressModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class ParticleStressModel class ParticleStressModel

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -92,7 +92,7 @@ void Foam::removeRegisteredObject::execute()
void Foam::removeRegisteredObject::end() void Foam::removeRegisteredObject::end()
{ {
// Do nothing - only valid on execute execute();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -195,7 +195,7 @@ void Foam::writeDictionary::execute()
void Foam::writeDictionary::end() void Foam::writeDictionary::end()
{ {
// do nothing execute();
} }

View File

@ -34,9 +34,6 @@ streamLine/streamLineParticle.C
streamLine/streamLineParticleCloud.C streamLine/streamLineParticleCloud.C
streamLine/streamLineFunctionObject.C streamLine/streamLineFunctionObject.C
turbulenceFields/turbulenceFields.C
turbulenceFields/turbulenceFieldsFunctionObject.C
wallBoundedStreamLine/wallBoundedStreamLine.C wallBoundedStreamLine/wallBoundedStreamLine.C
wallBoundedStreamLine/wallBoundedStreamLineFunctionObject.C wallBoundedStreamLine/wallBoundedStreamLineFunctionObject.C
wallBoundedStreamLine/wallBoundedStreamLineParticle.C wallBoundedStreamLine/wallBoundedStreamLineParticle.C

View File

@ -3,11 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude -I$(LIB_SRC)/surfMesh/lnInclude
LIB_LIBS = \ LIB_LIBS = \
@ -16,8 +12,5 @@ LIB_LIBS = \
-lsurfMesh \ -lsurfMesh \
-llagrangian \ -llagrangian \
-lfileFormats \ -lfileFormats \
-lsurfMesh \
-lsampling \ -lsampling \
-lincompressibleTransportModels \ -lsurfMesh
-lcompressibleTurbulenceModel \
-lincompressibleTurbulenceModel

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -111,8 +111,6 @@ void Foam::fieldAverage::calcAverages()
initialize(); initialize();
} }
Info<< type() << " " << name_ << " output:" << nl;
const label currentTimeIndex = const label currentTimeIndex =
static_cast<const fvMesh&>(obr_).time().timeIndex(); static_cast<const fvMesh&>(obr_).time().timeIndex();
@ -125,6 +123,8 @@ void Foam::fieldAverage::calcAverages()
prevTimeIndex_ = currentTimeIndex; prevTimeIndex_ = currentTimeIndex;
} }
Info<< type() << " " << name_ << " output:" << nl;
Info<< " Calculating averages" << nl; Info<< " Calculating averages" << nl;
addMeanSqrToPrime2Mean<scalar, scalar>(); addMeanSqrToPrime2Mean<scalar, scalar>();
@ -317,14 +317,19 @@ void Foam::fieldAverage::execute()
if (active_) if (active_)
{ {
calcAverages(); calcAverages();
Info<< endl; Info<< endl;
} }
} }
void Foam::fieldAverage::end() void Foam::fieldAverage::end()
{} {
if (active_)
{
calcAverages();
Info<< endl;
}
}
void Foam::fieldAverage::timeSet() void Foam::fieldAverage::timeSet()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -115,7 +115,10 @@ void Foam::fieldCoordinateSystemTransform::execute()
void Foam::fieldCoordinateSystemTransform::end() void Foam::fieldCoordinateSystemTransform::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -159,10 +159,7 @@ void Foam::fieldMinMax::write()
{ {
functionObjectFile::write(); functionObjectFile::write();
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl;
{
Info<< type() << " " << name_ << " output:" << nl;
}
forAll(fieldSet_, fieldI) forAll(fieldSet_, fieldI)
{ {
@ -173,10 +170,7 @@ void Foam::fieldMinMax::write()
calcMinMaxFields<tensor>(fieldSet_[fieldI], mode_); calcMinMaxFields<tensor>(fieldSet_[fieldI], mode_);
} }
if (log_) Info(log_)<< endl;
{
Info<< endl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -139,6 +139,20 @@ protected:
// Private Member Functions // Private Member Functions
//- Helper function to write the output
template<class Type>
void output
(
const word& fieldName,
const word& outputName,
const vector& minC,
const vector& maxC,
const label minProcI,
const label maxProcI,
const Type& minValue,
const Type& maxValue
);
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
fieldMinMax(const fieldMinMax&); fieldMinMax(const fieldMinMax&);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,6 +31,62 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type>
void Foam::fieldMinMax::output
(
const word& fieldName,
const word& outputName,
const vector& minC,
const vector& maxC,
const label minProcI,
const label maxProcI,
const Type& minValue,
const Type& maxValue
)
{
file()<< obr_.time().value();
writeTabbed(file(), fieldName);
file()
<< token::TAB << minValue
<< token::TAB << minC;
if (Pstream::parRun())
{
file()<< token::TAB << minProcI;
}
file()
<< token::TAB << maxValue
<< token::TAB << maxC;
if (Pstream::parRun())
{
file()<< token::TAB << maxProcI;
}
file() << endl;
Info(log_)<< " min(" << outputName << ") = "
<< minValue << " at position " << minC;
if (Pstream::parRun())
{
Info(log_)<< " on processor " << minProcI;
}
Info(log_)<< nl << " max(" << outputName << ") = "
<< maxValue << " at position " << maxC;
if (Pstream::parRun())
{
Info(log_)<< " on processor " << maxProcI;
}
Info(log_)<< endl;
}
template<class Type> template<class Type>
void Foam::fieldMinMax::calcMinMaxFields void Foam::fieldMinMax::calcMinMaxFields
( (
@ -111,49 +167,17 @@ void Foam::fieldMinMax::calcMinMaxFields
scalar maxValue = maxVs[maxI]; scalar maxValue = maxVs[maxI];
const vector& maxC = maxCs[maxI]; const vector& maxC = maxCs[maxI];
file()<< obr_.time().value(); output
writeTabbed(file(), fieldName); (
fieldName,
file() word("mag(" + fieldName + ")"),
<< token::TAB << minValue minC,
<< token::TAB << minC; maxC,
minI,
if (Pstream::parRun()) maxI,
{ minValue,
file()<< token::TAB << minI; maxValue
} );
file()
<< token::TAB << maxValue
<< token::TAB << maxC;
if (Pstream::parRun())
{
file()<< token::TAB << maxI;
}
file() << endl;
if (log_)
{
Info<< " min(mag(" << fieldName << ")) = "
<< minValue << " at position " << minC;
if (Pstream::parRun())
{
Info<< " on processor " << minI;
}
Info<< nl << " max(mag(" << fieldName << ")) = "
<< maxValue << " at position " << maxC;
if (Pstream::parRun())
{
Info<< " on processor " << maxI;
}
Info<< endl;
}
} }
break; break;
} }
@ -216,49 +240,17 @@ void Foam::fieldMinMax::calcMinMaxFields
Type maxValue = maxVs[maxI]; Type maxValue = maxVs[maxI];
const vector& maxC = maxCs[maxI]; const vector& maxC = maxCs[maxI];
file()<< obr_.time().value(); output
writeTabbed(file(), fieldName); (
fieldName,
file() fieldName,
<< token::TAB << minValue minC,
<< token::TAB << minC; maxC,
minI,
if (Pstream::parRun()) maxI,
{ minValue,
file()<< token::TAB << minI; maxValue
} );
file()
<< token::TAB << maxValue
<< token::TAB << maxC;
if (Pstream::parRun())
{
file()<< token::TAB << maxI;
}
file() << endl;
if (log_)
{
Info<< " min(" << fieldName << ") = "
<< minValue << " at position " << minC;
if (Pstream::parRun())
{
Info<< " on processor " << minI;
}
Info<< nl << " max(" << fieldName << ") = "
<< maxValue << " at position " << maxC;
if (Pstream::parRun())
{
Info<< " on processor " << maxI;
}
Info<< endl;
}
} }
break; break;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -245,10 +245,7 @@ void Foam::fieldValues::cellSource::write()
file()<< endl; file()<< endl;
} }
if (log_) Info(log_)<< endl;
{
Info<< endl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -200,12 +200,9 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
file()<< tab << result; file()<< tab << result;
if (log_) Info(log_)<< " " << operationTypeNames_[operation_]
{ << "(" << sourceName_ << ") for " << fieldName
Info<< " " << operationTypeNames_[operation_] << " = " << result << endl;
<< "(" << sourceName_ << ") for " << fieldName
<< " = " << result << endl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -663,10 +663,7 @@ void Foam::fieldValues::faceSource::write()
file()<< endl; file()<< endl;
} }
if (log_) Info(log_)<< endl;
{
Info<< endl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -344,12 +344,9 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName)
file()<< tab << result; file()<< tab << result;
if (log_) Info(log_)<< " " << operationTypeNames_[operation_]
{ << "(" << sourceName_ << ") for " << fieldName
Info<< " " << operationTypeNames_[operation_] << " = " << result << endl;
<< "(" << sourceName_ << ") for " << fieldName
<< " = " << result << endl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,10 +58,7 @@ void Foam::fieldValue::write()
{ {
functionObjectFile::write(); functionObjectFile::write();
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl;
{
Info<< type() << " " << name_ << " output:" << nl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -158,10 +158,7 @@ void Foam::fieldValues::fieldValueDelta::write()
file()<< obr_.time().value(); file()<< obr_.time().value();
} }
if (log_) Info(log_)<< type() << " " << name_ << " output:" << endl;
{
Info<< type() << " " << name_ << " output:" << endl;
}
bool found = false; bool found = false;
processFields<scalar>(found); processFields<scalar>(found);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -114,12 +114,9 @@ void Foam::fieldValues::fieldValueDelta::processFields(bool& found)
Type result = applyOperation(r1, r2); Type result = applyOperation(r1, r2);
if (log_) Info(log_)<< " " << operationTypeNames_[operation_]
{ << "(" << fieldName << ") = " << result
Info<< " " << operationTypeNames_[operation_] << endl;
<< "(" << fieldName << ") = " << result
<< endl;
}
if (Pstream::master()) if (Pstream::master())
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -374,6 +374,11 @@ void Foam::nearWallFields::end()
{ {
Info<< "nearWallFields:end()" << endl; Info<< "nearWallFields:end()" << endl;
} }
if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -122,7 +122,10 @@ void Foam::processorField::execute()
void Foam::processorField::end() void Foam::processorField::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,36 +91,42 @@ void Foam::readFields::read(const dictionary& dict)
void Foam::readFields::execute() void Foam::readFields::execute()
{ {
//Info<< type() << " " << name_ << ":" << nl; if (active_)
// Clear out any previously loaded fields
vsf_.clear();
vvf_.clear();
vSpheretf_.clear();
vSymmtf_.clear();
vtf_.clear();
ssf_.clear();
svf_.clear();
sSpheretf_.clear();
sSymmtf_.clear();
stf_.clear();
forAll(fieldSet_, fieldI)
{ {
// If necessary load field // Clear out any previously loaded fields
loadField<scalar>(fieldSet_[fieldI], vsf_, ssf_); vsf_.clear();
loadField<vector>(fieldSet_[fieldI], vvf_, svf_); vvf_.clear();
loadField<sphericalTensor>(fieldSet_[fieldI], vSpheretf_, sSpheretf_); vSpheretf_.clear();
loadField<symmTensor>(fieldSet_[fieldI], vSymmtf_, sSymmtf_); vSymmtf_.clear();
loadField<tensor>(fieldSet_[fieldI], vtf_, stf_); vtf_.clear();
ssf_.clear();
svf_.clear();
sSpheretf_.clear();
sSymmtf_.clear();
stf_.clear();
forAll(fieldSet_, fieldI)
{
const word& fieldName = fieldSet_[fieldI];
// If necessary load field
loadField<scalar>(fieldName, vsf_, ssf_);
loadField<vector>(fieldName, vvf_, svf_);
loadField<sphericalTensor>(fieldName, vSpheretf_, sSpheretf_);
loadField<symmTensor>(fieldName, vSymmtf_, sSymmtf_);
loadField<tensor>(fieldName, vtf_, stf_);
}
} }
} }
void Foam::readFields::end() void Foam::readFields::end()
{ {
execute(); if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -114,7 +114,10 @@ void Foam::surfaceInterpolateFields::execute()
void Foam::surfaceInterpolateFields::end() void Foam::surfaceInterpolateFields::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -227,15 +227,12 @@ void Foam::forceCoeffs::write()
<< obr_.time().value() << tab << Cm << tab << Cd << obr_.time().value() << tab << Cm << tab << Cd
<< tab << Cl << tab << Clf << tab << Clr << endl; << tab << Cl << tab << Clf << tab << Clr << endl;
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl
{ << " Cm = " << Cm << nl
Info<< type() << " " << name_ << " output:" << nl << " Cd = " << Cd << nl
<< " Cm = " << Cm << nl << " Cl = " << Cl << nl
<< " Cd = " << Cd << nl << " Cl(f) = " << Clf << nl
<< " Cl = " << Cl << nl << " Cl(r) = " << Clr << endl;
<< " Cl(f) = " << Clf << nl
<< " Cl(r) = " << Clr << endl;
}
if (nBin_ > 1) if (nBin_ > 1)
{ {
@ -262,10 +259,7 @@ void Foam::forceCoeffs::write()
file(1) << endl; file(1) << endl;
} }
if (log_) Info(log_)<< endl;
{
Info<< endl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -391,19 +391,17 @@ void Foam::forces::applyBins
void Foam::forces::writeForces() void Foam::forces::writeForces()
{ {
if (log_) Info(log_)
{ << type() << " " << name_ << " output:" << nl
Info<< type() << " " << name_ << " output:" << nl << " sum of forces:" << nl
<< " sum of forces:" << nl << " pressure : " << sum(force_[0]) << nl
<< " pressure : " << sum(force_[0]) << nl << " viscous : " << sum(force_[1]) << nl
<< " viscous : " << sum(force_[1]) << nl << " porous : " << sum(force_[2]) << nl
<< " porous : " << sum(force_[2]) << nl << " sum of moments:" << nl
<< " sum of moments:" << nl << " pressure : " << sum(moment_[0]) << nl
<< " pressure : " << sum(moment_[0]) << nl << " viscous : " << sum(moment_[1]) << nl
<< " viscous : " << sum(moment_[1]) << nl << " porous : " << sum(moment_[2])
<< " porous : " << sum(moment_[2]) << endl;
<< endl;
}
file(0) << obr_.time().value() << tab << setw(1) << '[' file(0) << obr_.time().value() << tab << setw(1) << '['
<< sum(force_[0]) << setw(1) << ',' << sum(force_[0]) << setw(1) << ','
@ -642,10 +640,7 @@ void Foam::forces::read(const dictionary& dict)
log_ = dict.lookupOrDefault<Switch>("log", false); log_ = dict.lookupOrDefault<Switch>("log", false);
if (log_) Info(log_)<< type() << " " << name_ << ":" << nl;
{
Info<< type() << " " << name_ << ":" << nl;
}
directForceDensity_ = dict.lookupOrDefault("directForceDensity", false); directForceDensity_ = dict.lookupOrDefault("directForceDensity", false);
@ -809,10 +804,7 @@ void Foam::forces::write()
writeBins(); writeBins();
if (log_) Info(log_)<< endl;
{
Info<< endl;
}
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -154,7 +154,10 @@ void Foam::calcFvcDiv::execute()
void Foam::calcFvcDiv::end() void Foam::calcFvcDiv::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -116,7 +116,10 @@ void Foam::calcFvcGrad::execute()
void Foam::calcFvcGrad::end() void Foam::calcFvcGrad::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -119,7 +119,10 @@ void Foam::calcMag::execute()
void Foam::calcMag::end() void Foam::calcMag::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -185,7 +185,10 @@ void Foam::CourantNo::execute()
void Foam::CourantNo::end() void Foam::CourantNo::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -142,10 +142,7 @@ void Foam::DESModelRegions::execute()
const fvMesh& mesh = refCast<const fvMesh>(obr_); const fvMesh& mesh = refCast<const fvMesh>(obr_);
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl;
{
Info<< type() << " " << name_ << " output:" << nl;
}
volScalarField& DESModelRegions = volScalarField& DESModelRegions =
const_cast<volScalarField&> const_cast<volScalarField&>
@ -196,19 +193,14 @@ void Foam::DESModelRegions::execute()
<< endl; << endl;
} }
if (log_) Info(log_)
{ << " LES = " << prc << " % (volume)" << nl
Info<< " LES = " << prc << " % (volume)" << nl << " RAS = " << 100.0 - prc << " % (volume)" << endl;
<< " RAS = " << 100.0 - prc << " % (volume)" << endl;
}
} }
else else
{ {
if (log_) Info(log_)<< " No DES turbulence model found in database" << nl
{ << endl;
Info<< " No DES turbulence model found in database" << nl
<< endl;
}
} }
} }
} }
@ -216,7 +208,10 @@ void Foam::DESModelRegions::execute()
void Foam::DESModelRegions::end() void Foam::DESModelRegions::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -144,7 +144,10 @@ void Foam::Lambda2::execute()
void Foam::Lambda2::end() void Foam::Lambda2::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -30,6 +30,9 @@ scalarTransport/scalarTransportFunctionObject.C
timeActivatedFileUpdate/timeActivatedFileUpdate.C timeActivatedFileUpdate/timeActivatedFileUpdate.C
timeActivatedFileUpdate/timeActivatedFileUpdateFunctionObject.C timeActivatedFileUpdate/timeActivatedFileUpdateFunctionObject.C
turbulenceFields/turbulenceFields.C
turbulenceFields/turbulenceFieldsFunctionObject.C
wallShearStress/wallShearStress.C wallShearStress/wallShearStress.C
wallShearStress/wallShearStressFunctionObject.C wallShearStress/wallShearStressFunctionObject.C

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -197,7 +197,10 @@ void Foam::Peclet::execute()
void Foam::Peclet::end() void Foam::Peclet::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }
void Foam::Peclet::timeSet() void Foam::Peclet::timeSet()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -137,7 +137,10 @@ void Foam::Q::execute()
void Foam::Q::end() void Foam::Q::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -101,7 +101,10 @@ void Foam::blendingFactor::execute()
void Foam::blendingFactor::end() void Foam::blendingFactor::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }
void Foam::blendingFactor::timeSet() void Foam::blendingFactor::timeSet()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -309,7 +309,10 @@ void Foam::pressureTools::execute()
void Foam::pressureTools::end() void Foam::pressureTools::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -214,92 +214,97 @@ void Foam::scalarTransport::read(const dictionary& dict)
void Foam::scalarTransport::execute() void Foam::scalarTransport::execute()
{ {
Info<< type() << " output:" << endl; if (active_)
const surfaceScalarField& phi =
mesh_.lookupObject<surfaceScalarField>(phiName_);
// calculate the diffusivity
volScalarField DT(this->DT(phi));
// set schemes
word schemeVar = T_.name();
if (autoSchemes_)
{ {
schemeVar = UName_; Info<< type() << " output:" << endl;
}
word divScheme("div(phi," + schemeVar + ")"); const surfaceScalarField& phi =
word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")"); mesh_.lookupObject<surfaceScalarField>(phiName_);
// set under-relaxation coeff // calculate the diffusivity
scalar relaxCoeff = 0.0; volScalarField DT(this->DT(phi));
if (mesh_.relaxEquation(schemeVar))
{
relaxCoeff = mesh_.equationRelaxationFactor(schemeVar);
}
if (phi.dimensions() == dimMass/dimTime) // set schemes
{ word schemeVar = T_.name();
const volScalarField& rho = if (autoSchemes_)
mesh_.lookupObject<volScalarField>(rhoName_);
// solve
for (label i = 0; i <= nCorr_; i++)
{ {
fvScalarMatrix TEqn schemeVar = UName_;
(
fvm::ddt(rho, T_)
+ fvm::div(phi, T_, divScheme)
- fvm::laplacian(DT, T_, laplacianScheme)
==
fvOptions_(rho, T_)
);
TEqn.relax(relaxCoeff);
fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(schemeVar));
} }
}
else if (phi.dimensions() == dimVolume/dimTime) word divScheme("div(phi," + schemeVar + ")");
{ word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")");
// solve
for (label i = 0; i <= nCorr_; i++) // set under-relaxation coeff
scalar relaxCoeff = 0.0;
if (mesh_.relaxEquation(schemeVar))
{ {
fvScalarMatrix TEqn relaxCoeff = mesh_.equationRelaxationFactor(schemeVar);
(
fvm::ddt(T_)
+ fvm::div(phi, T_, divScheme)
- fvm::laplacian(DT, T_, laplacianScheme)
==
fvOptions_(T_)
);
TEqn.relax(relaxCoeff);
fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(schemeVar));
} }
}
else
{
FatalErrorIn("void Foam::scalarTransport::execute()")
<< "Incompatible dimensions for phi: " << phi.dimensions() << nl
<< "Dimensions should be " << dimMass/dimTime << " or "
<< dimVolume/dimTime << endl;
}
if (phi.dimensions() == dimMass/dimTime)
{
const volScalarField& rho =
mesh_.lookupObject<volScalarField>(rhoName_);
Info<< endl; // solve
for (label i = 0; i <= nCorr_; i++)
{
fvScalarMatrix TEqn
(
fvm::ddt(rho, T_)
+ fvm::div(phi, T_, divScheme)
- fvm::laplacian(DT, T_, laplacianScheme)
==
fvOptions_(rho, T_)
);
TEqn.relax(relaxCoeff);
fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(schemeVar));
}
}
else if (phi.dimensions() == dimVolume/dimTime)
{
// solve
for (label i = 0; i <= nCorr_; i++)
{
fvScalarMatrix TEqn
(
fvm::ddt(T_)
+ fvm::div(phi, T_, divScheme)
- fvm::laplacian(DT, T_, laplacianScheme)
==
fvOptions_(T_)
);
TEqn.relax(relaxCoeff);
fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(schemeVar));
}
}
else
{
FatalErrorIn("void Foam::scalarTransport::execute()")
<< "Incompatible dimensions for phi: " << phi.dimensions() << nl
<< "Dimensions should be " << dimMass/dimTime << " or "
<< dimVolume/dimTime << endl;
}
Info<< endl;
}
} }
void Foam::scalarTransport::end() void Foam::scalarTransport::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -132,7 +132,10 @@ void Foam::timeActivatedFileUpdate::execute()
void Foam::timeActivatedFileUpdate::end() void Foam::timeActivatedFileUpdate::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -257,7 +257,10 @@ void Foam::turbulenceFields::execute()
void Foam::turbulenceFields::end() void Foam::turbulenceFields::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -82,11 +82,8 @@ void Foam::wallShearStress::calcShearStress
<< endl; << endl;
} }
if (log_) Info(log_)<< " min/max(" << pp.name() << ") = "
{ << minSsp << ", " << maxSsp << endl;
Info<< " min/max(" << pp.name() << ") = "
<< minSsp << ", " << maxSsp << endl;
}
} }
} }
@ -240,10 +237,7 @@ void Foam::wallShearStress::execute()
mesh.lookupObject<volVectorField>(type()) mesh.lookupObject<volVectorField>(type())
); );
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl;
{
Info<< type() << " " << name_ << " output:" << nl;
}
tmp<volSymmTensorField> Reff; tmp<volSymmTensorField> Reff;
@ -275,7 +269,10 @@ void Foam::wallShearStress::execute()
void Foam::wallShearStress::end() void Foam::wallShearStress::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }
@ -294,12 +291,9 @@ void Foam::wallShearStress::write()
const volVectorField& wallShearStress = const volVectorField& wallShearStress =
obr_.lookupObject<volVectorField>(type()); obr_.lookupObject<volVectorField>(type());
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl
{ << " writing field " << wallShearStress.name() << nl
Info<< type() << " " << name_ << " output:" << nl << endl;
<< " writing field " << wallShearStress.name() << nl
<< endl;
}
wallShearStress.write(); wallShearStress.write();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,15 +94,12 @@ void Foam::yPlusLES::calcIncompressibleYPlus
scalar maxYp = gMax(Yp); scalar maxYp = gMax(Yp);
scalar avgYp = gAverage(Yp); scalar avgYp = gAverage(Yp);
if (log_)
{
Info<< " patch " << currPatch.name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
}
if (Pstream::master()) if (Pstream::master())
{ {
Info(log_)<< " patch " << currPatch.name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
file() << obr_.time().value() file() << obr_.time().value()
<< token::TAB << currPatch.name() << token::TAB << currPatch.name()
<< token::TAB << minYp << token::TAB << minYp
@ -162,15 +159,12 @@ void Foam::yPlusLES::calcCompressibleYPlus
scalar maxYp = gMax(Yp); scalar maxYp = gMax(Yp);
scalar avgYp = gAverage(Yp); scalar avgYp = gAverage(Yp);
if (log_)
{
Info<< " patch " << currPatch.name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
}
if (Pstream::master()) if (Pstream::master())
{ {
Info(log_)<< " patch " << currPatch.name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
file() << obr_.time().value() file() << obr_.time().value()
<< token::TAB << currPatch.name() << token::TAB << currPatch.name()
<< token::TAB << minYp << token::TAB << minYp
@ -286,10 +280,7 @@ void Foam::yPlusLES::execute()
mesh.lookupObject<volScalarField>(type()) mesh.lookupObject<volScalarField>(type())
); );
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl;
{
Info<< type() << " " << name_ << " output:" << nl;
}
if (phi.dimensions() == dimMass/dimTime) if (phi.dimensions() == dimMass/dimTime)
{ {
@ -305,7 +296,10 @@ void Foam::yPlusLES::execute()
void Foam::yPlusLES::end() void Foam::yPlusLES::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }
@ -324,10 +318,7 @@ void Foam::yPlusLES::write()
const volScalarField& yPlusLES = const volScalarField& yPlusLES =
obr_.lookupObject<volScalarField>(type()); obr_.lookupObject<volScalarField>(type());
if (log_) Info(log_)<< " writing field " << yPlusLES.name() << nl << endl;
{
Info<< " writing field " << yPlusLES.name() << nl << endl;
}
yPlusLES.write(); yPlusLES.write();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,15 +89,12 @@ void Foam::yPlusRAS::calcIncompressibleYPlus
scalar maxYp = gMax(Yp); scalar maxYp = gMax(Yp);
scalar avgYp = gAverage(Yp); scalar avgYp = gAverage(Yp);
if (log_)
{
Info<< " patch " << nutPw.patch().name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
}
if (Pstream::master()) if (Pstream::master())
{ {
Info(log_)<< " patch " << nutPw.patch().name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
file() << obr_.time().value() file() << obr_.time().value()
<< token::TAB << nutPw.patch().name() << token::TAB << nutPw.patch().name()
<< token::TAB << minYp << token::TAB << minYp
@ -149,15 +146,12 @@ void Foam::yPlusRAS::calcCompressibleYPlus
scalar maxYp = gMax(Yp); scalar maxYp = gMax(Yp);
scalar avgYp = gAverage(Yp); scalar avgYp = gAverage(Yp);
if (log_)
{
Info<< " patch " << mutPw.patch().name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
}
if (Pstream::master()) if (Pstream::master())
{ {
Info(log_)<< " patch " << mutPw.patch().name()
<< " y+ : min = " << minYp << ", max = " << maxYp
<< ", average = " << avgYp << nl;
file() << obr_.time().value() file() << obr_.time().value()
<< token::TAB << mutPw.patch().name() << token::TAB << mutPw.patch().name()
<< token::TAB << minYp << token::TAB << minYp
@ -271,10 +265,7 @@ void Foam::yPlusRAS::execute()
mesh.lookupObject<volScalarField>(type()) mesh.lookupObject<volScalarField>(type())
); );
if (log_) Info(log_)<< type() << " " << name_ << " output:" << nl;
{
Info<< type() << " " << name_ << " output:" << nl;
}
if (phi.dimensions() == dimMass/dimTime) if (phi.dimensions() == dimMass/dimTime)
{ {
@ -290,7 +281,10 @@ void Foam::yPlusRAS::execute()
void Foam::yPlusRAS::end() void Foam::yPlusRAS::end()
{ {
// Do nothing if (active_)
{
execute();
}
} }
@ -309,10 +303,7 @@ void Foam::yPlusRAS::write()
const volScalarField& yPlusRAS = const volScalarField& yPlusRAS =
obr_.lookupObject<volScalarField>(type()); obr_.lookupObject<volScalarField>(type());
if (log_) Info(log_)<< " writing field " << yPlusRAS.name() << nl << endl;
{
Info<< " writing field " << yPlusRAS.name() << nl << endl;
}
yPlusRAS.write(); yPlusRAS.write();
} }