8 Commits

7 changed files with 32 additions and 71 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -37,7 +37,7 @@
#
#------------------------------------------------------------------------------
export SCOTCH_VERSION=scotch_6.0.3
export SCOTCH_VERSION=scotch_6.0.6
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$SCOTCH_VERSION
#------------------------------------------------------------------------------

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ Foam::data::data(const objectRegistry& obr)
IOobject::NO_WRITE
)
),
prevTimeIndex_(0)
prevTimeIndex_(-1)
{
set("solverPerformance", dictionary());
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,10 +40,15 @@ void Foam::data::setSolverPerformance
List<SolverPerformance<Type>> perfs;
if (prevTimeIndex_ != this->time().timeIndex())
const label timeIndex =
this->time().subCycling()
? this->time().prevTimeState().timeIndex()
: this->time().timeIndex();
if (prevTimeIndex_ != timeIndex)
{
// Reset solver performance between iterations
prevTimeIndex_ = this->time().timeIndex();
prevTimeIndex_ = timeIndex;
dict.clear();
}
else

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ swirlFlowRateInletVelocityFvPatchVectorField
dict.lookupOrDefault
(
"origin",
patch().size()
returnReduce(patch().size(), sumOp<label>())
? gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf())
: Zero
)
@ -75,7 +75,7 @@ swirlFlowRateInletVelocityFvPatchVectorField
dict.lookupOrDefault
(
"axis",
patch().size()
returnReduce(patch().size(), sumOp<label>())
? -gSum(patch().Sf())/gSum(patch().magSf())
: Zero
)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,9 +56,7 @@ void Foam::blockMesh::calcMergeInfo()
}
// set unused to -1
mergeList_.setSize(nPoints_);
mergeList_ = -1;
mergeList_.setSize(nPoints_, -1);
const pointField& blockPoints = topology().points();
const cellList& blockCells = topology().cells();
@ -113,8 +111,11 @@ void Foam::blockMesh::calcMergeInfo()
// Collated points detected by initially taking a constant factor of
// the size of the block.
boundBox bb(blockCells[blockPlabel].points(blockFaces, blockPoints));
const scalar mergeSqrDist = magSqr(10*small*bb.span());
const boundBox bb
(
blockCells[blockPlabel].points(blockFaces, blockPoints)
);
const scalar mergeSqrDist = magSqr(50*small*bb.span());
// This is an N^2 algorithm
@ -548,35 +549,29 @@ void Foam::blockMesh::calcMergeInfo()
}
// Sort merge list to return new point label (in new shorter list)
// given old point label
label newPointLabel = 0;
// Sort merge list and count number of unique points
label nUniqPoints = 0;
forAll(mergeList_, pointLabel)
forAll(mergeList_, pointi)
{
if (mergeList_[pointLabel] > pointLabel)
if (mergeList_[pointi] > pointi)
{
FatalErrorInFunction
<< "Merge list contains point index out of range"
<< exit(FatalError);
}
if
(
mergeList_[pointLabel] == -1
|| mergeList_[pointLabel] == pointLabel
)
if (mergeList_[pointi] == -1 || mergeList_[pointi] == pointi)
{
mergeList_[pointLabel] = newPointLabel;
newPointLabel++;
mergeList_[pointi] = nUniqPoints++;
}
else
{
mergeList_[pointLabel] = mergeList_[mergeList_[pointLabel]];
mergeList_[pointi] = mergeList_[mergeList_[pointi]];
}
}
nPoints_ = newPointLabel;
nPoints_ = nUniqPoints;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,6 +56,7 @@ SourceFiles
#include "globalMeshData.H"
#include "globalIndex.H"
#include "uint.H"
#include "PstreamGlobals.H"
#include "zoltan.h"
#include <mpi.h>

View File

@ -1,40 +0,0 @@
36
(
1069
1071
1074
1253
1256
1259
1262
1264
1266
1269
1271
1273
1276
1463
1466
1468
1471
1474
1477
1480
1482
1485
1487
1490
1492
1494
1497
1500
1503
1506
1508
1512
1514
1517
1519
1522
)