diff --git a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pEqn.H b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pEqn.H index 1c02221ba..d2310c326 100644 --- a/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pEqn.H +++ b/applications/solvers/immersedBoundary/pimpleDyMIbFoam/pEqn.H @@ -35,7 +35,8 @@ } } - // Explicitly relax pressure for momentum corrector except for last corrector + // Explicitly relax pressure for momentum corrector + // except for last corrector if (!pimple.finalIter()) { p.relax(); @@ -54,5 +55,8 @@ ) ) + (1 - UUrf)*U.prevIter(); + + // U.correctBoundaryConditions() must be called with relative fluxes + // because of inletOutlet BC's U.correctBoundaryConditions(); } diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 90a8b4572..fcb6f7d20 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -46,7 +46,7 @@ Description #include -#if READLINE != 0 +#if HAS_READLINE #include #include #endif @@ -56,7 +56,7 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#if READLINE != 0 +#if HAS_READLINE static const char* historyFile = ".setSet"; #endif @@ -785,7 +785,7 @@ int main(int argc, char *argv[]) fileStreamPtr = new std::ifstream(batchFile.c_str()); } -#if READLINE != 0 +#if HAS_READLINE else if (!read_history(historyFile)) { Info<< "Successfully read history from " << historyFile << endl; @@ -829,7 +829,7 @@ int main(int argc, char *argv[]) } else { -# if READLINE != 0 +# if HAS_READLINE { char* linePtr = readline("readline>"); diff --git a/etc/cshrc b/etc/cshrc index 1214a2fd3..f814072cd 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -172,7 +172,7 @@ if ( ! $?WM_NCOMPPROCS ) setenv WM_NCOMPPROCS `$WM_PROJECT_DIR/bin/foamGetSystem # Run options (floating-point signal handling and memory initialisation) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ setenv FOAM_SIGFPE -# setenv FOAM_SETNAN +setenv FOAM_SETNAN # Detect system type and set environment variables diff --git a/src/ODE/sixDOF/sixDOFODE/constraints/rotationalConstraints/rotationalConstraint/rotationalConstraint.H b/src/ODE/sixDOF/sixDOFODE/constraints/rotationalConstraints/rotationalConstraint/rotationalConstraint.H index 4bbf61634..72081fbd4 100644 --- a/src/ODE/sixDOF/sixDOFODE/constraints/rotationalConstraints/rotationalConstraint/rotationalConstraint.H +++ b/src/ODE/sixDOF/sixDOFODE/constraints/rotationalConstraints/rotationalConstraint/rotationalConstraint.H @@ -72,8 +72,15 @@ SourceFiles namespace Foam { +// Forward declaration of classes class sixDOFODE; +// Forward declaration of friend functions and operators +class rotationalConstraint; + +Ostream& operator<<(Ostream&, const rotationalConstraint&); + + /*---------------------------------------------------------------------------*\ Class rotationalConstraint Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/translationalConstraint/translationalConstraint.H b/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/translationalConstraint/translationalConstraint.H index 08104e909..f72760082 100644 --- a/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/translationalConstraint/translationalConstraint.H +++ b/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/translationalConstraint/translationalConstraint.H @@ -72,8 +72,15 @@ SourceFiles namespace Foam { +// Forward declaration of classes class sixDOFODE; +// Forward declaration of friend functions and operators +class translationalConstraint; + +Ostream& operator<<(Ostream&, const translationalConstraint&); + + /*---------------------------------------------------------------------------*\ Class translationalConstraint Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/ODE/sixDOF/sixDOFODE/restraints/combinedRestraints/combinedRestraint/combinedRestraint.H b/src/ODE/sixDOF/sixDOFODE/restraints/combinedRestraints/combinedRestraint/combinedRestraint.H index 15519b7a3..45fce5fd8 100644 --- a/src/ODE/sixDOF/sixDOFODE/restraints/combinedRestraints/combinedRestraint/combinedRestraint.H +++ b/src/ODE/sixDOF/sixDOFODE/restraints/combinedRestraints/combinedRestraint/combinedRestraint.H @@ -54,8 +54,15 @@ SourceFiles namespace Foam { +// Forward declaration of classes class sixDOFODE; +// Forward declaration of friend functions and operators +class combinedRestraint; + +Ostream& operator<<(Ostream&, const combinedRestraint&); + + /*---------------------------------------------------------------------------*\ Class combinedRestraint Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/ODE/sixDOF/sixDOFODE/restraints/rotationalRestraints/rotationalRestraint/rotationalRestraint.H b/src/ODE/sixDOF/sixDOFODE/restraints/rotationalRestraints/rotationalRestraint/rotationalRestraint.H index 6aed49eef..0ab11cd15 100644 --- a/src/ODE/sixDOF/sixDOFODE/restraints/rotationalRestraints/rotationalRestraint/rotationalRestraint.H +++ b/src/ODE/sixDOF/sixDOFODE/restraints/rotationalRestraints/rotationalRestraint/rotationalRestraint.H @@ -54,8 +54,15 @@ SourceFiles namespace Foam { +// Forward declaration of classes class sixDOFODE; +// Forward declaration of friend functions and operators +class rotationalRestraint; + +Ostream& operator<<(Ostream&, const rotationalRestraint&); + + /*---------------------------------------------------------------------------*\ Class rotationalRestraint Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/ODE/sixDOF/sixDOFODE/restraints/translationalRestraints/translationalRestraint/translationalRestraint.H b/src/ODE/sixDOF/sixDOFODE/restraints/translationalRestraints/translationalRestraint/translationalRestraint.H index bfb1f434f..32ae439b4 100644 --- a/src/ODE/sixDOF/sixDOFODE/restraints/translationalRestraints/translationalRestraint/translationalRestraint.H +++ b/src/ODE/sixDOF/sixDOFODE/restraints/translationalRestraints/translationalRestraint/translationalRestraint.H @@ -54,8 +54,15 @@ SourceFiles namespace Foam { +// Forward declaration of classes class sixDOFODE; +// Forward declaration of friend functions and operators +class translationalRestraint; + +Ostream& operator<<(Ostream&, const translationalRestraint&); + + /*---------------------------------------------------------------------------*\ Class translationalRestraint Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H b/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H index e84157b92..a945c6c93 100644 --- a/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H +++ b/src/ODE/sixDOF/sixDOFqODE/sixDOFqODE.H @@ -52,6 +52,12 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators +class sixDOFqODE; + +Ostream& operator<<(Ostream&, const sixDOFqODE&); + + /*---------------------------------------------------------------------------*\ Class sixDOFqODE Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/ODE/translationODE/translationODE.H b/src/ODE/translationODE/translationODE.H index d7d32cefc..18838a1e9 100644 --- a/src/ODE/translationODE/translationODE.H +++ b/src/ODE/translationODE/translationODE.H @@ -51,6 +51,12 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators +class translationODE; + +Ostream& operator<<(Ostream&, const translationODE&); + + /*---------------------------------------------------------------------------*\ Class translationODE Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OSspecific/POSIX/memInfo/memInfo.H b/src/OSspecific/POSIX/memInfo/memInfo.H index cf660d34f..4f7344491 100644 --- a/src/OSspecific/POSIX/memInfo/memInfo.H +++ b/src/OSspecific/POSIX/memInfo/memInfo.H @@ -47,6 +47,17 @@ SourceFiles namespace Foam { +// Forward declaration of classes +class Istream; +class Ostream; + +// Forward declaration of friend functions and operators +class memInfo; + +Istream& operator>>(Istream&, memInfo&); +Ostream& operator<<(Ostream&, const memInfo&); + + /*---------------------------------------------------------------------------*\ Class memInfo Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C b/src/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C index 54497a652..9f15e1af4 100644 --- a/src/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C +++ b/src/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C @@ -261,7 +261,7 @@ Foam::chtRcThermalDiffusivityFvPatchScalarField::calcThermalDiffusivity const scalarField kOwn = fOwn/(1.0 - p.weights())/mld.magDelta(p.index()); const scalarField kNei = fNei/p.weights()/mld.magDelta(p.index()); - + tmp kTmp(new scalarField(p.size())); scalarField& k = kTmp(); diff --git a/src/conversion/ensight/part/ensightPart.H b/src/conversion/ensight/part/ensightPart.H index eb60906bd..f2c609f07 100644 --- a/src/conversion/ensight/part/ensightPart.H +++ b/src/conversion/ensight/part/ensightPart.H @@ -51,6 +51,13 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators +class ensightPart; + +Ostream& operator<<(Ostream&, const ensightPart&); +ensightGeoFile& operator<<(ensightGeoFile&, const ensightPart&); + + /*---------------------------------------------------------------------------*\ Class ensightPart Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/conversion/ensight/part/ensightParts.H b/src/conversion/ensight/part/ensightParts.H index bbd4bde03..7a4b0c2e6 100644 --- a/src/conversion/ensight/part/ensightParts.H +++ b/src/conversion/ensight/part/ensightParts.H @@ -46,6 +46,12 @@ SourceFiles namespace Foam { +// Forward declaration of friend functions and operators +class ensightParts; + +ensightGeoFile& operator<<(ensightGeoFile&, const ensightParts&); + + /*---------------------------------------------------------------------------*\ Class ensightParts Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C index 3d0fab6bf..45c459f87 100644 --- a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C +++ b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C @@ -38,9 +38,83 @@ Description #include "primitiveMesh.H" #include "processorPolyPatch.H" #include "cyclicPolyPatch.H" +#include "SortableList.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +bool Foam::domainDecomposition::addInterProcessorBoundaryData +( + const label& procI, + const label& procJ, + const label faceI, + + List >& interProcBoundaries, + List > >& interProcBFaces +) const +{ + // Algorithm: Syncronously loop through the two lists containing all + // neighbouring processor for a given processor and check whether this + // processor is already in the list of neighbours. If the processor is + // already there, simply append the face. If it's not there, append the + // processor and the first face. + + // Get iterators to beginning of the two lists + SLList