diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.C index 2590a08d..1f434f4f 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ timeVaryingUniformFixedValuePointPatchField fixedValuePointPatchField(ptf, p, iF, mapper), timeSeries_(ptf.timeSeries_) { - updateCoeffs(); + this->operator==(timeSeries_(this->db().time().timeOutputValue())); } @@ -73,7 +73,7 @@ timeVaryingUniformFixedValuePointPatchField fixedValuePointPatchField(p, iF), timeSeries_(dict) { - updateCoeffs(); + this->operator==(timeSeries_(this->db().time().timeOutputValue())); } diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 92b71171..fc8fcce1 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -59,7 +59,15 @@ Foam::label Foam::dynamicRefineFvMesh::count { n++; } + + // debug also serves to get-around Clang compiler trying to optimsie + // out this forAll loop under O3 optimisation + if (debug) + { + Info<< "n=" << n << endl; + } } + return n; } @@ -659,11 +667,11 @@ Foam::dynamicRefineFvMesh::maxPointField(const scalarField& pFld) const } -// Get min of connected cell +// Get max of connected cell Foam::scalarField -Foam::dynamicRefineFvMesh::minCellField(const volScalarField& vFld) const +Foam::dynamicRefineFvMesh::maxCellField(const volScalarField& vFld) const { - scalarField pFld(nPoints(), GREAT); + scalarField pFld(nPoints(), -GREAT); forAll(pointCells(), pointI) { @@ -671,7 +679,7 @@ Foam::dynamicRefineFvMesh::minCellField(const volScalarField& vFld) const forAll(pCells, i) { - pFld[pointI] = min(pFld[pointI], vFld[pCells[i]]); + pFld[pointI] = max(pFld[pointI], vFld[pCells[i]]); } } return pFld; @@ -774,10 +782,11 @@ Foam::labelList Foam::dynamicRefineFvMesh::selectRefineCells calculateProtectedCells(unrefineableCell); // Count current selection - label nCandidates = returnReduce(count(candidateCell, 1), sumOp