diff --git a/Allwmake b/Allwmake index 16edfd1f6f..9187532553 100755 --- a/Allwmake +++ b/Allwmake @@ -26,12 +26,12 @@ else fi # build OpenFOAM libraries and applications -src/Allwmake -applications/Allwmake +src/Allwmake $* +applications/Allwmake $* if [ "$1" = doc ] then - doc/Allwmake + doc/Allwmake $* fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/Allwmake b/applications/Allwmake index 00bc326641..7f7ac6718d 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -16,7 +16,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { set -x -wmake all utilities -wmake all solvers +wmake all utilities $* +wmake all solvers $* # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 109354319e..aaf4620e3c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,8 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::XiGModel::basicSubGrid - + Foam::XiGModels::basicSubGrid Description @@ -39,13 +38,14 @@ Description and the removal: - \f[ - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}} - \frac{\Xi_{sub}-1}{\Xi_{sub}} \f] + \f[ + - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}} + \frac{\Xi_{sub}-1}{\Xi_{sub}} + \f] Finally, \f$ G_{sub} \f$ is added to generation rate \f$ G_{in} \f$ due to the turbulence. - SourceFiles basicSubGrid.C @@ -64,7 +64,7 @@ namespace XiGModels { /*---------------------------------------------------------------------------*\ - Class basicSubGrid Declaration + Class basicSubGrid Declaration \*---------------------------------------------------------------------------*/ class basicSubGrid diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 4c7095a6ed..1a4bb1ec0b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::XiEqModel::SCOPEXiEq + Foam::XiEqModels::SCOPEXiEq Description Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation @@ -120,7 +120,6 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiEqProperties); - }; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index 2370c16ba3..7b316e5c44 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -254,47 +254,85 @@ void Foam::DistributedDelaunayMesh::findProcessorBoundaryCells /Pstream::nProcs() ); - std::list infinite_cells; - Triangulation::incident_cells - ( - Triangulation::infinite_vertex(), - std::back_inserter(infinite_cells) - ); - - for - ( - typename std::list::iterator vcit = infinite_cells.begin(); - vcit != infinite_cells.end(); - ++vcit - ) - { - Cell_handle cit = *vcit; - - // Index of infinite vertex in this cell. - int i = cit->index(Triangulation::infinite_vertex()); - - Cell_handle c = cit->neighbor(i); - - if (c->unassigned()) - { - c->cellIndex() = this->getNewCellIndex(); - - if (checkProcBoundaryCell(c, circumsphereOverlaps)) - { - cellToCheck.insert(c->cellIndex()); - } - } - } +// std::list infinite_cells; +// Triangulation::incident_cells +// ( +// Triangulation::infinite_vertex(), +// std::back_inserter(infinite_cells) +// ); +// +// for +// ( +// typename std::list::iterator vcit +// = infinite_cells.begin(); +// vcit != infinite_cells.end(); +// ++vcit +// ) +// { +// Cell_handle cit = *vcit; +// +// // Index of infinite vertex in this cell. +// int i = cit->index(Triangulation::infinite_vertex()); +// +// Cell_handle c = cit->neighbor(i); +// +// if (c->unassigned()) +// { +// c->cellIndex() = this->getNewCellIndex(); +// +// if (checkProcBoundaryCell(c, circumsphereOverlaps)) +// { +// cellToCheck.insert(c->cellIndex()); +// } +// } +// } +// +// +// for +// ( +// Finite_cells_iterator cit = Triangulation::finite_cells_begin(); +// cit != Triangulation::finite_cells_end(); +// ++cit +// ) +// { +// if (cit->parallelDualVertex()) +// { +// if (cit->unassigned()) +// { +// if (checkProcBoundaryCell(cit, circumsphereOverlaps)) +// { +// cellToCheck.insert(cit->cellIndex()); +// } +// } +// } +// } for ( - Finite_cells_iterator cit = Triangulation::finite_cells_begin(); - cit != Triangulation::finite_cells_end(); + All_cells_iterator cit = Triangulation::all_cells_begin(); + cit != Triangulation::all_cells_end(); ++cit ) { - if (cit->parallelDualVertex()) + if (Triangulation::is_infinite(cit)) + { + // Index of infinite vertex in this cell. + int i = cit->index(Triangulation::infinite_vertex()); + + Cell_handle c = cit->neighbor(i); + + if (c->unassigned()) + { + c->cellIndex() = this->getNewCellIndex(); + + if (checkProcBoundaryCell(c, circumsphereOverlaps)) + { + cellToCheck.insert(c->cellIndex()); + } + } + } + else if (cit->parallelDualVertex()) { if (cit->unassigned()) { diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 3e91db48cb..577d81cdcb 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -1046,6 +1046,18 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh ) ), decomposition_() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::conformalVoronoiMesh::~conformalVoronoiMesh() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::conformalVoronoiMesh::initialiseForMotion() { if (foamyHexMeshControls().objOutput()) { @@ -1061,7 +1073,10 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh runTime_, rndGen_, geometryToConformTo_, - foamyHexMeshDict.subDict("backgroundMeshDecomposition") + foamyHexMeshControls().foamyHexMeshDict().subDict + ( + "backgroundMeshDecomposition" + ) ) ); } @@ -1125,13 +1140,53 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +void Foam::conformalVoronoiMesh::initialiseForConformation() +{ + if (Pstream::parRun()) + { + decomposition_.reset + ( + new backgroundMeshDecomposition + ( + runTime_, + rndGen_, + geometryToConformTo_, + foamyHexMeshControls().foamyHexMeshDict().subDict + ( + "backgroundMeshDecomposition" + ) + ) + ); + } -Foam::conformalVoronoiMesh::~conformalVoronoiMesh() -{} + insertInitialPoints(); + insertFeaturePoints(); + + // Improve the guess that the backgroundMeshDecomposition makes with the + // initial positions. Use before building the surface conformation to + // better balance the surface conformation load. + distributeBackground(*this); + + buildSurfaceConformation(); + + // The introduction of the surface conformation may have distorted the + // balance of vertices, distribute if necessary. + distributeBackground(*this); + + if (Pstream::parRun()) + { + sync(decomposition_().procBounds()); + } + + cellSizeMeshOverlapsBackground(); + + if (foamyHexMeshControls().printVertexInfo()) + { + printVertexInfo(Info); + } +} -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // void Foam::conformalVoronoiMesh::move() { diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index ab9b6d955b..6b514dfdf5 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -1038,6 +1038,10 @@ public: // Member Functions + void initialiseForMotion(); + + void initialiseForConformation(); + //- Move the vertices according to the controller, re-conforming to the // surface as required void move(); diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 9cfa9e316c..e33ce7c6c7 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1787,6 +1787,11 @@ void Foam::conformalVoronoiMesh::indexDualVertices } } + OBJstream snapping1("snapToSurface1.obj"); + OBJstream snapping2("snapToSurface2.obj"); + OFstream tetToSnapTo("tetsToSnapTo.obj"); + label offset = 0; + for ( Delaunay::Finite_cells_iterator cit = finite_cells_begin(); @@ -1892,6 +1897,88 @@ void Foam::conformalVoronoiMesh::indexDualVertices } } + { + // Snapping points far outside + if (cit->boundaryDualVertex() && !cit->parallelDualVertex()) + { + pointFromPoint dual = cit->dual(); + + pointIndexHit hitInfo; + label surfHit; + + // Find nearest surface point + geometryToConformTo_.findSurfaceNearest + ( + dual, + sqr(targetCellSize(dual)), + hitInfo, + surfHit + ); + + if (!hitInfo.hit()) + { + // Project dual to nearest point on tet + + tetPointRef tet + ( + topoint(cit->vertex(0)->point()), + topoint(cit->vertex(1)->point()), + topoint(cit->vertex(2)->point()), + topoint(cit->vertex(3)->point()) + ); + + pointFromPoint nearestPointOnTet = + tet.nearestPoint(dual).rawPoint(); + + // Get nearest point on surface from tet. + geometryToConformTo_.findSurfaceNearest + ( + nearestPointOnTet, + sqr(targetCellSize(nearestPointOnTet)), + hitInfo, + surfHit + ); + + vector snapDir = nearestPointOnTet - dual; + snapDir /= mag(snapDir) + SMALL; + + drawDelaunayCell(tetToSnapTo, cit, offset); + offset += 1; + + vectorField norm(1); + allGeometry_[surfHit].getNormal + ( + List(1, hitInfo), + norm + ); + norm[0] /= mag(norm[0]) + SMALL; + + if + ( + hitInfo.hit() + && (mag(snapDir & norm[0]) > 0.5) + ) + { + snapping1.write + ( + linePointRef(dual, nearestPointOnTet) + ); + + snapping2.write + ( + linePointRef + ( + nearestPointOnTet, + hitInfo.hitPoint() + ) + ); + + pts[cit->cellIndex()] = hitInfo.hitPoint(); + } + } + } + } + if (cit->boundaryDualVertex()) { if (cit->featureEdgeDualVertex()) diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C index 32ce53d376..a44103923b 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C @@ -58,7 +58,7 @@ List pointFile::initialPoints() const IOobject ( pointFileName_.name(), - foamyHexMesh_.time().constant(), + foamyHexMesh_.time().timeName(), foamyHexMesh_.time(), IOobject::MUST_READ, IOobject::NO_WRITE diff --git a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C index 8133723819..87c1dbe22d 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C @@ -45,12 +45,22 @@ int main(int argc, char *argv[]) "check all surface geometry for quality" ); + Foam::argList::addBoolOption + ( + "conformationOnly", + "conform to the initial points without any point motion" + ); + + #include "addOverwriteOption.H" + #include "setRootCase.H" #include "createTime.H" runTime.functionObjects().off(); const bool checkGeometry = args.optionFound("checkGeometry"); + const bool conformationOnly = args.optionFound("conformationOnly"); + const bool overwrite = args.optionFound("overwrite"); IOdictionary foamyHexMeshDict ( @@ -104,16 +114,33 @@ int main(int argc, char *argv[]) conformalVoronoiMesh mesh(runTime, foamyHexMeshDict); - while (runTime.loop()) + if (conformationOnly) { - Info<< nl << "Time = " << runTime.timeName() << endl; + mesh.initialiseForConformation(); - mesh.move(); + if (!overwrite) + { + runTime++; + } - Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << endl; + mesh.writeMesh(runTime.timeName()); } + else + { + mesh.initialiseForMotion(); + + while (runTime.loop()) + { + Info<< nl << "Time = " << runTime.timeName() << endl; + + mesh.move(); + + Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << endl; + } + } + Info<< nl << "End" << nl << endl; diff --git a/src/Allwmake b/src/Allwmake index 55b8981ce2..d5177cfafc 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -24,7 +24,7 @@ wmakeLnInclude OpenFOAM wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX} Pstream/Allwmake $* -OSspecific/${WM_OSTYPE:-POSIX}/Allwmake +OSspecific/${WM_OSTYPE:-POSIX}/Allwmake $* wmake $makeType OpenFOAM wmake $makeType fileFormats diff --git a/src/OSspecific/POSIX/Allwmake b/src/OSspecific/POSIX/Allwmake index c68f089436..52a54646f0 100755 --- a/src/OSspecific/POSIX/Allwmake +++ b/src/OSspecific/POSIX/Allwmake @@ -1,5 +1,6 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory +makeType=${1:-libo} unset COMP_FLAGS LINK_FLAGS @@ -19,6 +20,6 @@ fi # make (non-shared) object -wmake libo +wmake $makeType # ----------------------------------------------------------------- end-of-file diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H index 4e5c991131..8d2ef11dfc 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H +++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,6 @@ Description SourceFiles OSstreamI.H OSstream.C - chkStream.C \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/chkStream.C b/src/OpenFOAM/db/IOstreams/Sstreams/chkStream.C deleted file mode 100644 index 94c4db91ae..0000000000 --- a/src/OpenFOAM/db/IOstreams/Sstreams/chkStream.C +++ /dev/null @@ -1,58 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Description - Checks stream state,ing error. - -\*---------------------------------------------------------------------------*/ - -#include "error.H" -#include "token.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -bool Foam::checkStream(istream& is, const string& fnName) -{ - if (!is.good()) - { - state(is, fnName); - Info<< "Bad object in istream?", fnName << endl; - } - - return good(); -} - - -bool Foam::checkStream(ostream& os, const string& fnName) -{ - if (!os.good()) - { - state(os, fnName); - Info<< "Bad object in ostream?", fnName << endl; - } - - return good(); -} - - -// ************************************************************************* // diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/state.C b/src/OpenFOAM/db/IOstreams/Sstreams/state.C deleted file mode 100644 index fd59118509..0000000000 --- a/src/OpenFOAM/db/IOstreams/Sstreams/state.C +++ /dev/null @@ -1,122 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Description - Implementation of parser: test the state of either an istream or an - ostream. Report an error if there is one. - -\*---------------------------------------------------------------------------*/ - -#include "error.H" -#include "token.H" -#include "int.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Print state of ostream. - -void Foam::state(ostream& to, const string& s) -{ - state_value osState = state_value(to.rdstate()); - - switch (osState) - { - case _good: // Do not anything 'unusual'. - break; - - case _eof: - Info - << "Output stream: premature end of stream", s << endl; - break; - - case _fail: - SeriousErrorIn("state(ostream& to, const string& s)") - << "Output stream failure (bad format?)", s << endl; - break; - - case (_fail + _eof) : - SeriousErrorIn("state(ostream& to, const string& s)") - << "Output stream failure and end of stream", s << endl; - break; - - case _bad: - SeriousErrorIn("state(ostream& to, const string& s)") - << "Serious output stream failure", s << endl; - break; - - default: - SeriousErrorIn("state(ostream& to, const string& s)") - << "Output stream failure of unknown type", s << endl - << "Stream state value = ", osState << endl; - break; - } - - return; -} - - -// Print state of istream. -void Foam::state(istream& from, const string& s) -{ - state_value isState = state_value(from.rdstate()); - - switch (isState) - { - case _good: // Do not anything 'unusual'. - break; - - case _eof: - Info - << "Input stream: premature end of stream", s << endl; - Info<< "If all else well, possibly a quote mark missing" << endl; - break; - - case _fail: - SeriousErrorIn("state(istream& from, const string& s)") - << "Input stream failure (bad format?)", s << endl; - Info<< "If all else well, possibly a quote mark missing" << endl; - break; - - case (_fail + _eof) : - SeriousErrorIn("state(istream& from, const string& s)") - << "Input stream failure and end of stream", s << endl; - Info<< "If all else well, possibly a quote mark missing" << endl; - break; - - case _bad: - SeriousErrorIn("state(istream& from, const string& s)") - << "Serious input stream failure", s << endl; - break; - - default: - SeriousErrorIn("state(istream& from, const string& s)") - << "Input stream failure of unknown type", s << endl; - SeriousErrorIn("state(istream& from, const string& s)") - << "Stream state value = ", isState << endl; - break; - } - - return; -} - - -// ************************************************************************* // diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index b75a8864ad..d3c021d4cb 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -473,14 +473,14 @@ Foam::argList::argList bool initialise ) : + parRunControl_(args.parRunControl_), args_(args.args_), options_(options), executable_(args.executable_), rootPath_(args.rootPath_), globalCase_(args.globalCase_), case_(args.case_), - argListStr_(args.argListStr_), - parRunControl_(args.parRunControl_) + argListStr_(args.argListStr_) { parse(checkArgs, checkOpts, initialise); } diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index c7e07026bd..ed4b07e205 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -105,6 +105,10 @@ class argList // Private data static bool bannerEnabled; + //- Switch on/off parallel mode. Has to be first to be constructed + // so destructor is done last. + ParRunControl parRunControl_; + stringList args_; HashTable options_; @@ -114,8 +118,6 @@ class argList fileName case_; string argListStr_; - ParRunControl parRunControl_; - // Signal handlers sigFpe sigFpe_; sigInt sigInt_; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C index b0f5e757da..508c0c3f94 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C @@ -26,177 +26,7 @@ License #include "pairGAMGAgglomeration.H" #include "lduAddressing.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -Foam::tmp Foam::pairGAMGAgglomeration::agglomerate -( - label& nCoarseCells, - const lduAddressing& fineMatrixAddressing, - const scalarField& faceWeights -) -{ - const label nFineCells = fineMatrixAddressing.size(); - - const labelUList& upperAddr = fineMatrixAddressing.upperAddr(); - const labelUList& lowerAddr = fineMatrixAddressing.lowerAddr(); - - // For each cell calculate faces - labelList cellFaces(upperAddr.size() + lowerAddr.size()); - labelList cellFaceOffsets(nFineCells + 1); - - // memory management - { - labelList nNbrs(nFineCells, 0); - - forAll(upperAddr, facei) - { - nNbrs[upperAddr[facei]]++; - } - - forAll(lowerAddr, facei) - { - nNbrs[lowerAddr[facei]]++; - } - - cellFaceOffsets[0] = 0; - forAll(nNbrs, celli) - { - cellFaceOffsets[celli+1] = cellFaceOffsets[celli] + nNbrs[celli]; - } - - // reset the whole list to use as counter - nNbrs = 0; - - forAll(upperAddr, facei) - { - cellFaces - [ - cellFaceOffsets[upperAddr[facei]] + nNbrs[upperAddr[facei]] - ] = facei; - - nNbrs[upperAddr[facei]]++; - } - - forAll(lowerAddr, facei) - { - cellFaces - [ - cellFaceOffsets[lowerAddr[facei]] + nNbrs[lowerAddr[facei]] - ] = facei; - - nNbrs[lowerAddr[facei]]++; - } - } - - - // go through the faces and create clusters - - tmp tcoarseCellMap(new labelField(nFineCells, -1)); - labelField& coarseCellMap = tcoarseCellMap(); - - nCoarseCells = 0; - - for (label celli=0; celli maxFaceWeight - ) - { - // Match found. Pick up all the necessary data - matchFaceNo = facei; - maxFaceWeight = faceWeights[facei]; - } - } - - if (matchFaceNo >= 0) - { - // Make a new group - coarseCellMap[upperAddr[matchFaceNo]] = nCoarseCells; - coarseCellMap[lowerAddr[matchFaceNo]] = nCoarseCells; - nCoarseCells++; - } - else - { - // No match. Find the best neighbouring cluster and - // put the cell there - label clusterMatchFaceNo = -1; - scalar clusterMaxFaceCoeff = -GREAT; - - for - ( - label faceOs=cellFaceOffsets[celli]; - faceOs clusterMaxFaceCoeff) - { - clusterMatchFaceNo = facei; - clusterMaxFaceCoeff = faceWeights[facei]; - } - } - - if (clusterMatchFaceNo >= 0) - { - // Add the cell to the best cluster - coarseCellMap[celli] = max - ( - coarseCellMap[upperAddr[clusterMatchFaceNo]], - coarseCellMap[lowerAddr[clusterMatchFaceNo]] - ); - } - } - } - } - - - // Check that all cells are part of clusters, - // if not create single-cell "clusters" for each - for (label celli=0; celli Foam::pairGAMGAgglomeration::agglomerate +( + label& nCoarseCells, + const lduAddressing& fineMatrixAddressing, + const scalarField& faceWeights +) +{ + const label nFineCells = fineMatrixAddressing.size(); + + const labelUList& upperAddr = fineMatrixAddressing.upperAddr(); + const labelUList& lowerAddr = fineMatrixAddressing.lowerAddr(); + + // For each cell calculate faces + labelList cellFaces(upperAddr.size() + lowerAddr.size()); + labelList cellFaceOffsets(nFineCells + 1); + + // memory management + { + labelList nNbrs(nFineCells, 0); + + forAll(upperAddr, facei) + { + nNbrs[upperAddr[facei]]++; + } + + forAll(lowerAddr, facei) + { + nNbrs[lowerAddr[facei]]++; + } + + cellFaceOffsets[0] = 0; + forAll(nNbrs, celli) + { + cellFaceOffsets[celli+1] = cellFaceOffsets[celli] + nNbrs[celli]; + } + + // reset the whole list to use as counter + nNbrs = 0; + + forAll(upperAddr, facei) + { + cellFaces + [ + cellFaceOffsets[upperAddr[facei]] + nNbrs[upperAddr[facei]] + ] = facei; + + nNbrs[upperAddr[facei]]++; + } + + forAll(lowerAddr, facei) + { + cellFaces + [ + cellFaceOffsets[lowerAddr[facei]] + nNbrs[lowerAddr[facei]] + ] = facei; + + nNbrs[lowerAddr[facei]]++; + } + } + + + // go through the faces and create clusters + + tmp tcoarseCellMap(new labelField(nFineCells, -1)); + labelField& coarseCellMap = tcoarseCellMap(); + + nCoarseCells = 0; + label celli; + + for (label cellfi=0; cellfi maxFaceWeight + ) + { + // Match found. Pick up all the necessary data + matchFaceNo = facei; + maxFaceWeight = faceWeights[facei]; + } + } + + if (matchFaceNo >= 0) + { + // Make a new group + coarseCellMap[upperAddr[matchFaceNo]] = nCoarseCells; + coarseCellMap[lowerAddr[matchFaceNo]] = nCoarseCells; + nCoarseCells++; + } + else + { + // No match. Find the best neighbouring cluster and + // put the cell there + label clusterMatchFaceNo = -1; + scalar clusterMaxFaceCoeff = -GREAT; + + for + ( + label faceOs=cellFaceOffsets[celli]; + faceOs clusterMaxFaceCoeff) + { + clusterMatchFaceNo = facei; + clusterMaxFaceCoeff = faceWeights[facei]; + } + } + + if (clusterMatchFaceNo >= 0) + { + // Add the cell to the best cluster + coarseCellMap[celli] = max + ( + coarseCellMap[upperAddr[clusterMatchFaceNo]], + coarseCellMap[lowerAddr[clusterMatchFaceNo]] + ); + } + } + } + } + + // Check that all cells are part of clusters, + // if not create single-cell "clusters" for each + for (label cellfi=0; cellfi& interfaceBouCoeffs, const lduInterfaceFieldPtrsList& interfaces, - const scalarField& source, + const labelList& restrictAddressing, + const scalarField& psiC, const direction cmpt ) const; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C index a24612645b..6c18b43d0a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C @@ -34,7 +34,8 @@ void Foam::GAMGSolver::interpolate const lduMatrix& m, const FieldField& interfaceBouCoeffs, const lduInterfaceFieldPtrsList& interfaces, - const scalarField& source, + const labelList& restrictAddressing, + const scalarField& psiC, const direction cmpt ) const { @@ -80,6 +81,30 @@ void Foam::GAMGSolver::interpolate { psiPtr[celli] = -ApsiPtr[celli]/(diagPtr[celli]); } + + register const label nCCells = psiC.size(); + scalarField corrC(nCCells, 0); + scalarField diagC(nCCells, 0); + + for (register label celli=0; celli(ACf.operator const scalarField&()); - if (interpolateCorrection_) + if (interpolateCorrection_ && leveli < coarsestLevel - 2) { interpolate ( @@ -322,7 +322,8 @@ void Foam::GAMGSolver::Vcycle matrixLevels_[leveli], interfaceLevelsBouCoeffs_[leveli], interfaceLevels_[leveli], - coarseSources[leveli], + agglomeration_.restrictAddressing(leveli + 1), + coarseCorrFields[leveli + 1], cmpt ); } @@ -382,7 +383,8 @@ void Foam::GAMGSolver::Vcycle matrix_, interfaceBouCoeffs_, interfaces_, - finestResidual, + agglomeration_.restrictAddressing(0), + coarseCorrFields[0], cmpt ); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 2615d21705..7e3850891d 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -171,6 +171,20 @@ void Foam::faceZone::checkAddressing() const << " size of flip map: " << flipMap_.size() << abort(FatalError); } + + const labelList& mf = *this; + + bool hasWarned = false; + forAll(mf, i) + { + if (!hasWarned && (mf[i] < 0 || mf[i] >= zoneMesh().mesh().nFaces())) + { + WarningIn("void Foam::faceZone::checkAddressing() const") + << "Illegal face index " << mf[i] << " outside range 0.." + << zoneMesh().mesh().nFaces()-1 << endl; + hasWarned = true; + } + } } diff --git a/src/combustionModels/combustionModel/combustionModelNew.C b/src/combustionModels/combustionModel/combustionModelNew.C deleted file mode 100644 index 5a3c8e1243..0000000000 --- a/src/combustionModels/combustionModel/combustionModelNew.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "combustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::combustionModel::New -( - const dictionary& combustionProperties, - psiReactionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -{ - word combustionModelTypeName = combustionProperties.lookup - ( - "combustionModel" - ); - - Info<< "Selecting combustion model " << combustionModelTypeName << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(combustionModelTypeName); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "combustionModel::New" - ) << "Unknown combustionModel type " - << combustionModelTypeName << endl << endl - << "Valid combustionModels are : " << endl - << dictionaryConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr - (cstrIter()(combustionProperties, thermo, turbulence, phi, rho)); -} - - -// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index f42499c3f4..6713435149 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -679,7 +679,13 @@ bool Foam::fvMesh::writeObjects //- Write mesh using IO settings from the time bool Foam::fvMesh::write() const { - return polyMesh::write(); + bool ok = true; + if (phiPtr_) + { + ok = phiPtr_->write(); + } + + return ok && polyMesh::write(); } diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C index e3663315aa..4d32bfa89f 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C @@ -30,11 +30,6 @@ Description #include "fvMesh.H" #include "syncTools.H" -//extern "C" -//{ -//# include "mgridgen.h" -//} - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::MGridGenGAMGAgglomeration:: diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 59c45bc11b..cc259c5038 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C @@ -59,7 +59,11 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration // Start geometric agglomeration from the cell volumes and areas of the mesh scalarField* VPtr = const_cast(&fvMesh_.cellVolumes()); - SubField Sf(fvMesh_.faceAreas(), fvMesh_.nInternalFaces()); + + vectorField magFaceAreas(vector::one*mag(fvMesh_.faceAreas())); + SubField Sf(magFaceAreas, fvMesh_.nInternalFaces()); + //SubField Sf(fvMesh_.faceAreas(), fvMesh_.nInternalFaces()); + vectorField* SfPtr = const_cast ( &Sf.operator const vectorField&() diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H index ec49b1e223..b5da0b5b3b 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,9 +36,6 @@ Description Tables are in the \a constant/tables directory. -Note - could be a motionSolver - does not use any fvMesh structure. - SourceFiles displacementInterpolationMotionSolver.C diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C index f491ee586d..3ea1d3ed39 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -253,6 +253,18 @@ Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate // Only on boundary faces - follow boundary conditions fld = vectorField(pointDisplacement_, meshPoints); } + else if (type == "uniformFollow") + { + // Reads name of name of patch. Then get average point dislacement on + // patch. That becomes the value of fld. + const word patchName(dict.lookup("patch")); + label patchID = mesh().boundaryMesh().findPatchID(patchName); + pointField pdf + ( + pointDisplacement_.boundaryField()[patchID].patchInternalField() + ); + fld = gAverage(pdf); + } else { FatalIOErrorIn @@ -399,22 +411,6 @@ Info<< "For cellZone:" << cellZoneI // Implement real bc. patchDisp[patchI].correctBoundaryConditions(); - -//Info<< "Writing displacement for faceZone " << fz.name() -// << " to " << patchDisp[patchI].name() << endl; -//patchDisp[patchI].write(); - -// // Copy into pointDisplacement for other fields to use -// forAll(isZonePoint, pointI) -// { -// if (isZonePoint[pointI]) -// { -// pointDisplacement_[pointI] = patchDisp[patchI][pointI]; -// } -// } -// pointDisplacement_.correctBoundaryConditions(); - - patchI++; } @@ -423,37 +419,40 @@ Info<< "For cellZone:" << cellZoneI // ~~~~~ // solving the interior is just interpolating -// // Get normalised distance -// pointScalarField distance -// ( -// IOobject -// ( -// "distance", -// mesh().time().timeName(), -// mesh(), -// IOobject::NO_READ, -// IOobject::NO_WRITE, -// false -// ), -// pointMesh::New(mesh()), -// dimensionedScalar("distance", dimLength, 0.0) -// ); -// forAll(distance, pointI) -// { -// if (isZonePoint[pointI]) -// { -// scalar d1 = patchDist[0][pointI]; -// scalar d2 = patchDist[1][pointI]; -// if (d1+d2 > SMALL) -// { -// scalar s = d1/(d1+d2); -// distance[pointI] = s; -// } -// } -// } -// Info<< "Writing distance pointScalarField to " << mesh().time().timeName() -// << endl; -// distance.write(); + if (debug) + { + // Get normalised distance + pointScalarField distance + ( + IOobject + ( + "distance", + mesh().time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + pointMesh::New(mesh()), + dimensionedScalar("distance", dimLength, 0.0) + ); + forAll(distance, pointI) + { + if (isZonePoint[pointI]) + { + scalar d1 = patchDist[0][pointI]; + scalar d2 = patchDist[1][pointI]; + if (d1+d2 > SMALL) + { + scalar s = d1/(d1+d2); + distance[pointI] = s; + } + } + } + Info<< "Writing distance pointScalarField to " + << mesh().time().timeName() << endl; + distance.write(); + } // Average forAll(pointDisplacement_, pointI) @@ -470,7 +469,6 @@ Info<< "For cellZone:" << cellZoneI + s*patchDisp[1][pointI]; } } - pointDisplacement_.correctBoundaryConditions(); } @@ -484,9 +482,7 @@ displacementLayeredMotionMotionSolver ) : displacementMotionSolver(mesh, dict, typeName) -{ - pointDisplacement_.correctBoundaryConditions(); -} +{} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -518,6 +514,9 @@ void Foam::displacementLayeredMotionMotionSolver::solve() // the motionSolver accordingly movePoints(mesh().points()); + // Apply boundary conditions + pointDisplacement_.boundaryField().updateCoeffs(); + // Apply all regions (=cellZones) const dictionary& regionDicts = coeffDict().subDict("regions"); @@ -544,6 +543,9 @@ void Foam::displacementLayeredMotionMotionSolver::solve() cellZoneSolve(zoneI, regionDict); } + + // Update pointDisplacement for solved values + pointDisplacement_.correctBoundaryConditions(); } diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H index 0f29c4f88f..1aa7884f52 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,11 +28,6 @@ Description Mesh motion solver for an (multi-block) extruded fvMesh. Gets given the structure of the mesh blocks and boundary conditions on these blocks. - Note: should not be an fvMotionSolver but just a motionSolver. Only here - so we can reuse displacementFvMotionSolver functionality (e.g. surface - following boundary conditions) - - The displacementLayeredMotionCoeffs subdict of dynamicMeshDict specifies per region (=cellZone) the boundary conditions on two opposing patches (=faceZones). It then interpolates the boundary values using topological @@ -44,6 +39,9 @@ Description Use this for faceZones on boundary faces (so it uses the proper boundary conditions on the pointDisplacement). + uniformFollow: like 'follow' but takes the average value of + a specified 'patch' (which is not necessarily colocated) + fixedValue: fixed value. timeVaryingUniformFixedValue: table-driven fixed value. diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 6632fdb6d2..f43f91ff46 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -297,9 +297,9 @@ void Foam::cyclicAMIPolyPatch::resetAMI { Pout<< "cyclicAMIPolyPatch : " << name() << " constructed AMI with " << nl - << " " << ":srcAddress:" << AMIPtr_().srcAddress().size() + << " " << "srcAddress:" << AMIPtr_().srcAddress().size() << nl - << " " << " tgAddress :" << AMIPtr_().tgtAddress().size() + << " " << "tgAddress :" << AMIPtr_().tgtAddress().size() << nl << endl; } } diff --git a/src/meshTools/searchableSurface/searchablePlate.H b/src/meshTools/searchableSurface/searchablePlate.H index 671f3785f6..86b0785077 100644 --- a/src/meshTools/searchableSurface/searchablePlate.H +++ b/src/meshTools/searchableSurface/searchablePlate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,7 +54,7 @@ namespace Foam // Forward declaration of classes /*---------------------------------------------------------------------------*\ - Class searchablePlate Declaration + Class searchablePlate Declaration \*---------------------------------------------------------------------------*/ class searchablePlate @@ -112,7 +112,7 @@ public: ( const IOobject& io, const point& origin, - const point& span + const vector& span ); //- Construct from dictionary (used by searchableSurface) @@ -122,6 +122,7 @@ public: const dictionary& dict ); + //- Destructor virtual ~searchablePlate(); @@ -254,7 +255,6 @@ public: notImplemented("searchablePlate::writeData(Ostream&) const"); return false; } - }; diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake index 24b764c420..3522721c4d 100755 --- a/src/postProcessing/Allwmake +++ b/src/postProcessing/Allwmake @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory makeType=${1:-libso} set -x -wmake libo postCalc +wmake ${1:-libo} postCalc wmake $makeType foamCalcFunctions functionObjects/Allwmake $* diff --git a/src/postProcessing/functionObjects/doc/functionObjects.dox b/src/postProcessing/functionObjects/doc/functionObjects.dox index 64073c2a3f..94eb32bc47 100644 --- a/src/postProcessing/functionObjects/doc/functionObjects.dox +++ b/src/postProcessing/functionObjects/doc/functionObjects.dox @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,14 +57,14 @@ functions { myFunctionObject // user-defined name of function object entry { - type functionObjectType; - libs ("libMyFunctionObjectlib.so"); - region defaultRegion; - enabled yes; - timeStart 0; - timeEnd 10; - outputControl outputTime; - outputInterval 1; + type functionObjectType; + functionObjectLibs ("libMyFunctionObjectlib.so"); + region defaultRegion; + enabled yes; + timeStart 0; + timeEnd 10; + outputControl outputTime; + outputInterval 1; ... } } @@ -74,7 +74,7 @@ Where: \table Property | Description | Required | Default value type | type of function object | yes | - libs | libraries containing object implementation | yes | + functionObjectLibs | libraries containing object implementation | yes | region | name of region for multi-region cases | no | enabled | on/off switch | no | yes timeStart| start time | no | diff --git a/src/sampling/probes/patchProbesTemplates.C b/src/sampling/probes/patchProbesTemplates.C index 8f37e2f07c..7e8ddd74b4 100644 --- a/src/sampling/probes/patchProbesTemplates.C +++ b/src/sampling/probes/patchProbesTemplates.C @@ -43,7 +43,9 @@ void Foam::patchProbes::sampleAndWrite unsigned int w = IOstream::defaultPrecision() + 7; OFstream& probeStream = *probeFilePtrs_[vField.name()]; - probeStream << setw(w) << vField.time().value(); + probeStream + << setw(w) + << vField.time().timeToUserTime(vField.time().value()); forAll(values, probeI) { @@ -67,7 +69,9 @@ void Foam::patchProbes::sampleAndWrite unsigned int w = IOstream::defaultPrecision() + 7; OFstream& probeStream = *probeFilePtrs_[sField.name()]; - probeStream << setw(w) << sField.time().value(); + probeStream + << setw(w) + << sField.time().timeToUserTime(sField.time().value()); forAll(values, probeI) { diff --git a/src/sampling/probes/probesTemplates.C b/src/sampling/probes/probesTemplates.C index 3a34c1c264..b64bbb577f 100644 --- a/src/sampling/probes/probesTemplates.C +++ b/src/sampling/probes/probesTemplates.C @@ -76,7 +76,7 @@ void Foam::probes::sampleAndWrite unsigned int w = IOstream::defaultPrecision() + 7; OFstream& os = *probeFilePtrs_[vField.name()]; - os << setw(w) << vField.time().value(); + os << setw(w) << vField.time().timeToUserTime(vField.time().value()); forAll(values, probeI) { @@ -90,17 +90,17 @@ void Foam::probes::sampleAndWrite template void Foam::probes::sampleAndWrite ( - const GeometricField& vField + const GeometricField& sField ) { - Field values(sample(vField)); + Field values(sample(sField)); if (Pstream::master()) { unsigned int w = IOstream::defaultPrecision() + 7; - OFstream& os = *probeFilePtrs_[vField.name()]; + OFstream& os = *probeFilePtrs_[sField.name()]; - os << setw(w) << vField.time().value(); + os << setw(w) << sField.time().timeToUserTime(sField.time().value()); forAll(values, probeI) { @@ -259,7 +259,7 @@ template Foam::tmp > Foam::probes::sample ( - const GeometricField& vField + const GeometricField& sField ) const { const Type unsetVal(-VGREAT*pTraits::one); @@ -275,7 +275,7 @@ Foam::probes::sample { if (faceList_[probeI] >= 0) { - values[probeI] = vField[faceList_[probeI]]; + values[probeI] = sField[faceList_[probeI]]; } } diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index e0e6c265ff..258958ca69 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -494,6 +494,7 @@ void Foam::triSurface::write ( "triSurface::write(const fileName&, const word&, const bool)" ) << "unknown file extension " << ext + << " for file " << name << ". Supported extensions are '.ftr', '.stl', '.stlb', " << "'.gts', '.obj', '.vtk'" << ", '.off', '.dx', '.smesh', '.ac' and '.tri'" diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H index c2f7cf178f..bac27237c3 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::iompressible::epsilonLowReWallFunctionFvPatchScalarField + Foam::compressible::epsilonLowReWallFunctionFvPatchScalarField Group grpCmpWallFunctions diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H index 12beef6338..ea1aaa184f 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::compressible:::mutURoughWallFunctionFvPatchScalarField + Foam::compressible::mutURoughWallFunctionFvPatchScalarField Group grpCmpWallFunctions diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution index 5800e2a4b4..3a47e5857c 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution @@ -53,6 +53,12 @@ solvers relTol 0; } + alpha1 + { + nAlphaCorr 2; + nAlphaSubCycles 3; + } + alpha { solver PCG; @@ -72,12 +78,9 @@ PIMPLE { nCorrectors 2; nNonOrthogonalCorrectors 0; - nAlphaCorr 2; - nAlphaSubCycles 3; correctAlpha yes; pRefCell 0; pRefValue 0; } - // ************************************************************************* // diff --git a/wmake/wmake b/wmake/wmake index b9977fa7e1..e5d9396565 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -57,6 +57,7 @@ or a special target: libo build statically linked lib (.o) libso build dynamically linked lib (.so) jar build Java jar + dep build lnInclude and dependencies only USAGE exit 1 @@ -290,7 +291,7 @@ OBJECTS_DIR=$MakeDir/$WM_OPTIONS touch $OBJECTS_DIR/dontIncludeDeps case "$makeType" in -lib | libo | libso ) +lib | libo | libso | dep ) $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps lnInclude/uptodate ;; esac @@ -305,8 +306,11 @@ rc=$? # Make the object files and link #------------------------------------------------------------------------------ -cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType" -# echo "cmd=$cmd" -exec $cmd +if [ "$makeType" != dep ] +then + cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType" + # echo "cmd=$cmd" + exec $cmd +fi #------------------------------------------------------------------------------