From 6663702c457a17cb59430c8f5754d969f5b63f32 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 25 Jul 2008 18:01:06 +0100 Subject: [PATCH 1/7] cleaned up output message (removed dims etc) --- .../utilities/postProcessing/wall/yPlusLES/yPlusLES.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index c5524896c1..d7c145b953 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -107,11 +107,12 @@ int main(int argc, char *argv[]) *mag(U.boundaryField()[patchi].snGrad()) ) /sgsModel->nu().boundaryField()[patchi]; + const scalarField& Yp = yPlus.boundaryField()[patchi]; Info<< "Patch " << patchi << " named " << currPatch.name() - << " y+ : min: " << min(yPlus) << " max: " << max(yPlus) - << " average: " << average(yPlus) << nl << endl; + << " y+ : min: " << min(Yp) << " max: " << max(Yp) + << " average: " << average(Yp) << nl << endl; } } From 281591b70d48e1318099e21efead284e2d66bad5 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 30 Jul 2008 15:19:13 +0100 Subject: [PATCH 2/7] non-default region handling --- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 326f59df81..3b7961979d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1072,7 +1072,7 @@ const Foam::globalMeshData& Foam::polyMesh::globalData() const // Remove all files and some subdirs (eg, sets) void Foam::polyMesh::removeFiles(const fileName& instanceDir) const { - fileName meshFilesPath = db().path()/instanceDir/meshSubDir; + fileName meshFilesPath = db().path()/instanceDir/meshDir(); rm(meshFilesPath/"points"); rm(meshFilesPath/"faces"); From e97b721db785ecd4ceb7fee8c5342d86e09f0129 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 30 Jul 2008 15:32:51 +0100 Subject: [PATCH 3/7] bugfix for lambda_ --- .../kineticTheoryModel/kineticTheoryModel.C | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 54590f55a3..724602009a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -256,8 +256,7 @@ void Foam::kineticTheoryModel::solve() /(alpha*rhoa_*sqrtPi*(ThetaSqrt + TsmallSqrt)); // bulk viscosity p. 45 (Lun et al. 1984). - volScalarField lambda_ = - (4.0/3.0)*sqr(alpha_)*rhoa_*da_*gs0_*(1.0+e_)*ThetaSqrt/sqrtPi; + lambda_ = (4.0/3.0)*sqr(alpha_)*rhoa_*da_*gs0_*(1.0+e_)*ThetaSqrt/sqrtPi; // stress tensor, Definitions, Table 3.1, p. 43 From e9d424b7a8495a6a10749a5ee530034dc9378947 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 30 Jul 2008 16:28:54 +0100 Subject: [PATCH 4/7] removal of warning --- .../surface/surfaceCheck/surfaceCheck.C | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index ed91a3d3d4..3506b05de7 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -49,20 +49,20 @@ bool validTri(const triSurface& surf, const label faceI) || (f[2] < 0) || (f[2] >= surf.points().size()) ) { - WarningIn("validTri(const triSurface&, const label)") - << "triangle " << faceI << " vertices " << f - << " uses point indices outside point range 0.." - << surf.points().size()-1 << endl; + //WarningIn("validTri(const triSurface&, const label)") + // << "triangle " << faceI << " vertices " << f + // << " uses point indices outside point range 0.." + // << surf.points().size()-1 << endl; return false; } if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2])) { - WarningIn("validTri(const triSurface&, const label)") - << "triangle " << faceI - << " uses non-unique vertices " << f - << endl; + //WarningIn("validTri(const triSurface&, const label)") + // << "triangle " << faceI + // << " uses non-unique vertices " << f + // << endl; return false; } @@ -91,11 +91,11 @@ bool validTri(const triSurface& surf, const label faceI) && ((f[2] == nbrF[0]) || (f[2] == nbrF[1]) || (f[2] == nbrF[2])) ) { - WarningIn("validTri(const triSurface&, const label)") - << "triangle " << faceI << " vertices " << f - << " has the same vertices as triangle " << nbrFaceI - << " vertices " << nbrF - << endl; + //WarningIn("validTri(const triSurface&, const label)") + // << "triangle " << faceI << " vertices " << f + // << " has the same vertices as triangle " << nbrFaceI + // << " vertices " << nbrF + // << endl; return false; } @@ -270,9 +270,9 @@ int main(int argc, char *argv[]) if (f[0] == f[1] || f[0] == f[2] || f[1] == f[2]) { - WarningIn(args.executable()) - << "Illegal triangle " << faceI << " vertices " << f - << " coords " << f.points(surf.points()) << endl; + //WarningIn(args.executable()) + // << "Illegal triangle " << faceI << " vertices " << f + // << " coords " << f.points(surf.points()) << endl; } else { From 436b8f075ddb625e2adb8a6f80866a84c587e046 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 31 Jul 2008 10:33:37 +0100 Subject: [PATCH 5/7] Added support for sphericalTensor and symmTensor. --- src/sampling/Make/files | 2 +- .../sampledSet/writers/gnuplot/gnuplot.H | 30 +++-- .../writers/gnuplot/gnuplotWriters.C | 12 +- .../writers/gnuplot/gnuplotWriters.H | 15 +-- src/sampling/sampledSet/writers/jplot/jplot.H | 36 +++--- .../sampledSet/writers/jplot/jplotWriters.C | 12 +- .../sampledSet/writers/jplot/jplotWriters.H | 15 +-- src/sampling/sampledSet/writers/raw/raw.H | 31 +++-- .../sampledSet/writers/raw/rawWriters.C | 12 +- .../sampledSet/writers/raw/rawWriters.H | 15 +-- .../sampledSet/writers/writer/writer.C | 92 ++++++++++----- .../sampledSet/writers/writer/writer.H | 111 ++++++++++-------- .../sampledSet/writers/writer/writers.C | 22 ++-- .../sampledSet/writers/writer/writers.H | 19 +-- src/sampling/sampledSet/writers/xmgr/xmgr.H | 30 +++-- .../sampledSet/writers/xmgr/xmgrWriters.C | 12 +- .../sampledSet/writers/xmgr/xmgrWriters.H | 12 +- 17 files changed, 212 insertions(+), 266 deletions(-) diff --git a/src/sampling/Make/files b/src/sampling/Make/files index 9e4a5f1bb4..3029668f86 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -13,10 +13,10 @@ sampledSet/sampledSets/sampledSets.C sampledSet/sampledSetsFunctionObject/sampledSetsFunctionObject.C sampledSet/writers/writer/writers.C +sampledSet/writers/raw/rawWriters.C sampledSet/writers/xmgr/xmgrWriters.C sampledSet/writers/gnuplot/gnuplotWriters.C sampledSet/writers/jplot/jplotWriters.C -sampledSet/writers/raw/rawWriters.C cuttingPlane/cuttingPlane.C diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplot.H b/src/sampling/sampledSet/writers/gnuplot/gnuplot.H index 8e0dfd5582..d531ac4aeb 100644 --- a/src/sampling/sampledSet/writers/gnuplot/gnuplot.H +++ b/src/sampling/sampledSet/writers/gnuplot/gnuplot.H @@ -63,28 +63,26 @@ public: //- Construct null gnuplot(); - // Destructor - virtual ~gnuplot(); + //- Destructor + virtual ~gnuplot(); // Member Functions - // Write + virtual fileName getFileName + ( + const coordSet&, + const wordList& + ) const; - virtual fileName getFileName - ( - const coordSet&, - const wordList& - ) const; - - void write - ( - const coordSet&, - const wordList&, - const List*>&, - Ostream& os - ) const; + void write + ( + const coordSet&, + const wordList&, + const List*>&, + Ostream& os + ) const; }; diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.C b/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.C index d5e58405c7..7abc5c8fd0 100644 --- a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.C +++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "gnuplotWriters.H" @@ -33,13 +31,7 @@ Description namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makeWriters(gnuplot); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWriters(gnuplot) +} // ************************************************************************* // diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.H b/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.H index 4a8a456576..6f125366f2 100644 --- a/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.H +++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotWriters.H @@ -25,12 +25,9 @@ License InClass Foam::gnuplotWriters -Description - SourceFiles gnuplotWriters.C - \*---------------------------------------------------------------------------*/ #ifndef gnuplotWriters_H @@ -44,16 +41,8 @@ SourceFiles namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -typedef gnuplot gnuplotScalarWriter; -typedef gnuplot gnuplotVectorWriter; -typedef gnuplot gnuplotTensorWriter; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWritersTypedefs(gnuplot) +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/writers/jplot/jplot.H b/src/sampling/sampledSet/writers/jplot/jplot.H index 3fe254255a..45a39ebe16 100644 --- a/src/sampling/sampledSet/writers/jplot/jplot.H +++ b/src/sampling/sampledSet/writers/jplot/jplot.H @@ -25,8 +25,6 @@ License Class Foam::jplot -Description - SourceFiles jplot.C @@ -43,8 +41,6 @@ SourceFiles namespace Foam { -// Forward declaration of classes - /*---------------------------------------------------------------------------*\ Class jplot Declaration \*---------------------------------------------------------------------------*/ @@ -71,30 +67,26 @@ public: //- Construct null jplot(); - // Destructor - virtual ~jplot(); + //- Destructor + virtual ~jplot(); // Member Functions - // Access + virtual fileName getFileName + ( + const coordSet&, + const wordList& + ) const; - // Write - - virtual fileName getFileName - ( - const coordSet&, - const wordList& - ) const; - - void write - ( - const coordSet&, - const wordList&, - const List*>&, - Ostream& os - ) const; + void write + ( + const coordSet&, + const wordList&, + const List*>&, + Ostream& os + ) const; }; diff --git a/src/sampling/sampledSet/writers/jplot/jplotWriters.C b/src/sampling/sampledSet/writers/jplot/jplotWriters.C index 696f60b579..b117178971 100644 --- a/src/sampling/sampledSet/writers/jplot/jplotWriters.C +++ b/src/sampling/sampledSet/writers/jplot/jplotWriters.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "jplotWriters.H" @@ -33,13 +31,7 @@ Description namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makeWriters(jplot); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWriters(jplot) +} // ************************************************************************* // diff --git a/src/sampling/sampledSet/writers/jplot/jplotWriters.H b/src/sampling/sampledSet/writers/jplot/jplotWriters.H index 4971b1ce5d..21b0121ec0 100644 --- a/src/sampling/sampledSet/writers/jplot/jplotWriters.H +++ b/src/sampling/sampledSet/writers/jplot/jplotWriters.H @@ -25,12 +25,9 @@ License InClass Foam::jplotWriters -Description - SourceFiles jplotWriters.C - \*---------------------------------------------------------------------------*/ #ifndef jplotWriters_H @@ -44,16 +41,8 @@ SourceFiles namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -typedef jplot jplotScalarWriter; -typedef jplot jplotVectorWriter; -typedef jplot jplotTensorWriter; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWritersTypedefs(jplot) +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/writers/raw/raw.H b/src/sampling/sampledSet/writers/raw/raw.H index e66a7fe83a..1f4b856f66 100644 --- a/src/sampling/sampledSet/writers/raw/raw.H +++ b/src/sampling/sampledSet/writers/raw/raw.H @@ -64,28 +64,25 @@ public: raw(); - // Destructor - - virtual ~raw(); + //- Destructor + virtual ~raw(); // Member Functions - // Write + virtual fileName getFileName + ( + const coordSet&, + const wordList& + ) const; - virtual fileName getFileName - ( - const coordSet&, - const wordList& - ) const; - - virtual void write - ( - const coordSet&, - const wordList&, - const List*>&, - Ostream& os - ) const; + virtual void write + ( + const coordSet&, + const wordList&, + const List*>&, + Ostream& os + ) const; }; diff --git a/src/sampling/sampledSet/writers/raw/rawWriters.C b/src/sampling/sampledSet/writers/raw/rawWriters.C index a8bf0df14e..0b3a28898c 100644 --- a/src/sampling/sampledSet/writers/raw/rawWriters.C +++ b/src/sampling/sampledSet/writers/raw/rawWriters.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "rawWriters.H" @@ -33,13 +31,7 @@ Description namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makeWriters(raw); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWriters(raw) +} // ************************************************************************* // diff --git a/src/sampling/sampledSet/writers/raw/rawWriters.H b/src/sampling/sampledSet/writers/raw/rawWriters.H index e121a6dd6f..020b750fe2 100644 --- a/src/sampling/sampledSet/writers/raw/rawWriters.H +++ b/src/sampling/sampledSet/writers/raw/rawWriters.H @@ -25,12 +25,9 @@ License InClass Foam::rawWriters -Description - SourceFiles rawWriters.C - \*---------------------------------------------------------------------------*/ #ifndef rawWriters_H @@ -44,16 +41,8 @@ SourceFiles namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -typedef raw rawScalarWriter; -typedef raw rawVectorWriter; -typedef raw rawTensorWriter; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWritersTypedefs(raw) +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/writers/writer/writer.C b/src/sampling/sampledSet/writers/writer/writer.C index e629e546f0..b16cbd214f 100644 --- a/src/sampling/sampledSet/writers/writer/writer.C +++ b/src/sampling/sampledSet/writers/writer/writer.C @@ -31,11 +31,11 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - template -autoPtr > writer::New(const word& writeType) +Foam::autoPtr > Foam::writer::New +( + const word& writeType +) { typename wordConstructorTable::iterator cstrIter = wordConstructorTablePtr_ @@ -60,7 +60,7 @@ autoPtr > writer::New(const word& writeType) // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template -fileName writer::getBaseName +Foam::fileName Foam::writer::getBaseName ( const coordSet& points, const wordList& valueSets @@ -78,7 +78,7 @@ fileName writer::getBaseName template -void writer::writeCoord +void Foam::writer::writeCoord ( const coordSet& points, const label pointI, @@ -97,7 +97,7 @@ void writer::writeCoord template -void writer::writeTable +void Foam::writer::writeTable ( const coordSet& points, const List& values, @@ -109,16 +109,14 @@ void writer::writeTable writeCoord(points, pointI, os); os << token::SPACE; - write(values[pointI], os); - os << endl; } } template -void writer::writeTable +void Foam::writer::writeTable ( const coordSet& points, const List*>& valuesPtrList, @@ -132,9 +130,7 @@ void writer::writeTable forAll(valuesPtrList, i) { os << token::SPACE; - const List& values = *valuesPtrList[i]; - write(values[pointI], os); } os << endl; @@ -144,36 +140,44 @@ void writer::writeTable // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct null template -writer::writer() +Foam::writer::writer() {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -writer::~writer() +Foam::writer::~writer() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -Foam::Ostream& Foam::writer::write(const scalar value, Ostream& os) const +Foam::Ostream& Foam::writer::write +( + const scalar value, + Ostream& os +) const { return os << value; } template -Foam::Ostream& Foam::writer::write(const vector& value, Ostream& os) const +template +Foam::Ostream& Foam::writer::writeVS +( + const VSType& value, + Ostream& os +) const { - for (direction d=0; d::write(const vector& value, Ostream& os) const template -Foam::Ostream& Foam::writer::write(const tensor& value, Ostream& os) const +Foam::Ostream& Foam::writer::write +( + const vector& value, + Ostream& os +) const { - for (direction d=0; d +Foam::Ostream& Foam::writer::write +( + const sphericalTensor& value, + Ostream& os +) const +{ + return writeVS(value, os); +} + + +template +Foam::Ostream& Foam::writer::write +( + const symmTensor& value, + Ostream& os +) const +{ + return writeVS(value, os); +} + + +template +Foam::Ostream& Foam::writer::write +( + const tensor& value, + Ostream& os +) const +{ + return writeVS(value, os); +} -} // End namespace Foam // ************************************************************************* // diff --git a/src/sampling/sampledSet/writers/writer/writer.H b/src/sampling/sampledSet/writers/writer/writer.H index 3751df2f5e..73fe2fd10f 100644 --- a/src/sampling/sampledSet/writers/writer/writer.H +++ b/src/sampling/sampledSet/writers/writer/writer.H @@ -29,8 +29,8 @@ Description Base class for graphics format writing. Entry points are - write(..). \n Write to an Ostream a table of points with corresponding values. - - write(scalar/vector/tensor). \n - Write single scalar/vector/tensor. + - write(scalar/vector/sphericalTensor/symmTensor/tensor). \n + Write single scalar/vector/sphericalTensor/symmTensor/tensor. Default is to write space separated components. Example: @@ -151,43 +151,47 @@ public: writer(); - // Destructor - - virtual ~writer() = 0; + //- Destructor + virtual ~writer() = 0; // Member Functions - // Access + //- Generate file name with correct extension + virtual fileName getFileName + ( + const coordSet&, + const wordList& + ) const = 0; - // Write + //- General entry point for writing. + // The data is organized in a set of point with one or + // more values per point + virtual void write + ( + const coordSet&, + const wordList&, + const List*>&, + Ostream& + ) const = 0; - //- Generate file name with correct extension - virtual fileName getFileName - ( - const coordSet&, - const wordList& - ) const = 0; + //- Write scalar as ascii + virtual Ostream& write(const scalar, Ostream&) const; - //- General entry point for writing. - // The data is organized in a set of point with one or - // more values per point - virtual void write - ( - const coordSet&, - const wordList&, - const List*>&, - Ostream& - ) const = 0; + template + Ostream& writeVS(const VSType& value, Ostream& os) const; - //- Write scalar as ascii - virtual Ostream& write(const scalar, Ostream&) const; + //- Write vector. Tab separated ascii + virtual Ostream& write(const vector&, Ostream&) const; - //- Write vector. Tab separated ascii - virtual Ostream& write(const vector&, Ostream&) const; + //- Write sphericalTensor. Tab separated ascii + virtual Ostream& write(const sphericalTensor&, Ostream&) const; - //- Write tensor. Tab separated ascii - virtual Ostream& write(const tensor&, Ostream&) const; + //- Write symmTensor. Tab separated ascii + virtual Ostream& write(const symmTensor&, Ostream&) const; + + //- Write tensor. Tab separated ascii + virtual Ostream& write(const tensor&, Ostream&) const; }; @@ -202,34 +206,47 @@ public: #endif // Only used internally -#define makeTypeWritersTypeName(type) \ - \ +#define makeTypeWritersTypeName(type) \ + \ defineNamedTemplateTypeNameAndDebug(type, 0); // Used externally sometimes -#define makeWritersTypeName(typeWriter) \ - \ -makeTypeWritersTypeName(typeWriter##ScalarWriter); \ -makeTypeWritersTypeName(typeWriter##VectorWriter); \ +#define makeWritersTypeName(typeWriter) \ + \ +makeTypeWritersTypeName(typeWriter##ScalarWriter); \ +makeTypeWritersTypeName(typeWriter##VectorWriter); \ +makeTypeWritersTypeName(typeWriter##SphericalTensorWriter); \ +makeTypeWritersTypeName(typeWriter##SymmTensorWriter); \ makeTypeWritersTypeName(typeWriter##TensorWriter); // Define type info for single template instantiation (e.g. vector) -#define makeWriterTypes(WriterType, type) \ - \ -defineNamedTemplateTypeNameAndDebug(type, 0); \ - \ -addToRunTimeSelectionTable \ -( \ - WriterType, type, word \ +#define makeWriterTypes(WriterType, type) \ + \ +defineNamedTemplateTypeNameAndDebug(type, 0); \ + \ +addToRunTimeSelectionTable \ +( \ + WriterType, type, word \ ); // Define type info info for scalar, vector etc. instantiations -#define makeWriters(typeWriter) \ - \ -makeWriterTypes(scalarWriter, typeWriter##ScalarWriter); \ -makeWriterTypes(vectorWriter, typeWriter##VectorWriter); \ -makeWriterTypes(tensorWriter, typeWriter##TensorWriter); +#define makeWriters(typeWriter) \ + \ +makeWriterTypes(writerScalarWriter, typeWriter##ScalarWriter); \ +makeWriterTypes(writerVectorWriter, typeWriter##VectorWriter); \ +makeWriterTypes(writerSphericalTensorWriter, typeWriter##SphericalTensorWriter);\ +makeWriterTypes(writerSymmTensorWriter, typeWriter##SymmTensorWriter); \ +makeWriterTypes(writerTensorWriter, typeWriter##TensorWriter); + + +#define makeWritersTypedefs(typeWriter) \ + \ +typedef typeWriter typeWriter##ScalarWriter; \ +typedef typeWriter typeWriter##VectorWriter; \ +typedef typeWriter typeWriter##SphericalTensorWriter; \ +typedef typeWriter typeWriter##SymmTensorWriter; \ +typedef typeWriter typeWriter##TensorWriter; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/writers/writer/writers.C b/src/sampling/sampledSet/writers/writer/writers.C index 9c0598a9f9..8aaa5c4127 100644 --- a/src/sampling/sampledSet/writers/writer/writers.C +++ b/src/sampling/sampledSet/writers/writer/writers.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "writers.H" @@ -35,20 +33,20 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineNamedTemplateTypeNameAndDebug(scalarWriter, 0); -defineTemplateRunTimeSelectionTable(scalarWriter, word); +defineNamedTemplateTypeNameAndDebug(writerScalarWriter, 0); +defineTemplateRunTimeSelectionTable(writerScalarWriter, word); -defineNamedTemplateTypeNameAndDebug(vectorWriter, 0); -defineTemplateRunTimeSelectionTable(vectorWriter, word); +defineNamedTemplateTypeNameAndDebug(writerVectorWriter, 0); +defineTemplateRunTimeSelectionTable(writerVectorWriter, word); -defineNamedTemplateTypeNameAndDebug(sphericalTensorWriter, 0); -defineTemplateRunTimeSelectionTable(sphericalTensorWriter, word); +defineNamedTemplateTypeNameAndDebug(writerSphericalTensorWriter, 0); +defineTemplateRunTimeSelectionTable(writerSphericalTensorWriter, word); -defineNamedTemplateTypeNameAndDebug(symmTensorWriter, 0); -defineTemplateRunTimeSelectionTable(symmTensorWriter, word); +defineNamedTemplateTypeNameAndDebug(writerSymmTensorWriter, 0); +defineTemplateRunTimeSelectionTable(writerSymmTensorWriter, word); -defineNamedTemplateTypeNameAndDebug(tensorWriter, 0); -defineTemplateRunTimeSelectionTable(tensorWriter, word); +defineNamedTemplateTypeNameAndDebug(writerTensorWriter, 0); +defineTemplateRunTimeSelectionTable(writerTensorWriter, word); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/writers/writer/writers.H b/src/sampling/sampledSet/writers/writer/writers.H index 49979179d0..ba46c5880a 100644 --- a/src/sampling/sampledSet/writers/writer/writers.H +++ b/src/sampling/sampledSet/writers/writer/writers.H @@ -23,9 +23,10 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA InClass - Foam::writer + Foam::rawWriters -Description +SourceFiles + writers.C \*---------------------------------------------------------------------------*/ @@ -39,18 +40,8 @@ Description namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -typedef writer scalarWriter; -typedef writer vectorWriter; -typedef writer sphericalTensorWriter; -typedef writer symmTensorWriter; -typedef writer tensorWriter; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWritersTypedefs(writer) +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/writers/xmgr/xmgr.H b/src/sampling/sampledSet/writers/xmgr/xmgr.H index da4847f61c..4478730fd8 100644 --- a/src/sampling/sampledSet/writers/xmgr/xmgr.H +++ b/src/sampling/sampledSet/writers/xmgr/xmgr.H @@ -63,28 +63,26 @@ public: //- Construct null xmgr(); - // Destructor - virtual ~xmgr(); + //- Destructor + virtual ~xmgr(); // Member Functions - // Write + virtual fileName getFileName + ( + const coordSet&, + const wordList& + ) const; - virtual fileName getFileName - ( - const coordSet&, - const wordList& - ) const; - - void write - ( - const coordSet&, - const wordList&, - const List*>&, - Ostream& os - ) const; + void write + ( + const coordSet&, + const wordList&, + const List*>&, + Ostream& os + ) const; }; diff --git a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.C b/src/sampling/sampledSet/writers/xmgr/xmgrWriters.C index 4512317393..90828ad64f 100644 --- a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.C +++ b/src/sampling/sampledSet/writers/xmgr/xmgrWriters.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "xmgrWriters.H" @@ -33,13 +31,7 @@ Description namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -makeWriters(xmgr); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWriters(xmgr) +} // ************************************************************************* // diff --git a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.H b/src/sampling/sampledSet/writers/xmgr/xmgrWriters.H index 1889bfc312..b1b554409a 100644 --- a/src/sampling/sampledSet/writers/xmgr/xmgrWriters.H +++ b/src/sampling/sampledSet/writers/xmgr/xmgrWriters.H @@ -44,16 +44,8 @@ SourceFiles namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -typedef xmgr xmgrScalarWriter; -typedef xmgr xmgrVectorWriter; -typedef xmgr xmgrTensorWriter; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + makeWritersTypedefs(xmgr) +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // From fe4b18b05302e884d0cadf4bfcc9a924fce627b4 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 4 Aug 2008 16:05:06 +0100 Subject: [PATCH 6/7] Set the min value to 1e-8. --- tutorials/Xoodles/pitzDaily/0/k | 10 +++++----- tutorials/Xoodles/pitzDaily3D/0/k | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tutorials/Xoodles/pitzDaily/0/k b/tutorials/Xoodles/pitzDaily/0/k index ed08dad47a..4544024e3b 100644 --- a/tutorials/Xoodles/pitzDaily/0/k +++ b/tutorials/Xoodles/pitzDaily/0/k @@ -20,32 +20,32 @@ internalField uniform 2e-05; boundaryField { - inlet + inlet { type fixedValue; value uniform 2e-05; } - outlet + outlet { type inletOutlet; inletValue uniform 2e-05; value uniform 2e-05; } - upperWall + upperWall { type fixedValue; value uniform 1e-8; } - lowerWall + lowerWall { type fixedValue; value uniform 1e-8; } - frontAndBack + frontAndBack { type empty; } diff --git a/tutorials/Xoodles/pitzDaily3D/0/k b/tutorials/Xoodles/pitzDaily3D/0/k index 73882e0721..69de845314 100644 --- a/tutorials/Xoodles/pitzDaily3D/0/k +++ b/tutorials/Xoodles/pitzDaily3D/0/k @@ -16,36 +16,36 @@ FoamFile dimensions [0 2 -2 0 0 0 0]; -internalField uniform 0; +internalField uniform 2e-05; boundaryField { - inlet + inlet { type fixedValue; value uniform 2e-05; } - outlet + outlet { type inletOutlet; inletValue uniform 2e-05; value uniform 2e-05; } - upperWall + upperWall { type fixedValue; - value uniform 0; + value uniform 1e-8; } - lowerWall + lowerWall { type fixedValue; - value uniform 0; + value uniform 1e-8; } - frontAndBack + frontAndBack { type cyclic; } From f3f8ee3335473edcf7111b821281696450f0abfb Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 4 Aug 2008 16:17:49 +0100 Subject: [PATCH 7/7] Fixed update of kappa_. --- .../kineticTheoryModel/kineticTheoryModel.C | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 724602009a..44e276ddde 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -238,8 +238,7 @@ void Foam::kineticTheoryModel::solve() volScalarField ThetaSqrt = sqrt(Theta_); // 'thermal' conductivity (Table 3.3, p. 49) - volScalarField kappa_ = - conductivityModel_->kappa(alpha, Theta_, gs0_, rhoa_, da_, e_); + kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rhoa_, da_, e_); // particle viscosity (Table 3.2, p.47) mua_ = viscosityModel_->mua(alpha, Theta_, gs0_, rhoa_, da_, e_); @@ -351,8 +350,7 @@ void Foam::kineticTheoryModel::solve() mua_.min(1.0e+2); mua_.max(0.0); - lambda_ = (4.0/3.0)*sqr(alpha_)*rhoa_*da_*gs0_*(1.0 + e_) - *ThetaSqrt/sqrtPi; + lambda_ = (4.0/3.0)*sqr(alpha_)*rhoa_*da_*gs0_*(1.0 + e_)*ThetaSqrt/sqrtPi; Info<< "kinTheory: max(Theta) = " << max(Theta_).value() << endl;